]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20200829
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.721 .
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
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         CFLAGS="$CFLAGS -Qunused-arguments"
2181         cat >conftest.$ac_ext <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184
2185 int
2186 main (void)
2187 {
2188
2189 #ifdef __clang__
2190 #else
2191 make an error
2192 #endif
2193
2194   ;
2195   return 0;
2196 }
2197 _ACEOF
2198 rm -f conftest.$ac_objext
2199 if { (eval echo "$as_me:2199: \"$ac_compile\"") >&5
2200   (eval $ac_compile) 2>&5
2201   ac_status=$?
2202   echo "$as_me:2202: \$? = $ac_status" >&5
2203   (exit $ac_status); } &&
2204          { ac_try='test -s conftest.$ac_objext'
2205   { (eval echo "$as_me:2205: \"$ac_try\"") >&5
2206   (eval $ac_try) 2>&5
2207   ac_status=$?
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); }; }; then
2210   CLANG_COMPILER=yes
2211 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2212
2213 else
2214   echo "$as_me: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2216 fi
2217 rm -f conftest.$ac_objext conftest.$ac_ext
2218         CFLAGS="$cf_save_CFLAGS"
2219         echo "$as_me:2219: result: $CLANG_COMPILER" >&5
2220 echo "${ECHO_T}$CLANG_COMPILER" >&6
2221 fi
2222
2223 if test "x$CLANG_COMPILER" = "xyes" ; then
2224
2225         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2226         CFLAGS="${CFLAGS}-Wno-error=implicit-function-declaration"
2227
2228 fi
2229
2230 echo "$as_me:2230: checking for $CC option to accept ANSI C" >&5
2231 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2232 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2233   echo $ECHO_N "(cached) $ECHO_C" >&6
2234 else
2235   ac_cv_prog_cc_stdc=no
2236 ac_save_CC=$CC
2237 cat >conftest.$ac_ext <<_ACEOF
2238 #line 2238 "configure"
2239 #include "confdefs.h"
2240 #include <stdarg.h>
2241 #include <stdio.h>
2242 #include <sys/types.h>
2243 #include <sys/stat.h>
2244 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2245 struct buf { int x; };
2246 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2247 static char *e (p, i)
2248      char **p;
2249      int i;
2250 {
2251   return p[i];
2252 }
2253 static char *f (char * (*g) (char **, int), char **p, ...)
2254 {
2255   char *s;
2256   va_list v;
2257   va_start (v,p);
2258   s = g (p, va_arg (v,int));
2259   va_end (v);
2260   return s;
2261 }
2262 int test (int i, double x);
2263 struct s1 {int (*f) (int a);};
2264 struct s2 {int (*f) (double a);};
2265 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2266 int argc;
2267 char **argv;
2268 int
2269 main (void)
2270 {
2271 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2272   ;
2273   return 0;
2274 }
2275 _ACEOF
2276 # Don't try gcc -ansi; that turns off useful extensions and
2277 # breaks some systems' header files.
2278 # AIX                   -qlanglvl=ansi
2279 # Ultrix and OSF/1      -std1
2280 # HP-UX 10.20 and later -Ae
2281 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2282 # SVR4                  -Xc -D__EXTENSIONS__
2283 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2284 do
2285   CC="$ac_save_CC $ac_arg"
2286   rm -f conftest.$ac_objext
2287 if { (eval echo "$as_me:2287: \"$ac_compile\"") >&5
2288   (eval $ac_compile) 2>&5
2289   ac_status=$?
2290   echo "$as_me:2290: \$? = $ac_status" >&5
2291   (exit $ac_status); } &&
2292          { ac_try='test -s conftest.$ac_objext'
2293   { (eval echo "$as_me:2293: \"$ac_try\"") >&5
2294   (eval $ac_try) 2>&5
2295   ac_status=$?
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); }; }; then
2298   ac_cv_prog_cc_stdc=$ac_arg
2299 break
2300 else
2301   echo "$as_me: failed program was:" >&5
2302 cat conftest.$ac_ext >&5
2303 fi
2304 rm -f conftest.$ac_objext
2305 done
2306 rm -f conftest.$ac_ext conftest.$ac_objext
2307 CC=$ac_save_CC
2308
2309 fi
2310
2311 case "x$ac_cv_prog_cc_stdc" in
2312   x|xno)
2313     echo "$as_me:2313: result: none needed" >&5
2314 echo "${ECHO_T}none needed" >&6 ;;
2315   *)
2316     echo "$as_me:2316: result: $ac_cv_prog_cc_stdc" >&5
2317 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2318     CC="$CC $ac_cv_prog_cc_stdc" ;;
2319 esac
2320
2321 # This should have been defined by AC_PROG_CC
2322 : ${CC:=cc}
2323
2324 echo "$as_me:2324: checking \$CFLAGS variable" >&5
2325 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2326 case "x$CFLAGS" in
2327 (*-[IUD]*)
2328         echo "$as_me:2328: result: broken" >&5
2329 echo "${ECHO_T}broken" >&6
2330         { echo "$as_me:2330: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2331 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2332         cf_flags="$CFLAGS"
2333         CFLAGS=
2334         for cf_arg in $cf_flags
2335         do
2336
2337 cf_fix_cppflags=no
2338 cf_new_cflags=
2339 cf_new_cppflags=
2340 cf_new_extra_cppflags=
2341
2342 for cf_add_cflags in $cf_arg
2343 do
2344 case $cf_fix_cppflags in
2345 (no)
2346         case $cf_add_cflags in
2347         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2348                 case $cf_add_cflags in
2349                 (-D*)
2350                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2351
2352                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2353                                 && test -z "${cf_tst_cflags}" \
2354                                 && cf_fix_cppflags=yes
2355
2356                         if test $cf_fix_cppflags = yes ; then
2357
2358         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2359         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2360
2361                                 continue
2362                         elif test "${cf_tst_cflags}" = "\"'" ; then
2363
2364         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2365         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2366
2367                                 continue
2368                         fi
2369                         ;;
2370                 esac
2371                 case "$CPPFLAGS" in
2372                 (*$cf_add_cflags)
2373                         ;;
2374                 (*)
2375                         case $cf_add_cflags in
2376                         (-D*)
2377                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2378
2379 CPPFLAGS=`echo "$CPPFLAGS" | \
2380         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2381                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2382
2383                                 ;;
2384                         esac
2385
2386         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2387         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2388
2389                         ;;
2390                 esac
2391                 ;;
2392         (*)
2393
2394         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2395         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2396
2397                 ;;
2398         esac
2399         ;;
2400 (yes)
2401
2402         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2403         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2404
2405         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2406
2407         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2408                 && test -z "${cf_tst_cflags}" \
2409                 && cf_fix_cppflags=no
2410         ;;
2411 esac
2412 done
2413
2414 if test -n "$cf_new_cflags" ; then
2415
2416         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2417         CFLAGS="${CFLAGS}$cf_new_cflags"
2418
2419 fi
2420
2421 if test -n "$cf_new_cppflags" ; then
2422
2423         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2424         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2425
2426 fi
2427
2428 if test -n "$cf_new_extra_cppflags" ; then
2429
2430         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2431         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2432
2433 fi
2434
2435         done
2436         ;;
2437 (*)
2438         echo "$as_me:2438: result: ok" >&5
2439 echo "${ECHO_T}ok" >&6
2440         ;;
2441 esac
2442
2443 echo "$as_me:2443: checking \$CC variable" >&5
2444 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2445 case "$CC" in
2446 (*[\ \  ]-*)
2447         echo "$as_me:2447: result: broken" >&5
2448 echo "${ECHO_T}broken" >&6
2449         { echo "$as_me:2449: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2450 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2451         # humor him...
2452         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2453         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2454         CC="$cf_prog"
2455         for cf_arg in $cf_flags
2456         do
2457                 case "x$cf_arg" in
2458                 (x-[IUDfgOW]*)
2459
2460 cf_fix_cppflags=no
2461 cf_new_cflags=
2462 cf_new_cppflags=
2463 cf_new_extra_cppflags=
2464
2465 for cf_add_cflags in $cf_arg
2466 do
2467 case $cf_fix_cppflags in
2468 (no)
2469         case $cf_add_cflags in
2470         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2471                 case $cf_add_cflags in
2472                 (-D*)
2473                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2474
2475                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2476                                 && test -z "${cf_tst_cflags}" \
2477                                 && cf_fix_cppflags=yes
2478
2479                         if test $cf_fix_cppflags = yes ; then
2480
2481         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2482         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2483
2484                                 continue
2485                         elif test "${cf_tst_cflags}" = "\"'" ; then
2486
2487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2489
2490                                 continue
2491                         fi
2492                         ;;
2493                 esac
2494                 case "$CPPFLAGS" in
2495                 (*$cf_add_cflags)
2496                         ;;
2497                 (*)
2498                         case $cf_add_cflags in
2499                         (-D*)
2500                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2501
2502 CPPFLAGS=`echo "$CPPFLAGS" | \
2503         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2504                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2505
2506                                 ;;
2507                         esac
2508
2509         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2510         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2511
2512                         ;;
2513                 esac
2514                 ;;
2515         (*)
2516
2517         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2518         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2519
2520                 ;;
2521         esac
2522         ;;
2523 (yes)
2524
2525         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2526         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2527
2528         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2529
2530         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2531                 && test -z "${cf_tst_cflags}" \
2532                 && cf_fix_cppflags=no
2533         ;;
2534 esac
2535 done
2536
2537 if test -n "$cf_new_cflags" ; then
2538
2539         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2540         CFLAGS="${CFLAGS}$cf_new_cflags"
2541
2542 fi
2543
2544 if test -n "$cf_new_cppflags" ; then
2545
2546         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2547         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2548
2549 fi
2550
2551 if test -n "$cf_new_extra_cppflags" ; then
2552
2553         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2554         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2555
2556 fi
2557
2558                         ;;
2559                 (*)
2560                         CC="$CC $cf_arg"
2561                         ;;
2562                 esac
2563         done
2564         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2565
2566 echo "${as_me:-configure}:2566: testing resulting CC: '$CC' ..." 1>&5
2567
2568         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2569
2570 echo "${as_me:-configure}:2570: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2571
2572         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2573
2574 echo "${as_me:-configure}:2574: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2575
2576         ;;
2577 (*)
2578         echo "$as_me:2578: result: ok" >&5
2579 echo "${ECHO_T}ok" >&6
2580         ;;
2581 esac
2582
2583 ac_ext=c
2584 ac_cpp='$CPP $CPPFLAGS'
2585 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2586 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2587 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2588 ac_main_return=return
2589 echo "$as_me:2589: checking how to run the C preprocessor" >&5
2590 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2591 # On Suns, sometimes $CPP names a directory.
2592 if test -n "$CPP" && test -d "$CPP"; then
2593   CPP=
2594 fi
2595 if test -z "$CPP"; then
2596   if test "${ac_cv_prog_CPP+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599       # Double quotes because CPP needs to be expanded
2600     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2601     do
2602       ac_preproc_ok=false
2603 for ac_c_preproc_warn_flag in '' yes
2604 do
2605   # Use a header file that comes with gcc, so configuring glibc
2606   # with a fresh cross-compiler works.
2607   # On the NeXT, cc -E runs the code through the compiler's parser,
2608   # not just through cpp. "Syntax error" is here to catch this case.
2609   cat >conftest.$ac_ext <<_ACEOF
2610 #line 2610 "configure"
2611 #include "confdefs.h"
2612 #include <assert.h>
2613                      Syntax error
2614 _ACEOF
2615 if { (eval echo "$as_me:2615: \"$ac_cpp conftest.$ac_ext\"") >&5
2616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2617   ac_status=$?
2618   egrep -v '^ *\+' conftest.er1 >conftest.err
2619   rm -f conftest.er1
2620   cat conftest.err >&5
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } >/dev/null; then
2623   if test -s conftest.err; then
2624     ac_cpp_err=$ac_c_preproc_warn_flag
2625   else
2626     ac_cpp_err=
2627   fi
2628 else
2629   ac_cpp_err=yes
2630 fi
2631 if test -z "$ac_cpp_err"; then
2632   :
2633 else
2634   echo "$as_me: failed program was:" >&5
2635   cat conftest.$ac_ext >&5
2636   # Broken: fails on valid input.
2637 continue
2638 fi
2639 rm -f conftest.err conftest.$ac_ext
2640
2641   # OK, works on sane cases.  Now check whether non-existent headers
2642   # can be detected and how.
2643   cat >conftest.$ac_ext <<_ACEOF
2644 #line 2644 "configure"
2645 #include "confdefs.h"
2646 #include <ac_nonexistent.h>
2647 _ACEOF
2648 if { (eval echo "$as_me:2648: \"$ac_cpp conftest.$ac_ext\"") >&5
2649   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2650   ac_status=$?
2651   egrep -v '^ *\+' conftest.er1 >conftest.err
2652   rm -f conftest.er1
2653   cat conftest.err >&5
2654   echo "$as_me:2654: \$? = $ac_status" >&5
2655   (exit $ac_status); } >/dev/null; then
2656   if test -s conftest.err; then
2657     ac_cpp_err=$ac_c_preproc_warn_flag
2658   else
2659     ac_cpp_err=
2660   fi
2661 else
2662   ac_cpp_err=yes
2663 fi
2664 if test -z "$ac_cpp_err"; then
2665   # Broken: success on invalid input.
2666 continue
2667 else
2668   echo "$as_me: failed program was:" >&5
2669   cat conftest.$ac_ext >&5
2670   # Passes both tests.
2671 ac_preproc_ok=:
2672 break
2673 fi
2674 rm -f conftest.err conftest.$ac_ext
2675
2676 done
2677 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2678 rm -f conftest.err conftest.$ac_ext
2679 if $ac_preproc_ok; then
2680   break
2681 fi
2682
2683     done
2684     ac_cv_prog_CPP=$CPP
2685
2686 fi
2687   CPP=$ac_cv_prog_CPP
2688 else
2689   ac_cv_prog_CPP=$CPP
2690 fi
2691 echo "$as_me:2691: result: $CPP" >&5
2692 echo "${ECHO_T}$CPP" >&6
2693 ac_preproc_ok=false
2694 for ac_c_preproc_warn_flag in '' yes
2695 do
2696   # Use a header file that comes with gcc, so configuring glibc
2697   # with a fresh cross-compiler works.
2698   # On the NeXT, cc -E runs the code through the compiler's parser,
2699   # not just through cpp. "Syntax error" is here to catch this case.
2700   cat >conftest.$ac_ext <<_ACEOF
2701 #line 2701 "configure"
2702 #include "confdefs.h"
2703 #include <assert.h>
2704                      Syntax error
2705 _ACEOF
2706 if { (eval echo "$as_me:2706: \"$ac_cpp conftest.$ac_ext\"") >&5
2707   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2708   ac_status=$?
2709   egrep -v '^ *\+' conftest.er1 >conftest.err
2710   rm -f conftest.er1
2711   cat conftest.err >&5
2712   echo "$as_me:2712: \$? = $ac_status" >&5
2713   (exit $ac_status); } >/dev/null; then
2714   if test -s conftest.err; then
2715     ac_cpp_err=$ac_c_preproc_warn_flag
2716   else
2717     ac_cpp_err=
2718   fi
2719 else
2720   ac_cpp_err=yes
2721 fi
2722 if test -z "$ac_cpp_err"; then
2723   :
2724 else
2725   echo "$as_me: failed program was:" >&5
2726   cat conftest.$ac_ext >&5
2727   # Broken: fails on valid input.
2728 continue
2729 fi
2730 rm -f conftest.err conftest.$ac_ext
2731
2732   # OK, works on sane cases.  Now check whether non-existent headers
2733   # can be detected and how.
2734   cat >conftest.$ac_ext <<_ACEOF
2735 #line 2735 "configure"
2736 #include "confdefs.h"
2737 #include <ac_nonexistent.h>
2738 _ACEOF
2739 if { (eval echo "$as_me:2739: \"$ac_cpp conftest.$ac_ext\"") >&5
2740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2741   ac_status=$?
2742   egrep -v '^ *\+' conftest.er1 >conftest.err
2743   rm -f conftest.er1
2744   cat conftest.err >&5
2745   echo "$as_me:2745: \$? = $ac_status" >&5
2746   (exit $ac_status); } >/dev/null; then
2747   if test -s conftest.err; then
2748     ac_cpp_err=$ac_c_preproc_warn_flag
2749   else
2750     ac_cpp_err=
2751   fi
2752 else
2753   ac_cpp_err=yes
2754 fi
2755 if test -z "$ac_cpp_err"; then
2756   # Broken: success on invalid input.
2757 continue
2758 else
2759   echo "$as_me: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761   # Passes both tests.
2762 ac_preproc_ok=:
2763 break
2764 fi
2765 rm -f conftest.err conftest.$ac_ext
2766
2767 done
2768 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2769 rm -f conftest.err conftest.$ac_ext
2770 if $ac_preproc_ok; then
2771   :
2772 else
2773   { { echo "$as_me:2773: error: C preprocessor \"$CPP\" fails sanity check" >&5
2774 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2775    { (exit 1); exit 1; }; }
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785 if test $ac_cv_c_compiler_gnu = yes; then
2786     echo "$as_me:2786: checking whether $CC needs -traditional" >&5
2787 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2788 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791     ac_pattern="Autoconf.*'x'"
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795 #include <sgtty.h>
2796 int Autoconf = TIOCGETP;
2797 _ACEOF
2798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2799   egrep "$ac_pattern" >/dev/null 2>&1; then
2800   ac_cv_prog_gcc_traditional=yes
2801 else
2802   ac_cv_prog_gcc_traditional=no
2803 fi
2804 rm -rf conftest*
2805
2806   if test $ac_cv_prog_gcc_traditional = no; then
2807     cat >conftest.$ac_ext <<_ACEOF
2808 #line 2808 "configure"
2809 #include "confdefs.h"
2810 #include <termio.h>
2811 int Autoconf = TCGETA;
2812 _ACEOF
2813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2814   egrep "$ac_pattern" >/dev/null 2>&1; then
2815   ac_cv_prog_gcc_traditional=yes
2816 fi
2817 rm -rf conftest*
2818
2819   fi
2820 fi
2821 echo "$as_me:2821: result: $ac_cv_prog_gcc_traditional" >&5
2822 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2823   if test $ac_cv_prog_gcc_traditional = yes; then
2824     CC="$CC -traditional"
2825   fi
2826 fi
2827
2828 echo "$as_me:2828: checking whether $CC understands -c and -o together" >&5
2829 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2830 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2831   echo $ECHO_N "(cached) $ECHO_C" >&6
2832 else
2833
2834 cat > conftest.$ac_ext <<CF_EOF
2835 int main(void)
2836 {
2837         ${cf_cv_main_return:-return}(0);
2838 }
2839 CF_EOF
2840 # We do the test twice because some compilers refuse to overwrite an
2841 # existing .o file with -o, though they will create one.
2842 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2843 if { (eval echo "$as_me:2843: \"$ac_try\"") >&5
2844   (eval $ac_try) 2>&5
2845   ac_status=$?
2846   echo "$as_me:2846: \$? = $ac_status" >&5
2847   (exit $ac_status); } &&
2848   test -f conftest2.$ac_objext && { (eval echo "$as_me:2848: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:2851: \$? = $ac_status" >&5
2852   (exit $ac_status); };
2853 then
2854   eval cf_cv_prog_CC_c_o=yes
2855 else
2856   eval cf_cv_prog_CC_c_o=no
2857 fi
2858 rm -rf conftest*
2859
2860 fi
2861 if test $cf_cv_prog_CC_c_o = yes; then
2862   echo "$as_me:2862: result: yes" >&5
2863 echo "${ECHO_T}yes" >&6
2864 else
2865   echo "$as_me:2865: result: no" >&5
2866 echo "${ECHO_T}no" >&6
2867 fi
2868
2869 if test "$cross_compiling" = yes ; then
2870         LDCONFIG=:
2871 else
2872         case "$cf_cv_system_name" in
2873         (dragonfly*|mirbsd*|freebsd*)
2874                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2875                 ;;
2876         (*) LDPATH=$PATH:/sbin:/usr/sbin
2877                 # Extract the first word of "ldconfig", so it can be a program name with args.
2878 set dummy ldconfig; ac_word=$2
2879 echo "$as_me:2879: checking for $ac_word" >&5
2880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2881 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2882   echo $ECHO_N "(cached) $ECHO_C" >&6
2883 else
2884   case $LDCONFIG in
2885   [\\/]* | ?:[\\/]*)
2886   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2887   ;;
2888   *)
2889   ac_save_IFS=$IFS; IFS=$ac_path_separator
2890 ac_dummy="$LDPATH"
2891 for ac_dir in $ac_dummy; do
2892   IFS=$ac_save_IFS
2893   test -z "$ac_dir" && ac_dir=.
2894   if $as_executable_p "$ac_dir/$ac_word"; then
2895    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2896    echo "$as_me:2896: found $ac_dir/$ac_word" >&5
2897    break
2898 fi
2899 done
2900
2901   ;;
2902 esac
2903 fi
2904 LDCONFIG=$ac_cv_path_LDCONFIG
2905
2906 if test -n "$LDCONFIG"; then
2907   echo "$as_me:2907: result: $LDCONFIG" >&5
2908 echo "${ECHO_T}$LDCONFIG" >&6
2909 else
2910   echo "$as_me:2910: result: no" >&5
2911 echo "${ECHO_T}no" >&6
2912 fi
2913
2914                 ;;
2915         esac
2916 fi
2917
2918 echo "$as_me:2918: checking if you want to ensure bool is consistent with C++" >&5
2919 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2920
2921 # Check whether --with-cxx or --without-cxx was given.
2922 if test "${with_cxx+set}" = set; then
2923   withval="$with_cxx"
2924   cf_with_cxx=$withval
2925 else
2926   cf_with_cxx=yes
2927 fi;
2928 echo "$as_me:2928: result: $cf_with_cxx" >&5
2929 echo "${ECHO_T}$cf_with_cxx" >&6
2930 if test "X$cf_with_cxx" = Xno ; then
2931         CXX=""
2932         GXX=""
2933 else
2934         # with autoconf 2.13, we can change the error to a warning:
2935                 ac_ext=cc
2936 ac_cpp='$CXXCPP $CPPFLAGS'
2937 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2938 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2939 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2940 ac_main_return=return
2941 if test -n "$ac_tool_prefix"; then
2942   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2943   do
2944     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2945 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2946 echo "$as_me:2946: checking for $ac_word" >&5
2947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2948 if test "${ac_cv_prog_CXX+set}" = set; then
2949   echo $ECHO_N "(cached) $ECHO_C" >&6
2950 else
2951   if test -n "$CXX"; then
2952   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2953 else
2954   ac_save_IFS=$IFS; IFS=$ac_path_separator
2955 ac_dummy="$PATH"
2956 for ac_dir in $ac_dummy; do
2957   IFS=$ac_save_IFS
2958   test -z "$ac_dir" && ac_dir=.
2959   $as_executable_p "$ac_dir/$ac_word" || continue
2960 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2961 echo "$as_me:2961: found $ac_dir/$ac_word" >&5
2962 break
2963 done
2964
2965 fi
2966 fi
2967 CXX=$ac_cv_prog_CXX
2968 if test -n "$CXX"; then
2969   echo "$as_me:2969: result: $CXX" >&5
2970 echo "${ECHO_T}$CXX" >&6
2971 else
2972   echo "$as_me:2972: result: no" >&5
2973 echo "${ECHO_T}no" >&6
2974 fi
2975
2976     test -n "$CXX" && break
2977   done
2978 fi
2979 if test -z "$CXX"; then
2980   ac_ct_CXX=$CXX
2981   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2982 do
2983   # Extract the first word of "$ac_prog", so it can be a program name with args.
2984 set dummy $ac_prog; ac_word=$2
2985 echo "$as_me:2985: checking for $ac_word" >&5
2986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2987 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2988   echo $ECHO_N "(cached) $ECHO_C" >&6
2989 else
2990   if test -n "$ac_ct_CXX"; then
2991   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2992 else
2993   ac_save_IFS=$IFS; IFS=$ac_path_separator
2994 ac_dummy="$PATH"
2995 for ac_dir in $ac_dummy; do
2996   IFS=$ac_save_IFS
2997   test -z "$ac_dir" && ac_dir=.
2998   $as_executable_p "$ac_dir/$ac_word" || continue
2999 ac_cv_prog_ac_ct_CXX="$ac_prog"
3000 echo "$as_me:3000: found $ac_dir/$ac_word" >&5
3001 break
3002 done
3003
3004 fi
3005 fi
3006 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3007 if test -n "$ac_ct_CXX"; then
3008   echo "$as_me:3008: result: $ac_ct_CXX" >&5
3009 echo "${ECHO_T}$ac_ct_CXX" >&6
3010 else
3011   echo "$as_me:3011: result: no" >&5
3012 echo "${ECHO_T}no" >&6
3013 fi
3014
3015   test -n "$ac_ct_CXX" && break
3016 done
3017 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3018
3019   CXX=$ac_ct_CXX
3020 fi
3021
3022 # Provide some information about the compiler.
3023 echo "$as_me:3023:" \
3024      "checking for C++ compiler version" >&5
3025 ac_compiler=`set X $ac_compile; echo $2`
3026 { (eval echo "$as_me:3026: \"$ac_compiler --version </dev/null >&5\"") >&5
3027   (eval $ac_compiler --version </dev/null >&5) 2>&5
3028   ac_status=$?
3029   echo "$as_me:3029: \$? = $ac_status" >&5
3030   (exit $ac_status); }
3031 { (eval echo "$as_me:3031: \"$ac_compiler -v </dev/null >&5\"") >&5
3032   (eval $ac_compiler -v </dev/null >&5) 2>&5
3033   ac_status=$?
3034   echo "$as_me:3034: \$? = $ac_status" >&5
3035   (exit $ac_status); }
3036 { (eval echo "$as_me:3036: \"$ac_compiler -V </dev/null >&5\"") >&5
3037   (eval $ac_compiler -V </dev/null >&5) 2>&5
3038   ac_status=$?
3039   echo "$as_me:3039: \$? = $ac_status" >&5
3040   (exit $ac_status); }
3041
3042 echo "$as_me:3042: checking whether we are using the GNU C++ compiler" >&5
3043 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3044 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3045   echo $ECHO_N "(cached) $ECHO_C" >&6
3046 else
3047   cat >conftest.$ac_ext <<_ACEOF
3048 #line 3048 "configure"
3049 #include "confdefs.h"
3050
3051 int
3052 main (void)
3053 {
3054 #ifndef __GNUC__
3055        choke me
3056 #endif
3057
3058   ;
3059   return 0;
3060 }
3061 _ACEOF
3062 rm -f conftest.$ac_objext
3063 if { (eval echo "$as_me:3063: \"$ac_compile\"") >&5
3064   (eval $ac_compile) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit $ac_status); } &&
3068          { ac_try='test -s conftest.$ac_objext'
3069   { (eval echo "$as_me:3069: \"$ac_try\"") >&5
3070   (eval $ac_try) 2>&5
3071   ac_status=$?
3072   echo "$as_me:3072: \$? = $ac_status" >&5
3073   (exit $ac_status); }; }; then
3074   ac_compiler_gnu=yes
3075 else
3076   echo "$as_me: failed program was:" >&5
3077 cat conftest.$ac_ext >&5
3078 ac_compiler_gnu=no
3079 fi
3080 rm -f conftest.$ac_objext conftest.$ac_ext
3081 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3082
3083 fi
3084 echo "$as_me:3084: result: $ac_cv_cxx_compiler_gnu" >&5
3085 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3086 GXX=`test $ac_compiler_gnu = yes && echo yes`
3087 ac_test_CXXFLAGS=${CXXFLAGS+set}
3088 ac_save_CXXFLAGS=$CXXFLAGS
3089 CXXFLAGS="-g"
3090 echo "$as_me:3090: checking whether $CXX accepts -g" >&5
3091 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3092 if test "${ac_cv_prog_cxx_g+set}" = set; then
3093   echo $ECHO_N "(cached) $ECHO_C" >&6
3094 else
3095   cat >conftest.$ac_ext <<_ACEOF
3096 #line 3096 "configure"
3097 #include "confdefs.h"
3098
3099 int
3100 main (void)
3101 {
3102
3103   ;
3104   return 0;
3105 }
3106 _ACEOF
3107 rm -f conftest.$ac_objext
3108 if { (eval echo "$as_me:3108: \"$ac_compile\"") >&5
3109   (eval $ac_compile) 2>&5
3110   ac_status=$?
3111   echo "$as_me:3111: \$? = $ac_status" >&5
3112   (exit $ac_status); } &&
3113          { ac_try='test -s conftest.$ac_objext'
3114   { (eval echo "$as_me:3114: \"$ac_try\"") >&5
3115   (eval $ac_try) 2>&5
3116   ac_status=$?
3117   echo "$as_me:3117: \$? = $ac_status" >&5
3118   (exit $ac_status); }; }; then
3119   ac_cv_prog_cxx_g=yes
3120 else
3121   echo "$as_me: failed program was:" >&5
3122 cat conftest.$ac_ext >&5
3123 ac_cv_prog_cxx_g=no
3124 fi
3125 rm -f conftest.$ac_objext conftest.$ac_ext
3126 fi
3127 echo "$as_me:3127: result: $ac_cv_prog_cxx_g" >&5
3128 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3129 if test "$ac_test_CXXFLAGS" = set; then
3130   CXXFLAGS=$ac_save_CXXFLAGS
3131 elif test $ac_cv_prog_cxx_g = yes; then
3132   if test "$GXX" = yes; then
3133     CXXFLAGS="-g -O2"
3134   else
3135     CXXFLAGS="-g"
3136   fi
3137 else
3138   if test "$GXX" = yes; then
3139     CXXFLAGS="-O2"
3140   else
3141     CXXFLAGS=
3142   fi
3143 fi
3144 for ac_declaration in \
3145    ''\
3146    '#include <stdlib.h>' \
3147    'extern "C" void std::exit (int) throw (); using std::exit;' \
3148    'extern "C" void std::exit (int); using std::exit;' \
3149    'extern "C" void exit (int) throw ();' \
3150    'extern "C" void exit (int);' \
3151    'void exit (int);'
3152 do
3153   cat >conftest.$ac_ext <<_ACEOF
3154 #line 3154 "configure"
3155 #include "confdefs.h"
3156 #include <stdlib.h>
3157 $ac_declaration
3158 int
3159 main (void)
3160 {
3161 exit (42);
3162   ;
3163   return 0;
3164 }
3165 _ACEOF
3166 rm -f conftest.$ac_objext
3167 if { (eval echo "$as_me:3167: \"$ac_compile\"") >&5
3168   (eval $ac_compile) 2>&5
3169   ac_status=$?
3170   echo "$as_me:3170: \$? = $ac_status" >&5
3171   (exit $ac_status); } &&
3172          { ac_try='test -s conftest.$ac_objext'
3173   { (eval echo "$as_me:3173: \"$ac_try\"") >&5
3174   (eval $ac_try) 2>&5
3175   ac_status=$?
3176   echo "$as_me:3176: \$? = $ac_status" >&5
3177   (exit $ac_status); }; }; then
3178   :
3179 else
3180   echo "$as_me: failed program was:" >&5
3181 cat conftest.$ac_ext >&5
3182 continue
3183 fi
3184 rm -f conftest.$ac_objext conftest.$ac_ext
3185   cat >conftest.$ac_ext <<_ACEOF
3186 #line 3186 "configure"
3187 #include "confdefs.h"
3188 $ac_declaration
3189 int
3190 main (void)
3191 {
3192 exit (42);
3193   ;
3194   return 0;
3195 }
3196 _ACEOF
3197 rm -f conftest.$ac_objext
3198 if { (eval echo "$as_me:3198: \"$ac_compile\"") >&5
3199   (eval $ac_compile) 2>&5
3200   ac_status=$?
3201   echo "$as_me:3201: \$? = $ac_status" >&5
3202   (exit $ac_status); } &&
3203          { ac_try='test -s conftest.$ac_objext'
3204   { (eval echo "$as_me:3204: \"$ac_try\"") >&5
3205   (eval $ac_try) 2>&5
3206   ac_status=$?
3207   echo "$as_me:3207: \$? = $ac_status" >&5
3208   (exit $ac_status); }; }; then
3209   break
3210 else
3211   echo "$as_me: failed program was:" >&5
3212 cat conftest.$ac_ext >&5
3213 fi
3214 rm -f conftest.$ac_objext conftest.$ac_ext
3215 done
3216 rm -rf conftest*
3217 if test -n "$ac_declaration"; then
3218   echo '#ifdef __cplusplus' >>confdefs.h
3219   echo $ac_declaration      >>confdefs.h
3220   echo '#endif'             >>confdefs.h
3221 fi
3222
3223 ac_ext=c
3224 ac_cpp='$CPP $CPPFLAGS'
3225 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3226 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3227 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3228 ac_main_return=return
3229
3230         ac_ext=cc
3231 ac_cpp='$CXXCPP $CPPFLAGS'
3232 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3235 ac_main_return=return
3236
3237         if test "x$cf_with_cxx" != xno
3238         then
3239                 # Several of the C++ configurations do not work, particularly when
3240                 # cross-compiling (20140913 -TD)
3241                 echo "$as_me:3241: checking if $CXX works" >&5
3242 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3243
3244                 save_CPPFLAGS="$CPPFLAGS"
3245                 eval cf_includedir=${includedir}
3246                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3247
3248 cat >conftest.$ac_ext <<_ACEOF
3249 #line 3249 "configure"
3250 #include "confdefs.h"
3251
3252 #include <stdlib.h>
3253 #include <stdio.h>
3254
3255 int
3256 main (void)
3257 {
3258
3259                 printf("Hello world!\n")
3260
3261   ;
3262   return 0;
3263 }
3264 _ACEOF
3265 rm -f conftest.$ac_objext
3266 if { (eval echo "$as_me:3266: \"$ac_compile\"") >&5
3267   (eval $ac_compile) 2>&5
3268   ac_status=$?
3269   echo "$as_me:3269: \$? = $ac_status" >&5
3270   (exit $ac_status); } &&
3271          { ac_try='test -s conftest.$ac_objext'
3272   { (eval echo "$as_me:3272: \"$ac_try\"") >&5
3273   (eval $ac_try) 2>&5
3274   ac_status=$?
3275   echo "$as_me:3275: \$? = $ac_status" >&5
3276   (exit $ac_status); }; }; then
3277   cf_cxx_works=yes
3278 else
3279   echo "$as_me: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3281 cf_cxx_works=no
3282 fi
3283 rm -f conftest.$ac_objext conftest.$ac_ext
3284                 CPPFLAGS="$save_CPPFLAGS"
3285
3286                 echo "$as_me:3286: result: $cf_cxx_works" >&5
3287 echo "${ECHO_T}$cf_cxx_works" >&6
3288                 if test "x$cf_cxx_works" = xno
3289                 then
3290                         { echo "$as_me:3290: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3291 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3292                         cf_with_cxx=no; CXX=""; GXX="";
3293                 fi
3294         fi
3295         ac_ext=c
3296 ac_cpp='$CPP $CPPFLAGS'
3297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3300 ac_main_return=return
3301
3302         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3303         if test "$CXX" = "g++" ; then
3304                 # Extract the first word of "g++", so it can be a program name with args.
3305 set dummy g++; ac_word=$2
3306 echo "$as_me:3306: checking for $ac_word" >&5
3307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3308 if test "${ac_cv_path_CXX+set}" = set; then
3309   echo $ECHO_N "(cached) $ECHO_C" >&6
3310 else
3311   case $CXX in
3312   [\\/]* | ?:[\\/]*)
3313   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3314   ;;
3315   *)
3316   ac_save_IFS=$IFS; IFS=$ac_path_separator
3317 ac_dummy="$PATH"
3318 for ac_dir in $ac_dummy; do
3319   IFS=$ac_save_IFS
3320   test -z "$ac_dir" && ac_dir=.
3321   if $as_executable_p "$ac_dir/$ac_word"; then
3322    ac_cv_path_CXX="$ac_dir/$ac_word"
3323    echo "$as_me:3323: found $ac_dir/$ac_word" >&5
3324    break
3325 fi
3326 done
3327
3328   ;;
3329 esac
3330 fi
3331 CXX=$ac_cv_path_CXX
3332
3333 if test -n "$CXX"; then
3334   echo "$as_me:3334: result: $CXX" >&5
3335 echo "${ECHO_T}$CXX" >&6
3336 else
3337   echo "$as_me:3337: result: no" >&5
3338 echo "${ECHO_T}no" >&6
3339 fi
3340
3341         fi
3342         case "x$CXX" in
3343         (x|xg++)
3344                 { echo "$as_me:3344: WARNING: You don't have any C++ compiler, too bad" >&5
3345 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3346                 cf_with_cxx=no; CXX=""; GXX="";
3347                 ;;
3348         esac
3349 fi
3350
3351 GXX_VERSION=none
3352 if test "$GXX" = yes; then
3353         echo "$as_me:3353: checking version of ${CXX:-g++}" >&5
3354 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3355         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3356         if test -z "$GXX_VERSION"
3357         then
3358                 GXX_VERSION=unknown
3359                 GXX=no
3360         fi
3361         echo "$as_me:3361: result: $GXX_VERSION" >&5
3362 echo "${ECHO_T}$GXX_VERSION" >&6
3363 fi
3364
3365 case $GXX_VERSION in
3366 ([1-9][0-9].*)
3367         ;;
3368 (1.*|2.[0-6]*)
3369         { echo "$as_me:3369: WARNING: templates do not work" >&5
3370 echo "$as_me: WARNING: templates do not work" >&2;}
3371         ;;
3372 esac
3373
3374 echo "$as_me:3374: checking if you want to build C++ binding and demo" >&5
3375 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3376
3377 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3378 if test "${with_cxx_binding+set}" = set; then
3379   withval="$with_cxx_binding"
3380   cf_with_cxx_binding=$withval
3381 else
3382   cf_with_cxx_binding=$cf_with_cxx
3383 fi;
3384 echo "$as_me:3384: result: $cf_with_cxx_binding" >&5
3385 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3386
3387 echo "$as_me:3387: checking if you want to build with Ada" >&5
3388 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3389 echo "$as_me:3389: result: $cf_with_ada" >&5
3390 echo "${ECHO_T}$cf_with_ada" >&6
3391
3392 echo "$as_me:3392: checking if you want to install terminal database" >&5
3393 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3394
3395 # Check whether --enable-db-install or --disable-db-install was given.
3396 if test "${enable_db_install+set}" = set; then
3397   enableval="$enable_db_install"
3398   cf_with_db_install=$enableval
3399 else
3400   cf_with_db_install=yes
3401 fi;
3402 echo "$as_me:3402: result: $cf_with_db_install" >&5
3403 echo "${ECHO_T}$cf_with_db_install" >&6
3404
3405 echo "$as_me:3405: checking if you want to install manpages" >&5
3406 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3407
3408 # Check whether --with-manpages or --without-manpages was given.
3409 if test "${with_manpages+set}" = set; then
3410   withval="$with_manpages"
3411   cf_with_manpages=$withval
3412 else
3413   cf_with_manpages=yes
3414 fi;
3415 echo "$as_me:3415: result: $cf_with_manpages" >&5
3416 echo "${ECHO_T}$cf_with_manpages" >&6
3417
3418 echo "$as_me:3418: checking if you want to build programs such as tic" >&5
3419 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3420
3421 # Check whether --with-progs or --without-progs was given.
3422 if test "${with_progs+set}" = set; then
3423   withval="$with_progs"
3424   cf_with_progs=$withval
3425 else
3426   cf_with_progs=yes
3427 fi;
3428 echo "$as_me:3428: result: $cf_with_progs" >&5
3429 echo "${ECHO_T}$cf_with_progs" >&6
3430
3431 if test -f $srcdir/tack/tack.h; then
3432         if test "x$cross_compiling" = xyes ; then
3433                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3434
3435 echo "${as_me:-configure}:3435: testing ignoring tack because we are cross-compiling ..." 1>&5
3436
3437                 cf_with_tack=no
3438         else
3439                 echo "$as_me:3439: checking if you want to build the tack program" >&5
3440 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3441
3442 # Check whether --with-tack or --without-tack was given.
3443 if test "${with_tack+set}" = set; then
3444   withval="$with_tack"
3445   cf_with_tack=$withval
3446 else
3447   cf_with_tack=$cf_with_progs
3448 fi;
3449                 echo "$as_me:3449: result: $cf_with_tack" >&5
3450 echo "${ECHO_T}$cf_with_tack" >&6
3451         fi
3452 else
3453         cf_with_tack=no
3454 fi
3455
3456 echo "$as_me:3456: checking if you want to build test-programs" >&5
3457 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3458
3459 # Check whether --with-tests or --without-tests was given.
3460 if test "${with_tests+set}" = set; then
3461   withval="$with_tests"
3462   cf_with_tests=$withval
3463 else
3464   cf_with_tests=yes
3465 fi;
3466 echo "$as_me:3466: result: $cf_with_tests" >&5
3467 echo "${ECHO_T}$cf_with_tests" >&6
3468
3469 echo "$as_me:3469: checking if you wish to install curses.h" >&5
3470 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3471
3472 # Check whether --with-curses-h or --without-curses-h was given.
3473 if test "${with_curses_h+set}" = set; then
3474   withval="$with_curses_h"
3475   with_curses_h=$withval
3476 else
3477   with_curses_h=yes
3478 fi;
3479 echo "$as_me:3479: result: $with_curses_h" >&5
3480 echo "${ECHO_T}$with_curses_h" >&6
3481
3482 modules_to_build="ncurses"
3483 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3484 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3485 modules_to_build="$modules_to_build panel menu form"
3486
3487 test "$program_prefix" != NONE &&
3488   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3489 # Use a double $ so make ignores it.
3490 test "$program_suffix" != NONE &&
3491   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3492 # Double any \ or $.  echo might interpret backslashes.
3493 # By default was `s,x,x', remove it if useless.
3494 cat <<\_ACEOF >conftest.sed
3495 s/[\\$]/&&/g;s/;s,x,x,$//
3496 _ACEOF
3497 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3498 rm conftest.sed
3499
3500 for ac_prog in mawk gawk nawk awk
3501 do
3502   # Extract the first word of "$ac_prog", so it can be a program name with args.
3503 set dummy $ac_prog; ac_word=$2
3504 echo "$as_me:3504: checking for $ac_word" >&5
3505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3506 if test "${ac_cv_prog_AWK+set}" = set; then
3507   echo $ECHO_N "(cached) $ECHO_C" >&6
3508 else
3509   if test -n "$AWK"; then
3510   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3511 else
3512   ac_save_IFS=$IFS; IFS=$ac_path_separator
3513 ac_dummy="$PATH"
3514 for ac_dir in $ac_dummy; do
3515   IFS=$ac_save_IFS
3516   test -z "$ac_dir" && ac_dir=.
3517   $as_executable_p "$ac_dir/$ac_word" || continue
3518 ac_cv_prog_AWK="$ac_prog"
3519 echo "$as_me:3519: found $ac_dir/$ac_word" >&5
3520 break
3521 done
3522
3523 fi
3524 fi
3525 AWK=$ac_cv_prog_AWK
3526 if test -n "$AWK"; then
3527   echo "$as_me:3527: result: $AWK" >&5
3528 echo "${ECHO_T}$AWK" >&6
3529 else
3530   echo "$as_me:3530: result: no" >&5
3531 echo "${ECHO_T}no" >&6
3532 fi
3533
3534   test -n "$AWK" && break
3535 done
3536
3537 test -z "$AWK" && { { echo "$as_me:3537: error: No awk program found" >&5
3538 echo "$as_me: error: No awk program found" >&2;}
3539    { (exit 1); exit 1; }; }
3540
3541 echo "$as_me:3541: checking for egrep" >&5
3542 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3543 if test "${ac_cv_prog_egrep+set}" = set; then
3544   echo $ECHO_N "(cached) $ECHO_C" >&6
3545 else
3546   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3547                 then ac_cv_prog_egrep='grep -E'
3548                 else ac_cv_prog_egrep='egrep'
3549         fi
3550 fi
3551 echo "$as_me:3551: result: $ac_cv_prog_egrep" >&5
3552 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3553         EGREP=$ac_cv_prog_egrep
3554
3555         test -z "$EGREP" && { { echo "$as_me:3555: error: No egrep program found" >&5
3556 echo "$as_me: error: No egrep program found" >&2;}
3557    { (exit 1); exit 1; }; }
3558
3559 # Find a good install program.  We prefer a C program (faster),
3560 # so one script is as good as another.  But avoid the broken or
3561 # incompatible versions:
3562 # SysV /etc/install, /usr/sbin/install
3563 # SunOS /usr/etc/install
3564 # IRIX /sbin/install
3565 # AIX /bin/install
3566 # AmigaOS /C/install, which installs bootblocks on floppy discs
3567 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3568 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3569 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3570 # ./install, which can be erroneously created by make from ./install.sh.
3571 echo "$as_me:3571: checking for a BSD compatible install" >&5
3572 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3573 if test -z "$INSTALL"; then
3574 if test "${ac_cv_path_install+set}" = set; then
3575   echo $ECHO_N "(cached) $ECHO_C" >&6
3576 else
3577     ac_save_IFS=$IFS; IFS=$ac_path_separator
3578   for ac_dir in $PATH; do
3579     IFS=$ac_save_IFS
3580     # Account for people who put trailing slashes in PATH elements.
3581     case $ac_dir/ in
3582     / | ./ | .// | /cC/* \
3583     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3584     | /usr/ucb/* ) ;;
3585     *)
3586       # OSF1 and SCO ODT 3.0 have their own names for install.
3587       # Don't use installbsd from OSF since it installs stuff as root
3588       # by default.
3589       for ac_prog in ginstall scoinst install; do
3590         if $as_executable_p "$ac_dir/$ac_prog"; then
3591           if test $ac_prog = install &&
3592             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3593             # AIX install.  It has an incompatible calling convention.
3594             :
3595           elif test $ac_prog = install &&
3596             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3597             # program-specific install script used by HP pwplus--don't use.
3598             :
3599           else
3600             ac_cv_path_install="$ac_dir/$ac_prog -c"
3601             break 2
3602           fi
3603         fi
3604       done
3605       ;;
3606     esac
3607   done
3608
3609 fi
3610   if test "${ac_cv_path_install+set}" = set; then
3611     INSTALL=$ac_cv_path_install
3612   else
3613     # As a last resort, use the slow shell script.  We don't cache a
3614     # path for INSTALL within a source directory, because that will
3615     # break other packages using the cache if that directory is
3616     # removed, or if the path is relative.
3617     INSTALL=$ac_install_sh
3618   fi
3619 fi
3620 echo "$as_me:3620: result: $INSTALL" >&5
3621 echo "${ECHO_T}$INSTALL" >&6
3622
3623 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3624 # It thinks the first close brace ends the variable substitution.
3625 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3626
3627 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3628
3629 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3630
3631 case $INSTALL in
3632 (/*)
3633         ;;
3634 (*)
3635         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3636         test -z "$cf_dir" && cf_dir=.
3637         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3638         ;;
3639 esac
3640
3641 for ac_prog in lint cppcheck splint
3642 do
3643   # Extract the first word of "$ac_prog", so it can be a program name with args.
3644 set dummy $ac_prog; ac_word=$2
3645 echo "$as_me:3645: checking for $ac_word" >&5
3646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3647 if test "${ac_cv_prog_LINT+set}" = set; then
3648   echo $ECHO_N "(cached) $ECHO_C" >&6
3649 else
3650   if test -n "$LINT"; then
3651   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3652 else
3653   ac_save_IFS=$IFS; IFS=$ac_path_separator
3654 ac_dummy="$PATH"
3655 for ac_dir in $ac_dummy; do
3656   IFS=$ac_save_IFS
3657   test -z "$ac_dir" && ac_dir=.
3658   $as_executable_p "$ac_dir/$ac_word" || continue
3659 ac_cv_prog_LINT="$ac_prog"
3660 echo "$as_me:3660: found $ac_dir/$ac_word" >&5
3661 break
3662 done
3663
3664 fi
3665 fi
3666 LINT=$ac_cv_prog_LINT
3667 if test -n "$LINT"; then
3668   echo "$as_me:3668: result: $LINT" >&5
3669 echo "${ECHO_T}$LINT" >&6
3670 else
3671   echo "$as_me:3671: result: no" >&5
3672 echo "${ECHO_T}no" >&6
3673 fi
3674
3675   test -n "$LINT" && break
3676 done
3677
3678 case "x$LINT" in
3679 (xcppcheck|x*/cppcheck)
3680         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3681         ;;
3682 esac
3683
3684 echo "$as_me:3684: checking whether ln -s works" >&5
3685 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3686 LN_S=$as_ln_s
3687 if test "$LN_S" = "ln -s"; then
3688   echo "$as_me:3688: result: yes" >&5
3689 echo "${ECHO_T}yes" >&6
3690 else
3691   echo "$as_me:3691: result: no, using $LN_S" >&5
3692 echo "${ECHO_T}no, using $LN_S" >&6
3693 fi
3694
3695 echo "$as_me:3695: checking if $LN_S -f options work" >&5
3696 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3697
3698 rm -f conf$$.src conf$$dst
3699 echo >conf$$.dst
3700 echo first >conf$$.src
3701 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3702         cf_prog_ln_sf=yes
3703 else
3704         cf_prog_ln_sf=no
3705 fi
3706 rm -f conf$$.dst conf$$src
3707 echo "$as_me:3707: result: $cf_prog_ln_sf" >&5
3708 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3709
3710 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3711
3712 echo "$as_me:3712: checking for long file names" >&5
3713 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3714 if test "${ac_cv_sys_long_file_names+set}" = set; then
3715   echo $ECHO_N "(cached) $ECHO_C" >&6
3716 else
3717   ac_cv_sys_long_file_names=yes
3718 # Test for long file names in all the places we know might matter:
3719 #      .                the current directory, where building will happen
3720 #      $prefix/lib      where we will be installing things
3721 #      $exec_prefix/lib likewise
3722 # eval it to expand exec_prefix.
3723 #      $TMPDIR          if set, where it might want to write temporary files
3724 # if $TMPDIR is not set:
3725 #      /tmp             where it might want to write temporary files
3726 #      /var/tmp         likewise
3727 #      /usr/tmp         likewise
3728 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3729   ac_tmpdirs=$TMPDIR
3730 else
3731   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3732 fi
3733 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3734   test -d $ac_dir || continue
3735   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3736   ac_xdir=$ac_dir/cf$$
3737   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3738   ac_tf1=$ac_xdir/conftest9012345
3739   ac_tf2=$ac_xdir/conftest9012346
3740   (echo 1 >$ac_tf1) 2>/dev/null
3741   (echo 2 >$ac_tf2) 2>/dev/null
3742   ac_val=`cat $ac_tf1 2>/dev/null`
3743   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3744     ac_cv_sys_long_file_names=no
3745     rm -rf $ac_xdir 2>/dev/null
3746     break
3747   fi
3748   rm -rf $ac_xdir 2>/dev/null
3749 done
3750 fi
3751 echo "$as_me:3751: result: $ac_cv_sys_long_file_names" >&5
3752 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3753 if test $ac_cv_sys_long_file_names = yes; then
3754
3755 cat >>confdefs.h <<\EOF
3756 #define HAVE_LONG_FILE_NAMES 1
3757 EOF
3758
3759 fi
3760
3761 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3762 # of package conflict.
3763 cf_config_suffix=
3764
3765 # Check whether --with-config-suffix or --without-config-suffix was given.
3766 if test "${with_config_suffix+set}" = set; then
3767   withval="$with_config_suffix"
3768   case "x$withval" in
3769         (xyes|xno)
3770                 { echo "$as_me:3770: WARNING: expected a value for config-suffix option" >&5
3771 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3772                 ;;
3773         (*)     cf_config_suffix="$withval"
3774                 ;;
3775         esac
3776 fi;
3777
3778 # If we find pkg-config, check if we should install the ".pc" files.
3779
3780 echo "$as_me:3780: checking if you want to use pkg-config" >&5
3781 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3782
3783 # Check whether --with-pkg-config or --without-pkg-config was given.
3784 if test "${with_pkg_config+set}" = set; then
3785   withval="$with_pkg_config"
3786   cf_pkg_config=$withval
3787 else
3788   cf_pkg_config=yes
3789 fi;
3790 echo "$as_me:3790: result: $cf_pkg_config" >&5
3791 echo "${ECHO_T}$cf_pkg_config" >&6
3792
3793 case $cf_pkg_config in
3794 (no)
3795         PKG_CONFIG=none
3796         ;;
3797 (yes)
3798
3799 if test -n "$ac_tool_prefix"; then
3800   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3801 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3802 echo "$as_me:3802: checking for $ac_word" >&5
3803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3804 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3805   echo $ECHO_N "(cached) $ECHO_C" >&6
3806 else
3807   case $PKG_CONFIG in
3808   [\\/]* | ?:[\\/]*)
3809   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3810   ;;
3811   *)
3812   ac_save_IFS=$IFS; IFS=$ac_path_separator
3813 ac_dummy="$PATH"
3814 for ac_dir in $ac_dummy; do
3815   IFS=$ac_save_IFS
3816   test -z "$ac_dir" && ac_dir=.
3817   if $as_executable_p "$ac_dir/$ac_word"; then
3818    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3819    echo "$as_me:3819: found $ac_dir/$ac_word" >&5
3820    break
3821 fi
3822 done
3823
3824   ;;
3825 esac
3826 fi
3827 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3828
3829 if test -n "$PKG_CONFIG"; then
3830   echo "$as_me:3830: result: $PKG_CONFIG" >&5
3831 echo "${ECHO_T}$PKG_CONFIG" >&6
3832 else
3833   echo "$as_me:3833: result: no" >&5
3834 echo "${ECHO_T}no" >&6
3835 fi
3836
3837 fi
3838 if test -z "$ac_cv_path_PKG_CONFIG"; then
3839   ac_pt_PKG_CONFIG=$PKG_CONFIG
3840   # Extract the first word of "pkg-config", so it can be a program name with args.
3841 set dummy pkg-config; ac_word=$2
3842 echo "$as_me:3842: checking for $ac_word" >&5
3843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3844 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3845   echo $ECHO_N "(cached) $ECHO_C" >&6
3846 else
3847   case $ac_pt_PKG_CONFIG in
3848   [\\/]* | ?:[\\/]*)
3849   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3850   ;;
3851   *)
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   if $as_executable_p "$ac_dir/$ac_word"; then
3858    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3859    echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860    break
3861 fi
3862 done
3863
3864   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3865   ;;
3866 esac
3867 fi
3868 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3869
3870 if test -n "$ac_pt_PKG_CONFIG"; then
3871   echo "$as_me:3871: result: $ac_pt_PKG_CONFIG" >&5
3872 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3873 else
3874   echo "$as_me:3874: result: no" >&5
3875 echo "${ECHO_T}no" >&6
3876 fi
3877
3878   PKG_CONFIG=$ac_pt_PKG_CONFIG
3879 else
3880   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3881 fi
3882
3883         ;;
3884 (*)
3885         PKG_CONFIG=$withval
3886         ;;
3887 esac
3888
3889 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3890 if test "$PKG_CONFIG" != none ; then
3891
3892 if test "x$prefix" != xNONE; then
3893         cf_path_syntax="$prefix"
3894 else
3895         cf_path_syntax="$ac_default_prefix"
3896 fi
3897
3898 case ".$PKG_CONFIG" in
3899 (.\$\(*\)*|.\'*\'*)
3900         ;;
3901 (..|./*|.\\*)
3902         ;;
3903 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3904         ;;
3905 (.\${*prefix}*|.\${*dir}*)
3906         eval PKG_CONFIG="$PKG_CONFIG"
3907         case ".$PKG_CONFIG" in
3908         (.NONE/*)
3909                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3910                 ;;
3911         esac
3912         ;;
3913 (.no|.NONE/*)
3914         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3915         ;;
3916 (*)
3917         { { echo "$as_me:3917: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3918 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3919    { (exit 1); exit 1; }; }
3920         ;;
3921 esac
3922
3923 elif test "x$cf_pkg_config" != xno ; then
3924         { echo "$as_me:3924: WARNING: pkg-config is not installed" >&5
3925 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3926 fi
3927
3928 case $PKG_CONFIG in
3929 (no|none|yes)
3930         echo "$as_me:3930: checking for pkg-config library directory" >&5
3931 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3932         ;;
3933 (*)
3934         echo "$as_me:3934: checking for $PKG_CONFIG library directory" >&5
3935 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3936         ;;
3937 esac
3938
3939 PKG_CONFIG_LIBDIR=no
3940
3941 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3942 if test "${with_pkg_config_libdir+set}" = set; then
3943   withval="$with_pkg_config_libdir"
3944   PKG_CONFIG_LIBDIR=$withval
3945 else
3946   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3947 fi;
3948
3949 case x$PKG_CONFIG_LIBDIR in
3950 (x/*)
3951         ;;
3952 (xyes)
3953         # Look for the library directory using the same prefix as the executable
3954         if test "x$PKG_CONFIG" = xnone
3955         then
3956                 cf_path=$prefix
3957         else
3958                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3959         fi
3960
3961         # If you don't like using the default architecture, you have to specify the
3962         # intended library directory and corresponding compiler/linker options.
3963         #
3964         # This case allows for Debian's 2014-flavor of multiarch, along with the
3965         # most common variations before that point.  Some other variants spell the
3966         # directory differently, e.g., "pkg-config", and put it in unusual places.
3967         # pkg-config has always been poorly standardized, which is ironic...
3968         case x`(arch) 2>/dev/null` in
3969         (*64)
3970                 cf_search_path="\
3971                         $cf_path/lib/*64-linux-gnu \
3972                         $cf_path/share \
3973                         $cf_path/lib64 \
3974                         $cf_path/lib32 \
3975                         $cf_path/lib"
3976                 ;;
3977         (*)
3978                 cf_search_path="\
3979                         $cf_path/lib/*-linux-gnu \
3980                         $cf_path/share \
3981                         $cf_path/lib32 \
3982                         $cf_path/lib \
3983                         $cf_path/libdata"
3984                 ;;
3985         esac
3986
3987         test -n "$verbose" && echo "    list..." 1>&6
3988
3989 echo "${as_me:-configure}:3989: testing list... ..." 1>&5
3990
3991         for cf_config in $cf_search_path
3992         do
3993                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3994
3995 echo "${as_me:-configure}:3995: testing checking $cf_config/pkgconfig ..." 1>&5
3996
3997                 if test -d $cf_config/pkgconfig
3998                 then
3999                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4000                         echo "$as_me:4000: checking done" >&5
4001 echo $ECHO_N "checking done... $ECHO_C" >&6
4002                         break
4003                 fi
4004         done
4005         ;;
4006 (*)
4007         ;;
4008 esac
4009
4010 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4011         echo "$as_me:4011: result: $PKG_CONFIG_LIBDIR" >&5
4012 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4013 fi
4014
4015 if test "x$PKG_CONFIG" != xnone
4016 then
4017         echo "$as_me:4017: checking if we should install .pc files for $PKG_CONFIG" >&5
4018 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4019 else
4020         echo "$as_me:4020: checking if we should install .pc files" >&5
4021 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4022 fi
4023
4024 # Check whether --enable-pc-files or --disable-pc-files was given.
4025 if test "${enable_pc_files+set}" = set; then
4026   enableval="$enable_pc_files"
4027   enable_pc_files=$enableval
4028 else
4029   enable_pc_files=no
4030 fi;
4031 echo "$as_me:4031: result: $enable_pc_files" >&5
4032 echo "${ECHO_T}$enable_pc_files" >&6
4033
4034 if test "x$enable_pc_files" != xno
4035 then
4036         MAKE_PC_FILES=
4037         case "x$PKG_CONFIG_LIBDIR" in
4038         (xno|xyes)
4039                 { echo "$as_me:4039: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4040 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4041                 ;;
4042         (*)
4043
4044 if test "x$prefix" != xNONE; then
4045         cf_path_syntax="$prefix"
4046 else
4047         cf_path_syntax="$ac_default_prefix"
4048 fi
4049
4050 case ".$PKG_CONFIG_LIBDIR" in
4051 (.\$\(*\)*|.\'*\'*)
4052         ;;
4053 (..|./*|.\\*)
4054         ;;
4055 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4056         ;;
4057 (.\${*prefix}*|.\${*dir}*)
4058         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4059         case ".$PKG_CONFIG_LIBDIR" in
4060         (.NONE/*)
4061                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4062                 ;;
4063         esac
4064         ;;
4065 (.no|.NONE/*)
4066         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4067         ;;
4068 (*)
4069         { { echo "$as_me:4069: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4070 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4071    { (exit 1); exit 1; }; }
4072         ;;
4073 esac
4074
4075                 ;;
4076         esac
4077 else
4078         MAKE_PC_FILES="#"
4079 fi
4080
4081 if test -z "$MAKE_PC_FILES"
4082 then
4083         echo "$as_me:4083: checking for suffix to add to pc-files" >&5
4084 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4085
4086 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4087 if test "${with_pc_suffix+set}" = set; then
4088   withval="$with_pc_suffix"
4089   case "x$withval" in
4090         (xyes|xno)
4091                 PC_MODULE_SUFFIX=
4092                 ;;
4093         (*)     PC_MODULE_SUFFIX="$withval"
4094                 ;;
4095         esac
4096 fi;
4097         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4098         echo "$as_me:4098: result: $PC_MODULE_SUFFIX" >&5
4099 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4100         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4101
4102 fi
4103
4104 echo "$as_me:4104: checking if we should assume mixed-case filenames" >&5
4105 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4106
4107 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4108 if test "${enable_mixed_case+set}" = set; then
4109   enableval="$enable_mixed_case"
4110   enable_mixedcase=$enableval
4111 else
4112   enable_mixedcase=auto
4113 fi;
4114 echo "$as_me:4114: result: $enable_mixedcase" >&5
4115 echo "${ECHO_T}$enable_mixedcase" >&6
4116 if test "$enable_mixedcase" = "auto" ; then
4117
4118 echo "$as_me:4118: checking if filesystem supports mixed-case filenames" >&5
4119 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4120 if test "${cf_cv_mixedcase+set}" = set; then
4121   echo $ECHO_N "(cached) $ECHO_C" >&6
4122 else
4123
4124 if test "$cross_compiling" = yes ; then
4125         case $target_alias in
4126         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4127                 cf_cv_mixedcase=no
4128                 ;;
4129         (*)
4130                 cf_cv_mixedcase=yes
4131                 ;;
4132         esac
4133 else
4134         rm -f conftest CONFTEST
4135         echo test >conftest
4136         if test -f CONFTEST ; then
4137                 cf_cv_mixedcase=no
4138         else
4139                 cf_cv_mixedcase=yes
4140         fi
4141         rm -f conftest CONFTEST
4142 fi
4143
4144 fi
4145 echo "$as_me:4145: result: $cf_cv_mixedcase" >&5
4146 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4147 test "$cf_cv_mixedcase" = yes &&
4148 cat >>confdefs.h <<\EOF
4149 #define MIXEDCASE_FILENAMES 1
4150 EOF
4151
4152 else
4153         cf_cv_mixedcase=$enable_mixedcase
4154         if test "x$enable_mixedcase" = "xyes" ; then
4155
4156 cat >>confdefs.h <<\EOF
4157 #define MIXEDCASE_FILENAMES 1
4158 EOF
4159
4160         fi
4161 fi
4162
4163 # do this after mixed-case option (tags/TAGS is not as important as tic).
4164 echo "$as_me:4164: checking whether ${MAKE-make} sets \${MAKE}" >&5
4165 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4166 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4167 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4168   echo $ECHO_N "(cached) $ECHO_C" >&6
4169 else
4170   cat >conftest.make <<\EOF
4171 all:
4172         @echo 'ac_maketemp="${MAKE}"'
4173 EOF
4174 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4175 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4176 if test -n "$ac_maketemp"; then
4177   eval ac_cv_prog_make_${ac_make}_set=yes
4178 else
4179   eval ac_cv_prog_make_${ac_make}_set=no
4180 fi
4181 rm -f conftest.make
4182 fi
4183 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4184   echo "$as_me:4184: result: yes" >&5
4185 echo "${ECHO_T}yes" >&6
4186   SET_MAKE=
4187 else
4188   echo "$as_me:4188: result: no" >&5
4189 echo "${ECHO_T}no" >&6
4190   SET_MAKE="MAKE=${MAKE-make}"
4191 fi
4192
4193 for ac_prog in exctags ctags
4194 do
4195   # Extract the first word of "$ac_prog", so it can be a program name with args.
4196 set dummy $ac_prog; ac_word=$2
4197 echo "$as_me:4197: checking for $ac_word" >&5
4198 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4199 if test "${ac_cv_prog_CTAGS+set}" = set; then
4200   echo $ECHO_N "(cached) $ECHO_C" >&6
4201 else
4202   if test -n "$CTAGS"; then
4203   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4204 else
4205   ac_save_IFS=$IFS; IFS=$ac_path_separator
4206 ac_dummy="$PATH"
4207 for ac_dir in $ac_dummy; do
4208   IFS=$ac_save_IFS
4209   test -z "$ac_dir" && ac_dir=.
4210   $as_executable_p "$ac_dir/$ac_word" || continue
4211 ac_cv_prog_CTAGS="$ac_prog"
4212 echo "$as_me:4212: found $ac_dir/$ac_word" >&5
4213 break
4214 done
4215
4216 fi
4217 fi
4218 CTAGS=$ac_cv_prog_CTAGS
4219 if test -n "$CTAGS"; then
4220   echo "$as_me:4220: result: $CTAGS" >&5
4221 echo "${ECHO_T}$CTAGS" >&6
4222 else
4223   echo "$as_me:4223: result: no" >&5
4224 echo "${ECHO_T}no" >&6
4225 fi
4226
4227   test -n "$CTAGS" && break
4228 done
4229
4230 for ac_prog in exetags etags
4231 do
4232   # Extract the first word of "$ac_prog", so it can be a program name with args.
4233 set dummy $ac_prog; ac_word=$2
4234 echo "$as_me:4234: checking for $ac_word" >&5
4235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4236 if test "${ac_cv_prog_ETAGS+set}" = set; then
4237   echo $ECHO_N "(cached) $ECHO_C" >&6
4238 else
4239   if test -n "$ETAGS"; then
4240   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4241 else
4242   ac_save_IFS=$IFS; IFS=$ac_path_separator
4243 ac_dummy="$PATH"
4244 for ac_dir in $ac_dummy; do
4245   IFS=$ac_save_IFS
4246   test -z "$ac_dir" && ac_dir=.
4247   $as_executable_p "$ac_dir/$ac_word" || continue
4248 ac_cv_prog_ETAGS="$ac_prog"
4249 echo "$as_me:4249: found $ac_dir/$ac_word" >&5
4250 break
4251 done
4252
4253 fi
4254 fi
4255 ETAGS=$ac_cv_prog_ETAGS
4256 if test -n "$ETAGS"; then
4257   echo "$as_me:4257: result: $ETAGS" >&5
4258 echo "${ECHO_T}$ETAGS" >&6
4259 else
4260   echo "$as_me:4260: result: no" >&5
4261 echo "${ECHO_T}no" >&6
4262 fi
4263
4264   test -n "$ETAGS" && break
4265 done
4266
4267 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4268 set dummy ${CTAGS:-ctags}; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$MAKE_LOWER_TAGS"; then
4275   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4289 fi
4290 fi
4291 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4292 if test -n "$MAKE_LOWER_TAGS"; then
4293   echo "$as_me:4293: result: $MAKE_LOWER_TAGS" >&5
4294 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4295 else
4296   echo "$as_me:4296: result: no" >&5
4297 echo "${ECHO_T}no" >&6
4298 fi
4299
4300 if test "$cf_cv_mixedcase" = yes ; then
4301         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4302 set dummy ${ETAGS:-etags}; ac_word=$2
4303 echo "$as_me:4303: checking for $ac_word" >&5
4304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4305 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4306   echo $ECHO_N "(cached) $ECHO_C" >&6
4307 else
4308   if test -n "$MAKE_UPPER_TAGS"; then
4309   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4310 else
4311   ac_save_IFS=$IFS; IFS=$ac_path_separator
4312 ac_dummy="$PATH"
4313 for ac_dir in $ac_dummy; do
4314   IFS=$ac_save_IFS
4315   test -z "$ac_dir" && ac_dir=.
4316   $as_executable_p "$ac_dir/$ac_word" || continue
4317 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4318 echo "$as_me:4318: found $ac_dir/$ac_word" >&5
4319 break
4320 done
4321
4322   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4323 fi
4324 fi
4325 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4326 if test -n "$MAKE_UPPER_TAGS"; then
4327   echo "$as_me:4327: result: $MAKE_UPPER_TAGS" >&5
4328 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4329 else
4330   echo "$as_me:4330: result: no" >&5
4331 echo "${ECHO_T}no" >&6
4332 fi
4333
4334 else
4335         MAKE_UPPER_TAGS=no
4336 fi
4337
4338 if test "$MAKE_UPPER_TAGS" = yes ; then
4339         MAKE_UPPER_TAGS=
4340 else
4341         MAKE_UPPER_TAGS="#"
4342 fi
4343
4344 if test "$MAKE_LOWER_TAGS" = yes ; then
4345         MAKE_LOWER_TAGS=
4346 else
4347         MAKE_LOWER_TAGS="#"
4348 fi
4349
4350 echo "$as_me:4350: checking for makeflags variable" >&5
4351 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4352 if test "${cf_cv_makeflags+set}" = set; then
4353   echo $ECHO_N "(cached) $ECHO_C" >&6
4354 else
4355
4356         cf_cv_makeflags=''
4357         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4358         do
4359                 cat >cf_makeflags.tmp <<CF_EOF
4360 SHELL = $SHELL
4361 all :
4362         @ echo '.$cf_option'
4363 CF_EOF
4364                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4365                 case "$cf_result" in
4366                 (.*k|.*kw)
4367                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4368                         case "$cf_result" in
4369                         (.*CC=*)        cf_cv_makeflags=
4370                                 ;;
4371                         (*)     cf_cv_makeflags=$cf_option
4372                                 ;;
4373                         esac
4374                         break
4375                         ;;
4376                 (.-)
4377                         ;;
4378                 (*)
4379
4380 echo "${as_me:-configure}:4380: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4381
4382                         ;;
4383                 esac
4384         done
4385         rm -f cf_makeflags.tmp
4386
4387 fi
4388 echo "$as_me:4388: result: $cf_cv_makeflags" >&5
4389 echo "${ECHO_T}$cf_cv_makeflags" >&6
4390
4391 if test -n "$ac_tool_prefix"; then
4392   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4393 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4394 echo "$as_me:4394: checking for $ac_word" >&5
4395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4396 if test "${ac_cv_prog_RANLIB+set}" = set; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   if test -n "$RANLIB"; then
4400   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4401 else
4402   ac_save_IFS=$IFS; IFS=$ac_path_separator
4403 ac_dummy="$PATH"
4404 for ac_dir in $ac_dummy; do
4405   IFS=$ac_save_IFS
4406   test -z "$ac_dir" && ac_dir=.
4407   $as_executable_p "$ac_dir/$ac_word" || continue
4408 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4409 echo "$as_me:4409: found $ac_dir/$ac_word" >&5
4410 break
4411 done
4412
4413 fi
4414 fi
4415 RANLIB=$ac_cv_prog_RANLIB
4416 if test -n "$RANLIB"; then
4417   echo "$as_me:4417: result: $RANLIB" >&5
4418 echo "${ECHO_T}$RANLIB" >&6
4419 else
4420   echo "$as_me:4420: result: no" >&5
4421 echo "${ECHO_T}no" >&6
4422 fi
4423
4424 fi
4425 if test -z "$ac_cv_prog_RANLIB"; then
4426   ac_ct_RANLIB=$RANLIB
4427   # Extract the first word of "ranlib", so it can be a program name with args.
4428 set dummy ranlib; ac_word=$2
4429 echo "$as_me:4429: checking for $ac_word" >&5
4430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4431 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4432   echo $ECHO_N "(cached) $ECHO_C" >&6
4433 else
4434   if test -n "$ac_ct_RANLIB"; then
4435   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4436 else
4437   ac_save_IFS=$IFS; IFS=$ac_path_separator
4438 ac_dummy="$PATH"
4439 for ac_dir in $ac_dummy; do
4440   IFS=$ac_save_IFS
4441   test -z "$ac_dir" && ac_dir=.
4442   $as_executable_p "$ac_dir/$ac_word" || continue
4443 ac_cv_prog_ac_ct_RANLIB="ranlib"
4444 echo "$as_me:4444: found $ac_dir/$ac_word" >&5
4445 break
4446 done
4447
4448   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4449 fi
4450 fi
4451 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4452 if test -n "$ac_ct_RANLIB"; then
4453   echo "$as_me:4453: result: $ac_ct_RANLIB" >&5
4454 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4455 else
4456   echo "$as_me:4456: result: no" >&5
4457 echo "${ECHO_T}no" >&6
4458 fi
4459
4460   RANLIB=$ac_ct_RANLIB
4461 else
4462   RANLIB="$ac_cv_prog_RANLIB"
4463 fi
4464
4465 if test -n "$ac_tool_prefix"; then
4466   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4467 set dummy ${ac_tool_prefix}ld; ac_word=$2
4468 echo "$as_me:4468: checking for $ac_word" >&5
4469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4470 if test "${ac_cv_prog_LD+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473   if test -n "$LD"; then
4474   ac_cv_prog_LD="$LD" # Let the user override the test.
4475 else
4476   ac_save_IFS=$IFS; IFS=$ac_path_separator
4477 ac_dummy="$PATH"
4478 for ac_dir in $ac_dummy; do
4479   IFS=$ac_save_IFS
4480   test -z "$ac_dir" && ac_dir=.
4481   $as_executable_p "$ac_dir/$ac_word" || continue
4482 ac_cv_prog_LD="${ac_tool_prefix}ld"
4483 echo "$as_me:4483: found $ac_dir/$ac_word" >&5
4484 break
4485 done
4486
4487 fi
4488 fi
4489 LD=$ac_cv_prog_LD
4490 if test -n "$LD"; then
4491   echo "$as_me:4491: result: $LD" >&5
4492 echo "${ECHO_T}$LD" >&6
4493 else
4494   echo "$as_me:4494: result: no" >&5
4495 echo "${ECHO_T}no" >&6
4496 fi
4497
4498 fi
4499 if test -z "$ac_cv_prog_LD"; then
4500   ac_ct_LD=$LD
4501   # Extract the first word of "ld", so it can be a program name with args.
4502 set dummy ld; ac_word=$2
4503 echo "$as_me:4503: checking for $ac_word" >&5
4504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4505 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4506   echo $ECHO_N "(cached) $ECHO_C" >&6
4507 else
4508   if test -n "$ac_ct_LD"; then
4509   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4510 else
4511   ac_save_IFS=$IFS; IFS=$ac_path_separator
4512 ac_dummy="$PATH"
4513 for ac_dir in $ac_dummy; do
4514   IFS=$ac_save_IFS
4515   test -z "$ac_dir" && ac_dir=.
4516   $as_executable_p "$ac_dir/$ac_word" || continue
4517 ac_cv_prog_ac_ct_LD="ld"
4518 echo "$as_me:4518: found $ac_dir/$ac_word" >&5
4519 break
4520 done
4521
4522   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4523 fi
4524 fi
4525 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4526 if test -n "$ac_ct_LD"; then
4527   echo "$as_me:4527: result: $ac_ct_LD" >&5
4528 echo "${ECHO_T}$ac_ct_LD" >&6
4529 else
4530   echo "$as_me:4530: result: no" >&5
4531 echo "${ECHO_T}no" >&6
4532 fi
4533
4534   LD=$ac_ct_LD
4535 else
4536   LD="$ac_cv_prog_LD"
4537 fi
4538
4539 if test -n "$ac_tool_prefix"; then
4540   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4541 set dummy ${ac_tool_prefix}ar; ac_word=$2
4542 echo "$as_me:4542: checking for $ac_word" >&5
4543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4544 if test "${ac_cv_prog_AR+set}" = set; then
4545   echo $ECHO_N "(cached) $ECHO_C" >&6
4546 else
4547   if test -n "$AR"; then
4548   ac_cv_prog_AR="$AR" # Let the user override the test.
4549 else
4550   ac_save_IFS=$IFS; IFS=$ac_path_separator
4551 ac_dummy="$PATH"
4552 for ac_dir in $ac_dummy; do
4553   IFS=$ac_save_IFS
4554   test -z "$ac_dir" && ac_dir=.
4555   $as_executable_p "$ac_dir/$ac_word" || continue
4556 ac_cv_prog_AR="${ac_tool_prefix}ar"
4557 echo "$as_me:4557: found $ac_dir/$ac_word" >&5
4558 break
4559 done
4560
4561 fi
4562 fi
4563 AR=$ac_cv_prog_AR
4564 if test -n "$AR"; then
4565   echo "$as_me:4565: result: $AR" >&5
4566 echo "${ECHO_T}$AR" >&6
4567 else
4568   echo "$as_me:4568: result: no" >&5
4569 echo "${ECHO_T}no" >&6
4570 fi
4571
4572 fi
4573 if test -z "$ac_cv_prog_AR"; then
4574   ac_ct_AR=$AR
4575   # Extract the first word of "ar", so it can be a program name with args.
4576 set dummy ar; ac_word=$2
4577 echo "$as_me:4577: checking for $ac_word" >&5
4578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4579 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4580   echo $ECHO_N "(cached) $ECHO_C" >&6
4581 else
4582   if test -n "$ac_ct_AR"; then
4583   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4584 else
4585   ac_save_IFS=$IFS; IFS=$ac_path_separator
4586 ac_dummy="$PATH"
4587 for ac_dir in $ac_dummy; do
4588   IFS=$ac_save_IFS
4589   test -z "$ac_dir" && ac_dir=.
4590   $as_executable_p "$ac_dir/$ac_word" || continue
4591 ac_cv_prog_ac_ct_AR="ar"
4592 echo "$as_me:4592: found $ac_dir/$ac_word" >&5
4593 break
4594 done
4595
4596   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4597 fi
4598 fi
4599 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4600 if test -n "$ac_ct_AR"; then
4601   echo "$as_me:4601: result: $ac_ct_AR" >&5
4602 echo "${ECHO_T}$ac_ct_AR" >&6
4603 else
4604   echo "$as_me:4604: result: no" >&5
4605 echo "${ECHO_T}no" >&6
4606 fi
4607
4608   AR=$ac_ct_AR
4609 else
4610   AR="$ac_cv_prog_AR"
4611 fi
4612
4613 if test -n "$ac_tool_prefix"; then
4614   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4615 set dummy ${ac_tool_prefix}nm; ac_word=$2
4616 echo "$as_me:4616: checking for $ac_word" >&5
4617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4618 if test "${ac_cv_prog_NM+set}" = set; then
4619   echo $ECHO_N "(cached) $ECHO_C" >&6
4620 else
4621   if test -n "$NM"; then
4622   ac_cv_prog_NM="$NM" # Let the user override the test.
4623 else
4624   ac_save_IFS=$IFS; IFS=$ac_path_separator
4625 ac_dummy="$PATH"
4626 for ac_dir in $ac_dummy; do
4627   IFS=$ac_save_IFS
4628   test -z "$ac_dir" && ac_dir=.
4629   $as_executable_p "$ac_dir/$ac_word" || continue
4630 ac_cv_prog_NM="${ac_tool_prefix}nm"
4631 echo "$as_me:4631: found $ac_dir/$ac_word" >&5
4632 break
4633 done
4634
4635 fi
4636 fi
4637 NM=$ac_cv_prog_NM
4638 if test -n "$NM"; then
4639   echo "$as_me:4639: result: $NM" >&5
4640 echo "${ECHO_T}$NM" >&6
4641 else
4642   echo "$as_me:4642: result: no" >&5
4643 echo "${ECHO_T}no" >&6
4644 fi
4645
4646 fi
4647 if test -z "$ac_cv_prog_NM"; then
4648   ac_ct_NM=$NM
4649   # Extract the first word of "nm", so it can be a program name with args.
4650 set dummy nm; ac_word=$2
4651 echo "$as_me:4651: checking for $ac_word" >&5
4652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4653 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4654   echo $ECHO_N "(cached) $ECHO_C" >&6
4655 else
4656   if test -n "$ac_ct_NM"; then
4657   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4658 else
4659   ac_save_IFS=$IFS; IFS=$ac_path_separator
4660 ac_dummy="$PATH"
4661 for ac_dir in $ac_dummy; do
4662   IFS=$ac_save_IFS
4663   test -z "$ac_dir" && ac_dir=.
4664   $as_executable_p "$ac_dir/$ac_word" || continue
4665 ac_cv_prog_ac_ct_NM="nm"
4666 echo "$as_me:4666: found $ac_dir/$ac_word" >&5
4667 break
4668 done
4669
4670   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4671 fi
4672 fi
4673 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4674 if test -n "$ac_ct_NM"; then
4675   echo "$as_me:4675: result: $ac_ct_NM" >&5
4676 echo "${ECHO_T}$ac_ct_NM" >&6
4677 else
4678   echo "$as_me:4678: result: no" >&5
4679 echo "${ECHO_T}no" >&6
4680 fi
4681
4682   NM=$ac_ct_NM
4683 else
4684   NM="$ac_cv_prog_NM"
4685 fi
4686
4687 if test -n "$ac_tool_prefix"; then
4688   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4689 set dummy ${ac_tool_prefix}ar; ac_word=$2
4690 echo "$as_me:4690: checking for $ac_word" >&5
4691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4692 if test "${ac_cv_prog_AR+set}" = set; then
4693   echo $ECHO_N "(cached) $ECHO_C" >&6
4694 else
4695   if test -n "$AR"; then
4696   ac_cv_prog_AR="$AR" # Let the user override the test.
4697 else
4698   ac_save_IFS=$IFS; IFS=$ac_path_separator
4699 ac_dummy="$PATH"
4700 for ac_dir in $ac_dummy; do
4701   IFS=$ac_save_IFS
4702   test -z "$ac_dir" && ac_dir=.
4703   $as_executable_p "$ac_dir/$ac_word" || continue
4704 ac_cv_prog_AR="${ac_tool_prefix}ar"
4705 echo "$as_me:4705: found $ac_dir/$ac_word" >&5
4706 break
4707 done
4708
4709 fi
4710 fi
4711 AR=$ac_cv_prog_AR
4712 if test -n "$AR"; then
4713   echo "$as_me:4713: result: $AR" >&5
4714 echo "${ECHO_T}$AR" >&6
4715 else
4716   echo "$as_me:4716: result: no" >&5
4717 echo "${ECHO_T}no" >&6
4718 fi
4719
4720 fi
4721 if test -z "$ac_cv_prog_AR"; then
4722   ac_ct_AR=$AR
4723   # Extract the first word of "ar", so it can be a program name with args.
4724 set dummy ar; ac_word=$2
4725 echo "$as_me:4725: checking for $ac_word" >&5
4726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4727 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$ac_ct_AR"; then
4731   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4732 else
4733   ac_save_IFS=$IFS; IFS=$ac_path_separator
4734 ac_dummy="$PATH"
4735 for ac_dir in $ac_dummy; do
4736   IFS=$ac_save_IFS
4737   test -z "$ac_dir" && ac_dir=.
4738   $as_executable_p "$ac_dir/$ac_word" || continue
4739 ac_cv_prog_ac_ct_AR="ar"
4740 echo "$as_me:4740: found $ac_dir/$ac_word" >&5
4741 break
4742 done
4743
4744   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4745 fi
4746 fi
4747 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4748 if test -n "$ac_ct_AR"; then
4749   echo "$as_me:4749: result: $ac_ct_AR" >&5
4750 echo "${ECHO_T}$ac_ct_AR" >&6
4751 else
4752   echo "$as_me:4752: result: no" >&5
4753 echo "${ECHO_T}no" >&6
4754 fi
4755
4756   AR=$ac_ct_AR
4757 else
4758   AR="$ac_cv_prog_AR"
4759 fi
4760
4761 echo "$as_me:4761: checking for options to update archives" >&5
4762 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4763 if test "${cf_cv_ar_flags+set}" = set; then
4764   echo $ECHO_N "(cached) $ECHO_C" >&6
4765 else
4766
4767         case $cf_cv_system_name in
4768         (*-msvc*)
4769                 cf_cv_ar_flags=''
4770                 cat >mk_static_lib.sh <<-EOF
4771                 #!$SHELL
4772                 MSVC_BIN="$AR"
4773                 out="\$1"
4774                 shift
4775                 exec \$MSVC_BIN -out:"\$out" \$@
4776                 EOF
4777                 chmod +x mk_static_lib.sh
4778                 AR=`pwd`/mk_static_lib.sh
4779                 ;;
4780         (*)
4781                 cf_cv_ar_flags=unknown
4782                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4783                 do
4784
4785                         # check if $ARFLAGS already contains this choice
4786                         if test "x$ARFLAGS" != "x" ; then
4787                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4788                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4789                                         cf_cv_ar_flags=
4790                                         break
4791                                 fi
4792                         fi
4793
4794                         rm -f conftest.$ac_cv_objext
4795                         rm -f conftest.a
4796
4797                         cat >conftest.$ac_ext <<EOF
4798 #line 4798 "configure"
4799 int     testdata[3] = { 123, 456, 789 };
4800 EOF
4801                         if { (eval echo "$as_me:4801: \"$ac_compile\"") >&5
4802   (eval $ac_compile) 2>&5
4803   ac_status=$?
4804   echo "$as_me:4804: \$? = $ac_status" >&5
4805   (exit $ac_status); } ; then
4806                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4807                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4808                                 if test -f conftest.a ; then
4809                                         cf_cv_ar_flags=$cf_ar_flags
4810                                         break
4811                                 fi
4812                         else
4813                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4814
4815 echo "${as_me:-configure}:4815: testing cannot compile test-program ..." 1>&5
4816
4817                                 break
4818                         fi
4819                 done
4820                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4821                 ;;
4822         esac
4823
4824 fi
4825 echo "$as_me:4825: result: $cf_cv_ar_flags" >&5
4826 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4827
4828 if test -n "$ARFLAGS" ; then
4829         if test -n "$cf_cv_ar_flags" ; then
4830                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4831         fi
4832 else
4833         ARFLAGS=$cf_cv_ar_flags
4834 fi
4835
4836 echo "$as_me:4836: checking if you have specified an install-prefix" >&5
4837 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4838
4839 # Check whether --with-install-prefix or --without-install-prefix was given.
4840 if test "${with_install_prefix+set}" = set; then
4841   withval="$with_install_prefix"
4842   case "x$withval" in
4843         (xyes|xno)
4844                 ;;
4845         (*)     DESTDIR="$withval"
4846                 ;;
4847         esac
4848 fi;
4849 echo "$as_me:4849: result: $DESTDIR" >&5
4850 echo "${ECHO_T}$DESTDIR" >&6
4851
4852 ###############################################################################
4853
4854 # If we're cross-compiling, allow the user to override the tools and their
4855 # options.  The configure script is oriented toward identifying the host
4856 # compiler, etc., but we need a build compiler to generate parts of the source.
4857
4858 case $cf_cv_system_name in
4859 (*-msvc*)
4860         LDFLAGS="$LDFLAGS user32.lib"
4861         export LDFLAGS
4862         ;;
4863 esac
4864
4865 if test "$cross_compiling" = yes ; then
4866
4867         # defaults that we might want to override
4868         : ${BUILD_CFLAGS:=''}
4869         : ${BUILD_CPPFLAGS:=''}
4870         : ${BUILD_LDFLAGS:=''}
4871         : ${BUILD_LIBS:=''}
4872         : ${BUILD_EXEEXT:='$x'}
4873         : ${BUILD_OBJEXT:='o'}
4874
4875 # Check whether --with-build-cc or --without-build-cc was given.
4876 if test "${with_build_cc+set}" = set; then
4877   withval="$with_build_cc"
4878   BUILD_CC="$withval"
4879 else
4880   for ac_prog in gcc clang c99 c89 cc cl
4881 do
4882   # Extract the first word of "$ac_prog", so it can be a program name with args.
4883 set dummy $ac_prog; ac_word=$2
4884 echo "$as_me:4884: checking for $ac_word" >&5
4885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4886 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4887   echo $ECHO_N "(cached) $ECHO_C" >&6
4888 else
4889   if test -n "$BUILD_CC"; then
4890   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4891 else
4892   ac_save_IFS=$IFS; IFS=$ac_path_separator
4893 ac_dummy="$PATH"
4894 for ac_dir in $ac_dummy; do
4895   IFS=$ac_save_IFS
4896   test -z "$ac_dir" && ac_dir=.
4897   $as_executable_p "$ac_dir/$ac_word" || continue
4898 ac_cv_prog_BUILD_CC="$ac_prog"
4899 echo "$as_me:4899: found $ac_dir/$ac_word" >&5
4900 break
4901 done
4902
4903 fi
4904 fi
4905 BUILD_CC=$ac_cv_prog_BUILD_CC
4906 if test -n "$BUILD_CC"; then
4907   echo "$as_me:4907: result: $BUILD_CC" >&5
4908 echo "${ECHO_T}$BUILD_CC" >&6
4909 else
4910   echo "$as_me:4910: result: no" >&5
4911 echo "${ECHO_T}no" >&6
4912 fi
4913
4914   test -n "$BUILD_CC" && break
4915 done
4916 test -n "$BUILD_CC" || BUILD_CC="none"
4917
4918 fi;
4919         echo "$as_me:4919: checking for native build C compiler" >&5
4920 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4921         echo "$as_me:4921: result: $BUILD_CC" >&5
4922 echo "${ECHO_T}$BUILD_CC" >&6
4923
4924         echo "$as_me:4924: checking for native build C preprocessor" >&5
4925 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4926
4927 # Check whether --with-build-cpp or --without-build-cpp was given.
4928 if test "${with_build_cpp+set}" = set; then
4929   withval="$with_build_cpp"
4930   BUILD_CPP="$withval"
4931 else
4932   BUILD_CPP='${BUILD_CC} -E'
4933 fi;
4934         echo "$as_me:4934: result: $BUILD_CPP" >&5
4935 echo "${ECHO_T}$BUILD_CPP" >&6
4936
4937         echo "$as_me:4937: checking for native build C flags" >&5
4938 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4939
4940 # Check whether --with-build-cflags or --without-build-cflags was given.
4941 if test "${with_build_cflags+set}" = set; then
4942   withval="$with_build_cflags"
4943   BUILD_CFLAGS="$withval"
4944 fi;
4945         echo "$as_me:4945: result: $BUILD_CFLAGS" >&5
4946 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4947
4948         echo "$as_me:4948: checking for native build C preprocessor-flags" >&5
4949 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4950
4951 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4952 if test "${with_build_cppflags+set}" = set; then
4953   withval="$with_build_cppflags"
4954   BUILD_CPPFLAGS="$withval"
4955 fi;
4956         echo "$as_me:4956: result: $BUILD_CPPFLAGS" >&5
4957 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4958
4959         echo "$as_me:4959: checking for native build linker-flags" >&5
4960 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4961
4962 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4963 if test "${with_build_ldflags+set}" = set; then
4964   withval="$with_build_ldflags"
4965   BUILD_LDFLAGS="$withval"
4966 fi;
4967         echo "$as_me:4967: result: $BUILD_LDFLAGS" >&5
4968 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4969
4970         echo "$as_me:4970: checking for native build linker-libraries" >&5
4971 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4972
4973 # Check whether --with-build-libs or --without-build-libs was given.
4974 if test "${with_build_libs+set}" = set; then
4975   withval="$with_build_libs"
4976   BUILD_LIBS="$withval"
4977 fi;
4978         echo "$as_me:4978: result: $BUILD_LIBS" >&5
4979 echo "${ECHO_T}$BUILD_LIBS" >&6
4980
4981         # this assumes we're on Unix.
4982         BUILD_EXEEXT=
4983         BUILD_OBJEXT=o
4984
4985         : ${BUILD_CC:='${CC}'}
4986
4987         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4988                 { { echo "$as_me:4988: error: Cross-build requires two compilers.
4989 Use --with-build-cc to specify the native compiler." >&5
4990 echo "$as_me: error: Cross-build requires two compilers.
4991 Use --with-build-cc to specify the native compiler." >&2;}
4992    { (exit 1); exit 1; }; }
4993         fi
4994
4995 else
4996         : ${BUILD_CC:='${CC}'}
4997         : ${BUILD_CPP:='${CPP}'}
4998         : ${BUILD_CFLAGS:='${CFLAGS}'}
4999         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5000         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5001         : ${BUILD_LIBS:='${LIBS}'}
5002         : ${BUILD_EXEEXT:='$x'}
5003         : ${BUILD_OBJEXT:='o'}
5004 fi
5005
5006 ###############################################################################
5007
5008 ### Options to allow the user to specify the set of libraries which are used.
5009 ### Use "--without-normal --with-shared" to allow the default model to be
5010 ### shared, for example.
5011 cf_list_models=""
5012
5013 echo "$as_me:5013: checking if libtool -version-number should be used" >&5
5014 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5015
5016 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5017 if test "${enable_libtool_version+set}" = set; then
5018   enableval="$enable_libtool_version"
5019   test "$enableval" != no && enableval=yes
5020         if test "$enableval" != "yes" ; then
5021     cf_libtool_version=no
5022         else
5023                 cf_libtool_version=yes
5024         fi
5025 else
5026   enableval=yes
5027         cf_libtool_version=yes
5028
5029 fi;
5030 echo "$as_me:5030: result: $cf_libtool_version" >&5
5031 echo "${ECHO_T}$cf_libtool_version" >&6
5032
5033 if test "$cf_libtool_version" = yes ; then
5034         LIBTOOL_VERSION="-version-number"
5035 else
5036         LIBTOOL_VERSION="-version-info"
5037         case "x$VERSION" in
5038         (x)
5039                 { echo "$as_me:5039: WARNING: VERSION was not set" >&5
5040 echo "$as_me: WARNING: VERSION was not set" >&2;}
5041                 ;;
5042         (x*.*.*)
5043                 ABI_VERSION="$VERSION"
5044                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5045
5046 echo "${as_me:-configure}:5046: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5047
5048                 ;;
5049         (x*:*:*)
5050                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5051                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5052
5053 echo "${as_me:-configure}:5053: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5054
5055                 ;;
5056         (*)
5057                 { echo "$as_me:5057: WARNING: unexpected VERSION value: $VERSION" >&5
5058 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5059                 ;;
5060         esac
5061 fi
5062
5063 LIBTOOL=
5064
5065 # common library maintenance symbols that are convenient for libtool scripts:
5066 LIB_CREATE='${AR} -cr'
5067 LIB_OBJECT='${OBJECTS}'
5068 LIB_SUFFIX=.a
5069 LIB_PREP="$RANLIB"
5070
5071 # symbols used to prop libtool up to enable it to determine what it should be
5072 # doing:
5073 LIB_CLEAN=
5074 LIB_COMPILE=
5075 LIB_LINK='${CC}'
5076 LIB_INSTALL=
5077 LIB_UNINSTALL=
5078
5079 echo "$as_me:5079: checking if you want to build libraries with libtool" >&5
5080 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5081
5082 # Check whether --with-libtool or --without-libtool was given.
5083 if test "${with_libtool+set}" = set; then
5084   withval="$with_libtool"
5085   with_libtool=$withval
5086 else
5087   with_libtool=no
5088 fi;
5089 echo "$as_me:5089: result: $with_libtool" >&5
5090 echo "${ECHO_T}$with_libtool" >&6
5091 if test "$with_libtool" != "no"; then
5092
5093         if test "$with_libtool" != "yes" ; then
5094
5095 if test "x$prefix" != xNONE; then
5096         cf_path_syntax="$prefix"
5097 else
5098         cf_path_syntax="$ac_default_prefix"
5099 fi
5100
5101 case ".$with_libtool" in
5102 (.\$\(*\)*|.\'*\'*)
5103         ;;
5104 (..|./*|.\\*)
5105         ;;
5106 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5107         ;;
5108 (.\${*prefix}*|.\${*dir}*)
5109         eval with_libtool="$with_libtool"
5110         case ".$with_libtool" in
5111         (.NONE/*)
5112                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5113                 ;;
5114         esac
5115         ;;
5116 (.no|.NONE/*)
5117         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5118         ;;
5119 (*)
5120         { { echo "$as_me:5120: error: expected a pathname, not \"$with_libtool\"" >&5
5121 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5122    { (exit 1); exit 1; }; }
5123         ;;
5124 esac
5125
5126                 LIBTOOL=$with_libtool
5127         else
5128                 if test -n "$ac_tool_prefix"; then
5129   for ac_prog in libtool glibtool
5130   do
5131     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5132 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5133 echo "$as_me:5133: checking for $ac_word" >&5
5134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5135 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   if test -n "$LIBTOOL"; then
5139   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5140 else
5141   ac_save_IFS=$IFS; IFS=$ac_path_separator
5142 ac_dummy="$PATH"
5143 for ac_dir in $ac_dummy; do
5144   IFS=$ac_save_IFS
5145   test -z "$ac_dir" && ac_dir=.
5146   $as_executable_p "$ac_dir/$ac_word" || continue
5147 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5148 echo "$as_me:5148: found $ac_dir/$ac_word" >&5
5149 break
5150 done
5151
5152 fi
5153 fi
5154 LIBTOOL=$ac_cv_prog_LIBTOOL
5155 if test -n "$LIBTOOL"; then
5156   echo "$as_me:5156: result: $LIBTOOL" >&5
5157 echo "${ECHO_T}$LIBTOOL" >&6
5158 else
5159   echo "$as_me:5159: result: no" >&5
5160 echo "${ECHO_T}no" >&6
5161 fi
5162
5163     test -n "$LIBTOOL" && break
5164   done
5165 fi
5166 if test -z "$LIBTOOL"; then
5167   ac_ct_LIBTOOL=$LIBTOOL
5168   for ac_prog in libtool glibtool
5169 do
5170   # Extract the first word of "$ac_prog", so it can be a program name with args.
5171 set dummy $ac_prog; ac_word=$2
5172 echo "$as_me:5172: checking for $ac_word" >&5
5173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5174 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5175   echo $ECHO_N "(cached) $ECHO_C" >&6
5176 else
5177   if test -n "$ac_ct_LIBTOOL"; then
5178   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5179 else
5180   ac_save_IFS=$IFS; IFS=$ac_path_separator
5181 ac_dummy="$PATH"
5182 for ac_dir in $ac_dummy; do
5183   IFS=$ac_save_IFS
5184   test -z "$ac_dir" && ac_dir=.
5185   $as_executable_p "$ac_dir/$ac_word" || continue
5186 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5187 echo "$as_me:5187: found $ac_dir/$ac_word" >&5
5188 break
5189 done
5190
5191 fi
5192 fi
5193 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5194 if test -n "$ac_ct_LIBTOOL"; then
5195   echo "$as_me:5195: result: $ac_ct_LIBTOOL" >&5
5196 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5197 else
5198   echo "$as_me:5198: result: no" >&5
5199 echo "${ECHO_T}no" >&6
5200 fi
5201
5202   test -n "$ac_ct_LIBTOOL" && break
5203 done
5204 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5205
5206   LIBTOOL=$ac_ct_LIBTOOL
5207 fi
5208
5209 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5210 then
5211         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.].*//'`
5212 else
5213         cf_cv_libtool_version=
5214 fi
5215 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5216
5217                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5218                 then
5219
5220 unset ac_cv_prog_ac_ct_LIBTOOL
5221 unset ac_ct_LIBTOOL
5222 unset LIBTOOL
5223
5224                         if test -n "$ac_tool_prefix"; then
5225   for ac_prog in glibtool
5226   do
5227     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5228 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5229 echo "$as_me:5229: checking for $ac_word" >&5
5230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5231 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5232   echo $ECHO_N "(cached) $ECHO_C" >&6
5233 else
5234   if test -n "$LIBTOOL"; then
5235   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5236 else
5237   ac_save_IFS=$IFS; IFS=$ac_path_separator
5238 ac_dummy="$PATH"
5239 for ac_dir in $ac_dummy; do
5240   IFS=$ac_save_IFS
5241   test -z "$ac_dir" && ac_dir=.
5242   $as_executable_p "$ac_dir/$ac_word" || continue
5243 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5244 echo "$as_me:5244: found $ac_dir/$ac_word" >&5
5245 break
5246 done
5247
5248 fi
5249 fi
5250 LIBTOOL=$ac_cv_prog_LIBTOOL
5251 if test -n "$LIBTOOL"; then
5252   echo "$as_me:5252: result: $LIBTOOL" >&5
5253 echo "${ECHO_T}$LIBTOOL" >&6
5254 else
5255   echo "$as_me:5255: result: no" >&5
5256 echo "${ECHO_T}no" >&6
5257 fi
5258
5259     test -n "$LIBTOOL" && break
5260   done
5261 fi
5262 if test -z "$LIBTOOL"; then
5263   ac_ct_LIBTOOL=$LIBTOOL
5264   for ac_prog in glibtool
5265 do
5266   # Extract the first word of "$ac_prog", so it can be a program name with args.
5267 set dummy $ac_prog; ac_word=$2
5268 echo "$as_me:5268: checking for $ac_word" >&5
5269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5270 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5271   echo $ECHO_N "(cached) $ECHO_C" >&6
5272 else
5273   if test -n "$ac_ct_LIBTOOL"; then
5274   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5275 else
5276   ac_save_IFS=$IFS; IFS=$ac_path_separator
5277 ac_dummy="$PATH"
5278 for ac_dir in $ac_dummy; do
5279   IFS=$ac_save_IFS
5280   test -z "$ac_dir" && ac_dir=.
5281   $as_executable_p "$ac_dir/$ac_word" || continue
5282 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5283 echo "$as_me:5283: found $ac_dir/$ac_word" >&5
5284 break
5285 done
5286
5287 fi
5288 fi
5289 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5290 if test -n "$ac_ct_LIBTOOL"; then
5291   echo "$as_me:5291: result: $ac_ct_LIBTOOL" >&5
5292 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5293 else
5294   echo "$as_me:5294: result: no" >&5
5295 echo "${ECHO_T}no" >&6
5296 fi
5297
5298   test -n "$ac_ct_LIBTOOL" && break
5299 done
5300 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5301
5302   LIBTOOL=$ac_ct_LIBTOOL
5303 fi
5304
5305 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5306 then
5307         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.].*//'`
5308 else
5309         cf_cv_libtool_version=
5310 fi
5311 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5312
5313                 fi
5314         fi
5315         if test -z "$LIBTOOL" ; then
5316                 { { echo "$as_me:5316: error: Cannot find libtool" >&5
5317 echo "$as_me: error: Cannot find libtool" >&2;}
5318    { (exit 1); exit 1; }; }
5319         fi
5320         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5321         LIB_OBJECT='${OBJECTS:.o=.lo}'
5322         LIB_SUFFIX=.la
5323         LIB_CLEAN='${LIBTOOL} --mode=clean'
5324         LIB_COMPILE='${LIBTOOL} --mode=compile'
5325         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5326         LIB_INSTALL='${LIBTOOL} --mode=install'
5327         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5328         LIB_PREP=:
5329
5330 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5331 then
5332         echo "$as_me:5332: checking version of $LIBTOOL" >&5
5333 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5334
5335 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5336 then
5337         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.].*//'`
5338 else
5339         cf_cv_libtool_version=
5340 fi
5341 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5342
5343         echo "$as_me:5343: result: $cf_cv_libtool_version" >&5
5344 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5345         if test -z "$cf_cv_libtool_version" ; then
5346                 { { echo "$as_me:5346: error: This is not GNU libtool" >&5
5347 echo "$as_me: error: This is not GNU libtool" >&2;}
5348    { (exit 1); exit 1; }; }
5349         fi
5350 else
5351         { { echo "$as_me:5351: error: GNU libtool has not been found" >&5
5352 echo "$as_me: error: GNU libtool has not been found" >&2;}
5353    { (exit 1); exit 1; }; }
5354 fi
5355
5356         # special hack to add -no-undefined (which libtool should do for itself)
5357         LT_UNDEF=
5358         case "$cf_cv_system_name" in
5359         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5360                 LT_UNDEF=-no-undefined
5361                 ;;
5362         esac
5363
5364         # special hack to add --tag option for C++ compiler
5365         case $cf_cv_libtool_version in
5366         (1.[5-9]*|[2-9].[0-9.a-z]*)
5367                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5368                 LIBTOOL="$LIBTOOL --tag=CC"
5369                 ;;
5370         (*)
5371                 LIBTOOL_CXX="$LIBTOOL"
5372                 ;;
5373         esac
5374 else
5375         LIBTOOL=""
5376         LIBTOOL_CXX=""
5377 fi
5378
5379 test -z "$LIBTOOL" && ECHO_LT=
5380
5381 if test "$with_libtool" != "no" ; then
5382
5383 cf_list_models="$cf_list_models libtool"
5384
5385 else
5386
5387 echo "$as_me:5387: checking if you want to build shared libraries" >&5
5388 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5389
5390 # Check whether --with-shared or --without-shared was given.
5391 if test "${with_shared+set}" = set; then
5392   withval="$with_shared"
5393   with_shared=$withval
5394 else
5395   with_shared=no
5396 fi;
5397 echo "$as_me:5397: result: $with_shared" >&5
5398 echo "${ECHO_T}$with_shared" >&6
5399 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5400
5401 echo "$as_me:5401: checking if you want to build static libraries" >&5
5402 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5403
5404 # Check whether --with-normal or --without-normal was given.
5405 if test "${with_normal+set}" = set; then
5406   withval="$with_normal"
5407   with_normal=$withval
5408 else
5409   with_normal=yes
5410 fi;
5411 echo "$as_me:5411: result: $with_normal" >&5
5412 echo "${ECHO_T}$with_normal" >&6
5413 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5414
5415 echo "$as_me:5415: checking if you want to build debug libraries" >&5
5416 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5417
5418 # Check whether --with-debug or --without-debug was given.
5419 if test "${with_debug+set}" = set; then
5420   withval="$with_debug"
5421   with_debug=$withval
5422 else
5423   with_debug=yes
5424 fi;
5425 echo "$as_me:5425: result: $with_debug" >&5
5426 echo "${ECHO_T}$with_debug" >&6
5427 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5428
5429 echo "$as_me:5429: checking if you want to build profiling libraries" >&5
5430 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5431
5432 # Check whether --with-profile or --without-profile was given.
5433 if test "${with_profile+set}" = set; then
5434   withval="$with_profile"
5435   with_profile=$withval
5436 else
5437   with_profile=no
5438 fi;
5439 echo "$as_me:5439: result: $with_profile" >&5
5440 echo "${ECHO_T}$with_profile" >&6
5441 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5442
5443 fi
5444
5445 if test "X$cf_with_cxx_binding" != Xno; then
5446 if test "x$with_shared" = "xyes"; then
5447 echo "$as_me:5447: checking if you want to build C++ shared libraries" >&5
5448 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5449
5450 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5451 if test "${with_cxx_shared+set}" = set; then
5452   withval="$with_cxx_shared"
5453   with_shared_cxx=$withval
5454 else
5455   with_shared_cxx=no
5456 fi;
5457 echo "$as_me:5457: result: $with_shared_cxx" >&5
5458 echo "${ECHO_T}$with_shared_cxx" >&6
5459 fi
5460 fi
5461
5462 ###############################################################################
5463
5464 echo "$as_me:5464: checking for specified models" >&5
5465 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5466 test -z "$cf_list_models" && cf_list_models=normal
5467 test "$with_libtool" != "no" && cf_list_models=libtool
5468 echo "$as_me:5468: result: $cf_list_models" >&5
5469 echo "${ECHO_T}$cf_list_models" >&6
5470
5471 ### Use the first model as the default, and save its suffix for use in building
5472 ### up test-applications.
5473 echo "$as_me:5473: checking for default model" >&5
5474 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5475 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5476 echo "$as_me:5476: result: $DFT_LWR_MODEL" >&5
5477 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5478
5479 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5480
5481 TICS_NAME=tic
5482
5483 TINFO_NAME=tinfo
5484
5485 LIB_NAME=ncurses
5486
5487 LIB_DIR=../lib
5488 LIB_2ND=../../lib
5489
5490 echo "$as_me:5490: checking if you want to have a library-prefix" >&5
5491 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5492
5493 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5494 if test "${with_lib_prefix+set}" = set; then
5495   withval="$with_lib_prefix"
5496   with_lib_prefix=$withval
5497 else
5498   with_lib_prefix=auto
5499 fi;
5500 echo "$as_me:5500: result: $with_lib_prefix" >&5
5501 echo "${ECHO_T}$with_lib_prefix" >&6
5502
5503 if test $with_lib_prefix = auto
5504 then
5505
5506         case $cf_cv_system_name in
5507         (OS/2*|os2*)
5508                 if test "$DFT_LWR_MODEL" = libtool; then
5509                         LIB_PREFIX='lib'
5510                 else
5511                         LIB_PREFIX=''
5512                 fi
5513                 ;;
5514         (*-msvc*)
5515                 LIB_PREFIX=''
5516                 ;;
5517         (*)     LIB_PREFIX='lib'
5518                 ;;
5519         esac
5520 cf_prefix=$LIB_PREFIX
5521
5522 elif test $with_lib_prefix = no
5523 then
5524         LIB_PREFIX=
5525 else
5526         LIB_PREFIX=$with_lib_prefix
5527 fi
5528
5529 LIB_SUFFIX=
5530
5531         echo "$as_me:5531: checking for PATH separator" >&5
5532 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5533         case $cf_cv_system_name in
5534         (os2*)  PATH_SEPARATOR=';'  ;;
5535         (*)     ${PATH_SEPARATOR:=':'}  ;;
5536         esac
5537
5538         echo "$as_me:5538: result: $PATH_SEPARATOR" >&5
5539 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5540
5541 ###############################################################################
5542
5543 echo "$as_me:5543: checking if you want to build a separate terminfo library" >&5
5544 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5545
5546 # Check whether --with-termlib or --without-termlib was given.
5547 if test "${with_termlib+set}" = set; then
5548   withval="$with_termlib"
5549   with_termlib=$withval
5550 else
5551   with_termlib=no
5552 fi;
5553 echo "$as_me:5553: result: $with_termlib" >&5
5554 echo "${ECHO_T}$with_termlib" >&6
5555
5556 echo "$as_me:5556: checking if you want to build a separate tic library" >&5
5557 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5558
5559 # Check whether --with-ticlib or --without-ticlib was given.
5560 if test "${with_ticlib+set}" = set; then
5561   withval="$with_ticlib"
5562   with_ticlib=$withval
5563 else
5564   with_ticlib=no
5565 fi;
5566 echo "$as_me:5566: result: $with_ticlib" >&5
5567 echo "${ECHO_T}$with_ticlib" >&6
5568
5569 if test X"$CC_G_OPT" = X"" ; then
5570         CC_G_OPT='-g'
5571         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5572 fi
5573
5574 if test X"$CXX_G_OPT" = X"" ; then
5575         CXX_G_OPT='-g'
5576         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5577 fi
5578
5579 echo "$as_me:5579: checking for default loader flags" >&5
5580 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5581 case $DFT_LWR_MODEL in
5582 (libtool) LD_MODEL=''   ;;
5583 (normal)  LD_MODEL=''   ;;
5584 (debug)   LD_MODEL=$CC_G_OPT ;;
5585 (profile) LD_MODEL='-pg';;
5586 (shared)  LD_MODEL=''   ;;
5587 esac
5588 echo "$as_me:5588: result: $LD_MODEL" >&5
5589 echo "${ECHO_T}$LD_MODEL" >&6
5590
5591 case $DFT_LWR_MODEL in
5592 (shared)
5593
5594 echo "$as_me:5594: checking if rpath option should be used" >&5
5595 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5596
5597 # Check whether --enable-rpath or --disable-rpath was given.
5598 if test "${enable_rpath+set}" = set; then
5599   enableval="$enable_rpath"
5600   cf_cv_enable_rpath=$enableval
5601 else
5602   cf_cv_enable_rpath=no
5603 fi;
5604 echo "$as_me:5604: result: $cf_cv_enable_rpath" >&5
5605 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5606
5607 echo "$as_me:5607: checking if shared libraries should be relinked during install" >&5
5608 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5609
5610 # Check whether --enable-relink or --disable-relink was given.
5611 if test "${enable_relink+set}" = set; then
5612   enableval="$enable_relink"
5613   cf_cv_do_relink=$enableval
5614 else
5615   cf_cv_do_relink=yes
5616 fi;
5617 echo "$as_me:5617: result: $cf_cv_do_relink" >&5
5618 echo "${ECHO_T}$cf_cv_do_relink" >&6
5619         ;;
5620 esac
5621
5622 # we will build libraries one-level down.
5623 rel_builddir=..
5624
5625 LD_RPATH_OPT=
5626 if test "x$cf_cv_enable_rpath" != xno
5627 then
5628         echo "$as_me:5628: checking for an rpath option" >&5
5629 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5630         case $cf_cv_system_name in
5631         (irix*)
5632                 if test "$GCC" = yes; then
5633                         LD_RPATH_OPT="-Wl,-rpath,"
5634                 else
5635                         LD_RPATH_OPT="-rpath "
5636                 fi
5637                 ;;
5638         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5639                 LD_RPATH_OPT="-Wl,-rpath,"
5640                 ;;
5641         (openbsd[2-9].*|mirbsd*)
5642                 LD_RPATH_OPT="-Wl,-rpath,"
5643                 ;;
5644         (dragonfly*)
5645                 LD_RPATH_OPT="-rpath "
5646                 ;;
5647         (netbsd*)
5648                 LD_RPATH_OPT="-Wl,-rpath,"
5649                 ;;
5650         (osf*|mls+*)
5651                 LD_RPATH_OPT="-rpath "
5652                 ;;
5653         (solaris2*)
5654                 LD_RPATH_OPT="-R"
5655                 ;;
5656         (*)
5657                 ;;
5658         esac
5659         echo "$as_me:5659: result: $LD_RPATH_OPT" >&5
5660 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5661
5662         case "x$LD_RPATH_OPT" in
5663         (x-R*)
5664                 echo "$as_me:5664: checking if we need a space after rpath option" >&5
5665 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5666                 cf_save_LIBS="$LIBS"
5667
5668 cf_add_libs="$LIBS"
5669 # reverse order
5670 cf_add_0lib=
5671 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5672 # filter duplicates
5673 for cf_add_1lib in $cf_add_0lib; do
5674         for cf_add_2lib in $cf_add_libs; do
5675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5676                         cf_add_1lib=
5677                         break
5678                 fi
5679         done
5680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5681 done
5682 LIBS="$cf_add_libs"
5683
5684                 cat >conftest.$ac_ext <<_ACEOF
5685 #line 5685 "configure"
5686 #include "confdefs.h"
5687
5688 int
5689 main (void)
5690 {
5691
5692   ;
5693   return 0;
5694 }
5695 _ACEOF
5696 rm -f conftest.$ac_objext conftest$ac_exeext
5697 if { (eval echo "$as_me:5697: \"$ac_link\"") >&5
5698   (eval $ac_link) 2>&5
5699   ac_status=$?
5700   echo "$as_me:5700: \$? = $ac_status" >&5
5701   (exit $ac_status); } &&
5702          { ac_try='test -s conftest$ac_exeext'
5703   { (eval echo "$as_me:5703: \"$ac_try\"") >&5
5704   (eval $ac_try) 2>&5
5705   ac_status=$?
5706   echo "$as_me:5706: \$? = $ac_status" >&5
5707   (exit $ac_status); }; }; then
5708   cf_rpath_space=no
5709 else
5710   echo "$as_me: failed program was:" >&5
5711 cat conftest.$ac_ext >&5
5712 cf_rpath_space=yes
5713 fi
5714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5715                 LIBS="$cf_save_LIBS"
5716                 echo "$as_me:5716: result: $cf_rpath_space" >&5
5717 echo "${ECHO_T}$cf_rpath_space" >&6
5718                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5719                 ;;
5720         esac
5721 fi
5722
5723         RM_SHARED_OPTS=
5724         LOCAL_LDFLAGS=
5725         LOCAL_LDFLAGS2=
5726         LD_SHARED_OPTS=
5727         INSTALL_LIB="-m 644"
5728         : ${rel_builddir:=.}
5729
5730         shlibdir=$libdir
5731
5732         MAKE_DLLS="#"
5733
5734         cf_cv_do_symlinks=no
5735         cf_ld_rpath_opt=
5736         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5737
5738         echo "$as_me:5738: checking if release/abi version should be used for shared libs" >&5
5739 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5740
5741 # Check whether --with-shlib-version or --without-shlib-version was given.
5742 if test "${with_shlib_version+set}" = set; then
5743   withval="$with_shlib_version"
5744   test -z "$withval" && withval=auto
5745         case $withval in
5746         (yes)
5747                 cf_cv_shlib_version=auto
5748                 ;;
5749         (rel|abi|auto)
5750                 cf_cv_shlib_version=$withval
5751                 ;;
5752         (*)
5753                 echo "$as_me:5753: result: $withval" >&5
5754 echo "${ECHO_T}$withval" >&6
5755                 { { echo "$as_me:5755: error: option value must be one of: rel, abi, or auto" >&5
5756 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5757    { (exit 1); exit 1; }; }
5758                 ;;
5759         esac
5760
5761 else
5762   cf_cv_shlib_version=auto
5763 fi;
5764         echo "$as_me:5764: result: $cf_cv_shlib_version" >&5
5765 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5766
5767         cf_cv_rm_so_locs=no
5768         cf_try_cflags=
5769
5770         # Some less-capable ports of gcc support only -fpic
5771         CC_SHARED_OPTS=
5772
5773         cf_try_fPIC=no
5774         if test "$GCC" = yes
5775         then
5776                 cf_try_fPIC=yes
5777         else
5778                 case $cf_cv_system_name in
5779                 (*linux*)       # e.g., PGI compiler
5780                         cf_try_fPIC=yes
5781                         ;;
5782                 esac
5783         fi
5784
5785         if test "$cf_try_fPIC" = yes
5786         then
5787                 echo "$as_me:5787: checking which $CC option to use" >&5
5788 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5789                 cf_save_CFLAGS="$CFLAGS"
5790                 for CC_SHARED_OPTS in -fPIC -fpic ''
5791                 do
5792                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5793                         cat >conftest.$ac_ext <<_ACEOF
5794 #line 5794 "configure"
5795 #include "confdefs.h"
5796 #include <stdio.h>
5797 int
5798 main (void)
5799 {
5800 int x = 1
5801   ;
5802   return 0;
5803 }
5804 _ACEOF
5805 rm -f conftest.$ac_objext
5806 if { (eval echo "$as_me:5806: \"$ac_compile\"") >&5
5807   (eval $ac_compile) 2>&5
5808   ac_status=$?
5809   echo "$as_me:5809: \$? = $ac_status" >&5
5810   (exit $ac_status); } &&
5811          { ac_try='test -s conftest.$ac_objext'
5812   { (eval echo "$as_me:5812: \"$ac_try\"") >&5
5813   (eval $ac_try) 2>&5
5814   ac_status=$?
5815   echo "$as_me:5815: \$? = $ac_status" >&5
5816   (exit $ac_status); }; }; then
5817   break
5818 else
5819   echo "$as_me: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5821 fi
5822 rm -f conftest.$ac_objext conftest.$ac_ext
5823                 done
5824                 echo "$as_me:5824: result: $CC_SHARED_OPTS" >&5
5825 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5826                 CFLAGS="$cf_save_CFLAGS"
5827         fi
5828
5829         cf_cv_shlib_version_infix=no
5830
5831         case $cf_cv_system_name in
5832         (aix4.3-9*|aix[5-7]*)
5833                 if test "$GCC" = yes; then
5834                         CC_SHARED_OPTS='-Wl,-brtl'
5835                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5836                 else
5837                         CC_SHARED_OPTS='-brtl'
5838                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5839                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5840                 fi
5841                 ;;
5842         (beos*)
5843                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5844                 ;;
5845         (cygwin*)
5846                 CC_SHARED_OPTS=
5847                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5848                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5849                 cf_cv_shlib_version=cygdll
5850                 cf_cv_shlib_version_infix=cygdll
5851                 shlibdir=$bindir
5852                 MAKE_DLLS=
5853                 cat >mk_shared_lib.sh <<-CF_EOF
5854                 #!$SHELL
5855                 SHARED_LIB=\$1
5856                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5857                 shift
5858                 cat <<-EOF
5859                 Linking shared library
5860                 ** SHARED_LIB \$SHARED_LIB
5861                 ** IMPORT_LIB \$IMPORT_LIB
5862 EOF
5863                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5864 CF_EOF
5865                 chmod +x mk_shared_lib.sh
5866                 ;;
5867         (msys*)
5868                 CC_SHARED_OPTS=
5869                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5870                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5871                 cf_cv_shlib_version=msysdll
5872                 cf_cv_shlib_version_infix=msysdll
5873                 shlibdir=$bindir
5874                 MAKE_DLLS=
5875                 cat >mk_shared_lib.sh <<-CF_EOF
5876                 #!$SHELL
5877                 SHARED_LIB=\$1
5878                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5879                 shift
5880                 cat <<-EOF
5881                 Linking shared library
5882                 ** SHARED_LIB \$SHARED_LIB
5883                 ** IMPORT_LIB \$IMPORT_LIB
5884 EOF
5885                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5886 CF_EOF
5887                 chmod +x mk_shared_lib.sh
5888                 ;;
5889         (darwin*)
5890                 cf_try_cflags="no-cpp-precomp"
5891                 CC_SHARED_OPTS="-dynamic"
5892                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5893                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5894                 cf_cv_shlib_version_infix=yes
5895                 echo "$as_me:5895: checking if ld -search_paths_first works" >&5
5896 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5897 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5898   echo $ECHO_N "(cached) $ECHO_C" >&6
5899 else
5900
5901                         cf_save_LDFLAGS=$LDFLAGS
5902                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5903                         cat >conftest.$ac_ext <<_ACEOF
5904 #line 5904 "configure"
5905 #include "confdefs.h"
5906
5907 int
5908 main (void)
5909 {
5910 int i;
5911   ;
5912   return 0;
5913 }
5914 _ACEOF
5915 rm -f conftest.$ac_objext conftest$ac_exeext
5916 if { (eval echo "$as_me:5916: \"$ac_link\"") >&5
5917   (eval $ac_link) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit $ac_status); } &&
5921          { ac_try='test -s conftest$ac_exeext'
5922   { (eval echo "$as_me:5922: \"$ac_try\"") >&5
5923   (eval $ac_try) 2>&5
5924   ac_status=$?
5925   echo "$as_me:5925: \$? = $ac_status" >&5
5926   (exit $ac_status); }; }; then
5927   cf_cv_ldflags_search_paths_first=yes
5928 else
5929   echo "$as_me: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931 cf_cv_ldflags_search_paths_first=no
5932 fi
5933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5934                                 LDFLAGS=$cf_save_LDFLAGS
5935 fi
5936 echo "$as_me:5936: result: $cf_cv_ldflags_search_paths_first" >&5
5937 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5938                 if test $cf_cv_ldflags_search_paths_first = yes; then
5939                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5940                 fi
5941                 ;;
5942         (hpux[7-8]*)
5943                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5944                 if test "$GCC" != yes; then
5945                         CC_SHARED_OPTS='+Z'
5946                 fi
5947                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5948                 INSTALL_LIB="-m 555"
5949                 ;;
5950         (hpux*)
5951                 # (tested with gcc 2.7.2 -- I don't have c89)
5952                 if test "$GCC" = yes; then
5953                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5954                 else
5955                         CC_SHARED_OPTS='+Z'
5956                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5957                 fi
5958                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5959                 # HP-UX shared libraries must be executable, and should be
5960                 # readonly to exploit a quirk in the memory manager.
5961                 INSTALL_LIB="-m 555"
5962                 ;;
5963         (interix*)
5964                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5965                 if test "$cf_cv_shlib_version" = rel; then
5966                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5967                 else
5968                         cf_shared_soname='`basename $@`'
5969                 fi
5970                 CC_SHARED_OPTS=
5971                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5972                 ;;
5973         (irix*)
5974                 if test "$cf_cv_enable_rpath" = yes ; then
5975                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5976                 fi
5977                 # tested with IRIX 5.2 and 'cc'.
5978                 if test "$GCC" != yes; then
5979                         CC_SHARED_OPTS='-KPIC'
5980                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5981                 else
5982                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5983                 fi
5984                 cf_cv_rm_so_locs=yes
5985                 ;;
5986         (linux*|gnu*|k*bsd*-gnu)
5987                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5988                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5989                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5990                 fi
5991                 if test "$cf_cv_enable_rpath" = yes ; then
5992                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5993                 fi
5994
5995         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5996         if test "$cf_cv_shlib_version" = rel; then
5997                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5998         else
5999                 cf_cv_shared_soname='`basename $@`'
6000         fi
6001
6002                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6003                 ;;
6004         (mingw*msvc*)
6005                 cf_cv_shlib_version=msvcdll
6006                 cf_cv_shlib_version_infix=msvcdll
6007                 shlibdir=$bindir
6008                 MAKE_DLLS=
6009                 if test "$DFT_LWR_MODEL" = "shared" ; then
6010                         LOCAL_LDFLAGS="-link -dll"
6011                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6012                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6013                 fi
6014                 CC_SHARED_OPTS=
6015                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6016                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6017                 cat >mk_shared_lib.sh <<-CF_EOF
6018                 #!$SHELL
6019                 SHARED_LIB=\$1
6020                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6021                 shift
6022                 my_ld=\$1
6023                 shift
6024                 cat <<-EOF
6025                 Linking shared library
6026                 ** SHARED LIB \$SHARED_LIB
6027                 ** IMPORT_LIB \$IMPORT_LIB
6028 EOF
6029                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6030                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6031                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6032 CF_EOF
6033                 chmod +x mk_shared_lib.sh
6034                 cat >mk_prog.sh <<-CF_EOF
6035                 #!$SHELL
6036                 shift
6037                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6038                 LD="$LD"
6039                 clopts=()
6040                 ldopts=("/subsystem:console")
6041                 libs=()
6042                 isdll=0
6043                 while test \$# -gt 0; do
6044                         case "\$1" in
6045                                 -link)
6046                                         # ignore -link argument
6047                                         ;;
6048                                 -M[TD] | -M[TD]d)
6049                                         # ignore runtime-library option
6050                                         ;;
6051                                 -dll)
6052                                         isdll=1
6053                                         ;;
6054                                 -W* | -w*)
6055                                         # ignore warnings
6056                                         ;;
6057                                 -D*)
6058                                         clopts+=("\$1")
6059                                         ;;
6060                                 -I*)
6061                                         clopts+=("\$1")
6062                                         ;;
6063                                 -l*)
6064                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6065                                         ;;
6066                                 -L*)
6067                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6068                                         ;;
6069                                 *.obj | *.o)
6070                                         ldopts+=("\$1")
6071                                         ;;
6072                                 -Wl,*)
6073                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6074                                                 ldopts+=("\${linkarg}")
6075                                         done
6076                                         ;;
6077                                 *.lib)
6078                                         ldopts+=("\$1")
6079                                         ;;
6080                                 -o)
6081                                         shift
6082                                         ldopts+=("-out:\$1")
6083                                         ;;
6084                                 *)
6085                                         clopts+=("\$1")
6086                                         ldopts+=("\$1")
6087                                         ;;
6088                         esac
6089                         shift
6090                 done
6091                 if [ "\$isdll" -ne 0 ]; then
6092                         for lib in \${libs[*]}; do
6093                                 ldopts+=("\$lib.dll.lib")
6094                         done
6095                 else
6096                         for lib in \${libs[*]}; do
6097                                 ldopts+=("\$lib.lib")
6098                         done
6099                 fi
6100                 cat <<-EOF
6101                 Creating program
6102                 ** ld options:   "\${ldopts[@]}"
6103 EOF
6104                 exec \$LD \${ldopts[@]}
6105 CF_EOF
6106                 chmod +x mk_prog.sh
6107                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6108                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6109                 ;;
6110         (mingw*)
6111                 cf_cv_shlib_version=mingw
6112                 cf_cv_shlib_version_infix=mingw
6113                 shlibdir=$bindir
6114                 MAKE_DLLS=
6115                 if test "$DFT_LWR_MODEL" = "shared" ; then
6116                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6117                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6118                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6119                 fi
6120                 CC_SHARED_OPTS=
6121                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6122                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6123                 cat >mk_shared_lib.sh <<-CF_EOF
6124                 #!$SHELL
6125                 SHARED_LIB=\$1
6126                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6127                 shift
6128                 cat <<-EOF
6129                 Linking shared library
6130                 ** SHARED_LIB \$SHARED_LIB
6131                 ** IMPORT_LIB \$IMPORT_LIB
6132 EOF
6133                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6134 CF_EOF
6135                 chmod +x mk_shared_lib.sh
6136                 ;;
6137         (openbsd[2-9].*|mirbsd*)
6138                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6139                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6140                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6141                 fi
6142                 if test "$cf_cv_enable_rpath" = yes ; then
6143                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6144                 fi
6145                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6146
6147         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6148         if test "$cf_cv_shlib_version" = rel; then
6149                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6150         else
6151                 cf_cv_shared_soname='`basename $@`'
6152         fi
6153
6154                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6155                 ;;
6156         (nskJ*)
6157                 CC_SHARED_OPTS=
6158                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6159                 ;;
6160         (nskL*)
6161                 CC_SHARED_OPTS=
6162                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6163                 ;;
6164         (nto-qnx*|openbsd*|freebsd[12].*)
6165                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6166                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6167                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6168                 ;;
6169         (dragonfly*|freebsd*)
6170                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6171                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6172                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6173                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6174                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6175                 fi
6176
6177         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6178         if test "$cf_cv_shlib_version" = rel; then
6179                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6180         else
6181                 cf_cv_shared_soname='`basename $@`'
6182         fi
6183
6184                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6185                 ;;
6186         (netbsd*)
6187                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6188                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6189                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6191                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6192                         if test "$cf_cv_shlib_version" = auto; then
6193                         if test -f /usr/libexec/ld.elf_so; then
6194                                 cf_cv_shlib_version=abi
6195                         else
6196                                 cf_cv_shlib_version=rel
6197                         fi
6198                         fi
6199
6200         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6201         if test "$cf_cv_shlib_version" = rel; then
6202                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6203         else
6204                 cf_cv_shared_soname='`basename $@`'
6205         fi
6206
6207                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6208                 else
6209                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6210                 fi
6211                 ;;
6212         (osf*|mls+*)
6213                 # tested with OSF/1 V3.2 and 'cc'
6214                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6215                 # link with shared libs).
6216                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6217                 case $host_os in
6218                 (osf4*)
6219                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6220                         ;;
6221                 esac
6222                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6223                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6224                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6226                 fi
6227                 cf_cv_rm_so_locs=yes
6228                 ;;
6229         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6230                 # tested with osr5.0.5
6231                 if test "$GCC" != yes; then
6232                         CC_SHARED_OPTS='-belf -KPIC'
6233                 fi
6234                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6235                 if test "$cf_cv_enable_rpath" = yes ; then
6236                         # only way is to set LD_RUN_PATH but no switch for it
6237                         RUN_PATH=$libdir
6238                 fi
6239                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6240                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6241                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6242                 ;;
6243         (sunos4*)
6244                 # tested with SunOS 4.1.1 and gcc 2.7.0
6245                 if test "$GCC" != yes; then
6246                         CC_SHARED_OPTS='-KPIC'
6247                 fi
6248                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6249                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6250                 ;;
6251         (solaris2*)
6252                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6253                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6254                 if test "$DFT_LWR_MODEL" = "shared" ; then
6255                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                 fi
6258                 if test "$cf_cv_enable_rpath" = yes ; then
6259                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6260                 fi
6261
6262         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6263         if test "$cf_cv_shlib_version" = rel; then
6264                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6265         else
6266                 cf_cv_shared_soname='`basename $@`'
6267         fi
6268
6269                 if test "$GCC" != yes; then
6270                         cf_save_CFLAGS="$CFLAGS"
6271                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6272                         do
6273                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6274                                 cat >conftest.$ac_ext <<_ACEOF
6275 #line 6275 "configure"
6276 #include "confdefs.h"
6277 #include <stdio.h>
6278 int
6279 main (void)
6280 {
6281 printf("Hello\n");
6282   ;
6283   return 0;
6284 }
6285 _ACEOF
6286 rm -f conftest.$ac_objext
6287 if { (eval echo "$as_me:6287: \"$ac_compile\"") >&5
6288   (eval $ac_compile) 2>&5
6289   ac_status=$?
6290   echo "$as_me:6290: \$? = $ac_status" >&5
6291   (exit $ac_status); } &&
6292          { ac_try='test -s conftest.$ac_objext'
6293   { (eval echo "$as_me:6293: \"$ac_try\"") >&5
6294   (eval $ac_try) 2>&5
6295   ac_status=$?
6296   echo "$as_me:6296: \$? = $ac_status" >&5
6297   (exit $ac_status); }; }; then
6298   break
6299 else
6300   echo "$as_me: failed program was:" >&5
6301 cat conftest.$ac_ext >&5
6302 fi
6303 rm -f conftest.$ac_objext conftest.$ac_ext
6304                         done
6305                         CFLAGS="$cf_save_CFLAGS"
6306                         CC_SHARED_OPTS=$cf_shared_opts
6307                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6308                 else
6309                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6310                 fi
6311                 ;;
6312         (sysv5uw7*|unix_sv*)
6313                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6314                 if test "$GCC" != yes; then
6315                         CC_SHARED_OPTS='-KPIC'
6316                 fi
6317                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6318                 ;;
6319         (*)
6320                 CC_SHARED_OPTS='unknown'
6321                 MK_SHARED_LIB='echo unknown'
6322                 ;;
6323         esac
6324
6325         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6326         case "$cf_cv_shlib_version" in
6327         (rel|abi)
6328                 case "$MK_SHARED_LIB" in
6329                 (*'-o $@')
6330                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6331                         ;;
6332                 (*)
6333                         { echo "$as_me:6333: WARNING: ignored --with-shlib-version" >&5
6334 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6335                         ;;
6336                 esac
6337                 ;;
6338         esac
6339
6340         if test -n "$cf_try_cflags"
6341         then
6342 cat > conftest.$ac_ext <<EOF
6343 #line 6343 "${as_me:-configure}"
6344 #include <stdio.h>
6345 int main(int argc, char *argv[])
6346 {
6347         printf("hello\n");
6348         return (argv[argc-1] == 0) ;
6349 }
6350 EOF
6351                 cf_save_CFLAGS="$CFLAGS"
6352                 for cf_opt in $cf_try_cflags
6353                 do
6354                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6355                         echo "$as_me:6355: checking if CFLAGS option -$cf_opt works" >&5
6356 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6357                         if { (eval echo "$as_me:6357: \"$ac_compile\"") >&5
6358   (eval $ac_compile) 2>&5
6359   ac_status=$?
6360   echo "$as_me:6360: \$? = $ac_status" >&5
6361   (exit $ac_status); }; then
6362                                 echo "$as_me:6362: result: yes" >&5
6363 echo "${ECHO_T}yes" >&6
6364                                 cf_save_CFLAGS="$CFLAGS"
6365                         else
6366                                 echo "$as_me:6366: result: no" >&5
6367 echo "${ECHO_T}no" >&6
6368                         fi
6369                 done
6370                 CFLAGS="$cf_save_CFLAGS"
6371         fi
6372
6373         # RPATH_LIST is a colon-separated list of directories
6374         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6375         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6376
6377         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6378
6379         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6380
6381 echo "${as_me:-configure}:6381: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6382
6383         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6384
6385 echo "${as_me:-configure}:6385: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6386
6387 for model in $cf_list_models; do
6388         case $model in
6389         (libtool)
6390
6391 echo "$as_me:6391: checking for additional libtool options" >&5
6392 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6393
6394 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6395 if test "${with_libtool_opts+set}" = set; then
6396   withval="$with_libtool_opts"
6397   with_libtool_opts=$withval
6398 else
6399   with_libtool_opts=no
6400 fi;
6401 echo "$as_me:6401: result: $with_libtool_opts" >&5
6402 echo "${ECHO_T}$with_libtool_opts" >&6
6403
6404 case .$with_libtool_opts in
6405 (.yes|.no|.)
6406         ;;
6407 (*)
6408         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6409         ;;
6410 esac
6411
6412 echo "$as_me:6412: checking if exported-symbols file should be used" >&5
6413 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6414
6415 # Check whether --with-export-syms or --without-export-syms was given.
6416 if test "${with_export_syms+set}" = set; then
6417   withval="$with_export_syms"
6418   with_export_syms=$withval
6419 else
6420   with_export_syms=no
6421 fi;
6422 if test "x$with_export_syms" = xyes
6423 then
6424         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6425
6426 fi
6427 echo "$as_me:6427: result: $with_export_syms" >&5
6428 echo "${ECHO_T}$with_export_syms" >&6
6429 if test "x$with_export_syms" != xno
6430 then
6431         EXPORT_SYMS="-export-symbols $with_export_syms"
6432
6433 fi
6434
6435                 ;;
6436         (shared)
6437                 if test "$CC_SHARED_OPTS" = "unknown"; then
6438                         { { echo "$as_me:6438: error: Shared libraries are not supported in this version" >&5
6439 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6440    { (exit 1); exit 1; }; }
6441                 fi
6442                 # workaround for inept transition to PIE vs PIC...
6443                 echo "$as_me:6443: checking if current CFLAGS link properly" >&5
6444 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6445                 cat >conftest.$ac_ext <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6448 #include <stdio.h>
6449 int
6450 main (void)
6451 {
6452 printf("Hello work\n");
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 rm -f conftest.$ac_objext conftest$ac_exeext
6458 if { (eval echo "$as_me:6458: \"$ac_link\"") >&5
6459   (eval $ac_link) 2>&5
6460   ac_status=$?
6461   echo "$as_me:6461: \$? = $ac_status" >&5
6462   (exit $ac_status); } &&
6463          { ac_try='test -s conftest$ac_exeext'
6464   { (eval echo "$as_me:6464: \"$ac_try\"") >&5
6465   (eval $ac_try) 2>&5
6466   ac_status=$?
6467   echo "$as_me:6467: \$? = $ac_status" >&5
6468   (exit $ac_status); }; }; then
6469   cf_cflags_work=yes
6470 else
6471   echo "$as_me: failed program was:" >&5
6472 cat conftest.$ac_ext >&5
6473 cf_cflags_work=no
6474 fi
6475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6476                 echo "$as_me:6476: result: $cf_cflags_work" >&5
6477 echo "${ECHO_T}$cf_cflags_work" >&6
6478                 if test "$cf_cflags_work" = no
6479                 then
6480                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6481
6482 echo "${as_me:-configure}:6482: testing try to work around by appending shared-options ..." 1>&5
6483
6484                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6485                 fi
6486
6487 echo "$as_me:6487: checking if versioned-symbols file should be used" >&5
6488 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6489
6490 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6491 if test "${with_versioned_syms+set}" = set; then
6492   withval="$with_versioned_syms"
6493   with_versioned_syms=$withval
6494 else
6495   with_versioned_syms=no
6496 fi;
6497 case "x$with_versioned_syms" in
6498 (xyes)
6499         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6500
6501         ;;
6502 (xno)
6503         ;;
6504 (x/*)
6505         test -f "$with_versioned_syms" || { { echo "$as_me:6505: error: expected a filename: $with_versioned_syms" >&5
6506 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6507    { (exit 1); exit 1; }; }
6508         ;;
6509 (*)
6510         test -f "$with_versioned_syms" || { { echo "$as_me:6510: error: expected a filename: $with_versioned_syms" >&5
6511 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6512    { (exit 1); exit 1; }; }
6513         with_versioned_syms=`pwd`/"$with_versioned_syms"
6514         ;;
6515 esac
6516 echo "$as_me:6516: result: $with_versioned_syms" >&5
6517 echo "${ECHO_T}$with_versioned_syms" >&6
6518
6519 RESULTING_SYMS=
6520 VERSIONED_SYMS=
6521 WILDCARD_SYMS=
6522
6523 if test "x$with_versioned_syms" != xno
6524 then
6525         RESULTING_SYMS=$with_versioned_syms
6526         case "x$MK_SHARED_LIB" in
6527         (*-Wl,*)
6528                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6529                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6530                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6531
6532 echo "${as_me:-configure}:6532: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6533
6534                 ;;
6535         (*-dy\ *)
6536                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6537                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6538                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6539
6540 echo "${as_me:-configure}:6540: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6541
6542                 ;;
6543         (*)
6544                 { echo "$as_me:6544: WARNING: this system does not support versioned-symbols" >&5
6545 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6546                 ;;
6547         esac
6548
6549         # Linux ld can selectively override scope, e.g., of symbols beginning with
6550         # "_" by first declaring some as global, and then using a wildcard to
6551         # declare the others as local.  Some other loaders cannot do this.  Check
6552         # by constructing a (very) simple shared library and inspecting its
6553         # symbols.
6554         if test "x$VERSIONED_SYMS" != "x"
6555         then
6556                 echo "$as_me:6556: checking if wildcards can be used to selectively omit symbols" >&5
6557 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6558                 WILDCARD_SYMS=no
6559
6560                 # make sources
6561                 rm -f conftest.*
6562
6563                 cat >conftest.ver <<EOF
6564 module_1.0 {
6565 global:
6566         globalf1;
6567 local:
6568         localf1;
6569 };
6570 module_2.0 {
6571 global:
6572         globalf2;
6573 local:
6574         localf2;
6575         _*;
6576 } module_1.0;
6577 submodule_1.0 {
6578 global:
6579         subglobalf1;
6580         _ismissing;
6581 local:
6582         sublocalf1;
6583 };
6584 submodule_2.0 {
6585 global:
6586         subglobalf2;
6587 local:
6588         sublocalf2;
6589         _*;
6590 } submodule_1.0;
6591 EOF
6592                 cat >conftest.$ac_ext <<EOF
6593 #line 6593 "configure"
6594 int     _ismissing(void) { return 1; }
6595 int     _localf1(void) { return 1; }
6596 int     _localf2(void) { return 2; }
6597 int     globalf1(void) { return 1; }
6598 int     globalf2(void) { return 2; }
6599 int     _sublocalf1(void) { return 1; }
6600 int     _sublocalf2(void) { return 2; }
6601 int     subglobalf1(void) { return 1; }
6602 int     subglobalf2(void) { return 2; }
6603 EOF
6604                 cat >conftest.mk <<EOF
6605 CC=${CC}
6606 CFLAGS=${CFLAGS}
6607 CPPFLAGS=${CPPFLAGS}
6608 LDFLAGS=${LDFLAGS}
6609 LIBS=${LIBS}
6610 VERSIONED_SYMS=${VERSIONED_SYMS}
6611 RESULTING_SYMS=conftest.ver
6612 MK_SHARED_LIB=${MK_SHARED_LIB}
6613 conftest.so: conftest.$ac_cv_objext
6614                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6615 EOF
6616
6617                 # compile source, make library
6618                 if make -f conftest.mk 2>&5 >/dev/null
6619                 then
6620                         # test for missing symbol in either Data or Text section
6621                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6622                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6623                 fi
6624                 echo "$as_me:6624: result: $WILDCARD_SYMS" >&5
6625 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6626                 rm -f conftest.*
6627         fi
6628 fi
6629
6630                 ;;
6631         esac
6632 done
6633
6634 ### Checks for special libraries, must be done up-front.
6635 SHLIB_LIST=""
6636
6637 echo "$as_me:6637: checking if you want to link with the GPM mouse library" >&5
6638 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6639
6640 # Check whether --with-gpm or --without-gpm was given.
6641 if test "${with_gpm+set}" = set; then
6642   withval="$with_gpm"
6643   with_gpm=$withval
6644 else
6645   with_gpm=maybe
6646 fi;
6647 echo "$as_me:6647: result: $with_gpm" >&5
6648 echo "${ECHO_T}$with_gpm" >&6
6649
6650 if test "$with_gpm" != no ; then
6651         echo "$as_me:6651: checking for gpm.h" >&5
6652 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6653 if test "${ac_cv_header_gpm_h+set}" = set; then
6654   echo $ECHO_N "(cached) $ECHO_C" >&6
6655 else
6656   cat >conftest.$ac_ext <<_ACEOF
6657 #line 6657 "configure"
6658 #include "confdefs.h"
6659 #include <gpm.h>
6660 _ACEOF
6661 if { (eval echo "$as_me:6661: \"$ac_cpp conftest.$ac_ext\"") >&5
6662   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6663   ac_status=$?
6664   egrep -v '^ *\+' conftest.er1 >conftest.err
6665   rm -f conftest.er1
6666   cat conftest.err >&5
6667   echo "$as_me:6667: \$? = $ac_status" >&5
6668   (exit $ac_status); } >/dev/null; then
6669   if test -s conftest.err; then
6670     ac_cpp_err=$ac_c_preproc_warn_flag
6671   else
6672     ac_cpp_err=
6673   fi
6674 else
6675   ac_cpp_err=yes
6676 fi
6677 if test -z "$ac_cpp_err"; then
6678   ac_cv_header_gpm_h=yes
6679 else
6680   echo "$as_me: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   ac_cv_header_gpm_h=no
6683 fi
6684 rm -f conftest.err conftest.$ac_ext
6685 fi
6686 echo "$as_me:6686: result: $ac_cv_header_gpm_h" >&5
6687 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6688 if test $ac_cv_header_gpm_h = yes; then
6689
6690 cat >>confdefs.h <<\EOF
6691 #define HAVE_GPM_H 1
6692 EOF
6693
6694                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6695                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6696
6697 echo "${as_me:-configure}:6697: testing assuming we really have GPM library ..." 1>&5
6698
6699 cat >>confdefs.h <<\EOF
6700 #define HAVE_LIBGPM 1
6701 EOF
6702
6703                         with_gpm=yes
6704                 else
6705                         echo "$as_me:6705: checking for Gpm_Open in -lgpm" >&5
6706 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6707 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6708   echo $ECHO_N "(cached) $ECHO_C" >&6
6709 else
6710   ac_check_lib_save_LIBS=$LIBS
6711 LIBS="-lgpm  $LIBS"
6712 cat >conftest.$ac_ext <<_ACEOF
6713 #line 6713 "configure"
6714 #include "confdefs.h"
6715
6716 /* Override any gcc2 internal prototype to avoid an error.  */
6717 #ifdef __cplusplus
6718 extern "C"
6719 #endif
6720 /* We use char because int might match the return type of a gcc2
6721    builtin and then its argument prototype would still apply.  */
6722 char Gpm_Open ();
6723 int
6724 main (void)
6725 {
6726 Gpm_Open ();
6727   ;
6728   return 0;
6729 }
6730 _ACEOF
6731 rm -f conftest.$ac_objext conftest$ac_exeext
6732 if { (eval echo "$as_me:6732: \"$ac_link\"") >&5
6733   (eval $ac_link) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); } &&
6737          { ac_try='test -s conftest$ac_exeext'
6738   { (eval echo "$as_me:6738: \"$ac_try\"") >&5
6739   (eval $ac_try) 2>&5
6740   ac_status=$?
6741   echo "$as_me:6741: \$? = $ac_status" >&5
6742   (exit $ac_status); }; }; then
6743   ac_cv_lib_gpm_Gpm_Open=yes
6744 else
6745   echo "$as_me: failed program was:" >&5
6746 cat conftest.$ac_ext >&5
6747 ac_cv_lib_gpm_Gpm_Open=no
6748 fi
6749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6750 LIBS=$ac_check_lib_save_LIBS
6751 fi
6752 echo "$as_me:6752: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6753 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6754 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6755   with_gpm=yes
6756 else
6757
6758                                 if test "$with_gpm" = maybe; then
6759                                         { echo "$as_me:6759: WARNING: Cannot link with GPM library" >&5
6760 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6761                                         with_gpm=no
6762                                 else
6763                                         { { echo "$as_me:6763: error: Cannot link with GPM library" >&5
6764 echo "$as_me: error: Cannot link with GPM library" >&2;}
6765    { (exit 1); exit 1; }; }
6766                                 fi
6767
6768 fi
6769
6770                 fi
6771
6772 else
6773
6774                 test "$with_gpm" != maybe && { echo "$as_me:6774: WARNING: Cannot find GPM header" >&5
6775 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6776                 with_gpm=no
6777
6778 fi
6779
6780 fi
6781
6782 if test "$with_gpm" != no ; then
6783         echo "$as_me:6783: checking if you want to load GPM dynamically" >&5
6784 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6785
6786 # Check whether --with-dlsym or --without-dlsym was given.
6787 if test "${with_dlsym+set}" = set; then
6788   withval="$with_dlsym"
6789   with_dlsym=$withval
6790 else
6791   with_dlsym=yes
6792 fi;
6793         echo "$as_me:6793: result: $with_dlsym" >&5
6794 echo "${ECHO_T}$with_dlsym" >&6
6795         if test "x$with_dlsym" = xyes ; then
6796
6797 cf_have_dlsym=no
6798 echo "$as_me:6798: checking for dlsym" >&5
6799 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6800 if test "${ac_cv_func_dlsym+set}" = set; then
6801   echo $ECHO_N "(cached) $ECHO_C" >&6
6802 else
6803   cat >conftest.$ac_ext <<_ACEOF
6804 #line 6804 "configure"
6805 #include "confdefs.h"
6806 #define dlsym autoconf_temporary
6807 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6808 #undef dlsym
6809
6810 #ifdef __cplusplus
6811 extern "C"
6812 #endif
6813
6814 /* We use char because int might match the return type of a gcc2
6815    builtin and then its argument prototype would still apply.  */
6816 char dlsym (void);
6817
6818 int
6819 main (void)
6820 {
6821
6822 /* The GNU C library defines stubs for functions which it implements
6823     to always fail with ENOSYS.  Some functions are actually named
6824     something starting with __ and the normal name is an alias.  */
6825 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6826 #error found stub for dlsym
6827 #endif
6828
6829         return dlsym ();
6830   ;
6831   return 0;
6832 }
6833 _ACEOF
6834 rm -f conftest.$ac_objext conftest$ac_exeext
6835 if { (eval echo "$as_me:6835: \"$ac_link\"") >&5
6836   (eval $ac_link) 2>&5
6837   ac_status=$?
6838   echo "$as_me:6838: \$? = $ac_status" >&5
6839   (exit $ac_status); } &&
6840          { ac_try='test -s conftest$ac_exeext'
6841   { (eval echo "$as_me:6841: \"$ac_try\"") >&5
6842   (eval $ac_try) 2>&5
6843   ac_status=$?
6844   echo "$as_me:6844: \$? = $ac_status" >&5
6845   (exit $ac_status); }; }; then
6846   ac_cv_func_dlsym=yes
6847 else
6848   echo "$as_me: failed program was:" >&5
6849 cat conftest.$ac_ext >&5
6850 ac_cv_func_dlsym=no
6851 fi
6852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6853 fi
6854 echo "$as_me:6854: result: $ac_cv_func_dlsym" >&5
6855 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6856 if test $ac_cv_func_dlsym = yes; then
6857   cf_have_dlsym=yes
6858 else
6859
6860 cf_have_libdl=no
6861 echo "$as_me:6861: checking for dlsym in -ldl" >&5
6862 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6863 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6864   echo $ECHO_N "(cached) $ECHO_C" >&6
6865 else
6866   ac_check_lib_save_LIBS=$LIBS
6867 LIBS="-ldl  $LIBS"
6868 cat >conftest.$ac_ext <<_ACEOF
6869 #line 6869 "configure"
6870 #include "confdefs.h"
6871
6872 /* Override any gcc2 internal prototype to avoid an error.  */
6873 #ifdef __cplusplus
6874 extern "C"
6875 #endif
6876 /* We use char because int might match the return type of a gcc2
6877    builtin and then its argument prototype would still apply.  */
6878 char dlsym ();
6879 int
6880 main (void)
6881 {
6882 dlsym ();
6883   ;
6884   return 0;
6885 }
6886 _ACEOF
6887 rm -f conftest.$ac_objext conftest$ac_exeext
6888 if { (eval echo "$as_me:6888: \"$ac_link\"") >&5
6889   (eval $ac_link) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); } &&
6893          { ac_try='test -s conftest$ac_exeext'
6894   { (eval echo "$as_me:6894: \"$ac_try\"") >&5
6895   (eval $ac_try) 2>&5
6896   ac_status=$?
6897   echo "$as_me:6897: \$? = $ac_status" >&5
6898   (exit $ac_status); }; }; then
6899   ac_cv_lib_dl_dlsym=yes
6900 else
6901   echo "$as_me: failed program was:" >&5
6902 cat conftest.$ac_ext >&5
6903 ac_cv_lib_dl_dlsym=no
6904 fi
6905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6906 LIBS=$ac_check_lib_save_LIBS
6907 fi
6908 echo "$as_me:6908: result: $ac_cv_lib_dl_dlsym" >&5
6909 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6910 if test $ac_cv_lib_dl_dlsym = yes; then
6911
6912         cf_have_dlsym=yes
6913         cf_have_libdl=yes
6914 fi
6915
6916 fi
6917
6918 if test "$cf_have_dlsym" = yes ; then
6919         test "$cf_have_libdl" = yes && {
6920 cf_add_libs="$LIBS"
6921 # reverse order
6922 cf_add_0lib=
6923 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6924 # filter duplicates
6925 for cf_add_1lib in $cf_add_0lib; do
6926         for cf_add_2lib in $cf_add_libs; do
6927                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6928                         cf_add_1lib=
6929                         break
6930                 fi
6931         done
6932         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6933 done
6934 LIBS="$cf_add_libs"
6935  }
6936
6937         echo "$as_me:6937: checking whether able to link to dl*() functions" >&5
6938 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6939         cat >conftest.$ac_ext <<_ACEOF
6940 #line 6940 "configure"
6941 #include "confdefs.h"
6942 #include <dlfcn.h>
6943 int
6944 main (void)
6945 {
6946
6947                 void *obj;
6948                 if ((obj = dlopen("filename", 0)) != 0) {
6949                         if (dlsym(obj, "symbolname") == 0) {
6950                         dlclose(obj);
6951                         }
6952                 }
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 rm -f conftest.$ac_objext conftest$ac_exeext
6958 if { (eval echo "$as_me:6958: \"$ac_link\"") >&5
6959   (eval $ac_link) 2>&5
6960   ac_status=$?
6961   echo "$as_me:6961: \$? = $ac_status" >&5
6962   (exit $ac_status); } &&
6963          { ac_try='test -s conftest$ac_exeext'
6964   { (eval echo "$as_me:6964: \"$ac_try\"") >&5
6965   (eval $ac_try) 2>&5
6966   ac_status=$?
6967   echo "$as_me:6967: \$? = $ac_status" >&5
6968   (exit $ac_status); }; }; then
6969
6970 cat >>confdefs.h <<\EOF
6971 #define HAVE_LIBDL 1
6972 EOF
6973
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977
6978                 { { echo "$as_me:6978: error: Cannot link test program for libdl" >&5
6979 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6980    { (exit 1); exit 1; }; }
6981 fi
6982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6983         echo "$as_me:6983: result: ok" >&5
6984 echo "${ECHO_T}ok" >&6
6985 else
6986         { { echo "$as_me:6986: error: Cannot find dlsym function" >&5
6987 echo "$as_me: error: Cannot find dlsym function" >&2;}
6988    { (exit 1); exit 1; }; }
6989 fi
6990
6991                 if test "x$with_gpm" != xyes ; then
6992                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6993
6994 echo "${as_me:-configure}:6994: testing assuming soname for gpm is $with_gpm ..." 1>&5
6995
6996                         cf_cv_gpm_soname="$with_gpm"
6997                 else
6998
6999 echo "$as_me:6999: checking for soname of gpm library" >&5
7000 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7001 if test "${cf_cv_gpm_soname+set}" = set; then
7002   echo $ECHO_N "(cached) $ECHO_C" >&6
7003 else
7004
7005 cf_cv_gpm_soname=unknown
7006 if test "$cross_compiling" != yes ; then
7007 cat >conftest.$ac_ext <<CF_EOF
7008 #include <gpm.h>
7009 int main(void)
7010 {
7011 if (Gpm_Open(0,0)) Gpm_Close();
7012         ${cf_cv_main_return:-return}(0);
7013 }
7014 CF_EOF
7015 cf_save_LIBS="$LIBS"
7016
7017 cf_add_libs="$LIBS"
7018 # reverse order
7019 cf_add_0lib=
7020 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7021 # filter duplicates
7022 for cf_add_1lib in $cf_add_0lib; do
7023         for cf_add_2lib in $cf_add_libs; do
7024                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7025                         cf_add_1lib=
7026                         break
7027                 fi
7028         done
7029         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7030 done
7031 LIBS="$cf_add_libs"
7032
7033         if { (eval echo "$as_me:7033: \"$ac_compile\"") >&5
7034   (eval $ac_compile) 2>&5
7035   ac_status=$?
7036   echo "$as_me:7036: \$? = $ac_status" >&5
7037   (exit $ac_status); } ; then
7038                 if { (eval echo "$as_me:7038: \"$ac_link\"") >&5
7039   (eval $ac_link) 2>&5
7040   ac_status=$?
7041   echo "$as_me:7041: \$? = $ac_status" >&5
7042   (exit $ac_status); } ; then
7043                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7044                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7045                 fi
7046         fi
7047 rm -rf conftest*
7048 LIBS="$cf_save_LIBS"
7049 fi
7050
7051 fi
7052 echo "$as_me:7052: result: $cf_cv_gpm_soname" >&5
7053 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7054
7055                 fi
7056                 test "$cf_cv_gpm_soname" != "unknown" &&
7057 cat >>confdefs.h <<EOF
7058 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7059 EOF
7060
7061                 SHLIB_LIST="-ldl $SHLIB_LIST"
7062
7063 cf_add_libs="$PRIVATE_LIBS"
7064 # reverse order
7065 cf_add_0lib=
7066 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7067 # filter duplicates
7068 for cf_add_1lib in $cf_add_0lib; do
7069         for cf_add_2lib in $cf_add_libs; do
7070                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7071                         cf_add_1lib=
7072                         break
7073                 fi
7074         done
7075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7076 done
7077 PRIVATE_LIBS="$cf_add_libs"
7078
7079         else
7080                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7081
7082 cf_add_libs="$TEST_LIBS"
7083 # reverse order
7084 cf_add_0lib=
7085 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7086 # filter duplicates
7087 for cf_add_1lib in $cf_add_0lib; do
7088         for cf_add_2lib in $cf_add_libs; do
7089                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7090                         cf_add_1lib=
7091                         break
7092                 fi
7093         done
7094         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7095 done
7096 TEST_LIBS="$cf_add_libs"
7097
7098 cf_add_libs="$PRIVATE_LIBS"
7099 # reverse order
7100 cf_add_0lib=
7101 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7102 # filter duplicates
7103 for cf_add_1lib in $cf_add_0lib; do
7104         for cf_add_2lib in $cf_add_libs; do
7105                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7106                         cf_add_1lib=
7107                         break
7108                 fi
7109         done
7110         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7111 done
7112 PRIVATE_LIBS="$cf_add_libs"
7113
7114         fi
7115
7116 cat >>confdefs.h <<\EOF
7117 #define HAVE_LIBGPM 1
7118 EOF
7119
7120 echo "$as_me:7120: checking for Gpm_Wgetch in -lgpm" >&5
7121 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7122 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7123   echo $ECHO_N "(cached) $ECHO_C" >&6
7124 else
7125   ac_check_lib_save_LIBS=$LIBS
7126 LIBS="-lgpm  $LIBS"
7127 cat >conftest.$ac_ext <<_ACEOF
7128 #line 7128 "configure"
7129 #include "confdefs.h"
7130
7131 /* Override any gcc2 internal prototype to avoid an error.  */
7132 #ifdef __cplusplus
7133 extern "C"
7134 #endif
7135 /* We use char because int might match the return type of a gcc2
7136    builtin and then its argument prototype would still apply.  */
7137 char Gpm_Wgetch ();
7138 int
7139 main (void)
7140 {
7141 Gpm_Wgetch ();
7142   ;
7143   return 0;
7144 }
7145 _ACEOF
7146 rm -f conftest.$ac_objext conftest$ac_exeext
7147 if { (eval echo "$as_me:7147: \"$ac_link\"") >&5
7148   (eval $ac_link) 2>&5
7149   ac_status=$?
7150   echo "$as_me:7150: \$? = $ac_status" >&5
7151   (exit $ac_status); } &&
7152          { ac_try='test -s conftest$ac_exeext'
7153   { (eval echo "$as_me:7153: \"$ac_try\"") >&5
7154   (eval $ac_try) 2>&5
7155   ac_status=$?
7156   echo "$as_me:7156: \$? = $ac_status" >&5
7157   (exit $ac_status); }; }; then
7158   ac_cv_lib_gpm_Gpm_Wgetch=yes
7159 else
7160   echo "$as_me: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7162 ac_cv_lib_gpm_Gpm_Wgetch=no
7163 fi
7164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7165 LIBS=$ac_check_lib_save_LIBS
7166 fi
7167 echo "$as_me:7167: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7168 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7169 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7170
7171 echo "$as_me:7171: checking if GPM is weakly bound to curses library" >&5
7172 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7173 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7174   echo $ECHO_N "(cached) $ECHO_C" >&6
7175 else
7176
7177 cf_cv_check_gpm_wgetch=unknown
7178 if test "$cross_compiling" != yes ; then
7179
7180 cat >conftest.$ac_ext <<CF_EOF
7181 #include <gpm.h>
7182 int main(void)
7183 {
7184         Gpm_Wgetch();
7185         ${cf_cv_main_return:-return}(0);
7186 }
7187 CF_EOF
7188
7189         cf_save_LIBS="$LIBS"
7190         # This only works if we can look at the symbol table.  If a shared
7191         # library is stripped for install, we cannot use that.  So we're forced
7192         # to rely on the static library, noting that some packagers may not
7193         # include it.
7194         LIBS="-static -lgpm -dynamic $LIBS"
7195         if { (eval echo "$as_me:7195: \"$ac_compile\"") >&5
7196   (eval $ac_compile) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit $ac_status); } ; then
7200                 if { (eval echo "$as_me:7200: \"$ac_link\"") >&5
7201   (eval $ac_link) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); } ; then
7205                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7206                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7207                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7208                 fi
7209         fi
7210         rm -rf conftest*
7211         LIBS="$cf_save_LIBS"
7212 fi
7213
7214 fi
7215 echo "$as_me:7215: result: $cf_cv_check_gpm_wgetch" >&5
7216 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7217
7218 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7219         { echo "$as_me:7219: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7220 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7221 fi
7222
7223 fi
7224
7225 fi
7226
7227 echo "$as_me:7227: checking if you want to use PCRE2 for regular-expressions" >&5
7228 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7229
7230 # Check whether --with-pcre2 or --without-pcre2 was given.
7231 if test "${with_pcre2+set}" = set; then
7232   withval="$with_pcre2"
7233
7234 fi;
7235 test -z "$with_pcre2" && with_pcre2=no
7236 echo "$as_me:7236: result: $with_pcre2" >&5
7237 echo "${ECHO_T}$with_pcre2" >&6
7238
7239 if test "x$with_pcre2" != xno ; then
7240
7241 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7242         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7243
7244 echo "${as_me:-configure}:7244: testing found package libpcre2 ..." 1>&5
7245
7246         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7247         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7248         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7249
7250 echo "${as_me:-configure}:7250: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7251
7252         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7253
7254 echo "${as_me:-configure}:7254: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7255
7256 cf_fix_cppflags=no
7257 cf_new_cflags=
7258 cf_new_cppflags=
7259 cf_new_extra_cppflags=
7260
7261 for cf_add_cflags in $cf_pkgconfig_incs
7262 do
7263 case $cf_fix_cppflags in
7264 (no)
7265         case $cf_add_cflags in
7266         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7267                 case $cf_add_cflags in
7268                 (-D*)
7269                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7270
7271                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7272                                 && test -z "${cf_tst_cflags}" \
7273                                 && cf_fix_cppflags=yes
7274
7275                         if test $cf_fix_cppflags = yes ; then
7276
7277         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7278         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7279
7280                                 continue
7281                         elif test "${cf_tst_cflags}" = "\"'" ; then
7282
7283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7285
7286                                 continue
7287                         fi
7288                         ;;
7289                 esac
7290                 case "$CPPFLAGS" in
7291                 (*$cf_add_cflags)
7292                         ;;
7293                 (*)
7294                         case $cf_add_cflags in
7295                         (-D*)
7296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7297
7298 CPPFLAGS=`echo "$CPPFLAGS" | \
7299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7301
7302                                 ;;
7303                         esac
7304
7305         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7306         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7307
7308                         ;;
7309                 esac
7310                 ;;
7311         (*)
7312
7313         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7314         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7315
7316                 ;;
7317         esac
7318         ;;
7319 (yes)
7320
7321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7323
7324         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7325
7326         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7327                 && test -z "${cf_tst_cflags}" \
7328                 && cf_fix_cppflags=no
7329         ;;
7330 esac
7331 done
7332
7333 if test -n "$cf_new_cflags" ; then
7334
7335         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7336         CFLAGS="${CFLAGS}$cf_new_cflags"
7337
7338 fi
7339
7340 if test -n "$cf_new_cppflags" ; then
7341
7342         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7343         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7344
7345 fi
7346
7347 if test -n "$cf_new_extra_cppflags" ; then
7348
7349         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7350         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7351
7352 fi
7353
7354 cf_add_libs="$LIBS"
7355 # reverse order
7356 cf_add_0lib=
7357 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7358 # filter duplicates
7359 for cf_add_1lib in $cf_add_0lib; do
7360         for cf_add_2lib in $cf_add_libs; do
7361                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7362                         cf_add_1lib=
7363                         break
7364                 fi
7365         done
7366         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7367 done
7368 LIBS="$cf_add_libs"
7369
7370         :
7371 else
7372         cf_pkgconfig_incs=
7373         cf_pkgconfig_libs=
7374
7375 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7376         test -n "$verbose" && echo "    found package libpcre" 1>&6
7377
7378 echo "${as_me:-configure}:7378: testing found package libpcre ..." 1>&5
7379
7380         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7381         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7382         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7383
7384 echo "${as_me:-configure}:7384: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7385
7386         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7387
7388 echo "${as_me:-configure}:7388: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7389
7390 cf_fix_cppflags=no
7391 cf_new_cflags=
7392 cf_new_cppflags=
7393 cf_new_extra_cppflags=
7394
7395 for cf_add_cflags in $cf_pkgconfig_incs
7396 do
7397 case $cf_fix_cppflags in
7398 (no)
7399         case $cf_add_cflags in
7400         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7401                 case $cf_add_cflags in
7402                 (-D*)
7403                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7404
7405                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7406                                 && test -z "${cf_tst_cflags}" \
7407                                 && cf_fix_cppflags=yes
7408
7409                         if test $cf_fix_cppflags = yes ; then
7410
7411         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7412         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7413
7414                                 continue
7415                         elif test "${cf_tst_cflags}" = "\"'" ; then
7416
7417         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7418         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7419
7420                                 continue
7421                         fi
7422                         ;;
7423                 esac
7424                 case "$CPPFLAGS" in
7425                 (*$cf_add_cflags)
7426                         ;;
7427                 (*)
7428                         case $cf_add_cflags in
7429                         (-D*)
7430                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7431
7432 CPPFLAGS=`echo "$CPPFLAGS" | \
7433         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7434                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7435
7436                                 ;;
7437                         esac
7438
7439         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7440         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7441
7442                         ;;
7443                 esac
7444                 ;;
7445         (*)
7446
7447         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7448         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7449
7450                 ;;
7451         esac
7452         ;;
7453 (yes)
7454
7455         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7456         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7457
7458         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7459
7460         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7461                 && test -z "${cf_tst_cflags}" \
7462                 && cf_fix_cppflags=no
7463         ;;
7464 esac
7465 done
7466
7467 if test -n "$cf_new_cflags" ; then
7468
7469         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7470         CFLAGS="${CFLAGS}$cf_new_cflags"
7471
7472 fi
7473
7474 if test -n "$cf_new_cppflags" ; then
7475
7476         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7477         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7478
7479 fi
7480
7481 if test -n "$cf_new_extra_cppflags" ; then
7482
7483         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7484         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7485
7486 fi
7487
7488 cf_add_libs="$LIBS"
7489 # reverse order
7490 cf_add_0lib=
7491 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7492 # filter duplicates
7493 for cf_add_1lib in $cf_add_0lib; do
7494         for cf_add_2lib in $cf_add_libs; do
7495                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7496                         cf_add_1lib=
7497                         break
7498                 fi
7499         done
7500         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7501 done
7502 LIBS="$cf_add_libs"
7503
7504         :
7505 else
7506         cf_pkgconfig_incs=
7507         cf_pkgconfig_libs=
7508
7509                         { { echo "$as_me:7509: error: Cannot find PCRE2 library" >&5
7510 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7511    { (exit 1); exit 1; }; }
7512 fi
7513
7514 fi
7515
7516 cat >>confdefs.h <<\EOF
7517 #define HAVE_LIB_PCRE2 1
7518 EOF
7519
7520         # if pkgconfig gave no results, look for the libraries directly
7521         case $LIBS in
7522         (*pcre2-posix*|*pcreposix*)
7523                 ;;
7524         (*)
7525                 echo "$as_me:7525: checking for regcomp in -lpcre2-posix" >&5
7526 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7527 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7528   echo $ECHO_N "(cached) $ECHO_C" >&6
7529 else
7530   ac_check_lib_save_LIBS=$LIBS
7531 LIBS="-lpcre2-posix  $LIBS"
7532 cat >conftest.$ac_ext <<_ACEOF
7533 #line 7533 "configure"
7534 #include "confdefs.h"
7535
7536 /* Override any gcc2 internal prototype to avoid an error.  */
7537 #ifdef __cplusplus
7538 extern "C"
7539 #endif
7540 /* We use char because int might match the return type of a gcc2
7541    builtin and then its argument prototype would still apply.  */
7542 char regcomp ();
7543 int
7544 main (void)
7545 {
7546 regcomp ();
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 rm -f conftest.$ac_objext conftest$ac_exeext
7552 if { (eval echo "$as_me:7552: \"$ac_link\"") >&5
7553   (eval $ac_link) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); } &&
7557          { ac_try='test -s conftest$ac_exeext'
7558   { (eval echo "$as_me:7558: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:7561: \$? = $ac_status" >&5
7562   (exit $ac_status); }; }; then
7563   ac_cv_lib_pcre2_posix_regcomp=yes
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 ac_cv_lib_pcre2_posix_regcomp=no
7568 fi
7569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7570 LIBS=$ac_check_lib_save_LIBS
7571 fi
7572 echo "$as_me:7572: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7573 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7574 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7575
7576 cf_add_libs="$LIBS"
7577 # reverse order
7578 cf_add_0lib=
7579 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7580 # filter duplicates
7581 for cf_add_1lib in $cf_add_0lib; do
7582         for cf_add_2lib in $cf_add_libs; do
7583                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7584                         cf_add_1lib=
7585                         break
7586                 fi
7587         done
7588         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7589 done
7590 LIBS="$cf_add_libs"
7591
7592 else
7593   echo "$as_me:7593: checking for regcomp in -lpcreposix" >&5
7594 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7595 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7596   echo $ECHO_N "(cached) $ECHO_C" >&6
7597 else
7598   ac_check_lib_save_LIBS=$LIBS
7599 LIBS="-lpcreposix  $LIBS"
7600 cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603
7604 /* Override any gcc2 internal prototype to avoid an error.  */
7605 #ifdef __cplusplus
7606 extern "C"
7607 #endif
7608 /* We use char because int might match the return type of a gcc2
7609    builtin and then its argument prototype would still apply.  */
7610 char regcomp ();
7611 int
7612 main (void)
7613 {
7614 regcomp ();
7615   ;
7616   return 0;
7617 }
7618 _ACEOF
7619 rm -f conftest.$ac_objext conftest$ac_exeext
7620 if { (eval echo "$as_me:7620: \"$ac_link\"") >&5
7621   (eval $ac_link) 2>&5
7622   ac_status=$?
7623   echo "$as_me:7623: \$? = $ac_status" >&5
7624   (exit $ac_status); } &&
7625          { ac_try='test -s conftest$ac_exeext'
7626   { (eval echo "$as_me:7626: \"$ac_try\"") >&5
7627   (eval $ac_try) 2>&5
7628   ac_status=$?
7629   echo "$as_me:7629: \$? = $ac_status" >&5
7630   (exit $ac_status); }; }; then
7631   ac_cv_lib_pcreposix_regcomp=yes
7632 else
7633   echo "$as_me: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635 ac_cv_lib_pcreposix_regcomp=no
7636 fi
7637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7638 LIBS=$ac_check_lib_save_LIBS
7639 fi
7640 echo "$as_me:7640: result: $ac_cv_lib_pcreposix_regcomp" >&5
7641 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7642 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7643
7644 cf_add_libs="$LIBS"
7645 # reverse order
7646 cf_add_0lib=
7647 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7648 # filter duplicates
7649 for cf_add_1lib in $cf_add_0lib; do
7650         for cf_add_2lib in $cf_add_libs; do
7651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7652                         cf_add_1lib=
7653                         break
7654                 fi
7655         done
7656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7657 done
7658 LIBS="$cf_add_libs"
7659
7660 else
7661   { { echo "$as_me:7661: error: Cannot find PCRE2 POSIX library" >&5
7662 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7663    { (exit 1); exit 1; }; }
7664 fi
7665
7666 fi
7667
7668                 ;;
7669         esac
7670
7671         # either way, check for the library header files
7672
7673 for ac_header in pcre2posix.h pcreposix.h
7674 do
7675 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7676 echo "$as_me:7676: checking for $ac_header" >&5
7677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7679   echo $ECHO_N "(cached) $ECHO_C" >&6
7680 else
7681   cat >conftest.$ac_ext <<_ACEOF
7682 #line 7682 "configure"
7683 #include "confdefs.h"
7684 #include <$ac_header>
7685 _ACEOF
7686 if { (eval echo "$as_me:7686: \"$ac_cpp conftest.$ac_ext\"") >&5
7687   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7688   ac_status=$?
7689   egrep -v '^ *\+' conftest.er1 >conftest.err
7690   rm -f conftest.er1
7691   cat conftest.err >&5
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit $ac_status); } >/dev/null; then
7694   if test -s conftest.err; then
7695     ac_cpp_err=$ac_c_preproc_warn_flag
7696   else
7697     ac_cpp_err=
7698   fi
7699 else
7700   ac_cpp_err=yes
7701 fi
7702 if test -z "$ac_cpp_err"; then
7703   eval "$as_ac_Header=yes"
7704 else
7705   echo "$as_me: failed program was:" >&5
7706   cat conftest.$ac_ext >&5
7707   eval "$as_ac_Header=no"
7708 fi
7709 rm -f conftest.err conftest.$ac_ext
7710 fi
7711 echo "$as_me:7711: result: `eval echo '${'$as_ac_Header'}'`" >&5
7712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7713 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7714   cat >>confdefs.h <<EOF
7715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7716 EOF
7717
7718 fi
7719 done
7720
7721 fi
7722
7723 # not everyone has "test -c"
7724 if test -c /dev/sysmouse 2>/dev/null ; then
7725 echo "$as_me:7725: checking if you want to use sysmouse" >&5
7726 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7727
7728 # Check whether --with-sysmouse or --without-sysmouse was given.
7729 if test "${with_sysmouse+set}" = set; then
7730   withval="$with_sysmouse"
7731   cf_with_sysmouse=$withval
7732 else
7733   cf_with_sysmouse=maybe
7734 fi;
7735         if test "$cf_with_sysmouse" != no ; then
7736         cat >conftest.$ac_ext <<_ACEOF
7737 #line 7737 "configure"
7738 #include "confdefs.h"
7739
7740 #include <osreldate.h>
7741 #if (__FreeBSD_version >= 400017)
7742 #include <sys/consio.h>
7743 #include <sys/fbio.h>
7744 #else
7745 #include <machine/console.h>
7746 #endif
7747
7748 int
7749 main (void)
7750 {
7751
7752         struct mouse_info the_mouse;
7753         ioctl(0, CONS_MOUSECTL, &the_mouse);
7754
7755   ;
7756   return 0;
7757 }
7758 _ACEOF
7759 rm -f conftest.$ac_objext
7760 if { (eval echo "$as_me:7760: \"$ac_compile\"") >&5
7761   (eval $ac_compile) 2>&5
7762   ac_status=$?
7763   echo "$as_me:7763: \$? = $ac_status" >&5
7764   (exit $ac_status); } &&
7765          { ac_try='test -s conftest.$ac_objext'
7766   { (eval echo "$as_me:7766: \"$ac_try\"") >&5
7767   (eval $ac_try) 2>&5
7768   ac_status=$?
7769   echo "$as_me:7769: \$? = $ac_status" >&5
7770   (exit $ac_status); }; }; then
7771   cf_with_sysmouse=yes
7772 else
7773   echo "$as_me: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 cf_with_sysmouse=no
7776 fi
7777 rm -f conftest.$ac_objext conftest.$ac_ext
7778         fi
7779 echo "$as_me:7779: result: $cf_with_sysmouse" >&5
7780 echo "${ECHO_T}$cf_with_sysmouse" >&6
7781 test "$cf_with_sysmouse" = yes &&
7782 cat >>confdefs.h <<\EOF
7783 #define USE_SYSMOUSE 1
7784 EOF
7785
7786 fi
7787
7788 # pretend that ncurses==ncursesw==ncursest
7789 echo "$as_me:7789: checking if you want to disable library suffixes" >&5
7790 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7791
7792 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7793 if test "${enable_lib_suffixes+set}" = set; then
7794   enableval="$enable_lib_suffixes"
7795   test "$enableval" != no && enableval=yes
7796         if test "$enableval" != "yes" ; then
7797     disable_lib_suffixes=yes
7798         else
7799                 disable_lib_suffixes=no
7800         fi
7801 else
7802   enableval=yes
7803         disable_lib_suffixes=no
7804
7805 fi;
7806 echo "$as_me:7806: result: $disable_lib_suffixes" >&5
7807 echo "${ECHO_T}$disable_lib_suffixes" >&6
7808
7809 ### If we're building with rpath, try to link non-standard libs that way too.
7810 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7811
7812 echo "$as_me:7812: checking if rpath-hack should be disabled" >&5
7813 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7814
7815 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7816 if test "${enable_rpath_hack+set}" = set; then
7817   enableval="$enable_rpath_hack"
7818   test "$enableval" != no && enableval=yes
7819         if test "$enableval" != "yes" ; then
7820     cf_disable_rpath_hack=yes
7821         else
7822                 cf_disable_rpath_hack=no
7823         fi
7824 else
7825   enableval=yes
7826         cf_disable_rpath_hack=no
7827
7828 fi;
7829 echo "$as_me:7829: result: $cf_disable_rpath_hack" >&5
7830 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7831 if test "$cf_disable_rpath_hack" = no ; then
7832
7833 echo "$as_me:7833: checking for updated LDFLAGS" >&5
7834 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7835 if test -n "$LD_RPATH_OPT" ; then
7836         echo "$as_me:7836: result: maybe" >&5
7837 echo "${ECHO_T}maybe" >&6
7838
7839         for ac_prog in ldd
7840 do
7841   # Extract the first word of "$ac_prog", so it can be a program name with args.
7842 set dummy $ac_prog; ac_word=$2
7843 echo "$as_me:7843: checking for $ac_word" >&5
7844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7845 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7846   echo $ECHO_N "(cached) $ECHO_C" >&6
7847 else
7848   if test -n "$cf_ldd_prog"; then
7849   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7850 else
7851   ac_save_IFS=$IFS; IFS=$ac_path_separator
7852 ac_dummy="$PATH"
7853 for ac_dir in $ac_dummy; do
7854   IFS=$ac_save_IFS
7855   test -z "$ac_dir" && ac_dir=.
7856   $as_executable_p "$ac_dir/$ac_word" || continue
7857 ac_cv_prog_cf_ldd_prog="$ac_prog"
7858 echo "$as_me:7858: found $ac_dir/$ac_word" >&5
7859 break
7860 done
7861
7862 fi
7863 fi
7864 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7865 if test -n "$cf_ldd_prog"; then
7866   echo "$as_me:7866: result: $cf_ldd_prog" >&5
7867 echo "${ECHO_T}$cf_ldd_prog" >&6
7868 else
7869   echo "$as_me:7869: result: no" >&5
7870 echo "${ECHO_T}no" >&6
7871 fi
7872
7873   test -n "$cf_ldd_prog" && break
7874 done
7875 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7876
7877         cf_rpath_list="/usr/lib /lib"
7878         if test "$cf_ldd_prog" != no
7879         then
7880                 cf_rpath_oops=
7881
7882 cat >conftest.$ac_ext <<_ACEOF
7883 #line 7883 "configure"
7884 #include "confdefs.h"
7885 #include <stdio.h>
7886 int
7887 main (void)
7888 {
7889 printf("Hello");
7890   ;
7891   return 0;
7892 }
7893 _ACEOF
7894 rm -f conftest.$ac_objext conftest$ac_exeext
7895 if { (eval echo "$as_me:7895: \"$ac_link\"") >&5
7896   (eval $ac_link) 2>&5
7897   ac_status=$?
7898   echo "$as_me:7898: \$? = $ac_status" >&5
7899   (exit $ac_status); } &&
7900          { ac_try='test -s conftest$ac_exeext'
7901   { (eval echo "$as_me:7901: \"$ac_try\"") >&5
7902   (eval $ac_try) 2>&5
7903   ac_status=$?
7904   echo "$as_me:7904: \$? = $ac_status" >&5
7905   (exit $ac_status); }; }; then
7906   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7907                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7908 else
7909   echo "$as_me: failed program was:" >&5
7910 cat conftest.$ac_ext >&5
7911 fi
7912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7913
7914                 # If we passed the link-test, but get a "not found" on a given library,
7915                 # this could be due to inept reconfiguration of gcc to make it only
7916                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7917                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7918                 # /usr/local libraries.
7919                 if test -n "$cf_rpath_oops"
7920                 then
7921                         for cf_rpath_src in $cf_rpath_oops
7922                         do
7923                                 for cf_rpath_dir in \
7924                                         /usr/local \
7925                                         /usr/pkg \
7926                                         /opt/sfw
7927                                 do
7928                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7929                                         then
7930                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7931
7932 echo "${as_me:-configure}:7932: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7933
7934                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7935                                                 break
7936                                         fi
7937                                 done
7938                         done
7939                 fi
7940         fi
7941
7942         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7943
7944 echo "${as_me:-configure}:7944: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7945
7946 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7947
7948 echo "${as_me:-configure}:7948: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7949
7950 cf_rpath_dst=
7951 for cf_rpath_src in $LDFLAGS
7952 do
7953         case $cf_rpath_src in
7954         (-L*)
7955
7956                 # check if this refers to a directory which we will ignore
7957                 cf_rpath_skip=no
7958                 if test -n "$cf_rpath_list"
7959                 then
7960                         for cf_rpath_item in $cf_rpath_list
7961                         do
7962                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7963                                 then
7964                                         cf_rpath_skip=yes
7965                                         break
7966                                 fi
7967                         done
7968                 fi
7969
7970                 if test "$cf_rpath_skip" = no
7971                 then
7972                         # transform the option
7973                         if test "$LD_RPATH_OPT" = "-R " ; then
7974                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7975                         else
7976                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7977                         fi
7978
7979                         # if we have not already added this, add it now
7980                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7981                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7982                         then
7983                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7984
7985 echo "${as_me:-configure}:7985: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7986
7987                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7988                         fi
7989                 fi
7990                 ;;
7991         esac
7992         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7993 done
7994 LDFLAGS=$cf_rpath_dst
7995
7996 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7997
7998 echo "${as_me:-configure}:7998: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7999
8000 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8001
8002 echo "${as_me:-configure}:8002: testing ...checking LIBS $LIBS ..." 1>&5
8003
8004 cf_rpath_dst=
8005 for cf_rpath_src in $LIBS
8006 do
8007         case $cf_rpath_src in
8008         (-L*)
8009
8010                 # check if this refers to a directory which we will ignore
8011                 cf_rpath_skip=no
8012                 if test -n "$cf_rpath_list"
8013                 then
8014                         for cf_rpath_item in $cf_rpath_list
8015                         do
8016                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8017                                 then
8018                                         cf_rpath_skip=yes
8019                                         break
8020                                 fi
8021                         done
8022                 fi
8023
8024                 if test "$cf_rpath_skip" = no
8025                 then
8026                         # transform the option
8027                         if test "$LD_RPATH_OPT" = "-R " ; then
8028                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8029                         else
8030                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8031                         fi
8032
8033                         # if we have not already added this, add it now
8034                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8035                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8036                         then
8037                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8038
8039 echo "${as_me:-configure}:8039: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8040
8041                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8042                         fi
8043                 fi
8044                 ;;
8045         esac
8046         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8047 done
8048 LIBS=$cf_rpath_dst
8049
8050 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8051
8052 echo "${as_me:-configure}:8052: testing ...checked LIBS $LIBS ..." 1>&5
8053
8054         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8055
8056 echo "${as_me:-configure}:8056: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8057
8058 else
8059         echo "$as_me:8059: result: no" >&5
8060 echo "${ECHO_T}no" >&6
8061 fi
8062
8063 fi
8064
8065 fi
8066
8067 ### Depending on the system, someone may use rpath to build ncurses but not
8068 # want users of the package to rely upon that feature.  Give those people an
8069 # option to suppress that detail from EXTRA_LDFLAGS.
8070 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8071 if test -n "$EXTRA_PKG_LDFLAGS"
8072 then
8073         echo "$as_me:8073: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8074 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8075
8076 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8077 if test "${enable_pkg_ldflags+set}" = set; then
8078   enableval="$enable_pkg_ldflags"
8079   test "$enableval" != no && enableval=yes
8080         if test "$enableval" != "yes" ; then
8081     disable_pkg_ldflags=yes
8082         else
8083                 disable_pkg_ldflags=no
8084         fi
8085 else
8086   enableval=yes
8087         disable_pkg_ldflags=no
8088
8089 fi;
8090         echo "$as_me:8090: result: $disable_pkg_ldflags" >&5
8091 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8092         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8093 fi
8094
8095 ###############################################################################
8096
8097 ###     use option --with-extra-suffix to append suffix to headers and libraries
8098 echo "$as_me:8098: checking if you wish to append extra suffix to header/library paths" >&5
8099 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8100 EXTRA_SUFFIX=
8101
8102 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8103 if test "${with_extra_suffix+set}" = set; then
8104   withval="$with_extra_suffix"
8105   case x$withval in
8106         (no)
8107                 ;;
8108         (xyes|x)
8109                 EXTRA_SUFFIX=$cf_cv_abi_version
8110                 ;;
8111         (*)
8112                 EXTRA_SUFFIX=$withval
8113                 ;;
8114         esac
8115
8116 fi;
8117 echo "$as_me:8117: result: $EXTRA_SUFFIX" >&5
8118 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8119
8120 ###     use option --disable-overwrite to leave out the link to -lcurses
8121 echo "$as_me:8121: checking if you wish to install ncurses overwriting curses" >&5
8122 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8123
8124 # Check whether --enable-overwrite or --disable-overwrite was given.
8125 if test "${enable_overwrite+set}" = set; then
8126   enableval="$enable_overwrite"
8127   with_overwrite=$enableval
8128 else
8129   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8130 fi;
8131 echo "$as_me:8131: result: $with_overwrite" >&5
8132 echo "${ECHO_T}$with_overwrite" >&6
8133
8134 echo "$as_me:8134: checking if external terminfo-database is used" >&5
8135 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8136
8137 # Check whether --enable-database or --disable-database was given.
8138 if test "${enable_database+set}" = set; then
8139   enableval="$enable_database"
8140   use_database=$enableval
8141 else
8142   use_database=yes
8143 fi;
8144 echo "$as_me:8144: result: $use_database" >&5
8145 echo "${ECHO_T}$use_database" >&6
8146
8147 case $host_os in
8148 (os2*)
8149         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8150         ;;
8151 (*)
8152         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8153         ;;
8154 esac
8155
8156 NCURSES_USE_DATABASE=0
8157 if test "$use_database" != no ; then
8158         NCURSES_USE_DATABASE=1
8159
8160         echo "$as_me:8160: checking which terminfo source-file will be installed" >&5
8161 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8162
8163 # Check whether --with-database or --without-database was given.
8164 if test "${with_database+set}" = set; then
8165   withval="$with_database"
8166   TERMINFO_SRC=$withval
8167 fi;
8168         echo "$as_me:8168: result: $TERMINFO_SRC" >&5
8169 echo "${ECHO_T}$TERMINFO_SRC" >&6
8170
8171         echo "$as_me:8171: checking whether to use hashed database instead of directory/tree" >&5
8172 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8173
8174 # Check whether --with-hashed-db or --without-hashed-db was given.
8175 if test "${with_hashed_db+set}" = set; then
8176   withval="$with_hashed_db"
8177
8178 else
8179   with_hashed_db=no
8180 fi;
8181         echo "$as_me:8181: result: $with_hashed_db" >&5
8182 echo "${ECHO_T}$with_hashed_db" >&6
8183 else
8184         with_hashed_db=no
8185 fi
8186
8187 echo "$as_me:8187: checking for list of fallback descriptions" >&5
8188 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8189
8190 # Check whether --with-fallbacks or --without-fallbacks was given.
8191 if test "${with_fallbacks+set}" = set; then
8192   withval="$with_fallbacks"
8193   with_fallback=$withval
8194 else
8195   with_fallback=
8196 fi;
8197 echo "$as_me:8197: result: $with_fallback" >&5
8198 echo "${ECHO_T}$with_fallback" >&6
8199
8200 case ".$with_fallback" in
8201 (.|.no)
8202         FALLBACK_LIST=
8203         ;;
8204 (.yes)
8205         { echo "$as_me:8205: WARNING: expected a list of terminal descriptions" >&5
8206 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8207         ;;
8208 (*)
8209         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8210         ;;
8211 esac
8212
8213 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8214 # tree for generating the terminal descriptions that will be compiled into the
8215 # library.  If your toolchain is old, it may not handle current terminal
8216 # databases.  Use configure-options to point to the tools which will be used,
8217 # rather than the first ones found on the $PATH.
8218 if test -n "$ac_tool_prefix"; then
8219   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8220 set dummy ${ac_tool_prefix}tic; ac_word=$2
8221 echo "$as_me:8221: checking for $ac_word" >&5
8222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8223 if test "${ac_cv_prog_TIC+set}" = set; then
8224   echo $ECHO_N "(cached) $ECHO_C" >&6
8225 else
8226   if test -n "$TIC"; then
8227   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8228 else
8229   ac_save_IFS=$IFS; IFS=$ac_path_separator
8230 ac_dummy="$PATH"
8231 for ac_dir in $ac_dummy; do
8232   IFS=$ac_save_IFS
8233   test -z "$ac_dir" && ac_dir=.
8234   $as_executable_p "$ac_dir/$ac_word" || continue
8235 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8236 echo "$as_me:8236: found $ac_dir/$ac_word" >&5
8237 break
8238 done
8239
8240 fi
8241 fi
8242 TIC=$ac_cv_prog_TIC
8243 if test -n "$TIC"; then
8244   echo "$as_me:8244: result: $TIC" >&5
8245 echo "${ECHO_T}$TIC" >&6
8246 else
8247   echo "$as_me:8247: result: no" >&5
8248 echo "${ECHO_T}no" >&6
8249 fi
8250
8251 fi
8252 if test -z "$ac_cv_prog_TIC"; then
8253   ac_ct_TIC=$TIC
8254   # Extract the first word of "tic", so it can be a program name with args.
8255 set dummy tic; ac_word=$2
8256 echo "$as_me:8256: checking for $ac_word" >&5
8257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8258 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8259   echo $ECHO_N "(cached) $ECHO_C" >&6
8260 else
8261   if test -n "$ac_ct_TIC"; then
8262   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8263 else
8264   ac_save_IFS=$IFS; IFS=$ac_path_separator
8265 ac_dummy="$PATH"
8266 for ac_dir in $ac_dummy; do
8267   IFS=$ac_save_IFS
8268   test -z "$ac_dir" && ac_dir=.
8269   $as_executable_p "$ac_dir/$ac_word" || continue
8270 ac_cv_prog_ac_ct_TIC="tic"
8271 echo "$as_me:8271: found $ac_dir/$ac_word" >&5
8272 break
8273 done
8274
8275 fi
8276 fi
8277 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8278 if test -n "$ac_ct_TIC"; then
8279   echo "$as_me:8279: result: $ac_ct_TIC" >&5
8280 echo "${ECHO_T}$ac_ct_TIC" >&6
8281 else
8282   echo "$as_me:8282: result: no" >&5
8283 echo "${ECHO_T}no" >&6
8284 fi
8285
8286   TIC=$ac_ct_TIC
8287 else
8288   TIC="$ac_cv_prog_TIC"
8289 fi
8290
8291 if test -n "$ac_tool_prefix"; then
8292   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8293 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8294 echo "$as_me:8294: checking for $ac_word" >&5
8295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8296 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8297   echo $ECHO_N "(cached) $ECHO_C" >&6
8298 else
8299   if test -n "$INFOCMP"; then
8300   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8301 else
8302   ac_save_IFS=$IFS; IFS=$ac_path_separator
8303 ac_dummy="$PATH"
8304 for ac_dir in $ac_dummy; do
8305   IFS=$ac_save_IFS
8306   test -z "$ac_dir" && ac_dir=.
8307   $as_executable_p "$ac_dir/$ac_word" || continue
8308 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8309 echo "$as_me:8309: found $ac_dir/$ac_word" >&5
8310 break
8311 done
8312
8313 fi
8314 fi
8315 INFOCMP=$ac_cv_prog_INFOCMP
8316 if test -n "$INFOCMP"; then
8317   echo "$as_me:8317: result: $INFOCMP" >&5
8318 echo "${ECHO_T}$INFOCMP" >&6
8319 else
8320   echo "$as_me:8320: result: no" >&5
8321 echo "${ECHO_T}no" >&6
8322 fi
8323
8324 fi
8325 if test -z "$ac_cv_prog_INFOCMP"; then
8326   ac_ct_INFOCMP=$INFOCMP
8327   # Extract the first word of "infocmp", so it can be a program name with args.
8328 set dummy infocmp; ac_word=$2
8329 echo "$as_me:8329: checking for $ac_word" >&5
8330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8331 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8332   echo $ECHO_N "(cached) $ECHO_C" >&6
8333 else
8334   if test -n "$ac_ct_INFOCMP"; then
8335   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8336 else
8337   ac_save_IFS=$IFS; IFS=$ac_path_separator
8338 ac_dummy="$PATH"
8339 for ac_dir in $ac_dummy; do
8340   IFS=$ac_save_IFS
8341   test -z "$ac_dir" && ac_dir=.
8342   $as_executable_p "$ac_dir/$ac_word" || continue
8343 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8344 echo "$as_me:8344: found $ac_dir/$ac_word" >&5
8345 break
8346 done
8347
8348 fi
8349 fi
8350 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8351 if test -n "$ac_ct_INFOCMP"; then
8352   echo "$as_me:8352: result: $ac_ct_INFOCMP" >&5
8353 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8354 else
8355   echo "$as_me:8355: result: no" >&5
8356 echo "${ECHO_T}no" >&6
8357 fi
8358
8359   INFOCMP=$ac_ct_INFOCMP
8360 else
8361   INFOCMP="$ac_cv_prog_INFOCMP"
8362 fi
8363
8364 if test -n "$FALLBACK_LIST"
8365 then
8366
8367 # Check whether --with-tic-path or --without-tic-path was given.
8368 if test "${with_tic_path+set}" = set; then
8369   withval="$with_tic_path"
8370   echo "$as_me:8370: checking for tic program for fallbacks" >&5
8371 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8372                 TIC=$withval
8373                 echo "$as_me:8373: result: $TIC" >&5
8374 echo "${ECHO_T}$TIC" >&6
8375
8376 if test "x$prefix" != xNONE; then
8377         cf_path_syntax="$prefix"
8378 else
8379         cf_path_syntax="$ac_default_prefix"
8380 fi
8381
8382 case ".$TIC" in
8383 (.\$\(*\)*|.\'*\'*)
8384         ;;
8385 (..|./*|.\\*)
8386         ;;
8387 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8388         ;;
8389 (.\${*prefix}*|.\${*dir}*)
8390         eval TIC="$TIC"
8391         case ".$TIC" in
8392         (.NONE/*)
8393                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8394                 ;;
8395         esac
8396         ;;
8397 (.no|.NONE/*)
8398         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8399         ;;
8400 (*)
8401         { { echo "$as_me:8401: error: expected a pathname, not \"$TIC\"" >&5
8402 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8403    { (exit 1); exit 1; }; }
8404         ;;
8405 esac
8406
8407 else
8408
8409 test -z "$TIC" && TIC=tic
8410 for ac_prog in $TIC tic
8411 do
8412   # Extract the first word of "$ac_prog", so it can be a program name with args.
8413 set dummy $ac_prog; ac_word=$2
8414 echo "$as_me:8414: checking for $ac_word" >&5
8415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8416 if test "${ac_cv_path_TIC+set}" = set; then
8417   echo $ECHO_N "(cached) $ECHO_C" >&6
8418 else
8419   case $TIC in
8420   [\\/]* | ?:[\\/]*)
8421   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8422   ;;
8423   *)
8424   ac_save_IFS=$IFS; IFS=$ac_path_separator
8425 ac_dummy="$PATH:/usr/local/ncurses/bin"
8426 for ac_dir in $ac_dummy; do
8427   IFS=$ac_save_IFS
8428   test -z "$ac_dir" && ac_dir=.
8429   if $as_executable_p "$ac_dir/$ac_word"; then
8430    ac_cv_path_TIC="$ac_dir/$ac_word"
8431    echo "$as_me:8431: found $ac_dir/$ac_word" >&5
8432    break
8433 fi
8434 done
8435
8436   ;;
8437 esac
8438 fi
8439 TIC=$ac_cv_path_TIC
8440
8441 if test -n "$TIC"; then
8442   echo "$as_me:8442: result: $TIC" >&5
8443 echo "${ECHO_T}$TIC" >&6
8444 else
8445   echo "$as_me:8445: result: no" >&5
8446 echo "${ECHO_T}no" >&6
8447 fi
8448
8449   test -n "$TIC" && break
8450 done
8451 test -n "$TIC" || TIC="$TIC"
8452
8453 cf_path_prog=""
8454 cf_path_args=""
8455 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8456 for cf_temp in $ac_cv_path_TIC
8457 do
8458         if test -z "$cf_path_prog" ; then
8459                 if test "$with_full_paths" = yes ; then
8460
8461 if test "x$prefix" != xNONE; then
8462         cf_path_syntax="$prefix"
8463 else
8464         cf_path_syntax="$ac_default_prefix"
8465 fi
8466
8467 case ".$cf_temp" in
8468 (.\$\(*\)*|.\'*\'*)
8469         ;;
8470 (..|./*|.\\*)
8471         ;;
8472 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8473         ;;
8474 (.\${*prefix}*|.\${*dir}*)
8475         eval cf_temp="$cf_temp"
8476         case ".$cf_temp" in
8477         (.NONE/*)
8478                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8479                 ;;
8480         esac
8481         ;;
8482 (.no|.NONE/*)
8483         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8484         ;;
8485 (*)
8486         break
8487         ;;
8488 esac
8489
8490                         cf_path_prog="$cf_temp"
8491                 else
8492                         cf_path_prog="`basename $cf_temp`"
8493                 fi
8494         elif test -z "$cf_path_args" ; then
8495                 cf_path_args="$cf_temp"
8496         else
8497                 cf_path_args="$cf_path_args $cf_temp"
8498         fi
8499 done
8500 IFS="$cf_save_ifs"
8501
8502 if test -n "$cf_path_prog" ; then
8503
8504 echo "${as_me:-configure}:8504: testing defining path for ${cf_path_prog} ..." 1>&5
8505
8506 cat >>confdefs.h <<EOF
8507 #define TIC_PATH "$cf_path_prog"
8508 EOF
8509
8510         test -n "$cf_path_args" &&
8511 cat >>confdefs.h <<EOF
8512 #define TIC_ARGS "$cf_path_args"
8513 EOF
8514
8515 fi
8516
8517                 if test -z "$TIC"
8518                 then
8519                         { echo "$as_me:8519: WARNING: no tic program found for fallbacks" >&5
8520 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8521                 fi
8522
8523 fi;
8524
8525 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8526 if test "${with_infocmp_path+set}" = set; then
8527   withval="$with_infocmp_path"
8528   echo "$as_me:8528: checking for infocmp program for fallbacks" >&5
8529 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8530                 INFOCMP=$withval
8531                 echo "$as_me:8531: result: $INFOCMP" >&5
8532 echo "${ECHO_T}$INFOCMP" >&6
8533
8534 if test "x$prefix" != xNONE; then
8535         cf_path_syntax="$prefix"
8536 else
8537         cf_path_syntax="$ac_default_prefix"
8538 fi
8539
8540 case ".$INFOCMP" in
8541 (.\$\(*\)*|.\'*\'*)
8542         ;;
8543 (..|./*|.\\*)
8544         ;;
8545 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8546         ;;
8547 (.\${*prefix}*|.\${*dir}*)
8548         eval INFOCMP="$INFOCMP"
8549         case ".$INFOCMP" in
8550         (.NONE/*)
8551                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8552                 ;;
8553         esac
8554         ;;
8555 (.no|.NONE/*)
8556         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8557         ;;
8558 (*)
8559         { { echo "$as_me:8559: error: expected a pathname, not \"$INFOCMP\"" >&5
8560 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8561    { (exit 1); exit 1; }; }
8562         ;;
8563 esac
8564
8565 else
8566
8567 test -z "$INFOCMP" && INFOCMP=infocmp
8568 for ac_prog in $INFOCMP infocmp
8569 do
8570   # Extract the first word of "$ac_prog", so it can be a program name with args.
8571 set dummy $ac_prog; ac_word=$2
8572 echo "$as_me:8572: checking for $ac_word" >&5
8573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8574 if test "${ac_cv_path_INFOCMP+set}" = set; then
8575   echo $ECHO_N "(cached) $ECHO_C" >&6
8576 else
8577   case $INFOCMP in
8578   [\\/]* | ?:[\\/]*)
8579   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8580   ;;
8581   *)
8582   ac_save_IFS=$IFS; IFS=$ac_path_separator
8583 ac_dummy="$PATH:/usr/local/ncurses/bin"
8584 for ac_dir in $ac_dummy; do
8585   IFS=$ac_save_IFS
8586   test -z "$ac_dir" && ac_dir=.
8587   if $as_executable_p "$ac_dir/$ac_word"; then
8588    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8589    echo "$as_me:8589: found $ac_dir/$ac_word" >&5
8590    break
8591 fi
8592 done
8593
8594   ;;
8595 esac
8596 fi
8597 INFOCMP=$ac_cv_path_INFOCMP
8598
8599 if test -n "$INFOCMP"; then
8600   echo "$as_me:8600: result: $INFOCMP" >&5
8601 echo "${ECHO_T}$INFOCMP" >&6
8602 else
8603   echo "$as_me:8603: result: no" >&5
8604 echo "${ECHO_T}no" >&6
8605 fi
8606
8607   test -n "$INFOCMP" && break
8608 done
8609 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8610
8611 cf_path_prog=""
8612 cf_path_args=""
8613 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8614 for cf_temp in $ac_cv_path_INFOCMP
8615 do
8616         if test -z "$cf_path_prog" ; then
8617                 if test "$with_full_paths" = yes ; then
8618
8619 if test "x$prefix" != xNONE; then
8620         cf_path_syntax="$prefix"
8621 else
8622         cf_path_syntax="$ac_default_prefix"
8623 fi
8624
8625 case ".$cf_temp" in
8626 (.\$\(*\)*|.\'*\'*)
8627         ;;
8628 (..|./*|.\\*)
8629         ;;
8630 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8631         ;;
8632 (.\${*prefix}*|.\${*dir}*)
8633         eval cf_temp="$cf_temp"
8634         case ".$cf_temp" in
8635         (.NONE/*)
8636                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8637                 ;;
8638         esac
8639         ;;
8640 (.no|.NONE/*)
8641         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8642         ;;
8643 (*)
8644         break
8645         ;;
8646 esac
8647
8648                         cf_path_prog="$cf_temp"
8649                 else
8650                         cf_path_prog="`basename $cf_temp`"
8651                 fi
8652         elif test -z "$cf_path_args" ; then
8653                 cf_path_args="$cf_temp"
8654         else
8655                 cf_path_args="$cf_path_args $cf_temp"
8656         fi
8657 done
8658 IFS="$cf_save_ifs"
8659
8660 if test -n "$cf_path_prog" ; then
8661
8662 echo "${as_me:-configure}:8662: testing defining path for ${cf_path_prog} ..." 1>&5
8663
8664 cat >>confdefs.h <<EOF
8665 #define INFOCMP_PATH "$cf_path_prog"
8666 EOF
8667
8668         test -n "$cf_path_args" &&
8669 cat >>confdefs.h <<EOF
8670 #define INFOCMP_ARGS "$cf_path_args"
8671 EOF
8672
8673 fi
8674
8675                 if test -z "$INFOCMP"
8676                 then
8677                         { echo "$as_me:8677: WARNING: no infocmp program found for fallbacks" >&5
8678 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8679                 fi
8680
8681 fi;
8682
8683         test -z "$TIC" && FALLBACK_LIST=
8684         test -z "$INFOCMP" && FALLBACK_LIST=
8685         if test -z "$FALLBACK_LIST"
8686         then
8687                 { echo "$as_me:8687: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8688 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8689         fi
8690 fi
8691
8692 USE_FALLBACKS=
8693 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8694
8695 echo "$as_me:8695: checking if you want modern xterm or antique" >&5
8696 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8697
8698 # Check whether --with-xterm-new or --without-xterm-new was given.
8699 if test "${with_xterm_new+set}" = set; then
8700   withval="$with_xterm_new"
8701   with_xterm_new=$withval
8702 else
8703   with_xterm_new=yes
8704 fi;
8705 case $with_xterm_new in
8706 (no) with_xterm_new=xterm-old;;
8707 (*)      with_xterm_new=xterm-new;;
8708 esac
8709 echo "$as_me:8709: result: $with_xterm_new" >&5
8710 echo "${ECHO_T}$with_xterm_new" >&6
8711 WHICH_XTERM=$with_xterm_new
8712
8713 echo "$as_me:8713: checking if xterm backspace sends BS or DEL" >&5
8714 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8715
8716 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8717 if test "${with_xterm_kbs+set}" = set; then
8718   withval="$with_xterm_kbs"
8719   with_xterm_kbs=$withval
8720 else
8721   with_xterm_kbs=BS
8722 fi;
8723 case x$with_xterm_kbs in
8724 (xyes|xno|xBS|xbs|x8)
8725         with_xterm_kbs=BS
8726         ;;
8727 (xDEL|xdel|x127)
8728         with_xterm_kbs=DEL
8729         ;;
8730 (*)
8731         with_xterm_kbs=$withval
8732         ;;
8733 esac
8734 echo "$as_me:8734: result: $with_xterm_kbs" >&5
8735 echo "${ECHO_T}$with_xterm_kbs" >&6
8736 XTERM_KBS=$with_xterm_kbs
8737
8738 MAKE_TERMINFO=
8739 if test "$use_database" = no ; then
8740         TERMINFO="${datadir}/terminfo"
8741         MAKE_TERMINFO="#"
8742 else
8743
8744 echo "$as_me:8744: checking for list of terminfo directories" >&5
8745 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8746
8747 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8748 if test "${with_terminfo_dirs+set}" = set; then
8749   withval="$with_terminfo_dirs"
8750
8751 else
8752   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8753 fi;
8754 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8755 cf_dst_path=
8756 for cf_src_path in $withval
8757 do
8758
8759 if test "x$prefix" != xNONE; then
8760         cf_path_syntax="$prefix"
8761 else
8762         cf_path_syntax="$ac_default_prefix"
8763 fi
8764
8765 case ".$cf_src_path" in
8766 (.\$\(*\)*|.\'*\'*)
8767         ;;
8768 (..|./*|.\\*)
8769         ;;
8770 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8771         ;;
8772 (.\${*prefix}*|.\${*dir}*)
8773         eval cf_src_path="$cf_src_path"
8774         case ".$cf_src_path" in
8775         (.NONE/*)
8776                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8777                 ;;
8778         esac
8779         ;;
8780 (.no|.NONE/*)
8781         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8782         ;;
8783 (*)
8784         { { echo "$as_me:8784: error: expected a pathname, not \"$cf_src_path\"" >&5
8785 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8786    { (exit 1); exit 1; }; }
8787         ;;
8788 esac
8789
8790   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8791   cf_dst_path="${cf_dst_path}${cf_src_path}"
8792 done
8793 IFS="$ac_save_ifs"
8794
8795 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8796 # so we have to check/work around.  We do prefer the result of "eval"...
8797 eval cf_dst_eval="$cf_dst_path"
8798 case "x$cf_dst_eval" in
8799 (xNONE*)
8800         TERMINFO_DIRS=$cf_dst_path
8801         ;;
8802 (*)
8803         TERMINFO_DIRS="$cf_dst_eval"
8804         ;;
8805 esac
8806
8807 echo "$as_me:8807: result: $TERMINFO_DIRS" >&5
8808 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8809 test -n "$TERMINFO_DIRS" &&
8810 cat >>confdefs.h <<EOF
8811 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8812 EOF
8813
8814 case "x$TERMINFO" in
8815 x???:*)
8816         { echo "$as_me:8816: WARNING: ignoring non-directory/file TERMINFO value" >&5
8817 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8818         unset TERMINFO
8819         ;;
8820 esac
8821
8822 echo "$as_me:8822: checking for default terminfo directory" >&5
8823 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8824
8825 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8826 if test "${with_default_terminfo_dir+set}" = set; then
8827   withval="$with_default_terminfo_dir"
8828
8829 else
8830   withval="${TERMINFO:-${datadir}/terminfo}"
8831 fi; if test -n "${datadir}/terminfo" ; then
8832
8833 if test "x$prefix" != xNONE; then
8834         cf_path_syntax="$prefix"
8835 else
8836         cf_path_syntax="$ac_default_prefix"
8837 fi
8838
8839 case ".$withval" in
8840 (.\$\(*\)*|.\'*\'*)
8841         ;;
8842 (..|./*|.\\*)
8843         ;;
8844 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8845         ;;
8846 (.\${*prefix}*|.\${*dir}*)
8847         eval withval="$withval"
8848         case ".$withval" in
8849         (.NONE/*)
8850                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8851                 ;;
8852         esac
8853         ;;
8854 (.no|.NONE/*)
8855         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8856         ;;
8857 (*)
8858         { { echo "$as_me:8858: error: expected a pathname, not \"$withval\"" >&5
8859 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8860    { (exit 1); exit 1; }; }
8861         ;;
8862 esac
8863
8864 fi
8865 eval TERMINFO="$withval"
8866
8867 echo "$as_me:8867: result: $TERMINFO" >&5
8868 echo "${ECHO_T}$TERMINFO" >&6
8869
8870 cat >>confdefs.h <<EOF
8871 #define TERMINFO "$TERMINFO"
8872 EOF
8873
8874 fi
8875
8876 ###     use option --disable-big-core to make tic run on small machines
8877 ###     We need 4Mb, check if we can allocate 50% more than that.
8878 echo "$as_me:8878: checking if big-core option selected" >&5
8879 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8880
8881 # Check whether --enable-big-core or --disable-big-core was given.
8882 if test "${enable_big_core+set}" = set; then
8883   enableval="$enable_big_core"
8884   with_big_core=$enableval
8885 else
8886   if test "$cross_compiling" = yes; then
8887   with_big_core=no
8888 else
8889   cat >conftest.$ac_ext <<_ACEOF
8890 #line 8890 "configure"
8891 #include "confdefs.h"
8892
8893 #include <stdlib.h>
8894 #include <string.h>
8895 int main() {
8896         unsigned long n = 6000000L;
8897         char *s = malloc(n);
8898         if (s != 0)
8899                 s[0] = s[n-1] = 0;
8900         ${cf_cv_main_return:-return}(s == 0);
8901 }
8902 _ACEOF
8903 rm -f conftest$ac_exeext
8904 if { (eval echo "$as_me:8904: \"$ac_link\"") >&5
8905   (eval $ac_link) 2>&5
8906   ac_status=$?
8907   echo "$as_me:8907: \$? = $ac_status" >&5
8908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8909   { (eval echo "$as_me:8909: \"$ac_try\"") >&5
8910   (eval $ac_try) 2>&5
8911   ac_status=$?
8912   echo "$as_me:8912: \$? = $ac_status" >&5
8913   (exit $ac_status); }; }; then
8914   with_big_core=yes
8915 else
8916   echo "$as_me: program exited with status $ac_status" >&5
8917 echo "$as_me: failed program was:" >&5
8918 cat conftest.$ac_ext >&5
8919 with_big_core=no
8920 fi
8921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8922 fi
8923 fi;
8924 echo "$as_me:8924: result: $with_big_core" >&5
8925 echo "${ECHO_T}$with_big_core" >&6
8926 test "x$with_big_core" = "xyes" &&
8927 cat >>confdefs.h <<\EOF
8928 #define HAVE_BIG_CORE 1
8929 EOF
8930
8931 ### ISO C only guarantees 512-char strings, we have tables which load faster
8932 ### when constructed using "big" strings.  More than the C compiler, the awk
8933 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8934 echo "$as_me:8934: checking if big-strings option selected" >&5
8935 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8936
8937 # Check whether --enable-big-strings or --disable-big-strings was given.
8938 if test "${enable_big_strings+set}" = set; then
8939   enableval="$enable_big_strings"
8940   with_big_strings=$enableval
8941 else
8942
8943         case x$AWK in
8944         (x)
8945                 eval with_big_strings=no
8946                 ;;
8947         (*)
8948                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8949                         | $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
8950                         eval with_big_strings=yes
8951                 else
8952                         eval with_big_strings=no
8953                 fi
8954                 ;;
8955         esac
8956
8957 fi;
8958 echo "$as_me:8958: result: $with_big_strings" >&5
8959 echo "${ECHO_T}$with_big_strings" >&6
8960
8961 USE_BIG_STRINGS=0
8962 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8963
8964 ###     use option --enable-termcap to compile in the termcap fallback support
8965 echo "$as_me:8965: checking if you want termcap-fallback support" >&5
8966 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8967
8968 # Check whether --enable-termcap or --disable-termcap was given.
8969 if test "${enable_termcap+set}" = set; then
8970   enableval="$enable_termcap"
8971   with_termcap=$enableval
8972 else
8973   with_termcap=no
8974 fi;
8975 echo "$as_me:8975: result: $with_termcap" >&5
8976 echo "${ECHO_T}$with_termcap" >&6
8977
8978 NCURSES_USE_TERMCAP=0
8979 if test "x$with_termcap" != "xyes" ; then
8980         if test "$use_database" = no ; then
8981                 if test -z "$with_fallback" ; then
8982                         { { echo "$as_me:8982: error: You have disabled the database w/o specifying fallbacks" >&5
8983 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8984    { (exit 1); exit 1; }; }
8985                 fi
8986         fi
8987
8988 cat >>confdefs.h <<\EOF
8989 #define PURE_TERMINFO 1
8990 EOF
8991
8992 else
8993
8994         if test "$with_ticlib" != no ; then
8995                 { { echo "$as_me:8995: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8996 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8997    { (exit 1); exit 1; }; }
8998         fi
8999
9000         NCURSES_USE_TERMCAP=1
9001         echo "$as_me:9001: checking for list of termcap files" >&5
9002 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9003
9004 # Check whether --with-termpath or --without-termpath was given.
9005 if test "${with_termpath+set}" = set; then
9006   withval="$with_termpath"
9007
9008 else
9009   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9010 fi;
9011 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9012 cf_dst_path=
9013 for cf_src_path in $withval
9014 do
9015
9016 if test "x$prefix" != xNONE; then
9017         cf_path_syntax="$prefix"
9018 else
9019         cf_path_syntax="$ac_default_prefix"
9020 fi
9021
9022 case ".$cf_src_path" in
9023 (.\$\(*\)*|.\'*\'*)
9024         ;;
9025 (..|./*|.\\*)
9026         ;;
9027 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9028         ;;
9029 (.\${*prefix}*|.\${*dir}*)
9030         eval cf_src_path="$cf_src_path"
9031         case ".$cf_src_path" in
9032         (.NONE/*)
9033                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9034                 ;;
9035         esac
9036         ;;
9037 (.no|.NONE/*)
9038         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9039         ;;
9040 (*)
9041         { { echo "$as_me:9041: error: expected a pathname, not \"$cf_src_path\"" >&5
9042 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9043    { (exit 1); exit 1; }; }
9044         ;;
9045 esac
9046
9047   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9048   cf_dst_path="${cf_dst_path}${cf_src_path}"
9049 done
9050 IFS="$ac_save_ifs"
9051
9052 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9053 # so we have to check/work around.  We do prefer the result of "eval"...
9054 eval cf_dst_eval="$cf_dst_path"
9055 case "x$cf_dst_eval" in
9056 (xNONE*)
9057         TERMPATH=$cf_dst_path
9058         ;;
9059 (*)
9060         TERMPATH="$cf_dst_eval"
9061         ;;
9062 esac
9063
9064         echo "$as_me:9064: result: $TERMPATH" >&5
9065 echo "${ECHO_T}$TERMPATH" >&6
9066         test -n "$TERMPATH" &&
9067 cat >>confdefs.h <<EOF
9068 #define TERMPATH "$TERMPATH"
9069 EOF
9070
9071         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9072         echo "$as_me:9072: checking if fast termcap-loader is needed" >&5
9073 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9074
9075 # Check whether --enable-getcap or --disable-getcap was given.
9076 if test "${enable_getcap+set}" = set; then
9077   enableval="$enable_getcap"
9078   with_getcap=$enableval
9079 else
9080   with_getcap=no
9081 fi;
9082         echo "$as_me:9082: result: $with_getcap" >&5
9083 echo "${ECHO_T}$with_getcap" >&6
9084         test "x$with_getcap" = "xyes" &&
9085 cat >>confdefs.h <<\EOF
9086 #define USE_GETCAP 1
9087 EOF
9088
9089         echo "$as_me:9089: checking if translated termcaps will be cached in ~/.terminfo" >&5
9090 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9091
9092 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9093 if test "${enable_getcap_cache+set}" = set; then
9094   enableval="$enable_getcap_cache"
9095   with_getcap_cache=$enableval
9096 else
9097   with_getcap_cache=no
9098 fi;
9099         echo "$as_me:9099: result: $with_getcap_cache" >&5
9100 echo "${ECHO_T}$with_getcap_cache" >&6
9101         test "x$with_getcap_cache" = "xyes" &&
9102 cat >>confdefs.h <<\EOF
9103 #define USE_GETCAP_CACHE 1
9104 EOF
9105
9106 fi
9107
9108 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9109 echo "$as_me:9109: checking if ~/.terminfo is wanted" >&5
9110 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9111
9112 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9113 if test "${enable_home_terminfo+set}" = set; then
9114   enableval="$enable_home_terminfo"
9115   with_home_terminfo=$enableval
9116 else
9117   with_home_terminfo=yes
9118 fi;
9119 echo "$as_me:9119: result: $with_home_terminfo" >&5
9120 echo "${ECHO_T}$with_home_terminfo" >&6
9121 test "x$with_home_terminfo" = "xyes" &&
9122 cat >>confdefs.h <<\EOF
9123 #define USE_HOME_TERMINFO 1
9124 EOF
9125
9126 echo "$as_me:9126: checking if you want to use restricted environment when running as root" >&5
9127 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9128
9129 # Check whether --enable-root-environ or --disable-root-environ was given.
9130 if test "${enable_root_environ+set}" = set; then
9131   enableval="$enable_root_environ"
9132   with_root_environ=$enableval
9133 else
9134   with_root_environ=yes
9135 fi;
9136 echo "$as_me:9136: result: $with_root_environ" >&5
9137 echo "${ECHO_T}$with_root_environ" >&6
9138 test "x$with_root_environ" = xyes &&
9139 cat >>confdefs.h <<\EOF
9140 #define USE_ROOT_ENVIRON 1
9141 EOF
9142
9143 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9144 ###   to reduce storage requirements for the terminfo database.
9145
9146 for ac_header in \
9147 unistd.h \
9148
9149 do
9150 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9151 echo "$as_me:9151: checking for $ac_header" >&5
9152 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9153 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9154   echo $ECHO_N "(cached) $ECHO_C" >&6
9155 else
9156   cat >conftest.$ac_ext <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9159 #include <$ac_header>
9160 _ACEOF
9161 if { (eval echo "$as_me:9161: \"$ac_cpp conftest.$ac_ext\"") >&5
9162   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9163   ac_status=$?
9164   egrep -v '^ *\+' conftest.er1 >conftest.err
9165   rm -f conftest.er1
9166   cat conftest.err >&5
9167   echo "$as_me:9167: \$? = $ac_status" >&5
9168   (exit $ac_status); } >/dev/null; then
9169   if test -s conftest.err; then
9170     ac_cpp_err=$ac_c_preproc_warn_flag
9171   else
9172     ac_cpp_err=
9173   fi
9174 else
9175   ac_cpp_err=yes
9176 fi
9177 if test -z "$ac_cpp_err"; then
9178   eval "$as_ac_Header=yes"
9179 else
9180   echo "$as_me: failed program was:" >&5
9181   cat conftest.$ac_ext >&5
9182   eval "$as_ac_Header=no"
9183 fi
9184 rm -f conftest.err conftest.$ac_ext
9185 fi
9186 echo "$as_me:9186: result: `eval echo '${'$as_ac_Header'}'`" >&5
9187 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9188 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9189   cat >>confdefs.h <<EOF
9190 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9191 EOF
9192
9193 fi
9194 done
9195
9196 for ac_func in \
9197         remove \
9198         unlink
9199 do
9200 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9201 echo "$as_me:9201: checking for $ac_func" >&5
9202 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9203 if eval "test \"\${$as_ac_var+set}\" = set"; then
9204   echo $ECHO_N "(cached) $ECHO_C" >&6
9205 else
9206   cat >conftest.$ac_ext <<_ACEOF
9207 #line 9207 "configure"
9208 #include "confdefs.h"
9209 #define $ac_func autoconf_temporary
9210 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9211 #undef $ac_func
9212
9213 #ifdef __cplusplus
9214 extern "C"
9215 #endif
9216
9217 /* We use char because int might match the return type of a gcc2
9218    builtin and then its argument prototype would still apply.  */
9219 char $ac_func (void);
9220
9221 int
9222 main (void)
9223 {
9224
9225 /* The GNU C library defines stubs for functions which it implements
9226     to always fail with ENOSYS.  Some functions are actually named
9227     something starting with __ and the normal name is an alias.  */
9228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9229 #error found stub for $ac_func
9230 #endif
9231
9232         return $ac_func ();
9233   ;
9234   return 0;
9235 }
9236 _ACEOF
9237 rm -f conftest.$ac_objext conftest$ac_exeext
9238 if { (eval echo "$as_me:9238: \"$ac_link\"") >&5
9239   (eval $ac_link) 2>&5
9240   ac_status=$?
9241   echo "$as_me:9241: \$? = $ac_status" >&5
9242   (exit $ac_status); } &&
9243          { ac_try='test -s conftest$ac_exeext'
9244   { (eval echo "$as_me:9244: \"$ac_try\"") >&5
9245   (eval $ac_try) 2>&5
9246   ac_status=$?
9247   echo "$as_me:9247: \$? = $ac_status" >&5
9248   (exit $ac_status); }; }; then
9249   eval "$as_ac_var=yes"
9250 else
9251   echo "$as_me: failed program was:" >&5
9252 cat conftest.$ac_ext >&5
9253 eval "$as_ac_var=no"
9254 fi
9255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9256 fi
9257 echo "$as_me:9257: result: `eval echo '${'$as_ac_var'}'`" >&5
9258 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9259 if test `eval echo '${'$as_ac_var'}'` = yes; then
9260   cat >>confdefs.h <<EOF
9261 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9262 EOF
9263
9264 fi
9265 done
9266
9267 if test "$cross_compiling" = yes ; then
9268
9269 for ac_func in \
9270                 link \
9271                 symlink
9272 do
9273 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9274 echo "$as_me:9274: checking for $ac_func" >&5
9275 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9276 if eval "test \"\${$as_ac_var+set}\" = set"; then
9277   echo $ECHO_N "(cached) $ECHO_C" >&6
9278 else
9279   cat >conftest.$ac_ext <<_ACEOF
9280 #line 9280 "configure"
9281 #include "confdefs.h"
9282 #define $ac_func autoconf_temporary
9283 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9284 #undef $ac_func
9285
9286 #ifdef __cplusplus
9287 extern "C"
9288 #endif
9289
9290 /* We use char because int might match the return type of a gcc2
9291    builtin and then its argument prototype would still apply.  */
9292 char $ac_func (void);
9293
9294 int
9295 main (void)
9296 {
9297
9298 /* The GNU C library defines stubs for functions which it implements
9299     to always fail with ENOSYS.  Some functions are actually named
9300     something starting with __ and the normal name is an alias.  */
9301 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9302 #error found stub for $ac_func
9303 #endif
9304
9305         return $ac_func ();
9306   ;
9307   return 0;
9308 }
9309 _ACEOF
9310 rm -f conftest.$ac_objext conftest$ac_exeext
9311 if { (eval echo "$as_me:9311: \"$ac_link\"") >&5
9312   (eval $ac_link) 2>&5
9313   ac_status=$?
9314   echo "$as_me:9314: \$? = $ac_status" >&5
9315   (exit $ac_status); } &&
9316          { ac_try='test -s conftest$ac_exeext'
9317   { (eval echo "$as_me:9317: \"$ac_try\"") >&5
9318   (eval $ac_try) 2>&5
9319   ac_status=$?
9320   echo "$as_me:9320: \$? = $ac_status" >&5
9321   (exit $ac_status); }; }; then
9322   eval "$as_ac_var=yes"
9323 else
9324   echo "$as_me: failed program was:" >&5
9325 cat conftest.$ac_ext >&5
9326 eval "$as_ac_var=no"
9327 fi
9328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9329 fi
9330 echo "$as_me:9330: result: `eval echo '${'$as_ac_var'}'`" >&5
9331 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9332 if test `eval echo '${'$as_ac_var'}'` = yes; then
9333   cat >>confdefs.h <<EOF
9334 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9335 EOF
9336
9337 fi
9338 done
9339
9340 else
9341         echo "$as_me:9341: checking if link/symlink functions work" >&5
9342 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9343 if test "${cf_cv_link_funcs+set}" = set; then
9344   echo $ECHO_N "(cached) $ECHO_C" >&6
9345 else
9346
9347                 cf_cv_link_funcs=
9348                 for cf_func in link symlink ; do
9349                         if test "$cross_compiling" = yes; then
9350
9351                         eval 'ac_cv_func_'$cf_func'=error'
9352 else
9353   cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356
9357 #include <sys/types.h>
9358 #include <sys/stat.h>
9359 #ifdef HAVE_UNISTD_H
9360 #include <unistd.h>
9361 #endif
9362 int main(void)
9363 {
9364         int fail = 0;
9365         char *src = "config.log";
9366         char *dst = "conftest.chk";
9367         struct stat src_sb;
9368         struct stat dst_sb;
9369
9370         stat(src, &src_sb);
9371         fail = ($cf_func("config.log", "conftest.chk") < 0)
9372             || (stat(dst, &dst_sb) < 0)
9373             || (dst_sb.st_mtime != src_sb.st_mtime);
9374 #ifdef HAVE_UNLINK
9375         unlink(dst);
9376 #else
9377         remove(dst);
9378 #endif
9379         ${cf_cv_main_return:-return} (fail);
9380 }
9381
9382 _ACEOF
9383 rm -f conftest$ac_exeext
9384 if { (eval echo "$as_me:9384: \"$ac_link\"") >&5
9385   (eval $ac_link) 2>&5
9386   ac_status=$?
9387   echo "$as_me:9387: \$? = $ac_status" >&5
9388   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9389   { (eval echo "$as_me:9389: \"$ac_try\"") >&5
9390   (eval $ac_try) 2>&5
9391   ac_status=$?
9392   echo "$as_me:9392: \$? = $ac_status" >&5
9393   (exit $ac_status); }; }; then
9394
9395                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9396                         eval 'ac_cv_func_'$cf_func'=yes'
9397 else
9398   echo "$as_me: program exited with status $ac_status" >&5
9399 echo "$as_me: failed program was:" >&5
9400 cat conftest.$ac_ext >&5
9401
9402                         eval 'ac_cv_func_'$cf_func'=no'
9403 fi
9404 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9405 fi
9406                 done
9407                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9408
9409 fi
9410 echo "$as_me:9410: result: $cf_cv_link_funcs" >&5
9411 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9412         test "$ac_cv_func_link"    = yes &&
9413 cat >>confdefs.h <<\EOF
9414 #define HAVE_LINK 1
9415 EOF
9416
9417         test "$ac_cv_func_symlink" = yes &&
9418 cat >>confdefs.h <<\EOF
9419 #define HAVE_SYMLINK 1
9420 EOF
9421
9422 fi
9423
9424 with_links=no
9425 with_symlinks=no
9426
9427 # soft links (symbolic links) are useful for some systems where hard links do
9428 # not work, or to make it simpler to copy terminfo trees around.
9429 if test "x$ac_cv_func_symlink" = xyes ; then
9430         echo "$as_me:9430: checking if tic should use symbolic links" >&5
9431 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9432
9433 # Check whether --enable-symlinks or --disable-symlinks was given.
9434 if test "${enable_symlinks+set}" = set; then
9435   enableval="$enable_symlinks"
9436   with_symlinks=$enableval
9437 else
9438   with_symlinks=no
9439 fi;
9440         echo "$as_me:9440: result: $with_symlinks" >&5
9441 echo "${ECHO_T}$with_symlinks" >&6
9442 fi
9443
9444 # If we have hard links and did not choose to use soft links instead, there is
9445 # no reason to make this choice optional - use the hard links.
9446 if test "$with_symlinks" = no ; then
9447         echo "$as_me:9447: checking if tic should use hard links" >&5
9448 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9449         if test "x$ac_cv_func_link" = xyes ; then
9450                 with_links=yes
9451         else
9452                 with_links=no
9453         fi
9454         echo "$as_me:9454: result: $with_links" >&5
9455 echo "${ECHO_T}$with_links" >&6
9456 fi
9457
9458 test "x$with_links" = xyes &&
9459 cat >>confdefs.h <<\EOF
9460 #define USE_LINKS 1
9461 EOF
9462
9463 test "x$with_symlinks" = xyes &&
9464 cat >>confdefs.h <<\EOF
9465 #define USE_SYMLINKS 1
9466 EOF
9467
9468 ###   use option --enable-broken-linker to force on use of broken-linker support
9469
9470 echo "$as_me:9470: checking if you want broken-linker support code" >&5
9471 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9472
9473 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9474 if test "${enable_broken_linker+set}" = set; then
9475   enableval="$enable_broken_linker"
9476   with_broken_linker=$enableval
9477 else
9478   with_broken_linker=no
9479 fi;
9480 echo "$as_me:9480: result: $with_broken_linker" >&5
9481 echo "${ECHO_T}$with_broken_linker" >&6
9482
9483 : ${BROKEN_LINKER:=0}
9484 if test "x$with_broken_linker" = xyes ; then
9485
9486 cat >>confdefs.h <<\EOF
9487 #define BROKEN_LINKER 1
9488 EOF
9489
9490         BROKEN_LINKER=1
9491 fi
9492
9493 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9494 echo "$as_me:9494: checking if tputs should process BSD-style prefix padding" >&5
9495 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9496
9497 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9498 if test "${enable_bsdpad+set}" = set; then
9499   enableval="$enable_bsdpad"
9500   with_bsdpad=$enableval
9501 else
9502   with_bsdpad=no
9503 fi;
9504 echo "$as_me:9504: result: $with_bsdpad" >&5
9505 echo "${ECHO_T}$with_bsdpad" >&6
9506 test "x$with_bsdpad" = xyes &&
9507 cat >>confdefs.h <<\EOF
9508 #define BSD_TPUTS 1
9509 EOF
9510
9511 ###   use option --enable-widec to turn on use of wide-character support
9512 NCURSES_CH_T=chtype
9513 NCURSES_LIBUTF8=0
9514
9515 NEED_WCHAR_H=0
9516 NCURSES_MBSTATE_T=0
9517 NCURSES_WCHAR_T=0
9518 NCURSES_WINT_T=0
9519
9520 # Check to define _XOPEN_SOURCE "automatically"
9521 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9522
9523 echo "$as_me:9523: checking if the POSIX test-macros are already defined" >&5
9524 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9525 if test "${cf_cv_posix_visible+set}" = set; then
9526   echo $ECHO_N "(cached) $ECHO_C" >&6
9527 else
9528
9529 cat >conftest.$ac_ext <<_ACEOF
9530 #line 9530 "configure"
9531 #include "confdefs.h"
9532 #include <stdio.h>
9533 int
9534 main (void)
9535 {
9536
9537 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9538         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9539         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9540         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9541 #error conflicting symbols found
9542 #endif
9543
9544   ;
9545   return 0;
9546 }
9547 _ACEOF
9548 rm -f conftest.$ac_objext
9549 if { (eval echo "$as_me:9549: \"$ac_compile\"") >&5
9550   (eval $ac_compile) 2>&5
9551   ac_status=$?
9552   echo "$as_me:9552: \$? = $ac_status" >&5
9553   (exit $ac_status); } &&
9554          { ac_try='test -s conftest.$ac_objext'
9555   { (eval echo "$as_me:9555: \"$ac_try\"") >&5
9556   (eval $ac_try) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); }; }; then
9560   cf_cv_posix_visible=no
9561 else
9562   echo "$as_me: failed program was:" >&5
9563 cat conftest.$ac_ext >&5
9564 cf_cv_posix_visible=yes
9565 fi
9566 rm -f conftest.$ac_objext conftest.$ac_ext
9567
9568 fi
9569 echo "$as_me:9569: result: $cf_cv_posix_visible" >&5
9570 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9571
9572 if test "$cf_cv_posix_visible" = no; then
9573
9574 cf_XOPEN_SOURCE=600
9575 cf_POSIX_C_SOURCE=199506L
9576 cf_xopen_source=
9577
9578 case $host_os in
9579 (aix[4-7]*)
9580         cf_xopen_source="-D_ALL_SOURCE"
9581         ;;
9582 (msys)
9583         cf_XOPEN_SOURCE=600
9584         ;;
9585 (darwin[0-8].*)
9586         cf_xopen_source="-D_APPLE_C_SOURCE"
9587         ;;
9588 (darwin*)
9589         cf_xopen_source="-D_DARWIN_C_SOURCE"
9590         cf_XOPEN_SOURCE=
9591         ;;
9592 (freebsd*|dragonfly*|midnightbsd*)
9593         # 5.x headers associate
9594         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9595         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9596         cf_POSIX_C_SOURCE=200112L
9597         cf_XOPEN_SOURCE=600
9598         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9599         ;;
9600 (hpux11*)
9601         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9602         ;;
9603 (hpux*)
9604         cf_xopen_source="-D_HPUX_SOURCE"
9605         ;;
9606 (irix[56].*)
9607         cf_xopen_source="-D_SGI_SOURCE"
9608         cf_XOPEN_SOURCE=
9609         ;;
9610 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9611
9612 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9613
9614 echo "$as_me:9614: checking if this is the GNU C library" >&5
9615 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9616 if test "${cf_cv_gnu_library+set}" = set; then
9617   echo $ECHO_N "(cached) $ECHO_C" >&6
9618 else
9619
9620 cat >conftest.$ac_ext <<_ACEOF
9621 #line 9621 "configure"
9622 #include "confdefs.h"
9623 #include <sys/types.h>
9624 int
9625 main (void)
9626 {
9627
9628         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9629                 return 0;
9630         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9631                 return 0;
9632         #else
9633         #       error not GNU C library
9634         #endif
9635   ;
9636   return 0;
9637 }
9638 _ACEOF
9639 rm -f conftest.$ac_objext
9640 if { (eval echo "$as_me:9640: \"$ac_compile\"") >&5
9641   (eval $ac_compile) 2>&5
9642   ac_status=$?
9643   echo "$as_me:9643: \$? = $ac_status" >&5
9644   (exit $ac_status); } &&
9645          { ac_try='test -s conftest.$ac_objext'
9646   { (eval echo "$as_me:9646: \"$ac_try\"") >&5
9647   (eval $ac_try) 2>&5
9648   ac_status=$?
9649   echo "$as_me:9649: \$? = $ac_status" >&5
9650   (exit $ac_status); }; }; then
9651   cf_cv_gnu_library=yes
9652 else
9653   echo "$as_me: failed program was:" >&5
9654 cat conftest.$ac_ext >&5
9655 cf_cv_gnu_library=no
9656 fi
9657 rm -f conftest.$ac_objext conftest.$ac_ext
9658
9659 fi
9660 echo "$as_me:9660: result: $cf_cv_gnu_library" >&5
9661 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9662
9663 if test x$cf_cv_gnu_library = xyes; then
9664
9665         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9666         # was changed to help a little.  newlib incorporated the change about 4
9667         # years later.
9668         echo "$as_me:9668: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9669 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9670 if test "${cf_cv_gnu_library_219+set}" = set; then
9671   echo $ECHO_N "(cached) $ECHO_C" >&6
9672 else
9673
9674                 cf_save="$CPPFLAGS"
9675
9676         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9677         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9678
9679                 cat >conftest.$ac_ext <<_ACEOF
9680 #line 9680 "configure"
9681 #include "confdefs.h"
9682 #include <sys/types.h>
9683 int
9684 main (void)
9685 {
9686
9687                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9688                                 return 0;
9689                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9690                                 return 0;
9691                         #else
9692                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9693                         #endif
9694   ;
9695   return 0;
9696 }
9697 _ACEOF
9698 rm -f conftest.$ac_objext
9699 if { (eval echo "$as_me:9699: \"$ac_compile\"") >&5
9700   (eval $ac_compile) 2>&5
9701   ac_status=$?
9702   echo "$as_me:9702: \$? = $ac_status" >&5
9703   (exit $ac_status); } &&
9704          { ac_try='test -s conftest.$ac_objext'
9705   { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:9708: \$? = $ac_status" >&5
9709   (exit $ac_status); }; }; then
9710   cf_cv_gnu_library_219=yes
9711 else
9712   echo "$as_me: failed program was:" >&5
9713 cat conftest.$ac_ext >&5
9714 cf_cv_gnu_library_219=no
9715 fi
9716 rm -f conftest.$ac_objext conftest.$ac_ext
9717                 CPPFLAGS="$cf_save"
9718
9719 fi
9720 echo "$as_me:9720: result: $cf_cv_gnu_library_219" >&5
9721 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9722
9723         if test "x$cf_cv_gnu_library_219" = xyes; then
9724                 cf_save="$CPPFLAGS"
9725                 echo "$as_me:9725: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9726 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9727 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9728   echo $ECHO_N "(cached) $ECHO_C" >&6
9729 else
9730
9731 cf_fix_cppflags=no
9732 cf_new_cflags=
9733 cf_new_cppflags=
9734 cf_new_extra_cppflags=
9735
9736 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9737 do
9738 case $cf_fix_cppflags in
9739 (no)
9740         case $cf_add_cflags in
9741         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9742                 case $cf_add_cflags in
9743                 (-D*)
9744                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9745
9746                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9747                                 && test -z "${cf_tst_cflags}" \
9748                                 && cf_fix_cppflags=yes
9749
9750                         if test $cf_fix_cppflags = yes ; then
9751
9752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9754
9755                                 continue
9756                         elif test "${cf_tst_cflags}" = "\"'" ; then
9757
9758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9760
9761                                 continue
9762                         fi
9763                         ;;
9764                 esac
9765                 case "$CPPFLAGS" in
9766                 (*$cf_add_cflags)
9767                         ;;
9768                 (*)
9769                         case $cf_add_cflags in
9770                         (-D*)
9771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9772
9773 CPPFLAGS=`echo "$CPPFLAGS" | \
9774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9776
9777                                 ;;
9778                         esac
9779
9780         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9781         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9782
9783                         ;;
9784                 esac
9785                 ;;
9786         (*)
9787
9788         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9789         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9790
9791                 ;;
9792         esac
9793         ;;
9794 (yes)
9795
9796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9798
9799         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9800
9801         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9802                 && test -z "${cf_tst_cflags}" \
9803                 && cf_fix_cppflags=no
9804         ;;
9805 esac
9806 done
9807
9808 if test -n "$cf_new_cflags" ; then
9809
9810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9811         CFLAGS="${CFLAGS}$cf_new_cflags"
9812
9813 fi
9814
9815 if test -n "$cf_new_cppflags" ; then
9816
9817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9818         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9819
9820 fi
9821
9822 if test -n "$cf_new_extra_cppflags" ; then
9823
9824         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9825         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9826
9827 fi
9828
9829                         cat >conftest.$ac_ext <<_ACEOF
9830 #line 9830 "configure"
9831 #include "confdefs.h"
9832
9833                                 #include <limits.h>
9834                                 #include <sys/types.h>
9835
9836 int
9837 main (void)
9838 {
9839
9840                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9841                                         return 0;
9842                                 #else
9843                                 #       error GNU C library is too old
9844                                 #endif
9845   ;
9846   return 0;
9847 }
9848 _ACEOF
9849 rm -f conftest.$ac_objext
9850 if { (eval echo "$as_me:9850: \"$ac_compile\"") >&5
9851   (eval $ac_compile) 2>&5
9852   ac_status=$?
9853   echo "$as_me:9853: \$? = $ac_status" >&5
9854   (exit $ac_status); } &&
9855          { ac_try='test -s conftest.$ac_objext'
9856   { (eval echo "$as_me:9856: \"$ac_try\"") >&5
9857   (eval $ac_try) 2>&5
9858   ac_status=$?
9859   echo "$as_me:9859: \$? = $ac_status" >&5
9860   (exit $ac_status); }; }; then
9861   cf_cv_gnu_dftsrc_219=yes
9862 else
9863   echo "$as_me: failed program was:" >&5
9864 cat conftest.$ac_ext >&5
9865 cf_cv_gnu_dftsrc_219=no
9866 fi
9867 rm -f conftest.$ac_objext conftest.$ac_ext
9868
9869 fi
9870 echo "$as_me:9870: result: $cf_cv_gnu_dftsrc_219" >&5
9871 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9872                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9873         else
9874                 cf_cv_gnu_dftsrc_219=maybe
9875         fi
9876
9877         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9878
9879                 echo "$as_me:9879: checking if we must define _GNU_SOURCE" >&5
9880 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9881 if test "${cf_cv_gnu_source+set}" = set; then
9882   echo $ECHO_N "(cached) $ECHO_C" >&6
9883 else
9884
9885                 cat >conftest.$ac_ext <<_ACEOF
9886 #line 9886 "configure"
9887 #include "confdefs.h"
9888 #include <sys/types.h>
9889 int
9890 main (void)
9891 {
9892
9893                         #ifndef _XOPEN_SOURCE
9894                         #error  expected _XOPEN_SOURCE to be defined
9895                         #endif
9896   ;
9897   return 0;
9898 }
9899 _ACEOF
9900 rm -f conftest.$ac_objext
9901 if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
9902   (eval $ac_compile) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); } &&
9906          { ac_try='test -s conftest.$ac_objext'
9907   { (eval echo "$as_me:9907: \"$ac_try\"") >&5
9908   (eval $ac_try) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit $ac_status); }; }; then
9912   cf_cv_gnu_source=no
9913 else
9914   echo "$as_me: failed program was:" >&5
9915 cat conftest.$ac_ext >&5
9916 cf_save="$CPPFLAGS"
9917
9918 cf_fix_cppflags=no
9919 cf_new_cflags=
9920 cf_new_cppflags=
9921 cf_new_extra_cppflags=
9922
9923 for cf_add_cflags in -D_GNU_SOURCE
9924 do
9925 case $cf_fix_cppflags in
9926 (no)
9927         case $cf_add_cflags in
9928         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9929                 case $cf_add_cflags in
9930                 (-D*)
9931                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9932
9933                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9934                                 && test -z "${cf_tst_cflags}" \
9935                                 && cf_fix_cppflags=yes
9936
9937                         if test $cf_fix_cppflags = yes ; then
9938
9939         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9940         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9941
9942                                 continue
9943                         elif test "${cf_tst_cflags}" = "\"'" ; then
9944
9945         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9946         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9947
9948                                 continue
9949                         fi
9950                         ;;
9951                 esac
9952                 case "$CPPFLAGS" in
9953                 (*$cf_add_cflags)
9954                         ;;
9955                 (*)
9956                         case $cf_add_cflags in
9957                         (-D*)
9958                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9959
9960 CPPFLAGS=`echo "$CPPFLAGS" | \
9961         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9962                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9963
9964                                 ;;
9965                         esac
9966
9967         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9968         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9969
9970                         ;;
9971                 esac
9972                 ;;
9973         (*)
9974
9975         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9976         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9977
9978                 ;;
9979         esac
9980         ;;
9981 (yes)
9982
9983         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9984         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9985
9986         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9987
9988         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9989                 && test -z "${cf_tst_cflags}" \
9990                 && cf_fix_cppflags=no
9991         ;;
9992 esac
9993 done
9994
9995 if test -n "$cf_new_cflags" ; then
9996
9997         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9998         CFLAGS="${CFLAGS}$cf_new_cflags"
9999
10000 fi
10001
10002 if test -n "$cf_new_cppflags" ; then
10003
10004         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10005         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10006
10007 fi
10008
10009 if test -n "$cf_new_extra_cppflags" ; then
10010
10011         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10012         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10013
10014 fi
10015
10016                          cat >conftest.$ac_ext <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #include <sys/types.h>
10020 int
10021 main (void)
10022 {
10023
10024                                 #ifdef _XOPEN_SOURCE
10025                                 #error  expected _XOPEN_SOURCE to be undefined
10026                                 #endif
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 rm -f conftest.$ac_objext
10032 if { (eval echo "$as_me:10032: \"$ac_compile\"") >&5
10033   (eval $ac_compile) 2>&5
10034   ac_status=$?
10035   echo "$as_me:10035: \$? = $ac_status" >&5
10036   (exit $ac_status); } &&
10037          { ac_try='test -s conftest.$ac_objext'
10038   { (eval echo "$as_me:10038: \"$ac_try\"") >&5
10039   (eval $ac_try) 2>&5
10040   ac_status=$?
10041   echo "$as_me:10041: \$? = $ac_status" >&5
10042   (exit $ac_status); }; }; then
10043   cf_cv_gnu_source=no
10044 else
10045   echo "$as_me: failed program was:" >&5
10046 cat conftest.$ac_ext >&5
10047 cf_cv_gnu_source=yes
10048 fi
10049 rm -f conftest.$ac_objext conftest.$ac_ext
10050                         CPPFLAGS="$cf_save"
10051
10052 fi
10053 rm -f conftest.$ac_objext conftest.$ac_ext
10054
10055 fi
10056 echo "$as_me:10056: result: $cf_cv_gnu_source" >&5
10057 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10058
10059                 if test "$cf_cv_gnu_source" = yes
10060                 then
10061                 echo "$as_me:10061: checking if we should also define _DEFAULT_SOURCE" >&5
10062 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10063 if test "${cf_cv_default_source+set}" = set; then
10064   echo $ECHO_N "(cached) $ECHO_C" >&6
10065 else
10066
10067         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10068         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10069
10070                         cat >conftest.$ac_ext <<_ACEOF
10071 #line 10071 "configure"
10072 #include "confdefs.h"
10073 #include <sys/types.h>
10074 int
10075 main (void)
10076 {
10077
10078                                 #ifdef _DEFAULT_SOURCE
10079                                 #error  expected _DEFAULT_SOURCE to be undefined
10080                                 #endif
10081   ;
10082   return 0;
10083 }
10084 _ACEOF
10085 rm -f conftest.$ac_objext
10086 if { (eval echo "$as_me:10086: \"$ac_compile\"") >&5
10087   (eval $ac_compile) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); } &&
10091          { ac_try='test -s conftest.$ac_objext'
10092   { (eval echo "$as_me:10092: \"$ac_try\"") >&5
10093   (eval $ac_try) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); }; }; then
10097   cf_cv_default_source=no
10098 else
10099   echo "$as_me: failed program was:" >&5
10100 cat conftest.$ac_ext >&5
10101 cf_cv_default_source=yes
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104
10105 fi
10106 echo "$as_me:10106: result: $cf_cv_default_source" >&5
10107 echo "${ECHO_T}$cf_cv_default_source" >&6
10108                         if test "$cf_cv_default_source" = yes
10109                         then
10110
10111         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10112         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10113
10114                         fi
10115                 fi
10116         fi
10117
10118 fi
10119
10120         ;;
10121 (minix*)
10122         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10123         ;;
10124 (mirbsd*)
10125         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10126         cf_XOPEN_SOURCE=
10127
10128 if test "$cf_cv_posix_visible" = no; then
10129
10130 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10131
10132 cf_save_CFLAGS="$CFLAGS"
10133 cf_save_CPPFLAGS="$CPPFLAGS"
10134
10135 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10136         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10137                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10138
10139 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10140         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10141                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10142
10143 echo "$as_me:10143: checking if we should define _POSIX_C_SOURCE" >&5
10144 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10145 if test "${cf_cv_posix_c_source+set}" = set; then
10146   echo $ECHO_N "(cached) $ECHO_C" >&6
10147 else
10148
10149 echo "${as_me:-configure}:10149: testing if the symbol is already defined go no further ..." 1>&5
10150
10151         cat >conftest.$ac_ext <<_ACEOF
10152 #line 10152 "configure"
10153 #include "confdefs.h"
10154 #include <sys/types.h>
10155 int
10156 main (void)
10157 {
10158
10159 #ifndef _POSIX_C_SOURCE
10160 make an error
10161 #endif
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 rm -f conftest.$ac_objext
10167 if { (eval echo "$as_me:10167: \"$ac_compile\"") >&5
10168   (eval $ac_compile) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); } &&
10172          { ac_try='test -s conftest.$ac_objext'
10173   { (eval echo "$as_me:10173: \"$ac_try\"") >&5
10174   (eval $ac_try) 2>&5
10175   ac_status=$?
10176   echo "$as_me:10176: \$? = $ac_status" >&5
10177   (exit $ac_status); }; }; then
10178   cf_cv_posix_c_source=no
10179 else
10180   echo "$as_me: failed program was:" >&5
10181 cat conftest.$ac_ext >&5
10182 cf_want_posix_source=no
10183          case .$cf_POSIX_C_SOURCE in
10184          (.[12]??*)
10185                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10186                 ;;
10187          (.2)
10188                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10189                 cf_want_posix_source=yes
10190                 ;;
10191          (.*)
10192                 cf_want_posix_source=yes
10193                 ;;
10194          esac
10195          if test "$cf_want_posix_source" = yes ; then
10196                 cat >conftest.$ac_ext <<_ACEOF
10197 #line 10197 "configure"
10198 #include "confdefs.h"
10199 #include <sys/types.h>
10200 int
10201 main (void)
10202 {
10203
10204 #ifdef _POSIX_SOURCE
10205 make an error
10206 #endif
10207   ;
10208   return 0;
10209 }
10210 _ACEOF
10211 rm -f conftest.$ac_objext
10212 if { (eval echo "$as_me:10212: \"$ac_compile\"") >&5
10213   (eval $ac_compile) 2>&5
10214   ac_status=$?
10215   echo "$as_me:10215: \$? = $ac_status" >&5
10216   (exit $ac_status); } &&
10217          { ac_try='test -s conftest.$ac_objext'
10218   { (eval echo "$as_me:10218: \"$ac_try\"") >&5
10219   (eval $ac_try) 2>&5
10220   ac_status=$?
10221   echo "$as_me:10221: \$? = $ac_status" >&5
10222   (exit $ac_status); }; }; then
10223   :
10224 else
10225   echo "$as_me: failed program was:" >&5
10226 cat conftest.$ac_ext >&5
10227 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10228 fi
10229 rm -f conftest.$ac_objext conftest.$ac_ext
10230          fi
10231
10232 echo "${as_me:-configure}:10232: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10233
10234          CFLAGS="$cf_trim_CFLAGS"
10235          CPPFLAGS="$cf_trim_CPPFLAGS"
10236
10237         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10238         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10239
10240 echo "${as_me:-configure}:10240: testing if the second compile does not leave our definition intact error ..." 1>&5
10241
10242          cat >conftest.$ac_ext <<_ACEOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245 #include <sys/types.h>
10246 int
10247 main (void)
10248 {
10249
10250 #ifndef _POSIX_C_SOURCE
10251 make an error
10252 #endif
10253   ;
10254   return 0;
10255 }
10256 _ACEOF
10257 rm -f conftest.$ac_objext
10258 if { (eval echo "$as_me:10258: \"$ac_compile\"") >&5
10259   (eval $ac_compile) 2>&5
10260   ac_status=$?
10261   echo "$as_me:10261: \$? = $ac_status" >&5
10262   (exit $ac_status); } &&
10263          { ac_try='test -s conftest.$ac_objext'
10264   { (eval echo "$as_me:10264: \"$ac_try\"") >&5
10265   (eval $ac_try) 2>&5
10266   ac_status=$?
10267   echo "$as_me:10267: \$? = $ac_status" >&5
10268   (exit $ac_status); }; }; then
10269   :
10270 else
10271   echo "$as_me: failed program was:" >&5
10272 cat conftest.$ac_ext >&5
10273 cf_cv_posix_c_source=no
10274 fi
10275 rm -f conftest.$ac_objext conftest.$ac_ext
10276          CFLAGS="$cf_save_CFLAGS"
10277          CPPFLAGS="$cf_save_CPPFLAGS"
10278
10279 fi
10280 rm -f conftest.$ac_objext conftest.$ac_ext
10281
10282 fi
10283 echo "$as_me:10283: result: $cf_cv_posix_c_source" >&5
10284 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10285
10286 if test "$cf_cv_posix_c_source" != no ; then
10287         CFLAGS="$cf_trim_CFLAGS"
10288         CPPFLAGS="$cf_trim_CPPFLAGS"
10289
10290 cf_fix_cppflags=no
10291 cf_new_cflags=
10292 cf_new_cppflags=
10293 cf_new_extra_cppflags=
10294
10295 for cf_add_cflags in $cf_cv_posix_c_source
10296 do
10297 case $cf_fix_cppflags in
10298 (no)
10299         case $cf_add_cflags in
10300         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10301                 case $cf_add_cflags in
10302                 (-D*)
10303                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10304
10305                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10306                                 && test -z "${cf_tst_cflags}" \
10307                                 && cf_fix_cppflags=yes
10308
10309                         if test $cf_fix_cppflags = yes ; then
10310
10311         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10312         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10313
10314                                 continue
10315                         elif test "${cf_tst_cflags}" = "\"'" ; then
10316
10317         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10318         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10319
10320                                 continue
10321                         fi
10322                         ;;
10323                 esac
10324                 case "$CPPFLAGS" in
10325                 (*$cf_add_cflags)
10326                         ;;
10327                 (*)
10328                         case $cf_add_cflags in
10329                         (-D*)
10330                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10331
10332 CPPFLAGS=`echo "$CPPFLAGS" | \
10333         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10334                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10335
10336                                 ;;
10337                         esac
10338
10339         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10340         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10341
10342                         ;;
10343                 esac
10344                 ;;
10345         (*)
10346
10347         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10348         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10349
10350                 ;;
10351         esac
10352         ;;
10353 (yes)
10354
10355         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10356         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10357
10358         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10359
10360         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10361                 && test -z "${cf_tst_cflags}" \
10362                 && cf_fix_cppflags=no
10363         ;;
10364 esac
10365 done
10366
10367 if test -n "$cf_new_cflags" ; then
10368
10369         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10370         CFLAGS="${CFLAGS}$cf_new_cflags"
10371
10372 fi
10373
10374 if test -n "$cf_new_cppflags" ; then
10375
10376         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10377         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10378
10379 fi
10380
10381 if test -n "$cf_new_extra_cppflags" ; then
10382
10383         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10384         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10385
10386 fi
10387
10388 fi
10389
10390 fi # cf_cv_posix_visible
10391
10392         ;;
10393 (netbsd*)
10394         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10395         ;;
10396 (openbsd[4-9]*)
10397         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10398         cf_xopen_source="-D_BSD_SOURCE"
10399         cf_XOPEN_SOURCE=600
10400         ;;
10401 (openbsd*)
10402         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10403         ;;
10404 (osf[45]*)
10405         cf_xopen_source="-D_OSF_SOURCE"
10406         ;;
10407 (nto-qnx*)
10408         cf_xopen_source="-D_QNX_SOURCE"
10409         ;;
10410 (sco*)
10411         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10412         ;;
10413 (solaris2.*)
10414         cf_xopen_source="-D__EXTENSIONS__"
10415         cf_cv_xopen_source=broken
10416         ;;
10417 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10418         cf_XOPEN_SOURCE=
10419         cf_POSIX_C_SOURCE=
10420         ;;
10421 (*)
10422
10423 echo "$as_me:10423: checking if we should define _XOPEN_SOURCE" >&5
10424 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10425 if test "${cf_cv_xopen_source+set}" = set; then
10426   echo $ECHO_N "(cached) $ECHO_C" >&6
10427 else
10428
10429         cat >conftest.$ac_ext <<_ACEOF
10430 #line 10430 "configure"
10431 #include "confdefs.h"
10432
10433 #include <stdlib.h>
10434 #include <string.h>
10435 #include <sys/types.h>
10436
10437 int
10438 main (void)
10439 {
10440
10441 #ifndef _XOPEN_SOURCE
10442 make an error
10443 #endif
10444   ;
10445   return 0;
10446 }
10447 _ACEOF
10448 rm -f conftest.$ac_objext
10449 if { (eval echo "$as_me:10449: \"$ac_compile\"") >&5
10450   (eval $ac_compile) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); } &&
10454          { ac_try='test -s conftest.$ac_objext'
10455   { (eval echo "$as_me:10455: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); }; }; then
10460   cf_cv_xopen_source=no
10461 else
10462   echo "$as_me: failed program was:" >&5
10463 cat conftest.$ac_ext >&5
10464 cf_save="$CPPFLAGS"
10465
10466         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10467         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10468
10469          cat >conftest.$ac_ext <<_ACEOF
10470 #line 10470 "configure"
10471 #include "confdefs.h"
10472
10473 #include <stdlib.h>
10474 #include <string.h>
10475 #include <sys/types.h>
10476
10477 int
10478 main (void)
10479 {
10480
10481 #ifdef _XOPEN_SOURCE
10482 make an error
10483 #endif
10484   ;
10485   return 0;
10486 }
10487 _ACEOF
10488 rm -f conftest.$ac_objext
10489 if { (eval echo "$as_me:10489: \"$ac_compile\"") >&5
10490   (eval $ac_compile) 2>&5
10491   ac_status=$?
10492   echo "$as_me:10492: \$? = $ac_status" >&5
10493   (exit $ac_status); } &&
10494          { ac_try='test -s conftest.$ac_objext'
10495   { (eval echo "$as_me:10495: \"$ac_try\"") >&5
10496   (eval $ac_try) 2>&5
10497   ac_status=$?
10498   echo "$as_me:10498: \$? = $ac_status" >&5
10499   (exit $ac_status); }; }; then
10500   cf_cv_xopen_source=no
10501 else
10502   echo "$as_me: failed program was:" >&5
10503 cat conftest.$ac_ext >&5
10504 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10505 fi
10506 rm -f conftest.$ac_objext conftest.$ac_ext
10507         CPPFLAGS="$cf_save"
10508
10509 fi
10510 rm -f conftest.$ac_objext conftest.$ac_ext
10511
10512 fi
10513 echo "$as_me:10513: result: $cf_cv_xopen_source" >&5
10514 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10515
10516 if test "$cf_cv_xopen_source" != no ; then
10517
10518 CFLAGS=`echo "$CFLAGS" | \
10519         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10520                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10521
10522 CPPFLAGS=`echo "$CPPFLAGS" | \
10523         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10524                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10525
10526         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10527
10528 cf_fix_cppflags=no
10529 cf_new_cflags=
10530 cf_new_cppflags=
10531 cf_new_extra_cppflags=
10532
10533 for cf_add_cflags in $cf_temp_xopen_source
10534 do
10535 case $cf_fix_cppflags in
10536 (no)
10537         case $cf_add_cflags in
10538         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10539                 case $cf_add_cflags in
10540                 (-D*)
10541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10542
10543                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10544                                 && test -z "${cf_tst_cflags}" \
10545                                 && cf_fix_cppflags=yes
10546
10547                         if test $cf_fix_cppflags = yes ; then
10548
10549         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10550         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10551
10552                                 continue
10553                         elif test "${cf_tst_cflags}" = "\"'" ; then
10554
10555         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10556         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10557
10558                                 continue
10559                         fi
10560                         ;;
10561                 esac
10562                 case "$CPPFLAGS" in
10563                 (*$cf_add_cflags)
10564                         ;;
10565                 (*)
10566                         case $cf_add_cflags in
10567                         (-D*)
10568                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10569
10570 CPPFLAGS=`echo "$CPPFLAGS" | \
10571         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10572                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10573
10574                                 ;;
10575                         esac
10576
10577         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10578         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10579
10580                         ;;
10581                 esac
10582                 ;;
10583         (*)
10584
10585         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10586         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10587
10588                 ;;
10589         esac
10590         ;;
10591 (yes)
10592
10593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10595
10596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10597
10598         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10599                 && test -z "${cf_tst_cflags}" \
10600                 && cf_fix_cppflags=no
10601         ;;
10602 esac
10603 done
10604
10605 if test -n "$cf_new_cflags" ; then
10606
10607         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10608         CFLAGS="${CFLAGS}$cf_new_cflags"
10609
10610 fi
10611
10612 if test -n "$cf_new_cppflags" ; then
10613
10614         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10615         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10616
10617 fi
10618
10619 if test -n "$cf_new_extra_cppflags" ; then
10620
10621         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10622         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10623
10624 fi
10625
10626 fi
10627
10628 if test "$cf_cv_posix_visible" = no; then
10629
10630 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10631
10632 cf_save_CFLAGS="$CFLAGS"
10633 cf_save_CPPFLAGS="$CPPFLAGS"
10634
10635 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10636         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10637                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10638
10639 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10640         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10641                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10642
10643 echo "$as_me:10643: checking if we should define _POSIX_C_SOURCE" >&5
10644 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10645 if test "${cf_cv_posix_c_source+set}" = set; then
10646   echo $ECHO_N "(cached) $ECHO_C" >&6
10647 else
10648
10649 echo "${as_me:-configure}:10649: testing if the symbol is already defined go no further ..." 1>&5
10650
10651         cat >conftest.$ac_ext <<_ACEOF
10652 #line 10652 "configure"
10653 #include "confdefs.h"
10654 #include <sys/types.h>
10655 int
10656 main (void)
10657 {
10658
10659 #ifndef _POSIX_C_SOURCE
10660 make an error
10661 #endif
10662   ;
10663   return 0;
10664 }
10665 _ACEOF
10666 rm -f conftest.$ac_objext
10667 if { (eval echo "$as_me:10667: \"$ac_compile\"") >&5
10668   (eval $ac_compile) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); } &&
10672          { ac_try='test -s conftest.$ac_objext'
10673   { (eval echo "$as_me:10673: \"$ac_try\"") >&5
10674   (eval $ac_try) 2>&5
10675   ac_status=$?
10676   echo "$as_me:10676: \$? = $ac_status" >&5
10677   (exit $ac_status); }; }; then
10678   cf_cv_posix_c_source=no
10679 else
10680   echo "$as_me: failed program was:" >&5
10681 cat conftest.$ac_ext >&5
10682 cf_want_posix_source=no
10683          case .$cf_POSIX_C_SOURCE in
10684          (.[12]??*)
10685                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10686                 ;;
10687          (.2)
10688                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10689                 cf_want_posix_source=yes
10690                 ;;
10691          (.*)
10692                 cf_want_posix_source=yes
10693                 ;;
10694          esac
10695          if test "$cf_want_posix_source" = yes ; then
10696                 cat >conftest.$ac_ext <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699 #include <sys/types.h>
10700 int
10701 main (void)
10702 {
10703
10704 #ifdef _POSIX_SOURCE
10705 make an error
10706 #endif
10707   ;
10708   return 0;
10709 }
10710 _ACEOF
10711 rm -f conftest.$ac_objext
10712 if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5
10713   (eval $ac_compile) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit $ac_status); } &&
10717          { ac_try='test -s conftest.$ac_objext'
10718   { (eval echo "$as_me:10718: \"$ac_try\"") >&5
10719   (eval $ac_try) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit $ac_status); }; }; then
10723   :
10724 else
10725   echo "$as_me: failed program was:" >&5
10726 cat conftest.$ac_ext >&5
10727 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10728 fi
10729 rm -f conftest.$ac_objext conftest.$ac_ext
10730          fi
10731
10732 echo "${as_me:-configure}:10732: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10733
10734          CFLAGS="$cf_trim_CFLAGS"
10735          CPPFLAGS="$cf_trim_CPPFLAGS"
10736
10737         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10738         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10739
10740 echo "${as_me:-configure}:10740: testing if the second compile does not leave our definition intact error ..." 1>&5
10741
10742          cat >conftest.$ac_ext <<_ACEOF
10743 #line 10743 "configure"
10744 #include "confdefs.h"
10745 #include <sys/types.h>
10746 int
10747 main (void)
10748 {
10749
10750 #ifndef _POSIX_C_SOURCE
10751 make an error
10752 #endif
10753   ;
10754   return 0;
10755 }
10756 _ACEOF
10757 rm -f conftest.$ac_objext
10758 if { (eval echo "$as_me:10758: \"$ac_compile\"") >&5
10759   (eval $ac_compile) 2>&5
10760   ac_status=$?
10761   echo "$as_me:10761: \$? = $ac_status" >&5
10762   (exit $ac_status); } &&
10763          { ac_try='test -s conftest.$ac_objext'
10764   { (eval echo "$as_me:10764: \"$ac_try\"") >&5
10765   (eval $ac_try) 2>&5
10766   ac_status=$?
10767   echo "$as_me:10767: \$? = $ac_status" >&5
10768   (exit $ac_status); }; }; then
10769   :
10770 else
10771   echo "$as_me: failed program was:" >&5
10772 cat conftest.$ac_ext >&5
10773 cf_cv_posix_c_source=no
10774 fi
10775 rm -f conftest.$ac_objext conftest.$ac_ext
10776          CFLAGS="$cf_save_CFLAGS"
10777          CPPFLAGS="$cf_save_CPPFLAGS"
10778
10779 fi
10780 rm -f conftest.$ac_objext conftest.$ac_ext
10781
10782 fi
10783 echo "$as_me:10783: result: $cf_cv_posix_c_source" >&5
10784 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10785
10786 if test "$cf_cv_posix_c_source" != no ; then
10787         CFLAGS="$cf_trim_CFLAGS"
10788         CPPFLAGS="$cf_trim_CPPFLAGS"
10789
10790 cf_fix_cppflags=no
10791 cf_new_cflags=
10792 cf_new_cppflags=
10793 cf_new_extra_cppflags=
10794
10795 for cf_add_cflags in $cf_cv_posix_c_source
10796 do
10797 case $cf_fix_cppflags in
10798 (no)
10799         case $cf_add_cflags in
10800         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10801                 case $cf_add_cflags in
10802                 (-D*)
10803                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10804
10805                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10806                                 && test -z "${cf_tst_cflags}" \
10807                                 && cf_fix_cppflags=yes
10808
10809                         if test $cf_fix_cppflags = yes ; then
10810
10811         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10812         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10813
10814                                 continue
10815                         elif test "${cf_tst_cflags}" = "\"'" ; then
10816
10817         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10818         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10819
10820                                 continue
10821                         fi
10822                         ;;
10823                 esac
10824                 case "$CPPFLAGS" in
10825                 (*$cf_add_cflags)
10826                         ;;
10827                 (*)
10828                         case $cf_add_cflags in
10829                         (-D*)
10830                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10831
10832 CPPFLAGS=`echo "$CPPFLAGS" | \
10833         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10834                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10835
10836                                 ;;
10837                         esac
10838
10839         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10840         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10841
10842                         ;;
10843                 esac
10844                 ;;
10845         (*)
10846
10847         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10848         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10849
10850                 ;;
10851         esac
10852         ;;
10853 (yes)
10854
10855         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10856         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10857
10858         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10859
10860         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10861                 && test -z "${cf_tst_cflags}" \
10862                 && cf_fix_cppflags=no
10863         ;;
10864 esac
10865 done
10866
10867 if test -n "$cf_new_cflags" ; then
10868
10869         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10870         CFLAGS="${CFLAGS}$cf_new_cflags"
10871
10872 fi
10873
10874 if test -n "$cf_new_cppflags" ; then
10875
10876         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10877         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10878
10879 fi
10880
10881 if test -n "$cf_new_extra_cppflags" ; then
10882
10883         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10884         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10885
10886 fi
10887
10888 fi
10889
10890 fi # cf_cv_posix_visible
10891
10892         ;;
10893 esac
10894
10895 if test -n "$cf_xopen_source" ; then
10896
10897 cf_fix_cppflags=no
10898 cf_new_cflags=
10899 cf_new_cppflags=
10900 cf_new_extra_cppflags=
10901
10902 for cf_add_cflags in $cf_xopen_source
10903 do
10904 case $cf_fix_cppflags in
10905 (no)
10906         case $cf_add_cflags in
10907         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10908                 case $cf_add_cflags in
10909                 (-D*)
10910                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10911
10912                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10913                                 && test -z "${cf_tst_cflags}" \
10914                                 && cf_fix_cppflags=yes
10915
10916                         if test $cf_fix_cppflags = yes ; then
10917
10918         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10919         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10920
10921                                 continue
10922                         elif test "${cf_tst_cflags}" = "\"'" ; then
10923
10924         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10925         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10926
10927                                 continue
10928                         fi
10929                         ;;
10930                 esac
10931                 case "$CPPFLAGS" in
10932                 (*$cf_add_cflags)
10933                         ;;
10934                 (*)
10935                         case $cf_add_cflags in
10936                         (-D*)
10937                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10938
10939 CPPFLAGS=`echo "$CPPFLAGS" | \
10940         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10941                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10942
10943                                 ;;
10944                         esac
10945
10946         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10947         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10948
10949                         ;;
10950                 esac
10951                 ;;
10952         (*)
10953
10954         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10955         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10956
10957                 ;;
10958         esac
10959         ;;
10960 (yes)
10961
10962         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10963         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10964
10965         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10966
10967         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10968                 && test -z "${cf_tst_cflags}" \
10969                 && cf_fix_cppflags=no
10970         ;;
10971 esac
10972 done
10973
10974 if test -n "$cf_new_cflags" ; then
10975         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10976
10977 echo "${as_me:-configure}:10977: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10978
10979         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10980         CFLAGS="${CFLAGS}$cf_new_cflags"
10981
10982 fi
10983
10984 if test -n "$cf_new_cppflags" ; then
10985         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10986
10987 echo "${as_me:-configure}:10987: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10988
10989         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10990         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10991
10992 fi
10993
10994 if test -n "$cf_new_extra_cppflags" ; then
10995         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10996
10997 echo "${as_me:-configure}:10997: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10998
10999         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11000         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11001
11002 fi
11003
11004 fi
11005
11006 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11007         echo "$as_me:11007: checking if _XOPEN_SOURCE really is set" >&5
11008 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11009         cat >conftest.$ac_ext <<_ACEOF
11010 #line 11010 "configure"
11011 #include "confdefs.h"
11012 #include <stdlib.h>
11013 int
11014 main (void)
11015 {
11016
11017 #ifndef _XOPEN_SOURCE
11018 make an error
11019 #endif
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f conftest.$ac_objext
11025 if { (eval echo "$as_me:11025: \"$ac_compile\"") >&5
11026   (eval $ac_compile) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit $ac_status); } &&
11030          { ac_try='test -s conftest.$ac_objext'
11031   { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032   (eval $ac_try) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit $ac_status); }; }; then
11036   cf_XOPEN_SOURCE_set=yes
11037 else
11038   echo "$as_me: failed program was:" >&5
11039 cat conftest.$ac_ext >&5
11040 cf_XOPEN_SOURCE_set=no
11041 fi
11042 rm -f conftest.$ac_objext conftest.$ac_ext
11043         echo "$as_me:11043: result: $cf_XOPEN_SOURCE_set" >&5
11044 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11045         if test $cf_XOPEN_SOURCE_set = yes
11046         then
11047                 cat >conftest.$ac_ext <<_ACEOF
11048 #line 11048 "configure"
11049 #include "confdefs.h"
11050 #include <stdlib.h>
11051 int
11052 main (void)
11053 {
11054
11055 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11056 make an error
11057 #endif
11058   ;
11059   return 0;
11060 }
11061 _ACEOF
11062 rm -f conftest.$ac_objext
11063 if { (eval echo "$as_me:11063: \"$ac_compile\"") >&5
11064   (eval $ac_compile) 2>&5
11065   ac_status=$?
11066   echo "$as_me:11066: \$? = $ac_status" >&5
11067   (exit $ac_status); } &&
11068          { ac_try='test -s conftest.$ac_objext'
11069   { (eval echo "$as_me:11069: \"$ac_try\"") >&5
11070   (eval $ac_try) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit $ac_status); }; }; then
11074   cf_XOPEN_SOURCE_set_ok=yes
11075 else
11076   echo "$as_me: failed program was:" >&5
11077 cat conftest.$ac_ext >&5
11078 cf_XOPEN_SOURCE_set_ok=no
11079 fi
11080 rm -f conftest.$ac_objext conftest.$ac_ext
11081                 if test $cf_XOPEN_SOURCE_set_ok = no
11082                 then
11083                         { echo "$as_me:11083: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11084 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11085                 fi
11086         else
11087
11088 echo "$as_me:11088: checking if we should define _XOPEN_SOURCE" >&5
11089 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11090 if test "${cf_cv_xopen_source+set}" = set; then
11091   echo $ECHO_N "(cached) $ECHO_C" >&6
11092 else
11093
11094         cat >conftest.$ac_ext <<_ACEOF
11095 #line 11095 "configure"
11096 #include "confdefs.h"
11097
11098 #include <stdlib.h>
11099 #include <string.h>
11100 #include <sys/types.h>
11101
11102 int
11103 main (void)
11104 {
11105
11106 #ifndef _XOPEN_SOURCE
11107 make an error
11108 #endif
11109   ;
11110   return 0;
11111 }
11112 _ACEOF
11113 rm -f conftest.$ac_objext
11114 if { (eval echo "$as_me:11114: \"$ac_compile\"") >&5
11115   (eval $ac_compile) 2>&5
11116   ac_status=$?
11117   echo "$as_me:11117: \$? = $ac_status" >&5
11118   (exit $ac_status); } &&
11119          { ac_try='test -s conftest.$ac_objext'
11120   { (eval echo "$as_me:11120: \"$ac_try\"") >&5
11121   (eval $ac_try) 2>&5
11122   ac_status=$?
11123   echo "$as_me:11123: \$? = $ac_status" >&5
11124   (exit $ac_status); }; }; then
11125   cf_cv_xopen_source=no
11126 else
11127   echo "$as_me: failed program was:" >&5
11128 cat conftest.$ac_ext >&5
11129 cf_save="$CPPFLAGS"
11130
11131         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11132         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11133
11134          cat >conftest.$ac_ext <<_ACEOF
11135 #line 11135 "configure"
11136 #include "confdefs.h"
11137
11138 #include <stdlib.h>
11139 #include <string.h>
11140 #include <sys/types.h>
11141
11142 int
11143 main (void)
11144 {
11145
11146 #ifdef _XOPEN_SOURCE
11147 make an error
11148 #endif
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 rm -f conftest.$ac_objext
11154 if { (eval echo "$as_me:11154: \"$ac_compile\"") >&5
11155   (eval $ac_compile) 2>&5
11156   ac_status=$?
11157   echo "$as_me:11157: \$? = $ac_status" >&5
11158   (exit $ac_status); } &&
11159          { ac_try='test -s conftest.$ac_objext'
11160   { (eval echo "$as_me:11160: \"$ac_try\"") >&5
11161   (eval $ac_try) 2>&5
11162   ac_status=$?
11163   echo "$as_me:11163: \$? = $ac_status" >&5
11164   (exit $ac_status); }; }; then
11165   cf_cv_xopen_source=no
11166 else
11167   echo "$as_me: failed program was:" >&5
11168 cat conftest.$ac_ext >&5
11169 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11170 fi
11171 rm -f conftest.$ac_objext conftest.$ac_ext
11172         CPPFLAGS="$cf_save"
11173
11174 fi
11175 rm -f conftest.$ac_objext conftest.$ac_ext
11176
11177 fi
11178 echo "$as_me:11178: result: $cf_cv_xopen_source" >&5
11179 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11180
11181 if test "$cf_cv_xopen_source" != no ; then
11182
11183 CFLAGS=`echo "$CFLAGS" | \
11184         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11185                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11186
11187 CPPFLAGS=`echo "$CPPFLAGS" | \
11188         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11189                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11190
11191         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11192
11193 cf_fix_cppflags=no
11194 cf_new_cflags=
11195 cf_new_cppflags=
11196 cf_new_extra_cppflags=
11197
11198 for cf_add_cflags in $cf_temp_xopen_source
11199 do
11200 case $cf_fix_cppflags in
11201 (no)
11202         case $cf_add_cflags in
11203         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11204                 case $cf_add_cflags in
11205                 (-D*)
11206                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11207
11208                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11209                                 && test -z "${cf_tst_cflags}" \
11210                                 && cf_fix_cppflags=yes
11211
11212                         if test $cf_fix_cppflags = yes ; then
11213
11214         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11215         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11216
11217                                 continue
11218                         elif test "${cf_tst_cflags}" = "\"'" ; then
11219
11220         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11221         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11222
11223                                 continue
11224                         fi
11225                         ;;
11226                 esac
11227                 case "$CPPFLAGS" in
11228                 (*$cf_add_cflags)
11229                         ;;
11230                 (*)
11231                         case $cf_add_cflags in
11232                         (-D*)
11233                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11234
11235 CPPFLAGS=`echo "$CPPFLAGS" | \
11236         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11237                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11238
11239                                 ;;
11240                         esac
11241
11242         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11243         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11244
11245                         ;;
11246                 esac
11247                 ;;
11248         (*)
11249
11250         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11251         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11252
11253                 ;;
11254         esac
11255         ;;
11256 (yes)
11257
11258         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11259         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11260
11261         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11262
11263         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11264                 && test -z "${cf_tst_cflags}" \
11265                 && cf_fix_cppflags=no
11266         ;;
11267 esac
11268 done
11269
11270 if test -n "$cf_new_cflags" ; then
11271
11272         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11273         CFLAGS="${CFLAGS}$cf_new_cflags"
11274
11275 fi
11276
11277 if test -n "$cf_new_cppflags" ; then
11278
11279         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11280         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11281
11282 fi
11283
11284 if test -n "$cf_new_extra_cppflags" ; then
11285
11286         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11287         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11288
11289 fi
11290
11291 fi
11292
11293         fi
11294 fi
11295 fi # cf_cv_posix_visible
11296
11297 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11298
11299 # Work around breakage on OS X
11300
11301 echo "$as_me:11301: checking if SIGWINCH is defined" >&5
11302 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11303 if test "${cf_cv_define_sigwinch+set}" = set; then
11304   echo $ECHO_N "(cached) $ECHO_C" >&6
11305 else
11306
11307         cat >conftest.$ac_ext <<_ACEOF
11308 #line 11308 "configure"
11309 #include "confdefs.h"
11310
11311 #include <sys/types.h>
11312 #include <sys/signal.h>
11313
11314 int
11315 main (void)
11316 {
11317 int x = SIGWINCH; (void)x
11318   ;
11319   return 0;
11320 }
11321 _ACEOF
11322 rm -f conftest.$ac_objext
11323 if { (eval echo "$as_me:11323: \"$ac_compile\"") >&5
11324   (eval $ac_compile) 2>&5
11325   ac_status=$?
11326   echo "$as_me:11326: \$? = $ac_status" >&5
11327   (exit $ac_status); } &&
11328          { ac_try='test -s conftest.$ac_objext'
11329   { (eval echo "$as_me:11329: \"$ac_try\"") >&5
11330   (eval $ac_try) 2>&5
11331   ac_status=$?
11332   echo "$as_me:11332: \$? = $ac_status" >&5
11333   (exit $ac_status); }; }; then
11334   cf_cv_define_sigwinch=yes
11335 else
11336   echo "$as_me: failed program was:" >&5
11337 cat conftest.$ac_ext >&5
11338 cat >conftest.$ac_ext <<_ACEOF
11339 #line 11339 "configure"
11340 #include "confdefs.h"
11341
11342 #undef _XOPEN_SOURCE
11343 #undef _POSIX_SOURCE
11344 #undef _POSIX_C_SOURCE
11345 #include <sys/types.h>
11346 #include <sys/signal.h>
11347
11348 int
11349 main (void)
11350 {
11351 int x = SIGWINCH; (void)x
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 rm -f conftest.$ac_objext
11357 if { (eval echo "$as_me:11357: \"$ac_compile\"") >&5
11358   (eval $ac_compile) 2>&5
11359   ac_status=$?
11360   echo "$as_me:11360: \$? = $ac_status" >&5
11361   (exit $ac_status); } &&
11362          { ac_try='test -s conftest.$ac_objext'
11363   { (eval echo "$as_me:11363: \"$ac_try\"") >&5
11364   (eval $ac_try) 2>&5
11365   ac_status=$?
11366   echo "$as_me:11366: \$? = $ac_status" >&5
11367   (exit $ac_status); }; }; then
11368   cf_cv_define_sigwinch=maybe
11369 else
11370   echo "$as_me: failed program was:" >&5
11371 cat conftest.$ac_ext >&5
11372 cf_cv_define_sigwinch=no
11373 fi
11374 rm -f conftest.$ac_objext conftest.$ac_ext
11375
11376 fi
11377 rm -f conftest.$ac_objext conftest.$ac_ext
11378
11379 fi
11380 echo "$as_me:11380: result: $cf_cv_define_sigwinch" >&5
11381 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11382
11383 if test "$cf_cv_define_sigwinch" = maybe ; then
11384 echo "$as_me:11384: checking for actual SIGWINCH definition" >&5
11385 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11386 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11387   echo $ECHO_N "(cached) $ECHO_C" >&6
11388 else
11389
11390 cf_cv_fixup_sigwinch=unknown
11391 cf_sigwinch=32
11392 while test $cf_sigwinch != 1
11393 do
11394         cat >conftest.$ac_ext <<_ACEOF
11395 #line 11395 "configure"
11396 #include "confdefs.h"
11397
11398 #undef _XOPEN_SOURCE
11399 #undef _POSIX_SOURCE
11400 #undef _POSIX_C_SOURCE
11401 #include <sys/types.h>
11402 #include <sys/signal.h>
11403
11404 int
11405 main (void)
11406 {
11407
11408 #if SIGWINCH != $cf_sigwinch
11409 make an error
11410 #endif
11411 int x = SIGWINCH; (void)x
11412   ;
11413   return 0;
11414 }
11415 _ACEOF
11416 rm -f conftest.$ac_objext
11417 if { (eval echo "$as_me:11417: \"$ac_compile\"") >&5
11418   (eval $ac_compile) 2>&5
11419   ac_status=$?
11420   echo "$as_me:11420: \$? = $ac_status" >&5
11421   (exit $ac_status); } &&
11422          { ac_try='test -s conftest.$ac_objext'
11423   { (eval echo "$as_me:11423: \"$ac_try\"") >&5
11424   (eval $ac_try) 2>&5
11425   ac_status=$?
11426   echo "$as_me:11426: \$? = $ac_status" >&5
11427   (exit $ac_status); }; }; then
11428   cf_cv_fixup_sigwinch=$cf_sigwinch
11429          break
11430 else
11431   echo "$as_me: failed program was:" >&5
11432 cat conftest.$ac_ext >&5
11433 fi
11434 rm -f conftest.$ac_objext conftest.$ac_ext
11435
11436 cf_sigwinch=`expr $cf_sigwinch - 1`
11437 done
11438
11439 fi
11440 echo "$as_me:11440: result: $cf_cv_fixup_sigwinch" >&5
11441 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11442
11443         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11444                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11445         fi
11446 fi
11447
11448 # Checks for CODESET support.
11449
11450 echo "$as_me:11450: checking for nl_langinfo and CODESET" >&5
11451 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11452 if test "${am_cv_langinfo_codeset+set}" = set; then
11453   echo $ECHO_N "(cached) $ECHO_C" >&6
11454 else
11455   cat >conftest.$ac_ext <<_ACEOF
11456 #line 11456 "configure"
11457 #include "confdefs.h"
11458 #include <langinfo.h>
11459 int
11460 main (void)
11461 {
11462 char* cs = nl_langinfo(CODESET); (void)cs
11463   ;
11464   return 0;
11465 }
11466 _ACEOF
11467 rm -f conftest.$ac_objext conftest$ac_exeext
11468 if { (eval echo "$as_me:11468: \"$ac_link\"") >&5
11469   (eval $ac_link) 2>&5
11470   ac_status=$?
11471   echo "$as_me:11471: \$? = $ac_status" >&5
11472   (exit $ac_status); } &&
11473          { ac_try='test -s conftest$ac_exeext'
11474   { (eval echo "$as_me:11474: \"$ac_try\"") >&5
11475   (eval $ac_try) 2>&5
11476   ac_status=$?
11477   echo "$as_me:11477: \$? = $ac_status" >&5
11478   (exit $ac_status); }; }; then
11479   am_cv_langinfo_codeset=yes
11480 else
11481   echo "$as_me: failed program was:" >&5
11482 cat conftest.$ac_ext >&5
11483 am_cv_langinfo_codeset=no
11484 fi
11485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11486
11487 fi
11488 echo "$as_me:11488: result: $am_cv_langinfo_codeset" >&5
11489 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11490         if test $am_cv_langinfo_codeset = yes; then
11491
11492 cat >>confdefs.h <<\EOF
11493 #define HAVE_LANGINFO_CODESET 1
11494 EOF
11495
11496         fi
11497
11498 # use these variables to work around a defect in gcc's fixincludes.
11499 NCURSES_OK_WCHAR_T=
11500 NCURSES_OK_WINT_T=
11501
11502 echo "$as_me:11502: checking if you want wide-character code" >&5
11503 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11504
11505 # Check whether --enable-widec or --disable-widec was given.
11506 if test "${enable_widec+set}" = set; then
11507   enableval="$enable_widec"
11508   with_widec=$enableval
11509 else
11510   with_widec=no
11511 fi;
11512 echo "$as_me:11512: result: $with_widec" >&5
11513 echo "${ECHO_T}$with_widec" >&6
11514
11515 NCURSES_WCWIDTH_GRAPHICS=1
11516
11517 if test "x$with_widec" = xyes ; then
11518         if test "x$disable_lib_suffixes" = xno ; then
11519                 LIB_SUFFIX="w${LIB_SUFFIX}"
11520         fi
11521
11522 cat >>confdefs.h <<\EOF
11523 #define USE_WIDEC_SUPPORT 1
11524 EOF
11525
11526 cat >>confdefs.h <<\EOF
11527 #define NCURSES_WIDECHAR 1
11528 EOF
11529
11530 for ac_header in \
11531 wchar.h \
11532 wctype.h \
11533
11534 do
11535 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11536 echo "$as_me:11536: checking for $ac_header" >&5
11537 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11538 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11539   echo $ECHO_N "(cached) $ECHO_C" >&6
11540 else
11541   cat >conftest.$ac_ext <<_ACEOF
11542 #line 11542 "configure"
11543 #include "confdefs.h"
11544 #include <$ac_header>
11545 _ACEOF
11546 if { (eval echo "$as_me:11546: \"$ac_cpp conftest.$ac_ext\"") >&5
11547   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11548   ac_status=$?
11549   egrep -v '^ *\+' conftest.er1 >conftest.err
11550   rm -f conftest.er1
11551   cat conftest.err >&5
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit $ac_status); } >/dev/null; then
11554   if test -s conftest.err; then
11555     ac_cpp_err=$ac_c_preproc_warn_flag
11556   else
11557     ac_cpp_err=
11558   fi
11559 else
11560   ac_cpp_err=yes
11561 fi
11562 if test -z "$ac_cpp_err"; then
11563   eval "$as_ac_Header=yes"
11564 else
11565   echo "$as_me: failed program was:" >&5
11566   cat conftest.$ac_ext >&5
11567   eval "$as_ac_Header=no"
11568 fi
11569 rm -f conftest.err conftest.$ac_ext
11570 fi
11571 echo "$as_me:11571: result: `eval echo '${'$as_ac_Header'}'`" >&5
11572 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11573 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11574   cat >>confdefs.h <<EOF
11575 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11576 EOF
11577
11578 fi
11579 done
11580
11581 echo "$as_me:11581: checking if wchar.h can be used as is" >&5
11582 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11583 if test "${cf_cv_wchar_h_okay+set}" = set; then
11584   echo $ECHO_N "(cached) $ECHO_C" >&6
11585 else
11586
11587 cat >conftest.$ac_ext <<_ACEOF
11588 #line 11588 "configure"
11589 #include "confdefs.h"
11590
11591 #include <stdlib.h>
11592 #ifdef HAVE_WCHAR_H
11593 #include <wchar.h>
11594 #endif
11595 #ifdef HAVE_WCTYPE_H
11596 #include <wctype.h>
11597 #endif
11598
11599 int
11600 main (void)
11601 {
11602
11603         wint_t foo = 0;
11604         int bar = iswpunct(foo)
11605   ;
11606   return 0;
11607 }
11608 _ACEOF
11609 rm -f conftest.$ac_objext
11610 if { (eval echo "$as_me:11610: \"$ac_compile\"") >&5
11611   (eval $ac_compile) 2>&5
11612   ac_status=$?
11613   echo "$as_me:11613: \$? = $ac_status" >&5
11614   (exit $ac_status); } &&
11615          { ac_try='test -s conftest.$ac_objext'
11616   { (eval echo "$as_me:11616: \"$ac_try\"") >&5
11617   (eval $ac_try) 2>&5
11618   ac_status=$?
11619   echo "$as_me:11619: \$? = $ac_status" >&5
11620   (exit $ac_status); }; }; then
11621   cf_cv_wchar_h_okay=yes
11622 else
11623   echo "$as_me: failed program was:" >&5
11624 cat conftest.$ac_ext >&5
11625 cf_cv_wchar_h_okay=no
11626 fi
11627 rm -f conftest.$ac_objext conftest.$ac_ext
11628 fi
11629 echo "$as_me:11629: result: $cf_cv_wchar_h_okay" >&5
11630 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11631
11632 if test $cf_cv_wchar_h_okay = no
11633 then
11634
11635 echo "$as_me:11635: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11636 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11637 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640 #include <sys/types.h>
11641
11642 int
11643 main (void)
11644 {
11645
11646 #ifndef _XOPEN_SOURCE_EXTENDED
11647 make an error
11648 #endif
11649   ;
11650   return 0;
11651 }
11652 _ACEOF
11653 rm -f conftest.$ac_objext
11654 if { (eval echo "$as_me:11654: \"$ac_compile\"") >&5
11655   (eval $ac_compile) 2>&5
11656   ac_status=$?
11657   echo "$as_me:11657: \$? = $ac_status" >&5
11658   (exit $ac_status); } &&
11659          { ac_try='test -s conftest.$ac_objext'
11660   { (eval echo "$as_me:11660: \"$ac_try\"") >&5
11661   (eval $ac_try) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit $ac_status); }; }; then
11665   cf_result=no
11666 else
11667   echo "$as_me: failed program was:" >&5
11668 cat conftest.$ac_ext >&5
11669 cf_result=yes
11670 fi
11671 rm -f conftest.$ac_objext conftest.$ac_ext
11672 echo "$as_me:11672: result: $cf_result" >&5
11673 echo "${ECHO_T}$cf_result" >&6
11674
11675 if test "$cf_result" = yes ; then
11676         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11677 elif test "x" != "x" ; then
11678         echo "$as_me:11678: checking checking for compatible value versus " >&5
11679 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11680         cat >conftest.$ac_ext <<_ACEOF
11681 #line 11681 "configure"
11682 #include "confdefs.h"
11683 #include <sys/types.h>
11684
11685 int
11686 main (void)
11687 {
11688
11689 #if _XOPEN_SOURCE_EXTENDED- < 0
11690 make an error
11691 #endif
11692   ;
11693   return 0;
11694 }
11695 _ACEOF
11696 rm -f conftest.$ac_objext
11697 if { (eval echo "$as_me:11697: \"$ac_compile\"") >&5
11698   (eval $ac_compile) 2>&5
11699   ac_status=$?
11700   echo "$as_me:11700: \$? = $ac_status" >&5
11701   (exit $ac_status); } &&
11702          { ac_try='test -s conftest.$ac_objext'
11703   { (eval echo "$as_me:11703: \"$ac_try\"") >&5
11704   (eval $ac_try) 2>&5
11705   ac_status=$?
11706   echo "$as_me:11706: \$? = $ac_status" >&5
11707   (exit $ac_status); }; }; then
11708   cf_result=yes
11709 else
11710   echo "$as_me: failed program was:" >&5
11711 cat conftest.$ac_ext >&5
11712 cf_result=no
11713 fi
11714 rm -f conftest.$ac_objext conftest.$ac_ext
11715         echo "$as_me:11715: result: $cf_result" >&5
11716 echo "${ECHO_T}$cf_result" >&6
11717         if test "$cf_result" = no ; then
11718                 # perhaps we can override it - try...
11719                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11720         fi
11721 fi
11722
11723 fi
11724
11725 echo "$as_me:11725: checking if wcwidth agrees graphics are single-width" >&5
11726 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11727 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11728   echo $ECHO_N "(cached) $ECHO_C" >&6
11729 else
11730
11731 cat >conftest.in <<CF_EOF
11732 -       VT100 symbols
11733 0x250c  upper left corner
11734 0x2514  lower left corner
11735 0x2510  upper right corner
11736 0x2518  lower right corner
11737 0x251c  tee pointing left
11738 0x2524  tee pointing right
11739 0x2534  tee pointing up
11740 0x252c  tee pointing down
11741 0x2500  horizontal line
11742 0x2502  vertical line
11743 0x253c  large plus or crossover
11744 0x23ba  scan line 1
11745 0x23bd  scan line 9
11746 0x25c6  diamond
11747 0x2592  checker board (stipple)
11748 0x00b0  degree symbol
11749 0x00b1  plus/minus
11750 0x00b7  bullet
11751 -       Teletype 5410v1 symbols
11752 0x2190  arrow pointing left
11753 0x2192  arrow pointing right
11754 0x2193  arrow pointing down
11755 0x2191  arrow pointing up
11756 0x2592  board of squares
11757 0x2603  lantern symbol
11758 0x25ae  solid square block
11759 -       these defaults were invented for ncurses
11760 0x23bb  scan line 3
11761 0x23bc  scan line 7
11762 0x2264  less-than-or-equal-to
11763 0x2265  greater-than-or-equal-to
11764 0x03c0  greek pi
11765 0x2260  not-equal
11766 0x00a3  pound-sterling symbol
11767 -       thick-line-drawing
11768 0x250f  upper left corner
11769 0x2517  lower left corner
11770 0x2513  upper right corner
11771 0x251b  lower right corner
11772 0x2523  tee pointing left
11773 0x252b  tee pointing right
11774 0x253b  tee pointing up
11775 0x2533  tee pointing down
11776 0x2501  horizontal line
11777 0x2503  vertical line
11778 0x254b  large plus or crossover
11779 -       double-line-drawing
11780 0x2554  upper left corner
11781 0x255a  lower left corner
11782 0x2557  upper right corner
11783 0x255d  lower right corner
11784 0x2563  tee pointing left
11785 0x2560  tee pointing right
11786 0x2569  tee pointing up
11787 0x2566  tee pointing down
11788 0x2550  horizontal line
11789 0x2551  vertical line
11790 0x256c  large plus or crossover
11791 CF_EOF
11792 if test "$cross_compiling" = yes; then
11793   cf_cv_wcwidth_graphics=unknown
11794 else
11795   cat >conftest.$ac_ext <<_ACEOF
11796 #line 11796 "configure"
11797 #include "confdefs.h"
11798
11799 #include <locale.h>
11800 #include <stdio.h>
11801 #include <wchar.h>
11802
11803 #define MY_LEN 80
11804
11805 int
11806 main(void)
11807 {
11808         FILE *fp;
11809         int value;
11810         char buffer[MY_LEN + 1];
11811         char notes[MY_LEN + 1];
11812         int totals = 0;
11813         int passed = 0;
11814
11815         if (setlocale(LC_ALL, "en_US.UTF8") ||
11816                 setlocale(LC_ALL, "en_US.UTF-8") ||
11817                 setlocale(LC_ALL, "en_US.utf8") ||
11818                 setlocale(LC_ALL, "en_US.utf-8")) {
11819                 if ((fp = fopen("conftest.in", "r")) != 0) {
11820                         while (fgets(buffer, MY_LEN, fp) != 0) {
11821                                 if (*buffer == '-') {
11822                                         fprintf(stderr, "\t%s", buffer);
11823                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11824                                         ++totals;
11825                                         if (wcwidth(value) == 1)
11826                                                 ++passed;
11827                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11828                                 } else {
11829                                         fprintf(stderr, "?\t%s", buffer);
11830                                 }
11831                         }
11832                 }
11833         }
11834         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11835         return (totals == passed) ? 0 : 1;
11836 }
11837
11838 _ACEOF
11839 rm -f conftest$ac_exeext
11840 if { (eval echo "$as_me:11840: \"$ac_link\"") >&5
11841   (eval $ac_link) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11845   { (eval echo "$as_me:11845: \"$ac_try\"") >&5
11846   (eval $ac_try) 2>&5
11847   ac_status=$?
11848   echo "$as_me:11848: \$? = $ac_status" >&5
11849   (exit $ac_status); }; }; then
11850   cf_cv_wcwidth_graphics=yes
11851 else
11852   echo "$as_me: program exited with status $ac_status" >&5
11853 echo "$as_me: failed program was:" >&5
11854 cat conftest.$ac_ext >&5
11855 cf_cv_wcwidth_graphics=no
11856 fi
11857 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11858 fi
11859
11860 fi
11861 echo "$as_me:11861: result: $cf_cv_wcwidth_graphics" >&5
11862 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11863
11864         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11865
11866         # with_overwrite=no
11867         NCURSES_CH_T=cchar_t
11868
11869 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11870 do
11871 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11872 echo "$as_me:11872: checking for $ac_func" >&5
11873 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11874 if eval "test \"\${$as_ac_var+set}\" = set"; then
11875   echo $ECHO_N "(cached) $ECHO_C" >&6
11876 else
11877   cat >conftest.$ac_ext <<_ACEOF
11878 #line 11878 "configure"
11879 #include "confdefs.h"
11880 #define $ac_func autoconf_temporary
11881 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11882 #undef $ac_func
11883
11884 #ifdef __cplusplus
11885 extern "C"
11886 #endif
11887
11888 /* We use char because int might match the return type of a gcc2
11889    builtin and then its argument prototype would still apply.  */
11890 char $ac_func (void);
11891
11892 int
11893 main (void)
11894 {
11895
11896 /* The GNU C library defines stubs for functions which it implements
11897     to always fail with ENOSYS.  Some functions are actually named
11898     something starting with __ and the normal name is an alias.  */
11899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11900 #error found stub for $ac_func
11901 #endif
11902
11903         return $ac_func ();
11904   ;
11905   return 0;
11906 }
11907 _ACEOF
11908 rm -f conftest.$ac_objext conftest$ac_exeext
11909 if { (eval echo "$as_me:11909: \"$ac_link\"") >&5
11910   (eval $ac_link) 2>&5
11911   ac_status=$?
11912   echo "$as_me:11912: \$? = $ac_status" >&5
11913   (exit $ac_status); } &&
11914          { ac_try='test -s conftest$ac_exeext'
11915   { (eval echo "$as_me:11915: \"$ac_try\"") >&5
11916   (eval $ac_try) 2>&5
11917   ac_status=$?
11918   echo "$as_me:11918: \$? = $ac_status" >&5
11919   (exit $ac_status); }; }; then
11920   eval "$as_ac_var=yes"
11921 else
11922   echo "$as_me: failed program was:" >&5
11923 cat conftest.$ac_ext >&5
11924 eval "$as_ac_var=no"
11925 fi
11926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11927 fi
11928 echo "$as_me:11928: result: `eval echo '${'$as_ac_var'}'`" >&5
11929 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11930 if test `eval echo '${'$as_ac_var'}'` = yes; then
11931   cat >>confdefs.h <<EOF
11932 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11933 EOF
11934
11935 fi
11936 done
11937
11938         if test "x$ac_cv_func_putwc" != xyes ; then
11939
11940 echo "$as_me:11940: checking for multibyte character support" >&5
11941 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11942 if test "${cf_cv_utf8_lib+set}" = set; then
11943   echo $ECHO_N "(cached) $ECHO_C" >&6
11944 else
11945
11946         cf_save_LIBS="$LIBS"
11947         cat >conftest.$ac_ext <<_ACEOF
11948 #line 11948 "configure"
11949 #include "confdefs.h"
11950
11951 #include <stdlib.h>
11952 int
11953 main (void)
11954 {
11955 putwc(0,0);
11956   ;
11957   return 0;
11958 }
11959 _ACEOF
11960 rm -f conftest.$ac_objext conftest$ac_exeext
11961 if { (eval echo "$as_me:11961: \"$ac_link\"") >&5
11962   (eval $ac_link) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); } &&
11966          { ac_try='test -s conftest$ac_exeext'
11967   { (eval echo "$as_me:11967: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:11970: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   cf_cv_utf8_lib=yes
11973 else
11974   echo "$as_me: failed program was:" >&5
11975 cat conftest.$ac_ext >&5
11976
11977 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11978 # will be set on completion of the AC_TRY_LINK below.
11979 cf_cv_header_path_utf8=
11980 cf_cv_library_path_utf8=
11981
11982 echo "${as_me:-configure}:11982: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11983
11984 cf_save_LIBS="$LIBS"
11985
11986 cat >conftest.$ac_ext <<_ACEOF
11987 #line 11987 "configure"
11988 #include "confdefs.h"
11989
11990 #include <libutf8.h>
11991 int
11992 main (void)
11993 {
11994 putwc(0,0);
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 rm -f conftest.$ac_objext conftest$ac_exeext
12000 if { (eval echo "$as_me:12000: \"$ac_link\"") >&5
12001   (eval $ac_link) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); } &&
12005          { ac_try='test -s conftest$ac_exeext'
12006   { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007   (eval $ac_try) 2>&5
12008   ac_status=$?
12009   echo "$as_me:12009: \$? = $ac_status" >&5
12010   (exit $ac_status); }; }; then
12011
12012         cf_cv_find_linkage_utf8=yes
12013         cf_cv_header_path_utf8=/usr/include
12014         cf_cv_library_path_utf8=/usr/lib
12015
12016 else
12017   echo "$as_me: failed program was:" >&5
12018 cat conftest.$ac_ext >&5
12019
12020 LIBS="-lutf8  $cf_save_LIBS"
12021
12022 cat >conftest.$ac_ext <<_ACEOF
12023 #line 12023 "configure"
12024 #include "confdefs.h"
12025
12026 #include <libutf8.h>
12027 int
12028 main (void)
12029 {
12030 putwc(0,0);
12031   ;
12032   return 0;
12033 }
12034 _ACEOF
12035 rm -f conftest.$ac_objext conftest$ac_exeext
12036 if { (eval echo "$as_me:12036: \"$ac_link\"") >&5
12037   (eval $ac_link) 2>&5
12038   ac_status=$?
12039   echo "$as_me:12039: \$? = $ac_status" >&5
12040   (exit $ac_status); } &&
12041          { ac_try='test -s conftest$ac_exeext'
12042   { (eval echo "$as_me:12042: \"$ac_try\"") >&5
12043   (eval $ac_try) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit $ac_status); }; }; then
12047
12048         cf_cv_find_linkage_utf8=yes
12049         cf_cv_header_path_utf8=/usr/include
12050         cf_cv_library_path_utf8=/usr/lib
12051         cf_cv_library_file_utf8="-lutf8"
12052
12053 else
12054   echo "$as_me: failed program was:" >&5
12055 cat conftest.$ac_ext >&5
12056
12057         cf_cv_find_linkage_utf8=no
12058         LIBS="$cf_save_LIBS"
12059
12060         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12061
12062 echo "${as_me:-configure}:12062: testing find linkage for utf8 library ..." 1>&5
12063
12064 echo "${as_me:-configure}:12064: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12065
12066         cf_save_CPPFLAGS="$CPPFLAGS"
12067         cf_test_CPPFLAGS="$CPPFLAGS"
12068
12069 cf_search=
12070
12071 # collect the current set of include-directories from compiler flags
12072 cf_header_path_list=""
12073 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12074         for cf_header_path in $CPPFLAGS $CFLAGS
12075         do
12076                 case $cf_header_path in
12077                 (-I*)
12078                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12079
12080 test "x$cf_header_path" != "xNONE" && \
12081 test -d "$cf_header_path" && \
12082  {
12083         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12084         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12085         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12086         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12087         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12088         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12089 }
12090
12091                         cf_header_path_list="$cf_header_path_list $cf_search"
12092                         ;;
12093                 esac
12094         done
12095 fi
12096
12097 # add the variations for the package we are looking for
12098
12099 cf_search=
12100
12101 test "x$prefix" != "xNONE" && \
12102 test -d "$prefix" && \
12103  {
12104         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12105         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12106         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12107         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12108         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12109         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12110 }
12111
12112 for cf_subdir_prefix in \
12113         /usr \
12114         /usr/local \
12115         /usr/pkg \
12116         /opt \
12117         /opt/local \
12118         $HOME
12119 do
12120
12121 test "x$cf_subdir_prefix" != "x$prefix" && \
12122 test -d "$cf_subdir_prefix" && \
12123 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12124         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12125         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12126         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12127         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12128         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12129         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12130 }
12131
12132 done
12133
12134 test "$includedir" != NONE && \
12135 test "$includedir" != "/usr/include" && \
12136 test -d "$includedir" && {
12137         test -d $includedir &&    cf_search="$cf_search $includedir"
12138         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12139 }
12140
12141 test "$oldincludedir" != NONE && \
12142 test "$oldincludedir" != "/usr/include" && \
12143 test -d "$oldincludedir" && {
12144         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12145         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12146 }
12147
12148 cf_search="$cf_search $cf_header_path_list"
12149
12150         for cf_cv_header_path_utf8 in $cf_search
12151         do
12152                 if test -d $cf_cv_header_path_utf8 ; then
12153                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12154
12155 echo "${as_me:-configure}:12155: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12156
12157                         CPPFLAGS="$cf_save_CPPFLAGS"
12158
12159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12160         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12161
12162                         cat >conftest.$ac_ext <<_ACEOF
12163 #line 12163 "configure"
12164 #include "confdefs.h"
12165
12166 #include <libutf8.h>
12167 int
12168 main (void)
12169 {
12170 putwc(0,0);
12171   ;
12172   return 0;
12173 }
12174 _ACEOF
12175 rm -f conftest.$ac_objext
12176 if { (eval echo "$as_me:12176: \"$ac_compile\"") >&5
12177   (eval $ac_compile) 2>&5
12178   ac_status=$?
12179   echo "$as_me:12179: \$? = $ac_status" >&5
12180   (exit $ac_status); } &&
12181          { ac_try='test -s conftest.$ac_objext'
12182   { (eval echo "$as_me:12182: \"$ac_try\"") >&5
12183   (eval $ac_try) 2>&5
12184   ac_status=$?
12185   echo "$as_me:12185: \$? = $ac_status" >&5
12186   (exit $ac_status); }; }; then
12187
12188                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12189
12190 echo "${as_me:-configure}:12190: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12191
12192                                 cf_cv_find_linkage_utf8=maybe
12193                                 cf_test_CPPFLAGS="$CPPFLAGS"
12194                                 break
12195 else
12196   echo "$as_me: failed program was:" >&5
12197 cat conftest.$ac_ext >&5
12198
12199                                 CPPFLAGS="$cf_save_CPPFLAGS"
12200
12201 fi
12202 rm -f conftest.$ac_objext conftest.$ac_ext
12203                 fi
12204         done
12205
12206         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12207
12208 echo "${as_me:-configure}:12208: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12209
12210                 cf_save_LIBS="$LIBS"
12211                 cf_save_LDFLAGS="$LDFLAGS"
12212
12213                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12214
12215 cf_search=
12216 cf_library_path_list=""
12217 if test -n "${LDFLAGS}${LIBS}" ; then
12218         for cf_library_path in $LDFLAGS $LIBS
12219         do
12220                 case $cf_library_path in
12221                 (-L*)
12222                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12223
12224 test "x$cf_library_path" != "xNONE" && \
12225 test -d "$cf_library_path" && \
12226  {
12227         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12228         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12229         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12230         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12231         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12232         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12233 }
12234
12235                         cf_library_path_list="$cf_library_path_list $cf_search"
12236                         ;;
12237                 esac
12238         done
12239 fi
12240
12241 cf_search=
12242
12243 test "x$prefix" != "xNONE" && \
12244 test -d "$prefix" && \
12245  {
12246         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12247         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12248         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12249         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12250         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12251         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12252 }
12253
12254 for cf_subdir_prefix in \
12255         /usr \
12256         /usr/local \
12257         /usr/pkg \
12258         /opt \
12259         /opt/local \
12260         $HOME
12261 do
12262
12263 test "x$cf_subdir_prefix" != "x$prefix" && \
12264 test -d "$cf_subdir_prefix" && \
12265 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12266         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12267         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12268         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12269         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12270         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12271         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12272 }
12273
12274 done
12275
12276 cf_search="$cf_library_path_list $cf_search"
12277
12278                         for cf_cv_library_path_utf8 in $cf_search
12279                         do
12280                                 if test -d $cf_cv_library_path_utf8 ; then
12281                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12282
12283 echo "${as_me:-configure}:12283: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12284
12285                                         CPPFLAGS="$cf_test_CPPFLAGS"
12286                                         LIBS="-lutf8  $cf_save_LIBS"
12287                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12288                                         cat >conftest.$ac_ext <<_ACEOF
12289 #line 12289 "configure"
12290 #include "confdefs.h"
12291
12292 #include <libutf8.h>
12293 int
12294 main (void)
12295 {
12296 putwc(0,0);
12297   ;
12298   return 0;
12299 }
12300 _ACEOF
12301 rm -f conftest.$ac_objext conftest$ac_exeext
12302 if { (eval echo "$as_me:12302: \"$ac_link\"") >&5
12303   (eval $ac_link) 2>&5
12304   ac_status=$?
12305   echo "$as_me:12305: \$? = $ac_status" >&5
12306   (exit $ac_status); } &&
12307          { ac_try='test -s conftest$ac_exeext'
12308   { (eval echo "$as_me:12308: \"$ac_try\"") >&5
12309   (eval $ac_try) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); }; }; then
12313
12314                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12315
12316 echo "${as_me:-configure}:12316: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12317
12318                                         cf_cv_find_linkage_utf8=yes
12319                                         cf_cv_library_file_utf8="-lutf8"
12320                                         break
12321 else
12322   echo "$as_me: failed program was:" >&5
12323 cat conftest.$ac_ext >&5
12324
12325                                         CPPFLAGS="$cf_save_CPPFLAGS"
12326                                         LIBS="$cf_save_LIBS"
12327                                         LDFLAGS="$cf_save_LDFLAGS"
12328
12329 fi
12330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12331                                 fi
12332                         done
12333                         CPPFLAGS="$cf_save_CPPFLAGS"
12334                         LDFLAGS="$cf_save_LDFLAGS"
12335                 fi
12336
12337         else
12338                 cf_cv_find_linkage_utf8=no
12339         fi
12340
12341 fi
12342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12343
12344 fi
12345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12346
12347 LIBS="$cf_save_LIBS"
12348
12349 if test "$cf_cv_find_linkage_utf8" = yes ; then
12350 cf_cv_utf8_lib=add-on
12351 else
12352 cf_cv_utf8_lib=no
12353 fi
12354
12355 fi
12356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12357 fi
12358 echo "$as_me:12358: result: $cf_cv_utf8_lib" >&5
12359 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12360
12361 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12362 # ncurses/ncursesw:
12363 if test "$cf_cv_utf8_lib" = "add-on" ; then
12364
12365 cat >>confdefs.h <<\EOF
12366 #define HAVE_LIBUTF8_H 1
12367 EOF
12368
12369 if test -n "$cf_cv_header_path_utf8" ; then
12370   for cf_add_incdir in $cf_cv_header_path_utf8
12371   do
12372         while test $cf_add_incdir != /usr/include
12373         do
12374           if test -d $cf_add_incdir
12375           then
12376                 cf_have_incdir=no
12377                 if test -n "$CFLAGS$CPPFLAGS" ; then
12378                   # a loop is needed to ensure we can add subdirs of existing dirs
12379                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12380                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12381                           cf_have_incdir=yes; break
12382                         fi
12383                   done
12384                 fi
12385
12386                 if test "$cf_have_incdir" = no ; then
12387                   if test "$cf_add_incdir" = /usr/local/include ; then
12388                         if test "$GCC" = yes
12389                         then
12390                           cf_save_CPPFLAGS=$CPPFLAGS
12391
12392         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12393         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12394
12395                           cat >conftest.$ac_ext <<_ACEOF
12396 #line 12396 "configure"
12397 #include "confdefs.h"
12398 #include <stdio.h>
12399 int
12400 main (void)
12401 {
12402 printf("Hello")
12403   ;
12404   return 0;
12405 }
12406 _ACEOF
12407 rm -f conftest.$ac_objext
12408 if { (eval echo "$as_me:12408: \"$ac_compile\"") >&5
12409   (eval $ac_compile) 2>&5
12410   ac_status=$?
12411   echo "$as_me:12411: \$? = $ac_status" >&5
12412   (exit $ac_status); } &&
12413          { ac_try='test -s conftest.$ac_objext'
12414   { (eval echo "$as_me:12414: \"$ac_try\"") >&5
12415   (eval $ac_try) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); }; }; then
12419   :
12420 else
12421   echo "$as_me: failed program was:" >&5
12422 cat conftest.$ac_ext >&5
12423 cf_have_incdir=yes
12424 fi
12425 rm -f conftest.$ac_objext conftest.$ac_ext
12426                           CPPFLAGS=$cf_save_CPPFLAGS
12427                         fi
12428                   fi
12429                 fi
12430
12431                 if test "$cf_have_incdir" = no ; then
12432                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12433
12434 echo "${as_me:-configure}:12434: testing adding $cf_add_incdir to include-path ..." 1>&5
12435
12436                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12437
12438                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12439                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12440                   cf_add_incdir="$cf_top_incdir"
12441                 else
12442                   break
12443                 fi
12444           else
12445                 break
12446           fi
12447         done
12448   done
12449 fi
12450
12451 if test -n "$cf_cv_library_path_utf8" ; then
12452         for cf_add_libdir in $cf_cv_library_path_utf8
12453         do
12454                 if test $cf_add_libdir = /usr/lib ; then
12455                         :
12456                 elif test -d $cf_add_libdir
12457                 then
12458                         cf_have_libdir=no
12459                         if test -n "$LDFLAGS$LIBS" ; then
12460                                 # a loop is needed to ensure we can add subdirs of existing dirs
12461                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12462                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12463                                                 cf_have_libdir=yes; break
12464                                         fi
12465                                 done
12466                         fi
12467                         if test "$cf_have_libdir" = no ; then
12468                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12469
12470 echo "${as_me:-configure}:12470: testing adding $cf_add_libdir to library-path ..." 1>&5
12471
12472                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12473                         fi
12474                 fi
12475         done
12476 fi
12477
12478 cf_add_libs="$LIBS"
12479 # reverse order
12480 cf_add_0lib=
12481 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12482 # filter duplicates
12483 for cf_add_1lib in $cf_add_0lib; do
12484         for cf_add_2lib in $cf_add_libs; do
12485                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12486                         cf_add_1lib=
12487                         break
12488                 fi
12489         done
12490         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12491 done
12492 LIBS="$cf_add_libs"
12493
12494 fi
12495
12496                 if test "$cf_cv_utf8_lib" != no ; then
12497                         NCURSES_LIBUTF8=1
12498                 fi
12499         fi
12500
12501 # This is needed on Tru64 5.0 to declare mbstate_t
12502 echo "$as_me:12502: checking if we must include wchar.h to declare mbstate_t" >&5
12503 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12504 if test "${cf_cv_mbstate_t+set}" = set; then
12505   echo $ECHO_N "(cached) $ECHO_C" >&6
12506 else
12507
12508 cat >conftest.$ac_ext <<_ACEOF
12509 #line 12509 "configure"
12510 #include "confdefs.h"
12511
12512 #include <stdlib.h>
12513 #include <stdarg.h>
12514 #include <stdio.h>
12515 #ifdef HAVE_LIBUTF8_H
12516 #include <libutf8.h>
12517 #endif
12518 int
12519 main (void)
12520 {
12521 mbstate_t state
12522   ;
12523   return 0;
12524 }
12525 _ACEOF
12526 rm -f conftest.$ac_objext
12527 if { (eval echo "$as_me:12527: \"$ac_compile\"") >&5
12528   (eval $ac_compile) 2>&5
12529   ac_status=$?
12530   echo "$as_me:12530: \$? = $ac_status" >&5
12531   (exit $ac_status); } &&
12532          { ac_try='test -s conftest.$ac_objext'
12533   { (eval echo "$as_me:12533: \"$ac_try\"") >&5
12534   (eval $ac_try) 2>&5
12535   ac_status=$?
12536   echo "$as_me:12536: \$? = $ac_status" >&5
12537   (exit $ac_status); }; }; then
12538   cf_cv_mbstate_t=no
12539 else
12540   echo "$as_me: failed program was:" >&5
12541 cat conftest.$ac_ext >&5
12542 cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545
12546 #include <stdlib.h>
12547 #include <stdarg.h>
12548 #include <stdio.h>
12549 #include <wchar.h>
12550 #ifdef HAVE_LIBUTF8_H
12551 #include <libutf8.h>
12552 #endif
12553 int
12554 main (void)
12555 {
12556 mbstate_t value
12557   ;
12558   return 0;
12559 }
12560 _ACEOF
12561 rm -f conftest.$ac_objext
12562 if { (eval echo "$as_me:12562: \"$ac_compile\"") >&5
12563   (eval $ac_compile) 2>&5
12564   ac_status=$?
12565   echo "$as_me:12565: \$? = $ac_status" >&5
12566   (exit $ac_status); } &&
12567          { ac_try='test -s conftest.$ac_objext'
12568   { (eval echo "$as_me:12568: \"$ac_try\"") >&5
12569   (eval $ac_try) 2>&5
12570   ac_status=$?
12571   echo "$as_me:12571: \$? = $ac_status" >&5
12572   (exit $ac_status); }; }; then
12573   cf_cv_mbstate_t=yes
12574 else
12575   echo "$as_me: failed program was:" >&5
12576 cat conftest.$ac_ext >&5
12577 cf_cv_mbstate_t=unknown
12578 fi
12579 rm -f conftest.$ac_objext conftest.$ac_ext
12580 fi
12581 rm -f conftest.$ac_objext conftest.$ac_ext
12582 fi
12583 echo "$as_me:12583: result: $cf_cv_mbstate_t" >&5
12584 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12585
12586 if test "$cf_cv_mbstate_t" = yes ; then
12587
12588 cat >>confdefs.h <<\EOF
12589 #define NEED_WCHAR_H 1
12590 EOF
12591
12592         NEED_WCHAR_H=1
12593 fi
12594
12595 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12596 if test "$cf_cv_mbstate_t" = unknown ; then
12597         NCURSES_MBSTATE_T=1
12598 fi
12599
12600 # This is needed on Tru64 5.0 to declare wchar_t
12601 echo "$as_me:12601: checking if we must include wchar.h to declare wchar_t" >&5
12602 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12603 if test "${cf_cv_wchar_t+set}" = set; then
12604   echo $ECHO_N "(cached) $ECHO_C" >&6
12605 else
12606
12607 cat >conftest.$ac_ext <<_ACEOF
12608 #line 12608 "configure"
12609 #include "confdefs.h"
12610
12611 #include <stdlib.h>
12612 #include <stdarg.h>
12613 #include <stdio.h>
12614 #ifdef HAVE_LIBUTF8_H
12615 #include <libutf8.h>
12616 #endif
12617 int
12618 main (void)
12619 {
12620 wchar_t state
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f conftest.$ac_objext
12626 if { (eval echo "$as_me:12626: \"$ac_compile\"") >&5
12627   (eval $ac_compile) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit $ac_status); } &&
12631          { ac_try='test -s conftest.$ac_objext'
12632   { (eval echo "$as_me:12632: \"$ac_try\"") >&5
12633   (eval $ac_try) 2>&5
12634   ac_status=$?
12635   echo "$as_me:12635: \$? = $ac_status" >&5
12636   (exit $ac_status); }; }; then
12637   cf_cv_wchar_t=no
12638 else
12639   echo "$as_me: failed program was:" >&5
12640 cat conftest.$ac_ext >&5
12641 cat >conftest.$ac_ext <<_ACEOF
12642 #line 12642 "configure"
12643 #include "confdefs.h"
12644
12645 #include <stdlib.h>
12646 #include <stdarg.h>
12647 #include <stdio.h>
12648 #include <wchar.h>
12649 #ifdef HAVE_LIBUTF8_H
12650 #include <libutf8.h>
12651 #endif
12652 int
12653 main (void)
12654 {
12655 wchar_t value
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f conftest.$ac_objext
12661 if { (eval echo "$as_me:12661: \"$ac_compile\"") >&5
12662   (eval $ac_compile) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); } &&
12666          { ac_try='test -s conftest.$ac_objext'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); }; }; then
12672   cf_cv_wchar_t=yes
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 cat conftest.$ac_ext >&5
12676 cf_cv_wchar_t=unknown
12677 fi
12678 rm -f conftest.$ac_objext conftest.$ac_ext
12679 fi
12680 rm -f conftest.$ac_objext conftest.$ac_ext
12681 fi
12682 echo "$as_me:12682: result: $cf_cv_wchar_t" >&5
12683 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12684
12685 if test "$cf_cv_wchar_t" = yes ; then
12686
12687 cat >>confdefs.h <<\EOF
12688 #define NEED_WCHAR_H 1
12689 EOF
12690
12691         NEED_WCHAR_H=1
12692 fi
12693
12694 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12695 if test "$cf_cv_wchar_t" = unknown ; then
12696         NCURSES_WCHAR_T=1
12697 fi
12698
12699 # if we find wchar_t in either place, use substitution to provide a fallback.
12700 if test "$cf_cv_wchar_t" != unknown ; then
12701         NCURSES_OK_WCHAR_T=1
12702 fi
12703
12704 # This is needed on Tru64 5.0 to declare wint_t
12705 echo "$as_me:12705: checking if we must include wchar.h to declare wint_t" >&5
12706 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12707 if test "${cf_cv_wint_t+set}" = set; then
12708   echo $ECHO_N "(cached) $ECHO_C" >&6
12709 else
12710
12711 cat >conftest.$ac_ext <<_ACEOF
12712 #line 12712 "configure"
12713 #include "confdefs.h"
12714
12715 #include <stdlib.h>
12716 #include <stdarg.h>
12717 #include <stdio.h>
12718 #ifdef HAVE_LIBUTF8_H
12719 #include <libutf8.h>
12720 #endif
12721 int
12722 main (void)
12723 {
12724 wint_t state
12725   ;
12726   return 0;
12727 }
12728 _ACEOF
12729 rm -f conftest.$ac_objext
12730 if { (eval echo "$as_me:12730: \"$ac_compile\"") >&5
12731   (eval $ac_compile) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit $ac_status); } &&
12735          { ac_try='test -s conftest.$ac_objext'
12736   { (eval echo "$as_me:12736: \"$ac_try\"") >&5
12737   (eval $ac_try) 2>&5
12738   ac_status=$?
12739   echo "$as_me:12739: \$? = $ac_status" >&5
12740   (exit $ac_status); }; }; then
12741   cf_cv_wint_t=no
12742 else
12743   echo "$as_me: failed program was:" >&5
12744 cat conftest.$ac_ext >&5
12745 cat >conftest.$ac_ext <<_ACEOF
12746 #line 12746 "configure"
12747 #include "confdefs.h"
12748
12749 #include <stdlib.h>
12750 #include <stdarg.h>
12751 #include <stdio.h>
12752 #include <wchar.h>
12753 #ifdef HAVE_LIBUTF8_H
12754 #include <libutf8.h>
12755 #endif
12756 int
12757 main (void)
12758 {
12759 wint_t value
12760   ;
12761   return 0;
12762 }
12763 _ACEOF
12764 rm -f conftest.$ac_objext
12765 if { (eval echo "$as_me:12765: \"$ac_compile\"") >&5
12766   (eval $ac_compile) 2>&5
12767   ac_status=$?
12768   echo "$as_me:12768: \$? = $ac_status" >&5
12769   (exit $ac_status); } &&
12770          { ac_try='test -s conftest.$ac_objext'
12771   { (eval echo "$as_me:12771: \"$ac_try\"") >&5
12772   (eval $ac_try) 2>&5
12773   ac_status=$?
12774   echo "$as_me:12774: \$? = $ac_status" >&5
12775   (exit $ac_status); }; }; then
12776   cf_cv_wint_t=yes
12777 else
12778   echo "$as_me: failed program was:" >&5
12779 cat conftest.$ac_ext >&5
12780 cf_cv_wint_t=unknown
12781 fi
12782 rm -f conftest.$ac_objext conftest.$ac_ext
12783 fi
12784 rm -f conftest.$ac_objext conftest.$ac_ext
12785 fi
12786 echo "$as_me:12786: result: $cf_cv_wint_t" >&5
12787 echo "${ECHO_T}$cf_cv_wint_t" >&6
12788
12789 if test "$cf_cv_wint_t" = yes ; then
12790
12791 cat >>confdefs.h <<\EOF
12792 #define NEED_WCHAR_H 1
12793 EOF
12794
12795         NEED_WCHAR_H=1
12796 fi
12797
12798 # if we do not find wint_t in either place, use substitution to provide a fallback.
12799 if test "$cf_cv_wint_t" = unknown ; then
12800         NCURSES_WINT_T=1
12801 fi
12802
12803 # if we find wint_t in either place, use substitution to provide a fallback.
12804 if test "$cf_cv_wint_t" != unknown ; then
12805         NCURSES_OK_WINT_T=1
12806 fi
12807
12808         if test "$NCURSES_MBSTATE_T" != 0; then
12809
12810 cat >>confdefs.h <<\EOF
12811 #define NEED_MBSTATE_T_DEF 1
12812 EOF
12813
12814         fi
12815 fi
12816
12817 ###   use option --disable-lp64 to allow long chtype
12818 echo "$as_me:12818: checking whether to enable _LP64 definition in curses.h" >&5
12819 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12820
12821 # Check whether --enable-lp64 or --disable-lp64 was given.
12822 if test "${enable_lp64+set}" = set; then
12823   enableval="$enable_lp64"
12824   with_lp64=$enableval
12825 else
12826   with_lp64=$cf_dft_with_lp64
12827 fi;
12828 echo "$as_me:12828: result: $with_lp64" >&5
12829 echo "${ECHO_T}$with_lp64" >&6
12830
12831 if test "x$with_lp64" = xyes ; then
12832         cf_cv_enable_lp64=1
12833 else
12834         cf_cv_enable_lp64=0
12835 fi
12836
12837 # Check whether --enable-largefile or --disable-largefile was given.
12838 if test "${enable_largefile+set}" = set; then
12839   enableval="$enable_largefile"
12840
12841 fi;
12842 if test "$enable_largefile" != no; then
12843
12844   echo "$as_me:12844: checking for special C compiler options needed for large files" >&5
12845 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12846 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12847   echo $ECHO_N "(cached) $ECHO_C" >&6
12848 else
12849   ac_cv_sys_largefile_CC=no
12850      if test "$GCC" != yes; then
12851        ac_save_CC=$CC
12852        while :; do
12853          # IRIX 6.2 and later do not support large files by default,
12854          # so use the C compiler's -n32 option if that helps.
12855          cat >conftest.$ac_ext <<_ACEOF
12856 #line 12856 "configure"
12857 #include "confdefs.h"
12858 #include <sys/types.h>
12859  /* Check that off_t can represent 2**63 - 1 correctly.
12860     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12861     since some C++ compilers masquerading as C compilers
12862     incorrectly reject 9223372036854775807.  */
12863 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12864   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12865                        && LARGE_OFF_T % 2147483647 == 1)
12866                       ? 1 : -1];
12867 int
12868 main (void)
12869 {
12870
12871   ;
12872   return 0;
12873 }
12874 _ACEOF
12875          rm -f conftest.$ac_objext
12876 if { (eval echo "$as_me:12876: \"$ac_compile\"") >&5
12877   (eval $ac_compile) 2>&5
12878   ac_status=$?
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit $ac_status); } &&
12881          { ac_try='test -s conftest.$ac_objext'
12882   { (eval echo "$as_me:12882: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); }; }; then
12887   break
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 cat conftest.$ac_ext >&5
12891 fi
12892 rm -f conftest.$ac_objext
12893          CC="$CC -n32"
12894          rm -f conftest.$ac_objext
12895 if { (eval echo "$as_me:12895: \"$ac_compile\"") >&5
12896   (eval $ac_compile) 2>&5
12897   ac_status=$?
12898   echo "$as_me:12898: \$? = $ac_status" >&5
12899   (exit $ac_status); } &&
12900          { ac_try='test -s conftest.$ac_objext'
12901   { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902   (eval $ac_try) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit $ac_status); }; }; then
12906   ac_cv_sys_largefile_CC=' -n32'; break
12907 else
12908   echo "$as_me: failed program was:" >&5
12909 cat conftest.$ac_ext >&5
12910 fi
12911 rm -f conftest.$ac_objext
12912          break
12913        done
12914        CC=$ac_save_CC
12915        rm -f conftest.$ac_ext
12916     fi
12917 fi
12918 echo "$as_me:12918: result: $ac_cv_sys_largefile_CC" >&5
12919 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12920   if test "$ac_cv_sys_largefile_CC" != no; then
12921     CC=$CC$ac_cv_sys_largefile_CC
12922   fi
12923
12924   echo "$as_me:12924: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12925 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12926 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12927   echo $ECHO_N "(cached) $ECHO_C" >&6
12928 else
12929   while :; do
12930   ac_cv_sys_file_offset_bits=no
12931   cat >conftest.$ac_ext <<_ACEOF
12932 #line 12932 "configure"
12933 #include "confdefs.h"
12934 #include <sys/types.h>
12935  /* Check that off_t can represent 2**63 - 1 correctly.
12936     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12937     since some C++ compilers masquerading as C compilers
12938     incorrectly reject 9223372036854775807.  */
12939 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12940   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12941                        && LARGE_OFF_T % 2147483647 == 1)
12942                       ? 1 : -1];
12943 int
12944 main (void)
12945 {
12946
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 rm -f conftest.$ac_objext
12952 if { (eval echo "$as_me:12952: \"$ac_compile\"") >&5
12953   (eval $ac_compile) 2>&5
12954   ac_status=$?
12955   echo "$as_me:12955: \$? = $ac_status" >&5
12956   (exit $ac_status); } &&
12957          { ac_try='test -s conftest.$ac_objext'
12958   { (eval echo "$as_me:12958: \"$ac_try\"") >&5
12959   (eval $ac_try) 2>&5
12960   ac_status=$?
12961   echo "$as_me:12961: \$? = $ac_status" >&5
12962   (exit $ac_status); }; }; then
12963   break
12964 else
12965   echo "$as_me: failed program was:" >&5
12966 cat conftest.$ac_ext >&5
12967 fi
12968 rm -f conftest.$ac_objext conftest.$ac_ext
12969   cat >conftest.$ac_ext <<_ACEOF
12970 #line 12970 "configure"
12971 #include "confdefs.h"
12972 #define _FILE_OFFSET_BITS 64
12973 #include <sys/types.h>
12974  /* Check that off_t can represent 2**63 - 1 correctly.
12975     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12976     since some C++ compilers masquerading as C compilers
12977     incorrectly reject 9223372036854775807.  */
12978 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12979   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12980                        && LARGE_OFF_T % 2147483647 == 1)
12981                       ? 1 : -1];
12982 int
12983 main (void)
12984 {
12985
12986   ;
12987   return 0;
12988 }
12989 _ACEOF
12990 rm -f conftest.$ac_objext
12991 if { (eval echo "$as_me:12991: \"$ac_compile\"") >&5
12992   (eval $ac_compile) 2>&5
12993   ac_status=$?
12994   echo "$as_me:12994: \$? = $ac_status" >&5
12995   (exit $ac_status); } &&
12996          { ac_try='test -s conftest.$ac_objext'
12997   { (eval echo "$as_me:12997: \"$ac_try\"") >&5
12998   (eval $ac_try) 2>&5
12999   ac_status=$?
13000   echo "$as_me:13000: \$? = $ac_status" >&5
13001   (exit $ac_status); }; }; then
13002   ac_cv_sys_file_offset_bits=64; break
13003 else
13004   echo "$as_me: failed program was:" >&5
13005 cat conftest.$ac_ext >&5
13006 fi
13007 rm -f conftest.$ac_objext conftest.$ac_ext
13008   break
13009 done
13010 fi
13011 echo "$as_me:13011: result: $ac_cv_sys_file_offset_bits" >&5
13012 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13013 if test "$ac_cv_sys_file_offset_bits" != no; then
13014
13015 cat >>confdefs.h <<EOF
13016 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13017 EOF
13018
13019 fi
13020 rm -rf conftest*
13021   echo "$as_me:13021: checking for _LARGE_FILES value needed for large files" >&5
13022 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13023 if test "${ac_cv_sys_large_files+set}" = set; then
13024   echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026   while :; do
13027   ac_cv_sys_large_files=no
13028   cat >conftest.$ac_ext <<_ACEOF
13029 #line 13029 "configure"
13030 #include "confdefs.h"
13031 #include <sys/types.h>
13032  /* Check that off_t can represent 2**63 - 1 correctly.
13033     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13034     since some C++ compilers masquerading as C compilers
13035     incorrectly reject 9223372036854775807.  */
13036 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13037   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13038                        && LARGE_OFF_T % 2147483647 == 1)
13039                       ? 1 : -1];
13040 int
13041 main (void)
13042 {
13043
13044   ;
13045   return 0;
13046 }
13047 _ACEOF
13048 rm -f conftest.$ac_objext
13049 if { (eval echo "$as_me:13049: \"$ac_compile\"") >&5
13050   (eval $ac_compile) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit $ac_status); } &&
13054          { ac_try='test -s conftest.$ac_objext'
13055   { (eval echo "$as_me:13055: \"$ac_try\"") >&5
13056   (eval $ac_try) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); }; }; then
13060   break
13061 else
13062   echo "$as_me: failed program was:" >&5
13063 cat conftest.$ac_ext >&5
13064 fi
13065 rm -f conftest.$ac_objext conftest.$ac_ext
13066   cat >conftest.$ac_ext <<_ACEOF
13067 #line 13067 "configure"
13068 #include "confdefs.h"
13069 #define _LARGE_FILES 1
13070 #include <sys/types.h>
13071  /* Check that off_t can represent 2**63 - 1 correctly.
13072     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13073     since some C++ compilers masquerading as C compilers
13074     incorrectly reject 9223372036854775807.  */
13075 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13076   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13077                        && LARGE_OFF_T % 2147483647 == 1)
13078                       ? 1 : -1];
13079 int
13080 main (void)
13081 {
13082
13083   ;
13084   return 0;
13085 }
13086 _ACEOF
13087 rm -f conftest.$ac_objext
13088 if { (eval echo "$as_me:13088: \"$ac_compile\"") >&5
13089   (eval $ac_compile) 2>&5
13090   ac_status=$?
13091   echo "$as_me:13091: \$? = $ac_status" >&5
13092   (exit $ac_status); } &&
13093          { ac_try='test -s conftest.$ac_objext'
13094   { (eval echo "$as_me:13094: \"$ac_try\"") >&5
13095   (eval $ac_try) 2>&5
13096   ac_status=$?
13097   echo "$as_me:13097: \$? = $ac_status" >&5
13098   (exit $ac_status); }; }; then
13099   ac_cv_sys_large_files=1; break
13100 else
13101   echo "$as_me: failed program was:" >&5
13102 cat conftest.$ac_ext >&5
13103 fi
13104 rm -f conftest.$ac_objext conftest.$ac_ext
13105   break
13106 done
13107 fi
13108 echo "$as_me:13108: result: $ac_cv_sys_large_files" >&5
13109 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13110 if test "$ac_cv_sys_large_files" != no; then
13111
13112 cat >>confdefs.h <<EOF
13113 #define _LARGE_FILES $ac_cv_sys_large_files
13114 EOF
13115
13116 fi
13117 rm -rf conftest*
13118 fi
13119
13120         if test "$enable_largefile" != no ; then
13121         echo "$as_me:13121: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13122 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13123 if test "${ac_cv_sys_largefile_source+set}" = set; then
13124   echo $ECHO_N "(cached) $ECHO_C" >&6
13125 else
13126   while :; do
13127   ac_cv_sys_largefile_source=no
13128   cat >conftest.$ac_ext <<_ACEOF
13129 #line 13129 "configure"
13130 #include "confdefs.h"
13131 #include <stdio.h>
13132 int
13133 main (void)
13134 {
13135 return !fseeko;
13136   ;
13137   return 0;
13138 }
13139 _ACEOF
13140 rm -f conftest.$ac_objext
13141 if { (eval echo "$as_me:13141: \"$ac_compile\"") >&5
13142   (eval $ac_compile) 2>&5
13143   ac_status=$?
13144   echo "$as_me:13144: \$? = $ac_status" >&5
13145   (exit $ac_status); } &&
13146          { ac_try='test -s conftest.$ac_objext'
13147   { (eval echo "$as_me:13147: \"$ac_try\"") >&5
13148   (eval $ac_try) 2>&5
13149   ac_status=$?
13150   echo "$as_me:13150: \$? = $ac_status" >&5
13151   (exit $ac_status); }; }; then
13152   break
13153 else
13154   echo "$as_me: failed program was:" >&5
13155 cat conftest.$ac_ext >&5
13156 fi
13157 rm -f conftest.$ac_objext conftest.$ac_ext
13158   cat >conftest.$ac_ext <<_ACEOF
13159 #line 13159 "configure"
13160 #include "confdefs.h"
13161 #define _LARGEFILE_SOURCE 1
13162 #include <stdio.h>
13163 int
13164 main (void)
13165 {
13166 return !fseeko;
13167   ;
13168   return 0;
13169 }
13170 _ACEOF
13171 rm -f conftest.$ac_objext
13172 if { (eval echo "$as_me:13172: \"$ac_compile\"") >&5
13173   (eval $ac_compile) 2>&5
13174   ac_status=$?
13175   echo "$as_me:13175: \$? = $ac_status" >&5
13176   (exit $ac_status); } &&
13177          { ac_try='test -s conftest.$ac_objext'
13178   { (eval echo "$as_me:13178: \"$ac_try\"") >&5
13179   (eval $ac_try) 2>&5
13180   ac_status=$?
13181   echo "$as_me:13181: \$? = $ac_status" >&5
13182   (exit $ac_status); }; }; then
13183   ac_cv_sys_largefile_source=1; break
13184 else
13185   echo "$as_me: failed program was:" >&5
13186 cat conftest.$ac_ext >&5
13187 fi
13188 rm -f conftest.$ac_objext conftest.$ac_ext
13189   break
13190 done
13191 fi
13192 echo "$as_me:13192: result: $ac_cv_sys_largefile_source" >&5
13193 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13194 if test "$ac_cv_sys_largefile_source" != no; then
13195
13196 cat >>confdefs.h <<EOF
13197 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13198 EOF
13199
13200 fi
13201 rm -rf conftest*
13202
13203 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13204 # in glibc 2.1.3, but that breaks too many other things.
13205 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13206 echo "$as_me:13206: checking for fseeko" >&5
13207 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13208 if test "${ac_cv_func_fseeko+set}" = set; then
13209   echo $ECHO_N "(cached) $ECHO_C" >&6
13210 else
13211   cat >conftest.$ac_ext <<_ACEOF
13212 #line 13212 "configure"
13213 #include "confdefs.h"
13214 #include <stdio.h>
13215 int
13216 main (void)
13217 {
13218 return fseeko && fseeko (stdin, 0, 0);
13219   ;
13220   return 0;
13221 }
13222 _ACEOF
13223 rm -f conftest.$ac_objext conftest$ac_exeext
13224 if { (eval echo "$as_me:13224: \"$ac_link\"") >&5
13225   (eval $ac_link) 2>&5
13226   ac_status=$?
13227   echo "$as_me:13227: \$? = $ac_status" >&5
13228   (exit $ac_status); } &&
13229          { ac_try='test -s conftest$ac_exeext'
13230   { (eval echo "$as_me:13230: \"$ac_try\"") >&5
13231   (eval $ac_try) 2>&5
13232   ac_status=$?
13233   echo "$as_me:13233: \$? = $ac_status" >&5
13234   (exit $ac_status); }; }; then
13235   ac_cv_func_fseeko=yes
13236 else
13237   echo "$as_me: failed program was:" >&5
13238 cat conftest.$ac_ext >&5
13239 ac_cv_func_fseeko=no
13240 fi
13241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13242 fi
13243 echo "$as_me:13243: result: $ac_cv_func_fseeko" >&5
13244 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13245 if test $ac_cv_func_fseeko = yes; then
13246
13247 cat >>confdefs.h <<\EOF
13248 #define HAVE_FSEEKO 1
13249 EOF
13250
13251 fi
13252
13253         # Normally we would collect these definitions in the config.h,
13254         # but (like _XOPEN_SOURCE), some environments rely on having these
13255         # defined before any of the system headers are included.  Another
13256         # case comes up with C++, e.g., on AIX the compiler compiles the
13257         # header files by themselves before looking at the body files it is
13258         # told to compile.  For ncurses, those header files do not include
13259         # the config.h
13260         if test "$ac_cv_sys_large_files" != no
13261         then
13262
13263         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13264         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13265
13266         fi
13267         if test "$ac_cv_sys_largefile_source" != no
13268         then
13269
13270         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13271         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13272
13273         fi
13274         if test "$ac_cv_sys_file_offset_bits" != no
13275         then
13276
13277         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13278         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13279
13280         fi
13281
13282         echo "$as_me:13282: checking whether to use struct dirent64" >&5
13283 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13284 if test "${cf_cv_struct_dirent64+set}" = set; then
13285   echo $ECHO_N "(cached) $ECHO_C" >&6
13286 else
13287
13288                 cat >conftest.$ac_ext <<_ACEOF
13289 #line 13289 "configure"
13290 #include "confdefs.h"
13291
13292 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13293 #include <sys/types.h>
13294 #include <dirent.h>
13295
13296 int
13297 main (void)
13298 {
13299
13300                 /* if transitional largefile support is setup, this is true */
13301                 extern struct dirent64 * readdir(DIR *);
13302                 struct dirent64 *x = readdir((DIR *)0);
13303                 struct dirent *y = readdir((DIR *)0);
13304                 int z = x - y;
13305                 (void)z;
13306
13307   ;
13308   return 0;
13309 }
13310 _ACEOF
13311 rm -f conftest.$ac_objext
13312 if { (eval echo "$as_me:13312: \"$ac_compile\"") >&5
13313   (eval $ac_compile) 2>&5
13314   ac_status=$?
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); } &&
13317          { ac_try='test -s conftest.$ac_objext'
13318   { (eval echo "$as_me:13318: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:13321: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   cf_cv_struct_dirent64=yes
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 cat conftest.$ac_ext >&5
13327 cf_cv_struct_dirent64=no
13328 fi
13329 rm -f conftest.$ac_objext conftest.$ac_ext
13330
13331 fi
13332 echo "$as_me:13332: result: $cf_cv_struct_dirent64" >&5
13333 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13334         test "$cf_cv_struct_dirent64" = yes &&
13335 cat >>confdefs.h <<\EOF
13336 #define HAVE_STRUCT_DIRENT64 1
13337 EOF
13338
13339         fi
13340
13341 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13342 echo "$as_me:13342: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13343 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13344
13345 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13346 if test "${enable_tparm_varargs+set}" = set; then
13347   enableval="$enable_tparm_varargs"
13348   with_tparm_varargs=$enableval
13349 else
13350   with_tparm_varargs=yes
13351 fi;
13352 echo "$as_me:13352: result: $with_tparm_varargs" >&5
13353 echo "${ECHO_T}$with_tparm_varargs" >&6
13354 NCURSES_TPARM_VARARGS=0
13355 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13356
13357 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13358 if test "$with_ticlib" != no ; then
13359 echo "$as_me:13359: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13360 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13361
13362 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13363 if test "${enable_tic_depends+set}" = set; then
13364   enableval="$enable_tic_depends"
13365   with_tic_depends=$enableval
13366 else
13367   with_tic_depends=yes
13368 fi;
13369 echo "$as_me:13369: result: $with_tic_depends" >&5
13370 echo "${ECHO_T}$with_tic_depends" >&6
13371 else
13372         with_tic_depends=no
13373 fi
13374
13375 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13376 echo "$as_me:13376: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13377 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13378
13379 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13380 if test "${enable_wattr_macros+set}" = set; then
13381   enableval="$enable_wattr_macros"
13382   with_wattr_macros=$enableval
13383 else
13384   with_wattr_macros=yes
13385 fi;
13386 if [ "x$with_wattr_macros" != xyes ]; then
13387         NCURSES_WATTR_MACROS=0
13388         echo "$as_me:13388: result: yes" >&5
13389 echo "${ECHO_T}yes" >&6
13390 else
13391         NCURSES_WATTR_MACROS=1
13392         echo "$as_me:13392: result: no" >&5
13393 echo "${ECHO_T}no" >&6
13394 fi
13395
13396 echo "$as_me:13396: checking for X11 rgb file" >&5
13397 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13398
13399 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13400 if test "${with_x11_rgb+set}" = set; then
13401   withval="$with_x11_rgb"
13402   RGB_PATH=$withval
13403 else
13404   RGB_PATH=auto
13405 fi;
13406
13407 if test "x$RGB_PATH" = xauto
13408 then
13409         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13410         for cf_path in \
13411                 /opt/local/share/X11/rgb.txt \
13412                 /opt/X11/share/X11/rgb.txt \
13413                 /usr/share/X11/rgb.txt \
13414                 /usr/X11/share/X11/rgb.txt \
13415                 /usr/X11/lib/X11/rgb.txt \
13416                 /usr/lib/X11/rgb.txt \
13417                 /etc/X11/rgb.txt \
13418                 /usr/pkg/lib/X11/rgb.txt \
13419                 /usr/X11R7/lib/X11/rgb.txt \
13420                 /usr/X11R6/lib/X11/rgb.txt \
13421                 /usr/X11R5/lib/X11/rgb.txt \
13422                 /usr/X11R4/lib/X11/rgb.txt \
13423                 /usr/local/lib/X11/rgb.txt \
13424                 /usr/local/share/X11/rgb.txt \
13425                 /usr/lib64/X11/rgb.txt
13426         do
13427                 if test -f "$cf_path" ; then
13428                         RGB_PATH="$cf_path"
13429                         break
13430                 fi
13431         done
13432 else
13433         cf_path=$RGB_PATH
13434
13435 if test "x$prefix" != xNONE; then
13436         cf_path_syntax="$prefix"
13437 else
13438         cf_path_syntax="$ac_default_prefix"
13439 fi
13440
13441 case ".$cf_path" in
13442 (.\$\(*\)*|.\'*\'*)
13443         ;;
13444 (..|./*|.\\*)
13445         ;;
13446 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13447         ;;
13448 (.\${*prefix}*|.\${*dir}*)
13449         eval cf_path="$cf_path"
13450         case ".$cf_path" in
13451         (.NONE/*)
13452                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13453                 ;;
13454         esac
13455         ;;
13456 (.no|.NONE/*)
13457         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13458         ;;
13459 (*)
13460         { { echo "$as_me:13460: error: expected a pathname, not \"$cf_path\"" >&5
13461 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13462    { (exit 1); exit 1; }; }
13463         ;;
13464 esac
13465
13466 fi
13467
13468 echo "$as_me:13468: result: $RGB_PATH" >&5
13469 echo "${ECHO_T}$RGB_PATH" >&6
13470
13471 cat >>confdefs.h <<EOF
13472 #define RGB_PATH "$cf_path"
13473 EOF
13474
13475 no_x11_rgb=
13476 if test "$RGB_PATH" = no
13477 then
13478         no_x11_rgb="#"
13479 fi
13480
13481 ###   use option --with-bool to override bool's type
13482 echo "$as_me:13482: checking for type of bool" >&5
13483 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13484
13485 # Check whether --with-bool or --without-bool was given.
13486 if test "${with_bool+set}" = set; then
13487   withval="$with_bool"
13488   NCURSES_BOOL="$withval"
13489 else
13490   NCURSES_BOOL=auto
13491 fi;
13492 echo "$as_me:13492: result: $NCURSES_BOOL" >&5
13493 echo "${ECHO_T}$NCURSES_BOOL" >&6
13494
13495 echo "$as_me:13495: checking for alternate terminal capabilities file" >&5
13496 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13497
13498 # Check whether --with-caps or --without-caps was given.
13499 if test "${with_caps+set}" = set; then
13500   withval="$with_caps"
13501   TERMINFO_CAPS=Caps.$withval
13502 else
13503   TERMINFO_CAPS=Caps
13504 fi;
13505 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13506 echo "$as_me:13506: result: $TERMINFO_CAPS" >&5
13507 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13508
13509 ###   use option --with-chtype to override chtype's type
13510 echo "$as_me:13510: checking for type of chtype" >&5
13511 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13512
13513 # Check whether --with-chtype or --without-chtype was given.
13514 if test "${with_chtype+set}" = set; then
13515   withval="$with_chtype"
13516   NCURSES_CHTYPE="$withval"
13517 else
13518   NCURSES_CHTYPE=$cf_dft_chtype
13519 fi;
13520 echo "$as_me:13520: result: $NCURSES_CHTYPE" >&5
13521 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13522
13523 ###   use option --with-ospeed to override ospeed's type
13524 echo "$as_me:13524: checking for type of ospeed" >&5
13525 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13526
13527 # Check whether --with-ospeed or --without-ospeed was given.
13528 if test "${with_ospeed+set}" = set; then
13529   withval="$with_ospeed"
13530   NCURSES_OSPEED="$withval"
13531 else
13532   NCURSES_OSPEED=short
13533 fi;
13534 echo "$as_me:13534: result: $NCURSES_OSPEED" >&5
13535 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13536
13537 ###   use option --with-mmask-t to override mmask_t's type
13538 echo "$as_me:13538: checking for type of mmask_t" >&5
13539 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13540
13541 # Check whether --with-mmask-t or --without-mmask-t was given.
13542 if test "${with_mmask_t+set}" = set; then
13543   withval="$with_mmask_t"
13544   NCURSES_MMASK_T="$withval"
13545 else
13546   NCURSES_MMASK_T=$cf_dft_mmask_t
13547 fi;
13548 echo "$as_me:13548: result: $NCURSES_MMASK_T" >&5
13549 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13550
13551 ###   use option --with-ccharw-max to override CCHARW_MAX size
13552 echo "$as_me:13552: checking for size CCHARW_MAX" >&5
13553 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13554
13555 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13556 if test "${with_ccharw_max+set}" = set; then
13557   withval="$with_ccharw_max"
13558   NCURSES_CCHARW_MAX="$withval"
13559 else
13560   NCURSES_CCHARW_MAX=5
13561 fi;
13562 echo "$as_me:13562: result: $NCURSES_CCHARW_MAX" >&5
13563 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13564
13565 echo "$as_me:13565: checking for ANSI C header files" >&5
13566 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13567 if test "${ac_cv_header_stdc+set}" = set; then
13568   echo $ECHO_N "(cached) $ECHO_C" >&6
13569 else
13570   cat >conftest.$ac_ext <<_ACEOF
13571 #line 13571 "configure"
13572 #include "confdefs.h"
13573 #include <stdlib.h>
13574 #include <stdarg.h>
13575 #include <string.h>
13576 #include <float.h>
13577
13578 _ACEOF
13579 if { (eval echo "$as_me:13579: \"$ac_cpp conftest.$ac_ext\"") >&5
13580   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13581   ac_status=$?
13582   egrep -v '^ *\+' conftest.er1 >conftest.err
13583   rm -f conftest.er1
13584   cat conftest.err >&5
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); } >/dev/null; then
13587   if test -s conftest.err; then
13588     ac_cpp_err=$ac_c_preproc_warn_flag
13589   else
13590     ac_cpp_err=
13591   fi
13592 else
13593   ac_cpp_err=yes
13594 fi
13595 if test -z "$ac_cpp_err"; then
13596   ac_cv_header_stdc=yes
13597 else
13598   echo "$as_me: failed program was:" >&5
13599   cat conftest.$ac_ext >&5
13600   ac_cv_header_stdc=no
13601 fi
13602 rm -f conftest.err conftest.$ac_ext
13603
13604 if test $ac_cv_header_stdc = yes; then
13605   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13606   cat >conftest.$ac_ext <<_ACEOF
13607 #line 13607 "configure"
13608 #include "confdefs.h"
13609 #include <string.h>
13610
13611 _ACEOF
13612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13613   egrep "memchr" >/dev/null 2>&1; then
13614   :
13615 else
13616   ac_cv_header_stdc=no
13617 fi
13618 rm -rf conftest*
13619
13620 fi
13621
13622 if test $ac_cv_header_stdc = yes; then
13623   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13624   cat >conftest.$ac_ext <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627 #include <stdlib.h>
13628
13629 _ACEOF
13630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13631   egrep "free" >/dev/null 2>&1; then
13632   :
13633 else
13634   ac_cv_header_stdc=no
13635 fi
13636 rm -rf conftest*
13637
13638 fi
13639
13640 if test $ac_cv_header_stdc = yes; then
13641   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13642   if test "$cross_compiling" = yes; then
13643   :
13644 else
13645   cat >conftest.$ac_ext <<_ACEOF
13646 #line 13646 "configure"
13647 #include "confdefs.h"
13648 #include <ctype.h>
13649 #if ((' ' & 0x0FF) == 0x020)
13650 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13651 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13652 #else
13653 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13654                      || ('j' <= (c) && (c) <= 'r') \
13655                      || ('s' <= (c) && (c) <= 'z'))
13656 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13657 #endif
13658
13659 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13660 int
13661 main (void)
13662 {
13663   int i;
13664   for (i = 0; i < 256; i++)
13665     if (XOR (islower (i), ISLOWER (i))
13666         || toupper (i) != TOUPPER (i))
13667       $ac_main_return(2);
13668   $ac_main_return (0);
13669 }
13670 _ACEOF
13671 rm -f conftest$ac_exeext
13672 if { (eval echo "$as_me:13672: \"$ac_link\"") >&5
13673   (eval $ac_link) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13677   { (eval echo "$as_me:13677: \"$ac_try\"") >&5
13678   (eval $ac_try) 2>&5
13679   ac_status=$?
13680   echo "$as_me:13680: \$? = $ac_status" >&5
13681   (exit $ac_status); }; }; then
13682   :
13683 else
13684   echo "$as_me: program exited with status $ac_status" >&5
13685 echo "$as_me: failed program was:" >&5
13686 cat conftest.$ac_ext >&5
13687 ac_cv_header_stdc=no
13688 fi
13689 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13690 fi
13691 fi
13692 fi
13693 echo "$as_me:13693: result: $ac_cv_header_stdc" >&5
13694 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13695 if test $ac_cv_header_stdc = yes; then
13696
13697 cat >>confdefs.h <<\EOF
13698 #define STDC_HEADERS 1
13699 EOF
13700
13701 fi
13702
13703 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13704
13705 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13706                   inttypes.h stdint.h unistd.h
13707 do
13708 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13709 echo "$as_me:13709: checking for $ac_header" >&5
13710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13712   echo $ECHO_N "(cached) $ECHO_C" >&6
13713 else
13714   cat >conftest.$ac_ext <<_ACEOF
13715 #line 13715 "configure"
13716 #include "confdefs.h"
13717 $ac_includes_default
13718 #include <$ac_header>
13719 _ACEOF
13720 rm -f conftest.$ac_objext
13721 if { (eval echo "$as_me:13721: \"$ac_compile\"") >&5
13722   (eval $ac_compile) 2>&5
13723   ac_status=$?
13724   echo "$as_me:13724: \$? = $ac_status" >&5
13725   (exit $ac_status); } &&
13726          { ac_try='test -s conftest.$ac_objext'
13727   { (eval echo "$as_me:13727: \"$ac_try\"") >&5
13728   (eval $ac_try) 2>&5
13729   ac_status=$?
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit $ac_status); }; }; then
13732   eval "$as_ac_Header=yes"
13733 else
13734   echo "$as_me: failed program was:" >&5
13735 cat conftest.$ac_ext >&5
13736 eval "$as_ac_Header=no"
13737 fi
13738 rm -f conftest.$ac_objext conftest.$ac_ext
13739 fi
13740 echo "$as_me:13740: result: `eval echo '${'$as_ac_Header'}'`" >&5
13741 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13742 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13743   cat >>confdefs.h <<EOF
13744 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13745 EOF
13746
13747 fi
13748 done
13749
13750 echo "$as_me:13750: checking for signed char" >&5
13751 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13752 if test "${ac_cv_type_signed_char+set}" = set; then
13753   echo $ECHO_N "(cached) $ECHO_C" >&6
13754 else
13755   cat >conftest.$ac_ext <<_ACEOF
13756 #line 13756 "configure"
13757 #include "confdefs.h"
13758 $ac_includes_default
13759 int
13760 main (void)
13761 {
13762 if ((signed char *) 0)
13763   return 0;
13764 if (sizeof (signed char))
13765   return 0;
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 rm -f conftest.$ac_objext
13771 if { (eval echo "$as_me:13771: \"$ac_compile\"") >&5
13772   (eval $ac_compile) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit $ac_status); } &&
13776          { ac_try='test -s conftest.$ac_objext'
13777   { (eval echo "$as_me:13777: \"$ac_try\"") >&5
13778   (eval $ac_try) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit $ac_status); }; }; then
13782   ac_cv_type_signed_char=yes
13783 else
13784   echo "$as_me: failed program was:" >&5
13785 cat conftest.$ac_ext >&5
13786 ac_cv_type_signed_char=no
13787 fi
13788 rm -f conftest.$ac_objext conftest.$ac_ext
13789 fi
13790 echo "$as_me:13790: result: $ac_cv_type_signed_char" >&5
13791 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13792
13793 echo "$as_me:13793: checking size of signed char" >&5
13794 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13795 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13796   echo $ECHO_N "(cached) $ECHO_C" >&6
13797 else
13798   if test "$ac_cv_type_signed_char" = yes; then
13799   if test "$cross_compiling" = yes; then
13800   # Depending upon the size, compute the lo and hi bounds.
13801 cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804 $ac_includes_default
13805 int
13806 main (void)
13807 {
13808 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13809   ;
13810   return 0;
13811 }
13812 _ACEOF
13813 rm -f conftest.$ac_objext
13814 if { (eval echo "$as_me:13814: \"$ac_compile\"") >&5
13815   (eval $ac_compile) 2>&5
13816   ac_status=$?
13817   echo "$as_me:13817: \$? = $ac_status" >&5
13818   (exit $ac_status); } &&
13819          { ac_try='test -s conftest.$ac_objext'
13820   { (eval echo "$as_me:13820: \"$ac_try\"") >&5
13821   (eval $ac_try) 2>&5
13822   ac_status=$?
13823   echo "$as_me:13823: \$? = $ac_status" >&5
13824   (exit $ac_status); }; }; then
13825   ac_lo=0 ac_mid=0
13826   while :; do
13827     cat >conftest.$ac_ext <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13830 $ac_includes_default
13831 int
13832 main (void)
13833 {
13834 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13835   ;
13836   return 0;
13837 }
13838 _ACEOF
13839 rm -f conftest.$ac_objext
13840 if { (eval echo "$as_me:13840: \"$ac_compile\"") >&5
13841   (eval $ac_compile) 2>&5
13842   ac_status=$?
13843   echo "$as_me:13843: \$? = $ac_status" >&5
13844   (exit $ac_status); } &&
13845          { ac_try='test -s conftest.$ac_objext'
13846   { (eval echo "$as_me:13846: \"$ac_try\"") >&5
13847   (eval $ac_try) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); }; }; then
13851   ac_hi=$ac_mid; break
13852 else
13853   echo "$as_me: failed program was:" >&5
13854 cat conftest.$ac_ext >&5
13855 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13856 fi
13857 rm -f conftest.$ac_objext conftest.$ac_ext
13858   done
13859 else
13860   echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13862 ac_hi=-1 ac_mid=-1
13863   while :; do
13864     cat >conftest.$ac_ext <<_ACEOF
13865 #line 13865 "configure"
13866 #include "confdefs.h"
13867 $ac_includes_default
13868 int
13869 main (void)
13870 {
13871 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13872   ;
13873   return 0;
13874 }
13875 _ACEOF
13876 rm -f conftest.$ac_objext
13877 if { (eval echo "$as_me:13877: \"$ac_compile\"") >&5
13878   (eval $ac_compile) 2>&5
13879   ac_status=$?
13880   echo "$as_me:13880: \$? = $ac_status" >&5
13881   (exit $ac_status); } &&
13882          { ac_try='test -s conftest.$ac_objext'
13883   { (eval echo "$as_me:13883: \"$ac_try\"") >&5
13884   (eval $ac_try) 2>&5
13885   ac_status=$?
13886   echo "$as_me:13886: \$? = $ac_status" >&5
13887   (exit $ac_status); }; }; then
13888   ac_lo=$ac_mid; break
13889 else
13890   echo "$as_me: failed program was:" >&5
13891 cat conftest.$ac_ext >&5
13892 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13893 fi
13894 rm -f conftest.$ac_objext conftest.$ac_ext
13895   done
13896 fi
13897 rm -f conftest.$ac_objext conftest.$ac_ext
13898 # Binary search between lo and hi bounds.
13899 while test "x$ac_lo" != "x$ac_hi"; do
13900   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13901   cat >conftest.$ac_ext <<_ACEOF
13902 #line 13902 "configure"
13903 #include "confdefs.h"
13904 $ac_includes_default
13905 int
13906 main (void)
13907 {
13908 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13909   ;
13910   return 0;
13911 }
13912 _ACEOF
13913 rm -f conftest.$ac_objext
13914 if { (eval echo "$as_me:13914: \"$ac_compile\"") >&5
13915   (eval $ac_compile) 2>&5
13916   ac_status=$?
13917   echo "$as_me:13917: \$? = $ac_status" >&5
13918   (exit $ac_status); } &&
13919          { ac_try='test -s conftest.$ac_objext'
13920   { (eval echo "$as_me:13920: \"$ac_try\"") >&5
13921   (eval $ac_try) 2>&5
13922   ac_status=$?
13923   echo "$as_me:13923: \$? = $ac_status" >&5
13924   (exit $ac_status); }; }; then
13925   ac_hi=$ac_mid
13926 else
13927   echo "$as_me: failed program was:" >&5
13928 cat conftest.$ac_ext >&5
13929 ac_lo=`expr $ac_mid + 1`
13930 fi
13931 rm -f conftest.$ac_objext conftest.$ac_ext
13932 done
13933 ac_cv_sizeof_signed_char=$ac_lo
13934 else
13935   if test "$cross_compiling" = yes; then
13936   { { echo "$as_me:13936: error: cannot run test program while cross compiling" >&5
13937 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13938    { (exit 1); exit 1; }; }
13939 else
13940   cat >conftest.$ac_ext <<_ACEOF
13941 #line 13941 "configure"
13942 #include "confdefs.h"
13943 $ac_includes_default
13944 int
13945 main (void)
13946 {
13947 FILE *f = fopen ("conftest.val", "w");
13948 if (!f)
13949   $ac_main_return (1);
13950 fprintf (f, "%d", (sizeof (signed char)));
13951 fclose (f);
13952   ;
13953   return 0;
13954 }
13955 _ACEOF
13956 rm -f conftest$ac_exeext
13957 if { (eval echo "$as_me:13957: \"$ac_link\"") >&5
13958   (eval $ac_link) 2>&5
13959   ac_status=$?
13960   echo "$as_me:13960: \$? = $ac_status" >&5
13961   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13962   { (eval echo "$as_me:13962: \"$ac_try\"") >&5
13963   (eval $ac_try) 2>&5
13964   ac_status=$?
13965   echo "$as_me:13965: \$? = $ac_status" >&5
13966   (exit $ac_status); }; }; then
13967   ac_cv_sizeof_signed_char=`cat conftest.val`
13968 else
13969   echo "$as_me: program exited with status $ac_status" >&5
13970 echo "$as_me: failed program was:" >&5
13971 cat conftest.$ac_ext >&5
13972 fi
13973 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13974 fi
13975 fi
13976 rm -f conftest.val
13977 else
13978   ac_cv_sizeof_signed_char=0
13979 fi
13980 fi
13981 echo "$as_me:13981: result: $ac_cv_sizeof_signed_char" >&5
13982 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13983 cat >>confdefs.h <<EOF
13984 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13985 EOF
13986
13987 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13988         NCURSES_SBOOL="signed char"
13989 else
13990         NCURSES_SBOOL="char"
13991 fi
13992 echo "$as_me:13992: checking if you want to use signed Boolean array in term.h" >&5
13993 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13994
13995 # Check whether --enable-signed-char or --disable-signed-char was given.
13996 if test "${enable_signed_char+set}" = set; then
13997   enableval="$enable_signed_char"
13998   with_signed_char=$enableval
13999 else
14000   with_signed_char=no
14001 fi;
14002 echo "$as_me:14002: result: $with_signed_char" >&5
14003 echo "${ECHO_T}$with_signed_char" >&6
14004 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14005
14006 ###   use option --with-tparm-arg to override tparm's argument type
14007 echo "$as_me:14007: checking for type of tparm args" >&5
14008 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14009
14010 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14011 if test "${with_tparm_arg+set}" = set; then
14012   withval="$with_tparm_arg"
14013   NCURSES_TPARM_ARG="$withval"
14014 else
14015   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14016 fi;
14017 echo "$as_me:14017: result: $NCURSES_TPARM_ARG" >&5
14018 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14019
14020 ### Enable compiling-in rcs id's
14021 echo "$as_me:14021: checking if RCS identifiers should be compiled-in" >&5
14022 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14023
14024 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14025 if test "${with_rcs_ids+set}" = set; then
14026   withval="$with_rcs_ids"
14027   with_rcs_ids=$withval
14028 else
14029   with_rcs_ids=no
14030 fi;
14031 echo "$as_me:14031: result: $with_rcs_ids" >&5
14032 echo "${ECHO_T}$with_rcs_ids" >&6
14033 test "x$with_rcs_ids" = xyes &&
14034 cat >>confdefs.h <<\EOF
14035 #define USE_RCS_IDS 1
14036 EOF
14037
14038 ###############################################################################
14039
14040 echo "$as_me:14040: checking format of man-pages" >&5
14041 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14042
14043 # Check whether --with-manpage-format or --without-manpage-format was given.
14044 if test "${with_manpage_format+set}" = set; then
14045   withval="$with_manpage_format"
14046   MANPAGE_FORMAT=$withval
14047 else
14048   MANPAGE_FORMAT=unknown
14049 fi;
14050
14051 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14052 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14053
14054 cf_unknown=
14055
14056 case $MANPAGE_FORMAT in
14057 (unknown)
14058         if test -z "$MANPATH" ; then
14059                 MANPATH="/usr/man:/usr/share/man"
14060         fi
14061
14062         # look for the 'date' man-page (it's most likely to be installed!)
14063         MANPAGE_FORMAT=
14064         cf_preform=no
14065         cf_catonly=yes
14066         cf_example=date
14067
14068         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14069         for cf_dir in $MANPATH; do
14070                 test -z "$cf_dir" && cf_dir=/usr/man
14071                 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
14072                 do
14073                         cf_test=`echo $cf_name | sed -e 's/*//'`
14074                         if test "x$cf_test" = "x$cf_name" ; then
14075
14076                                 case "$cf_name" in
14077                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14078                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14079                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14080                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14081                                 esac
14082
14083                                 case "$cf_name" in
14084                                 ($cf_dir/man*)
14085                                         cf_catonly=no
14086                                         ;;
14087                                 ($cf_dir/cat*)
14088                                         cf_preform=yes
14089                                         ;;
14090                                 esac
14091                                 break
14092                         fi
14093
14094                         # if we found a match in either man* or cat*, stop looking
14095                         if test -n "$MANPAGE_FORMAT" ; then
14096                                 cf_found=no
14097                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14098                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14099                                 case "$cf_name" in
14100                                 ($cf_dir/cat*)
14101                                         cf_found=yes
14102                                         ;;
14103                                 esac
14104                                 test $cf_found=yes && break
14105                         fi
14106                 done
14107                 # only check the first directory in $MANPATH where we find manpages
14108                 if test -n "$MANPAGE_FORMAT" ; then
14109                         break
14110                 fi
14111         done
14112         # if we did not find the example, just assume it is normal
14113         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14114         IFS="$ac_save_ifs"
14115         ;;
14116 (*)
14117         for cf_option in $MANPAGE_FORMAT; do
14118         case $cf_option in
14119         (gzip|compress|BSDI|normal|formatted|catonly)
14120                 ;;
14121         (*)
14122                 cf_unknown="$cf_unknown $cf_option"
14123                 ;;
14124         esac
14125         done
14126         ;;
14127 esac
14128
14129 echo "$as_me:14129: result: $MANPAGE_FORMAT" >&5
14130 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14131 if test -n "$cf_unknown" ; then
14132         { echo "$as_me:14132: WARNING: Unexpected manpage-format $cf_unknown" >&5
14133 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14134 fi
14135
14136 echo "$as_me:14136: checking for manpage renaming" >&5
14137 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14138
14139 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14140 if test "${with_manpage_renames+set}" = set; then
14141   withval="$with_manpage_renames"
14142   MANPAGE_RENAMES=$withval
14143 else
14144   MANPAGE_RENAMES=yes
14145 fi;
14146
14147 case ".$MANPAGE_RENAMES" in
14148 (.no)
14149         ;;
14150 (.|.yes)
14151         # Debian 'man' program?
14152         if test -f /etc/debian_version ; then
14153                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14154         else
14155                 MANPAGE_RENAMES=no
14156         fi
14157         ;;
14158 esac
14159
14160 if test "$MANPAGE_RENAMES" != no ; then
14161         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14162                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14163         elif test ! -f $MANPAGE_RENAMES ; then
14164                 { { echo "$as_me:14164: error: not a filename: $MANPAGE_RENAMES" >&5
14165 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14166    { (exit 1); exit 1; }; }
14167         fi
14168
14169         test ! -d man && mkdir man
14170
14171         # Construct a sed-script to perform renaming within man-pages
14172         if test -n "$MANPAGE_RENAMES" ; then
14173                 test ! -d man && mkdir man
14174                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14175         fi
14176 fi
14177
14178 echo "$as_me:14178: result: $MANPAGE_RENAMES" >&5
14179 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14180
14181 echo "$as_me:14181: checking if manpage aliases will be installed" >&5
14182 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14183
14184 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14185 if test "${with_manpage_aliases+set}" = set; then
14186   withval="$with_manpage_aliases"
14187   MANPAGE_ALIASES=$withval
14188 else
14189   MANPAGE_ALIASES=yes
14190 fi;
14191
14192 echo "$as_me:14192: result: $MANPAGE_ALIASES" >&5
14193 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14194
14195 case "x$LN_S" in
14196 (xln*)
14197         cf_use_symlinks=yes
14198         ;;
14199 (*)
14200         cf_use_symlinks=no
14201         ;;
14202 esac
14203
14204 MANPAGE_SYMLINKS=no
14205 if test "$MANPAGE_ALIASES" = yes ; then
14206 echo "$as_me:14206: checking if manpage symlinks should be used" >&5
14207 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14208
14209 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14210 if test "${with_manpage_symlinks+set}" = set; then
14211   withval="$with_manpage_symlinks"
14212   MANPAGE_SYMLINKS=$withval
14213 else
14214   MANPAGE_SYMLINKS=$cf_use_symlinks
14215 fi;
14216
14217 if test "$$cf_use_symlinks" = no; then
14218 if test "$MANPAGE_SYMLINKS" = yes ; then
14219         { echo "$as_me:14219: WARNING: cannot make symlinks" >&5
14220 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14221         MANPAGE_SYMLINKS=no
14222 fi
14223 fi
14224
14225 echo "$as_me:14225: result: $MANPAGE_SYMLINKS" >&5
14226 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14227 fi
14228
14229 echo "$as_me:14229: checking for manpage tbl" >&5
14230 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14231
14232 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14233 if test "${with_manpage_tbl+set}" = set; then
14234   withval="$with_manpage_tbl"
14235   MANPAGE_TBL=$withval
14236 else
14237   MANPAGE_TBL=no
14238 fi;
14239
14240 echo "$as_me:14240: result: $MANPAGE_TBL" >&5
14241 echo "${ECHO_T}$MANPAGE_TBL" >&6
14242
14243 if test "$prefix" = "NONE" ; then
14244         cf_prefix="$ac_default_prefix"
14245 else
14246         cf_prefix="$prefix"
14247 fi
14248
14249 case "$MANPAGE_FORMAT" in
14250 (*catonly*)
14251         cf_format=yes
14252         cf_inboth=no
14253         ;;
14254 (*formatted*)
14255         cf_format=yes
14256         cf_inboth=yes
14257         ;;
14258 (*)
14259         cf_format=no
14260         cf_inboth=no
14261         ;;
14262 esac
14263
14264 test ! -d man && mkdir man
14265
14266 cf_so_strip=
14267 cf_compress=
14268 case "$MANPAGE_FORMAT" in
14269 (*compress*)
14270         cf_so_strip="Z"
14271         cf_compress=compress
14272         ;;
14273 (*gzip*)
14274         cf_so_strip="gz"
14275         cf_compress=gzip
14276         ;;
14277 esac
14278
14279 cf_edit_man=./edit_man.sh
14280 cf_man_alias=`pwd`/man_alias.sed
14281
14282 cat >$cf_edit_man <<CF_EOF
14283 #! $SHELL
14284 # this script is generated by the configure-script CF_MAN_PAGES macro.
14285
14286 prefix="$cf_prefix"
14287 datarootdir="$datarootdir"
14288 datadir="$datadir"
14289
14290 NCURSES_MAJOR="$NCURSES_MAJOR"
14291 NCURSES_MINOR="$NCURSES_MINOR"
14292 NCURSES_PATCH="$NCURSES_PATCH"
14293
14294 NCURSES_OSPEED="$NCURSES_OSPEED"
14295 TERMINFO="$TERMINFO"
14296
14297 INSTALL="$INSTALL"
14298 INSTALL_DATA="$INSTALL_DATA"
14299
14300 transform="$program_transform_name"
14301
14302 TMP=\${TMPDIR:=/tmp}/man\$\$
14303 trap "rm -f \$TMP" 0 1 2 3 15
14304
14305 form=\$1
14306 shift || exit 1
14307
14308 verb=\$1
14309 shift || exit 1
14310
14311 mandir=\$1
14312 shift || exit 1
14313
14314 srcdir=\$1
14315 top_srcdir=\$srcdir/..
14316 shift || exit 1
14317
14318 if test "\$form" = normal ; then
14319         if test "$cf_format" = yes ; then
14320         if test "$cf_inboth" = no ; then
14321                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14322                 exit $?
14323         fi
14324         fi
14325         cf_subdir=\$mandir/man
14326         cf_tables=$MANPAGE_TBL
14327 else
14328         cf_subdir=\$mandir/cat
14329         cf_tables=yes
14330 fi
14331
14332 # process the list of source-files
14333 for i in \$* ; do
14334 case \$i in
14335 (*.orig|*.rej) ;;
14336 (*.[0-9]*)
14337         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14338         if test \$verb = installing ; then
14339         if test ! -d \$cf_subdir\${section} ; then
14340                 mkdir -p \$cf_subdir\$section
14341         fi
14342         fi
14343
14344         # replace variables in man page
14345         if test ! -f $cf_man_alias ; then
14346 cat >>$cf_man_alias <<-CF_EOF2
14347                 s,@DATADIR@,\$datadir,g
14348                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14349                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14350                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14351                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14352                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14353                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14354 CF_EOF
14355
14356         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14357         do
14358                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14359                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14360 cat >>$cf_edit_man <<-CF_EOF
14361                 s,@$cf_NAME@,$cf_name,g
14362 CF_EOF
14363         done
14364
14365 cat >>$cf_edit_man <<CF_EOF
14366 CF_EOF2
14367                 echo "...made $cf_man_alias"
14368         fi
14369
14370         aliases=
14371         cf_source=\`basename \$i\`
14372         inalias=\$cf_source
14373         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14374         if test ! -f \$inalias ; then
14375                 echo .. skipped \$cf_source
14376                 continue
14377         fi
14378 CF_EOF
14379
14380 if test "$MANPAGE_ALIASES" != no ; then
14381 cat >>$cf_edit_man <<CF_EOF
14382         nCurses=ignore.3x
14383         test $with_curses_h = yes && nCurses=ncurses.3x
14384         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14385 CF_EOF
14386 fi
14387
14388 if test "$MANPAGE_RENAMES" = no ; then
14389 cat >>$cf_edit_man <<CF_EOF
14390         # perform program transformations for section 1 man pages
14391         if test \$section = 1 ; then
14392                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14393         else
14394                 cf_target=\$cf_subdir\${section}/\$cf_source
14395         fi
14396 CF_EOF
14397 else
14398 cat >>$cf_edit_man <<CF_EOF
14399         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14400         if test -z "\$cf_target" ; then
14401                 echo '? missing rename for '\$cf_source
14402                 cf_target="\$cf_source"
14403         fi
14404         cf_target="\$cf_subdir\${section}/\${cf_target}"
14405
14406 CF_EOF
14407 fi
14408
14409 cat >>$cf_edit_man <<CF_EOF
14410         sed     -f $cf_man_alias \\
14411 CF_EOF
14412
14413 if test -f $MANPAGE_RENAMES ; then
14414 cat >>$cf_edit_man <<CF_EOF
14415                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14416 CF_EOF
14417 else
14418 cat >>$cf_edit_man <<CF_EOF
14419                 < \$i >\$TMP
14420 CF_EOF
14421 fi
14422
14423 cat >>$cf_edit_man <<CF_EOF
14424 if test \$cf_tables = yes ; then
14425         tbl \$TMP >\$TMP.out
14426         mv \$TMP.out \$TMP
14427 fi
14428 CF_EOF
14429
14430 if test $with_overwrite != yes ; then
14431 cat >>$cf_edit_man <<CF_EOF
14432         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14433         mv \$TMP.out \$TMP
14434 CF_EOF
14435 fi
14436
14437 if test $with_curses_h != yes ; then
14438 cat >>$cf_edit_man <<CF_EOF
14439         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14440         mv \$TMP.out \$TMP
14441 CF_EOF
14442 fi
14443
14444 cat >>$cf_edit_man <<CF_EOF
14445         if test \$form = format ; then
14446                 nroff -man \$TMP >\$TMP.out
14447                 mv \$TMP.out \$TMP
14448         fi
14449 CF_EOF
14450
14451 if test -n "$cf_compress" ; then
14452 cat >>$cf_edit_man <<CF_EOF
14453         if test \$verb = installing ; then
14454         if ( $cf_compress -f \$TMP )
14455         then
14456                 mv \$TMP.$cf_so_strip \$TMP
14457         fi
14458         fi
14459         cf_target="\$cf_target.$cf_so_strip"
14460 CF_EOF
14461 fi
14462
14463 case "$MANPAGE_FORMAT" in
14464 (*BSDI*)
14465 cat >>$cf_edit_man <<CF_EOF
14466         if test \$form = format ; then
14467                 # BSDI installs only .0 suffixes in the cat directories
14468                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14469         fi
14470 CF_EOF
14471   ;;
14472 esac
14473
14474 cat >>$cf_edit_man <<CF_EOF
14475         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14476         if test \$verb = installing ; then
14477                 echo \$verb \$cf_target
14478                 \$INSTALL_DATA \$TMP \$cf_target
14479                 test -d \$cf_subdir\${section} &&
14480                 test -n "\$aliases" && (
14481                         cd \$cf_subdir\${section} && (
14482                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14483                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14484                                 cf_target=\`basename \$cf_target\`
14485                                 for cf_alias in \$aliases
14486                                 do
14487                                         if test \$section = 1 ; then
14488                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14489                                         fi
14490
14491                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14492                                                 if test -f \$cf_alias\${suffix} ; then
14493                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14494                                                         then
14495                                                                 continue
14496                                                         fi
14497                                                 fi
14498                                                 echo .. \$verb alias \$cf_alias\${suffix}
14499 CF_EOF
14500 case "x$LN_S" in
14501 (*-f)
14502 cat >>$cf_edit_man <<CF_EOF
14503                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14504 CF_EOF
14505         ;;
14506 (*)
14507 cat >>$cf_edit_man <<CF_EOF
14508                                                 rm -f \$cf_alias\${suffix}
14509                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14510 CF_EOF
14511         ;;
14512 esac
14513 cat >>$cf_edit_man <<CF_EOF
14514                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14515                                                 echo ".so \$cf_source" >\$TMP
14516 CF_EOF
14517 if test -n "$cf_compress" ; then
14518 cat >>$cf_edit_man <<CF_EOF
14519                                                 if test -n "$cf_so_strip" ; then
14520                                                         $cf_compress -f \$TMP
14521                                                         mv \$TMP.$cf_so_strip \$TMP
14522                                                 fi
14523 CF_EOF
14524 fi
14525 cat >>$cf_edit_man <<CF_EOF
14526                                                 echo .. \$verb alias \$cf_alias\${suffix}
14527                                                 rm -f \$cf_alias\${suffix}
14528                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14529                                         fi
14530                                 done
14531                         )
14532                 )
14533         elif test \$verb = removing ; then
14534                 test -f \$cf_target && (
14535                         echo \$verb \$cf_target
14536                         rm -f \$cf_target
14537                 )
14538                 test -d \$cf_subdir\${section} &&
14539                 test -n "\$aliases" && (
14540                         cd \$cf_subdir\${section} && (
14541                                 for cf_alias in \$aliases
14542                                 do
14543                                         if test \$section = 1 ; then
14544                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14545                                         fi
14546
14547                                         echo .. \$verb alias \$cf_alias\${suffix}
14548                                         rm -f \$cf_alias\${suffix}
14549                                 done
14550                         )
14551                 )
14552         else
14553 #               echo ".hy 0"
14554                 cat \$TMP
14555         fi
14556         ;;
14557 esac
14558 done
14559
14560 if test $cf_inboth = yes ; then
14561 if test \$form != format ; then
14562         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14563 fi
14564 fi
14565
14566 exit 0
14567 CF_EOF
14568 chmod 755 $cf_edit_man
14569
14570 ###############################################################################
14571
14572 ### Note that some functions (such as const) are normally disabled anyway.
14573 echo "$as_me:14573: checking if you want to build with function extensions" >&5
14574 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14575
14576 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14577 if test "${enable_ext_funcs+set}" = set; then
14578   enableval="$enable_ext_funcs"
14579   with_ext_funcs=$enableval
14580 else
14581   with_ext_funcs=yes
14582 fi;
14583 echo "$as_me:14583: result: $with_ext_funcs" >&5
14584 echo "${ECHO_T}$with_ext_funcs" >&6
14585 if test "x$with_ext_funcs" = xyes ; then
14586         NCURSES_EXT_FUNCS=1
14587
14588 cat >>confdefs.h <<\EOF
14589 #define NCURSES_EXT_FUNCS 1
14590 EOF
14591
14592 cat >>confdefs.h <<\EOF
14593 #define HAVE_ASSUME_DEFAULT_COLORS 1
14594 EOF
14595
14596 cat >>confdefs.h <<\EOF
14597 #define HAVE_CURSES_VERSION 1
14598 EOF
14599
14600 cat >>confdefs.h <<\EOF
14601 #define HAVE_HAS_KEY 1
14602 EOF
14603
14604 cat >>confdefs.h <<\EOF
14605 #define HAVE_RESIZETERM 1
14606 EOF
14607
14608 cat >>confdefs.h <<\EOF
14609 #define HAVE_RESIZE_TERM 1
14610 EOF
14611
14612 cat >>confdefs.h <<\EOF
14613 #define HAVE_TERM_ENTRY_H 1
14614 EOF
14615
14616 cat >>confdefs.h <<\EOF
14617 #define HAVE_USE_DEFAULT_COLORS 1
14618 EOF
14619
14620 cat >>confdefs.h <<\EOF
14621 #define HAVE_USE_EXTENDED_NAMES 1
14622 EOF
14623
14624 cat >>confdefs.h <<\EOF
14625 #define HAVE_USE_SCREEN 1
14626 EOF
14627
14628 cat >>confdefs.h <<\EOF
14629 #define HAVE_USE_WINDOW 1
14630 EOF
14631
14632 cat >>confdefs.h <<\EOF
14633 #define HAVE_WRESIZE 1
14634 EOF
14635
14636         GENERATED_EXT_FUNCS=generated
14637         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14638 else
14639         NCURSES_EXT_FUNCS=0
14640         GENERATED_EXT_FUNCS=
14641 fi
14642
14643 echo "$as_me:14643: checking if you want to build with SCREEN extensions" >&5
14644 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14645
14646 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14647 if test "${enable_sp_funcs+set}" = set; then
14648   enableval="$enable_sp_funcs"
14649   with_sp_funcs=$enableval
14650 else
14651   with_sp_funcs=$cf_dft_ext_spfuncs
14652 fi;
14653 echo "$as_me:14653: result: $with_sp_funcs" >&5
14654 echo "${ECHO_T}$with_sp_funcs" >&6
14655 if test "x$with_sp_funcs" = xyes ; then
14656         NCURSES_SP_FUNCS=1
14657
14658 cat >>confdefs.h <<\EOF
14659 #define NCURSES_SP_FUNCS 1
14660 EOF
14661
14662 cat >>confdefs.h <<\EOF
14663 #define HAVE_TPUTS_SP 1
14664 EOF
14665
14666         GENERATED_SP_FUNCS=generated
14667 else
14668         NCURSES_SP_FUNCS=0
14669         GENERATED_SP_FUNCS=
14670 fi
14671
14672 echo "$as_me:14672: checking if you want to build with terminal-driver" >&5
14673 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14674
14675 # Check whether --enable-term-driver or --disable-term-driver was given.
14676 if test "${enable_term_driver+set}" = set; then
14677   enableval="$enable_term_driver"
14678   with_term_driver=$enableval
14679 else
14680   with_term_driver=no
14681 fi;
14682 echo "$as_me:14682: result: $with_term_driver" >&5
14683 echo "${ECHO_T}$with_term_driver" >&6
14684 if test "x$with_term_driver" = xyes ; then
14685
14686 cat >>confdefs.h <<\EOF
14687 #define USE_TERM_DRIVER 1
14688 EOF
14689
14690         if test "x$with_termlib" != xno ; then
14691                 { { echo "$as_me:14691: error: The term-driver option conflicts with the termlib option" >&5
14692 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14693    { (exit 1); exit 1; }; }
14694         fi
14695         if test "x$with_sp_funcs" != xyes ; then
14696                 { { echo "$as_me:14696: error: The term-driver option relies upon sp-funcs" >&5
14697 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14698    { (exit 1); exit 1; }; }
14699         fi
14700 fi
14701
14702 ###   use option --enable-const to turn on use of const beyond that in XSI.
14703 echo "$as_me:14703: checking for extended use of const keyword" >&5
14704 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14705
14706 # Check whether --enable-const or --disable-const was given.
14707 if test "${enable_const+set}" = set; then
14708   enableval="$enable_const"
14709   with_ext_const=$enableval
14710 else
14711   with_ext_const=$cf_dft_ext_const
14712 fi;
14713 echo "$as_me:14713: result: $with_ext_const" >&5
14714 echo "${ECHO_T}$with_ext_const" >&6
14715 NCURSES_CONST='/*nothing*/'
14716 if test "x$with_ext_const" = xyes ; then
14717         NCURSES_CONST=const
14718 fi
14719
14720 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14721 echo "$as_me:14721: checking if you want to use extended colors" >&5
14722 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14723
14724 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14725 if test "${enable_ext_colors+set}" = set; then
14726   enableval="$enable_ext_colors"
14727   with_ext_colors=$enableval
14728 else
14729   with_ext_colors=$cf_dft_ext_colors
14730 fi;
14731 echo "$as_me:14731: result: $with_ext_colors" >&5
14732 echo "${ECHO_T}$with_ext_colors" >&6
14733 NCURSES_EXT_COLORS=0
14734 if test "x$with_ext_colors" = xyes ; then
14735         if test "x$with_widec" != xyes ; then
14736                 { echo "$as_me:14736: WARNING: This option applies only to wide-character library" >&5
14737 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14738         else
14739                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14740
14741 if test "${with_abi_version+set}" != set; then
14742         case $cf_cv_rel_version in
14743         (5.*)
14744                 cf_cv_rel_version=6.0
14745                 cf_cv_abi_version=6
14746                 { echo "$as_me:14746: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14747 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14748                 ;;
14749         esac
14750 fi
14751
14752                 NCURSES_EXT_COLORS=1
14753
14754 cat >>confdefs.h <<\EOF
14755 #define NCURSES_EXT_COLORS 1
14756 EOF
14757
14758 cat >>confdefs.h <<\EOF
14759 #define HAVE_ALLOC_PAIR 1
14760 EOF
14761
14762 cat >>confdefs.h <<\EOF
14763 #define HAVE_INIT_EXTENDED_COLOR 1
14764 EOF
14765
14766 cat >>confdefs.h <<\EOF
14767 #define HAVE_RESET_COLOR_PAIRS 1
14768 EOF
14769
14770         fi
14771 fi
14772
14773 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14774 echo "$as_me:14774: checking if you want to use extended mouse encoding" >&5
14775 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14776
14777 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14778 if test "${enable_ext_mouse+set}" = set; then
14779   enableval="$enable_ext_mouse"
14780   with_ext_mouse=$enableval
14781 else
14782   with_ext_mouse=$cf_dft_ext_mouse
14783 fi;
14784 echo "$as_me:14784: result: $with_ext_mouse" >&5
14785 echo "${ECHO_T}$with_ext_mouse" >&6
14786 NCURSES_MOUSE_VERSION=1
14787 if test "x$with_ext_mouse" = xyes ; then
14788         NCURSES_MOUSE_VERSION=2
14789
14790 if test "${with_abi_version+set}" != set; then
14791         case $cf_cv_rel_version in
14792         (5.*)
14793                 cf_cv_rel_version=6.0
14794                 cf_cv_abi_version=6
14795                 { echo "$as_me:14795: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14796 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14797                 ;;
14798         esac
14799 fi
14800
14801 fi
14802
14803 ###   use option --enable-ext-putwin to turn on extended screendumps
14804 echo "$as_me:14804: checking if you want to use extended putwin/screendump" >&5
14805 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14806
14807 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14808 if test "${enable_ext_putwin+set}" = set; then
14809   enableval="$enable_ext_putwin"
14810   with_ext_putwin=$enableval
14811 else
14812   with_ext_putwin=$cf_dft_ext_putwin
14813 fi;
14814 echo "$as_me:14814: result: $with_ext_putwin" >&5
14815 echo "${ECHO_T}$with_ext_putwin" >&6
14816 if test "x$with_ext_putwin" = xyes ; then
14817
14818 cat >>confdefs.h <<\EOF
14819 #define NCURSES_EXT_PUTWIN 1
14820 EOF
14821
14822 fi
14823
14824 echo "$as_me:14824: checking if you want \$NCURSES_NO_PADDING code" >&5
14825 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14826
14827 # Check whether --enable-no-padding or --disable-no-padding was given.
14828 if test "${enable_no_padding+set}" = set; then
14829   enableval="$enable_no_padding"
14830   with_no_padding=$enableval
14831 else
14832   with_no_padding=$with_ext_funcs
14833 fi;
14834 echo "$as_me:14834: result: $with_no_padding" >&5
14835 echo "${ECHO_T}$with_no_padding" >&6
14836 test "x$with_no_padding" = xyes &&
14837 cat >>confdefs.h <<\EOF
14838 #define NCURSES_NO_PADDING 1
14839 EOF
14840
14841 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14842 echo "$as_me:14842: checking if you want SIGWINCH handler" >&5
14843 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14844
14845 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14846 if test "${enable_sigwinch+set}" = set; then
14847   enableval="$enable_sigwinch"
14848   with_sigwinch=$enableval
14849 else
14850   with_sigwinch=$with_ext_funcs
14851 fi;
14852 echo "$as_me:14852: result: $with_sigwinch" >&5
14853 echo "${ECHO_T}$with_sigwinch" >&6
14854 test "x$with_sigwinch" = xyes &&
14855 cat >>confdefs.h <<\EOF
14856 #define USE_SIGWINCH 1
14857 EOF
14858
14859 ###   use option --enable-tcap-names to allow user to define new capabilities
14860 echo "$as_me:14860: checking if you want user-definable terminal capabilities like termcap" >&5
14861 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14862
14863 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14864 if test "${enable_tcap_names+set}" = set; then
14865   enableval="$enable_tcap_names"
14866   with_tcap_names=$enableval
14867 else
14868   with_tcap_names=$with_ext_funcs
14869 fi;
14870 echo "$as_me:14870: result: $with_tcap_names" >&5
14871 echo "${ECHO_T}$with_tcap_names" >&6
14872 NCURSES_XNAMES=0
14873 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14874
14875 ##############################################################################
14876
14877 echo "$as_me:14877: checking if you want to link with the pthread library" >&5
14878 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14879
14880 # Check whether --with-pthread or --without-pthread was given.
14881 if test "${with_pthread+set}" = set; then
14882   withval="$with_pthread"
14883   with_pthread=$withval
14884 else
14885   with_pthread=no
14886 fi;
14887 echo "$as_me:14887: result: $with_pthread" >&5
14888 echo "${ECHO_T}$with_pthread" >&6
14889
14890 if test "$with_pthread" != no ; then
14891         echo "$as_me:14891: checking for pthread.h" >&5
14892 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14893 if test "${ac_cv_header_pthread_h+set}" = set; then
14894   echo $ECHO_N "(cached) $ECHO_C" >&6
14895 else
14896   cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14899 #include <pthread.h>
14900 _ACEOF
14901 if { (eval echo "$as_me:14901: \"$ac_cpp conftest.$ac_ext\"") >&5
14902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14903   ac_status=$?
14904   egrep -v '^ *\+' conftest.er1 >conftest.err
14905   rm -f conftest.er1
14906   cat conftest.err >&5
14907   echo "$as_me:14907: \$? = $ac_status" >&5
14908   (exit $ac_status); } >/dev/null; then
14909   if test -s conftest.err; then
14910     ac_cpp_err=$ac_c_preproc_warn_flag
14911   else
14912     ac_cpp_err=
14913   fi
14914 else
14915   ac_cpp_err=yes
14916 fi
14917 if test -z "$ac_cpp_err"; then
14918   ac_cv_header_pthread_h=yes
14919 else
14920   echo "$as_me: failed program was:" >&5
14921   cat conftest.$ac_ext >&5
14922   ac_cv_header_pthread_h=no
14923 fi
14924 rm -f conftest.err conftest.$ac_ext
14925 fi
14926 echo "$as_me:14926: result: $ac_cv_header_pthread_h" >&5
14927 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14928 if test $ac_cv_header_pthread_h = yes; then
14929
14930 cat >>confdefs.h <<\EOF
14931 #define HAVE_PTHREADS_H 1
14932 EOF
14933
14934         for cf_lib_pthread in pthread c_r
14935         do
14936             echo "$as_me:14936: checking if we can link with the $cf_lib_pthread library" >&5
14937 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14938             cf_save_LIBS="$LIBS"
14939
14940 cf_add_libs="$LIBS"
14941 # reverse order
14942 cf_add_0lib=
14943 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14944 # filter duplicates
14945 for cf_add_1lib in $cf_add_0lib; do
14946         for cf_add_2lib in $cf_add_libs; do
14947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14948                         cf_add_1lib=
14949                         break
14950                 fi
14951         done
14952         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14953 done
14954 LIBS="$cf_add_libs"
14955
14956             cat >conftest.$ac_ext <<_ACEOF
14957 #line 14957 "configure"
14958 #include "confdefs.h"
14959
14960 #include <pthread.h>
14961
14962 int
14963 main (void)
14964 {
14965
14966                 int rc = pthread_create(0,0,0,0);
14967                 int r2 = pthread_mutexattr_settype(0, 0);
14968
14969   ;
14970   return 0;
14971 }
14972 _ACEOF
14973 rm -f conftest.$ac_objext conftest$ac_exeext
14974 if { (eval echo "$as_me:14974: \"$ac_link\"") >&5
14975   (eval $ac_link) 2>&5
14976   ac_status=$?
14977   echo "$as_me:14977: \$? = $ac_status" >&5
14978   (exit $ac_status); } &&
14979          { ac_try='test -s conftest$ac_exeext'
14980   { (eval echo "$as_me:14980: \"$ac_try\"") >&5
14981   (eval $ac_try) 2>&5
14982   ac_status=$?
14983   echo "$as_me:14983: \$? = $ac_status" >&5
14984   (exit $ac_status); }; }; then
14985   with_pthread=yes
14986 else
14987   echo "$as_me: failed program was:" >&5
14988 cat conftest.$ac_ext >&5
14989 with_pthread=no
14990 fi
14991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14992             LIBS="$cf_save_LIBS"
14993             echo "$as_me:14993: result: $with_pthread" >&5
14994 echo "${ECHO_T}$with_pthread" >&6
14995             test "$with_pthread" = yes && break
14996         done
14997
14998         if test "$with_pthread" = yes ; then
14999
15000 cf_add_libs="$LIBS"
15001 # reverse order
15002 cf_add_0lib=
15003 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15004 # filter duplicates
15005 for cf_add_1lib in $cf_add_0lib; do
15006         for cf_add_2lib in $cf_add_libs; do
15007                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15008                         cf_add_1lib=
15009                         break
15010                 fi
15011         done
15012         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15013 done
15014 LIBS="$cf_add_libs"
15015
15016 cat >>confdefs.h <<\EOF
15017 #define HAVE_LIBPTHREADS 1
15018 EOF
15019
15020         else
15021             { { echo "$as_me:15021: error: Cannot link with pthread library" >&5
15022 echo "$as_me: error: Cannot link with pthread library" >&2;}
15023    { (exit 1); exit 1; }; }
15024         fi
15025
15026 fi
15027
15028 fi
15029
15030 if test "x$with_pthread" != xno; then
15031         echo "$as_me:15031: checking for pthread_kill" >&5
15032 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15033 if test "${ac_cv_func_pthread_kill+set}" = set; then
15034   echo $ECHO_N "(cached) $ECHO_C" >&6
15035 else
15036   cat >conftest.$ac_ext <<_ACEOF
15037 #line 15037 "configure"
15038 #include "confdefs.h"
15039 #define pthread_kill autoconf_temporary
15040 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15041 #undef pthread_kill
15042
15043 #ifdef __cplusplus
15044 extern "C"
15045 #endif
15046
15047 /* We use char because int might match the return type of a gcc2
15048    builtin and then its argument prototype would still apply.  */
15049 char pthread_kill (void);
15050
15051 int
15052 main (void)
15053 {
15054
15055 /* The GNU C library defines stubs for functions which it implements
15056     to always fail with ENOSYS.  Some functions are actually named
15057     something starting with __ and the normal name is an alias.  */
15058 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15059 #error found stub for pthread_kill
15060 #endif
15061
15062         return pthread_kill ();
15063   ;
15064   return 0;
15065 }
15066 _ACEOF
15067 rm -f conftest.$ac_objext conftest$ac_exeext
15068 if { (eval echo "$as_me:15068: \"$ac_link\"") >&5
15069   (eval $ac_link) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); } &&
15073          { ac_try='test -s conftest$ac_exeext'
15074   { (eval echo "$as_me:15074: \"$ac_try\"") >&5
15075   (eval $ac_try) 2>&5
15076   ac_status=$?
15077   echo "$as_me:15077: \$? = $ac_status" >&5
15078   (exit $ac_status); }; }; then
15079   ac_cv_func_pthread_kill=yes
15080 else
15081   echo "$as_me: failed program was:" >&5
15082 cat conftest.$ac_ext >&5
15083 ac_cv_func_pthread_kill=no
15084 fi
15085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15086 fi
15087 echo "$as_me:15087: result: $ac_cv_func_pthread_kill" >&5
15088 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15089 if test $ac_cv_func_pthread_kill = yes; then
15090
15091                 echo "$as_me:15091: checking if you want to allow EINTR in wgetch with pthreads" >&5
15092 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15093
15094 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15095 if test "${enable_pthreads_eintr+set}" = set; then
15096   enableval="$enable_pthreads_eintr"
15097   use_pthreads_eintr=$enableval
15098 else
15099   use_pthreads_eintr=no
15100 fi;
15101                 echo "$as_me:15101: result: $use_pthreads_eintr" >&5
15102 echo "${ECHO_T}$use_pthreads_eintr" >&6
15103                 if test "x$use_pthreads_eintr" = xyes ; then
15104
15105 cat >>confdefs.h <<\EOF
15106 #define USE_PTHREADS_EINTR 1
15107 EOF
15108
15109                 fi
15110 fi
15111
15112         echo "$as_me:15112: checking if you want to use weak-symbols for pthreads" >&5
15113 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15114
15115 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15116 if test "${enable_weak_symbols+set}" = set; then
15117   enableval="$enable_weak_symbols"
15118   use_weak_symbols=$enableval
15119 else
15120   use_weak_symbols=no
15121 fi;
15122         echo "$as_me:15122: result: $use_weak_symbols" >&5
15123 echo "${ECHO_T}$use_weak_symbols" >&6
15124         if test "x$use_weak_symbols" = xyes ; then
15125
15126 echo "$as_me:15126: checking if $CC supports weak symbols" >&5
15127 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15128 if test "${cf_cv_weak_symbols+set}" = set; then
15129   echo $ECHO_N "(cached) $ECHO_C" >&6
15130 else
15131
15132 cat >conftest.$ac_ext <<_ACEOF
15133 #line 15133 "configure"
15134 #include "confdefs.h"
15135
15136 #include <stdio.h>
15137 int
15138 main (void)
15139 {
15140
15141 #if defined(__GNUC__)
15142 #  if defined __USE_ISOC99
15143 #    define _cat_pragma(exp)    _Pragma(#exp)
15144 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15145 #  else
15146 #    define _weak_pragma(exp)
15147 #  endif
15148 #  define _declare(name)        __extension__ extern __typeof__(name) name
15149 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15150 #endif
15151
15152 weak_symbol(fopen);
15153
15154   ;
15155   return 0;
15156 }
15157 _ACEOF
15158 rm -f conftest.$ac_objext
15159 if { (eval echo "$as_me:15159: \"$ac_compile\"") >&5
15160   (eval $ac_compile) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); } &&
15164          { ac_try='test -s conftest.$ac_objext'
15165   { (eval echo "$as_me:15165: \"$ac_try\"") >&5
15166   (eval $ac_try) 2>&5
15167   ac_status=$?
15168   echo "$as_me:15168: \$? = $ac_status" >&5
15169   (exit $ac_status); }; }; then
15170   cf_cv_weak_symbols=yes
15171 else
15172   echo "$as_me: failed program was:" >&5
15173 cat conftest.$ac_ext >&5
15174 cf_cv_weak_symbols=no
15175 fi
15176 rm -f conftest.$ac_objext conftest.$ac_ext
15177
15178 fi
15179 echo "$as_me:15179: result: $cf_cv_weak_symbols" >&5
15180 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15181
15182         else
15183                 cf_cv_weak_symbols=no
15184         fi
15185
15186         if test "x$cf_cv_weak_symbols" = xyes ; then
15187
15188 cat >>confdefs.h <<\EOF
15189 #define USE_WEAK_SYMBOLS 1
15190 EOF
15191
15192         fi
15193 fi
15194
15195 PTHREAD=
15196 if test "x$with_pthread" = "xyes" ; then
15197
15198 cat >>confdefs.h <<\EOF
15199 #define USE_PTHREADS 1
15200 EOF
15201
15202         enable_reentrant=yes
15203         if test "x$cf_cv_weak_symbols" = xyes ; then
15204                 PTHREAD=-lpthread
15205
15206 cf_add_libs="$PRIVATE_LIBS"
15207 # reverse order
15208 cf_add_0lib=
15209 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15210 # filter duplicates
15211 for cf_add_1lib in $cf_add_0lib; do
15212         for cf_add_2lib in $cf_add_libs; do
15213                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15214                         cf_add_1lib=
15215                         break
15216                 fi
15217         done
15218         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15219 done
15220 PRIVATE_LIBS="$cf_add_libs"
15221
15222         fi
15223 fi
15224
15225 # Reentrant code has to be opaque; there's little advantage to making ncurses
15226 # opaque outside of that, so there is no --enable-opaque option.  We can use
15227 # this option without --with-pthreads, but this will be always set for
15228 # pthreads.
15229 echo "$as_me:15229: checking if you want reentrant code" >&5
15230 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15231
15232 # Check whether --enable-reentrant or --disable-reentrant was given.
15233 if test "${enable_reentrant+set}" = set; then
15234   enableval="$enable_reentrant"
15235   with_reentrant=$enableval
15236 else
15237   with_reentrant=no
15238 fi;
15239 echo "$as_me:15239: result: $with_reentrant" >&5
15240 echo "${ECHO_T}$with_reentrant" >&6
15241 if test "x$with_reentrant" = xyes ; then
15242         cf_cv_enable_reentrant=1
15243         cf_cv_enable_opaque="NCURSES_INTERNALS"
15244         NCURSES_SIZE_T=int
15245         if test "x$cf_cv_weak_symbols" = xyes ; then
15246
15247 # remove pthread library from $LIBS
15248 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15249
15250 cf_add_libs="$TEST_LIBS"
15251 # reverse order
15252 cf_add_0lib=
15253 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15254 # filter duplicates
15255 for cf_add_1lib in $cf_add_0lib; do
15256         for cf_add_2lib in $cf_add_libs; do
15257                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15258                         cf_add_1lib=
15259                         break
15260                 fi
15261         done
15262         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15263 done
15264 TEST_LIBS="$cf_add_libs"
15265
15266 cf_add_libs="$TEST_LIBS2"
15267 # reverse order
15268 cf_add_0lib=
15269 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15270 # filter duplicates
15271 for cf_add_1lib in $cf_add_0lib; do
15272         for cf_add_2lib in $cf_add_libs; do
15273                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15274                         cf_add_1lib=
15275                         break
15276                 fi
15277         done
15278         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15279 done
15280 TEST_LIBS2="$cf_add_libs"
15281
15282 cf_add_libs="$PRIVATE_LIBS"
15283 # reverse order
15284 cf_add_0lib=
15285 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15286 # filter duplicates
15287 for cf_add_1lib in $cf_add_0lib; do
15288         for cf_add_2lib in $cf_add_libs; do
15289                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15290                         cf_add_1lib=
15291                         break
15292                 fi
15293         done
15294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15295 done
15296 PRIVATE_LIBS="$cf_add_libs"
15297
15298         else
15299                 # when not using weak symbols but with_reentrant,
15300                 # add 't' to the library suffix on all platforms
15301                 # except cygwin, where we only do that if ALSO
15302                 # compiling with full thread support.
15303                 case "$host" in
15304                 (*cygwin* | *msys*)
15305                         if test "$with_pthread" = "yes" ; then
15306                                 if test "x$disable_lib_suffixes" = "xno" ; then
15307                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15308                                 fi
15309                         fi ;;
15310                 (*)
15311                         if test "x$disable_lib_suffixes" = "xno" ; then
15312                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15313                         fi
15314                         ;;
15315                 esac
15316         fi
15317
15318 cat >>confdefs.h <<\EOF
15319 #define USE_REENTRANT 1
15320 EOF
15321
15322 if test "${with_abi_version+set}" != set; then
15323         case $cf_cv_rel_version in
15324         (5.*)
15325                 cf_cv_rel_version=6.0
15326                 cf_cv_abi_version=6
15327                 { echo "$as_me:15327: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15328 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15329                 ;;
15330         esac
15331 fi
15332
15333 else
15334         cf_cv_enable_reentrant=0
15335         cf_cv_enable_opaque="NCURSES_OPAQUE"
15336         NCURSES_SIZE_T=short
15337 fi
15338
15339 echo "$as_me:15339: checking if you want opaque curses-library structures" >&5
15340 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15341
15342 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15343 if test "${enable_opaque_curses+set}" = set; then
15344   enableval="$enable_opaque_curses"
15345   test "$enableval" != yes && enableval=no
15346         if test "$enableval" != "no" ; then
15347     enable_opaque_curses=yes
15348         else
15349
15350          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15351          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15352
15353         fi
15354 else
15355   enableval=no
15356
15357          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15358          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15359
15360 fi;
15361 echo "$as_me:15361: result: $enable_opaque_curses" >&5
15362 echo "${ECHO_T}$enable_opaque_curses" >&6
15363
15364 test "$cf_cv_enable_reentrant" = 1 && \
15365 test "$enable_opaque_curses" = no && \
15366 { { echo "$as_me:15366: error: reentrant configuration requires opaque library" >&5
15367 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15368    { (exit 1); exit 1; }; }
15369
15370 echo "$as_me:15370: checking if you want opaque form-library structures" >&5
15371 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15372
15373 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15374 if test "${enable_opaque_form+set}" = set; then
15375   enableval="$enable_opaque_form"
15376   enable_opaque_form=yes
15377 else
15378   enable_opaque_form=no
15379 fi;
15380 echo "$as_me:15380: result: $enable_opaque_form" >&5
15381 echo "${ECHO_T}$enable_opaque_form" >&6
15382
15383 echo "$as_me:15383: checking if you want opaque menu-library structures" >&5
15384 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15385
15386 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15387 if test "${enable_opaque_menu+set}" = set; then
15388   enableval="$enable_opaque_menu"
15389   enable_opaque_menu=yes
15390 else
15391   enable_opaque_menu=no
15392 fi;
15393 echo "$as_me:15393: result: $enable_opaque_menu" >&5
15394 echo "${ECHO_T}$enable_opaque_menu" >&6
15395
15396 echo "$as_me:15396: checking if you want opaque panel-library structures" >&5
15397 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15398
15399 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15400 if test "${enable_opaque_panel+set}" = set; then
15401   enableval="$enable_opaque_panel"
15402   enable_opaque_panel=yes
15403 else
15404   enable_opaque_panel=no
15405 fi;
15406 echo "$as_me:15406: result: $enable_opaque_panel" >&5
15407 echo "${ECHO_T}$enable_opaque_panel" >&6
15408
15409 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15410 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15411 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15412 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15413
15414 ### Allow using a different wrap-prefix
15415 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15416         echo "$as_me:15416: checking for prefix used to wrap public variables" >&5
15417 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15418
15419 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15420 if test "${with_wrap_prefix+set}" = set; then
15421   withval="$with_wrap_prefix"
15422   NCURSES_WRAP_PREFIX=$withval
15423 else
15424   NCURSES_WRAP_PREFIX=_nc_
15425 fi;
15426         echo "$as_me:15426: result: $NCURSES_WRAP_PREFIX" >&5
15427 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15428 else
15429         NCURSES_WRAP_PREFIX=_nc_
15430 fi
15431
15432 cat >>confdefs.h <<EOF
15433 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15434 EOF
15435
15436 ###############################################################################
15437 # These options are relatively safe to experiment with.
15438
15439 echo "$as_me:15439: checking if you want all development code" >&5
15440 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15441
15442 # Check whether --with-develop or --without-develop was given.
15443 if test "${with_develop+set}" = set; then
15444   withval="$with_develop"
15445   with_develop=$withval
15446 else
15447   with_develop=no
15448 fi;
15449 echo "$as_me:15449: result: $with_develop" >&5
15450 echo "${ECHO_T}$with_develop" >&6
15451
15452 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15453 echo "$as_me:15453: checking if you want hard-tabs code" >&5
15454 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15455
15456 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15457 if test "${enable_hard_tabs+set}" = set; then
15458   enableval="$enable_hard_tabs"
15459
15460 else
15461   enable_hard_tabs=$with_develop
15462 fi;
15463 echo "$as_me:15463: result: $enable_hard_tabs" >&5
15464 echo "${ECHO_T}$enable_hard_tabs" >&6
15465 test "x$enable_hard_tabs" = xyes &&
15466 cat >>confdefs.h <<\EOF
15467 #define USE_HARD_TABS 1
15468 EOF
15469
15470 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15471 echo "$as_me:15471: checking if you want limited support for xmc" >&5
15472 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15473
15474 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15475 if test "${enable_xmc_glitch+set}" = set; then
15476   enableval="$enable_xmc_glitch"
15477
15478 else
15479   enable_xmc_glitch=$with_develop
15480 fi;
15481 echo "$as_me:15481: result: $enable_xmc_glitch" >&5
15482 echo "${ECHO_T}$enable_xmc_glitch" >&6
15483 test "x$enable_xmc_glitch" = xyes &&
15484 cat >>confdefs.h <<\EOF
15485 #define USE_XMC_SUPPORT 1
15486 EOF
15487
15488 ###############################################################################
15489 # These are just experimental, probably should not be in a package:
15490
15491 echo "$as_me:15491: checking if you do not want to assume colors are white-on-black" >&5
15492 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15493
15494 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15495 if test "${enable_assumed_color+set}" = set; then
15496   enableval="$enable_assumed_color"
15497   with_assumed_color=$enableval
15498 else
15499   with_assumed_color=yes
15500 fi;
15501 echo "$as_me:15501: result: $with_assumed_color" >&5
15502 echo "${ECHO_T}$with_assumed_color" >&6
15503 test "x$with_assumed_color" = xyes &&
15504 cat >>confdefs.h <<\EOF
15505 #define USE_ASSUMED_COLOR 1
15506 EOF
15507
15508 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15509 echo "$as_me:15509: checking if you want hashmap scrolling-optimization code" >&5
15510 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15511
15512 # Check whether --enable-hashmap or --disable-hashmap was given.
15513 if test "${enable_hashmap+set}" = set; then
15514   enableval="$enable_hashmap"
15515   with_hashmap=$enableval
15516 else
15517   with_hashmap=yes
15518 fi;
15519 echo "$as_me:15519: result: $with_hashmap" >&5
15520 echo "${ECHO_T}$with_hashmap" >&6
15521 test "x$with_hashmap" = xyes &&
15522 cat >>confdefs.h <<\EOF
15523 #define USE_HASHMAP 1
15524 EOF
15525
15526 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15527 echo "$as_me:15527: checking if you want colorfgbg code" >&5
15528 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15529
15530 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15531 if test "${enable_colorfgbg+set}" = set; then
15532   enableval="$enable_colorfgbg"
15533   with_colorfgbg=$enableval
15534 else
15535   with_colorfgbg=no
15536 fi;
15537 echo "$as_me:15537: result: $with_colorfgbg" >&5
15538 echo "${ECHO_T}$with_colorfgbg" >&6
15539 test "x$with_colorfgbg" = xyes &&
15540 cat >>confdefs.h <<\EOF
15541 #define USE_COLORFGBG 1
15542 EOF
15543
15544 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15545 echo "$as_me:15545: checking if you want to use gcc -fvisibility option" >&5
15546 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15547
15548 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15549 if test "${enable_fvisibility+set}" = set; then
15550   enableval="$enable_fvisibility"
15551   cf_with_fvisibility=$enableval
15552 else
15553   cf_with_fvisibility=no
15554 fi;
15555 echo "$as_me:15555: result: $cf_with_fvisibility" >&5
15556 echo "${ECHO_T}$cf_with_fvisibility" >&6
15557
15558 NCURSES_IMPEXP=
15559 NCURSES_CXX_IMPEXP=
15560 if test "x$cf_with_fvisibility" = xyes; then
15561
15562 echo "$as_me:15562: checking if $CC -fvisibility=hidden option works" >&5
15563 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15564 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15565   echo $ECHO_N "(cached) $ECHO_C" >&6
15566 else
15567
15568     cf_save_cflags="$CFLAGS"
15569     CFLAGS="$CFLAGS -fvisibility=hidden"
15570     cat >conftest.$ac_ext <<_ACEOF
15571 #line 15571 "configure"
15572 #include "confdefs.h"
15573
15574 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15575
15576 int
15577 main (void)
15578 {
15579
15580         if (somefunc()) return 1;
15581
15582   ;
15583   return 0;
15584 }
15585 _ACEOF
15586 rm -f conftest.$ac_objext conftest$ac_exeext
15587 if { (eval echo "$as_me:15587: \"$ac_link\"") >&5
15588   (eval $ac_link) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); } &&
15592          { ac_try='test -s conftest$ac_exeext'
15593   { (eval echo "$as_me:15593: \"$ac_try\"") >&5
15594   (eval $ac_try) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit $ac_status); }; }; then
15598   cf_cv_fvisibility_hidden=yes
15599 else
15600   echo "$as_me: failed program was:" >&5
15601 cat conftest.$ac_ext >&5
15602 cf_cv_fvisibility_hidden=no
15603 fi
15604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15605     CFLAGS=$cf_save_cflags
15606
15607 fi
15608 echo "$as_me:15608: result: $cf_cv_fvisibility_hidden" >&5
15609 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15610
15611         if test "x$cf_cv_fvisibility_hidden" = xyes
15612         then
15613
15614 cf_fix_cppflags=no
15615 cf_new_cflags=
15616 cf_new_cppflags=
15617 cf_new_extra_cppflags=
15618
15619 for cf_add_cflags in -fvisibility=hidden
15620 do
15621 case $cf_fix_cppflags in
15622 (no)
15623         case $cf_add_cflags in
15624         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15625                 case $cf_add_cflags in
15626                 (-D*)
15627                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15628
15629                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15630                                 && test -z "${cf_tst_cflags}" \
15631                                 && cf_fix_cppflags=yes
15632
15633                         if test $cf_fix_cppflags = yes ; then
15634
15635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15637
15638                                 continue
15639                         elif test "${cf_tst_cflags}" = "\"'" ; then
15640
15641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15643
15644                                 continue
15645                         fi
15646                         ;;
15647                 esac
15648                 case "$CPPFLAGS" in
15649                 (*$cf_add_cflags)
15650                         ;;
15651                 (*)
15652                         case $cf_add_cflags in
15653                         (-D*)
15654                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15655
15656 CPPFLAGS=`echo "$CPPFLAGS" | \
15657         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15658                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15659
15660                                 ;;
15661                         esac
15662
15663         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15664         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15665
15666                         ;;
15667                 esac
15668                 ;;
15669         (*)
15670
15671         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15672         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15673
15674                 ;;
15675         esac
15676         ;;
15677 (yes)
15678
15679         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15680         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15681
15682         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15683
15684         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15685                 && test -z "${cf_tst_cflags}" \
15686                 && cf_fix_cppflags=no
15687         ;;
15688 esac
15689 done
15690
15691 if test -n "$cf_new_cflags" ; then
15692
15693         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15694         CFLAGS="${CFLAGS}$cf_new_cflags"
15695
15696 fi
15697
15698 if test -n "$cf_new_cppflags" ; then
15699
15700         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15701         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15702
15703 fi
15704
15705 if test -n "$cf_new_extra_cppflags" ; then
15706
15707         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15708         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15709
15710 fi
15711
15712                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15713         fi
15714         if test -n "$CXX"
15715         then
15716                 ac_ext=cc
15717 ac_cpp='$CXXCPP $CPPFLAGS'
15718 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15719 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15720 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15721 ac_main_return=return
15722
15723 echo "$as_me:15723: checking if $CXX -fvisibility=hidden option works" >&5
15724 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15725 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15726   echo $ECHO_N "(cached) $ECHO_C" >&6
15727 else
15728
15729     cf_save_cflags="$CXXFLAGS"
15730     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15731     cat >conftest.$ac_ext <<_ACEOF
15732 #line 15732 "configure"
15733 #include "confdefs.h"
15734
15735 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15736
15737 int
15738 main (void)
15739 {
15740
15741         if (somefunc()) return 1;
15742
15743   ;
15744   return 0;
15745 }
15746 _ACEOF
15747 rm -f conftest.$ac_objext conftest$ac_exeext
15748 if { (eval echo "$as_me:15748: \"$ac_link\"") >&5
15749   (eval $ac_link) 2>&5
15750   ac_status=$?
15751   echo "$as_me:15751: \$? = $ac_status" >&5
15752   (exit $ac_status); } &&
15753          { ac_try='test -s conftest$ac_exeext'
15754   { (eval echo "$as_me:15754: \"$ac_try\"") >&5
15755   (eval $ac_try) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); }; }; then
15759   cf_cv_fvisibility_hidden2=yes
15760 else
15761   echo "$as_me: failed program was:" >&5
15762 cat conftest.$ac_ext >&5
15763 cf_cv_fvisibility_hidden2=no
15764 fi
15765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15766     CXXFLAGS=$cf_save_cflags
15767
15768 fi
15769 echo "$as_me:15769: result: $cf_cv_fvisibility_hidden2" >&5
15770 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15771
15772                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15773                 then
15774
15775 cf_save_CXXFLAGS="$CFLAGS"
15776 CFLAGS="$CXXFLAGS"
15777
15778 cf_fix_cppflags=no
15779 cf_new_cflags=
15780 cf_new_cppflags=
15781 cf_new_extra_cppflags=
15782
15783 for cf_add_cflags in -fvisibility=hidden
15784 do
15785 case $cf_fix_cppflags in
15786 (no)
15787         case $cf_add_cflags in
15788         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15789                 case $cf_add_cflags in
15790                 (-D*)
15791                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15792
15793                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15794                                 && test -z "${cf_tst_cflags}" \
15795                                 && cf_fix_cppflags=yes
15796
15797                         if test $cf_fix_cppflags = yes ; then
15798
15799         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15800         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15801
15802                                 continue
15803                         elif test "${cf_tst_cflags}" = "\"'" ; then
15804
15805         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15806         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15807
15808                                 continue
15809                         fi
15810                         ;;
15811                 esac
15812                 case "$CPPFLAGS" in
15813                 (*$cf_add_cflags)
15814                         ;;
15815                 (*)
15816                         case $cf_add_cflags in
15817                         (-D*)
15818                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15819
15820 CPPFLAGS=`echo "$CPPFLAGS" | \
15821         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15822                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15823
15824                                 ;;
15825                         esac
15826
15827         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15828         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15829
15830                         ;;
15831                 esac
15832                 ;;
15833         (*)
15834
15835         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15836         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15837
15838                 ;;
15839         esac
15840         ;;
15841 (yes)
15842
15843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15845
15846         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15847
15848         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15849                 && test -z "${cf_tst_cflags}" \
15850                 && cf_fix_cppflags=no
15851         ;;
15852 esac
15853 done
15854
15855 if test -n "$cf_new_cflags" ; then
15856
15857         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15858         CFLAGS="${CFLAGS}$cf_new_cflags"
15859
15860 fi
15861
15862 if test -n "$cf_new_cppflags" ; then
15863
15864         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15865         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15866
15867 fi
15868
15869 if test -n "$cf_new_extra_cppflags" ; then
15870
15871         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15872         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15873
15874 fi
15875
15876 CXXFLAGS="$CFLAGS"
15877 CFLAGS="$cf_save_CXXFLAGS"
15878
15879                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15880                 fi
15881                 ac_ext=c
15882 ac_cpp='$CPP $CPPFLAGS'
15883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15886 ac_main_return=return
15887
15888         fi
15889 fi
15890
15891 ###   use option --enable-interop to turn on use of bindings used for interop
15892 echo "$as_me:15892: checking if you want interop bindings" >&5
15893 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15894
15895 # Check whether --enable-interop or --disable-interop was given.
15896 if test "${enable_interop+set}" = set; then
15897   enableval="$enable_interop"
15898   with_exp_interop=$enableval
15899 else
15900   with_exp_interop=$cf_dft_interop
15901 fi;
15902 echo "$as_me:15902: result: $with_exp_interop" >&5
15903 echo "${ECHO_T}$with_exp_interop" >&6
15904
15905 NCURSES_INTEROP_FUNCS=0
15906 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15907
15908 echo "$as_me:15908: checking if you want experimental safe-sprintf code" >&5
15909 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15910
15911 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15912 if test "${enable_safe_sprintf+set}" = set; then
15913   enableval="$enable_safe_sprintf"
15914   with_safe_sprintf=$enableval
15915 else
15916   with_safe_sprintf=no
15917 fi;
15918 echo "$as_me:15918: result: $with_safe_sprintf" >&5
15919 echo "${ECHO_T}$with_safe_sprintf" >&6
15920
15921 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15922 # when hashmap is used scroll hints are useless
15923 if test "$with_hashmap" = no ; then
15924 echo "$as_me:15924: checking if you want to experiment without scrolling-hints code" >&5
15925 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15926
15927 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15928 if test "${enable_scroll_hints+set}" = set; then
15929   enableval="$enable_scroll_hints"
15930   with_scroll_hints=$enableval
15931 else
15932   with_scroll_hints=yes
15933 fi;
15934 echo "$as_me:15934: result: $with_scroll_hints" >&5
15935 echo "${ECHO_T}$with_scroll_hints" >&6
15936 test "x$with_scroll_hints" = xyes &&
15937 cat >>confdefs.h <<\EOF
15938 #define USE_SCROLL_HINTS 1
15939 EOF
15940
15941 fi
15942
15943 echo "$as_me:15943: checking if you want wgetch-events code" >&5
15944 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15945
15946 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15947 if test "${enable_wgetch_events+set}" = set; then
15948   enableval="$enable_wgetch_events"
15949   with_wgetch_events=$enableval
15950 else
15951   with_wgetch_events=no
15952 fi;
15953 echo "$as_me:15953: result: $with_wgetch_events" >&5
15954 echo "${ECHO_T}$with_wgetch_events" >&6
15955 test "x$with_wgetch_events" = xyes &&
15956 cat >>confdefs.h <<\EOF
15957 #define NCURSES_WGETCH_EVENTS 1
15958 EOF
15959
15960 case $cf_cv_system_name in
15961 (*mingw32*|*mingw64*|*-msvc*)
15962         echo "$as_me:15962: checking if you want experimental-Windows driver" >&5
15963 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
15964
15965 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
15966 if test "${enable_exp_win32+set}" = set; then
15967   enableval="$enable_exp_win32"
15968   with_exp_win32=$enableval
15969 else
15970   with_exp_win32=no
15971 fi;
15972         echo "$as_me:15972: result: $with_exp_win32" >&5
15973 echo "${ECHO_T}$with_exp_win32" >&6
15974         test "x$with_exp_win32" = xyes &&
15975 cat >>confdefs.h <<\EOF
15976 #define EXP_WIN32_DRIVER 1
15977 EOF
15978
15979         ;;
15980 esac
15981
15982 ###############################################################################
15983
15984 ###     use option --disable-echo to suppress full display compiling commands
15985
15986 echo "$as_me:15986: checking if you want to see long compiling messages" >&5
15987 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15988
15989 # Check whether --enable-echo or --disable-echo was given.
15990 if test "${enable_echo+set}" = set; then
15991   enableval="$enable_echo"
15992   test "$enableval" != no && enableval=yes
15993         if test "$enableval" != "yes" ; then
15994
15995         ECHO_LT='--silent'
15996         ECHO_LD='@echo linking $@;'
15997         RULE_CC='@echo compiling $<'
15998         SHOW_CC='@echo compiling $@'
15999         ECHO_CC='@'
16000
16001         else
16002
16003         ECHO_LT=''
16004         ECHO_LD=''
16005         RULE_CC=''
16006         SHOW_CC=''
16007         ECHO_CC=''
16008
16009         fi
16010 else
16011   enableval=yes
16012
16013         ECHO_LT=''
16014         ECHO_LD=''
16015         RULE_CC=''
16016         SHOW_CC=''
16017         ECHO_CC=''
16018
16019 fi;
16020 echo "$as_me:16020: result: $enableval" >&5
16021 echo "${ECHO_T}$enableval" >&6
16022
16023 if test "x$enable_echo" = xyes; then
16024         ECHO_LINK=
16025 else
16026         ECHO_LINK='@ echo linking $@ ... ;'
16027         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16028         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16029 fi
16030
16031 # --disable-stripping is used for debugging
16032
16033 echo "$as_me:16033: checking if you want to install stripped executables" >&5
16034 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16035
16036 # Check whether --enable-stripping or --disable-stripping was given.
16037 if test "${enable_stripping+set}" = set; then
16038   enableval="$enable_stripping"
16039   test "$enableval" != no && enableval=yes
16040         if test "$enableval" != "yes" ; then
16041     with_stripping=no
16042         else
16043                 with_stripping=yes
16044         fi
16045 else
16046   enableval=yes
16047         with_stripping=yes
16048
16049 fi;
16050 echo "$as_me:16050: result: $with_stripping" >&5
16051 echo "${ECHO_T}$with_stripping" >&6
16052
16053 if test "$with_stripping" = yes
16054 then
16055         INSTALL_OPT_S="-s"
16056 else
16057         INSTALL_OPT_S=
16058 fi
16059
16060 : ${INSTALL:=install}
16061 echo "$as_me:16061: checking if install accepts -p option" >&5
16062 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16063 if test "${cf_cv_install_p+set}" = set; then
16064   echo $ECHO_N "(cached) $ECHO_C" >&6
16065 else
16066
16067         rm -rf conftest*
16068         date >conftest.in
16069         mkdir conftest.out
16070         sleep 3
16071         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16072         then
16073                 if test -f conftest.out/conftest.in
16074                 then
16075                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16076                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16077                         if test -s conftest.err
16078                         then
16079                                 cf_cv_install_p=no
16080                         else
16081                                 cf_cv_install_p=yes
16082                         fi
16083                 else
16084                         cf_cv_install_p=no
16085                 fi
16086         else
16087                 cf_cv_install_p=no
16088         fi
16089         rm -rf conftest*
16090
16091 fi
16092 echo "$as_me:16092: result: $cf_cv_install_p" >&5
16093 echo "${ECHO_T}$cf_cv_install_p" >&6
16094
16095 echo "$as_me:16095: checking if install needs to be told about ownership" >&5
16096 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16097 case `$ac_config_guess` in
16098 (*minix)
16099         with_install_o=yes
16100         ;;
16101 (*)
16102         with_install_o=no
16103         ;;
16104 esac
16105
16106 echo "$as_me:16106: result: $with_install_o" >&5
16107 echo "${ECHO_T}$with_install_o" >&6
16108 if test "x$with_install_o" = xyes
16109 then
16110         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'`
16111 else
16112         INSTALL_OPT_O=
16113 fi
16114
16115 # If we're avoiding relinking of shared libraries during install, that is to
16116 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16117 # the install program has "-p" (for preserving timestamps).
16118 cf_cv_do_reranlib=yes
16119 if test "x$cf_cv_install_p" = xyes
16120 then
16121         if test "x$cf_cv_do_relink" != xyes
16122         then
16123                 cf_cv_do_reranlib=no
16124                 INSTALL_OPT_P="-p"
16125                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16126         fi
16127 fi
16128
16129 ###     use option --enable-warnings to turn on all gcc warnings
16130
16131 if ( test "$GCC" = yes || test "$GXX" = yes )
16132 then
16133
16134 if ( test "$GCC" = yes || test "$GXX" = yes )
16135 then
16136         case $CFLAGS in
16137         (*-Werror=*)
16138                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16139
16140 echo "${as_me:-configure}:16140: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16141
16142                 cf_temp_flags=
16143                 for cf_temp_scan in $CFLAGS
16144                 do
16145                         case "x$cf_temp_scan" in
16146                         (x-Werror=*)
16147
16148         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16149         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16150
16151                                 ;;
16152                         (*)
16153
16154         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16155         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16156
16157                                 ;;
16158                         esac
16159                 done
16160                 CFLAGS="$cf_temp_flags"
16161                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16162
16163 echo "${as_me:-configure}:16163: testing ... fixed $CFLAGS ..." 1>&5
16164
16165                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16166
16167 echo "${as_me:-configure}:16167: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16168
16169                 ;;
16170         esac
16171 fi
16172
16173 if ( test "$GCC" = yes || test "$GXX" = yes )
16174 then
16175         case $CPPFLAGS in
16176         (*-Werror=*)
16177                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16178
16179 echo "${as_me:-configure}:16179: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16180
16181                 cf_temp_flags=
16182                 for cf_temp_scan in $CPPFLAGS
16183                 do
16184                         case "x$cf_temp_scan" in
16185                         (x-Werror=*)
16186
16187         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16188         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16189
16190                                 ;;
16191                         (*)
16192
16193         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16194         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16195
16196                                 ;;
16197                         esac
16198                 done
16199                 CPPFLAGS="$cf_temp_flags"
16200                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16201
16202 echo "${as_me:-configure}:16202: testing ... fixed $CPPFLAGS ..." 1>&5
16203
16204                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16205
16206 echo "${as_me:-configure}:16206: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16207
16208                 ;;
16209         esac
16210 fi
16211
16212 if ( test "$GCC" = yes || test "$GXX" = yes )
16213 then
16214         case $LDFLAGS in
16215         (*-Werror=*)
16216                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16217
16218 echo "${as_me:-configure}:16218: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16219
16220                 cf_temp_flags=
16221                 for cf_temp_scan in $LDFLAGS
16222                 do
16223                         case "x$cf_temp_scan" in
16224                         (x-Werror=*)
16225
16226         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16227         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16228
16229                                 ;;
16230                         (*)
16231
16232         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16233         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16234
16235                                 ;;
16236                         esac
16237                 done
16238                 LDFLAGS="$cf_temp_flags"
16239                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16240
16241 echo "${as_me:-configure}:16241: testing ... fixed $LDFLAGS ..." 1>&5
16242
16243                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16244
16245 echo "${as_me:-configure}:16245: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16246
16247                 ;;
16248         esac
16249 fi
16250
16251 echo "$as_me:16251: checking if you want to turn on gcc warnings" >&5
16252 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16253
16254 # Check whether --enable-warnings or --disable-warnings was given.
16255 if test "${enable_warnings+set}" = set; then
16256   enableval="$enable_warnings"
16257   test "$enableval" != yes && enableval=no
16258         if test "$enableval" != "no" ; then
16259     with_warnings=yes
16260         else
16261                 with_warnings=no
16262         fi
16263 else
16264   enableval=no
16265         with_warnings=no
16266
16267 fi;
16268 echo "$as_me:16268: result: $with_warnings" >&5
16269 echo "${ECHO_T}$with_warnings" >&6
16270 if test "$with_warnings" = "yes"
16271 then
16272
16273 if test "x$have_x" = xyes; then
16274
16275 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16276 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16277 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16278 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16279 for cf_X_CFLAGS in $X_CFLAGS
16280 do
16281         case "x$cf_X_CFLAGS" in
16282         x-[IUD]*)
16283                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16284                 ;;
16285         *)
16286                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16287                 ;;
16288         esac
16289 done
16290
16291 cat >conftest.$ac_ext <<_ACEOF
16292 #line 16292 "configure"
16293 #include "confdefs.h"
16294
16295 #include <stdlib.h>
16296 #include <X11/Intrinsic.h>
16297
16298 int
16299 main (void)
16300 {
16301 String foo = malloc(1); (void)foo
16302   ;
16303   return 0;
16304 }
16305 _ACEOF
16306 rm -f conftest.$ac_objext
16307 if { (eval echo "$as_me:16307: \"$ac_compile\"") >&5
16308   (eval $ac_compile) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); } &&
16312          { ac_try='test -s conftest.$ac_objext'
16313   { (eval echo "$as_me:16313: \"$ac_try\"") >&5
16314   (eval $ac_try) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit $ac_status); }; }; then
16318
16319 echo "$as_me:16319: checking for X11/Xt const-feature" >&5
16320 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16321 if test "${cf_cv_const_x_string+set}" = set; then
16322   echo $ECHO_N "(cached) $ECHO_C" >&6
16323 else
16324
16325         cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328
16329 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16330 #undef  XTSTRINGDEFINES /* X11R5 and later */
16331 #include <stdlib.h>
16332 #include <X11/Intrinsic.h>
16333
16334 int
16335 main (void)
16336 {
16337 String foo = malloc(1); *foo = 0
16338   ;
16339   return 0;
16340 }
16341 _ACEOF
16342 rm -f conftest.$ac_objext
16343 if { (eval echo "$as_me:16343: \"$ac_compile\"") >&5
16344   (eval $ac_compile) 2>&5
16345   ac_status=$?
16346   echo "$as_me:16346: \$? = $ac_status" >&5
16347   (exit $ac_status); } &&
16348          { ac_try='test -s conftest.$ac_objext'
16349   { (eval echo "$as_me:16349: \"$ac_try\"") >&5
16350   (eval $ac_try) 2>&5
16351   ac_status=$?
16352   echo "$as_me:16352: \$? = $ac_status" >&5
16353   (exit $ac_status); }; }; then
16354
16355                         cf_cv_const_x_string=no
16356
16357 else
16358   echo "$as_me: failed program was:" >&5
16359 cat conftest.$ac_ext >&5
16360
16361                         cf_cv_const_x_string=yes
16362
16363 fi
16364 rm -f conftest.$ac_objext conftest.$ac_ext
16365
16366 fi
16367 echo "$as_me:16367: result: $cf_cv_const_x_string" >&5
16368 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16369
16370 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16371 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16372 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16373
16374 case $cf_cv_const_x_string in
16375 (no)
16376
16377         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16378         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16379
16380         ;;
16381 (*)
16382
16383         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16384         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16385
16386         ;;
16387 esac
16388
16389 else
16390   echo "$as_me: failed program was:" >&5
16391 cat conftest.$ac_ext >&5
16392 fi
16393 rm -f conftest.$ac_objext conftest.$ac_ext
16394  fi
16395 cat > conftest.$ac_ext <<EOF
16396 #line 16396 "${as_me:-configure}"
16397 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16398 EOF
16399 if test "$INTEL_COMPILER" = yes
16400 then
16401 # The "-wdXXX" options suppress warnings:
16402 # remark #1419: external declaration in primary source file
16403 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16404 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16405 # remark #193: zero used for undefined preprocessing identifier
16406 # remark #593: variable "curs_sb_left_arrow" was set but never used
16407 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16408 # remark #869: parameter "tw" was never referenced
16409 # remark #981: operands are evaluated in unspecified order
16410 # warning #279: controlling expression is constant
16411
16412         { echo "$as_me:16412: checking for $CC warning options..." >&5
16413 echo "$as_me: checking for $CC warning options..." >&6;}
16414         cf_save_CFLAGS="$CFLAGS"
16415         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16416         for cf_opt in \
16417                 wd1419 \
16418                 wd1683 \
16419                 wd1684 \
16420                 wd193 \
16421                 wd593 \
16422                 wd279 \
16423                 wd810 \
16424                 wd869 \
16425                 wd981
16426         do
16427                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16428                 if { (eval echo "$as_me:16428: \"$ac_compile\"") >&5
16429   (eval $ac_compile) 2>&5
16430   ac_status=$?
16431   echo "$as_me:16431: \$? = $ac_status" >&5
16432   (exit $ac_status); }; then
16433                         test -n "$verbose" && echo "$as_me:16433: result: ... -$cf_opt" >&5
16434 echo "${ECHO_T}... -$cf_opt" >&6
16435                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16436                 fi
16437         done
16438         CFLAGS="$cf_save_CFLAGS"
16439 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16440 then
16441         { echo "$as_me:16441: checking for $CC warning options..." >&5
16442 echo "$as_me: checking for $CC warning options..." >&6;}
16443         cf_save_CFLAGS="$CFLAGS"
16444         cf_warn_CONST=""
16445         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16446         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16447         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16448         for cf_opt in W Wall \
16449                 Wbad-function-cast \
16450                 Wcast-align \
16451                 Wcast-qual \
16452                 Wdeclaration-after-statement \
16453                 Wextra \
16454                 Winline \
16455                 Wmissing-declarations \
16456                 Wmissing-prototypes \
16457                 Wnested-externs \
16458                 Wpointer-arith \
16459                 Wshadow \
16460                 Wstrict-prototypes \
16461                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16462         do
16463                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16464                 if { (eval echo "$as_me:16464: \"$ac_compile\"") >&5
16465   (eval $ac_compile) 2>&5
16466   ac_status=$?
16467   echo "$as_me:16467: \$? = $ac_status" >&5
16468   (exit $ac_status); }; then
16469                         test -n "$verbose" && echo "$as_me:16469: result: ... -$cf_opt" >&5
16470 echo "${ECHO_T}... -$cf_opt" >&6
16471                         case $cf_opt in
16472                         (Winline)
16473                                 case $GCC_VERSION in
16474                                 ([34].*)
16475                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16476
16477 echo "${as_me:-configure}:16477: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16478
16479                                         continue;;
16480                                 esac
16481                                 ;;
16482                         (Wpointer-arith)
16483                                 case $GCC_VERSION in
16484                                 ([12].*)
16485                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16486
16487 echo "${as_me:-configure}:16487: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16488
16489                                         continue;;
16490                                 esac
16491                                 ;;
16492                         esac
16493                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16494                 fi
16495         done
16496         CFLAGS="$cf_save_CFLAGS"
16497 fi
16498 rm -rf conftest*
16499
16500 fi
16501
16502 if ( test "$GCC" = yes || test "$GXX" = yes )
16503 then
16504 cat > conftest.i <<EOF
16505 #ifndef GCC_PRINTF
16506 #define GCC_PRINTF 0
16507 #endif
16508 #ifndef GCC_SCANF
16509 #define GCC_SCANF 0
16510 #endif
16511 #ifndef GCC_NORETURN
16512 #define GCC_NORETURN /* nothing */
16513 #endif
16514 #ifndef GCC_UNUSED
16515 #define GCC_UNUSED /* nothing */
16516 #endif
16517 EOF
16518 if test "$GCC" = yes
16519 then
16520         { echo "$as_me:16520: checking for $CC __attribute__ directives..." >&5
16521 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16522 cat > conftest.$ac_ext <<EOF
16523 #line 16523 "${as_me:-configure}"
16524 #include "confdefs.h"
16525 #include "conftest.h"
16526 #include "conftest.i"
16527 #if     GCC_PRINTF
16528 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16529 #else
16530 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16531 #endif
16532 #if     GCC_SCANF
16533 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16534 #else
16535 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16536 #endif
16537 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16538 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16539 extern void foo(void) GCC_NORETURN;
16540 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16541 EOF
16542         cf_printf_attribute=no
16543         cf_scanf_attribute=no
16544         for cf_attribute in scanf printf unused noreturn
16545         do
16546
16547 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16548
16549                 cf_directive="__attribute__(($cf_attribute))"
16550                 echo "checking for $CC $cf_directive" 1>&5
16551
16552                 case $cf_attribute in
16553                 (printf)
16554                         cf_printf_attribute=yes
16555                         cat >conftest.h <<EOF
16556 #define GCC_$cf_ATTRIBUTE 1
16557 EOF
16558                         ;;
16559                 (scanf)
16560                         cf_scanf_attribute=yes
16561                         cat >conftest.h <<EOF
16562 #define GCC_$cf_ATTRIBUTE 1
16563 EOF
16564                         ;;
16565                 (*)
16566                         cat >conftest.h <<EOF
16567 #define GCC_$cf_ATTRIBUTE $cf_directive
16568 EOF
16569                         ;;
16570                 esac
16571
16572                 if { (eval echo "$as_me:16572: \"$ac_compile\"") >&5
16573   (eval $ac_compile) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); }; then
16577                         test -n "$verbose" && echo "$as_me:16577: result: ... $cf_attribute" >&5
16578 echo "${ECHO_T}... $cf_attribute" >&6
16579                         cat conftest.h >>confdefs.h
16580                         case $cf_attribute in
16581                         (noreturn)
16582
16583 cat >>confdefs.h <<EOF
16584 #define GCC_NORETURN $cf_directive
16585 EOF
16586
16587                                 ;;
16588                         (printf)
16589                                 cf_value='/* nothing */'
16590                                 if test "$cf_printf_attribute" != no ; then
16591                                         cf_value='__attribute__((format(printf,fmt,var)))'
16592
16593 cat >>confdefs.h <<\EOF
16594 #define GCC_PRINTF 1
16595 EOF
16596
16597                                 fi
16598
16599 cat >>confdefs.h <<EOF
16600 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16601 EOF
16602
16603                                 ;;
16604                         (scanf)
16605                                 cf_value='/* nothing */'
16606                                 if test "$cf_scanf_attribute" != no ; then
16607                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16608
16609 cat >>confdefs.h <<\EOF
16610 #define GCC_SCANF 1
16611 EOF
16612
16613                                 fi
16614
16615 cat >>confdefs.h <<EOF
16616 #define GCC_SCANFLIKE(fmt,var) $cf_value
16617 EOF
16618
16619                                 ;;
16620                         (unused)
16621
16622 cat >>confdefs.h <<EOF
16623 #define GCC_UNUSED $cf_directive
16624 EOF
16625
16626                                 ;;
16627                         esac
16628                 fi
16629         done
16630 else
16631         fgrep define conftest.i >>confdefs.h
16632 fi
16633 rm -rf conftest*
16634 fi
16635
16636 fi
16637
16638 if test "x$with_warnings" = "xyes"; then
16639
16640         ADAFLAGS="$ADAFLAGS -gnatg"
16641
16642         if test "x$cf_with_cxx" = xyes ; then
16643
16644 INTEL_CPLUSPLUS=no
16645
16646 if test "$GCC" = yes ; then
16647         case $host_os in
16648         (linux*|gnu*)
16649                 echo "$as_me:16649: checking if this is really Intel C++ compiler" >&5
16650 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16651                 cf_save_CFLAGS="$CXXFLAGS"
16652                 CXXFLAGS="$CXXFLAGS -no-gcc"
16653                 cat >conftest.$ac_ext <<_ACEOF
16654 #line 16654 "configure"
16655 #include "confdefs.h"
16656
16657 int
16658 main (void)
16659 {
16660
16661 #ifdef __INTEL_COMPILER
16662 #else
16663 make an error
16664 #endif
16665
16666   ;
16667   return 0;
16668 }
16669 _ACEOF
16670 rm -f conftest.$ac_objext
16671 if { (eval echo "$as_me:16671: \"$ac_compile\"") >&5
16672   (eval $ac_compile) 2>&5
16673   ac_status=$?
16674   echo "$as_me:16674: \$? = $ac_status" >&5
16675   (exit $ac_status); } &&
16676          { ac_try='test -s conftest.$ac_objext'
16677   { (eval echo "$as_me:16677: \"$ac_try\"") >&5
16678   (eval $ac_try) 2>&5
16679   ac_status=$?
16680   echo "$as_me:16680: \$? = $ac_status" >&5
16681   (exit $ac_status); }; }; then
16682   INTEL_CPLUSPLUS=yes
16683 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16684
16685 else
16686   echo "$as_me: failed program was:" >&5
16687 cat conftest.$ac_ext >&5
16688 fi
16689 rm -f conftest.$ac_objext conftest.$ac_ext
16690                 CXXFLAGS="$cf_save_CFLAGS"
16691                 echo "$as_me:16691: result: $INTEL_CPLUSPLUS" >&5
16692 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16693                 ;;
16694         esac
16695 fi
16696
16697 CLANG_CPLUSPLUS=no
16698
16699 if test "$GCC" = yes ; then
16700         echo "$as_me:16700: checking if this is really Clang C++ compiler" >&5
16701 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16702         cf_save_CFLAGS="$CXXFLAGS"
16703         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16704         cat >conftest.$ac_ext <<_ACEOF
16705 #line 16705 "configure"
16706 #include "confdefs.h"
16707
16708 int
16709 main (void)
16710 {
16711
16712 #ifdef __clang__
16713 #else
16714 make an error
16715 #endif
16716
16717   ;
16718   return 0;
16719 }
16720 _ACEOF
16721 rm -f conftest.$ac_objext
16722 if { (eval echo "$as_me:16722: \"$ac_compile\"") >&5
16723   (eval $ac_compile) 2>&5
16724   ac_status=$?
16725   echo "$as_me:16725: \$? = $ac_status" >&5
16726   (exit $ac_status); } &&
16727          { ac_try='test -s conftest.$ac_objext'
16728   { (eval echo "$as_me:16728: \"$ac_try\"") >&5
16729   (eval $ac_try) 2>&5
16730   ac_status=$?
16731   echo "$as_me:16731: \$? = $ac_status" >&5
16732   (exit $ac_status); }; }; then
16733   CLANG_CPLUSPLUS=yes
16734 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16735
16736 else
16737   echo "$as_me: failed program was:" >&5
16738 cat conftest.$ac_ext >&5
16739 fi
16740 rm -f conftest.$ac_objext conftest.$ac_ext
16741         CXXFLAGS="$cf_save_CFLAGS"
16742         echo "$as_me:16742: result: $CLANG_CPLUSPLUS" >&5
16743 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16744 fi
16745
16746 if test "x$CLANG_COMPILER" = "xyes" ; then
16747
16748         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16749         CFLAGS="${CFLAGS}-Wno-error=implicit-function-declaration"
16750
16751 fi
16752
16753 ac_ext=cc
16754 ac_cpp='$CXXCPP $CPPFLAGS'
16755 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16756 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16757 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16758 ac_main_return=return
16759
16760 cat > conftest.$ac_ext <<EOF
16761 #line 16761 "configure"
16762 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16763 EOF
16764
16765 if test "$INTEL_CPLUSPLUS" = yes
16766 then
16767 # The "-wdXXX" options suppress warnings:
16768 # remark #1419: external declaration in primary source file
16769 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16770 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16771 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16772 # remark #193: zero used for undefined preprocessing identifier
16773 # remark #593: variable "curs_sb_left_arrow" was set but never used
16774 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16775 # remark #869: parameter "tw" was never referenced
16776 # remark #981: operands are evaluated in unspecified order
16777 # warning #269: invalid format string conversion
16778
16779         { echo "$as_me:16779: checking for $CC warning options..." >&5
16780 echo "$as_me: checking for $CC warning options..." >&6;}
16781         cf_save_CXXFLAGS="$CXXFLAGS"
16782         EXTRA_CXXFLAGS="-Wall"
16783         for cf_opt in \
16784                 wd1419 \
16785                 wd1682 \
16786                 wd1683 \
16787                 wd1684 \
16788                 wd193 \
16789                 wd279 \
16790                 wd593 \
16791                 wd810 \
16792                 wd869 \
16793                 wd981
16794         do
16795                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16796                 if { (eval echo "$as_me:16796: \"$ac_compile\"") >&5
16797   (eval $ac_compile) 2>&5
16798   ac_status=$?
16799   echo "$as_me:16799: \$? = $ac_status" >&5
16800   (exit $ac_status); }; then
16801                         test -n "$verbose" && echo "$as_me:16801: result: ... -$cf_opt" >&5
16802 echo "${ECHO_T}... -$cf_opt" >&6
16803                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16804                 fi
16805         done
16806         CXXFLAGS="$cf_save_CXXFLAGS"
16807
16808 elif test "$GXX" = yes
16809 then
16810         { echo "$as_me:16810: checking for $CXX warning options..." >&5
16811 echo "$as_me: checking for $CXX warning options..." >&6;}
16812         cf_save_CXXFLAGS="$CXXFLAGS"
16813         EXTRA_CXXFLAGS="-W -Wall"
16814         cf_gxx_extra_warnings=""
16815         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16816         case "$GCC_VERSION" in
16817         ([1-2].*)
16818                 ;;
16819         (*)
16820                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16821                 ;;
16822         esac
16823         for cf_opt in \
16824                 Wabi \
16825                 fabi-version=0 \
16826                 Wextra \
16827                 Wignored-qualifiers \
16828                 Wlogical-op \
16829                 Woverloaded-virtual \
16830                 Wsign-promo \
16831                 Wsynth \
16832                 Wold-style-cast \
16833                 Wcast-align \
16834                 Wcast-qual \
16835                 Wpointer-arith \
16836                 Wshadow \
16837                 Wundef $cf_gxx_extra_warnings Wno-unused
16838         do
16839                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16840                 if { (eval echo "$as_me:16840: \"$ac_compile\"") >&5
16841   (eval $ac_compile) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); }; then
16845                         test -n "$verbose" && echo "$as_me:16845: result: ... -$cf_opt" >&5
16846 echo "${ECHO_T}... -$cf_opt" >&6
16847                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16848                 else
16849                         test -n "$verbose" && echo "$as_me:16849: result: ... no -$cf_opt" >&5
16850 echo "${ECHO_T}... no -$cf_opt" >&6
16851                 fi
16852         done
16853         CXXFLAGS="$cf_save_CXXFLAGS"
16854 fi
16855
16856 rm -rf conftest*
16857 ac_ext=c
16858 ac_cpp='$CPP $CPPFLAGS'
16859 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16860 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16862 ac_main_return=return
16863
16864         fi
16865 fi
16866
16867 echo "$as_me:16867: checking if you want to work around bogus compiler/loader warnings" >&5
16868 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16869
16870 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16871 if test "${enable_string_hacks+set}" = set; then
16872   enableval="$enable_string_hacks"
16873   with_string_hacks=$enableval
16874 else
16875   with_string_hacks=no
16876 fi;
16877 echo "$as_me:16877: result: $with_string_hacks" >&5
16878 echo "${ECHO_T}$with_string_hacks" >&6
16879
16880 if test "x$with_string_hacks" = "xyes"; then
16881
16882 cat >>confdefs.h <<\EOF
16883 #define USE_STRING_HACKS 1
16884 EOF
16885
16886         { echo "$as_me:16886: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16887 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16888         echo "$as_me:16888: checking for strlcat" >&5
16889 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16890 if test "${ac_cv_func_strlcat+set}" = set; then
16891   echo $ECHO_N "(cached) $ECHO_C" >&6
16892 else
16893   cat >conftest.$ac_ext <<_ACEOF
16894 #line 16894 "configure"
16895 #include "confdefs.h"
16896 #define strlcat autoconf_temporary
16897 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16898 #undef strlcat
16899
16900 #ifdef __cplusplus
16901 extern "C"
16902 #endif
16903
16904 /* We use char because int might match the return type of a gcc2
16905    builtin and then its argument prototype would still apply.  */
16906 char strlcat (void);
16907
16908 int
16909 main (void)
16910 {
16911
16912 /* The GNU C library defines stubs for functions which it implements
16913     to always fail with ENOSYS.  Some functions are actually named
16914     something starting with __ and the normal name is an alias.  */
16915 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16916 #error found stub for strlcat
16917 #endif
16918
16919         return strlcat ();
16920   ;
16921   return 0;
16922 }
16923 _ACEOF
16924 rm -f conftest.$ac_objext conftest$ac_exeext
16925 if { (eval echo "$as_me:16925: \"$ac_link\"") >&5
16926   (eval $ac_link) 2>&5
16927   ac_status=$?
16928   echo "$as_me:16928: \$? = $ac_status" >&5
16929   (exit $ac_status); } &&
16930          { ac_try='test -s conftest$ac_exeext'
16931   { (eval echo "$as_me:16931: \"$ac_try\"") >&5
16932   (eval $ac_try) 2>&5
16933   ac_status=$?
16934   echo "$as_me:16934: \$? = $ac_status" >&5
16935   (exit $ac_status); }; }; then
16936   ac_cv_func_strlcat=yes
16937 else
16938   echo "$as_me: failed program was:" >&5
16939 cat conftest.$ac_ext >&5
16940 ac_cv_func_strlcat=no
16941 fi
16942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16943 fi
16944 echo "$as_me:16944: result: $ac_cv_func_strlcat" >&5
16945 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16946 if test $ac_cv_func_strlcat = yes; then
16947
16948 cat >>confdefs.h <<\EOF
16949 #define HAVE_STRLCAT 1
16950 EOF
16951
16952 else
16953
16954                 echo "$as_me:16954: checking for strlcat in -lbsd" >&5
16955 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16956 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16957   echo $ECHO_N "(cached) $ECHO_C" >&6
16958 else
16959   ac_check_lib_save_LIBS=$LIBS
16960 LIBS="-lbsd  $LIBS"
16961 cat >conftest.$ac_ext <<_ACEOF
16962 #line 16962 "configure"
16963 #include "confdefs.h"
16964
16965 /* Override any gcc2 internal prototype to avoid an error.  */
16966 #ifdef __cplusplus
16967 extern "C"
16968 #endif
16969 /* We use char because int might match the return type of a gcc2
16970    builtin and then its argument prototype would still apply.  */
16971 char strlcat ();
16972 int
16973 main (void)
16974 {
16975 strlcat ();
16976   ;
16977   return 0;
16978 }
16979 _ACEOF
16980 rm -f conftest.$ac_objext conftest$ac_exeext
16981 if { (eval echo "$as_me:16981: \"$ac_link\"") >&5
16982   (eval $ac_link) 2>&5
16983   ac_status=$?
16984   echo "$as_me:16984: \$? = $ac_status" >&5
16985   (exit $ac_status); } &&
16986          { ac_try='test -s conftest$ac_exeext'
16987   { (eval echo "$as_me:16987: \"$ac_try\"") >&5
16988   (eval $ac_try) 2>&5
16989   ac_status=$?
16990   echo "$as_me:16990: \$? = $ac_status" >&5
16991   (exit $ac_status); }; }; then
16992   ac_cv_lib_bsd_strlcat=yes
16993 else
16994   echo "$as_me: failed program was:" >&5
16995 cat conftest.$ac_ext >&5
16996 ac_cv_lib_bsd_strlcat=no
16997 fi
16998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16999 LIBS=$ac_check_lib_save_LIBS
17000 fi
17001 echo "$as_me:17001: result: $ac_cv_lib_bsd_strlcat" >&5
17002 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17003 if test $ac_cv_lib_bsd_strlcat = yes; then
17004
17005 cf_add_libs="$LIBS"
17006 # reverse order
17007 cf_add_0lib=
17008 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17009 # filter duplicates
17010 for cf_add_1lib in $cf_add_0lib; do
17011         for cf_add_2lib in $cf_add_libs; do
17012                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17013                         cf_add_1lib=
17014                         break
17015                 fi
17016         done
17017         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17018 done
17019 LIBS="$cf_add_libs"
17020
17021 for ac_header in bsd/string.h
17022 do
17023 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17024 echo "$as_me:17024: checking for $ac_header" >&5
17025 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17026 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17027   echo $ECHO_N "(cached) $ECHO_C" >&6
17028 else
17029   cat >conftest.$ac_ext <<_ACEOF
17030 #line 17030 "configure"
17031 #include "confdefs.h"
17032 #include <$ac_header>
17033 _ACEOF
17034 if { (eval echo "$as_me:17034: \"$ac_cpp conftest.$ac_ext\"") >&5
17035   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17036   ac_status=$?
17037   egrep -v '^ *\+' conftest.er1 >conftest.err
17038   rm -f conftest.er1
17039   cat conftest.err >&5
17040   echo "$as_me:17040: \$? = $ac_status" >&5
17041   (exit $ac_status); } >/dev/null; then
17042   if test -s conftest.err; then
17043     ac_cpp_err=$ac_c_preproc_warn_flag
17044   else
17045     ac_cpp_err=
17046   fi
17047 else
17048   ac_cpp_err=yes
17049 fi
17050 if test -z "$ac_cpp_err"; then
17051   eval "$as_ac_Header=yes"
17052 else
17053   echo "$as_me: failed program was:" >&5
17054   cat conftest.$ac_ext >&5
17055   eval "$as_ac_Header=no"
17056 fi
17057 rm -f conftest.err conftest.$ac_ext
17058 fi
17059 echo "$as_me:17059: result: `eval echo '${'$as_ac_Header'}'`" >&5
17060 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17061 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17062   cat >>confdefs.h <<EOF
17063 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17064 EOF
17065
17066 fi
17067 done
17068
17069 cat >>confdefs.h <<\EOF
17070 #define HAVE_STRLCAT 1
17071 EOF
17072
17073 fi
17074
17075 fi
17076
17077 for ac_func in strlcpy snprintf
17078 do
17079 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17080 echo "$as_me:17080: checking for $ac_func" >&5
17081 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17082 if eval "test \"\${$as_ac_var+set}\" = set"; then
17083   echo $ECHO_N "(cached) $ECHO_C" >&6
17084 else
17085   cat >conftest.$ac_ext <<_ACEOF
17086 #line 17086 "configure"
17087 #include "confdefs.h"
17088 #define $ac_func autoconf_temporary
17089 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17090 #undef $ac_func
17091
17092 #ifdef __cplusplus
17093 extern "C"
17094 #endif
17095
17096 /* We use char because int might match the return type of a gcc2
17097    builtin and then its argument prototype would still apply.  */
17098 char $ac_func (void);
17099
17100 int
17101 main (void)
17102 {
17103
17104 /* The GNU C library defines stubs for functions which it implements
17105     to always fail with ENOSYS.  Some functions are actually named
17106     something starting with __ and the normal name is an alias.  */
17107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17108 #error found stub for $ac_func
17109 #endif
17110
17111         return $ac_func ();
17112   ;
17113   return 0;
17114 }
17115 _ACEOF
17116 rm -f conftest.$ac_objext conftest$ac_exeext
17117 if { (eval echo "$as_me:17117: \"$ac_link\"") >&5
17118   (eval $ac_link) 2>&5
17119   ac_status=$?
17120   echo "$as_me:17120: \$? = $ac_status" >&5
17121   (exit $ac_status); } &&
17122          { ac_try='test -s conftest$ac_exeext'
17123   { (eval echo "$as_me:17123: \"$ac_try\"") >&5
17124   (eval $ac_try) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit $ac_status); }; }; then
17128   eval "$as_ac_var=yes"
17129 else
17130   echo "$as_me: failed program was:" >&5
17131 cat conftest.$ac_ext >&5
17132 eval "$as_ac_var=no"
17133 fi
17134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17135 fi
17136 echo "$as_me:17136: result: `eval echo '${'$as_ac_var'}'`" >&5
17137 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17138 if test `eval echo '${'$as_ac_var'}'` = yes; then
17139   cat >>confdefs.h <<EOF
17140 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17141 EOF
17142
17143 fi
17144 done
17145
17146 fi
17147
17148 ###     use option --enable-assertions to turn on generation of assertion code
17149 echo "$as_me:17149: checking if you want to enable runtime assertions" >&5
17150 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17151
17152 # Check whether --enable-assertions or --disable-assertions was given.
17153 if test "${enable_assertions+set}" = set; then
17154   enableval="$enable_assertions"
17155   with_assertions=$enableval
17156 else
17157   with_assertions=no
17158 fi;
17159 echo "$as_me:17159: result: $with_assertions" >&5
17160 echo "${ECHO_T}$with_assertions" >&6
17161 if test -n "$GCC"
17162 then
17163         if test "$with_assertions" = no
17164         then
17165                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17166         else
17167
17168         ADAFLAGS="$ADAFLAGS -gnata"
17169
17170         fi
17171 fi
17172
17173 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17174
17175 echo "$as_me:17175: checking if you want to use dmalloc for testing" >&5
17176 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17177
17178 # Check whether --with-dmalloc or --without-dmalloc was given.
17179 if test "${with_dmalloc+set}" = set; then
17180   withval="$with_dmalloc"
17181
17182 cat >>confdefs.h <<EOF
17183 #define USE_DMALLOC 1
17184 EOF
17185
17186         : ${with_cflags:=-g}
17187         : ${with_no_leaks:=yes}
17188          with_dmalloc=yes
17189 else
17190   with_dmalloc=
17191 fi;
17192 echo "$as_me:17192: result: ${with_dmalloc:-no}" >&5
17193 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17194
17195 case .$with_cflags in
17196 (.*-g*)
17197         case .$CFLAGS in
17198         (.*-g*)
17199                 ;;
17200         (*)
17201
17202 cf_fix_cppflags=no
17203 cf_new_cflags=
17204 cf_new_cppflags=
17205 cf_new_extra_cppflags=
17206
17207 for cf_add_cflags in -g
17208 do
17209 case $cf_fix_cppflags in
17210 (no)
17211         case $cf_add_cflags in
17212         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17213                 case $cf_add_cflags in
17214                 (-D*)
17215                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17216
17217                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17218                                 && test -z "${cf_tst_cflags}" \
17219                                 && cf_fix_cppflags=yes
17220
17221                         if test $cf_fix_cppflags = yes ; then
17222
17223         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17224         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17225
17226                                 continue
17227                         elif test "${cf_tst_cflags}" = "\"'" ; then
17228
17229         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17230         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17231
17232                                 continue
17233                         fi
17234                         ;;
17235                 esac
17236                 case "$CPPFLAGS" in
17237                 (*$cf_add_cflags)
17238                         ;;
17239                 (*)
17240                         case $cf_add_cflags in
17241                         (-D*)
17242                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17243
17244 CPPFLAGS=`echo "$CPPFLAGS" | \
17245         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17246                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17247
17248                                 ;;
17249                         esac
17250
17251         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17252         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17253
17254                         ;;
17255                 esac
17256                 ;;
17257         (*)
17258
17259         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17260         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17261
17262                 ;;
17263         esac
17264         ;;
17265 (yes)
17266
17267         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17268         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17269
17270         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17271
17272         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17273                 && test -z "${cf_tst_cflags}" \
17274                 && cf_fix_cppflags=no
17275         ;;
17276 esac
17277 done
17278
17279 if test -n "$cf_new_cflags" ; then
17280
17281         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17282         CFLAGS="${CFLAGS}$cf_new_cflags"
17283
17284 fi
17285
17286 if test -n "$cf_new_cppflags" ; then
17287
17288         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17289         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17290
17291 fi
17292
17293 if test -n "$cf_new_extra_cppflags" ; then
17294
17295         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17296         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17297
17298 fi
17299
17300                 ;;
17301         esac
17302         ;;
17303 esac
17304
17305 if test "$with_dmalloc" = yes ; then
17306         echo "$as_me:17306: checking for dmalloc.h" >&5
17307 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17308 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17309   echo $ECHO_N "(cached) $ECHO_C" >&6
17310 else
17311   cat >conftest.$ac_ext <<_ACEOF
17312 #line 17312 "configure"
17313 #include "confdefs.h"
17314 #include <dmalloc.h>
17315 _ACEOF
17316 if { (eval echo "$as_me:17316: \"$ac_cpp conftest.$ac_ext\"") >&5
17317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17318   ac_status=$?
17319   egrep -v '^ *\+' conftest.er1 >conftest.err
17320   rm -f conftest.er1
17321   cat conftest.err >&5
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); } >/dev/null; then
17324   if test -s conftest.err; then
17325     ac_cpp_err=$ac_c_preproc_warn_flag
17326   else
17327     ac_cpp_err=
17328   fi
17329 else
17330   ac_cpp_err=yes
17331 fi
17332 if test -z "$ac_cpp_err"; then
17333   ac_cv_header_dmalloc_h=yes
17334 else
17335   echo "$as_me: failed program was:" >&5
17336   cat conftest.$ac_ext >&5
17337   ac_cv_header_dmalloc_h=no
17338 fi
17339 rm -f conftest.err conftest.$ac_ext
17340 fi
17341 echo "$as_me:17341: result: $ac_cv_header_dmalloc_h" >&5
17342 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17343 if test $ac_cv_header_dmalloc_h = yes; then
17344
17345 echo "$as_me:17345: checking for dmalloc_debug in -ldmalloc" >&5
17346 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17347 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17348   echo $ECHO_N "(cached) $ECHO_C" >&6
17349 else
17350   ac_check_lib_save_LIBS=$LIBS
17351 LIBS="-ldmalloc  $LIBS"
17352 cat >conftest.$ac_ext <<_ACEOF
17353 #line 17353 "configure"
17354 #include "confdefs.h"
17355
17356 /* Override any gcc2 internal prototype to avoid an error.  */
17357 #ifdef __cplusplus
17358 extern "C"
17359 #endif
17360 /* We use char because int might match the return type of a gcc2
17361    builtin and then its argument prototype would still apply.  */
17362 char dmalloc_debug ();
17363 int
17364 main (void)
17365 {
17366 dmalloc_debug ();
17367   ;
17368   return 0;
17369 }
17370 _ACEOF
17371 rm -f conftest.$ac_objext conftest$ac_exeext
17372 if { (eval echo "$as_me:17372: \"$ac_link\"") >&5
17373   (eval $ac_link) 2>&5
17374   ac_status=$?
17375   echo "$as_me:17375: \$? = $ac_status" >&5
17376   (exit $ac_status); } &&
17377          { ac_try='test -s conftest$ac_exeext'
17378   { (eval echo "$as_me:17378: \"$ac_try\"") >&5
17379   (eval $ac_try) 2>&5
17380   ac_status=$?
17381   echo "$as_me:17381: \$? = $ac_status" >&5
17382   (exit $ac_status); }; }; then
17383   ac_cv_lib_dmalloc_dmalloc_debug=yes
17384 else
17385   echo "$as_me: failed program was:" >&5
17386 cat conftest.$ac_ext >&5
17387 ac_cv_lib_dmalloc_dmalloc_debug=no
17388 fi
17389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17390 LIBS=$ac_check_lib_save_LIBS
17391 fi
17392 echo "$as_me:17392: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17393 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17394 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17395   cat >>confdefs.h <<EOF
17396 #define HAVE_LIBDMALLOC 1
17397 EOF
17398
17399   LIBS="-ldmalloc $LIBS"
17400
17401 fi
17402
17403 fi
17404
17405 fi
17406
17407 echo "$as_me:17407: checking if you want to use dbmalloc for testing" >&5
17408 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17409
17410 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17411 if test "${with_dbmalloc+set}" = set; then
17412   withval="$with_dbmalloc"
17413
17414 cat >>confdefs.h <<EOF
17415 #define USE_DBMALLOC 1
17416 EOF
17417
17418         : ${with_cflags:=-g}
17419         : ${with_no_leaks:=yes}
17420          with_dbmalloc=yes
17421 else
17422   with_dbmalloc=
17423 fi;
17424 echo "$as_me:17424: result: ${with_dbmalloc:-no}" >&5
17425 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17426
17427 case .$with_cflags in
17428 (.*-g*)
17429         case .$CFLAGS in
17430         (.*-g*)
17431                 ;;
17432         (*)
17433
17434 cf_fix_cppflags=no
17435 cf_new_cflags=
17436 cf_new_cppflags=
17437 cf_new_extra_cppflags=
17438
17439 for cf_add_cflags in -g
17440 do
17441 case $cf_fix_cppflags in
17442 (no)
17443         case $cf_add_cflags in
17444         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17445                 case $cf_add_cflags in
17446                 (-D*)
17447                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17448
17449                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17450                                 && test -z "${cf_tst_cflags}" \
17451                                 && cf_fix_cppflags=yes
17452
17453                         if test $cf_fix_cppflags = yes ; then
17454
17455         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17456         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17457
17458                                 continue
17459                         elif test "${cf_tst_cflags}" = "\"'" ; then
17460
17461         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17462         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17463
17464                                 continue
17465                         fi
17466                         ;;
17467                 esac
17468                 case "$CPPFLAGS" in
17469                 (*$cf_add_cflags)
17470                         ;;
17471                 (*)
17472                         case $cf_add_cflags in
17473                         (-D*)
17474                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17475
17476 CPPFLAGS=`echo "$CPPFLAGS" | \
17477         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17478                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17479
17480                                 ;;
17481                         esac
17482
17483         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17484         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17485
17486                         ;;
17487                 esac
17488                 ;;
17489         (*)
17490
17491         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17492         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17493
17494                 ;;
17495         esac
17496         ;;
17497 (yes)
17498
17499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17501
17502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17503
17504         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17505                 && test -z "${cf_tst_cflags}" \
17506                 && cf_fix_cppflags=no
17507         ;;
17508 esac
17509 done
17510
17511 if test -n "$cf_new_cflags" ; then
17512
17513         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17514         CFLAGS="${CFLAGS}$cf_new_cflags"
17515
17516 fi
17517
17518 if test -n "$cf_new_cppflags" ; then
17519
17520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17521         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17522
17523 fi
17524
17525 if test -n "$cf_new_extra_cppflags" ; then
17526
17527         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17528         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17529
17530 fi
17531
17532                 ;;
17533         esac
17534         ;;
17535 esac
17536
17537 if test "$with_dbmalloc" = yes ; then
17538         echo "$as_me:17538: checking for dbmalloc.h" >&5
17539 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17540 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17541   echo $ECHO_N "(cached) $ECHO_C" >&6
17542 else
17543   cat >conftest.$ac_ext <<_ACEOF
17544 #line 17544 "configure"
17545 #include "confdefs.h"
17546 #include <dbmalloc.h>
17547 _ACEOF
17548 if { (eval echo "$as_me:17548: \"$ac_cpp conftest.$ac_ext\"") >&5
17549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17550   ac_status=$?
17551   egrep -v '^ *\+' conftest.er1 >conftest.err
17552   rm -f conftest.er1
17553   cat conftest.err >&5
17554   echo "$as_me:17554: \$? = $ac_status" >&5
17555   (exit $ac_status); } >/dev/null; then
17556   if test -s conftest.err; then
17557     ac_cpp_err=$ac_c_preproc_warn_flag
17558   else
17559     ac_cpp_err=
17560   fi
17561 else
17562   ac_cpp_err=yes
17563 fi
17564 if test -z "$ac_cpp_err"; then
17565   ac_cv_header_dbmalloc_h=yes
17566 else
17567   echo "$as_me: failed program was:" >&5
17568   cat conftest.$ac_ext >&5
17569   ac_cv_header_dbmalloc_h=no
17570 fi
17571 rm -f conftest.err conftest.$ac_ext
17572 fi
17573 echo "$as_me:17573: result: $ac_cv_header_dbmalloc_h" >&5
17574 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17575 if test $ac_cv_header_dbmalloc_h = yes; then
17576
17577 echo "$as_me:17577: checking for debug_malloc in -ldbmalloc" >&5
17578 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17579 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17580   echo $ECHO_N "(cached) $ECHO_C" >&6
17581 else
17582   ac_check_lib_save_LIBS=$LIBS
17583 LIBS="-ldbmalloc  $LIBS"
17584 cat >conftest.$ac_ext <<_ACEOF
17585 #line 17585 "configure"
17586 #include "confdefs.h"
17587
17588 /* Override any gcc2 internal prototype to avoid an error.  */
17589 #ifdef __cplusplus
17590 extern "C"
17591 #endif
17592 /* We use char because int might match the return type of a gcc2
17593    builtin and then its argument prototype would still apply.  */
17594 char debug_malloc ();
17595 int
17596 main (void)
17597 {
17598 debug_malloc ();
17599   ;
17600   return 0;
17601 }
17602 _ACEOF
17603 rm -f conftest.$ac_objext conftest$ac_exeext
17604 if { (eval echo "$as_me:17604: \"$ac_link\"") >&5
17605   (eval $ac_link) 2>&5
17606   ac_status=$?
17607   echo "$as_me:17607: \$? = $ac_status" >&5
17608   (exit $ac_status); } &&
17609          { ac_try='test -s conftest$ac_exeext'
17610   { (eval echo "$as_me:17610: \"$ac_try\"") >&5
17611   (eval $ac_try) 2>&5
17612   ac_status=$?
17613   echo "$as_me:17613: \$? = $ac_status" >&5
17614   (exit $ac_status); }; }; then
17615   ac_cv_lib_dbmalloc_debug_malloc=yes
17616 else
17617   echo "$as_me: failed program was:" >&5
17618 cat conftest.$ac_ext >&5
17619 ac_cv_lib_dbmalloc_debug_malloc=no
17620 fi
17621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17622 LIBS=$ac_check_lib_save_LIBS
17623 fi
17624 echo "$as_me:17624: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17625 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17626 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17627   cat >>confdefs.h <<EOF
17628 #define HAVE_LIBDBMALLOC 1
17629 EOF
17630
17631   LIBS="-ldbmalloc $LIBS"
17632
17633 fi
17634
17635 fi
17636
17637 fi
17638
17639 echo "$as_me:17639: checking if you want to use valgrind for testing" >&5
17640 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17641
17642 # Check whether --with-valgrind or --without-valgrind was given.
17643 if test "${with_valgrind+set}" = set; then
17644   withval="$with_valgrind"
17645
17646 cat >>confdefs.h <<EOF
17647 #define USE_VALGRIND 1
17648 EOF
17649
17650         : ${with_cflags:=-g}
17651         : ${with_no_leaks:=yes}
17652          with_valgrind=yes
17653 else
17654   with_valgrind=
17655 fi;
17656 echo "$as_me:17656: result: ${with_valgrind:-no}" >&5
17657 echo "${ECHO_T}${with_valgrind:-no}" >&6
17658
17659 case .$with_cflags in
17660 (.*-g*)
17661         case .$CFLAGS in
17662         (.*-g*)
17663                 ;;
17664         (*)
17665
17666 cf_fix_cppflags=no
17667 cf_new_cflags=
17668 cf_new_cppflags=
17669 cf_new_extra_cppflags=
17670
17671 for cf_add_cflags in -g
17672 do
17673 case $cf_fix_cppflags in
17674 (no)
17675         case $cf_add_cflags in
17676         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17677                 case $cf_add_cflags in
17678                 (-D*)
17679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17680
17681                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17682                                 && test -z "${cf_tst_cflags}" \
17683                                 && cf_fix_cppflags=yes
17684
17685                         if test $cf_fix_cppflags = yes ; then
17686
17687         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17688         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17689
17690                                 continue
17691                         elif test "${cf_tst_cflags}" = "\"'" ; then
17692
17693         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17694         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17695
17696                                 continue
17697                         fi
17698                         ;;
17699                 esac
17700                 case "$CPPFLAGS" in
17701                 (*$cf_add_cflags)
17702                         ;;
17703                 (*)
17704                         case $cf_add_cflags in
17705                         (-D*)
17706                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17707
17708 CPPFLAGS=`echo "$CPPFLAGS" | \
17709         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17710                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17711
17712                                 ;;
17713                         esac
17714
17715         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17716         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17717
17718                         ;;
17719                 esac
17720                 ;;
17721         (*)
17722
17723         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17724         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17725
17726                 ;;
17727         esac
17728         ;;
17729 (yes)
17730
17731         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17732         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17733
17734         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17735
17736         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17737                 && test -z "${cf_tst_cflags}" \
17738                 && cf_fix_cppflags=no
17739         ;;
17740 esac
17741 done
17742
17743 if test -n "$cf_new_cflags" ; then
17744
17745         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17746         CFLAGS="${CFLAGS}$cf_new_cflags"
17747
17748 fi
17749
17750 if test -n "$cf_new_cppflags" ; then
17751
17752         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17753         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17754
17755 fi
17756
17757 if test -n "$cf_new_extra_cppflags" ; then
17758
17759         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17760         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17761
17762 fi
17763
17764                 ;;
17765         esac
17766         ;;
17767 esac
17768
17769 echo "$as_me:17769: checking if you want to perform memory-leak testing" >&5
17770 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17771
17772 # Check whether --enable-leaks or --disable-leaks was given.
17773 if test "${enable_leaks+set}" = set; then
17774   enableval="$enable_leaks"
17775   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17776 else
17777   : ${with_no_leaks:=no}
17778 fi;
17779 echo "$as_me:17779: result: $with_no_leaks" >&5
17780 echo "${ECHO_T}$with_no_leaks" >&6
17781
17782 if test "$with_no_leaks" = yes ; then
17783
17784 cat >>confdefs.h <<\EOF
17785 #define NO_LEAKS 1
17786 EOF
17787
17788 cat >>confdefs.h <<\EOF
17789 #define YY_NO_LEAKS 1
17790 EOF
17791
17792 fi
17793
17794 cat >>confdefs.h <<\EOF
17795 #define HAVE_NC_ALLOC_H 1
17796 EOF
17797
17798 ###     use option --enable-expanded to generate certain macros as functions
17799
17800 # Check whether --enable-expanded or --disable-expanded was given.
17801 if test "${enable_expanded+set}" = set; then
17802   enableval="$enable_expanded"
17803   test "x$enableval" = xyes &&
17804 cat >>confdefs.h <<\EOF
17805 #define NCURSES_EXPANDED 1
17806 EOF
17807
17808 fi;
17809
17810 ###     use option --disable-macros to suppress macros in favor of functions
17811
17812 # Check whether --enable-macros or --disable-macros was given.
17813 if test "${enable_macros+set}" = set; then
17814   enableval="$enable_macros"
17815   test "$enableval" = no &&
17816 cat >>confdefs.h <<\EOF
17817 #define NCURSES_NOMACROS 1
17818 EOF
17819
17820 fi;
17821
17822 # Normally we only add trace() to the debug-library.  Allow this to be
17823 # extended to all models of the ncurses library:
17824 cf_all_traces=no
17825 case "$CFLAGS $CPPFLAGS" in
17826 (*-DTRACE*)
17827         cf_all_traces=yes
17828         ;;
17829 esac
17830
17831 echo "$as_me:17831: checking whether to add trace feature to all models" >&5
17832 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17833
17834 # Check whether --with-trace or --without-trace was given.
17835 if test "${with_trace+set}" = set; then
17836   withval="$with_trace"
17837   cf_with_trace=$withval
17838 else
17839   cf_with_trace=$cf_all_traces
17840 fi;
17841 echo "$as_me:17841: result: $cf_with_trace" >&5
17842 echo "${ECHO_T}$cf_with_trace" >&6
17843
17844 if test "x$cf_with_trace" = xyes ; then
17845         LIB_TRACING=all
17846         ADA_TRACE=TRUE
17847
17848 cf_fix_cppflags=no
17849 cf_new_cflags=
17850 cf_new_cppflags=
17851 cf_new_extra_cppflags=
17852
17853 for cf_add_cflags in -DTRACE
17854 do
17855 case $cf_fix_cppflags in
17856 (no)
17857         case $cf_add_cflags in
17858         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17859                 case $cf_add_cflags in
17860                 (-D*)
17861                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17862
17863                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17864                                 && test -z "${cf_tst_cflags}" \
17865                                 && cf_fix_cppflags=yes
17866
17867                         if test $cf_fix_cppflags = yes ; then
17868
17869         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17870         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17871
17872                                 continue
17873                         elif test "${cf_tst_cflags}" = "\"'" ; then
17874
17875         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17876         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17877
17878                                 continue
17879                         fi
17880                         ;;
17881                 esac
17882                 case "$CPPFLAGS" in
17883                 (*$cf_add_cflags)
17884                         ;;
17885                 (*)
17886                         case $cf_add_cflags in
17887                         (-D*)
17888                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17889
17890 CPPFLAGS=`echo "$CPPFLAGS" | \
17891         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17892                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17893
17894                                 ;;
17895                         esac
17896
17897         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17898         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17899
17900                         ;;
17901                 esac
17902                 ;;
17903         (*)
17904
17905         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17906         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17907
17908                 ;;
17909         esac
17910         ;;
17911 (yes)
17912
17913         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17914         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17915
17916         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17917
17918         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17919                 && test -z "${cf_tst_cflags}" \
17920                 && cf_fix_cppflags=no
17921         ;;
17922 esac
17923 done
17924
17925 if test -n "$cf_new_cflags" ; then
17926
17927         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17928         CFLAGS="${CFLAGS}$cf_new_cflags"
17929
17930 fi
17931
17932 if test -n "$cf_new_cppflags" ; then
17933
17934         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17935         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17936
17937 fi
17938
17939 if test -n "$cf_new_extra_cppflags" ; then
17940
17941         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17942         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17943
17944 fi
17945
17946 cat >>confdefs.h <<\EOF
17947 #define HAVE__TRACEF 1
17948 EOF
17949
17950 else
17951         LIB_TRACING=DEBUG
17952         ADA_TRACE=FALSE
17953 fi
17954
17955 echo "$as_me:17955: checking if we want to use GNAT projects" >&5
17956 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17957
17958 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17959 if test "${enable_gnat_projects+set}" = set; then
17960   enableval="$enable_gnat_projects"
17961   test "$enableval" != no && enableval=yes
17962         if test "$enableval" != "yes" ; then
17963     enable_gnat_projects=no
17964         else
17965                 enable_gnat_projects=yes
17966         fi
17967 else
17968   enableval=yes
17969         enable_gnat_projects=yes
17970
17971 fi;
17972 echo "$as_me:17972: result: $enable_gnat_projects" >&5
17973 echo "${ECHO_T}$enable_gnat_projects" >&6
17974
17975 ###     Checks for libraries.
17976 case $cf_cv_system_name in
17977 (*mingw32*|*mingw64*)
17978         if test "x$with_exp_win32" = xyes ; then
17979         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
17980         else
17981         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17982         fi
17983         # Note: WINVER may be a problem with Windows 10
17984         ;;
17985 (*)
17986 echo "$as_me:17986: checking for gettimeofday" >&5
17987 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17988 if test "${ac_cv_func_gettimeofday+set}" = set; then
17989   echo $ECHO_N "(cached) $ECHO_C" >&6
17990 else
17991   cat >conftest.$ac_ext <<_ACEOF
17992 #line 17992 "configure"
17993 #include "confdefs.h"
17994 #define gettimeofday autoconf_temporary
17995 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17996 #undef gettimeofday
17997
17998 #ifdef __cplusplus
17999 extern "C"
18000 #endif
18001
18002 /* We use char because int might match the return type of a gcc2
18003    builtin and then its argument prototype would still apply.  */
18004 char gettimeofday (void);
18005
18006 int
18007 main (void)
18008 {
18009
18010 /* The GNU C library defines stubs for functions which it implements
18011     to always fail with ENOSYS.  Some functions are actually named
18012     something starting with __ and the normal name is an alias.  */
18013 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18014 #error found stub for gettimeofday
18015 #endif
18016
18017         return gettimeofday ();
18018   ;
18019   return 0;
18020 }
18021 _ACEOF
18022 rm -f conftest.$ac_objext conftest$ac_exeext
18023 if { (eval echo "$as_me:18023: \"$ac_link\"") >&5
18024   (eval $ac_link) 2>&5
18025   ac_status=$?
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit $ac_status); } &&
18028          { ac_try='test -s conftest$ac_exeext'
18029   { (eval echo "$as_me:18029: \"$ac_try\"") >&5
18030   (eval $ac_try) 2>&5
18031   ac_status=$?
18032   echo "$as_me:18032: \$? = $ac_status" >&5
18033   (exit $ac_status); }; }; then
18034   ac_cv_func_gettimeofday=yes
18035 else
18036   echo "$as_me: failed program was:" >&5
18037 cat conftest.$ac_ext >&5
18038 ac_cv_func_gettimeofday=no
18039 fi
18040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18041 fi
18042 echo "$as_me:18042: result: $ac_cv_func_gettimeofday" >&5
18043 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18044 if test $ac_cv_func_gettimeofday = yes; then
18045
18046 cat >>confdefs.h <<\EOF
18047 #define HAVE_GETTIMEOFDAY 1
18048 EOF
18049
18050 else
18051
18052 echo "$as_me:18052: checking for gettimeofday in -lbsd" >&5
18053 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18054 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18055   echo $ECHO_N "(cached) $ECHO_C" >&6
18056 else
18057   ac_check_lib_save_LIBS=$LIBS
18058 LIBS="-lbsd  $LIBS"
18059 cat >conftest.$ac_ext <<_ACEOF
18060 #line 18060 "configure"
18061 #include "confdefs.h"
18062
18063 /* Override any gcc2 internal prototype to avoid an error.  */
18064 #ifdef __cplusplus
18065 extern "C"
18066 #endif
18067 /* We use char because int might match the return type of a gcc2
18068    builtin and then its argument prototype would still apply.  */
18069 char gettimeofday ();
18070 int
18071 main (void)
18072 {
18073 gettimeofday ();
18074   ;
18075   return 0;
18076 }
18077 _ACEOF
18078 rm -f conftest.$ac_objext conftest$ac_exeext
18079 if { (eval echo "$as_me:18079: \"$ac_link\"") >&5
18080   (eval $ac_link) 2>&5
18081   ac_status=$?
18082   echo "$as_me:18082: \$? = $ac_status" >&5
18083   (exit $ac_status); } &&
18084          { ac_try='test -s conftest$ac_exeext'
18085   { (eval echo "$as_me:18085: \"$ac_try\"") >&5
18086   (eval $ac_try) 2>&5
18087   ac_status=$?
18088   echo "$as_me:18088: \$? = $ac_status" >&5
18089   (exit $ac_status); }; }; then
18090   ac_cv_lib_bsd_gettimeofday=yes
18091 else
18092   echo "$as_me: failed program was:" >&5
18093 cat conftest.$ac_ext >&5
18094 ac_cv_lib_bsd_gettimeofday=no
18095 fi
18096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18097 LIBS=$ac_check_lib_save_LIBS
18098 fi
18099 echo "$as_me:18099: result: $ac_cv_lib_bsd_gettimeofday" >&5
18100 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18101 if test $ac_cv_lib_bsd_gettimeofday = yes; then
18102
18103 cat >>confdefs.h <<\EOF
18104 #define HAVE_GETTIMEOFDAY 1
18105 EOF
18106
18107 cf_add_libs="$LIBS"
18108 # reverse order
18109 cf_add_0lib=
18110 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18111 # filter duplicates
18112 for cf_add_1lib in $cf_add_0lib; do
18113         for cf_add_2lib in $cf_add_libs; do
18114                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18115                         cf_add_1lib=
18116                         break
18117                 fi
18118         done
18119         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18120 done
18121 LIBS="$cf_add_libs"
18122
18123 fi
18124
18125 fi
18126         ;;
18127 esac
18128
18129 echo "$as_me:18129: checking if -lm needed for math functions" >&5
18130 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18131 if test "${cf_cv_need_libm+set}" = set; then
18132   echo $ECHO_N "(cached) $ECHO_C" >&6
18133 else
18134
18135         cat >conftest.$ac_ext <<_ACEOF
18136 #line 18136 "configure"
18137 #include "confdefs.h"
18138
18139         #include <stdio.h>
18140         #include <stdlib.h>
18141         #include <math.h>
18142
18143 int
18144 main (void)
18145 {
18146 double x = rand(); printf("result = %g\n", pow(sin(x),x))
18147   ;
18148   return 0;
18149 }
18150 _ACEOF
18151 rm -f conftest.$ac_objext conftest$ac_exeext
18152 if { (eval echo "$as_me:18152: \"$ac_link\"") >&5
18153   (eval $ac_link) 2>&5
18154   ac_status=$?
18155   echo "$as_me:18155: \$? = $ac_status" >&5
18156   (exit $ac_status); } &&
18157          { ac_try='test -s conftest$ac_exeext'
18158   { (eval echo "$as_me:18158: \"$ac_try\"") >&5
18159   (eval $ac_try) 2>&5
18160   ac_status=$?
18161   echo "$as_me:18161: \$? = $ac_status" >&5
18162   (exit $ac_status); }; }; then
18163   cf_cv_need_libm=no
18164 else
18165   echo "$as_me: failed program was:" >&5
18166 cat conftest.$ac_ext >&5
18167 cf_cv_need_libm=yes
18168 fi
18169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18170 fi
18171 echo "$as_me:18171: result: $cf_cv_need_libm" >&5
18172 echo "${ECHO_T}$cf_cv_need_libm" >&6
18173 if test "$cf_cv_need_libm" = yes
18174 then
18175 MATH_LIB=-lm
18176 fi
18177
18178 ###     Checks for header files.
18179 echo "$as_me:18179: checking for ANSI C header files" >&5
18180 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18181 if test "${ac_cv_header_stdc+set}" = set; then
18182   echo $ECHO_N "(cached) $ECHO_C" >&6
18183 else
18184   cat >conftest.$ac_ext <<_ACEOF
18185 #line 18185 "configure"
18186 #include "confdefs.h"
18187 #include <stdlib.h>
18188 #include <stdarg.h>
18189 #include <string.h>
18190 #include <float.h>
18191
18192 _ACEOF
18193 if { (eval echo "$as_me:18193: \"$ac_cpp conftest.$ac_ext\"") >&5
18194   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18195   ac_status=$?
18196   egrep -v '^ *\+' conftest.er1 >conftest.err
18197   rm -f conftest.er1
18198   cat conftest.err >&5
18199   echo "$as_me:18199: \$? = $ac_status" >&5
18200   (exit $ac_status); } >/dev/null; then
18201   if test -s conftest.err; then
18202     ac_cpp_err=$ac_c_preproc_warn_flag
18203   else
18204     ac_cpp_err=
18205   fi
18206 else
18207   ac_cpp_err=yes
18208 fi
18209 if test -z "$ac_cpp_err"; then
18210   ac_cv_header_stdc=yes
18211 else
18212   echo "$as_me: failed program was:" >&5
18213   cat conftest.$ac_ext >&5
18214   ac_cv_header_stdc=no
18215 fi
18216 rm -f conftest.err conftest.$ac_ext
18217
18218 if test $ac_cv_header_stdc = yes; then
18219   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18220   cat >conftest.$ac_ext <<_ACEOF
18221 #line 18221 "configure"
18222 #include "confdefs.h"
18223 #include <string.h>
18224
18225 _ACEOF
18226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18227   egrep "memchr" >/dev/null 2>&1; then
18228   :
18229 else
18230   ac_cv_header_stdc=no
18231 fi
18232 rm -rf conftest*
18233
18234 fi
18235
18236 if test $ac_cv_header_stdc = yes; then
18237   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18238   cat >conftest.$ac_ext <<_ACEOF
18239 #line 18239 "configure"
18240 #include "confdefs.h"
18241 #include <stdlib.h>
18242
18243 _ACEOF
18244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18245   egrep "free" >/dev/null 2>&1; then
18246   :
18247 else
18248   ac_cv_header_stdc=no
18249 fi
18250 rm -rf conftest*
18251
18252 fi
18253
18254 if test $ac_cv_header_stdc = yes; then
18255   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18256   if test "$cross_compiling" = yes; then
18257   :
18258 else
18259   cat >conftest.$ac_ext <<_ACEOF
18260 #line 18260 "configure"
18261 #include "confdefs.h"
18262 #include <ctype.h>
18263 #if ((' ' & 0x0FF) == 0x020)
18264 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18265 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18266 #else
18267 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18268                      || ('j' <= (c) && (c) <= 'r') \
18269                      || ('s' <= (c) && (c) <= 'z'))
18270 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18271 #endif
18272
18273 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18274 int
18275 main (void)
18276 {
18277   int i;
18278   for (i = 0; i < 256; i++)
18279     if (XOR (islower (i), ISLOWER (i))
18280         || toupper (i) != TOUPPER (i))
18281       $ac_main_return(2);
18282   $ac_main_return (0);
18283 }
18284 _ACEOF
18285 rm -f conftest$ac_exeext
18286 if { (eval echo "$as_me:18286: \"$ac_link\"") >&5
18287   (eval $ac_link) 2>&5
18288   ac_status=$?
18289   echo "$as_me:18289: \$? = $ac_status" >&5
18290   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18291   { (eval echo "$as_me:18291: \"$ac_try\"") >&5
18292   (eval $ac_try) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); }; }; then
18296   :
18297 else
18298   echo "$as_me: program exited with status $ac_status" >&5
18299 echo "$as_me: failed program was:" >&5
18300 cat conftest.$ac_ext >&5
18301 ac_cv_header_stdc=no
18302 fi
18303 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18304 fi
18305 fi
18306 fi
18307 echo "$as_me:18307: result: $ac_cv_header_stdc" >&5
18308 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18309 if test $ac_cv_header_stdc = yes; then
18310
18311 cat >>confdefs.h <<\EOF
18312 #define STDC_HEADERS 1
18313 EOF
18314
18315 fi
18316
18317 ac_header_dirent=no
18318 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18319   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18320 echo "$as_me:18320: checking for $ac_hdr that defines DIR" >&5
18321 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18322 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18323   echo $ECHO_N "(cached) $ECHO_C" >&6
18324 else
18325   cat >conftest.$ac_ext <<_ACEOF
18326 #line 18326 "configure"
18327 #include "confdefs.h"
18328 #include <sys/types.h>
18329 #include <$ac_hdr>
18330
18331 int
18332 main (void)
18333 {
18334 if ((DIR *) 0)
18335 return 0;
18336   ;
18337   return 0;
18338 }
18339 _ACEOF
18340 rm -f conftest.$ac_objext
18341 if { (eval echo "$as_me:18341: \"$ac_compile\"") >&5
18342   (eval $ac_compile) 2>&5
18343   ac_status=$?
18344   echo "$as_me:18344: \$? = $ac_status" >&5
18345   (exit $ac_status); } &&
18346          { ac_try='test -s conftest.$ac_objext'
18347   { (eval echo "$as_me:18347: \"$ac_try\"") >&5
18348   (eval $ac_try) 2>&5
18349   ac_status=$?
18350   echo "$as_me:18350: \$? = $ac_status" >&5
18351   (exit $ac_status); }; }; then
18352   eval "$as_ac_Header=yes"
18353 else
18354   echo "$as_me: failed program was:" >&5
18355 cat conftest.$ac_ext >&5
18356 eval "$as_ac_Header=no"
18357 fi
18358 rm -f conftest.$ac_objext conftest.$ac_ext
18359 fi
18360 echo "$as_me:18360: result: `eval echo '${'$as_ac_Header'}'`" >&5
18361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18362 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18363   cat >>confdefs.h <<EOF
18364 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18365 EOF
18366
18367 ac_header_dirent=$ac_hdr; break
18368 fi
18369
18370 done
18371 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18372 if test $ac_header_dirent = dirent.h; then
18373   echo "$as_me:18373: checking for opendir in -ldir" >&5
18374 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18375 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18376   echo $ECHO_N "(cached) $ECHO_C" >&6
18377 else
18378   ac_check_lib_save_LIBS=$LIBS
18379 LIBS="-ldir  $LIBS"
18380 cat >conftest.$ac_ext <<_ACEOF
18381 #line 18381 "configure"
18382 #include "confdefs.h"
18383
18384 /* Override any gcc2 internal prototype to avoid an error.  */
18385 #ifdef __cplusplus
18386 extern "C"
18387 #endif
18388 /* We use char because int might match the return type of a gcc2
18389    builtin and then its argument prototype would still apply.  */
18390 char opendir ();
18391 int
18392 main (void)
18393 {
18394 opendir ();
18395   ;
18396   return 0;
18397 }
18398 _ACEOF
18399 rm -f conftest.$ac_objext conftest$ac_exeext
18400 if { (eval echo "$as_me:18400: \"$ac_link\"") >&5
18401   (eval $ac_link) 2>&5
18402   ac_status=$?
18403   echo "$as_me:18403: \$? = $ac_status" >&5
18404   (exit $ac_status); } &&
18405          { ac_try='test -s conftest$ac_exeext'
18406   { (eval echo "$as_me:18406: \"$ac_try\"") >&5
18407   (eval $ac_try) 2>&5
18408   ac_status=$?
18409   echo "$as_me:18409: \$? = $ac_status" >&5
18410   (exit $ac_status); }; }; then
18411   ac_cv_lib_dir_opendir=yes
18412 else
18413   echo "$as_me: failed program was:" >&5
18414 cat conftest.$ac_ext >&5
18415 ac_cv_lib_dir_opendir=no
18416 fi
18417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18418 LIBS=$ac_check_lib_save_LIBS
18419 fi
18420 echo "$as_me:18420: result: $ac_cv_lib_dir_opendir" >&5
18421 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18422 if test $ac_cv_lib_dir_opendir = yes; then
18423   LIBS="$LIBS -ldir"
18424 fi
18425
18426 else
18427   echo "$as_me:18427: checking for opendir in -lx" >&5
18428 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18429 if test "${ac_cv_lib_x_opendir+set}" = set; then
18430   echo $ECHO_N "(cached) $ECHO_C" >&6
18431 else
18432   ac_check_lib_save_LIBS=$LIBS
18433 LIBS="-lx  $LIBS"
18434 cat >conftest.$ac_ext <<_ACEOF
18435 #line 18435 "configure"
18436 #include "confdefs.h"
18437
18438 /* Override any gcc2 internal prototype to avoid an error.  */
18439 #ifdef __cplusplus
18440 extern "C"
18441 #endif
18442 /* We use char because int might match the return type of a gcc2
18443    builtin and then its argument prototype would still apply.  */
18444 char opendir ();
18445 int
18446 main (void)
18447 {
18448 opendir ();
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest.$ac_objext conftest$ac_exeext
18454 if { (eval echo "$as_me:18454: \"$ac_link\"") >&5
18455   (eval $ac_link) 2>&5
18456   ac_status=$?
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); } &&
18459          { ac_try='test -s conftest$ac_exeext'
18460   { (eval echo "$as_me:18460: \"$ac_try\"") >&5
18461   (eval $ac_try) 2>&5
18462   ac_status=$?
18463   echo "$as_me:18463: \$? = $ac_status" >&5
18464   (exit $ac_status); }; }; then
18465   ac_cv_lib_x_opendir=yes
18466 else
18467   echo "$as_me: failed program was:" >&5
18468 cat conftest.$ac_ext >&5
18469 ac_cv_lib_x_opendir=no
18470 fi
18471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18472 LIBS=$ac_check_lib_save_LIBS
18473 fi
18474 echo "$as_me:18474: result: $ac_cv_lib_x_opendir" >&5
18475 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18476 if test $ac_cv_lib_x_opendir = yes; then
18477   LIBS="$LIBS -lx"
18478 fi
18479
18480 fi
18481
18482 echo "$as_me:18482: checking whether time.h and sys/time.h may both be included" >&5
18483 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18484 if test "${ac_cv_header_time+set}" = set; then
18485   echo $ECHO_N "(cached) $ECHO_C" >&6
18486 else
18487   cat >conftest.$ac_ext <<_ACEOF
18488 #line 18488 "configure"
18489 #include "confdefs.h"
18490 #include <sys/types.h>
18491 #include <sys/time.h>
18492 #include <time.h>
18493
18494 int
18495 main (void)
18496 {
18497 if ((struct tm *) 0)
18498 return 0;
18499   ;
18500   return 0;
18501 }
18502 _ACEOF
18503 rm -f conftest.$ac_objext
18504 if { (eval echo "$as_me:18504: \"$ac_compile\"") >&5
18505   (eval $ac_compile) 2>&5
18506   ac_status=$?
18507   echo "$as_me:18507: \$? = $ac_status" >&5
18508   (exit $ac_status); } &&
18509          { ac_try='test -s conftest.$ac_objext'
18510   { (eval echo "$as_me:18510: \"$ac_try\"") >&5
18511   (eval $ac_try) 2>&5
18512   ac_status=$?
18513   echo "$as_me:18513: \$? = $ac_status" >&5
18514   (exit $ac_status); }; }; then
18515   ac_cv_header_time=yes
18516 else
18517   echo "$as_me: failed program was:" >&5
18518 cat conftest.$ac_ext >&5
18519 ac_cv_header_time=no
18520 fi
18521 rm -f conftest.$ac_objext conftest.$ac_ext
18522 fi
18523 echo "$as_me:18523: result: $ac_cv_header_time" >&5
18524 echo "${ECHO_T}$ac_cv_header_time" >&6
18525 if test $ac_cv_header_time = yes; then
18526
18527 cat >>confdefs.h <<\EOF
18528 #define TIME_WITH_SYS_TIME 1
18529 EOF
18530
18531 fi
18532
18533 cf_regex_func=no
18534
18535 cf_regex_libs="regex re"
18536 case $host_os in
18537 (mingw*)
18538         cf_regex_libs="systre gnurx $cf_regex_libs"
18539         ;;
18540 esac
18541
18542 echo "$as_me:18542: checking for regcomp" >&5
18543 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18544 if test "${ac_cv_func_regcomp+set}" = set; then
18545   echo $ECHO_N "(cached) $ECHO_C" >&6
18546 else
18547   cat >conftest.$ac_ext <<_ACEOF
18548 #line 18548 "configure"
18549 #include "confdefs.h"
18550 #define regcomp autoconf_temporary
18551 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18552 #undef regcomp
18553
18554 #ifdef __cplusplus
18555 extern "C"
18556 #endif
18557
18558 /* We use char because int might match the return type of a gcc2
18559    builtin and then its argument prototype would still apply.  */
18560 char regcomp (void);
18561
18562 int
18563 main (void)
18564 {
18565
18566 /* The GNU C library defines stubs for functions which it implements
18567     to always fail with ENOSYS.  Some functions are actually named
18568     something starting with __ and the normal name is an alias.  */
18569 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18570 #error found stub for regcomp
18571 #endif
18572
18573         return regcomp ();
18574   ;
18575   return 0;
18576 }
18577 _ACEOF
18578 rm -f conftest.$ac_objext conftest$ac_exeext
18579 if { (eval echo "$as_me:18579: \"$ac_link\"") >&5
18580   (eval $ac_link) 2>&5
18581   ac_status=$?
18582   echo "$as_me:18582: \$? = $ac_status" >&5
18583   (exit $ac_status); } &&
18584          { ac_try='test -s conftest$ac_exeext'
18585   { (eval echo "$as_me:18585: \"$ac_try\"") >&5
18586   (eval $ac_try) 2>&5
18587   ac_status=$?
18588   echo "$as_me:18588: \$? = $ac_status" >&5
18589   (exit $ac_status); }; }; then
18590   ac_cv_func_regcomp=yes
18591 else
18592   echo "$as_me: failed program was:" >&5
18593 cat conftest.$ac_ext >&5
18594 ac_cv_func_regcomp=no
18595 fi
18596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18597 fi
18598 echo "$as_me:18598: result: $ac_cv_func_regcomp" >&5
18599 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18600 if test $ac_cv_func_regcomp = yes; then
18601   cf_regex_func=regcomp
18602 else
18603
18604         for cf_regex_lib in $cf_regex_libs
18605         do
18606                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18607 echo "$as_me:18607: checking for regcomp in -l$cf_regex_lib" >&5
18608 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18609 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18610   echo $ECHO_N "(cached) $ECHO_C" >&6
18611 else
18612   ac_check_lib_save_LIBS=$LIBS
18613 LIBS="-l$cf_regex_lib  $LIBS"
18614 cat >conftest.$ac_ext <<_ACEOF
18615 #line 18615 "configure"
18616 #include "confdefs.h"
18617
18618 /* Override any gcc2 internal prototype to avoid an error.  */
18619 #ifdef __cplusplus
18620 extern "C"
18621 #endif
18622 /* We use char because int might match the return type of a gcc2
18623    builtin and then its argument prototype would still apply.  */
18624 char regcomp ();
18625 int
18626 main (void)
18627 {
18628 regcomp ();
18629   ;
18630   return 0;
18631 }
18632 _ACEOF
18633 rm -f conftest.$ac_objext conftest$ac_exeext
18634 if { (eval echo "$as_me:18634: \"$ac_link\"") >&5
18635   (eval $ac_link) 2>&5
18636   ac_status=$?
18637   echo "$as_me:18637: \$? = $ac_status" >&5
18638   (exit $ac_status); } &&
18639          { ac_try='test -s conftest$ac_exeext'
18640   { (eval echo "$as_me:18640: \"$ac_try\"") >&5
18641   (eval $ac_try) 2>&5
18642   ac_status=$?
18643   echo "$as_me:18643: \$? = $ac_status" >&5
18644   (exit $ac_status); }; }; then
18645   eval "$as_ac_Lib=yes"
18646 else
18647   echo "$as_me: failed program was:" >&5
18648 cat conftest.$ac_ext >&5
18649 eval "$as_ac_Lib=no"
18650 fi
18651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18652 LIBS=$ac_check_lib_save_LIBS
18653 fi
18654 echo "$as_me:18654: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18655 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18656 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18657
18658 cf_add_libs="$LIBS"
18659 # reverse order
18660 cf_add_0lib=
18661 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18662 # filter duplicates
18663 for cf_add_1lib in $cf_add_0lib; do
18664         for cf_add_2lib in $cf_add_libs; do
18665                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18666                         cf_add_1lib=
18667                         break
18668                 fi
18669         done
18670         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18671 done
18672 LIBS="$cf_add_libs"
18673
18674                                 cf_regex_func=regcomp
18675                                 break
18676 fi
18677
18678         done
18679
18680 fi
18681
18682 if test "$cf_regex_func" = no ; then
18683         echo "$as_me:18683: checking for compile" >&5
18684 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18685 if test "${ac_cv_func_compile+set}" = set; then
18686   echo $ECHO_N "(cached) $ECHO_C" >&6
18687 else
18688   cat >conftest.$ac_ext <<_ACEOF
18689 #line 18689 "configure"
18690 #include "confdefs.h"
18691 #define compile autoconf_temporary
18692 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18693 #undef compile
18694
18695 #ifdef __cplusplus
18696 extern "C"
18697 #endif
18698
18699 /* We use char because int might match the return type of a gcc2
18700    builtin and then its argument prototype would still apply.  */
18701 char compile (void);
18702
18703 int
18704 main (void)
18705 {
18706
18707 /* The GNU C library defines stubs for functions which it implements
18708     to always fail with ENOSYS.  Some functions are actually named
18709     something starting with __ and the normal name is an alias.  */
18710 #if defined (__stub_compile) || defined (__stub___compile)
18711 #error found stub for compile
18712 #endif
18713
18714         return compile ();
18715   ;
18716   return 0;
18717 }
18718 _ACEOF
18719 rm -f conftest.$ac_objext conftest$ac_exeext
18720 if { (eval echo "$as_me:18720: \"$ac_link\"") >&5
18721   (eval $ac_link) 2>&5
18722   ac_status=$?
18723   echo "$as_me:18723: \$? = $ac_status" >&5
18724   (exit $ac_status); } &&
18725          { ac_try='test -s conftest$ac_exeext'
18726   { (eval echo "$as_me:18726: \"$ac_try\"") >&5
18727   (eval $ac_try) 2>&5
18728   ac_status=$?
18729   echo "$as_me:18729: \$? = $ac_status" >&5
18730   (exit $ac_status); }; }; then
18731   ac_cv_func_compile=yes
18732 else
18733   echo "$as_me: failed program was:" >&5
18734 cat conftest.$ac_ext >&5
18735 ac_cv_func_compile=no
18736 fi
18737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18738 fi
18739 echo "$as_me:18739: result: $ac_cv_func_compile" >&5
18740 echo "${ECHO_T}$ac_cv_func_compile" >&6
18741 if test $ac_cv_func_compile = yes; then
18742   cf_regex_func=compile
18743 else
18744
18745                 echo "$as_me:18745: checking for compile in -lgen" >&5
18746 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18747 if test "${ac_cv_lib_gen_compile+set}" = set; then
18748   echo $ECHO_N "(cached) $ECHO_C" >&6
18749 else
18750   ac_check_lib_save_LIBS=$LIBS
18751 LIBS="-lgen  $LIBS"
18752 cat >conftest.$ac_ext <<_ACEOF
18753 #line 18753 "configure"
18754 #include "confdefs.h"
18755
18756 /* Override any gcc2 internal prototype to avoid an error.  */
18757 #ifdef __cplusplus
18758 extern "C"
18759 #endif
18760 /* We use char because int might match the return type of a gcc2
18761    builtin and then its argument prototype would still apply.  */
18762 char compile ();
18763 int
18764 main (void)
18765 {
18766 compile ();
18767   ;
18768   return 0;
18769 }
18770 _ACEOF
18771 rm -f conftest.$ac_objext conftest$ac_exeext
18772 if { (eval echo "$as_me:18772: \"$ac_link\"") >&5
18773   (eval $ac_link) 2>&5
18774   ac_status=$?
18775   echo "$as_me:18775: \$? = $ac_status" >&5
18776   (exit $ac_status); } &&
18777          { ac_try='test -s conftest$ac_exeext'
18778   { (eval echo "$as_me:18778: \"$ac_try\"") >&5
18779   (eval $ac_try) 2>&5
18780   ac_status=$?
18781   echo "$as_me:18781: \$? = $ac_status" >&5
18782   (exit $ac_status); }; }; then
18783   ac_cv_lib_gen_compile=yes
18784 else
18785   echo "$as_me: failed program was:" >&5
18786 cat conftest.$ac_ext >&5
18787 ac_cv_lib_gen_compile=no
18788 fi
18789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18790 LIBS=$ac_check_lib_save_LIBS
18791 fi
18792 echo "$as_me:18792: result: $ac_cv_lib_gen_compile" >&5
18793 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18794 if test $ac_cv_lib_gen_compile = yes; then
18795
18796 cf_add_libs="$LIBS"
18797 # reverse order
18798 cf_add_0lib=
18799 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18800 # filter duplicates
18801 for cf_add_1lib in $cf_add_0lib; do
18802         for cf_add_2lib in $cf_add_libs; do
18803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18804                         cf_add_1lib=
18805                         break
18806                 fi
18807         done
18808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18809 done
18810 LIBS="$cf_add_libs"
18811
18812                                 cf_regex_func=compile
18813 fi
18814
18815 fi
18816
18817 fi
18818
18819 if test "$cf_regex_func" = no ; then
18820         { echo "$as_me:18820: WARNING: cannot find regular expression library" >&5
18821 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18822 fi
18823
18824 echo "$as_me:18824: checking for regular-expression headers" >&5
18825 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18826 if test "${cf_cv_regex_hdrs+set}" = set; then
18827   echo $ECHO_N "(cached) $ECHO_C" >&6
18828 else
18829
18830 cf_cv_regex_hdrs=no
18831 case $cf_regex_func in
18832 (compile)
18833         for cf_regex_hdr in regexp.h regexpr.h
18834         do
18835                 cat >conftest.$ac_ext <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18838 #include <$cf_regex_hdr>
18839 int
18840 main (void)
18841 {
18842
18843                         char *p = compile("", "", "", 0);
18844                         int x = step("", "");
18845                         (void)p;
18846                         (void)x;
18847
18848   ;
18849   return 0;
18850 }
18851 _ACEOF
18852 rm -f conftest.$ac_objext conftest$ac_exeext
18853 if { (eval echo "$as_me:18853: \"$ac_link\"") >&5
18854   (eval $ac_link) 2>&5
18855   ac_status=$?
18856   echo "$as_me:18856: \$? = $ac_status" >&5
18857   (exit $ac_status); } &&
18858          { ac_try='test -s conftest$ac_exeext'
18859   { (eval echo "$as_me:18859: \"$ac_try\"") >&5
18860   (eval $ac_try) 2>&5
18861   ac_status=$?
18862   echo "$as_me:18862: \$? = $ac_status" >&5
18863   (exit $ac_status); }; }; then
18864
18865                         cf_cv_regex_hdrs=$cf_regex_hdr
18866                         break
18867
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 fi
18872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18873         done
18874         ;;
18875 (*)
18876         for cf_regex_hdr in regex.h
18877         do
18878                 cat >conftest.$ac_ext <<_ACEOF
18879 #line 18879 "configure"
18880 #include "confdefs.h"
18881 #include <sys/types.h>
18882 #include <$cf_regex_hdr>
18883 int
18884 main (void)
18885 {
18886
18887                         regex_t *p = 0;
18888                         int x = regcomp(p, "", 0);
18889                         int y = regexec(p, "", 0, 0, 0);
18890                         (void)x;
18891                         (void)y;
18892                         regfree(p);
18893
18894   ;
18895   return 0;
18896 }
18897 _ACEOF
18898 rm -f conftest.$ac_objext conftest$ac_exeext
18899 if { (eval echo "$as_me:18899: \"$ac_link\"") >&5
18900   (eval $ac_link) 2>&5
18901   ac_status=$?
18902   echo "$as_me:18902: \$? = $ac_status" >&5
18903   (exit $ac_status); } &&
18904          { ac_try='test -s conftest$ac_exeext'
18905   { (eval echo "$as_me:18905: \"$ac_try\"") >&5
18906   (eval $ac_try) 2>&5
18907   ac_status=$?
18908   echo "$as_me:18908: \$? = $ac_status" >&5
18909   (exit $ac_status); }; }; then
18910
18911                         cf_cv_regex_hdrs=$cf_regex_hdr
18912                         break
18913
18914 else
18915   echo "$as_me: failed program was:" >&5
18916 cat conftest.$ac_ext >&5
18917 fi
18918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18919         done
18920         ;;
18921 esac
18922
18923 fi
18924 echo "$as_me:18924: result: $cf_cv_regex_hdrs" >&5
18925 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18926
18927 case $cf_cv_regex_hdrs in
18928         (no)            { echo "$as_me:18928: WARNING: no regular expression header found" >&5
18929 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18930         (regex.h)
18931 cat >>confdefs.h <<\EOF
18932 #define HAVE_REGEX_H_FUNCS 1
18933 EOF
18934  ;;
18935         (regexp.h)
18936 cat >>confdefs.h <<\EOF
18937 #define HAVE_REGEXP_H_FUNCS 1
18938 EOF
18939  ;;
18940         (regexpr.h)
18941 cat >>confdefs.h <<\EOF
18942 #define HAVE_REGEXPR_H_FUNCS 1
18943 EOF
18944  ;;
18945 esac
18946
18947 for ac_header in \
18948 fcntl.h \
18949 getopt.h \
18950 limits.h \
18951 locale.h \
18952 math.h \
18953 poll.h \
18954 sys/ioctl.h \
18955 sys/param.h \
18956 sys/poll.h \
18957 sys/select.h \
18958 sys/time.h \
18959 sys/times.h \
18960 ttyent.h \
18961 unistd.h \
18962 wctype.h \
18963
18964 do
18965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18966 echo "$as_me:18966: checking for $ac_header" >&5
18967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18969   echo $ECHO_N "(cached) $ECHO_C" >&6
18970 else
18971   cat >conftest.$ac_ext <<_ACEOF
18972 #line 18972 "configure"
18973 #include "confdefs.h"
18974 #include <$ac_header>
18975 _ACEOF
18976 if { (eval echo "$as_me:18976: \"$ac_cpp conftest.$ac_ext\"") >&5
18977   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18978   ac_status=$?
18979   egrep -v '^ *\+' conftest.er1 >conftest.err
18980   rm -f conftest.er1
18981   cat conftest.err >&5
18982   echo "$as_me:18982: \$? = $ac_status" >&5
18983   (exit $ac_status); } >/dev/null; then
18984   if test -s conftest.err; then
18985     ac_cpp_err=$ac_c_preproc_warn_flag
18986   else
18987     ac_cpp_err=
18988   fi
18989 else
18990   ac_cpp_err=yes
18991 fi
18992 if test -z "$ac_cpp_err"; then
18993   eval "$as_ac_Header=yes"
18994 else
18995   echo "$as_me: failed program was:" >&5
18996   cat conftest.$ac_ext >&5
18997   eval "$as_ac_Header=no"
18998 fi
18999 rm -f conftest.err conftest.$ac_ext
19000 fi
19001 echo "$as_me:19001: result: `eval echo '${'$as_ac_Header'}'`" >&5
19002 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19003 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19004   cat >>confdefs.h <<EOF
19005 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19006 EOF
19007
19008 fi
19009 done
19010
19011 for ac_header in unistd.h getopt.h
19012 do
19013 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19014 echo "$as_me:19014: checking for $ac_header" >&5
19015 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19016 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19017   echo $ECHO_N "(cached) $ECHO_C" >&6
19018 else
19019   cat >conftest.$ac_ext <<_ACEOF
19020 #line 19020 "configure"
19021 #include "confdefs.h"
19022 #include <$ac_header>
19023 _ACEOF
19024 if { (eval echo "$as_me:19024: \"$ac_cpp conftest.$ac_ext\"") >&5
19025   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19026   ac_status=$?
19027   egrep -v '^ *\+' conftest.er1 >conftest.err
19028   rm -f conftest.er1
19029   cat conftest.err >&5
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit $ac_status); } >/dev/null; then
19032   if test -s conftest.err; then
19033     ac_cpp_err=$ac_c_preproc_warn_flag
19034   else
19035     ac_cpp_err=
19036   fi
19037 else
19038   ac_cpp_err=yes
19039 fi
19040 if test -z "$ac_cpp_err"; then
19041   eval "$as_ac_Header=yes"
19042 else
19043   echo "$as_me: failed program was:" >&5
19044   cat conftest.$ac_ext >&5
19045   eval "$as_ac_Header=no"
19046 fi
19047 rm -f conftest.err conftest.$ac_ext
19048 fi
19049 echo "$as_me:19049: result: `eval echo '${'$as_ac_Header'}'`" >&5
19050 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19051 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19052   cat >>confdefs.h <<EOF
19053 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19054 EOF
19055
19056 fi
19057 done
19058
19059 echo "$as_me:19059: checking for header declaring getopt variables" >&5
19060 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19061 if test "${cf_cv_getopt_header+set}" = set; then
19062   echo $ECHO_N "(cached) $ECHO_C" >&6
19063 else
19064
19065 cf_cv_getopt_header=none
19066 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19067 do
19068 cat >conftest.$ac_ext <<_ACEOF
19069 #line 19069 "configure"
19070 #include "confdefs.h"
19071
19072 #include <$cf_header>
19073 int
19074 main (void)
19075 {
19076 int x = optind; char *y = optarg
19077   ;
19078   return 0;
19079 }
19080 _ACEOF
19081 rm -f conftest.$ac_objext
19082 if { (eval echo "$as_me:19082: \"$ac_compile\"") >&5
19083   (eval $ac_compile) 2>&5
19084   ac_status=$?
19085   echo "$as_me:19085: \$? = $ac_status" >&5
19086   (exit $ac_status); } &&
19087          { ac_try='test -s conftest.$ac_objext'
19088   { (eval echo "$as_me:19088: \"$ac_try\"") >&5
19089   (eval $ac_try) 2>&5
19090   ac_status=$?
19091   echo "$as_me:19091: \$? = $ac_status" >&5
19092   (exit $ac_status); }; }; then
19093   cf_cv_getopt_header=$cf_header
19094  break
19095 else
19096   echo "$as_me: failed program was:" >&5
19097 cat conftest.$ac_ext >&5
19098 fi
19099 rm -f conftest.$ac_objext conftest.$ac_ext
19100 done
19101
19102 fi
19103 echo "$as_me:19103: result: $cf_cv_getopt_header" >&5
19104 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19105 if test $cf_cv_getopt_header != none ; then
19106
19107 cat >>confdefs.h <<\EOF
19108 #define HAVE_GETOPT_HEADER 1
19109 EOF
19110
19111 fi
19112 if test $cf_cv_getopt_header = getopt.h ; then
19113
19114 cat >>confdefs.h <<\EOF
19115 #define NEED_GETOPT_H 1
19116 EOF
19117
19118 fi
19119
19120 echo "$as_me:19120: checking if external environ is declared" >&5
19121 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19122 if test "${cf_cv_dcl_environ+set}" = set; then
19123   echo $ECHO_N "(cached) $ECHO_C" >&6
19124 else
19125
19126     cat >conftest.$ac_ext <<_ACEOF
19127 #line 19127 "configure"
19128 #include "confdefs.h"
19129
19130 #ifdef HAVE_STDLIB_H
19131 #include <stdlib.h>
19132 #endif
19133 #include <unistd.h>
19134 int
19135 main (void)
19136 {
19137 int x = (int) environ
19138   ;
19139   return 0;
19140 }
19141 _ACEOF
19142 rm -f conftest.$ac_objext
19143 if { (eval echo "$as_me:19143: \"$ac_compile\"") >&5
19144   (eval $ac_compile) 2>&5
19145   ac_status=$?
19146   echo "$as_me:19146: \$? = $ac_status" >&5
19147   (exit $ac_status); } &&
19148          { ac_try='test -s conftest.$ac_objext'
19149   { (eval echo "$as_me:19149: \"$ac_try\"") >&5
19150   (eval $ac_try) 2>&5
19151   ac_status=$?
19152   echo "$as_me:19152: \$? = $ac_status" >&5
19153   (exit $ac_status); }; }; then
19154   cf_cv_dcl_environ=yes
19155 else
19156   echo "$as_me: failed program was:" >&5
19157 cat conftest.$ac_ext >&5
19158 cf_cv_dcl_environ=no
19159 fi
19160 rm -f conftest.$ac_objext conftest.$ac_ext
19161
19162 fi
19163 echo "$as_me:19163: result: $cf_cv_dcl_environ" >&5
19164 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19165
19166 if test "$cf_cv_dcl_environ" = no ; then
19167
19168 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19169
19170     cat >>confdefs.h <<EOF
19171 #define $cf_result 1
19172 EOF
19173
19174 fi
19175
19176 # It's possible (for near-UNIX clones) that the data doesn't exist
19177
19178 echo "$as_me:19178: checking if external environ exists" >&5
19179 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19180 if test "${cf_cv_have_environ+set}" = set; then
19181   echo $ECHO_N "(cached) $ECHO_C" >&6
19182 else
19183
19184         cat >conftest.$ac_ext <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19187
19188 #undef environ
19189 extern int environ;
19190
19191 int
19192 main (void)
19193 {
19194 environ = 2
19195   ;
19196   return 0;
19197 }
19198 _ACEOF
19199 rm -f conftest.$ac_objext conftest$ac_exeext
19200 if { (eval echo "$as_me:19200: \"$ac_link\"") >&5
19201   (eval $ac_link) 2>&5
19202   ac_status=$?
19203   echo "$as_me:19203: \$? = $ac_status" >&5
19204   (exit $ac_status); } &&
19205          { ac_try='test -s conftest$ac_exeext'
19206   { (eval echo "$as_me:19206: \"$ac_try\"") >&5
19207   (eval $ac_try) 2>&5
19208   ac_status=$?
19209   echo "$as_me:19209: \$? = $ac_status" >&5
19210   (exit $ac_status); }; }; then
19211   cf_cv_have_environ=yes
19212 else
19213   echo "$as_me: failed program was:" >&5
19214 cat conftest.$ac_ext >&5
19215 cf_cv_have_environ=no
19216 fi
19217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19218
19219 fi
19220 echo "$as_me:19220: result: $cf_cv_have_environ" >&5
19221 echo "${ECHO_T}$cf_cv_have_environ" >&6
19222
19223 if test "$cf_cv_have_environ" = yes ; then
19224
19225 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19226
19227         cat >>confdefs.h <<EOF
19228 #define $cf_result 1
19229 EOF
19230
19231 fi
19232
19233 echo "$as_me:19233: checking for getenv" >&5
19234 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19235 if test "${ac_cv_func_getenv+set}" = set; then
19236   echo $ECHO_N "(cached) $ECHO_C" >&6
19237 else
19238   cat >conftest.$ac_ext <<_ACEOF
19239 #line 19239 "configure"
19240 #include "confdefs.h"
19241 #define getenv autoconf_temporary
19242 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19243 #undef getenv
19244
19245 #ifdef __cplusplus
19246 extern "C"
19247 #endif
19248
19249 /* We use char because int might match the return type of a gcc2
19250    builtin and then its argument prototype would still apply.  */
19251 char getenv (void);
19252
19253 int
19254 main (void)
19255 {
19256
19257 /* The GNU C library defines stubs for functions which it implements
19258     to always fail with ENOSYS.  Some functions are actually named
19259     something starting with __ and the normal name is an alias.  */
19260 #if defined (__stub_getenv) || defined (__stub___getenv)
19261 #error found stub for getenv
19262 #endif
19263
19264         return getenv ();
19265   ;
19266   return 0;
19267 }
19268 _ACEOF
19269 rm -f conftest.$ac_objext conftest$ac_exeext
19270 if { (eval echo "$as_me:19270: \"$ac_link\"") >&5
19271   (eval $ac_link) 2>&5
19272   ac_status=$?
19273   echo "$as_me:19273: \$? = $ac_status" >&5
19274   (exit $ac_status); } &&
19275          { ac_try='test -s conftest$ac_exeext'
19276   { (eval echo "$as_me:19276: \"$ac_try\"") >&5
19277   (eval $ac_try) 2>&5
19278   ac_status=$?
19279   echo "$as_me:19279: \$? = $ac_status" >&5
19280   (exit $ac_status); }; }; then
19281   ac_cv_func_getenv=yes
19282 else
19283   echo "$as_me: failed program was:" >&5
19284 cat conftest.$ac_ext >&5
19285 ac_cv_func_getenv=no
19286 fi
19287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19288 fi
19289 echo "$as_me:19289: result: $ac_cv_func_getenv" >&5
19290 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19291
19292 for ac_func in putenv setenv strdup
19293 do
19294 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19295 echo "$as_me:19295: checking for $ac_func" >&5
19296 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19297 if eval "test \"\${$as_ac_var+set}\" = set"; then
19298   echo $ECHO_N "(cached) $ECHO_C" >&6
19299 else
19300   cat >conftest.$ac_ext <<_ACEOF
19301 #line 19301 "configure"
19302 #include "confdefs.h"
19303 #define $ac_func autoconf_temporary
19304 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19305 #undef $ac_func
19306
19307 #ifdef __cplusplus
19308 extern "C"
19309 #endif
19310
19311 /* We use char because int might match the return type of a gcc2
19312    builtin and then its argument prototype would still apply.  */
19313 char $ac_func (void);
19314
19315 int
19316 main (void)
19317 {
19318
19319 /* The GNU C library defines stubs for functions which it implements
19320     to always fail with ENOSYS.  Some functions are actually named
19321     something starting with __ and the normal name is an alias.  */
19322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19323 #error found stub for $ac_func
19324 #endif
19325
19326         return $ac_func ();
19327   ;
19328   return 0;
19329 }
19330 _ACEOF
19331 rm -f conftest.$ac_objext conftest$ac_exeext
19332 if { (eval echo "$as_me:19332: \"$ac_link\"") >&5
19333   (eval $ac_link) 2>&5
19334   ac_status=$?
19335   echo "$as_me:19335: \$? = $ac_status" >&5
19336   (exit $ac_status); } &&
19337          { ac_try='test -s conftest$ac_exeext'
19338   { (eval echo "$as_me:19338: \"$ac_try\"") >&5
19339   (eval $ac_try) 2>&5
19340   ac_status=$?
19341   echo "$as_me:19341: \$? = $ac_status" >&5
19342   (exit $ac_status); }; }; then
19343   eval "$as_ac_var=yes"
19344 else
19345   echo "$as_me: failed program was:" >&5
19346 cat conftest.$ac_ext >&5
19347 eval "$as_ac_var=no"
19348 fi
19349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19350 fi
19351 echo "$as_me:19351: result: `eval echo '${'$as_ac_var'}'`" >&5
19352 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19353 if test `eval echo '${'$as_ac_var'}'` = yes; then
19354   cat >>confdefs.h <<EOF
19355 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19356 EOF
19357
19358 fi
19359 done
19360
19361 echo "$as_me:19361: checking if getenv returns consistent values" >&5
19362 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19363 if test "${cf_cv_consistent_getenv+set}" = set; then
19364   echo $ECHO_N "(cached) $ECHO_C" >&6
19365 else
19366
19367 if test "$cross_compiling" = yes; then
19368   cf_cv_consistent_getenv=unknown
19369 else
19370   cat >conftest.$ac_ext <<_ACEOF
19371 #line 19371 "configure"
19372 #include "confdefs.h"
19373
19374 #include <stdlib.h>
19375 #include <unistd.h>
19376 #include <stdio.h>
19377 #include <string.h>
19378 #include <sys/types.h>
19379
19380 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19381 extern char **environ;  /* POSIX, but some systems are not... */
19382 #endif
19383
19384 #if defined(HAVE_STRDUP)
19385 #define str_alloc(s) strdup(s)
19386 #else
19387 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19388 #endif
19389
19390 static void set_value(const char *name, const char *value)
19391 {
19392 #if defined(HAVE_SETENV)
19393         setenv(name, value, 1);
19394 #elif defined(HAVE_PUTENV)
19395         char buffer[1024];
19396         sprintf(buffer, "%s=%s", name, value);
19397         putenv(str_alloc(buffer));
19398 #else
19399 #error neither putenv/setenv found
19400 #endif
19401 }
19402 int main(void)
19403 {
19404         int pass;
19405         size_t numenv, limit, j;
19406         char **mynames;
19407         char **myvalues;
19408         char **mypointer;
19409         char *equals;
19410         for (numenv = 0; environ[numenv]; ++numenv) ;
19411         limit = numenv + 10;
19412         mynames = (char **) calloc(limit + 1, sizeof(char *));
19413         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19414         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19415 #if defined(HAVE_ENVIRON)
19416         for (j = 0; environ[j]; ++j) {
19417                 mynames[j] = str_alloc(environ[j]);
19418                 equals = strchr(mynames[j], '=');
19419                 if (equals != 0) {
19420                         *equals++ = '\0';
19421                         myvalues[j] = str_alloc(equals);
19422                 } else {
19423                         myvalues[j] = str_alloc("");
19424                 }
19425         }
19426 #endif
19427         for (j = numenv; j < limit; ++j) {
19428                 char name[80];
19429                 char value[80];
19430                 size_t found;
19431                 size_t k = 0;
19432                 do {
19433                         size_t jk;
19434                         found = 0;
19435                         sprintf(name, "TERM%lu", (unsigned long) k);
19436                         for (jk = 0; jk < j; ++jk) {
19437                                 if (!strcmp(name, mynames[jk])) {
19438                                         found = 1;
19439                                         ++k;
19440                                         break;
19441                                 }
19442                         }
19443                 } while (found);
19444                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19445                 set_value(name, value);
19446                 mynames[j] = str_alloc(name);
19447                 myvalues[j] = str_alloc(value);
19448         }
19449         for (pass = 0; pass < 3; ++pass) {
19450                 for (j = 0; j < limit; ++j) {
19451                         char *value = getenv(mynames[j]);
19452                         if (pass) {
19453                                 if (value == 0) {
19454                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19455                                         ${cf_cv_main_return:-return}(1);
19456                                 } else if (value != mypointer[j]) {
19457                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19458                                         ${cf_cv_main_return:-return}(1);
19459                                 } else if (strcmp(value, myvalues[j])) {
19460                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19461                                         ${cf_cv_main_return:-return}(1);
19462                                 }
19463                         } else {
19464                                 size_t k;
19465                                 mypointer[j] = value;
19466                                 for (k = 0; k < j; ++k) {
19467                                         if (mypointer[j] == mypointer[k]) {
19468                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19469                                                 ${cf_cv_main_return:-return}(1);
19470                                         }
19471                                 }
19472                         }
19473                 }
19474         }
19475         ${cf_cv_main_return:-return}(0);
19476 }
19477
19478 _ACEOF
19479 rm -f conftest$ac_exeext
19480 if { (eval echo "$as_me:19480: \"$ac_link\"") >&5
19481   (eval $ac_link) 2>&5
19482   ac_status=$?
19483   echo "$as_me:19483: \$? = $ac_status" >&5
19484   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19485   { (eval echo "$as_me:19485: \"$ac_try\"") >&5
19486   (eval $ac_try) 2>&5
19487   ac_status=$?
19488   echo "$as_me:19488: \$? = $ac_status" >&5
19489   (exit $ac_status); }; }; then
19490   cf_cv_consistent_getenv=yes
19491 else
19492   echo "$as_me: program exited with status $ac_status" >&5
19493 echo "$as_me: failed program was:" >&5
19494 cat conftest.$ac_ext >&5
19495 cf_cv_consistent_getenv=no
19496 fi
19497 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19498 fi
19499
19500 fi
19501 echo "$as_me:19501: result: $cf_cv_consistent_getenv" >&5
19502 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19503
19504 if test "x$cf_cv_consistent_getenv" = xno
19505 then
19506
19507 cat >>confdefs.h <<\EOF
19508 #define HAVE_CONSISTENT_GETENV 1
19509 EOF
19510
19511 fi
19512
19513 if test "x$cf_cv_consistent_getenv" = xno && \
19514         test "x$cf_with_trace" = xyes
19515 then
19516         { echo "$as_me:19516: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19517 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19518 fi
19519
19520 echo "$as_me:19520: checking if sys/time.h works with sys/select.h" >&5
19521 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19522 if test "${cf_cv_sys_time_select+set}" = set; then
19523   echo $ECHO_N "(cached) $ECHO_C" >&6
19524 else
19525
19526 cat >conftest.$ac_ext <<_ACEOF
19527 #line 19527 "configure"
19528 #include "confdefs.h"
19529
19530 #include <sys/types.h>
19531 #ifdef HAVE_SYS_TIME_H
19532 #include <sys/time.h>
19533 #endif
19534 #ifdef HAVE_SYS_SELECT_H
19535 #include <sys/select.h>
19536 #endif
19537
19538 int
19539 main (void)
19540 {
19541
19542   ;
19543   return 0;
19544 }
19545 _ACEOF
19546 rm -f conftest.$ac_objext
19547 if { (eval echo "$as_me:19547: \"$ac_compile\"") >&5
19548   (eval $ac_compile) 2>&5
19549   ac_status=$?
19550   echo "$as_me:19550: \$? = $ac_status" >&5
19551   (exit $ac_status); } &&
19552          { ac_try='test -s conftest.$ac_objext'
19553   { (eval echo "$as_me:19553: \"$ac_try\"") >&5
19554   (eval $ac_try) 2>&5
19555   ac_status=$?
19556   echo "$as_me:19556: \$? = $ac_status" >&5
19557   (exit $ac_status); }; }; then
19558   cf_cv_sys_time_select=yes
19559 else
19560   echo "$as_me: failed program was:" >&5
19561 cat conftest.$ac_ext >&5
19562 cf_cv_sys_time_select=no
19563 fi
19564 rm -f conftest.$ac_objext conftest.$ac_ext
19565
19566 fi
19567
19568 echo "$as_me:19568: result: $cf_cv_sys_time_select" >&5
19569 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19570 test "$cf_cv_sys_time_select" = yes &&
19571 cat >>confdefs.h <<\EOF
19572 #define HAVE_SYS_TIME_SELECT 1
19573 EOF
19574
19575 ###     checks for compiler characteristics
19576 ac_ext=c
19577 ac_cpp='$CPP $CPPFLAGS'
19578 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19579 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19580 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19581 ac_main_return=return
19582
19583 echo "$as_me:19583: checking for an ANSI C-conforming const" >&5
19584 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19585 if test "${ac_cv_c_const+set}" = set; then
19586   echo $ECHO_N "(cached) $ECHO_C" >&6
19587 else
19588   cat >conftest.$ac_ext <<_ACEOF
19589 #line 19589 "configure"
19590 #include "confdefs.h"
19591
19592 int
19593 main (void)
19594 {
19595 /* FIXME: Include the comments suggested by Paul. */
19596 #ifndef __cplusplus
19597   /* Ultrix mips cc rejects this.  */
19598   typedef int charset[2];
19599   const charset x;
19600   /* SunOS 4.1.1 cc rejects this.  */
19601   char const *const *ccp;
19602   char **p;
19603   /* NEC SVR4.0.2 mips cc rejects this.  */
19604   struct point {int x, y;};
19605   static struct point const zero = {0,0};
19606   /* AIX XL C 1.02.0.0 rejects this.
19607      It does not let you subtract one const X* pointer from another in
19608      an arm of an if-expression whose if-part is not a constant
19609      expression */
19610   const char *g = "string";
19611   ccp = &g + (g ? g-g : 0);
19612   /* HPUX 7.0 cc rejects these. */
19613   ++ccp;
19614   p = (char**) ccp;
19615   ccp = (char const *const *) p;
19616   { /* SCO 3.2v4 cc rejects this.  */
19617     char *t;
19618     char const *s = 0 ? (char *) 0 : (char const *) 0;
19619
19620     *t++ = 0;
19621   }
19622   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19623     int x[] = {25, 17};
19624     const int *foo = &x[0];
19625     ++foo;
19626   }
19627   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19628     typedef const int *iptr;
19629     iptr p = 0;
19630     ++p;
19631   }
19632   { /* AIX XL C 1.02.0.0 rejects this saying
19633        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19634     struct s { int j; const int *ap[3]; };
19635     struct s *b; b->j = 5;
19636   }
19637   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19638     const int foo = 10;
19639   }
19640 #endif
19641
19642   ;
19643   return 0;
19644 }
19645 _ACEOF
19646 rm -f conftest.$ac_objext
19647 if { (eval echo "$as_me:19647: \"$ac_compile\"") >&5
19648   (eval $ac_compile) 2>&5
19649   ac_status=$?
19650   echo "$as_me:19650: \$? = $ac_status" >&5
19651   (exit $ac_status); } &&
19652          { ac_try='test -s conftest.$ac_objext'
19653   { (eval echo "$as_me:19653: \"$ac_try\"") >&5
19654   (eval $ac_try) 2>&5
19655   ac_status=$?
19656   echo "$as_me:19656: \$? = $ac_status" >&5
19657   (exit $ac_status); }; }; then
19658   ac_cv_c_const=yes
19659 else
19660   echo "$as_me: failed program was:" >&5
19661 cat conftest.$ac_ext >&5
19662 ac_cv_c_const=no
19663 fi
19664 rm -f conftest.$ac_objext conftest.$ac_ext
19665 fi
19666 echo "$as_me:19666: result: $ac_cv_c_const" >&5
19667 echo "${ECHO_T}$ac_cv_c_const" >&6
19668 if test $ac_cv_c_const = no; then
19669
19670 cat >>confdefs.h <<\EOF
19671 #define const
19672 EOF
19673
19674 fi
19675
19676 echo "$as_me:19676: checking for inline" >&5
19677 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19678 if test "${ac_cv_c_inline+set}" = set; then
19679   echo $ECHO_N "(cached) $ECHO_C" >&6
19680 else
19681   ac_cv_c_inline=no
19682 for ac_kw in inline __inline__ __inline; do
19683   cat >conftest.$ac_ext <<_ACEOF
19684 #line 19684 "configure"
19685 #include "confdefs.h"
19686 #ifndef __cplusplus
19687 static $ac_kw int static_foo () {return 0; }
19688 $ac_kw int foo () {return 0; }
19689 #endif
19690
19691 _ACEOF
19692 rm -f conftest.$ac_objext
19693 if { (eval echo "$as_me:19693: \"$ac_compile\"") >&5
19694   (eval $ac_compile) 2>&5
19695   ac_status=$?
19696   echo "$as_me:19696: \$? = $ac_status" >&5
19697   (exit $ac_status); } &&
19698          { ac_try='test -s conftest.$ac_objext'
19699   { (eval echo "$as_me:19699: \"$ac_try\"") >&5
19700   (eval $ac_try) 2>&5
19701   ac_status=$?
19702   echo "$as_me:19702: \$? = $ac_status" >&5
19703   (exit $ac_status); }; }; then
19704   ac_cv_c_inline=$ac_kw; break
19705 else
19706   echo "$as_me: failed program was:" >&5
19707 cat conftest.$ac_ext >&5
19708 fi
19709 rm -f conftest.$ac_objext conftest.$ac_ext
19710 done
19711
19712 fi
19713 echo "$as_me:19713: result: $ac_cv_c_inline" >&5
19714 echo "${ECHO_T}$ac_cv_c_inline" >&6
19715 case $ac_cv_c_inline in
19716   inline | yes) ;;
19717   no)
19718 cat >>confdefs.h <<\EOF
19719 #define inline
19720 EOF
19721  ;;
19722   *)  cat >>confdefs.h <<EOF
19723 #define inline $ac_cv_c_inline
19724 EOF
19725  ;;
19726 esac
19727
19728 NCURSES_INLINE=
19729 if test "$ac_cv_c_inline" != no ; then
19730         NCURSES_INLINE=inline
19731         if test "$INTEL_COMPILER" = yes
19732         then
19733                 :
19734         elif test "$CLANG_COMPILER" = yes
19735         then
19736                 :
19737         elif test "$GCC" = yes
19738         then
19739                 echo "$as_me:19739: checking if $CC supports options to tune inlining" >&5
19740 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19741 if test "${cf_cv_gcc_inline+set}" = set; then
19742   echo $ECHO_N "(cached) $ECHO_C" >&6
19743 else
19744
19745                 cf_save_CFLAGS=$CFLAGS
19746                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19747                 cat >conftest.$ac_ext <<_ACEOF
19748 #line 19748 "configure"
19749 #include "confdefs.h"
19750 inline int foo(void) { return 1; }
19751 int
19752 main (void)
19753 {
19754 ${cf_cv_main_return:-return} foo()
19755   ;
19756   return 0;
19757 }
19758 _ACEOF
19759 rm -f conftest.$ac_objext
19760 if { (eval echo "$as_me:19760: \"$ac_compile\"") >&5
19761   (eval $ac_compile) 2>&5
19762   ac_status=$?
19763   echo "$as_me:19763: \$? = $ac_status" >&5
19764   (exit $ac_status); } &&
19765          { ac_try='test -s conftest.$ac_objext'
19766   { (eval echo "$as_me:19766: \"$ac_try\"") >&5
19767   (eval $ac_try) 2>&5
19768   ac_status=$?
19769   echo "$as_me:19769: \$? = $ac_status" >&5
19770   (exit $ac_status); }; }; then
19771   cf_cv_gcc_inline=yes
19772 else
19773   echo "$as_me: failed program was:" >&5
19774 cat conftest.$ac_ext >&5
19775 cf_cv_gcc_inline=no
19776 fi
19777 rm -f conftest.$ac_objext conftest.$ac_ext
19778                 CFLAGS=$cf_save_CFLAGS
19779
19780 fi
19781 echo "$as_me:19781: result: $cf_cv_gcc_inline" >&5
19782 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19783                 if test "$cf_cv_gcc_inline" = yes ; then
19784
19785 cf_fix_cppflags=no
19786 cf_new_cflags=
19787 cf_new_cppflags=
19788 cf_new_extra_cppflags=
19789
19790 for cf_add_cflags in --param max-inline-insns-single=1200
19791 do
19792 case $cf_fix_cppflags in
19793 (no)
19794         case $cf_add_cflags in
19795         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19796                 case $cf_add_cflags in
19797                 (-D*)
19798                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19799
19800                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19801                                 && test -z "${cf_tst_cflags}" \
19802                                 && cf_fix_cppflags=yes
19803
19804                         if test $cf_fix_cppflags = yes ; then
19805
19806         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19807         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19808
19809                                 continue
19810                         elif test "${cf_tst_cflags}" = "\"'" ; then
19811
19812         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19813         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19814
19815                                 continue
19816                         fi
19817                         ;;
19818                 esac
19819                 case "$CPPFLAGS" in
19820                 (*$cf_add_cflags)
19821                         ;;
19822                 (*)
19823                         case $cf_add_cflags in
19824                         (-D*)
19825                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19826
19827 CPPFLAGS=`echo "$CPPFLAGS" | \
19828         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19829                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19830
19831                                 ;;
19832                         esac
19833
19834         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19835         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19836
19837                         ;;
19838                 esac
19839                 ;;
19840         (*)
19841
19842         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19843         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19844
19845                 ;;
19846         esac
19847         ;;
19848 (yes)
19849
19850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19852
19853         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19854
19855         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19856                 && test -z "${cf_tst_cflags}" \
19857                 && cf_fix_cppflags=no
19858         ;;
19859 esac
19860 done
19861
19862 if test -n "$cf_new_cflags" ; then
19863
19864         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19865         CFLAGS="${CFLAGS}$cf_new_cflags"
19866
19867 fi
19868
19869 if test -n "$cf_new_cppflags" ; then
19870
19871         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19872         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19873
19874 fi
19875
19876 if test -n "$cf_new_extra_cppflags" ; then
19877
19878         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19879         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19880
19881 fi
19882
19883                 fi
19884         fi
19885 fi
19886
19887 echo "$as_me:19887: checking for signal global datatype" >&5
19888 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19889 if test "${cf_cv_sig_atomic_t+set}" = set; then
19890   echo $ECHO_N "(cached) $ECHO_C" >&6
19891 else
19892
19893         for cf_type in \
19894                 "volatile sig_atomic_t" \
19895                 "sig_atomic_t" \
19896                 "int"
19897         do
19898         cat >conftest.$ac_ext <<_ACEOF
19899 #line 19899 "configure"
19900 #include "confdefs.h"
19901
19902 #include <sys/types.h>
19903 #include <signal.h>
19904 #include <stdio.h>
19905
19906 extern $cf_type x;
19907 $cf_type x;
19908 static void handler(int sig)
19909 {
19910         (void)sig;
19911         x = 5;
19912 }
19913 int
19914 main (void)
19915 {
19916 signal(SIGINT, handler);
19917                  x = 1
19918   ;
19919   return 0;
19920 }
19921 _ACEOF
19922 rm -f conftest.$ac_objext
19923 if { (eval echo "$as_me:19923: \"$ac_compile\"") >&5
19924   (eval $ac_compile) 2>&5
19925   ac_status=$?
19926   echo "$as_me:19926: \$? = $ac_status" >&5
19927   (exit $ac_status); } &&
19928          { ac_try='test -s conftest.$ac_objext'
19929   { (eval echo "$as_me:19929: \"$ac_try\"") >&5
19930   (eval $ac_try) 2>&5
19931   ac_status=$?
19932   echo "$as_me:19932: \$? = $ac_status" >&5
19933   (exit $ac_status); }; }; then
19934   cf_cv_sig_atomic_t=$cf_type
19935 else
19936   echo "$as_me: failed program was:" >&5
19937 cat conftest.$ac_ext >&5
19938 cf_cv_sig_atomic_t=no
19939 fi
19940 rm -f conftest.$ac_objext conftest.$ac_ext
19941                 test "$cf_cv_sig_atomic_t" != no && break
19942         done
19943
19944 fi
19945
19946 echo "$as_me:19946: result: $cf_cv_sig_atomic_t" >&5
19947 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19948 test "$cf_cv_sig_atomic_t" != no &&
19949 cat >>confdefs.h <<EOF
19950 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19951 EOF
19952
19953 if test $NCURSES_CHTYPE = auto ; then
19954
19955 echo "$as_me:19955: checking for type of chtype" >&5
19956 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19957 if test "${cf_cv_typeof_chtype+set}" = set; then
19958   echo $ECHO_N "(cached) $ECHO_C" >&6
19959 else
19960
19961                 if test "$cross_compiling" = yes; then
19962   cf_cv_typeof_chtype=long
19963 else
19964   cat >conftest.$ac_ext <<_ACEOF
19965 #line 19965 "configure"
19966 #include "confdefs.h"
19967
19968 #define WANT_BITS 31
19969 #include <stdio.h>
19970 int main(void)
19971 {
19972         FILE *fp = fopen("cf_test.out", "w");
19973         if (fp != 0) {
19974                 char *result = "long";
19975                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19976                         int n;
19977                         unsigned int x, y;
19978                         for (n = 0; n < WANT_BITS; n++) {
19979                                 x = (1 << n);
19980                                 y = (x >> n);
19981                                 if (y != 1 || x == 0) {
19982                                         x = 0;
19983                                         break;
19984                                 }
19985                         }
19986                         /*
19987                          * If x is nonzero, an int is big enough for the bits
19988                          * that we want.
19989                          */
19990                         result = (x != 0) ? "int" : "long";
19991                 }
19992                 fputs(result, fp);
19993                 fclose(fp);
19994         }
19995         ${cf_cv_main_return:-return}(0);
19996 }
19997
19998 _ACEOF
19999 rm -f conftest$ac_exeext
20000 if { (eval echo "$as_me:20000: \"$ac_link\"") >&5
20001   (eval $ac_link) 2>&5
20002   ac_status=$?
20003   echo "$as_me:20003: \$? = $ac_status" >&5
20004   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20005   { (eval echo "$as_me:20005: \"$ac_try\"") >&5
20006   (eval $ac_try) 2>&5
20007   ac_status=$?
20008   echo "$as_me:20008: \$? = $ac_status" >&5
20009   (exit $ac_status); }; }; then
20010   cf_cv_typeof_chtype=`cat cf_test.out`
20011 else
20012   echo "$as_me: program exited with status $ac_status" >&5
20013 echo "$as_me: failed program was:" >&5
20014 cat conftest.$ac_ext >&5
20015 cf_cv_typeof_chtype=long
20016 fi
20017 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20018 fi
20019                 rm -f cf_test.out
20020
20021 fi
20022
20023 echo "$as_me:20023: result: $cf_cv_typeof_chtype" >&5
20024 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20025
20026 cat >>confdefs.h <<EOF
20027 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20028 EOF
20029
20030 else
20031         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20032 fi
20033 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20034
20035 echo "$as_me:20035: checking if unsigned literals are legal" >&5
20036 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20037 if test "${cf_cv_unsigned_literals+set}" = set; then
20038   echo $ECHO_N "(cached) $ECHO_C" >&6
20039 else
20040
20041         cat >conftest.$ac_ext <<_ACEOF
20042 #line 20042 "configure"
20043 #include "confdefs.h"
20044
20045 int
20046 main (void)
20047 {
20048 long x = 1L + 1UL + 1U + 1
20049   ;
20050   return 0;
20051 }
20052 _ACEOF
20053 rm -f conftest.$ac_objext
20054 if { (eval echo "$as_me:20054: \"$ac_compile\"") >&5
20055   (eval $ac_compile) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); } &&
20059          { ac_try='test -s conftest.$ac_objext'
20060   { (eval echo "$as_me:20060: \"$ac_try\"") >&5
20061   (eval $ac_try) 2>&5
20062   ac_status=$?
20063   echo "$as_me:20063: \$? = $ac_status" >&5
20064   (exit $ac_status); }; }; then
20065   cf_cv_unsigned_literals=yes
20066 else
20067   echo "$as_me: failed program was:" >&5
20068 cat conftest.$ac_ext >&5
20069 cf_cv_unsigned_literals=no
20070 fi
20071 rm -f conftest.$ac_objext conftest.$ac_ext
20072
20073 fi
20074
20075 echo "$as_me:20075: result: $cf_cv_unsigned_literals" >&5
20076 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20077
20078 cf_cv_1UL="1"
20079 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20080 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20081
20082 if test $NCURSES_MMASK_T = auto ; then
20083         cf_cv_typeof_mmask_t=long
20084 else
20085         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20086 fi
20087 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20088
20089 ###     Checks for external-data
20090
20091 echo "$as_me:20091: checking if external errno is declared" >&5
20092 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20093 if test "${cf_cv_dcl_errno+set}" = set; then
20094   echo $ECHO_N "(cached) $ECHO_C" >&6
20095 else
20096
20097         cat >conftest.$ac_ext <<_ACEOF
20098 #line 20098 "configure"
20099 #include "confdefs.h"
20100
20101 #ifdef HAVE_STDLIB_H
20102 #include <stdlib.h>
20103 #endif
20104 #include <stdio.h>
20105 #include <sys/types.h>
20106 #include <errno.h>
20107 int
20108 main (void)
20109 {
20110 int x = (int) errno; (void)x
20111   ;
20112   return 0;
20113 }
20114 _ACEOF
20115 rm -f conftest.$ac_objext
20116 if { (eval echo "$as_me:20116: \"$ac_compile\"") >&5
20117   (eval $ac_compile) 2>&5
20118   ac_status=$?
20119   echo "$as_me:20119: \$? = $ac_status" >&5
20120   (exit $ac_status); } &&
20121          { ac_try='test -s conftest.$ac_objext'
20122   { (eval echo "$as_me:20122: \"$ac_try\"") >&5
20123   (eval $ac_try) 2>&5
20124   ac_status=$?
20125   echo "$as_me:20125: \$? = $ac_status" >&5
20126   (exit $ac_status); }; }; then
20127   cf_cv_dcl_errno=yes
20128 else
20129   echo "$as_me: failed program was:" >&5
20130 cat conftest.$ac_ext >&5
20131 cf_cv_dcl_errno=no
20132 fi
20133 rm -f conftest.$ac_objext conftest.$ac_ext
20134
20135 fi
20136 echo "$as_me:20136: result: $cf_cv_dcl_errno" >&5
20137 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20138
20139 if test "$cf_cv_dcl_errno" = no ; then
20140
20141 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20142
20143         cat >>confdefs.h <<EOF
20144 #define $cf_result 1
20145 EOF
20146
20147 fi
20148
20149 # It's possible (for near-UNIX clones) that the data doesn't exist
20150
20151 echo "$as_me:20151: checking if external errno exists" >&5
20152 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20153 if test "${cf_cv_have_errno+set}" = set; then
20154   echo $ECHO_N "(cached) $ECHO_C" >&6
20155 else
20156
20157         cat >conftest.$ac_ext <<_ACEOF
20158 #line 20158 "configure"
20159 #include "confdefs.h"
20160
20161 #undef errno
20162 extern int errno;
20163
20164 int
20165 main (void)
20166 {
20167 errno = 2
20168   ;
20169   return 0;
20170 }
20171 _ACEOF
20172 rm -f conftest.$ac_objext conftest$ac_exeext
20173 if { (eval echo "$as_me:20173: \"$ac_link\"") >&5
20174   (eval $ac_link) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit $ac_status); } &&
20178          { ac_try='test -s conftest$ac_exeext'
20179   { (eval echo "$as_me:20179: \"$ac_try\"") >&5
20180   (eval $ac_try) 2>&5
20181   ac_status=$?
20182   echo "$as_me:20182: \$? = $ac_status" >&5
20183   (exit $ac_status); }; }; then
20184   cf_cv_have_errno=yes
20185 else
20186   echo "$as_me: failed program was:" >&5
20187 cat conftest.$ac_ext >&5
20188 cf_cv_have_errno=no
20189 fi
20190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20191
20192 fi
20193 echo "$as_me:20193: result: $cf_cv_have_errno" >&5
20194 echo "${ECHO_T}$cf_cv_have_errno" >&6
20195
20196 if test "$cf_cv_have_errno" = yes ; then
20197
20198 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20199
20200         cat >>confdefs.h <<EOF
20201 #define $cf_result 1
20202 EOF
20203
20204 fi
20205
20206 echo "$as_me:20206: checking if data-only library module links" >&5
20207 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20208 if test "${cf_cv_link_dataonly+set}" = set; then
20209   echo $ECHO_N "(cached) $ECHO_C" >&6
20210 else
20211
20212         rm -f conftest.a
20213         cat >conftest.$ac_ext <<EOF
20214 #line 20214 "configure"
20215 int     testdata[3] = { 123, 456, 789 };
20216 EOF
20217         if { (eval echo "$as_me:20217: \"$ac_compile\"") >&5
20218   (eval $ac_compile) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit $ac_status); } ; then
20222                 mv conftest.o data.o && \
20223                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20224         fi
20225         rm -f conftest.$ac_ext data.o
20226         cat >conftest.$ac_ext <<EOF
20227 #line 20227 "configure"
20228 int     testfunc(void)
20229 {
20230 #if defined(NeXT)
20231         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20232 #else
20233         extern int testdata[3];
20234         return testdata[0] == 123
20235            &&  testdata[1] == 456
20236            &&  testdata[2] == 789;
20237 #endif
20238 }
20239 EOF
20240         if { (eval echo "$as_me:20240: \"$ac_compile\"") >&5
20241   (eval $ac_compile) 2>&5
20242   ac_status=$?
20243   echo "$as_me:20243: \$? = $ac_status" >&5
20244   (exit $ac_status); }; then
20245                 mv conftest.o func.o && \
20246                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20247         fi
20248         rm -f conftest.$ac_ext func.o
20249         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20250         cf_saveLIBS="$LIBS"
20251         LIBS="conftest.a $LIBS"
20252         if test "$cross_compiling" = yes; then
20253   cf_cv_link_dataonly=unknown
20254 else
20255   cat >conftest.$ac_ext <<_ACEOF
20256 #line 20256 "configure"
20257 #include "confdefs.h"
20258
20259         int main(void)
20260         {
20261                 extern int testfunc();
20262                 ${cf_cv_main_return:-return} (!testfunc());
20263         }
20264
20265 _ACEOF
20266 rm -f conftest$ac_exeext
20267 if { (eval echo "$as_me:20267: \"$ac_link\"") >&5
20268   (eval $ac_link) 2>&5
20269   ac_status=$?
20270   echo "$as_me:20270: \$? = $ac_status" >&5
20271   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20272   { (eval echo "$as_me:20272: \"$ac_try\"") >&5
20273   (eval $ac_try) 2>&5
20274   ac_status=$?
20275   echo "$as_me:20275: \$? = $ac_status" >&5
20276   (exit $ac_status); }; }; then
20277   cf_cv_link_dataonly=yes
20278 else
20279   echo "$as_me: program exited with status $ac_status" >&5
20280 echo "$as_me: failed program was:" >&5
20281 cat conftest.$ac_ext >&5
20282 cf_cv_link_dataonly=no
20283 fi
20284 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20285 fi
20286         LIBS="$cf_saveLIBS"
20287
20288 fi
20289
20290 echo "$as_me:20290: result: $cf_cv_link_dataonly" >&5
20291 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20292
20293 if test "$cf_cv_link_dataonly" = no ; then
20294
20295 cat >>confdefs.h <<\EOF
20296 #define BROKEN_LINKER 1
20297 EOF
20298
20299         BROKEN_LINKER=1
20300 fi
20301
20302 ###     Checks for library functions.
20303
20304 for ac_func in \
20305 getcwd \
20306 getegid \
20307 geteuid \
20308 getopt \
20309 getttynam \
20310 issetugid \
20311 localeconv \
20312 poll \
20313 putenv \
20314 remove \
20315 select \
20316 setbuf \
20317 setbuffer \
20318 setenv \
20319 setvbuf \
20320 sigaction \
20321 sigvec \
20322 snprintf \
20323 strdup \
20324 strstr \
20325 sysconf \
20326 tcgetpgrp \
20327 times \
20328 tsearch \
20329 vsnprintf \
20330
20331 do
20332 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20333 echo "$as_me:20333: checking for $ac_func" >&5
20334 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20335 if eval "test \"\${$as_ac_var+set}\" = set"; then
20336   echo $ECHO_N "(cached) $ECHO_C" >&6
20337 else
20338   cat >conftest.$ac_ext <<_ACEOF
20339 #line 20339 "configure"
20340 #include "confdefs.h"
20341 #define $ac_func autoconf_temporary
20342 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20343 #undef $ac_func
20344
20345 #ifdef __cplusplus
20346 extern "C"
20347 #endif
20348
20349 /* We use char because int might match the return type of a gcc2
20350    builtin and then its argument prototype would still apply.  */
20351 char $ac_func (void);
20352
20353 int
20354 main (void)
20355 {
20356
20357 /* The GNU C library defines stubs for functions which it implements
20358     to always fail with ENOSYS.  Some functions are actually named
20359     something starting with __ and the normal name is an alias.  */
20360 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20361 #error found stub for $ac_func
20362 #endif
20363
20364         return $ac_func ();
20365   ;
20366   return 0;
20367 }
20368 _ACEOF
20369 rm -f conftest.$ac_objext conftest$ac_exeext
20370 if { (eval echo "$as_me:20370: \"$ac_link\"") >&5
20371   (eval $ac_link) 2>&5
20372   ac_status=$?
20373   echo "$as_me:20373: \$? = $ac_status" >&5
20374   (exit $ac_status); } &&
20375          { ac_try='test -s conftest$ac_exeext'
20376   { (eval echo "$as_me:20376: \"$ac_try\"") >&5
20377   (eval $ac_try) 2>&5
20378   ac_status=$?
20379   echo "$as_me:20379: \$? = $ac_status" >&5
20380   (exit $ac_status); }; }; then
20381   eval "$as_ac_var=yes"
20382 else
20383   echo "$as_me: failed program was:" >&5
20384 cat conftest.$ac_ext >&5
20385 eval "$as_ac_var=no"
20386 fi
20387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20388 fi
20389 echo "$as_me:20389: result: `eval echo '${'$as_ac_var'}'`" >&5
20390 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20391 if test `eval echo '${'$as_ac_var'}'` = yes; then
20392   cat >>confdefs.h <<EOF
20393 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20394 EOF
20395
20396 fi
20397 done
20398
20399 if test "x$ac_cv_func_getopt" = xno && \
20400    test "x$cf_with_progs$cf_with_tests" != xnono; then
20401         { { echo "$as_me:20401: error: getopt is required for building programs" >&5
20402 echo "$as_me: error: getopt is required for building programs" >&2;}
20403    { (exit 1); exit 1; }; }
20404 fi
20405
20406 if test "x$with_safe_sprintf" = xyes
20407 then
20408         if test "x$ac_cv_func_vsnprintf" = xyes
20409         then
20410                 { echo "$as_me:20410: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20411 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20412         else
20413
20414 cat >>confdefs.h <<\EOF
20415 #define USE_SAFE_SPRINTF 1
20416 EOF
20417
20418         fi
20419 fi
20420
20421 if test "x$with_getcap" = "xyes" ; then
20422
20423 echo "$as_me:20423: checking for terminal-capability database functions" >&5
20424 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20425 if test "${cf_cv_cgetent+set}" = set; then
20426   echo $ECHO_N "(cached) $ECHO_C" >&6
20427 else
20428
20429 cat >conftest.$ac_ext <<_ACEOF
20430 #line 20430 "configure"
20431 #include "confdefs.h"
20432
20433 #include <stdlib.h>
20434 int
20435 main (void)
20436 {
20437
20438         char temp[128];
20439         char *buf = temp;
20440         char *db_array = temp;
20441         cgetent(&buf, &db_array, "vt100");
20442         cgetcap(buf, "tc", '=');
20443         cgetmatch(buf, "tc");
20444
20445   ;
20446   return 0;
20447 }
20448 _ACEOF
20449 rm -f conftest.$ac_objext conftest$ac_exeext
20450 if { (eval echo "$as_me:20450: \"$ac_link\"") >&5
20451   (eval $ac_link) 2>&5
20452   ac_status=$?
20453   echo "$as_me:20453: \$? = $ac_status" >&5
20454   (exit $ac_status); } &&
20455          { ac_try='test -s conftest$ac_exeext'
20456   { (eval echo "$as_me:20456: \"$ac_try\"") >&5
20457   (eval $ac_try) 2>&5
20458   ac_status=$?
20459   echo "$as_me:20459: \$? = $ac_status" >&5
20460   (exit $ac_status); }; }; then
20461   cf_cv_cgetent=yes
20462 else
20463   echo "$as_me: failed program was:" >&5
20464 cat conftest.$ac_ext >&5
20465 cf_cv_cgetent=no
20466 fi
20467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20468
20469 fi
20470 echo "$as_me:20470: result: $cf_cv_cgetent" >&5
20471 echo "${ECHO_T}$cf_cv_cgetent" >&6
20472
20473 if test "$cf_cv_cgetent" = yes
20474 then
20475
20476 cat >>confdefs.h <<\EOF
20477 #define HAVE_BSD_CGETENT 1
20478 EOF
20479
20480 echo "$as_me:20480: checking if cgetent uses const parameter" >&5
20481 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20482 if test "${cf_cv_cgetent_const+set}" = set; then
20483   echo $ECHO_N "(cached) $ECHO_C" >&6
20484 else
20485
20486 cat >conftest.$ac_ext <<_ACEOF
20487 #line 20487 "configure"
20488 #include "confdefs.h"
20489
20490 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20491 #include <stdlib.h>
20492 int
20493 main (void)
20494 {
20495
20496         char temp[128];
20497         char *buf = temp;
20498 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20499         const char *db_array = temp;
20500         cgetent(&buf, &db_array, "vt100");
20501 #endif
20502         cgetcap(buf, "tc", '=');
20503         cgetmatch(buf, "tc");
20504
20505   ;
20506   return 0;
20507 }
20508 _ACEOF
20509 rm -f conftest.$ac_objext conftest$ac_exeext
20510 if { (eval echo "$as_me:20510: \"$ac_link\"") >&5
20511   (eval $ac_link) 2>&5
20512   ac_status=$?
20513   echo "$as_me:20513: \$? = $ac_status" >&5
20514   (exit $ac_status); } &&
20515          { ac_try='test -s conftest$ac_exeext'
20516   { (eval echo "$as_me:20516: \"$ac_try\"") >&5
20517   (eval $ac_try) 2>&5
20518   ac_status=$?
20519   echo "$as_me:20519: \$? = $ac_status" >&5
20520   (exit $ac_status); }; }; then
20521   cf_cv_cgetent_const=yes
20522 else
20523   echo "$as_me: failed program was:" >&5
20524 cat conftest.$ac_ext >&5
20525 cf_cv_cgetent_const=no
20526 fi
20527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20528
20529 fi
20530 echo "$as_me:20530: result: $cf_cv_cgetent_const" >&5
20531 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20532         if test "$cf_cv_cgetent_const" = yes
20533         then
20534
20535 cat >>confdefs.h <<EOF
20536 #define CGETENT_CONST const
20537 EOF
20538
20539         fi
20540 fi
20541
20542 fi
20543
20544 echo "$as_me:20544: checking for isascii" >&5
20545 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20546 if test "${cf_cv_have_isascii+set}" = set; then
20547   echo $ECHO_N "(cached) $ECHO_C" >&6
20548 else
20549
20550         cat >conftest.$ac_ext <<_ACEOF
20551 #line 20551 "configure"
20552 #include "confdefs.h"
20553 #include <ctype.h>
20554 int
20555 main (void)
20556 {
20557 int x = isascii(' ')
20558   ;
20559   return 0;
20560 }
20561 _ACEOF
20562 rm -f conftest.$ac_objext conftest$ac_exeext
20563 if { (eval echo "$as_me:20563: \"$ac_link\"") >&5
20564   (eval $ac_link) 2>&5
20565   ac_status=$?
20566   echo "$as_me:20566: \$? = $ac_status" >&5
20567   (exit $ac_status); } &&
20568          { ac_try='test -s conftest$ac_exeext'
20569   { (eval echo "$as_me:20569: \"$ac_try\"") >&5
20570   (eval $ac_try) 2>&5
20571   ac_status=$?
20572   echo "$as_me:20572: \$? = $ac_status" >&5
20573   (exit $ac_status); }; }; then
20574   cf_cv_have_isascii=yes
20575 else
20576   echo "$as_me: failed program was:" >&5
20577 cat conftest.$ac_ext >&5
20578 cf_cv_have_isascii=no
20579 fi
20580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20581
20582 fi
20583 echo "$as_me:20583: result: $cf_cv_have_isascii" >&5
20584 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20585 test "$cf_cv_have_isascii" = yes &&
20586 cat >>confdefs.h <<\EOF
20587 #define HAVE_ISASCII 1
20588 EOF
20589
20590 if test "$ac_cv_func_sigaction" = yes; then
20591 echo "$as_me:20591: checking whether sigaction needs _POSIX_SOURCE" >&5
20592 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20593 cat >conftest.$ac_ext <<_ACEOF
20594 #line 20594 "configure"
20595 #include "confdefs.h"
20596
20597 #include <sys/types.h>
20598 #include <signal.h>
20599 int
20600 main (void)
20601 {
20602 struct sigaction act
20603   ;
20604   return 0;
20605 }
20606 _ACEOF
20607 rm -f conftest.$ac_objext
20608 if { (eval echo "$as_me:20608: \"$ac_compile\"") >&5
20609   (eval $ac_compile) 2>&5
20610   ac_status=$?
20611   echo "$as_me:20611: \$? = $ac_status" >&5
20612   (exit $ac_status); } &&
20613          { ac_try='test -s conftest.$ac_objext'
20614   { (eval echo "$as_me:20614: \"$ac_try\"") >&5
20615   (eval $ac_try) 2>&5
20616   ac_status=$?
20617   echo "$as_me:20617: \$? = $ac_status" >&5
20618   (exit $ac_status); }; }; then
20619   sigact_bad=no
20620 else
20621   echo "$as_me: failed program was:" >&5
20622 cat conftest.$ac_ext >&5
20623
20624 cat >conftest.$ac_ext <<_ACEOF
20625 #line 20625 "configure"
20626 #include "confdefs.h"
20627
20628 #define _POSIX_SOURCE
20629 #include <sys/types.h>
20630 #include <signal.h>
20631 int
20632 main (void)
20633 {
20634 struct sigaction act
20635   ;
20636   return 0;
20637 }
20638 _ACEOF
20639 rm -f conftest.$ac_objext
20640 if { (eval echo "$as_me:20640: \"$ac_compile\"") >&5
20641   (eval $ac_compile) 2>&5
20642   ac_status=$?
20643   echo "$as_me:20643: \$? = $ac_status" >&5
20644   (exit $ac_status); } &&
20645          { ac_try='test -s conftest.$ac_objext'
20646   { (eval echo "$as_me:20646: \"$ac_try\"") >&5
20647   (eval $ac_try) 2>&5
20648   ac_status=$?
20649   echo "$as_me:20649: \$? = $ac_status" >&5
20650   (exit $ac_status); }; }; then
20651   sigact_bad=yes
20652
20653 cat >>confdefs.h <<\EOF
20654 #define _POSIX_SOURCE 1
20655 EOF
20656
20657 else
20658   echo "$as_me: failed program was:" >&5
20659 cat conftest.$ac_ext >&5
20660 sigact_bad=unknown
20661 fi
20662 rm -f conftest.$ac_objext conftest.$ac_ext
20663 fi
20664 rm -f conftest.$ac_objext conftest.$ac_ext
20665 echo "$as_me:20665: result: $sigact_bad" >&5
20666 echo "${ECHO_T}$sigact_bad" >&6
20667 fi
20668
20669 echo "$as_me:20669: checking if nanosleep really works" >&5
20670 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20671 if test "${cf_cv_func_nanosleep+set}" = set; then
20672   echo $ECHO_N "(cached) $ECHO_C" >&6
20673 else
20674
20675 if test "$cross_compiling" = yes; then
20676   cf_cv_func_nanosleep=unknown
20677 else
20678   cat >conftest.$ac_ext <<_ACEOF
20679 #line 20679 "configure"
20680 #include "confdefs.h"
20681
20682 #include <stdio.h>
20683 #include <errno.h>
20684 #include <time.h>
20685
20686 #ifdef HAVE_SYS_TIME_H
20687 #include <sys/time.h>
20688 #endif
20689
20690 int main(void) {
20691         struct timespec ts1, ts2;
20692         int code;
20693         ts1.tv_sec  = 0;
20694         ts1.tv_nsec = 750000000;
20695         ts2.tv_sec  = 0;
20696         ts2.tv_nsec = 0;
20697         errno = 0;
20698         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20699         ${cf_cv_main_return:-return}(code != 0);
20700 }
20701
20702 _ACEOF
20703 rm -f conftest$ac_exeext
20704 if { (eval echo "$as_me:20704: \"$ac_link\"") >&5
20705   (eval $ac_link) 2>&5
20706   ac_status=$?
20707   echo "$as_me:20707: \$? = $ac_status" >&5
20708   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20709   { (eval echo "$as_me:20709: \"$ac_try\"") >&5
20710   (eval $ac_try) 2>&5
20711   ac_status=$?
20712   echo "$as_me:20712: \$? = $ac_status" >&5
20713   (exit $ac_status); }; }; then
20714   cf_cv_func_nanosleep=yes
20715 else
20716   echo "$as_me: program exited with status $ac_status" >&5
20717 echo "$as_me: failed program was:" >&5
20718 cat conftest.$ac_ext >&5
20719 cf_cv_func_nanosleep=no
20720 fi
20721 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20722 fi
20723 fi
20724 echo "$as_me:20724: result: $cf_cv_func_nanosleep" >&5
20725 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20726
20727 test "$cf_cv_func_nanosleep" = "yes" &&
20728 cat >>confdefs.h <<\EOF
20729 #define HAVE_NANOSLEEP 1
20730 EOF
20731
20732 for ac_header in \
20733 termio.h \
20734 termios.h \
20735 unistd.h \
20736 sys/ioctl.h \
20737 sys/termio.h \
20738
20739 do
20740 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20741 echo "$as_me:20741: checking for $ac_header" >&5
20742 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20743 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20744   echo $ECHO_N "(cached) $ECHO_C" >&6
20745 else
20746   cat >conftest.$ac_ext <<_ACEOF
20747 #line 20747 "configure"
20748 #include "confdefs.h"
20749 #include <$ac_header>
20750 _ACEOF
20751 if { (eval echo "$as_me:20751: \"$ac_cpp conftest.$ac_ext\"") >&5
20752   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20753   ac_status=$?
20754   egrep -v '^ *\+' conftest.er1 >conftest.err
20755   rm -f conftest.er1
20756   cat conftest.err >&5
20757   echo "$as_me:20757: \$? = $ac_status" >&5
20758   (exit $ac_status); } >/dev/null; then
20759   if test -s conftest.err; then
20760     ac_cpp_err=$ac_c_preproc_warn_flag
20761   else
20762     ac_cpp_err=
20763   fi
20764 else
20765   ac_cpp_err=yes
20766 fi
20767 if test -z "$ac_cpp_err"; then
20768   eval "$as_ac_Header=yes"
20769 else
20770   echo "$as_me: failed program was:" >&5
20771   cat conftest.$ac_ext >&5
20772   eval "$as_ac_Header=no"
20773 fi
20774 rm -f conftest.err conftest.$ac_ext
20775 fi
20776 echo "$as_me:20776: result: `eval echo '${'$as_ac_Header'}'`" >&5
20777 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20778 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20779   cat >>confdefs.h <<EOF
20780 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20781 EOF
20782
20783 fi
20784 done
20785
20786 if test "$ac_cv_header_termios_h" = yes ; then
20787         case "$CFLAGS $CPPFLAGS" in
20788         (*-D_POSIX_SOURCE*)
20789                 termios_bad=dunno ;;
20790         (*)     termios_bad=maybe ;;
20791         esac
20792         if test "$termios_bad" = maybe ; then
20793         echo "$as_me:20793: checking whether termios.h needs _POSIX_SOURCE" >&5
20794 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20795         cat >conftest.$ac_ext <<_ACEOF
20796 #line 20796 "configure"
20797 #include "confdefs.h"
20798 #include <termios.h>
20799 int
20800 main (void)
20801 {
20802 struct termios foo; int x = foo.c_iflag = 1; (void)x
20803   ;
20804   return 0;
20805 }
20806 _ACEOF
20807 rm -f conftest.$ac_objext
20808 if { (eval echo "$as_me:20808: \"$ac_compile\"") >&5
20809   (eval $ac_compile) 2>&5
20810   ac_status=$?
20811   echo "$as_me:20811: \$? = $ac_status" >&5
20812   (exit $ac_status); } &&
20813          { ac_try='test -s conftest.$ac_objext'
20814   { (eval echo "$as_me:20814: \"$ac_try\"") >&5
20815   (eval $ac_try) 2>&5
20816   ac_status=$?
20817   echo "$as_me:20817: \$? = $ac_status" >&5
20818   (exit $ac_status); }; }; then
20819   termios_bad=no
20820 else
20821   echo "$as_me: failed program was:" >&5
20822 cat conftest.$ac_ext >&5
20823
20824                 cat >conftest.$ac_ext <<_ACEOF
20825 #line 20825 "configure"
20826 #include "confdefs.h"
20827
20828 #define _POSIX_SOURCE
20829 #include <termios.h>
20830 int
20831 main (void)
20832 {
20833 struct termios foo; int x = foo.c_iflag = 2; (void)x
20834   ;
20835   return 0;
20836 }
20837 _ACEOF
20838 rm -f conftest.$ac_objext
20839 if { (eval echo "$as_me:20839: \"$ac_compile\"") >&5
20840   (eval $ac_compile) 2>&5
20841   ac_status=$?
20842   echo "$as_me:20842: \$? = $ac_status" >&5
20843   (exit $ac_status); } &&
20844          { ac_try='test -s conftest.$ac_objext'
20845   { (eval echo "$as_me:20845: \"$ac_try\"") >&5
20846   (eval $ac_try) 2>&5
20847   ac_status=$?
20848   echo "$as_me:20848: \$? = $ac_status" >&5
20849   (exit $ac_status); }; }; then
20850   termios_bad=unknown
20851 else
20852   echo "$as_me: failed program was:" >&5
20853 cat conftest.$ac_ext >&5
20854 termios_bad=yes
20855 cat >>confdefs.h <<\EOF
20856 #define _POSIX_SOURCE 1
20857 EOF
20858
20859 fi
20860 rm -f conftest.$ac_objext conftest.$ac_ext
20861
20862 fi
20863 rm -f conftest.$ac_objext conftest.$ac_ext
20864         echo "$as_me:20864: result: $termios_bad" >&5
20865 echo "${ECHO_T}$termios_bad" >&6
20866         fi
20867 fi
20868
20869 echo "$as_me:20869: checking for tcgetattr" >&5
20870 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20871 if test "${cf_cv_have_tcgetattr+set}" = set; then
20872   echo $ECHO_N "(cached) $ECHO_C" >&6
20873 else
20874
20875 cat >conftest.$ac_ext <<_ACEOF
20876 #line 20876 "configure"
20877 #include "confdefs.h"
20878
20879 #include <sys/types.h>
20880 #ifdef HAVE_UNISTD_H
20881 #include <unistd.h>
20882 #endif
20883 #ifdef HAVE_TERMIOS_H
20884 #include <termios.h>
20885 #define TTY struct termios
20886 #else
20887 #ifdef HAVE_TERMIO_H
20888 #include <termio.h>
20889 #define TTY struct termio
20890 #endif
20891 #endif
20892
20893 int
20894 main (void)
20895 {
20896
20897 TTY foo;
20898 tcgetattr(1, &foo);
20899   ;
20900   return 0;
20901 }
20902 _ACEOF
20903 rm -f conftest.$ac_objext conftest$ac_exeext
20904 if { (eval echo "$as_me:20904: \"$ac_link\"") >&5
20905   (eval $ac_link) 2>&5
20906   ac_status=$?
20907   echo "$as_me:20907: \$? = $ac_status" >&5
20908   (exit $ac_status); } &&
20909          { ac_try='test -s conftest$ac_exeext'
20910   { (eval echo "$as_me:20910: \"$ac_try\"") >&5
20911   (eval $ac_try) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); }; }; then
20915   cf_cv_have_tcgetattr=yes
20916 else
20917   echo "$as_me: failed program was:" >&5
20918 cat conftest.$ac_ext >&5
20919 cf_cv_have_tcgetattr=no
20920 fi
20921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20922 fi
20923 echo "$as_me:20923: result: $cf_cv_have_tcgetattr" >&5
20924 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20925 test "$cf_cv_have_tcgetattr" = yes &&
20926 cat >>confdefs.h <<\EOF
20927 #define HAVE_TCGETATTR 1
20928 EOF
20929
20930 echo "$as_me:20930: checking for vsscanf function or workaround" >&5
20931 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20932 if test "${cf_cv_func_vsscanf+set}" = set; then
20933   echo $ECHO_N "(cached) $ECHO_C" >&6
20934 else
20935
20936 cat >conftest.$ac_ext <<_ACEOF
20937 #line 20937 "configure"
20938 #include "confdefs.h"
20939
20940 #include <stdarg.h>
20941 #include <stdio.h>
20942 int
20943 main (void)
20944 {
20945
20946         va_list ap;
20947         vsscanf("from", "%d", ap)
20948   ;
20949   return 0;
20950 }
20951 _ACEOF
20952 rm -f conftest.$ac_objext conftest$ac_exeext
20953 if { (eval echo "$as_me:20953: \"$ac_link\"") >&5
20954   (eval $ac_link) 2>&5
20955   ac_status=$?
20956   echo "$as_me:20956: \$? = $ac_status" >&5
20957   (exit $ac_status); } &&
20958          { ac_try='test -s conftest$ac_exeext'
20959   { (eval echo "$as_me:20959: \"$ac_try\"") >&5
20960   (eval $ac_try) 2>&5
20961   ac_status=$?
20962   echo "$as_me:20962: \$? = $ac_status" >&5
20963   (exit $ac_status); }; }; then
20964   cf_cv_func_vsscanf=vsscanf
20965 else
20966   echo "$as_me: failed program was:" >&5
20967 cat conftest.$ac_ext >&5
20968
20969 cat >conftest.$ac_ext <<_ACEOF
20970 #line 20970 "configure"
20971 #include "confdefs.h"
20972
20973 #include <stdarg.h>
20974 #include <stdio.h>
20975 int
20976 main (void)
20977 {
20978
20979         FILE strbuf;
20980         char *str = "from";
20981
20982         strbuf._flag = _IOREAD;
20983         strbuf._ptr = strbuf._base = (unsigned char *) str;
20984         strbuf._cnt = strlen(str);
20985         strbuf._file = _NFILE;
20986         return (vfscanf(&strbuf, "%d", ap))
20987   ;
20988   return 0;
20989 }
20990 _ACEOF
20991 rm -f conftest.$ac_objext conftest$ac_exeext
20992 if { (eval echo "$as_me:20992: \"$ac_link\"") >&5
20993   (eval $ac_link) 2>&5
20994   ac_status=$?
20995   echo "$as_me:20995: \$? = $ac_status" >&5
20996   (exit $ac_status); } &&
20997          { ac_try='test -s conftest$ac_exeext'
20998   { (eval echo "$as_me:20998: \"$ac_try\"") >&5
20999   (eval $ac_try) 2>&5
21000   ac_status=$?
21001   echo "$as_me:21001: \$? = $ac_status" >&5
21002   (exit $ac_status); }; }; then
21003   cf_cv_func_vsscanf=vfscanf
21004 else
21005   echo "$as_me: failed program was:" >&5
21006 cat conftest.$ac_ext >&5
21007
21008 cat >conftest.$ac_ext <<_ACEOF
21009 #line 21009 "configure"
21010 #include "confdefs.h"
21011
21012 #include <stdarg.h>
21013 #include <stdio.h>
21014 int
21015 main (void)
21016 {
21017
21018         FILE strbuf;
21019         char *str = "from";
21020
21021         strbuf._flag = _IOREAD;
21022         strbuf._ptr = strbuf._base = (unsigned char *) str;
21023         strbuf._cnt = strlen(str);
21024         strbuf._file = _NFILE;
21025         return (_doscan(&strbuf, "%d", ap))
21026   ;
21027   return 0;
21028 }
21029 _ACEOF
21030 rm -f conftest.$ac_objext conftest$ac_exeext
21031 if { (eval echo "$as_me:21031: \"$ac_link\"") >&5
21032   (eval $ac_link) 2>&5
21033   ac_status=$?
21034   echo "$as_me:21034: \$? = $ac_status" >&5
21035   (exit $ac_status); } &&
21036          { ac_try='test -s conftest$ac_exeext'
21037   { (eval echo "$as_me:21037: \"$ac_try\"") >&5
21038   (eval $ac_try) 2>&5
21039   ac_status=$?
21040   echo "$as_me:21040: \$? = $ac_status" >&5
21041   (exit $ac_status); }; }; then
21042   cf_cv_func_vsscanf=_doscan
21043 else
21044   echo "$as_me: failed program was:" >&5
21045 cat conftest.$ac_ext >&5
21046
21047 cf_cv_func_vsscanf=no
21048 fi
21049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21050 fi
21051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21052 fi
21053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21054 fi
21055 echo "$as_me:21055: result: $cf_cv_func_vsscanf" >&5
21056 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21057
21058 case $cf_cv_func_vsscanf in
21059 (vsscanf)
21060 cat >>confdefs.h <<\EOF
21061 #define HAVE_VSSCANF 1
21062 EOF
21063 ;;
21064 (vfscanf)
21065 cat >>confdefs.h <<\EOF
21066 #define HAVE_VFSCANF 1
21067 EOF
21068 ;;
21069 (_doscan)
21070 cat >>confdefs.h <<\EOF
21071 #define HAVE__DOSCAN 1
21072 EOF
21073 ;;
21074 esac
21075
21076 for ac_header in \
21077 unistd.h \
21078
21079 do
21080 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21081 echo "$as_me:21081: checking for $ac_header" >&5
21082 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21083 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21084   echo $ECHO_N "(cached) $ECHO_C" >&6
21085 else
21086   cat >conftest.$ac_ext <<_ACEOF
21087 #line 21087 "configure"
21088 #include "confdefs.h"
21089 #include <$ac_header>
21090 _ACEOF
21091 if { (eval echo "$as_me:21091: \"$ac_cpp conftest.$ac_ext\"") >&5
21092   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21093   ac_status=$?
21094   egrep -v '^ *\+' conftest.er1 >conftest.err
21095   rm -f conftest.er1
21096   cat conftest.err >&5
21097   echo "$as_me:21097: \$? = $ac_status" >&5
21098   (exit $ac_status); } >/dev/null; then
21099   if test -s conftest.err; then
21100     ac_cpp_err=$ac_c_preproc_warn_flag
21101   else
21102     ac_cpp_err=
21103   fi
21104 else
21105   ac_cpp_err=yes
21106 fi
21107 if test -z "$ac_cpp_err"; then
21108   eval "$as_ac_Header=yes"
21109 else
21110   echo "$as_me: failed program was:" >&5
21111   cat conftest.$ac_ext >&5
21112   eval "$as_ac_Header=no"
21113 fi
21114 rm -f conftest.err conftest.$ac_ext
21115 fi
21116 echo "$as_me:21116: result: `eval echo '${'$as_ac_Header'}'`" >&5
21117 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21118 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21119   cat >>confdefs.h <<EOF
21120 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21121 EOF
21122
21123 fi
21124 done
21125
21126 echo "$as_me:21126: checking for working mkstemp" >&5
21127 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21128 if test "${cf_cv_func_mkstemp+set}" = set; then
21129   echo $ECHO_N "(cached) $ECHO_C" >&6
21130 else
21131
21132 rm -rf conftest*
21133 if test "$cross_compiling" = yes; then
21134   cf_cv_func_mkstemp=maybe
21135 else
21136   cat >conftest.$ac_ext <<_ACEOF
21137 #line 21137 "configure"
21138 #include "confdefs.h"
21139
21140 #include <sys/types.h>
21141 #ifdef HAVE_UNISTD_H
21142 #include <unistd.h>
21143 #endif
21144 #include <stdlib.h>
21145 #include <stdio.h>
21146 #include <string.h>
21147 #include <sys/stat.h>
21148 int main(void)
21149 {
21150         char *tmpl = "conftestXXXXXX";
21151         char name[2][80];
21152         int n;
21153         int result = 0;
21154         int fd;
21155         struct stat sb;
21156
21157         umask(077);
21158         for (n = 0; n < 2; ++n) {
21159                 strcpy(name[n], tmpl);
21160                 if ((fd = mkstemp(name[n])) >= 0) {
21161                         if (!strcmp(name[n], tmpl)
21162                          || stat(name[n], &sb) != 0
21163                          || (sb.st_mode & S_IFMT) != S_IFREG
21164                          || (sb.st_mode & 077) != 0) {
21165                                 result = 1;
21166                         }
21167                         close(fd);
21168                 }
21169         }
21170         if (result == 0
21171          && !strcmp(name[0], name[1]))
21172                 result = 1;
21173         ${cf_cv_main_return:-return}(result);
21174 }
21175
21176 _ACEOF
21177 rm -f conftest$ac_exeext
21178 if { (eval echo "$as_me:21178: \"$ac_link\"") >&5
21179   (eval $ac_link) 2>&5
21180   ac_status=$?
21181   echo "$as_me:21181: \$? = $ac_status" >&5
21182   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21183   { (eval echo "$as_me:21183: \"$ac_try\"") >&5
21184   (eval $ac_try) 2>&5
21185   ac_status=$?
21186   echo "$as_me:21186: \$? = $ac_status" >&5
21187   (exit $ac_status); }; }; then
21188   cf_cv_func_mkstemp=yes
21189
21190 else
21191   echo "$as_me: program exited with status $ac_status" >&5
21192 echo "$as_me: failed program was:" >&5
21193 cat conftest.$ac_ext >&5
21194 cf_cv_func_mkstemp=no
21195
21196 fi
21197 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21198 fi
21199
21200 fi
21201 echo "$as_me:21201: result: $cf_cv_func_mkstemp" >&5
21202 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21203 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21204         echo "$as_me:21204: checking for mkstemp" >&5
21205 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21206 if test "${ac_cv_func_mkstemp+set}" = set; then
21207   echo $ECHO_N "(cached) $ECHO_C" >&6
21208 else
21209   cat >conftest.$ac_ext <<_ACEOF
21210 #line 21210 "configure"
21211 #include "confdefs.h"
21212 #define mkstemp autoconf_temporary
21213 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21214 #undef mkstemp
21215
21216 #ifdef __cplusplus
21217 extern "C"
21218 #endif
21219
21220 /* We use char because int might match the return type of a gcc2
21221    builtin and then its argument prototype would still apply.  */
21222 char mkstemp (void);
21223
21224 int
21225 main (void)
21226 {
21227
21228 /* The GNU C library defines stubs for functions which it implements
21229     to always fail with ENOSYS.  Some functions are actually named
21230     something starting with __ and the normal name is an alias.  */
21231 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21232 #error found stub for mkstemp
21233 #endif
21234
21235         return mkstemp ();
21236   ;
21237   return 0;
21238 }
21239 _ACEOF
21240 rm -f conftest.$ac_objext conftest$ac_exeext
21241 if { (eval echo "$as_me:21241: \"$ac_link\"") >&5
21242   (eval $ac_link) 2>&5
21243   ac_status=$?
21244   echo "$as_me:21244: \$? = $ac_status" >&5
21245   (exit $ac_status); } &&
21246          { ac_try='test -s conftest$ac_exeext'
21247   { (eval echo "$as_me:21247: \"$ac_try\"") >&5
21248   (eval $ac_try) 2>&5
21249   ac_status=$?
21250   echo "$as_me:21250: \$? = $ac_status" >&5
21251   (exit $ac_status); }; }; then
21252   ac_cv_func_mkstemp=yes
21253 else
21254   echo "$as_me: failed program was:" >&5
21255 cat conftest.$ac_ext >&5
21256 ac_cv_func_mkstemp=no
21257 fi
21258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21259 fi
21260 echo "$as_me:21260: result: $ac_cv_func_mkstemp" >&5
21261 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21262
21263 fi
21264 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21265
21266 cat >>confdefs.h <<\EOF
21267 #define HAVE_MKSTEMP 1
21268 EOF
21269
21270 fi
21271
21272 # setup for prototype of fallback for vsscanf()
21273
21274 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21275         HAVE_VSSCANF=1
21276 else
21277         HAVE_VSSCANF=0
21278 fi
21279
21280 if test "x$cross_compiling" = xyes ; then
21281         { echo "$as_me:21281: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21282 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21283 else
21284         echo "$as_me:21284: checking whether setvbuf arguments are reversed" >&5
21285 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21286 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21287   echo $ECHO_N "(cached) $ECHO_C" >&6
21288 else
21289   if test "$cross_compiling" = yes; then
21290   { { echo "$as_me:21290: error: cannot run test program while cross compiling" >&5
21291 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21292    { (exit 1); exit 1; }; }
21293 else
21294   cat >conftest.$ac_ext <<_ACEOF
21295 #line 21295 "configure"
21296 #include "confdefs.h"
21297 #include <stdio.h>
21298 /* If setvbuf has the reversed format, exit 0. */
21299 int
21300 main (void)
21301 {
21302   /* This call has the arguments reversed.
21303      A reversed system may check and see that the address of main
21304      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21305   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21306     $ac_main_return(1);
21307   putc('\r', stdout);
21308   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21309 }
21310 _ACEOF
21311 rm -f conftest$ac_exeext
21312 if { (eval echo "$as_me:21312: \"$ac_link\"") >&5
21313   (eval $ac_link) 2>&5
21314   ac_status=$?
21315   echo "$as_me:21315: \$? = $ac_status" >&5
21316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21317   { (eval echo "$as_me:21317: \"$ac_try\"") >&5
21318   (eval $ac_try) 2>&5
21319   ac_status=$?
21320   echo "$as_me:21320: \$? = $ac_status" >&5
21321   (exit $ac_status); }; }; then
21322   ac_cv_func_setvbuf_reversed=yes
21323 else
21324   echo "$as_me: program exited with status $ac_status" >&5
21325 echo "$as_me: failed program was:" >&5
21326 cat conftest.$ac_ext >&5
21327 ac_cv_func_setvbuf_reversed=no
21328 fi
21329 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21330 fi
21331 rm -f core core.* *.core
21332 fi
21333 echo "$as_me:21333: result: $ac_cv_func_setvbuf_reversed" >&5
21334 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21335 if test $ac_cv_func_setvbuf_reversed = yes; then
21336
21337 cat >>confdefs.h <<\EOF
21338 #define SETVBUF_REVERSED 1
21339 EOF
21340
21341 fi
21342
21343 fi
21344 echo "$as_me:21344: checking for intptr_t" >&5
21345 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21346 if test "${ac_cv_type_intptr_t+set}" = set; then
21347   echo $ECHO_N "(cached) $ECHO_C" >&6
21348 else
21349   cat >conftest.$ac_ext <<_ACEOF
21350 #line 21350 "configure"
21351 #include "confdefs.h"
21352 $ac_includes_default
21353 int
21354 main (void)
21355 {
21356 if ((intptr_t *) 0)
21357   return 0;
21358 if (sizeof (intptr_t))
21359   return 0;
21360   ;
21361   return 0;
21362 }
21363 _ACEOF
21364 rm -f conftest.$ac_objext
21365 if { (eval echo "$as_me:21365: \"$ac_compile\"") >&5
21366   (eval $ac_compile) 2>&5
21367   ac_status=$?
21368   echo "$as_me:21368: \$? = $ac_status" >&5
21369   (exit $ac_status); } &&
21370          { ac_try='test -s conftest.$ac_objext'
21371   { (eval echo "$as_me:21371: \"$ac_try\"") >&5
21372   (eval $ac_try) 2>&5
21373   ac_status=$?
21374   echo "$as_me:21374: \$? = $ac_status" >&5
21375   (exit $ac_status); }; }; then
21376   ac_cv_type_intptr_t=yes
21377 else
21378   echo "$as_me: failed program was:" >&5
21379 cat conftest.$ac_ext >&5
21380 ac_cv_type_intptr_t=no
21381 fi
21382 rm -f conftest.$ac_objext conftest.$ac_ext
21383 fi
21384 echo "$as_me:21384: result: $ac_cv_type_intptr_t" >&5
21385 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21386 if test $ac_cv_type_intptr_t = yes; then
21387   :
21388 else
21389
21390 cat >>confdefs.h <<EOF
21391 #define intptr_t long
21392 EOF
21393
21394 fi
21395
21396 echo "$as_me:21396: checking for ssize_t" >&5
21397 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21398 if test "${ac_cv_type_ssize_t+set}" = set; then
21399   echo $ECHO_N "(cached) $ECHO_C" >&6
21400 else
21401   cat >conftest.$ac_ext <<_ACEOF
21402 #line 21402 "configure"
21403 #include "confdefs.h"
21404 $ac_includes_default
21405 int
21406 main (void)
21407 {
21408 if ((ssize_t *) 0)
21409   return 0;
21410 if (sizeof (ssize_t))
21411   return 0;
21412   ;
21413   return 0;
21414 }
21415 _ACEOF
21416 rm -f conftest.$ac_objext
21417 if { (eval echo "$as_me:21417: \"$ac_compile\"") >&5
21418   (eval $ac_compile) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit $ac_status); } &&
21422          { ac_try='test -s conftest.$ac_objext'
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   ac_cv_type_ssize_t=yes
21429 else
21430   echo "$as_me: failed program was:" >&5
21431 cat conftest.$ac_ext >&5
21432 ac_cv_type_ssize_t=no
21433 fi
21434 rm -f conftest.$ac_objext conftest.$ac_ext
21435 fi
21436 echo "$as_me:21436: result: $ac_cv_type_ssize_t" >&5
21437 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21438 if test $ac_cv_type_ssize_t = yes; then
21439   :
21440 else
21441
21442 cat >>confdefs.h <<EOF
21443 #define ssize_t int
21444 EOF
21445
21446 fi
21447
21448 echo "$as_me:21448: checking for type sigaction_t" >&5
21449 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21450 if test "${cf_cv_type_sigaction+set}" = set; then
21451   echo $ECHO_N "(cached) $ECHO_C" >&6
21452 else
21453
21454         cat >conftest.$ac_ext <<_ACEOF
21455 #line 21455 "configure"
21456 #include "confdefs.h"
21457
21458 #include <signal.h>
21459 int
21460 main (void)
21461 {
21462 sigaction_t x
21463   ;
21464   return 0;
21465 }
21466 _ACEOF
21467 rm -f conftest.$ac_objext
21468 if { (eval echo "$as_me:21468: \"$ac_compile\"") >&5
21469   (eval $ac_compile) 2>&5
21470   ac_status=$?
21471   echo "$as_me:21471: \$? = $ac_status" >&5
21472   (exit $ac_status); } &&
21473          { ac_try='test -s conftest.$ac_objext'
21474   { (eval echo "$as_me:21474: \"$ac_try\"") >&5
21475   (eval $ac_try) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit $ac_status); }; }; then
21479   cf_cv_type_sigaction=yes
21480 else
21481   echo "$as_me: failed program was:" >&5
21482 cat conftest.$ac_ext >&5
21483 cf_cv_type_sigaction=no
21484 fi
21485 rm -f conftest.$ac_objext conftest.$ac_ext
21486 fi
21487
21488 echo "$as_me:21488: result: $cf_cv_type_sigaction" >&5
21489 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21490 test "$cf_cv_type_sigaction" = yes &&
21491 cat >>confdefs.h <<\EOF
21492 #define HAVE_TYPE_SIGACTION 1
21493 EOF
21494
21495 echo "$as_me:21495: checking declaration of size-change" >&5
21496 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21497 if test "${cf_cv_sizechange+set}" = set; then
21498   echo $ECHO_N "(cached) $ECHO_C" >&6
21499 else
21500
21501         cf_cv_sizechange=unknown
21502         cf_save_CPPFLAGS="$CPPFLAGS"
21503
21504 for cf_opts in "" "NEED_PTEM_H"
21505 do
21506
21507         CPPFLAGS="$cf_save_CPPFLAGS"
21508         if test -n "$cf_opts"
21509         then
21510
21511         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21512         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21513
21514         fi
21515         cat >conftest.$ac_ext <<_ACEOF
21516 #line 21516 "configure"
21517 #include "confdefs.h"
21518 #include <sys/types.h>
21519 #ifdef HAVE_TERMIOS_H
21520 #include <termios.h>
21521 #else
21522 #ifdef HAVE_TERMIO_H
21523 #include <termio.h>
21524 #endif
21525 #endif
21526
21527 #ifdef NEED_PTEM_H
21528 /* This is a workaround for SCO:  they neglected to define struct winsize in
21529  * termios.h -- it's only in termio.h and ptem.h
21530  */
21531 #include <sys/stream.h>
21532 #include <sys/ptem.h>
21533 #endif
21534
21535 #ifdef HAVE_SYS_IOCTL_H
21536 #include <sys/ioctl.h>
21537 #endif
21538
21539 int
21540 main (void)
21541 {
21542
21543 #ifdef TIOCGSIZE
21544         struct ttysize win;     /* SunOS 3.0... */
21545         int y = win.ts_lines = 2;
21546         int x = win.ts_cols = 1;
21547         (void)y;
21548         (void)x;
21549 #else
21550 #ifdef TIOCGWINSZ
21551         struct winsize win;     /* everything else */
21552         int y = win.ws_row = 2;
21553         int x = win.ws_col = 1;
21554         (void)y;
21555         (void)x;
21556 #else
21557         no TIOCGSIZE or TIOCGWINSZ
21558 #endif /* TIOCGWINSZ */
21559 #endif /* TIOCGSIZE */
21560
21561   ;
21562   return 0;
21563 }
21564 _ACEOF
21565 rm -f conftest.$ac_objext
21566 if { (eval echo "$as_me:21566: \"$ac_compile\"") >&5
21567   (eval $ac_compile) 2>&5
21568   ac_status=$?
21569   echo "$as_me:21569: \$? = $ac_status" >&5
21570   (exit $ac_status); } &&
21571          { ac_try='test -s conftest.$ac_objext'
21572   { (eval echo "$as_me:21572: \"$ac_try\"") >&5
21573   (eval $ac_try) 2>&5
21574   ac_status=$?
21575   echo "$as_me:21575: \$? = $ac_status" >&5
21576   (exit $ac_status); }; }; then
21577   cf_cv_sizechange=yes
21578 else
21579   echo "$as_me: failed program was:" >&5
21580 cat conftest.$ac_ext >&5
21581 cf_cv_sizechange=no
21582 fi
21583 rm -f conftest.$ac_objext conftest.$ac_ext
21584
21585         CPPFLAGS="$cf_save_CPPFLAGS"
21586         if test "$cf_cv_sizechange" = yes ; then
21587                 echo "size-change succeeded ($cf_opts)" >&5
21588                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21589                 break
21590         fi
21591 done
21592
21593 fi
21594 echo "$as_me:21594: result: $cf_cv_sizechange" >&5
21595 echo "${ECHO_T}$cf_cv_sizechange" >&6
21596 if test "$cf_cv_sizechange" != no ; then
21597
21598 cat >>confdefs.h <<\EOF
21599 #define HAVE_SIZECHANGE 1
21600 EOF
21601
21602         case $cf_cv_sizechange in
21603         (NEED*)
21604                 cat >>confdefs.h <<EOF
21605 #define $cf_cv_sizechange  1
21606 EOF
21607
21608                 ;;
21609         esac
21610 fi
21611
21612 echo "$as_me:21612: checking for memmove" >&5
21613 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21614 if test "${ac_cv_func_memmove+set}" = set; then
21615   echo $ECHO_N "(cached) $ECHO_C" >&6
21616 else
21617   cat >conftest.$ac_ext <<_ACEOF
21618 #line 21618 "configure"
21619 #include "confdefs.h"
21620 #define memmove autoconf_temporary
21621 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21622 #undef memmove
21623
21624 #ifdef __cplusplus
21625 extern "C"
21626 #endif
21627
21628 /* We use char because int might match the return type of a gcc2
21629    builtin and then its argument prototype would still apply.  */
21630 char memmove (void);
21631
21632 int
21633 main (void)
21634 {
21635
21636 /* The GNU C library defines stubs for functions which it implements
21637     to always fail with ENOSYS.  Some functions are actually named
21638     something starting with __ and the normal name is an alias.  */
21639 #if defined (__stub_memmove) || defined (__stub___memmove)
21640 #error found stub for memmove
21641 #endif
21642
21643         return memmove ();
21644   ;
21645   return 0;
21646 }
21647 _ACEOF
21648 rm -f conftest.$ac_objext conftest$ac_exeext
21649 if { (eval echo "$as_me:21649: \"$ac_link\"") >&5
21650   (eval $ac_link) 2>&5
21651   ac_status=$?
21652   echo "$as_me:21652: \$? = $ac_status" >&5
21653   (exit $ac_status); } &&
21654          { ac_try='test -s conftest$ac_exeext'
21655   { (eval echo "$as_me:21655: \"$ac_try\"") >&5
21656   (eval $ac_try) 2>&5
21657   ac_status=$?
21658   echo "$as_me:21658: \$? = $ac_status" >&5
21659   (exit $ac_status); }; }; then
21660   ac_cv_func_memmove=yes
21661 else
21662   echo "$as_me: failed program was:" >&5
21663 cat conftest.$ac_ext >&5
21664 ac_cv_func_memmove=no
21665 fi
21666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21667 fi
21668 echo "$as_me:21668: result: $ac_cv_func_memmove" >&5
21669 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21670 if test $ac_cv_func_memmove = yes; then
21671   :
21672 else
21673
21674 echo "$as_me:21674: checking for bcopy" >&5
21675 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21676 if test "${ac_cv_func_bcopy+set}" = set; then
21677   echo $ECHO_N "(cached) $ECHO_C" >&6
21678 else
21679   cat >conftest.$ac_ext <<_ACEOF
21680 #line 21680 "configure"
21681 #include "confdefs.h"
21682 #define bcopy autoconf_temporary
21683 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21684 #undef bcopy
21685
21686 #ifdef __cplusplus
21687 extern "C"
21688 #endif
21689
21690 /* We use char because int might match the return type of a gcc2
21691    builtin and then its argument prototype would still apply.  */
21692 char bcopy (void);
21693
21694 int
21695 main (void)
21696 {
21697
21698 /* The GNU C library defines stubs for functions which it implements
21699     to always fail with ENOSYS.  Some functions are actually named
21700     something starting with __ and the normal name is an alias.  */
21701 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21702 #error found stub for bcopy
21703 #endif
21704
21705         return bcopy ();
21706   ;
21707   return 0;
21708 }
21709 _ACEOF
21710 rm -f conftest.$ac_objext conftest$ac_exeext
21711 if { (eval echo "$as_me:21711: \"$ac_link\"") >&5
21712   (eval $ac_link) 2>&5
21713   ac_status=$?
21714   echo "$as_me:21714: \$? = $ac_status" >&5
21715   (exit $ac_status); } &&
21716          { ac_try='test -s conftest$ac_exeext'
21717   { (eval echo "$as_me:21717: \"$ac_try\"") >&5
21718   (eval $ac_try) 2>&5
21719   ac_status=$?
21720   echo "$as_me:21720: \$? = $ac_status" >&5
21721   (exit $ac_status); }; }; then
21722   ac_cv_func_bcopy=yes
21723 else
21724   echo "$as_me: failed program was:" >&5
21725 cat conftest.$ac_ext >&5
21726 ac_cv_func_bcopy=no
21727 fi
21728 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21729 fi
21730 echo "$as_me:21730: result: $ac_cv_func_bcopy" >&5
21731 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21732 if test $ac_cv_func_bcopy = yes; then
21733
21734         echo "$as_me:21734: checking if bcopy does overlapping moves" >&5
21735 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21736 if test "${cf_cv_good_bcopy+set}" = set; then
21737   echo $ECHO_N "(cached) $ECHO_C" >&6
21738 else
21739
21740                 if test "$cross_compiling" = yes; then
21741   cf_cv_good_bcopy=unknown
21742 else
21743   cat >conftest.$ac_ext <<_ACEOF
21744 #line 21744 "configure"
21745 #include "confdefs.h"
21746
21747 int main(void) {
21748         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21749         char temp[40];
21750         bcopy(data, temp, sizeof(data));
21751         bcopy(temp+10, temp, 15);
21752         bcopy(temp+5, temp+15, 10);
21753         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21754 }
21755
21756 _ACEOF
21757 rm -f conftest$ac_exeext
21758 if { (eval echo "$as_me:21758: \"$ac_link\"") >&5
21759   (eval $ac_link) 2>&5
21760   ac_status=$?
21761   echo "$as_me:21761: \$? = $ac_status" >&5
21762   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21763   { (eval echo "$as_me:21763: \"$ac_try\"") >&5
21764   (eval $ac_try) 2>&5
21765   ac_status=$?
21766   echo "$as_me:21766: \$? = $ac_status" >&5
21767   (exit $ac_status); }; }; then
21768   cf_cv_good_bcopy=yes
21769 else
21770   echo "$as_me: program exited with status $ac_status" >&5
21771 echo "$as_me: failed program was:" >&5
21772 cat conftest.$ac_ext >&5
21773 cf_cv_good_bcopy=no
21774 fi
21775 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21776 fi
21777
21778 fi
21779 echo "$as_me:21779: result: $cf_cv_good_bcopy" >&5
21780 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21781
21782 else
21783   cf_cv_good_bcopy=no
21784 fi
21785
21786         if test "$cf_cv_good_bcopy" = yes ; then
21787
21788 cat >>confdefs.h <<\EOF
21789 #define USE_OK_BCOPY 1
21790 EOF
21791
21792         else
21793
21794 cat >>confdefs.h <<\EOF
21795 #define USE_MY_MEMMOVE 1
21796 EOF
21797
21798         fi
21799
21800 fi
21801
21802 tty 2>&1 >/dev/null || {
21803 for ac_func in posix_openpt
21804 do
21805 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21806 echo "$as_me:21806: checking for $ac_func" >&5
21807 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21808 if eval "test \"\${$as_ac_var+set}\" = set"; then
21809   echo $ECHO_N "(cached) $ECHO_C" >&6
21810 else
21811   cat >conftest.$ac_ext <<_ACEOF
21812 #line 21812 "configure"
21813 #include "confdefs.h"
21814 #define $ac_func autoconf_temporary
21815 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21816 #undef $ac_func
21817
21818 #ifdef __cplusplus
21819 extern "C"
21820 #endif
21821
21822 /* We use char because int might match the return type of a gcc2
21823    builtin and then its argument prototype would still apply.  */
21824 char $ac_func (void);
21825
21826 int
21827 main (void)
21828 {
21829
21830 /* The GNU C library defines stubs for functions which it implements
21831     to always fail with ENOSYS.  Some functions are actually named
21832     something starting with __ and the normal name is an alias.  */
21833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21834 #error found stub for $ac_func
21835 #endif
21836
21837         return $ac_func ();
21838   ;
21839   return 0;
21840 }
21841 _ACEOF
21842 rm -f conftest.$ac_objext conftest$ac_exeext
21843 if { (eval echo "$as_me:21843: \"$ac_link\"") >&5
21844   (eval $ac_link) 2>&5
21845   ac_status=$?
21846   echo "$as_me:21846: \$? = $ac_status" >&5
21847   (exit $ac_status); } &&
21848          { ac_try='test -s conftest$ac_exeext'
21849   { (eval echo "$as_me:21849: \"$ac_try\"") >&5
21850   (eval $ac_try) 2>&5
21851   ac_status=$?
21852   echo "$as_me:21852: \$? = $ac_status" >&5
21853   (exit $ac_status); }; }; then
21854   eval "$as_ac_var=yes"
21855 else
21856   echo "$as_me: failed program was:" >&5
21857 cat conftest.$ac_ext >&5
21858 eval "$as_ac_var=no"
21859 fi
21860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21861 fi
21862 echo "$as_me:21862: result: `eval echo '${'$as_ac_var'}'`" >&5
21863 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21864 if test `eval echo '${'$as_ac_var'}'` = yes; then
21865   cat >>confdefs.h <<EOF
21866 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21867 EOF
21868
21869 fi
21870 done
21871  }
21872 echo "$as_me:21872: checking if poll really works" >&5
21873 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21874 if test "${cf_cv_working_poll+set}" = set; then
21875   echo $ECHO_N "(cached) $ECHO_C" >&6
21876 else
21877
21878 if test "$cross_compiling" = yes; then
21879   cf_cv_working_poll=unknown
21880 else
21881   cat >conftest.$ac_ext <<_ACEOF
21882 #line 21882 "configure"
21883 #include "confdefs.h"
21884
21885 #include <stdlib.h>
21886 #include <stdio.h>
21887 #include <unistd.h>
21888 #include <fcntl.h>
21889 #ifdef HAVE_POLL_H
21890 #include <poll.h>
21891 #else
21892 #include <sys/poll.h>
21893 #endif
21894 int main(void) {
21895         struct pollfd myfds;
21896         int ret;
21897
21898         /* check for Darwin bug with respect to "devices" */
21899         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21900         if (myfds.fd < 0)
21901                 myfds.fd = 0;
21902         myfds.events = POLLIN;
21903         myfds.revents = 0;
21904
21905         ret = poll(&myfds, 1, 100);
21906
21907         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21908                 ret = -1;
21909         } else {
21910                 int fd = 0;
21911                 if (!isatty(fd)) {
21912                         fd = open("/dev/tty", 2);       /* O_RDWR */
21913                 }
21914 #ifdef HAVE_POSIX_OPENPT
21915                 if (fd < 0) {
21916                         fd = posix_openpt(O_RDWR);
21917                 }
21918 #endif
21919
21920                 if (fd >= 0) {
21921                         /* also check with standard input */
21922                         myfds.fd = fd;
21923                         myfds.events = POLLIN;
21924                         myfds.revents = 0;
21925                         ret = poll(&myfds, 1, 100);
21926                 } else {
21927                         ret = -1;
21928                 }
21929         }
21930         ${cf_cv_main_return:-return}(ret < 0);
21931 }
21932 _ACEOF
21933 rm -f conftest$ac_exeext
21934 if { (eval echo "$as_me:21934: \"$ac_link\"") >&5
21935   (eval $ac_link) 2>&5
21936   ac_status=$?
21937   echo "$as_me:21937: \$? = $ac_status" >&5
21938   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21939   { (eval echo "$as_me:21939: \"$ac_try\"") >&5
21940   (eval $ac_try) 2>&5
21941   ac_status=$?
21942   echo "$as_me:21942: \$? = $ac_status" >&5
21943   (exit $ac_status); }; }; then
21944   cf_cv_working_poll=yes
21945 else
21946   echo "$as_me: program exited with status $ac_status" >&5
21947 echo "$as_me: failed program was:" >&5
21948 cat conftest.$ac_ext >&5
21949 cf_cv_working_poll=no
21950 fi
21951 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21952 fi
21953 fi
21954 echo "$as_me:21954: result: $cf_cv_working_poll" >&5
21955 echo "${ECHO_T}$cf_cv_working_poll" >&6
21956 test "$cf_cv_working_poll" = "yes" &&
21957 cat >>confdefs.h <<\EOF
21958 #define HAVE_WORKING_POLL 1
21959 EOF
21960
21961 echo "$as_me:21961: checking for va_copy" >&5
21962 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21963 if test "${cf_cv_have_va_copy+set}" = set; then
21964   echo $ECHO_N "(cached) $ECHO_C" >&6
21965 else
21966
21967 cat >conftest.$ac_ext <<_ACEOF
21968 #line 21968 "configure"
21969 #include "confdefs.h"
21970
21971 #include <stdarg.h>
21972
21973 int
21974 main (void)
21975 {
21976
21977         static va_list dst;
21978         static va_list src;
21979         va_copy(dst, src)
21980   ;
21981   return 0;
21982 }
21983 _ACEOF
21984 rm -f conftest.$ac_objext conftest$ac_exeext
21985 if { (eval echo "$as_me:21985: \"$ac_link\"") >&5
21986   (eval $ac_link) 2>&5
21987   ac_status=$?
21988   echo "$as_me:21988: \$? = $ac_status" >&5
21989   (exit $ac_status); } &&
21990          { ac_try='test -s conftest$ac_exeext'
21991   { (eval echo "$as_me:21991: \"$ac_try\"") >&5
21992   (eval $ac_try) 2>&5
21993   ac_status=$?
21994   echo "$as_me:21994: \$? = $ac_status" >&5
21995   (exit $ac_status); }; }; then
21996   cf_cv_have_va_copy=yes
21997 else
21998   echo "$as_me: failed program was:" >&5
21999 cat conftest.$ac_ext >&5
22000 cf_cv_have_va_copy=no
22001 fi
22002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22003 fi
22004 echo "$as_me:22004: result: $cf_cv_have_va_copy" >&5
22005 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22006
22007 if test "$cf_cv_have_va_copy" = yes;
22008 then
22009
22010 cat >>confdefs.h <<\EOF
22011 #define HAVE_VA_COPY 1
22012 EOF
22013
22014 else # !cf_cv_have_va_copy
22015
22016 echo "$as_me:22016: checking for __va_copy" >&5
22017 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22018 if test "${cf_cv_have___va_copy+set}" = set; then
22019   echo $ECHO_N "(cached) $ECHO_C" >&6
22020 else
22021
22022 cat >conftest.$ac_ext <<_ACEOF
22023 #line 22023 "configure"
22024 #include "confdefs.h"
22025
22026 #include <stdarg.h>
22027
22028 int
22029 main (void)
22030 {
22031
22032         static va_list dst;
22033         static va_list src;
22034         __va_copy(dst, src)
22035   ;
22036   return 0;
22037 }
22038 _ACEOF
22039 rm -f conftest.$ac_objext conftest$ac_exeext
22040 if { (eval echo "$as_me:22040: \"$ac_link\"") >&5
22041   (eval $ac_link) 2>&5
22042   ac_status=$?
22043   echo "$as_me:22043: \$? = $ac_status" >&5
22044   (exit $ac_status); } &&
22045          { ac_try='test -s conftest$ac_exeext'
22046   { (eval echo "$as_me:22046: \"$ac_try\"") >&5
22047   (eval $ac_try) 2>&5
22048   ac_status=$?
22049   echo "$as_me:22049: \$? = $ac_status" >&5
22050   (exit $ac_status); }; }; then
22051   cf_cv_have___va_copy=yes
22052 else
22053   echo "$as_me: failed program was:" >&5
22054 cat conftest.$ac_ext >&5
22055 cf_cv_have___va_copy=no
22056 fi
22057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22058 fi
22059 echo "$as_me:22059: result: $cf_cv_have___va_copy" >&5
22060 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22061
22062 if test "$cf_cv_have___va_copy" = yes
22063 then
22064
22065 cat >>confdefs.h <<\EOF
22066 #define HAVE___VA_COPY 1
22067 EOF
22068
22069 else # !cf_cv_have___va_copy
22070
22071 echo "$as_me:22071: checking for __builtin_va_copy" >&5
22072 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22073 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22074   echo $ECHO_N "(cached) $ECHO_C" >&6
22075 else
22076
22077 cat >conftest.$ac_ext <<_ACEOF
22078 #line 22078 "configure"
22079 #include "confdefs.h"
22080
22081 #include <stdarg.h>
22082
22083 int
22084 main (void)
22085 {
22086
22087         static va_list dst;
22088         static va_list src;
22089         __builtin_va_copy(dst, src)
22090   ;
22091   return 0;
22092 }
22093 _ACEOF
22094 rm -f conftest.$ac_objext conftest$ac_exeext
22095 if { (eval echo "$as_me:22095: \"$ac_link\"") >&5
22096   (eval $ac_link) 2>&5
22097   ac_status=$?
22098   echo "$as_me:22098: \$? = $ac_status" >&5
22099   (exit $ac_status); } &&
22100          { ac_try='test -s conftest$ac_exeext'
22101   { (eval echo "$as_me:22101: \"$ac_try\"") >&5
22102   (eval $ac_try) 2>&5
22103   ac_status=$?
22104   echo "$as_me:22104: \$? = $ac_status" >&5
22105   (exit $ac_status); }; }; then
22106   cf_cv_have___builtin_va_copy=yes
22107 else
22108   echo "$as_me: failed program was:" >&5
22109 cat conftest.$ac_ext >&5
22110 cf_cv_have___builtin_va_copy=no
22111 fi
22112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22113 fi
22114 echo "$as_me:22114: result: $cf_cv_have___builtin_va_copy" >&5
22115 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22116
22117 test "$cf_cv_have___builtin_va_copy" = yes &&
22118
22119 cat >>confdefs.h <<\EOF
22120 #define HAVE___BUILTIN_VA_COPY 1
22121 EOF
22122
22123 fi # cf_cv_have___va_copy
22124
22125 fi # cf_cv_have_va_copy
22126
22127 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22128 (*yes*)
22129         ;;
22130
22131 (*)
22132         echo "$as_me:22132: checking if we can simply copy va_list" >&5
22133 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22134 if test "${cf_cv_pointer_va_list+set}" = set; then
22135   echo $ECHO_N "(cached) $ECHO_C" >&6
22136 else
22137
22138 cat >conftest.$ac_ext <<_ACEOF
22139 #line 22139 "configure"
22140 #include "confdefs.h"
22141
22142 #include <stdarg.h>
22143
22144 int
22145 main (void)
22146 {
22147
22148         va_list dst;
22149         va_list src;
22150         dst = src
22151   ;
22152   return 0;
22153 }
22154 _ACEOF
22155 rm -f conftest.$ac_objext conftest$ac_exeext
22156 if { (eval echo "$as_me:22156: \"$ac_link\"") >&5
22157   (eval $ac_link) 2>&5
22158   ac_status=$?
22159   echo "$as_me:22159: \$? = $ac_status" >&5
22160   (exit $ac_status); } &&
22161          { ac_try='test -s conftest$ac_exeext'
22162   { (eval echo "$as_me:22162: \"$ac_try\"") >&5
22163   (eval $ac_try) 2>&5
22164   ac_status=$?
22165   echo "$as_me:22165: \$? = $ac_status" >&5
22166   (exit $ac_status); }; }; then
22167   cf_cv_pointer_va_list=yes
22168 else
22169   echo "$as_me: failed program was:" >&5
22170 cat conftest.$ac_ext >&5
22171 cf_cv_pointer_va_list=no
22172 fi
22173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22174 fi
22175 echo "$as_me:22175: result: $cf_cv_pointer_va_list" >&5
22176 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22177
22178         if test "$cf_cv_pointer_va_list" = no
22179         then
22180                 echo "$as_me:22180: checking if we can copy va_list indirectly" >&5
22181 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22182 if test "${cf_cv_array_va_list+set}" = set; then
22183   echo $ECHO_N "(cached) $ECHO_C" >&6
22184 else
22185
22186 cat >conftest.$ac_ext <<_ACEOF
22187 #line 22187 "configure"
22188 #include "confdefs.h"
22189
22190 #include <stdarg.h>
22191
22192 int
22193 main (void)
22194 {
22195
22196         va_list dst;
22197         va_list src;
22198         *dst = *src
22199   ;
22200   return 0;
22201 }
22202 _ACEOF
22203 rm -f conftest.$ac_objext conftest$ac_exeext
22204 if { (eval echo "$as_me:22204: \"$ac_link\"") >&5
22205   (eval $ac_link) 2>&5
22206   ac_status=$?
22207   echo "$as_me:22207: \$? = $ac_status" >&5
22208   (exit $ac_status); } &&
22209          { ac_try='test -s conftest$ac_exeext'
22210   { (eval echo "$as_me:22210: \"$ac_try\"") >&5
22211   (eval $ac_try) 2>&5
22212   ac_status=$?
22213   echo "$as_me:22213: \$? = $ac_status" >&5
22214   (exit $ac_status); }; }; then
22215   cf_cv_array_va_list=yes
22216 else
22217   echo "$as_me: failed program was:" >&5
22218 cat conftest.$ac_ext >&5
22219 cf_cv_array_va_list=no
22220 fi
22221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22222 fi
22223 echo "$as_me:22223: result: $cf_cv_array_va_list" >&5
22224 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22225                 test "$cf_cv_array_va_list" = yes &&
22226 cat >>confdefs.h <<\EOF
22227 #define ARRAY_VA_LIST 1
22228 EOF
22229
22230         fi
22231         ;;
22232 esac
22233
22234 echo "$as_me:22234: checking for pid_t" >&5
22235 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22236 if test "${ac_cv_type_pid_t+set}" = set; then
22237   echo $ECHO_N "(cached) $ECHO_C" >&6
22238 else
22239   cat >conftest.$ac_ext <<_ACEOF
22240 #line 22240 "configure"
22241 #include "confdefs.h"
22242 $ac_includes_default
22243 int
22244 main (void)
22245 {
22246 if ((pid_t *) 0)
22247   return 0;
22248 if (sizeof (pid_t))
22249   return 0;
22250   ;
22251   return 0;
22252 }
22253 _ACEOF
22254 rm -f conftest.$ac_objext
22255 if { (eval echo "$as_me:22255: \"$ac_compile\"") >&5
22256   (eval $ac_compile) 2>&5
22257   ac_status=$?
22258   echo "$as_me:22258: \$? = $ac_status" >&5
22259   (exit $ac_status); } &&
22260          { ac_try='test -s conftest.$ac_objext'
22261   { (eval echo "$as_me:22261: \"$ac_try\"") >&5
22262   (eval $ac_try) 2>&5
22263   ac_status=$?
22264   echo "$as_me:22264: \$? = $ac_status" >&5
22265   (exit $ac_status); }; }; then
22266   ac_cv_type_pid_t=yes
22267 else
22268   echo "$as_me: failed program was:" >&5
22269 cat conftest.$ac_ext >&5
22270 ac_cv_type_pid_t=no
22271 fi
22272 rm -f conftest.$ac_objext conftest.$ac_ext
22273 fi
22274 echo "$as_me:22274: result: $ac_cv_type_pid_t" >&5
22275 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22276 if test $ac_cv_type_pid_t = yes; then
22277   :
22278 else
22279
22280 cat >>confdefs.h <<EOF
22281 #define pid_t int
22282 EOF
22283
22284 fi
22285
22286 for ac_header in unistd.h vfork.h
22287 do
22288 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22289 echo "$as_me:22289: checking for $ac_header" >&5
22290 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22291 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22292   echo $ECHO_N "(cached) $ECHO_C" >&6
22293 else
22294   cat >conftest.$ac_ext <<_ACEOF
22295 #line 22295 "configure"
22296 #include "confdefs.h"
22297 #include <$ac_header>
22298 _ACEOF
22299 if { (eval echo "$as_me:22299: \"$ac_cpp conftest.$ac_ext\"") >&5
22300   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22301   ac_status=$?
22302   egrep -v '^ *\+' conftest.er1 >conftest.err
22303   rm -f conftest.er1
22304   cat conftest.err >&5
22305   echo "$as_me:22305: \$? = $ac_status" >&5
22306   (exit $ac_status); } >/dev/null; then
22307   if test -s conftest.err; then
22308     ac_cpp_err=$ac_c_preproc_warn_flag
22309   else
22310     ac_cpp_err=
22311   fi
22312 else
22313   ac_cpp_err=yes
22314 fi
22315 if test -z "$ac_cpp_err"; then
22316   eval "$as_ac_Header=yes"
22317 else
22318   echo "$as_me: failed program was:" >&5
22319   cat conftest.$ac_ext >&5
22320   eval "$as_ac_Header=no"
22321 fi
22322 rm -f conftest.err conftest.$ac_ext
22323 fi
22324 echo "$as_me:22324: result: `eval echo '${'$as_ac_Header'}'`" >&5
22325 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22326 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22327   cat >>confdefs.h <<EOF
22328 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22329 EOF
22330
22331 fi
22332 done
22333
22334 for ac_func in fork vfork
22335 do
22336 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22337 echo "$as_me:22337: checking for $ac_func" >&5
22338 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22339 if eval "test \"\${$as_ac_var+set}\" = set"; then
22340   echo $ECHO_N "(cached) $ECHO_C" >&6
22341 else
22342   cat >conftest.$ac_ext <<_ACEOF
22343 #line 22343 "configure"
22344 #include "confdefs.h"
22345 #define $ac_func autoconf_temporary
22346 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22347 #undef $ac_func
22348
22349 #ifdef __cplusplus
22350 extern "C"
22351 #endif
22352
22353 /* We use char because int might match the return type of a gcc2
22354    builtin and then its argument prototype would still apply.  */
22355 char $ac_func (void);
22356
22357 int
22358 main (void)
22359 {
22360
22361 /* The GNU C library defines stubs for functions which it implements
22362     to always fail with ENOSYS.  Some functions are actually named
22363     something starting with __ and the normal name is an alias.  */
22364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22365 #error found stub for $ac_func
22366 #endif
22367
22368         return $ac_func ();
22369   ;
22370   return 0;
22371 }
22372 _ACEOF
22373 rm -f conftest.$ac_objext conftest$ac_exeext
22374 if { (eval echo "$as_me:22374: \"$ac_link\"") >&5
22375   (eval $ac_link) 2>&5
22376   ac_status=$?
22377   echo "$as_me:22377: \$? = $ac_status" >&5
22378   (exit $ac_status); } &&
22379          { ac_try='test -s conftest$ac_exeext'
22380   { (eval echo "$as_me:22380: \"$ac_try\"") >&5
22381   (eval $ac_try) 2>&5
22382   ac_status=$?
22383   echo "$as_me:22383: \$? = $ac_status" >&5
22384   (exit $ac_status); }; }; then
22385   eval "$as_ac_var=yes"
22386 else
22387   echo "$as_me: failed program was:" >&5
22388 cat conftest.$ac_ext >&5
22389 eval "$as_ac_var=no"
22390 fi
22391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22392 fi
22393 echo "$as_me:22393: result: `eval echo '${'$as_ac_var'}'`" >&5
22394 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22395 if test `eval echo '${'$as_ac_var'}'` = yes; then
22396   cat >>confdefs.h <<EOF
22397 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22398 EOF
22399
22400 fi
22401 done
22402
22403 ac_cv_func_fork_works=$ac_cv_func_fork
22404 if test "x$ac_cv_func_fork" = xyes; then
22405   echo "$as_me:22405: checking for working fork" >&5
22406 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22407 if test "${ac_cv_func_fork_works+set}" = set; then
22408   echo $ECHO_N "(cached) $ECHO_C" >&6
22409 else
22410   if test "$cross_compiling" = yes; then
22411   ac_cv_func_fork_works=cross
22412 else
22413   cat >conftest.$ac_ext <<_ACEOF
22414 /* By Rüdiger Kuhlmann. */
22415       #include <sys/types.h>
22416       #if HAVE_UNISTD_H
22417       # include <unistd.h>
22418       #endif
22419       /* Some systems only have a dummy stub for fork() */
22420       int main (void)
22421       {
22422         if (fork() < 0)
22423           $ac_main_return (1);
22424         $ac_main_return (0);
22425       }
22426 _ACEOF
22427 rm -f conftest$ac_exeext
22428 if { (eval echo "$as_me:22428: \"$ac_link\"") >&5
22429   (eval $ac_link) 2>&5
22430   ac_status=$?
22431   echo "$as_me:22431: \$? = $ac_status" >&5
22432   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22433   { (eval echo "$as_me:22433: \"$ac_try\"") >&5
22434   (eval $ac_try) 2>&5
22435   ac_status=$?
22436   echo "$as_me:22436: \$? = $ac_status" >&5
22437   (exit $ac_status); }; }; then
22438   ac_cv_func_fork_works=yes
22439 else
22440   echo "$as_me: program exited with status $ac_status" >&5
22441 echo "$as_me: failed program was:" >&5
22442 cat conftest.$ac_ext >&5
22443 ac_cv_func_fork_works=no
22444 fi
22445 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22446 fi
22447 fi
22448 echo "$as_me:22448: result: $ac_cv_func_fork_works" >&5
22449 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22450
22451 fi
22452 if test "x$ac_cv_func_fork_works" = xcross; then
22453   case $host in
22454     *-*-amigaos* | *-*-msdosdjgpp*)
22455       # Override, as these systems have only a dummy fork() stub
22456       ac_cv_func_fork_works=no
22457       ;;
22458     *)
22459       ac_cv_func_fork_works=yes
22460       ;;
22461   esac
22462   { echo "$as_me:22462: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22463 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22464 fi
22465 ac_cv_func_vfork_works=$ac_cv_func_vfork
22466 if test "x$ac_cv_func_vfork" = xyes; then
22467   echo "$as_me:22467: checking for working vfork" >&5
22468 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22469 if test "${ac_cv_func_vfork_works+set}" = set; then
22470   echo $ECHO_N "(cached) $ECHO_C" >&6
22471 else
22472   if test "$cross_compiling" = yes; then
22473   ac_cv_func_vfork_works=cross
22474 else
22475   cat >conftest.$ac_ext <<_ACEOF
22476 #line 22476 "configure"
22477 #include "confdefs.h"
22478 /* Thanks to Paul Eggert for this test.  */
22479 #include <stdio.h>
22480 #include <sys/types.h>
22481 #include <sys/stat.h>
22482 #if HAVE_UNISTD_H
22483 # include <unistd.h>
22484 #endif
22485 #if HAVE_VFORK_H
22486 # include <vfork.h>
22487 #endif
22488 /* On some sparc systems, changes by the child to local and incoming
22489    argument registers are propagated back to the parent.  The compiler
22490    is told about this with #include <vfork.h>, but some compilers
22491    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22492    static variable whose address is put into a register that is
22493    clobbered by the vfork.  */
22494 static
22495 #ifdef __cplusplus
22496 sparc_address_test (int arg)
22497 # else
22498 sparc_address_test (arg) int arg;
22499 #endif
22500 {
22501   static pid_t child;
22502   if (!child) {
22503     child = vfork ();
22504     if (child < 0) {
22505       perror ("vfork");
22506       _exit(2);
22507     }
22508     if (!child) {
22509       arg = getpid();
22510       write(-1, "", 0);
22511       _exit (arg);
22512     }
22513   }
22514 }
22515
22516 int
22517 main (void)
22518 {
22519   pid_t parent = getpid ();
22520   pid_t child;
22521
22522   sparc_address_test ();
22523
22524   child = vfork ();
22525
22526   if (child == 0) {
22527     /* Here is another test for sparc vfork register problems.  This
22528        test uses lots of local variables, at least as many local
22529        variables as main has allocated so far including compiler
22530        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22531        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22532        reuse the register of parent for one of the local variables,
22533        since it will think that parent can't possibly be used any more
22534        in this routine.  Assigning to the local variable will thus
22535        munge parent in the parent process.  */
22536     pid_t
22537       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22538       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22539     /* Convince the compiler that p..p7 are live; otherwise, it might
22540        use the same hardware register for all 8 local variables.  */
22541     if (p != p1 || p != p2 || p != p3 || p != p4
22542         || p != p5 || p != p6 || p != p7)
22543       _exit(1);
22544
22545     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22546        from child file descriptors.  If the child closes a descriptor
22547        before it execs or exits, this munges the parent's descriptor
22548        as well.  Test for this by closing stdout in the child.  */
22549     _exit(close(fileno(stdout)) != 0);
22550   } else {
22551     int status;
22552     struct stat st;
22553
22554     while (wait(&status) != child)
22555       ;
22556     $ac_main_return(
22557          /* Was there some problem with vforking?  */
22558          child < 0
22559
22560          /* Did the child fail?  (This shouldn't happen.)  */
22561          || status
22562
22563          /* Did the vfork/compiler bug occur?  */
22564          || parent != getpid()
22565
22566          /* Did the file descriptor bug occur?  */
22567          || fstat(fileno(stdout), &st) != 0
22568          );
22569   }
22570 }
22571 _ACEOF
22572 rm -f conftest$ac_exeext
22573 if { (eval echo "$as_me:22573: \"$ac_link\"") >&5
22574   (eval $ac_link) 2>&5
22575   ac_status=$?
22576   echo "$as_me:22576: \$? = $ac_status" >&5
22577   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22578   { (eval echo "$as_me:22578: \"$ac_try\"") >&5
22579   (eval $ac_try) 2>&5
22580   ac_status=$?
22581   echo "$as_me:22581: \$? = $ac_status" >&5
22582   (exit $ac_status); }; }; then
22583   ac_cv_func_vfork_works=yes
22584 else
22585   echo "$as_me: program exited with status $ac_status" >&5
22586 echo "$as_me: failed program was:" >&5
22587 cat conftest.$ac_ext >&5
22588 ac_cv_func_vfork_works=no
22589 fi
22590 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22591 fi
22592 fi
22593 echo "$as_me:22593: result: $ac_cv_func_vfork_works" >&5
22594 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22595
22596 fi;
22597 if test "x$ac_cv_func_fork_works" = xcross; then
22598   ac_cv_func_vfork_works=ac_cv_func_vfork
22599   { echo "$as_me:22599: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22600 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22601 fi
22602
22603 if test "x$ac_cv_func_vfork_works" = xyes; then
22604
22605 cat >>confdefs.h <<\EOF
22606 #define HAVE_WORKING_VFORK 1
22607 EOF
22608
22609 else
22610
22611 cat >>confdefs.h <<\EOF
22612 #define vfork fork
22613 EOF
22614
22615 fi
22616 if test "x$ac_cv_func_fork_works" = xyes; then
22617
22618 cat >>confdefs.h <<\EOF
22619 #define HAVE_WORKING_FORK 1
22620 EOF
22621
22622 fi
22623
22624 echo "$as_me:22624: checking if fopen accepts explicit binary mode" >&5
22625 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22626 if test "${cf_cv_fopen_bin_r+set}" = set; then
22627   echo $ECHO_N "(cached) $ECHO_C" >&6
22628 else
22629
22630         if test "$cross_compiling" = yes; then
22631   cf_cv_fopen_bin_r=unknown
22632 else
22633   cat >conftest.$ac_ext <<_ACEOF
22634 #line 22634 "configure"
22635 #include "confdefs.h"
22636
22637 #include <stdio.h>
22638 int main(void) {
22639         FILE *fp = fopen("conftest.tmp", "wb");
22640         int rc = 0;
22641         if (fp != 0) {
22642                 int p, q;
22643                 for (p = 0; p < 256; ++p) {
22644                         fputc(p, fp);
22645                 }
22646                 fclose(fp);
22647                 fp = fopen("conftest.tmp", "rb");
22648                 if (fp != 0) {
22649                         for (p = 0; p < 256; ++p) {
22650                                 q = fgetc(fp);
22651                                 if (q != p) {
22652                                         rc = 1;
22653                                         break;
22654                                 }
22655                         }
22656                 } else {
22657                         rc = 1;
22658                 }
22659         } else {
22660                 rc = 1;
22661         }
22662         ${cf_cv_main_return:-return} (rc);
22663 }
22664
22665 _ACEOF
22666 rm -f conftest$ac_exeext
22667 if { (eval echo "$as_me:22667: \"$ac_link\"") >&5
22668   (eval $ac_link) 2>&5
22669   ac_status=$?
22670   echo "$as_me:22670: \$? = $ac_status" >&5
22671   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22672   { (eval echo "$as_me:22672: \"$ac_try\"") >&5
22673   (eval $ac_try) 2>&5
22674   ac_status=$?
22675   echo "$as_me:22675: \$? = $ac_status" >&5
22676   (exit $ac_status); }; }; then
22677   cf_cv_fopen_bin_r=yes
22678 else
22679   echo "$as_me: program exited with status $ac_status" >&5
22680 echo "$as_me: failed program was:" >&5
22681 cat conftest.$ac_ext >&5
22682 cf_cv_fopen_bin_r=no
22683 fi
22684 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22685 fi
22686
22687 fi
22688 echo "$as_me:22688: result: $cf_cv_fopen_bin_r" >&5
22689 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22690 test "x$cf_cv_fopen_bin_r" != xno &&
22691 cat >>confdefs.h <<\EOF
22692 #define USE_FOPEN_BIN_R 1
22693 EOF
22694
22695 # special check for test/ditto.c
22696
22697 echo "$as_me:22697: checking for openpty in -lutil" >&5
22698 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22699 if test "${ac_cv_lib_util_openpty+set}" = set; then
22700   echo $ECHO_N "(cached) $ECHO_C" >&6
22701 else
22702   ac_check_lib_save_LIBS=$LIBS
22703 LIBS="-lutil  $LIBS"
22704 cat >conftest.$ac_ext <<_ACEOF
22705 #line 22705 "configure"
22706 #include "confdefs.h"
22707
22708 /* Override any gcc2 internal prototype to avoid an error.  */
22709 #ifdef __cplusplus
22710 extern "C"
22711 #endif
22712 /* We use char because int might match the return type of a gcc2
22713    builtin and then its argument prototype would still apply.  */
22714 char openpty ();
22715 int
22716 main (void)
22717 {
22718 openpty ();
22719   ;
22720   return 0;
22721 }
22722 _ACEOF
22723 rm -f conftest.$ac_objext conftest$ac_exeext
22724 if { (eval echo "$as_me:22724: \"$ac_link\"") >&5
22725   (eval $ac_link) 2>&5
22726   ac_status=$?
22727   echo "$as_me:22727: \$? = $ac_status" >&5
22728   (exit $ac_status); } &&
22729          { ac_try='test -s conftest$ac_exeext'
22730   { (eval echo "$as_me:22730: \"$ac_try\"") >&5
22731   (eval $ac_try) 2>&5
22732   ac_status=$?
22733   echo "$as_me:22733: \$? = $ac_status" >&5
22734   (exit $ac_status); }; }; then
22735   ac_cv_lib_util_openpty=yes
22736 else
22737   echo "$as_me: failed program was:" >&5
22738 cat conftest.$ac_ext >&5
22739 ac_cv_lib_util_openpty=no
22740 fi
22741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22742 LIBS=$ac_check_lib_save_LIBS
22743 fi
22744 echo "$as_me:22744: result: $ac_cv_lib_util_openpty" >&5
22745 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22746 if test $ac_cv_lib_util_openpty = yes; then
22747   cf_cv_lib_util=yes
22748 else
22749   cf_cv_lib_util=no
22750 fi
22751
22752 echo "$as_me:22752: checking for openpty header" >&5
22753 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22754 if test "${cf_cv_func_openpty+set}" = set; then
22755   echo $ECHO_N "(cached) $ECHO_C" >&6
22756 else
22757
22758         cf_save_LIBS="$LIBS"
22759         test $cf_cv_lib_util = yes && {
22760 cf_add_libs="$LIBS"
22761 # reverse order
22762 cf_add_0lib=
22763 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22764 # filter duplicates
22765 for cf_add_1lib in $cf_add_0lib; do
22766         for cf_add_2lib in $cf_add_libs; do
22767                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22768                         cf_add_1lib=
22769                         break
22770                 fi
22771         done
22772         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22773 done
22774 LIBS="$cf_add_libs"
22775  }
22776         for cf_header in pty.h libutil.h util.h
22777         do
22778         cat >conftest.$ac_ext <<_ACEOF
22779 #line 22779 "configure"
22780 #include "confdefs.h"
22781
22782 #include <$cf_header>
22783
22784 int
22785 main (void)
22786 {
22787
22788         int x = openpty((int *)0, (int *)0, (char *)0,
22789                                    (struct termios *)0, (struct winsize *)0);
22790
22791   ;
22792   return 0;
22793 }
22794 _ACEOF
22795 rm -f conftest.$ac_objext conftest$ac_exeext
22796 if { (eval echo "$as_me:22796: \"$ac_link\"") >&5
22797   (eval $ac_link) 2>&5
22798   ac_status=$?
22799   echo "$as_me:22799: \$? = $ac_status" >&5
22800   (exit $ac_status); } &&
22801          { ac_try='test -s conftest$ac_exeext'
22802   { (eval echo "$as_me:22802: \"$ac_try\"") >&5
22803   (eval $ac_try) 2>&5
22804   ac_status=$?
22805   echo "$as_me:22805: \$? = $ac_status" >&5
22806   (exit $ac_status); }; }; then
22807
22808                 cf_cv_func_openpty=$cf_header
22809                 break
22810
22811 else
22812   echo "$as_me: failed program was:" >&5
22813 cat conftest.$ac_ext >&5
22814
22815                 cf_cv_func_openpty=no
22816
22817 fi
22818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22819         done
22820         LIBS="$cf_save_LIBS"
22821
22822 fi
22823 echo "$as_me:22823: result: $cf_cv_func_openpty" >&5
22824 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22825
22826 if test "$cf_cv_func_openpty" != no ; then
22827
22828 cat >>confdefs.h <<EOF
22829 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22830 EOF
22831
22832 cat >>confdefs.h <<\EOF
22833 #define USE_XTERM_PTY 1
22834 EOF
22835
22836         if test "x$cf_cv_lib_util" = xyes ; then
22837
22838 cf_add_libs="$TEST_LIBS"
22839 # reverse order
22840 cf_add_0lib=
22841 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22842 # filter duplicates
22843 for cf_add_1lib in $cf_add_0lib; do
22844         for cf_add_2lib in $cf_add_libs; do
22845                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22846                         cf_add_1lib=
22847                         break
22848                 fi
22849         done
22850         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22851 done
22852 TEST_LIBS="$cf_add_libs"
22853
22854         fi
22855 fi
22856
22857 if test "$with_hashed_db" != no ; then
22858
22859 cat >>confdefs.h <<\EOF
22860 #define USE_HASHED_DB 1
22861 EOF
22862
22863 case $with_hashed_db in
22864 (yes|*able*)
22865         ;;
22866 (*)
22867         if test -d "$with_hashed_db" ; then
22868
22869 if test -n "$with_hashed_db/include" ; then
22870   for cf_add_incdir in $with_hashed_db/include
22871   do
22872         while test $cf_add_incdir != /usr/include
22873         do
22874           if test -d $cf_add_incdir
22875           then
22876                 cf_have_incdir=no
22877                 if test -n "$CFLAGS$CPPFLAGS" ; then
22878                   # a loop is needed to ensure we can add subdirs of existing dirs
22879                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22880                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22881                           cf_have_incdir=yes; break
22882                         fi
22883                   done
22884                 fi
22885
22886                 if test "$cf_have_incdir" = no ; then
22887                   if test "$cf_add_incdir" = /usr/local/include ; then
22888                         if test "$GCC" = yes
22889                         then
22890                           cf_save_CPPFLAGS=$CPPFLAGS
22891
22892         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22893         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22894
22895                           cat >conftest.$ac_ext <<_ACEOF
22896 #line 22896 "configure"
22897 #include "confdefs.h"
22898 #include <stdio.h>
22899 int
22900 main (void)
22901 {
22902 printf("Hello")
22903   ;
22904   return 0;
22905 }
22906 _ACEOF
22907 rm -f conftest.$ac_objext
22908 if { (eval echo "$as_me:22908: \"$ac_compile\"") >&5
22909   (eval $ac_compile) 2>&5
22910   ac_status=$?
22911   echo "$as_me:22911: \$? = $ac_status" >&5
22912   (exit $ac_status); } &&
22913          { ac_try='test -s conftest.$ac_objext'
22914   { (eval echo "$as_me:22914: \"$ac_try\"") >&5
22915   (eval $ac_try) 2>&5
22916   ac_status=$?
22917   echo "$as_me:22917: \$? = $ac_status" >&5
22918   (exit $ac_status); }; }; then
22919   :
22920 else
22921   echo "$as_me: failed program was:" >&5
22922 cat conftest.$ac_ext >&5
22923 cf_have_incdir=yes
22924 fi
22925 rm -f conftest.$ac_objext conftest.$ac_ext
22926                           CPPFLAGS=$cf_save_CPPFLAGS
22927                         fi
22928                   fi
22929                 fi
22930
22931                 if test "$cf_have_incdir" = no ; then
22932                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22933
22934 echo "${as_me:-configure}:22934: testing adding $cf_add_incdir to include-path ..." 1>&5
22935
22936                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22937
22938                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22939                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22940                   cf_add_incdir="$cf_top_incdir"
22941                 else
22942                   break
22943                 fi
22944           else
22945                 break
22946           fi
22947         done
22948   done
22949 fi
22950
22951 if test -n "$with_hashed_db/lib" ; then
22952         for cf_add_libdir in $with_hashed_db/lib
22953         do
22954                 if test $cf_add_libdir = /usr/lib ; then
22955                         :
22956                 elif test -d $cf_add_libdir
22957                 then
22958                         cf_have_libdir=no
22959                         if test -n "$LDFLAGS$LIBS" ; then
22960                                 # a loop is needed to ensure we can add subdirs of existing dirs
22961                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22962                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22963                                                 cf_have_libdir=yes; break
22964                                         fi
22965                                 done
22966                         fi
22967                         if test "$cf_have_libdir" = no ; then
22968                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22969
22970 echo "${as_me:-configure}:22970: testing adding $cf_add_libdir to library-path ..." 1>&5
22971
22972                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22973                         fi
22974                 fi
22975         done
22976 fi
22977
22978         else
22979                 case "$with_hashed_db" in
22980                 (./*|../*|/*)
22981                         { echo "$as_me:22981: WARNING: no such directory $with_hashed_db" >&5
22982 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22983                         ;;
22984                 (*)
22985
22986 cf_search=
22987
22988 test "x$prefix" != "xNONE" && \
22989 test -d "$prefix" && \
22990  {
22991         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22992         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22993         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22994         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22995         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22996         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22997 }
22998
22999 for cf_subdir_prefix in \
23000         /usr \
23001         /usr/local \
23002         /usr/pkg \
23003         /opt \
23004         /opt/local \
23005         $HOME
23006 do
23007
23008 test "x$cf_subdir_prefix" != "x$prefix" && \
23009 test -d "$cf_subdir_prefix" && \
23010 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23011         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23012         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
23013         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23014         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23015         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23016         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"
23017 }
23018
23019 done
23020
23021         for cf_item in $cf_search
23022         do
23023                 case $cf_item in
23024                 (*/$with_hashed_db)
23025
23026 if test -n "$cf_item" ; then
23027   for cf_add_incdir in $cf_item
23028   do
23029         while test $cf_add_incdir != /usr/include
23030         do
23031           if test -d $cf_add_incdir
23032           then
23033                 cf_have_incdir=no
23034                 if test -n "$CFLAGS$CPPFLAGS" ; then
23035                   # a loop is needed to ensure we can add subdirs of existing dirs
23036                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23037                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23038                           cf_have_incdir=yes; break
23039                         fi
23040                   done
23041                 fi
23042
23043                 if test "$cf_have_incdir" = no ; then
23044                   if test "$cf_add_incdir" = /usr/local/include ; then
23045                         if test "$GCC" = yes
23046                         then
23047                           cf_save_CPPFLAGS=$CPPFLAGS
23048
23049         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23050         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23051
23052                           cat >conftest.$ac_ext <<_ACEOF
23053 #line 23053 "configure"
23054 #include "confdefs.h"
23055 #include <stdio.h>
23056 int
23057 main (void)
23058 {
23059 printf("Hello")
23060   ;
23061   return 0;
23062 }
23063 _ACEOF
23064 rm -f conftest.$ac_objext
23065 if { (eval echo "$as_me:23065: \"$ac_compile\"") >&5
23066   (eval $ac_compile) 2>&5
23067   ac_status=$?
23068   echo "$as_me:23068: \$? = $ac_status" >&5
23069   (exit $ac_status); } &&
23070          { ac_try='test -s conftest.$ac_objext'
23071   { (eval echo "$as_me:23071: \"$ac_try\"") >&5
23072   (eval $ac_try) 2>&5
23073   ac_status=$?
23074   echo "$as_me:23074: \$? = $ac_status" >&5
23075   (exit $ac_status); }; }; then
23076   :
23077 else
23078   echo "$as_me: failed program was:" >&5
23079 cat conftest.$ac_ext >&5
23080 cf_have_incdir=yes
23081 fi
23082 rm -f conftest.$ac_objext conftest.$ac_ext
23083                           CPPFLAGS=$cf_save_CPPFLAGS
23084                         fi
23085                   fi
23086                 fi
23087
23088                 if test "$cf_have_incdir" = no ; then
23089                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23090
23091 echo "${as_me:-configure}:23091: testing adding $cf_add_incdir to include-path ..." 1>&5
23092
23093                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23094
23095                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23096                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23097                   cf_add_incdir="$cf_top_incdir"
23098                 else
23099                   break
23100                 fi
23101           else
23102                 break
23103           fi
23104         done
23105   done
23106 fi
23107
23108                         ;;
23109                 esac
23110         done
23111
23112 cf_search=
23113
23114 test "x$prefix" != "xNONE" && \
23115 test -d "$prefix" && \
23116  {
23117         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23118         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
23119         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23120         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23121         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23122         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23123 }
23124
23125 for cf_subdir_prefix in \
23126         /usr \
23127         /usr/local \
23128         /usr/pkg \
23129         /opt \
23130         /opt/local \
23131         $HOME
23132 do
23133
23134 test "x$cf_subdir_prefix" != "x$prefix" && \
23135 test -d "$cf_subdir_prefix" && \
23136 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23137         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23138         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23139         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23140         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23141         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23142         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"
23143 }
23144
23145 done
23146
23147         for cf_item in $cf_search
23148         do
23149                 case $cf_item in
23150                 (*/$with_hashed_db)
23151
23152 if test -n "$cf_item" ; then
23153         for cf_add_libdir in $cf_item
23154         do
23155                 if test $cf_add_libdir = /usr/lib ; then
23156                         :
23157                 elif test -d $cf_add_libdir
23158                 then
23159                         cf_have_libdir=no
23160                         if test -n "$LDFLAGS$LIBS" ; then
23161                                 # a loop is needed to ensure we can add subdirs of existing dirs
23162                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23163                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23164                                                 cf_have_libdir=yes; break
23165                                         fi
23166                                 done
23167                         fi
23168                         if test "$cf_have_libdir" = no ; then
23169                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23170
23171 echo "${as_me:-configure}:23171: testing adding $cf_add_libdir to library-path ..." 1>&5
23172
23173                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23174                         fi
23175                 fi
23176         done
23177 fi
23178
23179                         ;;
23180                 esac
23181         done
23182
23183                         ;;
23184                 esac
23185         fi
23186 esac
23187
23188 echo "$as_me:23188: checking for db.h" >&5
23189 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23190 if test "${ac_cv_header_db_h+set}" = set; then
23191   echo $ECHO_N "(cached) $ECHO_C" >&6
23192 else
23193   cat >conftest.$ac_ext <<_ACEOF
23194 #line 23194 "configure"
23195 #include "confdefs.h"
23196 #include <db.h>
23197 _ACEOF
23198 if { (eval echo "$as_me:23198: \"$ac_cpp conftest.$ac_ext\"") >&5
23199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23200   ac_status=$?
23201   egrep -v '^ *\+' conftest.er1 >conftest.err
23202   rm -f conftest.er1
23203   cat conftest.err >&5
23204   echo "$as_me:23204: \$? = $ac_status" >&5
23205   (exit $ac_status); } >/dev/null; then
23206   if test -s conftest.err; then
23207     ac_cpp_err=$ac_c_preproc_warn_flag
23208   else
23209     ac_cpp_err=
23210   fi
23211 else
23212   ac_cpp_err=yes
23213 fi
23214 if test -z "$ac_cpp_err"; then
23215   ac_cv_header_db_h=yes
23216 else
23217   echo "$as_me: failed program was:" >&5
23218   cat conftest.$ac_ext >&5
23219   ac_cv_header_db_h=no
23220 fi
23221 rm -f conftest.err conftest.$ac_ext
23222 fi
23223 echo "$as_me:23223: result: $ac_cv_header_db_h" >&5
23224 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23225 if test $ac_cv_header_db_h = yes; then
23226
23227 echo "$as_me:23227: checking for version of db" >&5
23228 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23229 if test "${cf_cv_hashed_db_version+set}" = set; then
23230   echo $ECHO_N "(cached) $ECHO_C" >&6
23231 else
23232
23233 cf_cv_hashed_db_version=unknown
23234
23235 for cf_db_version in 1 2 3 4 5 6
23236 do
23237
23238 echo "${as_me:-configure}:23238: testing checking for db version $cf_db_version ..." 1>&5
23239
23240         cat >conftest.$ac_ext <<_ACEOF
23241 #line 23241 "configure"
23242 #include "confdefs.h"
23243
23244 $ac_includes_default
23245 #include <db.h>
23246
23247 #ifdef DB_VERSION_MAJOR
23248         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23249 #if $cf_db_version == DB_VERSION_MAJOR
23250         /* ok */
23251 #else
23252         make an error
23253 #endif
23254 #else
23255 #if $cf_db_version == 1
23256         /* ok: assuming this is DB 1.8.5 */
23257 #else
23258         make an error
23259 #endif
23260 #endif
23261
23262 int
23263 main (void)
23264 {
23265 DBT *foo = 0
23266   ;
23267   return 0;
23268 }
23269 _ACEOF
23270 rm -f conftest.$ac_objext
23271 if { (eval echo "$as_me:23271: \"$ac_compile\"") >&5
23272   (eval $ac_compile) 2>&5
23273   ac_status=$?
23274   echo "$as_me:23274: \$? = $ac_status" >&5
23275   (exit $ac_status); } &&
23276          { ac_try='test -s conftest.$ac_objext'
23277   { (eval echo "$as_me:23277: \"$ac_try\"") >&5
23278   (eval $ac_try) 2>&5
23279   ac_status=$?
23280   echo "$as_me:23280: \$? = $ac_status" >&5
23281   (exit $ac_status); }; }; then
23282
23283         cf_cv_hashed_db_version=$cf_db_version
23284         break
23285
23286 else
23287   echo "$as_me: failed program was:" >&5
23288 cat conftest.$ac_ext >&5
23289 fi
23290 rm -f conftest.$ac_objext conftest.$ac_ext
23291 done
23292
23293 fi
23294 echo "$as_me:23294: result: $cf_cv_hashed_db_version" >&5
23295 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23296
23297 if test "$cf_cv_hashed_db_version" = unknown ; then
23298         { { echo "$as_me:23298: error: Cannot determine version of db" >&5
23299 echo "$as_me: error: Cannot determine version of db" >&2;}
23300    { (exit 1); exit 1; }; }
23301 else
23302
23303 echo "$as_me:23303: checking for db libraries" >&5
23304 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23305 if test "${cf_cv_hashed_db_libs+set}" = set; then
23306   echo $ECHO_N "(cached) $ECHO_C" >&6
23307 else
23308
23309 cf_cv_hashed_db_libs=unknown
23310 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23311 do
23312         cf_save_libs="$LIBS"
23313         if test -n "$cf_db_libs"; then
23314
23315 cf_add_libs="$LIBS"
23316 # reverse order
23317 cf_add_0lib=
23318 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23319 # filter duplicates
23320 for cf_add_1lib in $cf_add_0lib; do
23321         for cf_add_2lib in $cf_add_libs; do
23322                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23323                         cf_add_1lib=
23324                         break
23325                 fi
23326         done
23327         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23328 done
23329 LIBS="$cf_add_libs"
23330
23331         fi
23332
23333 echo "${as_me:-configure}:23333: testing checking for library "$cf_db_libs" ..." 1>&5
23334
23335         cat >conftest.$ac_ext <<_ACEOF
23336 #line 23336 "configure"
23337 #include "confdefs.h"
23338
23339 $ac_includes_default
23340 #include <db.h>
23341
23342 int
23343 main (void)
23344 {
23345
23346         char *path = "/tmp/foo";
23347 #ifdef DB_VERSION_MAJOR
23348 #if DB_VERSION_MAJOR >= 4
23349         DB *result = 0;
23350         db_create(&result, NULL, 0);
23351         result->open(result,
23352                 NULL,
23353                 path,
23354                 path,
23355                 DB_HASH,
23356                 DB_CREATE,
23357                 0644);
23358 #elif DB_VERSION_MAJOR >= 3
23359         DB *result = 0;
23360         db_create(&result, NULL, 0);
23361         result->open(result,
23362                 path,
23363                 path,
23364                 DB_HASH,
23365                 DB_CREATE,
23366                 0644);
23367 #elif DB_VERSION_MAJOR >= 2
23368         DB *result = 0;
23369         db_open(path,
23370                 DB_HASH,
23371                 DB_CREATE,
23372                 0644,
23373                 (DB_ENV *) 0,
23374                 (DB_INFO *) 0,
23375                 &result);
23376 #endif /* DB_VERSION_MAJOR */
23377 #else
23378         DB *result = dbopen(path,
23379                      2,
23380                      0644,
23381                      DB_HASH,
23382                      0);
23383 #endif
23384         ${cf_cv_main_return:-return}(result != 0)
23385
23386   ;
23387   return 0;
23388 }
23389 _ACEOF
23390 rm -f conftest.$ac_objext conftest$ac_exeext
23391 if { (eval echo "$as_me:23391: \"$ac_link\"") >&5
23392   (eval $ac_link) 2>&5
23393   ac_status=$?
23394   echo "$as_me:23394: \$? = $ac_status" >&5
23395   (exit $ac_status); } &&
23396          { ac_try='test -s conftest$ac_exeext'
23397   { (eval echo "$as_me:23397: \"$ac_try\"") >&5
23398   (eval $ac_try) 2>&5
23399   ac_status=$?
23400   echo "$as_me:23400: \$? = $ac_status" >&5
23401   (exit $ac_status); }; }; then
23402
23403         if test -n "$cf_db_libs" ; then
23404                 cf_cv_hashed_db_libs=$cf_db_libs
23405         else
23406                 cf_cv_hashed_db_libs=default
23407         fi
23408         LIBS="$cf_save_libs"
23409         break
23410
23411 else
23412   echo "$as_me: failed program was:" >&5
23413 cat conftest.$ac_ext >&5
23414 fi
23415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23416         LIBS="$cf_save_libs"
23417 done
23418
23419 fi
23420 echo "$as_me:23420: result: $cf_cv_hashed_db_libs" >&5
23421 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23422
23423         if test "$cf_cv_hashed_db_libs" = unknown ; then
23424                 { { echo "$as_me:23424: error: Cannot determine library for db" >&5
23425 echo "$as_me: error: Cannot determine library for db" >&2;}
23426    { (exit 1); exit 1; }; }
23427         elif test "$cf_cv_hashed_db_libs" != default ; then
23428
23429 cf_add_libs="$LIBS"
23430 # reverse order
23431 cf_add_0lib=
23432 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23433 # filter duplicates
23434 for cf_add_1lib in $cf_add_0lib; do
23435         for cf_add_2lib in $cf_add_libs; do
23436                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23437                         cf_add_1lib=
23438                         break
23439                 fi
23440         done
23441         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23442 done
23443 LIBS="$cf_add_libs"
23444
23445         fi
23446 fi
23447
23448 else
23449
23450         { { echo "$as_me:23450: error: Cannot find db.h" >&5
23451 echo "$as_me: error: Cannot find db.h" >&2;}
23452    { (exit 1); exit 1; }; }
23453
23454 fi
23455
23456 fi
23457
23458 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23459         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23460         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23461 fi
23462
23463 # Just in case, check if the C compiler has a bool type.
23464
23465 echo "$as_me:23465: checking if we should include stdbool.h" >&5
23466 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23467
23468 if test "${cf_cv_header_stdbool_h+set}" = set; then
23469   echo $ECHO_N "(cached) $ECHO_C" >&6
23470 else
23471
23472         cat >conftest.$ac_ext <<_ACEOF
23473 #line 23473 "configure"
23474 #include "confdefs.h"
23475
23476 int
23477 main (void)
23478 {
23479 bool foo = false
23480   ;
23481   return 0;
23482 }
23483 _ACEOF
23484 rm -f conftest.$ac_objext
23485 if { (eval echo "$as_me:23485: \"$ac_compile\"") >&5
23486   (eval $ac_compile) 2>&5
23487   ac_status=$?
23488   echo "$as_me:23488: \$? = $ac_status" >&5
23489   (exit $ac_status); } &&
23490          { ac_try='test -s conftest.$ac_objext'
23491   { (eval echo "$as_me:23491: \"$ac_try\"") >&5
23492   (eval $ac_try) 2>&5
23493   ac_status=$?
23494   echo "$as_me:23494: \$? = $ac_status" >&5
23495   (exit $ac_status); }; }; then
23496   cf_cv_header_stdbool_h=0
23497 else
23498   echo "$as_me: failed program was:" >&5
23499 cat conftest.$ac_ext >&5
23500 cat >conftest.$ac_ext <<_ACEOF
23501 #line 23501 "configure"
23502 #include "confdefs.h"
23503
23504 #ifndef __BEOS__
23505 #include <stdbool.h>
23506 #endif
23507
23508 int
23509 main (void)
23510 {
23511 bool foo = false
23512   ;
23513   return 0;
23514 }
23515 _ACEOF
23516 rm -f conftest.$ac_objext
23517 if { (eval echo "$as_me:23517: \"$ac_compile\"") >&5
23518   (eval $ac_compile) 2>&5
23519   ac_status=$?
23520   echo "$as_me:23520: \$? = $ac_status" >&5
23521   (exit $ac_status); } &&
23522          { ac_try='test -s conftest.$ac_objext'
23523   { (eval echo "$as_me:23523: \"$ac_try\"") >&5
23524   (eval $ac_try) 2>&5
23525   ac_status=$?
23526   echo "$as_me:23526: \$? = $ac_status" >&5
23527   (exit $ac_status); }; }; then
23528   cf_cv_header_stdbool_h=1
23529 else
23530   echo "$as_me: failed program was:" >&5
23531 cat conftest.$ac_ext >&5
23532 cf_cv_header_stdbool_h=0
23533 fi
23534 rm -f conftest.$ac_objext conftest.$ac_ext
23535 fi
23536 rm -f conftest.$ac_objext conftest.$ac_ext
23537 fi
23538
23539 if test "$cf_cv_header_stdbool_h" = 1
23540 then    echo "$as_me:23540: result: yes" >&5
23541 echo "${ECHO_T}yes" >&6
23542 else    echo "$as_me:23542: result: no" >&5
23543 echo "${ECHO_T}no" >&6
23544 fi
23545
23546 echo "$as_me:23546: checking for builtin bool type" >&5
23547 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23548
23549 if test "${cf_cv_cc_bool_type+set}" = set; then
23550   echo $ECHO_N "(cached) $ECHO_C" >&6
23551 else
23552
23553         cat >conftest.$ac_ext <<_ACEOF
23554 #line 23554 "configure"
23555 #include "confdefs.h"
23556
23557 #include <stdio.h>
23558 #include <sys/types.h>
23559
23560 int
23561 main (void)
23562 {
23563 bool x = false
23564   ;
23565   return 0;
23566 }
23567 _ACEOF
23568 rm -f conftest.$ac_objext
23569 if { (eval echo "$as_me:23569: \"$ac_compile\"") >&5
23570   (eval $ac_compile) 2>&5
23571   ac_status=$?
23572   echo "$as_me:23572: \$? = $ac_status" >&5
23573   (exit $ac_status); } &&
23574          { ac_try='test -s conftest.$ac_objext'
23575   { (eval echo "$as_me:23575: \"$ac_try\"") >&5
23576   (eval $ac_try) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit $ac_status); }; }; then
23580   cf_cv_cc_bool_type=1
23581 else
23582   echo "$as_me: failed program was:" >&5
23583 cat conftest.$ac_ext >&5
23584 cf_cv_cc_bool_type=0
23585 fi
23586 rm -f conftest.$ac_objext conftest.$ac_ext
23587
23588 fi
23589
23590 if test "$cf_cv_cc_bool_type" = 1
23591 then    echo "$as_me:23591: result: yes" >&5
23592 echo "${ECHO_T}yes" >&6
23593 else    echo "$as_me:23593: result: no" >&5
23594 echo "${ECHO_T}no" >&6
23595 fi
23596
23597 # Check for C++ compiler characteristics (and ensure that it's there!)
23598 if test -n "$CXX" ; then
23599         ac_ext=cc
23600 ac_cpp='$CXXCPP $CPPFLAGS'
23601 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23602 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23603 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23604 ac_main_return=return
23605
23606 if test -n "$GXX" ; then
23607
23608         cf_save="$LIBS"
23609         LIBS="$LIBS $CXXLIBS"
23610         echo "$as_me:23610: checking if we already have C++ library" >&5
23611 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23612         cat >conftest.$ac_ext <<_ACEOF
23613 #line 23613 "configure"
23614 #include "confdefs.h"
23615
23616                         #include <iostream>
23617 int
23618 main (void)
23619 {
23620
23621                         std::cout << "Hello World!" << std::endl;
23622   ;
23623   return 0;
23624 }
23625 _ACEOF
23626 rm -f conftest.$ac_objext conftest$ac_exeext
23627 if { (eval echo "$as_me:23627: \"$ac_link\"") >&5
23628   (eval $ac_link) 2>&5
23629   ac_status=$?
23630   echo "$as_me:23630: \$? = $ac_status" >&5
23631   (exit $ac_status); } &&
23632          { ac_try='test -s conftest$ac_exeext'
23633   { (eval echo "$as_me:23633: \"$ac_try\"") >&5
23634   (eval $ac_try) 2>&5
23635   ac_status=$?
23636   echo "$as_me:23636: \$? = $ac_status" >&5
23637   (exit $ac_status); }; }; then
23638   cf_have_libstdcpp=yes
23639 else
23640   echo "$as_me: failed program was:" >&5
23641 cat conftest.$ac_ext >&5
23642 cf_have_libstdcpp=no
23643 fi
23644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23645         echo "$as_me:23645: result: $cf_have_libstdcpp" >&5
23646 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23647         LIBS="$cf_save"
23648
23649         if test $cf_have_libstdcpp != yes
23650         then
23651                 case $cf_cv_system_name in
23652                 (os2*)
23653                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23654                                 cf_stdcpp_libname=stdcpp
23655                         else
23656                                 cf_stdcpp_libname=stdc++
23657                         fi
23658                         ;;
23659                 (*)
23660                         cf_stdcpp_libname=stdc++
23661                         ;;
23662                 esac
23663
23664                 echo "$as_me:23664: checking for library $cf_stdcpp_libname" >&5
23665 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23666 if test "${cf_cv_libstdcpp+set}" = set; then
23667   echo $ECHO_N "(cached) $ECHO_C" >&6
23668 else
23669
23670                         cf_save="$LIBS"
23671                         LIBS="$LIBS $CXXLIBS"
23672
23673 cf_add_libs="$LIBS"
23674 # reverse order
23675 cf_add_0lib=
23676 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23677 # filter duplicates
23678 for cf_add_1lib in $cf_add_0lib; do
23679         for cf_add_2lib in $cf_add_libs; do
23680                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23681                         cf_add_1lib=
23682                         break
23683                 fi
23684         done
23685         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23686 done
23687 LIBS="$cf_add_libs"
23688
23689                 cat >conftest.$ac_ext <<_ACEOF
23690 #line 23690 "configure"
23691 #include "confdefs.h"
23692
23693                                 #include <iostream>
23694 int
23695 main (void)
23696 {
23697
23698                                 std::cout << "Hello World!" << std::endl;
23699   ;
23700   return 0;
23701 }
23702 _ACEOF
23703 rm -f conftest.$ac_objext conftest$ac_exeext
23704 if { (eval echo "$as_me:23704: \"$ac_link\"") >&5
23705   (eval $ac_link) 2>&5
23706   ac_status=$?
23707   echo "$as_me:23707: \$? = $ac_status" >&5
23708   (exit $ac_status); } &&
23709          { ac_try='test -s conftest$ac_exeext'
23710   { (eval echo "$as_me:23710: \"$ac_try\"") >&5
23711   (eval $ac_try) 2>&5
23712   ac_status=$?
23713   echo "$as_me:23713: \$? = $ac_status" >&5
23714   (exit $ac_status); }; }; then
23715   cf_cv_libstdcpp=yes
23716 else
23717   echo "$as_me: failed program was:" >&5
23718 cat conftest.$ac_ext >&5
23719 cf_cv_libstdcpp=no
23720 fi
23721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23722                         LIBS="$cf_save"
23723
23724 fi
23725 echo "$as_me:23725: result: $cf_cv_libstdcpp" >&5
23726 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23727                 test "$cf_cv_libstdcpp" = yes && {
23728 cf_add_libs="$CXXLIBS"
23729 # reverse order
23730 cf_add_0lib=
23731 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23732 # filter duplicates
23733 for cf_add_1lib in $cf_add_0lib; do
23734         for cf_add_2lib in $cf_add_libs; do
23735                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23736                         cf_add_1lib=
23737                         break
23738                 fi
23739         done
23740         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23741 done
23742 CXXLIBS="$cf_add_libs"
23743  }
23744         fi
23745 fi
23746
23747         echo "$as_me:23747: checking whether $CXX understands -c and -o together" >&5
23748 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23749 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23750   echo $ECHO_N "(cached) $ECHO_C" >&6
23751 else
23752
23753 cat > conftest.$ac_ext <<CF_EOF
23754 int main(void)
23755 {
23756         ${cf_cv_main_return:-return}(0);
23757 }
23758 CF_EOF
23759 # We do the test twice because some compilers refuse to overwrite an
23760 # existing .o file with -o, though they will create one.
23761 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23762 if { (eval echo "$as_me:23762: \"$ac_try\"") >&5
23763   (eval $ac_try) 2>&5
23764   ac_status=$?
23765   echo "$as_me:23765: \$? = $ac_status" >&5
23766   (exit $ac_status); } &&
23767   test -f conftest2.$ac_objext && { (eval echo "$as_me:23767: \"$ac_try\"") >&5
23768   (eval $ac_try) 2>&5
23769   ac_status=$?
23770   echo "$as_me:23770: \$? = $ac_status" >&5
23771   (exit $ac_status); };
23772 then
23773   eval cf_cv_prog_CXX_c_o=yes
23774 else
23775   eval cf_cv_prog_CXX_c_o=no
23776 fi
23777 rm -rf conftest*
23778
23779 fi
23780 if test $cf_cv_prog_CXX_c_o = yes; then
23781   echo "$as_me:23781: result: yes" >&5
23782 echo "${ECHO_T}yes" >&6
23783 else
23784   echo "$as_me:23784: result: no" >&5
23785 echo "${ECHO_T}no" >&6
23786 fi
23787
23788         case $GXX_VERSION in
23789         (1.*|2.[0-6]*|[1-9][0-9].*)
23790                 cf_cxx_library=yes
23791                 ;;
23792         (*-2.7*|2.7*)
23793
23794 cf_cxx_library=unknown
23795 case $cf_cv_system_name in
23796 (os2*)
23797         cf_gpp_libname=gpp
23798         ;;
23799 (*)
23800         cf_gpp_libname=g++
23801         ;;
23802 esac
23803 if test "$GXX" = yes; then
23804         echo "$as_me:23804: checking for lib$cf_gpp_libname" >&5
23805 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23806         cf_save="$LIBS"
23807
23808 cf_add_libs="$LIBS"
23809 # reverse order
23810 cf_add_0lib=
23811 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23812 # filter duplicates
23813 for cf_add_1lib in $cf_add_0lib; do
23814         for cf_add_2lib in $cf_add_libs; do
23815                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23816                         cf_add_1lib=
23817                         break
23818                 fi
23819         done
23820         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23821 done
23822 LIBS="$cf_add_libs"
23823
23824         cat >conftest.$ac_ext <<_ACEOF
23825 #line 23825 "configure"
23826 #include "confdefs.h"
23827
23828 #include <$cf_gpp_libname/builtin.h>
23829
23830 int
23831 main (void)
23832 {
23833 two_arg_error_handler_t foo2 = lib_error_handler
23834   ;
23835   return 0;
23836 }
23837 _ACEOF
23838 rm -f conftest.$ac_objext conftest$ac_exeext
23839 if { (eval echo "$as_me:23839: \"$ac_link\"") >&5
23840   (eval $ac_link) 2>&5
23841   ac_status=$?
23842   echo "$as_me:23842: \$? = $ac_status" >&5
23843   (exit $ac_status); } &&
23844          { ac_try='test -s conftest$ac_exeext'
23845   { (eval echo "$as_me:23845: \"$ac_try\"") >&5
23846   (eval $ac_try) 2>&5
23847   ac_status=$?
23848   echo "$as_me:23848: \$? = $ac_status" >&5
23849   (exit $ac_status); }; }; then
23850   cf_cxx_library=yes
23851
23852 cf_add_libs="$CXXLIBS"
23853 # reverse order
23854 cf_add_0lib=
23855 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23856 # filter duplicates
23857 for cf_add_1lib in $cf_add_0lib; do
23858         for cf_add_2lib in $cf_add_libs; do
23859                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23860                         cf_add_1lib=
23861                         break
23862                 fi
23863         done
23864         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23865 done
23866 CXXLIBS="$cf_add_libs"
23867
23868          if test "$cf_gpp_libname" = cpp ; then
23869
23870 cat >>confdefs.h <<\EOF
23871 #define HAVE_GPP_BUILTIN_H 1
23872 EOF
23873
23874          else
23875
23876 cat >>confdefs.h <<\EOF
23877 #define HAVE_GXX_BUILTIN_H 1
23878 EOF
23879
23880          fi
23881 else
23882   echo "$as_me: failed program was:" >&5
23883 cat conftest.$ac_ext >&5
23884 cat >conftest.$ac_ext <<_ACEOF
23885 #line 23885 "configure"
23886 #include "confdefs.h"
23887
23888 #include <builtin.h>
23889
23890 int
23891 main (void)
23892 {
23893 two_arg_error_handler_t foo2 = lib_error_handler
23894   ;
23895   return 0;
23896 }
23897 _ACEOF
23898 rm -f conftest.$ac_objext conftest$ac_exeext
23899 if { (eval echo "$as_me:23899: \"$ac_link\"") >&5
23900   (eval $ac_link) 2>&5
23901   ac_status=$?
23902   echo "$as_me:23902: \$? = $ac_status" >&5
23903   (exit $ac_status); } &&
23904          { ac_try='test -s conftest$ac_exeext'
23905   { (eval echo "$as_me:23905: \"$ac_try\"") >&5
23906   (eval $ac_try) 2>&5
23907   ac_status=$?
23908   echo "$as_me:23908: \$? = $ac_status" >&5
23909   (exit $ac_status); }; }; then
23910   cf_cxx_library=yes
23911
23912 cf_add_libs="$CXXLIBS"
23913 # reverse order
23914 cf_add_0lib=
23915 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23916 # filter duplicates
23917 for cf_add_1lib in $cf_add_0lib; do
23918         for cf_add_2lib in $cf_add_libs; do
23919                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23920                         cf_add_1lib=
23921                         break
23922                 fi
23923         done
23924         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23925 done
23926 CXXLIBS="$cf_add_libs"
23927
23928 cat >>confdefs.h <<\EOF
23929 #define HAVE_BUILTIN_H 1
23930 EOF
23931
23932 else
23933   echo "$as_me: failed program was:" >&5
23934 cat conftest.$ac_ext >&5
23935 cf_cxx_library=no
23936 fi
23937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23938 fi
23939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23940         LIBS="$cf_save"
23941         echo "$as_me:23941: result: $cf_cxx_library" >&5
23942 echo "${ECHO_T}$cf_cxx_library" >&6
23943 fi
23944
23945                 ;;
23946         (*)
23947                 cf_cxx_library=no
23948                 ;;
23949         esac
23950
23951         ac_ext=cc
23952 ac_cpp='$CXXCPP $CPPFLAGS'
23953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23956 ac_main_return=return
23957 echo "$as_me:23957: checking how to run the C++ preprocessor" >&5
23958 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23959 if test -z "$CXXCPP"; then
23960   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23961   echo $ECHO_N "(cached) $ECHO_C" >&6
23962 else
23963       # Double quotes because CXXCPP needs to be expanded
23964     for CXXCPP in "$CXX -E" "/lib/cpp"
23965     do
23966       ac_preproc_ok=false
23967 for ac_cxx_preproc_warn_flag in '' yes
23968 do
23969   # Use a header file that comes with gcc, so configuring glibc
23970   # with a fresh cross-compiler works.
23971   # On the NeXT, cc -E runs the code through the compiler's parser,
23972   # not just through cpp. "Syntax error" is here to catch this case.
23973   cat >conftest.$ac_ext <<_ACEOF
23974 #line 23974 "configure"
23975 #include "confdefs.h"
23976 #include <assert.h>
23977                      Syntax error
23978 _ACEOF
23979 if { (eval echo "$as_me:23979: \"$ac_cpp conftest.$ac_ext\"") >&5
23980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23981   ac_status=$?
23982   egrep -v '^ *\+' conftest.er1 >conftest.err
23983   rm -f conftest.er1
23984   cat conftest.err >&5
23985   echo "$as_me:23985: \$? = $ac_status" >&5
23986   (exit $ac_status); } >/dev/null; then
23987   if test -s conftest.err; then
23988     ac_cpp_err=$ac_cxx_preproc_warn_flag
23989   else
23990     ac_cpp_err=
23991   fi
23992 else
23993   ac_cpp_err=yes
23994 fi
23995 if test -z "$ac_cpp_err"; then
23996   :
23997 else
23998   echo "$as_me: failed program was:" >&5
23999   cat conftest.$ac_ext >&5
24000   # Broken: fails on valid input.
24001 continue
24002 fi
24003 rm -f conftest.err conftest.$ac_ext
24004
24005   # OK, works on sane cases.  Now check whether non-existent headers
24006   # can be detected and how.
24007   cat >conftest.$ac_ext <<_ACEOF
24008 #line 24008 "configure"
24009 #include "confdefs.h"
24010 #include <ac_nonexistent.h>
24011 _ACEOF
24012 if { (eval echo "$as_me:24012: \"$ac_cpp conftest.$ac_ext\"") >&5
24013   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24014   ac_status=$?
24015   egrep -v '^ *\+' conftest.er1 >conftest.err
24016   rm -f conftest.er1
24017   cat conftest.err >&5
24018   echo "$as_me:24018: \$? = $ac_status" >&5
24019   (exit $ac_status); } >/dev/null; then
24020   if test -s conftest.err; then
24021     ac_cpp_err=$ac_cxx_preproc_warn_flag
24022   else
24023     ac_cpp_err=
24024   fi
24025 else
24026   ac_cpp_err=yes
24027 fi
24028 if test -z "$ac_cpp_err"; then
24029   # Broken: success on invalid input.
24030 continue
24031 else
24032   echo "$as_me: failed program was:" >&5
24033   cat conftest.$ac_ext >&5
24034   # Passes both tests.
24035 ac_preproc_ok=:
24036 break
24037 fi
24038 rm -f conftest.err conftest.$ac_ext
24039
24040 done
24041 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24042 rm -f conftest.err conftest.$ac_ext
24043 if $ac_preproc_ok; then
24044   break
24045 fi
24046
24047     done
24048     ac_cv_prog_CXXCPP=$CXXCPP
24049
24050 fi
24051   CXXCPP=$ac_cv_prog_CXXCPP
24052 else
24053   ac_cv_prog_CXXCPP=$CXXCPP
24054 fi
24055 echo "$as_me:24055: result: $CXXCPP" >&5
24056 echo "${ECHO_T}$CXXCPP" >&6
24057 ac_preproc_ok=false
24058 for ac_cxx_preproc_warn_flag in '' yes
24059 do
24060   # Use a header file that comes with gcc, so configuring glibc
24061   # with a fresh cross-compiler works.
24062   # On the NeXT, cc -E runs the code through the compiler's parser,
24063   # not just through cpp. "Syntax error" is here to catch this case.
24064   cat >conftest.$ac_ext <<_ACEOF
24065 #line 24065 "configure"
24066 #include "confdefs.h"
24067 #include <assert.h>
24068                      Syntax error
24069 _ACEOF
24070 if { (eval echo "$as_me:24070: \"$ac_cpp conftest.$ac_ext\"") >&5
24071   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24072   ac_status=$?
24073   egrep -v '^ *\+' conftest.er1 >conftest.err
24074   rm -f conftest.er1
24075   cat conftest.err >&5
24076   echo "$as_me:24076: \$? = $ac_status" >&5
24077   (exit $ac_status); } >/dev/null; then
24078   if test -s conftest.err; then
24079     ac_cpp_err=$ac_cxx_preproc_warn_flag
24080   else
24081     ac_cpp_err=
24082   fi
24083 else
24084   ac_cpp_err=yes
24085 fi
24086 if test -z "$ac_cpp_err"; then
24087   :
24088 else
24089   echo "$as_me: failed program was:" >&5
24090   cat conftest.$ac_ext >&5
24091   # Broken: fails on valid input.
24092 continue
24093 fi
24094 rm -f conftest.err conftest.$ac_ext
24095
24096   # OK, works on sane cases.  Now check whether non-existent headers
24097   # can be detected and how.
24098   cat >conftest.$ac_ext <<_ACEOF
24099 #line 24099 "configure"
24100 #include "confdefs.h"
24101 #include <ac_nonexistent.h>
24102 _ACEOF
24103 if { (eval echo "$as_me:24103: \"$ac_cpp conftest.$ac_ext\"") >&5
24104   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24105   ac_status=$?
24106   egrep -v '^ *\+' conftest.er1 >conftest.err
24107   rm -f conftest.er1
24108   cat conftest.err >&5
24109   echo "$as_me:24109: \$? = $ac_status" >&5
24110   (exit $ac_status); } >/dev/null; then
24111   if test -s conftest.err; then
24112     ac_cpp_err=$ac_cxx_preproc_warn_flag
24113   else
24114     ac_cpp_err=
24115   fi
24116 else
24117   ac_cpp_err=yes
24118 fi
24119 if test -z "$ac_cpp_err"; then
24120   # Broken: success on invalid input.
24121 continue
24122 else
24123   echo "$as_me: failed program was:" >&5
24124   cat conftest.$ac_ext >&5
24125   # Passes both tests.
24126 ac_preproc_ok=:
24127 break
24128 fi
24129 rm -f conftest.err conftest.$ac_ext
24130
24131 done
24132 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24133 rm -f conftest.err conftest.$ac_ext
24134 if $ac_preproc_ok; then
24135   :
24136 else
24137   { { echo "$as_me:24137: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24138 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24139    { (exit 1); exit 1; }; }
24140 fi
24141
24142 ac_ext=cc
24143 ac_cpp='$CXXCPP $CPPFLAGS'
24144 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24145 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24146 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24147 ac_main_return=return
24148
24149 for ac_header in typeinfo
24150 do
24151 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24152 echo "$as_me:24152: checking for $ac_header" >&5
24153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24155   echo $ECHO_N "(cached) $ECHO_C" >&6
24156 else
24157   cat >conftest.$ac_ext <<_ACEOF
24158 #line 24158 "configure"
24159 #include "confdefs.h"
24160 #include <$ac_header>
24161 _ACEOF
24162 if { (eval echo "$as_me:24162: \"$ac_cpp conftest.$ac_ext\"") >&5
24163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24164   ac_status=$?
24165   egrep -v '^ *\+' conftest.er1 >conftest.err
24166   rm -f conftest.er1
24167   cat conftest.err >&5
24168   echo "$as_me:24168: \$? = $ac_status" >&5
24169   (exit $ac_status); } >/dev/null; then
24170   if test -s conftest.err; then
24171     ac_cpp_err=$ac_cxx_preproc_warn_flag
24172   else
24173     ac_cpp_err=
24174   fi
24175 else
24176   ac_cpp_err=yes
24177 fi
24178 if test -z "$ac_cpp_err"; then
24179   eval "$as_ac_Header=yes"
24180 else
24181   echo "$as_me: failed program was:" >&5
24182   cat conftest.$ac_ext >&5
24183   eval "$as_ac_Header=no"
24184 fi
24185 rm -f conftest.err conftest.$ac_ext
24186 fi
24187 echo "$as_me:24187: result: `eval echo '${'$as_ac_Header'}'`" >&5
24188 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24189 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24190   cat >>confdefs.h <<EOF
24191 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24192 EOF
24193
24194 fi
24195 done
24196
24197 for ac_header in iostream
24198 do
24199 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24200 echo "$as_me:24200: checking for $ac_header" >&5
24201 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24203   echo $ECHO_N "(cached) $ECHO_C" >&6
24204 else
24205   cat >conftest.$ac_ext <<_ACEOF
24206 #line 24206 "configure"
24207 #include "confdefs.h"
24208 #include <$ac_header>
24209 _ACEOF
24210 if { (eval echo "$as_me:24210: \"$ac_cpp conftest.$ac_ext\"") >&5
24211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24212   ac_status=$?
24213   egrep -v '^ *\+' conftest.er1 >conftest.err
24214   rm -f conftest.er1
24215   cat conftest.err >&5
24216   echo "$as_me:24216: \$? = $ac_status" >&5
24217   (exit $ac_status); } >/dev/null; then
24218   if test -s conftest.err; then
24219     ac_cpp_err=$ac_cxx_preproc_warn_flag
24220   else
24221     ac_cpp_err=
24222   fi
24223 else
24224   ac_cpp_err=yes
24225 fi
24226 if test -z "$ac_cpp_err"; then
24227   eval "$as_ac_Header=yes"
24228 else
24229   echo "$as_me: failed program was:" >&5
24230   cat conftest.$ac_ext >&5
24231   eval "$as_ac_Header=no"
24232 fi
24233 rm -f conftest.err conftest.$ac_ext
24234 fi
24235 echo "$as_me:24235: result: `eval echo '${'$as_ac_Header'}'`" >&5
24236 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24238   cat >>confdefs.h <<EOF
24239 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24240 EOF
24241
24242 fi
24243 done
24244
24245 if test x"$ac_cv_header_iostream" = xyes ; then
24246         echo "$as_me:24246: checking if iostream uses std-namespace" >&5
24247 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24248         cat >conftest.$ac_ext <<_ACEOF
24249 #line 24249 "configure"
24250 #include "confdefs.h"
24251
24252 #include <iostream>
24253 using std::endl;
24254 using std::cerr;
24255 int
24256 main (void)
24257 {
24258
24259 cerr << "testing" << endl;
24260
24261   ;
24262   return 0;
24263 }
24264 _ACEOF
24265 rm -f conftest.$ac_objext
24266 if { (eval echo "$as_me:24266: \"$ac_compile\"") >&5
24267   (eval $ac_compile) 2>&5
24268   ac_status=$?
24269   echo "$as_me:24269: \$? = $ac_status" >&5
24270   (exit $ac_status); } &&
24271          { ac_try='test -s conftest.$ac_objext'
24272   { (eval echo "$as_me:24272: \"$ac_try\"") >&5
24273   (eval $ac_try) 2>&5
24274   ac_status=$?
24275   echo "$as_me:24275: \$? = $ac_status" >&5
24276   (exit $ac_status); }; }; then
24277   cf_iostream_namespace=yes
24278 else
24279   echo "$as_me: failed program was:" >&5
24280 cat conftest.$ac_ext >&5
24281 cf_iostream_namespace=no
24282 fi
24283 rm -f conftest.$ac_objext conftest.$ac_ext
24284         echo "$as_me:24284: result: $cf_iostream_namespace" >&5
24285 echo "${ECHO_T}$cf_iostream_namespace" >&6
24286         if test "$cf_iostream_namespace" = yes ; then
24287
24288 cat >>confdefs.h <<\EOF
24289 #define IOSTREAM_NAMESPACE 1
24290 EOF
24291
24292         fi
24293 fi
24294
24295 echo "$as_me:24295: checking if we should include stdbool.h" >&5
24296 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24297
24298 if test "${cf_cv_header_stdbool_h+set}" = set; then
24299   echo $ECHO_N "(cached) $ECHO_C" >&6
24300 else
24301
24302         cat >conftest.$ac_ext <<_ACEOF
24303 #line 24303 "configure"
24304 #include "confdefs.h"
24305
24306 int
24307 main (void)
24308 {
24309 bool foo = false
24310   ;
24311   return 0;
24312 }
24313 _ACEOF
24314 rm -f conftest.$ac_objext
24315 if { (eval echo "$as_me:24315: \"$ac_compile\"") >&5
24316   (eval $ac_compile) 2>&5
24317   ac_status=$?
24318   echo "$as_me:24318: \$? = $ac_status" >&5
24319   (exit $ac_status); } &&
24320          { ac_try='test -s conftest.$ac_objext'
24321   { (eval echo "$as_me:24321: \"$ac_try\"") >&5
24322   (eval $ac_try) 2>&5
24323   ac_status=$?
24324   echo "$as_me:24324: \$? = $ac_status" >&5
24325   (exit $ac_status); }; }; then
24326   cf_cv_header_stdbool_h=0
24327 else
24328   echo "$as_me: failed program was:" >&5
24329 cat conftest.$ac_ext >&5
24330 cat >conftest.$ac_ext <<_ACEOF
24331 #line 24331 "configure"
24332 #include "confdefs.h"
24333
24334 #ifndef __BEOS__
24335 #include <stdbool.h>
24336 #endif
24337
24338 int
24339 main (void)
24340 {
24341 bool foo = false
24342   ;
24343   return 0;
24344 }
24345 _ACEOF
24346 rm -f conftest.$ac_objext
24347 if { (eval echo "$as_me:24347: \"$ac_compile\"") >&5
24348   (eval $ac_compile) 2>&5
24349   ac_status=$?
24350   echo "$as_me:24350: \$? = $ac_status" >&5
24351   (exit $ac_status); } &&
24352          { ac_try='test -s conftest.$ac_objext'
24353   { (eval echo "$as_me:24353: \"$ac_try\"") >&5
24354   (eval $ac_try) 2>&5
24355   ac_status=$?
24356   echo "$as_me:24356: \$? = $ac_status" >&5
24357   (exit $ac_status); }; }; then
24358   cf_cv_header_stdbool_h=1
24359 else
24360   echo "$as_me: failed program was:" >&5
24361 cat conftest.$ac_ext >&5
24362 cf_cv_header_stdbool_h=0
24363 fi
24364 rm -f conftest.$ac_objext conftest.$ac_ext
24365 fi
24366 rm -f conftest.$ac_objext conftest.$ac_ext
24367 fi
24368
24369 if test "$cf_cv_header_stdbool_h" = 1
24370 then    echo "$as_me:24370: result: yes" >&5
24371 echo "${ECHO_T}yes" >&6
24372 else    echo "$as_me:24372: result: no" >&5
24373 echo "${ECHO_T}no" >&6
24374 fi
24375
24376 echo "$as_me:24376: checking for builtin bool type" >&5
24377 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24378
24379 if test "${cf_cv_builtin_bool+set}" = set; then
24380   echo $ECHO_N "(cached) $ECHO_C" >&6
24381 else
24382
24383         cat >conftest.$ac_ext <<_ACEOF
24384 #line 24384 "configure"
24385 #include "confdefs.h"
24386
24387 #include <stdio.h>
24388 #include <sys/types.h>
24389
24390 int
24391 main (void)
24392 {
24393 bool x = false
24394   ;
24395   return 0;
24396 }
24397 _ACEOF
24398 rm -f conftest.$ac_objext
24399 if { (eval echo "$as_me:24399: \"$ac_compile\"") >&5
24400   (eval $ac_compile) 2>&5
24401   ac_status=$?
24402   echo "$as_me:24402: \$? = $ac_status" >&5
24403   (exit $ac_status); } &&
24404          { ac_try='test -s conftest.$ac_objext'
24405   { (eval echo "$as_me:24405: \"$ac_try\"") >&5
24406   (eval $ac_try) 2>&5
24407   ac_status=$?
24408   echo "$as_me:24408: \$? = $ac_status" >&5
24409   (exit $ac_status); }; }; then
24410   cf_cv_builtin_bool=1
24411 else
24412   echo "$as_me: failed program was:" >&5
24413 cat conftest.$ac_ext >&5
24414 cf_cv_builtin_bool=0
24415 fi
24416 rm -f conftest.$ac_objext conftest.$ac_ext
24417
24418 fi
24419
24420 if test "$cf_cv_builtin_bool" = 1
24421 then    echo "$as_me:24421: result: yes" >&5
24422 echo "${ECHO_T}yes" >&6
24423 else    echo "$as_me:24423: result: no" >&5
24424 echo "${ECHO_T}no" >&6
24425 fi
24426
24427 echo "$as_me:24427: checking for size of bool" >&5
24428 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24429 if test "${cf_cv_type_of_bool+set}" = set; then
24430   echo $ECHO_N "(cached) $ECHO_C" >&6
24431 else
24432
24433         rm -f cf_test.out
24434         if test "$cross_compiling" = yes; then
24435   cf_cv_type_of_bool=unknown
24436 else
24437   cat >conftest.$ac_ext <<_ACEOF
24438 #line 24438 "configure"
24439 #include "confdefs.h"
24440
24441 #include <stdlib.h>
24442 #include <stdio.h>
24443
24444 #if defined(__cplusplus)
24445
24446 #ifdef HAVE_GXX_BUILTIN_H
24447 #include <g++/builtin.h>
24448 #elif HAVE_GPP_BUILTIN_H
24449 #include <gpp/builtin.h>
24450 #elif HAVE_BUILTIN_H
24451 #include <builtin.h>
24452 #endif
24453
24454 #else
24455
24456 #if $cf_cv_header_stdbool_h
24457 #include <stdbool.h>
24458 #endif
24459
24460 #endif
24461
24462 int main(void)
24463 {
24464         FILE *fp = fopen("cf_test.out", "w");
24465         if (fp != 0) {
24466                 bool x = true;
24467                 if ((bool)(-x) >= 0)
24468                         fputs("unsigned ", fp);
24469                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24470                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24471                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24472                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24473                 fclose(fp);
24474         }
24475         ${cf_cv_main_return:-return}(0);
24476 }
24477
24478 _ACEOF
24479 rm -f conftest$ac_exeext
24480 if { (eval echo "$as_me:24480: \"$ac_link\"") >&5
24481   (eval $ac_link) 2>&5
24482   ac_status=$?
24483   echo "$as_me:24483: \$? = $ac_status" >&5
24484   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24485   { (eval echo "$as_me:24485: \"$ac_try\"") >&5
24486   (eval $ac_try) 2>&5
24487   ac_status=$?
24488   echo "$as_me:24488: \$? = $ac_status" >&5
24489   (exit $ac_status); }; }; then
24490   cf_cv_type_of_bool=`cat cf_test.out`
24491                  if test -z "$cf_cv_type_of_bool"; then
24492                    cf_cv_type_of_bool=unknown
24493                  fi
24494 else
24495   echo "$as_me: program exited with status $ac_status" >&5
24496 echo "$as_me: failed program was:" >&5
24497 cat conftest.$ac_ext >&5
24498 cf_cv_type_of_bool=unknown
24499 fi
24500 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24501 fi
24502
24503 fi
24504
24505         rm -f cf_test.out
24506 echo "$as_me:24506: result: $cf_cv_type_of_bool" >&5
24507 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24508 if test "$cf_cv_type_of_bool" = unknown ; then
24509         case .$NCURSES_BOOL in
24510         (.auto|.) NCURSES_BOOL=unsigned;;
24511         esac
24512         { echo "$as_me:24512: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24513 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24514         cf_cv_type_of_bool=$NCURSES_BOOL
24515 fi
24516
24517 echo "$as_me:24517: checking for special defines needed for etip.h" >&5
24518 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24519 cf_save_CXXFLAGS="$CXXFLAGS"
24520 cf_result="none"
24521
24522 # etip.h includes ncurses.h which includes ncurses_dll.h
24523 # But ncurses_dll.h is generated - fix here.
24524 test -d include || mkdir include
24525 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
24526
24527 for cf_math in "" MATH_H
24528 do
24529 for cf_excp in "" MATH_EXCEPTION
24530 do
24531         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24532         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24533         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24534 cat >conftest.$ac_ext <<_ACEOF
24535 #line 24535 "configure"
24536 #include "confdefs.h"
24537
24538 #include <etip.h.in>
24539
24540 int
24541 main (void)
24542 {
24543
24544   ;
24545   return 0;
24546 }
24547 _ACEOF
24548 rm -f conftest.$ac_objext
24549 if { (eval echo "$as_me:24549: \"$ac_compile\"") >&5
24550   (eval $ac_compile) 2>&5
24551   ac_status=$?
24552   echo "$as_me:24552: \$? = $ac_status" >&5
24553   (exit $ac_status); } &&
24554          { ac_try='test -s conftest.$ac_objext'
24555   { (eval echo "$as_me:24555: \"$ac_try\"") >&5
24556   (eval $ac_try) 2>&5
24557   ac_status=$?
24558   echo "$as_me:24558: \$? = $ac_status" >&5
24559   (exit $ac_status); }; }; then
24560
24561         test -n "$cf_math" && cat >>confdefs.h <<EOF
24562 #define ETIP_NEEDS_${cf_math} 1
24563 EOF
24564
24565         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24566 #define ETIP_NEEDS_${cf_excp} 1
24567 EOF
24568
24569         cf_result="$cf_math $cf_excp"
24570         break 2
24571
24572 else
24573   echo "$as_me: failed program was:" >&5
24574 cat conftest.$ac_ext >&5
24575 fi
24576 rm -f conftest.$ac_objext conftest.$ac_ext
24577 done
24578 done
24579 echo "$as_me:24579: result: $cf_result" >&5
24580 echo "${ECHO_T}$cf_result" >&6
24581 CXXFLAGS="$cf_save_CXXFLAGS"
24582
24583 if test -n "$CXX"; then
24584 echo "$as_me:24584: checking if $CXX accepts parameter initialization" >&5
24585 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24586 if test "${cf_cv_cpp_param_init+set}" = set; then
24587   echo $ECHO_N "(cached) $ECHO_C" >&6
24588 else
24589
24590         ac_ext=cc
24591 ac_cpp='$CXXCPP $CPPFLAGS'
24592 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24593 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24594 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24595 ac_main_return=return
24596
24597         if test "$cross_compiling" = yes; then
24598   cf_cv_cpp_param_init=unknown
24599 else
24600   cat >conftest.$ac_ext <<_ACEOF
24601 #line 24601 "configure"
24602 #include "confdefs.h"
24603
24604 class TEST {
24605 private:
24606         int value;
24607 public:
24608         TEST(int x = 1);
24609         ~TEST();
24610 };
24611
24612 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24613 {
24614         value = x;
24615 }
24616 int main(void) { }
24617
24618 _ACEOF
24619 rm -f conftest$ac_exeext
24620 if { (eval echo "$as_me:24620: \"$ac_link\"") >&5
24621   (eval $ac_link) 2>&5
24622   ac_status=$?
24623   echo "$as_me:24623: \$? = $ac_status" >&5
24624   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24625   { (eval echo "$as_me:24625: \"$ac_try\"") >&5
24626   (eval $ac_try) 2>&5
24627   ac_status=$?
24628   echo "$as_me:24628: \$? = $ac_status" >&5
24629   (exit $ac_status); }; }; then
24630   cf_cv_cpp_param_init=yes
24631 else
24632   echo "$as_me: program exited with status $ac_status" >&5
24633 echo "$as_me: failed program was:" >&5
24634 cat conftest.$ac_ext >&5
24635 cf_cv_cpp_param_init=no
24636 fi
24637 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24638 fi
24639         ac_ext=cc
24640 ac_cpp='$CXXCPP $CPPFLAGS'
24641 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24642 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24643 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24644 ac_main_return=return
24645
24646 fi
24647 echo "$as_me:24647: result: $cf_cv_cpp_param_init" >&5
24648 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24649 fi
24650 test "$cf_cv_cpp_param_init" = yes &&
24651 cat >>confdefs.h <<\EOF
24652 #define CPP_HAS_PARAM_INIT 1
24653 EOF
24654
24655 if test -n "$CXX"; then
24656
24657 echo "$as_me:24657: checking if $CXX accepts static_cast" >&5
24658 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24659 if test "${cf_cv_cpp_static_cast+set}" = set; then
24660   echo $ECHO_N "(cached) $ECHO_C" >&6
24661 else
24662
24663         ac_ext=cc
24664 ac_cpp='$CXXCPP $CPPFLAGS'
24665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24668 ac_main_return=return
24669
24670         cat >conftest.$ac_ext <<_ACEOF
24671 #line 24671 "configure"
24672 #include "confdefs.h"
24673
24674 class NCursesPanel
24675 {
24676 public:
24677   NCursesPanel(int nlines,
24678                int ncols,
24679                int begin_y = 0,
24680                int begin_x = 0)
24681   {
24682   }
24683   NCursesPanel();
24684   ~NCursesPanel();
24685 };
24686
24687 template<class T> class NCursesUserPanel : public NCursesPanel
24688 {
24689 public:
24690   NCursesUserPanel (int nlines,
24691                     int ncols,
24692                     int begin_y = 0,
24693                     int begin_x = 0,
24694                     const T* p_UserData = static_cast<T*>(0))
24695     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24696   {
24697   };
24698   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24699   {
24700   };
24701
24702   virtual ~NCursesUserPanel() {};
24703 };
24704
24705 int
24706 main (void)
24707 {
24708
24709         const char* p_UserData = static_cast<char*>(0)
24710   ;
24711   return 0;
24712 }
24713 _ACEOF
24714 rm -f conftest.$ac_objext
24715 if { (eval echo "$as_me:24715: \"$ac_compile\"") >&5
24716   (eval $ac_compile) 2>&5
24717   ac_status=$?
24718   echo "$as_me:24718: \$? = $ac_status" >&5
24719   (exit $ac_status); } &&
24720          { ac_try='test -s conftest.$ac_objext'
24721   { (eval echo "$as_me:24721: \"$ac_try\"") >&5
24722   (eval $ac_try) 2>&5
24723   ac_status=$?
24724   echo "$as_me:24724: \$? = $ac_status" >&5
24725   (exit $ac_status); }; }; then
24726   cf_cv_cpp_static_cast=yes
24727 else
24728   echo "$as_me: failed program was:" >&5
24729 cat conftest.$ac_ext >&5
24730 cf_cv_cpp_static_cast=no
24731 fi
24732 rm -f conftest.$ac_objext conftest.$ac_ext
24733
24734         ac_ext=cc
24735 ac_cpp='$CXXCPP $CPPFLAGS'
24736 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24737 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24738 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24739 ac_main_return=return
24740
24741 fi
24742 echo "$as_me:24742: result: $cf_cv_cpp_static_cast" >&5
24743 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24744
24745 fi
24746
24747 test "$cf_cv_cpp_static_cast" = yes &&
24748 cat >>confdefs.h <<\EOF
24749 #define CPP_HAS_STATIC_CAST 1
24750 EOF
24751
24752         CXX_AR='$(AR)'
24753         CXX_ARFLAGS='$(ARFLAGS)'
24754         case $cf_cv_system_name in
24755         (irix*)
24756             if test "$GXX" != yes ; then
24757                 CXX_AR='$(CXX)'
24758                 CXX_ARFLAGS='-ar -o'
24759             fi
24760             ;;
24761         (sco3.2v5*)
24762             CXXLDFLAGS="-u main"
24763             ;;
24764         (solaris2*)
24765             if test "$GXX" != yes ; then
24766                 CXX_AR='$(CXX)'
24767                 CXX_ARFLAGS='-xar -o'
24768             fi
24769             ;;
24770         esac
24771
24772 else
24773         cf_cxx_library=no
24774         cf_cv_builtin_bool=1
24775
24776         # Just because we are not configuring against C++ right now does not
24777         # mean that a user will not want to use C++.  Some distributors disable
24778         # the C++ portion of this configuration as a shortcut (or just to avoid
24779         # compiling the demo in the c++ directory).  So we need a reasonable
24780         # default for the 'bool' type.
24781         #
24782         # Caveat: since the storage of the bool type is not standardized, it
24783         # may change.
24784
24785         if test "$NCURSES_BOOL" != auto ; then
24786                 cf_cv_type_of_bool=$NCURSES_BOOL
24787                 cf_cv_header_stdbool_h=0
24788         else
24789                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24790
24791 echo "$as_me:24791: checking for size of bool" >&5
24792 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24793 if test "${cf_cv_type_of_bool+set}" = set; then
24794   echo $ECHO_N "(cached) $ECHO_C" >&6
24795 else
24796
24797         rm -f cf_test.out
24798         if test "$cross_compiling" = yes; then
24799   cf_cv_type_of_bool=unknown
24800 else
24801   cat >conftest.$ac_ext <<_ACEOF
24802 #line 24802 "configure"
24803 #include "confdefs.h"
24804
24805 #include <stdlib.h>
24806 #include <stdio.h>
24807
24808 #if defined(__cplusplus)
24809
24810 #ifdef HAVE_GXX_BUILTIN_H
24811 #include <g++/builtin.h>
24812 #elif HAVE_GPP_BUILTIN_H
24813 #include <gpp/builtin.h>
24814 #elif HAVE_BUILTIN_H
24815 #include <builtin.h>
24816 #endif
24817
24818 #else
24819
24820 #if $cf_cv_header_stdbool_h
24821 #include <stdbool.h>
24822 #endif
24823
24824 #endif
24825
24826 int main(void)
24827 {
24828         FILE *fp = fopen("cf_test.out", "w");
24829         if (fp != 0) {
24830                 bool x = true;
24831                 if ((bool)(-x) >= 0)
24832                         fputs("unsigned ", fp);
24833                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24834                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24835                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24836                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24837                 fclose(fp);
24838         }
24839         ${cf_cv_main_return:-return}(0);
24840 }
24841
24842 _ACEOF
24843 rm -f conftest$ac_exeext
24844 if { (eval echo "$as_me:24844: \"$ac_link\"") >&5
24845   (eval $ac_link) 2>&5
24846   ac_status=$?
24847   echo "$as_me:24847: \$? = $ac_status" >&5
24848   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24849   { (eval echo "$as_me:24849: \"$ac_try\"") >&5
24850   (eval $ac_try) 2>&5
24851   ac_status=$?
24852   echo "$as_me:24852: \$? = $ac_status" >&5
24853   (exit $ac_status); }; }; then
24854   cf_cv_type_of_bool=`cat cf_test.out`
24855                  if test -z "$cf_cv_type_of_bool"; then
24856                    cf_cv_type_of_bool=unknown
24857                  fi
24858 else
24859   echo "$as_me: program exited with status $ac_status" >&5
24860 echo "$as_me: failed program was:" >&5
24861 cat conftest.$ac_ext >&5
24862 cf_cv_type_of_bool=unknown
24863 fi
24864 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24865 fi
24866
24867 fi
24868
24869         rm -f cf_test.out
24870 echo "$as_me:24870: result: $cf_cv_type_of_bool" >&5
24871 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24872 if test "$cf_cv_type_of_bool" = unknown ; then
24873         case .$NCURSES_BOOL in
24874         (.auto|.) NCURSES_BOOL=unsigned;;
24875         esac
24876         { echo "$as_me:24876: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24877 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24878         cf_cv_type_of_bool=$NCURSES_BOOL
24879 fi
24880
24881                 else
24882                         echo "$as_me:24882: checking for fallback type of bool" >&5
24883 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24884                         case "$host_cpu" in
24885                         (i?86)  cf_cv_type_of_bool=char ;;
24886                         (*)     cf_cv_type_of_bool=int  ;;
24887                         esac
24888                         echo "$as_me:24888: result: $cf_cv_type_of_bool" >&5
24889 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24890                 fi
24891         fi
24892 fi
24893
24894 # If the C compiler did not declare bool, and we did not determine that the C++
24895 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24896 # ncurses library use the same type as C++ bool.  Note that this allows one to
24897 # specify the type of bool in a configure-script option and postpone
24898 # integration with the C++ compiler provided that the types are compatible.
24899 USE_CXX_BOOL=1
24900 if test $cf_cv_cc_bool_type = 1
24901 then
24902         # oops: C has a bool.  Unlikely, but C++ could differ.
24903         USE_CXX_BOOL=0
24904 elif test $cf_cv_builtin_bool = 0
24905 then
24906         # C++ has no bool
24907         USE_CXX_BOOL=0
24908 else
24909         # this is the normal case
24910         USE_CXX_BOOL='defined(__cplusplus)'
24911 fi
24912
24913 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24914
24915         if test "$cf_with_ada" != "no" ; then
24916                 if test "$with_libtool" != "no"; then
24917                         { echo "$as_me:24917: WARNING: libtool does not support Ada - disabling feature" >&5
24918 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24919                         cf_with_ada=no
24920                 fi
24921         fi
24922
24923         if test "$cf_with_ada" != "no" ; then
24924
24925 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24926 do
24927
24928 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24929
24930         unset ac_cv_path_cf_TEMP_gnat
24931         unset cf_TEMP_gnat
24932         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24933 set dummy $cf_prog_gnat; ac_word=$2
24934 echo "$as_me:24934: checking for $ac_word" >&5
24935 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24936 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24937   echo $ECHO_N "(cached) $ECHO_C" >&6
24938 else
24939   case $cf_TEMP_gnat in
24940   [\\/]* | ?:[\\/]*)
24941   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24942   ;;
24943   *)
24944   ac_save_IFS=$IFS; IFS=$ac_path_separator
24945 ac_dummy="$PATH"
24946 for ac_dir in $ac_dummy; do
24947   IFS=$ac_save_IFS
24948   test -z "$ac_dir" && ac_dir=.
24949   if $as_executable_p "$ac_dir/$ac_word"; then
24950    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24951    echo "$as_me:24951: found $ac_dir/$ac_word" >&5
24952    break
24953 fi
24954 done
24955
24956   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24957   ;;
24958 esac
24959 fi
24960 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24961
24962 if test -n "$cf_TEMP_gnat"; then
24963   echo "$as_me:24963: result: $cf_TEMP_gnat" >&5
24964 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24965 else
24966   echo "$as_me:24966: result: no" >&5
24967 echo "${ECHO_T}no" >&6
24968 fi
24969
24970         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24971
24972         if test "x$cf_TEMP_gnat" != xno; then
24973                 unset cf_cv_gnat_version
24974                 unset cf_TEMP_gnat
24975
24976 echo "$as_me:24976: checking for $cf_prog_gnat version" >&5
24977 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24978 if test "${cf_cv_gnat_version+set}" = set; then
24979   echo $ECHO_N "(cached) $ECHO_C" >&6
24980 else
24981
24982 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24983         grep '[0-9].[0-9][0-9]*' |\
24984         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24985
24986 fi
24987 echo "$as_me:24987: result: $cf_cv_gnat_version" >&5
24988 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24989 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24990 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24991
24992         fi
24993         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24994
24995         unset cf_TEMP_gnat
24996         unset cf_cv_gnat_version
24997         unset ac_cv_path_cf_TEMP_gnat
24998 done
24999
25000 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
25001         cf_ada_make=
25002         cf_cv_prog_gnat_correct=no
25003 else
25004         cf_ada_make=gnatmake
25005         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
25006                 # gprconfig is newer than gnatmake; we can continue...
25007                 cf_ada_config="##"
25008         else
25009                 rm -rf conftest* *~conftest*
25010                 if mkdir conftest.src
25011                 then
25012                         cf_ada_config=""
25013                         cd conftest.src
25014                         for cf_gprconfig in Ada C
25015                         do
25016                                 echo "$as_me:25016: checking for gprconfig name for $cf_gprconfig" >&5
25017 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
25018                                 if test $cf_gprconfig = C
25019                                 then
25020                                         for cf_gprconfig_param in \
25021                                                 $cf_gprconfig,,,,GNATGCC \
25022                                                 $cf_gprconfig,,,,GCC \
25023                                                 $cf_gprconfig
25024                                         do
25025                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
25026                                                 test -n "$cf_gprconfig_value" && break
25027                                         done
25028                                 else
25029                                         cf_gprconfig_param=$cf_gprconfig
25030                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
25031                                 fi
25032                                 if test -n "$cf_gprconfig_value"
25033                                 then
25034                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
25035                                         echo "$as_me:25035: result: $cf_gprconfig_value" >&5
25036 echo "${ECHO_T}$cf_gprconfig_value" >&6
25037                                 else
25038                                         echo "$as_me:25038: result: missing" >&5
25039 echo "${ECHO_T}missing" >&6
25040                                         cf_ada_config="#"
25041                                         break
25042                                 fi
25043                         done
25044                         cd ..
25045                         rm -rf conftest* *~conftest*
25046                 fi
25047         fi
25048         if test "x$cf_ada_config" != "x#"
25049         then
25050
25051 echo "$as_me:25051: checking for gnat version" >&5
25052 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
25053 if test "${cf_cv_gnat_version+set}" = set; then
25054   echo $ECHO_N "(cached) $ECHO_C" >&6
25055 else
25056
25057 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
25058         grep '[0-9].[0-9][0-9]*' |\
25059         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
25060
25061 fi
25062 echo "$as_me:25062: result: $cf_cv_gnat_version" >&5
25063 echo "${ECHO_T}$cf_cv_gnat_version" >&6
25064 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
25065
25066 case $cf_cv_gnat_version in
25067 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
25068         cf_cv_prog_gnat_correct=yes
25069         ;;
25070 (*)
25071         { echo "$as_me:25071: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
25072 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
25073         cf_cv_prog_gnat_correct=no
25074         ;;
25075 esac
25076
25077                 # Extract the first word of "m4", so it can be a program name with args.
25078 set dummy m4; ac_word=$2
25079 echo "$as_me:25079: checking for $ac_word" >&5
25080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25081 if test "${ac_cv_prog_M4_exists+set}" = set; then
25082   echo $ECHO_N "(cached) $ECHO_C" >&6
25083 else
25084   if test -n "$M4_exists"; then
25085   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
25086 else
25087   ac_save_IFS=$IFS; IFS=$ac_path_separator
25088 ac_dummy="$PATH"
25089 for ac_dir in $ac_dummy; do
25090   IFS=$ac_save_IFS
25091   test -z "$ac_dir" && ac_dir=.
25092   $as_executable_p "$ac_dir/$ac_word" || continue
25093 ac_cv_prog_M4_exists="yes"
25094 echo "$as_me:25094: found $ac_dir/$ac_word" >&5
25095 break
25096 done
25097
25098   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
25099 fi
25100 fi
25101 M4_exists=$ac_cv_prog_M4_exists
25102 if test -n "$M4_exists"; then
25103   echo "$as_me:25103: result: $M4_exists" >&5
25104 echo "${ECHO_T}$M4_exists" >&6
25105 else
25106   echo "$as_me:25106: result: no" >&5
25107 echo "${ECHO_T}no" >&6
25108 fi
25109
25110                 if test "$ac_cv_prog_M4_exists" = no; then
25111                         cf_cv_prog_gnat_correct=no
25112                         { echo "$as_me:25112: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
25113 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
25114                 fi
25115                 if test "$cf_cv_prog_gnat_correct" = yes; then
25116                         echo "$as_me:25116: checking if GNAT works" >&5
25117 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
25118
25119 rm -rf conftest* *~conftest*
25120 cat >>conftest.ads <<CF_EOF
25121 procedure conftest;
25122 CF_EOF
25123 cat >>conftest.adb <<CF_EOF
25124 with Text_IO;
25125 with GNAT.OS_Lib;
25126 procedure conftest is
25127 begin
25128    Text_IO.Put ("Hello World");
25129    Text_IO.New_Line;
25130    GNAT.OS_Lib.OS_Exit (0);
25131 end conftest;
25132 CF_EOF
25133 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25134    if ( ./conftest 1>&5 2>&1 ) ; then
25135       cf_cv_prog_gnat_correct=yes
25136    else
25137       cf_cv_prog_gnat_correct=no
25138    fi
25139 else
25140    cf_cv_prog_gnat_correct=no
25141 fi
25142 rm -rf conftest* *~conftest*
25143
25144                         echo "$as_me:25144: result: $cf_cv_prog_gnat_correct" >&5
25145 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
25146                 fi
25147         else
25148                 cf_cv_prog_gnat_correct=no
25149         fi
25150 fi
25151
25152                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
25153
25154         ADAFLAGS="$ADAFLAGS -gnatpn"
25155
25156         echo "$as_me:25156: checking optimization options for ADAFLAGS" >&5
25157 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
25158         case "$CFLAGS" in
25159         (*-g*)
25160
25161         ADAFLAGS="$ADAFLAGS -g"
25162
25163                 ;;
25164         esac
25165         case "$CFLAGS" in
25166         (*-O*)
25167                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
25168
25169         ADAFLAGS="$ADAFLAGS $cf_O_flag"
25170
25171                 ;;
25172         esac
25173         echo "$as_me:25173: result: $ADAFLAGS" >&5
25174 echo "${ECHO_T}$ADAFLAGS" >&6
25175
25176 echo "$as_me:25176: checking if GNATPREP supports -T option" >&5
25177 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
25178 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
25179   echo $ECHO_N "(cached) $ECHO_C" >&6
25180 else
25181
25182 cf_cv_gnatprep_opt_t=no
25183 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
25184
25185 fi
25186 echo "$as_me:25186: result: $cf_cv_gnatprep_opt_t" >&5
25187 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
25188 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
25189
25190 echo "$as_me:25190: checking if GNAT supports generics" >&5
25191 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
25192 case $cf_cv_gnat_version in
25193 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
25194         cf_gnat_generics=yes
25195         ;;
25196 (*)
25197         cf_gnat_generics=no
25198         ;;
25199 esac
25200 echo "$as_me:25200: result: $cf_gnat_generics" >&5
25201 echo "${ECHO_T}$cf_gnat_generics" >&6
25202
25203 if test "$cf_gnat_generics" = yes
25204 then
25205         cf_compile_generics=generics
25206         cf_generic_objects="\${GENOBJS}"
25207 else
25208         cf_compile_generics=
25209         cf_generic_objects=
25210 fi
25211
25212 echo "$as_me:25212: checking if GNAT supports SIGINT" >&5
25213 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
25214 if test "${cf_cv_gnat_sigint+set}" = set; then
25215   echo $ECHO_N "(cached) $ECHO_C" >&6
25216 else
25217
25218 rm -rf conftest* *~conftest*
25219 cat >>conftest.ads <<CF_EOF
25220 with Ada.Interrupts.Names;
25221
25222 package ConfTest is
25223
25224    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25225    pragma Unreserve_All_Interrupts;
25226    pragma Warnings (On);
25227
25228    protected Process is
25229       procedure Stop;
25230       function Continue return Boolean;
25231       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25232    private
25233       Done : Boolean := False;
25234    end Process;
25235
25236 end ConfTest;
25237 CF_EOF
25238 cat >>conftest.adb <<CF_EOF
25239 package body ConfTest is
25240    protected body Process is
25241       procedure Stop is
25242       begin
25243          Done := True;
25244       end Stop;
25245       function Continue return Boolean is
25246       begin
25247          return not Done;
25248       end Continue;
25249    end Process;
25250 end ConfTest;
25251 CF_EOF
25252 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25253       cf_cv_gnat_sigint=yes
25254 else
25255    cf_cv_gnat_sigint=no
25256 fi
25257 rm -rf conftest* *~conftest*
25258
25259 fi
25260 echo "$as_me:25260: result: $cf_cv_gnat_sigint" >&5
25261 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25262
25263 if test $cf_cv_gnat_sigint = yes ; then
25264         USE_GNAT_SIGINT=""
25265 else
25266         USE_GNAT_SIGINT="#"
25267 fi
25268
25269 cf_gnat_libraries=no
25270 cf_gnat_projects=no
25271
25272 if test "$enable_gnat_projects" != no ; then
25273 echo "$as_me:25273: checking if GNAT supports project files" >&5
25274 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25275 case $cf_cv_gnat_version in
25276 (3.[0-9]*)
25277         ;;
25278 (*)
25279         case $cf_cv_system_name in
25280         (cygwin*|msys*)
25281                 ;;
25282         (*)
25283                 rm -rf conftest* *~conftest*
25284                 if mkdir conftest.src conftest.bin conftest.lib
25285                 then
25286                         cd conftest.src
25287                         rm -rf conftest* *~conftest*
25288                         cat >>library.gpr <<CF_EOF
25289 project Library is
25290   Kind := External ("LIB_KIND");
25291   for Library_Name use "ConfTest";
25292   for Object_Dir use ".";
25293   for Library_ALI_Dir use External("LIBRARY_DIR");
25294   for Library_Version use External ("SONAME");
25295   for Library_Kind use Kind;
25296   for Library_Dir use External("BUILD_DIR");
25297   Source_Dir := External ("SOURCE_DIR");
25298   for Source_Dirs use (Source_Dir);
25299 end Library;
25300 CF_EOF
25301                         cat >>confpackage.ads <<CF_EOF
25302 package ConfPackage is
25303    procedure conftest;
25304 end ConfPackage;
25305 CF_EOF
25306                         cat >>confpackage.adb <<CF_EOF
25307 with Text_IO;
25308 package body ConfPackage is
25309    procedure conftest is
25310    begin
25311       Text_IO.Put ("Hello World");
25312       Text_IO.New_Line;
25313    end conftest;
25314 end ConfPackage;
25315 CF_EOF
25316                         if ( $cf_ada_make $ADAFLAGS \
25317                                         -Plibrary.gpr \
25318                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25319                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25320                                         -XSOURCE_DIR=`pwd` \
25321                                         -XSONAME=libConfTest.so.1 \
25322                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25323                                 cf_gnat_projects=yes
25324                         fi
25325                         cd ..
25326                 fi
25327                 if test -f conftest.lib/confpackage.ali
25328                 then
25329                         cf_gnat_libraries=yes
25330                 fi
25331                 rm -rf conftest* *~conftest*
25332                 ;;
25333         esac
25334         ;;
25335 esac
25336 echo "$as_me:25336: result: $cf_gnat_projects" >&5
25337 echo "${ECHO_T}$cf_gnat_projects" >&6
25338 fi # enable_gnat_projects
25339
25340 if test $cf_gnat_projects = yes
25341 then
25342         echo "$as_me:25342: checking if GNAT supports libraries" >&5
25343 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25344         echo "$as_me:25344: result: $cf_gnat_libraries" >&5
25345 echo "${ECHO_T}$cf_gnat_libraries" >&6
25346 fi
25347
25348 if test "$cf_gnat_projects" = yes
25349 then
25350         USE_OLD_MAKERULES="#"
25351         USE_GNAT_PROJECTS=""
25352 else
25353         USE_OLD_MAKERULES=""
25354         USE_GNAT_PROJECTS="#"
25355 fi
25356
25357 if test "$cf_gnat_libraries" = yes
25358 then
25359         USE_GNAT_LIBRARIES=""
25360 else
25361         USE_GNAT_LIBRARIES="#"
25362 fi
25363
25364 echo "$as_me:25364: checking for ada-compiler" >&5
25365 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25366
25367 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25368 if test "${with_ada_compiler+set}" = set; then
25369   withval="$with_ada_compiler"
25370   cf_ada_compiler=$withval
25371 else
25372   cf_ada_compiler=gnatmake
25373 fi;
25374
25375 echo "$as_me:25375: result: $cf_ada_compiler" >&5
25376 echo "${ECHO_T}$cf_ada_compiler" >&6
25377
25378                         cf_ada_package=terminal_interface
25379
25380 echo "$as_me:25380: checking for ada-include" >&5
25381 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25382
25383 # Check whether --with-ada-include or --without-ada-include was given.
25384 if test "${with_ada_include+set}" = set; then
25385   withval="$with_ada_include"
25386
25387 else
25388   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25389 fi; if test -n "$prefix/share/ada/adainclude" ; then
25390
25391 if test "x$prefix" != xNONE; then
25392         cf_path_syntax="$prefix"
25393 else
25394         cf_path_syntax="$ac_default_prefix"
25395 fi
25396
25397 case ".$withval" in
25398 (.\$\(*\)*|.\'*\'*)
25399         ;;
25400 (..|./*|.\\*)
25401         ;;
25402 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25403         ;;
25404 (.\${*prefix}*|.\${*dir}*)
25405         eval withval="$withval"
25406         case ".$withval" in
25407         (.NONE/*)
25408                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25409                 ;;
25410         esac
25411         ;;
25412 (.no|.NONE/*)
25413         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25414         ;;
25415 (*)
25416         { { echo "$as_me:25416: error: expected a pathname, not \"$withval\"" >&5
25417 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25418    { (exit 1); exit 1; }; }
25419         ;;
25420 esac
25421
25422 fi
25423 eval ADA_INCLUDE="$withval"
25424
25425 echo "$as_me:25425: result: $ADA_INCLUDE" >&5
25426 echo "${ECHO_T}$ADA_INCLUDE" >&6
25427
25428 echo "$as_me:25428: checking for ada-objects" >&5
25429 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25430
25431 # Check whether --with-ada-objects or --without-ada-objects was given.
25432 if test "${with_ada_objects+set}" = set; then
25433   withval="$with_ada_objects"
25434
25435 else
25436   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25437 fi; if test -n "$prefix/lib/ada/adalib" ; then
25438
25439 if test "x$prefix" != xNONE; then
25440         cf_path_syntax="$prefix"
25441 else
25442         cf_path_syntax="$ac_default_prefix"
25443 fi
25444
25445 case ".$withval" in
25446 (.\$\(*\)*|.\'*\'*)
25447         ;;
25448 (..|./*|.\\*)
25449         ;;
25450 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25451         ;;
25452 (.\${*prefix}*|.\${*dir}*)
25453         eval withval="$withval"
25454         case ".$withval" in
25455         (.NONE/*)
25456                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25457                 ;;
25458         esac
25459         ;;
25460 (.no|.NONE/*)
25461         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25462         ;;
25463 (*)
25464         { { echo "$as_me:25464: error: expected a pathname, not \"$withval\"" >&5
25465 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25466    { (exit 1); exit 1; }; }
25467         ;;
25468 esac
25469
25470 fi
25471 eval ADA_OBJECTS="$withval"
25472
25473 echo "$as_me:25473: result: $ADA_OBJECTS" >&5
25474 echo "${ECHO_T}$ADA_OBJECTS" >&6
25475
25476 echo "$as_me:25476: checking if an Ada95 shared-library should be built" >&5
25477 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25478
25479 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25480 if test "${with_ada_sharedlib+set}" = set; then
25481   withval="$with_ada_sharedlib"
25482   with_ada_sharedlib=$withval
25483 else
25484   with_ada_sharedlib=no
25485 fi;
25486 echo "$as_me:25486: result: $with_ada_sharedlib" >&5
25487 echo "${ECHO_T}$with_ada_sharedlib" >&6
25488
25489 if test "x$with_ada_sharedlib" != xno
25490 then
25491         if test "x$cf_gnat_projects" != xyes
25492         then
25493                 { echo "$as_me:25493: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25494 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25495                 with_ada_sharedlib=no
25496         fi
25497 fi
25498
25499 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25500 MAKE_ADA_SHAREDLIB="#"
25501
25502 if test "x$with_ada_sharedlib" != xno
25503 then
25504         MAKE_ADA_SHAREDLIB=
25505         if test "x$with_ada_sharedlib" != xyes
25506         then
25507                 ADA_SHAREDLIB="$with_ada_sharedlib"
25508         fi
25509 fi
25510
25511                         # allow the Ada binding to be renamed
25512
25513 echo "$as_me:25513: checking for ada-libname" >&5
25514 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25515
25516 # Check whether --with-ada-libname or --without-ada-libname was given.
25517 if test "${with_ada_libname+set}" = set; then
25518   withval="$with_ada_libname"
25519   ADA_LIBNAME=$withval
25520 else
25521   ADA_LIBNAME=AdaCurses
25522 fi;
25523 case "x$ADA_LIBNAME" in
25524 (x|xyes|xno)
25525         ADA_LIBNAME=AdaCurses
25526         ;;
25527 esac
25528
25529 echo "$as_me:25529: result: $ADA_LIBNAME" >&5
25530 echo "${ECHO_T}$ADA_LIBNAME" >&6
25531
25532                 fi
25533         fi
25534 else
25535         cf_with_ada=no
25536 fi
25537
25538 # do this "late" to avoid conflict with header-checks
25539 if test "x$with_widec" = xyes ; then
25540         echo "$as_me:25540: checking for wchar_t" >&5
25541 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25542 if test "${ac_cv_type_wchar_t+set}" = set; then
25543   echo $ECHO_N "(cached) $ECHO_C" >&6
25544 else
25545   cat >conftest.$ac_ext <<_ACEOF
25546 #line 25546 "configure"
25547 #include "confdefs.h"
25548 $ac_includes_default
25549 int
25550 main (void)
25551 {
25552 if ((wchar_t *) 0)
25553   return 0;
25554 if (sizeof (wchar_t))
25555   return 0;
25556   ;
25557   return 0;
25558 }
25559 _ACEOF
25560 rm -f conftest.$ac_objext
25561 if { (eval echo "$as_me:25561: \"$ac_compile\"") >&5
25562   (eval $ac_compile) 2>&5
25563   ac_status=$?
25564   echo "$as_me:25564: \$? = $ac_status" >&5
25565   (exit $ac_status); } &&
25566          { ac_try='test -s conftest.$ac_objext'
25567   { (eval echo "$as_me:25567: \"$ac_try\"") >&5
25568   (eval $ac_try) 2>&5
25569   ac_status=$?
25570   echo "$as_me:25570: \$? = $ac_status" >&5
25571   (exit $ac_status); }; }; then
25572   ac_cv_type_wchar_t=yes
25573 else
25574   echo "$as_me: failed program was:" >&5
25575 cat conftest.$ac_ext >&5
25576 ac_cv_type_wchar_t=no
25577 fi
25578 rm -f conftest.$ac_objext conftest.$ac_ext
25579 fi
25580 echo "$as_me:25580: result: $ac_cv_type_wchar_t" >&5
25581 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25582
25583 echo "$as_me:25583: checking size of wchar_t" >&5
25584 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25585 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25586   echo $ECHO_N "(cached) $ECHO_C" >&6
25587 else
25588   if test "$ac_cv_type_wchar_t" = yes; then
25589   if test "$cross_compiling" = yes; then
25590   # Depending upon the size, compute the lo and hi bounds.
25591 cat >conftest.$ac_ext <<_ACEOF
25592 #line 25592 "configure"
25593 #include "confdefs.h"
25594 $ac_includes_default
25595 int
25596 main (void)
25597 {
25598 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25599   ;
25600   return 0;
25601 }
25602 _ACEOF
25603 rm -f conftest.$ac_objext
25604 if { (eval echo "$as_me:25604: \"$ac_compile\"") >&5
25605   (eval $ac_compile) 2>&5
25606   ac_status=$?
25607   echo "$as_me:25607: \$? = $ac_status" >&5
25608   (exit $ac_status); } &&
25609          { ac_try='test -s conftest.$ac_objext'
25610   { (eval echo "$as_me:25610: \"$ac_try\"") >&5
25611   (eval $ac_try) 2>&5
25612   ac_status=$?
25613   echo "$as_me:25613: \$? = $ac_status" >&5
25614   (exit $ac_status); }; }; then
25615   ac_lo=0 ac_mid=0
25616   while :; do
25617     cat >conftest.$ac_ext <<_ACEOF
25618 #line 25618 "configure"
25619 #include "confdefs.h"
25620 $ac_includes_default
25621 int
25622 main (void)
25623 {
25624 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25625   ;
25626   return 0;
25627 }
25628 _ACEOF
25629 rm -f conftest.$ac_objext
25630 if { (eval echo "$as_me:25630: \"$ac_compile\"") >&5
25631   (eval $ac_compile) 2>&5
25632   ac_status=$?
25633   echo "$as_me:25633: \$? = $ac_status" >&5
25634   (exit $ac_status); } &&
25635          { ac_try='test -s conftest.$ac_objext'
25636   { (eval echo "$as_me:25636: \"$ac_try\"") >&5
25637   (eval $ac_try) 2>&5
25638   ac_status=$?
25639   echo "$as_me:25639: \$? = $ac_status" >&5
25640   (exit $ac_status); }; }; then
25641   ac_hi=$ac_mid; break
25642 else
25643   echo "$as_me: failed program was:" >&5
25644 cat conftest.$ac_ext >&5
25645 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25646 fi
25647 rm -f conftest.$ac_objext conftest.$ac_ext
25648   done
25649 else
25650   echo "$as_me: failed program was:" >&5
25651 cat conftest.$ac_ext >&5
25652 ac_hi=-1 ac_mid=-1
25653   while :; do
25654     cat >conftest.$ac_ext <<_ACEOF
25655 #line 25655 "configure"
25656 #include "confdefs.h"
25657 $ac_includes_default
25658 int
25659 main (void)
25660 {
25661 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25662   ;
25663   return 0;
25664 }
25665 _ACEOF
25666 rm -f conftest.$ac_objext
25667 if { (eval echo "$as_me:25667: \"$ac_compile\"") >&5
25668   (eval $ac_compile) 2>&5
25669   ac_status=$?
25670   echo "$as_me:25670: \$? = $ac_status" >&5
25671   (exit $ac_status); } &&
25672          { ac_try='test -s conftest.$ac_objext'
25673   { (eval echo "$as_me:25673: \"$ac_try\"") >&5
25674   (eval $ac_try) 2>&5
25675   ac_status=$?
25676   echo "$as_me:25676: \$? = $ac_status" >&5
25677   (exit $ac_status); }; }; then
25678   ac_lo=$ac_mid; break
25679 else
25680   echo "$as_me: failed program was:" >&5
25681 cat conftest.$ac_ext >&5
25682 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25683 fi
25684 rm -f conftest.$ac_objext conftest.$ac_ext
25685   done
25686 fi
25687 rm -f conftest.$ac_objext conftest.$ac_ext
25688 # Binary search between lo and hi bounds.
25689 while test "x$ac_lo" != "x$ac_hi"; do
25690   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25691   cat >conftest.$ac_ext <<_ACEOF
25692 #line 25692 "configure"
25693 #include "confdefs.h"
25694 $ac_includes_default
25695 int
25696 main (void)
25697 {
25698 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25699   ;
25700   return 0;
25701 }
25702 _ACEOF
25703 rm -f conftest.$ac_objext
25704 if { (eval echo "$as_me:25704: \"$ac_compile\"") >&5
25705   (eval $ac_compile) 2>&5
25706   ac_status=$?
25707   echo "$as_me:25707: \$? = $ac_status" >&5
25708   (exit $ac_status); } &&
25709          { ac_try='test -s conftest.$ac_objext'
25710   { (eval echo "$as_me:25710: \"$ac_try\"") >&5
25711   (eval $ac_try) 2>&5
25712   ac_status=$?
25713   echo "$as_me:25713: \$? = $ac_status" >&5
25714   (exit $ac_status); }; }; then
25715   ac_hi=$ac_mid
25716 else
25717   echo "$as_me: failed program was:" >&5
25718 cat conftest.$ac_ext >&5
25719 ac_lo=`expr $ac_mid + 1`
25720 fi
25721 rm -f conftest.$ac_objext conftest.$ac_ext
25722 done
25723 ac_cv_sizeof_wchar_t=$ac_lo
25724 else
25725   if test "$cross_compiling" = yes; then
25726   { { echo "$as_me:25726: error: cannot run test program while cross compiling" >&5
25727 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25728    { (exit 1); exit 1; }; }
25729 else
25730   cat >conftest.$ac_ext <<_ACEOF
25731 #line 25731 "configure"
25732 #include "confdefs.h"
25733 $ac_includes_default
25734 int
25735 main (void)
25736 {
25737 FILE *f = fopen ("conftest.val", "w");
25738 if (!f)
25739   $ac_main_return (1);
25740 fprintf (f, "%d", (sizeof (wchar_t)));
25741 fclose (f);
25742   ;
25743   return 0;
25744 }
25745 _ACEOF
25746 rm -f conftest$ac_exeext
25747 if { (eval echo "$as_me:25747: \"$ac_link\"") >&5
25748   (eval $ac_link) 2>&5
25749   ac_status=$?
25750   echo "$as_me:25750: \$? = $ac_status" >&5
25751   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25752   { (eval echo "$as_me:25752: \"$ac_try\"") >&5
25753   (eval $ac_try) 2>&5
25754   ac_status=$?
25755   echo "$as_me:25755: \$? = $ac_status" >&5
25756   (exit $ac_status); }; }; then
25757   ac_cv_sizeof_wchar_t=`cat conftest.val`
25758 else
25759   echo "$as_me: program exited with status $ac_status" >&5
25760 echo "$as_me: failed program was:" >&5
25761 cat conftest.$ac_ext >&5
25762 fi
25763 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25764 fi
25765 fi
25766 rm -f conftest.val
25767 else
25768   ac_cv_sizeof_wchar_t=0
25769 fi
25770 fi
25771 echo "$as_me:25771: result: $ac_cv_sizeof_wchar_t" >&5
25772 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25773 cat >>confdefs.h <<EOF
25774 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25775 EOF
25776
25777         # cross-compiling to mingw can run into the problem that attempting to
25778         # link with the regex library fails, causing the test to not set this to
25779         # a number.  "recent" autoconf does not address this problem either -TD
25780         if test -z "$ac_cv_sizeof_wchar_t"
25781         then
25782                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25783
25784 echo "${as_me:-configure}:25784: testing test failed (assume 2) ..." 1>&5
25785
25786                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25787                 mv confdefs.tmp confdefs.h
25788                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25789         fi
25790 fi
25791
25792 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25793 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25794 ###
25795 ### ticlib modules may be a separate library, otherwise contained in termlib.
25796 ### termlib modules may be a separate library, otherwise contained in ncurses.
25797 ###
25798 ### The of "+" or " " between the tokens controls the way the script
25799 ### chooses to split module lists into libraries.
25800 ###
25801 ### (see CF_LIB_RULES).
25802 echo "$as_me:25802: checking for library subsets" >&5
25803 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25804 LIB_SUBSETS=
25805
25806 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25807         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25808         if test "$with_ticlib" != no ; then
25809                 LIB_SUBSETS="${LIB_SUBSETS} "
25810         else
25811                 LIB_SUBSETS="${LIB_SUBSETS}+"
25812         fi
25813 fi
25814
25815 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25816 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25817
25818 if test "$with_termlib" != no ; then
25819         LIB_SUBSETS="${LIB_SUBSETS} "
25820 else
25821         LIB_SUBSETS="${LIB_SUBSETS}+"
25822 fi
25823
25824 LIB_SUBSETS="${LIB_SUBSETS}base"
25825
25826 # Most term-driver calls are to tinfo, but some like init_pair are to the
25827 # base library (so it resides in base).
25828 if test "$with_term_driver" != no ; then
25829         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25830         case $cf_cv_system_name in
25831         (*mingw32*|*mingw64*)
25832                 if test "x$with_exp_win32" = xyes ; then
25833                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
25834                 else
25835                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25836                 fi
25837                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25838                 ;;
25839         (*)
25840                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25841                 ;;
25842         esac
25843 elif test "x$with_exp_win32" = xyes ; then
25844         case $cf_cv_system_name in
25845         (*mingw32*|*mingw64*)
25846                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
25847                 ;;
25848         (*)
25849                 ;;
25850         esac
25851 fi
25852
25853 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25854 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25855
25856 echo "$as_me:25856: result: $LIB_SUBSETS" >&5
25857 echo "${ECHO_T}$LIB_SUBSETS" >&6
25858
25859 ### Construct the list of include-directories to be generated
25860
25861 if test "$srcdir" != "."; then
25862         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25863 fi
25864 CPPFLAGS="-I../include $CPPFLAGS"
25865 if test "$srcdir" != "."; then
25866         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25867 fi
25868 CPPFLAGS="-I. $CPPFLAGS"
25869
25870 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25871 if test "$srcdir" != "."; then
25872         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25873 fi
25874 if test "$GCC" != yes; then
25875         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25876 elif test "$includedir" != "/usr/include"; then
25877         if test "$includedir" = '${prefix}/include' ; then
25878                 if test x$prefix != x/usr ; then
25879                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25880                 fi
25881         else
25882                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25883         fi
25884 fi
25885
25886 ### Build up pieces for makefile rules
25887 echo "$as_me:25887: checking default library suffix" >&5
25888 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25889
25890         case $DFT_LWR_MODEL in
25891         (libtool) DFT_ARG_SUFFIX=''   ;;
25892         (normal)  DFT_ARG_SUFFIX=''   ;;
25893         (debug)   DFT_ARG_SUFFIX='_g' ;;
25894         (profile) DFT_ARG_SUFFIX='_p' ;;
25895         (shared)  DFT_ARG_SUFFIX=''   ;;
25896         esac
25897         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25898 echo "$as_me:25898: result: $DFT_ARG_SUFFIX" >&5
25899 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25900
25901 echo "$as_me:25901: checking default library-dependency suffix" >&5
25902 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25903
25904         case X$DFT_LWR_MODEL in
25905         (Xlibtool)
25906                 DFT_LIB_SUFFIX='.la'
25907                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25908                 ;;
25909         (Xdebug)
25910                 case $cf_cv_system_name in
25911                 (*-msvc*)
25912                         DFT_LIB_SUFFIX='_g.lib'
25913                         ;;
25914                 (*)
25915                         DFT_LIB_SUFFIX='_g.a'
25916                         ;;
25917                 esac
25918                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25919                 ;;
25920         (Xprofile)
25921                 case $cf_cv_system_name in
25922                 (*-msvc*)
25923                         DFT_LIB_SUFFIX='_p.lib'
25924                         ;;
25925                 (*)
25926                         DFT_LIB_SUFFIX='_p.a'
25927                         ;;
25928                 esac
25929                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25930                 ;;
25931         (Xshared)
25932                 case $cf_cv_system_name in
25933                 (aix[5-7]*)
25934                         DFT_LIB_SUFFIX='.so'
25935                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25936                         ;;
25937                 (*-msvc*)
25938                         DFT_LIB_SUFFIX='.dll'
25939                         DFT_DEP_SUFFIX='.dll.lib'
25940                         ;;
25941                 (cygwin*|msys*|mingw*)
25942                         DFT_LIB_SUFFIX='.dll'
25943                         DFT_DEP_SUFFIX='.dll.a'
25944                         ;;
25945                 (darwin*)
25946                         DFT_LIB_SUFFIX='.dylib'
25947                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25948                         ;;
25949                 (hpux*)
25950                         case $target in
25951                         (ia64*)
25952                                 DFT_LIB_SUFFIX='.so'
25953                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25954                                 ;;
25955                         (*)
25956                                 DFT_LIB_SUFFIX='.sl'
25957                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25958                                 ;;
25959                         esac
25960                         ;;
25961                 (*)
25962                         DFT_LIB_SUFFIX='.so'
25963                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25964                         ;;
25965                 esac
25966                 ;;
25967         (*)
25968                 case $target in
25969                 (*-msvc*)
25970                         DFT_LIB_SUFFIX='.lib'
25971                         ;;
25972                 (*)
25973                         DFT_LIB_SUFFIX='.a'
25974                         ;;
25975                 esac
25976                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25977                 ;;
25978         esac
25979         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25980         then
25981                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25982                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25983         fi
25984 echo "$as_me:25984: result: $DFT_DEP_SUFFIX" >&5
25985 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25986
25987 echo "$as_me:25987: checking default object directory" >&5
25988 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25989
25990         case $DFT_LWR_MODEL in
25991         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25992         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25993         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25994         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25995         (shared)
25996                 case $cf_cv_system_name in
25997                 (cygwin|msys)
25998                         DFT_OBJ_SUBDIR='objects' ;;
25999                 (*)
26000                         DFT_OBJ_SUBDIR='obj_s' ;;
26001                 esac
26002         esac
26003 echo "$as_me:26003: result: $DFT_OBJ_SUBDIR" >&5
26004 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
26005
26006 if test "x$cf_with_cxx" = xyes ; then
26007 echo "$as_me:26007: checking c++ library-dependency suffix" >&5
26008 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
26009 if test "$with_libtool" != "no"; then
26010         # libtool thinks it can make c++ shared libraries (perhaps only g++)
26011         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
26012 elif test "$with_shared_cxx" != "no"; then
26013         # also for g++ users...
26014         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
26015 else
26016         # we normally make a static library because C/C++ library rules differ
26017
26018         case Xnormal in
26019         (Xlibtool)
26020                 CXX_LIB_SUFFIX='.la'
26021                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26022                 ;;
26023         (Xdebug)
26024                 case $cf_cv_system_name in
26025                 (*-msvc*)
26026                         CXX_LIB_SUFFIX='_g.lib'
26027                         ;;
26028                 (*)
26029                         CXX_LIB_SUFFIX='_g.a'
26030                         ;;
26031                 esac
26032                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26033                 ;;
26034         (Xprofile)
26035                 case $cf_cv_system_name in
26036                 (*-msvc*)
26037                         CXX_LIB_SUFFIX='_p.lib'
26038                         ;;
26039                 (*)
26040                         CXX_LIB_SUFFIX='_p.a'
26041                         ;;
26042                 esac
26043                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26044                 ;;
26045         (Xshared)
26046                 case $cf_cv_system_name in
26047                 (aix[5-7]*)
26048                         CXX_LIB_SUFFIX='.so'
26049                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26050                         ;;
26051                 (*-msvc*)
26052                         CXX_LIB_SUFFIX='.dll'
26053                         CXX_DEP_SUFFIX='.dll.lib'
26054                         ;;
26055                 (cygwin*|msys*|mingw*)
26056                         CXX_LIB_SUFFIX='.dll'
26057                         CXX_DEP_SUFFIX='.dll.a'
26058                         ;;
26059                 (darwin*)
26060                         CXX_LIB_SUFFIX='.dylib'
26061                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26062                         ;;
26063                 (hpux*)
26064                         case $target in
26065                         (ia64*)
26066                                 CXX_LIB_SUFFIX='.so'
26067                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26068                                 ;;
26069                         (*)
26070                                 CXX_LIB_SUFFIX='.sl'
26071                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26072                                 ;;
26073                         esac
26074                         ;;
26075                 (*)
26076                         CXX_LIB_SUFFIX='.so'
26077                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26078                         ;;
26079                 esac
26080                 ;;
26081         (*)
26082                 case $target in
26083                 (*-msvc*)
26084                         CXX_LIB_SUFFIX='.lib'
26085                         ;;
26086                 (*)
26087                         CXX_LIB_SUFFIX='.a'
26088                         ;;
26089                 esac
26090                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
26091                 ;;
26092         esac
26093         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26094         then
26095                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
26096                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
26097         fi
26098
26099 fi
26100 echo "$as_me:26100: result: $CXX_LIB_SUFFIX" >&5
26101 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
26102
26103 fi
26104
26105 # do not want -ldl in build except as needed for -lncurses dependency
26106 if test "x$with_dlsym" = xyes ; then
26107 if test $DFT_LWR_MODEL = shared || \
26108    test $DFT_LWR_MODEL = libtool ; then
26109
26110 # remove dl library from $LIBS
26111 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
26112
26113 fi
26114 fi
26115 ### Set up low-level terminfo dependencies for makefiles.
26116
26117 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
26118 # do not need libdl
26119 TICS_LIST=
26120 if test "x$with_dlsym" = xyes ; then
26121
26122 # remove dl library from $SHLIB_LIST
26123 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
26124
26125 fi
26126
26127 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
26128 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
26129 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
26130 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
26131 then
26132         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
26133 fi
26134
26135 if test "$with_ticlib" != no ; then
26136
26137         if test "x$with_ticlib" != xyes ; then
26138                 TICS_NAME=$with_ticlib
26139                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
26140                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
26141                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
26142                 TICS_LIB_SUFFIX="${with_ticlib}"
26143         else
26144                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
26145                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
26146                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
26147                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
26148         fi
26149         TICS_LDFLAGS="-L${LIB_DIR}"
26150         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
26151 else
26152         TICS_SUFFIX=${DFT_LIB_SUFFIX}
26153         TICS_LDFLAGS="-L${LIB_DIR}"
26154         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
26155 fi
26156
26157 if test "$with_termlib" != no ; then
26158
26159         if test "x$with_termlib" != xyes ; then
26160                 TINFO_NAME=$with_termlib
26161                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
26162                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
26163                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
26164                 TINFO_LIB_SUFFIX="${with_termlib}"
26165         else
26166                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
26167                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
26168                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
26169                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
26170         fi
26171
26172         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
26173         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
26174         if test "$DFT_LWR_MODEL" = "libtool"; then
26175                 TEST_ARGS="${TEST_DEPS}"
26176                 TEST_ARG2="${TEST_DEP2}"
26177                 TINFO_LDFLAGS="-L${LIB_DIR}"
26178                 TINFO_LIBS="$TEST_ARGS"
26179                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
26180                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
26181         else
26182                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
26183                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
26184                 if test "x$with_term_driver" != xno ; then
26185                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
26186                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
26187                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26188                 else
26189                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
26190                         TINFO_LIBS="$TEST_ARGS"
26191                 fi
26192                 TINFO_LDFLAGS="-L${LIB_DIR}"
26193                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
26194         fi
26195 else
26196         # the next lines are needed for linking libtic over libncurses
26197         TINFO_NAME=${LIB_NAME}
26198         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
26199         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
26200         if test "x$with_tic_depends" = xyes ; then
26201                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
26202         else
26203                 TICS_LIST="$SHLIB_LIST"
26204         fi
26205
26206         TINFO_LDFLAGS="-L${LIB_DIR}"
26207         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
26208 fi
26209
26210 if test "$DFT_LWR_MODEL" = shared ; then
26211         case $cf_cv_system_name in
26212         (cygwin*|msys*)
26213                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
26214                 TINFO_SUFFIX=.dll
26215                 ;;
26216         esac
26217 fi
26218
26219 if test "x$with_dlsym" = xyes ; then
26220
26221 # remove dl library from $TICS_LIST
26222 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
26223
26224 fi
26225
26226 if test "$DFT_LWR_MODEL" = "libtool"; then
26227         OBJEXT=lo
26228 fi
26229
26230 # needed for Ada95
26231 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26232
26233 case $DFT_LWR_MODEL in
26234 (normal|debug|profile)
26235
26236 if test "$GCC" = yes ; then
26237         case $cf_cv_system_name in
26238         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26239                 LDFLAGS_STATIC=
26240                 LDFLAGS_SHARED=
26241                 ;;
26242         (*)     # normally, except when broken
26243                 LDFLAGS_STATIC=-static
26244                 LDFLAGS_SHARED=-dynamic
26245                 ;;
26246         esac
26247 else
26248         case $cf_cv_system_name in
26249         (aix[4-7]*)     # from ld manpage
26250                 LDFLAGS_STATIC=-bstatic
26251                 LDFLAGS_SHARED=-bdynamic
26252                 ;;
26253         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26254                 # We could also use just "archive" and "shared".
26255                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26256                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26257                 ;;
26258         (irix*)         # from ld manpage IRIX64
26259                 LDFLAGS_STATIC=-Bstatic
26260                 LDFLAGS_SHARED=-Bdynamic
26261                 ;;
26262         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26263                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26264                 LDFLAGS_STATIC=-noso
26265                 LDFLAGS_SHARED=-so_archive
26266                 ;;
26267         (solaris2*)
26268                 LDFLAGS_STATIC=-Bstatic
26269                 LDFLAGS_SHARED=-Bdynamic
26270                 ;;
26271         esac
26272 fi
26273
26274 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26275 then
26276         echo "$as_me:26276: checking if linker supports switching between static/dynamic" >&5
26277 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26278
26279         rm -f libconftest.a
26280         cat >conftest.$ac_ext <<EOF
26281 #line 26281 "configure"
26282 #include <stdio.h>
26283 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26284 EOF
26285         if { (eval echo "$as_me:26285: \"$ac_compile\"") >&5
26286   (eval $ac_compile) 2>&5
26287   ac_status=$?
26288   echo "$as_me:26288: \$? = $ac_status" >&5
26289   (exit $ac_status); } ; then
26290                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26291                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26292         fi
26293         rm -f conftest.*
26294
26295         cf_save_LIBS="$LIBS"
26296
26297         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26298         cat >conftest.$ac_ext <<_ACEOF
26299 #line 26299 "configure"
26300 #include "confdefs.h"
26301
26302 #line 26302 "configure"
26303 #include <stdio.h>
26304 int cf_ldflags_static(FILE *fp);
26305
26306 int
26307 main (void)
26308 {
26309
26310         return cf_ldflags_static(stdin);
26311
26312   ;
26313   return 0;
26314 }
26315 _ACEOF
26316 rm -f conftest.$ac_objext conftest$ac_exeext
26317 if { (eval echo "$as_me:26317: \"$ac_link\"") >&5
26318   (eval $ac_link) 2>&5
26319   ac_status=$?
26320   echo "$as_me:26320: \$? = $ac_status" >&5
26321   (exit $ac_status); } &&
26322          { ac_try='test -s conftest$ac_exeext'
26323   { (eval echo "$as_me:26323: \"$ac_try\"") >&5
26324   (eval $ac_try) 2>&5
26325   ac_status=$?
26326   echo "$as_me:26326: \$? = $ac_status" >&5
26327   (exit $ac_status); }; }; then
26328
26329         # some linkers simply ignore the -dynamic
26330         case x`file conftest$ac_exeext 2>/dev/null` in
26331         (*static*)
26332                 cf_ldflags_static=no
26333                 ;;
26334         (*)
26335                 cf_ldflags_static=yes
26336                 ;;
26337         esac
26338
26339 else
26340   echo "$as_me: failed program was:" >&5
26341 cat conftest.$ac_ext >&5
26342 cf_ldflags_static=no
26343 fi
26344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26345
26346         rm -f libconftest.*
26347         LIBS="$cf_save_LIBS"
26348
26349         echo "$as_me:26349: result: $cf_ldflags_static" >&5
26350 echo "${ECHO_T}$cf_ldflags_static" >&6
26351
26352         if test $cf_ldflags_static != yes
26353         then
26354                 LDFLAGS_STATIC=
26355                 LDFLAGS_SHARED=
26356         fi
26357 else
26358         LDFLAGS_STATIC=
26359         LDFLAGS_SHARED=
26360 fi
26361
26362         ;;
26363 esac
26364
26365 echo "$as_me:26365: checking where we will install curses.h" >&5
26366 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26367
26368 includesubdir=
26369 if test "$with_overwrite" = no && \
26370  ( test "x$includedir" = 'x${prefix}/include' || \
26371    test "x$includedir" = "x${prefix}/include" )
26372 then
26373         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26374 fi
26375 echo "$as_me:26375: result: ${includedir}${includesubdir}" >&5
26376 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26377
26378 ### Resolve a conflict between normal and wide-curses by forcing applications
26379 ### that will need libutf8 to add it to their configure script.
26380 if test "$with_overwrite" != no ; then
26381 if test "$NCURSES_LIBUTF8" = 1 ; then
26382         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26383         { echo "$as_me:26383: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26384 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26385 fi
26386 fi
26387 WITH_OVERWRITE=$with_overwrite
26388
26389 ### At least on MinGW a shared library build without libtool
26390 ### requires adding the additional libs to the link list.
26391 case $cf_cv_system_name in
26392 (*mingw32*|*mingw64*)
26393         if test "$DFT_LWR_MODEL" != "libtool"; then
26394            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
26395         fi
26396         ;;
26397 *)      ;;
26398 esac
26399
26400 # used to separate tack out of the tree
26401 NCURSES_TREE=
26402
26403 ### predefined stuff for the test programs
26404
26405 cat >>confdefs.h <<\EOF
26406 #define HAVE_SLK_COLOR 1
26407 EOF
26408
26409 # pkgsrc uses these
26410
26411 echo "$as_me:26411: checking for desired basename for form library" >&5
26412 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26413
26414 # Check whether --with-form-libname or --without-form-libname was given.
26415 if test "${with_form_libname+set}" = set; then
26416   withval="$with_form_libname"
26417   with_lib_basename=$withval
26418 else
26419   with_lib_basename=form
26420 fi;
26421 FORM_NAME="$with_lib_basename"
26422
26423 case "x$FORM_NAME" in
26424 (x|xno|xnone|xyes)
26425         FORM_NAME=form
26426         ;;
26427 (*)
26428         ;;
26429 esac
26430
26431 echo "$as_me:26431: result: $FORM_NAME" >&5
26432 echo "${ECHO_T}$FORM_NAME" >&6
26433
26434 echo "$as_me:26434: checking for desired basename for menu library" >&5
26435 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26436
26437 # Check whether --with-menu-libname or --without-menu-libname was given.
26438 if test "${with_menu_libname+set}" = set; then
26439   withval="$with_menu_libname"
26440   with_lib_basename=$withval
26441 else
26442   with_lib_basename=menu
26443 fi;
26444 MENU_NAME="$with_lib_basename"
26445
26446 case "x$MENU_NAME" in
26447 (x|xno|xnone|xyes)
26448         MENU_NAME=menu
26449         ;;
26450 (*)
26451         ;;
26452 esac
26453
26454 echo "$as_me:26454: result: $MENU_NAME" >&5
26455 echo "${ECHO_T}$MENU_NAME" >&6
26456
26457 echo "$as_me:26457: checking for desired basename for panel library" >&5
26458 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26459
26460 # Check whether --with-panel-libname or --without-panel-libname was given.
26461 if test "${with_panel_libname+set}" = set; then
26462   withval="$with_panel_libname"
26463   with_lib_basename=$withval
26464 else
26465   with_lib_basename=panel
26466 fi;
26467 PANEL_NAME="$with_lib_basename"
26468
26469 case "x$PANEL_NAME" in
26470 (x|xno|xnone|xyes)
26471         PANEL_NAME=panel
26472         ;;
26473 (*)
26474         ;;
26475 esac
26476
26477 echo "$as_me:26477: result: $PANEL_NAME" >&5
26478 echo "${ECHO_T}$PANEL_NAME" >&6
26479
26480 echo "$as_me:26480: checking for desired basename for cxx library" >&5
26481 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26482
26483 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26484 if test "${with_cxx_libname+set}" = set; then
26485   withval="$with_cxx_libname"
26486   with_lib_basename=$withval
26487 else
26488   with_lib_basename=ncurses++
26489 fi;
26490 CXX_NAME="$with_lib_basename"
26491
26492 case "x$CXX_NAME" in
26493 (x|xno|xnone|xyes)
26494         CXX_NAME=ncurses++
26495         ;;
26496 (*)
26497         ;;
26498 esac
26499
26500 echo "$as_me:26500: result: $CXX_NAME" >&5
26501 echo "${ECHO_T}$CXX_NAME" >&6
26502
26503 ### Construct the list of subdirectories for which we'll customize makefiles
26504 ### with the appropriate compile-rules.
26505
26506 echo "$as_me:26506: checking for src modules" >&5
26507 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26508
26509 # dependencies and linker-arguments for test-programs
26510 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26511 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26512 if test "$DFT_LWR_MODEL" = "libtool"; then
26513         TEST_ARGS="${TEST_DEPS}"
26514         TEST_ARG2="${TEST_DEP2}"
26515 else
26516         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26517         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26518 fi
26519
26520 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26521 cf_cv_src_modules=
26522 for cf_dir in $modules_to_build
26523 do
26524         if test -f $srcdir/$cf_dir/modules; then
26525
26526                 # We may/may not have tack in the distribution, though the
26527                 # makefile is.
26528                 if test $cf_dir = tack ; then
26529                         if test "x$cf_with_tack" != "xyes"; then
26530                                 continue
26531                         fi
26532                 fi
26533
26534                 if test -z "$cf_cv_src_modules"; then
26535                         cf_cv_src_modules=$cf_dir
26536                 else
26537                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26538                 fi
26539
26540                 # Make the ncurses_cfg.h file record the library interface files as
26541                 # well.  These are header files that are the same name as their
26542                 # directory.  Ncurses is the only library that does not follow
26543                 # that pattern.
26544                 if test $cf_dir = tack ; then
26545                         continue
26546                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26547
26548 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26549
26550                         cat >>confdefs.h <<EOF
26551 #define HAVE_${cf_have_include}_H 1
26552 EOF
26553
26554                         cat >>confdefs.h <<EOF
26555 #define HAVE_LIB${cf_have_include} 1
26556 EOF
26557
26558 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26559
26560 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26561
26562                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26563                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26564                         if test "$DFT_LWR_MODEL" = "libtool"; then
26565                                 TEST_ARGS="${TEST_DEPS}"
26566                                 TEST_ARG2="${TEST_DEP2}"
26567                         else
26568                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26569                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26570                         fi
26571                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26572                 fi
26573         fi
26574 done
26575 echo "$as_me:26575: result: $cf_cv_src_modules" >&5
26576 echo "${ECHO_T}$cf_cv_src_modules" >&6
26577
26578 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26579 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26580
26581 SRC_SUBDIRS=
26582 if test "x$cf_with_manpages" != xno ; then
26583         SRC_SUBDIRS="$SRC_SUBDIRS man"
26584 fi
26585 SRC_SUBDIRS="$SRC_SUBDIRS include"
26586 for cf_dir in $cf_cv_src_modules
26587 do
26588         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26589 done
26590 if test "x$cf_with_tests" != "xno" ; then
26591         SRC_SUBDIRS="$SRC_SUBDIRS test"
26592 fi
26593 # always make this, to install the ncurses-config script
26594 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26595 if test "$cf_with_cxx_binding" != no; then
26596         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26597         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26598 fi
26599
26600 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26601 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26602
26603 ADA_SUBDIRS=
26604 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26605         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26606         ADA_SUBDIRS="gen src"
26607         if test "x$cf_with_tests" != "xno" ; then
26608                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26609         fi
26610 fi
26611
26612 SUB_MAKEFILES=
26613 for cf_dir in $SRC_SUBDIRS
26614 do
26615         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26616 done
26617
26618 if test -n "$ADA_SUBDIRS"; then
26619         for cf_dir in $ADA_SUBDIRS
26620         do
26621                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26622         done
26623
26624 fi
26625
26626 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26627    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26628    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26629    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26630 fi
26631
26632 DIRS_TO_MAKE="lib"
26633 for cf_item in $cf_list_models
26634 do
26635
26636         case $cf_item in
26637         (libtool) cf_subdir='obj_lo'  ;;
26638         (normal)  cf_subdir='objects' ;;
26639         (debug)   cf_subdir='obj_g' ;;
26640         (profile) cf_subdir='obj_p' ;;
26641         (shared)
26642                 case $cf_cv_system_name in
26643                 (cygwin|msys)
26644                         cf_subdir='objects' ;;
26645                 (*)
26646                         cf_subdir='obj_s' ;;
26647                 esac
26648         esac
26649
26650         for cf_item2 in $DIRS_TO_MAKE
26651         do
26652                 test $cf_item2 = $cf_subdir && break
26653         done
26654         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26655 done
26656 for cf_dir in $DIRS_TO_MAKE
26657 do
26658         test ! -d $cf_dir && mkdir $cf_dir
26659 done
26660
26661 # symbols that differ when compiling Ada95 by itself.
26662 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26663
26664 # values to use as strings
26665
26666 cat >>confdefs.h <<EOF
26667 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26668 EOF
26669
26670 cat >>confdefs.h <<EOF
26671 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26672 EOF
26673
26674 ### Define substitutions for header files to avoid name-pollution
26675
26676 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26677         HAVE_TCGETATTR=1
26678 else
26679         HAVE_TCGETATTR=0
26680 fi
26681
26682 if test "x$ac_cv_header_stdint_h" = xyes ; then
26683         HAVE_STDINT_H=1
26684 else
26685         HAVE_STDINT_H=0
26686 fi
26687
26688 if test "x$ac_cv_header_termio_h" = xyes ; then
26689         HAVE_TERMIO_H=1
26690 else
26691         HAVE_TERMIO_H=0
26692 fi
26693
26694 if test "x$ac_cv_header_termios_h" = xyes ; then
26695         HAVE_TERMIOS_H=1
26696 else
26697         HAVE_TERMIOS_H=0
26698 fi
26699
26700 ################################################################################
26701 test "x$use_database" = xyes && \
26702 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26703
26704 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26705 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26706
26707 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26708 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26709 fi
26710
26711 if test "x$cf_with_tests" != xno ; then
26712         MAKE_TESTS=
26713 else
26714         MAKE_TESTS="#"
26715 fi
26716
26717 ADAHTML_DIR=../../doc/html/ada
26718
26719 # workaround for OS/2 (20151017)
26720 case $cf_cv_system_name in
26721 (os2*)
26722         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26723         ;;
26724 (*)
26725         LIBTOOL_OPTS_CXX=
26726         ;;
26727 esac
26728
26729 # workaround for g++ versus Solaris (20131116)
26730 case $cf_cv_system_name in
26731 (solaris2*)
26732         case "x$CPPFLAGS" in
26733         (*-D_XOPEN_SOURCE_EXTENDED*)
26734                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26735
26736 echo "${as_me:-configure}:26736: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26737
26738                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26739                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26740                 ;;
26741         esac
26742         ;;
26743 esac
26744
26745 # Help to automatically enable the extended curses features when using either
26746 # the *-config or the ".pc" files by adding defines.
26747 echo "$as_me:26747: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26748 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26749 PKG_CFLAGS=
26750 for cf_loop1 in $CPPFLAGS_after_XOPEN
26751 do
26752         cf_found=no
26753         for cf_loop2 in $CPPFLAGS_before_XOPEN
26754         do
26755                 if test "x$cf_loop1" = "x$cf_loop2"
26756                 then
26757                         cf_found=yes
26758                         break
26759                 fi
26760         done
26761         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26762 done
26763 echo "$as_me:26763: result: $PKG_CFLAGS" >&5
26764 echo "${ECHO_T}$PKG_CFLAGS" >&6
26765
26766 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26767 case "x$NCURSES_OSPEED" in
26768 (*short*)
26769         cf_compatible=1
26770         ;;
26771 (*)
26772         cf_compatible=0
26773         ;;
26774 esac
26775
26776 cat >>confdefs.h <<EOF
26777 #define NCURSES_OSPEED_COMPAT $cf_compatible
26778 EOF
26779
26780 case "x$cf_cv_typeof_chtype" in
26781 (xshort|xint|xlong)
26782         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26783         ;;
26784 esac
26785
26786 case "x$cf_cv_typeof_mmask_t" in
26787 (xshort|xint|xlong)
26788         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26789         ;;
26790 esac
26791
26792 # substitute into misc/Makefile to suppress
26793 # (un)install.data from the
26794 # (un)install rules.
26795 if test "x$cf_with_db_install" = "xno"; then
26796         MISC_INSTALL_DATA=
26797         MISC_UNINSTALL_DATA=
26798 else
26799         MISC_INSTALL_DATA=install.data
26800         MISC_UNINSTALL_DATA=uninstall.data
26801 fi
26802
26803 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26804         MAKE_DATABASE="#"
26805 else
26806         MAKE_DATABASE="$MAKE_TERMINFO"
26807 fi
26808
26809 if test -n "$PACKAGE"
26810 then
26811         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26812         export PACKAGE
26813         echo "package: $PACKAGE"
26814 fi
26815
26816 UNALTERED_SYMS=
26817 cf_filter_syms=no
26818
26819 if test -n "$RESULTING_SYMS"
26820 then
26821         cf_filter_syms=$cf_dft_filter_syms
26822         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26823
26824 echo "${as_me:-configure}:26824: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26825
26826 fi
26827
26828 if test "x$WILDCARD_SYMS" = xno
26829 then
26830         cf_filter_syms=yes
26831 fi
26832
26833 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26834
26835 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26836 if test $cf_filter_syms = yes
26837 then
26838         RESULTING_SYMS=resulting.map
26839 fi
26840
26841 if test "x$cross_compiling" = xyes ; then
26842         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26843         CHECK_BUILD="#"
26844 else
26845         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26846         CHECK_BUILD=
26847 fi
26848
26849 # This is used for the *-config script and *.pc data files.
26850
26851 echo "$as_me:26851: checking for linker search path" >&5
26852 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26853 if test "${cf_cv_ld_searchpath+set}" = set; then
26854   echo $ECHO_N "(cached) $ECHO_C" >&6
26855 else
26856
26857 if test "$cross_compiling" != yes ; then
26858
26859 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26860 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26861
26862 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26863 # update the cache, which makes it run faster.
26864 test -z "$cf_pathlist" && \
26865         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26866
26867 test -z "$cf_pathlist" &&
26868         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26869
26870 # This works with OpenBSD 6.5, which lists only filenames
26871 test -z "$cf_pathlist" &&
26872         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26873
26874 if test -z "$cf_pathlist"
26875 then
26876         # dyld default path with MacOS
26877         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26878         then
26879                 # do this to bypass check
26880                 cf_cv_ld_searchpath='$HOME/lib'
26881                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26882         fi
26883 fi
26884
26885 if test -z "$cf_pathlist"
26886 then
26887         # Solaris is hardcoded
26888         if test -d /opt/SUNWspro/lib
26889         then
26890                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26891         elif test -d /usr/ccs/lib
26892         then
26893                 cf_pathlist="/usr/ccs/lib /usr/lib"
26894         fi
26895 fi
26896
26897 fi
26898
26899 # If nothing else, assume it is conventional
26900 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26901
26902 # Finally, check that this is only directories
26903 for cf_path in $0 $cf_pathlist
26904 do
26905         if test -d "$cf_path"; then
26906                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26907                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26908         fi
26909 done
26910
26911 # Ensure that it is nonempty
26912 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26913
26914 fi
26915 echo "$as_me:26915: result: $cf_cv_ld_searchpath" >&5
26916 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26917
26918 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26919
26920 cat >>confdefs.h <<\EOF
26921 #define HAVE_CURSES_DATA_BOOLNAMES 1
26922 EOF
26923
26924 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"
26925 ac_config_commands="$ac_config_commands default"
26926 cat >confcache <<\_ACEOF
26927 # This file is a shell script that caches the results of configure
26928 # tests run on this system so they can be shared between configure
26929 # scripts and configure runs, see configure's option --config-cache.
26930 # It is not useful on other systems.  If it contains results you don't
26931 # want to keep, you may remove or edit it.
26932 #
26933 # config.status only pays attention to the cache file if you give it
26934 # the --recheck option to rerun configure.
26935 #
26936 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26937 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26938 # following values.
26939
26940 _ACEOF
26941
26942 # The following way of writing the cache mishandles newlines in values,
26943 # but we know of no workaround that is simple, portable, and efficient.
26944 # So, don't put newlines in cache variables' values.
26945 # Ultrix sh set writes to stderr and can't be redirected directly,
26946 # and sets the high bit in the cache file unless we assign to the vars.
26947 {
26948   (set) 2>&1 |
26949     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26950     *ac_space=\ *)
26951       # `set' does not quote correctly, so add quotes (double-quote
26952       # substitution turns \\\\ into \\, and sed turns \\ into \).
26953       sed -n \
26954         "s/'/'\\\\''/g;
26955           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26956       ;;
26957     *)
26958       # `set' quotes correctly as required by POSIX, so do not add quotes.
26959       sed -n \
26960         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26961       ;;
26962     esac;
26963 } |
26964   sed '
26965      t clear
26966      : clear
26967      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26968      t end
26969      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26970      : end' >>confcache
26971 if cmp -s $cache_file confcache; then :; else
26972   if test -w $cache_file; then
26973     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26974     cat confcache >$cache_file
26975   else
26976     echo "not updating unwritable cache $cache_file"
26977   fi
26978 fi
26979 rm -f confcache
26980
26981 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26982 # Let make expand exec_prefix.
26983 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26984
26985 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26986 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26987 # trailing colons and then remove the whole line if VPATH becomes empty
26988 # (actually we leave an empty line to preserve line numbers).
26989 if test "x$srcdir" = x.; then
26990   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26991 s/:*\$(srcdir):*/:/;
26992 s/:*\${srcdir}:*/:/;
26993 s/:*@srcdir@:*/:/;
26994 s/^\([^=]*=[    ]*\):*/\1/;
26995 s/:*$//;
26996 s/^[^=]*=[      ]*$//;
26997 }'
26998 fi
26999
27000 DEFS=-DHAVE_CONFIG_H
27001
27002 : ${CONFIG_STATUS=./config.status}
27003 ac_clean_files_save=$ac_clean_files
27004 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27005 { echo "$as_me:27005: creating $CONFIG_STATUS" >&5
27006 echo "$as_me: creating $CONFIG_STATUS" >&6;}
27007 cat >$CONFIG_STATUS <<_ACEOF
27008 #! $SHELL
27009 # Generated automatically by configure.
27010 # Run this file to recreate the current configuration.
27011 # Compiler output produced by configure, useful for debugging
27012 # configure, is in config.log if it exists.
27013
27014 debug=false
27015 SHELL=\${CONFIG_SHELL-$SHELL}
27016 ac_cs_invocation="\$0 \$@"
27017
27018 CLICOLOR_FORCE= GREP_OPTIONS=
27019 unset CLICOLOR_FORCE GREP_OPTIONS
27020 _ACEOF
27021
27022 cat >>$CONFIG_STATUS <<\_ACEOF
27023 # Be Bourne compatible
27024 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27025   emulate sh
27026   NULLCMD=:
27027 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27028   set -o posix
27029 fi
27030
27031 # Name of the executable.
27032 as_me=`echo "$0" |sed 's,.*[\\/],,'`
27033
27034 if expr a : '\(a\)' >/dev/null 2>&1; then
27035   as_expr=expr
27036 else
27037   as_expr=false
27038 fi
27039
27040 rm -f conf$$ conf$$.exe conf$$.file
27041 echo >conf$$.file
27042 if ln -s conf$$.file conf$$ 2>/dev/null; then
27043   # We could just check for DJGPP; but this test a) works b) is more generic
27044   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
27045   if test -f conf$$.exe; then
27046     # Don't use ln at all; we don't have any links
27047     as_ln_s='cp -p'
27048   else
27049     as_ln_s='ln -s'
27050   fi
27051 elif ln conf$$.file conf$$ 2>/dev/null; then
27052   as_ln_s=ln
27053 else
27054   as_ln_s='cp -p'
27055 fi
27056 rm -f conf$$ conf$$.exe conf$$.file
27057
27058 as_executable_p="test -f"
27059
27060 # Support unset when possible.
27061 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27062   as_unset=unset
27063 else
27064   as_unset=false
27065 fi
27066
27067 # NLS nuisances.
27068 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
27069 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
27070 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
27071 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
27072 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
27073 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
27074 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
27075 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
27076
27077 # IFS
27078 # We need space, tab and new line, in precisely that order.
27079 as_nl='
27080 '
27081 IFS="   $as_nl"
27082
27083 # CDPATH.
27084 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
27085
27086 exec 6>&1
27087
27088 _ACEOF
27089
27090 # Files that config.status was made for.
27091 if test -n "$ac_config_files"; then
27092   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
27093 fi
27094
27095 if test -n "$ac_config_headers"; then
27096   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
27097 fi
27098
27099 if test -n "$ac_config_links"; then
27100   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
27101 fi
27102
27103 if test -n "$ac_config_commands"; then
27104   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
27105 fi
27106
27107 cat >>$CONFIG_STATUS <<\EOF
27108
27109 ac_cs_usage="\
27110 \`$as_me' instantiates files from templates according to the
27111 current configuration.
27112
27113 Usage: $0 [OPTIONS] [FILE]...
27114
27115   -h, --help       print this help, then exit
27116   -V, --version    print version number, then exit
27117   -d, --debug      don't remove temporary files
27118       --recheck    update $as_me by reconfiguring in the same conditions
27119   --file=FILE[:TEMPLATE]
27120                    instantiate the configuration file FILE
27121   --header=FILE[:TEMPLATE]
27122                    instantiate the configuration header FILE
27123
27124 Configuration files:
27125 $config_files
27126
27127 Configuration headers:
27128 $config_headers
27129
27130 Configuration commands:
27131 $config_commands
27132
27133 Report bugs to <dickey@invisible-island.net>."
27134 EOF
27135
27136 cat >>$CONFIG_STATUS <<EOF
27137 ac_cs_version="\\
27138 config.status
27139 configured by $0, generated by GNU Autoconf 2.52.20200802,
27140   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
27141
27142 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
27143 Free Software Foundation, Inc.
27144 This config.status script is free software; the Free Software Foundation
27145 gives unlimited permission to copy, distribute and modify it."
27146 srcdir=$srcdir
27147 INSTALL="$INSTALL"
27148 EOF
27149
27150 cat >>$CONFIG_STATUS <<\EOF
27151 # If no file are specified by the user, then we need to provide default
27152 # value.  By we need to know if files were specified by the user.
27153 ac_need_defaults=:
27154 while test $# != 0
27155 do
27156   case $1 in
27157   --*=*)
27158     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27159     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27160     shift
27161     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27162     shift
27163     ;;
27164   -*);;
27165   *) # This is not an option, so the user has probably given explicit
27166      # arguments.
27167      ac_need_defaults=false;;
27168   esac
27169
27170   case $1 in
27171   # Handling of the options.
27172 EOF
27173 cat >>$CONFIG_STATUS <<EOF
27174   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27175     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27176     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27177 EOF
27178 cat >>$CONFIG_STATUS <<\EOF
27179   --version | --vers* | -V )
27180     echo "$ac_cs_version"; exit 0 ;;
27181   --he | --h)
27182     # Conflict between --help and --header
27183     { { echo "$as_me:27183: error: ambiguous option: $1
27184 Try \`$0 --help' for more information." >&5
27185 echo "$as_me: error: ambiguous option: $1
27186 Try \`$0 --help' for more information." >&2;}
27187    { (exit 1); exit 1; }; };;
27188   --help | --hel | -h )
27189     echo "$ac_cs_usage"; exit 0 ;;
27190   --debug | --d* | -d )
27191     debug=: ;;
27192   --file | --fil | --fi | --f )
27193     shift
27194     CONFIG_FILES="$CONFIG_FILES $1"
27195     ac_need_defaults=false;;
27196   --header | --heade | --head | --hea )
27197     shift
27198     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27199     ac_need_defaults=false;;
27200
27201   # This is an error.
27202   -*) { { echo "$as_me:27202: error: unrecognized option: $1
27203 Try \`$0 --help' for more information." >&5
27204 echo "$as_me: error: unrecognized option: $1
27205 Try \`$0 --help' for more information." >&2;}
27206    { (exit 1); exit 1; }; } ;;
27207
27208   *) ac_config_targets="$ac_config_targets $1" ;;
27209
27210   esac
27211   shift
27212 done
27213
27214 exec 5>>config.log
27215 cat >&5 << _ACEOF
27216
27217 ## ----------------------- ##
27218 ## Running config.status.  ##
27219 ## ----------------------- ##
27220
27221 This file was extended by $as_me 2.52.20200802, executed with
27222   CONFIG_FILES    = $CONFIG_FILES
27223   CONFIG_HEADERS  = $CONFIG_HEADERS
27224   CONFIG_LINKS    = $CONFIG_LINKS
27225   CONFIG_COMMANDS = $CONFIG_COMMANDS
27226   > $ac_cs_invocation
27227 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27228
27229 _ACEOF
27230 EOF
27231
27232 cat >>$CONFIG_STATUS <<EOF
27233 #
27234 # INIT-COMMANDS section.
27235 #
27236
27237 ### Special initialization commands, used to pass information from the
27238 ### configuration-run into config.status
27239
27240 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27241 AWK="$AWK"
27242 CXX_NAME="$CXX_NAME"
27243 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27244 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27245 ECHO_LD="$ECHO_LD"
27246 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27247 FORM_NAME="$FORM_NAME"
27248 LDCONFIG="$LDCONFIG"
27249 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27250 LIB_NAME="$LIB_NAME"
27251 LIB_PREFIX="$LIB_PREFIX"
27252 LIB_SUBSETS="$LIB_SUBSETS"
27253 LIB_SUFFIX="$LIB_SUFFIX"
27254 LIB_TRACING="$LIB_TRACING"
27255 LN_S="$LN_S"
27256 MAKE_TERMINFO="$MAKE_TERMINFO"
27257 MENU_NAME="$MENU_NAME"
27258 NCURSES_MAJOR="$NCURSES_MAJOR"
27259 NCURSES_MINOR="$NCURSES_MINOR"
27260 NCURSES_OSPEED="$NCURSES_OSPEED"
27261 NCURSES_PATCH="$NCURSES_PATCH"
27262 PANEL_NAME="$PANEL_NAME"
27263 SRC_SUBDIRS="$SRC_SUBDIRS"
27264 TERMINFO="$TERMINFO"
27265 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27266 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27267 TICS_NAME="$TICS_NAME"
27268 TICS_SUFFIX="$TICS_SUFFIX"
27269 TIC_PATH="$TIC_PATH"
27270 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27271 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27272 TINFO_NAME="$TINFO_NAME"
27273 TINFO_SUFFIX="$TINFO_SUFFIX"
27274 UNALTERED_SYMS="$UNALTERED_SYMS"
27275 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27276 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27277 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27278 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27279 WILDCARD_SYMS="$WILDCARD_SYMS"
27280 WITH_CURSES_H="$with_curses_h"
27281 WITH_ECHO="${enable_echo:=yes}"
27282 WITH_OVERWRITE="$with_overwrite"
27283 cf_LIST_MODELS="$cf_list_models"
27284 cf_cv_abi_version="$cf_cv_abi_version"
27285 cf_cv_do_relink="$cf_cv_do_relink"
27286 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27287 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27288 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27289 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27290 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27291 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27292 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27293 cf_cv_rel_version="$cf_cv_rel_version"
27294 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27295 cf_cv_shared_soname='$cf_cv_shared_soname'
27296 cf_cv_shlib_version="$cf_cv_shlib_version"
27297 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27298 cf_cv_system_name="$cf_cv_system_name"
27299 cf_cv_term_driver="$with_term_driver"
27300 cf_with_ada="$cf_with_ada"
27301 cf_with_cxx_binding="$cf_with_cxx_binding"
27302 cf_with_db_install="$cf_with_db_install"
27303 cf_with_manpages="$cf_with_manpages"
27304 cf_with_tests="$cf_with_tests"
27305 host="$host"
27306 target="$target"
27307 with_shared_cxx="$with_shared_cxx"
27308
27309 EOF
27310
27311 cat >>$CONFIG_STATUS <<\EOF
27312 for ac_config_target in $ac_config_targets
27313 do
27314   case "$ac_config_target" in
27315   # Handling of arguments.
27316   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27317   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27318   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27319   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27320   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27321   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27322   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27323   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27324   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27325   *) { { echo "$as_me:27325: error: invalid argument: $ac_config_target" >&5
27326 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27327    { (exit 1); exit 1; }; };;
27328   esac
27329 done
27330
27331 # If the user did not use the arguments to specify the items to instantiate,
27332 # then the envvar interface is used.  Set only those that are not.
27333 # We use the long form for the default assignment because of an extremely
27334 # bizarre bug on SunOS 4.1.3.
27335 if $ac_need_defaults; then
27336   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27337   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27338   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27339 fi
27340
27341 # Create a temporary directory, and hook for its removal unless debugging.
27342 $debug ||
27343 {
27344   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27345   trap '{ (exit 1); exit 1; }' 1 2 13 15
27346 }
27347
27348 # Create a (secure) tmp directory for tmp files.
27349 : ${TMPDIR=/tmp}
27350 {
27351   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27352   test -n "$tmp" && test -d "$tmp"
27353 }  ||
27354 {
27355   tmp=$TMPDIR/cs$$-$RANDOM
27356   (umask 077 && mkdir $tmp)
27357 } ||
27358 {
27359    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27360    { (exit 1); exit 1; }
27361 }
27362
27363 EOF
27364
27365 cat >>$CONFIG_STATUS <<EOF
27366
27367 #
27368 # CONFIG_FILES section.
27369 #
27370
27371 # No need to generate the scripts if there are no CONFIG_FILES.
27372 # This happens for instance when ./config.status config.h
27373 if test -n "\$CONFIG_FILES"; then
27374   # Protect against being on the right side of a sed subst in config.status.
27375   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27376    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27377 s,@SHELL@,$SHELL,;t t
27378 s,@exec_prefix@,$exec_prefix,;t t
27379 s,@prefix@,$prefix,;t t
27380 s,@program_transform_name@,$program_transform_name,;t t
27381 s,@bindir@,$bindir,;t t
27382 s,@sbindir@,$sbindir,;t t
27383 s,@libexecdir@,$libexecdir,;t t
27384 s,@datarootdir@,$datarootdir,;t t
27385 s,@datadir@,$datadir,;t t
27386 s,@sysconfdir@,$sysconfdir,;t t
27387 s,@sharedstatedir@,$sharedstatedir,;t t
27388 s,@localstatedir@,$localstatedir,;t t
27389 s,@runstatedir@,$runstatedir,;t t
27390 s,@libdir@,$libdir,;t t
27391 s,@includedir@,$includedir,;t t
27392 s,@oldincludedir@,$oldincludedir,;t t
27393 s,@infodir@,$infodir,;t t
27394 s,@mandir@,$mandir,;t t
27395 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27396 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27397 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27398 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27399 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27400 s,@build_alias@,$build_alias,;t t
27401 s,@host_alias@,$host_alias,;t t
27402 s,@target_alias@,$target_alias,;t t
27403 s,@ECHO_C@,$ECHO_C,;t t
27404 s,@ECHO_N@,$ECHO_N,;t t
27405 s,@ECHO_T@,$ECHO_T,;t t
27406 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27407 s,@DEFS@,$DEFS,;t t
27408 s,@LIBS@,$LIBS,;t t
27409 s,@top_builddir@,$top_builddir,;t t
27410 s,@EGREP@,$EGREP,;t t
27411 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27412 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27413 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27414 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27415 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27416 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27417 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27418 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27419 s,@VERSION@,$VERSION,;t t
27420 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27421 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27422 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27423 s,@PACKAGE@,$PACKAGE,;t t
27424 s,@build@,$build,;t t
27425 s,@build_cpu@,$build_cpu,;t t
27426 s,@build_vendor@,$build_vendor,;t t
27427 s,@build_os@,$build_os,;t t
27428 s,@host@,$host,;t t
27429 s,@host_cpu@,$host_cpu,;t t
27430 s,@host_vendor@,$host_vendor,;t t
27431 s,@host_os@,$host_os,;t t
27432 s,@target@,$target,;t t
27433 s,@target_cpu@,$target_cpu,;t t
27434 s,@target_vendor@,$target_vendor,;t t
27435 s,@target_os@,$target_os,;t t
27436 s,@CC@,$CC,;t t
27437 s,@CFLAGS@,$CFLAGS,;t t
27438 s,@LDFLAGS@,$LDFLAGS,;t t
27439 s,@CPPFLAGS@,$CPPFLAGS,;t t
27440 s,@ac_ct_CC@,$ac_ct_CC,;t t
27441 s,@EXEEXT@,$EXEEXT,;t t
27442 s,@OBJEXT@,$OBJEXT,;t t
27443 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27444 s,@CPP@,$CPP,;t t
27445 s,@LDCONFIG@,$LDCONFIG,;t t
27446 s,@CXX@,$CXX,;t t
27447 s,@CXXFLAGS@,$CXXFLAGS,;t t
27448 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27449 s,@AWK@,$AWK,;t t
27450 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27451 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27452 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27453 s,@LINT@,$LINT,;t t
27454 s,@LINT_OPTS@,$LINT_OPTS,;t t
27455 s,@LN_S@,$LN_S,;t t
27456 s,@cf_config_suffix@,$cf_config_suffix,;t t
27457 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27458 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27459 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27460 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27461 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27462 s,@SET_MAKE@,$SET_MAKE,;t t
27463 s,@CTAGS@,$CTAGS,;t t
27464 s,@ETAGS@,$ETAGS,;t t
27465 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27466 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27467 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27468 s,@RANLIB@,$RANLIB,;t t
27469 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27470 s,@LD@,$LD,;t t
27471 s,@ac_ct_LD@,$ac_ct_LD,;t t
27472 s,@AR@,$AR,;t t
27473 s,@ac_ct_AR@,$ac_ct_AR,;t t
27474 s,@NM@,$NM,;t t
27475 s,@ac_ct_NM@,$ac_ct_NM,;t t
27476 s,@ARFLAGS@,$ARFLAGS,;t t
27477 s,@DESTDIR@,$DESTDIR,;t t
27478 s,@BUILD_CC@,$BUILD_CC,;t t
27479 s,@BUILD_CPP@,$BUILD_CPP,;t t
27480 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27481 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27482 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27483 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27484 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27485 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27486 s,@cf_list_models@,$cf_list_models,;t t
27487 s,@ABI_VERSION@,$ABI_VERSION,;t t
27488 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27489 s,@LIBTOOL@,$LIBTOOL,;t t
27490 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27491 s,@LT_UNDEF@,$LT_UNDEF,;t t
27492 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27493 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27494 s,@LIB_CREATE@,$LIB_CREATE,;t t
27495 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27496 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27497 s,@LIB_PREP@,$LIB_PREP,;t t
27498 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27499 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27500 s,@LIB_LINK@,$LIB_LINK,;t t
27501 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27502 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27503 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27504 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27505 s,@TICS_NAME@,$TICS_NAME,;t t
27506 s,@TINFO_NAME@,$TINFO_NAME,;t t
27507 s,@LIB_NAME@,$LIB_NAME,;t t
27508 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27509 s,@CC_G_OPT@,$CC_G_OPT,;t t
27510 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27511 s,@LD_MODEL@,$LD_MODEL,;t t
27512 s,@shlibdir@,$shlibdir,;t t
27513 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27514 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27515 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27516 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27517 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27518 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27519 s,@LINK_PROGS@,$LINK_PROGS,;t t
27520 s,@LINK_TESTS@,$LINK_TESTS,;t t
27521 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27522 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27523 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27524 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27525 s,@RPATH_LIST@,$RPATH_LIST,;t t
27526 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27527 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27528 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27529 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27530 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27531 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27532 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27533 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27534 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27535 s,@TIC@,$TIC,;t t
27536 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
27537 s,@INFOCMP@,$INFOCMP,;t t
27538 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
27539 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27540 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27541 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27542 s,@XTERM_KBS@,$XTERM_KBS,;t t
27543 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27544 s,@TERMINFO@,$TERMINFO,;t t
27545 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27546 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27547 s,@TERMPATH@,$TERMPATH,;t t
27548 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27549 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27550 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27551 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27552 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27553 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27554 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27555 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27556 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27557 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27558 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27559 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27560 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27561 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27562 s,@RGB_PATH@,$RGB_PATH,;t t
27563 s,@no_x11_rgb@,$no_x11_rgb,;t t
27564 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27565 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27566 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27567 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27568 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27569 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27570 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27571 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27572 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27573 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27574 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27575 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27576 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27577 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27578 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27579 s,@PTHREAD@,$PTHREAD,;t t
27580 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27581 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27582 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27583 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27584 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27585 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27586 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27587 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27588 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27589 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27590 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27591 s,@ECHO_LT@,$ECHO_LT,;t t
27592 s,@ECHO_LD@,$ECHO_LD,;t t
27593 s,@RULE_CC@,$RULE_CC,;t t
27594 s,@SHOW_CC@,$SHOW_CC,;t t
27595 s,@ECHO_CC@,$ECHO_CC,;t t
27596 s,@ECHO_LINK@,$ECHO_LINK,;t t
27597 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27598 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27599 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27600 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27601 s,@ADAFLAGS@,$ADAFLAGS,;t t
27602 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27603 s,@ADA_TRACE@,$ADA_TRACE,;t t
27604 s,@MATH_LIB@,$MATH_LIB,;t t
27605 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27606 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27607 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27608 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27609 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27610 s,@TEST_LIBS@,$TEST_LIBS,;t t
27611 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27612 s,@CXXCPP@,$CXXCPP,;t t
27613 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27614 s,@CXX_AR@,$CXX_AR,;t t
27615 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27616 s,@CXXLIBS@,$CXXLIBS,;t t
27617 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27618 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27619 s,@M4_exists@,$M4_exists,;t t
27620 s,@cf_ada_make@,$cf_ada_make,;t t
27621 s,@cf_ada_config@,$cf_ada_config,;t t
27622 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27623 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27624 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27625 s,@cf_compile_generics@,$cf_compile_generics,;t t
27626 s,@cf_generic_objects@,$cf_generic_objects,;t t
27627 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27628 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27629 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27630 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27631 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27632 s,@cf_ada_package@,$cf_ada_package,;t t
27633 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27634 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27635 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27636 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27637 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27638 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27639 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27640 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27641 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27642 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27643 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27644 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27645 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27646 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27647 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27648 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27649 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27650 s,@TICS_LIBS@,$TICS_LIBS,;t t
27651 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27652 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27653 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27654 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27655 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27656 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27657 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27658 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27659 s,@includesubdir@,$includesubdir,;t t
27660 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27661 s,@TICS_LIST@,$TICS_LIST,;t t
27662 s,@TINFO_LIST@,$TINFO_LIST,;t t
27663 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27664 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27665 s,@FORM_NAME@,$FORM_NAME,;t t
27666 s,@MENU_NAME@,$MENU_NAME,;t t
27667 s,@PANEL_NAME@,$PANEL_NAME,;t t
27668 s,@CXX_NAME@,$CXX_NAME,;t t
27669 s,@TEST_ARGS@,$TEST_ARGS,;t t
27670 s,@TEST_DEPS@,$TEST_DEPS,;t t
27671 s,@TEST_ARG2@,$TEST_ARG2,;t t
27672 s,@TEST_DEP2@,$TEST_DEP2,;t t
27673 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27674 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27675 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27676 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27677 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27678 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27679 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27680 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27681 s,@cross_compiling@,$cross_compiling,;t t
27682 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27683 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27684 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27685 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27686 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27687 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27688 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27689 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27690 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27691 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27692 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27693 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27694 CEOF
27695
27696 EOF
27697
27698   cat >>$CONFIG_STATUS <<\EOF
27699   # Split the substitutions into bite-sized pieces for seds with
27700   # small command number limits, like on Digital OSF/1 and HP-UX.
27701   ac_max_sed_lines=48
27702   ac_sed_frag=1 # Number of current file.
27703   ac_beg=1 # First line for current file.
27704   ac_end=$ac_max_sed_lines # Line after last line for current file.
27705   ac_more_lines=:
27706   ac_sed_cmds=
27707   while $ac_more_lines; do
27708     if test $ac_beg -gt 1; then
27709       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27710     else
27711       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27712     fi
27713     if test ! -s $tmp/subs.frag; then
27714       ac_more_lines=false
27715     else
27716       # The purpose of the label and of the branching condition is to
27717       # speed up the sed processing (if there are no `@' at all, there
27718       # is no need to browse any of the substitutions).
27719       # These are the two extra sed commands mentioned above.
27720       (echo ':t
27721   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27722       # It is possible to make a multiline substitution using escaped newlines.
27723       # Ensure that we do not split the substitution between script fragments.
27724       ac_BEG=$ac_end
27725       ac_END=`expr $ac_end + $ac_max_sed_lines`
27726       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27727       if test -s $tmp/subs.next; then
27728         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27729         if test ! -s $tmp/subs.edit; then
27730           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27731           if test ! -s $tmp/subs.edit; then
27732             if test $ac_beg -gt 1; then
27733               ac_end=`expr $ac_end - 1`
27734               continue
27735             fi
27736           fi
27737         fi
27738       fi
27739
27740       if test -z "$ac_sed_cmds"; then
27741         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27742       else
27743         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27744       fi
27745       ac_sed_frag=`expr $ac_sed_frag + 1`
27746       ac_beg=$ac_end
27747       ac_end=`expr $ac_end + $ac_max_sed_lines`
27748     fi
27749   done
27750   if test -z "$ac_sed_cmds"; then
27751     ac_sed_cmds=cat
27752   fi
27753 fi # test -n "$CONFIG_FILES"
27754
27755 EOF
27756 cat >>$CONFIG_STATUS <<\EOF
27757 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27758   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27759   case $ac_file in
27760   - | *:- | *:-:* ) # input from stdin
27761         cat >$tmp/stdin
27762         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27763         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27764   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27765         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27766   * )   ac_file_in=$ac_file.in ;;
27767   esac
27768
27769   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27770   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27771          X"$ac_file" : 'X\(//\)[^/]' \| \
27772          X"$ac_file" : 'X\(//\)$' \| \
27773          X"$ac_file" : 'X\(/\)' \| \
27774          .     : '\(.\)' 2>/dev/null ||
27775 echo X"$ac_file" |
27776     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27777           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27778           /^X\(\/\/\)$/{ s//\1/; q; }
27779           /^X\(\/\).*/{ s//\1/; q; }
27780           s/.*/./; q'`
27781   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27782     { case "$ac_dir" in
27783   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27784   *)                      as_incr_dir=.;;
27785 esac
27786 as_dummy="$ac_dir"
27787 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27788   case $as_mkdir_dir in
27789     # Skip DOS drivespec
27790     ?:) as_incr_dir=$as_mkdir_dir ;;
27791     *)
27792       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27793       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27794     ;;
27795   esac
27796 done; }
27797
27798     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27799     # A "../" for each directory in $ac_dir_suffix.
27800     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27801   else
27802     ac_dir_suffix= ac_dots=
27803   fi
27804
27805   case $srcdir in
27806   .)  ac_srcdir=.
27807       if test -z "$ac_dots"; then
27808          ac_top_srcdir=.
27809       else
27810          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27811       fi ;;
27812   [\\/]* | ?:[\\/]* )
27813       ac_srcdir=$srcdir$ac_dir_suffix;
27814       ac_top_srcdir=$srcdir ;;
27815   *) # Relative path.
27816     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27817     ac_top_srcdir=$ac_dots$srcdir ;;
27818   esac
27819
27820   case $INSTALL in
27821   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27822   *) ac_INSTALL=$ac_dots$INSTALL ;;
27823   esac
27824
27825   if test x"$ac_file" != x-; then
27826     { echo "$as_me:27826: creating $ac_file" >&5
27827 echo "$as_me: creating $ac_file" >&6;}
27828     rm -f "$ac_file"
27829   fi
27830   # Let's still pretend it is `configure' which instantiates (i.e., don't
27831   # use $as_me), people would be surprised to read:
27832   #    /* config.h.  Generated automatically by config.status.  */
27833   configure_input="Generated automatically from `echo $ac_file_in |
27834                                                  sed 's,.*/,,'` by configure."
27835
27836   # First look for the input files in the build tree, otherwise in the
27837   # src tree.
27838   ac_file_inputs=`IFS=:
27839     for f in $ac_file_in; do
27840       case $f in
27841       -) echo $tmp/stdin ;;
27842       [\\/$]*)
27843          # Absolute (can't be DOS-style, as IFS=:)
27844          test -f "$f" || { { echo "$as_me:27844: error: cannot find input file: $f" >&5
27845 echo "$as_me: error: cannot find input file: $f" >&2;}
27846    { (exit 1); exit 1; }; }
27847          echo $f;;
27848       *) # Relative
27849          if test -f "$f"; then
27850            # Build tree
27851            echo $f
27852          elif test -f "$srcdir/$f"; then
27853            # Source tree
27854            echo $srcdir/$f
27855          else
27856            # /dev/null tree
27857            { { echo "$as_me:27857: error: cannot find input file: $f" >&5
27858 echo "$as_me: error: cannot find input file: $f" >&2;}
27859    { (exit 1); exit 1; }; }
27860          fi;;
27861       esac
27862     done` || { (exit 1); exit 1; }
27863 EOF
27864 cat >>$CONFIG_STATUS <<\EOF
27865   ac_warn_datarootdir=no
27866   if test x"$ac_file" != x-; then
27867     for ac_item in $ac_file_inputs
27868     do
27869       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27870       if test -n "$ac_seen"; then
27871         ac_used=`grep '@datarootdir@' $ac_item`
27872         if test -z "$ac_used"; then
27873           { echo "$as_me:27873: WARNING: datarootdir was used implicitly but not set:
27874 $ac_seen" >&5
27875 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27876 $ac_seen" >&2;}
27877           ac_warn_datarootdir=yes
27878         fi
27879       fi
27880       ac_seen=`grep '${datarootdir}' $ac_item`
27881       if test -n "$ac_seen"; then
27882         { echo "$as_me:27882: WARNING: datarootdir was used explicitly but not set:
27883 $ac_seen" >&5
27884 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27885 $ac_seen" >&2;}
27886         ac_warn_datarootdir=yes
27887       fi
27888     done
27889   fi
27890
27891 if test "x$ac_warn_datarootdir" = xyes; then
27892   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27893 fi
27894
27895 EOF
27896 cat >>$CONFIG_STATUS <<EOF
27897   sed "$ac_vpsub
27898 $extrasub
27899 EOF
27900 cat >>$CONFIG_STATUS <<\EOF
27901 :t
27902 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27903 s,@configure_input@,$configure_input,;t t
27904 s,@srcdir@,$ac_srcdir,;t t
27905 s,@top_srcdir@,$ac_top_srcdir,;t t
27906 s,@INSTALL@,$ac_INSTALL,;t t
27907 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27908   rm -f $tmp/stdin
27909   if test x"$ac_file" != x-; then
27910     cp $tmp/out $ac_file
27911
27912     for ac_name in prefix exec_prefix datarootdir
27913     do
27914         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27915         if test -n "$ac_seen"; then
27916             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27917             if test -z "$ac_init"; then
27918               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27919               { echo "$as_me:27919: WARNING: Variable $ac_name is used but was not set:
27920 $ac_seen" >&5
27921 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27922 $ac_seen" >&2;}
27923             fi
27924         fi
27925     done
27926     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27927     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27928     if test -s $tmp/out; then
27929       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27930       { echo "$as_me:27930: WARNING: Some variables may not be substituted:
27931 $ac_seen" >&5
27932 echo "$as_me: WARNING: Some variables may not be substituted:
27933 $ac_seen" >&2;}
27934     fi
27935   else
27936     cat $tmp/out
27937   fi
27938   rm -f $tmp/out
27939
27940 done
27941 EOF
27942 cat >>$CONFIG_STATUS <<\EOF
27943
27944 #
27945 # CONFIG_HEADER section.
27946 #
27947
27948 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27949 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27950 #
27951 # ac_d sets the value in "#define NAME VALUE" lines.
27952 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27953 ac_dB='[        ].*$,\1#\2'
27954 ac_dC=' '
27955 ac_dD=',;t'
27956 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27957 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27958 ac_iB='\([      ]\),\1#\2define\3'
27959 ac_iC=' '
27960 ac_iD='\4,;t'
27961 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27962 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27963 ac_uB='$,\1#\2define\3'
27964 ac_uC=' '
27965 ac_uD=',;t'
27966
27967 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27968   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27969   case $ac_file in
27970   - | *:- | *:-:* ) # input from stdin
27971         cat >$tmp/stdin
27972         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27973         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27974   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27975         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27976   * )   ac_file_in=$ac_file.in ;;
27977   esac
27978
27979   test x"$ac_file" != x- && { echo "$as_me:27979: creating $ac_file" >&5
27980 echo "$as_me: creating $ac_file" >&6;}
27981
27982   # First look for the input files in the build tree, otherwise in the
27983   # src tree.
27984   ac_file_inputs=`IFS=:
27985     for f in $ac_file_in; do
27986       case $f in
27987       -) echo $tmp/stdin ;;
27988       [\\/$]*)
27989          # Absolute (can't be DOS-style, as IFS=:)
27990          test -f "$f" || { { echo "$as_me:27990: error: cannot find input file: $f" >&5
27991 echo "$as_me: error: cannot find input file: $f" >&2;}
27992    { (exit 1); exit 1; }; }
27993          echo $f;;
27994       *) # Relative
27995          if test -f "$f"; then
27996            # Build tree
27997            echo $f
27998          elif test -f "$srcdir/$f"; then
27999            # Source tree
28000            echo $srcdir/$f
28001          else
28002            # /dev/null tree
28003            { { echo "$as_me:28003: error: cannot find input file: $f" >&5
28004 echo "$as_me: error: cannot find input file: $f" >&2;}
28005    { (exit 1); exit 1; }; }
28006          fi;;
28007       esac
28008     done` || { (exit 1); exit 1; }
28009   # Remove the trailing spaces.
28010   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
28011
28012 EOF
28013
28014 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
28015 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
28016 # be either 'cat' or 'sort'.
28017 cat confdefs.h | uniq >conftest.vals
28018
28019 # Break up conftest.vals because some shells have a limit on
28020 # the size of here documents, and old seds have small limits too.
28021
28022 rm -f conftest.tail
28023 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
28024 while grep . conftest.vals >/dev/null
28025 do
28026   # Write chunks of a limited-size here document to conftest.frag.
28027   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
28028   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
28029   echo 'CEOF' >> $CONFIG_STATUS
28030   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
28031   rm -f conftest.vals
28032   mv conftest.tail conftest.vals
28033 done
28034 rm -f conftest.vals
28035
28036 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
28037 # marker @DEFS@.
28038 echo '  cat >> conftest.edit <<CEOF
28039 /@DEFS@/r conftest.frag
28040 /@DEFS@/d
28041 CEOF
28042 sed -f conftest.edit $tmp/in > $tmp/out
28043 rm -f $tmp/in
28044 mv $tmp/out $tmp/in
28045 rm -f conftest.edit conftest.frag
28046 ' >> $CONFIG_STATUS
28047
28048 cat >>$CONFIG_STATUS <<\EOF
28049   # Let's still pretend it is `configure' which instantiates (i.e., don't
28050   # use $as_me), people would be surprised to read:
28051   #    /* config.h.  Generated automatically by config.status.  */
28052   if test x"$ac_file" = x-; then
28053     echo "/* Generated automatically by configure.  */" >$tmp/config.h
28054   else
28055     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
28056   fi
28057   cat $tmp/in >>$tmp/config.h
28058   rm -f $tmp/in
28059   if test x"$ac_file" != x-; then
28060     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
28061       { echo "$as_me:28061: $ac_file is unchanged" >&5
28062 echo "$as_me: $ac_file is unchanged" >&6;}
28063     else
28064       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28065          X"$ac_file" : 'X\(//\)[^/]' \| \
28066          X"$ac_file" : 'X\(//\)$' \| \
28067          X"$ac_file" : 'X\(/\)' \| \
28068          .     : '\(.\)' 2>/dev/null ||
28069 echo X"$ac_file" |
28070     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28071           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28072           /^X\(\/\/\)$/{ s//\1/; q; }
28073           /^X\(\/\).*/{ s//\1/; q; }
28074           s/.*/./; q'`
28075       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
28076         { case "$ac_dir" in
28077   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
28078   *)                      as_incr_dir=.;;
28079 esac
28080 as_dummy="$ac_dir"
28081 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
28082   case $as_mkdir_dir in
28083     # Skip DOS drivespec
28084     ?:) as_incr_dir=$as_mkdir_dir ;;
28085     *)
28086       as_incr_dir=$as_incr_dir/$as_mkdir_dir
28087       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
28088     ;;
28089   esac
28090 done; }
28091
28092       fi
28093       rm -f $ac_file
28094       mv $tmp/config.h $ac_file
28095     fi
28096   else
28097     cat $tmp/config.h
28098     rm -f $tmp/config.h
28099   fi
28100 done
28101 EOF
28102 cat >>$CONFIG_STATUS <<\EOF
28103 #
28104 # CONFIG_COMMANDS section.
28105 #
28106 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
28107   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
28108   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
28109
28110   case $ac_dest in
28111     default )
28112 if test "x$cf_with_tests" != xno ; then
28113
28114 for cf_dir in test
28115 do
28116         if test ! -d $srcdir/$cf_dir; then
28117                 continue
28118         elif test -f $srcdir/$cf_dir/programs; then
28119                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
28120         fi
28121 done
28122
28123 fi
28124
28125 cf_prefix=$LIB_PREFIX
28126
28127 case $cf_cv_shlib_version in
28128 (cygdll|msysdll|mingw|msvcdll)
28129         TINFO_NAME=$TINFO_ARG_SUFFIX
28130         TINFO_SUFFIX=.dll
28131         ;;
28132 esac
28133
28134 if test -n "$TINFO_SUFFIX" ; then
28135         case $TINFO_SUFFIX in
28136         (tw*)
28137                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
28138                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
28139                 ;;
28140         (t*)
28141                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
28142                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
28143                 ;;
28144         (w*)
28145                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
28146                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28147                 ;;
28148         esac
28149 fi
28150
28151 for cf_dir in $SRC_SUBDIRS
28152 do
28153         if test ! -d $srcdir/$cf_dir ; then
28154                 continue
28155         elif test -f $srcdir/$cf_dir/modules; then
28156
28157                 SHARED_LIB=
28158                 Libs_To_Make=
28159                 cf_awk_program=
28160                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28161                 then
28162                         cf_awk_program="$cf_awk_program\
28163 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28164 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28165 "
28166                 fi
28167
28168                 if test "x$WILDCARD_SYMS" = xno
28169                 then
28170                         cf_awk_program="$cf_awk_program\
28171 /[      ]_\\*;/ { skip=1; next; }\
28172 "
28173                 fi
28174
28175                 if test "x$cf_awk_program" != "x"
28176                 then
28177                         cat >>$cf_dir/Makefile <<CF_EOF
28178
28179 # Generated by CF_LIB_RULES
28180 resulting.map: $UNALTERED_SYMS
28181         $AWK 'BEGIN { skip = 1; last=""; } \
28182 $cf_awk_program \
28183 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28184  skip = 0; last = \$\$0; } \
28185 END { print last; }' < $UNALTERED_SYMS >\$@
28186
28187 distclean::
28188         rm -f resulting.map
28189 CF_EOF
28190                 fi
28191
28192                 for cf_item in $cf_LIST_MODELS
28193                 do
28194
28195         case X$cf_item in
28196         (Xlibtool)
28197                 cf_suffix='.la'
28198                 cf_depsuf=$cf_suffix
28199                 ;;
28200         (Xdebug)
28201                 case $cf_cv_system_name in
28202                 (*-msvc*)
28203                         cf_suffix='_g.lib'
28204                         ;;
28205                 (*)
28206                         cf_suffix='_g.a'
28207                         ;;
28208                 esac
28209                 cf_depsuf=$cf_suffix
28210                 ;;
28211         (Xprofile)
28212                 case $cf_cv_system_name in
28213                 (*-msvc*)
28214                         cf_suffix='_p.lib'
28215                         ;;
28216                 (*)
28217                         cf_suffix='_p.a'
28218                         ;;
28219                 esac
28220                 cf_depsuf=$cf_suffix
28221                 ;;
28222         (Xshared)
28223                 case $cf_cv_system_name in
28224                 (aix[5-7]*)
28225                         cf_suffix='.so'
28226                         cf_depsuf=$cf_suffix
28227                         ;;
28228                 (*-msvc*)
28229                         cf_suffix='.dll'
28230                         cf_depsuf='.dll.lib'
28231                         ;;
28232                 (cygwin*|msys*|mingw*)
28233                         cf_suffix='.dll'
28234                         cf_depsuf='.dll.a'
28235                         ;;
28236                 (darwin*)
28237                         cf_suffix='.dylib'
28238                         cf_depsuf=$cf_suffix
28239                         ;;
28240                 (hpux*)
28241                         case $target in
28242                         (ia64*)
28243                                 cf_suffix='.so'
28244                                 cf_depsuf=$cf_suffix
28245                                 ;;
28246                         (*)
28247                                 cf_suffix='.sl'
28248                                 cf_depsuf=$cf_suffix
28249                                 ;;
28250                         esac
28251                         ;;
28252                 (*)
28253                         cf_suffix='.so'
28254                         cf_depsuf=$cf_suffix
28255                         ;;
28256                 esac
28257                 ;;
28258         (*)
28259                 case $target in
28260                 (*-msvc*)
28261                         cf_suffix='.lib'
28262                         ;;
28263                 (*)
28264                         cf_suffix='.a'
28265                         ;;
28266                 esac
28267                 cf_depsuf=$cf_suffix
28268                 ;;
28269         esac
28270         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28271         then
28272                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28273                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28274         fi
28275
28276                         if test "$cf_dir" = "c++"
28277                         then
28278
28279 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28280
28281 eval cf_libname=\$${cf_map_lib_basename}_NAME
28282
28283                         else
28284
28285 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28286
28287 eval cf_libname=\$${cf_map_lib_basename}_NAME
28288
28289                         fi
28290                         test -z "$cf_libname" && cf_libname="$cf_dir"
28291                         if test $cf_item = shared ; then
28292                                 if test -n "${LIB_SUFFIX}"
28293                                 then
28294                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28295                                 else
28296                                         cf_shared_suffix="$cf_suffix"
28297                                 fi
28298                                 if test "$cf_cv_do_symlinks" = yes ; then
28299                                         cf_version_name=
28300
28301                                         case "$cf_cv_shlib_version" in
28302                                         (rel)
28303                                                 cf_version_name=REL_VERSION
28304                                                 ;;
28305                                         (abi)
28306                                                 cf_version_name=ABI_VERSION
28307                                                 ;;
28308                                         esac
28309
28310                                         if test -n "$cf_version_name"
28311                                         then
28312                                                 case "$cf_cv_system_name" in
28313                                                 (darwin*)
28314                                                         # "w", etc?
28315                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28316                                                         ;;
28317                                                 (*)
28318                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28319                                                         ;;
28320                                                 esac
28321                                         fi
28322                                         if test -n "${USE_LIB_SUFFIX}"
28323                                         then
28324                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28325                                         else
28326                                                 cf_shared_suffix="$cf_suffix"
28327                                         fi
28328                                 fi
28329                                 # cygwin needs import library, and has unique naming convention
28330                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28331                                 # use 'cyg' prefix for shared lib.
28332                                 case $cf_cv_shlib_version in
28333                                 (cygdll)
28334                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28335                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28336                                         ;;
28337                                 (msysdll)
28338                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28339                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28340                                         ;;
28341                                 (mingw)
28342                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28343                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28344                                         ;;
28345                                 (msvcdll)
28346                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28347                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28348                                         ;;
28349                                 (*)
28350                                         cf_add_lib=
28351                                         ;;
28352                                 esac
28353                                 if test -n "$cf_add_lib"
28354                                 then
28355                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28356                                         continue
28357                                 fi
28358                         fi
28359                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28360                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28361                 done
28362
28363                 if test $cf_dir = ncurses ; then
28364                         cf_subsets="$LIB_SUBSETS"
28365                         cf_r_parts="$cf_subsets"
28366                         cf_liblist="$Libs_To_Make"
28367
28368                         while test -n "$cf_r_parts"
28369                         do
28370                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28371                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28372                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28373                                         cf_add_lib=
28374                                         case $cf_l_parts in
28375                                         (*termlib*)
28376                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28377                                                 ;;
28378                                         (*ticlib*)
28379                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28380                                                 ;;
28381                                         (*)
28382                                                 break
28383                                                 ;;
28384                                         esac
28385                                         if test -n "$cf_add_lib"; then
28386                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28387                                         fi
28388                                 else
28389                                         break
28390                                 fi
28391                         done
28392                 else
28393                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28394                 fi
28395
28396                 if test $cf_dir = c++; then
28397                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28398                                 cf_list=
28399                                 for cf_item in $Libs_To_Make
28400                                 do
28401                                         case $cf_item in
28402                                         (*.a)
28403                                                 ;;
28404                                         (*)
28405                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28406                                                 ;;
28407                                         esac
28408                                         for cf_test in $cf_list
28409                                         do
28410                                                 if test "$cf_test" = "$cf_item"
28411                                                 then
28412                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28413                                                         cf_item=
28414                                                         break
28415                                                 fi
28416                                         done
28417                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28418                                 done
28419                                 Libs_To_Make="$cf_list"
28420                         fi
28421                 fi
28422
28423                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28424                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28425                         $cf_dir/Makefile >$cf_dir/Makefile.out
28426                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28427
28428                 $AWK -f $srcdir/mk-0th.awk \
28429                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28430                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28431
28432                 for cf_subset in $cf_subsets
28433                 do
28434                         cf_subdirs=
28435                         for cf_item in $cf_LIST_MODELS
28436                         do
28437
28438                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28439
28440 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28441
28442                         CXX_MODEL=$cf_ITEM
28443                         if test "$CXX_MODEL" = SHARED; then
28444                                 case $cf_cv_shlib_version in
28445                                 (cygdll|msysdll|mingw|msvcdll)
28446                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28447
28448 echo "${as_me:-configure}:28448: testing overriding CXX_MODEL to SHARED ..." 1>&5
28449
28450                                         with_shared_cxx=yes
28451                                         ;;
28452                                 (*)
28453                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28454                                         ;;
28455                                 esac
28456                         fi
28457
28458         case X$cf_item in
28459         (Xlibtool)
28460                 cf_suffix='.la'
28461                 cf_depsuf=$cf_suffix
28462                 ;;
28463         (Xdebug)
28464                 case $cf_cv_system_name in
28465                 (*-msvc*)
28466                         cf_suffix='_g.lib'
28467                         ;;
28468                 (*)
28469                         cf_suffix='_g.a'
28470                         ;;
28471                 esac
28472                 cf_depsuf=$cf_suffix
28473                 ;;
28474         (Xprofile)
28475                 case $cf_cv_system_name in
28476                 (*-msvc*)
28477                         cf_suffix='_p.lib'
28478                         ;;
28479                 (*)
28480                         cf_suffix='_p.a'
28481                         ;;
28482                 esac
28483                 cf_depsuf=$cf_suffix
28484                 ;;
28485         (Xshared)
28486                 case $cf_cv_system_name in
28487                 (aix[5-7]*)
28488                         cf_suffix='.so'
28489                         cf_depsuf=$cf_suffix
28490                         ;;
28491                 (*-msvc*)
28492                         cf_suffix='.dll'
28493                         cf_depsuf='.dll.lib'
28494                         ;;
28495                 (cygwin*|msys*|mingw*)
28496                         cf_suffix='.dll'
28497                         cf_depsuf='.dll.a'
28498                         ;;
28499                 (darwin*)
28500                         cf_suffix='.dylib'
28501                         cf_depsuf=$cf_suffix
28502                         ;;
28503                 (hpux*)
28504                         case $target in
28505                         (ia64*)
28506                                 cf_suffix='.so'
28507                                 cf_depsuf=$cf_suffix
28508                                 ;;
28509                         (*)
28510                                 cf_suffix='.sl'
28511                                 cf_depsuf=$cf_suffix
28512                                 ;;
28513                         esac
28514                         ;;
28515                 (*)
28516                         cf_suffix='.so'
28517                         cf_depsuf=$cf_suffix
28518                         ;;
28519                 esac
28520                 ;;
28521         (*)
28522                 case $target in
28523                 (*-msvc*)
28524                         cf_suffix='.lib'
28525                         ;;
28526                 (*)
28527                         cf_suffix='.a'
28528                         ;;
28529                 esac
28530                 cf_depsuf=$cf_suffix
28531                 ;;
28532         esac
28533         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28534         then
28535                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28536                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28537         fi
28538
28539         case $cf_item in
28540         (libtool) cf_subdir='obj_lo'  ;;
28541         (normal)  cf_subdir='objects' ;;
28542         (debug)   cf_subdir='obj_g' ;;
28543         (profile) cf_subdir='obj_p' ;;
28544         (shared)
28545                 case $cf_cv_system_name in
28546                 (cygwin|msys)
28547                         cf_subdir='objects' ;;
28548                 (*)
28549                         cf_subdir='obj_s' ;;
28550                 esac
28551         esac
28552
28553                         # Test for case where we build libtinfo with a different name.
28554                         cf_libname=$cf_dir
28555                         if test $cf_dir = ncurses ; then
28556                                 case $cf_subset in
28557                                 (*base*)
28558                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28559                                         ;;
28560                                 (*termlib*)
28561                                         cf_libname=$TINFO_LIB_SUFFIX
28562                                         ;;
28563                                 (ticlib*)
28564                                         cf_libname=$TICS_LIB_SUFFIX
28565                                         ;;
28566                                 esac
28567                         elif test $cf_dir = c++ ; then
28568
28569 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28570
28571 eval cf_libname=\$${cf_map_lib_basename}_NAME
28572
28573                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28574                         else
28575
28576 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28577
28578 eval cf_libname=\$${cf_map_lib_basename}_NAME
28579
28580                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28581                         fi
28582                         if test -n "${USE_ARG_SUFFIX}" ; then
28583                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28584                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28585                         fi
28586
28587                         # These dependencies really are for development, not
28588                         # builds, but they are useful in porting, too.
28589                         cf_depend="../include/ncurses_cfg.h"
28590                         if test "$srcdir" = "."; then
28591                                 cf_reldir="."
28592                         else
28593                                 cf_reldir="\${srcdir}"
28594                         fi
28595
28596                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28597                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28598                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28599                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28600                         fi
28601
28602                         cf_dir_suffix=
28603                         old_cf_suffix="$cf_suffix"
28604                         if test "$cf_cv_shlib_version_infix" = yes ; then
28605                         if test -n "$USE_LIB_SUFFIX" ; then
28606                                 case $USE_LIB_SUFFIX in
28607                                 (tw*)
28608                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28609                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28610                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28611                                         ;;
28612                                 (t*)
28613                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28614                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28615                                         cf_dir_suffix=t$EXTRA_SUFFIX
28616                                         ;;
28617                                 (w*)
28618                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28619                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28620                                         cf_dir_suffix=w$EXTRA_SUFFIX
28621                                         ;;
28622                                 (*)
28623                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28624                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28625                                         cf_dir_suffix=$EXTRA_SUFFIX
28626                                         ;;
28627                                 esac
28628                         fi
28629                         fi
28630
28631                         $AWK -f $srcdir/mk-1st.awk \
28632                                 name=${cf_libname}${cf_dir_suffix} \
28633                                 traces=$LIB_TRACING \
28634                                 MODEL=$cf_ITEM \
28635                                 CXX_MODEL=$CXX_MODEL \
28636                                 model=$cf_subdir \
28637                                 prefix=$cf_prefix \
28638                                 suffix=$cf_suffix \
28639                                 subset=$cf_subset \
28640                                 driver=$cf_cv_term_driver \
28641                                 SymLink="$LN_S" \
28642                                 TermlibRoot=$TINFO_NAME \
28643                                 TermlibSuffix=$TINFO_SUFFIX \
28644                                 ShlibVer=$cf_cv_shlib_version \
28645                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28646                                 ReLink=${cf_cv_do_relink:-no} \
28647                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28648                                 DoLinks=$cf_cv_do_symlinks \
28649                                 rmSoLocs=$cf_cv_rm_so_locs \
28650                                 ldconfig="$LDCONFIG" \
28651                                 overwrite=$WITH_OVERWRITE \
28652                                 depend="$cf_depend" \
28653                                 host="$host" \
28654                                 libtool_version="$LIBTOOL_VERSION" \
28655                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28656
28657                         cf_suffix="$old_cf_suffix"
28658
28659                         for cf_subdir2 in $cf_subdirs lib
28660                         do
28661                                 test $cf_subdir = $cf_subdir2 && break
28662                         done
28663                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28664                         $AWK -f $srcdir/mk-2nd.awk \
28665                                 name=$cf_dir \
28666                                 traces=$LIB_TRACING \
28667                                 MODEL=$cf_ITEM \
28668                                 model=$cf_subdir \
28669                                 subset=$cf_subset \
28670                                 srcdir=$srcdir \
28671                                 echo=$WITH_ECHO \
28672                                 crenames=$cf_cv_prog_CC_c_o \
28673                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28674                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28675                         cf_subdirs="$cf_subdirs $cf_subdir"
28676                         done
28677                 done
28678         fi
28679
28680         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28681 done
28682
28683 for cf_dir in $SRC_SUBDIRS
28684 do
28685         if test ! -d $srcdir/$cf_dir ; then
28686                 continue
28687         fi
28688
28689         if test -f $cf_dir/Makefile ; then
28690                 case "$cf_dir" in
28691                 (Ada95)
28692                         echo 'libs \' >> Makefile
28693                         echo 'install.libs \' >> Makefile
28694                         echo 'uninstall.libs ::' >> Makefile
28695                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28696                         ;;
28697                 esac
28698         fi
28699
28700         if test -f $srcdir/$cf_dir/modules; then
28701                 echo >> Makefile
28702                 if test -f $srcdir/$cf_dir/headers; then
28703 cat >> Makefile <<CF_EOF
28704 install.includes \\
28705 uninstall.includes \\
28706 CF_EOF
28707                 fi
28708 if test "$cf_dir" != "c++" ; then
28709 echo 'lint \' >> Makefile
28710 fi
28711 cat >> Makefile <<CF_EOF
28712 libs \\
28713 lintlib \\
28714 install.libs \\
28715 uninstall.libs \\
28716 install.$cf_dir \\
28717 uninstall.$cf_dir ::
28718         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28719 CF_EOF
28720         elif test -f $srcdir/$cf_dir/headers; then
28721 cat >> Makefile <<CF_EOF
28722
28723 libs \\
28724 install.libs \\
28725 uninstall.libs \\
28726 install.includes \\
28727 uninstall.includes ::
28728         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28729 CF_EOF
28730 fi
28731 done
28732
28733 if test "x$cf_with_db_install" = xyes; then
28734 cat >> Makefile <<CF_EOF
28735
28736 install.libs uninstall.libs \\
28737 install.data uninstall.data ::
28738 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28739 CF_EOF
28740 else
28741 cat >> Makefile <<CF_EOF
28742
28743 install.libs uninstall.libs ::
28744         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28745 CF_EOF
28746 fi
28747
28748 if test "x$cf_with_manpages" = xyes; then
28749 cat >> Makefile <<CF_EOF
28750
28751 install.man \\
28752 uninstall.man ::
28753         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28754 CF_EOF
28755 fi
28756
28757 cat >> Makefile <<CF_EOF
28758
28759 distclean ::
28760         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28761         rm -f headers.sh headers.sed mk_shared_lib.sh
28762         rm -f edit_man.* man_alias.*
28763         rm -rf \${DIRS_TO_MAKE}
28764 CF_EOF
28765
28766 # Special case: tack's manpage lives in its own directory.
28767 if test "x$cf_with_manpages" = xyes; then
28768 if test "x$cf_with_tack" = "xyes"; then
28769 cat >> Makefile <<CF_EOF
28770
28771 install.man \\
28772 uninstall.man ::
28773         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28774 CF_EOF
28775 fi
28776 fi
28777
28778 rm -f headers.sed headers.sh
28779
28780 echo creating headers.sh
28781 cat >headers.sh <<CF_EOF
28782 #! $SHELL
28783 # This shell script is generated by the 'configure' script.  It is invoked in a
28784 # subdirectory of the build tree.  It generates a sed-script in the parent
28785 # directory that is used to adjust includes for header files that reside in a
28786 # subdirectory of /usr/include, etc.
28787 PRG=""
28788 while test \$# != 3
28789 do
28790 PRG="\$PRG \$1"; shift
28791 done
28792 DST=\$1
28793 REF=\$2
28794 SRC=\$3
28795 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28796 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28797 echo installing \$SRC in \$DST
28798 CF_EOF
28799
28800 if test $WITH_CURSES_H = yes; then
28801         cat >>headers.sh <<CF_EOF
28802 case \$DST in
28803 (/*/include/*)
28804         END=\`basename \$DST\`
28805         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28806         do
28807                 NAME=\`basename \$i\`
28808                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28809         done
28810         ;;
28811 (*)
28812         echo "" >> \$TMPSED
28813         ;;
28814 esac
28815 CF_EOF
28816
28817 else
28818         cat >>headers.sh <<CF_EOF
28819 case \$DST in
28820 (/*/include/*)
28821         END=\`basename \$DST\`
28822         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28823         do
28824                 NAME=\`basename \$i\`
28825                 if test "\$NAME" = "curses.h"
28826                 then
28827                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28828                         NAME=ncurses.h
28829                 fi
28830                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28831         done
28832         ;;
28833 (*)
28834         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28835         ;;
28836 esac
28837 CF_EOF
28838 fi
28839 cat >>headers.sh <<CF_EOF
28840 rm -f \$TMPSRC
28841 sed -f \$TMPSED \$SRC > \$TMPSRC
28842 NAME=\`basename \$SRC\`
28843 CF_EOF
28844 if test $WITH_CURSES_H != yes; then
28845         cat >>headers.sh <<CF_EOF
28846 test "\$NAME" = "curses.h" && NAME=ncurses.h
28847 CF_EOF
28848 fi
28849 cat >>headers.sh <<CF_EOF
28850 # Just in case someone gzip'd manpages, remove the conflicting copy.
28851 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28852
28853 eval \$PRG \$TMPSRC \$DST/\$NAME
28854 rm -f \$TMPSRC \$TMPSED
28855 CF_EOF
28856
28857 chmod 0755 headers.sh
28858
28859 for cf_dir in $SRC_SUBDIRS
28860 do
28861         if test ! -d $srcdir/$cf_dir ; then
28862                 continue
28863         fi
28864
28865         if test -f $srcdir/$cf_dir/headers; then
28866                 $AWK -f $srcdir/mk-hdr.awk \
28867                         subset="$LIB_SUBSETS" \
28868                         compat="$WITH_CURSES_H" \
28869                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28870         fi
28871
28872         if test -f $srcdir/$cf_dir/modules; then
28873                 if test "$cf_dir" != "c++" ; then
28874                         cat >>$cf_dir/Makefile <<"CF_EOF"
28875 depend : ${AUTO_SRC}
28876         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28877
28878 # DO NOT DELETE THIS LINE -- make depend depends on it.
28879 CF_EOF
28880                 fi
28881         fi
28882 done
28883
28884 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28885 if test -z "$USE_OLD_MAKERULES" ; then
28886         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28887 fi
28888 fi
28889  ;;
28890   esac
28891 done
28892 EOF
28893
28894 cat >>$CONFIG_STATUS <<\EOF
28895
28896 { (exit 0); exit 0; }
28897 EOF
28898 chmod +x $CONFIG_STATUS
28899 ac_clean_files=$ac_clean_files_save
28900
28901 # configure is writing to config.log, and then calls config.status.
28902 # config.status does its own redirection, appending to config.log.
28903 # Unfortunately, on DOS this fails, as config.log is still kept open
28904 # by configure, so config.status won't be able to write to it; its
28905 # output is simply discarded.  So we exec the FD to /dev/null,
28906 # effectively closing config.log, so it can be properly (re)opened and
28907 # appended to by config.status.  When coming back to configure, we
28908 # need to make the FD available again.
28909 if test "$no_create" != yes; then
28910   ac_cs_success=:
28911   exec 5>/dev/null
28912   $SHELL $CONFIG_STATUS || ac_cs_success=false
28913   exec 5>>config.log
28914   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28915   # would make configure fail if this is the last instruction.
28916   $ac_cs_success || { (exit 1); exit 1; }
28917 fi
28918 ${MAKE:-make} preinstall