]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20200816
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.716 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
764 Fine-Tuning Your Configuration:
765   --with-extra-suffix=X   append extra suffix to header/library paths
766   --disable-overwrite     put headers in subdir, omit link to -lcurses
767   --disable-database      do not use terminfo, only fallbacks/termcap
768   --with-database=XXX     specify terminfo source to install
769   --with-hashed-db        specify hashed-database library
770   --with-fallbacks=XXX    specify list of fallback terminal descriptions
771   --with-tic-path=XXX     specify path of tic for fallbacks
772   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
773   --without-xterm-new     specify if xterm terminfo should be old version
774   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
775   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
776   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
777   --disable-big-core      assume machine has little memory
778   --disable-big-strings   assume compiler has only standard-size strings
779   --enable-termcap        compile in termcap fallback support
780   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
781   --enable-getcap         fast termcap load, no xrefs to terminfo
782   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
783   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
784   --disable-root-environ  restrict environment when running as root
785   --enable-symlinks       make tic use symbolic links not hard links
786   --enable-broken_linker  compile with broken-linker support code
787   --enable-bsdpad         recognize BSD-style prefix padding
788   --enable-widec          compile with wide-char/UTF-8 code
789   --disable-lp64          allow chtype to be long (ignore _LP64)
790   --disable-largefile     omit support for large files
791   --disable-tparm-varargs compile tparm() without varargs interface
792   --disable-tic-depends   link tic library without explicit dependency on ncurses library
793   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
794   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
795   --with-bool=TYPE        override fallback type of bool variable
796   --with-caps=alt         compile with alternate Caps file
797   --with-chtype=TYPE      override type of chtype
798   --with-ospeed=TYPE      override type of ospeed variable
799   --with-mmask-t=TYPE     override type of mmask_t
800   --with-ccharw-max=XXX   override size CCHARW_MAX
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --with-tparm-arg=TYPE   override parameter type of tparm
803   --with-rcs-ids          compile-in RCS identifiers
804 Options to Specify How Manpages are Installed:
805   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
806                           optionally formatted/catonly, e.g., gzip,formatted
807   --with-manpage-renames  specify manpage-renaming
808   --with-manpage-aliases  specify manpage-aliases using .so
809   --with-manpage-symlinks specify manpage-aliases using symlinks
810   --with-manpage-tbl      specify manpage processing with tbl
811 Extensions:
812   --disable-ext-funcs     disable function-extensions
813   --enable-sp-funcs       enable SCREEN-extensions
814   --enable-term-driver    enable terminal-driver
815   --enable-const          compile with extra/non-standard const
816   --enable-ext-colors     compile for 256-color support
817   --enable-ext-mouse      compile for extended mouse-encoding
818   --enable-ext-putwin     compile with extended putwin/screendump
819   --enable-no-padding     compile with $NCURSES_NO_PADDING code
820   --enable-sigwinch       compile with SIGWINCH handler
821   --enable-tcap-names     compile with user-definable terminal capabilities
822 Reentrant Code:
823   --with-pthread          use POSIX thread library
824   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
825   --enable-weak-symbols   enable weak-symbols for pthreads
826   --enable-reentrant      compile with reentrant code
827   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
828   --enable-opaque-form    make form-library structures "opaque"
829   --enable-opaque-menu    make menu-library structures "opaque"
830   --enable-opaque-panel   make panel-library structures "opaque"
831   --with-wrap-prefix=XXX  override prefix used for public variables
832 Development Code:
833   --without-develop       disable development options
834   --enable-hard-tabs      compile with hard-tabs code
835   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
836 Experimental Code:
837   --disable-assumed-color do not assume anything about default-colors
838   --disable-hashmap       compile without hashmap scrolling-optimization
839   --enable-colorfgbg      compile-in experimental $COLORFGBG code
840   --enable-fvisibility    compile with -fvisibility=hidden
841   --enable-interop        compile-in interop bindings
842   --enable-safe-sprintf   compile with experimental safe-sprintf code
843   --disable-scroll-hints  compile without scroll-hints code
844   --enable-wgetch-events  compile with wgetch-events code
845 Testing/development Options:
846   --disable-echo          do not display "compiling" commands
847   --disable-stripping     do not strip (debug info) installed executables
848   --enable-warnings       build: turn on GCC compiler warnings
849   --enable-string-hacks   work around bogus compiler/loader warnings
850   --enable-assertions     test: turn on generation of assertion code
851   --with-dmalloc          test: use Gray Watson's dmalloc library
852   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
853   --with-valgrind         test: use valgrind
854   --disable-leaks         test: free permanent memory, analyze leaks
855   --enable-expanded       test: generate functions for certain macros
856   --disable-macros        test: use functions rather than macros
857   --with-trace            test: add trace() function to all models of ncurses
858   --disable-gnat-projects test: disable GNAT projects even if usable
859 Ada Binding Options:
860   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
861   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
862   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
863   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
864   --with-ada-libname=XXX  override default Ada library-name
865   --with-form-libname=XXX override form basename of library
866   --with-menu-libname=XXX override menu basename of library
867   --with-panel-libname=XXX override panel basename of library
868   --with-cxx-libname=XXX override ncurses++ basename of library
869
870 Some influential environment variables:
871   CC          C compiler command
872   CFLAGS      C compiler flags
873   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
874               nonstandard directory <lib dir>
875   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
876               headers in a nonstandard directory <include dir>
877   CPP         C preprocessor
878   CXX         C++ compiler command
879   CXXFLAGS    C++ compiler flags
880   CXXCPP      C++ preprocessor
881
882 Use these variables to override the choices made by `configure' or to help
883 it to find libraries and programs with nonstandard names/locations.
884
885 EOF
886 fi
887
888 if test "$ac_init_help" = "recursive"; then
889   # If there are subdirs, report their specific --help.
890   ac_popdir=`pwd`
891   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
892     cd $ac_subdir
893     # A "../" for each directory in /$ac_subdir.
894     ac_dots=`echo $ac_subdir |
895              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
896
897     case $srcdir in
898     .) # No --srcdir option.  We are building in place.
899       ac_sub_srcdir=$srcdir ;;
900     [\\/]* | ?:[\\/]* ) # Absolute path.
901       ac_sub_srcdir=$srcdir/$ac_subdir ;;
902     *) # Relative path.
903       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
904     esac
905
906     # Check for guested configure; otherwise get Cygnus style configure.
907     if test -f $ac_sub_srcdir/configure.gnu; then
908       echo
909       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
910     elif test -f $ac_sub_srcdir/configure; then
911       echo
912       $SHELL $ac_sub_srcdir/configure  --help=recursive
913     elif test -f $ac_sub_srcdir/configure.ac ||
914            test -f $ac_sub_srcdir/configure.in; then
915       echo
916       $ac_configure --help
917     else
918       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
919     fi
920     cd $ac_popdir
921   done
922 fi
923
924 test -n "$ac_init_help" && exit 0
925 if $ac_init_version; then
926   cat <<\EOF
927
928 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
929 Free Software Foundation, Inc.
930 This configure script is free software; the Free Software Foundation
931 gives unlimited permission to copy, distribute and modify it.
932 EOF
933   exit 0
934 fi
935 exec 5>config.log
936 cat >&5 <<EOF
937 This file contains any messages produced by compilers while
938 running configure, to aid debugging if configure makes a mistake.
939
940 It was created by $as_me, which was
941 generated by GNU Autoconf 2.52.20200802.  Invocation command line was
942
943   $ $0 $@
944
945 EOF
946 {
947 cat <<_ASUNAME
948 ## ---------- ##
949 ## Platform.  ##
950 ## ---------- ##
951
952 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
953 uname -m = `(uname -m) 2>/dev/null || echo unknown`
954 uname -r = `(uname -r) 2>/dev/null || echo unknown`
955 uname -s = `(uname -s) 2>/dev/null || echo unknown`
956 uname -v = `(uname -v) 2>/dev/null || echo unknown`
957
958 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
959 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
960
961 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
962 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
963 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
964 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
965 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
966 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
967 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
968
969 PATH = $PATH
970
971 _ASUNAME
972 } >&5
973
974 cat >&5 <<EOF
975 ## ------------ ##
976 ## Core tests.  ##
977 ## ------------ ##
978
979 EOF
980
981 # Keep a trace of the command line.
982 # Strip out --no-create and --no-recursion so they do not pile up.
983 # Also quote any args containing shell meta-characters.
984 ac_configure_args=
985 ac_sep=
986 for ac_arg
987 do
988   case $ac_arg in
989   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
990   | --no-cr | --no-c) ;;
991   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
993   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
994     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
995     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
996     ac_sep=" " ;;
997   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
998      ac_sep=" " ;;
999   esac
1000   # Get rid of the leading space.
1001 done
1002
1003 # When interrupted or exit'd, cleanup temporary files, and complete
1004 # config.log.  We remove comments because anyway the quotes in there
1005 # would cause problems or look ugly.
1006 trap 'exit_status=$?
1007   # Save into config.log some information that might help in debugging.
1008   echo >&5
1009   echo "## ----------------- ##" >&5
1010   echo "## Cache variables.  ##" >&5
1011   echo "## ----------------- ##" >&5
1012   echo >&5
1013   # The following way of writing the cache mishandles newlines in values,
1014 {
1015   (set) 2>&1 |
1016     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1017     *ac_space=\ *)
1018       sed -n \
1019         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1020           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1021       ;;
1022     *)
1023       sed -n \
1024         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1025       ;;
1026     esac;
1027 } >&5
1028   sed "/^$/d" confdefs.h >conftest.log
1029   if test -s conftest.log; then
1030     echo >&5
1031     echo "## ------------ ##" >&5
1032     echo "## confdefs.h.  ##" >&5
1033     echo "## ------------ ##" >&5
1034     echo >&5
1035     cat conftest.log >&5
1036   fi
1037   (echo; echo) >&5
1038   test "$ac_signal" != 0 &&
1039     echo "$as_me: caught signal $ac_signal" >&5
1040   echo "$as_me: exit $exit_status" >&5
1041   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1042     exit $exit_status
1043      ' 0
1044 for ac_signal in 1 2 13 15; do
1045   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1046 done
1047 ac_signal=0
1048
1049 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1050 rm -rf conftest* confdefs.h
1051 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1052 echo >confdefs.h
1053
1054 # Let the site file select an alternate cache file if it wants to.
1055 # Prefer explicitly selected file to automatically selected ones.
1056 if test -z "$CONFIG_SITE"; then
1057   if test "x$prefix" != xNONE; then
1058     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1059   else
1060     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1061   fi
1062 fi
1063 for ac_site_file in $CONFIG_SITE; do
1064   if test -r "$ac_site_file"; then
1065     { echo "$as_me:1065: loading site script $ac_site_file" >&5
1066 echo "$as_me: loading site script $ac_site_file" >&6;}
1067     cat "$ac_site_file" >&5
1068     . "$ac_site_file"
1069   fi
1070 done
1071
1072 if test -r "$cache_file"; then
1073   # Some versions of bash will fail to source /dev/null (special
1074   # files actually), so we avoid doing that.
1075   if test -f "$cache_file"; then
1076     { echo "$as_me:1076: loading cache $cache_file" >&5
1077 echo "$as_me: loading cache $cache_file" >&6;}
1078     case $cache_file in
1079       [\\/]* | ?:[\\/]* ) . $cache_file;;
1080       *)                      . ./$cache_file;;
1081     esac
1082   fi
1083 else
1084   { echo "$as_me:1084: creating cache $cache_file" >&5
1085 echo "$as_me: creating cache $cache_file" >&6;}
1086   >$cache_file
1087 fi
1088
1089 # Check that the precious variables saved in the cache have kept the same
1090 # value.
1091 ac_cache_corrupted=false
1092 for ac_var in `(set) 2>&1 |
1093                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1094   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1095   eval ac_new_set=\$ac_env_${ac_var}_set
1096   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1097   eval ac_new_val="\$ac_env_${ac_var}_value"
1098   case $ac_old_set,$ac_new_set in
1099     set,)
1100       { echo "$as_me:1100: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1101 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1102       ac_cache_corrupted=: ;;
1103     ,set)
1104       { echo "$as_me:1104: error: \`$ac_var' was not set in the previous run" >&5
1105 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1106       ac_cache_corrupted=: ;;
1107     ,);;
1108     *)
1109       if test "x$ac_old_val" != "x$ac_new_val"; then
1110         { echo "$as_me:1110: error: \`$ac_var' has changed since the previous run:" >&5
1111 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1112         { echo "$as_me:1112:   former value:  $ac_old_val" >&5
1113 echo "$as_me:   former value:  $ac_old_val" >&2;}
1114         { echo "$as_me:1114:   current value: $ac_new_val" >&5
1115 echo "$as_me:   current value: $ac_new_val" >&2;}
1116         ac_cache_corrupted=:
1117       fi;;
1118   esac
1119   # Pass precious variables to config.status.  It doesn't matter if
1120   # we pass some twice (in addition to the command line arguments).
1121   if test "$ac_new_set" = set; then
1122     case $ac_new_val in
1123     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1124       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1125       ac_configure_args="$ac_configure_args '$ac_arg'"
1126       ;;
1127     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1128        ;;
1129     esac
1130   fi
1131 done
1132 if $ac_cache_corrupted; then
1133   { echo "$as_me:1133: error: changes in the environment can compromise the build" >&5
1134 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1135   { { echo "$as_me:1135: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1136 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1137    { (exit 1); exit 1; }; }
1138 fi
1139
1140 ac_ext=c
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146
1147 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1148   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1149                    ECHO_T='     ' ;;
1150   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1151   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1152 esac
1153 echo "#! $SHELL" >conftest.sh
1154 echo  "exit 0"   >>conftest.sh
1155 chmod +x conftest.sh
1156 if { (echo "$as_me:1156: PATH=\".;.\"; conftest.sh") >&5
1157   (PATH=".;."; conftest.sh) 2>&5
1158   ac_status=$?
1159   echo "$as_me:1159: \$? = $ac_status" >&5
1160   (exit $ac_status); }; then
1161   ac_path_separator=';'
1162 else
1163   ac_path_separator=:
1164 fi
1165 PATH_SEPARATOR="$ac_path_separator"
1166 rm -f conftest.sh
1167
1168 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1169
1170 top_builddir=`pwd`
1171
1172 echo "$as_me:1172: checking for egrep" >&5
1173 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1174 if test "${ac_cv_prog_egrep+set}" = set; then
1175   echo $ECHO_N "(cached) $ECHO_C" >&6
1176 else
1177   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1178                 then ac_cv_prog_egrep='grep -E'
1179                 else ac_cv_prog_egrep='egrep'
1180         fi
1181 fi
1182 echo "$as_me:1182: result: $ac_cv_prog_egrep" >&5
1183 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1184         EGREP=$ac_cv_prog_egrep
1185
1186         test -z "$EGREP" && { { echo "$as_me:1186: error: No egrep program found" >&5
1187 echo "$as_me: error: No egrep program found" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1191 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 cf_cv_abi_version=${NCURSES_MAJOR}
1194 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1195 cf_cv_timestamp=`date`
1196 echo "$as_me:1196: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1197 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1198
1199 if test -f $srcdir/VERSION ; then
1200         echo "$as_me:1200: checking for package version" >&5
1201 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1202
1203         # if there are not enough fields, cut returns the last one...
1204         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1205         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1206         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1207
1208         # this is how CF_BUNDLED_INTL uses $VERSION:
1209         VERSION="$cf_field1"
1210
1211         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1212         test -z "$VERSION_MAJOR" && { { echo "$as_me:1212: error: missing major-version" >&5
1213 echo "$as_me: error: missing major-version" >&2;}
1214    { (exit 1); exit 1; }; }
1215
1216         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1217         test -z "$VERSION_MINOR" && { { echo "$as_me:1217: error: missing minor-version" >&5
1218 echo "$as_me: error: missing minor-version" >&2;}
1219    { (exit 1); exit 1; }; }
1220
1221         echo "$as_me:1221: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1222 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1223
1224         echo "$as_me:1224: checking for package patch date" >&5
1225 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1226         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1227         case .$VERSION_PATCH in
1228         (.)
1229                 { { echo "$as_me:1229: error: missing patch-date $VERSION_PATCH" >&5
1230 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1231    { (exit 1); exit 1; }; }
1232                 ;;
1233         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1234                 ;;
1235         (*)
1236                 { { echo "$as_me:1236: error: illegal patch-date $VERSION_PATCH" >&5
1237 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1238    { (exit 1); exit 1; }; }
1239                 ;;
1240         esac
1241         echo "$as_me:1241: result: $VERSION_PATCH" >&5
1242 echo "${ECHO_T}$VERSION_PATCH" >&6
1243 else
1244         { { echo "$as_me:1244: error: did not find $srcdir/VERSION" >&5
1245 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1246    { (exit 1); exit 1; }; }
1247 fi
1248
1249 # show the actual data that we have for versions:
1250 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1251
1252 echo "${as_me:-configure}:1252: testing ABI VERSION $VERSION ..." 1>&5
1253
1254 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1255
1256 echo "${as_me:-configure}:1256: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1257
1258 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1259
1260 echo "${as_me:-configure}:1260: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1261
1262 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1263
1264 echo "${as_me:-configure}:1264: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1265
1266         cf_PACKAGE=NCURSES
1267         PACKAGE=ncurses
1268
1269 cat >>confdefs.h <<EOF
1270 #define PACKAGE "$PACKAGE"
1271 EOF
1272
1273 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1274
1275         cat >>confdefs.h <<EOF
1276 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1277 EOF
1278
1279         cat >>confdefs.h <<EOF
1280 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1281 EOF
1282
1283 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1284
1285 # Check whether --with-rel-version or --without-rel-version was given.
1286 if test "${with_rel_version+set}" = set; then
1287   withval="$with_rel_version"
1288   { echo "$as_me:1288: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1289 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1290  cf_cv_rel_version=$withval
1291 fi;
1292
1293  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1294  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1295
1296 if test -n "$NCURSES_MAJOR" ; then
1297   case $NCURSES_MAJOR in
1298   ([0-9]*)
1299         ;;
1300   (*)
1301         { { echo "$as_me:1301: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1302 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1303    { (exit 1); exit 1; }; }
1304         ;;
1305   esac
1306 else
1307   { { echo "$as_me:1307: error: Release major-version value is empty" >&5
1308 echo "$as_me: error: Release major-version value is empty" >&2;}
1309    { (exit 1); exit 1; }; }
1310 fi
1311
1312 if test -n "$NCURSES_MINOR" ; then
1313   case $NCURSES_MINOR in
1314   ([0-9]*)
1315         ;;
1316   (*)
1317         { { echo "$as_me:1317: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1318 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1319    { (exit 1); exit 1; }; }
1320         ;;
1321   esac
1322 else
1323   { { echo "$as_me:1323: error: Release minor-version value is empty" >&5
1324 echo "$as_me: error: Release minor-version value is empty" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1329
1330 # Check whether --with-abi-version or --without-abi-version was given.
1331 if test "${with_abi_version+set}" = set; then
1332   withval="$with_abi_version"
1333
1334         if test "x$cf_cv_abi_version" != "x$withval"
1335         then
1336                 { echo "$as_me:1336: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1337 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1338                 case $cf_cv_rel_version in
1339                 (5.*)
1340                         cf_cv_rel_version=$withval.0
1341                         ;;
1342                 (6.*)
1343                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1344                         ;;
1345                 esac
1346         fi
1347         cf_cv_abi_version=$withval
1348 fi;
1349
1350 if test -n "$cf_cv_abi_version" ; then
1351   case $cf_cv_abi_version in
1352   ([0-9]*)
1353         ;;
1354   (*)
1355         { { echo "$as_me:1355: error: ABI version is not a number: $cf_cv_abi_version" >&5
1356 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1357    { (exit 1); exit 1; }; }
1358         ;;
1359   esac
1360 else
1361   { { echo "$as_me:1361: error: ABI version value is empty" >&5
1362 echo "$as_me: error: ABI version value is empty" >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365
1366 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1367 then
1368         case $cf_cv_rel_version in
1369         (5.*)
1370                 cf_cv_rel_version=$with_abi_version.0
1371                 ;;
1372         esac
1373 fi
1374
1375 ac_aux_dir=
1376 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1377   if test -f $ac_dir/install-sh; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/install-sh -c"
1380     break
1381   elif test -f $ac_dir/install.sh; then
1382     ac_aux_dir=$ac_dir
1383     ac_install_sh="$ac_aux_dir/install.sh -c"
1384     break
1385   elif test -f $ac_dir/shtool; then
1386     ac_aux_dir=$ac_dir
1387     ac_install_sh="$ac_aux_dir/shtool install -c"
1388     break
1389   fi
1390 done
1391 if test -z "$ac_aux_dir"; then
1392   { { echo "$as_me:1392: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1393 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1394    { (exit 1); exit 1; }; }
1395 fi
1396 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1397 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1398 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:1402: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:1406: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:1415: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 echo "$as_me:1431: checking host system type" >&5
1432 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1433 if test "${ac_cv_host+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_host_alias=$host_alias
1437 test -z "$ac_cv_host_alias" &&
1438   ac_cv_host_alias=$ac_cv_build_alias
1439 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1440   { { echo "$as_me:1440: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:1445: result: $ac_cv_host" >&5
1446 echo "${ECHO_T}$ac_cv_host" >&6
1447 host=$ac_cv_host
1448 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1453         echo "$as_me:1453: checking target system type" >&5
1454 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1455 if test "${ac_cv_target+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   ac_cv_target_alias=$target_alias
1459 test "x$ac_cv_target_alias" = "x" &&
1460   ac_cv_target_alias=$ac_cv_host_alias
1461 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1462   { { echo "$as_me:1462: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1463 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1464    { (exit 1); exit 1; }; }
1465
1466 fi
1467 echo "$as_me:1467: result: $ac_cv_target" >&5
1468 echo "${ECHO_T}$ac_cv_target" >&6
1469 target=$ac_cv_target
1470 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1471 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1472 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1473
1474 # The aliases save the names the user supplied, while $host etc.
1475 # will get canonicalized.
1476 test -n "$target_alias" &&
1477   test "$program_prefix$program_suffix$program_transform_name" = \
1478     NONENONEs,x,x, &&
1479   program_prefix=${target_alias}-
1480         system_name="$host_os"
1481 else
1482         system_name="`(uname -s -r) 2>/dev/null`"
1483         if test -z "$system_name" ; then
1484                 system_name="`(hostname) 2>/dev/null`"
1485         fi
1486 fi
1487 test -n "$system_name" &&
1488 cat >>confdefs.h <<EOF
1489 #define SYSTEM_NAME "$system_name"
1490 EOF
1491
1492 if test "${cf_cv_system_name+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   cf_cv_system_name="$system_name"
1496 fi
1497
1498 test -z "$system_name" && system_name="$cf_cv_system_name"
1499 test -n "$cf_cv_system_name" && echo "$as_me:1499: result: Configuring for $cf_cv_system_name" >&5
1500 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1501
1502 if test ".$system_name" != ".$cf_cv_system_name" ; then
1503         echo "$as_me:1503: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1504 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1505         { { echo "$as_me:1505: error: \"Please remove config.cache and try again.\"" >&5
1506 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1507    { (exit 1); exit 1; }; }
1508 fi
1509
1510 # Check whether --with-system-type or --without-system-type was given.
1511 if test "${with_system_type+set}" = set; then
1512   withval="$with_system_type"
1513   { echo "$as_me:1513: WARNING: overriding system type to $withval" >&5
1514 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1515         cf_cv_system_name=$withval
1516         host_os=$withval
1517
1518 fi;
1519
1520 ###     Save the given $CFLAGS to allow user-override.
1521 cf_user_CFLAGS="$CFLAGS"
1522
1523 ###     Default install-location
1524
1525 echo "$as_me:1525: checking for prefix" >&5
1526 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1527 if test "x$prefix" = "xNONE" ; then
1528         case "$cf_cv_system_name" in
1529                 # non-vendor systems don't have a conflict
1530         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1531                 prefix=/usr
1532                 ;;
1533         (*)     prefix=$ac_default_prefix
1534                 ;;
1535         esac
1536 fi
1537 echo "$as_me:1537: result: $prefix" >&5
1538 echo "${ECHO_T}$prefix" >&6
1539
1540 if test "x$prefix" = "xNONE" ; then
1541 echo "$as_me:1541: checking for default include-directory" >&5
1542 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1543 test -n "$verbose" && echo 1>&6
1544 for cf_symbol in \
1545         $includedir \
1546         $includedir/ncurses \
1547         $prefix/include \
1548         $prefix/include/ncurses \
1549         /usr/local/include \
1550         /usr/local/include/ncurses \
1551         /usr/include \
1552         /usr/include/ncurses
1553 do
1554         cf_dir=`eval echo $cf_symbol`
1555         if test -f $cf_dir/curses.h ; then
1556         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1557                 includedir="$cf_symbol"
1558                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1559                 break
1560         fi
1561         fi
1562         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1563 done
1564 echo "$as_me:1564: result: $includedir" >&5
1565 echo "${ECHO_T}$includedir" >&6
1566 fi
1567
1568 ### Defaults for ncurses ABI
1569
1570 case x$cf_cv_abi_version in
1571 (x[6789])
1572         cf_dft_ext_colors=yes
1573         cf_dft_ext_const=yes
1574         cf_dft_ext_mouse=yes
1575         cf_dft_ext_putwin=yes
1576         cf_dft_ext_spfuncs=yes
1577         cf_dft_filter_syms=yes
1578         cf_dft_chtype=uint32_t
1579         cf_dft_mmask_t=uint32_t
1580         cf_dft_interop=yes
1581         cf_dft_tparm_arg=intptr_t
1582         cf_dft_with_lp64=yes
1583         ;;
1584 (*)
1585         cf_dft_ext_colors=no
1586         cf_dft_ext_const=no
1587         cf_dft_ext_mouse=no
1588         cf_dft_ext_putwin=no
1589         cf_dft_ext_spfuncs=no
1590         cf_dft_filter_syms=no
1591         cf_dft_chtype=auto
1592         cf_dft_mmask_t=auto
1593         cf_dft_interop=no
1594         cf_dft_tparm_arg=long
1595         cf_dft_with_lp64=no
1596         ;;
1597 esac
1598
1599 ###     Checks for programs.
1600
1601 # Check whether --with-ada or --without-ada was given.
1602 if test "${with_ada+set}" = set; then
1603   withval="$with_ada"
1604   cf_with_ada=$withval
1605 else
1606   cf_with_ada=yes
1607 fi;
1608
1609 if test "x$cf_with_ada" = xyes
1610 then
1611         cf_prog_cc="gnatgcc gcc cc"
1612 else
1613         cf_prog_cc="gcc cc"
1614 fi
1615
1616 ac_ext=c
1617 ac_cpp='$CPP $CPPFLAGS'
1618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1621 ac_main_return=return
1622 if test -n "$ac_tool_prefix"; then
1623   for ac_prog in $cf_prog_cc
1624   do
1625     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1627 echo "$as_me:1627: checking for $ac_word" >&5
1628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1629 if test "${ac_cv_prog_CC+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if test -n "$CC"; then
1633   ac_cv_prog_CC="$CC" # Let the user override the test.
1634 else
1635   ac_save_IFS=$IFS; IFS=$ac_path_separator
1636 ac_dummy="$PATH"
1637 for ac_dir in $ac_dummy; do
1638   IFS=$ac_save_IFS
1639   test -z "$ac_dir" && ac_dir=.
1640   $as_executable_p "$ac_dir/$ac_word" || continue
1641 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1642 echo "$as_me:1642: found $ac_dir/$ac_word" >&5
1643 break
1644 done
1645
1646 fi
1647 fi
1648 CC=$ac_cv_prog_CC
1649 if test -n "$CC"; then
1650   echo "$as_me:1650: result: $CC" >&5
1651 echo "${ECHO_T}$CC" >&6
1652 else
1653   echo "$as_me:1653: result: no" >&5
1654 echo "${ECHO_T}no" >&6
1655 fi
1656
1657     test -n "$CC" && break
1658   done
1659 fi
1660 if test -z "$CC"; then
1661   ac_ct_CC=$CC
1662   for ac_prog in $cf_prog_cc
1663 do
1664   # Extract the first word of "$ac_prog", so it can be a program name with args.
1665 set dummy $ac_prog; ac_word=$2
1666 echo "$as_me:1666: checking for $ac_word" >&5
1667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   if test -n "$ac_ct_CC"; then
1672   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673 else
1674   ac_save_IFS=$IFS; IFS=$ac_path_separator
1675 ac_dummy="$PATH"
1676 for ac_dir in $ac_dummy; do
1677   IFS=$ac_save_IFS
1678   test -z "$ac_dir" && ac_dir=.
1679   $as_executable_p "$ac_dir/$ac_word" || continue
1680 ac_cv_prog_ac_ct_CC="$ac_prog"
1681 echo "$as_me:1681: found $ac_dir/$ac_word" >&5
1682 break
1683 done
1684
1685 fi
1686 fi
1687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1688 if test -n "$ac_ct_CC"; then
1689   echo "$as_me:1689: result: $ac_ct_CC" >&5
1690 echo "${ECHO_T}$ac_ct_CC" >&6
1691 else
1692   echo "$as_me:1692: result: no" >&5
1693 echo "${ECHO_T}no" >&6
1694 fi
1695
1696   test -n "$ac_ct_CC" && break
1697 done
1698
1699   CC=$ac_ct_CC
1700 fi
1701
1702 test -z "$CC" && { { echo "$as_me:1702: error: no acceptable cc found in \$PATH" >&5
1703 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1704    { (exit 1); exit 1; }; }
1705
1706 # Provide some information about the compiler.
1707 echo "$as_me:1707:" \
1708      "checking for C compiler version" >&5
1709 ac_compiler=`set X $ac_compile; echo $2`
1710 { (eval echo "$as_me:1710: \"$ac_compiler --version </dev/null >&5\"") >&5
1711   (eval $ac_compiler --version </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715 { (eval echo "$as_me:1715: \"$ac_compiler -v </dev/null >&5\"") >&5
1716   (eval $ac_compiler -v </dev/null >&5) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }
1720 { (eval echo "$as_me:1720: \"$ac_compiler -V </dev/null >&5\"") >&5
1721   (eval $ac_compiler -V </dev/null >&5) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }
1725
1726 cat >conftest.$ac_ext <<_ACEOF
1727 #line 1727 "configure"
1728 #include "confdefs.h"
1729
1730 int
1731 main (void)
1732 {
1733
1734   ;
1735   return 0;
1736 }
1737 _ACEOF
1738 ac_clean_files_save=$ac_clean_files
1739 ac_clean_files="$ac_clean_files a.out a.exe"
1740 # Try to create an executable without -o first, disregard a.out.
1741 # It will help us diagnose broken compilers, and finding out an intuition
1742 # of exeext.
1743 echo "$as_me:1743: checking for C compiler default output" >&5
1744 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1745 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1746 if { (eval echo "$as_me:1746: \"$ac_link_default\"") >&5
1747   (eval $ac_link_default) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; then
1751   # Find the output, starting from the most likely.  This scheme is
1752 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1753 # resort.
1754 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1755                 ls a.out conftest 2>/dev/null;
1756                 ls a.* conftest.* 2>/dev/null`; do
1757   case $ac_file in
1758     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1759     a.out ) # We found the default executable, but exeext='' is most
1760             # certainly right.
1761             break;;
1762     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1763           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1764           export ac_cv_exeext
1765           break;;
1766     * ) break;;
1767   esac
1768 done
1769 else
1770   echo "$as_me: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1772 { { echo "$as_me:1772: error: C compiler cannot create executables" >&5
1773 echo "$as_me: error: C compiler cannot create executables" >&2;}
1774    { (exit 77); exit 77; }; }
1775 fi
1776
1777 ac_exeext=$ac_cv_exeext
1778 echo "$as_me:1778: result: $ac_file" >&5
1779 echo "${ECHO_T}$ac_file" >&6
1780
1781 # Check the compiler produces executables we can run.  If not, either
1782 # the compiler is broken, or we cross compile.
1783 echo "$as_me:1783: checking whether the C compiler works" >&5
1784 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1785 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1786 # If not cross compiling, check that we can run a simple program.
1787 if test "$cross_compiling" != yes; then
1788   if { ac_try='./$ac_file'
1789   { (eval echo "$as_me:1789: \"$ac_try\"") >&5
1790   (eval $ac_try) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; }; then
1794     cross_compiling=no
1795   else
1796     if test "$cross_compiling" = maybe; then
1797         cross_compiling=yes
1798     else
1799         { { echo "$as_me:1799: error: cannot run C compiled programs.
1800 If you meant to cross compile, use \`--host'." >&5
1801 echo "$as_me: error: cannot run C compiled programs.
1802 If you meant to cross compile, use \`--host'." >&2;}
1803    { (exit 1); exit 1; }; }
1804     fi
1805   fi
1806 fi
1807 echo "$as_me:1807: result: yes" >&5
1808 echo "${ECHO_T}yes" >&6
1809
1810 rm -f a.out a.exe conftest$ac_cv_exeext
1811 ac_clean_files=$ac_clean_files_save
1812 # Check the compiler produces executables we can run.  If not, either
1813 # the compiler is broken, or we cross compile.
1814 echo "$as_me:1814: checking whether we are cross compiling" >&5
1815 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1816 echo "$as_me:1816: result: $cross_compiling" >&5
1817 echo "${ECHO_T}$cross_compiling" >&6
1818
1819 echo "$as_me:1819: checking for executable suffix" >&5
1820 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1821 if { (eval echo "$as_me:1821: \"$ac_link\"") >&5
1822   (eval $ac_link) 2>&5
1823   ac_status=$?
1824   echo "$as_me:1824: \$? = $ac_status" >&5
1825   (exit $ac_status); }; then
1826   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1827 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1828 # work properly (i.e., refer to `conftest.exe'), while it won't with
1829 # `rm'.
1830 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1831   case $ac_file in
1832     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1833     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1834           export ac_cv_exeext
1835           break;;
1836     * ) break;;
1837   esac
1838 done
1839 else
1840   { { echo "$as_me:1840: error: cannot compute EXEEXT: cannot compile and link" >&5
1841 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1842    { (exit 1); exit 1; }; }
1843 fi
1844
1845 rm -f conftest$ac_cv_exeext
1846 echo "$as_me:1846: result: $ac_cv_exeext" >&5
1847 echo "${ECHO_T}$ac_cv_exeext" >&6
1848
1849 rm -f conftest.$ac_ext
1850 EXEEXT=$ac_cv_exeext
1851 ac_exeext=$EXEEXT
1852 echo "$as_me:1852: checking for object suffix" >&5
1853 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1854 if test "${ac_cv_objext+set}" = set; then
1855   echo $ECHO_N "(cached) $ECHO_C" >&6
1856 else
1857   cat >conftest.$ac_ext <<_ACEOF
1858 #line 1858 "configure"
1859 #include "confdefs.h"
1860
1861 int
1862 main (void)
1863 {
1864
1865   ;
1866   return 0;
1867 }
1868 _ACEOF
1869 rm -f conftest.o conftest.obj
1870 if { (eval echo "$as_me:1870: \"$ac_compile\"") >&5
1871   (eval $ac_compile) 2>&5
1872   ac_status=$?
1873   echo "$as_me:1873: \$? = $ac_status" >&5
1874   (exit $ac_status); }; then
1875   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1876   case $ac_file in
1877     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1878     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1879        break;;
1880   esac
1881 done
1882 else
1883   echo "$as_me: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 { { echo "$as_me:1885: error: cannot compute OBJEXT: cannot compile" >&5
1886 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1887    { (exit 1); exit 1; }; }
1888 fi
1889
1890 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1891 fi
1892 echo "$as_me:1892: result: $ac_cv_objext" >&5
1893 echo "${ECHO_T}$ac_cv_objext" >&6
1894 OBJEXT=$ac_cv_objext
1895 ac_objext=$OBJEXT
1896 echo "$as_me:1896: checking whether we are using the GNU C compiler" >&5
1897 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1898 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   cat >conftest.$ac_ext <<_ACEOF
1902 #line 1902 "configure"
1903 #include "confdefs.h"
1904
1905 int
1906 main (void)
1907 {
1908 #ifndef __GNUC__
1909        choke me
1910 #endif
1911
1912   ;
1913   return 0;
1914 }
1915 _ACEOF
1916 rm -f conftest.$ac_objext
1917 if { (eval echo "$as_me:1917: \"$ac_compile\"") >&5
1918   (eval $ac_compile) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); } &&
1922          { ac_try='test -s conftest.$ac_objext'
1923   { (eval echo "$as_me:1923: \"$ac_try\"") >&5
1924   (eval $ac_try) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); }; }; then
1928   ac_compiler_gnu=yes
1929 else
1930   echo "$as_me: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1932 ac_compiler_gnu=no
1933 fi
1934 rm -f conftest.$ac_objext conftest.$ac_ext
1935 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1936
1937 fi
1938 echo "$as_me:1938: result: $ac_cv_c_compiler_gnu" >&5
1939 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1940 GCC=`test $ac_compiler_gnu = yes && echo yes`
1941 ac_test_CFLAGS=${CFLAGS+set}
1942 ac_save_CFLAGS=$CFLAGS
1943 CFLAGS="-g"
1944 echo "$as_me:1944: checking whether $CC accepts -g" >&5
1945 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1946 if test "${ac_cv_prog_cc_g+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   cat >conftest.$ac_ext <<_ACEOF
1950 #line 1950 "configure"
1951 #include "confdefs.h"
1952
1953 int
1954 main (void)
1955 {
1956
1957   ;
1958   return 0;
1959 }
1960 _ACEOF
1961 rm -f conftest.$ac_objext
1962 if { (eval echo "$as_me:1962: \"$ac_compile\"") >&5
1963   (eval $ac_compile) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); } &&
1967          { ac_try='test -s conftest.$ac_objext'
1968   { (eval echo "$as_me:1968: \"$ac_try\"") >&5
1969   (eval $ac_try) 2>&5
1970   ac_status=$?
1971   echo "$as_me:1971: \$? = $ac_status" >&5
1972   (exit $ac_status); }; }; then
1973   ac_cv_prog_cc_g=yes
1974 else
1975   echo "$as_me: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 ac_cv_prog_cc_g=no
1978 fi
1979 rm -f conftest.$ac_objext conftest.$ac_ext
1980 fi
1981 echo "$as_me:1981: result: $ac_cv_prog_cc_g" >&5
1982 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1983 if test "$ac_test_CFLAGS" = set; then
1984   CFLAGS=$ac_save_CFLAGS
1985 elif test $ac_cv_prog_cc_g = yes; then
1986   if test "$GCC" = yes; then
1987     CFLAGS="-g -O2"
1988   else
1989     CFLAGS="-g"
1990   fi
1991 else
1992   if test "$GCC" = yes; then
1993     CFLAGS="-O2"
1994   else
1995     CFLAGS=
1996   fi
1997 fi
1998 # Some people use a C++ compiler to compile C.  Since we use `exit',
1999 # in C++ we need to declare it.  In case someone uses the same compiler
2000 # for both compiling C and C++ we need to have the C++ compiler decide
2001 # the declaration of exit, since it's the most demanding environment.
2002 cat >conftest.$ac_ext <<_ACEOF
2003 #ifndef __cplusplus
2004   choke me
2005 #endif
2006 _ACEOF
2007 rm -f conftest.$ac_objext
2008 if { (eval echo "$as_me:2008: \"$ac_compile\"") >&5
2009   (eval $ac_compile) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); } &&
2013          { ac_try='test -s conftest.$ac_objext'
2014   { (eval echo "$as_me:2014: \"$ac_try\"") >&5
2015   (eval $ac_try) 2>&5
2016   ac_status=$?
2017   echo "$as_me:2017: \$? = $ac_status" >&5
2018   (exit $ac_status); }; }; then
2019   for ac_declaration in \
2020    ''\
2021    '#include <stdlib.h>' \
2022    'extern "C" void std::exit (int) throw (); using std::exit;' \
2023    'extern "C" void std::exit (int); using std::exit;' \
2024    'extern "C" void exit (int) throw ();' \
2025    'extern "C" void exit (int);' \
2026    'void exit (int);'
2027 do
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 #include <stdlib.h>
2032 $ac_declaration
2033 int
2034 main (void)
2035 {
2036 exit (42);
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.$ac_objext
2042 if { (eval echo "$as_me:2042: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); } &&
2047          { ac_try='test -s conftest.$ac_objext'
2048   { (eval echo "$as_me:2048: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053   :
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 continue
2058 fi
2059 rm -f conftest.$ac_objext conftest.$ac_ext
2060   cat >conftest.$ac_ext <<_ACEOF
2061 #line 2061 "configure"
2062 #include "confdefs.h"
2063 $ac_declaration
2064 int
2065 main (void)
2066 {
2067 exit (42);
2068   ;
2069   return 0;
2070 }
2071 _ACEOF
2072 rm -f conftest.$ac_objext
2073 if { (eval echo "$as_me:2073: \"$ac_compile\"") >&5
2074   (eval $ac_compile) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); } &&
2078          { ac_try='test -s conftest.$ac_objext'
2079   { (eval echo "$as_me:2079: \"$ac_try\"") >&5
2080   (eval $ac_try) 2>&5
2081   ac_status=$?
2082   echo "$as_me:2082: \$? = $ac_status" >&5
2083   (exit $ac_status); }; }; then
2084   break
2085 else
2086   echo "$as_me: failed program was:" >&5
2087 cat conftest.$ac_ext >&5
2088 fi
2089 rm -f conftest.$ac_objext conftest.$ac_ext
2090 done
2091 rm -rf conftest*
2092 if test -n "$ac_declaration"; then
2093   echo '#ifdef __cplusplus' >>confdefs.h
2094   echo $ac_declaration      >>confdefs.h
2095   echo '#endif'             >>confdefs.h
2096 fi
2097
2098 else
2099   echo "$as_me: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 fi
2102 rm -f conftest.$ac_objext conftest.$ac_ext
2103 ac_ext=c
2104 ac_cpp='$CPP $CPPFLAGS'
2105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2108 ac_main_return=return
2109
2110 GCC_VERSION=none
2111 if test "$GCC" = yes ; then
2112         echo "$as_me:2112: checking version of $CC" >&5
2113 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2114         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2115         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2116         echo "$as_me:2116: result: $GCC_VERSION" >&5
2117 echo "${ECHO_T}$GCC_VERSION" >&6
2118 fi
2119
2120 INTEL_COMPILER=no
2121
2122 if test "$GCC" = yes ; then
2123         case $host_os in
2124         (linux*|gnu*)
2125                 echo "$as_me:2125: checking if this is really Intel C compiler" >&5
2126 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2127                 cf_save_CFLAGS="$CFLAGS"
2128                 CFLAGS="$CFLAGS -no-gcc"
2129                 cat >conftest.$ac_ext <<_ACEOF
2130 #line 2130 "configure"
2131 #include "confdefs.h"
2132
2133 int
2134 main (void)
2135 {
2136
2137 #ifdef __INTEL_COMPILER
2138 #else
2139 make an error
2140 #endif
2141
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 rm -f conftest.$ac_objext
2147 if { (eval echo "$as_me:2147: \"$ac_compile\"") >&5
2148   (eval $ac_compile) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } &&
2152          { ac_try='test -s conftest.$ac_objext'
2153   { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154   (eval $ac_try) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); }; }; then
2158   INTEL_COMPILER=yes
2159 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2160
2161 else
2162   echo "$as_me: failed program was:" >&5
2163 cat conftest.$ac_ext >&5
2164 fi
2165 rm -f conftest.$ac_objext conftest.$ac_ext
2166                 CFLAGS="$cf_save_CFLAGS"
2167                 echo "$as_me:2167: result: $INTEL_COMPILER" >&5
2168 echo "${ECHO_T}$INTEL_COMPILER" >&6
2169                 ;;
2170         esac
2171 fi
2172
2173 CLANG_COMPILER=no
2174
2175 if test "$GCC" = yes ; then
2176         echo "$as_me:2176: checking if this is really Clang C compiler" >&5
2177 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2178         cf_save_CFLAGS="$CFLAGS"
2179         CFLAGS="$CFLAGS -Qunused-arguments"
2180         cat >conftest.$ac_ext <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183
2184 int
2185 main (void)
2186 {
2187
2188 #ifdef __clang__
2189 #else
2190 make an error
2191 #endif
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 rm -f conftest.$ac_objext
2198 if { (eval echo "$as_me:2198: \"$ac_compile\"") >&5
2199   (eval $ac_compile) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); } &&
2203          { ac_try='test -s conftest.$ac_objext'
2204   { (eval echo "$as_me:2204: \"$ac_try\"") >&5
2205   (eval $ac_try) 2>&5
2206   ac_status=$?
2207   echo "$as_me:2207: \$? = $ac_status" >&5
2208   (exit $ac_status); }; }; then
2209   CLANG_COMPILER=yes
2210 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2211
2212 else
2213   echo "$as_me: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2215 fi
2216 rm -f conftest.$ac_objext conftest.$ac_ext
2217         CFLAGS="$cf_save_CFLAGS"
2218         echo "$as_me:2218: result: $CLANG_COMPILER" >&5
2219 echo "${ECHO_T}$CLANG_COMPILER" >&6
2220 fi
2221
2222 echo "$as_me:2222: checking for $CC option to accept ANSI C" >&5
2223 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2224 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2225   echo $ECHO_N "(cached) $ECHO_C" >&6
2226 else
2227   ac_cv_prog_cc_stdc=no
2228 ac_save_CC=$CC
2229 cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <stdarg.h>
2233 #include <stdio.h>
2234 #include <sys/types.h>
2235 #include <sys/stat.h>
2236 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2237 struct buf { int x; };
2238 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2239 static char *e (p, i)
2240      char **p;
2241      int i;
2242 {
2243   return p[i];
2244 }
2245 static char *f (char * (*g) (char **, int), char **p, ...)
2246 {
2247   char *s;
2248   va_list v;
2249   va_start (v,p);
2250   s = g (p, va_arg (v,int));
2251   va_end (v);
2252   return s;
2253 }
2254 int test (int i, double x);
2255 struct s1 {int (*f) (int a);};
2256 struct s2 {int (*f) (double a);};
2257 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2258 int argc;
2259 char **argv;
2260 int
2261 main (void)
2262 {
2263 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2264   ;
2265   return 0;
2266 }
2267 _ACEOF
2268 # Don't try gcc -ansi; that turns off useful extensions and
2269 # breaks some systems' header files.
2270 # AIX                   -qlanglvl=ansi
2271 # Ultrix and OSF/1      -std1
2272 # HP-UX 10.20 and later -Ae
2273 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2274 # SVR4                  -Xc -D__EXTENSIONS__
2275 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2276 do
2277   CC="$ac_save_CC $ac_arg"
2278   rm -f conftest.$ac_objext
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); } &&
2284          { ac_try='test -s conftest.$ac_objext'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit $ac_status); }; }; then
2290   ac_cv_prog_cc_stdc=$ac_arg
2291 break
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest.$ac_objext
2297 done
2298 rm -f conftest.$ac_ext conftest.$ac_objext
2299 CC=$ac_save_CC
2300
2301 fi
2302
2303 case "x$ac_cv_prog_cc_stdc" in
2304   x|xno)
2305     echo "$as_me:2305: result: none needed" >&5
2306 echo "${ECHO_T}none needed" >&6 ;;
2307   *)
2308     echo "$as_me:2308: result: $ac_cv_prog_cc_stdc" >&5
2309 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2310     CC="$CC $ac_cv_prog_cc_stdc" ;;
2311 esac
2312
2313 # This should have been defined by AC_PROG_CC
2314 : ${CC:=cc}
2315
2316 echo "$as_me:2316: checking \$CFLAGS variable" >&5
2317 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2318 case "x$CFLAGS" in
2319 (*-[IUD]*)
2320         echo "$as_me:2320: result: broken" >&5
2321 echo "${ECHO_T}broken" >&6
2322         { echo "$as_me:2322: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2323 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2324         cf_flags="$CFLAGS"
2325         CFLAGS=
2326         for cf_arg in $cf_flags
2327         do
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 (no)
2338         case $cf_add_cflags in
2339         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2340                 case $cf_add_cflags in
2341                 (-D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         elif test "${cf_tst_cflags}" = "\"'" ; then
2355
2356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2358
2359                                 continue
2360                         fi
2361                         ;;
2362                 esac
2363                 case "$CPPFLAGS" in
2364                 (*$cf_add_cflags)
2365                         ;;
2366                 (*)
2367                         case $cf_add_cflags in
2368                         (-D*)
2369                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2370
2371 CPPFLAGS=`echo "$CPPFLAGS" | \
2372         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2373                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2374
2375                                 ;;
2376                         esac
2377
2378         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2379         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2380
2381                         ;;
2382                 esac
2383                 ;;
2384         (*)
2385
2386         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2387         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2388
2389                 ;;
2390         esac
2391         ;;
2392 (yes)
2393
2394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2396
2397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2398
2399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2400                 && test -z "${cf_tst_cflags}" \
2401                 && cf_fix_cppflags=no
2402         ;;
2403 esac
2404 done
2405
2406 if test -n "$cf_new_cflags" ; then
2407
2408         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2409         CFLAGS="${CFLAGS}$cf_new_cflags"
2410
2411 fi
2412
2413 if test -n "$cf_new_cppflags" ; then
2414
2415         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2416         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2417
2418 fi
2419
2420 if test -n "$cf_new_extra_cppflags" ; then
2421
2422         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2423         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2424
2425 fi
2426
2427         done
2428         ;;
2429 (*)
2430         echo "$as_me:2430: result: ok" >&5
2431 echo "${ECHO_T}ok" >&6
2432         ;;
2433 esac
2434
2435 echo "$as_me:2435: checking \$CC variable" >&5
2436 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2437 case "$CC" in
2438 (*[\ \  ]-*)
2439         echo "$as_me:2439: result: broken" >&5
2440 echo "${ECHO_T}broken" >&6
2441         { echo "$as_me:2441: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2442 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2443         # humor him...
2444         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2445         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2446         CC="$cf_prog"
2447         for cf_arg in $cf_flags
2448         do
2449                 case "x$cf_arg" in
2450                 (x-[IUDfgOW]*)
2451
2452 cf_fix_cppflags=no
2453 cf_new_cflags=
2454 cf_new_cppflags=
2455 cf_new_extra_cppflags=
2456
2457 for cf_add_cflags in $cf_arg
2458 do
2459 case $cf_fix_cppflags in
2460 (no)
2461         case $cf_add_cflags in
2462         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2463                 case $cf_add_cflags in
2464                 (-D*)
2465                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2466
2467                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2468                                 && test -z "${cf_tst_cflags}" \
2469                                 && cf_fix_cppflags=yes
2470
2471                         if test $cf_fix_cppflags = yes ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         elif test "${cf_tst_cflags}" = "\"'" ; then
2478
2479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2481
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 (*$cf_add_cflags)
2488                         ;;
2489                 (*)
2490                         case $cf_add_cflags in
2491                         (-D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500
2501         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2502         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2503
2504                         ;;
2505                 esac
2506                 ;;
2507         (*)
2508
2509         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2510         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2511
2512                 ;;
2513         esac
2514         ;;
2515 (yes)
2516
2517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2519
2520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2521
2522         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2523                 && test -z "${cf_tst_cflags}" \
2524                 && cf_fix_cppflags=no
2525         ;;
2526 esac
2527 done
2528
2529 if test -n "$cf_new_cflags" ; then
2530
2531         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2532         CFLAGS="${CFLAGS}$cf_new_cflags"
2533
2534 fi
2535
2536 if test -n "$cf_new_cppflags" ; then
2537
2538         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2539         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2540
2541 fi
2542
2543 if test -n "$cf_new_extra_cppflags" ; then
2544
2545         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2546         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2547
2548 fi
2549
2550                         ;;
2551                 (*)
2552                         CC="$CC $cf_arg"
2553                         ;;
2554                 esac
2555         done
2556         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2557
2558 echo "${as_me:-configure}:2558: testing resulting CC: '$CC' ..." 1>&5
2559
2560         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2561
2562 echo "${as_me:-configure}:2562: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2563
2564         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2565
2566 echo "${as_me:-configure}:2566: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2567
2568         ;;
2569 (*)
2570         echo "$as_me:2570: result: ok" >&5
2571 echo "${ECHO_T}ok" >&6
2572         ;;
2573 esac
2574
2575 ac_ext=c
2576 ac_cpp='$CPP $CPPFLAGS'
2577 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580 ac_main_return=return
2581 echo "$as_me:2581: checking how to run the C preprocessor" >&5
2582 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2583 # On Suns, sometimes $CPP names a directory.
2584 if test -n "$CPP" && test -d "$CPP"; then
2585   CPP=
2586 fi
2587 if test -z "$CPP"; then
2588   if test "${ac_cv_prog_CPP+set}" = set; then
2589   echo $ECHO_N "(cached) $ECHO_C" >&6
2590 else
2591       # Double quotes because CPP needs to be expanded
2592     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2593     do
2594       ac_preproc_ok=false
2595 for ac_c_preproc_warn_flag in '' yes
2596 do
2597   # Use a header file that comes with gcc, so configuring glibc
2598   # with a fresh cross-compiler works.
2599   # On the NeXT, cc -E runs the code through the compiler's parser,
2600   # not just through cpp. "Syntax error" is here to catch this case.
2601   cat >conftest.$ac_ext <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <assert.h>
2605                      Syntax error
2606 _ACEOF
2607 if { (eval echo "$as_me:2607: \"$ac_cpp conftest.$ac_ext\"") >&5
2608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2609   ac_status=$?
2610   egrep -v '^ *\+' conftest.er1 >conftest.err
2611   rm -f conftest.er1
2612   cat conftest.err >&5
2613   echo "$as_me:2613: \$? = $ac_status" >&5
2614   (exit $ac_status); } >/dev/null; then
2615   if test -s conftest.err; then
2616     ac_cpp_err=$ac_c_preproc_warn_flag
2617   else
2618     ac_cpp_err=
2619   fi
2620 else
2621   ac_cpp_err=yes
2622 fi
2623 if test -z "$ac_cpp_err"; then
2624   :
2625 else
2626   echo "$as_me: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   # Broken: fails on valid input.
2629 continue
2630 fi
2631 rm -f conftest.err conftest.$ac_ext
2632
2633   # OK, works on sane cases.  Now check whether non-existent headers
2634   # can be detected and how.
2635   cat >conftest.$ac_ext <<_ACEOF
2636 #line 2636 "configure"
2637 #include "confdefs.h"
2638 #include <ac_nonexistent.h>
2639 _ACEOF
2640 if { (eval echo "$as_me:2640: \"$ac_cpp conftest.$ac_ext\"") >&5
2641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2642   ac_status=$?
2643   egrep -v '^ *\+' conftest.er1 >conftest.err
2644   rm -f conftest.er1
2645   cat conftest.err >&5
2646   echo "$as_me:2646: \$? = $ac_status" >&5
2647   (exit $ac_status); } >/dev/null; then
2648   if test -s conftest.err; then
2649     ac_cpp_err=$ac_c_preproc_warn_flag
2650   else
2651     ac_cpp_err=
2652   fi
2653 else
2654   ac_cpp_err=yes
2655 fi
2656 if test -z "$ac_cpp_err"; then
2657   # Broken: success on invalid input.
2658 continue
2659 else
2660   echo "$as_me: failed program was:" >&5
2661   cat conftest.$ac_ext >&5
2662   # Passes both tests.
2663 ac_preproc_ok=:
2664 break
2665 fi
2666 rm -f conftest.err conftest.$ac_ext
2667
2668 done
2669 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2670 rm -f conftest.err conftest.$ac_ext
2671 if $ac_preproc_ok; then
2672   break
2673 fi
2674
2675     done
2676     ac_cv_prog_CPP=$CPP
2677
2678 fi
2679   CPP=$ac_cv_prog_CPP
2680 else
2681   ac_cv_prog_CPP=$CPP
2682 fi
2683 echo "$as_me:2683: result: $CPP" >&5
2684 echo "${ECHO_T}$CPP" >&6
2685 ac_preproc_ok=false
2686 for ac_c_preproc_warn_flag in '' yes
2687 do
2688   # Use a header file that comes with gcc, so configuring glibc
2689   # with a fresh cross-compiler works.
2690   # On the NeXT, cc -E runs the code through the compiler's parser,
2691   # not just through cpp. "Syntax error" is here to catch this case.
2692   cat >conftest.$ac_ext <<_ACEOF
2693 #line 2693 "configure"
2694 #include "confdefs.h"
2695 #include <assert.h>
2696                      Syntax error
2697 _ACEOF
2698 if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5
2699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2700   ac_status=$?
2701   egrep -v '^ *\+' conftest.er1 >conftest.err
2702   rm -f conftest.er1
2703   cat conftest.err >&5
2704   echo "$as_me:2704: \$? = $ac_status" >&5
2705   (exit $ac_status); } >/dev/null; then
2706   if test -s conftest.err; then
2707     ac_cpp_err=$ac_c_preproc_warn_flag
2708   else
2709     ac_cpp_err=
2710   fi
2711 else
2712   ac_cpp_err=yes
2713 fi
2714 if test -z "$ac_cpp_err"; then
2715   :
2716 else
2717   echo "$as_me: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   # Broken: fails on valid input.
2720 continue
2721 fi
2722 rm -f conftest.err conftest.$ac_ext
2723
2724   # OK, works on sane cases.  Now check whether non-existent headers
2725   # can be detected and how.
2726   cat >conftest.$ac_ext <<_ACEOF
2727 #line 2727 "configure"
2728 #include "confdefs.h"
2729 #include <ac_nonexistent.h>
2730 _ACEOF
2731 if { (eval echo "$as_me:2731: \"$ac_cpp conftest.$ac_ext\"") >&5
2732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2733   ac_status=$?
2734   egrep -v '^ *\+' conftest.er1 >conftest.err
2735   rm -f conftest.er1
2736   cat conftest.err >&5
2737   echo "$as_me:2737: \$? = $ac_status" >&5
2738   (exit $ac_status); } >/dev/null; then
2739   if test -s conftest.err; then
2740     ac_cpp_err=$ac_c_preproc_warn_flag
2741   else
2742     ac_cpp_err=
2743   fi
2744 else
2745   ac_cpp_err=yes
2746 fi
2747 if test -z "$ac_cpp_err"; then
2748   # Broken: success on invalid input.
2749 continue
2750 else
2751   echo "$as_me: failed program was:" >&5
2752   cat conftest.$ac_ext >&5
2753   # Passes both tests.
2754 ac_preproc_ok=:
2755 break
2756 fi
2757 rm -f conftest.err conftest.$ac_ext
2758
2759 done
2760 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2761 rm -f conftest.err conftest.$ac_ext
2762 if $ac_preproc_ok; then
2763   :
2764 else
2765   { { echo "$as_me:2765: error: C preprocessor \"$CPP\" fails sanity check" >&5
2766 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2767    { (exit 1); exit 1; }; }
2768 fi
2769
2770 ac_ext=c
2771 ac_cpp='$CPP $CPPFLAGS'
2772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2775 ac_main_return=return
2776
2777 if test $ac_cv_c_compiler_gnu = yes; then
2778     echo "$as_me:2778: checking whether $CC needs -traditional" >&5
2779 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2780 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2781   echo $ECHO_N "(cached) $ECHO_C" >&6
2782 else
2783     ac_pattern="Autoconf.*'x'"
2784   cat >conftest.$ac_ext <<_ACEOF
2785 #line 2785 "configure"
2786 #include "confdefs.h"
2787 #include <sgtty.h>
2788 int Autoconf = TIOCGETP;
2789 _ACEOF
2790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2791   egrep "$ac_pattern" >/dev/null 2>&1; then
2792   ac_cv_prog_gcc_traditional=yes
2793 else
2794   ac_cv_prog_gcc_traditional=no
2795 fi
2796 rm -rf conftest*
2797
2798   if test $ac_cv_prog_gcc_traditional = no; then
2799     cat >conftest.$ac_ext <<_ACEOF
2800 #line 2800 "configure"
2801 #include "confdefs.h"
2802 #include <termio.h>
2803 int Autoconf = TCGETA;
2804 _ACEOF
2805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2806   egrep "$ac_pattern" >/dev/null 2>&1; then
2807   ac_cv_prog_gcc_traditional=yes
2808 fi
2809 rm -rf conftest*
2810
2811   fi
2812 fi
2813 echo "$as_me:2813: result: $ac_cv_prog_gcc_traditional" >&5
2814 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2815   if test $ac_cv_prog_gcc_traditional = yes; then
2816     CC="$CC -traditional"
2817   fi
2818 fi
2819
2820 echo "$as_me:2820: checking whether $CC understands -c and -o together" >&5
2821 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2822 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2823   echo $ECHO_N "(cached) $ECHO_C" >&6
2824 else
2825
2826 cat > conftest.$ac_ext <<CF_EOF
2827 int main(void)
2828 {
2829         ${cf_cv_main_return:-return}(0);
2830 }
2831 CF_EOF
2832 # We do the test twice because some compilers refuse to overwrite an
2833 # existing .o file with -o, though they will create one.
2834 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2835 if { (eval echo "$as_me:2835: \"$ac_try\"") >&5
2836   (eval $ac_try) 2>&5
2837   ac_status=$?
2838   echo "$as_me:2838: \$? = $ac_status" >&5
2839   (exit $ac_status); } &&
2840   test -f conftest2.$ac_objext && { (eval echo "$as_me:2840: \"$ac_try\"") >&5
2841   (eval $ac_try) 2>&5
2842   ac_status=$?
2843   echo "$as_me:2843: \$? = $ac_status" >&5
2844   (exit $ac_status); };
2845 then
2846   eval cf_cv_prog_CC_c_o=yes
2847 else
2848   eval cf_cv_prog_CC_c_o=no
2849 fi
2850 rm -rf conftest*
2851
2852 fi
2853 if test $cf_cv_prog_CC_c_o = yes; then
2854   echo "$as_me:2854: result: yes" >&5
2855 echo "${ECHO_T}yes" >&6
2856 else
2857   echo "$as_me:2857: result: no" >&5
2858 echo "${ECHO_T}no" >&6
2859 fi
2860
2861 if test "$cross_compiling" = yes ; then
2862         LDCONFIG=:
2863 else
2864         case "$cf_cv_system_name" in
2865         (dragonfly*|mirbsd*|freebsd*)
2866                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2867                 ;;
2868         (*) LDPATH=$PATH:/sbin:/usr/sbin
2869                 # Extract the first word of "ldconfig", so it can be a program name with args.
2870 set dummy ldconfig; ac_word=$2
2871 echo "$as_me:2871: checking for $ac_word" >&5
2872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2873 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876   case $LDCONFIG in
2877   [\\/]* | ?:[\\/]*)
2878   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2879   ;;
2880   *)
2881   ac_save_IFS=$IFS; IFS=$ac_path_separator
2882 ac_dummy="$LDPATH"
2883 for ac_dir in $ac_dummy; do
2884   IFS=$ac_save_IFS
2885   test -z "$ac_dir" && ac_dir=.
2886   if $as_executable_p "$ac_dir/$ac_word"; then
2887    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2888    echo "$as_me:2888: found $ac_dir/$ac_word" >&5
2889    break
2890 fi
2891 done
2892
2893   ;;
2894 esac
2895 fi
2896 LDCONFIG=$ac_cv_path_LDCONFIG
2897
2898 if test -n "$LDCONFIG"; then
2899   echo "$as_me:2899: result: $LDCONFIG" >&5
2900 echo "${ECHO_T}$LDCONFIG" >&6
2901 else
2902   echo "$as_me:2902: result: no" >&5
2903 echo "${ECHO_T}no" >&6
2904 fi
2905
2906                 ;;
2907         esac
2908 fi
2909
2910 echo "$as_me:2910: checking if you want to ensure bool is consistent with C++" >&5
2911 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2912
2913 # Check whether --with-cxx or --without-cxx was given.
2914 if test "${with_cxx+set}" = set; then
2915   withval="$with_cxx"
2916   cf_with_cxx=$withval
2917 else
2918   cf_with_cxx=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_cxx" >&5
2921 echo "${ECHO_T}$cf_with_cxx" >&6
2922 if test "X$cf_with_cxx" = Xno ; then
2923         CXX=""
2924         GXX=""
2925 else
2926         # with autoconf 2.13, we can change the error to a warning:
2927                 ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933 if test -n "$ac_tool_prefix"; then
2934   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2935   do
2936     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2937 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2938 echo "$as_me:2938: checking for $ac_word" >&5
2939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2940 if test "${ac_cv_prog_CXX+set}" = set; then
2941   echo $ECHO_N "(cached) $ECHO_C" >&6
2942 else
2943   if test -n "$CXX"; then
2944   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2945 else
2946   ac_save_IFS=$IFS; IFS=$ac_path_separator
2947 ac_dummy="$PATH"
2948 for ac_dir in $ac_dummy; do
2949   IFS=$ac_save_IFS
2950   test -z "$ac_dir" && ac_dir=.
2951   $as_executable_p "$ac_dir/$ac_word" || continue
2952 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2953 echo "$as_me:2953: found $ac_dir/$ac_word" >&5
2954 break
2955 done
2956
2957 fi
2958 fi
2959 CXX=$ac_cv_prog_CXX
2960 if test -n "$CXX"; then
2961   echo "$as_me:2961: result: $CXX" >&5
2962 echo "${ECHO_T}$CXX" >&6
2963 else
2964   echo "$as_me:2964: result: no" >&5
2965 echo "${ECHO_T}no" >&6
2966 fi
2967
2968     test -n "$CXX" && break
2969   done
2970 fi
2971 if test -z "$CXX"; then
2972   ac_ct_CXX=$CXX
2973   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2974 do
2975   # Extract the first word of "$ac_prog", so it can be a program name with args.
2976 set dummy $ac_prog; ac_word=$2
2977 echo "$as_me:2977: checking for $ac_word" >&5
2978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2979 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if test -n "$ac_ct_CXX"; then
2983   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2984 else
2985   ac_save_IFS=$IFS; IFS=$ac_path_separator
2986 ac_dummy="$PATH"
2987 for ac_dir in $ac_dummy; do
2988   IFS=$ac_save_IFS
2989   test -z "$ac_dir" && ac_dir=.
2990   $as_executable_p "$ac_dir/$ac_word" || continue
2991 ac_cv_prog_ac_ct_CXX="$ac_prog"
2992 echo "$as_me:2992: found $ac_dir/$ac_word" >&5
2993 break
2994 done
2995
2996 fi
2997 fi
2998 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2999 if test -n "$ac_ct_CXX"; then
3000   echo "$as_me:3000: result: $ac_ct_CXX" >&5
3001 echo "${ECHO_T}$ac_ct_CXX" >&6
3002 else
3003   echo "$as_me:3003: result: no" >&5
3004 echo "${ECHO_T}no" >&6
3005 fi
3006
3007   test -n "$ac_ct_CXX" && break
3008 done
3009 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3010
3011   CXX=$ac_ct_CXX
3012 fi
3013
3014 # Provide some information about the compiler.
3015 echo "$as_me:3015:" \
3016      "checking for C++ compiler version" >&5
3017 ac_compiler=`set X $ac_compile; echo $2`
3018 { (eval echo "$as_me:3018: \"$ac_compiler --version </dev/null >&5\"") >&5
3019   (eval $ac_compiler --version </dev/null >&5) 2>&5
3020   ac_status=$?
3021   echo "$as_me:3021: \$? = $ac_status" >&5
3022   (exit $ac_status); }
3023 { (eval echo "$as_me:3023: \"$ac_compiler -v </dev/null >&5\"") >&5
3024   (eval $ac_compiler -v </dev/null >&5) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); }
3028 { (eval echo "$as_me:3028: \"$ac_compiler -V </dev/null >&5\"") >&5
3029   (eval $ac_compiler -V </dev/null >&5) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }
3033
3034 echo "$as_me:3034: checking whether we are using the GNU C++ compiler" >&5
3035 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3036 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   cat >conftest.$ac_ext <<_ACEOF
3040 #line 3040 "configure"
3041 #include "confdefs.h"
3042
3043 int
3044 main (void)
3045 {
3046 #ifndef __GNUC__
3047        choke me
3048 #endif
3049
3050   ;
3051   return 0;
3052 }
3053 _ACEOF
3054 rm -f conftest.$ac_objext
3055 if { (eval echo "$as_me:3055: \"$ac_compile\"") >&5
3056   (eval $ac_compile) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); } &&
3060          { ac_try='test -s conftest.$ac_objext'
3061   { (eval echo "$as_me:3061: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:3064: \$? = $ac_status" >&5
3065   (exit $ac_status); }; }; then
3066   ac_compiler_gnu=yes
3067 else
3068   echo "$as_me: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 ac_compiler_gnu=no
3071 fi
3072 rm -f conftest.$ac_objext conftest.$ac_ext
3073 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3074
3075 fi
3076 echo "$as_me:3076: result: $ac_cv_cxx_compiler_gnu" >&5
3077 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3078 GXX=`test $ac_compiler_gnu = yes && echo yes`
3079 ac_test_CXXFLAGS=${CXXFLAGS+set}
3080 ac_save_CXXFLAGS=$CXXFLAGS
3081 CXXFLAGS="-g"
3082 echo "$as_me:3082: checking whether $CXX accepts -g" >&5
3083 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3084 if test "${ac_cv_prog_cxx_g+set}" = set; then
3085   echo $ECHO_N "(cached) $ECHO_C" >&6
3086 else
3087   cat >conftest.$ac_ext <<_ACEOF
3088 #line 3088 "configure"
3089 #include "confdefs.h"
3090
3091 int
3092 main (void)
3093 {
3094
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:3100: \"$ac_compile\"") >&5
3101   (eval $ac_compile) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); } &&
3105          { ac_try='test -s conftest.$ac_objext'
3106   { (eval echo "$as_me:3106: \"$ac_try\"") >&5
3107   (eval $ac_try) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); }; }; then
3111   ac_cv_prog_cxx_g=yes
3112 else
3113   echo "$as_me: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 ac_cv_prog_cxx_g=no
3116 fi
3117 rm -f conftest.$ac_objext conftest.$ac_ext
3118 fi
3119 echo "$as_me:3119: result: $ac_cv_prog_cxx_g" >&5
3120 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3121 if test "$ac_test_CXXFLAGS" = set; then
3122   CXXFLAGS=$ac_save_CXXFLAGS
3123 elif test $ac_cv_prog_cxx_g = yes; then
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-g -O2"
3126   else
3127     CXXFLAGS="-g"
3128   fi
3129 else
3130   if test "$GXX" = yes; then
3131     CXXFLAGS="-O2"
3132   else
3133     CXXFLAGS=
3134   fi
3135 fi
3136 for ac_declaration in \
3137    ''\
3138    '#include <stdlib.h>' \
3139    'extern "C" void std::exit (int) throw (); using std::exit;' \
3140    'extern "C" void std::exit (int); using std::exit;' \
3141    'extern "C" void exit (int) throw ();' \
3142    'extern "C" void exit (int);' \
3143    'void exit (int);'
3144 do
3145   cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <stdlib.h>
3149 $ac_declaration
3150 int
3151 main (void)
3152 {
3153 exit (42);
3154   ;
3155   return 0;
3156 }
3157 _ACEOF
3158 rm -f conftest.$ac_objext
3159 if { (eval echo "$as_me:3159: \"$ac_compile\"") >&5
3160   (eval $ac_compile) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); } &&
3164          { ac_try='test -s conftest.$ac_objext'
3165   { (eval echo "$as_me:3165: \"$ac_try\"") >&5
3166   (eval $ac_try) 2>&5
3167   ac_status=$?
3168   echo "$as_me:3168: \$? = $ac_status" >&5
3169   (exit $ac_status); }; }; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 continue
3175 fi
3176 rm -f conftest.$ac_objext conftest.$ac_ext
3177   cat >conftest.$ac_ext <<_ACEOF
3178 #line 3178 "configure"
3179 #include "confdefs.h"
3180 $ac_declaration
3181 int
3182 main (void)
3183 {
3184 exit (42);
3185   ;
3186   return 0;
3187 }
3188 _ACEOF
3189 rm -f conftest.$ac_objext
3190 if { (eval echo "$as_me:3190: \"$ac_compile\"") >&5
3191   (eval $ac_compile) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); } &&
3195          { ac_try='test -s conftest.$ac_objext'
3196   { (eval echo "$as_me:3196: \"$ac_try\"") >&5
3197   (eval $ac_try) 2>&5
3198   ac_status=$?
3199   echo "$as_me:3199: \$? = $ac_status" >&5
3200   (exit $ac_status); }; }; then
3201   break
3202 else
3203   echo "$as_me: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
3205 fi
3206 rm -f conftest.$ac_objext conftest.$ac_ext
3207 done
3208 rm -rf conftest*
3209 if test -n "$ac_declaration"; then
3210   echo '#ifdef __cplusplus' >>confdefs.h
3211   echo $ac_declaration      >>confdefs.h
3212   echo '#endif'             >>confdefs.h
3213 fi
3214
3215 ac_ext=c
3216 ac_cpp='$CPP $CPPFLAGS'
3217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3220 ac_main_return=return
3221
3222         ac_ext=cc
3223 ac_cpp='$CXXCPP $CPPFLAGS'
3224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3227 ac_main_return=return
3228
3229         if test "x$cf_with_cxx" != xno
3230         then
3231                 # Several of the C++ configurations do not work, particularly when
3232                 # cross-compiling (20140913 -TD)
3233                 echo "$as_me:3233: checking if $CXX works" >&5
3234 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3235
3236                 save_CPPFLAGS="$CPPFLAGS"
3237                 eval cf_includedir=${includedir}
3238                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3239
3240 cat >conftest.$ac_ext <<_ACEOF
3241 #line 3241 "configure"
3242 #include "confdefs.h"
3243
3244 #include <stdlib.h>
3245 #include <stdio.h>
3246
3247 int
3248 main (void)
3249 {
3250
3251                 printf("Hello world!\n")
3252
3253   ;
3254   return 0;
3255 }
3256 _ACEOF
3257 rm -f conftest.$ac_objext
3258 if { (eval echo "$as_me:3258: \"$ac_compile\"") >&5
3259   (eval $ac_compile) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); } &&
3263          { ac_try='test -s conftest.$ac_objext'
3264   { (eval echo "$as_me:3264: \"$ac_try\"") >&5
3265   (eval $ac_try) 2>&5
3266   ac_status=$?
3267   echo "$as_me:3267: \$? = $ac_status" >&5
3268   (exit $ac_status); }; }; then
3269   cf_cxx_works=yes
3270 else
3271   echo "$as_me: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3273 cf_cxx_works=no
3274 fi
3275 rm -f conftest.$ac_objext conftest.$ac_ext
3276                 CPPFLAGS="$save_CPPFLAGS"
3277
3278                 echo "$as_me:3278: result: $cf_cxx_works" >&5
3279 echo "${ECHO_T}$cf_cxx_works" >&6
3280                 if test "x$cf_cxx_works" = xno
3281                 then
3282                         { echo "$as_me:3282: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3283 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3284                         cf_with_cxx=no; CXX=""; GXX="";
3285                 fi
3286         fi
3287         ac_ext=c
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292 ac_main_return=return
3293
3294         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3295         if test "$CXX" = "g++" ; then
3296                 # Extract the first word of "g++", so it can be a program name with args.
3297 set dummy g++; ac_word=$2
3298 echo "$as_me:3298: checking for $ac_word" >&5
3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300 if test "${ac_cv_path_CXX+set}" = set; then
3301   echo $ECHO_N "(cached) $ECHO_C" >&6
3302 else
3303   case $CXX in
3304   [\\/]* | ?:[\\/]*)
3305   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3306   ;;
3307   *)
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   if $as_executable_p "$ac_dir/$ac_word"; then
3314    ac_cv_path_CXX="$ac_dir/$ac_word"
3315    echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316    break
3317 fi
3318 done
3319
3320   ;;
3321 esac
3322 fi
3323 CXX=$ac_cv_path_CXX
3324
3325 if test -n "$CXX"; then
3326   echo "$as_me:3326: result: $CXX" >&5
3327 echo "${ECHO_T}$CXX" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333         fi
3334         case "x$CXX" in
3335         (x|xg++)
3336                 { echo "$as_me:3336: WARNING: You don't have any C++ compiler, too bad" >&5
3337 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3338                 cf_with_cxx=no; CXX=""; GXX="";
3339                 ;;
3340         esac
3341 fi
3342
3343 GXX_VERSION=none
3344 if test "$GXX" = yes; then
3345         echo "$as_me:3345: checking version of ${CXX:-g++}" >&5
3346 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3347         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3348         if test -z "$GXX_VERSION"
3349         then
3350                 GXX_VERSION=unknown
3351                 GXX=no
3352         fi
3353         echo "$as_me:3353: result: $GXX_VERSION" >&5
3354 echo "${ECHO_T}$GXX_VERSION" >&6
3355 fi
3356
3357 case $GXX_VERSION in
3358 ([1-9][0-9].*)
3359         ;;
3360 (1.*|2.[0-6]*)
3361         { echo "$as_me:3361: WARNING: templates do not work" >&5
3362 echo "$as_me: WARNING: templates do not work" >&2;}
3363         ;;
3364 esac
3365
3366 echo "$as_me:3366: checking if you want to build C++ binding and demo" >&5
3367 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3368
3369 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3370 if test "${with_cxx_binding+set}" = set; then
3371   withval="$with_cxx_binding"
3372   cf_with_cxx_binding=$withval
3373 else
3374   cf_with_cxx_binding=$cf_with_cxx
3375 fi;
3376 echo "$as_me:3376: result: $cf_with_cxx_binding" >&5
3377 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3378
3379 echo "$as_me:3379: checking if you want to build with Ada" >&5
3380 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3381 echo "$as_me:3381: result: $cf_with_ada" >&5
3382 echo "${ECHO_T}$cf_with_ada" >&6
3383
3384 echo "$as_me:3384: checking if you want to install terminal database" >&5
3385 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3386
3387 # Check whether --enable-db-install or --disable-db-install was given.
3388 if test "${enable_db_install+set}" = set; then
3389   enableval="$enable_db_install"
3390   cf_with_db_install=$enableval
3391 else
3392   cf_with_db_install=yes
3393 fi;
3394 echo "$as_me:3394: result: $cf_with_db_install" >&5
3395 echo "${ECHO_T}$cf_with_db_install" >&6
3396
3397 echo "$as_me:3397: checking if you want to install manpages" >&5
3398 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3399
3400 # Check whether --with-manpages or --without-manpages was given.
3401 if test "${with_manpages+set}" = set; then
3402   withval="$with_manpages"
3403   cf_with_manpages=$withval
3404 else
3405   cf_with_manpages=yes
3406 fi;
3407 echo "$as_me:3407: result: $cf_with_manpages" >&5
3408 echo "${ECHO_T}$cf_with_manpages" >&6
3409
3410 echo "$as_me:3410: checking if you want to build programs such as tic" >&5
3411 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3412
3413 # Check whether --with-progs or --without-progs was given.
3414 if test "${with_progs+set}" = set; then
3415   withval="$with_progs"
3416   cf_with_progs=$withval
3417 else
3418   cf_with_progs=yes
3419 fi;
3420 echo "$as_me:3420: result: $cf_with_progs" >&5
3421 echo "${ECHO_T}$cf_with_progs" >&6
3422
3423 if test -f $srcdir/tack/tack.h; then
3424         if test "x$cross_compiling" = xyes ; then
3425                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3426
3427 echo "${as_me:-configure}:3427: testing ignoring tack because we are cross-compiling ..." 1>&5
3428
3429                 cf_with_tack=no
3430         else
3431                 echo "$as_me:3431: checking if you want to build the tack program" >&5
3432 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3433
3434 # Check whether --with-tack or --without-tack was given.
3435 if test "${with_tack+set}" = set; then
3436   withval="$with_tack"
3437   cf_with_tack=$withval
3438 else
3439   cf_with_tack=$cf_with_progs
3440 fi;
3441                 echo "$as_me:3441: result: $cf_with_tack" >&5
3442 echo "${ECHO_T}$cf_with_tack" >&6
3443         fi
3444 else
3445         cf_with_tack=no
3446 fi
3447
3448 echo "$as_me:3448: checking if you want to build test-programs" >&5
3449 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3450
3451 # Check whether --with-tests or --without-tests was given.
3452 if test "${with_tests+set}" = set; then
3453   withval="$with_tests"
3454   cf_with_tests=$withval
3455 else
3456   cf_with_tests=yes
3457 fi;
3458 echo "$as_me:3458: result: $cf_with_tests" >&5
3459 echo "${ECHO_T}$cf_with_tests" >&6
3460
3461 echo "$as_me:3461: checking if you wish to install curses.h" >&5
3462 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3463
3464 # Check whether --with-curses-h or --without-curses-h was given.
3465 if test "${with_curses_h+set}" = set; then
3466   withval="$with_curses_h"
3467   with_curses_h=$withval
3468 else
3469   with_curses_h=yes
3470 fi;
3471 echo "$as_me:3471: result: $with_curses_h" >&5
3472 echo "${ECHO_T}$with_curses_h" >&6
3473
3474 modules_to_build="ncurses"
3475 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3476 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3477 modules_to_build="$modules_to_build panel menu form"
3478
3479 test "$program_prefix" != NONE &&
3480   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3481 # Use a double $ so make ignores it.
3482 test "$program_suffix" != NONE &&
3483   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3484 # Double any \ or $.  echo might interpret backslashes.
3485 # By default was `s,x,x', remove it if useless.
3486 cat <<\_ACEOF >conftest.sed
3487 s/[\\$]/&&/g;s/;s,x,x,$//
3488 _ACEOF
3489 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3490 rm conftest.sed
3491
3492 for ac_prog in mawk gawk nawk awk
3493 do
3494   # Extract the first word of "$ac_prog", so it can be a program name with args.
3495 set dummy $ac_prog; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_prog_AWK+set}" = set; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   if test -n "$AWK"; then
3502   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3503 else
3504   ac_save_IFS=$IFS; IFS=$ac_path_separator
3505 ac_dummy="$PATH"
3506 for ac_dir in $ac_dummy; do
3507   IFS=$ac_save_IFS
3508   test -z "$ac_dir" && ac_dir=.
3509   $as_executable_p "$ac_dir/$ac_word" || continue
3510 ac_cv_prog_AWK="$ac_prog"
3511 echo "$as_me:3511: found $ac_dir/$ac_word" >&5
3512 break
3513 done
3514
3515 fi
3516 fi
3517 AWK=$ac_cv_prog_AWK
3518 if test -n "$AWK"; then
3519   echo "$as_me:3519: result: $AWK" >&5
3520 echo "${ECHO_T}$AWK" >&6
3521 else
3522   echo "$as_me:3522: result: no" >&5
3523 echo "${ECHO_T}no" >&6
3524 fi
3525
3526   test -n "$AWK" && break
3527 done
3528
3529 test -z "$AWK" && { { echo "$as_me:3529: error: No awk program found" >&5
3530 echo "$as_me: error: No awk program found" >&2;}
3531    { (exit 1); exit 1; }; }
3532
3533 echo "$as_me:3533: checking for egrep" >&5
3534 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3535 if test "${ac_cv_prog_egrep+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3539                 then ac_cv_prog_egrep='grep -E'
3540                 else ac_cv_prog_egrep='egrep'
3541         fi
3542 fi
3543 echo "$as_me:3543: result: $ac_cv_prog_egrep" >&5
3544 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3545         EGREP=$ac_cv_prog_egrep
3546
3547         test -z "$EGREP" && { { echo "$as_me:3547: error: No egrep program found" >&5
3548 echo "$as_me: error: No egrep program found" >&2;}
3549    { (exit 1); exit 1; }; }
3550
3551 # Find a good install program.  We prefer a C program (faster),
3552 # so one script is as good as another.  But avoid the broken or
3553 # incompatible versions:
3554 # SysV /etc/install, /usr/sbin/install
3555 # SunOS /usr/etc/install
3556 # IRIX /sbin/install
3557 # AIX /bin/install
3558 # AmigaOS /C/install, which installs bootblocks on floppy discs
3559 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3560 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3561 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3562 # ./install, which can be erroneously created by make from ./install.sh.
3563 echo "$as_me:3563: checking for a BSD compatible install" >&5
3564 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3565 if test -z "$INSTALL"; then
3566 if test "${ac_cv_path_install+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569     ac_save_IFS=$IFS; IFS=$ac_path_separator
3570   for ac_dir in $PATH; do
3571     IFS=$ac_save_IFS
3572     # Account for people who put trailing slashes in PATH elements.
3573     case $ac_dir/ in
3574     / | ./ | .// | /cC/* \
3575     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3576     | /usr/ucb/* ) ;;
3577     *)
3578       # OSF1 and SCO ODT 3.0 have their own names for install.
3579       # Don't use installbsd from OSF since it installs stuff as root
3580       # by default.
3581       for ac_prog in ginstall scoinst install; do
3582         if $as_executable_p "$ac_dir/$ac_prog"; then
3583           if test $ac_prog = install &&
3584             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3585             # AIX install.  It has an incompatible calling convention.
3586             :
3587           elif test $ac_prog = install &&
3588             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3589             # program-specific install script used by HP pwplus--don't use.
3590             :
3591           else
3592             ac_cv_path_install="$ac_dir/$ac_prog -c"
3593             break 2
3594           fi
3595         fi
3596       done
3597       ;;
3598     esac
3599   done
3600
3601 fi
3602   if test "${ac_cv_path_install+set}" = set; then
3603     INSTALL=$ac_cv_path_install
3604   else
3605     # As a last resort, use the slow shell script.  We don't cache a
3606     # path for INSTALL within a source directory, because that will
3607     # break other packages using the cache if that directory is
3608     # removed, or if the path is relative.
3609     INSTALL=$ac_install_sh
3610   fi
3611 fi
3612 echo "$as_me:3612: result: $INSTALL" >&5
3613 echo "${ECHO_T}$INSTALL" >&6
3614
3615 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3616 # It thinks the first close brace ends the variable substitution.
3617 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3618
3619 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3620
3621 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3622
3623 case $INSTALL in
3624 (/*)
3625         ;;
3626 (*)
3627         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3628         test -z "$cf_dir" && cf_dir=.
3629         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3630         ;;
3631 esac
3632
3633 for ac_prog in lint cppcheck splint
3634 do
3635   # Extract the first word of "$ac_prog", so it can be a program name with args.
3636 set dummy $ac_prog; ac_word=$2
3637 echo "$as_me:3637: checking for $ac_word" >&5
3638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3639 if test "${ac_cv_prog_LINT+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   if test -n "$LINT"; then
3643   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3644 else
3645   ac_save_IFS=$IFS; IFS=$ac_path_separator
3646 ac_dummy="$PATH"
3647 for ac_dir in $ac_dummy; do
3648   IFS=$ac_save_IFS
3649   test -z "$ac_dir" && ac_dir=.
3650   $as_executable_p "$ac_dir/$ac_word" || continue
3651 ac_cv_prog_LINT="$ac_prog"
3652 echo "$as_me:3652: found $ac_dir/$ac_word" >&5
3653 break
3654 done
3655
3656 fi
3657 fi
3658 LINT=$ac_cv_prog_LINT
3659 if test -n "$LINT"; then
3660   echo "$as_me:3660: result: $LINT" >&5
3661 echo "${ECHO_T}$LINT" >&6
3662 else
3663   echo "$as_me:3663: result: no" >&5
3664 echo "${ECHO_T}no" >&6
3665 fi
3666
3667   test -n "$LINT" && break
3668 done
3669
3670 case "x$LINT" in
3671 (xcppcheck|x*/cppcheck)
3672         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3673         ;;
3674 esac
3675
3676 echo "$as_me:3676: checking whether ln -s works" >&5
3677 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3678 LN_S=$as_ln_s
3679 if test "$LN_S" = "ln -s"; then
3680   echo "$as_me:3680: result: yes" >&5
3681 echo "${ECHO_T}yes" >&6
3682 else
3683   echo "$as_me:3683: result: no, using $LN_S" >&5
3684 echo "${ECHO_T}no, using $LN_S" >&6
3685 fi
3686
3687 echo "$as_me:3687: checking if $LN_S -f options work" >&5
3688 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3689
3690 rm -f conf$$.src conf$$dst
3691 echo >conf$$.dst
3692 echo first >conf$$.src
3693 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3694         cf_prog_ln_sf=yes
3695 else
3696         cf_prog_ln_sf=no
3697 fi
3698 rm -f conf$$.dst conf$$src
3699 echo "$as_me:3699: result: $cf_prog_ln_sf" >&5
3700 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3701
3702 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3703
3704 echo "$as_me:3704: checking for long file names" >&5
3705 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3706 if test "${ac_cv_sys_long_file_names+set}" = set; then
3707   echo $ECHO_N "(cached) $ECHO_C" >&6
3708 else
3709   ac_cv_sys_long_file_names=yes
3710 # Test for long file names in all the places we know might matter:
3711 #      .                the current directory, where building will happen
3712 #      $prefix/lib      where we will be installing things
3713 #      $exec_prefix/lib likewise
3714 # eval it to expand exec_prefix.
3715 #      $TMPDIR          if set, where it might want to write temporary files
3716 # if $TMPDIR is not set:
3717 #      /tmp             where it might want to write temporary files
3718 #      /var/tmp         likewise
3719 #      /usr/tmp         likewise
3720 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3721   ac_tmpdirs=$TMPDIR
3722 else
3723   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3724 fi
3725 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3726   test -d $ac_dir || continue
3727   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3728   ac_xdir=$ac_dir/cf$$
3729   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3730   ac_tf1=$ac_xdir/conftest9012345
3731   ac_tf2=$ac_xdir/conftest9012346
3732   (echo 1 >$ac_tf1) 2>/dev/null
3733   (echo 2 >$ac_tf2) 2>/dev/null
3734   ac_val=`cat $ac_tf1 2>/dev/null`
3735   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3736     ac_cv_sys_long_file_names=no
3737     rm -rf $ac_xdir 2>/dev/null
3738     break
3739   fi
3740   rm -rf $ac_xdir 2>/dev/null
3741 done
3742 fi
3743 echo "$as_me:3743: result: $ac_cv_sys_long_file_names" >&5
3744 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3745 if test $ac_cv_sys_long_file_names = yes; then
3746
3747 cat >>confdefs.h <<\EOF
3748 #define HAVE_LONG_FILE_NAMES 1
3749 EOF
3750
3751 fi
3752
3753 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3754 # of package conflict.
3755 cf_config_suffix=
3756
3757 # Check whether --with-config-suffix or --without-config-suffix was given.
3758 if test "${with_config_suffix+set}" = set; then
3759   withval="$with_config_suffix"
3760   case "x$withval" in
3761         (xyes|xno)
3762                 { echo "$as_me:3762: WARNING: expected a value for config-suffix option" >&5
3763 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3764                 ;;
3765         (*)     cf_config_suffix="$withval"
3766                 ;;
3767         esac
3768 fi;
3769
3770 # If we find pkg-config, check if we should install the ".pc" files.
3771
3772 echo "$as_me:3772: checking if you want to use pkg-config" >&5
3773 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3774
3775 # Check whether --with-pkg-config or --without-pkg-config was given.
3776 if test "${with_pkg_config+set}" = set; then
3777   withval="$with_pkg_config"
3778   cf_pkg_config=$withval
3779 else
3780   cf_pkg_config=yes
3781 fi;
3782 echo "$as_me:3782: result: $cf_pkg_config" >&5
3783 echo "${ECHO_T}$cf_pkg_config" >&6
3784
3785 case $cf_pkg_config in
3786 (no)
3787         PKG_CONFIG=none
3788         ;;
3789 (yes)
3790
3791 if test -n "$ac_tool_prefix"; then
3792   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3793 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   case $PKG_CONFIG in
3800   [\\/]* | ?:[\\/]*)
3801   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3802   ;;
3803   *)
3804   ac_save_IFS=$IFS; IFS=$ac_path_separator
3805 ac_dummy="$PATH"
3806 for ac_dir in $ac_dummy; do
3807   IFS=$ac_save_IFS
3808   test -z "$ac_dir" && ac_dir=.
3809   if $as_executable_p "$ac_dir/$ac_word"; then
3810    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3811    echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3812    break
3813 fi
3814 done
3815
3816   ;;
3817 esac
3818 fi
3819 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3820
3821 if test -n "$PKG_CONFIG"; then
3822   echo "$as_me:3822: result: $PKG_CONFIG" >&5
3823 echo "${ECHO_T}$PKG_CONFIG" >&6
3824 else
3825   echo "$as_me:3825: result: no" >&5
3826 echo "${ECHO_T}no" >&6
3827 fi
3828
3829 fi
3830 if test -z "$ac_cv_path_PKG_CONFIG"; then
3831   ac_pt_PKG_CONFIG=$PKG_CONFIG
3832   # Extract the first word of "pkg-config", so it can be a program name with args.
3833 set dummy pkg-config; ac_word=$2
3834 echo "$as_me:3834: checking for $ac_word" >&5
3835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3836 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3837   echo $ECHO_N "(cached) $ECHO_C" >&6
3838 else
3839   case $ac_pt_PKG_CONFIG in
3840   [\\/]* | ?:[\\/]*)
3841   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3842   ;;
3843   *)
3844   ac_save_IFS=$IFS; IFS=$ac_path_separator
3845 ac_dummy="$PATH"
3846 for ac_dir in $ac_dummy; do
3847   IFS=$ac_save_IFS
3848   test -z "$ac_dir" && ac_dir=.
3849   if $as_executable_p "$ac_dir/$ac_word"; then
3850    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3851    echo "$as_me:3851: found $ac_dir/$ac_word" >&5
3852    break
3853 fi
3854 done
3855
3856   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3857   ;;
3858 esac
3859 fi
3860 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3861
3862 if test -n "$ac_pt_PKG_CONFIG"; then
3863   echo "$as_me:3863: result: $ac_pt_PKG_CONFIG" >&5
3864 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3865 else
3866   echo "$as_me:3866: result: no" >&5
3867 echo "${ECHO_T}no" >&6
3868 fi
3869
3870   PKG_CONFIG=$ac_pt_PKG_CONFIG
3871 else
3872   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3873 fi
3874
3875         ;;
3876 (*)
3877         PKG_CONFIG=$withval
3878         ;;
3879 esac
3880
3881 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3882 if test "$PKG_CONFIG" != none ; then
3883
3884 if test "x$prefix" != xNONE; then
3885         cf_path_syntax="$prefix"
3886 else
3887         cf_path_syntax="$ac_default_prefix"
3888 fi
3889
3890 case ".$PKG_CONFIG" in
3891 (.\$\(*\)*|.\'*\'*)
3892         ;;
3893 (..|./*|.\\*)
3894         ;;
3895 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3896         ;;
3897 (.\${*prefix}*|.\${*dir}*)
3898         eval PKG_CONFIG="$PKG_CONFIG"
3899         case ".$PKG_CONFIG" in
3900         (.NONE/*)
3901                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3902                 ;;
3903         esac
3904         ;;
3905 (.no|.NONE/*)
3906         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3907         ;;
3908 (*)
3909         { { echo "$as_me:3909: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3910 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3911    { (exit 1); exit 1; }; }
3912         ;;
3913 esac
3914
3915 elif test "x$cf_pkg_config" != xno ; then
3916         { echo "$as_me:3916: WARNING: pkg-config is not installed" >&5
3917 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3918 fi
3919
3920 case $PKG_CONFIG in
3921 (no|none|yes)
3922         echo "$as_me:3922: checking for pkg-config library directory" >&5
3923 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3924         ;;
3925 (*)
3926         echo "$as_me:3926: checking for $PKG_CONFIG library directory" >&5
3927 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3928         ;;
3929 esac
3930
3931 PKG_CONFIG_LIBDIR=no
3932
3933 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3934 if test "${with_pkg_config_libdir+set}" = set; then
3935   withval="$with_pkg_config_libdir"
3936   PKG_CONFIG_LIBDIR=$withval
3937 else
3938   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3939 fi;
3940
3941 case x$PKG_CONFIG_LIBDIR in
3942 (x/*)
3943         ;;
3944 (xyes)
3945         # Look for the library directory using the same prefix as the executable
3946         if test "x$PKG_CONFIG" = xnone
3947         then
3948                 cf_path=$prefix
3949         else
3950                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3951         fi
3952
3953         # If you don't like using the default architecture, you have to specify the
3954         # intended library directory and corresponding compiler/linker options.
3955         #
3956         # This case allows for Debian's 2014-flavor of multiarch, along with the
3957         # most common variations before that point.  Some other variants spell the
3958         # directory differently, e.g., "pkg-config", and put it in unusual places.
3959         # pkg-config has always been poorly standardized, which is ironic...
3960         case x`(arch) 2>/dev/null` in
3961         (*64)
3962                 cf_search_path="\
3963                         $cf_path/lib/*64-linux-gnu \
3964                         $cf_path/share \
3965                         $cf_path/lib64 \
3966                         $cf_path/lib32 \
3967                         $cf_path/lib"
3968                 ;;
3969         (*)
3970                 cf_search_path="\
3971                         $cf_path/lib/*-linux-gnu \
3972                         $cf_path/share \
3973                         $cf_path/lib32 \
3974                         $cf_path/lib \
3975                         $cf_path/libdata"
3976                 ;;
3977         esac
3978
3979         test -n "$verbose" && echo "    list..." 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing list... ..." 1>&5
3982
3983         for cf_config in $cf_search_path
3984         do
3985                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3986
3987 echo "${as_me:-configure}:3987: testing checking $cf_config/pkgconfig ..." 1>&5
3988
3989                 if test -d $cf_config/pkgconfig
3990                 then
3991                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3992                         echo "$as_me:3992: checking done" >&5
3993 echo $ECHO_N "checking done... $ECHO_C" >&6
3994                         break
3995                 fi
3996         done
3997         ;;
3998 (*)
3999         ;;
4000 esac
4001
4002 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4003         echo "$as_me:4003: result: $PKG_CONFIG_LIBDIR" >&5
4004 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4005 fi
4006
4007 if test "x$PKG_CONFIG" != xnone
4008 then
4009         echo "$as_me:4009: checking if we should install .pc files for $PKG_CONFIG" >&5
4010 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4011 else
4012         echo "$as_me:4012: checking if we should install .pc files" >&5
4013 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4014 fi
4015
4016 # Check whether --enable-pc-files or --disable-pc-files was given.
4017 if test "${enable_pc_files+set}" = set; then
4018   enableval="$enable_pc_files"
4019   enable_pc_files=$enableval
4020 else
4021   enable_pc_files=no
4022 fi;
4023 echo "$as_me:4023: result: $enable_pc_files" >&5
4024 echo "${ECHO_T}$enable_pc_files" >&6
4025
4026 if test "x$enable_pc_files" != xno
4027 then
4028         MAKE_PC_FILES=
4029         case "x$PKG_CONFIG_LIBDIR" in
4030         (xno|xyes)
4031                 { echo "$as_me:4031: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4032 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4033                 ;;
4034         (*)
4035
4036 if test "x$prefix" != xNONE; then
4037         cf_path_syntax="$prefix"
4038 else
4039         cf_path_syntax="$ac_default_prefix"
4040 fi
4041
4042 case ".$PKG_CONFIG_LIBDIR" in
4043 (.\$\(*\)*|.\'*\'*)
4044         ;;
4045 (..|./*|.\\*)
4046         ;;
4047 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4048         ;;
4049 (.\${*prefix}*|.\${*dir}*)
4050         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4051         case ".$PKG_CONFIG_LIBDIR" in
4052         (.NONE/*)
4053                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4054                 ;;
4055         esac
4056         ;;
4057 (.no|.NONE/*)
4058         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4059         ;;
4060 (*)
4061         { { echo "$as_me:4061: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4062 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4063    { (exit 1); exit 1; }; }
4064         ;;
4065 esac
4066
4067                 ;;
4068         esac
4069 else
4070         MAKE_PC_FILES="#"
4071 fi
4072
4073 if test -z "$MAKE_PC_FILES"
4074 then
4075         echo "$as_me:4075: checking for suffix to add to pc-files" >&5
4076 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4077
4078 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4079 if test "${with_pc_suffix+set}" = set; then
4080   withval="$with_pc_suffix"
4081   case "x$withval" in
4082         (xyes|xno)
4083                 PC_MODULE_SUFFIX=
4084                 ;;
4085         (*)     PC_MODULE_SUFFIX="$withval"
4086                 ;;
4087         esac
4088 fi;
4089         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4090         echo "$as_me:4090: result: $PC_MODULE_SUFFIX" >&5
4091 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4092         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4093
4094 fi
4095
4096 echo "$as_me:4096: checking if we should assume mixed-case filenames" >&5
4097 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4098
4099 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4100 if test "${enable_mixed_case+set}" = set; then
4101   enableval="$enable_mixed_case"
4102   enable_mixedcase=$enableval
4103 else
4104   enable_mixedcase=auto
4105 fi;
4106 echo "$as_me:4106: result: $enable_mixedcase" >&5
4107 echo "${ECHO_T}$enable_mixedcase" >&6
4108 if test "$enable_mixedcase" = "auto" ; then
4109
4110 echo "$as_me:4110: checking if filesystem supports mixed-case filenames" >&5
4111 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4112 if test "${cf_cv_mixedcase+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115
4116 if test "$cross_compiling" = yes ; then
4117         case $target_alias in
4118         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4119                 cf_cv_mixedcase=no
4120                 ;;
4121         (*)
4122                 cf_cv_mixedcase=yes
4123                 ;;
4124         esac
4125 else
4126         rm -f conftest CONFTEST
4127         echo test >conftest
4128         if test -f CONFTEST ; then
4129                 cf_cv_mixedcase=no
4130         else
4131                 cf_cv_mixedcase=yes
4132         fi
4133         rm -f conftest CONFTEST
4134 fi
4135
4136 fi
4137 echo "$as_me:4137: result: $cf_cv_mixedcase" >&5
4138 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4139 test "$cf_cv_mixedcase" = yes &&
4140 cat >>confdefs.h <<\EOF
4141 #define MIXEDCASE_FILENAMES 1
4142 EOF
4143
4144 else
4145         cf_cv_mixedcase=$enable_mixedcase
4146         if test "x$enable_mixedcase" = "xyes" ; then
4147
4148 cat >>confdefs.h <<\EOF
4149 #define MIXEDCASE_FILENAMES 1
4150 EOF
4151
4152         fi
4153 fi
4154
4155 # do this after mixed-case option (tags/TAGS is not as important as tic).
4156 echo "$as_me:4156: checking whether ${MAKE-make} sets \${MAKE}" >&5
4157 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4158 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4159 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4160   echo $ECHO_N "(cached) $ECHO_C" >&6
4161 else
4162   cat >conftest.make <<\EOF
4163 all:
4164         @echo 'ac_maketemp="${MAKE}"'
4165 EOF
4166 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4167 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4168 if test -n "$ac_maketemp"; then
4169   eval ac_cv_prog_make_${ac_make}_set=yes
4170 else
4171   eval ac_cv_prog_make_${ac_make}_set=no
4172 fi
4173 rm -f conftest.make
4174 fi
4175 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4176   echo "$as_me:4176: result: yes" >&5
4177 echo "${ECHO_T}yes" >&6
4178   SET_MAKE=
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182   SET_MAKE="MAKE=${MAKE-make}"
4183 fi
4184
4185 for ac_prog in exctags ctags
4186 do
4187   # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_CTAGS+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$CTAGS"; then
4195   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_CTAGS="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208 fi
4209 fi
4210 CTAGS=$ac_cv_prog_CTAGS
4211 if test -n "$CTAGS"; then
4212   echo "$as_me:4212: result: $CTAGS" >&5
4213 echo "${ECHO_T}$CTAGS" >&6
4214 else
4215   echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4217 fi
4218
4219   test -n "$CTAGS" && break
4220 done
4221
4222 for ac_prog in exetags etags
4223 do
4224   # Extract the first word of "$ac_prog", so it can be a program name with args.
4225 set dummy $ac_prog; ac_word=$2
4226 echo "$as_me:4226: checking for $ac_word" >&5
4227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4228 if test "${ac_cv_prog_ETAGS+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231   if test -n "$ETAGS"; then
4232   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4233 else
4234   ac_save_IFS=$IFS; IFS=$ac_path_separator
4235 ac_dummy="$PATH"
4236 for ac_dir in $ac_dummy; do
4237   IFS=$ac_save_IFS
4238   test -z "$ac_dir" && ac_dir=.
4239   $as_executable_p "$ac_dir/$ac_word" || continue
4240 ac_cv_prog_ETAGS="$ac_prog"
4241 echo "$as_me:4241: found $ac_dir/$ac_word" >&5
4242 break
4243 done
4244
4245 fi
4246 fi
4247 ETAGS=$ac_cv_prog_ETAGS
4248 if test -n "$ETAGS"; then
4249   echo "$as_me:4249: result: $ETAGS" >&5
4250 echo "${ECHO_T}$ETAGS" >&6
4251 else
4252   echo "$as_me:4252: result: no" >&5
4253 echo "${ECHO_T}no" >&6
4254 fi
4255
4256   test -n "$ETAGS" && break
4257 done
4258
4259 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4260 set dummy ${CTAGS:-ctags}; ac_word=$2
4261 echo "$as_me:4261: checking for $ac_word" >&5
4262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4263 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   if test -n "$MAKE_LOWER_TAGS"; then
4267   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4268 else
4269   ac_save_IFS=$IFS; IFS=$ac_path_separator
4270 ac_dummy="$PATH"
4271 for ac_dir in $ac_dummy; do
4272   IFS=$ac_save_IFS
4273   test -z "$ac_dir" && ac_dir=.
4274   $as_executable_p "$ac_dir/$ac_word" || continue
4275 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4276 echo "$as_me:4276: found $ac_dir/$ac_word" >&5
4277 break
4278 done
4279
4280   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4281 fi
4282 fi
4283 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4284 if test -n "$MAKE_LOWER_TAGS"; then
4285   echo "$as_me:4285: result: $MAKE_LOWER_TAGS" >&5
4286 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4287 else
4288   echo "$as_me:4288: result: no" >&5
4289 echo "${ECHO_T}no" >&6
4290 fi
4291
4292 if test "$cf_cv_mixedcase" = yes ; then
4293         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4294 set dummy ${ETAGS:-etags}; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$MAKE_UPPER_TAGS"; then
4301   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4302 else
4303   ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306   IFS=$ac_save_IFS
4307   test -z "$ac_dir" && ac_dir=.
4308   $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4315 fi
4316 fi
4317 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4318 if test -n "$MAKE_UPPER_TAGS"; then
4319   echo "$as_me:4319: result: $MAKE_UPPER_TAGS" >&5
4320 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 else
4327         MAKE_UPPER_TAGS=no
4328 fi
4329
4330 if test "$MAKE_UPPER_TAGS" = yes ; then
4331         MAKE_UPPER_TAGS=
4332 else
4333         MAKE_UPPER_TAGS="#"
4334 fi
4335
4336 if test "$MAKE_LOWER_TAGS" = yes ; then
4337         MAKE_LOWER_TAGS=
4338 else
4339         MAKE_LOWER_TAGS="#"
4340 fi
4341
4342 echo "$as_me:4342: checking for makeflags variable" >&5
4343 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4344 if test "${cf_cv_makeflags+set}" = set; then
4345   echo $ECHO_N "(cached) $ECHO_C" >&6
4346 else
4347
4348         cf_cv_makeflags=''
4349         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4350         do
4351                 cat >cf_makeflags.tmp <<CF_EOF
4352 SHELL = $SHELL
4353 all :
4354         @ echo '.$cf_option'
4355 CF_EOF
4356                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4357                 case "$cf_result" in
4358                 (.*k|.*kw)
4359                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4360                         case "$cf_result" in
4361                         (.*CC=*)        cf_cv_makeflags=
4362                                 ;;
4363                         (*)     cf_cv_makeflags=$cf_option
4364                                 ;;
4365                         esac
4366                         break
4367                         ;;
4368                 (.-)
4369                         ;;
4370                 (*)
4371
4372 echo "${as_me:-configure}:4372: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4373
4374                         ;;
4375                 esac
4376         done
4377         rm -f cf_makeflags.tmp
4378
4379 fi
4380 echo "$as_me:4380: result: $cf_cv_makeflags" >&5
4381 echo "${ECHO_T}$cf_cv_makeflags" >&6
4382
4383 if test -n "$ac_tool_prefix"; then
4384   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4385 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4386 echo "$as_me:4386: checking for $ac_word" >&5
4387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4388 if test "${ac_cv_prog_RANLIB+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391   if test -n "$RANLIB"; then
4392   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4393 else
4394   ac_save_IFS=$IFS; IFS=$ac_path_separator
4395 ac_dummy="$PATH"
4396 for ac_dir in $ac_dummy; do
4397   IFS=$ac_save_IFS
4398   test -z "$ac_dir" && ac_dir=.
4399   $as_executable_p "$ac_dir/$ac_word" || continue
4400 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4401 echo "$as_me:4401: found $ac_dir/$ac_word" >&5
4402 break
4403 done
4404
4405 fi
4406 fi
4407 RANLIB=$ac_cv_prog_RANLIB
4408 if test -n "$RANLIB"; then
4409   echo "$as_me:4409: result: $RANLIB" >&5
4410 echo "${ECHO_T}$RANLIB" >&6
4411 else
4412   echo "$as_me:4412: result: no" >&5
4413 echo "${ECHO_T}no" >&6
4414 fi
4415
4416 fi
4417 if test -z "$ac_cv_prog_RANLIB"; then
4418   ac_ct_RANLIB=$RANLIB
4419   # Extract the first word of "ranlib", so it can be a program name with args.
4420 set dummy ranlib; ac_word=$2
4421 echo "$as_me:4421: checking for $ac_word" >&5
4422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4423 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4424   echo $ECHO_N "(cached) $ECHO_C" >&6
4425 else
4426   if test -n "$ac_ct_RANLIB"; then
4427   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4428 else
4429   ac_save_IFS=$IFS; IFS=$ac_path_separator
4430 ac_dummy="$PATH"
4431 for ac_dir in $ac_dummy; do
4432   IFS=$ac_save_IFS
4433   test -z "$ac_dir" && ac_dir=.
4434   $as_executable_p "$ac_dir/$ac_word" || continue
4435 ac_cv_prog_ac_ct_RANLIB="ranlib"
4436 echo "$as_me:4436: found $ac_dir/$ac_word" >&5
4437 break
4438 done
4439
4440   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4441 fi
4442 fi
4443 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4444 if test -n "$ac_ct_RANLIB"; then
4445   echo "$as_me:4445: result: $ac_ct_RANLIB" >&5
4446 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4447 else
4448   echo "$as_me:4448: result: no" >&5
4449 echo "${ECHO_T}no" >&6
4450 fi
4451
4452   RANLIB=$ac_ct_RANLIB
4453 else
4454   RANLIB="$ac_cv_prog_RANLIB"
4455 fi
4456
4457 if test -n "$ac_tool_prefix"; then
4458   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4459 set dummy ${ac_tool_prefix}ld; ac_word=$2
4460 echo "$as_me:4460: checking for $ac_word" >&5
4461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4462 if test "${ac_cv_prog_LD+set}" = set; then
4463   echo $ECHO_N "(cached) $ECHO_C" >&6
4464 else
4465   if test -n "$LD"; then
4466   ac_cv_prog_LD="$LD" # Let the user override the test.
4467 else
4468   ac_save_IFS=$IFS; IFS=$ac_path_separator
4469 ac_dummy="$PATH"
4470 for ac_dir in $ac_dummy; do
4471   IFS=$ac_save_IFS
4472   test -z "$ac_dir" && ac_dir=.
4473   $as_executable_p "$ac_dir/$ac_word" || continue
4474 ac_cv_prog_LD="${ac_tool_prefix}ld"
4475 echo "$as_me:4475: found $ac_dir/$ac_word" >&5
4476 break
4477 done
4478
4479 fi
4480 fi
4481 LD=$ac_cv_prog_LD
4482 if test -n "$LD"; then
4483   echo "$as_me:4483: result: $LD" >&5
4484 echo "${ECHO_T}$LD" >&6
4485 else
4486   echo "$as_me:4486: result: no" >&5
4487 echo "${ECHO_T}no" >&6
4488 fi
4489
4490 fi
4491 if test -z "$ac_cv_prog_LD"; then
4492   ac_ct_LD=$LD
4493   # Extract the first word of "ld", so it can be a program name with args.
4494 set dummy ld; ac_word=$2
4495 echo "$as_me:4495: checking for $ac_word" >&5
4496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4497 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   if test -n "$ac_ct_LD"; then
4501   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4502 else
4503   ac_save_IFS=$IFS; IFS=$ac_path_separator
4504 ac_dummy="$PATH"
4505 for ac_dir in $ac_dummy; do
4506   IFS=$ac_save_IFS
4507   test -z "$ac_dir" && ac_dir=.
4508   $as_executable_p "$ac_dir/$ac_word" || continue
4509 ac_cv_prog_ac_ct_LD="ld"
4510 echo "$as_me:4510: found $ac_dir/$ac_word" >&5
4511 break
4512 done
4513
4514   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4515 fi
4516 fi
4517 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4518 if test -n "$ac_ct_LD"; then
4519   echo "$as_me:4519: result: $ac_ct_LD" >&5
4520 echo "${ECHO_T}$ac_ct_LD" >&6
4521 else
4522   echo "$as_me:4522: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 fi
4525
4526   LD=$ac_ct_LD
4527 else
4528   LD="$ac_cv_prog_LD"
4529 fi
4530
4531 if test -n "$ac_tool_prefix"; then
4532   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4533 set dummy ${ac_tool_prefix}ar; ac_word=$2
4534 echo "$as_me:4534: checking for $ac_word" >&5
4535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4536 if test "${ac_cv_prog_AR+set}" = set; then
4537   echo $ECHO_N "(cached) $ECHO_C" >&6
4538 else
4539   if test -n "$AR"; then
4540   ac_cv_prog_AR="$AR" # Let the user override the test.
4541 else
4542   ac_save_IFS=$IFS; IFS=$ac_path_separator
4543 ac_dummy="$PATH"
4544 for ac_dir in $ac_dummy; do
4545   IFS=$ac_save_IFS
4546   test -z "$ac_dir" && ac_dir=.
4547   $as_executable_p "$ac_dir/$ac_word" || continue
4548 ac_cv_prog_AR="${ac_tool_prefix}ar"
4549 echo "$as_me:4549: found $ac_dir/$ac_word" >&5
4550 break
4551 done
4552
4553 fi
4554 fi
4555 AR=$ac_cv_prog_AR
4556 if test -n "$AR"; then
4557   echo "$as_me:4557: result: $AR" >&5
4558 echo "${ECHO_T}$AR" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 fi
4565 if test -z "$ac_cv_prog_AR"; then
4566   ac_ct_AR=$AR
4567   # Extract the first word of "ar", so it can be a program name with args.
4568 set dummy ar; ac_word=$2
4569 echo "$as_me:4569: checking for $ac_word" >&5
4570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4571 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4572   echo $ECHO_N "(cached) $ECHO_C" >&6
4573 else
4574   if test -n "$ac_ct_AR"; then
4575   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4576 else
4577   ac_save_IFS=$IFS; IFS=$ac_path_separator
4578 ac_dummy="$PATH"
4579 for ac_dir in $ac_dummy; do
4580   IFS=$ac_save_IFS
4581   test -z "$ac_dir" && ac_dir=.
4582   $as_executable_p "$ac_dir/$ac_word" || continue
4583 ac_cv_prog_ac_ct_AR="ar"
4584 echo "$as_me:4584: found $ac_dir/$ac_word" >&5
4585 break
4586 done
4587
4588   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4589 fi
4590 fi
4591 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4592 if test -n "$ac_ct_AR"; then
4593   echo "$as_me:4593: result: $ac_ct_AR" >&5
4594 echo "${ECHO_T}$ac_ct_AR" >&6
4595 else
4596   echo "$as_me:4596: result: no" >&5
4597 echo "${ECHO_T}no" >&6
4598 fi
4599
4600   AR=$ac_ct_AR
4601 else
4602   AR="$ac_cv_prog_AR"
4603 fi
4604
4605 if test -n "$ac_tool_prefix"; then
4606   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4607 set dummy ${ac_tool_prefix}nm; ac_word=$2
4608 echo "$as_me:4608: checking for $ac_word" >&5
4609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4610 if test "${ac_cv_prog_NM+set}" = set; then
4611   echo $ECHO_N "(cached) $ECHO_C" >&6
4612 else
4613   if test -n "$NM"; then
4614   ac_cv_prog_NM="$NM" # Let the user override the test.
4615 else
4616   ac_save_IFS=$IFS; IFS=$ac_path_separator
4617 ac_dummy="$PATH"
4618 for ac_dir in $ac_dummy; do
4619   IFS=$ac_save_IFS
4620   test -z "$ac_dir" && ac_dir=.
4621   $as_executable_p "$ac_dir/$ac_word" || continue
4622 ac_cv_prog_NM="${ac_tool_prefix}nm"
4623 echo "$as_me:4623: found $ac_dir/$ac_word" >&5
4624 break
4625 done
4626
4627 fi
4628 fi
4629 NM=$ac_cv_prog_NM
4630 if test -n "$NM"; then
4631   echo "$as_me:4631: result: $NM" >&5
4632 echo "${ECHO_T}$NM" >&6
4633 else
4634   echo "$as_me:4634: result: no" >&5
4635 echo "${ECHO_T}no" >&6
4636 fi
4637
4638 fi
4639 if test -z "$ac_cv_prog_NM"; then
4640   ac_ct_NM=$NM
4641   # Extract the first word of "nm", so it can be a program name with args.
4642 set dummy nm; ac_word=$2
4643 echo "$as_me:4643: checking for $ac_word" >&5
4644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4645 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4646   echo $ECHO_N "(cached) $ECHO_C" >&6
4647 else
4648   if test -n "$ac_ct_NM"; then
4649   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4650 else
4651   ac_save_IFS=$IFS; IFS=$ac_path_separator
4652 ac_dummy="$PATH"
4653 for ac_dir in $ac_dummy; do
4654   IFS=$ac_save_IFS
4655   test -z "$ac_dir" && ac_dir=.
4656   $as_executable_p "$ac_dir/$ac_word" || continue
4657 ac_cv_prog_ac_ct_NM="nm"
4658 echo "$as_me:4658: found $ac_dir/$ac_word" >&5
4659 break
4660 done
4661
4662   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4663 fi
4664 fi
4665 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4666 if test -n "$ac_ct_NM"; then
4667   echo "$as_me:4667: result: $ac_ct_NM" >&5
4668 echo "${ECHO_T}$ac_ct_NM" >&6
4669 else
4670   echo "$as_me:4670: result: no" >&5
4671 echo "${ECHO_T}no" >&6
4672 fi
4673
4674   NM=$ac_ct_NM
4675 else
4676   NM="$ac_cv_prog_NM"
4677 fi
4678
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}ar; ac_word=$2
4682 echo "$as_me:4682: checking for $ac_word" >&5
4683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4684 if test "${ac_cv_prog_AR+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   if test -n "$AR"; then
4688   ac_cv_prog_AR="$AR" # Let the user override the test.
4689 else
4690   ac_save_IFS=$IFS; IFS=$ac_path_separator
4691 ac_dummy="$PATH"
4692 for ac_dir in $ac_dummy; do
4693   IFS=$ac_save_IFS
4694   test -z "$ac_dir" && ac_dir=.
4695   $as_executable_p "$ac_dir/$ac_word" || continue
4696 ac_cv_prog_AR="${ac_tool_prefix}ar"
4697 echo "$as_me:4697: found $ac_dir/$ac_word" >&5
4698 break
4699 done
4700
4701 fi
4702 fi
4703 AR=$ac_cv_prog_AR
4704 if test -n "$AR"; then
4705   echo "$as_me:4705: result: $AR" >&5
4706 echo "${ECHO_T}$AR" >&6
4707 else
4708   echo "$as_me:4708: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712 fi
4713 if test -z "$ac_cv_prog_AR"; then
4714   ac_ct_AR=$AR
4715   # Extract the first word of "ar", so it can be a program name with args.
4716 set dummy ar; ac_word=$2
4717 echo "$as_me:4717: checking for $ac_word" >&5
4718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4719 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   if test -n "$ac_ct_AR"; then
4723   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4724 else
4725   ac_save_IFS=$IFS; IFS=$ac_path_separator
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728   IFS=$ac_save_IFS
4729   test -z "$ac_dir" && ac_dir=.
4730   $as_executable_p "$ac_dir/$ac_word" || continue
4731 ac_cv_prog_ac_ct_AR="ar"
4732 echo "$as_me:4732: found $ac_dir/$ac_word" >&5
4733 break
4734 done
4735
4736   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4737 fi
4738 fi
4739 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4740 if test -n "$ac_ct_AR"; then
4741   echo "$as_me:4741: result: $ac_ct_AR" >&5
4742 echo "${ECHO_T}$ac_ct_AR" >&6
4743 else
4744   echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4746 fi
4747
4748   AR=$ac_ct_AR
4749 else
4750   AR="$ac_cv_prog_AR"
4751 fi
4752
4753 echo "$as_me:4753: checking for options to update archives" >&5
4754 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4755 if test "${cf_cv_ar_flags+set}" = set; then
4756   echo $ECHO_N "(cached) $ECHO_C" >&6
4757 else
4758
4759         case $cf_cv_system_name in
4760         (*-msvc*)
4761                 cf_cv_ar_flags=''
4762                 cat >mk_static_lib.sh <<-EOF
4763                 #!$SHELL
4764                 MSVC_BIN="$AR"
4765                 out="\$1"
4766                 shift
4767                 exec \$MSVC_BIN -out:"\$out" \$@
4768                 EOF
4769                 chmod +x mk_static_lib.sh
4770                 AR=`pwd`/mk_static_lib.sh
4771                 ;;
4772         (*)
4773                 cf_cv_ar_flags=unknown
4774                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4775                 do
4776
4777                         # check if $ARFLAGS already contains this choice
4778                         if test "x$ARFLAGS" != "x" ; then
4779                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4780                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4781                                         cf_cv_ar_flags=
4782                                         break
4783                                 fi
4784                         fi
4785
4786                         rm -f conftest.$ac_cv_objext
4787                         rm -f conftest.a
4788
4789                         cat >conftest.$ac_ext <<EOF
4790 #line 4790 "configure"
4791 int     testdata[3] = { 123, 456, 789 };
4792 EOF
4793                         if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
4794   (eval $ac_compile) 2>&5
4795   ac_status=$?
4796   echo "$as_me:4796: \$? = $ac_status" >&5
4797   (exit $ac_status); } ; then
4798                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4799                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4800                                 if test -f conftest.a ; then
4801                                         cf_cv_ar_flags=$cf_ar_flags
4802                                         break
4803                                 fi
4804                         else
4805                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4806
4807 echo "${as_me:-configure}:4807: testing cannot compile test-program ..." 1>&5
4808
4809                                 break
4810                         fi
4811                 done
4812                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4813                 ;;
4814         esac
4815
4816 fi
4817 echo "$as_me:4817: result: $cf_cv_ar_flags" >&5
4818 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4819
4820 if test -n "$ARFLAGS" ; then
4821         if test -n "$cf_cv_ar_flags" ; then
4822                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4823         fi
4824 else
4825         ARFLAGS=$cf_cv_ar_flags
4826 fi
4827
4828 echo "$as_me:4828: checking if you have specified an install-prefix" >&5
4829 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4830
4831 # Check whether --with-install-prefix or --without-install-prefix was given.
4832 if test "${with_install_prefix+set}" = set; then
4833   withval="$with_install_prefix"
4834   case "x$withval" in
4835         (xyes|xno)
4836                 ;;
4837         (*)     DESTDIR="$withval"
4838                 ;;
4839         esac
4840 fi;
4841 echo "$as_me:4841: result: $DESTDIR" >&5
4842 echo "${ECHO_T}$DESTDIR" >&6
4843
4844 ###############################################################################
4845
4846 # If we're cross-compiling, allow the user to override the tools and their
4847 # options.  The configure script is oriented toward identifying the host
4848 # compiler, etc., but we need a build compiler to generate parts of the source.
4849
4850 case $cf_cv_system_name in
4851 (*-msvc*)
4852         LDFLAGS="$LDFLAGS user32.lib"
4853         export LDFLAGS
4854         ;;
4855 esac
4856
4857 if test "$cross_compiling" = yes ; then
4858
4859         # defaults that we might want to override
4860         : ${BUILD_CFLAGS:=''}
4861         : ${BUILD_CPPFLAGS:=''}
4862         : ${BUILD_LDFLAGS:=''}
4863         : ${BUILD_LIBS:=''}
4864         : ${BUILD_EXEEXT:='$x'}
4865         : ${BUILD_OBJEXT:='o'}
4866
4867 # Check whether --with-build-cc or --without-build-cc was given.
4868 if test "${with_build_cc+set}" = set; then
4869   withval="$with_build_cc"
4870   BUILD_CC="$withval"
4871 else
4872   for ac_prog in gcc clang c99 c89 cc cl
4873 do
4874   # Extract the first word of "$ac_prog", so it can be a program name with args.
4875 set dummy $ac_prog; ac_word=$2
4876 echo "$as_me:4876: checking for $ac_word" >&5
4877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4878 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4879   echo $ECHO_N "(cached) $ECHO_C" >&6
4880 else
4881   if test -n "$BUILD_CC"; then
4882   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4883 else
4884   ac_save_IFS=$IFS; IFS=$ac_path_separator
4885 ac_dummy="$PATH"
4886 for ac_dir in $ac_dummy; do
4887   IFS=$ac_save_IFS
4888   test -z "$ac_dir" && ac_dir=.
4889   $as_executable_p "$ac_dir/$ac_word" || continue
4890 ac_cv_prog_BUILD_CC="$ac_prog"
4891 echo "$as_me:4891: found $ac_dir/$ac_word" >&5
4892 break
4893 done
4894
4895 fi
4896 fi
4897 BUILD_CC=$ac_cv_prog_BUILD_CC
4898 if test -n "$BUILD_CC"; then
4899   echo "$as_me:4899: result: $BUILD_CC" >&5
4900 echo "${ECHO_T}$BUILD_CC" >&6
4901 else
4902   echo "$as_me:4902: result: no" >&5
4903 echo "${ECHO_T}no" >&6
4904 fi
4905
4906   test -n "$BUILD_CC" && break
4907 done
4908 test -n "$BUILD_CC" || BUILD_CC="none"
4909
4910 fi;
4911         echo "$as_me:4911: checking for native build C compiler" >&5
4912 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4913         echo "$as_me:4913: result: $BUILD_CC" >&5
4914 echo "${ECHO_T}$BUILD_CC" >&6
4915
4916         echo "$as_me:4916: checking for native build C preprocessor" >&5
4917 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4918
4919 # Check whether --with-build-cpp or --without-build-cpp was given.
4920 if test "${with_build_cpp+set}" = set; then
4921   withval="$with_build_cpp"
4922   BUILD_CPP="$withval"
4923 else
4924   BUILD_CPP='${BUILD_CC} -E'
4925 fi;
4926         echo "$as_me:4926: result: $BUILD_CPP" >&5
4927 echo "${ECHO_T}$BUILD_CPP" >&6
4928
4929         echo "$as_me:4929: checking for native build C flags" >&5
4930 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4931
4932 # Check whether --with-build-cflags or --without-build-cflags was given.
4933 if test "${with_build_cflags+set}" = set; then
4934   withval="$with_build_cflags"
4935   BUILD_CFLAGS="$withval"
4936 fi;
4937         echo "$as_me:4937: result: $BUILD_CFLAGS" >&5
4938 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4939
4940         echo "$as_me:4940: checking for native build C preprocessor-flags" >&5
4941 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4942
4943 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4944 if test "${with_build_cppflags+set}" = set; then
4945   withval="$with_build_cppflags"
4946   BUILD_CPPFLAGS="$withval"
4947 fi;
4948         echo "$as_me:4948: result: $BUILD_CPPFLAGS" >&5
4949 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4950
4951         echo "$as_me:4951: checking for native build linker-flags" >&5
4952 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4953
4954 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4955 if test "${with_build_ldflags+set}" = set; then
4956   withval="$with_build_ldflags"
4957   BUILD_LDFLAGS="$withval"
4958 fi;
4959         echo "$as_me:4959: result: $BUILD_LDFLAGS" >&5
4960 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4961
4962         echo "$as_me:4962: checking for native build linker-libraries" >&5
4963 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4964
4965 # Check whether --with-build-libs or --without-build-libs was given.
4966 if test "${with_build_libs+set}" = set; then
4967   withval="$with_build_libs"
4968   BUILD_LIBS="$withval"
4969 fi;
4970         echo "$as_me:4970: result: $BUILD_LIBS" >&5
4971 echo "${ECHO_T}$BUILD_LIBS" >&6
4972
4973         # this assumes we're on Unix.
4974         BUILD_EXEEXT=
4975         BUILD_OBJEXT=o
4976
4977         : ${BUILD_CC:='${CC}'}
4978
4979         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4980                 { { echo "$as_me:4980: error: Cross-build requires two compilers.
4981 Use --with-build-cc to specify the native compiler." >&5
4982 echo "$as_me: error: Cross-build requires two compilers.
4983 Use --with-build-cc to specify the native compiler." >&2;}
4984    { (exit 1); exit 1; }; }
4985         fi
4986
4987 else
4988         : ${BUILD_CC:='${CC}'}
4989         : ${BUILD_CPP:='${CPP}'}
4990         : ${BUILD_CFLAGS:='${CFLAGS}'}
4991         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4992         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4993         : ${BUILD_LIBS:='${LIBS}'}
4994         : ${BUILD_EXEEXT:='$x'}
4995         : ${BUILD_OBJEXT:='o'}
4996 fi
4997
4998 ###############################################################################
4999
5000 ### Options to allow the user to specify the set of libraries which are used.
5001 ### Use "--without-normal --with-shared" to allow the default model to be
5002 ### shared, for example.
5003 cf_list_models=""
5004
5005 echo "$as_me:5005: checking if libtool -version-number should be used" >&5
5006 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5007
5008 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5009 if test "${enable_libtool_version+set}" = set; then
5010   enableval="$enable_libtool_version"
5011   test "$enableval" != no && enableval=yes
5012         if test "$enableval" != "yes" ; then
5013     cf_libtool_version=no
5014         else
5015                 cf_libtool_version=yes
5016         fi
5017 else
5018   enableval=yes
5019         cf_libtool_version=yes
5020
5021 fi;
5022 echo "$as_me:5022: result: $cf_libtool_version" >&5
5023 echo "${ECHO_T}$cf_libtool_version" >&6
5024
5025 if test "$cf_libtool_version" = yes ; then
5026         LIBTOOL_VERSION="-version-number"
5027 else
5028         LIBTOOL_VERSION="-version-info"
5029         case "x$VERSION" in
5030         (x)
5031                 { echo "$as_me:5031: WARNING: VERSION was not set" >&5
5032 echo "$as_me: WARNING: VERSION was not set" >&2;}
5033                 ;;
5034         (x*.*.*)
5035                 ABI_VERSION="$VERSION"
5036                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5037
5038 echo "${as_me:-configure}:5038: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5039
5040                 ;;
5041         (x*:*:*)
5042                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5043                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5044
5045 echo "${as_me:-configure}:5045: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5046
5047                 ;;
5048         (*)
5049                 { echo "$as_me:5049: WARNING: unexpected VERSION value: $VERSION" >&5
5050 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5051                 ;;
5052         esac
5053 fi
5054
5055 LIBTOOL=
5056
5057 # common library maintenance symbols that are convenient for libtool scripts:
5058 LIB_CREATE='${AR} -cr'
5059 LIB_OBJECT='${OBJECTS}'
5060 LIB_SUFFIX=.a
5061 LIB_PREP="$RANLIB"
5062
5063 # symbols used to prop libtool up to enable it to determine what it should be
5064 # doing:
5065 LIB_CLEAN=
5066 LIB_COMPILE=
5067 LIB_LINK='${CC}'
5068 LIB_INSTALL=
5069 LIB_UNINSTALL=
5070
5071 echo "$as_me:5071: checking if you want to build libraries with libtool" >&5
5072 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5073
5074 # Check whether --with-libtool or --without-libtool was given.
5075 if test "${with_libtool+set}" = set; then
5076   withval="$with_libtool"
5077   with_libtool=$withval
5078 else
5079   with_libtool=no
5080 fi;
5081 echo "$as_me:5081: result: $with_libtool" >&5
5082 echo "${ECHO_T}$with_libtool" >&6
5083 if test "$with_libtool" != "no"; then
5084
5085         if test "$with_libtool" != "yes" ; then
5086
5087 if test "x$prefix" != xNONE; then
5088         cf_path_syntax="$prefix"
5089 else
5090         cf_path_syntax="$ac_default_prefix"
5091 fi
5092
5093 case ".$with_libtool" in
5094 (.\$\(*\)*|.\'*\'*)
5095         ;;
5096 (..|./*|.\\*)
5097         ;;
5098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5099         ;;
5100 (.\${*prefix}*|.\${*dir}*)
5101         eval with_libtool="$with_libtool"
5102         case ".$with_libtool" in
5103         (.NONE/*)
5104                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5105                 ;;
5106         esac
5107         ;;
5108 (.no|.NONE/*)
5109         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5110         ;;
5111 (*)
5112         { { echo "$as_me:5112: error: expected a pathname, not \"$with_libtool\"" >&5
5113 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5114    { (exit 1); exit 1; }; }
5115         ;;
5116 esac
5117
5118                 LIBTOOL=$with_libtool
5119         else
5120                 if test -n "$ac_tool_prefix"; then
5121   for ac_prog in libtool glibtool
5122   do
5123     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5124 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5125 echo "$as_me:5125: checking for $ac_word" >&5
5126 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5127 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5128   echo $ECHO_N "(cached) $ECHO_C" >&6
5129 else
5130   if test -n "$LIBTOOL"; then
5131   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5132 else
5133   ac_save_IFS=$IFS; IFS=$ac_path_separator
5134 ac_dummy="$PATH"
5135 for ac_dir in $ac_dummy; do
5136   IFS=$ac_save_IFS
5137   test -z "$ac_dir" && ac_dir=.
5138   $as_executable_p "$ac_dir/$ac_word" || continue
5139 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5140 echo "$as_me:5140: found $ac_dir/$ac_word" >&5
5141 break
5142 done
5143
5144 fi
5145 fi
5146 LIBTOOL=$ac_cv_prog_LIBTOOL
5147 if test -n "$LIBTOOL"; then
5148   echo "$as_me:5148: result: $LIBTOOL" >&5
5149 echo "${ECHO_T}$LIBTOOL" >&6
5150 else
5151   echo "$as_me:5151: result: no" >&5
5152 echo "${ECHO_T}no" >&6
5153 fi
5154
5155     test -n "$LIBTOOL" && break
5156   done
5157 fi
5158 if test -z "$LIBTOOL"; then
5159   ac_ct_LIBTOOL=$LIBTOOL
5160   for ac_prog in libtool glibtool
5161 do
5162   # Extract the first word of "$ac_prog", so it can be a program name with args.
5163 set dummy $ac_prog; ac_word=$2
5164 echo "$as_me:5164: checking for $ac_word" >&5
5165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5166 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5167   echo $ECHO_N "(cached) $ECHO_C" >&6
5168 else
5169   if test -n "$ac_ct_LIBTOOL"; then
5170   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5171 else
5172   ac_save_IFS=$IFS; IFS=$ac_path_separator
5173 ac_dummy="$PATH"
5174 for ac_dir in $ac_dummy; do
5175   IFS=$ac_save_IFS
5176   test -z "$ac_dir" && ac_dir=.
5177   $as_executable_p "$ac_dir/$ac_word" || continue
5178 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5179 echo "$as_me:5179: found $ac_dir/$ac_word" >&5
5180 break
5181 done
5182
5183 fi
5184 fi
5185 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5186 if test -n "$ac_ct_LIBTOOL"; then
5187   echo "$as_me:5187: result: $ac_ct_LIBTOOL" >&5
5188 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5189 else
5190   echo "$as_me:5190: result: no" >&5
5191 echo "${ECHO_T}no" >&6
5192 fi
5193
5194   test -n "$ac_ct_LIBTOOL" && break
5195 done
5196 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5197
5198   LIBTOOL=$ac_ct_LIBTOOL
5199 fi
5200
5201 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5202 then
5203         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5204 else
5205         cf_cv_libtool_version=
5206 fi
5207 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5208
5209                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5210                 then
5211
5212 unset ac_cv_prog_ac_ct_LIBTOOL
5213 unset ac_ct_LIBTOOL
5214 unset LIBTOOL
5215
5216                         if test -n "$ac_tool_prefix"; then
5217   for ac_prog in glibtool
5218   do
5219     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5220 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5221 echo "$as_me:5221: checking for $ac_word" >&5
5222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5223 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5224   echo $ECHO_N "(cached) $ECHO_C" >&6
5225 else
5226   if test -n "$LIBTOOL"; then
5227   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5228 else
5229   ac_save_IFS=$IFS; IFS=$ac_path_separator
5230 ac_dummy="$PATH"
5231 for ac_dir in $ac_dummy; do
5232   IFS=$ac_save_IFS
5233   test -z "$ac_dir" && ac_dir=.
5234   $as_executable_p "$ac_dir/$ac_word" || continue
5235 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5236 echo "$as_me:5236: found $ac_dir/$ac_word" >&5
5237 break
5238 done
5239
5240 fi
5241 fi
5242 LIBTOOL=$ac_cv_prog_LIBTOOL
5243 if test -n "$LIBTOOL"; then
5244   echo "$as_me:5244: result: $LIBTOOL" >&5
5245 echo "${ECHO_T}$LIBTOOL" >&6
5246 else
5247   echo "$as_me:5247: result: no" >&5
5248 echo "${ECHO_T}no" >&6
5249 fi
5250
5251     test -n "$LIBTOOL" && break
5252   done
5253 fi
5254 if test -z "$LIBTOOL"; then
5255   ac_ct_LIBTOOL=$LIBTOOL
5256   for ac_prog in glibtool
5257 do
5258   # Extract the first word of "$ac_prog", so it can be a program name with args.
5259 set dummy $ac_prog; ac_word=$2
5260 echo "$as_me:5260: checking for $ac_word" >&5
5261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5262 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5263   echo $ECHO_N "(cached) $ECHO_C" >&6
5264 else
5265   if test -n "$ac_ct_LIBTOOL"; then
5266   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5267 else
5268   ac_save_IFS=$IFS; IFS=$ac_path_separator
5269 ac_dummy="$PATH"
5270 for ac_dir in $ac_dummy; do
5271   IFS=$ac_save_IFS
5272   test -z "$ac_dir" && ac_dir=.
5273   $as_executable_p "$ac_dir/$ac_word" || continue
5274 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5275 echo "$as_me:5275: found $ac_dir/$ac_word" >&5
5276 break
5277 done
5278
5279 fi
5280 fi
5281 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5282 if test -n "$ac_ct_LIBTOOL"; then
5283   echo "$as_me:5283: result: $ac_ct_LIBTOOL" >&5
5284 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5285 else
5286   echo "$as_me:5286: result: no" >&5
5287 echo "${ECHO_T}no" >&6
5288 fi
5289
5290   test -n "$ac_ct_LIBTOOL" && break
5291 done
5292 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5293
5294   LIBTOOL=$ac_ct_LIBTOOL
5295 fi
5296
5297 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5298 then
5299         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5300 else
5301         cf_cv_libtool_version=
5302 fi
5303 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5304
5305                 fi
5306         fi
5307         if test -z "$LIBTOOL" ; then
5308                 { { echo "$as_me:5308: error: Cannot find libtool" >&5
5309 echo "$as_me: error: Cannot find libtool" >&2;}
5310    { (exit 1); exit 1; }; }
5311         fi
5312         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5313         LIB_OBJECT='${OBJECTS:.o=.lo}'
5314         LIB_SUFFIX=.la
5315         LIB_CLEAN='${LIBTOOL} --mode=clean'
5316         LIB_COMPILE='${LIBTOOL} --mode=compile'
5317         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5318         LIB_INSTALL='${LIBTOOL} --mode=install'
5319         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5320         LIB_PREP=:
5321
5322 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5323 then
5324         echo "$as_me:5324: checking version of $LIBTOOL" >&5
5325 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5326
5327 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5328 then
5329         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5330 else
5331         cf_cv_libtool_version=
5332 fi
5333 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5334
5335         echo "$as_me:5335: result: $cf_cv_libtool_version" >&5
5336 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5337         if test -z "$cf_cv_libtool_version" ; then
5338                 { { echo "$as_me:5338: error: This is not GNU libtool" >&5
5339 echo "$as_me: error: This is not GNU libtool" >&2;}
5340    { (exit 1); exit 1; }; }
5341         fi
5342 else
5343         { { echo "$as_me:5343: error: GNU libtool has not been found" >&5
5344 echo "$as_me: error: GNU libtool has not been found" >&2;}
5345    { (exit 1); exit 1; }; }
5346 fi
5347
5348         # special hack to add -no-undefined (which libtool should do for itself)
5349         LT_UNDEF=
5350         case "$cf_cv_system_name" in
5351         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5352                 LT_UNDEF=-no-undefined
5353                 ;;
5354         esac
5355
5356         # special hack to add --tag option for C++ compiler
5357         case $cf_cv_libtool_version in
5358         (1.[5-9]*|[2-9].[0-9.a-z]*)
5359                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5360                 LIBTOOL="$LIBTOOL --tag=CC"
5361                 ;;
5362         (*)
5363                 LIBTOOL_CXX="$LIBTOOL"
5364                 ;;
5365         esac
5366 else
5367         LIBTOOL=""
5368         LIBTOOL_CXX=""
5369 fi
5370
5371 test -z "$LIBTOOL" && ECHO_LT=
5372
5373 if test "$with_libtool" != "no" ; then
5374
5375 cf_list_models="$cf_list_models libtool"
5376
5377 else
5378
5379 echo "$as_me:5379: checking if you want to build shared libraries" >&5
5380 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5381
5382 # Check whether --with-shared or --without-shared was given.
5383 if test "${with_shared+set}" = set; then
5384   withval="$with_shared"
5385   with_shared=$withval
5386 else
5387   with_shared=no
5388 fi;
5389 echo "$as_me:5389: result: $with_shared" >&5
5390 echo "${ECHO_T}$with_shared" >&6
5391 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5392
5393 echo "$as_me:5393: checking if you want to build static libraries" >&5
5394 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5395
5396 # Check whether --with-normal or --without-normal was given.
5397 if test "${with_normal+set}" = set; then
5398   withval="$with_normal"
5399   with_normal=$withval
5400 else
5401   with_normal=yes
5402 fi;
5403 echo "$as_me:5403: result: $with_normal" >&5
5404 echo "${ECHO_T}$with_normal" >&6
5405 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5406
5407 echo "$as_me:5407: checking if you want to build debug libraries" >&5
5408 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5409
5410 # Check whether --with-debug or --without-debug was given.
5411 if test "${with_debug+set}" = set; then
5412   withval="$with_debug"
5413   with_debug=$withval
5414 else
5415   with_debug=yes
5416 fi;
5417 echo "$as_me:5417: result: $with_debug" >&5
5418 echo "${ECHO_T}$with_debug" >&6
5419 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5420
5421 echo "$as_me:5421: checking if you want to build profiling libraries" >&5
5422 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5423
5424 # Check whether --with-profile or --without-profile was given.
5425 if test "${with_profile+set}" = set; then
5426   withval="$with_profile"
5427   with_profile=$withval
5428 else
5429   with_profile=no
5430 fi;
5431 echo "$as_me:5431: result: $with_profile" >&5
5432 echo "${ECHO_T}$with_profile" >&6
5433 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5434
5435 fi
5436
5437 if test "X$cf_with_cxx_binding" != Xno; then
5438 if test "x$with_shared" = "xyes"; then
5439 echo "$as_me:5439: checking if you want to build C++ shared libraries" >&5
5440 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5441
5442 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5443 if test "${with_cxx_shared+set}" = set; then
5444   withval="$with_cxx_shared"
5445   with_shared_cxx=$withval
5446 else
5447   with_shared_cxx=no
5448 fi;
5449 echo "$as_me:5449: result: $with_shared_cxx" >&5
5450 echo "${ECHO_T}$with_shared_cxx" >&6
5451 fi
5452 fi
5453
5454 ###############################################################################
5455
5456 echo "$as_me:5456: checking for specified models" >&5
5457 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5458 test -z "$cf_list_models" && cf_list_models=normal
5459 test "$with_libtool" != "no" && cf_list_models=libtool
5460 echo "$as_me:5460: result: $cf_list_models" >&5
5461 echo "${ECHO_T}$cf_list_models" >&6
5462
5463 ### Use the first model as the default, and save its suffix for use in building
5464 ### up test-applications.
5465 echo "$as_me:5465: checking for default model" >&5
5466 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5467 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5468 echo "$as_me:5468: result: $DFT_LWR_MODEL" >&5
5469 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5470
5471 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5472
5473 TICS_NAME=tic
5474
5475 TINFO_NAME=tinfo
5476
5477 LIB_NAME=ncurses
5478
5479 LIB_DIR=../lib
5480 LIB_2ND=../../lib
5481
5482 echo "$as_me:5482: checking if you want to have a library-prefix" >&5
5483 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5484
5485 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5486 if test "${with_lib_prefix+set}" = set; then
5487   withval="$with_lib_prefix"
5488   with_lib_prefix=$withval
5489 else
5490   with_lib_prefix=auto
5491 fi;
5492 echo "$as_me:5492: result: $with_lib_prefix" >&5
5493 echo "${ECHO_T}$with_lib_prefix" >&6
5494
5495 if test $with_lib_prefix = auto
5496 then
5497
5498         case $cf_cv_system_name in
5499         (OS/2*|os2*)
5500                 if test "$DFT_LWR_MODEL" = libtool; then
5501                         LIB_PREFIX='lib'
5502                 else
5503                         LIB_PREFIX=''
5504                 fi
5505                 ;;
5506         (*-msvc*)
5507                 LIB_PREFIX=''
5508                 ;;
5509         (*)     LIB_PREFIX='lib'
5510                 ;;
5511         esac
5512 cf_prefix=$LIB_PREFIX
5513
5514 elif test $with_lib_prefix = no
5515 then
5516         LIB_PREFIX=
5517 else
5518         LIB_PREFIX=$with_lib_prefix
5519 fi
5520
5521 LIB_SUFFIX=
5522
5523         echo "$as_me:5523: checking for PATH separator" >&5
5524 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5525         case $cf_cv_system_name in
5526         (os2*)  PATH_SEPARATOR=';'  ;;
5527         (*)     ${PATH_SEPARATOR:=':'}  ;;
5528         esac
5529
5530         echo "$as_me:5530: result: $PATH_SEPARATOR" >&5
5531 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5532
5533 ###############################################################################
5534
5535 echo "$as_me:5535: checking if you want to build a separate terminfo library" >&5
5536 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5537
5538 # Check whether --with-termlib or --without-termlib was given.
5539 if test "${with_termlib+set}" = set; then
5540   withval="$with_termlib"
5541   with_termlib=$withval
5542 else
5543   with_termlib=no
5544 fi;
5545 echo "$as_me:5545: result: $with_termlib" >&5
5546 echo "${ECHO_T}$with_termlib" >&6
5547
5548 echo "$as_me:5548: checking if you want to build a separate tic library" >&5
5549 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5550
5551 # Check whether --with-ticlib or --without-ticlib was given.
5552 if test "${with_ticlib+set}" = set; then
5553   withval="$with_ticlib"
5554   with_ticlib=$withval
5555 else
5556   with_ticlib=no
5557 fi;
5558 echo "$as_me:5558: result: $with_ticlib" >&5
5559 echo "${ECHO_T}$with_ticlib" >&6
5560
5561 if test X"$CC_G_OPT" = X"" ; then
5562         CC_G_OPT='-g'
5563         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5564 fi
5565
5566 if test X"$CXX_G_OPT" = X"" ; then
5567         CXX_G_OPT='-g'
5568         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5569 fi
5570
5571 echo "$as_me:5571: checking for default loader flags" >&5
5572 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5573 case $DFT_LWR_MODEL in
5574 (libtool) LD_MODEL=''   ;;
5575 (normal)  LD_MODEL=''   ;;
5576 (debug)   LD_MODEL=$CC_G_OPT ;;
5577 (profile) LD_MODEL='-pg';;
5578 (shared)  LD_MODEL=''   ;;
5579 esac
5580 echo "$as_me:5580: result: $LD_MODEL" >&5
5581 echo "${ECHO_T}$LD_MODEL" >&6
5582
5583 case $DFT_LWR_MODEL in
5584 (shared)
5585
5586 echo "$as_me:5586: checking if rpath option should be used" >&5
5587 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5588
5589 # Check whether --enable-rpath or --disable-rpath was given.
5590 if test "${enable_rpath+set}" = set; then
5591   enableval="$enable_rpath"
5592   cf_cv_enable_rpath=$enableval
5593 else
5594   cf_cv_enable_rpath=no
5595 fi;
5596 echo "$as_me:5596: result: $cf_cv_enable_rpath" >&5
5597 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5598
5599 echo "$as_me:5599: checking if shared libraries should be relinked during install" >&5
5600 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5601
5602 # Check whether --enable-relink or --disable-relink was given.
5603 if test "${enable_relink+set}" = set; then
5604   enableval="$enable_relink"
5605   cf_cv_do_relink=$enableval
5606 else
5607   cf_cv_do_relink=yes
5608 fi;
5609 echo "$as_me:5609: result: $cf_cv_do_relink" >&5
5610 echo "${ECHO_T}$cf_cv_do_relink" >&6
5611         ;;
5612 esac
5613
5614 # we will build libraries one-level down.
5615 rel_builddir=..
5616
5617 LD_RPATH_OPT=
5618 if test "x$cf_cv_enable_rpath" != xno
5619 then
5620         echo "$as_me:5620: checking for an rpath option" >&5
5621 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5622         case $cf_cv_system_name in
5623         (irix*)
5624                 if test "$GCC" = yes; then
5625                         LD_RPATH_OPT="-Wl,-rpath,"
5626                 else
5627                         LD_RPATH_OPT="-rpath "
5628                 fi
5629                 ;;
5630         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5631                 LD_RPATH_OPT="-Wl,-rpath,"
5632                 ;;
5633         (openbsd[2-9].*|mirbsd*)
5634                 LD_RPATH_OPT="-Wl,-rpath,"
5635                 ;;
5636         (dragonfly*)
5637                 LD_RPATH_OPT="-rpath "
5638                 ;;
5639         (netbsd*)
5640                 LD_RPATH_OPT="-Wl,-rpath,"
5641                 ;;
5642         (osf*|mls+*)
5643                 LD_RPATH_OPT="-rpath "
5644                 ;;
5645         (solaris2*)
5646                 LD_RPATH_OPT="-R"
5647                 ;;
5648         (*)
5649                 ;;
5650         esac
5651         echo "$as_me:5651: result: $LD_RPATH_OPT" >&5
5652 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5653
5654         case "x$LD_RPATH_OPT" in
5655         (x-R*)
5656                 echo "$as_me:5656: checking if we need a space after rpath option" >&5
5657 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5658                 cf_save_LIBS="$LIBS"
5659
5660 cf_add_libs="$LIBS"
5661 # reverse order
5662 cf_add_0lib=
5663 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5664 # filter duplicates
5665 for cf_add_1lib in $cf_add_0lib; do
5666         for cf_add_2lib in $cf_add_libs; do
5667                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5668                         cf_add_1lib=
5669                         break
5670                 fi
5671         done
5672         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5673 done
5674 LIBS="$cf_add_libs"
5675
5676                 cat >conftest.$ac_ext <<_ACEOF
5677 #line 5677 "configure"
5678 #include "confdefs.h"
5679
5680 int
5681 main (void)
5682 {
5683
5684   ;
5685   return 0;
5686 }
5687 _ACEOF
5688 rm -f conftest.$ac_objext conftest$ac_exeext
5689 if { (eval echo "$as_me:5689: \"$ac_link\"") >&5
5690   (eval $ac_link) 2>&5
5691   ac_status=$?
5692   echo "$as_me:5692: \$? = $ac_status" >&5
5693   (exit $ac_status); } &&
5694          { ac_try='test -s conftest$ac_exeext'
5695   { (eval echo "$as_me:5695: \"$ac_try\"") >&5
5696   (eval $ac_try) 2>&5
5697   ac_status=$?
5698   echo "$as_me:5698: \$? = $ac_status" >&5
5699   (exit $ac_status); }; }; then
5700   cf_rpath_space=no
5701 else
5702   echo "$as_me: failed program was:" >&5
5703 cat conftest.$ac_ext >&5
5704 cf_rpath_space=yes
5705 fi
5706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5707                 LIBS="$cf_save_LIBS"
5708                 echo "$as_me:5708: result: $cf_rpath_space" >&5
5709 echo "${ECHO_T}$cf_rpath_space" >&6
5710                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5711                 ;;
5712         esac
5713 fi
5714
5715         RM_SHARED_OPTS=
5716         LOCAL_LDFLAGS=
5717         LOCAL_LDFLAGS2=
5718         LD_SHARED_OPTS=
5719         INSTALL_LIB="-m 644"
5720         : ${rel_builddir:=.}
5721
5722         shlibdir=$libdir
5723
5724         MAKE_DLLS="#"
5725
5726         cf_cv_do_symlinks=no
5727         cf_ld_rpath_opt=
5728         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5729
5730         echo "$as_me:5730: checking if release/abi version should be used for shared libs" >&5
5731 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5732
5733 # Check whether --with-shlib-version or --without-shlib-version was given.
5734 if test "${with_shlib_version+set}" = set; then
5735   withval="$with_shlib_version"
5736   test -z "$withval" && withval=auto
5737         case $withval in
5738         (yes)
5739                 cf_cv_shlib_version=auto
5740                 ;;
5741         (rel|abi|auto)
5742                 cf_cv_shlib_version=$withval
5743                 ;;
5744         (*)
5745                 echo "$as_me:5745: result: $withval" >&5
5746 echo "${ECHO_T}$withval" >&6
5747                 { { echo "$as_me:5747: error: option value must be one of: rel, abi, or auto" >&5
5748 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5749    { (exit 1); exit 1; }; }
5750                 ;;
5751         esac
5752
5753 else
5754   cf_cv_shlib_version=auto
5755 fi;
5756         echo "$as_me:5756: result: $cf_cv_shlib_version" >&5
5757 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5758
5759         cf_cv_rm_so_locs=no
5760         cf_try_cflags=
5761
5762         # Some less-capable ports of gcc support only -fpic
5763         CC_SHARED_OPTS=
5764
5765         cf_try_fPIC=no
5766         if test "$GCC" = yes
5767         then
5768                 cf_try_fPIC=yes
5769         else
5770                 case $cf_cv_system_name in
5771                 (*linux*)       # e.g., PGI compiler
5772                         cf_try_fPIC=yes
5773                         ;;
5774                 esac
5775         fi
5776
5777         if test "$cf_try_fPIC" = yes
5778         then
5779                 echo "$as_me:5779: checking which $CC option to use" >&5
5780 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5781                 cf_save_CFLAGS="$CFLAGS"
5782                 for CC_SHARED_OPTS in -fPIC -fpic ''
5783                 do
5784                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5785                         cat >conftest.$ac_ext <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788 #include <stdio.h>
5789 int
5790 main (void)
5791 {
5792 int x = 1
5793   ;
5794   return 0;
5795 }
5796 _ACEOF
5797 rm -f conftest.$ac_objext
5798 if { (eval echo "$as_me:5798: \"$ac_compile\"") >&5
5799   (eval $ac_compile) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); } &&
5803          { ac_try='test -s conftest.$ac_objext'
5804   { (eval echo "$as_me:5804: \"$ac_try\"") >&5
5805   (eval $ac_try) 2>&5
5806   ac_status=$?
5807   echo "$as_me:5807: \$? = $ac_status" >&5
5808   (exit $ac_status); }; }; then
5809   break
5810 else
5811   echo "$as_me: failed program was:" >&5
5812 cat conftest.$ac_ext >&5
5813 fi
5814 rm -f conftest.$ac_objext conftest.$ac_ext
5815                 done
5816                 echo "$as_me:5816: result: $CC_SHARED_OPTS" >&5
5817 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5818                 CFLAGS="$cf_save_CFLAGS"
5819         fi
5820
5821         cf_cv_shlib_version_infix=no
5822
5823         case $cf_cv_system_name in
5824         (aix4.3-9*|aix[5-7]*)
5825                 if test "$GCC" = yes; then
5826                         CC_SHARED_OPTS='-Wl,-brtl'
5827                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5828                 else
5829                         CC_SHARED_OPTS='-brtl'
5830                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5832                 fi
5833                 ;;
5834         (beos*)
5835                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5836                 ;;
5837         (cygwin*)
5838                 CC_SHARED_OPTS=
5839                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5840                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5841                 cf_cv_shlib_version=cygdll
5842                 cf_cv_shlib_version_infix=cygdll
5843                 shlibdir=$bindir
5844                 MAKE_DLLS=
5845                 cat >mk_shared_lib.sh <<-CF_EOF
5846                 #!$SHELL
5847                 SHARED_LIB=\$1
5848                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5849                 shift
5850                 cat <<-EOF
5851                 Linking shared library
5852                 ** SHARED_LIB \$SHARED_LIB
5853                 ** IMPORT_LIB \$IMPORT_LIB
5854 EOF
5855                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5856 CF_EOF
5857                 chmod +x mk_shared_lib.sh
5858                 ;;
5859         (msys*)
5860                 CC_SHARED_OPTS=
5861                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5862                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5863                 cf_cv_shlib_version=msysdll
5864                 cf_cv_shlib_version_infix=msysdll
5865                 shlibdir=$bindir
5866                 MAKE_DLLS=
5867                 cat >mk_shared_lib.sh <<-CF_EOF
5868                 #!$SHELL
5869                 SHARED_LIB=\$1
5870                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5871                 shift
5872                 cat <<-EOF
5873                 Linking shared library
5874                 ** SHARED_LIB \$SHARED_LIB
5875                 ** IMPORT_LIB \$IMPORT_LIB
5876 EOF
5877                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5878 CF_EOF
5879                 chmod +x mk_shared_lib.sh
5880                 ;;
5881         (darwin*)
5882                 cf_try_cflags="no-cpp-precomp"
5883                 CC_SHARED_OPTS="-dynamic"
5884                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5885                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5886                 cf_cv_shlib_version_infix=yes
5887                 echo "$as_me:5887: checking if ld -search_paths_first works" >&5
5888 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5889 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5890   echo $ECHO_N "(cached) $ECHO_C" >&6
5891 else
5892
5893                         cf_save_LDFLAGS=$LDFLAGS
5894                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5895                         cat >conftest.$ac_ext <<_ACEOF
5896 #line 5896 "configure"
5897 #include "confdefs.h"
5898
5899 int
5900 main (void)
5901 {
5902 int i;
5903   ;
5904   return 0;
5905 }
5906 _ACEOF
5907 rm -f conftest.$ac_objext conftest$ac_exeext
5908 if { (eval echo "$as_me:5908: \"$ac_link\"") >&5
5909   (eval $ac_link) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); } &&
5913          { ac_try='test -s conftest$ac_exeext'
5914   { (eval echo "$as_me:5914: \"$ac_try\"") >&5
5915   (eval $ac_try) 2>&5
5916   ac_status=$?
5917   echo "$as_me:5917: \$? = $ac_status" >&5
5918   (exit $ac_status); }; }; then
5919   cf_cv_ldflags_search_paths_first=yes
5920 else
5921   echo "$as_me: failed program was:" >&5
5922 cat conftest.$ac_ext >&5
5923 cf_cv_ldflags_search_paths_first=no
5924 fi
5925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5926                                 LDFLAGS=$cf_save_LDFLAGS
5927 fi
5928 echo "$as_me:5928: result: $cf_cv_ldflags_search_paths_first" >&5
5929 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5930                 if test $cf_cv_ldflags_search_paths_first = yes; then
5931                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5932                 fi
5933                 ;;
5934         (hpux[7-8]*)
5935                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5936                 if test "$GCC" != yes; then
5937                         CC_SHARED_OPTS='+Z'
5938                 fi
5939                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5940                 INSTALL_LIB="-m 555"
5941                 ;;
5942         (hpux*)
5943                 # (tested with gcc 2.7.2 -- I don't have c89)
5944                 if test "$GCC" = yes; then
5945                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5946                 else
5947                         CC_SHARED_OPTS='+Z'
5948                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5949                 fi
5950                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5951                 # HP-UX shared libraries must be executable, and should be
5952                 # readonly to exploit a quirk in the memory manager.
5953                 INSTALL_LIB="-m 555"
5954                 ;;
5955         (interix*)
5956                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5957                 if test "$cf_cv_shlib_version" = rel; then
5958                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5959                 else
5960                         cf_shared_soname='`basename $@`'
5961                 fi
5962                 CC_SHARED_OPTS=
5963                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5964                 ;;
5965         (irix*)
5966                 if test "$cf_cv_enable_rpath" = yes ; then
5967                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5968                 fi
5969                 # tested with IRIX 5.2 and 'cc'.
5970                 if test "$GCC" != yes; then
5971                         CC_SHARED_OPTS='-KPIC'
5972                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5973                 else
5974                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5975                 fi
5976                 cf_cv_rm_so_locs=yes
5977                 ;;
5978         (linux*|gnu*|k*bsd*-gnu)
5979                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5980                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5981                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5982                 fi
5983                 if test "$cf_cv_enable_rpath" = yes ; then
5984                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5985                 fi
5986
5987         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5988         if test "$cf_cv_shlib_version" = rel; then
5989                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5990         else
5991                 cf_cv_shared_soname='`basename $@`'
5992         fi
5993
5994                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5995                 ;;
5996         (mingw*msvc*)
5997                 cf_cv_shlib_version=msvcdll
5998                 cf_cv_shlib_version_infix=msvcdll
5999                 shlibdir=$bindir
6000                 MAKE_DLLS=
6001                 if test "$DFT_LWR_MODEL" = "shared" ; then
6002                         LOCAL_LDFLAGS="-link -dll"
6003                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6004                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6005                 fi
6006                 CC_SHARED_OPTS=
6007                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6008                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6009                 cat >mk_shared_lib.sh <<-CF_EOF
6010                 #!$SHELL
6011                 SHARED_LIB=\$1
6012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6013                 shift
6014                 my_ld=\$1
6015                 shift
6016                 cat <<-EOF
6017                 Linking shared library
6018                 ** SHARED LIB \$SHARED_LIB
6019                 ** IMPORT_LIB \$IMPORT_LIB
6020 EOF
6021                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6022                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6023                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6024 CF_EOF
6025                 chmod +x mk_shared_lib.sh
6026                 cat >mk_prog.sh <<-CF_EOF
6027                 #!$SHELL
6028                 shift
6029                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6030                 LD="$LD"
6031                 clopts=()
6032                 ldopts=("/subsystem:console")
6033                 libs=()
6034                 isdll=0
6035                 while test \$# -gt 0; do
6036                         case "\$1" in
6037                                 -link)
6038                                         # ignore -link argument
6039                                         ;;
6040                                 -M[TD] | -M[TD]d)
6041                                         # ignore runtime-library option
6042                                         ;;
6043                                 -dll)
6044                                         isdll=1
6045                                         ;;
6046                                 -W* | -w*)
6047                                         # ignore warnings
6048                                         ;;
6049                                 -D*)
6050                                         clopts+=("\$1")
6051                                         ;;
6052                                 -I*)
6053                                         clopts+=("\$1")
6054                                         ;;
6055                                 -l*)
6056                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6057                                         ;;
6058                                 -L*)
6059                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6060                                         ;;
6061                                 *.obj | *.o)
6062                                         ldopts+=("\$1")
6063                                         ;;
6064                                 -Wl,*)
6065                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6066                                                 ldopts+=("\${linkarg}")
6067                                         done
6068                                         ;;
6069                                 *.lib)
6070                                         ldopts+=("\$1")
6071                                         ;;
6072                                 -o)
6073                                         shift
6074                                         ldopts+=("-out:\$1")
6075                                         ;;
6076                                 *)
6077                                         clopts+=("\$1")
6078                                         ldopts+=("\$1")
6079                                         ;;
6080                         esac
6081                         shift
6082                 done
6083                 if [ "\$isdll" -ne 0 ]; then
6084                         for lib in \${libs[*]}; do
6085                                 ldopts+=("\$lib.dll.lib")
6086                         done
6087                 else
6088                         for lib in \${libs[*]}; do
6089                                 ldopts+=("\$lib.lib")
6090                         done
6091                 fi
6092                 cat <<-EOF
6093                 Creating program
6094                 ** ld options:   "\${ldopts[@]}"
6095 EOF
6096                 exec \$LD \${ldopts[@]}
6097 CF_EOF
6098                 chmod +x mk_prog.sh
6099                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6100                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6101                 ;;
6102         (mingw*)
6103                 cf_cv_shlib_version=mingw
6104                 cf_cv_shlib_version_infix=mingw
6105                 shlibdir=$bindir
6106                 MAKE_DLLS=
6107                 if test "$DFT_LWR_MODEL" = "shared" ; then
6108                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6109                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6110                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6111                 fi
6112                 CC_SHARED_OPTS=
6113                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6114                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6115                 cat >mk_shared_lib.sh <<-CF_EOF
6116                 #!$SHELL
6117                 SHARED_LIB=\$1
6118                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6119                 shift
6120                 cat <<-EOF
6121                 Linking shared library
6122                 ** SHARED_LIB \$SHARED_LIB
6123                 ** IMPORT_LIB \$IMPORT_LIB
6124 EOF
6125                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6126 CF_EOF
6127                 chmod +x mk_shared_lib.sh
6128                 ;;
6129         (openbsd[2-9].*|mirbsd*)
6130                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6131                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6132                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6133                 fi
6134                 if test "$cf_cv_enable_rpath" = yes ; then
6135                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6136                 fi
6137                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6138
6139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6140         if test "$cf_cv_shlib_version" = rel; then
6141                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6142         else
6143                 cf_cv_shared_soname='`basename $@`'
6144         fi
6145
6146                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6147                 ;;
6148         (nto-qnx*|openbsd*|freebsd[12].*)
6149                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6150                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6151                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6152                 ;;
6153         (dragonfly*|freebsd*)
6154                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6155                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6156                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6157                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6158                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6159                 fi
6160
6161         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6162         if test "$cf_cv_shlib_version" = rel; then
6163                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6164         else
6165                 cf_cv_shared_soname='`basename $@`'
6166         fi
6167
6168                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6169                 ;;
6170         (netbsd*)
6171                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6172                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6173                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6174                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6175                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6176                         if test "$cf_cv_shlib_version" = auto; then
6177                         if test -f /usr/libexec/ld.elf_so; then
6178                                 cf_cv_shlib_version=abi
6179                         else
6180                                 cf_cv_shlib_version=rel
6181                         fi
6182                         fi
6183
6184         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6185         if test "$cf_cv_shlib_version" = rel; then
6186                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6187         else
6188                 cf_cv_shared_soname='`basename $@`'
6189         fi
6190
6191                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6192                 else
6193                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6194                 fi
6195                 ;;
6196         (osf*|mls+*)
6197                 # tested with OSF/1 V3.2 and 'cc'
6198                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6199                 # link with shared libs).
6200                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6201                 case $host_os in
6202                 (osf4*)
6203                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6204                         ;;
6205                 esac
6206                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6207                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6208                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6209                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6210                 fi
6211                 cf_cv_rm_so_locs=yes
6212                 ;;
6213         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6214                 # tested with osr5.0.5
6215                 if test "$GCC" != yes; then
6216                         CC_SHARED_OPTS='-belf -KPIC'
6217                 fi
6218                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6219                 if test "$cf_cv_enable_rpath" = yes ; then
6220                         # only way is to set LD_RUN_PATH but no switch for it
6221                         RUN_PATH=$libdir
6222                 fi
6223                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6224                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6225                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6226                 ;;
6227         (sunos4*)
6228                 # tested with SunOS 4.1.1 and gcc 2.7.0
6229                 if test "$GCC" != yes; then
6230                         CC_SHARED_OPTS='-KPIC'
6231                 fi
6232                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6233                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6234                 ;;
6235         (solaris2*)
6236                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6237                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6238                 if test "$DFT_LWR_MODEL" = "shared" ; then
6239                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6240                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6241                 fi
6242                 if test "$cf_cv_enable_rpath" = yes ; then
6243                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6244                 fi
6245
6246         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6247         if test "$cf_cv_shlib_version" = rel; then
6248                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6249         else
6250                 cf_cv_shared_soname='`basename $@`'
6251         fi
6252
6253                 if test "$GCC" != yes; then
6254                         cf_save_CFLAGS="$CFLAGS"
6255                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6256                         do
6257                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6258                                 cat >conftest.$ac_ext <<_ACEOF
6259 #line 6259 "configure"
6260 #include "confdefs.h"
6261 #include <stdio.h>
6262 int
6263 main (void)
6264 {
6265 printf("Hello\n");
6266   ;
6267   return 0;
6268 }
6269 _ACEOF
6270 rm -f conftest.$ac_objext
6271 if { (eval echo "$as_me:6271: \"$ac_compile\"") >&5
6272   (eval $ac_compile) 2>&5
6273   ac_status=$?
6274   echo "$as_me:6274: \$? = $ac_status" >&5
6275   (exit $ac_status); } &&
6276          { ac_try='test -s conftest.$ac_objext'
6277   { (eval echo "$as_me:6277: \"$ac_try\"") >&5
6278   (eval $ac_try) 2>&5
6279   ac_status=$?
6280   echo "$as_me:6280: \$? = $ac_status" >&5
6281   (exit $ac_status); }; }; then
6282   break
6283 else
6284   echo "$as_me: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6286 fi
6287 rm -f conftest.$ac_objext conftest.$ac_ext
6288                         done
6289                         CFLAGS="$cf_save_CFLAGS"
6290                         CC_SHARED_OPTS=$cf_shared_opts
6291                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6292                 else
6293                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6294                 fi
6295                 ;;
6296         (sysv5uw7*|unix_sv*)
6297                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6298                 if test "$GCC" != yes; then
6299                         CC_SHARED_OPTS='-KPIC'
6300                 fi
6301                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6302                 ;;
6303         (*)
6304                 CC_SHARED_OPTS='unknown'
6305                 MK_SHARED_LIB='echo unknown'
6306                 ;;
6307         esac
6308
6309         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6310         case "$cf_cv_shlib_version" in
6311         (rel|abi)
6312                 case "$MK_SHARED_LIB" in
6313                 (*'-o $@')
6314                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6315                         ;;
6316                 (*)
6317                         { echo "$as_me:6317: WARNING: ignored --with-shlib-version" >&5
6318 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6319                         ;;
6320                 esac
6321                 ;;
6322         esac
6323
6324         if test -n "$cf_try_cflags"
6325         then
6326 cat > conftest.$ac_ext <<EOF
6327 #line 6327 "${as_me:-configure}"
6328 #include <stdio.h>
6329 int main(int argc, char *argv[])
6330 {
6331         printf("hello\n");
6332         return (argv[argc-1] == 0) ;
6333 }
6334 EOF
6335                 cf_save_CFLAGS="$CFLAGS"
6336                 for cf_opt in $cf_try_cflags
6337                 do
6338                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6339                         echo "$as_me:6339: checking if CFLAGS option -$cf_opt works" >&5
6340 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6341                         if { (eval echo "$as_me:6341: \"$ac_compile\"") >&5
6342   (eval $ac_compile) 2>&5
6343   ac_status=$?
6344   echo "$as_me:6344: \$? = $ac_status" >&5
6345   (exit $ac_status); }; then
6346                                 echo "$as_me:6346: result: yes" >&5
6347 echo "${ECHO_T}yes" >&6
6348                                 cf_save_CFLAGS="$CFLAGS"
6349                         else
6350                                 echo "$as_me:6350: result: no" >&5
6351 echo "${ECHO_T}no" >&6
6352                         fi
6353                 done
6354                 CFLAGS="$cf_save_CFLAGS"
6355         fi
6356
6357         # RPATH_LIST is a colon-separated list of directories
6358         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6359         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6360
6361         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6362
6363         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6364
6365 echo "${as_me:-configure}:6365: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6366
6367         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6368
6369 echo "${as_me:-configure}:6369: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6370
6371 for model in $cf_list_models; do
6372         case $model in
6373         (libtool)
6374
6375 echo "$as_me:6375: checking for additional libtool options" >&5
6376 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6377
6378 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6379 if test "${with_libtool_opts+set}" = set; then
6380   withval="$with_libtool_opts"
6381   with_libtool_opts=$withval
6382 else
6383   with_libtool_opts=no
6384 fi;
6385 echo "$as_me:6385: result: $with_libtool_opts" >&5
6386 echo "${ECHO_T}$with_libtool_opts" >&6
6387
6388 case .$with_libtool_opts in
6389 (.yes|.no|.)
6390         ;;
6391 (*)
6392         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6393         ;;
6394 esac
6395
6396 echo "$as_me:6396: checking if exported-symbols file should be used" >&5
6397 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6398
6399 # Check whether --with-export-syms or --without-export-syms was given.
6400 if test "${with_export_syms+set}" = set; then
6401   withval="$with_export_syms"
6402   with_export_syms=$withval
6403 else
6404   with_export_syms=no
6405 fi;
6406 if test "x$with_export_syms" = xyes
6407 then
6408         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6409
6410 fi
6411 echo "$as_me:6411: result: $with_export_syms" >&5
6412 echo "${ECHO_T}$with_export_syms" >&6
6413 if test "x$with_export_syms" != xno
6414 then
6415         EXPORT_SYMS="-export-symbols $with_export_syms"
6416
6417 fi
6418
6419                 ;;
6420         (shared)
6421                 if test "$CC_SHARED_OPTS" = "unknown"; then
6422                         { { echo "$as_me:6422: error: Shared libraries are not supported in this version" >&5
6423 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6424    { (exit 1); exit 1; }; }
6425                 fi
6426                 # workaround for inept transition to PIE vs PIC...
6427                 echo "$as_me:6427: checking if current CFLAGS link properly" >&5
6428 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6429                 cat >conftest.$ac_ext <<_ACEOF
6430 #line 6430 "configure"
6431 #include "confdefs.h"
6432 #include <stdio.h>
6433 int
6434 main (void)
6435 {
6436 printf("Hello work\n");
6437   ;
6438   return 0;
6439 }
6440 _ACEOF
6441 rm -f conftest.$ac_objext conftest$ac_exeext
6442 if { (eval echo "$as_me:6442: \"$ac_link\"") >&5
6443   (eval $ac_link) 2>&5
6444   ac_status=$?
6445   echo "$as_me:6445: \$? = $ac_status" >&5
6446   (exit $ac_status); } &&
6447          { ac_try='test -s conftest$ac_exeext'
6448   { (eval echo "$as_me:6448: \"$ac_try\"") >&5
6449   (eval $ac_try) 2>&5
6450   ac_status=$?
6451   echo "$as_me:6451: \$? = $ac_status" >&5
6452   (exit $ac_status); }; }; then
6453   cf_cflags_work=yes
6454 else
6455   echo "$as_me: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6457 cf_cflags_work=no
6458 fi
6459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6460                 echo "$as_me:6460: result: $cf_cflags_work" >&5
6461 echo "${ECHO_T}$cf_cflags_work" >&6
6462                 if test "$cf_cflags_work" = no
6463                 then
6464                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6465
6466 echo "${as_me:-configure}:6466: testing try to work around by appending shared-options ..." 1>&5
6467
6468                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6469                 fi
6470
6471 echo "$as_me:6471: checking if versioned-symbols file should be used" >&5
6472 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6473
6474 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6475 if test "${with_versioned_syms+set}" = set; then
6476   withval="$with_versioned_syms"
6477   with_versioned_syms=$withval
6478 else
6479   with_versioned_syms=no
6480 fi;
6481 case "x$with_versioned_syms" in
6482 (xyes)
6483         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6484
6485         ;;
6486 (xno)
6487         ;;
6488 (x/*)
6489         test -f "$with_versioned_syms" || { { echo "$as_me:6489: error: expected a filename: $with_versioned_syms" >&5
6490 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6491    { (exit 1); exit 1; }; }
6492         ;;
6493 (*)
6494         test -f "$with_versioned_syms" || { { echo "$as_me:6494: error: expected a filename: $with_versioned_syms" >&5
6495 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6496    { (exit 1); exit 1; }; }
6497         with_versioned_syms=`pwd`/"$with_versioned_syms"
6498         ;;
6499 esac
6500 echo "$as_me:6500: result: $with_versioned_syms" >&5
6501 echo "${ECHO_T}$with_versioned_syms" >&6
6502
6503 RESULTING_SYMS=
6504 VERSIONED_SYMS=
6505 WILDCARD_SYMS=
6506
6507 if test "x$with_versioned_syms" != xno
6508 then
6509         RESULTING_SYMS=$with_versioned_syms
6510         case "x$MK_SHARED_LIB" in
6511         (*-Wl,*)
6512                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6513                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6514                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6515
6516 echo "${as_me:-configure}:6516: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6517
6518                 ;;
6519         (*-dy\ *)
6520                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6521                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6522                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6523
6524 echo "${as_me:-configure}:6524: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6525
6526                 ;;
6527         (*)
6528                 { echo "$as_me:6528: WARNING: this system does not support versioned-symbols" >&5
6529 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6530                 ;;
6531         esac
6532
6533         # Linux ld can selectively override scope, e.g., of symbols beginning with
6534         # "_" by first declaring some as global, and then using a wildcard to
6535         # declare the others as local.  Some other loaders cannot do this.  Check
6536         # by constructing a (very) simple shared library and inspecting its
6537         # symbols.
6538         if test "x$VERSIONED_SYMS" != "x"
6539         then
6540                 echo "$as_me:6540: checking if wildcards can be used to selectively omit symbols" >&5
6541 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6542                 WILDCARD_SYMS=no
6543
6544                 # make sources
6545                 rm -f conftest.*
6546
6547                 cat >conftest.ver <<EOF
6548 module_1.0 {
6549 global:
6550         globalf1;
6551 local:
6552         localf1;
6553 };
6554 module_2.0 {
6555 global:
6556         globalf2;
6557 local:
6558         localf2;
6559         _*;
6560 } module_1.0;
6561 submodule_1.0 {
6562 global:
6563         subglobalf1;
6564         _ismissing;
6565 local:
6566         sublocalf1;
6567 };
6568 submodule_2.0 {
6569 global:
6570         subglobalf2;
6571 local:
6572         sublocalf2;
6573         _*;
6574 } submodule_1.0;
6575 EOF
6576                 cat >conftest.$ac_ext <<EOF
6577 #line 6577 "configure"
6578 int     _ismissing(void) { return 1; }
6579 int     _localf1(void) { return 1; }
6580 int     _localf2(void) { return 2; }
6581 int     globalf1(void) { return 1; }
6582 int     globalf2(void) { return 2; }
6583 int     _sublocalf1(void) { return 1; }
6584 int     _sublocalf2(void) { return 2; }
6585 int     subglobalf1(void) { return 1; }
6586 int     subglobalf2(void) { return 2; }
6587 EOF
6588                 cat >conftest.mk <<EOF
6589 CC=${CC}
6590 CFLAGS=${CFLAGS}
6591 CPPFLAGS=${CPPFLAGS}
6592 LDFLAGS=${LDFLAGS}
6593 LIBS=${LIBS}
6594 VERSIONED_SYMS=${VERSIONED_SYMS}
6595 RESULTING_SYMS=conftest.ver
6596 MK_SHARED_LIB=${MK_SHARED_LIB}
6597 conftest.so: conftest.$ac_cv_objext
6598                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6599 EOF
6600
6601                 # compile source, make library
6602                 if make -f conftest.mk 2>&5 >/dev/null
6603                 then
6604                         # test for missing symbol in either Data or Text section
6605                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6606                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6607                 fi
6608                 echo "$as_me:6608: result: $WILDCARD_SYMS" >&5
6609 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6610                 rm -f conftest.*
6611         fi
6612 fi
6613
6614                 ;;
6615         esac
6616 done
6617
6618 ### Checks for special libraries, must be done up-front.
6619 SHLIB_LIST=""
6620
6621 echo "$as_me:6621: checking if you want to link with the GPM mouse library" >&5
6622 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6623
6624 # Check whether --with-gpm or --without-gpm was given.
6625 if test "${with_gpm+set}" = set; then
6626   withval="$with_gpm"
6627   with_gpm=$withval
6628 else
6629   with_gpm=maybe
6630 fi;
6631 echo "$as_me:6631: result: $with_gpm" >&5
6632 echo "${ECHO_T}$with_gpm" >&6
6633
6634 if test "$with_gpm" != no ; then
6635         echo "$as_me:6635: checking for gpm.h" >&5
6636 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6637 if test "${ac_cv_header_gpm_h+set}" = set; then
6638   echo $ECHO_N "(cached) $ECHO_C" >&6
6639 else
6640   cat >conftest.$ac_ext <<_ACEOF
6641 #line 6641 "configure"
6642 #include "confdefs.h"
6643 #include <gpm.h>
6644 _ACEOF
6645 if { (eval echo "$as_me:6645: \"$ac_cpp conftest.$ac_ext\"") >&5
6646   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6647   ac_status=$?
6648   egrep -v '^ *\+' conftest.er1 >conftest.err
6649   rm -f conftest.er1
6650   cat conftest.err >&5
6651   echo "$as_me:6651: \$? = $ac_status" >&5
6652   (exit $ac_status); } >/dev/null; then
6653   if test -s conftest.err; then
6654     ac_cpp_err=$ac_c_preproc_warn_flag
6655   else
6656     ac_cpp_err=
6657   fi
6658 else
6659   ac_cpp_err=yes
6660 fi
6661 if test -z "$ac_cpp_err"; then
6662   ac_cv_header_gpm_h=yes
6663 else
6664   echo "$as_me: failed program was:" >&5
6665   cat conftest.$ac_ext >&5
6666   ac_cv_header_gpm_h=no
6667 fi
6668 rm -f conftest.err conftest.$ac_ext
6669 fi
6670 echo "$as_me:6670: result: $ac_cv_header_gpm_h" >&5
6671 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6672 if test $ac_cv_header_gpm_h = yes; then
6673
6674 cat >>confdefs.h <<\EOF
6675 #define HAVE_GPM_H 1
6676 EOF
6677
6678                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6679                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6680
6681 echo "${as_me:-configure}:6681: testing assuming we really have GPM library ..." 1>&5
6682
6683 cat >>confdefs.h <<\EOF
6684 #define HAVE_LIBGPM 1
6685 EOF
6686
6687                         with_gpm=yes
6688                 else
6689                         echo "$as_me:6689: checking for Gpm_Open in -lgpm" >&5
6690 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6691 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6692   echo $ECHO_N "(cached) $ECHO_C" >&6
6693 else
6694   ac_check_lib_save_LIBS=$LIBS
6695 LIBS="-lgpm  $LIBS"
6696 cat >conftest.$ac_ext <<_ACEOF
6697 #line 6697 "configure"
6698 #include "confdefs.h"
6699
6700 /* Override any gcc2 internal prototype to avoid an error.  */
6701 #ifdef __cplusplus
6702 extern "C"
6703 #endif
6704 /* We use char because int might match the return type of a gcc2
6705    builtin and then its argument prototype would still apply.  */
6706 char Gpm_Open ();
6707 int
6708 main (void)
6709 {
6710 Gpm_Open ();
6711   ;
6712   return 0;
6713 }
6714 _ACEOF
6715 rm -f conftest.$ac_objext conftest$ac_exeext
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717   (eval $ac_link) 2>&5
6718   ac_status=$?
6719   echo "$as_me:6719: \$? = $ac_status" >&5
6720   (exit $ac_status); } &&
6721          { ac_try='test -s conftest$ac_exeext'
6722   { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6723   (eval $ac_try) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit $ac_status); }; }; then
6727   ac_cv_lib_gpm_Gpm_Open=yes
6728 else
6729   echo "$as_me: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 ac_cv_lib_gpm_Gpm_Open=no
6732 fi
6733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6734 LIBS=$ac_check_lib_save_LIBS
6735 fi
6736 echo "$as_me:6736: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6737 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6738 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6739   with_gpm=yes
6740 else
6741
6742                                 if test "$with_gpm" = maybe; then
6743                                         { echo "$as_me:6743: WARNING: Cannot link with GPM library" >&5
6744 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6745                                         with_gpm=no
6746                                 else
6747                                         { { echo "$as_me:6747: error: Cannot link with GPM library" >&5
6748 echo "$as_me: error: Cannot link with GPM library" >&2;}
6749    { (exit 1); exit 1; }; }
6750                                 fi
6751
6752 fi
6753
6754                 fi
6755
6756 else
6757
6758                 test "$with_gpm" != maybe && { echo "$as_me:6758: WARNING: Cannot find GPM header" >&5
6759 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6760                 with_gpm=no
6761
6762 fi
6763
6764 fi
6765
6766 if test "$with_gpm" != no ; then
6767         echo "$as_me:6767: checking if you want to load GPM dynamically" >&5
6768 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6769
6770 # Check whether --with-dlsym or --without-dlsym was given.
6771 if test "${with_dlsym+set}" = set; then
6772   withval="$with_dlsym"
6773   with_dlsym=$withval
6774 else
6775   with_dlsym=yes
6776 fi;
6777         echo "$as_me:6777: result: $with_dlsym" >&5
6778 echo "${ECHO_T}$with_dlsym" >&6
6779         if test "x$with_dlsym" = xyes ; then
6780
6781 cf_have_dlsym=no
6782 echo "$as_me:6782: checking for dlsym" >&5
6783 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6784 if test "${ac_cv_func_dlsym+set}" = set; then
6785   echo $ECHO_N "(cached) $ECHO_C" >&6
6786 else
6787   cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6790 #define dlsym autoconf_temporary
6791 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6792 #undef dlsym
6793
6794 #ifdef __cplusplus
6795 extern "C"
6796 #endif
6797
6798 /* We use char because int might match the return type of a gcc2
6799    builtin and then its argument prototype would still apply.  */
6800 char dlsym (void);
6801
6802 int
6803 main (void)
6804 {
6805
6806 /* The GNU C library defines stubs for functions which it implements
6807     to always fail with ENOSYS.  Some functions are actually named
6808     something starting with __ and the normal name is an alias.  */
6809 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6810 #error found stub for dlsym
6811 #endif
6812
6813         return dlsym ();
6814   ;
6815   return 0;
6816 }
6817 _ACEOF
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:6819: \"$ac_link\"") >&5
6820   (eval $ac_link) 2>&5
6821   ac_status=$?
6822   echo "$as_me:6822: \$? = $ac_status" >&5
6823   (exit $ac_status); } &&
6824          { ac_try='test -s conftest$ac_exeext'
6825   { (eval echo "$as_me:6825: \"$ac_try\"") >&5
6826   (eval $ac_try) 2>&5
6827   ac_status=$?
6828   echo "$as_me:6828: \$? = $ac_status" >&5
6829   (exit $ac_status); }; }; then
6830   ac_cv_func_dlsym=yes
6831 else
6832   echo "$as_me: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6834 ac_cv_func_dlsym=no
6835 fi
6836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6837 fi
6838 echo "$as_me:6838: result: $ac_cv_func_dlsym" >&5
6839 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6840 if test $ac_cv_func_dlsym = yes; then
6841   cf_have_dlsym=yes
6842 else
6843
6844 cf_have_libdl=no
6845 echo "$as_me:6845: checking for dlsym in -ldl" >&5
6846 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6847 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6848   echo $ECHO_N "(cached) $ECHO_C" >&6
6849 else
6850   ac_check_lib_save_LIBS=$LIBS
6851 LIBS="-ldl  $LIBS"
6852 cat >conftest.$ac_ext <<_ACEOF
6853 #line 6853 "configure"
6854 #include "confdefs.h"
6855
6856 /* Override any gcc2 internal prototype to avoid an error.  */
6857 #ifdef __cplusplus
6858 extern "C"
6859 #endif
6860 /* We use char because int might match the return type of a gcc2
6861    builtin and then its argument prototype would still apply.  */
6862 char dlsym ();
6863 int
6864 main (void)
6865 {
6866 dlsym ();
6867   ;
6868   return 0;
6869 }
6870 _ACEOF
6871 rm -f conftest.$ac_objext conftest$ac_exeext
6872 if { (eval echo "$as_me:6872: \"$ac_link\"") >&5
6873   (eval $ac_link) 2>&5
6874   ac_status=$?
6875   echo "$as_me:6875: \$? = $ac_status" >&5
6876   (exit $ac_status); } &&
6877          { ac_try='test -s conftest$ac_exeext'
6878   { (eval echo "$as_me:6878: \"$ac_try\"") >&5
6879   (eval $ac_try) 2>&5
6880   ac_status=$?
6881   echo "$as_me:6881: \$? = $ac_status" >&5
6882   (exit $ac_status); }; }; then
6883   ac_cv_lib_dl_dlsym=yes
6884 else
6885   echo "$as_me: failed program was:" >&5
6886 cat conftest.$ac_ext >&5
6887 ac_cv_lib_dl_dlsym=no
6888 fi
6889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6890 LIBS=$ac_check_lib_save_LIBS
6891 fi
6892 echo "$as_me:6892: result: $ac_cv_lib_dl_dlsym" >&5
6893 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6894 if test $ac_cv_lib_dl_dlsym = yes; then
6895
6896         cf_have_dlsym=yes
6897         cf_have_libdl=yes
6898 fi
6899
6900 fi
6901
6902 if test "$cf_have_dlsym" = yes ; then
6903         test "$cf_have_libdl" = yes && {
6904 cf_add_libs="$LIBS"
6905 # reverse order
6906 cf_add_0lib=
6907 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6908 # filter duplicates
6909 for cf_add_1lib in $cf_add_0lib; do
6910         for cf_add_2lib in $cf_add_libs; do
6911                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6912                         cf_add_1lib=
6913                         break
6914                 fi
6915         done
6916         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6917 done
6918 LIBS="$cf_add_libs"
6919  }
6920
6921         echo "$as_me:6921: checking whether able to link to dl*() functions" >&5
6922 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6923         cat >conftest.$ac_ext <<_ACEOF
6924 #line 6924 "configure"
6925 #include "confdefs.h"
6926 #include <dlfcn.h>
6927 int
6928 main (void)
6929 {
6930
6931                 void *obj;
6932                 if ((obj = dlopen("filename", 0)) != 0) {
6933                         if (dlsym(obj, "symbolname") == 0) {
6934                         dlclose(obj);
6935                         }
6936                 }
6937   ;
6938   return 0;
6939 }
6940 _ACEOF
6941 rm -f conftest.$ac_objext conftest$ac_exeext
6942 if { (eval echo "$as_me:6942: \"$ac_link\"") >&5
6943   (eval $ac_link) 2>&5
6944   ac_status=$?
6945   echo "$as_me:6945: \$? = $ac_status" >&5
6946   (exit $ac_status); } &&
6947          { ac_try='test -s conftest$ac_exeext'
6948   { (eval echo "$as_me:6948: \"$ac_try\"") >&5
6949   (eval $ac_try) 2>&5
6950   ac_status=$?
6951   echo "$as_me:6951: \$? = $ac_status" >&5
6952   (exit $ac_status); }; }; then
6953
6954 cat >>confdefs.h <<\EOF
6955 #define HAVE_LIBDL 1
6956 EOF
6957
6958 else
6959   echo "$as_me: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961
6962                 { { echo "$as_me:6962: error: Cannot link test program for libdl" >&5
6963 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6964    { (exit 1); exit 1; }; }
6965 fi
6966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6967         echo "$as_me:6967: result: ok" >&5
6968 echo "${ECHO_T}ok" >&6
6969 else
6970         { { echo "$as_me:6970: error: Cannot find dlsym function" >&5
6971 echo "$as_me: error: Cannot find dlsym function" >&2;}
6972    { (exit 1); exit 1; }; }
6973 fi
6974
6975                 if test "x$with_gpm" != xyes ; then
6976                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6977
6978 echo "${as_me:-configure}:6978: testing assuming soname for gpm is $with_gpm ..." 1>&5
6979
6980                         cf_cv_gpm_soname="$with_gpm"
6981                 else
6982
6983 echo "$as_me:6983: checking for soname of gpm library" >&5
6984 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6985 if test "${cf_cv_gpm_soname+set}" = set; then
6986   echo $ECHO_N "(cached) $ECHO_C" >&6
6987 else
6988
6989 cf_cv_gpm_soname=unknown
6990 if test "$cross_compiling" != yes ; then
6991 cat >conftest.$ac_ext <<CF_EOF
6992 #include <gpm.h>
6993 int main(void)
6994 {
6995 if (Gpm_Open(0,0)) Gpm_Close();
6996         ${cf_cv_main_return:-return}(0);
6997 }
6998 CF_EOF
6999 cf_save_LIBS="$LIBS"
7000
7001 cf_add_libs="$LIBS"
7002 # reverse order
7003 cf_add_0lib=
7004 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7005 # filter duplicates
7006 for cf_add_1lib in $cf_add_0lib; do
7007         for cf_add_2lib in $cf_add_libs; do
7008                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7009                         cf_add_1lib=
7010                         break
7011                 fi
7012         done
7013         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7014 done
7015 LIBS="$cf_add_libs"
7016
7017         if { (eval echo "$as_me:7017: \"$ac_compile\"") >&5
7018   (eval $ac_compile) 2>&5
7019   ac_status=$?
7020   echo "$as_me:7020: \$? = $ac_status" >&5
7021   (exit $ac_status); } ; then
7022                 if { (eval echo "$as_me:7022: \"$ac_link\"") >&5
7023   (eval $ac_link) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); } ; then
7027                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7028                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7029                 fi
7030         fi
7031 rm -rf conftest*
7032 LIBS="$cf_save_LIBS"
7033 fi
7034
7035 fi
7036 echo "$as_me:7036: result: $cf_cv_gpm_soname" >&5
7037 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7038
7039                 fi
7040                 test "$cf_cv_gpm_soname" != "unknown" &&
7041 cat >>confdefs.h <<EOF
7042 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7043 EOF
7044
7045                 SHLIB_LIST="-ldl $SHLIB_LIST"
7046
7047 cf_add_libs="$PRIVATE_LIBS"
7048 # reverse order
7049 cf_add_0lib=
7050 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7051 # filter duplicates
7052 for cf_add_1lib in $cf_add_0lib; do
7053         for cf_add_2lib in $cf_add_libs; do
7054                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7055                         cf_add_1lib=
7056                         break
7057                 fi
7058         done
7059         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7060 done
7061 PRIVATE_LIBS="$cf_add_libs"
7062
7063         else
7064                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7065
7066 cf_add_libs="$TEST_LIBS"
7067 # reverse order
7068 cf_add_0lib=
7069 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7070 # filter duplicates
7071 for cf_add_1lib in $cf_add_0lib; do
7072         for cf_add_2lib in $cf_add_libs; do
7073                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7074                         cf_add_1lib=
7075                         break
7076                 fi
7077         done
7078         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7079 done
7080 TEST_LIBS="$cf_add_libs"
7081
7082 cf_add_libs="$PRIVATE_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 PRIVATE_LIBS="$cf_add_libs"
7097
7098         fi
7099
7100 cat >>confdefs.h <<\EOF
7101 #define HAVE_LIBGPM 1
7102 EOF
7103
7104 echo "$as_me:7104: checking for Gpm_Wgetch in -lgpm" >&5
7105 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7106 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7107   echo $ECHO_N "(cached) $ECHO_C" >&6
7108 else
7109   ac_check_lib_save_LIBS=$LIBS
7110 LIBS="-lgpm  $LIBS"
7111 cat >conftest.$ac_ext <<_ACEOF
7112 #line 7112 "configure"
7113 #include "confdefs.h"
7114
7115 /* Override any gcc2 internal prototype to avoid an error.  */
7116 #ifdef __cplusplus
7117 extern "C"
7118 #endif
7119 /* We use char because int might match the return type of a gcc2
7120    builtin and then its argument prototype would still apply.  */
7121 char Gpm_Wgetch ();
7122 int
7123 main (void)
7124 {
7125 Gpm_Wgetch ();
7126   ;
7127   return 0;
7128 }
7129 _ACEOF
7130 rm -f conftest.$ac_objext conftest$ac_exeext
7131 if { (eval echo "$as_me:7131: \"$ac_link\"") >&5
7132   (eval $ac_link) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit $ac_status); } &&
7136          { ac_try='test -s conftest$ac_exeext'
7137   { (eval echo "$as_me:7137: \"$ac_try\"") >&5
7138   (eval $ac_try) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); }; }; then
7142   ac_cv_lib_gpm_Gpm_Wgetch=yes
7143 else
7144   echo "$as_me: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 ac_cv_lib_gpm_Gpm_Wgetch=no
7147 fi
7148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7149 LIBS=$ac_check_lib_save_LIBS
7150 fi
7151 echo "$as_me:7151: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7152 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7153 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7154
7155 echo "$as_me:7155: checking if GPM is weakly bound to curses library" >&5
7156 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7157 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7158   echo $ECHO_N "(cached) $ECHO_C" >&6
7159 else
7160
7161 cf_cv_check_gpm_wgetch=unknown
7162 if test "$cross_compiling" != yes ; then
7163
7164 cat >conftest.$ac_ext <<CF_EOF
7165 #include <gpm.h>
7166 int main(void)
7167 {
7168         Gpm_Wgetch();
7169         ${cf_cv_main_return:-return}(0);
7170 }
7171 CF_EOF
7172
7173         cf_save_LIBS="$LIBS"
7174         # This only works if we can look at the symbol table.  If a shared
7175         # library is stripped for install, we cannot use that.  So we're forced
7176         # to rely on the static library, noting that some packagers may not
7177         # include it.
7178         LIBS="-static -lgpm -dynamic $LIBS"
7179         if { (eval echo "$as_me:7179: \"$ac_compile\"") >&5
7180   (eval $ac_compile) 2>&5
7181   ac_status=$?
7182   echo "$as_me:7182: \$? = $ac_status" >&5
7183   (exit $ac_status); } ; then
7184                 if { (eval echo "$as_me:7184: \"$ac_link\"") >&5
7185   (eval $ac_link) 2>&5
7186   ac_status=$?
7187   echo "$as_me:7187: \$? = $ac_status" >&5
7188   (exit $ac_status); } ; then
7189                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7190                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7191                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7192                 fi
7193         fi
7194         rm -rf conftest*
7195         LIBS="$cf_save_LIBS"
7196 fi
7197
7198 fi
7199 echo "$as_me:7199: result: $cf_cv_check_gpm_wgetch" >&5
7200 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7201
7202 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7203         { echo "$as_me:7203: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7204 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7205 fi
7206
7207 fi
7208
7209 fi
7210
7211 echo "$as_me:7211: checking if you want to use PCRE2 for regular-expressions" >&5
7212 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7213
7214 # Check whether --with-pcre2 or --without-pcre2 was given.
7215 if test "${with_pcre2+set}" = set; then
7216   withval="$with_pcre2"
7217
7218 fi;
7219 test -z "$with_pcre2" && with_pcre2=no
7220 echo "$as_me:7220: result: $with_pcre2" >&5
7221 echo "${ECHO_T}$with_pcre2" >&6
7222
7223 if test "x$with_pcre2" != xno ; then
7224
7225 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7226         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7227
7228 echo "${as_me:-configure}:7228: testing found package libpcre2 ..." 1>&5
7229
7230         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7231         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7232         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7233
7234 echo "${as_me:-configure}:7234: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7235
7236         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7237
7238 echo "${as_me:-configure}:7238: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7239
7240 cf_fix_cppflags=no
7241 cf_new_cflags=
7242 cf_new_cppflags=
7243 cf_new_extra_cppflags=
7244
7245 for cf_add_cflags in $cf_pkgconfig_incs
7246 do
7247 case $cf_fix_cppflags in
7248 (no)
7249         case $cf_add_cflags in
7250         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7251                 case $cf_add_cflags in
7252                 (-D*)
7253                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7254
7255                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7256                                 && test -z "${cf_tst_cflags}" \
7257                                 && cf_fix_cppflags=yes
7258
7259                         if test $cf_fix_cppflags = yes ; then
7260
7261         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7262         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7263
7264                                 continue
7265                         elif test "${cf_tst_cflags}" = "\"'" ; then
7266
7267         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7268         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7269
7270                                 continue
7271                         fi
7272                         ;;
7273                 esac
7274                 case "$CPPFLAGS" in
7275                 (*$cf_add_cflags)
7276                         ;;
7277                 (*)
7278                         case $cf_add_cflags in
7279                         (-D*)
7280                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7281
7282 CPPFLAGS=`echo "$CPPFLAGS" | \
7283         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7284                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7285
7286                                 ;;
7287                         esac
7288
7289         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7290         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7291
7292                         ;;
7293                 esac
7294                 ;;
7295         (*)
7296
7297         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7298         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7299
7300                 ;;
7301         esac
7302         ;;
7303 (yes)
7304
7305         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7306         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7307
7308         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7309
7310         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7311                 && test -z "${cf_tst_cflags}" \
7312                 && cf_fix_cppflags=no
7313         ;;
7314 esac
7315 done
7316
7317 if test -n "$cf_new_cflags" ; then
7318
7319         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7320         CFLAGS="${CFLAGS}$cf_new_cflags"
7321
7322 fi
7323
7324 if test -n "$cf_new_cppflags" ; then
7325
7326         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7327         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7328
7329 fi
7330
7331 if test -n "$cf_new_extra_cppflags" ; then
7332
7333         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7334         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7335
7336 fi
7337
7338 cf_add_libs="$LIBS"
7339 # reverse order
7340 cf_add_0lib=
7341 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7342 # filter duplicates
7343 for cf_add_1lib in $cf_add_0lib; do
7344         for cf_add_2lib in $cf_add_libs; do
7345                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7346                         cf_add_1lib=
7347                         break
7348                 fi
7349         done
7350         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7351 done
7352 LIBS="$cf_add_libs"
7353
7354         :
7355 else
7356         cf_pkgconfig_incs=
7357         cf_pkgconfig_libs=
7358
7359 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7360         test -n "$verbose" && echo "    found package libpcre" 1>&6
7361
7362 echo "${as_me:-configure}:7362: testing found package libpcre ..." 1>&5
7363
7364         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7365         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7366         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7367
7368 echo "${as_me:-configure}:7368: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7369
7370         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7371
7372 echo "${as_me:-configure}:7372: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7373
7374 cf_fix_cppflags=no
7375 cf_new_cflags=
7376 cf_new_cppflags=
7377 cf_new_extra_cppflags=
7378
7379 for cf_add_cflags in $cf_pkgconfig_incs
7380 do
7381 case $cf_fix_cppflags in
7382 (no)
7383         case $cf_add_cflags in
7384         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7385                 case $cf_add_cflags in
7386                 (-D*)
7387                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7388
7389                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7390                                 && test -z "${cf_tst_cflags}" \
7391                                 && cf_fix_cppflags=yes
7392
7393                         if test $cf_fix_cppflags = yes ; then
7394
7395         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7396         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7397
7398                                 continue
7399                         elif test "${cf_tst_cflags}" = "\"'" ; then
7400
7401         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7402         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7403
7404                                 continue
7405                         fi
7406                         ;;
7407                 esac
7408                 case "$CPPFLAGS" in
7409                 (*$cf_add_cflags)
7410                         ;;
7411                 (*)
7412                         case $cf_add_cflags in
7413                         (-D*)
7414                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7415
7416 CPPFLAGS=`echo "$CPPFLAGS" | \
7417         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7418                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7419
7420                                 ;;
7421                         esac
7422
7423         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7424         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7425
7426                         ;;
7427                 esac
7428                 ;;
7429         (*)
7430
7431         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7432         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7433
7434                 ;;
7435         esac
7436         ;;
7437 (yes)
7438
7439         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7440         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7441
7442         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7443
7444         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7445                 && test -z "${cf_tst_cflags}" \
7446                 && cf_fix_cppflags=no
7447         ;;
7448 esac
7449 done
7450
7451 if test -n "$cf_new_cflags" ; then
7452
7453         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7454         CFLAGS="${CFLAGS}$cf_new_cflags"
7455
7456 fi
7457
7458 if test -n "$cf_new_cppflags" ; then
7459
7460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7461         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7462
7463 fi
7464
7465 if test -n "$cf_new_extra_cppflags" ; then
7466
7467         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7468         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7469
7470 fi
7471
7472 cf_add_libs="$LIBS"
7473 # reverse order
7474 cf_add_0lib=
7475 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7476 # filter duplicates
7477 for cf_add_1lib in $cf_add_0lib; do
7478         for cf_add_2lib in $cf_add_libs; do
7479                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7480                         cf_add_1lib=
7481                         break
7482                 fi
7483         done
7484         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7485 done
7486 LIBS="$cf_add_libs"
7487
7488         :
7489 else
7490         cf_pkgconfig_incs=
7491         cf_pkgconfig_libs=
7492
7493                         { { echo "$as_me:7493: error: Cannot find PCRE2 library" >&5
7494 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7495    { (exit 1); exit 1; }; }
7496 fi
7497
7498 fi
7499
7500 cat >>confdefs.h <<\EOF
7501 #define HAVE_LIB_PCRE2 1
7502 EOF
7503
7504         # if pkgconfig gave no results, look for the libraries directly
7505         case $LIBS in
7506         (*pcre2-posix*|*pcreposix*)
7507                 ;;
7508         (*)
7509                 echo "$as_me:7509: checking for regcomp in -lpcre2-posix" >&5
7510 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7511 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514   ac_check_lib_save_LIBS=$LIBS
7515 LIBS="-lpcre2-posix  $LIBS"
7516 cat >conftest.$ac_ext <<_ACEOF
7517 #line 7517 "configure"
7518 #include "confdefs.h"
7519
7520 /* Override any gcc2 internal prototype to avoid an error.  */
7521 #ifdef __cplusplus
7522 extern "C"
7523 #endif
7524 /* We use char because int might match the return type of a gcc2
7525    builtin and then its argument prototype would still apply.  */
7526 char regcomp ();
7527 int
7528 main (void)
7529 {
7530 regcomp ();
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:7536: \"$ac_link\"") >&5
7537   (eval $ac_link) 2>&5
7538   ac_status=$?
7539   echo "$as_me:7539: \$? = $ac_status" >&5
7540   (exit $ac_status); } &&
7541          { ac_try='test -s conftest$ac_exeext'
7542   { (eval echo "$as_me:7542: \"$ac_try\"") >&5
7543   (eval $ac_try) 2>&5
7544   ac_status=$?
7545   echo "$as_me:7545: \$? = $ac_status" >&5
7546   (exit $ac_status); }; }; then
7547   ac_cv_lib_pcre2_posix_regcomp=yes
7548 else
7549   echo "$as_me: failed program was:" >&5
7550 cat conftest.$ac_ext >&5
7551 ac_cv_lib_pcre2_posix_regcomp=no
7552 fi
7553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7554 LIBS=$ac_check_lib_save_LIBS
7555 fi
7556 echo "$as_me:7556: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7557 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7558 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7559
7560 cf_add_libs="$LIBS"
7561 # reverse order
7562 cf_add_0lib=
7563 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7564 # filter duplicates
7565 for cf_add_1lib in $cf_add_0lib; do
7566         for cf_add_2lib in $cf_add_libs; do
7567                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7568                         cf_add_1lib=
7569                         break
7570                 fi
7571         done
7572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7573 done
7574 LIBS="$cf_add_libs"
7575
7576 else
7577   echo "$as_me:7577: checking for regcomp in -lpcreposix" >&5
7578 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7579 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7580   echo $ECHO_N "(cached) $ECHO_C" >&6
7581 else
7582   ac_check_lib_save_LIBS=$LIBS
7583 LIBS="-lpcreposix  $LIBS"
7584 cat >conftest.$ac_ext <<_ACEOF
7585 #line 7585 "configure"
7586 #include "confdefs.h"
7587
7588 /* Override any gcc2 internal prototype to avoid an error.  */
7589 #ifdef __cplusplus
7590 extern "C"
7591 #endif
7592 /* We use char because int might match the return type of a gcc2
7593    builtin and then its argument prototype would still apply.  */
7594 char regcomp ();
7595 int
7596 main (void)
7597 {
7598 regcomp ();
7599   ;
7600   return 0;
7601 }
7602 _ACEOF
7603 rm -f conftest.$ac_objext conftest$ac_exeext
7604 if { (eval echo "$as_me:7604: \"$ac_link\"") >&5
7605   (eval $ac_link) 2>&5
7606   ac_status=$?
7607   echo "$as_me:7607: \$? = $ac_status" >&5
7608   (exit $ac_status); } &&
7609          { ac_try='test -s conftest$ac_exeext'
7610   { (eval echo "$as_me:7610: \"$ac_try\"") >&5
7611   (eval $ac_try) 2>&5
7612   ac_status=$?
7613   echo "$as_me:7613: \$? = $ac_status" >&5
7614   (exit $ac_status); }; }; then
7615   ac_cv_lib_pcreposix_regcomp=yes
7616 else
7617   echo "$as_me: failed program was:" >&5
7618 cat conftest.$ac_ext >&5
7619 ac_cv_lib_pcreposix_regcomp=no
7620 fi
7621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7622 LIBS=$ac_check_lib_save_LIBS
7623 fi
7624 echo "$as_me:7624: result: $ac_cv_lib_pcreposix_regcomp" >&5
7625 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7626 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7627
7628 cf_add_libs="$LIBS"
7629 # reverse order
7630 cf_add_0lib=
7631 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7632 # filter duplicates
7633 for cf_add_1lib in $cf_add_0lib; do
7634         for cf_add_2lib in $cf_add_libs; do
7635                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7636                         cf_add_1lib=
7637                         break
7638                 fi
7639         done
7640         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7641 done
7642 LIBS="$cf_add_libs"
7643
7644 else
7645   { { echo "$as_me:7645: error: Cannot find PCRE2 POSIX library" >&5
7646 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7647    { (exit 1); exit 1; }; }
7648 fi
7649
7650 fi
7651
7652                 ;;
7653         esac
7654
7655         # either way, check for the library header files
7656
7657 for ac_header in pcre2posix.h pcreposix.h
7658 do
7659 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7660 echo "$as_me:7660: checking for $ac_header" >&5
7661 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7662 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7663   echo $ECHO_N "(cached) $ECHO_C" >&6
7664 else
7665   cat >conftest.$ac_ext <<_ACEOF
7666 #line 7666 "configure"
7667 #include "confdefs.h"
7668 #include <$ac_header>
7669 _ACEOF
7670 if { (eval echo "$as_me:7670: \"$ac_cpp conftest.$ac_ext\"") >&5
7671   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7672   ac_status=$?
7673   egrep -v '^ *\+' conftest.er1 >conftest.err
7674   rm -f conftest.er1
7675   cat conftest.err >&5
7676   echo "$as_me:7676: \$? = $ac_status" >&5
7677   (exit $ac_status); } >/dev/null; then
7678   if test -s conftest.err; then
7679     ac_cpp_err=$ac_c_preproc_warn_flag
7680   else
7681     ac_cpp_err=
7682   fi
7683 else
7684   ac_cpp_err=yes
7685 fi
7686 if test -z "$ac_cpp_err"; then
7687   eval "$as_ac_Header=yes"
7688 else
7689   echo "$as_me: failed program was:" >&5
7690   cat conftest.$ac_ext >&5
7691   eval "$as_ac_Header=no"
7692 fi
7693 rm -f conftest.err conftest.$ac_ext
7694 fi
7695 echo "$as_me:7695: result: `eval echo '${'$as_ac_Header'}'`" >&5
7696 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7697 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7698   cat >>confdefs.h <<EOF
7699 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7700 EOF
7701
7702 fi
7703 done
7704
7705 fi
7706
7707 # not everyone has "test -c"
7708 if test -c /dev/sysmouse 2>/dev/null ; then
7709 echo "$as_me:7709: checking if you want to use sysmouse" >&5
7710 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7711
7712 # Check whether --with-sysmouse or --without-sysmouse was given.
7713 if test "${with_sysmouse+set}" = set; then
7714   withval="$with_sysmouse"
7715   cf_with_sysmouse=$withval
7716 else
7717   cf_with_sysmouse=maybe
7718 fi;
7719         if test "$cf_with_sysmouse" != no ; then
7720         cat >conftest.$ac_ext <<_ACEOF
7721 #line 7721 "configure"
7722 #include "confdefs.h"
7723
7724 #include <osreldate.h>
7725 #if (__FreeBSD_version >= 400017)
7726 #include <sys/consio.h>
7727 #include <sys/fbio.h>
7728 #else
7729 #include <machine/console.h>
7730 #endif
7731
7732 int
7733 main (void)
7734 {
7735
7736         struct mouse_info the_mouse;
7737         ioctl(0, CONS_MOUSECTL, &the_mouse);
7738
7739   ;
7740   return 0;
7741 }
7742 _ACEOF
7743 rm -f conftest.$ac_objext
7744 if { (eval echo "$as_me:7744: \"$ac_compile\"") >&5
7745   (eval $ac_compile) 2>&5
7746   ac_status=$?
7747   echo "$as_me:7747: \$? = $ac_status" >&5
7748   (exit $ac_status); } &&
7749          { ac_try='test -s conftest.$ac_objext'
7750   { (eval echo "$as_me:7750: \"$ac_try\"") >&5
7751   (eval $ac_try) 2>&5
7752   ac_status=$?
7753   echo "$as_me:7753: \$? = $ac_status" >&5
7754   (exit $ac_status); }; }; then
7755   cf_with_sysmouse=yes
7756 else
7757   echo "$as_me: failed program was:" >&5
7758 cat conftest.$ac_ext >&5
7759 cf_with_sysmouse=no
7760 fi
7761 rm -f conftest.$ac_objext conftest.$ac_ext
7762         fi
7763 echo "$as_me:7763: result: $cf_with_sysmouse" >&5
7764 echo "${ECHO_T}$cf_with_sysmouse" >&6
7765 test "$cf_with_sysmouse" = yes &&
7766 cat >>confdefs.h <<\EOF
7767 #define USE_SYSMOUSE 1
7768 EOF
7769
7770 fi
7771
7772 # pretend that ncurses==ncursesw==ncursest
7773 echo "$as_me:7773: checking if you want to disable library suffixes" >&5
7774 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7775
7776 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7777 if test "${enable_lib_suffixes+set}" = set; then
7778   enableval="$enable_lib_suffixes"
7779   test "$enableval" != no && enableval=yes
7780         if test "$enableval" != "yes" ; then
7781     disable_lib_suffixes=yes
7782         else
7783                 disable_lib_suffixes=no
7784         fi
7785 else
7786   enableval=yes
7787         disable_lib_suffixes=no
7788
7789 fi;
7790 echo "$as_me:7790: result: $disable_lib_suffixes" >&5
7791 echo "${ECHO_T}$disable_lib_suffixes" >&6
7792
7793 ### If we're building with rpath, try to link non-standard libs that way too.
7794 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7795
7796 echo "$as_me:7796: checking if rpath-hack should be disabled" >&5
7797 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7798
7799 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7800 if test "${enable_rpath_hack+set}" = set; then
7801   enableval="$enable_rpath_hack"
7802   test "$enableval" != no && enableval=yes
7803         if test "$enableval" != "yes" ; then
7804     cf_disable_rpath_hack=yes
7805         else
7806                 cf_disable_rpath_hack=no
7807         fi
7808 else
7809   enableval=yes
7810         cf_disable_rpath_hack=no
7811
7812 fi;
7813 echo "$as_me:7813: result: $cf_disable_rpath_hack" >&5
7814 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7815 if test "$cf_disable_rpath_hack" = no ; then
7816
7817 echo "$as_me:7817: checking for updated LDFLAGS" >&5
7818 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7819 if test -n "$LD_RPATH_OPT" ; then
7820         echo "$as_me:7820: result: maybe" >&5
7821 echo "${ECHO_T}maybe" >&6
7822
7823         for ac_prog in ldd
7824 do
7825   # Extract the first word of "$ac_prog", so it can be a program name with args.
7826 set dummy $ac_prog; ac_word=$2
7827 echo "$as_me:7827: checking for $ac_word" >&5
7828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7829 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7830   echo $ECHO_N "(cached) $ECHO_C" >&6
7831 else
7832   if test -n "$cf_ldd_prog"; then
7833   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7834 else
7835   ac_save_IFS=$IFS; IFS=$ac_path_separator
7836 ac_dummy="$PATH"
7837 for ac_dir in $ac_dummy; do
7838   IFS=$ac_save_IFS
7839   test -z "$ac_dir" && ac_dir=.
7840   $as_executable_p "$ac_dir/$ac_word" || continue
7841 ac_cv_prog_cf_ldd_prog="$ac_prog"
7842 echo "$as_me:7842: found $ac_dir/$ac_word" >&5
7843 break
7844 done
7845
7846 fi
7847 fi
7848 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7849 if test -n "$cf_ldd_prog"; then
7850   echo "$as_me:7850: result: $cf_ldd_prog" >&5
7851 echo "${ECHO_T}$cf_ldd_prog" >&6
7852 else
7853   echo "$as_me:7853: result: no" >&5
7854 echo "${ECHO_T}no" >&6
7855 fi
7856
7857   test -n "$cf_ldd_prog" && break
7858 done
7859 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7860
7861         cf_rpath_list="/usr/lib /lib"
7862         if test "$cf_ldd_prog" != no
7863         then
7864                 cf_rpath_oops=
7865
7866 cat >conftest.$ac_ext <<_ACEOF
7867 #line 7867 "configure"
7868 #include "confdefs.h"
7869 #include <stdio.h>
7870 int
7871 main (void)
7872 {
7873 printf("Hello");
7874   ;
7875   return 0;
7876 }
7877 _ACEOF
7878 rm -f conftest.$ac_objext conftest$ac_exeext
7879 if { (eval echo "$as_me:7879: \"$ac_link\"") >&5
7880   (eval $ac_link) 2>&5
7881   ac_status=$?
7882   echo "$as_me:7882: \$? = $ac_status" >&5
7883   (exit $ac_status); } &&
7884          { ac_try='test -s conftest$ac_exeext'
7885   { (eval echo "$as_me:7885: \"$ac_try\"") >&5
7886   (eval $ac_try) 2>&5
7887   ac_status=$?
7888   echo "$as_me:7888: \$? = $ac_status" >&5
7889   (exit $ac_status); }; }; then
7890   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7891                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7892 else
7893   echo "$as_me: failed program was:" >&5
7894 cat conftest.$ac_ext >&5
7895 fi
7896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7897
7898                 # If we passed the link-test, but get a "not found" on a given library,
7899                 # this could be due to inept reconfiguration of gcc to make it only
7900                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7901                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7902                 # /usr/local libraries.
7903                 if test -n "$cf_rpath_oops"
7904                 then
7905                         for cf_rpath_src in $cf_rpath_oops
7906                         do
7907                                 for cf_rpath_dir in \
7908                                         /usr/local \
7909                                         /usr/pkg \
7910                                         /opt/sfw
7911                                 do
7912                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7913                                         then
7914                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7915
7916 echo "${as_me:-configure}:7916: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7917
7918                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7919                                                 break
7920                                         fi
7921                                 done
7922                         done
7923                 fi
7924         fi
7925
7926         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7927
7928 echo "${as_me:-configure}:7928: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7929
7930 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7931
7932 echo "${as_me:-configure}:7932: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7933
7934 cf_rpath_dst=
7935 for cf_rpath_src in $LDFLAGS
7936 do
7937         case $cf_rpath_src in
7938         (-L*)
7939
7940                 # check if this refers to a directory which we will ignore
7941                 cf_rpath_skip=no
7942                 if test -n "$cf_rpath_list"
7943                 then
7944                         for cf_rpath_item in $cf_rpath_list
7945                         do
7946                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7947                                 then
7948                                         cf_rpath_skip=yes
7949                                         break
7950                                 fi
7951                         done
7952                 fi
7953
7954                 if test "$cf_rpath_skip" = no
7955                 then
7956                         # transform the option
7957                         if test "$LD_RPATH_OPT" = "-R " ; then
7958                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7959                         else
7960                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7961                         fi
7962
7963                         # if we have not already added this, add it now
7964                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7965                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7966                         then
7967                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7968
7969 echo "${as_me:-configure}:7969: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7970
7971                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7972                         fi
7973                 fi
7974                 ;;
7975         esac
7976         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7977 done
7978 LDFLAGS=$cf_rpath_dst
7979
7980 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7981
7982 echo "${as_me:-configure}:7982: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7983
7984 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7985
7986 echo "${as_me:-configure}:7986: testing ...checking LIBS $LIBS ..." 1>&5
7987
7988 cf_rpath_dst=
7989 for cf_rpath_src in $LIBS
7990 do
7991         case $cf_rpath_src in
7992         (-L*)
7993
7994                 # check if this refers to a directory which we will ignore
7995                 cf_rpath_skip=no
7996                 if test -n "$cf_rpath_list"
7997                 then
7998                         for cf_rpath_item in $cf_rpath_list
7999                         do
8000                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8001                                 then
8002                                         cf_rpath_skip=yes
8003                                         break
8004                                 fi
8005                         done
8006                 fi
8007
8008                 if test "$cf_rpath_skip" = no
8009                 then
8010                         # transform the option
8011                         if test "$LD_RPATH_OPT" = "-R " ; then
8012                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8013                         else
8014                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8015                         fi
8016
8017                         # if we have not already added this, add it now
8018                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8019                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8020                         then
8021                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8022
8023 echo "${as_me:-configure}:8023: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8024
8025                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8026                         fi
8027                 fi
8028                 ;;
8029         esac
8030         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8031 done
8032 LIBS=$cf_rpath_dst
8033
8034 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8035
8036 echo "${as_me:-configure}:8036: testing ...checked LIBS $LIBS ..." 1>&5
8037
8038         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8039
8040 echo "${as_me:-configure}:8040: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8041
8042 else
8043         echo "$as_me:8043: result: no" >&5
8044 echo "${ECHO_T}no" >&6
8045 fi
8046
8047 fi
8048
8049 fi
8050
8051 ### Depending on the system, someone may use rpath to build ncurses but not
8052 # want users of the package to rely upon that feature.  Give those people an
8053 # option to suppress that detail from EXTRA_LDFLAGS.
8054 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8055 if test -n "$EXTRA_PKG_LDFLAGS"
8056 then
8057         echo "$as_me:8057: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8058 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8059
8060 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8061 if test "${enable_pkg_ldflags+set}" = set; then
8062   enableval="$enable_pkg_ldflags"
8063   test "$enableval" != no && enableval=yes
8064         if test "$enableval" != "yes" ; then
8065     disable_pkg_ldflags=yes
8066         else
8067                 disable_pkg_ldflags=no
8068         fi
8069 else
8070   enableval=yes
8071         disable_pkg_ldflags=no
8072
8073 fi;
8074         echo "$as_me:8074: result: $disable_pkg_ldflags" >&5
8075 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8076         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8077 fi
8078
8079 ###############################################################################
8080
8081 ###     use option --with-extra-suffix to append suffix to headers and libraries
8082 echo "$as_me:8082: checking if you wish to append extra suffix to header/library paths" >&5
8083 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8084 EXTRA_SUFFIX=
8085
8086 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8087 if test "${with_extra_suffix+set}" = set; then
8088   withval="$with_extra_suffix"
8089   case x$withval in
8090         (no)
8091                 ;;
8092         (xyes|x)
8093                 EXTRA_SUFFIX=$cf_cv_abi_version
8094                 ;;
8095         (*)
8096                 EXTRA_SUFFIX=$withval
8097                 ;;
8098         esac
8099
8100 fi;
8101 echo "$as_me:8101: result: $EXTRA_SUFFIX" >&5
8102 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8103
8104 ###     use option --disable-overwrite to leave out the link to -lcurses
8105 echo "$as_me:8105: checking if you wish to install ncurses overwriting curses" >&5
8106 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8107
8108 # Check whether --enable-overwrite or --disable-overwrite was given.
8109 if test "${enable_overwrite+set}" = set; then
8110   enableval="$enable_overwrite"
8111   with_overwrite=$enableval
8112 else
8113   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8114 fi;
8115 echo "$as_me:8115: result: $with_overwrite" >&5
8116 echo "${ECHO_T}$with_overwrite" >&6
8117
8118 echo "$as_me:8118: checking if external terminfo-database is used" >&5
8119 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8120
8121 # Check whether --enable-database or --disable-database was given.
8122 if test "${enable_database+set}" = set; then
8123   enableval="$enable_database"
8124   use_database=$enableval
8125 else
8126   use_database=yes
8127 fi;
8128 echo "$as_me:8128: result: $use_database" >&5
8129 echo "${ECHO_T}$use_database" >&6
8130
8131 case $host_os in
8132 (os2*)
8133         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8134         ;;
8135 (*)
8136         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8137         ;;
8138 esac
8139
8140 NCURSES_USE_DATABASE=0
8141 if test "$use_database" != no ; then
8142         NCURSES_USE_DATABASE=1
8143
8144         echo "$as_me:8144: checking which terminfo source-file will be installed" >&5
8145 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8146
8147 # Check whether --with-database or --without-database was given.
8148 if test "${with_database+set}" = set; then
8149   withval="$with_database"
8150   TERMINFO_SRC=$withval
8151 fi;
8152         echo "$as_me:8152: result: $TERMINFO_SRC" >&5
8153 echo "${ECHO_T}$TERMINFO_SRC" >&6
8154
8155         echo "$as_me:8155: checking whether to use hashed database instead of directory/tree" >&5
8156 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8157
8158 # Check whether --with-hashed-db or --without-hashed-db was given.
8159 if test "${with_hashed_db+set}" = set; then
8160   withval="$with_hashed_db"
8161
8162 else
8163   with_hashed_db=no
8164 fi;
8165         echo "$as_me:8165: result: $with_hashed_db" >&5
8166 echo "${ECHO_T}$with_hashed_db" >&6
8167 else
8168         with_hashed_db=no
8169 fi
8170
8171 echo "$as_me:8171: checking for list of fallback descriptions" >&5
8172 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8173
8174 # Check whether --with-fallbacks or --without-fallbacks was given.
8175 if test "${with_fallbacks+set}" = set; then
8176   withval="$with_fallbacks"
8177   with_fallback=$withval
8178 else
8179   with_fallback=
8180 fi;
8181 echo "$as_me:8181: result: $with_fallback" >&5
8182 echo "${ECHO_T}$with_fallback" >&6
8183
8184 case ".$with_fallback" in
8185 (.|.no)
8186         FALLBACK_LIST=
8187         ;;
8188 (.yes)
8189         { echo "$as_me:8189: WARNING: expected a list of terminal descriptions" >&5
8190 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8191         ;;
8192 (*)
8193         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8194         ;;
8195 esac
8196
8197 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8198 # tree for generating the terminal descriptions that will be compiled into the
8199 # library.  If your toolchain is old, it may not handle current terminal
8200 # databases.  Use configure-options to point to the tools which will be used,
8201 # rather than the first ones found on the $PATH.
8202 if test -n "$ac_tool_prefix"; then
8203   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8204 set dummy ${ac_tool_prefix}tic; ac_word=$2
8205 echo "$as_me:8205: checking for $ac_word" >&5
8206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8207 if test "${ac_cv_prog_TIC+set}" = set; then
8208   echo $ECHO_N "(cached) $ECHO_C" >&6
8209 else
8210   if test -n "$TIC"; then
8211   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8212 else
8213   ac_save_IFS=$IFS; IFS=$ac_path_separator
8214 ac_dummy="$PATH"
8215 for ac_dir in $ac_dummy; do
8216   IFS=$ac_save_IFS
8217   test -z "$ac_dir" && ac_dir=.
8218   $as_executable_p "$ac_dir/$ac_word" || continue
8219 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8220 echo "$as_me:8220: found $ac_dir/$ac_word" >&5
8221 break
8222 done
8223
8224 fi
8225 fi
8226 TIC=$ac_cv_prog_TIC
8227 if test -n "$TIC"; then
8228   echo "$as_me:8228: result: $TIC" >&5
8229 echo "${ECHO_T}$TIC" >&6
8230 else
8231   echo "$as_me:8231: result: no" >&5
8232 echo "${ECHO_T}no" >&6
8233 fi
8234
8235 fi
8236 if test -z "$ac_cv_prog_TIC"; then
8237   ac_ct_TIC=$TIC
8238   # Extract the first word of "tic", so it can be a program name with args.
8239 set dummy tic; ac_word=$2
8240 echo "$as_me:8240: checking for $ac_word" >&5
8241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8242 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8243   echo $ECHO_N "(cached) $ECHO_C" >&6
8244 else
8245   if test -n "$ac_ct_TIC"; then
8246   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8247 else
8248   ac_save_IFS=$IFS; IFS=$ac_path_separator
8249 ac_dummy="$PATH"
8250 for ac_dir in $ac_dummy; do
8251   IFS=$ac_save_IFS
8252   test -z "$ac_dir" && ac_dir=.
8253   $as_executable_p "$ac_dir/$ac_word" || continue
8254 ac_cv_prog_ac_ct_TIC="tic"
8255 echo "$as_me:8255: found $ac_dir/$ac_word" >&5
8256 break
8257 done
8258
8259 fi
8260 fi
8261 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8262 if test -n "$ac_ct_TIC"; then
8263   echo "$as_me:8263: result: $ac_ct_TIC" >&5
8264 echo "${ECHO_T}$ac_ct_TIC" >&6
8265 else
8266   echo "$as_me:8266: result: no" >&5
8267 echo "${ECHO_T}no" >&6
8268 fi
8269
8270   TIC=$ac_ct_TIC
8271 else
8272   TIC="$ac_cv_prog_TIC"
8273 fi
8274
8275 if test -n "$ac_tool_prefix"; then
8276   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8277 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8278 echo "$as_me:8278: checking for $ac_word" >&5
8279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8280 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 else
8283   if test -n "$INFOCMP"; then
8284   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8285 else
8286   ac_save_IFS=$IFS; IFS=$ac_path_separator
8287 ac_dummy="$PATH"
8288 for ac_dir in $ac_dummy; do
8289   IFS=$ac_save_IFS
8290   test -z "$ac_dir" && ac_dir=.
8291   $as_executable_p "$ac_dir/$ac_word" || continue
8292 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8293 echo "$as_me:8293: found $ac_dir/$ac_word" >&5
8294 break
8295 done
8296
8297 fi
8298 fi
8299 INFOCMP=$ac_cv_prog_INFOCMP
8300 if test -n "$INFOCMP"; then
8301   echo "$as_me:8301: result: $INFOCMP" >&5
8302 echo "${ECHO_T}$INFOCMP" >&6
8303 else
8304   echo "$as_me:8304: result: no" >&5
8305 echo "${ECHO_T}no" >&6
8306 fi
8307
8308 fi
8309 if test -z "$ac_cv_prog_INFOCMP"; then
8310   ac_ct_INFOCMP=$INFOCMP
8311   # Extract the first word of "infocmp", so it can be a program name with args.
8312 set dummy infocmp; ac_word=$2
8313 echo "$as_me:8313: checking for $ac_word" >&5
8314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8315 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8316   echo $ECHO_N "(cached) $ECHO_C" >&6
8317 else
8318   if test -n "$ac_ct_INFOCMP"; then
8319   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8320 else
8321   ac_save_IFS=$IFS; IFS=$ac_path_separator
8322 ac_dummy="$PATH"
8323 for ac_dir in $ac_dummy; do
8324   IFS=$ac_save_IFS
8325   test -z "$ac_dir" && ac_dir=.
8326   $as_executable_p "$ac_dir/$ac_word" || continue
8327 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8328 echo "$as_me:8328: found $ac_dir/$ac_word" >&5
8329 break
8330 done
8331
8332 fi
8333 fi
8334 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8335 if test -n "$ac_ct_INFOCMP"; then
8336   echo "$as_me:8336: result: $ac_ct_INFOCMP" >&5
8337 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8338 else
8339   echo "$as_me:8339: result: no" >&5
8340 echo "${ECHO_T}no" >&6
8341 fi
8342
8343   INFOCMP=$ac_ct_INFOCMP
8344 else
8345   INFOCMP="$ac_cv_prog_INFOCMP"
8346 fi
8347
8348 if test -n "$FALLBACK_LIST"
8349 then
8350
8351 # Check whether --with-tic-path or --without-tic-path was given.
8352 if test "${with_tic_path+set}" = set; then
8353   withval="$with_tic_path"
8354   echo "$as_me:8354: checking for tic program for fallbacks" >&5
8355 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8356                 TIC=$withval
8357                 echo "$as_me:8357: result: $TIC" >&5
8358 echo "${ECHO_T}$TIC" >&6
8359
8360 if test "x$prefix" != xNONE; then
8361         cf_path_syntax="$prefix"
8362 else
8363         cf_path_syntax="$ac_default_prefix"
8364 fi
8365
8366 case ".$TIC" in
8367 (.\$\(*\)*|.\'*\'*)
8368         ;;
8369 (..|./*|.\\*)
8370         ;;
8371 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8372         ;;
8373 (.\${*prefix}*|.\${*dir}*)
8374         eval TIC="$TIC"
8375         case ".$TIC" in
8376         (.NONE/*)
8377                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8378                 ;;
8379         esac
8380         ;;
8381 (.no|.NONE/*)
8382         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8383         ;;
8384 (*)
8385         { { echo "$as_me:8385: error: expected a pathname, not \"$TIC\"" >&5
8386 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8387    { (exit 1); exit 1; }; }
8388         ;;
8389 esac
8390
8391 else
8392
8393 test -z "$TIC" && TIC=tic
8394 for ac_prog in $TIC tic
8395 do
8396   # Extract the first word of "$ac_prog", so it can be a program name with args.
8397 set dummy $ac_prog; ac_word=$2
8398 echo "$as_me:8398: checking for $ac_word" >&5
8399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8400 if test "${ac_cv_path_TIC+set}" = set; then
8401   echo $ECHO_N "(cached) $ECHO_C" >&6
8402 else
8403   case $TIC in
8404   [\\/]* | ?:[\\/]*)
8405   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8406   ;;
8407   *)
8408   ac_save_IFS=$IFS; IFS=$ac_path_separator
8409 ac_dummy="$PATH:/usr/local/ncurses/bin"
8410 for ac_dir in $ac_dummy; do
8411   IFS=$ac_save_IFS
8412   test -z "$ac_dir" && ac_dir=.
8413   if $as_executable_p "$ac_dir/$ac_word"; then
8414    ac_cv_path_TIC="$ac_dir/$ac_word"
8415    echo "$as_me:8415: found $ac_dir/$ac_word" >&5
8416    break
8417 fi
8418 done
8419
8420   ;;
8421 esac
8422 fi
8423 TIC=$ac_cv_path_TIC
8424
8425 if test -n "$TIC"; then
8426   echo "$as_me:8426: result: $TIC" >&5
8427 echo "${ECHO_T}$TIC" >&6
8428 else
8429   echo "$as_me:8429: result: no" >&5
8430 echo "${ECHO_T}no" >&6
8431 fi
8432
8433   test -n "$TIC" && break
8434 done
8435 test -n "$TIC" || TIC="$TIC"
8436
8437 cf_path_prog=""
8438 cf_path_args=""
8439 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8440 for cf_temp in $ac_cv_path_TIC
8441 do
8442         if test -z "$cf_path_prog" ; then
8443                 if test "$with_full_paths" = yes ; then
8444
8445 if test "x$prefix" != xNONE; then
8446         cf_path_syntax="$prefix"
8447 else
8448         cf_path_syntax="$ac_default_prefix"
8449 fi
8450
8451 case ".$cf_temp" in
8452 (.\$\(*\)*|.\'*\'*)
8453         ;;
8454 (..|./*|.\\*)
8455         ;;
8456 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8457         ;;
8458 (.\${*prefix}*|.\${*dir}*)
8459         eval cf_temp="$cf_temp"
8460         case ".$cf_temp" in
8461         (.NONE/*)
8462                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8463                 ;;
8464         esac
8465         ;;
8466 (.no|.NONE/*)
8467         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8468         ;;
8469 (*)
8470         break
8471         ;;
8472 esac
8473
8474                         cf_path_prog="$cf_temp"
8475                 else
8476                         cf_path_prog="`basename $cf_temp`"
8477                 fi
8478         elif test -z "$cf_path_args" ; then
8479                 cf_path_args="$cf_temp"
8480         else
8481                 cf_path_args="$cf_path_args $cf_temp"
8482         fi
8483 done
8484 IFS="$cf_save_ifs"
8485
8486 if test -n "$cf_path_prog" ; then
8487
8488 echo "${as_me:-configure}:8488: testing defining path for ${cf_path_prog} ..." 1>&5
8489
8490 cat >>confdefs.h <<EOF
8491 #define TIC_PATH "$cf_path_prog"
8492 EOF
8493
8494         test -n "$cf_path_args" &&
8495 cat >>confdefs.h <<EOF
8496 #define TIC_ARGS "$cf_path_args"
8497 EOF
8498
8499 fi
8500
8501                 if test -z "$TIC"
8502                 then
8503                         { echo "$as_me:8503: WARNING: no tic program found for fallbacks" >&5
8504 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8505                 fi
8506
8507 fi;
8508
8509 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8510 if test "${with_infocmp_path+set}" = set; then
8511   withval="$with_infocmp_path"
8512   echo "$as_me:8512: checking for infocmp program for fallbacks" >&5
8513 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8514                 INFOCMP=$withval
8515                 echo "$as_me:8515: result: $INFOCMP" >&5
8516 echo "${ECHO_T}$INFOCMP" >&6
8517
8518 if test "x$prefix" != xNONE; then
8519         cf_path_syntax="$prefix"
8520 else
8521         cf_path_syntax="$ac_default_prefix"
8522 fi
8523
8524 case ".$INFOCMP" in
8525 (.\$\(*\)*|.\'*\'*)
8526         ;;
8527 (..|./*|.\\*)
8528         ;;
8529 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8530         ;;
8531 (.\${*prefix}*|.\${*dir}*)
8532         eval INFOCMP="$INFOCMP"
8533         case ".$INFOCMP" in
8534         (.NONE/*)
8535                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8536                 ;;
8537         esac
8538         ;;
8539 (.no|.NONE/*)
8540         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8541         ;;
8542 (*)
8543         { { echo "$as_me:8543: error: expected a pathname, not \"$INFOCMP\"" >&5
8544 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8545    { (exit 1); exit 1; }; }
8546         ;;
8547 esac
8548
8549 else
8550
8551 test -z "$INFOCMP" && INFOCMP=infocmp
8552 for ac_prog in $INFOCMP infocmp
8553 do
8554   # Extract the first word of "$ac_prog", so it can be a program name with args.
8555 set dummy $ac_prog; ac_word=$2
8556 echo "$as_me:8556: checking for $ac_word" >&5
8557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8558 if test "${ac_cv_path_INFOCMP+set}" = set; then
8559   echo $ECHO_N "(cached) $ECHO_C" >&6
8560 else
8561   case $INFOCMP in
8562   [\\/]* | ?:[\\/]*)
8563   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8564   ;;
8565   *)
8566   ac_save_IFS=$IFS; IFS=$ac_path_separator
8567 ac_dummy="$PATH:/usr/local/ncurses/bin"
8568 for ac_dir in $ac_dummy; do
8569   IFS=$ac_save_IFS
8570   test -z "$ac_dir" && ac_dir=.
8571   if $as_executable_p "$ac_dir/$ac_word"; then
8572    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8573    echo "$as_me:8573: found $ac_dir/$ac_word" >&5
8574    break
8575 fi
8576 done
8577
8578   ;;
8579 esac
8580 fi
8581 INFOCMP=$ac_cv_path_INFOCMP
8582
8583 if test -n "$INFOCMP"; then
8584   echo "$as_me:8584: result: $INFOCMP" >&5
8585 echo "${ECHO_T}$INFOCMP" >&6
8586 else
8587   echo "$as_me:8587: result: no" >&5
8588 echo "${ECHO_T}no" >&6
8589 fi
8590
8591   test -n "$INFOCMP" && break
8592 done
8593 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8594
8595 cf_path_prog=""
8596 cf_path_args=""
8597 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8598 for cf_temp in $ac_cv_path_INFOCMP
8599 do
8600         if test -z "$cf_path_prog" ; then
8601                 if test "$with_full_paths" = yes ; then
8602
8603 if test "x$prefix" != xNONE; then
8604         cf_path_syntax="$prefix"
8605 else
8606         cf_path_syntax="$ac_default_prefix"
8607 fi
8608
8609 case ".$cf_temp" in
8610 (.\$\(*\)*|.\'*\'*)
8611         ;;
8612 (..|./*|.\\*)
8613         ;;
8614 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8615         ;;
8616 (.\${*prefix}*|.\${*dir}*)
8617         eval cf_temp="$cf_temp"
8618         case ".$cf_temp" in
8619         (.NONE/*)
8620                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8621                 ;;
8622         esac
8623         ;;
8624 (.no|.NONE/*)
8625         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8626         ;;
8627 (*)
8628         break
8629         ;;
8630 esac
8631
8632                         cf_path_prog="$cf_temp"
8633                 else
8634                         cf_path_prog="`basename $cf_temp`"
8635                 fi
8636         elif test -z "$cf_path_args" ; then
8637                 cf_path_args="$cf_temp"
8638         else
8639                 cf_path_args="$cf_path_args $cf_temp"
8640         fi
8641 done
8642 IFS="$cf_save_ifs"
8643
8644 if test -n "$cf_path_prog" ; then
8645
8646 echo "${as_me:-configure}:8646: testing defining path for ${cf_path_prog} ..." 1>&5
8647
8648 cat >>confdefs.h <<EOF
8649 #define INFOCMP_PATH "$cf_path_prog"
8650 EOF
8651
8652         test -n "$cf_path_args" &&
8653 cat >>confdefs.h <<EOF
8654 #define INFOCMP_ARGS "$cf_path_args"
8655 EOF
8656
8657 fi
8658
8659                 if test -z "$INFOCMP"
8660                 then
8661                         { echo "$as_me:8661: WARNING: no infocmp program found for fallbacks" >&5
8662 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8663                 fi
8664
8665 fi;
8666
8667         test -z "$TIC" && FALLBACK_LIST=
8668         test -z "$INFOCMP" && FALLBACK_LIST=
8669         if test -z "$FALLBACK_LIST"
8670         then
8671                 { echo "$as_me:8671: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8672 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8673         fi
8674 fi
8675
8676 USE_FALLBACKS=
8677 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8678
8679 echo "$as_me:8679: checking if you want modern xterm or antique" >&5
8680 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8681
8682 # Check whether --with-xterm-new or --without-xterm-new was given.
8683 if test "${with_xterm_new+set}" = set; then
8684   withval="$with_xterm_new"
8685   with_xterm_new=$withval
8686 else
8687   with_xterm_new=yes
8688 fi;
8689 case $with_xterm_new in
8690 (no) with_xterm_new=xterm-old;;
8691 (*)      with_xterm_new=xterm-new;;
8692 esac
8693 echo "$as_me:8693: result: $with_xterm_new" >&5
8694 echo "${ECHO_T}$with_xterm_new" >&6
8695 WHICH_XTERM=$with_xterm_new
8696
8697 echo "$as_me:8697: checking if xterm backspace sends BS or DEL" >&5
8698 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8699
8700 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8701 if test "${with_xterm_kbs+set}" = set; then
8702   withval="$with_xterm_kbs"
8703   with_xterm_kbs=$withval
8704 else
8705   with_xterm_kbs=BS
8706 fi;
8707 case x$with_xterm_kbs in
8708 (xyes|xno|xBS|xbs|x8)
8709         with_xterm_kbs=BS
8710         ;;
8711 (xDEL|xdel|x127)
8712         with_xterm_kbs=DEL
8713         ;;
8714 (*)
8715         with_xterm_kbs=$withval
8716         ;;
8717 esac
8718 echo "$as_me:8718: result: $with_xterm_kbs" >&5
8719 echo "${ECHO_T}$with_xterm_kbs" >&6
8720 XTERM_KBS=$with_xterm_kbs
8721
8722 MAKE_TERMINFO=
8723 if test "$use_database" = no ; then
8724         TERMINFO="${datadir}/terminfo"
8725         MAKE_TERMINFO="#"
8726 else
8727
8728 echo "$as_me:8728: checking for list of terminfo directories" >&5
8729 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8730
8731 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8732 if test "${with_terminfo_dirs+set}" = set; then
8733   withval="$with_terminfo_dirs"
8734
8735 else
8736   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8737 fi;
8738 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8739 cf_dst_path=
8740 for cf_src_path in $withval
8741 do
8742
8743 if test "x$prefix" != xNONE; then
8744         cf_path_syntax="$prefix"
8745 else
8746         cf_path_syntax="$ac_default_prefix"
8747 fi
8748
8749 case ".$cf_src_path" in
8750 (.\$\(*\)*|.\'*\'*)
8751         ;;
8752 (..|./*|.\\*)
8753         ;;
8754 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8755         ;;
8756 (.\${*prefix}*|.\${*dir}*)
8757         eval cf_src_path="$cf_src_path"
8758         case ".$cf_src_path" in
8759         (.NONE/*)
8760                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8761                 ;;
8762         esac
8763         ;;
8764 (.no|.NONE/*)
8765         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8766         ;;
8767 (*)
8768         { { echo "$as_me:8768: error: expected a pathname, not \"$cf_src_path\"" >&5
8769 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8770    { (exit 1); exit 1; }; }
8771         ;;
8772 esac
8773
8774   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8775   cf_dst_path="${cf_dst_path}${cf_src_path}"
8776 done
8777 IFS="$ac_save_ifs"
8778
8779 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8780 # so we have to check/work around.  We do prefer the result of "eval"...
8781 eval cf_dst_eval="$cf_dst_path"
8782 case "x$cf_dst_eval" in
8783 (xNONE*)
8784         TERMINFO_DIRS=$cf_dst_path
8785         ;;
8786 (*)
8787         TERMINFO_DIRS="$cf_dst_eval"
8788         ;;
8789 esac
8790
8791 echo "$as_me:8791: result: $TERMINFO_DIRS" >&5
8792 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8793 test -n "$TERMINFO_DIRS" &&
8794 cat >>confdefs.h <<EOF
8795 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8796 EOF
8797
8798 case "x$TERMINFO" in
8799 x???:*)
8800         { echo "$as_me:8800: WARNING: ignoring non-directory/file TERMINFO value" >&5
8801 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8802         unset TERMINFO
8803         ;;
8804 esac
8805
8806 echo "$as_me:8806: checking for default terminfo directory" >&5
8807 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8808
8809 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8810 if test "${with_default_terminfo_dir+set}" = set; then
8811   withval="$with_default_terminfo_dir"
8812
8813 else
8814   withval="${TERMINFO:-${datadir}/terminfo}"
8815 fi; if test -n "${datadir}/terminfo" ; then
8816
8817 if test "x$prefix" != xNONE; then
8818         cf_path_syntax="$prefix"
8819 else
8820         cf_path_syntax="$ac_default_prefix"
8821 fi
8822
8823 case ".$withval" in
8824 (.\$\(*\)*|.\'*\'*)
8825         ;;
8826 (..|./*|.\\*)
8827         ;;
8828 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8829         ;;
8830 (.\${*prefix}*|.\${*dir}*)
8831         eval withval="$withval"
8832         case ".$withval" in
8833         (.NONE/*)
8834                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8835                 ;;
8836         esac
8837         ;;
8838 (.no|.NONE/*)
8839         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8840         ;;
8841 (*)
8842         { { echo "$as_me:8842: error: expected a pathname, not \"$withval\"" >&5
8843 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8844    { (exit 1); exit 1; }; }
8845         ;;
8846 esac
8847
8848 fi
8849 eval TERMINFO="$withval"
8850
8851 echo "$as_me:8851: result: $TERMINFO" >&5
8852 echo "${ECHO_T}$TERMINFO" >&6
8853
8854 cat >>confdefs.h <<EOF
8855 #define TERMINFO "$TERMINFO"
8856 EOF
8857
8858 fi
8859
8860 ###     use option --disable-big-core to make tic run on small machines
8861 ###     We need 4Mb, check if we can allocate 50% more than that.
8862 echo "$as_me:8862: checking if big-core option selected" >&5
8863 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8864
8865 # Check whether --enable-big-core or --disable-big-core was given.
8866 if test "${enable_big_core+set}" = set; then
8867   enableval="$enable_big_core"
8868   with_big_core=$enableval
8869 else
8870   if test "$cross_compiling" = yes; then
8871   with_big_core=no
8872 else
8873   cat >conftest.$ac_ext <<_ACEOF
8874 #line 8874 "configure"
8875 #include "confdefs.h"
8876
8877 #include <stdlib.h>
8878 #include <string.h>
8879 int main() {
8880         unsigned long n = 6000000L;
8881         char *s = malloc(n);
8882         if (s != 0)
8883                 s[0] = s[n-1] = 0;
8884         ${cf_cv_main_return:-return}(s == 0);
8885 }
8886 _ACEOF
8887 rm -f conftest$ac_exeext
8888 if { (eval echo "$as_me:8888: \"$ac_link\"") >&5
8889   (eval $ac_link) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8893   { (eval echo "$as_me:8893: \"$ac_try\"") >&5
8894   (eval $ac_try) 2>&5
8895   ac_status=$?
8896   echo "$as_me:8896: \$? = $ac_status" >&5
8897   (exit $ac_status); }; }; then
8898   with_big_core=yes
8899 else
8900   echo "$as_me: program exited with status $ac_status" >&5
8901 echo "$as_me: failed program was:" >&5
8902 cat conftest.$ac_ext >&5
8903 with_big_core=no
8904 fi
8905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8906 fi
8907 fi;
8908 echo "$as_me:8908: result: $with_big_core" >&5
8909 echo "${ECHO_T}$with_big_core" >&6
8910 test "x$with_big_core" = "xyes" &&
8911 cat >>confdefs.h <<\EOF
8912 #define HAVE_BIG_CORE 1
8913 EOF
8914
8915 ### ISO C only guarantees 512-char strings, we have tables which load faster
8916 ### when constructed using "big" strings.  More than the C compiler, the awk
8917 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8918 echo "$as_me:8918: checking if big-strings option selected" >&5
8919 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8920
8921 # Check whether --enable-big-strings or --disable-big-strings was given.
8922 if test "${enable_big_strings+set}" = set; then
8923   enableval="$enable_big_strings"
8924   with_big_strings=$enableval
8925 else
8926
8927         case x$AWK in
8928         (x)
8929                 eval with_big_strings=no
8930                 ;;
8931         (*)
8932                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8933                         | $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
8934                         eval with_big_strings=yes
8935                 else
8936                         eval with_big_strings=no
8937                 fi
8938                 ;;
8939         esac
8940
8941 fi;
8942 echo "$as_me:8942: result: $with_big_strings" >&5
8943 echo "${ECHO_T}$with_big_strings" >&6
8944
8945 USE_BIG_STRINGS=0
8946 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8947
8948 ###     use option --enable-termcap to compile in the termcap fallback support
8949 echo "$as_me:8949: checking if you want termcap-fallback support" >&5
8950 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8951
8952 # Check whether --enable-termcap or --disable-termcap was given.
8953 if test "${enable_termcap+set}" = set; then
8954   enableval="$enable_termcap"
8955   with_termcap=$enableval
8956 else
8957   with_termcap=no
8958 fi;
8959 echo "$as_me:8959: result: $with_termcap" >&5
8960 echo "${ECHO_T}$with_termcap" >&6
8961
8962 NCURSES_USE_TERMCAP=0
8963 if test "x$with_termcap" != "xyes" ; then
8964         if test "$use_database" = no ; then
8965                 if test -z "$with_fallback" ; then
8966                         { { echo "$as_me:8966: error: You have disabled the database w/o specifying fallbacks" >&5
8967 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8968    { (exit 1); exit 1; }; }
8969                 fi
8970         fi
8971
8972 cat >>confdefs.h <<\EOF
8973 #define PURE_TERMINFO 1
8974 EOF
8975
8976 else
8977
8978         if test "$with_ticlib" != no ; then
8979                 { { echo "$as_me:8979: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8980 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8981    { (exit 1); exit 1; }; }
8982         fi
8983
8984         NCURSES_USE_TERMCAP=1
8985         echo "$as_me:8985: checking for list of termcap files" >&5
8986 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8987
8988 # Check whether --with-termpath or --without-termpath was given.
8989 if test "${with_termpath+set}" = set; then
8990   withval="$with_termpath"
8991
8992 else
8993   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8994 fi;
8995 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8996 cf_dst_path=
8997 for cf_src_path in $withval
8998 do
8999
9000 if test "x$prefix" != xNONE; then
9001         cf_path_syntax="$prefix"
9002 else
9003         cf_path_syntax="$ac_default_prefix"
9004 fi
9005
9006 case ".$cf_src_path" in
9007 (.\$\(*\)*|.\'*\'*)
9008         ;;
9009 (..|./*|.\\*)
9010         ;;
9011 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9012         ;;
9013 (.\${*prefix}*|.\${*dir}*)
9014         eval cf_src_path="$cf_src_path"
9015         case ".$cf_src_path" in
9016         (.NONE/*)
9017                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9018                 ;;
9019         esac
9020         ;;
9021 (.no|.NONE/*)
9022         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9023         ;;
9024 (*)
9025         { { echo "$as_me:9025: error: expected a pathname, not \"$cf_src_path\"" >&5
9026 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9027    { (exit 1); exit 1; }; }
9028         ;;
9029 esac
9030
9031   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9032   cf_dst_path="${cf_dst_path}${cf_src_path}"
9033 done
9034 IFS="$ac_save_ifs"
9035
9036 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9037 # so we have to check/work around.  We do prefer the result of "eval"...
9038 eval cf_dst_eval="$cf_dst_path"
9039 case "x$cf_dst_eval" in
9040 (xNONE*)
9041         TERMPATH=$cf_dst_path
9042         ;;
9043 (*)
9044         TERMPATH="$cf_dst_eval"
9045         ;;
9046 esac
9047
9048         echo "$as_me:9048: result: $TERMPATH" >&5
9049 echo "${ECHO_T}$TERMPATH" >&6
9050         test -n "$TERMPATH" &&
9051 cat >>confdefs.h <<EOF
9052 #define TERMPATH "$TERMPATH"
9053 EOF
9054
9055         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9056         echo "$as_me:9056: checking if fast termcap-loader is needed" >&5
9057 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9058
9059 # Check whether --enable-getcap or --disable-getcap was given.
9060 if test "${enable_getcap+set}" = set; then
9061   enableval="$enable_getcap"
9062   with_getcap=$enableval
9063 else
9064   with_getcap=no
9065 fi;
9066         echo "$as_me:9066: result: $with_getcap" >&5
9067 echo "${ECHO_T}$with_getcap" >&6
9068         test "x$with_getcap" = "xyes" &&
9069 cat >>confdefs.h <<\EOF
9070 #define USE_GETCAP 1
9071 EOF
9072
9073         echo "$as_me:9073: checking if translated termcaps will be cached in ~/.terminfo" >&5
9074 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9075
9076 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9077 if test "${enable_getcap_cache+set}" = set; then
9078   enableval="$enable_getcap_cache"
9079   with_getcap_cache=$enableval
9080 else
9081   with_getcap_cache=no
9082 fi;
9083         echo "$as_me:9083: result: $with_getcap_cache" >&5
9084 echo "${ECHO_T}$with_getcap_cache" >&6
9085         test "x$with_getcap_cache" = "xyes" &&
9086 cat >>confdefs.h <<\EOF
9087 #define USE_GETCAP_CACHE 1
9088 EOF
9089
9090 fi
9091
9092 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9093 echo "$as_me:9093: checking if ~/.terminfo is wanted" >&5
9094 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9095
9096 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9097 if test "${enable_home_terminfo+set}" = set; then
9098   enableval="$enable_home_terminfo"
9099   with_home_terminfo=$enableval
9100 else
9101   with_home_terminfo=yes
9102 fi;
9103 echo "$as_me:9103: result: $with_home_terminfo" >&5
9104 echo "${ECHO_T}$with_home_terminfo" >&6
9105 test "x$with_home_terminfo" = "xyes" &&
9106 cat >>confdefs.h <<\EOF
9107 #define USE_HOME_TERMINFO 1
9108 EOF
9109
9110 echo "$as_me:9110: checking if you want to use restricted environment when running as root" >&5
9111 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9112
9113 # Check whether --enable-root-environ or --disable-root-environ was given.
9114 if test "${enable_root_environ+set}" = set; then
9115   enableval="$enable_root_environ"
9116   with_root_environ=$enableval
9117 else
9118   with_root_environ=yes
9119 fi;
9120 echo "$as_me:9120: result: $with_root_environ" >&5
9121 echo "${ECHO_T}$with_root_environ" >&6
9122 test "x$with_root_environ" = xyes &&
9123 cat >>confdefs.h <<\EOF
9124 #define USE_ROOT_ENVIRON 1
9125 EOF
9126
9127 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9128 ###   to reduce storage requirements for the terminfo database.
9129
9130 for ac_header in \
9131 unistd.h \
9132
9133 do
9134 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9135 echo "$as_me:9135: checking for $ac_header" >&5
9136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9138   echo $ECHO_N "(cached) $ECHO_C" >&6
9139 else
9140   cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143 #include <$ac_header>
9144 _ACEOF
9145 if { (eval echo "$as_me:9145: \"$ac_cpp conftest.$ac_ext\"") >&5
9146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9147   ac_status=$?
9148   egrep -v '^ *\+' conftest.er1 >conftest.err
9149   rm -f conftest.er1
9150   cat conftest.err >&5
9151   echo "$as_me:9151: \$? = $ac_status" >&5
9152   (exit $ac_status); } >/dev/null; then
9153   if test -s conftest.err; then
9154     ac_cpp_err=$ac_c_preproc_warn_flag
9155   else
9156     ac_cpp_err=
9157   fi
9158 else
9159   ac_cpp_err=yes
9160 fi
9161 if test -z "$ac_cpp_err"; then
9162   eval "$as_ac_Header=yes"
9163 else
9164   echo "$as_me: failed program was:" >&5
9165   cat conftest.$ac_ext >&5
9166   eval "$as_ac_Header=no"
9167 fi
9168 rm -f conftest.err conftest.$ac_ext
9169 fi
9170 echo "$as_me:9170: result: `eval echo '${'$as_ac_Header'}'`" >&5
9171 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9172 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9173   cat >>confdefs.h <<EOF
9174 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9175 EOF
9176
9177 fi
9178 done
9179
9180 for ac_func in \
9181         remove \
9182         unlink
9183 do
9184 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9185 echo "$as_me:9185: checking for $ac_func" >&5
9186 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9187 if eval "test \"\${$as_ac_var+set}\" = set"; then
9188   echo $ECHO_N "(cached) $ECHO_C" >&6
9189 else
9190   cat >conftest.$ac_ext <<_ACEOF
9191 #line 9191 "configure"
9192 #include "confdefs.h"
9193 #define $ac_func autoconf_temporary
9194 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9195 #undef $ac_func
9196
9197 #ifdef __cplusplus
9198 extern "C"
9199 #endif
9200
9201 /* We use char because int might match the return type of a gcc2
9202    builtin and then its argument prototype would still apply.  */
9203 char $ac_func (void);
9204
9205 int
9206 main (void)
9207 {
9208
9209 /* The GNU C library defines stubs for functions which it implements
9210     to always fail with ENOSYS.  Some functions are actually named
9211     something starting with __ and the normal name is an alias.  */
9212 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9213 #error found stub for $ac_func
9214 #endif
9215
9216         return $ac_func ();
9217   ;
9218   return 0;
9219 }
9220 _ACEOF
9221 rm -f conftest.$ac_objext conftest$ac_exeext
9222 if { (eval echo "$as_me:9222: \"$ac_link\"") >&5
9223   (eval $ac_link) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); } &&
9227          { ac_try='test -s conftest$ac_exeext'
9228   { (eval echo "$as_me:9228: \"$ac_try\"") >&5
9229   (eval $ac_try) 2>&5
9230   ac_status=$?
9231   echo "$as_me:9231: \$? = $ac_status" >&5
9232   (exit $ac_status); }; }; then
9233   eval "$as_ac_var=yes"
9234 else
9235   echo "$as_me: failed program was:" >&5
9236 cat conftest.$ac_ext >&5
9237 eval "$as_ac_var=no"
9238 fi
9239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9240 fi
9241 echo "$as_me:9241: result: `eval echo '${'$as_ac_var'}'`" >&5
9242 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9243 if test `eval echo '${'$as_ac_var'}'` = yes; then
9244   cat >>confdefs.h <<EOF
9245 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9246 EOF
9247
9248 fi
9249 done
9250
9251 if test "$cross_compiling" = yes ; then
9252
9253 for ac_func in \
9254                 link \
9255                 symlink
9256 do
9257 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9258 echo "$as_me:9258: checking for $ac_func" >&5
9259 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9260 if eval "test \"\${$as_ac_var+set}\" = set"; then
9261   echo $ECHO_N "(cached) $ECHO_C" >&6
9262 else
9263   cat >conftest.$ac_ext <<_ACEOF
9264 #line 9264 "configure"
9265 #include "confdefs.h"
9266 #define $ac_func autoconf_temporary
9267 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9268 #undef $ac_func
9269
9270 #ifdef __cplusplus
9271 extern "C"
9272 #endif
9273
9274 /* We use char because int might match the return type of a gcc2
9275    builtin and then its argument prototype would still apply.  */
9276 char $ac_func (void);
9277
9278 int
9279 main (void)
9280 {
9281
9282 /* The GNU C library defines stubs for functions which it implements
9283     to always fail with ENOSYS.  Some functions are actually named
9284     something starting with __ and the normal name is an alias.  */
9285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9286 #error found stub for $ac_func
9287 #endif
9288
9289         return $ac_func ();
9290   ;
9291   return 0;
9292 }
9293 _ACEOF
9294 rm -f conftest.$ac_objext conftest$ac_exeext
9295 if { (eval echo "$as_me:9295: \"$ac_link\"") >&5
9296   (eval $ac_link) 2>&5
9297   ac_status=$?
9298   echo "$as_me:9298: \$? = $ac_status" >&5
9299   (exit $ac_status); } &&
9300          { ac_try='test -s conftest$ac_exeext'
9301   { (eval echo "$as_me:9301: \"$ac_try\"") >&5
9302   (eval $ac_try) 2>&5
9303   ac_status=$?
9304   echo "$as_me:9304: \$? = $ac_status" >&5
9305   (exit $ac_status); }; }; then
9306   eval "$as_ac_var=yes"
9307 else
9308   echo "$as_me: failed program was:" >&5
9309 cat conftest.$ac_ext >&5
9310 eval "$as_ac_var=no"
9311 fi
9312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9313 fi
9314 echo "$as_me:9314: result: `eval echo '${'$as_ac_var'}'`" >&5
9315 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9316 if test `eval echo '${'$as_ac_var'}'` = yes; then
9317   cat >>confdefs.h <<EOF
9318 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9319 EOF
9320
9321 fi
9322 done
9323
9324 else
9325         echo "$as_me:9325: checking if link/symlink functions work" >&5
9326 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9327 if test "${cf_cv_link_funcs+set}" = set; then
9328   echo $ECHO_N "(cached) $ECHO_C" >&6
9329 else
9330
9331                 cf_cv_link_funcs=
9332                 for cf_func in link symlink ; do
9333                         if test "$cross_compiling" = yes; then
9334
9335                         eval 'ac_cv_func_'$cf_func'=error'
9336 else
9337   cat >conftest.$ac_ext <<_ACEOF
9338 #line 9338 "configure"
9339 #include "confdefs.h"
9340
9341 #include <sys/types.h>
9342 #include <sys/stat.h>
9343 #ifdef HAVE_UNISTD_H
9344 #include <unistd.h>
9345 #endif
9346 int main(void)
9347 {
9348         int fail = 0;
9349         char *src = "config.log";
9350         char *dst = "conftest.chk";
9351         struct stat src_sb;
9352         struct stat dst_sb;
9353
9354         stat(src, &src_sb);
9355         fail = ($cf_func("config.log", "conftest.chk") < 0)
9356             || (stat(dst, &dst_sb) < 0)
9357             || (dst_sb.st_mtime != src_sb.st_mtime);
9358 #ifdef HAVE_UNLINK
9359         unlink(dst);
9360 #else
9361         remove(dst);
9362 #endif
9363         ${cf_cv_main_return:-return} (fail);
9364 }
9365
9366 _ACEOF
9367 rm -f conftest$ac_exeext
9368 if { (eval echo "$as_me:9368: \"$ac_link\"") >&5
9369   (eval $ac_link) 2>&5
9370   ac_status=$?
9371   echo "$as_me:9371: \$? = $ac_status" >&5
9372   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378
9379                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9380                         eval 'ac_cv_func_'$cf_func'=yes'
9381 else
9382   echo "$as_me: program exited with status $ac_status" >&5
9383 echo "$as_me: failed program was:" >&5
9384 cat conftest.$ac_ext >&5
9385
9386                         eval 'ac_cv_func_'$cf_func'=no'
9387 fi
9388 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9389 fi
9390                 done
9391                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9392
9393 fi
9394 echo "$as_me:9394: result: $cf_cv_link_funcs" >&5
9395 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9396         test "$ac_cv_func_link"    = yes &&
9397 cat >>confdefs.h <<\EOF
9398 #define HAVE_LINK 1
9399 EOF
9400
9401         test "$ac_cv_func_symlink" = yes &&
9402 cat >>confdefs.h <<\EOF
9403 #define HAVE_SYMLINK 1
9404 EOF
9405
9406 fi
9407
9408 with_links=no
9409 with_symlinks=no
9410
9411 # soft links (symbolic links) are useful for some systems where hard links do
9412 # not work, or to make it simpler to copy terminfo trees around.
9413 if test "x$ac_cv_func_symlink" = xyes ; then
9414         echo "$as_me:9414: checking if tic should use symbolic links" >&5
9415 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9416
9417 # Check whether --enable-symlinks or --disable-symlinks was given.
9418 if test "${enable_symlinks+set}" = set; then
9419   enableval="$enable_symlinks"
9420   with_symlinks=$enableval
9421 else
9422   with_symlinks=no
9423 fi;
9424         echo "$as_me:9424: result: $with_symlinks" >&5
9425 echo "${ECHO_T}$with_symlinks" >&6
9426 fi
9427
9428 # If we have hard links and did not choose to use soft links instead, there is
9429 # no reason to make this choice optional - use the hard links.
9430 if test "$with_symlinks" = no ; then
9431         echo "$as_me:9431: checking if tic should use hard links" >&5
9432 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9433         if test "x$ac_cv_func_link" = xyes ; then
9434                 with_links=yes
9435         else
9436                 with_links=no
9437         fi
9438         echo "$as_me:9438: result: $with_links" >&5
9439 echo "${ECHO_T}$with_links" >&6
9440 fi
9441
9442 test "x$with_links" = xyes &&
9443 cat >>confdefs.h <<\EOF
9444 #define USE_LINKS 1
9445 EOF
9446
9447 test "x$with_symlinks" = xyes &&
9448 cat >>confdefs.h <<\EOF
9449 #define USE_SYMLINKS 1
9450 EOF
9451
9452 ###   use option --enable-broken-linker to force on use of broken-linker support
9453
9454 echo "$as_me:9454: checking if you want broken-linker support code" >&5
9455 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9456
9457 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9458 if test "${enable_broken_linker+set}" = set; then
9459   enableval="$enable_broken_linker"
9460   with_broken_linker=$enableval
9461 else
9462   with_broken_linker=no
9463 fi;
9464 echo "$as_me:9464: result: $with_broken_linker" >&5
9465 echo "${ECHO_T}$with_broken_linker" >&6
9466
9467 : ${BROKEN_LINKER:=0}
9468 if test "x$with_broken_linker" = xyes ; then
9469
9470 cat >>confdefs.h <<\EOF
9471 #define BROKEN_LINKER 1
9472 EOF
9473
9474         BROKEN_LINKER=1
9475 fi
9476
9477 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9478 echo "$as_me:9478: checking if tputs should process BSD-style prefix padding" >&5
9479 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9480
9481 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9482 if test "${enable_bsdpad+set}" = set; then
9483   enableval="$enable_bsdpad"
9484   with_bsdpad=$enableval
9485 else
9486   with_bsdpad=no
9487 fi;
9488 echo "$as_me:9488: result: $with_bsdpad" >&5
9489 echo "${ECHO_T}$with_bsdpad" >&6
9490 test "x$with_bsdpad" = xyes &&
9491 cat >>confdefs.h <<\EOF
9492 #define BSD_TPUTS 1
9493 EOF
9494
9495 ###   use option --enable-widec to turn on use of wide-character support
9496 NCURSES_CH_T=chtype
9497 NCURSES_LIBUTF8=0
9498
9499 NEED_WCHAR_H=0
9500 NCURSES_MBSTATE_T=0
9501 NCURSES_WCHAR_T=0
9502 NCURSES_WINT_T=0
9503
9504 # Check to define _XOPEN_SOURCE "automatically"
9505 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9506
9507 echo "$as_me:9507: checking if the POSIX test-macros are already defined" >&5
9508 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9509 if test "${cf_cv_posix_visible+set}" = set; then
9510   echo $ECHO_N "(cached) $ECHO_C" >&6
9511 else
9512
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516 #include <stdio.h>
9517 int
9518 main (void)
9519 {
9520
9521 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9522         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9523         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9524         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9525 #error conflicting symbols found
9526 #endif
9527
9528   ;
9529   return 0;
9530 }
9531 _ACEOF
9532 rm -f conftest.$ac_objext
9533 if { (eval echo "$as_me:9533: \"$ac_compile\"") >&5
9534   (eval $ac_compile) 2>&5
9535   ac_status=$?
9536   echo "$as_me:9536: \$? = $ac_status" >&5
9537   (exit $ac_status); } &&
9538          { ac_try='test -s conftest.$ac_objext'
9539   { (eval echo "$as_me:9539: \"$ac_try\"") >&5
9540   (eval $ac_try) 2>&5
9541   ac_status=$?
9542   echo "$as_me:9542: \$? = $ac_status" >&5
9543   (exit $ac_status); }; }; then
9544   cf_cv_posix_visible=no
9545 else
9546   echo "$as_me: failed program was:" >&5
9547 cat conftest.$ac_ext >&5
9548 cf_cv_posix_visible=yes
9549 fi
9550 rm -f conftest.$ac_objext conftest.$ac_ext
9551
9552 fi
9553 echo "$as_me:9553: result: $cf_cv_posix_visible" >&5
9554 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9555
9556 if test "$cf_cv_posix_visible" = no; then
9557
9558 cf_XOPEN_SOURCE=600
9559 cf_POSIX_C_SOURCE=199506L
9560 cf_xopen_source=
9561
9562 case $host_os in
9563 (aix[4-7]*)
9564         cf_xopen_source="-D_ALL_SOURCE"
9565         ;;
9566 (msys)
9567         cf_XOPEN_SOURCE=600
9568         ;;
9569 (darwin[0-8].*)
9570         cf_xopen_source="-D_APPLE_C_SOURCE"
9571         ;;
9572 (darwin*)
9573         cf_xopen_source="-D_DARWIN_C_SOURCE"
9574         cf_XOPEN_SOURCE=
9575         ;;
9576 (freebsd*|dragonfly*|midnightbsd*)
9577         # 5.x headers associate
9578         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9579         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9580         cf_POSIX_C_SOURCE=200112L
9581         cf_XOPEN_SOURCE=600
9582         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9583         ;;
9584 (hpux11*)
9585         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9586         ;;
9587 (hpux*)
9588         cf_xopen_source="-D_HPUX_SOURCE"
9589         ;;
9590 (irix[56].*)
9591         cf_xopen_source="-D_SGI_SOURCE"
9592         cf_XOPEN_SOURCE=
9593         ;;
9594 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9595
9596 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9597
9598 echo "$as_me:9598: checking if this is the GNU C library" >&5
9599 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9600 if test "${cf_cv_gnu_library+set}" = set; then
9601   echo $ECHO_N "(cached) $ECHO_C" >&6
9602 else
9603
9604 cat >conftest.$ac_ext <<_ACEOF
9605 #line 9605 "configure"
9606 #include "confdefs.h"
9607 #include <sys/types.h>
9608 int
9609 main (void)
9610 {
9611
9612         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9613                 return 0;
9614         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9615                 return 0;
9616         #else
9617         #       error not GNU C library
9618         #endif
9619   ;
9620   return 0;
9621 }
9622 _ACEOF
9623 rm -f conftest.$ac_objext
9624 if { (eval echo "$as_me:9624: \"$ac_compile\"") >&5
9625   (eval $ac_compile) 2>&5
9626   ac_status=$?
9627   echo "$as_me:9627: \$? = $ac_status" >&5
9628   (exit $ac_status); } &&
9629          { ac_try='test -s conftest.$ac_objext'
9630   { (eval echo "$as_me:9630: \"$ac_try\"") >&5
9631   (eval $ac_try) 2>&5
9632   ac_status=$?
9633   echo "$as_me:9633: \$? = $ac_status" >&5
9634   (exit $ac_status); }; }; then
9635   cf_cv_gnu_library=yes
9636 else
9637   echo "$as_me: failed program was:" >&5
9638 cat conftest.$ac_ext >&5
9639 cf_cv_gnu_library=no
9640 fi
9641 rm -f conftest.$ac_objext conftest.$ac_ext
9642
9643 fi
9644 echo "$as_me:9644: result: $cf_cv_gnu_library" >&5
9645 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9646
9647 if test x$cf_cv_gnu_library = xyes; then
9648
9649         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9650         # was changed to help a little.  newlib incorporated the change about 4
9651         # years later.
9652         echo "$as_me:9652: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9653 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9654 if test "${cf_cv_gnu_library_219+set}" = set; then
9655   echo $ECHO_N "(cached) $ECHO_C" >&6
9656 else
9657
9658                 cf_save="$CPPFLAGS"
9659
9660         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9661         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9662
9663                 cat >conftest.$ac_ext <<_ACEOF
9664 #line 9664 "configure"
9665 #include "confdefs.h"
9666 #include <sys/types.h>
9667 int
9668 main (void)
9669 {
9670
9671                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9672                                 return 0;
9673                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9674                                 return 0;
9675                         #else
9676                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9677                         #endif
9678   ;
9679   return 0;
9680 }
9681 _ACEOF
9682 rm -f conftest.$ac_objext
9683 if { (eval echo "$as_me:9683: \"$ac_compile\"") >&5
9684   (eval $ac_compile) 2>&5
9685   ac_status=$?
9686   echo "$as_me:9686: \$? = $ac_status" >&5
9687   (exit $ac_status); } &&
9688          { ac_try='test -s conftest.$ac_objext'
9689   { (eval echo "$as_me:9689: \"$ac_try\"") >&5
9690   (eval $ac_try) 2>&5
9691   ac_status=$?
9692   echo "$as_me:9692: \$? = $ac_status" >&5
9693   (exit $ac_status); }; }; then
9694   cf_cv_gnu_library_219=yes
9695 else
9696   echo "$as_me: failed program was:" >&5
9697 cat conftest.$ac_ext >&5
9698 cf_cv_gnu_library_219=no
9699 fi
9700 rm -f conftest.$ac_objext conftest.$ac_ext
9701                 CPPFLAGS="$cf_save"
9702
9703 fi
9704 echo "$as_me:9704: result: $cf_cv_gnu_library_219" >&5
9705 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9706
9707         if test "x$cf_cv_gnu_library_219" = xyes; then
9708                 cf_save="$CPPFLAGS"
9709                 echo "$as_me:9709: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9710 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9711 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9712   echo $ECHO_N "(cached) $ECHO_C" >&6
9713 else
9714
9715 cf_fix_cppflags=no
9716 cf_new_cflags=
9717 cf_new_cppflags=
9718 cf_new_extra_cppflags=
9719
9720 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9721 do
9722 case $cf_fix_cppflags in
9723 (no)
9724         case $cf_add_cflags in
9725         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9726                 case $cf_add_cflags in
9727                 (-D*)
9728                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9729
9730                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9731                                 && test -z "${cf_tst_cflags}" \
9732                                 && cf_fix_cppflags=yes
9733
9734                         if test $cf_fix_cppflags = yes ; then
9735
9736         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9737         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9738
9739                                 continue
9740                         elif test "${cf_tst_cflags}" = "\"'" ; then
9741
9742         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9743         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9744
9745                                 continue
9746                         fi
9747                         ;;
9748                 esac
9749                 case "$CPPFLAGS" in
9750                 (*$cf_add_cflags)
9751                         ;;
9752                 (*)
9753                         case $cf_add_cflags in
9754                         (-D*)
9755                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9756
9757 CPPFLAGS=`echo "$CPPFLAGS" | \
9758         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9759                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9760
9761                                 ;;
9762                         esac
9763
9764         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9765         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9766
9767                         ;;
9768                 esac
9769                 ;;
9770         (*)
9771
9772         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9773         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9774
9775                 ;;
9776         esac
9777         ;;
9778 (yes)
9779
9780         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9781         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9782
9783         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9784
9785         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9786                 && test -z "${cf_tst_cflags}" \
9787                 && cf_fix_cppflags=no
9788         ;;
9789 esac
9790 done
9791
9792 if test -n "$cf_new_cflags" ; then
9793
9794         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9795         CFLAGS="${CFLAGS}$cf_new_cflags"
9796
9797 fi
9798
9799 if test -n "$cf_new_cppflags" ; then
9800
9801         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9802         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9803
9804 fi
9805
9806 if test -n "$cf_new_extra_cppflags" ; then
9807
9808         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9809         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9810
9811 fi
9812
9813                         cat >conftest.$ac_ext <<_ACEOF
9814 #line 9814 "configure"
9815 #include "confdefs.h"
9816
9817                                 #include <limits.h>
9818                                 #include <sys/types.h>
9819
9820 int
9821 main (void)
9822 {
9823
9824                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9825                                         return 0;
9826                                 #else
9827                                 #       error GNU C library is too old
9828                                 #endif
9829   ;
9830   return 0;
9831 }
9832 _ACEOF
9833 rm -f conftest.$ac_objext
9834 if { (eval echo "$as_me:9834: \"$ac_compile\"") >&5
9835   (eval $ac_compile) 2>&5
9836   ac_status=$?
9837   echo "$as_me:9837: \$? = $ac_status" >&5
9838   (exit $ac_status); } &&
9839          { ac_try='test -s conftest.$ac_objext'
9840   { (eval echo "$as_me:9840: \"$ac_try\"") >&5
9841   (eval $ac_try) 2>&5
9842   ac_status=$?
9843   echo "$as_me:9843: \$? = $ac_status" >&5
9844   (exit $ac_status); }; }; then
9845   cf_cv_gnu_dftsrc_219=yes
9846 else
9847   echo "$as_me: failed program was:" >&5
9848 cat conftest.$ac_ext >&5
9849 cf_cv_gnu_dftsrc_219=no
9850 fi
9851 rm -f conftest.$ac_objext conftest.$ac_ext
9852
9853 fi
9854 echo "$as_me:9854: result: $cf_cv_gnu_dftsrc_219" >&5
9855 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9856                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9857         else
9858                 cf_cv_gnu_dftsrc_219=maybe
9859         fi
9860
9861         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9862
9863                 echo "$as_me:9863: checking if we must define _GNU_SOURCE" >&5
9864 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9865 if test "${cf_cv_gnu_source+set}" = set; then
9866   echo $ECHO_N "(cached) $ECHO_C" >&6
9867 else
9868
9869                 cat >conftest.$ac_ext <<_ACEOF
9870 #line 9870 "configure"
9871 #include "confdefs.h"
9872 #include <sys/types.h>
9873 int
9874 main (void)
9875 {
9876
9877                         #ifndef _XOPEN_SOURCE
9878                         #error  expected _XOPEN_SOURCE to be defined
9879                         #endif
9880   ;
9881   return 0;
9882 }
9883 _ACEOF
9884 rm -f conftest.$ac_objext
9885 if { (eval echo "$as_me:9885: \"$ac_compile\"") >&5
9886   (eval $ac_compile) 2>&5
9887   ac_status=$?
9888   echo "$as_me:9888: \$? = $ac_status" >&5
9889   (exit $ac_status); } &&
9890          { ac_try='test -s conftest.$ac_objext'
9891   { (eval echo "$as_me:9891: \"$ac_try\"") >&5
9892   (eval $ac_try) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); }; }; then
9896   cf_cv_gnu_source=no
9897 else
9898   echo "$as_me: failed program was:" >&5
9899 cat conftest.$ac_ext >&5
9900 cf_save="$CPPFLAGS"
9901
9902 cf_fix_cppflags=no
9903 cf_new_cflags=
9904 cf_new_cppflags=
9905 cf_new_extra_cppflags=
9906
9907 for cf_add_cflags in -D_GNU_SOURCE
9908 do
9909 case $cf_fix_cppflags in
9910 (no)
9911         case $cf_add_cflags in
9912         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9913                 case $cf_add_cflags in
9914                 (-D*)
9915                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9916
9917                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9918                                 && test -z "${cf_tst_cflags}" \
9919                                 && cf_fix_cppflags=yes
9920
9921                         if test $cf_fix_cppflags = yes ; then
9922
9923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9925
9926                                 continue
9927                         elif test "${cf_tst_cflags}" = "\"'" ; then
9928
9929         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9930         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9931
9932                                 continue
9933                         fi
9934                         ;;
9935                 esac
9936                 case "$CPPFLAGS" in
9937                 (*$cf_add_cflags)
9938                         ;;
9939                 (*)
9940                         case $cf_add_cflags in
9941                         (-D*)
9942                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9943
9944 CPPFLAGS=`echo "$CPPFLAGS" | \
9945         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9946                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9947
9948                                 ;;
9949                         esac
9950
9951         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9952         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9953
9954                         ;;
9955                 esac
9956                 ;;
9957         (*)
9958
9959         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9960         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9961
9962                 ;;
9963         esac
9964         ;;
9965 (yes)
9966
9967         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9968         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9969
9970         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9971
9972         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9973                 && test -z "${cf_tst_cflags}" \
9974                 && cf_fix_cppflags=no
9975         ;;
9976 esac
9977 done
9978
9979 if test -n "$cf_new_cflags" ; then
9980
9981         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9982         CFLAGS="${CFLAGS}$cf_new_cflags"
9983
9984 fi
9985
9986 if test -n "$cf_new_cppflags" ; then
9987
9988         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9989         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9990
9991 fi
9992
9993 if test -n "$cf_new_extra_cppflags" ; then
9994
9995         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9996         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9997
9998 fi
9999
10000                          cat >conftest.$ac_ext <<_ACEOF
10001 #line 10001 "configure"
10002 #include "confdefs.h"
10003 #include <sys/types.h>
10004 int
10005 main (void)
10006 {
10007
10008                                 #ifdef _XOPEN_SOURCE
10009                                 #error  expected _XOPEN_SOURCE to be undefined
10010                                 #endif
10011   ;
10012   return 0;
10013 }
10014 _ACEOF
10015 rm -f conftest.$ac_objext
10016 if { (eval echo "$as_me:10016: \"$ac_compile\"") >&5
10017   (eval $ac_compile) 2>&5
10018   ac_status=$?
10019   echo "$as_me:10019: \$? = $ac_status" >&5
10020   (exit $ac_status); } &&
10021          { ac_try='test -s conftest.$ac_objext'
10022   { (eval echo "$as_me:10022: \"$ac_try\"") >&5
10023   (eval $ac_try) 2>&5
10024   ac_status=$?
10025   echo "$as_me:10025: \$? = $ac_status" >&5
10026   (exit $ac_status); }; }; then
10027   cf_cv_gnu_source=no
10028 else
10029   echo "$as_me: failed program was:" >&5
10030 cat conftest.$ac_ext >&5
10031 cf_cv_gnu_source=yes
10032 fi
10033 rm -f conftest.$ac_objext conftest.$ac_ext
10034                         CPPFLAGS="$cf_save"
10035
10036 fi
10037 rm -f conftest.$ac_objext conftest.$ac_ext
10038
10039 fi
10040 echo "$as_me:10040: result: $cf_cv_gnu_source" >&5
10041 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10042
10043                 if test "$cf_cv_gnu_source" = yes
10044                 then
10045                 echo "$as_me:10045: checking if we should also define _DEFAULT_SOURCE" >&5
10046 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10047 if test "${cf_cv_default_source+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 else
10050
10051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10052         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10053
10054                         cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057 #include <sys/types.h>
10058 int
10059 main (void)
10060 {
10061
10062                                 #ifdef _DEFAULT_SOURCE
10063                                 #error  expected _DEFAULT_SOURCE to be undefined
10064                                 #endif
10065   ;
10066   return 0;
10067 }
10068 _ACEOF
10069 rm -f conftest.$ac_objext
10070 if { (eval echo "$as_me:10070: \"$ac_compile\"") >&5
10071   (eval $ac_compile) 2>&5
10072   ac_status=$?
10073   echo "$as_me:10073: \$? = $ac_status" >&5
10074   (exit $ac_status); } &&
10075          { ac_try='test -s conftest.$ac_objext'
10076   { (eval echo "$as_me:10076: \"$ac_try\"") >&5
10077   (eval $ac_try) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); }; }; then
10081   cf_cv_default_source=no
10082 else
10083   echo "$as_me: failed program was:" >&5
10084 cat conftest.$ac_ext >&5
10085 cf_cv_default_source=yes
10086 fi
10087 rm -f conftest.$ac_objext conftest.$ac_ext
10088
10089 fi
10090 echo "$as_me:10090: result: $cf_cv_default_source" >&5
10091 echo "${ECHO_T}$cf_cv_default_source" >&6
10092                         if test "$cf_cv_default_source" = yes
10093                         then
10094
10095         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10096         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10097
10098                         fi
10099                 fi
10100         fi
10101
10102 fi
10103
10104         ;;
10105 (minix*)
10106         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10107         ;;
10108 (mirbsd*)
10109         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10110         cf_XOPEN_SOURCE=
10111
10112 if test "$cf_cv_posix_visible" = no; then
10113
10114 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10115
10116 cf_save_CFLAGS="$CFLAGS"
10117 cf_save_CPPFLAGS="$CPPFLAGS"
10118
10119 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10120         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10121                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10122
10123 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10124         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10125                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10126
10127 echo "$as_me:10127: checking if we should define _POSIX_C_SOURCE" >&5
10128 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10129 if test "${cf_cv_posix_c_source+set}" = set; then
10130   echo $ECHO_N "(cached) $ECHO_C" >&6
10131 else
10132
10133 echo "${as_me:-configure}:10133: testing if the symbol is already defined go no further ..." 1>&5
10134
10135         cat >conftest.$ac_ext <<_ACEOF
10136 #line 10136 "configure"
10137 #include "confdefs.h"
10138 #include <sys/types.h>
10139 int
10140 main (void)
10141 {
10142
10143 #ifndef _POSIX_C_SOURCE
10144 make an error
10145 #endif
10146   ;
10147   return 0;
10148 }
10149 _ACEOF
10150 rm -f conftest.$ac_objext
10151 if { (eval echo "$as_me:10151: \"$ac_compile\"") >&5
10152   (eval $ac_compile) 2>&5
10153   ac_status=$?
10154   echo "$as_me:10154: \$? = $ac_status" >&5
10155   (exit $ac_status); } &&
10156          { ac_try='test -s conftest.$ac_objext'
10157   { (eval echo "$as_me:10157: \"$ac_try\"") >&5
10158   (eval $ac_try) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit $ac_status); }; }; then
10162   cf_cv_posix_c_source=no
10163 else
10164   echo "$as_me: failed program was:" >&5
10165 cat conftest.$ac_ext >&5
10166 cf_want_posix_source=no
10167          case .$cf_POSIX_C_SOURCE in
10168          (.[12]??*)
10169                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10170                 ;;
10171          (.2)
10172                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10173                 cf_want_posix_source=yes
10174                 ;;
10175          (.*)
10176                 cf_want_posix_source=yes
10177                 ;;
10178          esac
10179          if test "$cf_want_posix_source" = yes ; then
10180                 cat >conftest.$ac_ext <<_ACEOF
10181 #line 10181 "configure"
10182 #include "confdefs.h"
10183 #include <sys/types.h>
10184 int
10185 main (void)
10186 {
10187
10188 #ifdef _POSIX_SOURCE
10189 make an error
10190 #endif
10191   ;
10192   return 0;
10193 }
10194 _ACEOF
10195 rm -f conftest.$ac_objext
10196 if { (eval echo "$as_me:10196: \"$ac_compile\"") >&5
10197   (eval $ac_compile) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit $ac_status); } &&
10201          { ac_try='test -s conftest.$ac_objext'
10202   { (eval echo "$as_me:10202: \"$ac_try\"") >&5
10203   (eval $ac_try) 2>&5
10204   ac_status=$?
10205   echo "$as_me:10205: \$? = $ac_status" >&5
10206   (exit $ac_status); }; }; then
10207   :
10208 else
10209   echo "$as_me: failed program was:" >&5
10210 cat conftest.$ac_ext >&5
10211 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10212 fi
10213 rm -f conftest.$ac_objext conftest.$ac_ext
10214          fi
10215
10216 echo "${as_me:-configure}:10216: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10217
10218          CFLAGS="$cf_trim_CFLAGS"
10219          CPPFLAGS="$cf_trim_CPPFLAGS"
10220
10221         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10222         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10223
10224 echo "${as_me:-configure}:10224: testing if the second compile does not leave our definition intact error ..." 1>&5
10225
10226          cat >conftest.$ac_ext <<_ACEOF
10227 #line 10227 "configure"
10228 #include "confdefs.h"
10229 #include <sys/types.h>
10230 int
10231 main (void)
10232 {
10233
10234 #ifndef _POSIX_C_SOURCE
10235 make an error
10236 #endif
10237   ;
10238   return 0;
10239 }
10240 _ACEOF
10241 rm -f conftest.$ac_objext
10242 if { (eval echo "$as_me:10242: \"$ac_compile\"") >&5
10243   (eval $ac_compile) 2>&5
10244   ac_status=$?
10245   echo "$as_me:10245: \$? = $ac_status" >&5
10246   (exit $ac_status); } &&
10247          { ac_try='test -s conftest.$ac_objext'
10248   { (eval echo "$as_me:10248: \"$ac_try\"") >&5
10249   (eval $ac_try) 2>&5
10250   ac_status=$?
10251   echo "$as_me:10251: \$? = $ac_status" >&5
10252   (exit $ac_status); }; }; then
10253   :
10254 else
10255   echo "$as_me: failed program was:" >&5
10256 cat conftest.$ac_ext >&5
10257 cf_cv_posix_c_source=no
10258 fi
10259 rm -f conftest.$ac_objext conftest.$ac_ext
10260          CFLAGS="$cf_save_CFLAGS"
10261          CPPFLAGS="$cf_save_CPPFLAGS"
10262
10263 fi
10264 rm -f conftest.$ac_objext conftest.$ac_ext
10265
10266 fi
10267 echo "$as_me:10267: result: $cf_cv_posix_c_source" >&5
10268 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10269
10270 if test "$cf_cv_posix_c_source" != no ; then
10271         CFLAGS="$cf_trim_CFLAGS"
10272         CPPFLAGS="$cf_trim_CPPFLAGS"
10273
10274 cf_fix_cppflags=no
10275 cf_new_cflags=
10276 cf_new_cppflags=
10277 cf_new_extra_cppflags=
10278
10279 for cf_add_cflags in $cf_cv_posix_c_source
10280 do
10281 case $cf_fix_cppflags in
10282 (no)
10283         case $cf_add_cflags in
10284         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10285                 case $cf_add_cflags in
10286                 (-D*)
10287                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10288
10289                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10290                                 && test -z "${cf_tst_cflags}" \
10291                                 && cf_fix_cppflags=yes
10292
10293                         if test $cf_fix_cppflags = yes ; then
10294
10295         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10296         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10297
10298                                 continue
10299                         elif test "${cf_tst_cflags}" = "\"'" ; then
10300
10301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10303
10304                                 continue
10305                         fi
10306                         ;;
10307                 esac
10308                 case "$CPPFLAGS" in
10309                 (*$cf_add_cflags)
10310                         ;;
10311                 (*)
10312                         case $cf_add_cflags in
10313                         (-D*)
10314                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10315
10316 CPPFLAGS=`echo "$CPPFLAGS" | \
10317         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10318                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10319
10320                                 ;;
10321                         esac
10322
10323         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10324         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10325
10326                         ;;
10327                 esac
10328                 ;;
10329         (*)
10330
10331         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10332         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10333
10334                 ;;
10335         esac
10336         ;;
10337 (yes)
10338
10339         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10340         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10341
10342         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10343
10344         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10345                 && test -z "${cf_tst_cflags}" \
10346                 && cf_fix_cppflags=no
10347         ;;
10348 esac
10349 done
10350
10351 if test -n "$cf_new_cflags" ; then
10352
10353         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10354         CFLAGS="${CFLAGS}$cf_new_cflags"
10355
10356 fi
10357
10358 if test -n "$cf_new_cppflags" ; then
10359
10360         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10361         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10362
10363 fi
10364
10365 if test -n "$cf_new_extra_cppflags" ; then
10366
10367         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10368         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10369
10370 fi
10371
10372 fi
10373
10374 fi # cf_cv_posix_visible
10375
10376         ;;
10377 (netbsd*)
10378         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10379         ;;
10380 (openbsd[4-9]*)
10381         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10382         cf_xopen_source="-D_BSD_SOURCE"
10383         cf_XOPEN_SOURCE=600
10384         ;;
10385 (openbsd*)
10386         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10387         ;;
10388 (osf[45]*)
10389         cf_xopen_source="-D_OSF_SOURCE"
10390         ;;
10391 (nto-qnx*)
10392         cf_xopen_source="-D_QNX_SOURCE"
10393         ;;
10394 (sco*)
10395         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10396         ;;
10397 (solaris2.*)
10398         cf_xopen_source="-D__EXTENSIONS__"
10399         cf_cv_xopen_source=broken
10400         ;;
10401 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10402         cf_XOPEN_SOURCE=
10403         cf_POSIX_C_SOURCE=
10404         ;;
10405 (*)
10406
10407 echo "$as_me:10407: checking if we should define _XOPEN_SOURCE" >&5
10408 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10409 if test "${cf_cv_xopen_source+set}" = set; then
10410   echo $ECHO_N "(cached) $ECHO_C" >&6
10411 else
10412
10413         cat >conftest.$ac_ext <<_ACEOF
10414 #line 10414 "configure"
10415 #include "confdefs.h"
10416
10417 #include <stdlib.h>
10418 #include <string.h>
10419 #include <sys/types.h>
10420
10421 int
10422 main (void)
10423 {
10424
10425 #ifndef _XOPEN_SOURCE
10426 make an error
10427 #endif
10428   ;
10429   return 0;
10430 }
10431 _ACEOF
10432 rm -f conftest.$ac_objext
10433 if { (eval echo "$as_me:10433: \"$ac_compile\"") >&5
10434   (eval $ac_compile) 2>&5
10435   ac_status=$?
10436   echo "$as_me:10436: \$? = $ac_status" >&5
10437   (exit $ac_status); } &&
10438          { ac_try='test -s conftest.$ac_objext'
10439   { (eval echo "$as_me:10439: \"$ac_try\"") >&5
10440   (eval $ac_try) 2>&5
10441   ac_status=$?
10442   echo "$as_me:10442: \$? = $ac_status" >&5
10443   (exit $ac_status); }; }; then
10444   cf_cv_xopen_source=no
10445 else
10446   echo "$as_me: failed program was:" >&5
10447 cat conftest.$ac_ext >&5
10448 cf_save="$CPPFLAGS"
10449
10450         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10451         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10452
10453          cat >conftest.$ac_ext <<_ACEOF
10454 #line 10454 "configure"
10455 #include "confdefs.h"
10456
10457 #include <stdlib.h>
10458 #include <string.h>
10459 #include <sys/types.h>
10460
10461 int
10462 main (void)
10463 {
10464
10465 #ifdef _XOPEN_SOURCE
10466 make an error
10467 #endif
10468   ;
10469   return 0;
10470 }
10471 _ACEOF
10472 rm -f conftest.$ac_objext
10473 if { (eval echo "$as_me:10473: \"$ac_compile\"") >&5
10474   (eval $ac_compile) 2>&5
10475   ac_status=$?
10476   echo "$as_me:10476: \$? = $ac_status" >&5
10477   (exit $ac_status); } &&
10478          { ac_try='test -s conftest.$ac_objext'
10479   { (eval echo "$as_me:10479: \"$ac_try\"") >&5
10480   (eval $ac_try) 2>&5
10481   ac_status=$?
10482   echo "$as_me:10482: \$? = $ac_status" >&5
10483   (exit $ac_status); }; }; then
10484   cf_cv_xopen_source=no
10485 else
10486   echo "$as_me: failed program was:" >&5
10487 cat conftest.$ac_ext >&5
10488 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10489 fi
10490 rm -f conftest.$ac_objext conftest.$ac_ext
10491         CPPFLAGS="$cf_save"
10492
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495
10496 fi
10497 echo "$as_me:10497: result: $cf_cv_xopen_source" >&5
10498 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10499
10500 if test "$cf_cv_xopen_source" != no ; then
10501
10502 CFLAGS=`echo "$CFLAGS" | \
10503         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10504                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10505
10506 CPPFLAGS=`echo "$CPPFLAGS" | \
10507         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10508                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10509
10510         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10511
10512 cf_fix_cppflags=no
10513 cf_new_cflags=
10514 cf_new_cppflags=
10515 cf_new_extra_cppflags=
10516
10517 for cf_add_cflags in $cf_temp_xopen_source
10518 do
10519 case $cf_fix_cppflags in
10520 (no)
10521         case $cf_add_cflags in
10522         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10523                 case $cf_add_cflags in
10524                 (-D*)
10525                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10526
10527                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10528                                 && test -z "${cf_tst_cflags}" \
10529                                 && cf_fix_cppflags=yes
10530
10531                         if test $cf_fix_cppflags = yes ; then
10532
10533         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10534         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10535
10536                                 continue
10537                         elif test "${cf_tst_cflags}" = "\"'" ; then
10538
10539         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10540         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10541
10542                                 continue
10543                         fi
10544                         ;;
10545                 esac
10546                 case "$CPPFLAGS" in
10547                 (*$cf_add_cflags)
10548                         ;;
10549                 (*)
10550                         case $cf_add_cflags in
10551                         (-D*)
10552                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10553
10554 CPPFLAGS=`echo "$CPPFLAGS" | \
10555         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10556                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10557
10558                                 ;;
10559                         esac
10560
10561         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10562         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10563
10564                         ;;
10565                 esac
10566                 ;;
10567         (*)
10568
10569         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10570         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10571
10572                 ;;
10573         esac
10574         ;;
10575 (yes)
10576
10577         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10578         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10579
10580         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10581
10582         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10583                 && test -z "${cf_tst_cflags}" \
10584                 && cf_fix_cppflags=no
10585         ;;
10586 esac
10587 done
10588
10589 if test -n "$cf_new_cflags" ; then
10590
10591         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10592         CFLAGS="${CFLAGS}$cf_new_cflags"
10593
10594 fi
10595
10596 if test -n "$cf_new_cppflags" ; then
10597
10598         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10599         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10600
10601 fi
10602
10603 if test -n "$cf_new_extra_cppflags" ; then
10604
10605         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10606         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10607
10608 fi
10609
10610 fi
10611
10612 if test "$cf_cv_posix_visible" = no; then
10613
10614 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10615
10616 cf_save_CFLAGS="$CFLAGS"
10617 cf_save_CPPFLAGS="$CPPFLAGS"
10618
10619 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10620         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10621                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10622
10623 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10624         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10625                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10626
10627 echo "$as_me:10627: checking if we should define _POSIX_C_SOURCE" >&5
10628 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10629 if test "${cf_cv_posix_c_source+set}" = set; then
10630   echo $ECHO_N "(cached) $ECHO_C" >&6
10631 else
10632
10633 echo "${as_me:-configure}:10633: testing if the symbol is already defined go no further ..." 1>&5
10634
10635         cat >conftest.$ac_ext <<_ACEOF
10636 #line 10636 "configure"
10637 #include "confdefs.h"
10638 #include <sys/types.h>
10639 int
10640 main (void)
10641 {
10642
10643 #ifndef _POSIX_C_SOURCE
10644 make an error
10645 #endif
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 rm -f conftest.$ac_objext
10651 if { (eval echo "$as_me:10651: \"$ac_compile\"") >&5
10652   (eval $ac_compile) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); } &&
10656          { ac_try='test -s conftest.$ac_objext'
10657   { (eval echo "$as_me:10657: \"$ac_try\"") >&5
10658   (eval $ac_try) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit $ac_status); }; }; then
10662   cf_cv_posix_c_source=no
10663 else
10664   echo "$as_me: failed program was:" >&5
10665 cat conftest.$ac_ext >&5
10666 cf_want_posix_source=no
10667          case .$cf_POSIX_C_SOURCE in
10668          (.[12]??*)
10669                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10670                 ;;
10671          (.2)
10672                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10673                 cf_want_posix_source=yes
10674                 ;;
10675          (.*)
10676                 cf_want_posix_source=yes
10677                 ;;
10678          esac
10679          if test "$cf_want_posix_source" = yes ; then
10680                 cat >conftest.$ac_ext <<_ACEOF
10681 #line 10681 "configure"
10682 #include "confdefs.h"
10683 #include <sys/types.h>
10684 int
10685 main (void)
10686 {
10687
10688 #ifdef _POSIX_SOURCE
10689 make an error
10690 #endif
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 rm -f conftest.$ac_objext
10696 if { (eval echo "$as_me:10696: \"$ac_compile\"") >&5
10697   (eval $ac_compile) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); } &&
10701          { ac_try='test -s conftest.$ac_objext'
10702   { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703   (eval $ac_try) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); }; }; then
10707   :
10708 else
10709   echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10712 fi
10713 rm -f conftest.$ac_objext conftest.$ac_ext
10714          fi
10715
10716 echo "${as_me:-configure}:10716: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10717
10718          CFLAGS="$cf_trim_CFLAGS"
10719          CPPFLAGS="$cf_trim_CPPFLAGS"
10720
10721         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10722         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10723
10724 echo "${as_me:-configure}:10724: testing if the second compile does not leave our definition intact error ..." 1>&5
10725
10726          cat >conftest.$ac_ext <<_ACEOF
10727 #line 10727 "configure"
10728 #include "confdefs.h"
10729 #include <sys/types.h>
10730 int
10731 main (void)
10732 {
10733
10734 #ifndef _POSIX_C_SOURCE
10735 make an error
10736 #endif
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 rm -f conftest.$ac_objext
10742 if { (eval echo "$as_me:10742: \"$ac_compile\"") >&5
10743   (eval $ac_compile) 2>&5
10744   ac_status=$?
10745   echo "$as_me:10745: \$? = $ac_status" >&5
10746   (exit $ac_status); } &&
10747          { ac_try='test -s conftest.$ac_objext'
10748   { (eval echo "$as_me:10748: \"$ac_try\"") >&5
10749   (eval $ac_try) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); }; }; then
10753   :
10754 else
10755   echo "$as_me: failed program was:" >&5
10756 cat conftest.$ac_ext >&5
10757 cf_cv_posix_c_source=no
10758 fi
10759 rm -f conftest.$ac_objext conftest.$ac_ext
10760          CFLAGS="$cf_save_CFLAGS"
10761          CPPFLAGS="$cf_save_CPPFLAGS"
10762
10763 fi
10764 rm -f conftest.$ac_objext conftest.$ac_ext
10765
10766 fi
10767 echo "$as_me:10767: result: $cf_cv_posix_c_source" >&5
10768 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10769
10770 if test "$cf_cv_posix_c_source" != no ; then
10771         CFLAGS="$cf_trim_CFLAGS"
10772         CPPFLAGS="$cf_trim_CPPFLAGS"
10773
10774 cf_fix_cppflags=no
10775 cf_new_cflags=
10776 cf_new_cppflags=
10777 cf_new_extra_cppflags=
10778
10779 for cf_add_cflags in $cf_cv_posix_c_source
10780 do
10781 case $cf_fix_cppflags in
10782 (no)
10783         case $cf_add_cflags in
10784         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10785                 case $cf_add_cflags in
10786                 (-D*)
10787                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10788
10789                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10790                                 && test -z "${cf_tst_cflags}" \
10791                                 && cf_fix_cppflags=yes
10792
10793                         if test $cf_fix_cppflags = yes ; then
10794
10795         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10796         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10797
10798                                 continue
10799                         elif test "${cf_tst_cflags}" = "\"'" ; then
10800
10801         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10802         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10803
10804                                 continue
10805                         fi
10806                         ;;
10807                 esac
10808                 case "$CPPFLAGS" in
10809                 (*$cf_add_cflags)
10810                         ;;
10811                 (*)
10812                         case $cf_add_cflags in
10813                         (-D*)
10814                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10815
10816 CPPFLAGS=`echo "$CPPFLAGS" | \
10817         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10818                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10819
10820                                 ;;
10821                         esac
10822
10823         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10824         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10825
10826                         ;;
10827                 esac
10828                 ;;
10829         (*)
10830
10831         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10832         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10833
10834                 ;;
10835         esac
10836         ;;
10837 (yes)
10838
10839         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10840         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10841
10842         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10843
10844         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10845                 && test -z "${cf_tst_cflags}" \
10846                 && cf_fix_cppflags=no
10847         ;;
10848 esac
10849 done
10850
10851 if test -n "$cf_new_cflags" ; then
10852
10853         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10854         CFLAGS="${CFLAGS}$cf_new_cflags"
10855
10856 fi
10857
10858 if test -n "$cf_new_cppflags" ; then
10859
10860         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10861         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10862
10863 fi
10864
10865 if test -n "$cf_new_extra_cppflags" ; then
10866
10867         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10868         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10869
10870 fi
10871
10872 fi
10873
10874 fi # cf_cv_posix_visible
10875
10876         ;;
10877 esac
10878
10879 if test -n "$cf_xopen_source" ; then
10880
10881 cf_fix_cppflags=no
10882 cf_new_cflags=
10883 cf_new_cppflags=
10884 cf_new_extra_cppflags=
10885
10886 for cf_add_cflags in $cf_xopen_source
10887 do
10888 case $cf_fix_cppflags in
10889 (no)
10890         case $cf_add_cflags in
10891         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10892                 case $cf_add_cflags in
10893                 (-D*)
10894                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10895
10896                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10897                                 && test -z "${cf_tst_cflags}" \
10898                                 && cf_fix_cppflags=yes
10899
10900                         if test $cf_fix_cppflags = yes ; then
10901
10902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10904
10905                                 continue
10906                         elif test "${cf_tst_cflags}" = "\"'" ; then
10907
10908         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10909         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10910
10911                                 continue
10912                         fi
10913                         ;;
10914                 esac
10915                 case "$CPPFLAGS" in
10916                 (*$cf_add_cflags)
10917                         ;;
10918                 (*)
10919                         case $cf_add_cflags in
10920                         (-D*)
10921                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10922
10923 CPPFLAGS=`echo "$CPPFLAGS" | \
10924         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10925                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10926
10927                                 ;;
10928                         esac
10929
10930         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10931         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10932
10933                         ;;
10934                 esac
10935                 ;;
10936         (*)
10937
10938         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10939         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10940
10941                 ;;
10942         esac
10943         ;;
10944 (yes)
10945
10946         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10947         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10948
10949         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10950
10951         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10952                 && test -z "${cf_tst_cflags}" \
10953                 && cf_fix_cppflags=no
10954         ;;
10955 esac
10956 done
10957
10958 if test -n "$cf_new_cflags" ; then
10959         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10960
10961 echo "${as_me:-configure}:10961: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10962
10963         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10964         CFLAGS="${CFLAGS}$cf_new_cflags"
10965
10966 fi
10967
10968 if test -n "$cf_new_cppflags" ; then
10969         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10970
10971 echo "${as_me:-configure}:10971: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10972
10973         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10974         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10975
10976 fi
10977
10978 if test -n "$cf_new_extra_cppflags" ; then
10979         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10980
10981 echo "${as_me:-configure}:10981: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10982
10983         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10984         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10985
10986 fi
10987
10988 fi
10989
10990 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10991         echo "$as_me:10991: checking if _XOPEN_SOURCE really is set" >&5
10992 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10993         cat >conftest.$ac_ext <<_ACEOF
10994 #line 10994 "configure"
10995 #include "confdefs.h"
10996 #include <stdlib.h>
10997 int
10998 main (void)
10999 {
11000
11001 #ifndef _XOPEN_SOURCE
11002 make an error
11003 #endif
11004   ;
11005   return 0;
11006 }
11007 _ACEOF
11008 rm -f conftest.$ac_objext
11009 if { (eval echo "$as_me:11009: \"$ac_compile\"") >&5
11010   (eval $ac_compile) 2>&5
11011   ac_status=$?
11012   echo "$as_me:11012: \$? = $ac_status" >&5
11013   (exit $ac_status); } &&
11014          { ac_try='test -s conftest.$ac_objext'
11015   { (eval echo "$as_me:11015: \"$ac_try\"") >&5
11016   (eval $ac_try) 2>&5
11017   ac_status=$?
11018   echo "$as_me:11018: \$? = $ac_status" >&5
11019   (exit $ac_status); }; }; then
11020   cf_XOPEN_SOURCE_set=yes
11021 else
11022   echo "$as_me: failed program was:" >&5
11023 cat conftest.$ac_ext >&5
11024 cf_XOPEN_SOURCE_set=no
11025 fi
11026 rm -f conftest.$ac_objext conftest.$ac_ext
11027         echo "$as_me:11027: result: $cf_XOPEN_SOURCE_set" >&5
11028 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11029         if test $cf_XOPEN_SOURCE_set = yes
11030         then
11031                 cat >conftest.$ac_ext <<_ACEOF
11032 #line 11032 "configure"
11033 #include "confdefs.h"
11034 #include <stdlib.h>
11035 int
11036 main (void)
11037 {
11038
11039 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11040 make an error
11041 #endif
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 rm -f conftest.$ac_objext
11047 if { (eval echo "$as_me:11047: \"$ac_compile\"") >&5
11048   (eval $ac_compile) 2>&5
11049   ac_status=$?
11050   echo "$as_me:11050: \$? = $ac_status" >&5
11051   (exit $ac_status); } &&
11052          { ac_try='test -s conftest.$ac_objext'
11053   { (eval echo "$as_me:11053: \"$ac_try\"") >&5
11054   (eval $ac_try) 2>&5
11055   ac_status=$?
11056   echo "$as_me:11056: \$? = $ac_status" >&5
11057   (exit $ac_status); }; }; then
11058   cf_XOPEN_SOURCE_set_ok=yes
11059 else
11060   echo "$as_me: failed program was:" >&5
11061 cat conftest.$ac_ext >&5
11062 cf_XOPEN_SOURCE_set_ok=no
11063 fi
11064 rm -f conftest.$ac_objext conftest.$ac_ext
11065                 if test $cf_XOPEN_SOURCE_set_ok = no
11066                 then
11067                         { echo "$as_me:11067: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11068 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11069                 fi
11070         else
11071
11072 echo "$as_me:11072: checking if we should define _XOPEN_SOURCE" >&5
11073 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11074 if test "${cf_cv_xopen_source+set}" = set; then
11075   echo $ECHO_N "(cached) $ECHO_C" >&6
11076 else
11077
11078         cat >conftest.$ac_ext <<_ACEOF
11079 #line 11079 "configure"
11080 #include "confdefs.h"
11081
11082 #include <stdlib.h>
11083 #include <string.h>
11084 #include <sys/types.h>
11085
11086 int
11087 main (void)
11088 {
11089
11090 #ifndef _XOPEN_SOURCE
11091 make an error
11092 #endif
11093   ;
11094   return 0;
11095 }
11096 _ACEOF
11097 rm -f conftest.$ac_objext
11098 if { (eval echo "$as_me:11098: \"$ac_compile\"") >&5
11099   (eval $ac_compile) 2>&5
11100   ac_status=$?
11101   echo "$as_me:11101: \$? = $ac_status" >&5
11102   (exit $ac_status); } &&
11103          { ac_try='test -s conftest.$ac_objext'
11104   { (eval echo "$as_me:11104: \"$ac_try\"") >&5
11105   (eval $ac_try) 2>&5
11106   ac_status=$?
11107   echo "$as_me:11107: \$? = $ac_status" >&5
11108   (exit $ac_status); }; }; then
11109   cf_cv_xopen_source=no
11110 else
11111   echo "$as_me: failed program was:" >&5
11112 cat conftest.$ac_ext >&5
11113 cf_save="$CPPFLAGS"
11114
11115         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11116         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11117
11118          cat >conftest.$ac_ext <<_ACEOF
11119 #line 11119 "configure"
11120 #include "confdefs.h"
11121
11122 #include <stdlib.h>
11123 #include <string.h>
11124 #include <sys/types.h>
11125
11126 int
11127 main (void)
11128 {
11129
11130 #ifdef _XOPEN_SOURCE
11131 make an error
11132 #endif
11133   ;
11134   return 0;
11135 }
11136 _ACEOF
11137 rm -f conftest.$ac_objext
11138 if { (eval echo "$as_me:11138: \"$ac_compile\"") >&5
11139   (eval $ac_compile) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); } &&
11143          { ac_try='test -s conftest.$ac_objext'
11144   { (eval echo "$as_me:11144: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit $ac_status); }; }; then
11149   cf_cv_xopen_source=no
11150 else
11151   echo "$as_me: failed program was:" >&5
11152 cat conftest.$ac_ext >&5
11153 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11154 fi
11155 rm -f conftest.$ac_objext conftest.$ac_ext
11156         CPPFLAGS="$cf_save"
11157
11158 fi
11159 rm -f conftest.$ac_objext conftest.$ac_ext
11160
11161 fi
11162 echo "$as_me:11162: result: $cf_cv_xopen_source" >&5
11163 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11164
11165 if test "$cf_cv_xopen_source" != no ; then
11166
11167 CFLAGS=`echo "$CFLAGS" | \
11168         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11169                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11170
11171 CPPFLAGS=`echo "$CPPFLAGS" | \
11172         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11173                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11174
11175         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11176
11177 cf_fix_cppflags=no
11178 cf_new_cflags=
11179 cf_new_cppflags=
11180 cf_new_extra_cppflags=
11181
11182 for cf_add_cflags in $cf_temp_xopen_source
11183 do
11184 case $cf_fix_cppflags in
11185 (no)
11186         case $cf_add_cflags in
11187         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11188                 case $cf_add_cflags in
11189                 (-D*)
11190                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11191
11192                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11193                                 && test -z "${cf_tst_cflags}" \
11194                                 && cf_fix_cppflags=yes
11195
11196                         if test $cf_fix_cppflags = yes ; then
11197
11198         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11199         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11200
11201                                 continue
11202                         elif test "${cf_tst_cflags}" = "\"'" ; then
11203
11204         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11205         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11206
11207                                 continue
11208                         fi
11209                         ;;
11210                 esac
11211                 case "$CPPFLAGS" in
11212                 (*$cf_add_cflags)
11213                         ;;
11214                 (*)
11215                         case $cf_add_cflags in
11216                         (-D*)
11217                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11218
11219 CPPFLAGS=`echo "$CPPFLAGS" | \
11220         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11221                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11222
11223                                 ;;
11224                         esac
11225
11226         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11227         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11228
11229                         ;;
11230                 esac
11231                 ;;
11232         (*)
11233
11234         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11235         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11236
11237                 ;;
11238         esac
11239         ;;
11240 (yes)
11241
11242         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11243         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11244
11245         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11246
11247         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11248                 && test -z "${cf_tst_cflags}" \
11249                 && cf_fix_cppflags=no
11250         ;;
11251 esac
11252 done
11253
11254 if test -n "$cf_new_cflags" ; then
11255
11256         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11257         CFLAGS="${CFLAGS}$cf_new_cflags"
11258
11259 fi
11260
11261 if test -n "$cf_new_cppflags" ; then
11262
11263         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11264         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11265
11266 fi
11267
11268 if test -n "$cf_new_extra_cppflags" ; then
11269
11270         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11271         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11272
11273 fi
11274
11275 fi
11276
11277         fi
11278 fi
11279 fi # cf_cv_posix_visible
11280
11281 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11282
11283 # Work around breakage on OS X
11284
11285 echo "$as_me:11285: checking if SIGWINCH is defined" >&5
11286 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11287 if test "${cf_cv_define_sigwinch+set}" = set; then
11288   echo $ECHO_N "(cached) $ECHO_C" >&6
11289 else
11290
11291         cat >conftest.$ac_ext <<_ACEOF
11292 #line 11292 "configure"
11293 #include "confdefs.h"
11294
11295 #include <sys/types.h>
11296 #include <sys/signal.h>
11297
11298 int
11299 main (void)
11300 {
11301 int x = SIGWINCH; (void)x
11302   ;
11303   return 0;
11304 }
11305 _ACEOF
11306 rm -f conftest.$ac_objext
11307 if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5
11308   (eval $ac_compile) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit $ac_status); } &&
11312          { ac_try='test -s conftest.$ac_objext'
11313   { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314   (eval $ac_try) 2>&5
11315   ac_status=$?
11316   echo "$as_me:11316: \$? = $ac_status" >&5
11317   (exit $ac_status); }; }; then
11318   cf_cv_define_sigwinch=yes
11319 else
11320   echo "$as_me: failed program was:" >&5
11321 cat conftest.$ac_ext >&5
11322 cat >conftest.$ac_ext <<_ACEOF
11323 #line 11323 "configure"
11324 #include "confdefs.h"
11325
11326 #undef _XOPEN_SOURCE
11327 #undef _POSIX_SOURCE
11328 #undef _POSIX_C_SOURCE
11329 #include <sys/types.h>
11330 #include <sys/signal.h>
11331
11332 int
11333 main (void)
11334 {
11335 int x = SIGWINCH; (void)x
11336   ;
11337   return 0;
11338 }
11339 _ACEOF
11340 rm -f conftest.$ac_objext
11341 if { (eval echo "$as_me:11341: \"$ac_compile\"") >&5
11342   (eval $ac_compile) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit $ac_status); } &&
11346          { ac_try='test -s conftest.$ac_objext'
11347   { (eval echo "$as_me:11347: \"$ac_try\"") >&5
11348   (eval $ac_try) 2>&5
11349   ac_status=$?
11350   echo "$as_me:11350: \$? = $ac_status" >&5
11351   (exit $ac_status); }; }; then
11352   cf_cv_define_sigwinch=maybe
11353 else
11354   echo "$as_me: failed program was:" >&5
11355 cat conftest.$ac_ext >&5
11356 cf_cv_define_sigwinch=no
11357 fi
11358 rm -f conftest.$ac_objext conftest.$ac_ext
11359
11360 fi
11361 rm -f conftest.$ac_objext conftest.$ac_ext
11362
11363 fi
11364 echo "$as_me:11364: result: $cf_cv_define_sigwinch" >&5
11365 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11366
11367 if test "$cf_cv_define_sigwinch" = maybe ; then
11368 echo "$as_me:11368: checking for actual SIGWINCH definition" >&5
11369 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11370 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11371   echo $ECHO_N "(cached) $ECHO_C" >&6
11372 else
11373
11374 cf_cv_fixup_sigwinch=unknown
11375 cf_sigwinch=32
11376 while test $cf_sigwinch != 1
11377 do
11378         cat >conftest.$ac_ext <<_ACEOF
11379 #line 11379 "configure"
11380 #include "confdefs.h"
11381
11382 #undef _XOPEN_SOURCE
11383 #undef _POSIX_SOURCE
11384 #undef _POSIX_C_SOURCE
11385 #include <sys/types.h>
11386 #include <sys/signal.h>
11387
11388 int
11389 main (void)
11390 {
11391
11392 #if SIGWINCH != $cf_sigwinch
11393 make an error
11394 #endif
11395 int x = SIGWINCH; (void)x
11396   ;
11397   return 0;
11398 }
11399 _ACEOF
11400 rm -f conftest.$ac_objext
11401 if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
11402   (eval $ac_compile) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit $ac_status); } &&
11406          { ac_try='test -s conftest.$ac_objext'
11407   { (eval echo "$as_me:11407: \"$ac_try\"") >&5
11408   (eval $ac_try) 2>&5
11409   ac_status=$?
11410   echo "$as_me:11410: \$? = $ac_status" >&5
11411   (exit $ac_status); }; }; then
11412   cf_cv_fixup_sigwinch=$cf_sigwinch
11413          break
11414 else
11415   echo "$as_me: failed program was:" >&5
11416 cat conftest.$ac_ext >&5
11417 fi
11418 rm -f conftest.$ac_objext conftest.$ac_ext
11419
11420 cf_sigwinch=`expr $cf_sigwinch - 1`
11421 done
11422
11423 fi
11424 echo "$as_me:11424: result: $cf_cv_fixup_sigwinch" >&5
11425 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11426
11427         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11428                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11429         fi
11430 fi
11431
11432 # Checks for CODESET support.
11433
11434 echo "$as_me:11434: checking for nl_langinfo and CODESET" >&5
11435 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11436 if test "${am_cv_langinfo_codeset+set}" = set; then
11437   echo $ECHO_N "(cached) $ECHO_C" >&6
11438 else
11439   cat >conftest.$ac_ext <<_ACEOF
11440 #line 11440 "configure"
11441 #include "confdefs.h"
11442 #include <langinfo.h>
11443 int
11444 main (void)
11445 {
11446 char* cs = nl_langinfo(CODESET); (void)cs
11447   ;
11448   return 0;
11449 }
11450 _ACEOF
11451 rm -f conftest.$ac_objext conftest$ac_exeext
11452 if { (eval echo "$as_me:11452: \"$ac_link\"") >&5
11453   (eval $ac_link) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit $ac_status); } &&
11457          { ac_try='test -s conftest$ac_exeext'
11458   { (eval echo "$as_me:11458: \"$ac_try\"") >&5
11459   (eval $ac_try) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); }; }; then
11463   am_cv_langinfo_codeset=yes
11464 else
11465   echo "$as_me: failed program was:" >&5
11466 cat conftest.$ac_ext >&5
11467 am_cv_langinfo_codeset=no
11468 fi
11469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11470
11471 fi
11472 echo "$as_me:11472: result: $am_cv_langinfo_codeset" >&5
11473 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11474         if test $am_cv_langinfo_codeset = yes; then
11475
11476 cat >>confdefs.h <<\EOF
11477 #define HAVE_LANGINFO_CODESET 1
11478 EOF
11479
11480         fi
11481
11482 # use these variables to work around a defect in gcc's fixincludes.
11483 NCURSES_OK_WCHAR_T=
11484 NCURSES_OK_WINT_T=
11485
11486 echo "$as_me:11486: checking if you want wide-character code" >&5
11487 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11488
11489 # Check whether --enable-widec or --disable-widec was given.
11490 if test "${enable_widec+set}" = set; then
11491   enableval="$enable_widec"
11492   with_widec=$enableval
11493 else
11494   with_widec=no
11495 fi;
11496 echo "$as_me:11496: result: $with_widec" >&5
11497 echo "${ECHO_T}$with_widec" >&6
11498
11499 NCURSES_WCWIDTH_GRAPHICS=1
11500
11501 if test "x$with_widec" = xyes ; then
11502         if test "x$disable_lib_suffixes" = xno ; then
11503                 LIB_SUFFIX="w${LIB_SUFFIX}"
11504         fi
11505
11506 cat >>confdefs.h <<\EOF
11507 #define USE_WIDEC_SUPPORT 1
11508 EOF
11509
11510 cat >>confdefs.h <<\EOF
11511 #define NCURSES_WIDECHAR 1
11512 EOF
11513
11514 for ac_header in \
11515 wchar.h \
11516 wctype.h \
11517
11518 do
11519 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11520 echo "$as_me:11520: checking for $ac_header" >&5
11521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11523   echo $ECHO_N "(cached) $ECHO_C" >&6
11524 else
11525   cat >conftest.$ac_ext <<_ACEOF
11526 #line 11526 "configure"
11527 #include "confdefs.h"
11528 #include <$ac_header>
11529 _ACEOF
11530 if { (eval echo "$as_me:11530: \"$ac_cpp conftest.$ac_ext\"") >&5
11531   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11532   ac_status=$?
11533   egrep -v '^ *\+' conftest.er1 >conftest.err
11534   rm -f conftest.er1
11535   cat conftest.err >&5
11536   echo "$as_me:11536: \$? = $ac_status" >&5
11537   (exit $ac_status); } >/dev/null; then
11538   if test -s conftest.err; then
11539     ac_cpp_err=$ac_c_preproc_warn_flag
11540   else
11541     ac_cpp_err=
11542   fi
11543 else
11544   ac_cpp_err=yes
11545 fi
11546 if test -z "$ac_cpp_err"; then
11547   eval "$as_ac_Header=yes"
11548 else
11549   echo "$as_me: failed program was:" >&5
11550   cat conftest.$ac_ext >&5
11551   eval "$as_ac_Header=no"
11552 fi
11553 rm -f conftest.err conftest.$ac_ext
11554 fi
11555 echo "$as_me:11555: result: `eval echo '${'$as_ac_Header'}'`" >&5
11556 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11557 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11558   cat >>confdefs.h <<EOF
11559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11560 EOF
11561
11562 fi
11563 done
11564
11565 echo "$as_me:11565: checking if wchar.h can be used as is" >&5
11566 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11567 if test "${cf_cv_wchar_h_okay+set}" = set; then
11568   echo $ECHO_N "(cached) $ECHO_C" >&6
11569 else
11570
11571 cat >conftest.$ac_ext <<_ACEOF
11572 #line 11572 "configure"
11573 #include "confdefs.h"
11574
11575 #include <stdlib.h>
11576 #ifdef HAVE_WCHAR_H
11577 #include <wchar.h>
11578 #endif
11579 #ifdef HAVE_WCTYPE_H
11580 #include <wctype.h>
11581 #endif
11582
11583 int
11584 main (void)
11585 {
11586
11587         wint_t foo = 0;
11588         int bar = iswpunct(foo)
11589   ;
11590   return 0;
11591 }
11592 _ACEOF
11593 rm -f conftest.$ac_objext
11594 if { (eval echo "$as_me:11594: \"$ac_compile\"") >&5
11595   (eval $ac_compile) 2>&5
11596   ac_status=$?
11597   echo "$as_me:11597: \$? = $ac_status" >&5
11598   (exit $ac_status); } &&
11599          { ac_try='test -s conftest.$ac_objext'
11600   { (eval echo "$as_me:11600: \"$ac_try\"") >&5
11601   (eval $ac_try) 2>&5
11602   ac_status=$?
11603   echo "$as_me:11603: \$? = $ac_status" >&5
11604   (exit $ac_status); }; }; then
11605   cf_cv_wchar_h_okay=yes
11606 else
11607   echo "$as_me: failed program was:" >&5
11608 cat conftest.$ac_ext >&5
11609 cf_cv_wchar_h_okay=no
11610 fi
11611 rm -f conftest.$ac_objext conftest.$ac_ext
11612 fi
11613 echo "$as_me:11613: result: $cf_cv_wchar_h_okay" >&5
11614 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11615
11616 if test $cf_cv_wchar_h_okay = no
11617 then
11618
11619 echo "$as_me:11619: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11620 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11621 cat >conftest.$ac_ext <<_ACEOF
11622 #line 11622 "configure"
11623 #include "confdefs.h"
11624 #include <sys/types.h>
11625
11626 int
11627 main (void)
11628 {
11629
11630 #ifndef _XOPEN_SOURCE_EXTENDED
11631 make an error
11632 #endif
11633   ;
11634   return 0;
11635 }
11636 _ACEOF
11637 rm -f conftest.$ac_objext
11638 if { (eval echo "$as_me:11638: \"$ac_compile\"") >&5
11639   (eval $ac_compile) 2>&5
11640   ac_status=$?
11641   echo "$as_me:11641: \$? = $ac_status" >&5
11642   (exit $ac_status); } &&
11643          { ac_try='test -s conftest.$ac_objext'
11644   { (eval echo "$as_me:11644: \"$ac_try\"") >&5
11645   (eval $ac_try) 2>&5
11646   ac_status=$?
11647   echo "$as_me:11647: \$? = $ac_status" >&5
11648   (exit $ac_status); }; }; then
11649   cf_result=no
11650 else
11651   echo "$as_me: failed program was:" >&5
11652 cat conftest.$ac_ext >&5
11653 cf_result=yes
11654 fi
11655 rm -f conftest.$ac_objext conftest.$ac_ext
11656 echo "$as_me:11656: result: $cf_result" >&5
11657 echo "${ECHO_T}$cf_result" >&6
11658
11659 if test "$cf_result" = yes ; then
11660         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11661 elif test "x" != "x" ; then
11662         echo "$as_me:11662: checking checking for compatible value versus " >&5
11663 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11664         cat >conftest.$ac_ext <<_ACEOF
11665 #line 11665 "configure"
11666 #include "confdefs.h"
11667 #include <sys/types.h>
11668
11669 int
11670 main (void)
11671 {
11672
11673 #if _XOPEN_SOURCE_EXTENDED- < 0
11674 make an error
11675 #endif
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f conftest.$ac_objext
11681 if { (eval echo "$as_me:11681: \"$ac_compile\"") >&5
11682   (eval $ac_compile) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit $ac_status); } &&
11686          { ac_try='test -s conftest.$ac_objext'
11687   { (eval echo "$as_me:11687: \"$ac_try\"") >&5
11688   (eval $ac_try) 2>&5
11689   ac_status=$?
11690   echo "$as_me:11690: \$? = $ac_status" >&5
11691   (exit $ac_status); }; }; then
11692   cf_result=yes
11693 else
11694   echo "$as_me: failed program was:" >&5
11695 cat conftest.$ac_ext >&5
11696 cf_result=no
11697 fi
11698 rm -f conftest.$ac_objext conftest.$ac_ext
11699         echo "$as_me:11699: result: $cf_result" >&5
11700 echo "${ECHO_T}$cf_result" >&6
11701         if test "$cf_result" = no ; then
11702                 # perhaps we can override it - try...
11703                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11704         fi
11705 fi
11706
11707 fi
11708
11709 echo "$as_me:11709: checking if wcwidth agrees graphics are single-width" >&5
11710 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11711 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11712   echo $ECHO_N "(cached) $ECHO_C" >&6
11713 else
11714
11715 cat >conftest.in <<CF_EOF
11716 -       VT100 symbols
11717 0x250c  upper left corner
11718 0x2514  lower left corner
11719 0x2510  upper right corner
11720 0x2518  lower right corner
11721 0x251c  tee pointing left
11722 0x2524  tee pointing right
11723 0x2534  tee pointing up
11724 0x252c  tee pointing down
11725 0x2500  horizontal line
11726 0x2502  vertical line
11727 0x253c  large plus or crossover
11728 0x23ba  scan line 1
11729 0x23bd  scan line 9
11730 0x25c6  diamond
11731 0x2592  checker board (stipple)
11732 0x00b0  degree symbol
11733 0x00b1  plus/minus
11734 0x00b7  bullet
11735 -       Teletype 5410v1 symbols
11736 0x2190  arrow pointing left
11737 0x2192  arrow pointing right
11738 0x2193  arrow pointing down
11739 0x2191  arrow pointing up
11740 0x2592  board of squares
11741 0x2603  lantern symbol
11742 0x25ae  solid square block
11743 -       these defaults were invented for ncurses
11744 0x23bb  scan line 3
11745 0x23bc  scan line 7
11746 0x2264  less-than-or-equal-to
11747 0x2265  greater-than-or-equal-to
11748 0x03c0  greek pi
11749 0x2260  not-equal
11750 0x00a3  pound-sterling symbol
11751 -       thick-line-drawing
11752 0x250f  upper left corner
11753 0x2517  lower left corner
11754 0x2513  upper right corner
11755 0x251b  lower right corner
11756 0x2523  tee pointing left
11757 0x252b  tee pointing right
11758 0x253b  tee pointing up
11759 0x2533  tee pointing down
11760 0x2501  horizontal line
11761 0x2503  vertical line
11762 0x254b  large plus or crossover
11763 -       double-line-drawing
11764 0x2554  upper left corner
11765 0x255a  lower left corner
11766 0x2557  upper right corner
11767 0x255d  lower right corner
11768 0x2563  tee pointing left
11769 0x2560  tee pointing right
11770 0x2569  tee pointing up
11771 0x2566  tee pointing down
11772 0x2550  horizontal line
11773 0x2551  vertical line
11774 0x256c  large plus or crossover
11775 CF_EOF
11776 if test "$cross_compiling" = yes; then
11777   cf_cv_wcwidth_graphics=unknown
11778 else
11779   cat >conftest.$ac_ext <<_ACEOF
11780 #line 11780 "configure"
11781 #include "confdefs.h"
11782
11783 #include <locale.h>
11784 #include <stdio.h>
11785 #include <wchar.h>
11786
11787 #define MY_LEN 80
11788
11789 int
11790 main(void)
11791 {
11792         FILE *fp;
11793         int value;
11794         char buffer[MY_LEN + 1];
11795         char notes[MY_LEN + 1];
11796         int totals = 0;
11797         int passed = 0;
11798
11799         if (setlocale(LC_ALL, "en_US.UTF8") ||
11800                 setlocale(LC_ALL, "en_US.UTF-8") ||
11801                 setlocale(LC_ALL, "en_US.utf8") ||
11802                 setlocale(LC_ALL, "en_US.utf-8")) {
11803                 if ((fp = fopen("conftest.in", "r")) != 0) {
11804                         while (fgets(buffer, MY_LEN, fp) != 0) {
11805                                 if (*buffer == '-') {
11806                                         fprintf(stderr, "\t%s", buffer);
11807                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11808                                         ++totals;
11809                                         if (wcwidth(value) == 1)
11810                                                 ++passed;
11811                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11812                                 } else {
11813                                         fprintf(stderr, "?\t%s", buffer);
11814                                 }
11815                         }
11816                 }
11817         }
11818         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11819         return (totals == passed) ? 0 : 1;
11820 }
11821
11822 _ACEOF
11823 rm -f conftest$ac_exeext
11824 if { (eval echo "$as_me:11824: \"$ac_link\"") >&5
11825   (eval $ac_link) 2>&5
11826   ac_status=$?
11827   echo "$as_me:11827: \$? = $ac_status" >&5
11828   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11829   { (eval echo "$as_me:11829: \"$ac_try\"") >&5
11830   (eval $ac_try) 2>&5
11831   ac_status=$?
11832   echo "$as_me:11832: \$? = $ac_status" >&5
11833   (exit $ac_status); }; }; then
11834   cf_cv_wcwidth_graphics=yes
11835 else
11836   echo "$as_me: program exited with status $ac_status" >&5
11837 echo "$as_me: failed program was:" >&5
11838 cat conftest.$ac_ext >&5
11839 cf_cv_wcwidth_graphics=no
11840 fi
11841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11842 fi
11843
11844 fi
11845 echo "$as_me:11845: result: $cf_cv_wcwidth_graphics" >&5
11846 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11847
11848         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11849
11850         # with_overwrite=no
11851         NCURSES_CH_T=cchar_t
11852
11853 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11854 do
11855 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11856 echo "$as_me:11856: checking for $ac_func" >&5
11857 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11858 if eval "test \"\${$as_ac_var+set}\" = set"; then
11859   echo $ECHO_N "(cached) $ECHO_C" >&6
11860 else
11861   cat >conftest.$ac_ext <<_ACEOF
11862 #line 11862 "configure"
11863 #include "confdefs.h"
11864 #define $ac_func autoconf_temporary
11865 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11866 #undef $ac_func
11867
11868 #ifdef __cplusplus
11869 extern "C"
11870 #endif
11871
11872 /* We use char because int might match the return type of a gcc2
11873    builtin and then its argument prototype would still apply.  */
11874 char $ac_func (void);
11875
11876 int
11877 main (void)
11878 {
11879
11880 /* The GNU C library defines stubs for functions which it implements
11881     to always fail with ENOSYS.  Some functions are actually named
11882     something starting with __ and the normal name is an alias.  */
11883 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11884 #error found stub for $ac_func
11885 #endif
11886
11887         return $ac_func ();
11888   ;
11889   return 0;
11890 }
11891 _ACEOF
11892 rm -f conftest.$ac_objext conftest$ac_exeext
11893 if { (eval echo "$as_me:11893: \"$ac_link\"") >&5
11894   (eval $ac_link) 2>&5
11895   ac_status=$?
11896   echo "$as_me:11896: \$? = $ac_status" >&5
11897   (exit $ac_status); } &&
11898          { ac_try='test -s conftest$ac_exeext'
11899   { (eval echo "$as_me:11899: \"$ac_try\"") >&5
11900   (eval $ac_try) 2>&5
11901   ac_status=$?
11902   echo "$as_me:11902: \$? = $ac_status" >&5
11903   (exit $ac_status); }; }; then
11904   eval "$as_ac_var=yes"
11905 else
11906   echo "$as_me: failed program was:" >&5
11907 cat conftest.$ac_ext >&5
11908 eval "$as_ac_var=no"
11909 fi
11910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11911 fi
11912 echo "$as_me:11912: result: `eval echo '${'$as_ac_var'}'`" >&5
11913 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11914 if test `eval echo '${'$as_ac_var'}'` = yes; then
11915   cat >>confdefs.h <<EOF
11916 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11917 EOF
11918
11919 fi
11920 done
11921
11922         if test "x$ac_cv_func_putwc" != xyes ; then
11923
11924 echo "$as_me:11924: checking for multibyte character support" >&5
11925 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11926 if test "${cf_cv_utf8_lib+set}" = set; then
11927   echo $ECHO_N "(cached) $ECHO_C" >&6
11928 else
11929
11930         cf_save_LIBS="$LIBS"
11931         cat >conftest.$ac_ext <<_ACEOF
11932 #line 11932 "configure"
11933 #include "confdefs.h"
11934
11935 #include <stdlib.h>
11936 int
11937 main (void)
11938 {
11939 putwc(0,0);
11940   ;
11941   return 0;
11942 }
11943 _ACEOF
11944 rm -f conftest.$ac_objext conftest$ac_exeext
11945 if { (eval echo "$as_me:11945: \"$ac_link\"") >&5
11946   (eval $ac_link) 2>&5
11947   ac_status=$?
11948   echo "$as_me:11948: \$? = $ac_status" >&5
11949   (exit $ac_status); } &&
11950          { ac_try='test -s conftest$ac_exeext'
11951   { (eval echo "$as_me:11951: \"$ac_try\"") >&5
11952   (eval $ac_try) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit $ac_status); }; }; then
11956   cf_cv_utf8_lib=yes
11957 else
11958   echo "$as_me: failed program was:" >&5
11959 cat conftest.$ac_ext >&5
11960
11961 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11962 # will be set on completion of the AC_TRY_LINK below.
11963 cf_cv_header_path_utf8=
11964 cf_cv_library_path_utf8=
11965
11966 echo "${as_me:-configure}:11966: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11967
11968 cf_save_LIBS="$LIBS"
11969
11970 cat >conftest.$ac_ext <<_ACEOF
11971 #line 11971 "configure"
11972 #include "confdefs.h"
11973
11974 #include <libutf8.h>
11975 int
11976 main (void)
11977 {
11978 putwc(0,0);
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext conftest$ac_exeext
11984 if { (eval echo "$as_me:11984: \"$ac_link\"") >&5
11985   (eval $ac_link) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -s conftest$ac_exeext'
11990   { (eval echo "$as_me:11990: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); }; }; then
11995
11996         cf_cv_find_linkage_utf8=yes
11997         cf_cv_header_path_utf8=/usr/include
11998         cf_cv_library_path_utf8=/usr/lib
11999
12000 else
12001   echo "$as_me: failed program was:" >&5
12002 cat conftest.$ac_ext >&5
12003
12004 LIBS="-lutf8  $cf_save_LIBS"
12005
12006 cat >conftest.$ac_ext <<_ACEOF
12007 #line 12007 "configure"
12008 #include "confdefs.h"
12009
12010 #include <libutf8.h>
12011 int
12012 main (void)
12013 {
12014 putwc(0,0);
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 rm -f conftest.$ac_objext conftest$ac_exeext
12020 if { (eval echo "$as_me:12020: \"$ac_link\"") >&5
12021   (eval $ac_link) 2>&5
12022   ac_status=$?
12023   echo "$as_me:12023: \$? = $ac_status" >&5
12024   (exit $ac_status); } &&
12025          { ac_try='test -s conftest$ac_exeext'
12026   { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027   (eval $ac_try) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); }; }; then
12031
12032         cf_cv_find_linkage_utf8=yes
12033         cf_cv_header_path_utf8=/usr/include
12034         cf_cv_library_path_utf8=/usr/lib
12035         cf_cv_library_file_utf8="-lutf8"
12036
12037 else
12038   echo "$as_me: failed program was:" >&5
12039 cat conftest.$ac_ext >&5
12040
12041         cf_cv_find_linkage_utf8=no
12042         LIBS="$cf_save_LIBS"
12043
12044         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12045
12046 echo "${as_me:-configure}:12046: testing find linkage for utf8 library ..." 1>&5
12047
12048 echo "${as_me:-configure}:12048: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12049
12050         cf_save_CPPFLAGS="$CPPFLAGS"
12051         cf_test_CPPFLAGS="$CPPFLAGS"
12052
12053 cf_search=
12054
12055 # collect the current set of include-directories from compiler flags
12056 cf_header_path_list=""
12057 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12058         for cf_header_path in $CPPFLAGS $CFLAGS
12059         do
12060                 case $cf_header_path in
12061                 (-I*)
12062                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12063
12064 test "x$cf_header_path" != "xNONE" && \
12065 test -d "$cf_header_path" && \
12066  {
12067         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12068         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12069         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12070         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12071         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12072         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12073 }
12074
12075                         cf_header_path_list="$cf_header_path_list $cf_search"
12076                         ;;
12077                 esac
12078         done
12079 fi
12080
12081 # add the variations for the package we are looking for
12082
12083 cf_search=
12084
12085 test "x$prefix" != "xNONE" && \
12086 test -d "$prefix" && \
12087  {
12088         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12089         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12090         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12091         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12092         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12093         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12094 }
12095
12096 for cf_subdir_prefix in \
12097         /usr \
12098         /usr/local \
12099         /usr/pkg \
12100         /opt \
12101         /opt/local \
12102         $HOME
12103 do
12104
12105 test "x$cf_subdir_prefix" != "x$prefix" && \
12106 test -d "$cf_subdir_prefix" && \
12107 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12108         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12109         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12110         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12111         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12112         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12113         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12114 }
12115
12116 done
12117
12118 test "$includedir" != NONE && \
12119 test "$includedir" != "/usr/include" && \
12120 test -d "$includedir" && {
12121         test -d $includedir &&    cf_search="$cf_search $includedir"
12122         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12123 }
12124
12125 test "$oldincludedir" != NONE && \
12126 test "$oldincludedir" != "/usr/include" && \
12127 test -d "$oldincludedir" && {
12128         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12129         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12130 }
12131
12132 cf_search="$cf_search $cf_header_path_list"
12133
12134         for cf_cv_header_path_utf8 in $cf_search
12135         do
12136                 if test -d $cf_cv_header_path_utf8 ; then
12137                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12138
12139 echo "${as_me:-configure}:12139: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12140
12141                         CPPFLAGS="$cf_save_CPPFLAGS"
12142
12143         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12144         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12145
12146                         cat >conftest.$ac_ext <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12149
12150 #include <libutf8.h>
12151 int
12152 main (void)
12153 {
12154 putwc(0,0);
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 rm -f conftest.$ac_objext
12160 if { (eval echo "$as_me:12160: \"$ac_compile\"") >&5
12161   (eval $ac_compile) 2>&5
12162   ac_status=$?
12163   echo "$as_me:12163: \$? = $ac_status" >&5
12164   (exit $ac_status); } &&
12165          { ac_try='test -s conftest.$ac_objext'
12166   { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167   (eval $ac_try) 2>&5
12168   ac_status=$?
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); }; }; then
12171
12172                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12173
12174 echo "${as_me:-configure}:12174: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12175
12176                                 cf_cv_find_linkage_utf8=maybe
12177                                 cf_test_CPPFLAGS="$CPPFLAGS"
12178                                 break
12179 else
12180   echo "$as_me: failed program was:" >&5
12181 cat conftest.$ac_ext >&5
12182
12183                                 CPPFLAGS="$cf_save_CPPFLAGS"
12184
12185 fi
12186 rm -f conftest.$ac_objext conftest.$ac_ext
12187                 fi
12188         done
12189
12190         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12191
12192 echo "${as_me:-configure}:12192: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12193
12194                 cf_save_LIBS="$LIBS"
12195                 cf_save_LDFLAGS="$LDFLAGS"
12196
12197                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12198
12199 cf_search=
12200 cf_library_path_list=""
12201 if test -n "${LDFLAGS}${LIBS}" ; then
12202         for cf_library_path in $LDFLAGS $LIBS
12203         do
12204                 case $cf_library_path in
12205                 (-L*)
12206                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12207
12208 test "x$cf_library_path" != "xNONE" && \
12209 test -d "$cf_library_path" && \
12210  {
12211         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12212         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12213         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12214         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12215         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12216         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12217 }
12218
12219                         cf_library_path_list="$cf_library_path_list $cf_search"
12220                         ;;
12221                 esac
12222         done
12223 fi
12224
12225 cf_search=
12226
12227 test "x$prefix" != "xNONE" && \
12228 test -d "$prefix" && \
12229  {
12230         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12231         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12232         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12233         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12234         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12235         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12236 }
12237
12238 for cf_subdir_prefix in \
12239         /usr \
12240         /usr/local \
12241         /usr/pkg \
12242         /opt \
12243         /opt/local \
12244         $HOME
12245 do
12246
12247 test "x$cf_subdir_prefix" != "x$prefix" && \
12248 test -d "$cf_subdir_prefix" && \
12249 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12250         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12251         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12252         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12253         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12254         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12255         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12256 }
12257
12258 done
12259
12260 cf_search="$cf_library_path_list $cf_search"
12261
12262                         for cf_cv_library_path_utf8 in $cf_search
12263                         do
12264                                 if test -d $cf_cv_library_path_utf8 ; then
12265                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12266
12267 echo "${as_me:-configure}:12267: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12268
12269                                         CPPFLAGS="$cf_test_CPPFLAGS"
12270                                         LIBS="-lutf8  $cf_save_LIBS"
12271                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12272                                         cat >conftest.$ac_ext <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275
12276 #include <libutf8.h>
12277 int
12278 main (void)
12279 {
12280 putwc(0,0);
12281   ;
12282   return 0;
12283 }
12284 _ACEOF
12285 rm -f conftest.$ac_objext conftest$ac_exeext
12286 if { (eval echo "$as_me:12286: \"$ac_link\"") >&5
12287   (eval $ac_link) 2>&5
12288   ac_status=$?
12289   echo "$as_me:12289: \$? = $ac_status" >&5
12290   (exit $ac_status); } &&
12291          { ac_try='test -s conftest$ac_exeext'
12292   { (eval echo "$as_me:12292: \"$ac_try\"") >&5
12293   (eval $ac_try) 2>&5
12294   ac_status=$?
12295   echo "$as_me:12295: \$? = $ac_status" >&5
12296   (exit $ac_status); }; }; then
12297
12298                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12299
12300 echo "${as_me:-configure}:12300: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12301
12302                                         cf_cv_find_linkage_utf8=yes
12303                                         cf_cv_library_file_utf8="-lutf8"
12304                                         break
12305 else
12306   echo "$as_me: failed program was:" >&5
12307 cat conftest.$ac_ext >&5
12308
12309                                         CPPFLAGS="$cf_save_CPPFLAGS"
12310                                         LIBS="$cf_save_LIBS"
12311                                         LDFLAGS="$cf_save_LDFLAGS"
12312
12313 fi
12314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12315                                 fi
12316                         done
12317                         CPPFLAGS="$cf_save_CPPFLAGS"
12318                         LDFLAGS="$cf_save_LDFLAGS"
12319                 fi
12320
12321         else
12322                 cf_cv_find_linkage_utf8=no
12323         fi
12324
12325 fi
12326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12327
12328 fi
12329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12330
12331 LIBS="$cf_save_LIBS"
12332
12333 if test "$cf_cv_find_linkage_utf8" = yes ; then
12334 cf_cv_utf8_lib=add-on
12335 else
12336 cf_cv_utf8_lib=no
12337 fi
12338
12339 fi
12340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12341 fi
12342 echo "$as_me:12342: result: $cf_cv_utf8_lib" >&5
12343 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12344
12345 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12346 # ncurses/ncursesw:
12347 if test "$cf_cv_utf8_lib" = "add-on" ; then
12348
12349 cat >>confdefs.h <<\EOF
12350 #define HAVE_LIBUTF8_H 1
12351 EOF
12352
12353 if test -n "$cf_cv_header_path_utf8" ; then
12354   for cf_add_incdir in $cf_cv_header_path_utf8
12355   do
12356         while test $cf_add_incdir != /usr/include
12357         do
12358           if test -d $cf_add_incdir
12359           then
12360                 cf_have_incdir=no
12361                 if test -n "$CFLAGS$CPPFLAGS" ; then
12362                   # a loop is needed to ensure we can add subdirs of existing dirs
12363                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12364                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12365                           cf_have_incdir=yes; break
12366                         fi
12367                   done
12368                 fi
12369
12370                 if test "$cf_have_incdir" = no ; then
12371                   if test "$cf_add_incdir" = /usr/local/include ; then
12372                         if test "$GCC" = yes
12373                         then
12374                           cf_save_CPPFLAGS=$CPPFLAGS
12375
12376         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12377         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12378
12379                           cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382 #include <stdio.h>
12383 int
12384 main (void)
12385 {
12386 printf("Hello")
12387   ;
12388   return 0;
12389 }
12390 _ACEOF
12391 rm -f conftest.$ac_objext
12392 if { (eval echo "$as_me:12392: \"$ac_compile\"") >&5
12393   (eval $ac_compile) 2>&5
12394   ac_status=$?
12395   echo "$as_me:12395: \$? = $ac_status" >&5
12396   (exit $ac_status); } &&
12397          { ac_try='test -s conftest.$ac_objext'
12398   { (eval echo "$as_me:12398: \"$ac_try\"") >&5
12399   (eval $ac_try) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); }; }; then
12403   :
12404 else
12405   echo "$as_me: failed program was:" >&5
12406 cat conftest.$ac_ext >&5
12407 cf_have_incdir=yes
12408 fi
12409 rm -f conftest.$ac_objext conftest.$ac_ext
12410                           CPPFLAGS=$cf_save_CPPFLAGS
12411                         fi
12412                   fi
12413                 fi
12414
12415                 if test "$cf_have_incdir" = no ; then
12416                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12417
12418 echo "${as_me:-configure}:12418: testing adding $cf_add_incdir to include-path ..." 1>&5
12419
12420                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12421
12422                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12423                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12424                   cf_add_incdir="$cf_top_incdir"
12425                 else
12426                   break
12427                 fi
12428           else
12429                 break
12430           fi
12431         done
12432   done
12433 fi
12434
12435 if test -n "$cf_cv_library_path_utf8" ; then
12436         for cf_add_libdir in $cf_cv_library_path_utf8
12437         do
12438                 if test $cf_add_libdir = /usr/lib ; then
12439                         :
12440                 elif test -d $cf_add_libdir
12441                 then
12442                         cf_have_libdir=no
12443                         if test -n "$LDFLAGS$LIBS" ; then
12444                                 # a loop is needed to ensure we can add subdirs of existing dirs
12445                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12446                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12447                                                 cf_have_libdir=yes; break
12448                                         fi
12449                                 done
12450                         fi
12451                         if test "$cf_have_libdir" = no ; then
12452                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12453
12454 echo "${as_me:-configure}:12454: testing adding $cf_add_libdir to library-path ..." 1>&5
12455
12456                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12457                         fi
12458                 fi
12459         done
12460 fi
12461
12462 cf_add_libs="$LIBS"
12463 # reverse order
12464 cf_add_0lib=
12465 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12466 # filter duplicates
12467 for cf_add_1lib in $cf_add_0lib; do
12468         for cf_add_2lib in $cf_add_libs; do
12469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12470                         cf_add_1lib=
12471                         break
12472                 fi
12473         done
12474         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12475 done
12476 LIBS="$cf_add_libs"
12477
12478 fi
12479
12480                 if test "$cf_cv_utf8_lib" != no ; then
12481                         NCURSES_LIBUTF8=1
12482                 fi
12483         fi
12484
12485 # This is needed on Tru64 5.0 to declare mbstate_t
12486 echo "$as_me:12486: checking if we must include wchar.h to declare mbstate_t" >&5
12487 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12488 if test "${cf_cv_mbstate_t+set}" = set; then
12489   echo $ECHO_N "(cached) $ECHO_C" >&6
12490 else
12491
12492 cat >conftest.$ac_ext <<_ACEOF
12493 #line 12493 "configure"
12494 #include "confdefs.h"
12495
12496 #include <stdlib.h>
12497 #include <stdarg.h>
12498 #include <stdio.h>
12499 #ifdef HAVE_LIBUTF8_H
12500 #include <libutf8.h>
12501 #endif
12502 int
12503 main (void)
12504 {
12505 mbstate_t state
12506   ;
12507   return 0;
12508 }
12509 _ACEOF
12510 rm -f conftest.$ac_objext
12511 if { (eval echo "$as_me:12511: \"$ac_compile\"") >&5
12512   (eval $ac_compile) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); } &&
12516          { ac_try='test -s conftest.$ac_objext'
12517   { (eval echo "$as_me:12517: \"$ac_try\"") >&5
12518   (eval $ac_try) 2>&5
12519   ac_status=$?
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit $ac_status); }; }; then
12522   cf_cv_mbstate_t=no
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat conftest.$ac_ext >&5
12526 cat >conftest.$ac_ext <<_ACEOF
12527 #line 12527 "configure"
12528 #include "confdefs.h"
12529
12530 #include <stdlib.h>
12531 #include <stdarg.h>
12532 #include <stdio.h>
12533 #include <wchar.h>
12534 #ifdef HAVE_LIBUTF8_H
12535 #include <libutf8.h>
12536 #endif
12537 int
12538 main (void)
12539 {
12540 mbstate_t value
12541   ;
12542   return 0;
12543 }
12544 _ACEOF
12545 rm -f conftest.$ac_objext
12546 if { (eval echo "$as_me:12546: \"$ac_compile\"") >&5
12547   (eval $ac_compile) 2>&5
12548   ac_status=$?
12549   echo "$as_me:12549: \$? = $ac_status" >&5
12550   (exit $ac_status); } &&
12551          { ac_try='test -s conftest.$ac_objext'
12552   { (eval echo "$as_me:12552: \"$ac_try\"") >&5
12553   (eval $ac_try) 2>&5
12554   ac_status=$?
12555   echo "$as_me:12555: \$? = $ac_status" >&5
12556   (exit $ac_status); }; }; then
12557   cf_cv_mbstate_t=yes
12558 else
12559   echo "$as_me: failed program was:" >&5
12560 cat conftest.$ac_ext >&5
12561 cf_cv_mbstate_t=unknown
12562 fi
12563 rm -f conftest.$ac_objext conftest.$ac_ext
12564 fi
12565 rm -f conftest.$ac_objext conftest.$ac_ext
12566 fi
12567 echo "$as_me:12567: result: $cf_cv_mbstate_t" >&5
12568 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12569
12570 if test "$cf_cv_mbstate_t" = yes ; then
12571
12572 cat >>confdefs.h <<\EOF
12573 #define NEED_WCHAR_H 1
12574 EOF
12575
12576         NEED_WCHAR_H=1
12577 fi
12578
12579 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12580 if test "$cf_cv_mbstate_t" = unknown ; then
12581         NCURSES_MBSTATE_T=1
12582 fi
12583
12584 # This is needed on Tru64 5.0 to declare wchar_t
12585 echo "$as_me:12585: checking if we must include wchar.h to declare wchar_t" >&5
12586 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12587 if test "${cf_cv_wchar_t+set}" = set; then
12588   echo $ECHO_N "(cached) $ECHO_C" >&6
12589 else
12590
12591 cat >conftest.$ac_ext <<_ACEOF
12592 #line 12592 "configure"
12593 #include "confdefs.h"
12594
12595 #include <stdlib.h>
12596 #include <stdarg.h>
12597 #include <stdio.h>
12598 #ifdef HAVE_LIBUTF8_H
12599 #include <libutf8.h>
12600 #endif
12601 int
12602 main (void)
12603 {
12604 wchar_t state
12605   ;
12606   return 0;
12607 }
12608 _ACEOF
12609 rm -f conftest.$ac_objext
12610 if { (eval echo "$as_me:12610: \"$ac_compile\"") >&5
12611   (eval $ac_compile) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit $ac_status); } &&
12615          { ac_try='test -s conftest.$ac_objext'
12616   { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617   (eval $ac_try) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); }; }; then
12621   cf_cv_wchar_t=no
12622 else
12623   echo "$as_me: failed program was:" >&5
12624 cat conftest.$ac_ext >&5
12625 cat >conftest.$ac_ext <<_ACEOF
12626 #line 12626 "configure"
12627 #include "confdefs.h"
12628
12629 #include <stdlib.h>
12630 #include <stdarg.h>
12631 #include <stdio.h>
12632 #include <wchar.h>
12633 #ifdef HAVE_LIBUTF8_H
12634 #include <libutf8.h>
12635 #endif
12636 int
12637 main (void)
12638 {
12639 wchar_t value
12640   ;
12641   return 0;
12642 }
12643 _ACEOF
12644 rm -f conftest.$ac_objext
12645 if { (eval echo "$as_me:12645: \"$ac_compile\"") >&5
12646   (eval $ac_compile) 2>&5
12647   ac_status=$?
12648   echo "$as_me:12648: \$? = $ac_status" >&5
12649   (exit $ac_status); } &&
12650          { ac_try='test -s conftest.$ac_objext'
12651   { (eval echo "$as_me:12651: \"$ac_try\"") >&5
12652   (eval $ac_try) 2>&5
12653   ac_status=$?
12654   echo "$as_me:12654: \$? = $ac_status" >&5
12655   (exit $ac_status); }; }; then
12656   cf_cv_wchar_t=yes
12657 else
12658   echo "$as_me: failed program was:" >&5
12659 cat conftest.$ac_ext >&5
12660 cf_cv_wchar_t=unknown
12661 fi
12662 rm -f conftest.$ac_objext conftest.$ac_ext
12663 fi
12664 rm -f conftest.$ac_objext conftest.$ac_ext
12665 fi
12666 echo "$as_me:12666: result: $cf_cv_wchar_t" >&5
12667 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12668
12669 if test "$cf_cv_wchar_t" = yes ; then
12670
12671 cat >>confdefs.h <<\EOF
12672 #define NEED_WCHAR_H 1
12673 EOF
12674
12675         NEED_WCHAR_H=1
12676 fi
12677
12678 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12679 if test "$cf_cv_wchar_t" = unknown ; then
12680         NCURSES_WCHAR_T=1
12681 fi
12682
12683 # if we find wchar_t in either place, use substitution to provide a fallback.
12684 if test "$cf_cv_wchar_t" != unknown ; then
12685         NCURSES_OK_WCHAR_T=1
12686 fi
12687
12688 # This is needed on Tru64 5.0 to declare wint_t
12689 echo "$as_me:12689: checking if we must include wchar.h to declare wint_t" >&5
12690 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12691 if test "${cf_cv_wint_t+set}" = set; then
12692   echo $ECHO_N "(cached) $ECHO_C" >&6
12693 else
12694
12695 cat >conftest.$ac_ext <<_ACEOF
12696 #line 12696 "configure"
12697 #include "confdefs.h"
12698
12699 #include <stdlib.h>
12700 #include <stdarg.h>
12701 #include <stdio.h>
12702 #ifdef HAVE_LIBUTF8_H
12703 #include <libutf8.h>
12704 #endif
12705 int
12706 main (void)
12707 {
12708 wint_t state
12709   ;
12710   return 0;
12711 }
12712 _ACEOF
12713 rm -f conftest.$ac_objext
12714 if { (eval echo "$as_me:12714: \"$ac_compile\"") >&5
12715   (eval $ac_compile) 2>&5
12716   ac_status=$?
12717   echo "$as_me:12717: \$? = $ac_status" >&5
12718   (exit $ac_status); } &&
12719          { ac_try='test -s conftest.$ac_objext'
12720   { (eval echo "$as_me:12720: \"$ac_try\"") >&5
12721   (eval $ac_try) 2>&5
12722   ac_status=$?
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); }; }; then
12725   cf_cv_wint_t=no
12726 else
12727   echo "$as_me: failed program was:" >&5
12728 cat conftest.$ac_ext >&5
12729 cat >conftest.$ac_ext <<_ACEOF
12730 #line 12730 "configure"
12731 #include "confdefs.h"
12732
12733 #include <stdlib.h>
12734 #include <stdarg.h>
12735 #include <stdio.h>
12736 #include <wchar.h>
12737 #ifdef HAVE_LIBUTF8_H
12738 #include <libutf8.h>
12739 #endif
12740 int
12741 main (void)
12742 {
12743 wint_t value
12744   ;
12745   return 0;
12746 }
12747 _ACEOF
12748 rm -f conftest.$ac_objext
12749 if { (eval echo "$as_me:12749: \"$ac_compile\"") >&5
12750   (eval $ac_compile) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); } &&
12754          { ac_try='test -s conftest.$ac_objext'
12755   { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756   (eval $ac_try) 2>&5
12757   ac_status=$?
12758   echo "$as_me:12758: \$? = $ac_status" >&5
12759   (exit $ac_status); }; }; then
12760   cf_cv_wint_t=yes
12761 else
12762   echo "$as_me: failed program was:" >&5
12763 cat conftest.$ac_ext >&5
12764 cf_cv_wint_t=unknown
12765 fi
12766 rm -f conftest.$ac_objext conftest.$ac_ext
12767 fi
12768 rm -f conftest.$ac_objext conftest.$ac_ext
12769 fi
12770 echo "$as_me:12770: result: $cf_cv_wint_t" >&5
12771 echo "${ECHO_T}$cf_cv_wint_t" >&6
12772
12773 if test "$cf_cv_wint_t" = yes ; then
12774
12775 cat >>confdefs.h <<\EOF
12776 #define NEED_WCHAR_H 1
12777 EOF
12778
12779         NEED_WCHAR_H=1
12780 fi
12781
12782 # if we do not find wint_t in either place, use substitution to provide a fallback.
12783 if test "$cf_cv_wint_t" = unknown ; then
12784         NCURSES_WINT_T=1
12785 fi
12786
12787 # if we find wint_t in either place, use substitution to provide a fallback.
12788 if test "$cf_cv_wint_t" != unknown ; then
12789         NCURSES_OK_WINT_T=1
12790 fi
12791
12792         if test "$NCURSES_MBSTATE_T" != 0; then
12793
12794 cat >>confdefs.h <<\EOF
12795 #define NEED_MBSTATE_T_DEF 1
12796 EOF
12797
12798         fi
12799 fi
12800
12801 ###   use option --disable-lp64 to allow long chtype
12802 echo "$as_me:12802: checking whether to enable _LP64 definition in curses.h" >&5
12803 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12804
12805 # Check whether --enable-lp64 or --disable-lp64 was given.
12806 if test "${enable_lp64+set}" = set; then
12807   enableval="$enable_lp64"
12808   with_lp64=$enableval
12809 else
12810   with_lp64=$cf_dft_with_lp64
12811 fi;
12812 echo "$as_me:12812: result: $with_lp64" >&5
12813 echo "${ECHO_T}$with_lp64" >&6
12814
12815 if test "x$with_lp64" = xyes ; then
12816         cf_cv_enable_lp64=1
12817 else
12818         cf_cv_enable_lp64=0
12819 fi
12820
12821 # Check whether --enable-largefile or --disable-largefile was given.
12822 if test "${enable_largefile+set}" = set; then
12823   enableval="$enable_largefile"
12824
12825 fi;
12826 if test "$enable_largefile" != no; then
12827
12828   echo "$as_me:12828: checking for special C compiler options needed for large files" >&5
12829 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12830 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12831   echo $ECHO_N "(cached) $ECHO_C" >&6
12832 else
12833   ac_cv_sys_largefile_CC=no
12834      if test "$GCC" != yes; then
12835        ac_save_CC=$CC
12836        while :; do
12837          # IRIX 6.2 and later do not support large files by default,
12838          # so use the C compiler's -n32 option if that helps.
12839          cat >conftest.$ac_ext <<_ACEOF
12840 #line 12840 "configure"
12841 #include "confdefs.h"
12842 #include <sys/types.h>
12843  /* Check that off_t can represent 2**63 - 1 correctly.
12844     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12845     since some C++ compilers masquerading as C compilers
12846     incorrectly reject 9223372036854775807.  */
12847 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12848   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12849                        && LARGE_OFF_T % 2147483647 == 1)
12850                       ? 1 : -1];
12851 int
12852 main (void)
12853 {
12854
12855   ;
12856   return 0;
12857 }
12858 _ACEOF
12859          rm -f conftest.$ac_objext
12860 if { (eval echo "$as_me:12860: \"$ac_compile\"") >&5
12861   (eval $ac_compile) 2>&5
12862   ac_status=$?
12863   echo "$as_me:12863: \$? = $ac_status" >&5
12864   (exit $ac_status); } &&
12865          { ac_try='test -s conftest.$ac_objext'
12866   { (eval echo "$as_me:12866: \"$ac_try\"") >&5
12867   (eval $ac_try) 2>&5
12868   ac_status=$?
12869   echo "$as_me:12869: \$? = $ac_status" >&5
12870   (exit $ac_status); }; }; then
12871   break
12872 else
12873   echo "$as_me: failed program was:" >&5
12874 cat conftest.$ac_ext >&5
12875 fi
12876 rm -f conftest.$ac_objext
12877          CC="$CC -n32"
12878          rm -f conftest.$ac_objext
12879 if { (eval echo "$as_me:12879: \"$ac_compile\"") >&5
12880   (eval $ac_compile) 2>&5
12881   ac_status=$?
12882   echo "$as_me:12882: \$? = $ac_status" >&5
12883   (exit $ac_status); } &&
12884          { ac_try='test -s conftest.$ac_objext'
12885   { (eval echo "$as_me:12885: \"$ac_try\"") >&5
12886   (eval $ac_try) 2>&5
12887   ac_status=$?
12888   echo "$as_me:12888: \$? = $ac_status" >&5
12889   (exit $ac_status); }; }; then
12890   ac_cv_sys_largefile_CC=' -n32'; break
12891 else
12892   echo "$as_me: failed program was:" >&5
12893 cat conftest.$ac_ext >&5
12894 fi
12895 rm -f conftest.$ac_objext
12896          break
12897        done
12898        CC=$ac_save_CC
12899        rm -f conftest.$ac_ext
12900     fi
12901 fi
12902 echo "$as_me:12902: result: $ac_cv_sys_largefile_CC" >&5
12903 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12904   if test "$ac_cv_sys_largefile_CC" != no; then
12905     CC=$CC$ac_cv_sys_largefile_CC
12906   fi
12907
12908   echo "$as_me:12908: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12909 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12910 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12911   echo $ECHO_N "(cached) $ECHO_C" >&6
12912 else
12913   while :; do
12914   ac_cv_sys_file_offset_bits=no
12915   cat >conftest.$ac_ext <<_ACEOF
12916 #line 12916 "configure"
12917 #include "confdefs.h"
12918 #include <sys/types.h>
12919  /* Check that off_t can represent 2**63 - 1 correctly.
12920     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12921     since some C++ compilers masquerading as C compilers
12922     incorrectly reject 9223372036854775807.  */
12923 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12924   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12925                        && LARGE_OFF_T % 2147483647 == 1)
12926                       ? 1 : -1];
12927 int
12928 main (void)
12929 {
12930
12931   ;
12932   return 0;
12933 }
12934 _ACEOF
12935 rm -f conftest.$ac_objext
12936 if { (eval echo "$as_me:12936: \"$ac_compile\"") >&5
12937   (eval $ac_compile) 2>&5
12938   ac_status=$?
12939   echo "$as_me:12939: \$? = $ac_status" >&5
12940   (exit $ac_status); } &&
12941          { ac_try='test -s conftest.$ac_objext'
12942   { (eval echo "$as_me:12942: \"$ac_try\"") >&5
12943   (eval $ac_try) 2>&5
12944   ac_status=$?
12945   echo "$as_me:12945: \$? = $ac_status" >&5
12946   (exit $ac_status); }; }; then
12947   break
12948 else
12949   echo "$as_me: failed program was:" >&5
12950 cat conftest.$ac_ext >&5
12951 fi
12952 rm -f conftest.$ac_objext conftest.$ac_ext
12953   cat >conftest.$ac_ext <<_ACEOF
12954 #line 12954 "configure"
12955 #include "confdefs.h"
12956 #define _FILE_OFFSET_BITS 64
12957 #include <sys/types.h>
12958  /* Check that off_t can represent 2**63 - 1 correctly.
12959     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12960     since some C++ compilers masquerading as C compilers
12961     incorrectly reject 9223372036854775807.  */
12962 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12963   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12964                        && LARGE_OFF_T % 2147483647 == 1)
12965                       ? 1 : -1];
12966 int
12967 main (void)
12968 {
12969
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f conftest.$ac_objext
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } &&
12980          { ac_try='test -s conftest.$ac_objext'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); }; }; then
12986   ac_cv_sys_file_offset_bits=64; break
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat conftest.$ac_ext >&5
12990 fi
12991 rm -f conftest.$ac_objext conftest.$ac_ext
12992   break
12993 done
12994 fi
12995 echo "$as_me:12995: result: $ac_cv_sys_file_offset_bits" >&5
12996 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12997 if test "$ac_cv_sys_file_offset_bits" != no; then
12998
12999 cat >>confdefs.h <<EOF
13000 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13001 EOF
13002
13003 fi
13004 rm -rf conftest*
13005   echo "$as_me:13005: checking for _LARGE_FILES value needed for large files" >&5
13006 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13007 if test "${ac_cv_sys_large_files+set}" = set; then
13008   echo $ECHO_N "(cached) $ECHO_C" >&6
13009 else
13010   while :; do
13011   ac_cv_sys_large_files=no
13012   cat >conftest.$ac_ext <<_ACEOF
13013 #line 13013 "configure"
13014 #include "confdefs.h"
13015 #include <sys/types.h>
13016  /* Check that off_t can represent 2**63 - 1 correctly.
13017     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13018     since some C++ compilers masquerading as C compilers
13019     incorrectly reject 9223372036854775807.  */
13020 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13021   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13022                        && LARGE_OFF_T % 2147483647 == 1)
13023                       ? 1 : -1];
13024 int
13025 main (void)
13026 {
13027
13028   ;
13029   return 0;
13030 }
13031 _ACEOF
13032 rm -f conftest.$ac_objext
13033 if { (eval echo "$as_me:13033: \"$ac_compile\"") >&5
13034   (eval $ac_compile) 2>&5
13035   ac_status=$?
13036   echo "$as_me:13036: \$? = $ac_status" >&5
13037   (exit $ac_status); } &&
13038          { ac_try='test -s conftest.$ac_objext'
13039   { (eval echo "$as_me:13039: \"$ac_try\"") >&5
13040   (eval $ac_try) 2>&5
13041   ac_status=$?
13042   echo "$as_me:13042: \$? = $ac_status" >&5
13043   (exit $ac_status); }; }; then
13044   break
13045 else
13046   echo "$as_me: failed program was:" >&5
13047 cat conftest.$ac_ext >&5
13048 fi
13049 rm -f conftest.$ac_objext conftest.$ac_ext
13050   cat >conftest.$ac_ext <<_ACEOF
13051 #line 13051 "configure"
13052 #include "confdefs.h"
13053 #define _LARGE_FILES 1
13054 #include <sys/types.h>
13055  /* Check that off_t can represent 2**63 - 1 correctly.
13056     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13057     since some C++ compilers masquerading as C compilers
13058     incorrectly reject 9223372036854775807.  */
13059 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13060   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13061                        && LARGE_OFF_T % 2147483647 == 1)
13062                       ? 1 : -1];
13063 int
13064 main (void)
13065 {
13066
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 rm -f conftest.$ac_objext
13072 if { (eval echo "$as_me:13072: \"$ac_compile\"") >&5
13073   (eval $ac_compile) 2>&5
13074   ac_status=$?
13075   echo "$as_me:13075: \$? = $ac_status" >&5
13076   (exit $ac_status); } &&
13077          { ac_try='test -s conftest.$ac_objext'
13078   { (eval echo "$as_me:13078: \"$ac_try\"") >&5
13079   (eval $ac_try) 2>&5
13080   ac_status=$?
13081   echo "$as_me:13081: \$? = $ac_status" >&5
13082   (exit $ac_status); }; }; then
13083   ac_cv_sys_large_files=1; break
13084 else
13085   echo "$as_me: failed program was:" >&5
13086 cat conftest.$ac_ext >&5
13087 fi
13088 rm -f conftest.$ac_objext conftest.$ac_ext
13089   break
13090 done
13091 fi
13092 echo "$as_me:13092: result: $ac_cv_sys_large_files" >&5
13093 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13094 if test "$ac_cv_sys_large_files" != no; then
13095
13096 cat >>confdefs.h <<EOF
13097 #define _LARGE_FILES $ac_cv_sys_large_files
13098 EOF
13099
13100 fi
13101 rm -rf conftest*
13102 fi
13103
13104         if test "$enable_largefile" != no ; then
13105         echo "$as_me:13105: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13106 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13107 if test "${ac_cv_sys_largefile_source+set}" = set; then
13108   echo $ECHO_N "(cached) $ECHO_C" >&6
13109 else
13110   while :; do
13111   ac_cv_sys_largefile_source=no
13112   cat >conftest.$ac_ext <<_ACEOF
13113 #line 13113 "configure"
13114 #include "confdefs.h"
13115 #include <stdio.h>
13116 int
13117 main (void)
13118 {
13119 return !fseeko;
13120   ;
13121   return 0;
13122 }
13123 _ACEOF
13124 rm -f conftest.$ac_objext
13125 if { (eval echo "$as_me:13125: \"$ac_compile\"") >&5
13126   (eval $ac_compile) 2>&5
13127   ac_status=$?
13128   echo "$as_me:13128: \$? = $ac_status" >&5
13129   (exit $ac_status); } &&
13130          { ac_try='test -s conftest.$ac_objext'
13131   { (eval echo "$as_me:13131: \"$ac_try\"") >&5
13132   (eval $ac_try) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit $ac_status); }; }; then
13136   break
13137 else
13138   echo "$as_me: failed program was:" >&5
13139 cat conftest.$ac_ext >&5
13140 fi
13141 rm -f conftest.$ac_objext conftest.$ac_ext
13142   cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145 #define _LARGEFILE_SOURCE 1
13146 #include <stdio.h>
13147 int
13148 main (void)
13149 {
13150 return !fseeko;
13151   ;
13152   return 0;
13153 }
13154 _ACEOF
13155 rm -f conftest.$ac_objext
13156 if { (eval echo "$as_me:13156: \"$ac_compile\"") >&5
13157   (eval $ac_compile) 2>&5
13158   ac_status=$?
13159   echo "$as_me:13159: \$? = $ac_status" >&5
13160   (exit $ac_status); } &&
13161          { ac_try='test -s conftest.$ac_objext'
13162   { (eval echo "$as_me:13162: \"$ac_try\"") >&5
13163   (eval $ac_try) 2>&5
13164   ac_status=$?
13165   echo "$as_me:13165: \$? = $ac_status" >&5
13166   (exit $ac_status); }; }; then
13167   ac_cv_sys_largefile_source=1; break
13168 else
13169   echo "$as_me: failed program was:" >&5
13170 cat conftest.$ac_ext >&5
13171 fi
13172 rm -f conftest.$ac_objext conftest.$ac_ext
13173   break
13174 done
13175 fi
13176 echo "$as_me:13176: result: $ac_cv_sys_largefile_source" >&5
13177 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13178 if test "$ac_cv_sys_largefile_source" != no; then
13179
13180 cat >>confdefs.h <<EOF
13181 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13182 EOF
13183
13184 fi
13185 rm -rf conftest*
13186
13187 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13188 # in glibc 2.1.3, but that breaks too many other things.
13189 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13190 echo "$as_me:13190: checking for fseeko" >&5
13191 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13192 if test "${ac_cv_func_fseeko+set}" = set; then
13193   echo $ECHO_N "(cached) $ECHO_C" >&6
13194 else
13195   cat >conftest.$ac_ext <<_ACEOF
13196 #line 13196 "configure"
13197 #include "confdefs.h"
13198 #include <stdio.h>
13199 int
13200 main (void)
13201 {
13202 return fseeko && fseeko (stdin, 0, 0);
13203   ;
13204   return 0;
13205 }
13206 _ACEOF
13207 rm -f conftest.$ac_objext conftest$ac_exeext
13208 if { (eval echo "$as_me:13208: \"$ac_link\"") >&5
13209   (eval $ac_link) 2>&5
13210   ac_status=$?
13211   echo "$as_me:13211: \$? = $ac_status" >&5
13212   (exit $ac_status); } &&
13213          { ac_try='test -s conftest$ac_exeext'
13214   { (eval echo "$as_me:13214: \"$ac_try\"") >&5
13215   (eval $ac_try) 2>&5
13216   ac_status=$?
13217   echo "$as_me:13217: \$? = $ac_status" >&5
13218   (exit $ac_status); }; }; then
13219   ac_cv_func_fseeko=yes
13220 else
13221   echo "$as_me: failed program was:" >&5
13222 cat conftest.$ac_ext >&5
13223 ac_cv_func_fseeko=no
13224 fi
13225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13226 fi
13227 echo "$as_me:13227: result: $ac_cv_func_fseeko" >&5
13228 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13229 if test $ac_cv_func_fseeko = yes; then
13230
13231 cat >>confdefs.h <<\EOF
13232 #define HAVE_FSEEKO 1
13233 EOF
13234
13235 fi
13236
13237         # Normally we would collect these definitions in the config.h,
13238         # but (like _XOPEN_SOURCE), some environments rely on having these
13239         # defined before any of the system headers are included.  Another
13240         # case comes up with C++, e.g., on AIX the compiler compiles the
13241         # header files by themselves before looking at the body files it is
13242         # told to compile.  For ncurses, those header files do not include
13243         # the config.h
13244         if test "$ac_cv_sys_large_files" != no
13245         then
13246
13247         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13248         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13249
13250         fi
13251         if test "$ac_cv_sys_largefile_source" != no
13252         then
13253
13254         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13255         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13256
13257         fi
13258         if test "$ac_cv_sys_file_offset_bits" != no
13259         then
13260
13261         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13262         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13263
13264         fi
13265
13266         echo "$as_me:13266: checking whether to use struct dirent64" >&5
13267 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13268 if test "${cf_cv_struct_dirent64+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271
13272                 cat >conftest.$ac_ext <<_ACEOF
13273 #line 13273 "configure"
13274 #include "confdefs.h"
13275
13276 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13277 #include <sys/types.h>
13278 #include <dirent.h>
13279
13280 int
13281 main (void)
13282 {
13283
13284                 /* if transitional largefile support is setup, this is true */
13285                 extern struct dirent64 * readdir(DIR *);
13286                 struct dirent64 *x = readdir((DIR *)0);
13287                 struct dirent *y = readdir((DIR *)0);
13288                 int z = x - y;
13289                 (void)z;
13290
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 rm -f conftest.$ac_objext
13296 if { (eval echo "$as_me:13296: \"$ac_compile\"") >&5
13297   (eval $ac_compile) 2>&5
13298   ac_status=$?
13299   echo "$as_me:13299: \$? = $ac_status" >&5
13300   (exit $ac_status); } &&
13301          { ac_try='test -s conftest.$ac_objext'
13302   { (eval echo "$as_me:13302: \"$ac_try\"") >&5
13303   (eval $ac_try) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); }; }; then
13307   cf_cv_struct_dirent64=yes
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat conftest.$ac_ext >&5
13311 cf_cv_struct_dirent64=no
13312 fi
13313 rm -f conftest.$ac_objext conftest.$ac_ext
13314
13315 fi
13316 echo "$as_me:13316: result: $cf_cv_struct_dirent64" >&5
13317 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13318         test "$cf_cv_struct_dirent64" = yes &&
13319 cat >>confdefs.h <<\EOF
13320 #define HAVE_STRUCT_DIRENT64 1
13321 EOF
13322
13323         fi
13324
13325 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13326 echo "$as_me:13326: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13327 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13328
13329 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13330 if test "${enable_tparm_varargs+set}" = set; then
13331   enableval="$enable_tparm_varargs"
13332   with_tparm_varargs=$enableval
13333 else
13334   with_tparm_varargs=yes
13335 fi;
13336 echo "$as_me:13336: result: $with_tparm_varargs" >&5
13337 echo "${ECHO_T}$with_tparm_varargs" >&6
13338 NCURSES_TPARM_VARARGS=0
13339 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13340
13341 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13342 if test "$with_ticlib" != no ; then
13343 echo "$as_me:13343: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13344 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13345
13346 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13347 if test "${enable_tic_depends+set}" = set; then
13348   enableval="$enable_tic_depends"
13349   with_tic_depends=$enableval
13350 else
13351   with_tic_depends=yes
13352 fi;
13353 echo "$as_me:13353: result: $with_tic_depends" >&5
13354 echo "${ECHO_T}$with_tic_depends" >&6
13355 else
13356         with_tic_depends=no
13357 fi
13358
13359 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13360 echo "$as_me:13360: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13361 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13362
13363 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13364 if test "${enable_wattr_macros+set}" = set; then
13365   enableval="$enable_wattr_macros"
13366   with_wattr_macros=$enableval
13367 else
13368   with_wattr_macros=yes
13369 fi;
13370 if [ "x$with_wattr_macros" != xyes ]; then
13371         NCURSES_WATTR_MACROS=0
13372         echo "$as_me:13372: result: yes" >&5
13373 echo "${ECHO_T}yes" >&6
13374 else
13375         NCURSES_WATTR_MACROS=1
13376         echo "$as_me:13376: result: no" >&5
13377 echo "${ECHO_T}no" >&6
13378 fi
13379
13380 echo "$as_me:13380: checking for X11 rgb file" >&5
13381 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13382
13383 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13384 if test "${with_x11_rgb+set}" = set; then
13385   withval="$with_x11_rgb"
13386   RGB_PATH=$withval
13387 else
13388   RGB_PATH=auto
13389 fi;
13390
13391 if test "x$RGB_PATH" = xauto
13392 then
13393         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13394         for cf_path in \
13395                 /opt/local/share/X11/rgb.txt \
13396                 /opt/X11/share/X11/rgb.txt \
13397                 /usr/share/X11/rgb.txt \
13398                 /usr/X11/share/X11/rgb.txt \
13399                 /usr/X11/lib/X11/rgb.txt \
13400                 /usr/lib/X11/rgb.txt \
13401                 /etc/X11/rgb.txt \
13402                 /usr/pkg/lib/X11/rgb.txt \
13403                 /usr/X11R7/lib/X11/rgb.txt \
13404                 /usr/X11R6/lib/X11/rgb.txt \
13405                 /usr/X11R5/lib/X11/rgb.txt \
13406                 /usr/X11R4/lib/X11/rgb.txt \
13407                 /usr/local/lib/X11/rgb.txt \
13408                 /usr/local/share/X11/rgb.txt \
13409                 /usr/lib64/X11/rgb.txt
13410         do
13411                 if test -f "$cf_path" ; then
13412                         RGB_PATH="$cf_path"
13413                         break
13414                 fi
13415         done
13416 else
13417         cf_path=$RGB_PATH
13418
13419 if test "x$prefix" != xNONE; then
13420         cf_path_syntax="$prefix"
13421 else
13422         cf_path_syntax="$ac_default_prefix"
13423 fi
13424
13425 case ".$cf_path" in
13426 (.\$\(*\)*|.\'*\'*)
13427         ;;
13428 (..|./*|.\\*)
13429         ;;
13430 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13431         ;;
13432 (.\${*prefix}*|.\${*dir}*)
13433         eval cf_path="$cf_path"
13434         case ".$cf_path" in
13435         (.NONE/*)
13436                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13437                 ;;
13438         esac
13439         ;;
13440 (.no|.NONE/*)
13441         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13442         ;;
13443 (*)
13444         { { echo "$as_me:13444: error: expected a pathname, not \"$cf_path\"" >&5
13445 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13446    { (exit 1); exit 1; }; }
13447         ;;
13448 esac
13449
13450 fi
13451
13452 echo "$as_me:13452: result: $RGB_PATH" >&5
13453 echo "${ECHO_T}$RGB_PATH" >&6
13454
13455 cat >>confdefs.h <<EOF
13456 #define RGB_PATH "$cf_path"
13457 EOF
13458
13459 no_x11_rgb=
13460 if test "$RGB_PATH" = no
13461 then
13462         no_x11_rgb="#"
13463 fi
13464
13465 ###   use option --with-bool to override bool's type
13466 echo "$as_me:13466: checking for type of bool" >&5
13467 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13468
13469 # Check whether --with-bool or --without-bool was given.
13470 if test "${with_bool+set}" = set; then
13471   withval="$with_bool"
13472   NCURSES_BOOL="$withval"
13473 else
13474   NCURSES_BOOL=auto
13475 fi;
13476 echo "$as_me:13476: result: $NCURSES_BOOL" >&5
13477 echo "${ECHO_T}$NCURSES_BOOL" >&6
13478
13479 echo "$as_me:13479: checking for alternate terminal capabilities file" >&5
13480 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13481
13482 # Check whether --with-caps or --without-caps was given.
13483 if test "${with_caps+set}" = set; then
13484   withval="$with_caps"
13485   TERMINFO_CAPS=Caps.$withval
13486 else
13487   TERMINFO_CAPS=Caps
13488 fi;
13489 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13490 echo "$as_me:13490: result: $TERMINFO_CAPS" >&5
13491 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13492
13493 ###   use option --with-chtype to override chtype's type
13494 echo "$as_me:13494: checking for type of chtype" >&5
13495 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13496
13497 # Check whether --with-chtype or --without-chtype was given.
13498 if test "${with_chtype+set}" = set; then
13499   withval="$with_chtype"
13500   NCURSES_CHTYPE="$withval"
13501 else
13502   NCURSES_CHTYPE=$cf_dft_chtype
13503 fi;
13504 echo "$as_me:13504: result: $NCURSES_CHTYPE" >&5
13505 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13506
13507 ###   use option --with-ospeed to override ospeed's type
13508 echo "$as_me:13508: checking for type of ospeed" >&5
13509 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13510
13511 # Check whether --with-ospeed or --without-ospeed was given.
13512 if test "${with_ospeed+set}" = set; then
13513   withval="$with_ospeed"
13514   NCURSES_OSPEED="$withval"
13515 else
13516   NCURSES_OSPEED=short
13517 fi;
13518 echo "$as_me:13518: result: $NCURSES_OSPEED" >&5
13519 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13520
13521 ###   use option --with-mmask-t to override mmask_t's type
13522 echo "$as_me:13522: checking for type of mmask_t" >&5
13523 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13524
13525 # Check whether --with-mmask-t or --without-mmask-t was given.
13526 if test "${with_mmask_t+set}" = set; then
13527   withval="$with_mmask_t"
13528   NCURSES_MMASK_T="$withval"
13529 else
13530   NCURSES_MMASK_T=$cf_dft_mmask_t
13531 fi;
13532 echo "$as_me:13532: result: $NCURSES_MMASK_T" >&5
13533 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13534
13535 ###   use option --with-ccharw-max to override CCHARW_MAX size
13536 echo "$as_me:13536: checking for size CCHARW_MAX" >&5
13537 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13538
13539 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13540 if test "${with_ccharw_max+set}" = set; then
13541   withval="$with_ccharw_max"
13542   NCURSES_CCHARW_MAX="$withval"
13543 else
13544   NCURSES_CCHARW_MAX=5
13545 fi;
13546 echo "$as_me:13546: result: $NCURSES_CCHARW_MAX" >&5
13547 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13548
13549 echo "$as_me:13549: checking for ANSI C header files" >&5
13550 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13551 if test "${ac_cv_header_stdc+set}" = set; then
13552   echo $ECHO_N "(cached) $ECHO_C" >&6
13553 else
13554   cat >conftest.$ac_ext <<_ACEOF
13555 #line 13555 "configure"
13556 #include "confdefs.h"
13557 #include <stdlib.h>
13558 #include <stdarg.h>
13559 #include <string.h>
13560 #include <float.h>
13561
13562 _ACEOF
13563 if { (eval echo "$as_me:13563: \"$ac_cpp conftest.$ac_ext\"") >&5
13564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13565   ac_status=$?
13566   egrep -v '^ *\+' conftest.er1 >conftest.err
13567   rm -f conftest.er1
13568   cat conftest.err >&5
13569   echo "$as_me:13569: \$? = $ac_status" >&5
13570   (exit $ac_status); } >/dev/null; then
13571   if test -s conftest.err; then
13572     ac_cpp_err=$ac_c_preproc_warn_flag
13573   else
13574     ac_cpp_err=
13575   fi
13576 else
13577   ac_cpp_err=yes
13578 fi
13579 if test -z "$ac_cpp_err"; then
13580   ac_cv_header_stdc=yes
13581 else
13582   echo "$as_me: failed program was:" >&5
13583   cat conftest.$ac_ext >&5
13584   ac_cv_header_stdc=no
13585 fi
13586 rm -f conftest.err conftest.$ac_ext
13587
13588 if test $ac_cv_header_stdc = yes; then
13589   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13590   cat >conftest.$ac_ext <<_ACEOF
13591 #line 13591 "configure"
13592 #include "confdefs.h"
13593 #include <string.h>
13594
13595 _ACEOF
13596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13597   egrep "memchr" >/dev/null 2>&1; then
13598   :
13599 else
13600   ac_cv_header_stdc=no
13601 fi
13602 rm -rf conftest*
13603
13604 fi
13605
13606 if test $ac_cv_header_stdc = yes; then
13607   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13608   cat >conftest.$ac_ext <<_ACEOF
13609 #line 13609 "configure"
13610 #include "confdefs.h"
13611 #include <stdlib.h>
13612
13613 _ACEOF
13614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13615   egrep "free" >/dev/null 2>&1; then
13616   :
13617 else
13618   ac_cv_header_stdc=no
13619 fi
13620 rm -rf conftest*
13621
13622 fi
13623
13624 if test $ac_cv_header_stdc = yes; then
13625   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13626   if test "$cross_compiling" = yes; then
13627   :
13628 else
13629   cat >conftest.$ac_ext <<_ACEOF
13630 #line 13630 "configure"
13631 #include "confdefs.h"
13632 #include <ctype.h>
13633 #if ((' ' & 0x0FF) == 0x020)
13634 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13635 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13636 #else
13637 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13638                      || ('j' <= (c) && (c) <= 'r') \
13639                      || ('s' <= (c) && (c) <= 'z'))
13640 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13641 #endif
13642
13643 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13644 int
13645 main (void)
13646 {
13647   int i;
13648   for (i = 0; i < 256; i++)
13649     if (XOR (islower (i), ISLOWER (i))
13650         || toupper (i) != TOUPPER (i))
13651       $ac_main_return(2);
13652   $ac_main_return (0);
13653 }
13654 _ACEOF
13655 rm -f conftest$ac_exeext
13656 if { (eval echo "$as_me:13656: \"$ac_link\"") >&5
13657   (eval $ac_link) 2>&5
13658   ac_status=$?
13659   echo "$as_me:13659: \$? = $ac_status" >&5
13660   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13661   { (eval echo "$as_me:13661: \"$ac_try\"") >&5
13662   (eval $ac_try) 2>&5
13663   ac_status=$?
13664   echo "$as_me:13664: \$? = $ac_status" >&5
13665   (exit $ac_status); }; }; then
13666   :
13667 else
13668   echo "$as_me: program exited with status $ac_status" >&5
13669 echo "$as_me: failed program was:" >&5
13670 cat conftest.$ac_ext >&5
13671 ac_cv_header_stdc=no
13672 fi
13673 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13674 fi
13675 fi
13676 fi
13677 echo "$as_me:13677: result: $ac_cv_header_stdc" >&5
13678 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13679 if test $ac_cv_header_stdc = yes; then
13680
13681 cat >>confdefs.h <<\EOF
13682 #define STDC_HEADERS 1
13683 EOF
13684
13685 fi
13686
13687 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13688
13689 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13690                   inttypes.h stdint.h unistd.h
13691 do
13692 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13693 echo "$as_me:13693: checking for $ac_header" >&5
13694 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13695 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13696   echo $ECHO_N "(cached) $ECHO_C" >&6
13697 else
13698   cat >conftest.$ac_ext <<_ACEOF
13699 #line 13699 "configure"
13700 #include "confdefs.h"
13701 $ac_includes_default
13702 #include <$ac_header>
13703 _ACEOF
13704 rm -f conftest.$ac_objext
13705 if { (eval echo "$as_me:13705: \"$ac_compile\"") >&5
13706   (eval $ac_compile) 2>&5
13707   ac_status=$?
13708   echo "$as_me:13708: \$? = $ac_status" >&5
13709   (exit $ac_status); } &&
13710          { ac_try='test -s conftest.$ac_objext'
13711   { (eval echo "$as_me:13711: \"$ac_try\"") >&5
13712   (eval $ac_try) 2>&5
13713   ac_status=$?
13714   echo "$as_me:13714: \$? = $ac_status" >&5
13715   (exit $ac_status); }; }; then
13716   eval "$as_ac_Header=yes"
13717 else
13718   echo "$as_me: failed program was:" >&5
13719 cat conftest.$ac_ext >&5
13720 eval "$as_ac_Header=no"
13721 fi
13722 rm -f conftest.$ac_objext conftest.$ac_ext
13723 fi
13724 echo "$as_me:13724: result: `eval echo '${'$as_ac_Header'}'`" >&5
13725 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13726 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13727   cat >>confdefs.h <<EOF
13728 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13729 EOF
13730
13731 fi
13732 done
13733
13734 echo "$as_me:13734: checking for signed char" >&5
13735 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13736 if test "${ac_cv_type_signed_char+set}" = set; then
13737   echo $ECHO_N "(cached) $ECHO_C" >&6
13738 else
13739   cat >conftest.$ac_ext <<_ACEOF
13740 #line 13740 "configure"
13741 #include "confdefs.h"
13742 $ac_includes_default
13743 int
13744 main (void)
13745 {
13746 if ((signed char *) 0)
13747   return 0;
13748 if (sizeof (signed char))
13749   return 0;
13750   ;
13751   return 0;
13752 }
13753 _ACEOF
13754 rm -f conftest.$ac_objext
13755 if { (eval echo "$as_me:13755: \"$ac_compile\"") >&5
13756   (eval $ac_compile) 2>&5
13757   ac_status=$?
13758   echo "$as_me:13758: \$? = $ac_status" >&5
13759   (exit $ac_status); } &&
13760          { ac_try='test -s conftest.$ac_objext'
13761   { (eval echo "$as_me:13761: \"$ac_try\"") >&5
13762   (eval $ac_try) 2>&5
13763   ac_status=$?
13764   echo "$as_me:13764: \$? = $ac_status" >&5
13765   (exit $ac_status); }; }; then
13766   ac_cv_type_signed_char=yes
13767 else
13768   echo "$as_me: failed program was:" >&5
13769 cat conftest.$ac_ext >&5
13770 ac_cv_type_signed_char=no
13771 fi
13772 rm -f conftest.$ac_objext conftest.$ac_ext
13773 fi
13774 echo "$as_me:13774: result: $ac_cv_type_signed_char" >&5
13775 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13776
13777 echo "$as_me:13777: checking size of signed char" >&5
13778 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13779 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13780   echo $ECHO_N "(cached) $ECHO_C" >&6
13781 else
13782   if test "$ac_cv_type_signed_char" = yes; then
13783   if test "$cross_compiling" = yes; then
13784   # Depending upon the size, compute the lo and hi bounds.
13785 cat >conftest.$ac_ext <<_ACEOF
13786 #line 13786 "configure"
13787 #include "confdefs.h"
13788 $ac_includes_default
13789 int
13790 main (void)
13791 {
13792 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13793   ;
13794   return 0;
13795 }
13796 _ACEOF
13797 rm -f conftest.$ac_objext
13798 if { (eval echo "$as_me:13798: \"$ac_compile\"") >&5
13799   (eval $ac_compile) 2>&5
13800   ac_status=$?
13801   echo "$as_me:13801: \$? = $ac_status" >&5
13802   (exit $ac_status); } &&
13803          { ac_try='test -s conftest.$ac_objext'
13804   { (eval echo "$as_me:13804: \"$ac_try\"") >&5
13805   (eval $ac_try) 2>&5
13806   ac_status=$?
13807   echo "$as_me:13807: \$? = $ac_status" >&5
13808   (exit $ac_status); }; }; then
13809   ac_lo=0 ac_mid=0
13810   while :; do
13811     cat >conftest.$ac_ext <<_ACEOF
13812 #line 13812 "configure"
13813 #include "confdefs.h"
13814 $ac_includes_default
13815 int
13816 main (void)
13817 {
13818 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13819   ;
13820   return 0;
13821 }
13822 _ACEOF
13823 rm -f conftest.$ac_objext
13824 if { (eval echo "$as_me:13824: \"$ac_compile\"") >&5
13825   (eval $ac_compile) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); } &&
13829          { ac_try='test -s conftest.$ac_objext'
13830   { (eval echo "$as_me:13830: \"$ac_try\"") >&5
13831   (eval $ac_try) 2>&5
13832   ac_status=$?
13833   echo "$as_me:13833: \$? = $ac_status" >&5
13834   (exit $ac_status); }; }; then
13835   ac_hi=$ac_mid; break
13836 else
13837   echo "$as_me: failed program was:" >&5
13838 cat conftest.$ac_ext >&5
13839 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13840 fi
13841 rm -f conftest.$ac_objext conftest.$ac_ext
13842   done
13843 else
13844   echo "$as_me: failed program was:" >&5
13845 cat conftest.$ac_ext >&5
13846 ac_hi=-1 ac_mid=-1
13847   while :; do
13848     cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851 $ac_includes_default
13852 int
13853 main (void)
13854 {
13855 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13856   ;
13857   return 0;
13858 }
13859 _ACEOF
13860 rm -f conftest.$ac_objext
13861 if { (eval echo "$as_me:13861: \"$ac_compile\"") >&5
13862   (eval $ac_compile) 2>&5
13863   ac_status=$?
13864   echo "$as_me:13864: \$? = $ac_status" >&5
13865   (exit $ac_status); } &&
13866          { ac_try='test -s conftest.$ac_objext'
13867   { (eval echo "$as_me:13867: \"$ac_try\"") >&5
13868   (eval $ac_try) 2>&5
13869   ac_status=$?
13870   echo "$as_me:13870: \$? = $ac_status" >&5
13871   (exit $ac_status); }; }; then
13872   ac_lo=$ac_mid; break
13873 else
13874   echo "$as_me: failed program was:" >&5
13875 cat conftest.$ac_ext >&5
13876 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13877 fi
13878 rm -f conftest.$ac_objext conftest.$ac_ext
13879   done
13880 fi
13881 rm -f conftest.$ac_objext conftest.$ac_ext
13882 # Binary search between lo and hi bounds.
13883 while test "x$ac_lo" != "x$ac_hi"; do
13884   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13885   cat >conftest.$ac_ext <<_ACEOF
13886 #line 13886 "configure"
13887 #include "confdefs.h"
13888 $ac_includes_default
13889 int
13890 main (void)
13891 {
13892 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13893   ;
13894   return 0;
13895 }
13896 _ACEOF
13897 rm -f conftest.$ac_objext
13898 if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899   (eval $ac_compile) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); } &&
13903          { ac_try='test -s conftest.$ac_objext'
13904   { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905   (eval $ac_try) 2>&5
13906   ac_status=$?
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit $ac_status); }; }; then
13909   ac_hi=$ac_mid
13910 else
13911   echo "$as_me: failed program was:" >&5
13912 cat conftest.$ac_ext >&5
13913 ac_lo=`expr $ac_mid + 1`
13914 fi
13915 rm -f conftest.$ac_objext conftest.$ac_ext
13916 done
13917 ac_cv_sizeof_signed_char=$ac_lo
13918 else
13919   if test "$cross_compiling" = yes; then
13920   { { echo "$as_me:13920: error: cannot run test program while cross compiling" >&5
13921 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13922    { (exit 1); exit 1; }; }
13923 else
13924   cat >conftest.$ac_ext <<_ACEOF
13925 #line 13925 "configure"
13926 #include "confdefs.h"
13927 $ac_includes_default
13928 int
13929 main (void)
13930 {
13931 FILE *f = fopen ("conftest.val", "w");
13932 if (!f)
13933   $ac_main_return (1);
13934 fprintf (f, "%d", (sizeof (signed char)));
13935 fclose (f);
13936   ;
13937   return 0;
13938 }
13939 _ACEOF
13940 rm -f conftest$ac_exeext
13941 if { (eval echo "$as_me:13941: \"$ac_link\"") >&5
13942   (eval $ac_link) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13946   { (eval echo "$as_me:13946: \"$ac_try\"") >&5
13947   (eval $ac_try) 2>&5
13948   ac_status=$?
13949   echo "$as_me:13949: \$? = $ac_status" >&5
13950   (exit $ac_status); }; }; then
13951   ac_cv_sizeof_signed_char=`cat conftest.val`
13952 else
13953   echo "$as_me: program exited with status $ac_status" >&5
13954 echo "$as_me: failed program was:" >&5
13955 cat conftest.$ac_ext >&5
13956 fi
13957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13958 fi
13959 fi
13960 rm -f conftest.val
13961 else
13962   ac_cv_sizeof_signed_char=0
13963 fi
13964 fi
13965 echo "$as_me:13965: result: $ac_cv_sizeof_signed_char" >&5
13966 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13967 cat >>confdefs.h <<EOF
13968 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13969 EOF
13970
13971 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13972         NCURSES_SBOOL="signed char"
13973 else
13974         NCURSES_SBOOL="char"
13975 fi
13976 echo "$as_me:13976: checking if you want to use signed Boolean array in term.h" >&5
13977 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13978
13979 # Check whether --enable-signed-char or --disable-signed-char was given.
13980 if test "${enable_signed_char+set}" = set; then
13981   enableval="$enable_signed_char"
13982   with_signed_char=$enableval
13983 else
13984   with_signed_char=no
13985 fi;
13986 echo "$as_me:13986: result: $with_signed_char" >&5
13987 echo "${ECHO_T}$with_signed_char" >&6
13988 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13989
13990 ###   use option --with-tparm-arg to override tparm's argument type
13991 echo "$as_me:13991: checking for type of tparm args" >&5
13992 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13993
13994 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13995 if test "${with_tparm_arg+set}" = set; then
13996   withval="$with_tparm_arg"
13997   NCURSES_TPARM_ARG="$withval"
13998 else
13999   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14000 fi;
14001 echo "$as_me:14001: result: $NCURSES_TPARM_ARG" >&5
14002 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14003
14004 ### Enable compiling-in rcs id's
14005 echo "$as_me:14005: checking if RCS identifiers should be compiled-in" >&5
14006 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14007
14008 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14009 if test "${with_rcs_ids+set}" = set; then
14010   withval="$with_rcs_ids"
14011   with_rcs_ids=$withval
14012 else
14013   with_rcs_ids=no
14014 fi;
14015 echo "$as_me:14015: result: $with_rcs_ids" >&5
14016 echo "${ECHO_T}$with_rcs_ids" >&6
14017 test "x$with_rcs_ids" = xyes &&
14018 cat >>confdefs.h <<\EOF
14019 #define USE_RCS_IDS 1
14020 EOF
14021
14022 ###############################################################################
14023
14024 echo "$as_me:14024: checking format of man-pages" >&5
14025 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14026
14027 # Check whether --with-manpage-format or --without-manpage-format was given.
14028 if test "${with_manpage_format+set}" = set; then
14029   withval="$with_manpage_format"
14030   MANPAGE_FORMAT=$withval
14031 else
14032   MANPAGE_FORMAT=unknown
14033 fi;
14034
14035 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14036 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14037
14038 cf_unknown=
14039
14040 case $MANPAGE_FORMAT in
14041 (unknown)
14042         if test -z "$MANPATH" ; then
14043                 MANPATH="/usr/man:/usr/share/man"
14044         fi
14045
14046         # look for the 'date' man-page (it's most likely to be installed!)
14047         MANPAGE_FORMAT=
14048         cf_preform=no
14049         cf_catonly=yes
14050         cf_example=date
14051
14052         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14053         for cf_dir in $MANPATH; do
14054                 test -z "$cf_dir" && cf_dir=/usr/man
14055                 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
14056                 do
14057                         cf_test=`echo $cf_name | sed -e 's/*//'`
14058                         if test "x$cf_test" = "x$cf_name" ; then
14059
14060                                 case "$cf_name" in
14061                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14062                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14063                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14064                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14065                                 esac
14066
14067                                 case "$cf_name" in
14068                                 ($cf_dir/man*)
14069                                         cf_catonly=no
14070                                         ;;
14071                                 ($cf_dir/cat*)
14072                                         cf_preform=yes
14073                                         ;;
14074                                 esac
14075                                 break
14076                         fi
14077
14078                         # if we found a match in either man* or cat*, stop looking
14079                         if test -n "$MANPAGE_FORMAT" ; then
14080                                 cf_found=no
14081                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14082                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14083                                 case "$cf_name" in
14084                                 ($cf_dir/cat*)
14085                                         cf_found=yes
14086                                         ;;
14087                                 esac
14088                                 test $cf_found=yes && break
14089                         fi
14090                 done
14091                 # only check the first directory in $MANPATH where we find manpages
14092                 if test -n "$MANPAGE_FORMAT" ; then
14093                         break
14094                 fi
14095         done
14096         # if we did not find the example, just assume it is normal
14097         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14098         IFS="$ac_save_ifs"
14099         ;;
14100 (*)
14101         for cf_option in $MANPAGE_FORMAT; do
14102         case $cf_option in
14103         (gzip|compress|BSDI|normal|formatted|catonly)
14104                 ;;
14105         (*)
14106                 cf_unknown="$cf_unknown $cf_option"
14107                 ;;
14108         esac
14109         done
14110         ;;
14111 esac
14112
14113 echo "$as_me:14113: result: $MANPAGE_FORMAT" >&5
14114 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14115 if test -n "$cf_unknown" ; then
14116         { echo "$as_me:14116: WARNING: Unexpected manpage-format $cf_unknown" >&5
14117 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14118 fi
14119
14120 echo "$as_me:14120: checking for manpage renaming" >&5
14121 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14122
14123 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14124 if test "${with_manpage_renames+set}" = set; then
14125   withval="$with_manpage_renames"
14126   MANPAGE_RENAMES=$withval
14127 else
14128   MANPAGE_RENAMES=yes
14129 fi;
14130
14131 case ".$MANPAGE_RENAMES" in
14132 (.no)
14133         ;;
14134 (.|.yes)
14135         # Debian 'man' program?
14136         if test -f /etc/debian_version ; then
14137                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14138         else
14139                 MANPAGE_RENAMES=no
14140         fi
14141         ;;
14142 esac
14143
14144 if test "$MANPAGE_RENAMES" != no ; then
14145         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14146                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14147         elif test ! -f $MANPAGE_RENAMES ; then
14148                 { { echo "$as_me:14148: error: not a filename: $MANPAGE_RENAMES" >&5
14149 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14150    { (exit 1); exit 1; }; }
14151         fi
14152
14153         test ! -d man && mkdir man
14154
14155         # Construct a sed-script to perform renaming within man-pages
14156         if test -n "$MANPAGE_RENAMES" ; then
14157                 test ! -d man && mkdir man
14158                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14159         fi
14160 fi
14161
14162 echo "$as_me:14162: result: $MANPAGE_RENAMES" >&5
14163 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14164
14165 echo "$as_me:14165: checking if manpage aliases will be installed" >&5
14166 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14167
14168 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14169 if test "${with_manpage_aliases+set}" = set; then
14170   withval="$with_manpage_aliases"
14171   MANPAGE_ALIASES=$withval
14172 else
14173   MANPAGE_ALIASES=yes
14174 fi;
14175
14176 echo "$as_me:14176: result: $MANPAGE_ALIASES" >&5
14177 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14178
14179 case "x$LN_S" in
14180 (xln*)
14181         cf_use_symlinks=yes
14182         ;;
14183 (*)
14184         cf_use_symlinks=no
14185         ;;
14186 esac
14187
14188 MANPAGE_SYMLINKS=no
14189 if test "$MANPAGE_ALIASES" = yes ; then
14190 echo "$as_me:14190: checking if manpage symlinks should be used" >&5
14191 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14192
14193 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14194 if test "${with_manpage_symlinks+set}" = set; then
14195   withval="$with_manpage_symlinks"
14196   MANPAGE_SYMLINKS=$withval
14197 else
14198   MANPAGE_SYMLINKS=$cf_use_symlinks
14199 fi;
14200
14201 if test "$$cf_use_symlinks" = no; then
14202 if test "$MANPAGE_SYMLINKS" = yes ; then
14203         { echo "$as_me:14203: WARNING: cannot make symlinks" >&5
14204 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14205         MANPAGE_SYMLINKS=no
14206 fi
14207 fi
14208
14209 echo "$as_me:14209: result: $MANPAGE_SYMLINKS" >&5
14210 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14211 fi
14212
14213 echo "$as_me:14213: checking for manpage tbl" >&5
14214 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14215
14216 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14217 if test "${with_manpage_tbl+set}" = set; then
14218   withval="$with_manpage_tbl"
14219   MANPAGE_TBL=$withval
14220 else
14221   MANPAGE_TBL=no
14222 fi;
14223
14224 echo "$as_me:14224: result: $MANPAGE_TBL" >&5
14225 echo "${ECHO_T}$MANPAGE_TBL" >&6
14226
14227 if test "$prefix" = "NONE" ; then
14228         cf_prefix="$ac_default_prefix"
14229 else
14230         cf_prefix="$prefix"
14231 fi
14232
14233 case "$MANPAGE_FORMAT" in
14234 (*catonly*)
14235         cf_format=yes
14236         cf_inboth=no
14237         ;;
14238 (*formatted*)
14239         cf_format=yes
14240         cf_inboth=yes
14241         ;;
14242 (*)
14243         cf_format=no
14244         cf_inboth=no
14245         ;;
14246 esac
14247
14248 test ! -d man && mkdir man
14249
14250 cf_so_strip=
14251 cf_compress=
14252 case "$MANPAGE_FORMAT" in
14253 (*compress*)
14254         cf_so_strip="Z"
14255         cf_compress=compress
14256         ;;
14257 (*gzip*)
14258         cf_so_strip="gz"
14259         cf_compress=gzip
14260         ;;
14261 esac
14262
14263 cf_edit_man=./edit_man.sh
14264 cf_man_alias=`pwd`/man_alias.sed
14265
14266 cat >$cf_edit_man <<CF_EOF
14267 #! $SHELL
14268 # this script is generated by the configure-script CF_MAN_PAGES macro.
14269
14270 prefix="$cf_prefix"
14271 datarootdir="$datarootdir"
14272 datadir="$datadir"
14273
14274 NCURSES_MAJOR="$NCURSES_MAJOR"
14275 NCURSES_MINOR="$NCURSES_MINOR"
14276 NCURSES_PATCH="$NCURSES_PATCH"
14277
14278 NCURSES_OSPEED="$NCURSES_OSPEED"
14279 TERMINFO="$TERMINFO"
14280
14281 INSTALL="$INSTALL"
14282 INSTALL_DATA="$INSTALL_DATA"
14283
14284 transform="$program_transform_name"
14285
14286 TMP=\${TMPDIR:=/tmp}/man\$\$
14287 trap "rm -f \$TMP" 0 1 2 3 15
14288
14289 form=\$1
14290 shift || exit 1
14291
14292 verb=\$1
14293 shift || exit 1
14294
14295 mandir=\$1
14296 shift || exit 1
14297
14298 srcdir=\$1
14299 top_srcdir=\$srcdir/..
14300 shift || exit 1
14301
14302 if test "\$form" = normal ; then
14303         if test "$cf_format" = yes ; then
14304         if test "$cf_inboth" = no ; then
14305                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14306                 exit $?
14307         fi
14308         fi
14309         cf_subdir=\$mandir/man
14310         cf_tables=$MANPAGE_TBL
14311 else
14312         cf_subdir=\$mandir/cat
14313         cf_tables=yes
14314 fi
14315
14316 # process the list of source-files
14317 for i in \$* ; do
14318 case \$i in
14319 (*.orig|*.rej) ;;
14320 (*.[0-9]*)
14321         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14322         if test \$verb = installing ; then
14323         if test ! -d \$cf_subdir\${section} ; then
14324                 mkdir -p \$cf_subdir\$section
14325         fi
14326         fi
14327
14328         # replace variables in man page
14329         if test ! -f $cf_man_alias ; then
14330 cat >>$cf_man_alias <<-CF_EOF2
14331                 s,@DATADIR@,\$datadir,g
14332                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14333                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14334                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14335                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14336                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14337                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14338 CF_EOF
14339
14340         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14341         do
14342                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14343                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14344 cat >>$cf_edit_man <<-CF_EOF
14345                 s,@$cf_NAME@,$cf_name,g
14346 CF_EOF
14347         done
14348
14349 cat >>$cf_edit_man <<CF_EOF
14350 CF_EOF2
14351                 echo "...made $cf_man_alias"
14352         fi
14353
14354         aliases=
14355         cf_source=\`basename \$i\`
14356         inalias=\$cf_source
14357         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14358         if test ! -f \$inalias ; then
14359                 echo .. skipped \$cf_source
14360                 continue
14361         fi
14362 CF_EOF
14363
14364 if test "$MANPAGE_ALIASES" != no ; then
14365 cat >>$cf_edit_man <<CF_EOF
14366         nCurses=ignore.3x
14367         test $with_curses_h = yes && nCurses=ncurses.3x
14368         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14369 CF_EOF
14370 fi
14371
14372 if test "$MANPAGE_RENAMES" = no ; then
14373 cat >>$cf_edit_man <<CF_EOF
14374         # perform program transformations for section 1 man pages
14375         if test \$section = 1 ; then
14376                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14377         else
14378                 cf_target=\$cf_subdir\${section}/\$cf_source
14379         fi
14380 CF_EOF
14381 else
14382 cat >>$cf_edit_man <<CF_EOF
14383         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14384         if test -z "\$cf_target" ; then
14385                 echo '? missing rename for '\$cf_source
14386                 cf_target="\$cf_source"
14387         fi
14388         cf_target="\$cf_subdir\${section}/\${cf_target}"
14389
14390 CF_EOF
14391 fi
14392
14393 cat >>$cf_edit_man <<CF_EOF
14394         sed     -f $cf_man_alias \\
14395 CF_EOF
14396
14397 if test -f $MANPAGE_RENAMES ; then
14398 cat >>$cf_edit_man <<CF_EOF
14399                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14400 CF_EOF
14401 else
14402 cat >>$cf_edit_man <<CF_EOF
14403                 < \$i >\$TMP
14404 CF_EOF
14405 fi
14406
14407 cat >>$cf_edit_man <<CF_EOF
14408 if test \$cf_tables = yes ; then
14409         tbl \$TMP >\$TMP.out
14410         mv \$TMP.out \$TMP
14411 fi
14412 CF_EOF
14413
14414 if test $with_overwrite != yes ; then
14415 cat >>$cf_edit_man <<CF_EOF
14416         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14417         mv \$TMP.out \$TMP
14418 CF_EOF
14419 fi
14420
14421 if test $with_curses_h != yes ; then
14422 cat >>$cf_edit_man <<CF_EOF
14423         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14424         mv \$TMP.out \$TMP
14425 CF_EOF
14426 fi
14427
14428 cat >>$cf_edit_man <<CF_EOF
14429         if test \$form = format ; then
14430                 nroff -man \$TMP >\$TMP.out
14431                 mv \$TMP.out \$TMP
14432         fi
14433 CF_EOF
14434
14435 if test -n "$cf_compress" ; then
14436 cat >>$cf_edit_man <<CF_EOF
14437         if test \$verb = installing ; then
14438         if ( $cf_compress -f \$TMP )
14439         then
14440                 mv \$TMP.$cf_so_strip \$TMP
14441         fi
14442         fi
14443         cf_target="\$cf_target.$cf_so_strip"
14444 CF_EOF
14445 fi
14446
14447 case "$MANPAGE_FORMAT" in
14448 (*BSDI*)
14449 cat >>$cf_edit_man <<CF_EOF
14450         if test \$form = format ; then
14451                 # BSDI installs only .0 suffixes in the cat directories
14452                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14453         fi
14454 CF_EOF
14455   ;;
14456 esac
14457
14458 cat >>$cf_edit_man <<CF_EOF
14459         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14460         if test \$verb = installing ; then
14461                 echo \$verb \$cf_target
14462                 \$INSTALL_DATA \$TMP \$cf_target
14463                 test -d \$cf_subdir\${section} &&
14464                 test -n "\$aliases" && (
14465                         cd \$cf_subdir\${section} && (
14466                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14467                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14468                                 cf_target=\`basename \$cf_target\`
14469                                 for cf_alias in \$aliases
14470                                 do
14471                                         if test \$section = 1 ; then
14472                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14473                                         fi
14474
14475                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14476                                                 if test -f \$cf_alias\${suffix} ; then
14477                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14478                                                         then
14479                                                                 continue
14480                                                         fi
14481                                                 fi
14482                                                 echo .. \$verb alias \$cf_alias\${suffix}
14483 CF_EOF
14484 case "x$LN_S" in
14485 (*-f)
14486 cat >>$cf_edit_man <<CF_EOF
14487                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14488 CF_EOF
14489         ;;
14490 (*)
14491 cat >>$cf_edit_man <<CF_EOF
14492                                                 rm -f \$cf_alias\${suffix}
14493                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14494 CF_EOF
14495         ;;
14496 esac
14497 cat >>$cf_edit_man <<CF_EOF
14498                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14499                                                 echo ".so \$cf_source" >\$TMP
14500 CF_EOF
14501 if test -n "$cf_compress" ; then
14502 cat >>$cf_edit_man <<CF_EOF
14503                                                 if test -n "$cf_so_strip" ; then
14504                                                         $cf_compress -f \$TMP
14505                                                         mv \$TMP.$cf_so_strip \$TMP
14506                                                 fi
14507 CF_EOF
14508 fi
14509 cat >>$cf_edit_man <<CF_EOF
14510                                                 echo .. \$verb alias \$cf_alias\${suffix}
14511                                                 rm -f \$cf_alias\${suffix}
14512                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14513                                         fi
14514                                 done
14515                         )
14516                 )
14517         elif test \$verb = removing ; then
14518                 test -f \$cf_target && (
14519                         echo \$verb \$cf_target
14520                         rm -f \$cf_target
14521                 )
14522                 test -d \$cf_subdir\${section} &&
14523                 test -n "\$aliases" && (
14524                         cd \$cf_subdir\${section} && (
14525                                 for cf_alias in \$aliases
14526                                 do
14527                                         if test \$section = 1 ; then
14528                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14529                                         fi
14530
14531                                         echo .. \$verb alias \$cf_alias\${suffix}
14532                                         rm -f \$cf_alias\${suffix}
14533                                 done
14534                         )
14535                 )
14536         else
14537 #               echo ".hy 0"
14538                 cat \$TMP
14539         fi
14540         ;;
14541 esac
14542 done
14543
14544 if test $cf_inboth = yes ; then
14545 if test \$form != format ; then
14546         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14547 fi
14548 fi
14549
14550 exit 0
14551 CF_EOF
14552 chmod 755 $cf_edit_man
14553
14554 ###############################################################################
14555
14556 ### Note that some functions (such as const) are normally disabled anyway.
14557 echo "$as_me:14557: checking if you want to build with function extensions" >&5
14558 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14559
14560 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14561 if test "${enable_ext_funcs+set}" = set; then
14562   enableval="$enable_ext_funcs"
14563   with_ext_funcs=$enableval
14564 else
14565   with_ext_funcs=yes
14566 fi;
14567 echo "$as_me:14567: result: $with_ext_funcs" >&5
14568 echo "${ECHO_T}$with_ext_funcs" >&6
14569 if test "x$with_ext_funcs" = xyes ; then
14570         NCURSES_EXT_FUNCS=1
14571
14572 cat >>confdefs.h <<\EOF
14573 #define NCURSES_EXT_FUNCS 1
14574 EOF
14575
14576 cat >>confdefs.h <<\EOF
14577 #define HAVE_ASSUME_DEFAULT_COLORS 1
14578 EOF
14579
14580 cat >>confdefs.h <<\EOF
14581 #define HAVE_CURSES_VERSION 1
14582 EOF
14583
14584 cat >>confdefs.h <<\EOF
14585 #define HAVE_HAS_KEY 1
14586 EOF
14587
14588 cat >>confdefs.h <<\EOF
14589 #define HAVE_RESIZETERM 1
14590 EOF
14591
14592 cat >>confdefs.h <<\EOF
14593 #define HAVE_RESIZE_TERM 1
14594 EOF
14595
14596 cat >>confdefs.h <<\EOF
14597 #define HAVE_TERM_ENTRY_H 1
14598 EOF
14599
14600 cat >>confdefs.h <<\EOF
14601 #define HAVE_USE_DEFAULT_COLORS 1
14602 EOF
14603
14604 cat >>confdefs.h <<\EOF
14605 #define HAVE_USE_EXTENDED_NAMES 1
14606 EOF
14607
14608 cat >>confdefs.h <<\EOF
14609 #define HAVE_USE_SCREEN 1
14610 EOF
14611
14612 cat >>confdefs.h <<\EOF
14613 #define HAVE_USE_WINDOW 1
14614 EOF
14615
14616 cat >>confdefs.h <<\EOF
14617 #define HAVE_WRESIZE 1
14618 EOF
14619
14620         GENERATED_EXT_FUNCS=generated
14621         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14622 else
14623         NCURSES_EXT_FUNCS=0
14624         GENERATED_EXT_FUNCS=
14625 fi
14626
14627 echo "$as_me:14627: checking if you want to build with SCREEN extensions" >&5
14628 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14629
14630 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14631 if test "${enable_sp_funcs+set}" = set; then
14632   enableval="$enable_sp_funcs"
14633   with_sp_funcs=$enableval
14634 else
14635   with_sp_funcs=$cf_dft_ext_spfuncs
14636 fi;
14637 echo "$as_me:14637: result: $with_sp_funcs" >&5
14638 echo "${ECHO_T}$with_sp_funcs" >&6
14639 if test "x$with_sp_funcs" = xyes ; then
14640         NCURSES_SP_FUNCS=1
14641
14642 cat >>confdefs.h <<\EOF
14643 #define NCURSES_SP_FUNCS 1
14644 EOF
14645
14646 cat >>confdefs.h <<\EOF
14647 #define HAVE_TPUTS_SP 1
14648 EOF
14649
14650         GENERATED_SP_FUNCS=generated
14651 else
14652         NCURSES_SP_FUNCS=0
14653         GENERATED_SP_FUNCS=
14654 fi
14655
14656 echo "$as_me:14656: checking if you want to build with terminal-driver" >&5
14657 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14658
14659 # Check whether --enable-term-driver or --disable-term-driver was given.
14660 if test "${enable_term_driver+set}" = set; then
14661   enableval="$enable_term_driver"
14662   with_term_driver=$enableval
14663 else
14664   with_term_driver=no
14665 fi;
14666 echo "$as_me:14666: result: $with_term_driver" >&5
14667 echo "${ECHO_T}$with_term_driver" >&6
14668 if test "x$with_term_driver" = xyes ; then
14669
14670 cat >>confdefs.h <<\EOF
14671 #define USE_TERM_DRIVER 1
14672 EOF
14673
14674         if test "x$with_termlib" != xno ; then
14675                 { { echo "$as_me:14675: error: The term-driver option conflicts with the termlib option" >&5
14676 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14677    { (exit 1); exit 1; }; }
14678         fi
14679         if test "x$with_sp_funcs" != xyes ; then
14680                 { { echo "$as_me:14680: error: The term-driver option relies upon sp-funcs" >&5
14681 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14682    { (exit 1); exit 1; }; }
14683         fi
14684 fi
14685
14686 ###   use option --enable-const to turn on use of const beyond that in XSI.
14687 echo "$as_me:14687: checking for extended use of const keyword" >&5
14688 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14689
14690 # Check whether --enable-const or --disable-const was given.
14691 if test "${enable_const+set}" = set; then
14692   enableval="$enable_const"
14693   with_ext_const=$enableval
14694 else
14695   with_ext_const=$cf_dft_ext_const
14696 fi;
14697 echo "$as_me:14697: result: $with_ext_const" >&5
14698 echo "${ECHO_T}$with_ext_const" >&6
14699 NCURSES_CONST='/*nothing*/'
14700 if test "x$with_ext_const" = xyes ; then
14701         NCURSES_CONST=const
14702 fi
14703
14704 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14705 echo "$as_me:14705: checking if you want to use extended colors" >&5
14706 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14707
14708 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14709 if test "${enable_ext_colors+set}" = set; then
14710   enableval="$enable_ext_colors"
14711   with_ext_colors=$enableval
14712 else
14713   with_ext_colors=$cf_dft_ext_colors
14714 fi;
14715 echo "$as_me:14715: result: $with_ext_colors" >&5
14716 echo "${ECHO_T}$with_ext_colors" >&6
14717 NCURSES_EXT_COLORS=0
14718 if test "x$with_ext_colors" = xyes ; then
14719         if test "x$with_widec" != xyes ; then
14720                 { echo "$as_me:14720: WARNING: This option applies only to wide-character library" >&5
14721 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14722         else
14723                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14724
14725 if test "${with_abi_version+set}" != set; then
14726         case $cf_cv_rel_version in
14727         (5.*)
14728                 cf_cv_rel_version=6.0
14729                 cf_cv_abi_version=6
14730                 { echo "$as_me:14730: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14731 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14732                 ;;
14733         esac
14734 fi
14735
14736                 NCURSES_EXT_COLORS=1
14737
14738 cat >>confdefs.h <<\EOF
14739 #define NCURSES_EXT_COLORS 1
14740 EOF
14741
14742 cat >>confdefs.h <<\EOF
14743 #define HAVE_ALLOC_PAIR 1
14744 EOF
14745
14746 cat >>confdefs.h <<\EOF
14747 #define HAVE_INIT_EXTENDED_COLOR 1
14748 EOF
14749
14750 cat >>confdefs.h <<\EOF
14751 #define HAVE_RESET_COLOR_PAIRS 1
14752 EOF
14753
14754         fi
14755 fi
14756
14757 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14758 echo "$as_me:14758: checking if you want to use extended mouse encoding" >&5
14759 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14760
14761 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14762 if test "${enable_ext_mouse+set}" = set; then
14763   enableval="$enable_ext_mouse"
14764   with_ext_mouse=$enableval
14765 else
14766   with_ext_mouse=$cf_dft_ext_mouse
14767 fi;
14768 echo "$as_me:14768: result: $with_ext_mouse" >&5
14769 echo "${ECHO_T}$with_ext_mouse" >&6
14770 NCURSES_MOUSE_VERSION=1
14771 if test "x$with_ext_mouse" = xyes ; then
14772         NCURSES_MOUSE_VERSION=2
14773
14774 if test "${with_abi_version+set}" != set; then
14775         case $cf_cv_rel_version in
14776         (5.*)
14777                 cf_cv_rel_version=6.0
14778                 cf_cv_abi_version=6
14779                 { echo "$as_me:14779: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14780 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14781                 ;;
14782         esac
14783 fi
14784
14785 fi
14786
14787 ###   use option --enable-ext-putwin to turn on extended screendumps
14788 echo "$as_me:14788: checking if you want to use extended putwin/screendump" >&5
14789 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14790
14791 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14792 if test "${enable_ext_putwin+set}" = set; then
14793   enableval="$enable_ext_putwin"
14794   with_ext_putwin=$enableval
14795 else
14796   with_ext_putwin=$cf_dft_ext_putwin
14797 fi;
14798 echo "$as_me:14798: result: $with_ext_putwin" >&5
14799 echo "${ECHO_T}$with_ext_putwin" >&6
14800 if test "x$with_ext_putwin" = xyes ; then
14801
14802 cat >>confdefs.h <<\EOF
14803 #define NCURSES_EXT_PUTWIN 1
14804 EOF
14805
14806 fi
14807
14808 echo "$as_me:14808: checking if you want \$NCURSES_NO_PADDING code" >&5
14809 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14810
14811 # Check whether --enable-no-padding or --disable-no-padding was given.
14812 if test "${enable_no_padding+set}" = set; then
14813   enableval="$enable_no_padding"
14814   with_no_padding=$enableval
14815 else
14816   with_no_padding=$with_ext_funcs
14817 fi;
14818 echo "$as_me:14818: result: $with_no_padding" >&5
14819 echo "${ECHO_T}$with_no_padding" >&6
14820 test "x$with_no_padding" = xyes &&
14821 cat >>confdefs.h <<\EOF
14822 #define NCURSES_NO_PADDING 1
14823 EOF
14824
14825 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14826 echo "$as_me:14826: checking if you want SIGWINCH handler" >&5
14827 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14828
14829 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14830 if test "${enable_sigwinch+set}" = set; then
14831   enableval="$enable_sigwinch"
14832   with_sigwinch=$enableval
14833 else
14834   with_sigwinch=$with_ext_funcs
14835 fi;
14836 echo "$as_me:14836: result: $with_sigwinch" >&5
14837 echo "${ECHO_T}$with_sigwinch" >&6
14838 test "x$with_sigwinch" = xyes &&
14839 cat >>confdefs.h <<\EOF
14840 #define USE_SIGWINCH 1
14841 EOF
14842
14843 ###   use option --enable-tcap-names to allow user to define new capabilities
14844 echo "$as_me:14844: checking if you want user-definable terminal capabilities like termcap" >&5
14845 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14846
14847 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14848 if test "${enable_tcap_names+set}" = set; then
14849   enableval="$enable_tcap_names"
14850   with_tcap_names=$enableval
14851 else
14852   with_tcap_names=$with_ext_funcs
14853 fi;
14854 echo "$as_me:14854: result: $with_tcap_names" >&5
14855 echo "${ECHO_T}$with_tcap_names" >&6
14856 NCURSES_XNAMES=0
14857 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14858
14859 ##############################################################################
14860
14861 echo "$as_me:14861: checking if you want to link with the pthread library" >&5
14862 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14863
14864 # Check whether --with-pthread or --without-pthread was given.
14865 if test "${with_pthread+set}" = set; then
14866   withval="$with_pthread"
14867   with_pthread=$withval
14868 else
14869   with_pthread=no
14870 fi;
14871 echo "$as_me:14871: result: $with_pthread" >&5
14872 echo "${ECHO_T}$with_pthread" >&6
14873
14874 if test "$with_pthread" != no ; then
14875         echo "$as_me:14875: checking for pthread.h" >&5
14876 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14877 if test "${ac_cv_header_pthread_h+set}" = set; then
14878   echo $ECHO_N "(cached) $ECHO_C" >&6
14879 else
14880   cat >conftest.$ac_ext <<_ACEOF
14881 #line 14881 "configure"
14882 #include "confdefs.h"
14883 #include <pthread.h>
14884 _ACEOF
14885 if { (eval echo "$as_me:14885: \"$ac_cpp conftest.$ac_ext\"") >&5
14886   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14887   ac_status=$?
14888   egrep -v '^ *\+' conftest.er1 >conftest.err
14889   rm -f conftest.er1
14890   cat conftest.err >&5
14891   echo "$as_me:14891: \$? = $ac_status" >&5
14892   (exit $ac_status); } >/dev/null; then
14893   if test -s conftest.err; then
14894     ac_cpp_err=$ac_c_preproc_warn_flag
14895   else
14896     ac_cpp_err=
14897   fi
14898 else
14899   ac_cpp_err=yes
14900 fi
14901 if test -z "$ac_cpp_err"; then
14902   ac_cv_header_pthread_h=yes
14903 else
14904   echo "$as_me: failed program was:" >&5
14905   cat conftest.$ac_ext >&5
14906   ac_cv_header_pthread_h=no
14907 fi
14908 rm -f conftest.err conftest.$ac_ext
14909 fi
14910 echo "$as_me:14910: result: $ac_cv_header_pthread_h" >&5
14911 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14912 if test $ac_cv_header_pthread_h = yes; then
14913
14914 cat >>confdefs.h <<\EOF
14915 #define HAVE_PTHREADS_H 1
14916 EOF
14917
14918         for cf_lib_pthread in pthread c_r
14919         do
14920             echo "$as_me:14920: checking if we can link with the $cf_lib_pthread library" >&5
14921 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14922             cf_save_LIBS="$LIBS"
14923
14924 cf_add_libs="$LIBS"
14925 # reverse order
14926 cf_add_0lib=
14927 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14928 # filter duplicates
14929 for cf_add_1lib in $cf_add_0lib; do
14930         for cf_add_2lib in $cf_add_libs; do
14931                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14932                         cf_add_1lib=
14933                         break
14934                 fi
14935         done
14936         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14937 done
14938 LIBS="$cf_add_libs"
14939
14940             cat >conftest.$ac_ext <<_ACEOF
14941 #line 14941 "configure"
14942 #include "confdefs.h"
14943
14944 #include <pthread.h>
14945
14946 int
14947 main (void)
14948 {
14949
14950                 int rc = pthread_create(0,0,0,0);
14951                 int r2 = pthread_mutexattr_settype(0, 0);
14952
14953   ;
14954   return 0;
14955 }
14956 _ACEOF
14957 rm -f conftest.$ac_objext conftest$ac_exeext
14958 if { (eval echo "$as_me:14958: \"$ac_link\"") >&5
14959   (eval $ac_link) 2>&5
14960   ac_status=$?
14961   echo "$as_me:14961: \$? = $ac_status" >&5
14962   (exit $ac_status); } &&
14963          { ac_try='test -s conftest$ac_exeext'
14964   { (eval echo "$as_me:14964: \"$ac_try\"") >&5
14965   (eval $ac_try) 2>&5
14966   ac_status=$?
14967   echo "$as_me:14967: \$? = $ac_status" >&5
14968   (exit $ac_status); }; }; then
14969   with_pthread=yes
14970 else
14971   echo "$as_me: failed program was:" >&5
14972 cat conftest.$ac_ext >&5
14973 with_pthread=no
14974 fi
14975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14976             LIBS="$cf_save_LIBS"
14977             echo "$as_me:14977: result: $with_pthread" >&5
14978 echo "${ECHO_T}$with_pthread" >&6
14979             test "$with_pthread" = yes && break
14980         done
14981
14982         if test "$with_pthread" = yes ; then
14983
14984 cf_add_libs="$LIBS"
14985 # reverse order
14986 cf_add_0lib=
14987 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14988 # filter duplicates
14989 for cf_add_1lib in $cf_add_0lib; do
14990         for cf_add_2lib in $cf_add_libs; do
14991                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14992                         cf_add_1lib=
14993                         break
14994                 fi
14995         done
14996         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14997 done
14998 LIBS="$cf_add_libs"
14999
15000 cat >>confdefs.h <<\EOF
15001 #define HAVE_LIBPTHREADS 1
15002 EOF
15003
15004         else
15005             { { echo "$as_me:15005: error: Cannot link with pthread library" >&5
15006 echo "$as_me: error: Cannot link with pthread library" >&2;}
15007    { (exit 1); exit 1; }; }
15008         fi
15009
15010 fi
15011
15012 fi
15013
15014 if test "x$with_pthread" != xno; then
15015         echo "$as_me:15015: checking for pthread_kill" >&5
15016 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15017 if test "${ac_cv_func_pthread_kill+set}" = set; then
15018   echo $ECHO_N "(cached) $ECHO_C" >&6
15019 else
15020   cat >conftest.$ac_ext <<_ACEOF
15021 #line 15021 "configure"
15022 #include "confdefs.h"
15023 #define pthread_kill autoconf_temporary
15024 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15025 #undef pthread_kill
15026
15027 #ifdef __cplusplus
15028 extern "C"
15029 #endif
15030
15031 /* We use char because int might match the return type of a gcc2
15032    builtin and then its argument prototype would still apply.  */
15033 char pthread_kill (void);
15034
15035 int
15036 main (void)
15037 {
15038
15039 /* The GNU C library defines stubs for functions which it implements
15040     to always fail with ENOSYS.  Some functions are actually named
15041     something starting with __ and the normal name is an alias.  */
15042 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15043 #error found stub for pthread_kill
15044 #endif
15045
15046         return pthread_kill ();
15047   ;
15048   return 0;
15049 }
15050 _ACEOF
15051 rm -f conftest.$ac_objext conftest$ac_exeext
15052 if { (eval echo "$as_me:15052: \"$ac_link\"") >&5
15053   (eval $ac_link) 2>&5
15054   ac_status=$?
15055   echo "$as_me:15055: \$? = $ac_status" >&5
15056   (exit $ac_status); } &&
15057          { ac_try='test -s conftest$ac_exeext'
15058   { (eval echo "$as_me:15058: \"$ac_try\"") >&5
15059   (eval $ac_try) 2>&5
15060   ac_status=$?
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit $ac_status); }; }; then
15063   ac_cv_func_pthread_kill=yes
15064 else
15065   echo "$as_me: failed program was:" >&5
15066 cat conftest.$ac_ext >&5
15067 ac_cv_func_pthread_kill=no
15068 fi
15069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15070 fi
15071 echo "$as_me:15071: result: $ac_cv_func_pthread_kill" >&5
15072 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15073 if test $ac_cv_func_pthread_kill = yes; then
15074
15075                 echo "$as_me:15075: checking if you want to allow EINTR in wgetch with pthreads" >&5
15076 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15077
15078 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15079 if test "${enable_pthreads_eintr+set}" = set; then
15080   enableval="$enable_pthreads_eintr"
15081   use_pthreads_eintr=$enableval
15082 else
15083   use_pthreads_eintr=no
15084 fi;
15085                 echo "$as_me:15085: result: $use_pthreads_eintr" >&5
15086 echo "${ECHO_T}$use_pthreads_eintr" >&6
15087                 if test "x$use_pthreads_eintr" = xyes ; then
15088
15089 cat >>confdefs.h <<\EOF
15090 #define USE_PTHREADS_EINTR 1
15091 EOF
15092
15093                 fi
15094 fi
15095
15096         echo "$as_me:15096: checking if you want to use weak-symbols for pthreads" >&5
15097 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15098
15099 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15100 if test "${enable_weak_symbols+set}" = set; then
15101   enableval="$enable_weak_symbols"
15102   use_weak_symbols=$enableval
15103 else
15104   use_weak_symbols=no
15105 fi;
15106         echo "$as_me:15106: result: $use_weak_symbols" >&5
15107 echo "${ECHO_T}$use_weak_symbols" >&6
15108         if test "x$use_weak_symbols" = xyes ; then
15109
15110 echo "$as_me:15110: checking if $CC supports weak symbols" >&5
15111 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15112 if test "${cf_cv_weak_symbols+set}" = set; then
15113   echo $ECHO_N "(cached) $ECHO_C" >&6
15114 else
15115
15116 cat >conftest.$ac_ext <<_ACEOF
15117 #line 15117 "configure"
15118 #include "confdefs.h"
15119
15120 #include <stdio.h>
15121 int
15122 main (void)
15123 {
15124
15125 #if defined(__GNUC__)
15126 #  if defined __USE_ISOC99
15127 #    define _cat_pragma(exp)    _Pragma(#exp)
15128 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15129 #  else
15130 #    define _weak_pragma(exp)
15131 #  endif
15132 #  define _declare(name)        __extension__ extern __typeof__(name) name
15133 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15134 #endif
15135
15136 weak_symbol(fopen);
15137
15138   ;
15139   return 0;
15140 }
15141 _ACEOF
15142 rm -f conftest.$ac_objext
15143 if { (eval echo "$as_me:15143: \"$ac_compile\"") >&5
15144   (eval $ac_compile) 2>&5
15145   ac_status=$?
15146   echo "$as_me:15146: \$? = $ac_status" >&5
15147   (exit $ac_status); } &&
15148          { ac_try='test -s conftest.$ac_objext'
15149   { (eval echo "$as_me:15149: \"$ac_try\"") >&5
15150   (eval $ac_try) 2>&5
15151   ac_status=$?
15152   echo "$as_me:15152: \$? = $ac_status" >&5
15153   (exit $ac_status); }; }; then
15154   cf_cv_weak_symbols=yes
15155 else
15156   echo "$as_me: failed program was:" >&5
15157 cat conftest.$ac_ext >&5
15158 cf_cv_weak_symbols=no
15159 fi
15160 rm -f conftest.$ac_objext conftest.$ac_ext
15161
15162 fi
15163 echo "$as_me:15163: result: $cf_cv_weak_symbols" >&5
15164 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15165
15166         else
15167                 cf_cv_weak_symbols=no
15168         fi
15169
15170         if test "x$cf_cv_weak_symbols" = xyes ; then
15171
15172 cat >>confdefs.h <<\EOF
15173 #define USE_WEAK_SYMBOLS 1
15174 EOF
15175
15176         fi
15177 fi
15178
15179 PTHREAD=
15180 if test "x$with_pthread" = "xyes" ; then
15181
15182 cat >>confdefs.h <<\EOF
15183 #define USE_PTHREADS 1
15184 EOF
15185
15186         enable_reentrant=yes
15187         if test "x$cf_cv_weak_symbols" = xyes ; then
15188                 PTHREAD=-lpthread
15189
15190 cf_add_libs="$PRIVATE_LIBS"
15191 # reverse order
15192 cf_add_0lib=
15193 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15194 # filter duplicates
15195 for cf_add_1lib in $cf_add_0lib; do
15196         for cf_add_2lib in $cf_add_libs; do
15197                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15198                         cf_add_1lib=
15199                         break
15200                 fi
15201         done
15202         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15203 done
15204 PRIVATE_LIBS="$cf_add_libs"
15205
15206         fi
15207 fi
15208
15209 # Reentrant code has to be opaque; there's little advantage to making ncurses
15210 # opaque outside of that, so there is no --enable-opaque option.  We can use
15211 # this option without --with-pthreads, but this will be always set for
15212 # pthreads.
15213 echo "$as_me:15213: checking if you want reentrant code" >&5
15214 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15215
15216 # Check whether --enable-reentrant or --disable-reentrant was given.
15217 if test "${enable_reentrant+set}" = set; then
15218   enableval="$enable_reentrant"
15219   with_reentrant=$enableval
15220 else
15221   with_reentrant=no
15222 fi;
15223 echo "$as_me:15223: result: $with_reentrant" >&5
15224 echo "${ECHO_T}$with_reentrant" >&6
15225 if test "x$with_reentrant" = xyes ; then
15226         cf_cv_enable_reentrant=1
15227         cf_cv_enable_opaque="NCURSES_INTERNALS"
15228         NCURSES_SIZE_T=int
15229         if test "x$cf_cv_weak_symbols" = xyes ; then
15230
15231 # remove pthread library from $LIBS
15232 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15233
15234 cf_add_libs="$TEST_LIBS"
15235 # reverse order
15236 cf_add_0lib=
15237 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15238 # filter duplicates
15239 for cf_add_1lib in $cf_add_0lib; do
15240         for cf_add_2lib in $cf_add_libs; do
15241                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15242                         cf_add_1lib=
15243                         break
15244                 fi
15245         done
15246         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15247 done
15248 TEST_LIBS="$cf_add_libs"
15249
15250 cf_add_libs="$TEST_LIBS2"
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_LIBS2="$cf_add_libs"
15265
15266 cf_add_libs="$PRIVATE_LIBS"
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 PRIVATE_LIBS="$cf_add_libs"
15281
15282         else
15283                 # when not using weak symbols but with_reentrant,
15284                 # add 't' to the library suffix on all platforms
15285                 # except cygwin, where we only do that if ALSO
15286                 # compiling with full thread support.
15287                 case "$host" in
15288                 (*cygwin* | *msys*)
15289                         if test "$with_pthread" = "yes" ; then
15290                                 if test "x$disable_lib_suffixes" = "xno" ; then
15291                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15292                                 fi
15293                         fi ;;
15294                 (*)
15295                         if test "x$disable_lib_suffixes" = "xno" ; then
15296                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15297                         fi
15298                         ;;
15299                 esac
15300         fi
15301
15302 cat >>confdefs.h <<\EOF
15303 #define USE_REENTRANT 1
15304 EOF
15305
15306 if test "${with_abi_version+set}" != set; then
15307         case $cf_cv_rel_version in
15308         (5.*)
15309                 cf_cv_rel_version=6.0
15310                 cf_cv_abi_version=6
15311                 { echo "$as_me:15311: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15312 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15313                 ;;
15314         esac
15315 fi
15316
15317 else
15318         cf_cv_enable_reentrant=0
15319         cf_cv_enable_opaque="NCURSES_OPAQUE"
15320         NCURSES_SIZE_T=short
15321 fi
15322
15323 echo "$as_me:15323: checking if you want opaque curses-library structures" >&5
15324 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15325
15326 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15327 if test "${enable_opaque_curses+set}" = set; then
15328   enableval="$enable_opaque_curses"
15329   test "$enableval" != yes && enableval=no
15330         if test "$enableval" != "no" ; then
15331     enable_opaque_curses=yes
15332         else
15333
15334          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15335          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15336
15337         fi
15338 else
15339   enableval=no
15340
15341          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15342          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15343
15344 fi;
15345 echo "$as_me:15345: result: $enable_opaque_curses" >&5
15346 echo "${ECHO_T}$enable_opaque_curses" >&6
15347
15348 test "$cf_cv_enable_reentrant" = 1 && \
15349 test "$enable_opaque_curses" = no && \
15350 { { echo "$as_me:15350: error: reentrant configuration requires opaque library" >&5
15351 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15352    { (exit 1); exit 1; }; }
15353
15354 echo "$as_me:15354: checking if you want opaque form-library structures" >&5
15355 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15356
15357 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15358 if test "${enable_opaque_form+set}" = set; then
15359   enableval="$enable_opaque_form"
15360   enable_opaque_form=yes
15361 else
15362   enable_opaque_form=no
15363 fi;
15364 echo "$as_me:15364: result: $enable_opaque_form" >&5
15365 echo "${ECHO_T}$enable_opaque_form" >&6
15366
15367 echo "$as_me:15367: checking if you want opaque menu-library structures" >&5
15368 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15369
15370 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15371 if test "${enable_opaque_menu+set}" = set; then
15372   enableval="$enable_opaque_menu"
15373   enable_opaque_menu=yes
15374 else
15375   enable_opaque_menu=no
15376 fi;
15377 echo "$as_me:15377: result: $enable_opaque_menu" >&5
15378 echo "${ECHO_T}$enable_opaque_menu" >&6
15379
15380 echo "$as_me:15380: checking if you want opaque panel-library structures" >&5
15381 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15382
15383 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15384 if test "${enable_opaque_panel+set}" = set; then
15385   enableval="$enable_opaque_panel"
15386   enable_opaque_panel=yes
15387 else
15388   enable_opaque_panel=no
15389 fi;
15390 echo "$as_me:15390: result: $enable_opaque_panel" >&5
15391 echo "${ECHO_T}$enable_opaque_panel" >&6
15392
15393 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15394 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15395 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15396 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15397
15398 ### Allow using a different wrap-prefix
15399 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15400         echo "$as_me:15400: checking for prefix used to wrap public variables" >&5
15401 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15402
15403 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15404 if test "${with_wrap_prefix+set}" = set; then
15405   withval="$with_wrap_prefix"
15406   NCURSES_WRAP_PREFIX=$withval
15407 else
15408   NCURSES_WRAP_PREFIX=_nc_
15409 fi;
15410         echo "$as_me:15410: result: $NCURSES_WRAP_PREFIX" >&5
15411 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15412 else
15413         NCURSES_WRAP_PREFIX=_nc_
15414 fi
15415
15416 cat >>confdefs.h <<EOF
15417 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15418 EOF
15419
15420 ###############################################################################
15421 # These options are relatively safe to experiment with.
15422
15423 echo "$as_me:15423: checking if you want all development code" >&5
15424 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15425
15426 # Check whether --with-develop or --without-develop was given.
15427 if test "${with_develop+set}" = set; then
15428   withval="$with_develop"
15429   with_develop=$withval
15430 else
15431   with_develop=no
15432 fi;
15433 echo "$as_me:15433: result: $with_develop" >&5
15434 echo "${ECHO_T}$with_develop" >&6
15435
15436 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15437 echo "$as_me:15437: checking if you want hard-tabs code" >&5
15438 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15439
15440 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15441 if test "${enable_hard_tabs+set}" = set; then
15442   enableval="$enable_hard_tabs"
15443
15444 else
15445   enable_hard_tabs=$with_develop
15446 fi;
15447 echo "$as_me:15447: result: $enable_hard_tabs" >&5
15448 echo "${ECHO_T}$enable_hard_tabs" >&6
15449 test "x$enable_hard_tabs" = xyes &&
15450 cat >>confdefs.h <<\EOF
15451 #define USE_HARD_TABS 1
15452 EOF
15453
15454 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15455 echo "$as_me:15455: checking if you want limited support for xmc" >&5
15456 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15457
15458 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15459 if test "${enable_xmc_glitch+set}" = set; then
15460   enableval="$enable_xmc_glitch"
15461
15462 else
15463   enable_xmc_glitch=$with_develop
15464 fi;
15465 echo "$as_me:15465: result: $enable_xmc_glitch" >&5
15466 echo "${ECHO_T}$enable_xmc_glitch" >&6
15467 test "x$enable_xmc_glitch" = xyes &&
15468 cat >>confdefs.h <<\EOF
15469 #define USE_XMC_SUPPORT 1
15470 EOF
15471
15472 ###############################################################################
15473 # These are just experimental, probably should not be in a package:
15474
15475 echo "$as_me:15475: checking if you do not want to assume colors are white-on-black" >&5
15476 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15477
15478 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15479 if test "${enable_assumed_color+set}" = set; then
15480   enableval="$enable_assumed_color"
15481   with_assumed_color=$enableval
15482 else
15483   with_assumed_color=yes
15484 fi;
15485 echo "$as_me:15485: result: $with_assumed_color" >&5
15486 echo "${ECHO_T}$with_assumed_color" >&6
15487 test "x$with_assumed_color" = xyes &&
15488 cat >>confdefs.h <<\EOF
15489 #define USE_ASSUMED_COLOR 1
15490 EOF
15491
15492 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15493 echo "$as_me:15493: checking if you want hashmap scrolling-optimization code" >&5
15494 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15495
15496 # Check whether --enable-hashmap or --disable-hashmap was given.
15497 if test "${enable_hashmap+set}" = set; then
15498   enableval="$enable_hashmap"
15499   with_hashmap=$enableval
15500 else
15501   with_hashmap=yes
15502 fi;
15503 echo "$as_me:15503: result: $with_hashmap" >&5
15504 echo "${ECHO_T}$with_hashmap" >&6
15505 test "x$with_hashmap" = xyes &&
15506 cat >>confdefs.h <<\EOF
15507 #define USE_HASHMAP 1
15508 EOF
15509
15510 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15511 echo "$as_me:15511: checking if you want colorfgbg code" >&5
15512 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15513
15514 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15515 if test "${enable_colorfgbg+set}" = set; then
15516   enableval="$enable_colorfgbg"
15517   with_colorfgbg=$enableval
15518 else
15519   with_colorfgbg=no
15520 fi;
15521 echo "$as_me:15521: result: $with_colorfgbg" >&5
15522 echo "${ECHO_T}$with_colorfgbg" >&6
15523 test "x$with_colorfgbg" = xyes &&
15524 cat >>confdefs.h <<\EOF
15525 #define USE_COLORFGBG 1
15526 EOF
15527
15528 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15529 echo "$as_me:15529: checking if you want to use gcc -fvisibility option" >&5
15530 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15531
15532 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15533 if test "${enable_fvisibility+set}" = set; then
15534   enableval="$enable_fvisibility"
15535   cf_with_fvisibility=$enableval
15536 else
15537   cf_with_fvisibility=no
15538 fi;
15539 echo "$as_me:15539: result: $cf_with_fvisibility" >&5
15540 echo "${ECHO_T}$cf_with_fvisibility" >&6
15541
15542 NCURSES_IMPEXP=
15543 NCURSES_CXX_IMPEXP=
15544 if test "x$cf_with_fvisibility" = xyes; then
15545
15546 echo "$as_me:15546: checking if $CC -fvisibility=hidden option works" >&5
15547 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15548 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15549   echo $ECHO_N "(cached) $ECHO_C" >&6
15550 else
15551
15552     cf_save_cflags="$CFLAGS"
15553     CFLAGS="$CFLAGS -fvisibility=hidden"
15554     cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557
15558 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15559
15560 int
15561 main (void)
15562 {
15563
15564         if (somefunc()) return 1;
15565
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 rm -f conftest.$ac_objext conftest$ac_exeext
15571 if { (eval echo "$as_me:15571: \"$ac_link\"") >&5
15572   (eval $ac_link) 2>&5
15573   ac_status=$?
15574   echo "$as_me:15574: \$? = $ac_status" >&5
15575   (exit $ac_status); } &&
15576          { ac_try='test -s conftest$ac_exeext'
15577   { (eval echo "$as_me:15577: \"$ac_try\"") >&5
15578   (eval $ac_try) 2>&5
15579   ac_status=$?
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); }; }; then
15582   cf_cv_fvisibility_hidden=yes
15583 else
15584   echo "$as_me: failed program was:" >&5
15585 cat conftest.$ac_ext >&5
15586 cf_cv_fvisibility_hidden=no
15587 fi
15588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15589     CFLAGS=$cf_save_cflags
15590
15591 fi
15592 echo "$as_me:15592: result: $cf_cv_fvisibility_hidden" >&5
15593 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15594
15595         if test "x$cf_cv_fvisibility_hidden" = xyes
15596         then
15597
15598 cf_fix_cppflags=no
15599 cf_new_cflags=
15600 cf_new_cppflags=
15601 cf_new_extra_cppflags=
15602
15603 for cf_add_cflags in -fvisibility=hidden
15604 do
15605 case $cf_fix_cppflags in
15606 (no)
15607         case $cf_add_cflags in
15608         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15609                 case $cf_add_cflags in
15610                 (-D*)
15611                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15612
15613                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15614                                 && test -z "${cf_tst_cflags}" \
15615                                 && cf_fix_cppflags=yes
15616
15617                         if test $cf_fix_cppflags = yes ; then
15618
15619         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15620         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15621
15622                                 continue
15623                         elif test "${cf_tst_cflags}" = "\"'" ; then
15624
15625         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15626         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15627
15628                                 continue
15629                         fi
15630                         ;;
15631                 esac
15632                 case "$CPPFLAGS" in
15633                 (*$cf_add_cflags)
15634                         ;;
15635                 (*)
15636                         case $cf_add_cflags in
15637                         (-D*)
15638                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15639
15640 CPPFLAGS=`echo "$CPPFLAGS" | \
15641         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15642                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15643
15644                                 ;;
15645                         esac
15646
15647         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15648         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15649
15650                         ;;
15651                 esac
15652                 ;;
15653         (*)
15654
15655         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15656         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15657
15658                 ;;
15659         esac
15660         ;;
15661 (yes)
15662
15663         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15664         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15665
15666         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15667
15668         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15669                 && test -z "${cf_tst_cflags}" \
15670                 && cf_fix_cppflags=no
15671         ;;
15672 esac
15673 done
15674
15675 if test -n "$cf_new_cflags" ; then
15676
15677         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15678         CFLAGS="${CFLAGS}$cf_new_cflags"
15679
15680 fi
15681
15682 if test -n "$cf_new_cppflags" ; then
15683
15684         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15685         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15686
15687 fi
15688
15689 if test -n "$cf_new_extra_cppflags" ; then
15690
15691         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15692         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15693
15694 fi
15695
15696                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15697         fi
15698         if test -n "$CXX"
15699         then
15700                 ac_ext=cc
15701 ac_cpp='$CXXCPP $CPPFLAGS'
15702 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15703 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15704 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15705 ac_main_return=return
15706
15707 echo "$as_me:15707: checking if $CXX -fvisibility=hidden option works" >&5
15708 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15709 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15710   echo $ECHO_N "(cached) $ECHO_C" >&6
15711 else
15712
15713     cf_save_cflags="$CXXFLAGS"
15714     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15715     cat >conftest.$ac_ext <<_ACEOF
15716 #line 15716 "configure"
15717 #include "confdefs.h"
15718
15719 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15720
15721 int
15722 main (void)
15723 {
15724
15725         if (somefunc()) return 1;
15726
15727   ;
15728   return 0;
15729 }
15730 _ACEOF
15731 rm -f conftest.$ac_objext conftest$ac_exeext
15732 if { (eval echo "$as_me:15732: \"$ac_link\"") >&5
15733   (eval $ac_link) 2>&5
15734   ac_status=$?
15735   echo "$as_me:15735: \$? = $ac_status" >&5
15736   (exit $ac_status); } &&
15737          { ac_try='test -s conftest$ac_exeext'
15738   { (eval echo "$as_me:15738: \"$ac_try\"") >&5
15739   (eval $ac_try) 2>&5
15740   ac_status=$?
15741   echo "$as_me:15741: \$? = $ac_status" >&5
15742   (exit $ac_status); }; }; then
15743   cf_cv_fvisibility_hidden2=yes
15744 else
15745   echo "$as_me: failed program was:" >&5
15746 cat conftest.$ac_ext >&5
15747 cf_cv_fvisibility_hidden2=no
15748 fi
15749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15750     CXXFLAGS=$cf_save_cflags
15751
15752 fi
15753 echo "$as_me:15753: result: $cf_cv_fvisibility_hidden2" >&5
15754 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15755
15756                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15757                 then
15758
15759 cf_save_CXXFLAGS="$CFLAGS"
15760 CFLAGS="$CXXFLAGS"
15761
15762 cf_fix_cppflags=no
15763 cf_new_cflags=
15764 cf_new_cppflags=
15765 cf_new_extra_cppflags=
15766
15767 for cf_add_cflags in -fvisibility=hidden
15768 do
15769 case $cf_fix_cppflags in
15770 (no)
15771         case $cf_add_cflags in
15772         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15773                 case $cf_add_cflags in
15774                 (-D*)
15775                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15776
15777                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15778                                 && test -z "${cf_tst_cflags}" \
15779                                 && cf_fix_cppflags=yes
15780
15781                         if test $cf_fix_cppflags = yes ; then
15782
15783         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15784         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15785
15786                                 continue
15787                         elif test "${cf_tst_cflags}" = "\"'" ; then
15788
15789         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15790         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15791
15792                                 continue
15793                         fi
15794                         ;;
15795                 esac
15796                 case "$CPPFLAGS" in
15797                 (*$cf_add_cflags)
15798                         ;;
15799                 (*)
15800                         case $cf_add_cflags in
15801                         (-D*)
15802                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15803
15804 CPPFLAGS=`echo "$CPPFLAGS" | \
15805         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15806                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15807
15808                                 ;;
15809                         esac
15810
15811         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15812         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15813
15814                         ;;
15815                 esac
15816                 ;;
15817         (*)
15818
15819         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15820         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15821
15822                 ;;
15823         esac
15824         ;;
15825 (yes)
15826
15827         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15828         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15829
15830         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15831
15832         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15833                 && test -z "${cf_tst_cflags}" \
15834                 && cf_fix_cppflags=no
15835         ;;
15836 esac
15837 done
15838
15839 if test -n "$cf_new_cflags" ; then
15840
15841         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15842         CFLAGS="${CFLAGS}$cf_new_cflags"
15843
15844 fi
15845
15846 if test -n "$cf_new_cppflags" ; then
15847
15848         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15849         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15850
15851 fi
15852
15853 if test -n "$cf_new_extra_cppflags" ; then
15854
15855         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15856         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15857
15858 fi
15859
15860 CXXFLAGS="$CFLAGS"
15861 CFLAGS="$cf_save_CXXFLAGS"
15862
15863                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15864                 fi
15865                 ac_ext=c
15866 ac_cpp='$CPP $CPPFLAGS'
15867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15870 ac_main_return=return
15871
15872         fi
15873 fi
15874
15875 ###   use option --enable-interop to turn on use of bindings used for interop
15876 echo "$as_me:15876: checking if you want interop bindings" >&5
15877 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15878
15879 # Check whether --enable-interop or --disable-interop was given.
15880 if test "${enable_interop+set}" = set; then
15881   enableval="$enable_interop"
15882   with_exp_interop=$enableval
15883 else
15884   with_exp_interop=$cf_dft_interop
15885 fi;
15886 echo "$as_me:15886: result: $with_exp_interop" >&5
15887 echo "${ECHO_T}$with_exp_interop" >&6
15888
15889 NCURSES_INTEROP_FUNCS=0
15890 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15891
15892 echo "$as_me:15892: checking if you want experimental safe-sprintf code" >&5
15893 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15894
15895 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15896 if test "${enable_safe_sprintf+set}" = set; then
15897   enableval="$enable_safe_sprintf"
15898   with_safe_sprintf=$enableval
15899 else
15900   with_safe_sprintf=no
15901 fi;
15902 echo "$as_me:15902: result: $with_safe_sprintf" >&5
15903 echo "${ECHO_T}$with_safe_sprintf" >&6
15904
15905 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15906 # when hashmap is used scroll hints are useless
15907 if test "$with_hashmap" = no ; then
15908 echo "$as_me:15908: checking if you want to experiment without scrolling-hints code" >&5
15909 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15910
15911 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15912 if test "${enable_scroll_hints+set}" = set; then
15913   enableval="$enable_scroll_hints"
15914   with_scroll_hints=$enableval
15915 else
15916   with_scroll_hints=yes
15917 fi;
15918 echo "$as_me:15918: result: $with_scroll_hints" >&5
15919 echo "${ECHO_T}$with_scroll_hints" >&6
15920 test "x$with_scroll_hints" = xyes &&
15921 cat >>confdefs.h <<\EOF
15922 #define USE_SCROLL_HINTS 1
15923 EOF
15924
15925 fi
15926
15927 echo "$as_me:15927: checking if you want wgetch-events code" >&5
15928 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15929
15930 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15931 if test "${enable_wgetch_events+set}" = set; then
15932   enableval="$enable_wgetch_events"
15933   with_wgetch_events=$enableval
15934 else
15935   with_wgetch_events=no
15936 fi;
15937 echo "$as_me:15937: result: $with_wgetch_events" >&5
15938 echo "${ECHO_T}$with_wgetch_events" >&6
15939 test "x$with_wgetch_events" = xyes &&
15940 cat >>confdefs.h <<\EOF
15941 #define NCURSES_WGETCH_EVENTS 1
15942 EOF
15943
15944 ###############################################################################
15945
15946 ###     use option --disable-echo to suppress full display compiling commands
15947
15948 echo "$as_me:15948: checking if you want to see long compiling messages" >&5
15949 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15950
15951 # Check whether --enable-echo or --disable-echo was given.
15952 if test "${enable_echo+set}" = set; then
15953   enableval="$enable_echo"
15954   test "$enableval" != no && enableval=yes
15955         if test "$enableval" != "yes" ; then
15956
15957         ECHO_LT='--silent'
15958         ECHO_LD='@echo linking $@;'
15959         RULE_CC='@echo compiling $<'
15960         SHOW_CC='@echo compiling $@'
15961         ECHO_CC='@'
15962
15963         else
15964
15965         ECHO_LT=''
15966         ECHO_LD=''
15967         RULE_CC=''
15968         SHOW_CC=''
15969         ECHO_CC=''
15970
15971         fi
15972 else
15973   enableval=yes
15974
15975         ECHO_LT=''
15976         ECHO_LD=''
15977         RULE_CC=''
15978         SHOW_CC=''
15979         ECHO_CC=''
15980
15981 fi;
15982 echo "$as_me:15982: result: $enableval" >&5
15983 echo "${ECHO_T}$enableval" >&6
15984
15985 if test "x$enable_echo" = xyes; then
15986         ECHO_LINK=
15987 else
15988         ECHO_LINK='@ echo linking $@ ... ;'
15989         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15990         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15991 fi
15992
15993 # --disable-stripping is used for debugging
15994
15995 echo "$as_me:15995: checking if you want to install stripped executables" >&5
15996 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15997
15998 # Check whether --enable-stripping or --disable-stripping was given.
15999 if test "${enable_stripping+set}" = set; then
16000   enableval="$enable_stripping"
16001   test "$enableval" != no && enableval=yes
16002         if test "$enableval" != "yes" ; then
16003     with_stripping=no
16004         else
16005                 with_stripping=yes
16006         fi
16007 else
16008   enableval=yes
16009         with_stripping=yes
16010
16011 fi;
16012 echo "$as_me:16012: result: $with_stripping" >&5
16013 echo "${ECHO_T}$with_stripping" >&6
16014
16015 if test "$with_stripping" = yes
16016 then
16017         INSTALL_OPT_S="-s"
16018 else
16019         INSTALL_OPT_S=
16020 fi
16021
16022 : ${INSTALL:=install}
16023 echo "$as_me:16023: checking if install accepts -p option" >&5
16024 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16025 if test "${cf_cv_install_p+set}" = set; then
16026   echo $ECHO_N "(cached) $ECHO_C" >&6
16027 else
16028
16029         rm -rf conftest*
16030         date >conftest.in
16031         mkdir conftest.out
16032         sleep 3
16033         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16034         then
16035                 if test -f conftest.out/conftest.in
16036                 then
16037                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16038                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16039                         if test -s conftest.err
16040                         then
16041                                 cf_cv_install_p=no
16042                         else
16043                                 cf_cv_install_p=yes
16044                         fi
16045                 else
16046                         cf_cv_install_p=no
16047                 fi
16048         else
16049                 cf_cv_install_p=no
16050         fi
16051         rm -rf conftest*
16052
16053 fi
16054 echo "$as_me:16054: result: $cf_cv_install_p" >&5
16055 echo "${ECHO_T}$cf_cv_install_p" >&6
16056
16057 echo "$as_me:16057: checking if install needs to be told about ownership" >&5
16058 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16059 case `$ac_config_guess` in
16060 (*minix)
16061         with_install_o=yes
16062         ;;
16063 (*)
16064         with_install_o=no
16065         ;;
16066 esac
16067
16068 echo "$as_me:16068: result: $with_install_o" >&5
16069 echo "${ECHO_T}$with_install_o" >&6
16070 if test "x$with_install_o" = xyes
16071 then
16072         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'`
16073 else
16074         INSTALL_OPT_O=
16075 fi
16076
16077 # If we're avoiding relinking of shared libraries during install, that is to
16078 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16079 # the install program has "-p" (for preserving timestamps).
16080 cf_cv_do_reranlib=yes
16081 if test "x$cf_cv_install_p" = xyes
16082 then
16083         if test "x$cf_cv_do_relink" != xyes
16084         then
16085                 cf_cv_do_reranlib=no
16086                 INSTALL_OPT_P="-p"
16087                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16088         fi
16089 fi
16090
16091 ###     use option --enable-warnings to turn on all gcc warnings
16092 echo "$as_me:16092: checking if you want to see compiler warnings" >&5
16093 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
16094
16095 # Check whether --enable-warnings or --disable-warnings was given.
16096 if test "${enable_warnings+set}" = set; then
16097   enableval="$enable_warnings"
16098   with_warnings=$enableval
16099 fi;
16100 echo "$as_me:16100: result: $with_warnings" >&5
16101 echo "${ECHO_T}$with_warnings" >&6
16102
16103 if test "x$with_warnings" = "xyes"; then
16104
16105         ADAFLAGS="$ADAFLAGS -gnatg"
16106
16107 if test "x$have_x" = xyes; then
16108
16109 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16110 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16111 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16112 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16113 for cf_X_CFLAGS in $X_CFLAGS
16114 do
16115         case "x$cf_X_CFLAGS" in
16116         x-[IUD]*)
16117                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16118                 ;;
16119         *)
16120                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16121                 ;;
16122         esac
16123 done
16124
16125 cat >conftest.$ac_ext <<_ACEOF
16126 #line 16126 "configure"
16127 #include "confdefs.h"
16128
16129 #include <stdlib.h>
16130 #include <X11/Intrinsic.h>
16131
16132 int
16133 main (void)
16134 {
16135 String foo = malloc(1); (void)foo
16136   ;
16137   return 0;
16138 }
16139 _ACEOF
16140 rm -f conftest.$ac_objext
16141 if { (eval echo "$as_me:16141: \"$ac_compile\"") >&5
16142   (eval $ac_compile) 2>&5
16143   ac_status=$?
16144   echo "$as_me:16144: \$? = $ac_status" >&5
16145   (exit $ac_status); } &&
16146          { ac_try='test -s conftest.$ac_objext'
16147   { (eval echo "$as_me:16147: \"$ac_try\"") >&5
16148   (eval $ac_try) 2>&5
16149   ac_status=$?
16150   echo "$as_me:16150: \$? = $ac_status" >&5
16151   (exit $ac_status); }; }; then
16152
16153 echo "$as_me:16153: checking for X11/Xt const-feature" >&5
16154 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16155 if test "${cf_cv_const_x_string+set}" = set; then
16156   echo $ECHO_N "(cached) $ECHO_C" >&6
16157 else
16158
16159         cat >conftest.$ac_ext <<_ACEOF
16160 #line 16160 "configure"
16161 #include "confdefs.h"
16162
16163 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16164 #undef  XTSTRINGDEFINES /* X11R5 and later */
16165 #include <stdlib.h>
16166 #include <X11/Intrinsic.h>
16167
16168 int
16169 main (void)
16170 {
16171 String foo = malloc(1); *foo = 0
16172   ;
16173   return 0;
16174 }
16175 _ACEOF
16176 rm -f conftest.$ac_objext
16177 if { (eval echo "$as_me:16177: \"$ac_compile\"") >&5
16178   (eval $ac_compile) 2>&5
16179   ac_status=$?
16180   echo "$as_me:16180: \$? = $ac_status" >&5
16181   (exit $ac_status); } &&
16182          { ac_try='test -s conftest.$ac_objext'
16183   { (eval echo "$as_me:16183: \"$ac_try\"") >&5
16184   (eval $ac_try) 2>&5
16185   ac_status=$?
16186   echo "$as_me:16186: \$? = $ac_status" >&5
16187   (exit $ac_status); }; }; then
16188
16189                         cf_cv_const_x_string=no
16190
16191 else
16192   echo "$as_me: failed program was:" >&5
16193 cat conftest.$ac_ext >&5
16194
16195                         cf_cv_const_x_string=yes
16196
16197 fi
16198 rm -f conftest.$ac_objext conftest.$ac_ext
16199
16200 fi
16201 echo "$as_me:16201: result: $cf_cv_const_x_string" >&5
16202 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16203
16204 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16205 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16206 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16207
16208 case $cf_cv_const_x_string in
16209 (no)
16210
16211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16212         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16213
16214         ;;
16215 (*)
16216
16217         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16218         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16219
16220         ;;
16221 esac
16222
16223 else
16224   echo "$as_me: failed program was:" >&5
16225 cat conftest.$ac_ext >&5
16226 fi
16227 rm -f conftest.$ac_objext conftest.$ac_ext
16228  fi
16229 cat > conftest.$ac_ext <<EOF
16230 #line 16230 "${as_me:-configure}"
16231 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16232 EOF
16233 if test "$INTEL_COMPILER" = yes
16234 then
16235 # The "-wdXXX" options suppress warnings:
16236 # remark #1419: external declaration in primary source file
16237 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16238 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16239 # remark #193: zero used for undefined preprocessing identifier
16240 # remark #593: variable "curs_sb_left_arrow" was set but never used
16241 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16242 # remark #869: parameter "tw" was never referenced
16243 # remark #981: operands are evaluated in unspecified order
16244 # warning #279: controlling expression is constant
16245
16246         { echo "$as_me:16246: checking for $CC warning options..." >&5
16247 echo "$as_me: checking for $CC warning options..." >&6;}
16248         cf_save_CFLAGS="$CFLAGS"
16249         EXTRA_CFLAGS="-Wall"
16250         for cf_opt in \
16251                 wd1419 \
16252                 wd1683 \
16253                 wd1684 \
16254                 wd193 \
16255                 wd593 \
16256                 wd279 \
16257                 wd810 \
16258                 wd869 \
16259                 wd981
16260         do
16261                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16262                 if { (eval echo "$as_me:16262: \"$ac_compile\"") >&5
16263   (eval $ac_compile) 2>&5
16264   ac_status=$?
16265   echo "$as_me:16265: \$? = $ac_status" >&5
16266   (exit $ac_status); }; then
16267                         test -n "$verbose" && echo "$as_me:16267: result: ... -$cf_opt" >&5
16268 echo "${ECHO_T}... -$cf_opt" >&6
16269                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16270                 fi
16271         done
16272         CFLAGS="$cf_save_CFLAGS"
16273 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16274 then
16275         { echo "$as_me:16275: checking for $CC warning options..." >&5
16276 echo "$as_me: checking for $CC warning options..." >&6;}
16277         cf_save_CFLAGS="$CFLAGS"
16278         EXTRA_CFLAGS=
16279         cf_warn_CONST=""
16280         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16281         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16282         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16283         for cf_opt in W Wall \
16284                 Wbad-function-cast \
16285                 Wcast-align \
16286                 Wcast-qual \
16287                 Wdeclaration-after-statement \
16288                 Wextra \
16289                 Winline \
16290                 Wmissing-declarations \
16291                 Wmissing-prototypes \
16292                 Wnested-externs \
16293                 Wpointer-arith \
16294                 Wshadow \
16295                 Wstrict-prototypes \
16296                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16297         do
16298                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16299                 if { (eval echo "$as_me:16299: \"$ac_compile\"") >&5
16300   (eval $ac_compile) 2>&5
16301   ac_status=$?
16302   echo "$as_me:16302: \$? = $ac_status" >&5
16303   (exit $ac_status); }; then
16304                         test -n "$verbose" && echo "$as_me:16304: result: ... -$cf_opt" >&5
16305 echo "${ECHO_T}... -$cf_opt" >&6
16306                         case $cf_opt in
16307                         (Winline)
16308                                 case $GCC_VERSION in
16309                                 ([34].*)
16310                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16311
16312 echo "${as_me:-configure}:16312: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16313
16314                                         continue;;
16315                                 esac
16316                                 ;;
16317                         (Wpointer-arith)
16318                                 case $GCC_VERSION in
16319                                 ([12].*)
16320                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16321
16322 echo "${as_me:-configure}:16322: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16323
16324                                         continue;;
16325                                 esac
16326                                 ;;
16327                         esac
16328                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16329                 fi
16330         done
16331         CFLAGS="$cf_save_CFLAGS"
16332 fi
16333 rm -rf conftest*
16334
16335         if test "x$cf_with_cxx" = xyes ; then
16336
16337 INTEL_CPLUSPLUS=no
16338
16339 if test "$GCC" = yes ; then
16340         case $host_os in
16341         (linux*|gnu*)
16342                 echo "$as_me:16342: checking if this is really Intel C++ compiler" >&5
16343 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16344                 cf_save_CFLAGS="$CXXFLAGS"
16345                 CXXFLAGS="$CXXFLAGS -no-gcc"
16346                 cat >conftest.$ac_ext <<_ACEOF
16347 #line 16347 "configure"
16348 #include "confdefs.h"
16349
16350 int
16351 main (void)
16352 {
16353
16354 #ifdef __INTEL_COMPILER
16355 #else
16356 make an error
16357 #endif
16358
16359   ;
16360   return 0;
16361 }
16362 _ACEOF
16363 rm -f conftest.$ac_objext
16364 if { (eval echo "$as_me:16364: \"$ac_compile\"") >&5
16365   (eval $ac_compile) 2>&5
16366   ac_status=$?
16367   echo "$as_me:16367: \$? = $ac_status" >&5
16368   (exit $ac_status); } &&
16369          { ac_try='test -s conftest.$ac_objext'
16370   { (eval echo "$as_me:16370: \"$ac_try\"") >&5
16371   (eval $ac_try) 2>&5
16372   ac_status=$?
16373   echo "$as_me:16373: \$? = $ac_status" >&5
16374   (exit $ac_status); }; }; then
16375   INTEL_CPLUSPLUS=yes
16376 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16377
16378 else
16379   echo "$as_me: failed program was:" >&5
16380 cat conftest.$ac_ext >&5
16381 fi
16382 rm -f conftest.$ac_objext conftest.$ac_ext
16383                 CXXFLAGS="$cf_save_CFLAGS"
16384                 echo "$as_me:16384: result: $INTEL_CPLUSPLUS" >&5
16385 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16386                 ;;
16387         esac
16388 fi
16389
16390 CLANG_CPLUSPLUS=no
16391
16392 if test "$GCC" = yes ; then
16393         echo "$as_me:16393: checking if this is really Clang C++ compiler" >&5
16394 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16395         cf_save_CFLAGS="$CXXFLAGS"
16396         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16397         cat >conftest.$ac_ext <<_ACEOF
16398 #line 16398 "configure"
16399 #include "confdefs.h"
16400
16401 int
16402 main (void)
16403 {
16404
16405 #ifdef __clang__
16406 #else
16407 make an error
16408 #endif
16409
16410   ;
16411   return 0;
16412 }
16413 _ACEOF
16414 rm -f conftest.$ac_objext
16415 if { (eval echo "$as_me:16415: \"$ac_compile\"") >&5
16416   (eval $ac_compile) 2>&5
16417   ac_status=$?
16418   echo "$as_me:16418: \$? = $ac_status" >&5
16419   (exit $ac_status); } &&
16420          { ac_try='test -s conftest.$ac_objext'
16421   { (eval echo "$as_me:16421: \"$ac_try\"") >&5
16422   (eval $ac_try) 2>&5
16423   ac_status=$?
16424   echo "$as_me:16424: \$? = $ac_status" >&5
16425   (exit $ac_status); }; }; then
16426   CLANG_CPLUSPLUS=yes
16427 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16428
16429 else
16430   echo "$as_me: failed program was:" >&5
16431 cat conftest.$ac_ext >&5
16432 fi
16433 rm -f conftest.$ac_objext conftest.$ac_ext
16434         CXXFLAGS="$cf_save_CFLAGS"
16435         echo "$as_me:16435: result: $CLANG_CPLUSPLUS" >&5
16436 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16437 fi
16438
16439 ac_ext=cc
16440 ac_cpp='$CXXCPP $CPPFLAGS'
16441 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16442 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16443 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16444 ac_main_return=return
16445
16446 cat > conftest.$ac_ext <<EOF
16447 #line 16447 "configure"
16448 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16449 EOF
16450
16451 if test "$INTEL_CPLUSPLUS" = yes
16452 then
16453 # The "-wdXXX" options suppress warnings:
16454 # remark #1419: external declaration in primary source file
16455 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16456 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16457 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16458 # remark #193: zero used for undefined preprocessing identifier
16459 # remark #593: variable "curs_sb_left_arrow" was set but never used
16460 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16461 # remark #869: parameter "tw" was never referenced
16462 # remark #981: operands are evaluated in unspecified order
16463 # warning #269: invalid format string conversion
16464
16465         { echo "$as_me:16465: checking for $CC warning options..." >&5
16466 echo "$as_me: checking for $CC warning options..." >&6;}
16467         cf_save_CXXFLAGS="$CXXFLAGS"
16468         EXTRA_CXXFLAGS="-Wall"
16469         for cf_opt in \
16470                 wd1419 \
16471                 wd1682 \
16472                 wd1683 \
16473                 wd1684 \
16474                 wd193 \
16475                 wd279 \
16476                 wd593 \
16477                 wd810 \
16478                 wd869 \
16479                 wd981
16480         do
16481                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16482                 if { (eval echo "$as_me:16482: \"$ac_compile\"") >&5
16483   (eval $ac_compile) 2>&5
16484   ac_status=$?
16485   echo "$as_me:16485: \$? = $ac_status" >&5
16486   (exit $ac_status); }; then
16487                         test -n "$verbose" && echo "$as_me:16487: result: ... -$cf_opt" >&5
16488 echo "${ECHO_T}... -$cf_opt" >&6
16489                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16490                 fi
16491         done
16492         CXXFLAGS="$cf_save_CXXFLAGS"
16493
16494 elif test "$GXX" = yes
16495 then
16496         { echo "$as_me:16496: checking for $CXX warning options..." >&5
16497 echo "$as_me: checking for $CXX warning options..." >&6;}
16498         cf_save_CXXFLAGS="$CXXFLAGS"
16499         EXTRA_CXXFLAGS="-W -Wall"
16500         cf_gxx_extra_warnings=""
16501         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16502         case "$GCC_VERSION" in
16503         ([1-2].*)
16504                 ;;
16505         (*)
16506                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16507                 ;;
16508         esac
16509         for cf_opt in \
16510                 Wabi \
16511                 fabi-version=0 \
16512                 Wextra \
16513                 Wignored-qualifiers \
16514                 Wlogical-op \
16515                 Woverloaded-virtual \
16516                 Wsign-promo \
16517                 Wsynth \
16518                 Wold-style-cast \
16519                 Wcast-align \
16520                 Wcast-qual \
16521                 Wpointer-arith \
16522                 Wshadow \
16523                 Wundef $cf_gxx_extra_warnings Wno-unused
16524         do
16525                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16526                 if { (eval echo "$as_me:16526: \"$ac_compile\"") >&5
16527   (eval $ac_compile) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit $ac_status); }; then
16531                         test -n "$verbose" && echo "$as_me:16531: result: ... -$cf_opt" >&5
16532 echo "${ECHO_T}... -$cf_opt" >&6
16533                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16534                 else
16535                         test -n "$verbose" && echo "$as_me:16535: result: ... no -$cf_opt" >&5
16536 echo "${ECHO_T}... no -$cf_opt" >&6
16537                 fi
16538         done
16539         CXXFLAGS="$cf_save_CXXFLAGS"
16540 fi
16541
16542 rm -rf conftest*
16543 ac_ext=c
16544 ac_cpp='$CPP $CPPFLAGS'
16545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16548 ac_main_return=return
16549
16550         fi
16551 fi
16552
16553 if test "$GCC" = yes
16554 then
16555 cat > conftest.i <<EOF
16556 #ifndef GCC_PRINTF
16557 #define GCC_PRINTF 0
16558 #endif
16559 #ifndef GCC_SCANF
16560 #define GCC_SCANF 0
16561 #endif
16562 #ifndef GCC_NORETURN
16563 #define GCC_NORETURN /* nothing */
16564 #endif
16565 #ifndef GCC_UNUSED
16566 #define GCC_UNUSED /* nothing */
16567 #endif
16568 EOF
16569 if test "$GCC" = yes
16570 then
16571         { echo "$as_me:16571: checking for $CC __attribute__ directives..." >&5
16572 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16573 cat > conftest.$ac_ext <<EOF
16574 #line 16574 "${as_me:-configure}"
16575 #include "confdefs.h"
16576 #include "conftest.h"
16577 #include "conftest.i"
16578 #if     GCC_PRINTF
16579 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16580 #else
16581 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16582 #endif
16583 #if     GCC_SCANF
16584 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16585 #else
16586 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16587 #endif
16588 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16589 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16590 extern void foo(void) GCC_NORETURN;
16591 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16592 EOF
16593         cf_printf_attribute=no
16594         cf_scanf_attribute=no
16595         for cf_attribute in scanf printf unused noreturn
16596         do
16597
16598 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16599
16600                 cf_directive="__attribute__(($cf_attribute))"
16601                 echo "checking for $CC $cf_directive" 1>&5
16602
16603                 case $cf_attribute in
16604                 (printf)
16605                         cf_printf_attribute=yes
16606                         cat >conftest.h <<EOF
16607 #define GCC_$cf_ATTRIBUTE 1
16608 EOF
16609                         ;;
16610                 (scanf)
16611                         cf_scanf_attribute=yes
16612                         cat >conftest.h <<EOF
16613 #define GCC_$cf_ATTRIBUTE 1
16614 EOF
16615                         ;;
16616                 (*)
16617                         cat >conftest.h <<EOF
16618 #define GCC_$cf_ATTRIBUTE $cf_directive
16619 EOF
16620                         ;;
16621                 esac
16622
16623                 if { (eval echo "$as_me:16623: \"$ac_compile\"") >&5
16624   (eval $ac_compile) 2>&5
16625   ac_status=$?
16626   echo "$as_me:16626: \$? = $ac_status" >&5
16627   (exit $ac_status); }; then
16628                         test -n "$verbose" && echo "$as_me:16628: result: ... $cf_attribute" >&5
16629 echo "${ECHO_T}... $cf_attribute" >&6
16630                         cat conftest.h >>confdefs.h
16631                         case $cf_attribute in
16632                         (noreturn)
16633
16634 cat >>confdefs.h <<EOF
16635 #define GCC_NORETURN $cf_directive
16636 EOF
16637
16638                                 ;;
16639                         (printf)
16640                                 cf_value='/* nothing */'
16641                                 if test "$cf_printf_attribute" != no ; then
16642                                         cf_value='__attribute__((format(printf,fmt,var)))'
16643
16644 cat >>confdefs.h <<\EOF
16645 #define GCC_PRINTF 1
16646 EOF
16647
16648                                 fi
16649
16650 cat >>confdefs.h <<EOF
16651 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16652 EOF
16653
16654                                 ;;
16655                         (scanf)
16656                                 cf_value='/* nothing */'
16657                                 if test "$cf_scanf_attribute" != no ; then
16658                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16659
16660 cat >>confdefs.h <<\EOF
16661 #define GCC_SCANF 1
16662 EOF
16663
16664                                 fi
16665
16666 cat >>confdefs.h <<EOF
16667 #define GCC_SCANFLIKE(fmt,var) $cf_value
16668 EOF
16669
16670                                 ;;
16671                         (unused)
16672
16673 cat >>confdefs.h <<EOF
16674 #define GCC_UNUSED $cf_directive
16675 EOF
16676
16677                                 ;;
16678                         esac
16679                 fi
16680         done
16681 else
16682         fgrep define conftest.i >>confdefs.h
16683 fi
16684 rm -rf conftest*
16685 fi
16686
16687 echo "$as_me:16687: checking if you want to work around bogus compiler/loader warnings" >&5
16688 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16689
16690 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16691 if test "${enable_string_hacks+set}" = set; then
16692   enableval="$enable_string_hacks"
16693   with_string_hacks=$enableval
16694 else
16695   with_string_hacks=no
16696 fi;
16697 echo "$as_me:16697: result: $with_string_hacks" >&5
16698 echo "${ECHO_T}$with_string_hacks" >&6
16699
16700 if test "x$with_string_hacks" = "xyes"; then
16701
16702 cat >>confdefs.h <<\EOF
16703 #define USE_STRING_HACKS 1
16704 EOF
16705
16706         { echo "$as_me:16706: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16707 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16708         echo "$as_me:16708: checking for strlcat" >&5
16709 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16710 if test "${ac_cv_func_strlcat+set}" = set; then
16711   echo $ECHO_N "(cached) $ECHO_C" >&6
16712 else
16713   cat >conftest.$ac_ext <<_ACEOF
16714 #line 16714 "configure"
16715 #include "confdefs.h"
16716 #define strlcat autoconf_temporary
16717 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16718 #undef strlcat
16719
16720 #ifdef __cplusplus
16721 extern "C"
16722 #endif
16723
16724 /* We use char because int might match the return type of a gcc2
16725    builtin and then its argument prototype would still apply.  */
16726 char strlcat (void);
16727
16728 int
16729 main (void)
16730 {
16731
16732 /* The GNU C library defines stubs for functions which it implements
16733     to always fail with ENOSYS.  Some functions are actually named
16734     something starting with __ and the normal name is an alias.  */
16735 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16736 #error found stub for strlcat
16737 #endif
16738
16739         return strlcat ();
16740   ;
16741   return 0;
16742 }
16743 _ACEOF
16744 rm -f conftest.$ac_objext conftest$ac_exeext
16745 if { (eval echo "$as_me:16745: \"$ac_link\"") >&5
16746   (eval $ac_link) 2>&5
16747   ac_status=$?
16748   echo "$as_me:16748: \$? = $ac_status" >&5
16749   (exit $ac_status); } &&
16750          { ac_try='test -s conftest$ac_exeext'
16751   { (eval echo "$as_me:16751: \"$ac_try\"") >&5
16752   (eval $ac_try) 2>&5
16753   ac_status=$?
16754   echo "$as_me:16754: \$? = $ac_status" >&5
16755   (exit $ac_status); }; }; then
16756   ac_cv_func_strlcat=yes
16757 else
16758   echo "$as_me: failed program was:" >&5
16759 cat conftest.$ac_ext >&5
16760 ac_cv_func_strlcat=no
16761 fi
16762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16763 fi
16764 echo "$as_me:16764: result: $ac_cv_func_strlcat" >&5
16765 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16766 if test $ac_cv_func_strlcat = yes; then
16767
16768 cat >>confdefs.h <<\EOF
16769 #define HAVE_STRLCAT 1
16770 EOF
16771
16772 else
16773
16774                 echo "$as_me:16774: checking for strlcat in -lbsd" >&5
16775 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16776 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16777   echo $ECHO_N "(cached) $ECHO_C" >&6
16778 else
16779   ac_check_lib_save_LIBS=$LIBS
16780 LIBS="-lbsd  $LIBS"
16781 cat >conftest.$ac_ext <<_ACEOF
16782 #line 16782 "configure"
16783 #include "confdefs.h"
16784
16785 /* Override any gcc2 internal prototype to avoid an error.  */
16786 #ifdef __cplusplus
16787 extern "C"
16788 #endif
16789 /* We use char because int might match the return type of a gcc2
16790    builtin and then its argument prototype would still apply.  */
16791 char strlcat ();
16792 int
16793 main (void)
16794 {
16795 strlcat ();
16796   ;
16797   return 0;
16798 }
16799 _ACEOF
16800 rm -f conftest.$ac_objext conftest$ac_exeext
16801 if { (eval echo "$as_me:16801: \"$ac_link\"") >&5
16802   (eval $ac_link) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); } &&
16806          { ac_try='test -s conftest$ac_exeext'
16807   { (eval echo "$as_me:16807: \"$ac_try\"") >&5
16808   (eval $ac_try) 2>&5
16809   ac_status=$?
16810   echo "$as_me:16810: \$? = $ac_status" >&5
16811   (exit $ac_status); }; }; then
16812   ac_cv_lib_bsd_strlcat=yes
16813 else
16814   echo "$as_me: failed program was:" >&5
16815 cat conftest.$ac_ext >&5
16816 ac_cv_lib_bsd_strlcat=no
16817 fi
16818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16819 LIBS=$ac_check_lib_save_LIBS
16820 fi
16821 echo "$as_me:16821: result: $ac_cv_lib_bsd_strlcat" >&5
16822 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16823 if test $ac_cv_lib_bsd_strlcat = yes; then
16824
16825 cf_add_libs="$LIBS"
16826 # reverse order
16827 cf_add_0lib=
16828 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16829 # filter duplicates
16830 for cf_add_1lib in $cf_add_0lib; do
16831         for cf_add_2lib in $cf_add_libs; do
16832                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16833                         cf_add_1lib=
16834                         break
16835                 fi
16836         done
16837         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16838 done
16839 LIBS="$cf_add_libs"
16840
16841 for ac_header in bsd/string.h
16842 do
16843 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16844 echo "$as_me:16844: checking for $ac_header" >&5
16845 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16846 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16847   echo $ECHO_N "(cached) $ECHO_C" >&6
16848 else
16849   cat >conftest.$ac_ext <<_ACEOF
16850 #line 16850 "configure"
16851 #include "confdefs.h"
16852 #include <$ac_header>
16853 _ACEOF
16854 if { (eval echo "$as_me:16854: \"$ac_cpp conftest.$ac_ext\"") >&5
16855   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16856   ac_status=$?
16857   egrep -v '^ *\+' conftest.er1 >conftest.err
16858   rm -f conftest.er1
16859   cat conftest.err >&5
16860   echo "$as_me:16860: \$? = $ac_status" >&5
16861   (exit $ac_status); } >/dev/null; then
16862   if test -s conftest.err; then
16863     ac_cpp_err=$ac_c_preproc_warn_flag
16864   else
16865     ac_cpp_err=
16866   fi
16867 else
16868   ac_cpp_err=yes
16869 fi
16870 if test -z "$ac_cpp_err"; then
16871   eval "$as_ac_Header=yes"
16872 else
16873   echo "$as_me: failed program was:" >&5
16874   cat conftest.$ac_ext >&5
16875   eval "$as_ac_Header=no"
16876 fi
16877 rm -f conftest.err conftest.$ac_ext
16878 fi
16879 echo "$as_me:16879: result: `eval echo '${'$as_ac_Header'}'`" >&5
16880 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16881 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16882   cat >>confdefs.h <<EOF
16883 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16884 EOF
16885
16886 fi
16887 done
16888
16889 cat >>confdefs.h <<\EOF
16890 #define HAVE_STRLCAT 1
16891 EOF
16892
16893 fi
16894
16895 fi
16896
16897 for ac_func in strlcpy snprintf
16898 do
16899 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16900 echo "$as_me:16900: checking for $ac_func" >&5
16901 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16902 if eval "test \"\${$as_ac_var+set}\" = set"; then
16903   echo $ECHO_N "(cached) $ECHO_C" >&6
16904 else
16905   cat >conftest.$ac_ext <<_ACEOF
16906 #line 16906 "configure"
16907 #include "confdefs.h"
16908 #define $ac_func autoconf_temporary
16909 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16910 #undef $ac_func
16911
16912 #ifdef __cplusplus
16913 extern "C"
16914 #endif
16915
16916 /* We use char because int might match the return type of a gcc2
16917    builtin and then its argument prototype would still apply.  */
16918 char $ac_func (void);
16919
16920 int
16921 main (void)
16922 {
16923
16924 /* The GNU C library defines stubs for functions which it implements
16925     to always fail with ENOSYS.  Some functions are actually named
16926     something starting with __ and the normal name is an alias.  */
16927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16928 #error found stub for $ac_func
16929 #endif
16930
16931         return $ac_func ();
16932   ;
16933   return 0;
16934 }
16935 _ACEOF
16936 rm -f conftest.$ac_objext conftest$ac_exeext
16937 if { (eval echo "$as_me:16937: \"$ac_link\"") >&5
16938   (eval $ac_link) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); } &&
16942          { ac_try='test -s conftest$ac_exeext'
16943   { (eval echo "$as_me:16943: \"$ac_try\"") >&5
16944   (eval $ac_try) 2>&5
16945   ac_status=$?
16946   echo "$as_me:16946: \$? = $ac_status" >&5
16947   (exit $ac_status); }; }; then
16948   eval "$as_ac_var=yes"
16949 else
16950   echo "$as_me: failed program was:" >&5
16951 cat conftest.$ac_ext >&5
16952 eval "$as_ac_var=no"
16953 fi
16954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16955 fi
16956 echo "$as_me:16956: result: `eval echo '${'$as_ac_var'}'`" >&5
16957 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16958 if test `eval echo '${'$as_ac_var'}'` = yes; then
16959   cat >>confdefs.h <<EOF
16960 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16961 EOF
16962
16963 fi
16964 done
16965
16966 fi
16967
16968 ###     use option --enable-assertions to turn on generation of assertion code
16969 echo "$as_me:16969: checking if you want to enable runtime assertions" >&5
16970 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16971
16972 # Check whether --enable-assertions or --disable-assertions was given.
16973 if test "${enable_assertions+set}" = set; then
16974   enableval="$enable_assertions"
16975   with_assertions=$enableval
16976 else
16977   with_assertions=no
16978 fi;
16979 echo "$as_me:16979: result: $with_assertions" >&5
16980 echo "${ECHO_T}$with_assertions" >&6
16981 if test -n "$GCC"
16982 then
16983         if test "$with_assertions" = no
16984         then
16985                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16986         else
16987
16988         ADAFLAGS="$ADAFLAGS -gnata"
16989
16990         fi
16991 fi
16992
16993 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16994
16995 echo "$as_me:16995: checking if you want to use dmalloc for testing" >&5
16996 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16997
16998 # Check whether --with-dmalloc or --without-dmalloc was given.
16999 if test "${with_dmalloc+set}" = set; then
17000   withval="$with_dmalloc"
17001
17002 cat >>confdefs.h <<EOF
17003 #define USE_DMALLOC 1
17004 EOF
17005
17006         : ${with_cflags:=-g}
17007         : ${with_no_leaks:=yes}
17008          with_dmalloc=yes
17009 else
17010   with_dmalloc=
17011 fi;
17012 echo "$as_me:17012: result: ${with_dmalloc:-no}" >&5
17013 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17014
17015 case .$with_cflags in
17016 (.*-g*)
17017         case .$CFLAGS in
17018         (.*-g*)
17019                 ;;
17020         (*)
17021
17022 cf_fix_cppflags=no
17023 cf_new_cflags=
17024 cf_new_cppflags=
17025 cf_new_extra_cppflags=
17026
17027 for cf_add_cflags in -g
17028 do
17029 case $cf_fix_cppflags in
17030 (no)
17031         case $cf_add_cflags in
17032         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17033                 case $cf_add_cflags in
17034                 (-D*)
17035                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17036
17037                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17038                                 && test -z "${cf_tst_cflags}" \
17039                                 && cf_fix_cppflags=yes
17040
17041                         if test $cf_fix_cppflags = yes ; then
17042
17043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17045
17046                                 continue
17047                         elif test "${cf_tst_cflags}" = "\"'" ; then
17048
17049         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17050         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17051
17052                                 continue
17053                         fi
17054                         ;;
17055                 esac
17056                 case "$CPPFLAGS" in
17057                 (*$cf_add_cflags)
17058                         ;;
17059                 (*)
17060                         case $cf_add_cflags in
17061                         (-D*)
17062                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17063
17064 CPPFLAGS=`echo "$CPPFLAGS" | \
17065         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17066                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17067
17068                                 ;;
17069                         esac
17070
17071         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17072         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17073
17074                         ;;
17075                 esac
17076                 ;;
17077         (*)
17078
17079         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17080         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17081
17082                 ;;
17083         esac
17084         ;;
17085 (yes)
17086
17087         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17088         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17089
17090         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17091
17092         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17093                 && test -z "${cf_tst_cflags}" \
17094                 && cf_fix_cppflags=no
17095         ;;
17096 esac
17097 done
17098
17099 if test -n "$cf_new_cflags" ; then
17100
17101         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17102         CFLAGS="${CFLAGS}$cf_new_cflags"
17103
17104 fi
17105
17106 if test -n "$cf_new_cppflags" ; then
17107
17108         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17109         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17110
17111 fi
17112
17113 if test -n "$cf_new_extra_cppflags" ; then
17114
17115         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17116         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17117
17118 fi
17119
17120                 ;;
17121         esac
17122         ;;
17123 esac
17124
17125 if test "$with_dmalloc" = yes ; then
17126         echo "$as_me:17126: checking for dmalloc.h" >&5
17127 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17128 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17129   echo $ECHO_N "(cached) $ECHO_C" >&6
17130 else
17131   cat >conftest.$ac_ext <<_ACEOF
17132 #line 17132 "configure"
17133 #include "confdefs.h"
17134 #include <dmalloc.h>
17135 _ACEOF
17136 if { (eval echo "$as_me:17136: \"$ac_cpp conftest.$ac_ext\"") >&5
17137   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17138   ac_status=$?
17139   egrep -v '^ *\+' conftest.er1 >conftest.err
17140   rm -f conftest.er1
17141   cat conftest.err >&5
17142   echo "$as_me:17142: \$? = $ac_status" >&5
17143   (exit $ac_status); } >/dev/null; then
17144   if test -s conftest.err; then
17145     ac_cpp_err=$ac_c_preproc_warn_flag
17146   else
17147     ac_cpp_err=
17148   fi
17149 else
17150   ac_cpp_err=yes
17151 fi
17152 if test -z "$ac_cpp_err"; then
17153   ac_cv_header_dmalloc_h=yes
17154 else
17155   echo "$as_me: failed program was:" >&5
17156   cat conftest.$ac_ext >&5
17157   ac_cv_header_dmalloc_h=no
17158 fi
17159 rm -f conftest.err conftest.$ac_ext
17160 fi
17161 echo "$as_me:17161: result: $ac_cv_header_dmalloc_h" >&5
17162 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17163 if test $ac_cv_header_dmalloc_h = yes; then
17164
17165 echo "$as_me:17165: checking for dmalloc_debug in -ldmalloc" >&5
17166 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17167 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17168   echo $ECHO_N "(cached) $ECHO_C" >&6
17169 else
17170   ac_check_lib_save_LIBS=$LIBS
17171 LIBS="-ldmalloc  $LIBS"
17172 cat >conftest.$ac_ext <<_ACEOF
17173 #line 17173 "configure"
17174 #include "confdefs.h"
17175
17176 /* Override any gcc2 internal prototype to avoid an error.  */
17177 #ifdef __cplusplus
17178 extern "C"
17179 #endif
17180 /* We use char because int might match the return type of a gcc2
17181    builtin and then its argument prototype would still apply.  */
17182 char dmalloc_debug ();
17183 int
17184 main (void)
17185 {
17186 dmalloc_debug ();
17187   ;
17188   return 0;
17189 }
17190 _ACEOF
17191 rm -f conftest.$ac_objext conftest$ac_exeext
17192 if { (eval echo "$as_me:17192: \"$ac_link\"") >&5
17193   (eval $ac_link) 2>&5
17194   ac_status=$?
17195   echo "$as_me:17195: \$? = $ac_status" >&5
17196   (exit $ac_status); } &&
17197          { ac_try='test -s conftest$ac_exeext'
17198   { (eval echo "$as_me:17198: \"$ac_try\"") >&5
17199   (eval $ac_try) 2>&5
17200   ac_status=$?
17201   echo "$as_me:17201: \$? = $ac_status" >&5
17202   (exit $ac_status); }; }; then
17203   ac_cv_lib_dmalloc_dmalloc_debug=yes
17204 else
17205   echo "$as_me: failed program was:" >&5
17206 cat conftest.$ac_ext >&5
17207 ac_cv_lib_dmalloc_dmalloc_debug=no
17208 fi
17209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17210 LIBS=$ac_check_lib_save_LIBS
17211 fi
17212 echo "$as_me:17212: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17213 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17214 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17215   cat >>confdefs.h <<EOF
17216 #define HAVE_LIBDMALLOC 1
17217 EOF
17218
17219   LIBS="-ldmalloc $LIBS"
17220
17221 fi
17222
17223 fi
17224
17225 fi
17226
17227 echo "$as_me:17227: checking if you want to use dbmalloc for testing" >&5
17228 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17229
17230 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17231 if test "${with_dbmalloc+set}" = set; then
17232   withval="$with_dbmalloc"
17233
17234 cat >>confdefs.h <<EOF
17235 #define USE_DBMALLOC 1
17236 EOF
17237
17238         : ${with_cflags:=-g}
17239         : ${with_no_leaks:=yes}
17240          with_dbmalloc=yes
17241 else
17242   with_dbmalloc=
17243 fi;
17244 echo "$as_me:17244: result: ${with_dbmalloc:-no}" >&5
17245 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17246
17247 case .$with_cflags in
17248 (.*-g*)
17249         case .$CFLAGS in
17250         (.*-g*)
17251                 ;;
17252         (*)
17253
17254 cf_fix_cppflags=no
17255 cf_new_cflags=
17256 cf_new_cppflags=
17257 cf_new_extra_cppflags=
17258
17259 for cf_add_cflags in -g
17260 do
17261 case $cf_fix_cppflags in
17262 (no)
17263         case $cf_add_cflags in
17264         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17265                 case $cf_add_cflags in
17266                 (-D*)
17267                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17268
17269                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17270                                 && test -z "${cf_tst_cflags}" \
17271                                 && cf_fix_cppflags=yes
17272
17273                         if test $cf_fix_cppflags = yes ; then
17274
17275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17277
17278                                 continue
17279                         elif test "${cf_tst_cflags}" = "\"'" ; then
17280
17281         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17282         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17283
17284                                 continue
17285                         fi
17286                         ;;
17287                 esac
17288                 case "$CPPFLAGS" in
17289                 (*$cf_add_cflags)
17290                         ;;
17291                 (*)
17292                         case $cf_add_cflags in
17293                         (-D*)
17294                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17295
17296 CPPFLAGS=`echo "$CPPFLAGS" | \
17297         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17298                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17299
17300                                 ;;
17301                         esac
17302
17303         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17304         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17305
17306                         ;;
17307                 esac
17308                 ;;
17309         (*)
17310
17311         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17312         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17313
17314                 ;;
17315         esac
17316         ;;
17317 (yes)
17318
17319         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17320         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17321
17322         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17323
17324         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17325                 && test -z "${cf_tst_cflags}" \
17326                 && cf_fix_cppflags=no
17327         ;;
17328 esac
17329 done
17330
17331 if test -n "$cf_new_cflags" ; then
17332
17333         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17334         CFLAGS="${CFLAGS}$cf_new_cflags"
17335
17336 fi
17337
17338 if test -n "$cf_new_cppflags" ; then
17339
17340         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17341         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17342
17343 fi
17344
17345 if test -n "$cf_new_extra_cppflags" ; then
17346
17347         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17348         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17349
17350 fi
17351
17352                 ;;
17353         esac
17354         ;;
17355 esac
17356
17357 if test "$with_dbmalloc" = yes ; then
17358         echo "$as_me:17358: checking for dbmalloc.h" >&5
17359 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17360 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17361   echo $ECHO_N "(cached) $ECHO_C" >&6
17362 else
17363   cat >conftest.$ac_ext <<_ACEOF
17364 #line 17364 "configure"
17365 #include "confdefs.h"
17366 #include <dbmalloc.h>
17367 _ACEOF
17368 if { (eval echo "$as_me:17368: \"$ac_cpp conftest.$ac_ext\"") >&5
17369   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17370   ac_status=$?
17371   egrep -v '^ *\+' conftest.er1 >conftest.err
17372   rm -f conftest.er1
17373   cat conftest.err >&5
17374   echo "$as_me:17374: \$? = $ac_status" >&5
17375   (exit $ac_status); } >/dev/null; then
17376   if test -s conftest.err; then
17377     ac_cpp_err=$ac_c_preproc_warn_flag
17378   else
17379     ac_cpp_err=
17380   fi
17381 else
17382   ac_cpp_err=yes
17383 fi
17384 if test -z "$ac_cpp_err"; then
17385   ac_cv_header_dbmalloc_h=yes
17386 else
17387   echo "$as_me: failed program was:" >&5
17388   cat conftest.$ac_ext >&5
17389   ac_cv_header_dbmalloc_h=no
17390 fi
17391 rm -f conftest.err conftest.$ac_ext
17392 fi
17393 echo "$as_me:17393: result: $ac_cv_header_dbmalloc_h" >&5
17394 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17395 if test $ac_cv_header_dbmalloc_h = yes; then
17396
17397 echo "$as_me:17397: checking for debug_malloc in -ldbmalloc" >&5
17398 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17399 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17400   echo $ECHO_N "(cached) $ECHO_C" >&6
17401 else
17402   ac_check_lib_save_LIBS=$LIBS
17403 LIBS="-ldbmalloc  $LIBS"
17404 cat >conftest.$ac_ext <<_ACEOF
17405 #line 17405 "configure"
17406 #include "confdefs.h"
17407
17408 /* Override any gcc2 internal prototype to avoid an error.  */
17409 #ifdef __cplusplus
17410 extern "C"
17411 #endif
17412 /* We use char because int might match the return type of a gcc2
17413    builtin and then its argument prototype would still apply.  */
17414 char debug_malloc ();
17415 int
17416 main (void)
17417 {
17418 debug_malloc ();
17419   ;
17420   return 0;
17421 }
17422 _ACEOF
17423 rm -f conftest.$ac_objext conftest$ac_exeext
17424 if { (eval echo "$as_me:17424: \"$ac_link\"") >&5
17425   (eval $ac_link) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); } &&
17429          { ac_try='test -s conftest$ac_exeext'
17430   { (eval echo "$as_me:17430: \"$ac_try\"") >&5
17431   (eval $ac_try) 2>&5
17432   ac_status=$?
17433   echo "$as_me:17433: \$? = $ac_status" >&5
17434   (exit $ac_status); }; }; then
17435   ac_cv_lib_dbmalloc_debug_malloc=yes
17436 else
17437   echo "$as_me: failed program was:" >&5
17438 cat conftest.$ac_ext >&5
17439 ac_cv_lib_dbmalloc_debug_malloc=no
17440 fi
17441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17442 LIBS=$ac_check_lib_save_LIBS
17443 fi
17444 echo "$as_me:17444: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17445 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17446 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17447   cat >>confdefs.h <<EOF
17448 #define HAVE_LIBDBMALLOC 1
17449 EOF
17450
17451   LIBS="-ldbmalloc $LIBS"
17452
17453 fi
17454
17455 fi
17456
17457 fi
17458
17459 echo "$as_me:17459: checking if you want to use valgrind for testing" >&5
17460 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17461
17462 # Check whether --with-valgrind or --without-valgrind was given.
17463 if test "${with_valgrind+set}" = set; then
17464   withval="$with_valgrind"
17465
17466 cat >>confdefs.h <<EOF
17467 #define USE_VALGRIND 1
17468 EOF
17469
17470         : ${with_cflags:=-g}
17471         : ${with_no_leaks:=yes}
17472          with_valgrind=yes
17473 else
17474   with_valgrind=
17475 fi;
17476 echo "$as_me:17476: result: ${with_valgrind:-no}" >&5
17477 echo "${ECHO_T}${with_valgrind:-no}" >&6
17478
17479 case .$with_cflags in
17480 (.*-g*)
17481         case .$CFLAGS in
17482         (.*-g*)
17483                 ;;
17484         (*)
17485
17486 cf_fix_cppflags=no
17487 cf_new_cflags=
17488 cf_new_cppflags=
17489 cf_new_extra_cppflags=
17490
17491 for cf_add_cflags in -g
17492 do
17493 case $cf_fix_cppflags in
17494 (no)
17495         case $cf_add_cflags in
17496         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17497                 case $cf_add_cflags in
17498                 (-D*)
17499                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17500
17501                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17502                                 && test -z "${cf_tst_cflags}" \
17503                                 && cf_fix_cppflags=yes
17504
17505                         if test $cf_fix_cppflags = yes ; then
17506
17507         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17508         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17509
17510                                 continue
17511                         elif test "${cf_tst_cflags}" = "\"'" ; then
17512
17513         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17514         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17515
17516                                 continue
17517                         fi
17518                         ;;
17519                 esac
17520                 case "$CPPFLAGS" in
17521                 (*$cf_add_cflags)
17522                         ;;
17523                 (*)
17524                         case $cf_add_cflags in
17525                         (-D*)
17526                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17527
17528 CPPFLAGS=`echo "$CPPFLAGS" | \
17529         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17530                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17531
17532                                 ;;
17533                         esac
17534
17535         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17536         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17537
17538                         ;;
17539                 esac
17540                 ;;
17541         (*)
17542
17543         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17544         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17545
17546                 ;;
17547         esac
17548         ;;
17549 (yes)
17550
17551         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17552         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17553
17554         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17555
17556         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17557                 && test -z "${cf_tst_cflags}" \
17558                 && cf_fix_cppflags=no
17559         ;;
17560 esac
17561 done
17562
17563 if test -n "$cf_new_cflags" ; then
17564
17565         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17566         CFLAGS="${CFLAGS}$cf_new_cflags"
17567
17568 fi
17569
17570 if test -n "$cf_new_cppflags" ; then
17571
17572         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17573         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17574
17575 fi
17576
17577 if test -n "$cf_new_extra_cppflags" ; then
17578
17579         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17580         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17581
17582 fi
17583
17584                 ;;
17585         esac
17586         ;;
17587 esac
17588
17589 echo "$as_me:17589: checking if you want to perform memory-leak testing" >&5
17590 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17591
17592 # Check whether --enable-leaks or --disable-leaks was given.
17593 if test "${enable_leaks+set}" = set; then
17594   enableval="$enable_leaks"
17595   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17596 else
17597   : ${with_no_leaks:=no}
17598 fi;
17599 echo "$as_me:17599: result: $with_no_leaks" >&5
17600 echo "${ECHO_T}$with_no_leaks" >&6
17601
17602 if test "$with_no_leaks" = yes ; then
17603
17604 cat >>confdefs.h <<\EOF
17605 #define NO_LEAKS 1
17606 EOF
17607
17608 cat >>confdefs.h <<\EOF
17609 #define YY_NO_LEAKS 1
17610 EOF
17611
17612 fi
17613
17614 cat >>confdefs.h <<\EOF
17615 #define HAVE_NC_ALLOC_H 1
17616 EOF
17617
17618 ###     use option --enable-expanded to generate certain macros as functions
17619
17620 # Check whether --enable-expanded or --disable-expanded was given.
17621 if test "${enable_expanded+set}" = set; then
17622   enableval="$enable_expanded"
17623   test "x$enableval" = xyes &&
17624 cat >>confdefs.h <<\EOF
17625 #define NCURSES_EXPANDED 1
17626 EOF
17627
17628 fi;
17629
17630 ###     use option --disable-macros to suppress macros in favor of functions
17631
17632 # Check whether --enable-macros or --disable-macros was given.
17633 if test "${enable_macros+set}" = set; then
17634   enableval="$enable_macros"
17635   test "$enableval" = no &&
17636 cat >>confdefs.h <<\EOF
17637 #define NCURSES_NOMACROS 1
17638 EOF
17639
17640 fi;
17641
17642 # Normally we only add trace() to the debug-library.  Allow this to be
17643 # extended to all models of the ncurses library:
17644 cf_all_traces=no
17645 case "$CFLAGS $CPPFLAGS" in
17646 (*-DTRACE*)
17647         cf_all_traces=yes
17648         ;;
17649 esac
17650
17651 echo "$as_me:17651: checking whether to add trace feature to all models" >&5
17652 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17653
17654 # Check whether --with-trace or --without-trace was given.
17655 if test "${with_trace+set}" = set; then
17656   withval="$with_trace"
17657   cf_with_trace=$withval
17658 else
17659   cf_with_trace=$cf_all_traces
17660 fi;
17661 echo "$as_me:17661: result: $cf_with_trace" >&5
17662 echo "${ECHO_T}$cf_with_trace" >&6
17663
17664 if test "x$cf_with_trace" = xyes ; then
17665         LIB_TRACING=all
17666         ADA_TRACE=TRUE
17667
17668 cf_fix_cppflags=no
17669 cf_new_cflags=
17670 cf_new_cppflags=
17671 cf_new_extra_cppflags=
17672
17673 for cf_add_cflags in -DTRACE
17674 do
17675 case $cf_fix_cppflags in
17676 (no)
17677         case $cf_add_cflags in
17678         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17679                 case $cf_add_cflags in
17680                 (-D*)
17681                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17682
17683                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17684                                 && test -z "${cf_tst_cflags}" \
17685                                 && cf_fix_cppflags=yes
17686
17687                         if test $cf_fix_cppflags = yes ; then
17688
17689         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17690         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17691
17692                                 continue
17693                         elif test "${cf_tst_cflags}" = "\"'" ; then
17694
17695         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17696         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17697
17698                                 continue
17699                         fi
17700                         ;;
17701                 esac
17702                 case "$CPPFLAGS" in
17703                 (*$cf_add_cflags)
17704                         ;;
17705                 (*)
17706                         case $cf_add_cflags in
17707                         (-D*)
17708                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17709
17710 CPPFLAGS=`echo "$CPPFLAGS" | \
17711         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17712                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17713
17714                                 ;;
17715                         esac
17716
17717         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17718         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17719
17720                         ;;
17721                 esac
17722                 ;;
17723         (*)
17724
17725         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17726         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17727
17728                 ;;
17729         esac
17730         ;;
17731 (yes)
17732
17733         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17734         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17735
17736         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17737
17738         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17739                 && test -z "${cf_tst_cflags}" \
17740                 && cf_fix_cppflags=no
17741         ;;
17742 esac
17743 done
17744
17745 if test -n "$cf_new_cflags" ; then
17746
17747         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17748         CFLAGS="${CFLAGS}$cf_new_cflags"
17749
17750 fi
17751
17752 if test -n "$cf_new_cppflags" ; then
17753
17754         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17755         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17756
17757 fi
17758
17759 if test -n "$cf_new_extra_cppflags" ; then
17760
17761         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17762         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17763
17764 fi
17765
17766 cat >>confdefs.h <<\EOF
17767 #define HAVE__TRACEF 1
17768 EOF
17769
17770 else
17771         LIB_TRACING=DEBUG
17772         ADA_TRACE=FALSE
17773 fi
17774
17775 echo "$as_me:17775: checking if we want to use GNAT projects" >&5
17776 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17777
17778 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17779 if test "${enable_gnat_projects+set}" = set; then
17780   enableval="$enable_gnat_projects"
17781   test "$enableval" != no && enableval=yes
17782         if test "$enableval" != "yes" ; then
17783     enable_gnat_projects=no
17784         else
17785                 enable_gnat_projects=yes
17786         fi
17787 else
17788   enableval=yes
17789         enable_gnat_projects=yes
17790
17791 fi;
17792 echo "$as_me:17792: result: $enable_gnat_projects" >&5
17793 echo "${ECHO_T}$enable_gnat_projects" >&6
17794
17795 ###     Checks for libraries.
17796 case $cf_cv_system_name in
17797 (*mingw32*|*mingw64*)
17798         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17799         # Note: WINVER may be a problem with Windows 10
17800         ;;
17801 (*)
17802 echo "$as_me:17802: checking for gettimeofday" >&5
17803 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17804 if test "${ac_cv_func_gettimeofday+set}" = set; then
17805   echo $ECHO_N "(cached) $ECHO_C" >&6
17806 else
17807   cat >conftest.$ac_ext <<_ACEOF
17808 #line 17808 "configure"
17809 #include "confdefs.h"
17810 #define gettimeofday autoconf_temporary
17811 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17812 #undef gettimeofday
17813
17814 #ifdef __cplusplus
17815 extern "C"
17816 #endif
17817
17818 /* We use char because int might match the return type of a gcc2
17819    builtin and then its argument prototype would still apply.  */
17820 char gettimeofday (void);
17821
17822 int
17823 main (void)
17824 {
17825
17826 /* The GNU C library defines stubs for functions which it implements
17827     to always fail with ENOSYS.  Some functions are actually named
17828     something starting with __ and the normal name is an alias.  */
17829 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17830 #error found stub for gettimeofday
17831 #endif
17832
17833         return gettimeofday ();
17834   ;
17835   return 0;
17836 }
17837 _ACEOF
17838 rm -f conftest.$ac_objext conftest$ac_exeext
17839 if { (eval echo "$as_me:17839: \"$ac_link\"") >&5
17840   (eval $ac_link) 2>&5
17841   ac_status=$?
17842   echo "$as_me:17842: \$? = $ac_status" >&5
17843   (exit $ac_status); } &&
17844          { ac_try='test -s conftest$ac_exeext'
17845   { (eval echo "$as_me:17845: \"$ac_try\"") >&5
17846   (eval $ac_try) 2>&5
17847   ac_status=$?
17848   echo "$as_me:17848: \$? = $ac_status" >&5
17849   (exit $ac_status); }; }; then
17850   ac_cv_func_gettimeofday=yes
17851 else
17852   echo "$as_me: failed program was:" >&5
17853 cat conftest.$ac_ext >&5
17854 ac_cv_func_gettimeofday=no
17855 fi
17856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17857 fi
17858 echo "$as_me:17858: result: $ac_cv_func_gettimeofday" >&5
17859 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17860 if test $ac_cv_func_gettimeofday = yes; then
17861
17862 cat >>confdefs.h <<\EOF
17863 #define HAVE_GETTIMEOFDAY 1
17864 EOF
17865
17866 else
17867
17868 echo "$as_me:17868: checking for gettimeofday in -lbsd" >&5
17869 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17870 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17871   echo $ECHO_N "(cached) $ECHO_C" >&6
17872 else
17873   ac_check_lib_save_LIBS=$LIBS
17874 LIBS="-lbsd  $LIBS"
17875 cat >conftest.$ac_ext <<_ACEOF
17876 #line 17876 "configure"
17877 #include "confdefs.h"
17878
17879 /* Override any gcc2 internal prototype to avoid an error.  */
17880 #ifdef __cplusplus
17881 extern "C"
17882 #endif
17883 /* We use char because int might match the return type of a gcc2
17884    builtin and then its argument prototype would still apply.  */
17885 char gettimeofday ();
17886 int
17887 main (void)
17888 {
17889 gettimeofday ();
17890   ;
17891   return 0;
17892 }
17893 _ACEOF
17894 rm -f conftest.$ac_objext conftest$ac_exeext
17895 if { (eval echo "$as_me:17895: \"$ac_link\"") >&5
17896   (eval $ac_link) 2>&5
17897   ac_status=$?
17898   echo "$as_me:17898: \$? = $ac_status" >&5
17899   (exit $ac_status); } &&
17900          { ac_try='test -s conftest$ac_exeext'
17901   { (eval echo "$as_me:17901: \"$ac_try\"") >&5
17902   (eval $ac_try) 2>&5
17903   ac_status=$?
17904   echo "$as_me:17904: \$? = $ac_status" >&5
17905   (exit $ac_status); }; }; then
17906   ac_cv_lib_bsd_gettimeofday=yes
17907 else
17908   echo "$as_me: failed program was:" >&5
17909 cat conftest.$ac_ext >&5
17910 ac_cv_lib_bsd_gettimeofday=no
17911 fi
17912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17913 LIBS=$ac_check_lib_save_LIBS
17914 fi
17915 echo "$as_me:17915: result: $ac_cv_lib_bsd_gettimeofday" >&5
17916 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17917 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17918
17919 cat >>confdefs.h <<\EOF
17920 #define HAVE_GETTIMEOFDAY 1
17921 EOF
17922
17923 cf_add_libs="$LIBS"
17924 # reverse order
17925 cf_add_0lib=
17926 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17927 # filter duplicates
17928 for cf_add_1lib in $cf_add_0lib; do
17929         for cf_add_2lib in $cf_add_libs; do
17930                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17931                         cf_add_1lib=
17932                         break
17933                 fi
17934         done
17935         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17936 done
17937 LIBS="$cf_add_libs"
17938
17939 fi
17940
17941 fi
17942         ;;
17943 esac
17944
17945 echo "$as_me:17945: checking if -lm needed for math functions" >&5
17946 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17947 if test "${cf_cv_need_libm+set}" = set; then
17948   echo $ECHO_N "(cached) $ECHO_C" >&6
17949 else
17950
17951         cat >conftest.$ac_ext <<_ACEOF
17952 #line 17952 "configure"
17953 #include "confdefs.h"
17954
17955         #include <stdio.h>
17956         #include <stdlib.h>
17957         #include <math.h>
17958
17959 int
17960 main (void)
17961 {
17962 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17963   ;
17964   return 0;
17965 }
17966 _ACEOF
17967 rm -f conftest.$ac_objext conftest$ac_exeext
17968 if { (eval echo "$as_me:17968: \"$ac_link\"") >&5
17969   (eval $ac_link) 2>&5
17970   ac_status=$?
17971   echo "$as_me:17971: \$? = $ac_status" >&5
17972   (exit $ac_status); } &&
17973          { ac_try='test -s conftest$ac_exeext'
17974   { (eval echo "$as_me:17974: \"$ac_try\"") >&5
17975   (eval $ac_try) 2>&5
17976   ac_status=$?
17977   echo "$as_me:17977: \$? = $ac_status" >&5
17978   (exit $ac_status); }; }; then
17979   cf_cv_need_libm=no
17980 else
17981   echo "$as_me: failed program was:" >&5
17982 cat conftest.$ac_ext >&5
17983 cf_cv_need_libm=yes
17984 fi
17985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17986 fi
17987 echo "$as_me:17987: result: $cf_cv_need_libm" >&5
17988 echo "${ECHO_T}$cf_cv_need_libm" >&6
17989 if test "$cf_cv_need_libm" = yes
17990 then
17991 MATH_LIB=-lm
17992 fi
17993
17994 ###     Checks for header files.
17995 echo "$as_me:17995: checking for ANSI C header files" >&5
17996 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17997 if test "${ac_cv_header_stdc+set}" = set; then
17998   echo $ECHO_N "(cached) $ECHO_C" >&6
17999 else
18000   cat >conftest.$ac_ext <<_ACEOF
18001 #line 18001 "configure"
18002 #include "confdefs.h"
18003 #include <stdlib.h>
18004 #include <stdarg.h>
18005 #include <string.h>
18006 #include <float.h>
18007
18008 _ACEOF
18009 if { (eval echo "$as_me:18009: \"$ac_cpp conftest.$ac_ext\"") >&5
18010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18011   ac_status=$?
18012   egrep -v '^ *\+' conftest.er1 >conftest.err
18013   rm -f conftest.er1
18014   cat conftest.err >&5
18015   echo "$as_me:18015: \$? = $ac_status" >&5
18016   (exit $ac_status); } >/dev/null; then
18017   if test -s conftest.err; then
18018     ac_cpp_err=$ac_c_preproc_warn_flag
18019   else
18020     ac_cpp_err=
18021   fi
18022 else
18023   ac_cpp_err=yes
18024 fi
18025 if test -z "$ac_cpp_err"; then
18026   ac_cv_header_stdc=yes
18027 else
18028   echo "$as_me: failed program was:" >&5
18029   cat conftest.$ac_ext >&5
18030   ac_cv_header_stdc=no
18031 fi
18032 rm -f conftest.err conftest.$ac_ext
18033
18034 if test $ac_cv_header_stdc = yes; then
18035   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18036   cat >conftest.$ac_ext <<_ACEOF
18037 #line 18037 "configure"
18038 #include "confdefs.h"
18039 #include <string.h>
18040
18041 _ACEOF
18042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18043   egrep "memchr" >/dev/null 2>&1; then
18044   :
18045 else
18046   ac_cv_header_stdc=no
18047 fi
18048 rm -rf conftest*
18049
18050 fi
18051
18052 if test $ac_cv_header_stdc = yes; then
18053   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18054   cat >conftest.$ac_ext <<_ACEOF
18055 #line 18055 "configure"
18056 #include "confdefs.h"
18057 #include <stdlib.h>
18058
18059 _ACEOF
18060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18061   egrep "free" >/dev/null 2>&1; then
18062   :
18063 else
18064   ac_cv_header_stdc=no
18065 fi
18066 rm -rf conftest*
18067
18068 fi
18069
18070 if test $ac_cv_header_stdc = yes; then
18071   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18072   if test "$cross_compiling" = yes; then
18073   :
18074 else
18075   cat >conftest.$ac_ext <<_ACEOF
18076 #line 18076 "configure"
18077 #include "confdefs.h"
18078 #include <ctype.h>
18079 #if ((' ' & 0x0FF) == 0x020)
18080 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18081 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18082 #else
18083 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18084                      || ('j' <= (c) && (c) <= 'r') \
18085                      || ('s' <= (c) && (c) <= 'z'))
18086 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18087 #endif
18088
18089 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18090 int
18091 main (void)
18092 {
18093   int i;
18094   for (i = 0; i < 256; i++)
18095     if (XOR (islower (i), ISLOWER (i))
18096         || toupper (i) != TOUPPER (i))
18097       $ac_main_return(2);
18098   $ac_main_return (0);
18099 }
18100 _ACEOF
18101 rm -f conftest$ac_exeext
18102 if { (eval echo "$as_me:18102: \"$ac_link\"") >&5
18103   (eval $ac_link) 2>&5
18104   ac_status=$?
18105   echo "$as_me:18105: \$? = $ac_status" >&5
18106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18107   { (eval echo "$as_me:18107: \"$ac_try\"") >&5
18108   (eval $ac_try) 2>&5
18109   ac_status=$?
18110   echo "$as_me:18110: \$? = $ac_status" >&5
18111   (exit $ac_status); }; }; then
18112   :
18113 else
18114   echo "$as_me: program exited with status $ac_status" >&5
18115 echo "$as_me: failed program was:" >&5
18116 cat conftest.$ac_ext >&5
18117 ac_cv_header_stdc=no
18118 fi
18119 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18120 fi
18121 fi
18122 fi
18123 echo "$as_me:18123: result: $ac_cv_header_stdc" >&5
18124 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18125 if test $ac_cv_header_stdc = yes; then
18126
18127 cat >>confdefs.h <<\EOF
18128 #define STDC_HEADERS 1
18129 EOF
18130
18131 fi
18132
18133 ac_header_dirent=no
18134 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18135   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18136 echo "$as_me:18136: checking for $ac_hdr that defines DIR" >&5
18137 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18138 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18139   echo $ECHO_N "(cached) $ECHO_C" >&6
18140 else
18141   cat >conftest.$ac_ext <<_ACEOF
18142 #line 18142 "configure"
18143 #include "confdefs.h"
18144 #include <sys/types.h>
18145 #include <$ac_hdr>
18146
18147 int
18148 main (void)
18149 {
18150 if ((DIR *) 0)
18151 return 0;
18152   ;
18153   return 0;
18154 }
18155 _ACEOF
18156 rm -f conftest.$ac_objext
18157 if { (eval echo "$as_me:18157: \"$ac_compile\"") >&5
18158   (eval $ac_compile) 2>&5
18159   ac_status=$?
18160   echo "$as_me:18160: \$? = $ac_status" >&5
18161   (exit $ac_status); } &&
18162          { ac_try='test -s conftest.$ac_objext'
18163   { (eval echo "$as_me:18163: \"$ac_try\"") >&5
18164   (eval $ac_try) 2>&5
18165   ac_status=$?
18166   echo "$as_me:18166: \$? = $ac_status" >&5
18167   (exit $ac_status); }; }; then
18168   eval "$as_ac_Header=yes"
18169 else
18170   echo "$as_me: failed program was:" >&5
18171 cat conftest.$ac_ext >&5
18172 eval "$as_ac_Header=no"
18173 fi
18174 rm -f conftest.$ac_objext conftest.$ac_ext
18175 fi
18176 echo "$as_me:18176: result: `eval echo '${'$as_ac_Header'}'`" >&5
18177 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18178 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18179   cat >>confdefs.h <<EOF
18180 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18181 EOF
18182
18183 ac_header_dirent=$ac_hdr; break
18184 fi
18185
18186 done
18187 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18188 if test $ac_header_dirent = dirent.h; then
18189   echo "$as_me:18189: checking for opendir in -ldir" >&5
18190 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18191 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18192   echo $ECHO_N "(cached) $ECHO_C" >&6
18193 else
18194   ac_check_lib_save_LIBS=$LIBS
18195 LIBS="-ldir  $LIBS"
18196 cat >conftest.$ac_ext <<_ACEOF
18197 #line 18197 "configure"
18198 #include "confdefs.h"
18199
18200 /* Override any gcc2 internal prototype to avoid an error.  */
18201 #ifdef __cplusplus
18202 extern "C"
18203 #endif
18204 /* We use char because int might match the return type of a gcc2
18205    builtin and then its argument prototype would still apply.  */
18206 char opendir ();
18207 int
18208 main (void)
18209 {
18210 opendir ();
18211   ;
18212   return 0;
18213 }
18214 _ACEOF
18215 rm -f conftest.$ac_objext conftest$ac_exeext
18216 if { (eval echo "$as_me:18216: \"$ac_link\"") >&5
18217   (eval $ac_link) 2>&5
18218   ac_status=$?
18219   echo "$as_me:18219: \$? = $ac_status" >&5
18220   (exit $ac_status); } &&
18221          { ac_try='test -s conftest$ac_exeext'
18222   { (eval echo "$as_me:18222: \"$ac_try\"") >&5
18223   (eval $ac_try) 2>&5
18224   ac_status=$?
18225   echo "$as_me:18225: \$? = $ac_status" >&5
18226   (exit $ac_status); }; }; then
18227   ac_cv_lib_dir_opendir=yes
18228 else
18229   echo "$as_me: failed program was:" >&5
18230 cat conftest.$ac_ext >&5
18231 ac_cv_lib_dir_opendir=no
18232 fi
18233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18234 LIBS=$ac_check_lib_save_LIBS
18235 fi
18236 echo "$as_me:18236: result: $ac_cv_lib_dir_opendir" >&5
18237 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18238 if test $ac_cv_lib_dir_opendir = yes; then
18239   LIBS="$LIBS -ldir"
18240 fi
18241
18242 else
18243   echo "$as_me:18243: checking for opendir in -lx" >&5
18244 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18245 if test "${ac_cv_lib_x_opendir+set}" = set; then
18246   echo $ECHO_N "(cached) $ECHO_C" >&6
18247 else
18248   ac_check_lib_save_LIBS=$LIBS
18249 LIBS="-lx  $LIBS"
18250 cat >conftest.$ac_ext <<_ACEOF
18251 #line 18251 "configure"
18252 #include "confdefs.h"
18253
18254 /* Override any gcc2 internal prototype to avoid an error.  */
18255 #ifdef __cplusplus
18256 extern "C"
18257 #endif
18258 /* We use char because int might match the return type of a gcc2
18259    builtin and then its argument prototype would still apply.  */
18260 char opendir ();
18261 int
18262 main (void)
18263 {
18264 opendir ();
18265   ;
18266   return 0;
18267 }
18268 _ACEOF
18269 rm -f conftest.$ac_objext conftest$ac_exeext
18270 if { (eval echo "$as_me:18270: \"$ac_link\"") >&5
18271   (eval $ac_link) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit $ac_status); } &&
18275          { ac_try='test -s conftest$ac_exeext'
18276   { (eval echo "$as_me:18276: \"$ac_try\"") >&5
18277   (eval $ac_try) 2>&5
18278   ac_status=$?
18279   echo "$as_me:18279: \$? = $ac_status" >&5
18280   (exit $ac_status); }; }; then
18281   ac_cv_lib_x_opendir=yes
18282 else
18283   echo "$as_me: failed program was:" >&5
18284 cat conftest.$ac_ext >&5
18285 ac_cv_lib_x_opendir=no
18286 fi
18287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18288 LIBS=$ac_check_lib_save_LIBS
18289 fi
18290 echo "$as_me:18290: result: $ac_cv_lib_x_opendir" >&5
18291 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18292 if test $ac_cv_lib_x_opendir = yes; then
18293   LIBS="$LIBS -lx"
18294 fi
18295
18296 fi
18297
18298 echo "$as_me:18298: checking whether time.h and sys/time.h may both be included" >&5
18299 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18300 if test "${ac_cv_header_time+set}" = set; then
18301   echo $ECHO_N "(cached) $ECHO_C" >&6
18302 else
18303   cat >conftest.$ac_ext <<_ACEOF
18304 #line 18304 "configure"
18305 #include "confdefs.h"
18306 #include <sys/types.h>
18307 #include <sys/time.h>
18308 #include <time.h>
18309
18310 int
18311 main (void)
18312 {
18313 if ((struct tm *) 0)
18314 return 0;
18315   ;
18316   return 0;
18317 }
18318 _ACEOF
18319 rm -f conftest.$ac_objext
18320 if { (eval echo "$as_me:18320: \"$ac_compile\"") >&5
18321   (eval $ac_compile) 2>&5
18322   ac_status=$?
18323   echo "$as_me:18323: \$? = $ac_status" >&5
18324   (exit $ac_status); } &&
18325          { ac_try='test -s conftest.$ac_objext'
18326   { (eval echo "$as_me:18326: \"$ac_try\"") >&5
18327   (eval $ac_try) 2>&5
18328   ac_status=$?
18329   echo "$as_me:18329: \$? = $ac_status" >&5
18330   (exit $ac_status); }; }; then
18331   ac_cv_header_time=yes
18332 else
18333   echo "$as_me: failed program was:" >&5
18334 cat conftest.$ac_ext >&5
18335 ac_cv_header_time=no
18336 fi
18337 rm -f conftest.$ac_objext conftest.$ac_ext
18338 fi
18339 echo "$as_me:18339: result: $ac_cv_header_time" >&5
18340 echo "${ECHO_T}$ac_cv_header_time" >&6
18341 if test $ac_cv_header_time = yes; then
18342
18343 cat >>confdefs.h <<\EOF
18344 #define TIME_WITH_SYS_TIME 1
18345 EOF
18346
18347 fi
18348
18349 cf_regex_func=no
18350
18351 cf_regex_libs="regex re"
18352 case $host_os in
18353 (mingw*)
18354         cf_regex_libs="systre gnurx $cf_regex_libs"
18355         ;;
18356 esac
18357
18358 echo "$as_me:18358: checking for regcomp" >&5
18359 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18360 if test "${ac_cv_func_regcomp+set}" = set; then
18361   echo $ECHO_N "(cached) $ECHO_C" >&6
18362 else
18363   cat >conftest.$ac_ext <<_ACEOF
18364 #line 18364 "configure"
18365 #include "confdefs.h"
18366 #define regcomp autoconf_temporary
18367 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18368 #undef regcomp
18369
18370 #ifdef __cplusplus
18371 extern "C"
18372 #endif
18373
18374 /* We use char because int might match the return type of a gcc2
18375    builtin and then its argument prototype would still apply.  */
18376 char regcomp (void);
18377
18378 int
18379 main (void)
18380 {
18381
18382 /* The GNU C library defines stubs for functions which it implements
18383     to always fail with ENOSYS.  Some functions are actually named
18384     something starting with __ and the normal name is an alias.  */
18385 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18386 #error found stub for regcomp
18387 #endif
18388
18389         return regcomp ();
18390   ;
18391   return 0;
18392 }
18393 _ACEOF
18394 rm -f conftest.$ac_objext conftest$ac_exeext
18395 if { (eval echo "$as_me:18395: \"$ac_link\"") >&5
18396   (eval $ac_link) 2>&5
18397   ac_status=$?
18398   echo "$as_me:18398: \$? = $ac_status" >&5
18399   (exit $ac_status); } &&
18400          { ac_try='test -s conftest$ac_exeext'
18401   { (eval echo "$as_me:18401: \"$ac_try\"") >&5
18402   (eval $ac_try) 2>&5
18403   ac_status=$?
18404   echo "$as_me:18404: \$? = $ac_status" >&5
18405   (exit $ac_status); }; }; then
18406   ac_cv_func_regcomp=yes
18407 else
18408   echo "$as_me: failed program was:" >&5
18409 cat conftest.$ac_ext >&5
18410 ac_cv_func_regcomp=no
18411 fi
18412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18413 fi
18414 echo "$as_me:18414: result: $ac_cv_func_regcomp" >&5
18415 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18416 if test $ac_cv_func_regcomp = yes; then
18417   cf_regex_func=regcomp
18418 else
18419
18420         for cf_regex_lib in $cf_regex_libs
18421         do
18422                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18423 echo "$as_me:18423: checking for regcomp in -l$cf_regex_lib" >&5
18424 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18425 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18426   echo $ECHO_N "(cached) $ECHO_C" >&6
18427 else
18428   ac_check_lib_save_LIBS=$LIBS
18429 LIBS="-l$cf_regex_lib  $LIBS"
18430 cat >conftest.$ac_ext <<_ACEOF
18431 #line 18431 "configure"
18432 #include "confdefs.h"
18433
18434 /* Override any gcc2 internal prototype to avoid an error.  */
18435 #ifdef __cplusplus
18436 extern "C"
18437 #endif
18438 /* We use char because int might match the return type of a gcc2
18439    builtin and then its argument prototype would still apply.  */
18440 char regcomp ();
18441 int
18442 main (void)
18443 {
18444 regcomp ();
18445   ;
18446   return 0;
18447 }
18448 _ACEOF
18449 rm -f conftest.$ac_objext conftest$ac_exeext
18450 if { (eval echo "$as_me:18450: \"$ac_link\"") >&5
18451   (eval $ac_link) 2>&5
18452   ac_status=$?
18453   echo "$as_me:18453: \$? = $ac_status" >&5
18454   (exit $ac_status); } &&
18455          { ac_try='test -s conftest$ac_exeext'
18456   { (eval echo "$as_me:18456: \"$ac_try\"") >&5
18457   (eval $ac_try) 2>&5
18458   ac_status=$?
18459   echo "$as_me:18459: \$? = $ac_status" >&5
18460   (exit $ac_status); }; }; then
18461   eval "$as_ac_Lib=yes"
18462 else
18463   echo "$as_me: failed program was:" >&5
18464 cat conftest.$ac_ext >&5
18465 eval "$as_ac_Lib=no"
18466 fi
18467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18468 LIBS=$ac_check_lib_save_LIBS
18469 fi
18470 echo "$as_me:18470: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18471 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18472 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18473
18474 cf_add_libs="$LIBS"
18475 # reverse order
18476 cf_add_0lib=
18477 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18478 # filter duplicates
18479 for cf_add_1lib in $cf_add_0lib; do
18480         for cf_add_2lib in $cf_add_libs; do
18481                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18482                         cf_add_1lib=
18483                         break
18484                 fi
18485         done
18486         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18487 done
18488 LIBS="$cf_add_libs"
18489
18490                                 cf_regex_func=regcomp
18491                                 break
18492 fi
18493
18494         done
18495
18496 fi
18497
18498 if test "$cf_regex_func" = no ; then
18499         echo "$as_me:18499: checking for compile" >&5
18500 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18501 if test "${ac_cv_func_compile+set}" = set; then
18502   echo $ECHO_N "(cached) $ECHO_C" >&6
18503 else
18504   cat >conftest.$ac_ext <<_ACEOF
18505 #line 18505 "configure"
18506 #include "confdefs.h"
18507 #define compile autoconf_temporary
18508 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18509 #undef compile
18510
18511 #ifdef __cplusplus
18512 extern "C"
18513 #endif
18514
18515 /* We use char because int might match the return type of a gcc2
18516    builtin and then its argument prototype would still apply.  */
18517 char compile (void);
18518
18519 int
18520 main (void)
18521 {
18522
18523 /* The GNU C library defines stubs for functions which it implements
18524     to always fail with ENOSYS.  Some functions are actually named
18525     something starting with __ and the normal name is an alias.  */
18526 #if defined (__stub_compile) || defined (__stub___compile)
18527 #error found stub for compile
18528 #endif
18529
18530         return compile ();
18531   ;
18532   return 0;
18533 }
18534 _ACEOF
18535 rm -f conftest.$ac_objext conftest$ac_exeext
18536 if { (eval echo "$as_me:18536: \"$ac_link\"") >&5
18537   (eval $ac_link) 2>&5
18538   ac_status=$?
18539   echo "$as_me:18539: \$? = $ac_status" >&5
18540   (exit $ac_status); } &&
18541          { ac_try='test -s conftest$ac_exeext'
18542   { (eval echo "$as_me:18542: \"$ac_try\"") >&5
18543   (eval $ac_try) 2>&5
18544   ac_status=$?
18545   echo "$as_me:18545: \$? = $ac_status" >&5
18546   (exit $ac_status); }; }; then
18547   ac_cv_func_compile=yes
18548 else
18549   echo "$as_me: failed program was:" >&5
18550 cat conftest.$ac_ext >&5
18551 ac_cv_func_compile=no
18552 fi
18553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18554 fi
18555 echo "$as_me:18555: result: $ac_cv_func_compile" >&5
18556 echo "${ECHO_T}$ac_cv_func_compile" >&6
18557 if test $ac_cv_func_compile = yes; then
18558   cf_regex_func=compile
18559 else
18560
18561                 echo "$as_me:18561: checking for compile in -lgen" >&5
18562 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18563 if test "${ac_cv_lib_gen_compile+set}" = set; then
18564   echo $ECHO_N "(cached) $ECHO_C" >&6
18565 else
18566   ac_check_lib_save_LIBS=$LIBS
18567 LIBS="-lgen  $LIBS"
18568 cat >conftest.$ac_ext <<_ACEOF
18569 #line 18569 "configure"
18570 #include "confdefs.h"
18571
18572 /* Override any gcc2 internal prototype to avoid an error.  */
18573 #ifdef __cplusplus
18574 extern "C"
18575 #endif
18576 /* We use char because int might match the return type of a gcc2
18577    builtin and then its argument prototype would still apply.  */
18578 char compile ();
18579 int
18580 main (void)
18581 {
18582 compile ();
18583   ;
18584   return 0;
18585 }
18586 _ACEOF
18587 rm -f conftest.$ac_objext conftest$ac_exeext
18588 if { (eval echo "$as_me:18588: \"$ac_link\"") >&5
18589   (eval $ac_link) 2>&5
18590   ac_status=$?
18591   echo "$as_me:18591: \$? = $ac_status" >&5
18592   (exit $ac_status); } &&
18593          { ac_try='test -s conftest$ac_exeext'
18594   { (eval echo "$as_me:18594: \"$ac_try\"") >&5
18595   (eval $ac_try) 2>&5
18596   ac_status=$?
18597   echo "$as_me:18597: \$? = $ac_status" >&5
18598   (exit $ac_status); }; }; then
18599   ac_cv_lib_gen_compile=yes
18600 else
18601   echo "$as_me: failed program was:" >&5
18602 cat conftest.$ac_ext >&5
18603 ac_cv_lib_gen_compile=no
18604 fi
18605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18606 LIBS=$ac_check_lib_save_LIBS
18607 fi
18608 echo "$as_me:18608: result: $ac_cv_lib_gen_compile" >&5
18609 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18610 if test $ac_cv_lib_gen_compile = yes; then
18611
18612 cf_add_libs="$LIBS"
18613 # reverse order
18614 cf_add_0lib=
18615 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18616 # filter duplicates
18617 for cf_add_1lib in $cf_add_0lib; do
18618         for cf_add_2lib in $cf_add_libs; do
18619                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18620                         cf_add_1lib=
18621                         break
18622                 fi
18623         done
18624         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18625 done
18626 LIBS="$cf_add_libs"
18627
18628                                 cf_regex_func=compile
18629 fi
18630
18631 fi
18632
18633 fi
18634
18635 if test "$cf_regex_func" = no ; then
18636         { echo "$as_me:18636: WARNING: cannot find regular expression library" >&5
18637 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18638 fi
18639
18640 echo "$as_me:18640: checking for regular-expression headers" >&5
18641 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18642 if test "${cf_cv_regex_hdrs+set}" = set; then
18643   echo $ECHO_N "(cached) $ECHO_C" >&6
18644 else
18645
18646 cf_cv_regex_hdrs=no
18647 case $cf_regex_func in
18648 (compile)
18649         for cf_regex_hdr in regexp.h regexpr.h
18650         do
18651                 cat >conftest.$ac_ext <<_ACEOF
18652 #line 18652 "configure"
18653 #include "confdefs.h"
18654 #include <$cf_regex_hdr>
18655 int
18656 main (void)
18657 {
18658
18659                         char *p = compile("", "", "", 0);
18660                         int x = step("", "");
18661                         (void)p;
18662                         (void)x;
18663
18664   ;
18665   return 0;
18666 }
18667 _ACEOF
18668 rm -f conftest.$ac_objext conftest$ac_exeext
18669 if { (eval echo "$as_me:18669: \"$ac_link\"") >&5
18670   (eval $ac_link) 2>&5
18671   ac_status=$?
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit $ac_status); } &&
18674          { ac_try='test -s conftest$ac_exeext'
18675   { (eval echo "$as_me:18675: \"$ac_try\"") >&5
18676   (eval $ac_try) 2>&5
18677   ac_status=$?
18678   echo "$as_me:18678: \$? = $ac_status" >&5
18679   (exit $ac_status); }; }; then
18680
18681                         cf_cv_regex_hdrs=$cf_regex_hdr
18682                         break
18683
18684 else
18685   echo "$as_me: failed program was:" >&5
18686 cat conftest.$ac_ext >&5
18687 fi
18688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18689         done
18690         ;;
18691 (*)
18692         for cf_regex_hdr in regex.h
18693         do
18694                 cat >conftest.$ac_ext <<_ACEOF
18695 #line 18695 "configure"
18696 #include "confdefs.h"
18697 #include <sys/types.h>
18698 #include <$cf_regex_hdr>
18699 int
18700 main (void)
18701 {
18702
18703                         regex_t *p = 0;
18704                         int x = regcomp(p, "", 0);
18705                         int y = regexec(p, "", 0, 0, 0);
18706                         (void)x;
18707                         (void)y;
18708                         regfree(p);
18709
18710   ;
18711   return 0;
18712 }
18713 _ACEOF
18714 rm -f conftest.$ac_objext conftest$ac_exeext
18715 if { (eval echo "$as_me:18715: \"$ac_link\"") >&5
18716   (eval $ac_link) 2>&5
18717   ac_status=$?
18718   echo "$as_me:18718: \$? = $ac_status" >&5
18719   (exit $ac_status); } &&
18720          { ac_try='test -s conftest$ac_exeext'
18721   { (eval echo "$as_me:18721: \"$ac_try\"") >&5
18722   (eval $ac_try) 2>&5
18723   ac_status=$?
18724   echo "$as_me:18724: \$? = $ac_status" >&5
18725   (exit $ac_status); }; }; then
18726
18727                         cf_cv_regex_hdrs=$cf_regex_hdr
18728                         break
18729
18730 else
18731   echo "$as_me: failed program was:" >&5
18732 cat conftest.$ac_ext >&5
18733 fi
18734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18735         done
18736         ;;
18737 esac
18738
18739 fi
18740 echo "$as_me:18740: result: $cf_cv_regex_hdrs" >&5
18741 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18742
18743 case $cf_cv_regex_hdrs in
18744         (no)            { echo "$as_me:18744: WARNING: no regular expression header found" >&5
18745 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18746         (regex.h)
18747 cat >>confdefs.h <<\EOF
18748 #define HAVE_REGEX_H_FUNCS 1
18749 EOF
18750  ;;
18751         (regexp.h)
18752 cat >>confdefs.h <<\EOF
18753 #define HAVE_REGEXP_H_FUNCS 1
18754 EOF
18755  ;;
18756         (regexpr.h)
18757 cat >>confdefs.h <<\EOF
18758 #define HAVE_REGEXPR_H_FUNCS 1
18759 EOF
18760  ;;
18761 esac
18762
18763 for ac_header in \
18764 fcntl.h \
18765 getopt.h \
18766 limits.h \
18767 locale.h \
18768 math.h \
18769 poll.h \
18770 sys/ioctl.h \
18771 sys/param.h \
18772 sys/poll.h \
18773 sys/select.h \
18774 sys/time.h \
18775 sys/times.h \
18776 ttyent.h \
18777 unistd.h \
18778 wctype.h \
18779
18780 do
18781 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18782 echo "$as_me:18782: checking for $ac_header" >&5
18783 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18784 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18785   echo $ECHO_N "(cached) $ECHO_C" >&6
18786 else
18787   cat >conftest.$ac_ext <<_ACEOF
18788 #line 18788 "configure"
18789 #include "confdefs.h"
18790 #include <$ac_header>
18791 _ACEOF
18792 if { (eval echo "$as_me:18792: \"$ac_cpp conftest.$ac_ext\"") >&5
18793   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18794   ac_status=$?
18795   egrep -v '^ *\+' conftest.er1 >conftest.err
18796   rm -f conftest.er1
18797   cat conftest.err >&5
18798   echo "$as_me:18798: \$? = $ac_status" >&5
18799   (exit $ac_status); } >/dev/null; then
18800   if test -s conftest.err; then
18801     ac_cpp_err=$ac_c_preproc_warn_flag
18802   else
18803     ac_cpp_err=
18804   fi
18805 else
18806   ac_cpp_err=yes
18807 fi
18808 if test -z "$ac_cpp_err"; then
18809   eval "$as_ac_Header=yes"
18810 else
18811   echo "$as_me: failed program was:" >&5
18812   cat conftest.$ac_ext >&5
18813   eval "$as_ac_Header=no"
18814 fi
18815 rm -f conftest.err conftest.$ac_ext
18816 fi
18817 echo "$as_me:18817: result: `eval echo '${'$as_ac_Header'}'`" >&5
18818 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18819 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18820   cat >>confdefs.h <<EOF
18821 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18822 EOF
18823
18824 fi
18825 done
18826
18827 for ac_header in unistd.h getopt.h
18828 do
18829 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18830 echo "$as_me:18830: checking for $ac_header" >&5
18831 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18832 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18833   echo $ECHO_N "(cached) $ECHO_C" >&6
18834 else
18835   cat >conftest.$ac_ext <<_ACEOF
18836 #line 18836 "configure"
18837 #include "confdefs.h"
18838 #include <$ac_header>
18839 _ACEOF
18840 if { (eval echo "$as_me:18840: \"$ac_cpp conftest.$ac_ext\"") >&5
18841   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18842   ac_status=$?
18843   egrep -v '^ *\+' conftest.er1 >conftest.err
18844   rm -f conftest.er1
18845   cat conftest.err >&5
18846   echo "$as_me:18846: \$? = $ac_status" >&5
18847   (exit $ac_status); } >/dev/null; then
18848   if test -s conftest.err; then
18849     ac_cpp_err=$ac_c_preproc_warn_flag
18850   else
18851     ac_cpp_err=
18852   fi
18853 else
18854   ac_cpp_err=yes
18855 fi
18856 if test -z "$ac_cpp_err"; then
18857   eval "$as_ac_Header=yes"
18858 else
18859   echo "$as_me: failed program was:" >&5
18860   cat conftest.$ac_ext >&5
18861   eval "$as_ac_Header=no"
18862 fi
18863 rm -f conftest.err conftest.$ac_ext
18864 fi
18865 echo "$as_me:18865: result: `eval echo '${'$as_ac_Header'}'`" >&5
18866 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18867 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18868   cat >>confdefs.h <<EOF
18869 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18870 EOF
18871
18872 fi
18873 done
18874
18875 echo "$as_me:18875: checking for header declaring getopt variables" >&5
18876 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18877 if test "${cf_cv_getopt_header+set}" = set; then
18878   echo $ECHO_N "(cached) $ECHO_C" >&6
18879 else
18880
18881 cf_cv_getopt_header=none
18882 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18883 do
18884 cat >conftest.$ac_ext <<_ACEOF
18885 #line 18885 "configure"
18886 #include "confdefs.h"
18887
18888 #include <$cf_header>
18889 int
18890 main (void)
18891 {
18892 int x = optind; char *y = optarg
18893   ;
18894   return 0;
18895 }
18896 _ACEOF
18897 rm -f conftest.$ac_objext
18898 if { (eval echo "$as_me:18898: \"$ac_compile\"") >&5
18899   (eval $ac_compile) 2>&5
18900   ac_status=$?
18901   echo "$as_me:18901: \$? = $ac_status" >&5
18902   (exit $ac_status); } &&
18903          { ac_try='test -s conftest.$ac_objext'
18904   { (eval echo "$as_me:18904: \"$ac_try\"") >&5
18905   (eval $ac_try) 2>&5
18906   ac_status=$?
18907   echo "$as_me:18907: \$? = $ac_status" >&5
18908   (exit $ac_status); }; }; then
18909   cf_cv_getopt_header=$cf_header
18910  break
18911 else
18912   echo "$as_me: failed program was:" >&5
18913 cat conftest.$ac_ext >&5
18914 fi
18915 rm -f conftest.$ac_objext conftest.$ac_ext
18916 done
18917
18918 fi
18919 echo "$as_me:18919: result: $cf_cv_getopt_header" >&5
18920 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18921 if test $cf_cv_getopt_header != none ; then
18922
18923 cat >>confdefs.h <<\EOF
18924 #define HAVE_GETOPT_HEADER 1
18925 EOF
18926
18927 fi
18928 if test $cf_cv_getopt_header = getopt.h ; then
18929
18930 cat >>confdefs.h <<\EOF
18931 #define NEED_GETOPT_H 1
18932 EOF
18933
18934 fi
18935
18936 echo "$as_me:18936: checking if external environ is declared" >&5
18937 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18938 if test "${cf_cv_dcl_environ+set}" = set; then
18939   echo $ECHO_N "(cached) $ECHO_C" >&6
18940 else
18941
18942     cat >conftest.$ac_ext <<_ACEOF
18943 #line 18943 "configure"
18944 #include "confdefs.h"
18945
18946 #ifdef HAVE_STDLIB_H
18947 #include <stdlib.h>
18948 #endif
18949 #include <unistd.h>
18950 int
18951 main (void)
18952 {
18953 int x = (int) environ
18954   ;
18955   return 0;
18956 }
18957 _ACEOF
18958 rm -f conftest.$ac_objext
18959 if { (eval echo "$as_me:18959: \"$ac_compile\"") >&5
18960   (eval $ac_compile) 2>&5
18961   ac_status=$?
18962   echo "$as_me:18962: \$? = $ac_status" >&5
18963   (exit $ac_status); } &&
18964          { ac_try='test -s conftest.$ac_objext'
18965   { (eval echo "$as_me:18965: \"$ac_try\"") >&5
18966   (eval $ac_try) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit $ac_status); }; }; then
18970   cf_cv_dcl_environ=yes
18971 else
18972   echo "$as_me: failed program was:" >&5
18973 cat conftest.$ac_ext >&5
18974 cf_cv_dcl_environ=no
18975 fi
18976 rm -f conftest.$ac_objext conftest.$ac_ext
18977
18978 fi
18979 echo "$as_me:18979: result: $cf_cv_dcl_environ" >&5
18980 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18981
18982 if test "$cf_cv_dcl_environ" = no ; then
18983
18984 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18985
18986     cat >>confdefs.h <<EOF
18987 #define $cf_result 1
18988 EOF
18989
18990 fi
18991
18992 # It's possible (for near-UNIX clones) that the data doesn't exist
18993
18994 echo "$as_me:18994: checking if external environ exists" >&5
18995 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18996 if test "${cf_cv_have_environ+set}" = set; then
18997   echo $ECHO_N "(cached) $ECHO_C" >&6
18998 else
18999
19000         cat >conftest.$ac_ext <<_ACEOF
19001 #line 19001 "configure"
19002 #include "confdefs.h"
19003
19004 #undef environ
19005 extern int environ;
19006
19007 int
19008 main (void)
19009 {
19010 environ = 2
19011   ;
19012   return 0;
19013 }
19014 _ACEOF
19015 rm -f conftest.$ac_objext conftest$ac_exeext
19016 if { (eval echo "$as_me:19016: \"$ac_link\"") >&5
19017   (eval $ac_link) 2>&5
19018   ac_status=$?
19019   echo "$as_me:19019: \$? = $ac_status" >&5
19020   (exit $ac_status); } &&
19021          { ac_try='test -s conftest$ac_exeext'
19022   { (eval echo "$as_me:19022: \"$ac_try\"") >&5
19023   (eval $ac_try) 2>&5
19024   ac_status=$?
19025   echo "$as_me:19025: \$? = $ac_status" >&5
19026   (exit $ac_status); }; }; then
19027   cf_cv_have_environ=yes
19028 else
19029   echo "$as_me: failed program was:" >&5
19030 cat conftest.$ac_ext >&5
19031 cf_cv_have_environ=no
19032 fi
19033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19034
19035 fi
19036 echo "$as_me:19036: result: $cf_cv_have_environ" >&5
19037 echo "${ECHO_T}$cf_cv_have_environ" >&6
19038
19039 if test "$cf_cv_have_environ" = yes ; then
19040
19041 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19042
19043         cat >>confdefs.h <<EOF
19044 #define $cf_result 1
19045 EOF
19046
19047 fi
19048
19049 echo "$as_me:19049: checking for getenv" >&5
19050 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19051 if test "${ac_cv_func_getenv+set}" = set; then
19052   echo $ECHO_N "(cached) $ECHO_C" >&6
19053 else
19054   cat >conftest.$ac_ext <<_ACEOF
19055 #line 19055 "configure"
19056 #include "confdefs.h"
19057 #define getenv autoconf_temporary
19058 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19059 #undef getenv
19060
19061 #ifdef __cplusplus
19062 extern "C"
19063 #endif
19064
19065 /* We use char because int might match the return type of a gcc2
19066    builtin and then its argument prototype would still apply.  */
19067 char getenv (void);
19068
19069 int
19070 main (void)
19071 {
19072
19073 /* The GNU C library defines stubs for functions which it implements
19074     to always fail with ENOSYS.  Some functions are actually named
19075     something starting with __ and the normal name is an alias.  */
19076 #if defined (__stub_getenv) || defined (__stub___getenv)
19077 #error found stub for getenv
19078 #endif
19079
19080         return getenv ();
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 rm -f conftest.$ac_objext conftest$ac_exeext
19086 if { (eval echo "$as_me:19086: \"$ac_link\"") >&5
19087   (eval $ac_link) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit $ac_status); } &&
19091          { ac_try='test -s conftest$ac_exeext'
19092   { (eval echo "$as_me:19092: \"$ac_try\"") >&5
19093   (eval $ac_try) 2>&5
19094   ac_status=$?
19095   echo "$as_me:19095: \$? = $ac_status" >&5
19096   (exit $ac_status); }; }; then
19097   ac_cv_func_getenv=yes
19098 else
19099   echo "$as_me: failed program was:" >&5
19100 cat conftest.$ac_ext >&5
19101 ac_cv_func_getenv=no
19102 fi
19103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19104 fi
19105 echo "$as_me:19105: result: $ac_cv_func_getenv" >&5
19106 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19107
19108 for ac_func in putenv setenv strdup
19109 do
19110 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19111 echo "$as_me:19111: checking for $ac_func" >&5
19112 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19113 if eval "test \"\${$as_ac_var+set}\" = set"; then
19114   echo $ECHO_N "(cached) $ECHO_C" >&6
19115 else
19116   cat >conftest.$ac_ext <<_ACEOF
19117 #line 19117 "configure"
19118 #include "confdefs.h"
19119 #define $ac_func autoconf_temporary
19120 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19121 #undef $ac_func
19122
19123 #ifdef __cplusplus
19124 extern "C"
19125 #endif
19126
19127 /* We use char because int might match the return type of a gcc2
19128    builtin and then its argument prototype would still apply.  */
19129 char $ac_func (void);
19130
19131 int
19132 main (void)
19133 {
19134
19135 /* The GNU C library defines stubs for functions which it implements
19136     to always fail with ENOSYS.  Some functions are actually named
19137     something starting with __ and the normal name is an alias.  */
19138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19139 #error found stub for $ac_func
19140 #endif
19141
19142         return $ac_func ();
19143   ;
19144   return 0;
19145 }
19146 _ACEOF
19147 rm -f conftest.$ac_objext conftest$ac_exeext
19148 if { (eval echo "$as_me:19148: \"$ac_link\"") >&5
19149   (eval $ac_link) 2>&5
19150   ac_status=$?
19151   echo "$as_me:19151: \$? = $ac_status" >&5
19152   (exit $ac_status); } &&
19153          { ac_try='test -s conftest$ac_exeext'
19154   { (eval echo "$as_me:19154: \"$ac_try\"") >&5
19155   (eval $ac_try) 2>&5
19156   ac_status=$?
19157   echo "$as_me:19157: \$? = $ac_status" >&5
19158   (exit $ac_status); }; }; then
19159   eval "$as_ac_var=yes"
19160 else
19161   echo "$as_me: failed program was:" >&5
19162 cat conftest.$ac_ext >&5
19163 eval "$as_ac_var=no"
19164 fi
19165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19166 fi
19167 echo "$as_me:19167: result: `eval echo '${'$as_ac_var'}'`" >&5
19168 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19169 if test `eval echo '${'$as_ac_var'}'` = yes; then
19170   cat >>confdefs.h <<EOF
19171 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19172 EOF
19173
19174 fi
19175 done
19176
19177 echo "$as_me:19177: checking if getenv returns consistent values" >&5
19178 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19179 if test "${cf_cv_consistent_getenv+set}" = set; then
19180   echo $ECHO_N "(cached) $ECHO_C" >&6
19181 else
19182
19183 if test "$cross_compiling" = yes; then
19184   cf_cv_consistent_getenv=unknown
19185 else
19186   cat >conftest.$ac_ext <<_ACEOF
19187 #line 19187 "configure"
19188 #include "confdefs.h"
19189
19190 #include <stdlib.h>
19191 #include <unistd.h>
19192 #include <stdio.h>
19193 #include <string.h>
19194 #include <sys/types.h>
19195
19196 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19197 extern char **environ;  /* POSIX, but some systems are not... */
19198 #endif
19199
19200 #if defined(HAVE_STRDUP)
19201 #define str_alloc(s) strdup(s)
19202 #else
19203 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19204 #endif
19205
19206 static void set_value(const char *name, const char *value)
19207 {
19208 #if defined(HAVE_SETENV)
19209         setenv(name, value, 1);
19210 #elif defined(HAVE_PUTENV)
19211         char buffer[1024];
19212         sprintf(buffer, "%s=%s", name, value);
19213         putenv(str_alloc(buffer));
19214 #else
19215 #error neither putenv/setenv found
19216 #endif
19217 }
19218 int main(void)
19219 {
19220         int pass;
19221         size_t numenv, limit, j;
19222         char **mynames;
19223         char **myvalues;
19224         char **mypointer;
19225         char *equals;
19226         for (numenv = 0; environ[numenv]; ++numenv) ;
19227         limit = numenv + 10;
19228         mynames = (char **) calloc(limit + 1, sizeof(char *));
19229         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19230         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19231 #if defined(HAVE_ENVIRON)
19232         for (j = 0; environ[j]; ++j) {
19233                 mynames[j] = str_alloc(environ[j]);
19234                 equals = strchr(mynames[j], '=');
19235                 if (equals != 0) {
19236                         *equals++ = '\0';
19237                         myvalues[j] = str_alloc(equals);
19238                 } else {
19239                         myvalues[j] = str_alloc("");
19240                 }
19241         }
19242 #endif
19243         for (j = numenv; j < limit; ++j) {
19244                 char name[80];
19245                 char value[80];
19246                 size_t found;
19247                 size_t k = 0;
19248                 do {
19249                         size_t jk;
19250                         found = 0;
19251                         sprintf(name, "TERM%lu", (unsigned long) k);
19252                         for (jk = 0; jk < j; ++jk) {
19253                                 if (!strcmp(name, mynames[jk])) {
19254                                         found = 1;
19255                                         ++k;
19256                                         break;
19257                                 }
19258                         }
19259                 } while (found);
19260                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19261                 set_value(name, value);
19262                 mynames[j] = str_alloc(name);
19263                 myvalues[j] = str_alloc(value);
19264         }
19265         for (pass = 0; pass < 3; ++pass) {
19266                 for (j = 0; j < limit; ++j) {
19267                         char *value = getenv(mynames[j]);
19268                         if (pass) {
19269                                 if (value == 0) {
19270                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19271                                         ${cf_cv_main_return:-return}(1);
19272                                 } else if (value != mypointer[j]) {
19273                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19274                                         ${cf_cv_main_return:-return}(1);
19275                                 } else if (strcmp(value, myvalues[j])) {
19276                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19277                                         ${cf_cv_main_return:-return}(1);
19278                                 }
19279                         } else {
19280                                 size_t k;
19281                                 mypointer[j] = value;
19282                                 for (k = 0; k < j; ++k) {
19283                                         if (mypointer[j] == mypointer[k]) {
19284                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19285                                                 ${cf_cv_main_return:-return}(1);
19286                                         }
19287                                 }
19288                         }
19289                 }
19290         }
19291         ${cf_cv_main_return:-return}(0);
19292 }
19293
19294 _ACEOF
19295 rm -f conftest$ac_exeext
19296 if { (eval echo "$as_me:19296: \"$ac_link\"") >&5
19297   (eval $ac_link) 2>&5
19298   ac_status=$?
19299   echo "$as_me:19299: \$? = $ac_status" >&5
19300   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19301   { (eval echo "$as_me:19301: \"$ac_try\"") >&5
19302   (eval $ac_try) 2>&5
19303   ac_status=$?
19304   echo "$as_me:19304: \$? = $ac_status" >&5
19305   (exit $ac_status); }; }; then
19306   cf_cv_consistent_getenv=yes
19307 else
19308   echo "$as_me: program exited with status $ac_status" >&5
19309 echo "$as_me: failed program was:" >&5
19310 cat conftest.$ac_ext >&5
19311 cf_cv_consistent_getenv=no
19312 fi
19313 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19314 fi
19315
19316 fi
19317 echo "$as_me:19317: result: $cf_cv_consistent_getenv" >&5
19318 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19319
19320 if test "x$cf_cv_consistent_getenv" = xno
19321 then
19322
19323 cat >>confdefs.h <<\EOF
19324 #define HAVE_CONSISTENT_GETENV 1
19325 EOF
19326
19327 fi
19328
19329 if test "x$cf_cv_consistent_getenv" = xno && \
19330         test "x$cf_with_trace" = xyes
19331 then
19332         { echo "$as_me:19332: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19333 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19334 fi
19335
19336 echo "$as_me:19336: checking if sys/time.h works with sys/select.h" >&5
19337 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19338 if test "${cf_cv_sys_time_select+set}" = set; then
19339   echo $ECHO_N "(cached) $ECHO_C" >&6
19340 else
19341
19342 cat >conftest.$ac_ext <<_ACEOF
19343 #line 19343 "configure"
19344 #include "confdefs.h"
19345
19346 #include <sys/types.h>
19347 #ifdef HAVE_SYS_TIME_H
19348 #include <sys/time.h>
19349 #endif
19350 #ifdef HAVE_SYS_SELECT_H
19351 #include <sys/select.h>
19352 #endif
19353
19354 int
19355 main (void)
19356 {
19357
19358   ;
19359   return 0;
19360 }
19361 _ACEOF
19362 rm -f conftest.$ac_objext
19363 if { (eval echo "$as_me:19363: \"$ac_compile\"") >&5
19364   (eval $ac_compile) 2>&5
19365   ac_status=$?
19366   echo "$as_me:19366: \$? = $ac_status" >&5
19367   (exit $ac_status); } &&
19368          { ac_try='test -s conftest.$ac_objext'
19369   { (eval echo "$as_me:19369: \"$ac_try\"") >&5
19370   (eval $ac_try) 2>&5
19371   ac_status=$?
19372   echo "$as_me:19372: \$? = $ac_status" >&5
19373   (exit $ac_status); }; }; then
19374   cf_cv_sys_time_select=yes
19375 else
19376   echo "$as_me: failed program was:" >&5
19377 cat conftest.$ac_ext >&5
19378 cf_cv_sys_time_select=no
19379 fi
19380 rm -f conftest.$ac_objext conftest.$ac_ext
19381
19382 fi
19383
19384 echo "$as_me:19384: result: $cf_cv_sys_time_select" >&5
19385 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19386 test "$cf_cv_sys_time_select" = yes &&
19387 cat >>confdefs.h <<\EOF
19388 #define HAVE_SYS_TIME_SELECT 1
19389 EOF
19390
19391 ###     checks for compiler characteristics
19392 ac_ext=c
19393 ac_cpp='$CPP $CPPFLAGS'
19394 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19395 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19396 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19397 ac_main_return=return
19398
19399 echo "$as_me:19399: checking for an ANSI C-conforming const" >&5
19400 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19401 if test "${ac_cv_c_const+set}" = set; then
19402   echo $ECHO_N "(cached) $ECHO_C" >&6
19403 else
19404   cat >conftest.$ac_ext <<_ACEOF
19405 #line 19405 "configure"
19406 #include "confdefs.h"
19407
19408 int
19409 main (void)
19410 {
19411 /* FIXME: Include the comments suggested by Paul. */
19412 #ifndef __cplusplus
19413   /* Ultrix mips cc rejects this.  */
19414   typedef int charset[2];
19415   const charset x;
19416   /* SunOS 4.1.1 cc rejects this.  */
19417   char const *const *ccp;
19418   char **p;
19419   /* NEC SVR4.0.2 mips cc rejects this.  */
19420   struct point {int x, y;};
19421   static struct point const zero = {0,0};
19422   /* AIX XL C 1.02.0.0 rejects this.
19423      It does not let you subtract one const X* pointer from another in
19424      an arm of an if-expression whose if-part is not a constant
19425      expression */
19426   const char *g = "string";
19427   ccp = &g + (g ? g-g : 0);
19428   /* HPUX 7.0 cc rejects these. */
19429   ++ccp;
19430   p = (char**) ccp;
19431   ccp = (char const *const *) p;
19432   { /* SCO 3.2v4 cc rejects this.  */
19433     char *t;
19434     char const *s = 0 ? (char *) 0 : (char const *) 0;
19435
19436     *t++ = 0;
19437   }
19438   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19439     int x[] = {25, 17};
19440     const int *foo = &x[0];
19441     ++foo;
19442   }
19443   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19444     typedef const int *iptr;
19445     iptr p = 0;
19446     ++p;
19447   }
19448   { /* AIX XL C 1.02.0.0 rejects this saying
19449        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19450     struct s { int j; const int *ap[3]; };
19451     struct s *b; b->j = 5;
19452   }
19453   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19454     const int foo = 10;
19455   }
19456 #endif
19457
19458   ;
19459   return 0;
19460 }
19461 _ACEOF
19462 rm -f conftest.$ac_objext
19463 if { (eval echo "$as_me:19463: \"$ac_compile\"") >&5
19464   (eval $ac_compile) 2>&5
19465   ac_status=$?
19466   echo "$as_me:19466: \$? = $ac_status" >&5
19467   (exit $ac_status); } &&
19468          { ac_try='test -s conftest.$ac_objext'
19469   { (eval echo "$as_me:19469: \"$ac_try\"") >&5
19470   (eval $ac_try) 2>&5
19471   ac_status=$?
19472   echo "$as_me:19472: \$? = $ac_status" >&5
19473   (exit $ac_status); }; }; then
19474   ac_cv_c_const=yes
19475 else
19476   echo "$as_me: failed program was:" >&5
19477 cat conftest.$ac_ext >&5
19478 ac_cv_c_const=no
19479 fi
19480 rm -f conftest.$ac_objext conftest.$ac_ext
19481 fi
19482 echo "$as_me:19482: result: $ac_cv_c_const" >&5
19483 echo "${ECHO_T}$ac_cv_c_const" >&6
19484 if test $ac_cv_c_const = no; then
19485
19486 cat >>confdefs.h <<\EOF
19487 #define const
19488 EOF
19489
19490 fi
19491
19492 echo "$as_me:19492: checking for inline" >&5
19493 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19494 if test "${ac_cv_c_inline+set}" = set; then
19495   echo $ECHO_N "(cached) $ECHO_C" >&6
19496 else
19497   ac_cv_c_inline=no
19498 for ac_kw in inline __inline__ __inline; do
19499   cat >conftest.$ac_ext <<_ACEOF
19500 #line 19500 "configure"
19501 #include "confdefs.h"
19502 #ifndef __cplusplus
19503 static $ac_kw int static_foo () {return 0; }
19504 $ac_kw int foo () {return 0; }
19505 #endif
19506
19507 _ACEOF
19508 rm -f conftest.$ac_objext
19509 if { (eval echo "$as_me:19509: \"$ac_compile\"") >&5
19510   (eval $ac_compile) 2>&5
19511   ac_status=$?
19512   echo "$as_me:19512: \$? = $ac_status" >&5
19513   (exit $ac_status); } &&
19514          { ac_try='test -s conftest.$ac_objext'
19515   { (eval echo "$as_me:19515: \"$ac_try\"") >&5
19516   (eval $ac_try) 2>&5
19517   ac_status=$?
19518   echo "$as_me:19518: \$? = $ac_status" >&5
19519   (exit $ac_status); }; }; then
19520   ac_cv_c_inline=$ac_kw; break
19521 else
19522   echo "$as_me: failed program was:" >&5
19523 cat conftest.$ac_ext >&5
19524 fi
19525 rm -f conftest.$ac_objext conftest.$ac_ext
19526 done
19527
19528 fi
19529 echo "$as_me:19529: result: $ac_cv_c_inline" >&5
19530 echo "${ECHO_T}$ac_cv_c_inline" >&6
19531 case $ac_cv_c_inline in
19532   inline | yes) ;;
19533   no)
19534 cat >>confdefs.h <<\EOF
19535 #define inline
19536 EOF
19537  ;;
19538   *)  cat >>confdefs.h <<EOF
19539 #define inline $ac_cv_c_inline
19540 EOF
19541  ;;
19542 esac
19543
19544 NCURSES_INLINE=
19545 if test "$ac_cv_c_inline" != no ; then
19546         NCURSES_INLINE=inline
19547         if test "$INTEL_COMPILER" = yes
19548         then
19549                 :
19550         elif test "$CLANG_COMPILER" = yes
19551         then
19552                 :
19553         elif test "$GCC" = yes
19554         then
19555                 echo "$as_me:19555: checking if $CC supports options to tune inlining" >&5
19556 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19557 if test "${cf_cv_gcc_inline+set}" = set; then
19558   echo $ECHO_N "(cached) $ECHO_C" >&6
19559 else
19560
19561                 cf_save_CFLAGS=$CFLAGS
19562                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19563                 cat >conftest.$ac_ext <<_ACEOF
19564 #line 19564 "configure"
19565 #include "confdefs.h"
19566 inline int foo(void) { return 1; }
19567 int
19568 main (void)
19569 {
19570 ${cf_cv_main_return:-return} foo()
19571   ;
19572   return 0;
19573 }
19574 _ACEOF
19575 rm -f conftest.$ac_objext
19576 if { (eval echo "$as_me:19576: \"$ac_compile\"") >&5
19577   (eval $ac_compile) 2>&5
19578   ac_status=$?
19579   echo "$as_me:19579: \$? = $ac_status" >&5
19580   (exit $ac_status); } &&
19581          { ac_try='test -s conftest.$ac_objext'
19582   { (eval echo "$as_me:19582: \"$ac_try\"") >&5
19583   (eval $ac_try) 2>&5
19584   ac_status=$?
19585   echo "$as_me:19585: \$? = $ac_status" >&5
19586   (exit $ac_status); }; }; then
19587   cf_cv_gcc_inline=yes
19588 else
19589   echo "$as_me: failed program was:" >&5
19590 cat conftest.$ac_ext >&5
19591 cf_cv_gcc_inline=no
19592 fi
19593 rm -f conftest.$ac_objext conftest.$ac_ext
19594                 CFLAGS=$cf_save_CFLAGS
19595
19596 fi
19597 echo "$as_me:19597: result: $cf_cv_gcc_inline" >&5
19598 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19599                 if test "$cf_cv_gcc_inline" = yes ; then
19600
19601 cf_fix_cppflags=no
19602 cf_new_cflags=
19603 cf_new_cppflags=
19604 cf_new_extra_cppflags=
19605
19606 for cf_add_cflags in --param max-inline-insns-single=1200
19607 do
19608 case $cf_fix_cppflags in
19609 (no)
19610         case $cf_add_cflags in
19611         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19612                 case $cf_add_cflags in
19613                 (-D*)
19614                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19615
19616                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19617                                 && test -z "${cf_tst_cflags}" \
19618                                 && cf_fix_cppflags=yes
19619
19620                         if test $cf_fix_cppflags = yes ; then
19621
19622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19624
19625                                 continue
19626                         elif test "${cf_tst_cflags}" = "\"'" ; then
19627
19628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19630
19631                                 continue
19632                         fi
19633                         ;;
19634                 esac
19635                 case "$CPPFLAGS" in
19636                 (*$cf_add_cflags)
19637                         ;;
19638                 (*)
19639                         case $cf_add_cflags in
19640                         (-D*)
19641                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19642
19643 CPPFLAGS=`echo "$CPPFLAGS" | \
19644         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19645                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19646
19647                                 ;;
19648                         esac
19649
19650         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19651         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19652
19653                         ;;
19654                 esac
19655                 ;;
19656         (*)
19657
19658         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19659         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19660
19661                 ;;
19662         esac
19663         ;;
19664 (yes)
19665
19666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19668
19669         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19670
19671         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19672                 && test -z "${cf_tst_cflags}" \
19673                 && cf_fix_cppflags=no
19674         ;;
19675 esac
19676 done
19677
19678 if test -n "$cf_new_cflags" ; then
19679
19680         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19681         CFLAGS="${CFLAGS}$cf_new_cflags"
19682
19683 fi
19684
19685 if test -n "$cf_new_cppflags" ; then
19686
19687         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19688         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19689
19690 fi
19691
19692 if test -n "$cf_new_extra_cppflags" ; then
19693
19694         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19695         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19696
19697 fi
19698
19699                 fi
19700         fi
19701 fi
19702
19703 echo "$as_me:19703: checking for signal global datatype" >&5
19704 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19705 if test "${cf_cv_sig_atomic_t+set}" = set; then
19706   echo $ECHO_N "(cached) $ECHO_C" >&6
19707 else
19708
19709         for cf_type in \
19710                 "volatile sig_atomic_t" \
19711                 "sig_atomic_t" \
19712                 "int"
19713         do
19714         cat >conftest.$ac_ext <<_ACEOF
19715 #line 19715 "configure"
19716 #include "confdefs.h"
19717
19718 #include <sys/types.h>
19719 #include <signal.h>
19720 #include <stdio.h>
19721
19722 extern $cf_type x;
19723 $cf_type x;
19724 static void handler(int sig)
19725 {
19726         (void)sig;
19727         x = 5;
19728 }
19729 int
19730 main (void)
19731 {
19732 signal(SIGINT, handler);
19733                  x = 1
19734   ;
19735   return 0;
19736 }
19737 _ACEOF
19738 rm -f conftest.$ac_objext
19739 if { (eval echo "$as_me:19739: \"$ac_compile\"") >&5
19740   (eval $ac_compile) 2>&5
19741   ac_status=$?
19742   echo "$as_me:19742: \$? = $ac_status" >&5
19743   (exit $ac_status); } &&
19744          { ac_try='test -s conftest.$ac_objext'
19745   { (eval echo "$as_me:19745: \"$ac_try\"") >&5
19746   (eval $ac_try) 2>&5
19747   ac_status=$?
19748   echo "$as_me:19748: \$? = $ac_status" >&5
19749   (exit $ac_status); }; }; then
19750   cf_cv_sig_atomic_t=$cf_type
19751 else
19752   echo "$as_me: failed program was:" >&5
19753 cat conftest.$ac_ext >&5
19754 cf_cv_sig_atomic_t=no
19755 fi
19756 rm -f conftest.$ac_objext conftest.$ac_ext
19757                 test "$cf_cv_sig_atomic_t" != no && break
19758         done
19759
19760 fi
19761
19762 echo "$as_me:19762: result: $cf_cv_sig_atomic_t" >&5
19763 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19764 test "$cf_cv_sig_atomic_t" != no &&
19765 cat >>confdefs.h <<EOF
19766 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19767 EOF
19768
19769 if test $NCURSES_CHTYPE = auto ; then
19770
19771 echo "$as_me:19771: checking for type of chtype" >&5
19772 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19773 if test "${cf_cv_typeof_chtype+set}" = set; then
19774   echo $ECHO_N "(cached) $ECHO_C" >&6
19775 else
19776
19777                 if test "$cross_compiling" = yes; then
19778   cf_cv_typeof_chtype=long
19779 else
19780   cat >conftest.$ac_ext <<_ACEOF
19781 #line 19781 "configure"
19782 #include "confdefs.h"
19783
19784 #define WANT_BITS 31
19785 #include <stdio.h>
19786 int main(void)
19787 {
19788         FILE *fp = fopen("cf_test.out", "w");
19789         if (fp != 0) {
19790                 char *result = "long";
19791                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19792                         int n;
19793                         unsigned int x, y;
19794                         for (n = 0; n < WANT_BITS; n++) {
19795                                 x = (1 << n);
19796                                 y = (x >> n);
19797                                 if (y != 1 || x == 0) {
19798                                         x = 0;
19799                                         break;
19800                                 }
19801                         }
19802                         /*
19803                          * If x is nonzero, an int is big enough for the bits
19804                          * that we want.
19805                          */
19806                         result = (x != 0) ? "int" : "long";
19807                 }
19808                 fputs(result, fp);
19809                 fclose(fp);
19810         }
19811         ${cf_cv_main_return:-return}(0);
19812 }
19813
19814 _ACEOF
19815 rm -f conftest$ac_exeext
19816 if { (eval echo "$as_me:19816: \"$ac_link\"") >&5
19817   (eval $ac_link) 2>&5
19818   ac_status=$?
19819   echo "$as_me:19819: \$? = $ac_status" >&5
19820   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19821   { (eval echo "$as_me:19821: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); }; }; then
19826   cf_cv_typeof_chtype=`cat cf_test.out`
19827 else
19828   echo "$as_me: program exited with status $ac_status" >&5
19829 echo "$as_me: failed program was:" >&5
19830 cat conftest.$ac_ext >&5
19831 cf_cv_typeof_chtype=long
19832 fi
19833 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19834 fi
19835                 rm -f cf_test.out
19836
19837 fi
19838
19839 echo "$as_me:19839: result: $cf_cv_typeof_chtype" >&5
19840 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19841
19842 cat >>confdefs.h <<EOF
19843 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19844 EOF
19845
19846 else
19847         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19848 fi
19849 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19850
19851 echo "$as_me:19851: checking if unsigned literals are legal" >&5
19852 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19853 if test "${cf_cv_unsigned_literals+set}" = set; then
19854   echo $ECHO_N "(cached) $ECHO_C" >&6
19855 else
19856
19857         cat >conftest.$ac_ext <<_ACEOF
19858 #line 19858 "configure"
19859 #include "confdefs.h"
19860
19861 int
19862 main (void)
19863 {
19864 long x = 1L + 1UL + 1U + 1
19865   ;
19866   return 0;
19867 }
19868 _ACEOF
19869 rm -f conftest.$ac_objext
19870 if { (eval echo "$as_me:19870: \"$ac_compile\"") >&5
19871   (eval $ac_compile) 2>&5
19872   ac_status=$?
19873   echo "$as_me:19873: \$? = $ac_status" >&5
19874   (exit $ac_status); } &&
19875          { ac_try='test -s conftest.$ac_objext'
19876   { (eval echo "$as_me:19876: \"$ac_try\"") >&5
19877   (eval $ac_try) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit $ac_status); }; }; then
19881   cf_cv_unsigned_literals=yes
19882 else
19883   echo "$as_me: failed program was:" >&5
19884 cat conftest.$ac_ext >&5
19885 cf_cv_unsigned_literals=no
19886 fi
19887 rm -f conftest.$ac_objext conftest.$ac_ext
19888
19889 fi
19890
19891 echo "$as_me:19891: result: $cf_cv_unsigned_literals" >&5
19892 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19893
19894 cf_cv_1UL="1"
19895 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19896 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19897
19898 if test $NCURSES_MMASK_T = auto ; then
19899         cf_cv_typeof_mmask_t=long
19900 else
19901         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19902 fi
19903 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19904
19905 ###     Checks for external-data
19906
19907 echo "$as_me:19907: checking if external errno is declared" >&5
19908 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19909 if test "${cf_cv_dcl_errno+set}" = set; then
19910   echo $ECHO_N "(cached) $ECHO_C" >&6
19911 else
19912
19913         cat >conftest.$ac_ext <<_ACEOF
19914 #line 19914 "configure"
19915 #include "confdefs.h"
19916
19917 #ifdef HAVE_STDLIB_H
19918 #include <stdlib.h>
19919 #endif
19920 #include <stdio.h>
19921 #include <sys/types.h>
19922 #include <errno.h>
19923 int
19924 main (void)
19925 {
19926 int x = (int) errno; (void)x
19927   ;
19928   return 0;
19929 }
19930 _ACEOF
19931 rm -f conftest.$ac_objext
19932 if { (eval echo "$as_me:19932: \"$ac_compile\"") >&5
19933   (eval $ac_compile) 2>&5
19934   ac_status=$?
19935   echo "$as_me:19935: \$? = $ac_status" >&5
19936   (exit $ac_status); } &&
19937          { ac_try='test -s conftest.$ac_objext'
19938   { (eval echo "$as_me:19938: \"$ac_try\"") >&5
19939   (eval $ac_try) 2>&5
19940   ac_status=$?
19941   echo "$as_me:19941: \$? = $ac_status" >&5
19942   (exit $ac_status); }; }; then
19943   cf_cv_dcl_errno=yes
19944 else
19945   echo "$as_me: failed program was:" >&5
19946 cat conftest.$ac_ext >&5
19947 cf_cv_dcl_errno=no
19948 fi
19949 rm -f conftest.$ac_objext conftest.$ac_ext
19950
19951 fi
19952 echo "$as_me:19952: result: $cf_cv_dcl_errno" >&5
19953 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19954
19955 if test "$cf_cv_dcl_errno" = no ; then
19956
19957 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19958
19959         cat >>confdefs.h <<EOF
19960 #define $cf_result 1
19961 EOF
19962
19963 fi
19964
19965 # It's possible (for near-UNIX clones) that the data doesn't exist
19966
19967 echo "$as_me:19967: checking if external errno exists" >&5
19968 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19969 if test "${cf_cv_have_errno+set}" = set; then
19970   echo $ECHO_N "(cached) $ECHO_C" >&6
19971 else
19972
19973         cat >conftest.$ac_ext <<_ACEOF
19974 #line 19974 "configure"
19975 #include "confdefs.h"
19976
19977 #undef errno
19978 extern int errno;
19979
19980 int
19981 main (void)
19982 {
19983 errno = 2
19984   ;
19985   return 0;
19986 }
19987 _ACEOF
19988 rm -f conftest.$ac_objext conftest$ac_exeext
19989 if { (eval echo "$as_me:19989: \"$ac_link\"") >&5
19990   (eval $ac_link) 2>&5
19991   ac_status=$?
19992   echo "$as_me:19992: \$? = $ac_status" >&5
19993   (exit $ac_status); } &&
19994          { ac_try='test -s conftest$ac_exeext'
19995   { (eval echo "$as_me:19995: \"$ac_try\"") >&5
19996   (eval $ac_try) 2>&5
19997   ac_status=$?
19998   echo "$as_me:19998: \$? = $ac_status" >&5
19999   (exit $ac_status); }; }; then
20000   cf_cv_have_errno=yes
20001 else
20002   echo "$as_me: failed program was:" >&5
20003 cat conftest.$ac_ext >&5
20004 cf_cv_have_errno=no
20005 fi
20006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20007
20008 fi
20009 echo "$as_me:20009: result: $cf_cv_have_errno" >&5
20010 echo "${ECHO_T}$cf_cv_have_errno" >&6
20011
20012 if test "$cf_cv_have_errno" = yes ; then
20013
20014 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20015
20016         cat >>confdefs.h <<EOF
20017 #define $cf_result 1
20018 EOF
20019
20020 fi
20021
20022 echo "$as_me:20022: checking if data-only library module links" >&5
20023 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20024 if test "${cf_cv_link_dataonly+set}" = set; then
20025   echo $ECHO_N "(cached) $ECHO_C" >&6
20026 else
20027
20028         rm -f conftest.a
20029         cat >conftest.$ac_ext <<EOF
20030 #line 20030 "configure"
20031 int     testdata[3] = { 123, 456, 789 };
20032 EOF
20033         if { (eval echo "$as_me:20033: \"$ac_compile\"") >&5
20034   (eval $ac_compile) 2>&5
20035   ac_status=$?
20036   echo "$as_me:20036: \$? = $ac_status" >&5
20037   (exit $ac_status); } ; then
20038                 mv conftest.o data.o && \
20039                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20040         fi
20041         rm -f conftest.$ac_ext data.o
20042         cat >conftest.$ac_ext <<EOF
20043 #line 20043 "configure"
20044 int     testfunc(void)
20045 {
20046 #if defined(NeXT)
20047         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20048 #else
20049         extern int testdata[3];
20050         return testdata[0] == 123
20051            &&  testdata[1] == 456
20052            &&  testdata[2] == 789;
20053 #endif
20054 }
20055 EOF
20056         if { (eval echo "$as_me:20056: \"$ac_compile\"") >&5
20057   (eval $ac_compile) 2>&5
20058   ac_status=$?
20059   echo "$as_me:20059: \$? = $ac_status" >&5
20060   (exit $ac_status); }; then
20061                 mv conftest.o func.o && \
20062                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20063         fi
20064         rm -f conftest.$ac_ext func.o
20065         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20066         cf_saveLIBS="$LIBS"
20067         LIBS="conftest.a $LIBS"
20068         if test "$cross_compiling" = yes; then
20069   cf_cv_link_dataonly=unknown
20070 else
20071   cat >conftest.$ac_ext <<_ACEOF
20072 #line 20072 "configure"
20073 #include "confdefs.h"
20074
20075         int main(void)
20076         {
20077                 extern int testfunc();
20078                 ${cf_cv_main_return:-return} (!testfunc());
20079         }
20080
20081 _ACEOF
20082 rm -f conftest$ac_exeext
20083 if { (eval echo "$as_me:20083: \"$ac_link\"") >&5
20084   (eval $ac_link) 2>&5
20085   ac_status=$?
20086   echo "$as_me:20086: \$? = $ac_status" >&5
20087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20088   { (eval echo "$as_me:20088: \"$ac_try\"") >&5
20089   (eval $ac_try) 2>&5
20090   ac_status=$?
20091   echo "$as_me:20091: \$? = $ac_status" >&5
20092   (exit $ac_status); }; }; then
20093   cf_cv_link_dataonly=yes
20094 else
20095   echo "$as_me: program exited with status $ac_status" >&5
20096 echo "$as_me: failed program was:" >&5
20097 cat conftest.$ac_ext >&5
20098 cf_cv_link_dataonly=no
20099 fi
20100 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20101 fi
20102         LIBS="$cf_saveLIBS"
20103
20104 fi
20105
20106 echo "$as_me:20106: result: $cf_cv_link_dataonly" >&5
20107 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20108
20109 if test "$cf_cv_link_dataonly" = no ; then
20110
20111 cat >>confdefs.h <<\EOF
20112 #define BROKEN_LINKER 1
20113 EOF
20114
20115         BROKEN_LINKER=1
20116 fi
20117
20118 ###     Checks for library functions.
20119
20120 for ac_func in \
20121 getcwd \
20122 getegid \
20123 geteuid \
20124 getopt \
20125 getttynam \
20126 issetugid \
20127 localeconv \
20128 poll \
20129 putenv \
20130 remove \
20131 select \
20132 setbuf \
20133 setbuffer \
20134 setenv \
20135 setvbuf \
20136 sigaction \
20137 sigvec \
20138 snprintf \
20139 strdup \
20140 strstr \
20141 sysconf \
20142 tcgetpgrp \
20143 times \
20144 tsearch \
20145 vsnprintf \
20146
20147 do
20148 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20149 echo "$as_me:20149: checking for $ac_func" >&5
20150 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20151 if eval "test \"\${$as_ac_var+set}\" = set"; then
20152   echo $ECHO_N "(cached) $ECHO_C" >&6
20153 else
20154   cat >conftest.$ac_ext <<_ACEOF
20155 #line 20155 "configure"
20156 #include "confdefs.h"
20157 #define $ac_func autoconf_temporary
20158 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20159 #undef $ac_func
20160
20161 #ifdef __cplusplus
20162 extern "C"
20163 #endif
20164
20165 /* We use char because int might match the return type of a gcc2
20166    builtin and then its argument prototype would still apply.  */
20167 char $ac_func (void);
20168
20169 int
20170 main (void)
20171 {
20172
20173 /* The GNU C library defines stubs for functions which it implements
20174     to always fail with ENOSYS.  Some functions are actually named
20175     something starting with __ and the normal name is an alias.  */
20176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20177 #error found stub for $ac_func
20178 #endif
20179
20180         return $ac_func ();
20181   ;
20182   return 0;
20183 }
20184 _ACEOF
20185 rm -f conftest.$ac_objext conftest$ac_exeext
20186 if { (eval echo "$as_me:20186: \"$ac_link\"") >&5
20187   (eval $ac_link) 2>&5
20188   ac_status=$?
20189   echo "$as_me:20189: \$? = $ac_status" >&5
20190   (exit $ac_status); } &&
20191          { ac_try='test -s conftest$ac_exeext'
20192   { (eval echo "$as_me:20192: \"$ac_try\"") >&5
20193   (eval $ac_try) 2>&5
20194   ac_status=$?
20195   echo "$as_me:20195: \$? = $ac_status" >&5
20196   (exit $ac_status); }; }; then
20197   eval "$as_ac_var=yes"
20198 else
20199   echo "$as_me: failed program was:" >&5
20200 cat conftest.$ac_ext >&5
20201 eval "$as_ac_var=no"
20202 fi
20203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20204 fi
20205 echo "$as_me:20205: result: `eval echo '${'$as_ac_var'}'`" >&5
20206 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20207 if test `eval echo '${'$as_ac_var'}'` = yes; then
20208   cat >>confdefs.h <<EOF
20209 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20210 EOF
20211
20212 fi
20213 done
20214
20215 if test "x$ac_cv_func_getopt" = xno && \
20216    test "x$cf_with_progs$cf_with_tests" != xnono; then
20217         { { echo "$as_me:20217: error: getopt is required for building programs" >&5
20218 echo "$as_me: error: getopt is required for building programs" >&2;}
20219    { (exit 1); exit 1; }; }
20220 fi
20221
20222 if test "x$with_safe_sprintf" = xyes
20223 then
20224         if test "x$ac_cv_func_vsnprintf" = xyes
20225         then
20226                 { echo "$as_me:20226: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20227 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20228         else
20229
20230 cat >>confdefs.h <<\EOF
20231 #define USE_SAFE_SPRINTF 1
20232 EOF
20233
20234         fi
20235 fi
20236
20237 if test "x$with_getcap" = "xyes" ; then
20238
20239 echo "$as_me:20239: checking for terminal-capability database functions" >&5
20240 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20241 if test "${cf_cv_cgetent+set}" = set; then
20242   echo $ECHO_N "(cached) $ECHO_C" >&6
20243 else
20244
20245 cat >conftest.$ac_ext <<_ACEOF
20246 #line 20246 "configure"
20247 #include "confdefs.h"
20248
20249 #include <stdlib.h>
20250 int
20251 main (void)
20252 {
20253
20254         char temp[128];
20255         char *buf = temp;
20256         char *db_array = temp;
20257         cgetent(&buf, &db_array, "vt100");
20258         cgetcap(buf, "tc", '=');
20259         cgetmatch(buf, "tc");
20260
20261   ;
20262   return 0;
20263 }
20264 _ACEOF
20265 rm -f conftest.$ac_objext conftest$ac_exeext
20266 if { (eval echo "$as_me:20266: \"$ac_link\"") >&5
20267   (eval $ac_link) 2>&5
20268   ac_status=$?
20269   echo "$as_me:20269: \$? = $ac_status" >&5
20270   (exit $ac_status); } &&
20271          { ac_try='test -s 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_cgetent=yes
20278 else
20279   echo "$as_me: failed program was:" >&5
20280 cat conftest.$ac_ext >&5
20281 cf_cv_cgetent=no
20282 fi
20283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20284
20285 fi
20286 echo "$as_me:20286: result: $cf_cv_cgetent" >&5
20287 echo "${ECHO_T}$cf_cv_cgetent" >&6
20288
20289 if test "$cf_cv_cgetent" = yes
20290 then
20291
20292 cat >>confdefs.h <<\EOF
20293 #define HAVE_BSD_CGETENT 1
20294 EOF
20295
20296 echo "$as_me:20296: checking if cgetent uses const parameter" >&5
20297 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20298 if test "${cf_cv_cgetent_const+set}" = set; then
20299   echo $ECHO_N "(cached) $ECHO_C" >&6
20300 else
20301
20302 cat >conftest.$ac_ext <<_ACEOF
20303 #line 20303 "configure"
20304 #include "confdefs.h"
20305
20306 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20307 #include <stdlib.h>
20308 int
20309 main (void)
20310 {
20311
20312         char temp[128];
20313         char *buf = temp;
20314 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20315         const char *db_array = temp;
20316         cgetent(&buf, &db_array, "vt100");
20317 #endif
20318         cgetcap(buf, "tc", '=');
20319         cgetmatch(buf, "tc");
20320
20321   ;
20322   return 0;
20323 }
20324 _ACEOF
20325 rm -f conftest.$ac_objext conftest$ac_exeext
20326 if { (eval echo "$as_me:20326: \"$ac_link\"") >&5
20327   (eval $ac_link) 2>&5
20328   ac_status=$?
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit $ac_status); } &&
20331          { ac_try='test -s conftest$ac_exeext'
20332   { (eval echo "$as_me:20332: \"$ac_try\"") >&5
20333   (eval $ac_try) 2>&5
20334   ac_status=$?
20335   echo "$as_me:20335: \$? = $ac_status" >&5
20336   (exit $ac_status); }; }; then
20337   cf_cv_cgetent_const=yes
20338 else
20339   echo "$as_me: failed program was:" >&5
20340 cat conftest.$ac_ext >&5
20341 cf_cv_cgetent_const=no
20342 fi
20343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20344
20345 fi
20346 echo "$as_me:20346: result: $cf_cv_cgetent_const" >&5
20347 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20348         if test "$cf_cv_cgetent_const" = yes
20349         then
20350
20351 cat >>confdefs.h <<EOF
20352 #define CGETENT_CONST const
20353 EOF
20354
20355         fi
20356 fi
20357
20358 fi
20359
20360 echo "$as_me:20360: checking for isascii" >&5
20361 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20362 if test "${cf_cv_have_isascii+set}" = set; then
20363   echo $ECHO_N "(cached) $ECHO_C" >&6
20364 else
20365
20366         cat >conftest.$ac_ext <<_ACEOF
20367 #line 20367 "configure"
20368 #include "confdefs.h"
20369 #include <ctype.h>
20370 int
20371 main (void)
20372 {
20373 int x = isascii(' ')
20374   ;
20375   return 0;
20376 }
20377 _ACEOF
20378 rm -f conftest.$ac_objext conftest$ac_exeext
20379 if { (eval echo "$as_me:20379: \"$ac_link\"") >&5
20380   (eval $ac_link) 2>&5
20381   ac_status=$?
20382   echo "$as_me:20382: \$? = $ac_status" >&5
20383   (exit $ac_status); } &&
20384          { ac_try='test -s conftest$ac_exeext'
20385   { (eval echo "$as_me:20385: \"$ac_try\"") >&5
20386   (eval $ac_try) 2>&5
20387   ac_status=$?
20388   echo "$as_me:20388: \$? = $ac_status" >&5
20389   (exit $ac_status); }; }; then
20390   cf_cv_have_isascii=yes
20391 else
20392   echo "$as_me: failed program was:" >&5
20393 cat conftest.$ac_ext >&5
20394 cf_cv_have_isascii=no
20395 fi
20396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20397
20398 fi
20399 echo "$as_me:20399: result: $cf_cv_have_isascii" >&5
20400 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20401 test "$cf_cv_have_isascii" = yes &&
20402 cat >>confdefs.h <<\EOF
20403 #define HAVE_ISASCII 1
20404 EOF
20405
20406 if test "$ac_cv_func_sigaction" = yes; then
20407 echo "$as_me:20407: checking whether sigaction needs _POSIX_SOURCE" >&5
20408 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20409 cat >conftest.$ac_ext <<_ACEOF
20410 #line 20410 "configure"
20411 #include "confdefs.h"
20412
20413 #include <sys/types.h>
20414 #include <signal.h>
20415 int
20416 main (void)
20417 {
20418 struct sigaction act
20419   ;
20420   return 0;
20421 }
20422 _ACEOF
20423 rm -f conftest.$ac_objext
20424 if { (eval echo "$as_me:20424: \"$ac_compile\"") >&5
20425   (eval $ac_compile) 2>&5
20426   ac_status=$?
20427   echo "$as_me:20427: \$? = $ac_status" >&5
20428   (exit $ac_status); } &&
20429          { ac_try='test -s conftest.$ac_objext'
20430   { (eval echo "$as_me:20430: \"$ac_try\"") >&5
20431   (eval $ac_try) 2>&5
20432   ac_status=$?
20433   echo "$as_me:20433: \$? = $ac_status" >&5
20434   (exit $ac_status); }; }; then
20435   sigact_bad=no
20436 else
20437   echo "$as_me: failed program was:" >&5
20438 cat conftest.$ac_ext >&5
20439
20440 cat >conftest.$ac_ext <<_ACEOF
20441 #line 20441 "configure"
20442 #include "confdefs.h"
20443
20444 #define _POSIX_SOURCE
20445 #include <sys/types.h>
20446 #include <signal.h>
20447 int
20448 main (void)
20449 {
20450 struct sigaction act
20451   ;
20452   return 0;
20453 }
20454 _ACEOF
20455 rm -f conftest.$ac_objext
20456 if { (eval echo "$as_me:20456: \"$ac_compile\"") >&5
20457   (eval $ac_compile) 2>&5
20458   ac_status=$?
20459   echo "$as_me:20459: \$? = $ac_status" >&5
20460   (exit $ac_status); } &&
20461          { ac_try='test -s conftest.$ac_objext'
20462   { (eval echo "$as_me:20462: \"$ac_try\"") >&5
20463   (eval $ac_try) 2>&5
20464   ac_status=$?
20465   echo "$as_me:20465: \$? = $ac_status" >&5
20466   (exit $ac_status); }; }; then
20467   sigact_bad=yes
20468
20469 cat >>confdefs.h <<\EOF
20470 #define _POSIX_SOURCE 1
20471 EOF
20472
20473 else
20474   echo "$as_me: failed program was:" >&5
20475 cat conftest.$ac_ext >&5
20476 sigact_bad=unknown
20477 fi
20478 rm -f conftest.$ac_objext conftest.$ac_ext
20479 fi
20480 rm -f conftest.$ac_objext conftest.$ac_ext
20481 echo "$as_me:20481: result: $sigact_bad" >&5
20482 echo "${ECHO_T}$sigact_bad" >&6
20483 fi
20484
20485 echo "$as_me:20485: checking if nanosleep really works" >&5
20486 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20487 if test "${cf_cv_func_nanosleep+set}" = set; then
20488   echo $ECHO_N "(cached) $ECHO_C" >&6
20489 else
20490
20491 if test "$cross_compiling" = yes; then
20492   cf_cv_func_nanosleep=unknown
20493 else
20494   cat >conftest.$ac_ext <<_ACEOF
20495 #line 20495 "configure"
20496 #include "confdefs.h"
20497
20498 #include <stdio.h>
20499 #include <errno.h>
20500 #include <time.h>
20501
20502 #ifdef HAVE_SYS_TIME_H
20503 #include <sys/time.h>
20504 #endif
20505
20506 int main(void) {
20507         struct timespec ts1, ts2;
20508         int code;
20509         ts1.tv_sec  = 0;
20510         ts1.tv_nsec = 750000000;
20511         ts2.tv_sec  = 0;
20512         ts2.tv_nsec = 0;
20513         errno = 0;
20514         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20515         ${cf_cv_main_return:-return}(code != 0);
20516 }
20517
20518 _ACEOF
20519 rm -f conftest$ac_exeext
20520 if { (eval echo "$as_me:20520: \"$ac_link\"") >&5
20521   (eval $ac_link) 2>&5
20522   ac_status=$?
20523   echo "$as_me:20523: \$? = $ac_status" >&5
20524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20525   { (eval echo "$as_me:20525: \"$ac_try\"") >&5
20526   (eval $ac_try) 2>&5
20527   ac_status=$?
20528   echo "$as_me:20528: \$? = $ac_status" >&5
20529   (exit $ac_status); }; }; then
20530   cf_cv_func_nanosleep=yes
20531 else
20532   echo "$as_me: program exited with status $ac_status" >&5
20533 echo "$as_me: failed program was:" >&5
20534 cat conftest.$ac_ext >&5
20535 cf_cv_func_nanosleep=no
20536 fi
20537 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20538 fi
20539 fi
20540 echo "$as_me:20540: result: $cf_cv_func_nanosleep" >&5
20541 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20542
20543 test "$cf_cv_func_nanosleep" = "yes" &&
20544 cat >>confdefs.h <<\EOF
20545 #define HAVE_NANOSLEEP 1
20546 EOF
20547
20548 for ac_header in \
20549 termio.h \
20550 termios.h \
20551 unistd.h \
20552 sys/ioctl.h \
20553 sys/termio.h \
20554
20555 do
20556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20557 echo "$as_me:20557: checking for $ac_header" >&5
20558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20560   echo $ECHO_N "(cached) $ECHO_C" >&6
20561 else
20562   cat >conftest.$ac_ext <<_ACEOF
20563 #line 20563 "configure"
20564 #include "confdefs.h"
20565 #include <$ac_header>
20566 _ACEOF
20567 if { (eval echo "$as_me:20567: \"$ac_cpp conftest.$ac_ext\"") >&5
20568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20569   ac_status=$?
20570   egrep -v '^ *\+' conftest.er1 >conftest.err
20571   rm -f conftest.er1
20572   cat conftest.err >&5
20573   echo "$as_me:20573: \$? = $ac_status" >&5
20574   (exit $ac_status); } >/dev/null; then
20575   if test -s conftest.err; then
20576     ac_cpp_err=$ac_c_preproc_warn_flag
20577   else
20578     ac_cpp_err=
20579   fi
20580 else
20581   ac_cpp_err=yes
20582 fi
20583 if test -z "$ac_cpp_err"; then
20584   eval "$as_ac_Header=yes"
20585 else
20586   echo "$as_me: failed program was:" >&5
20587   cat conftest.$ac_ext >&5
20588   eval "$as_ac_Header=no"
20589 fi
20590 rm -f conftest.err conftest.$ac_ext
20591 fi
20592 echo "$as_me:20592: result: `eval echo '${'$as_ac_Header'}'`" >&5
20593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20595   cat >>confdefs.h <<EOF
20596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20597 EOF
20598
20599 fi
20600 done
20601
20602 if test "$ac_cv_header_termios_h" = yes ; then
20603         case "$CFLAGS $CPPFLAGS" in
20604         (*-D_POSIX_SOURCE*)
20605                 termios_bad=dunno ;;
20606         (*)     termios_bad=maybe ;;
20607         esac
20608         if test "$termios_bad" = maybe ; then
20609         echo "$as_me:20609: checking whether termios.h needs _POSIX_SOURCE" >&5
20610 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20611         cat >conftest.$ac_ext <<_ACEOF
20612 #line 20612 "configure"
20613 #include "confdefs.h"
20614 #include <termios.h>
20615 int
20616 main (void)
20617 {
20618 struct termios foo; int x = foo.c_iflag = 1; (void)x
20619   ;
20620   return 0;
20621 }
20622 _ACEOF
20623 rm -f conftest.$ac_objext
20624 if { (eval echo "$as_me:20624: \"$ac_compile\"") >&5
20625   (eval $ac_compile) 2>&5
20626   ac_status=$?
20627   echo "$as_me:20627: \$? = $ac_status" >&5
20628   (exit $ac_status); } &&
20629          { ac_try='test -s conftest.$ac_objext'
20630   { (eval echo "$as_me:20630: \"$ac_try\"") >&5
20631   (eval $ac_try) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit $ac_status); }; }; then
20635   termios_bad=no
20636 else
20637   echo "$as_me: failed program was:" >&5
20638 cat conftest.$ac_ext >&5
20639
20640                 cat >conftest.$ac_ext <<_ACEOF
20641 #line 20641 "configure"
20642 #include "confdefs.h"
20643
20644 #define _POSIX_SOURCE
20645 #include <termios.h>
20646 int
20647 main (void)
20648 {
20649 struct termios foo; int x = foo.c_iflag = 2; (void)x
20650   ;
20651   return 0;
20652 }
20653 _ACEOF
20654 rm -f conftest.$ac_objext
20655 if { (eval echo "$as_me:20655: \"$ac_compile\"") >&5
20656   (eval $ac_compile) 2>&5
20657   ac_status=$?
20658   echo "$as_me:20658: \$? = $ac_status" >&5
20659   (exit $ac_status); } &&
20660          { ac_try='test -s conftest.$ac_objext'
20661   { (eval echo "$as_me:20661: \"$ac_try\"") >&5
20662   (eval $ac_try) 2>&5
20663   ac_status=$?
20664   echo "$as_me:20664: \$? = $ac_status" >&5
20665   (exit $ac_status); }; }; then
20666   termios_bad=unknown
20667 else
20668   echo "$as_me: failed program was:" >&5
20669 cat conftest.$ac_ext >&5
20670 termios_bad=yes
20671 cat >>confdefs.h <<\EOF
20672 #define _POSIX_SOURCE 1
20673 EOF
20674
20675 fi
20676 rm -f conftest.$ac_objext conftest.$ac_ext
20677
20678 fi
20679 rm -f conftest.$ac_objext conftest.$ac_ext
20680         echo "$as_me:20680: result: $termios_bad" >&5
20681 echo "${ECHO_T}$termios_bad" >&6
20682         fi
20683 fi
20684
20685 echo "$as_me:20685: checking for tcgetattr" >&5
20686 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20687 if test "${cf_cv_have_tcgetattr+set}" = set; then
20688   echo $ECHO_N "(cached) $ECHO_C" >&6
20689 else
20690
20691 cat >conftest.$ac_ext <<_ACEOF
20692 #line 20692 "configure"
20693 #include "confdefs.h"
20694
20695 #include <sys/types.h>
20696 #ifdef HAVE_UNISTD_H
20697 #include <unistd.h>
20698 #endif
20699 #ifdef HAVE_TERMIOS_H
20700 #include <termios.h>
20701 #define TTY struct termios
20702 #else
20703 #ifdef HAVE_TERMIO_H
20704 #include <termio.h>
20705 #define TTY struct termio
20706 #endif
20707 #endif
20708
20709 int
20710 main (void)
20711 {
20712
20713 TTY foo;
20714 tcgetattr(1, &foo);
20715   ;
20716   return 0;
20717 }
20718 _ACEOF
20719 rm -f conftest.$ac_objext conftest$ac_exeext
20720 if { (eval echo "$as_me:20720: \"$ac_link\"") >&5
20721   (eval $ac_link) 2>&5
20722   ac_status=$?
20723   echo "$as_me:20723: \$? = $ac_status" >&5
20724   (exit $ac_status); } &&
20725          { ac_try='test -s conftest$ac_exeext'
20726   { (eval echo "$as_me:20726: \"$ac_try\"") >&5
20727   (eval $ac_try) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit $ac_status); }; }; then
20731   cf_cv_have_tcgetattr=yes
20732 else
20733   echo "$as_me: failed program was:" >&5
20734 cat conftest.$ac_ext >&5
20735 cf_cv_have_tcgetattr=no
20736 fi
20737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20738 fi
20739 echo "$as_me:20739: result: $cf_cv_have_tcgetattr" >&5
20740 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20741 test "$cf_cv_have_tcgetattr" = yes &&
20742 cat >>confdefs.h <<\EOF
20743 #define HAVE_TCGETATTR 1
20744 EOF
20745
20746 echo "$as_me:20746: checking for vsscanf function or workaround" >&5
20747 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20748 if test "${cf_cv_func_vsscanf+set}" = set; then
20749   echo $ECHO_N "(cached) $ECHO_C" >&6
20750 else
20751
20752 cat >conftest.$ac_ext <<_ACEOF
20753 #line 20753 "configure"
20754 #include "confdefs.h"
20755
20756 #include <stdarg.h>
20757 #include <stdio.h>
20758 int
20759 main (void)
20760 {
20761
20762         va_list ap;
20763         vsscanf("from", "%d", ap)
20764   ;
20765   return 0;
20766 }
20767 _ACEOF
20768 rm -f conftest.$ac_objext conftest$ac_exeext
20769 if { (eval echo "$as_me:20769: \"$ac_link\"") >&5
20770   (eval $ac_link) 2>&5
20771   ac_status=$?
20772   echo "$as_me:20772: \$? = $ac_status" >&5
20773   (exit $ac_status); } &&
20774          { ac_try='test -s conftest$ac_exeext'
20775   { (eval echo "$as_me:20775: \"$ac_try\"") >&5
20776   (eval $ac_try) 2>&5
20777   ac_status=$?
20778   echo "$as_me:20778: \$? = $ac_status" >&5
20779   (exit $ac_status); }; }; then
20780   cf_cv_func_vsscanf=vsscanf
20781 else
20782   echo "$as_me: failed program was:" >&5
20783 cat conftest.$ac_ext >&5
20784
20785 cat >conftest.$ac_ext <<_ACEOF
20786 #line 20786 "configure"
20787 #include "confdefs.h"
20788
20789 #include <stdarg.h>
20790 #include <stdio.h>
20791 int
20792 main (void)
20793 {
20794
20795         FILE strbuf;
20796         char *str = "from";
20797
20798         strbuf._flag = _IOREAD;
20799         strbuf._ptr = strbuf._base = (unsigned char *) str;
20800         strbuf._cnt = strlen(str);
20801         strbuf._file = _NFILE;
20802         return (vfscanf(&strbuf, "%d", ap))
20803   ;
20804   return 0;
20805 }
20806 _ACEOF
20807 rm -f conftest.$ac_objext conftest$ac_exeext
20808 if { (eval echo "$as_me:20808: \"$ac_link\"") >&5
20809   (eval $ac_link) 2>&5
20810   ac_status=$?
20811   echo "$as_me:20811: \$? = $ac_status" >&5
20812   (exit $ac_status); } &&
20813          { ac_try='test -s conftest$ac_exeext'
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   cf_cv_func_vsscanf=vfscanf
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 #include <stdarg.h>
20829 #include <stdio.h>
20830 int
20831 main (void)
20832 {
20833
20834         FILE strbuf;
20835         char *str = "from";
20836
20837         strbuf._flag = _IOREAD;
20838         strbuf._ptr = strbuf._base = (unsigned char *) str;
20839         strbuf._cnt = strlen(str);
20840         strbuf._file = _NFILE;
20841         return (_doscan(&strbuf, "%d", ap))
20842   ;
20843   return 0;
20844 }
20845 _ACEOF
20846 rm -f conftest.$ac_objext conftest$ac_exeext
20847 if { (eval echo "$as_me:20847: \"$ac_link\"") >&5
20848   (eval $ac_link) 2>&5
20849   ac_status=$?
20850   echo "$as_me:20850: \$? = $ac_status" >&5
20851   (exit $ac_status); } &&
20852          { ac_try='test -s conftest$ac_exeext'
20853   { (eval echo "$as_me:20853: \"$ac_try\"") >&5
20854   (eval $ac_try) 2>&5
20855   ac_status=$?
20856   echo "$as_me:20856: \$? = $ac_status" >&5
20857   (exit $ac_status); }; }; then
20858   cf_cv_func_vsscanf=_doscan
20859 else
20860   echo "$as_me: failed program was:" >&5
20861 cat conftest.$ac_ext >&5
20862
20863 cf_cv_func_vsscanf=no
20864 fi
20865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20866 fi
20867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20868 fi
20869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20870 fi
20871 echo "$as_me:20871: result: $cf_cv_func_vsscanf" >&5
20872 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20873
20874 case $cf_cv_func_vsscanf in
20875 (vsscanf)
20876 cat >>confdefs.h <<\EOF
20877 #define HAVE_VSSCANF 1
20878 EOF
20879 ;;
20880 (vfscanf)
20881 cat >>confdefs.h <<\EOF
20882 #define HAVE_VFSCANF 1
20883 EOF
20884 ;;
20885 (_doscan)
20886 cat >>confdefs.h <<\EOF
20887 #define HAVE__DOSCAN 1
20888 EOF
20889 ;;
20890 esac
20891
20892 for ac_header in \
20893 unistd.h \
20894
20895 do
20896 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20897 echo "$as_me:20897: checking for $ac_header" >&5
20898 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20899 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20900   echo $ECHO_N "(cached) $ECHO_C" >&6
20901 else
20902   cat >conftest.$ac_ext <<_ACEOF
20903 #line 20903 "configure"
20904 #include "confdefs.h"
20905 #include <$ac_header>
20906 _ACEOF
20907 if { (eval echo "$as_me:20907: \"$ac_cpp conftest.$ac_ext\"") >&5
20908   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20909   ac_status=$?
20910   egrep -v '^ *\+' conftest.er1 >conftest.err
20911   rm -f conftest.er1
20912   cat conftest.err >&5
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); } >/dev/null; then
20915   if test -s conftest.err; then
20916     ac_cpp_err=$ac_c_preproc_warn_flag
20917   else
20918     ac_cpp_err=
20919   fi
20920 else
20921   ac_cpp_err=yes
20922 fi
20923 if test -z "$ac_cpp_err"; then
20924   eval "$as_ac_Header=yes"
20925 else
20926   echo "$as_me: failed program was:" >&5
20927   cat conftest.$ac_ext >&5
20928   eval "$as_ac_Header=no"
20929 fi
20930 rm -f conftest.err conftest.$ac_ext
20931 fi
20932 echo "$as_me:20932: result: `eval echo '${'$as_ac_Header'}'`" >&5
20933 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20934 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20935   cat >>confdefs.h <<EOF
20936 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20937 EOF
20938
20939 fi
20940 done
20941
20942 echo "$as_me:20942: checking for working mkstemp" >&5
20943 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20944 if test "${cf_cv_func_mkstemp+set}" = set; then
20945   echo $ECHO_N "(cached) $ECHO_C" >&6
20946 else
20947
20948 rm -rf conftest*
20949 if test "$cross_compiling" = yes; then
20950   cf_cv_func_mkstemp=maybe
20951 else
20952   cat >conftest.$ac_ext <<_ACEOF
20953 #line 20953 "configure"
20954 #include "confdefs.h"
20955
20956 #include <sys/types.h>
20957 #ifdef HAVE_UNISTD_H
20958 #include <unistd.h>
20959 #endif
20960 #include <stdlib.h>
20961 #include <stdio.h>
20962 #include <string.h>
20963 #include <sys/stat.h>
20964 int main(void)
20965 {
20966         char *tmpl = "conftestXXXXXX";
20967         char name[2][80];
20968         int n;
20969         int result = 0;
20970         int fd;
20971         struct stat sb;
20972
20973         umask(077);
20974         for (n = 0; n < 2; ++n) {
20975                 strcpy(name[n], tmpl);
20976                 if ((fd = mkstemp(name[n])) >= 0) {
20977                         if (!strcmp(name[n], tmpl)
20978                          || stat(name[n], &sb) != 0
20979                          || (sb.st_mode & S_IFMT) != S_IFREG
20980                          || (sb.st_mode & 077) != 0) {
20981                                 result = 1;
20982                         }
20983                         close(fd);
20984                 }
20985         }
20986         if (result == 0
20987          && !strcmp(name[0], name[1]))
20988                 result = 1;
20989         ${cf_cv_main_return:-return}(result);
20990 }
20991
20992 _ACEOF
20993 rm -f conftest$ac_exeext
20994 if { (eval echo "$as_me:20994: \"$ac_link\"") >&5
20995   (eval $ac_link) 2>&5
20996   ac_status=$?
20997   echo "$as_me:20997: \$? = $ac_status" >&5
20998   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20999   { (eval echo "$as_me:20999: \"$ac_try\"") >&5
21000   (eval $ac_try) 2>&5
21001   ac_status=$?
21002   echo "$as_me:21002: \$? = $ac_status" >&5
21003   (exit $ac_status); }; }; then
21004   cf_cv_func_mkstemp=yes
21005
21006 else
21007   echo "$as_me: program exited with status $ac_status" >&5
21008 echo "$as_me: failed program was:" >&5
21009 cat conftest.$ac_ext >&5
21010 cf_cv_func_mkstemp=no
21011
21012 fi
21013 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21014 fi
21015
21016 fi
21017 echo "$as_me:21017: result: $cf_cv_func_mkstemp" >&5
21018 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21019 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21020         echo "$as_me:21020: checking for mkstemp" >&5
21021 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21022 if test "${ac_cv_func_mkstemp+set}" = set; then
21023   echo $ECHO_N "(cached) $ECHO_C" >&6
21024 else
21025   cat >conftest.$ac_ext <<_ACEOF
21026 #line 21026 "configure"
21027 #include "confdefs.h"
21028 #define mkstemp autoconf_temporary
21029 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21030 #undef mkstemp
21031
21032 #ifdef __cplusplus
21033 extern "C"
21034 #endif
21035
21036 /* We use char because int might match the return type of a gcc2
21037    builtin and then its argument prototype would still apply.  */
21038 char mkstemp (void);
21039
21040 int
21041 main (void)
21042 {
21043
21044 /* The GNU C library defines stubs for functions which it implements
21045     to always fail with ENOSYS.  Some functions are actually named
21046     something starting with __ and the normal name is an alias.  */
21047 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21048 #error found stub for mkstemp
21049 #endif
21050
21051         return mkstemp ();
21052   ;
21053   return 0;
21054 }
21055 _ACEOF
21056 rm -f conftest.$ac_objext conftest$ac_exeext
21057 if { (eval echo "$as_me:21057: \"$ac_link\"") >&5
21058   (eval $ac_link) 2>&5
21059   ac_status=$?
21060   echo "$as_me:21060: \$? = $ac_status" >&5
21061   (exit $ac_status); } &&
21062          { ac_try='test -s conftest$ac_exeext'
21063   { (eval echo "$as_me:21063: \"$ac_try\"") >&5
21064   (eval $ac_try) 2>&5
21065   ac_status=$?
21066   echo "$as_me:21066: \$? = $ac_status" >&5
21067   (exit $ac_status); }; }; then
21068   ac_cv_func_mkstemp=yes
21069 else
21070   echo "$as_me: failed program was:" >&5
21071 cat conftest.$ac_ext >&5
21072 ac_cv_func_mkstemp=no
21073 fi
21074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21075 fi
21076 echo "$as_me:21076: result: $ac_cv_func_mkstemp" >&5
21077 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21078
21079 fi
21080 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21081
21082 cat >>confdefs.h <<\EOF
21083 #define HAVE_MKSTEMP 1
21084 EOF
21085
21086 fi
21087
21088 # setup for prototype of fallback for vsscanf()
21089
21090 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21091         HAVE_VSSCANF=1
21092 else
21093         HAVE_VSSCANF=0
21094 fi
21095
21096 if test "x$cross_compiling" = xyes ; then
21097         { echo "$as_me:21097: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21098 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21099 else
21100         echo "$as_me:21100: checking whether setvbuf arguments are reversed" >&5
21101 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21102 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21103   echo $ECHO_N "(cached) $ECHO_C" >&6
21104 else
21105   if test "$cross_compiling" = yes; then
21106   { { echo "$as_me:21106: error: cannot run test program while cross compiling" >&5
21107 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21108    { (exit 1); exit 1; }; }
21109 else
21110   cat >conftest.$ac_ext <<_ACEOF
21111 #line 21111 "configure"
21112 #include "confdefs.h"
21113 #include <stdio.h>
21114 /* If setvbuf has the reversed format, exit 0. */
21115 int
21116 main (void)
21117 {
21118   /* This call has the arguments reversed.
21119      A reversed system may check and see that the address of main
21120      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21121   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21122     $ac_main_return(1);
21123   putc('\r', stdout);
21124   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21125 }
21126 _ACEOF
21127 rm -f conftest$ac_exeext
21128 if { (eval echo "$as_me:21128: \"$ac_link\"") >&5
21129   (eval $ac_link) 2>&5
21130   ac_status=$?
21131   echo "$as_me:21131: \$? = $ac_status" >&5
21132   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21133   { (eval echo "$as_me:21133: \"$ac_try\"") >&5
21134   (eval $ac_try) 2>&5
21135   ac_status=$?
21136   echo "$as_me:21136: \$? = $ac_status" >&5
21137   (exit $ac_status); }; }; then
21138   ac_cv_func_setvbuf_reversed=yes
21139 else
21140   echo "$as_me: program exited with status $ac_status" >&5
21141 echo "$as_me: failed program was:" >&5
21142 cat conftest.$ac_ext >&5
21143 ac_cv_func_setvbuf_reversed=no
21144 fi
21145 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21146 fi
21147 rm -f core core.* *.core
21148 fi
21149 echo "$as_me:21149: result: $ac_cv_func_setvbuf_reversed" >&5
21150 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21151 if test $ac_cv_func_setvbuf_reversed = yes; then
21152
21153 cat >>confdefs.h <<\EOF
21154 #define SETVBUF_REVERSED 1
21155 EOF
21156
21157 fi
21158
21159 fi
21160 echo "$as_me:21160: checking for intptr_t" >&5
21161 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21162 if test "${ac_cv_type_intptr_t+set}" = set; then
21163   echo $ECHO_N "(cached) $ECHO_C" >&6
21164 else
21165   cat >conftest.$ac_ext <<_ACEOF
21166 #line 21166 "configure"
21167 #include "confdefs.h"
21168 $ac_includes_default
21169 int
21170 main (void)
21171 {
21172 if ((intptr_t *) 0)
21173   return 0;
21174 if (sizeof (intptr_t))
21175   return 0;
21176   ;
21177   return 0;
21178 }
21179 _ACEOF
21180 rm -f conftest.$ac_objext
21181 if { (eval echo "$as_me:21181: \"$ac_compile\"") >&5
21182   (eval $ac_compile) 2>&5
21183   ac_status=$?
21184   echo "$as_me:21184: \$? = $ac_status" >&5
21185   (exit $ac_status); } &&
21186          { ac_try='test -s conftest.$ac_objext'
21187   { (eval echo "$as_me:21187: \"$ac_try\"") >&5
21188   (eval $ac_try) 2>&5
21189   ac_status=$?
21190   echo "$as_me:21190: \$? = $ac_status" >&5
21191   (exit $ac_status); }; }; then
21192   ac_cv_type_intptr_t=yes
21193 else
21194   echo "$as_me: failed program was:" >&5
21195 cat conftest.$ac_ext >&5
21196 ac_cv_type_intptr_t=no
21197 fi
21198 rm -f conftest.$ac_objext conftest.$ac_ext
21199 fi
21200 echo "$as_me:21200: result: $ac_cv_type_intptr_t" >&5
21201 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21202 if test $ac_cv_type_intptr_t = yes; then
21203   :
21204 else
21205
21206 cat >>confdefs.h <<EOF
21207 #define intptr_t long
21208 EOF
21209
21210 fi
21211
21212 echo "$as_me:21212: checking for ssize_t" >&5
21213 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21214 if test "${ac_cv_type_ssize_t+set}" = set; then
21215   echo $ECHO_N "(cached) $ECHO_C" >&6
21216 else
21217   cat >conftest.$ac_ext <<_ACEOF
21218 #line 21218 "configure"
21219 #include "confdefs.h"
21220 $ac_includes_default
21221 int
21222 main (void)
21223 {
21224 if ((ssize_t *) 0)
21225   return 0;
21226 if (sizeof (ssize_t))
21227   return 0;
21228   ;
21229   return 0;
21230 }
21231 _ACEOF
21232 rm -f conftest.$ac_objext
21233 if { (eval echo "$as_me:21233: \"$ac_compile\"") >&5
21234   (eval $ac_compile) 2>&5
21235   ac_status=$?
21236   echo "$as_me:21236: \$? = $ac_status" >&5
21237   (exit $ac_status); } &&
21238          { ac_try='test -s conftest.$ac_objext'
21239   { (eval echo "$as_me:21239: \"$ac_try\"") >&5
21240   (eval $ac_try) 2>&5
21241   ac_status=$?
21242   echo "$as_me:21242: \$? = $ac_status" >&5
21243   (exit $ac_status); }; }; then
21244   ac_cv_type_ssize_t=yes
21245 else
21246   echo "$as_me: failed program was:" >&5
21247 cat conftest.$ac_ext >&5
21248 ac_cv_type_ssize_t=no
21249 fi
21250 rm -f conftest.$ac_objext conftest.$ac_ext
21251 fi
21252 echo "$as_me:21252: result: $ac_cv_type_ssize_t" >&5
21253 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21254 if test $ac_cv_type_ssize_t = yes; then
21255   :
21256 else
21257
21258 cat >>confdefs.h <<EOF
21259 #define ssize_t int
21260 EOF
21261
21262 fi
21263
21264 echo "$as_me:21264: checking for type sigaction_t" >&5
21265 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21266 if test "${cf_cv_type_sigaction+set}" = set; then
21267   echo $ECHO_N "(cached) $ECHO_C" >&6
21268 else
21269
21270         cat >conftest.$ac_ext <<_ACEOF
21271 #line 21271 "configure"
21272 #include "confdefs.h"
21273
21274 #include <signal.h>
21275 int
21276 main (void)
21277 {
21278 sigaction_t x
21279   ;
21280   return 0;
21281 }
21282 _ACEOF
21283 rm -f conftest.$ac_objext
21284 if { (eval echo "$as_me:21284: \"$ac_compile\"") >&5
21285   (eval $ac_compile) 2>&5
21286   ac_status=$?
21287   echo "$as_me:21287: \$? = $ac_status" >&5
21288   (exit $ac_status); } &&
21289          { ac_try='test -s conftest.$ac_objext'
21290   { (eval echo "$as_me:21290: \"$ac_try\"") >&5
21291   (eval $ac_try) 2>&5
21292   ac_status=$?
21293   echo "$as_me:21293: \$? = $ac_status" >&5
21294   (exit $ac_status); }; }; then
21295   cf_cv_type_sigaction=yes
21296 else
21297   echo "$as_me: failed program was:" >&5
21298 cat conftest.$ac_ext >&5
21299 cf_cv_type_sigaction=no
21300 fi
21301 rm -f conftest.$ac_objext conftest.$ac_ext
21302 fi
21303
21304 echo "$as_me:21304: result: $cf_cv_type_sigaction" >&5
21305 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21306 test "$cf_cv_type_sigaction" = yes &&
21307 cat >>confdefs.h <<\EOF
21308 #define HAVE_TYPE_SIGACTION 1
21309 EOF
21310
21311 echo "$as_me:21311: checking declaration of size-change" >&5
21312 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21313 if test "${cf_cv_sizechange+set}" = set; then
21314   echo $ECHO_N "(cached) $ECHO_C" >&6
21315 else
21316
21317         cf_cv_sizechange=unknown
21318         cf_save_CPPFLAGS="$CPPFLAGS"
21319
21320 for cf_opts in "" "NEED_PTEM_H"
21321 do
21322
21323         CPPFLAGS="$cf_save_CPPFLAGS"
21324         if test -n "$cf_opts"
21325         then
21326
21327         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21328         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21329
21330         fi
21331         cat >conftest.$ac_ext <<_ACEOF
21332 #line 21332 "configure"
21333 #include "confdefs.h"
21334 #include <sys/types.h>
21335 #ifdef HAVE_TERMIOS_H
21336 #include <termios.h>
21337 #else
21338 #ifdef HAVE_TERMIO_H
21339 #include <termio.h>
21340 #endif
21341 #endif
21342
21343 #ifdef NEED_PTEM_H
21344 /* This is a workaround for SCO:  they neglected to define struct winsize in
21345  * termios.h -- it's only in termio.h and ptem.h
21346  */
21347 #include <sys/stream.h>
21348 #include <sys/ptem.h>
21349 #endif
21350
21351 #ifdef HAVE_SYS_IOCTL_H
21352 #include <sys/ioctl.h>
21353 #endif
21354
21355 int
21356 main (void)
21357 {
21358
21359 #ifdef TIOCGSIZE
21360         struct ttysize win;     /* SunOS 3.0... */
21361         int y = win.ts_lines = 2;
21362         int x = win.ts_cols = 1;
21363         (void)y;
21364         (void)x;
21365 #else
21366 #ifdef TIOCGWINSZ
21367         struct winsize win;     /* everything else */
21368         int y = win.ws_row = 2;
21369         int x = win.ws_col = 1;
21370         (void)y;
21371         (void)x;
21372 #else
21373         no TIOCGSIZE or TIOCGWINSZ
21374 #endif /* TIOCGWINSZ */
21375 #endif /* TIOCGSIZE */
21376
21377   ;
21378   return 0;
21379 }
21380 _ACEOF
21381 rm -f conftest.$ac_objext
21382 if { (eval echo "$as_me:21382: \"$ac_compile\"") >&5
21383   (eval $ac_compile) 2>&5
21384   ac_status=$?
21385   echo "$as_me:21385: \$? = $ac_status" >&5
21386   (exit $ac_status); } &&
21387          { ac_try='test -s conftest.$ac_objext'
21388   { (eval echo "$as_me:21388: \"$ac_try\"") >&5
21389   (eval $ac_try) 2>&5
21390   ac_status=$?
21391   echo "$as_me:21391: \$? = $ac_status" >&5
21392   (exit $ac_status); }; }; then
21393   cf_cv_sizechange=yes
21394 else
21395   echo "$as_me: failed program was:" >&5
21396 cat conftest.$ac_ext >&5
21397 cf_cv_sizechange=no
21398 fi
21399 rm -f conftest.$ac_objext conftest.$ac_ext
21400
21401         CPPFLAGS="$cf_save_CPPFLAGS"
21402         if test "$cf_cv_sizechange" = yes ; then
21403                 echo "size-change succeeded ($cf_opts)" >&5
21404                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21405                 break
21406         fi
21407 done
21408
21409 fi
21410 echo "$as_me:21410: result: $cf_cv_sizechange" >&5
21411 echo "${ECHO_T}$cf_cv_sizechange" >&6
21412 if test "$cf_cv_sizechange" != no ; then
21413
21414 cat >>confdefs.h <<\EOF
21415 #define HAVE_SIZECHANGE 1
21416 EOF
21417
21418         case $cf_cv_sizechange in
21419         (NEED*)
21420                 cat >>confdefs.h <<EOF
21421 #define $cf_cv_sizechange  1
21422 EOF
21423
21424                 ;;
21425         esac
21426 fi
21427
21428 echo "$as_me:21428: checking for memmove" >&5
21429 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21430 if test "${ac_cv_func_memmove+set}" = set; then
21431   echo $ECHO_N "(cached) $ECHO_C" >&6
21432 else
21433   cat >conftest.$ac_ext <<_ACEOF
21434 #line 21434 "configure"
21435 #include "confdefs.h"
21436 #define memmove autoconf_temporary
21437 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21438 #undef memmove
21439
21440 #ifdef __cplusplus
21441 extern "C"
21442 #endif
21443
21444 /* We use char because int might match the return type of a gcc2
21445    builtin and then its argument prototype would still apply.  */
21446 char memmove (void);
21447
21448 int
21449 main (void)
21450 {
21451
21452 /* The GNU C library defines stubs for functions which it implements
21453     to always fail with ENOSYS.  Some functions are actually named
21454     something starting with __ and the normal name is an alias.  */
21455 #if defined (__stub_memmove) || defined (__stub___memmove)
21456 #error found stub for memmove
21457 #endif
21458
21459         return memmove ();
21460   ;
21461   return 0;
21462 }
21463 _ACEOF
21464 rm -f conftest.$ac_objext conftest$ac_exeext
21465 if { (eval echo "$as_me:21465: \"$ac_link\"") >&5
21466   (eval $ac_link) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit $ac_status); } &&
21470          { ac_try='test -s conftest$ac_exeext'
21471   { (eval echo "$as_me:21471: \"$ac_try\"") >&5
21472   (eval $ac_try) 2>&5
21473   ac_status=$?
21474   echo "$as_me:21474: \$? = $ac_status" >&5
21475   (exit $ac_status); }; }; then
21476   ac_cv_func_memmove=yes
21477 else
21478   echo "$as_me: failed program was:" >&5
21479 cat conftest.$ac_ext >&5
21480 ac_cv_func_memmove=no
21481 fi
21482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21483 fi
21484 echo "$as_me:21484: result: $ac_cv_func_memmove" >&5
21485 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21486 if test $ac_cv_func_memmove = yes; then
21487   :
21488 else
21489
21490 echo "$as_me:21490: checking for bcopy" >&5
21491 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21492 if test "${ac_cv_func_bcopy+set}" = set; then
21493   echo $ECHO_N "(cached) $ECHO_C" >&6
21494 else
21495   cat >conftest.$ac_ext <<_ACEOF
21496 #line 21496 "configure"
21497 #include "confdefs.h"
21498 #define bcopy autoconf_temporary
21499 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21500 #undef bcopy
21501
21502 #ifdef __cplusplus
21503 extern "C"
21504 #endif
21505
21506 /* We use char because int might match the return type of a gcc2
21507    builtin and then its argument prototype would still apply.  */
21508 char bcopy (void);
21509
21510 int
21511 main (void)
21512 {
21513
21514 /* The GNU C library defines stubs for functions which it implements
21515     to always fail with ENOSYS.  Some functions are actually named
21516     something starting with __ and the normal name is an alias.  */
21517 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21518 #error found stub for bcopy
21519 #endif
21520
21521         return bcopy ();
21522   ;
21523   return 0;
21524 }
21525 _ACEOF
21526 rm -f conftest.$ac_objext conftest$ac_exeext
21527 if { (eval echo "$as_me:21527: \"$ac_link\"") >&5
21528   (eval $ac_link) 2>&5
21529   ac_status=$?
21530   echo "$as_me:21530: \$? = $ac_status" >&5
21531   (exit $ac_status); } &&
21532          { ac_try='test -s conftest$ac_exeext'
21533   { (eval echo "$as_me:21533: \"$ac_try\"") >&5
21534   (eval $ac_try) 2>&5
21535   ac_status=$?
21536   echo "$as_me:21536: \$? = $ac_status" >&5
21537   (exit $ac_status); }; }; then
21538   ac_cv_func_bcopy=yes
21539 else
21540   echo "$as_me: failed program was:" >&5
21541 cat conftest.$ac_ext >&5
21542 ac_cv_func_bcopy=no
21543 fi
21544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21545 fi
21546 echo "$as_me:21546: result: $ac_cv_func_bcopy" >&5
21547 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21548 if test $ac_cv_func_bcopy = yes; then
21549
21550         echo "$as_me:21550: checking if bcopy does overlapping moves" >&5
21551 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21552 if test "${cf_cv_good_bcopy+set}" = set; then
21553   echo $ECHO_N "(cached) $ECHO_C" >&6
21554 else
21555
21556                 if test "$cross_compiling" = yes; then
21557   cf_cv_good_bcopy=unknown
21558 else
21559   cat >conftest.$ac_ext <<_ACEOF
21560 #line 21560 "configure"
21561 #include "confdefs.h"
21562
21563 int main(void) {
21564         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21565         char temp[40];
21566         bcopy(data, temp, sizeof(data));
21567         bcopy(temp+10, temp, 15);
21568         bcopy(temp+5, temp+15, 10);
21569         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21570 }
21571
21572 _ACEOF
21573 rm -f conftest$ac_exeext
21574 if { (eval echo "$as_me:21574: \"$ac_link\"") >&5
21575   (eval $ac_link) 2>&5
21576   ac_status=$?
21577   echo "$as_me:21577: \$? = $ac_status" >&5
21578   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21579   { (eval echo "$as_me:21579: \"$ac_try\"") >&5
21580   (eval $ac_try) 2>&5
21581   ac_status=$?
21582   echo "$as_me:21582: \$? = $ac_status" >&5
21583   (exit $ac_status); }; }; then
21584   cf_cv_good_bcopy=yes
21585 else
21586   echo "$as_me: program exited with status $ac_status" >&5
21587 echo "$as_me: failed program was:" >&5
21588 cat conftest.$ac_ext >&5
21589 cf_cv_good_bcopy=no
21590 fi
21591 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21592 fi
21593
21594 fi
21595 echo "$as_me:21595: result: $cf_cv_good_bcopy" >&5
21596 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21597
21598 else
21599   cf_cv_good_bcopy=no
21600 fi
21601
21602         if test "$cf_cv_good_bcopy" = yes ; then
21603
21604 cat >>confdefs.h <<\EOF
21605 #define USE_OK_BCOPY 1
21606 EOF
21607
21608         else
21609
21610 cat >>confdefs.h <<\EOF
21611 #define USE_MY_MEMMOVE 1
21612 EOF
21613
21614         fi
21615
21616 fi
21617
21618 tty 2>&1 >/dev/null || {
21619 for ac_func in posix_openpt
21620 do
21621 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21622 echo "$as_me:21622: checking for $ac_func" >&5
21623 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21624 if eval "test \"\${$as_ac_var+set}\" = set"; then
21625   echo $ECHO_N "(cached) $ECHO_C" >&6
21626 else
21627   cat >conftest.$ac_ext <<_ACEOF
21628 #line 21628 "configure"
21629 #include "confdefs.h"
21630 #define $ac_func autoconf_temporary
21631 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21632 #undef $ac_func
21633
21634 #ifdef __cplusplus
21635 extern "C"
21636 #endif
21637
21638 /* We use char because int might match the return type of a gcc2
21639    builtin and then its argument prototype would still apply.  */
21640 char $ac_func (void);
21641
21642 int
21643 main (void)
21644 {
21645
21646 /* The GNU C library defines stubs for functions which it implements
21647     to always fail with ENOSYS.  Some functions are actually named
21648     something starting with __ and the normal name is an alias.  */
21649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21650 #error found stub for $ac_func
21651 #endif
21652
21653         return $ac_func ();
21654   ;
21655   return 0;
21656 }
21657 _ACEOF
21658 rm -f conftest.$ac_objext conftest$ac_exeext
21659 if { (eval echo "$as_me:21659: \"$ac_link\"") >&5
21660   (eval $ac_link) 2>&5
21661   ac_status=$?
21662   echo "$as_me:21662: \$? = $ac_status" >&5
21663   (exit $ac_status); } &&
21664          { ac_try='test -s conftest$ac_exeext'
21665   { (eval echo "$as_me:21665: \"$ac_try\"") >&5
21666   (eval $ac_try) 2>&5
21667   ac_status=$?
21668   echo "$as_me:21668: \$? = $ac_status" >&5
21669   (exit $ac_status); }; }; then
21670   eval "$as_ac_var=yes"
21671 else
21672   echo "$as_me: failed program was:" >&5
21673 cat conftest.$ac_ext >&5
21674 eval "$as_ac_var=no"
21675 fi
21676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21677 fi
21678 echo "$as_me:21678: result: `eval echo '${'$as_ac_var'}'`" >&5
21679 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21680 if test `eval echo '${'$as_ac_var'}'` = yes; then
21681   cat >>confdefs.h <<EOF
21682 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21683 EOF
21684
21685 fi
21686 done
21687  }
21688 echo "$as_me:21688: checking if poll really works" >&5
21689 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21690 if test "${cf_cv_working_poll+set}" = set; then
21691   echo $ECHO_N "(cached) $ECHO_C" >&6
21692 else
21693
21694 if test "$cross_compiling" = yes; then
21695   cf_cv_working_poll=unknown
21696 else
21697   cat >conftest.$ac_ext <<_ACEOF
21698 #line 21698 "configure"
21699 #include "confdefs.h"
21700
21701 #include <stdlib.h>
21702 #include <stdio.h>
21703 #include <unistd.h>
21704 #include <fcntl.h>
21705 #ifdef HAVE_POLL_H
21706 #include <poll.h>
21707 #else
21708 #include <sys/poll.h>
21709 #endif
21710 int main(void) {
21711         struct pollfd myfds;
21712         int ret;
21713
21714         /* check for Darwin bug with respect to "devices" */
21715         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21716         if (myfds.fd < 0)
21717                 myfds.fd = 0;
21718         myfds.events = POLLIN;
21719         myfds.revents = 0;
21720
21721         ret = poll(&myfds, 1, 100);
21722
21723         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21724                 ret = -1;
21725         } else {
21726                 int fd = 0;
21727                 if (!isatty(fd)) {
21728                         fd = open("/dev/tty", 2);       /* O_RDWR */
21729                 }
21730 #ifdef HAVE_POSIX_OPENPT
21731                 if (fd < 0) {
21732                         fd = posix_openpt(O_RDWR);
21733                 }
21734 #endif
21735
21736                 if (fd >= 0) {
21737                         /* also check with standard input */
21738                         myfds.fd = fd;
21739                         myfds.events = POLLIN;
21740                         myfds.revents = 0;
21741                         ret = poll(&myfds, 1, 100);
21742                 } else {
21743                         ret = -1;
21744                 }
21745         }
21746         ${cf_cv_main_return:-return}(ret < 0);
21747 }
21748 _ACEOF
21749 rm -f conftest$ac_exeext
21750 if { (eval echo "$as_me:21750: \"$ac_link\"") >&5
21751   (eval $ac_link) 2>&5
21752   ac_status=$?
21753   echo "$as_me:21753: \$? = $ac_status" >&5
21754   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21755   { (eval echo "$as_me:21755: \"$ac_try\"") >&5
21756   (eval $ac_try) 2>&5
21757   ac_status=$?
21758   echo "$as_me:21758: \$? = $ac_status" >&5
21759   (exit $ac_status); }; }; then
21760   cf_cv_working_poll=yes
21761 else
21762   echo "$as_me: program exited with status $ac_status" >&5
21763 echo "$as_me: failed program was:" >&5
21764 cat conftest.$ac_ext >&5
21765 cf_cv_working_poll=no
21766 fi
21767 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21768 fi
21769 fi
21770 echo "$as_me:21770: result: $cf_cv_working_poll" >&5
21771 echo "${ECHO_T}$cf_cv_working_poll" >&6
21772 test "$cf_cv_working_poll" = "yes" &&
21773 cat >>confdefs.h <<\EOF
21774 #define HAVE_WORKING_POLL 1
21775 EOF
21776
21777 echo "$as_me:21777: checking for va_copy" >&5
21778 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21779 if test "${cf_cv_have_va_copy+set}" = set; then
21780   echo $ECHO_N "(cached) $ECHO_C" >&6
21781 else
21782
21783 cat >conftest.$ac_ext <<_ACEOF
21784 #line 21784 "configure"
21785 #include "confdefs.h"
21786
21787 #include <stdarg.h>
21788
21789 int
21790 main (void)
21791 {
21792
21793         static va_list dst;
21794         static va_list src;
21795         va_copy(dst, src)
21796   ;
21797   return 0;
21798 }
21799 _ACEOF
21800 rm -f conftest.$ac_objext conftest$ac_exeext
21801 if { (eval echo "$as_me:21801: \"$ac_link\"") >&5
21802   (eval $ac_link) 2>&5
21803   ac_status=$?
21804   echo "$as_me:21804: \$? = $ac_status" >&5
21805   (exit $ac_status); } &&
21806          { ac_try='test -s conftest$ac_exeext'
21807   { (eval echo "$as_me:21807: \"$ac_try\"") >&5
21808   (eval $ac_try) 2>&5
21809   ac_status=$?
21810   echo "$as_me:21810: \$? = $ac_status" >&5
21811   (exit $ac_status); }; }; then
21812   cf_cv_have_va_copy=yes
21813 else
21814   echo "$as_me: failed program was:" >&5
21815 cat conftest.$ac_ext >&5
21816 cf_cv_have_va_copy=no
21817 fi
21818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21819 fi
21820 echo "$as_me:21820: result: $cf_cv_have_va_copy" >&5
21821 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21822
21823 if test "$cf_cv_have_va_copy" = yes;
21824 then
21825
21826 cat >>confdefs.h <<\EOF
21827 #define HAVE_VA_COPY 1
21828 EOF
21829
21830 else # !cf_cv_have_va_copy
21831
21832 echo "$as_me:21832: checking for __va_copy" >&5
21833 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21834 if test "${cf_cv_have___va_copy+set}" = set; then
21835   echo $ECHO_N "(cached) $ECHO_C" >&6
21836 else
21837
21838 cat >conftest.$ac_ext <<_ACEOF
21839 #line 21839 "configure"
21840 #include "confdefs.h"
21841
21842 #include <stdarg.h>
21843
21844 int
21845 main (void)
21846 {
21847
21848         static va_list dst;
21849         static va_list src;
21850         __va_copy(dst, src)
21851   ;
21852   return 0;
21853 }
21854 _ACEOF
21855 rm -f conftest.$ac_objext conftest$ac_exeext
21856 if { (eval echo "$as_me:21856: \"$ac_link\"") >&5
21857   (eval $ac_link) 2>&5
21858   ac_status=$?
21859   echo "$as_me:21859: \$? = $ac_status" >&5
21860   (exit $ac_status); } &&
21861          { ac_try='test -s conftest$ac_exeext'
21862   { (eval echo "$as_me:21862: \"$ac_try\"") >&5
21863   (eval $ac_try) 2>&5
21864   ac_status=$?
21865   echo "$as_me:21865: \$? = $ac_status" >&5
21866   (exit $ac_status); }; }; then
21867   cf_cv_have___va_copy=yes
21868 else
21869   echo "$as_me: failed program was:" >&5
21870 cat conftest.$ac_ext >&5
21871 cf_cv_have___va_copy=no
21872 fi
21873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21874 fi
21875 echo "$as_me:21875: result: $cf_cv_have___va_copy" >&5
21876 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21877
21878 if test "$cf_cv_have___va_copy" = yes
21879 then
21880
21881 cat >>confdefs.h <<\EOF
21882 #define HAVE___VA_COPY 1
21883 EOF
21884
21885 else # !cf_cv_have___va_copy
21886
21887 echo "$as_me:21887: checking for __builtin_va_copy" >&5
21888 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21889 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21890   echo $ECHO_N "(cached) $ECHO_C" >&6
21891 else
21892
21893 cat >conftest.$ac_ext <<_ACEOF
21894 #line 21894 "configure"
21895 #include "confdefs.h"
21896
21897 #include <stdarg.h>
21898
21899 int
21900 main (void)
21901 {
21902
21903         static va_list dst;
21904         static va_list src;
21905         __builtin_va_copy(dst, src)
21906   ;
21907   return 0;
21908 }
21909 _ACEOF
21910 rm -f conftest.$ac_objext conftest$ac_exeext
21911 if { (eval echo "$as_me:21911: \"$ac_link\"") >&5
21912   (eval $ac_link) 2>&5
21913   ac_status=$?
21914   echo "$as_me:21914: \$? = $ac_status" >&5
21915   (exit $ac_status); } &&
21916          { ac_try='test -s conftest$ac_exeext'
21917   { (eval echo "$as_me:21917: \"$ac_try\"") >&5
21918   (eval $ac_try) 2>&5
21919   ac_status=$?
21920   echo "$as_me:21920: \$? = $ac_status" >&5
21921   (exit $ac_status); }; }; then
21922   cf_cv_have___builtin_va_copy=yes
21923 else
21924   echo "$as_me: failed program was:" >&5
21925 cat conftest.$ac_ext >&5
21926 cf_cv_have___builtin_va_copy=no
21927 fi
21928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21929 fi
21930 echo "$as_me:21930: result: $cf_cv_have___builtin_va_copy" >&5
21931 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21932
21933 test "$cf_cv_have___builtin_va_copy" = yes &&
21934
21935 cat >>confdefs.h <<\EOF
21936 #define HAVE___BUILTIN_VA_COPY 1
21937 EOF
21938
21939 fi # cf_cv_have___va_copy
21940
21941 fi # cf_cv_have_va_copy
21942
21943 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21944 (*yes*)
21945         ;;
21946
21947 (*)
21948         echo "$as_me:21948: checking if we can simply copy va_list" >&5
21949 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21950 if test "${cf_cv_pointer_va_list+set}" = set; then
21951   echo $ECHO_N "(cached) $ECHO_C" >&6
21952 else
21953
21954 cat >conftest.$ac_ext <<_ACEOF
21955 #line 21955 "configure"
21956 #include "confdefs.h"
21957
21958 #include <stdarg.h>
21959
21960 int
21961 main (void)
21962 {
21963
21964         va_list dst;
21965         va_list src;
21966         dst = src
21967   ;
21968   return 0;
21969 }
21970 _ACEOF
21971 rm -f conftest.$ac_objext conftest$ac_exeext
21972 if { (eval echo "$as_me:21972: \"$ac_link\"") >&5
21973   (eval $ac_link) 2>&5
21974   ac_status=$?
21975   echo "$as_me:21975: \$? = $ac_status" >&5
21976   (exit $ac_status); } &&
21977          { ac_try='test -s conftest$ac_exeext'
21978   { (eval echo "$as_me:21978: \"$ac_try\"") >&5
21979   (eval $ac_try) 2>&5
21980   ac_status=$?
21981   echo "$as_me:21981: \$? = $ac_status" >&5
21982   (exit $ac_status); }; }; then
21983   cf_cv_pointer_va_list=yes
21984 else
21985   echo "$as_me: failed program was:" >&5
21986 cat conftest.$ac_ext >&5
21987 cf_cv_pointer_va_list=no
21988 fi
21989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21990 fi
21991 echo "$as_me:21991: result: $cf_cv_pointer_va_list" >&5
21992 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21993
21994         if test "$cf_cv_pointer_va_list" = no
21995         then
21996                 echo "$as_me:21996: checking if we can copy va_list indirectly" >&5
21997 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21998 if test "${cf_cv_array_va_list+set}" = set; then
21999   echo $ECHO_N "(cached) $ECHO_C" >&6
22000 else
22001
22002 cat >conftest.$ac_ext <<_ACEOF
22003 #line 22003 "configure"
22004 #include "confdefs.h"
22005
22006 #include <stdarg.h>
22007
22008 int
22009 main (void)
22010 {
22011
22012         va_list dst;
22013         va_list src;
22014         *dst = *src
22015   ;
22016   return 0;
22017 }
22018 _ACEOF
22019 rm -f conftest.$ac_objext conftest$ac_exeext
22020 if { (eval echo "$as_me:22020: \"$ac_link\"") >&5
22021   (eval $ac_link) 2>&5
22022   ac_status=$?
22023   echo "$as_me:22023: \$? = $ac_status" >&5
22024   (exit $ac_status); } &&
22025          { ac_try='test -s conftest$ac_exeext'
22026   { (eval echo "$as_me:22026: \"$ac_try\"") >&5
22027   (eval $ac_try) 2>&5
22028   ac_status=$?
22029   echo "$as_me:22029: \$? = $ac_status" >&5
22030   (exit $ac_status); }; }; then
22031   cf_cv_array_va_list=yes
22032 else
22033   echo "$as_me: failed program was:" >&5
22034 cat conftest.$ac_ext >&5
22035 cf_cv_array_va_list=no
22036 fi
22037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22038 fi
22039 echo "$as_me:22039: result: $cf_cv_array_va_list" >&5
22040 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22041                 test "$cf_cv_array_va_list" = yes &&
22042 cat >>confdefs.h <<\EOF
22043 #define ARRAY_VA_LIST 1
22044 EOF
22045
22046         fi
22047         ;;
22048 esac
22049
22050 echo "$as_me:22050: checking for pid_t" >&5
22051 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22052 if test "${ac_cv_type_pid_t+set}" = set; then
22053   echo $ECHO_N "(cached) $ECHO_C" >&6
22054 else
22055   cat >conftest.$ac_ext <<_ACEOF
22056 #line 22056 "configure"
22057 #include "confdefs.h"
22058 $ac_includes_default
22059 int
22060 main (void)
22061 {
22062 if ((pid_t *) 0)
22063   return 0;
22064 if (sizeof (pid_t))
22065   return 0;
22066   ;
22067   return 0;
22068 }
22069 _ACEOF
22070 rm -f conftest.$ac_objext
22071 if { (eval echo "$as_me:22071: \"$ac_compile\"") >&5
22072   (eval $ac_compile) 2>&5
22073   ac_status=$?
22074   echo "$as_me:22074: \$? = $ac_status" >&5
22075   (exit $ac_status); } &&
22076          { ac_try='test -s conftest.$ac_objext'
22077   { (eval echo "$as_me:22077: \"$ac_try\"") >&5
22078   (eval $ac_try) 2>&5
22079   ac_status=$?
22080   echo "$as_me:22080: \$? = $ac_status" >&5
22081   (exit $ac_status); }; }; then
22082   ac_cv_type_pid_t=yes
22083 else
22084   echo "$as_me: failed program was:" >&5
22085 cat conftest.$ac_ext >&5
22086 ac_cv_type_pid_t=no
22087 fi
22088 rm -f conftest.$ac_objext conftest.$ac_ext
22089 fi
22090 echo "$as_me:22090: result: $ac_cv_type_pid_t" >&5
22091 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22092 if test $ac_cv_type_pid_t = yes; then
22093   :
22094 else
22095
22096 cat >>confdefs.h <<EOF
22097 #define pid_t int
22098 EOF
22099
22100 fi
22101
22102 for ac_header in unistd.h vfork.h
22103 do
22104 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22105 echo "$as_me:22105: checking for $ac_header" >&5
22106 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22107 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22108   echo $ECHO_N "(cached) $ECHO_C" >&6
22109 else
22110   cat >conftest.$ac_ext <<_ACEOF
22111 #line 22111 "configure"
22112 #include "confdefs.h"
22113 #include <$ac_header>
22114 _ACEOF
22115 if { (eval echo "$as_me:22115: \"$ac_cpp conftest.$ac_ext\"") >&5
22116   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22117   ac_status=$?
22118   egrep -v '^ *\+' conftest.er1 >conftest.err
22119   rm -f conftest.er1
22120   cat conftest.err >&5
22121   echo "$as_me:22121: \$? = $ac_status" >&5
22122   (exit $ac_status); } >/dev/null; then
22123   if test -s conftest.err; then
22124     ac_cpp_err=$ac_c_preproc_warn_flag
22125   else
22126     ac_cpp_err=
22127   fi
22128 else
22129   ac_cpp_err=yes
22130 fi
22131 if test -z "$ac_cpp_err"; then
22132   eval "$as_ac_Header=yes"
22133 else
22134   echo "$as_me: failed program was:" >&5
22135   cat conftest.$ac_ext >&5
22136   eval "$as_ac_Header=no"
22137 fi
22138 rm -f conftest.err conftest.$ac_ext
22139 fi
22140 echo "$as_me:22140: result: `eval echo '${'$as_ac_Header'}'`" >&5
22141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22143   cat >>confdefs.h <<EOF
22144 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22145 EOF
22146
22147 fi
22148 done
22149
22150 for ac_func in fork vfork
22151 do
22152 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22153 echo "$as_me:22153: checking for $ac_func" >&5
22154 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22155 if eval "test \"\${$as_ac_var+set}\" = set"; then
22156   echo $ECHO_N "(cached) $ECHO_C" >&6
22157 else
22158   cat >conftest.$ac_ext <<_ACEOF
22159 #line 22159 "configure"
22160 #include "confdefs.h"
22161 #define $ac_func autoconf_temporary
22162 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22163 #undef $ac_func
22164
22165 #ifdef __cplusplus
22166 extern "C"
22167 #endif
22168
22169 /* We use char because int might match the return type of a gcc2
22170    builtin and then its argument prototype would still apply.  */
22171 char $ac_func (void);
22172
22173 int
22174 main (void)
22175 {
22176
22177 /* The GNU C library defines stubs for functions which it implements
22178     to always fail with ENOSYS.  Some functions are actually named
22179     something starting with __ and the normal name is an alias.  */
22180 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22181 #error found stub for $ac_func
22182 #endif
22183
22184         return $ac_func ();
22185   ;
22186   return 0;
22187 }
22188 _ACEOF
22189 rm -f conftest.$ac_objext conftest$ac_exeext
22190 if { (eval echo "$as_me:22190: \"$ac_link\"") >&5
22191   (eval $ac_link) 2>&5
22192   ac_status=$?
22193   echo "$as_me:22193: \$? = $ac_status" >&5
22194   (exit $ac_status); } &&
22195          { ac_try='test -s conftest$ac_exeext'
22196   { (eval echo "$as_me:22196: \"$ac_try\"") >&5
22197   (eval $ac_try) 2>&5
22198   ac_status=$?
22199   echo "$as_me:22199: \$? = $ac_status" >&5
22200   (exit $ac_status); }; }; then
22201   eval "$as_ac_var=yes"
22202 else
22203   echo "$as_me: failed program was:" >&5
22204 cat conftest.$ac_ext >&5
22205 eval "$as_ac_var=no"
22206 fi
22207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22208 fi
22209 echo "$as_me:22209: result: `eval echo '${'$as_ac_var'}'`" >&5
22210 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22211 if test `eval echo '${'$as_ac_var'}'` = yes; then
22212   cat >>confdefs.h <<EOF
22213 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22214 EOF
22215
22216 fi
22217 done
22218
22219 ac_cv_func_fork_works=$ac_cv_func_fork
22220 if test "x$ac_cv_func_fork" = xyes; then
22221   echo "$as_me:22221: checking for working fork" >&5
22222 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22223 if test "${ac_cv_func_fork_works+set}" = set; then
22224   echo $ECHO_N "(cached) $ECHO_C" >&6
22225 else
22226   if test "$cross_compiling" = yes; then
22227   ac_cv_func_fork_works=cross
22228 else
22229   cat >conftest.$ac_ext <<_ACEOF
22230 /* By Rüdiger Kuhlmann. */
22231       #include <sys/types.h>
22232       #if HAVE_UNISTD_H
22233       # include <unistd.h>
22234       #endif
22235       /* Some systems only have a dummy stub for fork() */
22236       int main (void)
22237       {
22238         if (fork() < 0)
22239           $ac_main_return (1);
22240         $ac_main_return (0);
22241       }
22242 _ACEOF
22243 rm -f conftest$ac_exeext
22244 if { (eval echo "$as_me:22244: \"$ac_link\"") >&5
22245   (eval $ac_link) 2>&5
22246   ac_status=$?
22247   echo "$as_me:22247: \$? = $ac_status" >&5
22248   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22249   { (eval echo "$as_me:22249: \"$ac_try\"") >&5
22250   (eval $ac_try) 2>&5
22251   ac_status=$?
22252   echo "$as_me:22252: \$? = $ac_status" >&5
22253   (exit $ac_status); }; }; then
22254   ac_cv_func_fork_works=yes
22255 else
22256   echo "$as_me: program exited with status $ac_status" >&5
22257 echo "$as_me: failed program was:" >&5
22258 cat conftest.$ac_ext >&5
22259 ac_cv_func_fork_works=no
22260 fi
22261 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22262 fi
22263 fi
22264 echo "$as_me:22264: result: $ac_cv_func_fork_works" >&5
22265 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22266
22267 fi
22268 if test "x$ac_cv_func_fork_works" = xcross; then
22269   case $host in
22270     *-*-amigaos* | *-*-msdosdjgpp*)
22271       # Override, as these systems have only a dummy fork() stub
22272       ac_cv_func_fork_works=no
22273       ;;
22274     *)
22275       ac_cv_func_fork_works=yes
22276       ;;
22277   esac
22278   { echo "$as_me:22278: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22279 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22280 fi
22281 ac_cv_func_vfork_works=$ac_cv_func_vfork
22282 if test "x$ac_cv_func_vfork" = xyes; then
22283   echo "$as_me:22283: checking for working vfork" >&5
22284 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22285 if test "${ac_cv_func_vfork_works+set}" = set; then
22286   echo $ECHO_N "(cached) $ECHO_C" >&6
22287 else
22288   if test "$cross_compiling" = yes; then
22289   ac_cv_func_vfork_works=cross
22290 else
22291   cat >conftest.$ac_ext <<_ACEOF
22292 #line 22292 "configure"
22293 #include "confdefs.h"
22294 /* Thanks to Paul Eggert for this test.  */
22295 #include <stdio.h>
22296 #include <sys/types.h>
22297 #include <sys/stat.h>
22298 #if HAVE_UNISTD_H
22299 # include <unistd.h>
22300 #endif
22301 #if HAVE_VFORK_H
22302 # include <vfork.h>
22303 #endif
22304 /* On some sparc systems, changes by the child to local and incoming
22305    argument registers are propagated back to the parent.  The compiler
22306    is told about this with #include <vfork.h>, but some compilers
22307    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22308    static variable whose address is put into a register that is
22309    clobbered by the vfork.  */
22310 static
22311 #ifdef __cplusplus
22312 sparc_address_test (int arg)
22313 # else
22314 sparc_address_test (arg) int arg;
22315 #endif
22316 {
22317   static pid_t child;
22318   if (!child) {
22319     child = vfork ();
22320     if (child < 0) {
22321       perror ("vfork");
22322       _exit(2);
22323     }
22324     if (!child) {
22325       arg = getpid();
22326       write(-1, "", 0);
22327       _exit (arg);
22328     }
22329   }
22330 }
22331
22332 int
22333 main (void)
22334 {
22335   pid_t parent = getpid ();
22336   pid_t child;
22337
22338   sparc_address_test ();
22339
22340   child = vfork ();
22341
22342   if (child == 0) {
22343     /* Here is another test for sparc vfork register problems.  This
22344        test uses lots of local variables, at least as many local
22345        variables as main has allocated so far including compiler
22346        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22347        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22348        reuse the register of parent for one of the local variables,
22349        since it will think that parent can't possibly be used any more
22350        in this routine.  Assigning to the local variable will thus
22351        munge parent in the parent process.  */
22352     pid_t
22353       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22354       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22355     /* Convince the compiler that p..p7 are live; otherwise, it might
22356        use the same hardware register for all 8 local variables.  */
22357     if (p != p1 || p != p2 || p != p3 || p != p4
22358         || p != p5 || p != p6 || p != p7)
22359       _exit(1);
22360
22361     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22362        from child file descriptors.  If the child closes a descriptor
22363        before it execs or exits, this munges the parent's descriptor
22364        as well.  Test for this by closing stdout in the child.  */
22365     _exit(close(fileno(stdout)) != 0);
22366   } else {
22367     int status;
22368     struct stat st;
22369
22370     while (wait(&status) != child)
22371       ;
22372     $ac_main_return(
22373          /* Was there some problem with vforking?  */
22374          child < 0
22375
22376          /* Did the child fail?  (This shouldn't happen.)  */
22377          || status
22378
22379          /* Did the vfork/compiler bug occur?  */
22380          || parent != getpid()
22381
22382          /* Did the file descriptor bug occur?  */
22383          || fstat(fileno(stdout), &st) != 0
22384          );
22385   }
22386 }
22387 _ACEOF
22388 rm -f conftest$ac_exeext
22389 if { (eval echo "$as_me:22389: \"$ac_link\"") >&5
22390   (eval $ac_link) 2>&5
22391   ac_status=$?
22392   echo "$as_me:22392: \$? = $ac_status" >&5
22393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22394   { (eval echo "$as_me:22394: \"$ac_try\"") >&5
22395   (eval $ac_try) 2>&5
22396   ac_status=$?
22397   echo "$as_me:22397: \$? = $ac_status" >&5
22398   (exit $ac_status); }; }; then
22399   ac_cv_func_vfork_works=yes
22400 else
22401   echo "$as_me: program exited with status $ac_status" >&5
22402 echo "$as_me: failed program was:" >&5
22403 cat conftest.$ac_ext >&5
22404 ac_cv_func_vfork_works=no
22405 fi
22406 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22407 fi
22408 fi
22409 echo "$as_me:22409: result: $ac_cv_func_vfork_works" >&5
22410 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22411
22412 fi;
22413 if test "x$ac_cv_func_fork_works" = xcross; then
22414   ac_cv_func_vfork_works=ac_cv_func_vfork
22415   { echo "$as_me:22415: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22416 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22417 fi
22418
22419 if test "x$ac_cv_func_vfork_works" = xyes; then
22420
22421 cat >>confdefs.h <<\EOF
22422 #define HAVE_WORKING_VFORK 1
22423 EOF
22424
22425 else
22426
22427 cat >>confdefs.h <<\EOF
22428 #define vfork fork
22429 EOF
22430
22431 fi
22432 if test "x$ac_cv_func_fork_works" = xyes; then
22433
22434 cat >>confdefs.h <<\EOF
22435 #define HAVE_WORKING_FORK 1
22436 EOF
22437
22438 fi
22439
22440 echo "$as_me:22440: checking if fopen accepts explicit binary mode" >&5
22441 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22442 if test "${cf_cv_fopen_bin_r+set}" = set; then
22443   echo $ECHO_N "(cached) $ECHO_C" >&6
22444 else
22445
22446         if test "$cross_compiling" = yes; then
22447   cf_cv_fopen_bin_r=unknown
22448 else
22449   cat >conftest.$ac_ext <<_ACEOF
22450 #line 22450 "configure"
22451 #include "confdefs.h"
22452
22453 #include <stdio.h>
22454 int main(void) {
22455         FILE *fp = fopen("conftest.tmp", "wb");
22456         int rc = 0;
22457         if (fp != 0) {
22458                 int p, q;
22459                 for (p = 0; p < 256; ++p) {
22460                         fputc(p, fp);
22461                 }
22462                 fclose(fp);
22463                 fp = fopen("conftest.tmp", "rb");
22464                 if (fp != 0) {
22465                         for (p = 0; p < 256; ++p) {
22466                                 q = fgetc(fp);
22467                                 if (q != p) {
22468                                         rc = 1;
22469                                         break;
22470                                 }
22471                         }
22472                 } else {
22473                         rc = 1;
22474                 }
22475         } else {
22476                 rc = 1;
22477         }
22478         ${cf_cv_main_return:-return} (rc);
22479 }
22480
22481 _ACEOF
22482 rm -f conftest$ac_exeext
22483 if { (eval echo "$as_me:22483: \"$ac_link\"") >&5
22484   (eval $ac_link) 2>&5
22485   ac_status=$?
22486   echo "$as_me:22486: \$? = $ac_status" >&5
22487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22488   { (eval echo "$as_me:22488: \"$ac_try\"") >&5
22489   (eval $ac_try) 2>&5
22490   ac_status=$?
22491   echo "$as_me:22491: \$? = $ac_status" >&5
22492   (exit $ac_status); }; }; then
22493   cf_cv_fopen_bin_r=yes
22494 else
22495   echo "$as_me: program exited with status $ac_status" >&5
22496 echo "$as_me: failed program was:" >&5
22497 cat conftest.$ac_ext >&5
22498 cf_cv_fopen_bin_r=no
22499 fi
22500 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22501 fi
22502
22503 fi
22504 echo "$as_me:22504: result: $cf_cv_fopen_bin_r" >&5
22505 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22506 test "x$cf_cv_fopen_bin_r" != xno &&
22507 cat >>confdefs.h <<\EOF
22508 #define USE_FOPEN_BIN_R 1
22509 EOF
22510
22511 # special check for test/ditto.c
22512
22513 echo "$as_me:22513: checking for openpty in -lutil" >&5
22514 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22515 if test "${ac_cv_lib_util_openpty+set}" = set; then
22516   echo $ECHO_N "(cached) $ECHO_C" >&6
22517 else
22518   ac_check_lib_save_LIBS=$LIBS
22519 LIBS="-lutil  $LIBS"
22520 cat >conftest.$ac_ext <<_ACEOF
22521 #line 22521 "configure"
22522 #include "confdefs.h"
22523
22524 /* Override any gcc2 internal prototype to avoid an error.  */
22525 #ifdef __cplusplus
22526 extern "C"
22527 #endif
22528 /* We use char because int might match the return type of a gcc2
22529    builtin and then its argument prototype would still apply.  */
22530 char openpty ();
22531 int
22532 main (void)
22533 {
22534 openpty ();
22535   ;
22536   return 0;
22537 }
22538 _ACEOF
22539 rm -f conftest.$ac_objext conftest$ac_exeext
22540 if { (eval echo "$as_me:22540: \"$ac_link\"") >&5
22541   (eval $ac_link) 2>&5
22542   ac_status=$?
22543   echo "$as_me:22543: \$? = $ac_status" >&5
22544   (exit $ac_status); } &&
22545          { ac_try='test -s conftest$ac_exeext'
22546   { (eval echo "$as_me:22546: \"$ac_try\"") >&5
22547   (eval $ac_try) 2>&5
22548   ac_status=$?
22549   echo "$as_me:22549: \$? = $ac_status" >&5
22550   (exit $ac_status); }; }; then
22551   ac_cv_lib_util_openpty=yes
22552 else
22553   echo "$as_me: failed program was:" >&5
22554 cat conftest.$ac_ext >&5
22555 ac_cv_lib_util_openpty=no
22556 fi
22557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22558 LIBS=$ac_check_lib_save_LIBS
22559 fi
22560 echo "$as_me:22560: result: $ac_cv_lib_util_openpty" >&5
22561 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22562 if test $ac_cv_lib_util_openpty = yes; then
22563   cf_cv_lib_util=yes
22564 else
22565   cf_cv_lib_util=no
22566 fi
22567
22568 echo "$as_me:22568: checking for openpty header" >&5
22569 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22570 if test "${cf_cv_func_openpty+set}" = set; then
22571   echo $ECHO_N "(cached) $ECHO_C" >&6
22572 else
22573
22574         cf_save_LIBS="$LIBS"
22575         test $cf_cv_lib_util = yes && {
22576 cf_add_libs="$LIBS"
22577 # reverse order
22578 cf_add_0lib=
22579 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22580 # filter duplicates
22581 for cf_add_1lib in $cf_add_0lib; do
22582         for cf_add_2lib in $cf_add_libs; do
22583                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22584                         cf_add_1lib=
22585                         break
22586                 fi
22587         done
22588         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22589 done
22590 LIBS="$cf_add_libs"
22591  }
22592         for cf_header in pty.h libutil.h util.h
22593         do
22594         cat >conftest.$ac_ext <<_ACEOF
22595 #line 22595 "configure"
22596 #include "confdefs.h"
22597
22598 #include <$cf_header>
22599
22600 int
22601 main (void)
22602 {
22603
22604         int x = openpty((int *)0, (int *)0, (char *)0,
22605                                    (struct termios *)0, (struct winsize *)0);
22606
22607   ;
22608   return 0;
22609 }
22610 _ACEOF
22611 rm -f conftest.$ac_objext conftest$ac_exeext
22612 if { (eval echo "$as_me:22612: \"$ac_link\"") >&5
22613   (eval $ac_link) 2>&5
22614   ac_status=$?
22615   echo "$as_me:22615: \$? = $ac_status" >&5
22616   (exit $ac_status); } &&
22617          { ac_try='test -s conftest$ac_exeext'
22618   { (eval echo "$as_me:22618: \"$ac_try\"") >&5
22619   (eval $ac_try) 2>&5
22620   ac_status=$?
22621   echo "$as_me:22621: \$? = $ac_status" >&5
22622   (exit $ac_status); }; }; then
22623
22624                 cf_cv_func_openpty=$cf_header
22625                 break
22626
22627 else
22628   echo "$as_me: failed program was:" >&5
22629 cat conftest.$ac_ext >&5
22630
22631                 cf_cv_func_openpty=no
22632
22633 fi
22634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22635         done
22636         LIBS="$cf_save_LIBS"
22637
22638 fi
22639 echo "$as_me:22639: result: $cf_cv_func_openpty" >&5
22640 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22641
22642 if test "$cf_cv_func_openpty" != no ; then
22643
22644 cat >>confdefs.h <<EOF
22645 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22646 EOF
22647
22648 cat >>confdefs.h <<\EOF
22649 #define USE_XTERM_PTY 1
22650 EOF
22651
22652         if test "x$cf_cv_lib_util" = xyes ; then
22653
22654 cf_add_libs="$TEST_LIBS"
22655 # reverse order
22656 cf_add_0lib=
22657 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22658 # filter duplicates
22659 for cf_add_1lib in $cf_add_0lib; do
22660         for cf_add_2lib in $cf_add_libs; do
22661                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22662                         cf_add_1lib=
22663                         break
22664                 fi
22665         done
22666         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22667 done
22668 TEST_LIBS="$cf_add_libs"
22669
22670         fi
22671 fi
22672
22673 if test "$with_hashed_db" != no ; then
22674
22675 cat >>confdefs.h <<\EOF
22676 #define USE_HASHED_DB 1
22677 EOF
22678
22679 case $with_hashed_db in
22680 (yes|*able*)
22681         ;;
22682 (*)
22683         if test -d "$with_hashed_db" ; then
22684
22685 if test -n "$with_hashed_db/include" ; then
22686   for cf_add_incdir in $with_hashed_db/include
22687   do
22688         while test $cf_add_incdir != /usr/include
22689         do
22690           if test -d $cf_add_incdir
22691           then
22692                 cf_have_incdir=no
22693                 if test -n "$CFLAGS$CPPFLAGS" ; then
22694                   # a loop is needed to ensure we can add subdirs of existing dirs
22695                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22696                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22697                           cf_have_incdir=yes; break
22698                         fi
22699                   done
22700                 fi
22701
22702                 if test "$cf_have_incdir" = no ; then
22703                   if test "$cf_add_incdir" = /usr/local/include ; then
22704                         if test "$GCC" = yes
22705                         then
22706                           cf_save_CPPFLAGS=$CPPFLAGS
22707
22708         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22709         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22710
22711                           cat >conftest.$ac_ext <<_ACEOF
22712 #line 22712 "configure"
22713 #include "confdefs.h"
22714 #include <stdio.h>
22715 int
22716 main (void)
22717 {
22718 printf("Hello")
22719   ;
22720   return 0;
22721 }
22722 _ACEOF
22723 rm -f conftest.$ac_objext
22724 if { (eval echo "$as_me:22724: \"$ac_compile\"") >&5
22725   (eval $ac_compile) 2>&5
22726   ac_status=$?
22727   echo "$as_me:22727: \$? = $ac_status" >&5
22728   (exit $ac_status); } &&
22729          { ac_try='test -s conftest.$ac_objext'
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   :
22736 else
22737   echo "$as_me: failed program was:" >&5
22738 cat conftest.$ac_ext >&5
22739 cf_have_incdir=yes
22740 fi
22741 rm -f conftest.$ac_objext conftest.$ac_ext
22742                           CPPFLAGS=$cf_save_CPPFLAGS
22743                         fi
22744                   fi
22745                 fi
22746
22747                 if test "$cf_have_incdir" = no ; then
22748                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22749
22750 echo "${as_me:-configure}:22750: testing adding $cf_add_incdir to include-path ..." 1>&5
22751
22752                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22753
22754                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22755                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22756                   cf_add_incdir="$cf_top_incdir"
22757                 else
22758                   break
22759                 fi
22760           else
22761                 break
22762           fi
22763         done
22764   done
22765 fi
22766
22767 if test -n "$with_hashed_db/lib" ; then
22768         for cf_add_libdir in $with_hashed_db/lib
22769         do
22770                 if test $cf_add_libdir = /usr/lib ; then
22771                         :
22772                 elif test -d $cf_add_libdir
22773                 then
22774                         cf_have_libdir=no
22775                         if test -n "$LDFLAGS$LIBS" ; then
22776                                 # a loop is needed to ensure we can add subdirs of existing dirs
22777                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22778                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22779                                                 cf_have_libdir=yes; break
22780                                         fi
22781                                 done
22782                         fi
22783                         if test "$cf_have_libdir" = no ; then
22784                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22785
22786 echo "${as_me:-configure}:22786: testing adding $cf_add_libdir to library-path ..." 1>&5
22787
22788                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22789                         fi
22790                 fi
22791         done
22792 fi
22793
22794         else
22795                 case "$with_hashed_db" in
22796                 (./*|../*|/*)
22797                         { echo "$as_me:22797: WARNING: no such directory $with_hashed_db" >&5
22798 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22799                         ;;
22800                 (*)
22801
22802 cf_search=
22803
22804 test "x$prefix" != "xNONE" && \
22805 test -d "$prefix" && \
22806  {
22807         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22808         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22809         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22810         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22811         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22812         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22813 }
22814
22815 for cf_subdir_prefix in \
22816         /usr \
22817         /usr/local \
22818         /usr/pkg \
22819         /opt \
22820         /opt/local \
22821         $HOME
22822 do
22823
22824 test "x$cf_subdir_prefix" != "x$prefix" && \
22825 test -d "$cf_subdir_prefix" && \
22826 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22827         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22828         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22829         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22830         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22831         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22832         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"
22833 }
22834
22835 done
22836
22837         for cf_item in $cf_search
22838         do
22839                 case $cf_item in
22840                 (*/$with_hashed_db)
22841
22842 if test -n "$cf_item" ; then
22843   for cf_add_incdir in $cf_item
22844   do
22845         while test $cf_add_incdir != /usr/include
22846         do
22847           if test -d $cf_add_incdir
22848           then
22849                 cf_have_incdir=no
22850                 if test -n "$CFLAGS$CPPFLAGS" ; then
22851                   # a loop is needed to ensure we can add subdirs of existing dirs
22852                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22853                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22854                           cf_have_incdir=yes; break
22855                         fi
22856                   done
22857                 fi
22858
22859                 if test "$cf_have_incdir" = no ; then
22860                   if test "$cf_add_incdir" = /usr/local/include ; then
22861                         if test "$GCC" = yes
22862                         then
22863                           cf_save_CPPFLAGS=$CPPFLAGS
22864
22865         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22866         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22867
22868                           cat >conftest.$ac_ext <<_ACEOF
22869 #line 22869 "configure"
22870 #include "confdefs.h"
22871 #include <stdio.h>
22872 int
22873 main (void)
22874 {
22875 printf("Hello")
22876   ;
22877   return 0;
22878 }
22879 _ACEOF
22880 rm -f conftest.$ac_objext
22881 if { (eval echo "$as_me:22881: \"$ac_compile\"") >&5
22882   (eval $ac_compile) 2>&5
22883   ac_status=$?
22884   echo "$as_me:22884: \$? = $ac_status" >&5
22885   (exit $ac_status); } &&
22886          { ac_try='test -s conftest.$ac_objext'
22887   { (eval echo "$as_me:22887: \"$ac_try\"") >&5
22888   (eval $ac_try) 2>&5
22889   ac_status=$?
22890   echo "$as_me:22890: \$? = $ac_status" >&5
22891   (exit $ac_status); }; }; then
22892   :
22893 else
22894   echo "$as_me: failed program was:" >&5
22895 cat conftest.$ac_ext >&5
22896 cf_have_incdir=yes
22897 fi
22898 rm -f conftest.$ac_objext conftest.$ac_ext
22899                           CPPFLAGS=$cf_save_CPPFLAGS
22900                         fi
22901                   fi
22902                 fi
22903
22904                 if test "$cf_have_incdir" = no ; then
22905                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22906
22907 echo "${as_me:-configure}:22907: testing adding $cf_add_incdir to include-path ..." 1>&5
22908
22909                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22910
22911                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22912                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22913                   cf_add_incdir="$cf_top_incdir"
22914                 else
22915                   break
22916                 fi
22917           else
22918                 break
22919           fi
22920         done
22921   done
22922 fi
22923
22924                         ;;
22925                 esac
22926         done
22927
22928 cf_search=
22929
22930 test "x$prefix" != "xNONE" && \
22931 test -d "$prefix" && \
22932  {
22933         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22934         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22935         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22936         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22937         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22938         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22939 }
22940
22941 for cf_subdir_prefix in \
22942         /usr \
22943         /usr/local \
22944         /usr/pkg \
22945         /opt \
22946         /opt/local \
22947         $HOME
22948 do
22949
22950 test "x$cf_subdir_prefix" != "x$prefix" && \
22951 test -d "$cf_subdir_prefix" && \
22952 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22953         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22954         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22955         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22956         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22957         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22958         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"
22959 }
22960
22961 done
22962
22963         for cf_item in $cf_search
22964         do
22965                 case $cf_item in
22966                 (*/$with_hashed_db)
22967
22968 if test -n "$cf_item" ; then
22969         for cf_add_libdir in $cf_item
22970         do
22971                 if test $cf_add_libdir = /usr/lib ; then
22972                         :
22973                 elif test -d $cf_add_libdir
22974                 then
22975                         cf_have_libdir=no
22976                         if test -n "$LDFLAGS$LIBS" ; then
22977                                 # a loop is needed to ensure we can add subdirs of existing dirs
22978                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22979                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22980                                                 cf_have_libdir=yes; break
22981                                         fi
22982                                 done
22983                         fi
22984                         if test "$cf_have_libdir" = no ; then
22985                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22986
22987 echo "${as_me:-configure}:22987: testing adding $cf_add_libdir to library-path ..." 1>&5
22988
22989                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22990                         fi
22991                 fi
22992         done
22993 fi
22994
22995                         ;;
22996                 esac
22997         done
22998
22999                         ;;
23000                 esac
23001         fi
23002 esac
23003
23004 echo "$as_me:23004: checking for db.h" >&5
23005 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23006 if test "${ac_cv_header_db_h+set}" = set; then
23007   echo $ECHO_N "(cached) $ECHO_C" >&6
23008 else
23009   cat >conftest.$ac_ext <<_ACEOF
23010 #line 23010 "configure"
23011 #include "confdefs.h"
23012 #include <db.h>
23013 _ACEOF
23014 if { (eval echo "$as_me:23014: \"$ac_cpp conftest.$ac_ext\"") >&5
23015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23016   ac_status=$?
23017   egrep -v '^ *\+' conftest.er1 >conftest.err
23018   rm -f conftest.er1
23019   cat conftest.err >&5
23020   echo "$as_me:23020: \$? = $ac_status" >&5
23021   (exit $ac_status); } >/dev/null; then
23022   if test -s conftest.err; then
23023     ac_cpp_err=$ac_c_preproc_warn_flag
23024   else
23025     ac_cpp_err=
23026   fi
23027 else
23028   ac_cpp_err=yes
23029 fi
23030 if test -z "$ac_cpp_err"; then
23031   ac_cv_header_db_h=yes
23032 else
23033   echo "$as_me: failed program was:" >&5
23034   cat conftest.$ac_ext >&5
23035   ac_cv_header_db_h=no
23036 fi
23037 rm -f conftest.err conftest.$ac_ext
23038 fi
23039 echo "$as_me:23039: result: $ac_cv_header_db_h" >&5
23040 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23041 if test $ac_cv_header_db_h = yes; then
23042
23043 echo "$as_me:23043: checking for version of db" >&5
23044 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23045 if test "${cf_cv_hashed_db_version+set}" = set; then
23046   echo $ECHO_N "(cached) $ECHO_C" >&6
23047 else
23048
23049 cf_cv_hashed_db_version=unknown
23050
23051 for cf_db_version in 1 2 3 4 5 6
23052 do
23053
23054 echo "${as_me:-configure}:23054: testing checking for db version $cf_db_version ..." 1>&5
23055
23056         cat >conftest.$ac_ext <<_ACEOF
23057 #line 23057 "configure"
23058 #include "confdefs.h"
23059
23060 $ac_includes_default
23061 #include <db.h>
23062
23063 #ifdef DB_VERSION_MAJOR
23064         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23065 #if $cf_db_version == DB_VERSION_MAJOR
23066         /* ok */
23067 #else
23068         make an error
23069 #endif
23070 #else
23071 #if $cf_db_version == 1
23072         /* ok: assuming this is DB 1.8.5 */
23073 #else
23074         make an error
23075 #endif
23076 #endif
23077
23078 int
23079 main (void)
23080 {
23081 DBT *foo = 0
23082   ;
23083   return 0;
23084 }
23085 _ACEOF
23086 rm -f conftest.$ac_objext
23087 if { (eval echo "$as_me:23087: \"$ac_compile\"") >&5
23088   (eval $ac_compile) 2>&5
23089   ac_status=$?
23090   echo "$as_me:23090: \$? = $ac_status" >&5
23091   (exit $ac_status); } &&
23092          { ac_try='test -s conftest.$ac_objext'
23093   { (eval echo "$as_me:23093: \"$ac_try\"") >&5
23094   (eval $ac_try) 2>&5
23095   ac_status=$?
23096   echo "$as_me:23096: \$? = $ac_status" >&5
23097   (exit $ac_status); }; }; then
23098
23099         cf_cv_hashed_db_version=$cf_db_version
23100         break
23101
23102 else
23103   echo "$as_me: failed program was:" >&5
23104 cat conftest.$ac_ext >&5
23105 fi
23106 rm -f conftest.$ac_objext conftest.$ac_ext
23107 done
23108
23109 fi
23110 echo "$as_me:23110: result: $cf_cv_hashed_db_version" >&5
23111 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23112
23113 if test "$cf_cv_hashed_db_version" = unknown ; then
23114         { { echo "$as_me:23114: error: Cannot determine version of db" >&5
23115 echo "$as_me: error: Cannot determine version of db" >&2;}
23116    { (exit 1); exit 1; }; }
23117 else
23118
23119 echo "$as_me:23119: checking for db libraries" >&5
23120 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23121 if test "${cf_cv_hashed_db_libs+set}" = set; then
23122   echo $ECHO_N "(cached) $ECHO_C" >&6
23123 else
23124
23125 cf_cv_hashed_db_libs=unknown
23126 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23127 do
23128         cf_save_libs="$LIBS"
23129         if test -n "$cf_db_libs"; then
23130
23131 cf_add_libs="$LIBS"
23132 # reverse order
23133 cf_add_0lib=
23134 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23135 # filter duplicates
23136 for cf_add_1lib in $cf_add_0lib; do
23137         for cf_add_2lib in $cf_add_libs; do
23138                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23139                         cf_add_1lib=
23140                         break
23141                 fi
23142         done
23143         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23144 done
23145 LIBS="$cf_add_libs"
23146
23147         fi
23148
23149 echo "${as_me:-configure}:23149: testing checking for library "$cf_db_libs" ..." 1>&5
23150
23151         cat >conftest.$ac_ext <<_ACEOF
23152 #line 23152 "configure"
23153 #include "confdefs.h"
23154
23155 $ac_includes_default
23156 #include <db.h>
23157
23158 int
23159 main (void)
23160 {
23161
23162         char *path = "/tmp/foo";
23163 #ifdef DB_VERSION_MAJOR
23164 #if DB_VERSION_MAJOR >= 4
23165         DB *result = 0;
23166         db_create(&result, NULL, 0);
23167         result->open(result,
23168                 NULL,
23169                 path,
23170                 path,
23171                 DB_HASH,
23172                 DB_CREATE,
23173                 0644);
23174 #elif DB_VERSION_MAJOR >= 3
23175         DB *result = 0;
23176         db_create(&result, NULL, 0);
23177         result->open(result,
23178                 path,
23179                 path,
23180                 DB_HASH,
23181                 DB_CREATE,
23182                 0644);
23183 #elif DB_VERSION_MAJOR >= 2
23184         DB *result = 0;
23185         db_open(path,
23186                 DB_HASH,
23187                 DB_CREATE,
23188                 0644,
23189                 (DB_ENV *) 0,
23190                 (DB_INFO *) 0,
23191                 &result);
23192 #endif /* DB_VERSION_MAJOR */
23193 #else
23194         DB *result = dbopen(path,
23195                      2,
23196                      0644,
23197                      DB_HASH,
23198                      0);
23199 #endif
23200         ${cf_cv_main_return:-return}(result != 0)
23201
23202   ;
23203   return 0;
23204 }
23205 _ACEOF
23206 rm -f conftest.$ac_objext conftest$ac_exeext
23207 if { (eval echo "$as_me:23207: \"$ac_link\"") >&5
23208   (eval $ac_link) 2>&5
23209   ac_status=$?
23210   echo "$as_me:23210: \$? = $ac_status" >&5
23211   (exit $ac_status); } &&
23212          { ac_try='test -s conftest$ac_exeext'
23213   { (eval echo "$as_me:23213: \"$ac_try\"") >&5
23214   (eval $ac_try) 2>&5
23215   ac_status=$?
23216   echo "$as_me:23216: \$? = $ac_status" >&5
23217   (exit $ac_status); }; }; then
23218
23219         if test -n "$cf_db_libs" ; then
23220                 cf_cv_hashed_db_libs=$cf_db_libs
23221         else
23222                 cf_cv_hashed_db_libs=default
23223         fi
23224         LIBS="$cf_save_libs"
23225         break
23226
23227 else
23228   echo "$as_me: failed program was:" >&5
23229 cat conftest.$ac_ext >&5
23230 fi
23231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23232         LIBS="$cf_save_libs"
23233 done
23234
23235 fi
23236 echo "$as_me:23236: result: $cf_cv_hashed_db_libs" >&5
23237 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23238
23239         if test "$cf_cv_hashed_db_libs" = unknown ; then
23240                 { { echo "$as_me:23240: error: Cannot determine library for db" >&5
23241 echo "$as_me: error: Cannot determine library for db" >&2;}
23242    { (exit 1); exit 1; }; }
23243         elif test "$cf_cv_hashed_db_libs" != default ; then
23244
23245 cf_add_libs="$LIBS"
23246 # reverse order
23247 cf_add_0lib=
23248 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23249 # filter duplicates
23250 for cf_add_1lib in $cf_add_0lib; do
23251         for cf_add_2lib in $cf_add_libs; do
23252                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23253                         cf_add_1lib=
23254                         break
23255                 fi
23256         done
23257         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23258 done
23259 LIBS="$cf_add_libs"
23260
23261         fi
23262 fi
23263
23264 else
23265
23266         { { echo "$as_me:23266: error: Cannot find db.h" >&5
23267 echo "$as_me: error: Cannot find db.h" >&2;}
23268    { (exit 1); exit 1; }; }
23269
23270 fi
23271
23272 fi
23273
23274 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23275         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23276         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23277 fi
23278
23279 # Just in case, check if the C compiler has a bool type.
23280
23281 echo "$as_me:23281: checking if we should include stdbool.h" >&5
23282 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23283
23284 if test "${cf_cv_header_stdbool_h+set}" = set; then
23285   echo $ECHO_N "(cached) $ECHO_C" >&6
23286 else
23287
23288         cat >conftest.$ac_ext <<_ACEOF
23289 #line 23289 "configure"
23290 #include "confdefs.h"
23291
23292 int
23293 main (void)
23294 {
23295 bool foo = false
23296   ;
23297   return 0;
23298 }
23299 _ACEOF
23300 rm -f conftest.$ac_objext
23301 if { (eval echo "$as_me:23301: \"$ac_compile\"") >&5
23302   (eval $ac_compile) 2>&5
23303   ac_status=$?
23304   echo "$as_me:23304: \$? = $ac_status" >&5
23305   (exit $ac_status); } &&
23306          { ac_try='test -s conftest.$ac_objext'
23307   { (eval echo "$as_me:23307: \"$ac_try\"") >&5
23308   (eval $ac_try) 2>&5
23309   ac_status=$?
23310   echo "$as_me:23310: \$? = $ac_status" >&5
23311   (exit $ac_status); }; }; then
23312   cf_cv_header_stdbool_h=0
23313 else
23314   echo "$as_me: failed program was:" >&5
23315 cat conftest.$ac_ext >&5
23316 cat >conftest.$ac_ext <<_ACEOF
23317 #line 23317 "configure"
23318 #include "confdefs.h"
23319
23320 #ifndef __BEOS__
23321 #include <stdbool.h>
23322 #endif
23323
23324 int
23325 main (void)
23326 {
23327 bool foo = false
23328   ;
23329   return 0;
23330 }
23331 _ACEOF
23332 rm -f conftest.$ac_objext
23333 if { (eval echo "$as_me:23333: \"$ac_compile\"") >&5
23334   (eval $ac_compile) 2>&5
23335   ac_status=$?
23336   echo "$as_me:23336: \$? = $ac_status" >&5
23337   (exit $ac_status); } &&
23338          { ac_try='test -s conftest.$ac_objext'
23339   { (eval echo "$as_me:23339: \"$ac_try\"") >&5
23340   (eval $ac_try) 2>&5
23341   ac_status=$?
23342   echo "$as_me:23342: \$? = $ac_status" >&5
23343   (exit $ac_status); }; }; then
23344   cf_cv_header_stdbool_h=1
23345 else
23346   echo "$as_me: failed program was:" >&5
23347 cat conftest.$ac_ext >&5
23348 cf_cv_header_stdbool_h=0
23349 fi
23350 rm -f conftest.$ac_objext conftest.$ac_ext
23351 fi
23352 rm -f conftest.$ac_objext conftest.$ac_ext
23353 fi
23354
23355 if test "$cf_cv_header_stdbool_h" = 1
23356 then    echo "$as_me:23356: result: yes" >&5
23357 echo "${ECHO_T}yes" >&6
23358 else    echo "$as_me:23358: result: no" >&5
23359 echo "${ECHO_T}no" >&6
23360 fi
23361
23362 echo "$as_me:23362: checking for builtin bool type" >&5
23363 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23364
23365 if test "${cf_cv_cc_bool_type+set}" = set; then
23366   echo $ECHO_N "(cached) $ECHO_C" >&6
23367 else
23368
23369         cat >conftest.$ac_ext <<_ACEOF
23370 #line 23370 "configure"
23371 #include "confdefs.h"
23372
23373 #include <stdio.h>
23374 #include <sys/types.h>
23375
23376 int
23377 main (void)
23378 {
23379 bool x = false
23380   ;
23381   return 0;
23382 }
23383 _ACEOF
23384 rm -f conftest.$ac_objext
23385 if { (eval echo "$as_me:23385: \"$ac_compile\"") >&5
23386   (eval $ac_compile) 2>&5
23387   ac_status=$?
23388   echo "$as_me:23388: \$? = $ac_status" >&5
23389   (exit $ac_status); } &&
23390          { ac_try='test -s conftest.$ac_objext'
23391   { (eval echo "$as_me:23391: \"$ac_try\"") >&5
23392   (eval $ac_try) 2>&5
23393   ac_status=$?
23394   echo "$as_me:23394: \$? = $ac_status" >&5
23395   (exit $ac_status); }; }; then
23396   cf_cv_cc_bool_type=1
23397 else
23398   echo "$as_me: failed program was:" >&5
23399 cat conftest.$ac_ext >&5
23400 cf_cv_cc_bool_type=0
23401 fi
23402 rm -f conftest.$ac_objext conftest.$ac_ext
23403
23404 fi
23405
23406 if test "$cf_cv_cc_bool_type" = 1
23407 then    echo "$as_me:23407: result: yes" >&5
23408 echo "${ECHO_T}yes" >&6
23409 else    echo "$as_me:23409: result: no" >&5
23410 echo "${ECHO_T}no" >&6
23411 fi
23412
23413 # Check for C++ compiler characteristics (and ensure that it's there!)
23414 if test -n "$CXX" ; then
23415         ac_ext=cc
23416 ac_cpp='$CXXCPP $CPPFLAGS'
23417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23420 ac_main_return=return
23421
23422 if test -n "$GXX" ; then
23423
23424         cf_save="$LIBS"
23425         LIBS="$LIBS $CXXLIBS"
23426         echo "$as_me:23426: checking if we already have C++ library" >&5
23427 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23428         cat >conftest.$ac_ext <<_ACEOF
23429 #line 23429 "configure"
23430 #include "confdefs.h"
23431
23432                         #include <iostream>
23433 int
23434 main (void)
23435 {
23436
23437                         std::cout << "Hello World!" << std::endl;
23438   ;
23439   return 0;
23440 }
23441 _ACEOF
23442 rm -f conftest.$ac_objext conftest$ac_exeext
23443 if { (eval echo "$as_me:23443: \"$ac_link\"") >&5
23444   (eval $ac_link) 2>&5
23445   ac_status=$?
23446   echo "$as_me:23446: \$? = $ac_status" >&5
23447   (exit $ac_status); } &&
23448          { ac_try='test -s conftest$ac_exeext'
23449   { (eval echo "$as_me:23449: \"$ac_try\"") >&5
23450   (eval $ac_try) 2>&5
23451   ac_status=$?
23452   echo "$as_me:23452: \$? = $ac_status" >&5
23453   (exit $ac_status); }; }; then
23454   cf_have_libstdcpp=yes
23455 else
23456   echo "$as_me: failed program was:" >&5
23457 cat conftest.$ac_ext >&5
23458 cf_have_libstdcpp=no
23459 fi
23460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23461         echo "$as_me:23461: result: $cf_have_libstdcpp" >&5
23462 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23463         LIBS="$cf_save"
23464
23465         if test $cf_have_libstdcpp != yes
23466         then
23467                 case $cf_cv_system_name in
23468                 (os2*)
23469                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23470                                 cf_stdcpp_libname=stdcpp
23471                         else
23472                                 cf_stdcpp_libname=stdc++
23473                         fi
23474                         ;;
23475                 (*)
23476                         cf_stdcpp_libname=stdc++
23477                         ;;
23478                 esac
23479
23480                 echo "$as_me:23480: checking for library $cf_stdcpp_libname" >&5
23481 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23482 if test "${cf_cv_libstdcpp+set}" = set; then
23483   echo $ECHO_N "(cached) $ECHO_C" >&6
23484 else
23485
23486                         cf_save="$LIBS"
23487                         LIBS="$LIBS $CXXLIBS"
23488
23489 cf_add_libs="$LIBS"
23490 # reverse order
23491 cf_add_0lib=
23492 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23493 # filter duplicates
23494 for cf_add_1lib in $cf_add_0lib; do
23495         for cf_add_2lib in $cf_add_libs; do
23496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23497                         cf_add_1lib=
23498                         break
23499                 fi
23500         done
23501         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23502 done
23503 LIBS="$cf_add_libs"
23504
23505                 cat >conftest.$ac_ext <<_ACEOF
23506 #line 23506 "configure"
23507 #include "confdefs.h"
23508
23509                                 #include <iostream>
23510 int
23511 main (void)
23512 {
23513
23514                                 std::cout << "Hello World!" << std::endl;
23515   ;
23516   return 0;
23517 }
23518 _ACEOF
23519 rm -f conftest.$ac_objext conftest$ac_exeext
23520 if { (eval echo "$as_me:23520: \"$ac_link\"") >&5
23521   (eval $ac_link) 2>&5
23522   ac_status=$?
23523   echo "$as_me:23523: \$? = $ac_status" >&5
23524   (exit $ac_status); } &&
23525          { ac_try='test -s conftest$ac_exeext'
23526   { (eval echo "$as_me:23526: \"$ac_try\"") >&5
23527   (eval $ac_try) 2>&5
23528   ac_status=$?
23529   echo "$as_me:23529: \$? = $ac_status" >&5
23530   (exit $ac_status); }; }; then
23531   cf_cv_libstdcpp=yes
23532 else
23533   echo "$as_me: failed program was:" >&5
23534 cat conftest.$ac_ext >&5
23535 cf_cv_libstdcpp=no
23536 fi
23537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23538                         LIBS="$cf_save"
23539
23540 fi
23541 echo "$as_me:23541: result: $cf_cv_libstdcpp" >&5
23542 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23543                 test "$cf_cv_libstdcpp" = yes && {
23544 cf_add_libs="$CXXLIBS"
23545 # reverse order
23546 cf_add_0lib=
23547 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23548 # filter duplicates
23549 for cf_add_1lib in $cf_add_0lib; do
23550         for cf_add_2lib in $cf_add_libs; do
23551                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23552                         cf_add_1lib=
23553                         break
23554                 fi
23555         done
23556         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23557 done
23558 CXXLIBS="$cf_add_libs"
23559  }
23560         fi
23561 fi
23562
23563         echo "$as_me:23563: checking whether $CXX understands -c and -o together" >&5
23564 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23565 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23566   echo $ECHO_N "(cached) $ECHO_C" >&6
23567 else
23568
23569 cat > conftest.$ac_ext <<CF_EOF
23570 int main(void)
23571 {
23572         ${cf_cv_main_return:-return}(0);
23573 }
23574 CF_EOF
23575 # We do the test twice because some compilers refuse to overwrite an
23576 # existing .o file with -o, though they will create one.
23577 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23578 if { (eval echo "$as_me:23578: \"$ac_try\"") >&5
23579   (eval $ac_try) 2>&5
23580   ac_status=$?
23581   echo "$as_me:23581: \$? = $ac_status" >&5
23582   (exit $ac_status); } &&
23583   test -f conftest2.$ac_objext && { (eval echo "$as_me:23583: \"$ac_try\"") >&5
23584   (eval $ac_try) 2>&5
23585   ac_status=$?
23586   echo "$as_me:23586: \$? = $ac_status" >&5
23587   (exit $ac_status); };
23588 then
23589   eval cf_cv_prog_CXX_c_o=yes
23590 else
23591   eval cf_cv_prog_CXX_c_o=no
23592 fi
23593 rm -rf conftest*
23594
23595 fi
23596 if test $cf_cv_prog_CXX_c_o = yes; then
23597   echo "$as_me:23597: result: yes" >&5
23598 echo "${ECHO_T}yes" >&6
23599 else
23600   echo "$as_me:23600: result: no" >&5
23601 echo "${ECHO_T}no" >&6
23602 fi
23603
23604         case $GXX_VERSION in
23605         (1.*|2.[0-6]*|[1-9][0-9].*)
23606                 cf_cxx_library=yes
23607                 ;;
23608         (*-2.7*|2.7*)
23609
23610 cf_cxx_library=unknown
23611 case $cf_cv_system_name in
23612 (os2*)
23613         cf_gpp_libname=gpp
23614         ;;
23615 (*)
23616         cf_gpp_libname=g++
23617         ;;
23618 esac
23619 if test "$GXX" = yes; then
23620         echo "$as_me:23620: checking for lib$cf_gpp_libname" >&5
23621 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23622         cf_save="$LIBS"
23623
23624 cf_add_libs="$LIBS"
23625 # reverse order
23626 cf_add_0lib=
23627 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23628 # filter duplicates
23629 for cf_add_1lib in $cf_add_0lib; do
23630         for cf_add_2lib in $cf_add_libs; do
23631                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23632                         cf_add_1lib=
23633                         break
23634                 fi
23635         done
23636         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23637 done
23638 LIBS="$cf_add_libs"
23639
23640         cat >conftest.$ac_ext <<_ACEOF
23641 #line 23641 "configure"
23642 #include "confdefs.h"
23643
23644 #include <$cf_gpp_libname/builtin.h>
23645
23646 int
23647 main (void)
23648 {
23649 two_arg_error_handler_t foo2 = lib_error_handler
23650   ;
23651   return 0;
23652 }
23653 _ACEOF
23654 rm -f conftest.$ac_objext conftest$ac_exeext
23655 if { (eval echo "$as_me:23655: \"$ac_link\"") >&5
23656   (eval $ac_link) 2>&5
23657   ac_status=$?
23658   echo "$as_me:23658: \$? = $ac_status" >&5
23659   (exit $ac_status); } &&
23660          { ac_try='test -s conftest$ac_exeext'
23661   { (eval echo "$as_me:23661: \"$ac_try\"") >&5
23662   (eval $ac_try) 2>&5
23663   ac_status=$?
23664   echo "$as_me:23664: \$? = $ac_status" >&5
23665   (exit $ac_status); }; }; then
23666   cf_cxx_library=yes
23667
23668 cf_add_libs="$CXXLIBS"
23669 # reverse order
23670 cf_add_0lib=
23671 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23672 # filter duplicates
23673 for cf_add_1lib in $cf_add_0lib; do
23674         for cf_add_2lib in $cf_add_libs; do
23675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23676                         cf_add_1lib=
23677                         break
23678                 fi
23679         done
23680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23681 done
23682 CXXLIBS="$cf_add_libs"
23683
23684          if test "$cf_gpp_libname" = cpp ; then
23685
23686 cat >>confdefs.h <<\EOF
23687 #define HAVE_GPP_BUILTIN_H 1
23688 EOF
23689
23690          else
23691
23692 cat >>confdefs.h <<\EOF
23693 #define HAVE_GXX_BUILTIN_H 1
23694 EOF
23695
23696          fi
23697 else
23698   echo "$as_me: failed program was:" >&5
23699 cat conftest.$ac_ext >&5
23700 cat >conftest.$ac_ext <<_ACEOF
23701 #line 23701 "configure"
23702 #include "confdefs.h"
23703
23704 #include <builtin.h>
23705
23706 int
23707 main (void)
23708 {
23709 two_arg_error_handler_t foo2 = lib_error_handler
23710   ;
23711   return 0;
23712 }
23713 _ACEOF
23714 rm -f conftest.$ac_objext conftest$ac_exeext
23715 if { (eval echo "$as_me:23715: \"$ac_link\"") >&5
23716   (eval $ac_link) 2>&5
23717   ac_status=$?
23718   echo "$as_me:23718: \$? = $ac_status" >&5
23719   (exit $ac_status); } &&
23720          { ac_try='test -s conftest$ac_exeext'
23721   { (eval echo "$as_me:23721: \"$ac_try\"") >&5
23722   (eval $ac_try) 2>&5
23723   ac_status=$?
23724   echo "$as_me:23724: \$? = $ac_status" >&5
23725   (exit $ac_status); }; }; then
23726   cf_cxx_library=yes
23727
23728 cf_add_libs="$CXXLIBS"
23729 # reverse order
23730 cf_add_0lib=
23731 for cf_add_1lib in -l$cf_gpp_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 cat >>confdefs.h <<\EOF
23745 #define HAVE_BUILTIN_H 1
23746 EOF
23747
23748 else
23749   echo "$as_me: failed program was:" >&5
23750 cat conftest.$ac_ext >&5
23751 cf_cxx_library=no
23752 fi
23753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23754 fi
23755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23756         LIBS="$cf_save"
23757         echo "$as_me:23757: result: $cf_cxx_library" >&5
23758 echo "${ECHO_T}$cf_cxx_library" >&6
23759 fi
23760
23761                 ;;
23762         (*)
23763                 cf_cxx_library=no
23764                 ;;
23765         esac
23766
23767         ac_ext=cc
23768 ac_cpp='$CXXCPP $CPPFLAGS'
23769 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23770 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23771 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23772 ac_main_return=return
23773 echo "$as_me:23773: checking how to run the C++ preprocessor" >&5
23774 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23775 if test -z "$CXXCPP"; then
23776   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23777   echo $ECHO_N "(cached) $ECHO_C" >&6
23778 else
23779       # Double quotes because CXXCPP needs to be expanded
23780     for CXXCPP in "$CXX -E" "/lib/cpp"
23781     do
23782       ac_preproc_ok=false
23783 for ac_cxx_preproc_warn_flag in '' yes
23784 do
23785   # Use a header file that comes with gcc, so configuring glibc
23786   # with a fresh cross-compiler works.
23787   # On the NeXT, cc -E runs the code through the compiler's parser,
23788   # not just through cpp. "Syntax error" is here to catch this case.
23789   cat >conftest.$ac_ext <<_ACEOF
23790 #line 23790 "configure"
23791 #include "confdefs.h"
23792 #include <assert.h>
23793                      Syntax error
23794 _ACEOF
23795 if { (eval echo "$as_me:23795: \"$ac_cpp conftest.$ac_ext\"") >&5
23796   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23797   ac_status=$?
23798   egrep -v '^ *\+' conftest.er1 >conftest.err
23799   rm -f conftest.er1
23800   cat conftest.err >&5
23801   echo "$as_me:23801: \$? = $ac_status" >&5
23802   (exit $ac_status); } >/dev/null; then
23803   if test -s conftest.err; then
23804     ac_cpp_err=$ac_cxx_preproc_warn_flag
23805   else
23806     ac_cpp_err=
23807   fi
23808 else
23809   ac_cpp_err=yes
23810 fi
23811 if test -z "$ac_cpp_err"; then
23812   :
23813 else
23814   echo "$as_me: failed program was:" >&5
23815   cat conftest.$ac_ext >&5
23816   # Broken: fails on valid input.
23817 continue
23818 fi
23819 rm -f conftest.err conftest.$ac_ext
23820
23821   # OK, works on sane cases.  Now check whether non-existent headers
23822   # can be detected and how.
23823   cat >conftest.$ac_ext <<_ACEOF
23824 #line 23824 "configure"
23825 #include "confdefs.h"
23826 #include <ac_nonexistent.h>
23827 _ACEOF
23828 if { (eval echo "$as_me:23828: \"$ac_cpp conftest.$ac_ext\"") >&5
23829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23830   ac_status=$?
23831   egrep -v '^ *\+' conftest.er1 >conftest.err
23832   rm -f conftest.er1
23833   cat conftest.err >&5
23834   echo "$as_me:23834: \$? = $ac_status" >&5
23835   (exit $ac_status); } >/dev/null; then
23836   if test -s conftest.err; then
23837     ac_cpp_err=$ac_cxx_preproc_warn_flag
23838   else
23839     ac_cpp_err=
23840   fi
23841 else
23842   ac_cpp_err=yes
23843 fi
23844 if test -z "$ac_cpp_err"; then
23845   # Broken: success on invalid input.
23846 continue
23847 else
23848   echo "$as_me: failed program was:" >&5
23849   cat conftest.$ac_ext >&5
23850   # Passes both tests.
23851 ac_preproc_ok=:
23852 break
23853 fi
23854 rm -f conftest.err conftest.$ac_ext
23855
23856 done
23857 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23858 rm -f conftest.err conftest.$ac_ext
23859 if $ac_preproc_ok; then
23860   break
23861 fi
23862
23863     done
23864     ac_cv_prog_CXXCPP=$CXXCPP
23865
23866 fi
23867   CXXCPP=$ac_cv_prog_CXXCPP
23868 else
23869   ac_cv_prog_CXXCPP=$CXXCPP
23870 fi
23871 echo "$as_me:23871: result: $CXXCPP" >&5
23872 echo "${ECHO_T}$CXXCPP" >&6
23873 ac_preproc_ok=false
23874 for ac_cxx_preproc_warn_flag in '' yes
23875 do
23876   # Use a header file that comes with gcc, so configuring glibc
23877   # with a fresh cross-compiler works.
23878   # On the NeXT, cc -E runs the code through the compiler's parser,
23879   # not just through cpp. "Syntax error" is here to catch this case.
23880   cat >conftest.$ac_ext <<_ACEOF
23881 #line 23881 "configure"
23882 #include "confdefs.h"
23883 #include <assert.h>
23884                      Syntax error
23885 _ACEOF
23886 if { (eval echo "$as_me:23886: \"$ac_cpp conftest.$ac_ext\"") >&5
23887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23888   ac_status=$?
23889   egrep -v '^ *\+' conftest.er1 >conftest.err
23890   rm -f conftest.er1
23891   cat conftest.err >&5
23892   echo "$as_me:23892: \$? = $ac_status" >&5
23893   (exit $ac_status); } >/dev/null; then
23894   if test -s conftest.err; then
23895     ac_cpp_err=$ac_cxx_preproc_warn_flag
23896   else
23897     ac_cpp_err=
23898   fi
23899 else
23900   ac_cpp_err=yes
23901 fi
23902 if test -z "$ac_cpp_err"; then
23903   :
23904 else
23905   echo "$as_me: failed program was:" >&5
23906   cat conftest.$ac_ext >&5
23907   # Broken: fails on valid input.
23908 continue
23909 fi
23910 rm -f conftest.err conftest.$ac_ext
23911
23912   # OK, works on sane cases.  Now check whether non-existent headers
23913   # can be detected and how.
23914   cat >conftest.$ac_ext <<_ACEOF
23915 #line 23915 "configure"
23916 #include "confdefs.h"
23917 #include <ac_nonexistent.h>
23918 _ACEOF
23919 if { (eval echo "$as_me:23919: \"$ac_cpp conftest.$ac_ext\"") >&5
23920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23921   ac_status=$?
23922   egrep -v '^ *\+' conftest.er1 >conftest.err
23923   rm -f conftest.er1
23924   cat conftest.err >&5
23925   echo "$as_me:23925: \$? = $ac_status" >&5
23926   (exit $ac_status); } >/dev/null; then
23927   if test -s conftest.err; then
23928     ac_cpp_err=$ac_cxx_preproc_warn_flag
23929   else
23930     ac_cpp_err=
23931   fi
23932 else
23933   ac_cpp_err=yes
23934 fi
23935 if test -z "$ac_cpp_err"; then
23936   # Broken: success on invalid input.
23937 continue
23938 else
23939   echo "$as_me: failed program was:" >&5
23940   cat conftest.$ac_ext >&5
23941   # Passes both tests.
23942 ac_preproc_ok=:
23943 break
23944 fi
23945 rm -f conftest.err conftest.$ac_ext
23946
23947 done
23948 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23949 rm -f conftest.err conftest.$ac_ext
23950 if $ac_preproc_ok; then
23951   :
23952 else
23953   { { echo "$as_me:23953: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23954 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23955    { (exit 1); exit 1; }; }
23956 fi
23957
23958 ac_ext=cc
23959 ac_cpp='$CXXCPP $CPPFLAGS'
23960 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23961 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23962 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23963 ac_main_return=return
23964
23965 for ac_header in typeinfo
23966 do
23967 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23968 echo "$as_me:23968: checking for $ac_header" >&5
23969 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23970 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23971   echo $ECHO_N "(cached) $ECHO_C" >&6
23972 else
23973   cat >conftest.$ac_ext <<_ACEOF
23974 #line 23974 "configure"
23975 #include "confdefs.h"
23976 #include <$ac_header>
23977 _ACEOF
23978 if { (eval echo "$as_me:23978: \"$ac_cpp conftest.$ac_ext\"") >&5
23979   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23980   ac_status=$?
23981   egrep -v '^ *\+' conftest.er1 >conftest.err
23982   rm -f conftest.er1
23983   cat conftest.err >&5
23984   echo "$as_me:23984: \$? = $ac_status" >&5
23985   (exit $ac_status); } >/dev/null; then
23986   if test -s conftest.err; then
23987     ac_cpp_err=$ac_cxx_preproc_warn_flag
23988   else
23989     ac_cpp_err=
23990   fi
23991 else
23992   ac_cpp_err=yes
23993 fi
23994 if test -z "$ac_cpp_err"; then
23995   eval "$as_ac_Header=yes"
23996 else
23997   echo "$as_me: failed program was:" >&5
23998   cat conftest.$ac_ext >&5
23999   eval "$as_ac_Header=no"
24000 fi
24001 rm -f conftest.err conftest.$ac_ext
24002 fi
24003 echo "$as_me:24003: result: `eval echo '${'$as_ac_Header'}'`" >&5
24004 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24005 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24006   cat >>confdefs.h <<EOF
24007 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24008 EOF
24009
24010 fi
24011 done
24012
24013 for ac_header in iostream
24014 do
24015 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24016 echo "$as_me:24016: checking for $ac_header" >&5
24017 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24018 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24019   echo $ECHO_N "(cached) $ECHO_C" >&6
24020 else
24021   cat >conftest.$ac_ext <<_ACEOF
24022 #line 24022 "configure"
24023 #include "confdefs.h"
24024 #include <$ac_header>
24025 _ACEOF
24026 if { (eval echo "$as_me:24026: \"$ac_cpp conftest.$ac_ext\"") >&5
24027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24028   ac_status=$?
24029   egrep -v '^ *\+' conftest.er1 >conftest.err
24030   rm -f conftest.er1
24031   cat conftest.err >&5
24032   echo "$as_me:24032: \$? = $ac_status" >&5
24033   (exit $ac_status); } >/dev/null; then
24034   if test -s conftest.err; then
24035     ac_cpp_err=$ac_cxx_preproc_warn_flag
24036   else
24037     ac_cpp_err=
24038   fi
24039 else
24040   ac_cpp_err=yes
24041 fi
24042 if test -z "$ac_cpp_err"; then
24043   eval "$as_ac_Header=yes"
24044 else
24045   echo "$as_me: failed program was:" >&5
24046   cat conftest.$ac_ext >&5
24047   eval "$as_ac_Header=no"
24048 fi
24049 rm -f conftest.err conftest.$ac_ext
24050 fi
24051 echo "$as_me:24051: result: `eval echo '${'$as_ac_Header'}'`" >&5
24052 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24053 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24054   cat >>confdefs.h <<EOF
24055 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24056 EOF
24057
24058 fi
24059 done
24060
24061 if test x"$ac_cv_header_iostream" = xyes ; then
24062         echo "$as_me:24062: checking if iostream uses std-namespace" >&5
24063 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24064         cat >conftest.$ac_ext <<_ACEOF
24065 #line 24065 "configure"
24066 #include "confdefs.h"
24067
24068 #include <iostream>
24069 using std::endl;
24070 using std::cerr;
24071 int
24072 main (void)
24073 {
24074
24075 cerr << "testing" << endl;
24076
24077   ;
24078   return 0;
24079 }
24080 _ACEOF
24081 rm -f conftest.$ac_objext
24082 if { (eval echo "$as_me:24082: \"$ac_compile\"") >&5
24083   (eval $ac_compile) 2>&5
24084   ac_status=$?
24085   echo "$as_me:24085: \$? = $ac_status" >&5
24086   (exit $ac_status); } &&
24087          { ac_try='test -s conftest.$ac_objext'
24088   { (eval echo "$as_me:24088: \"$ac_try\"") >&5
24089   (eval $ac_try) 2>&5
24090   ac_status=$?
24091   echo "$as_me:24091: \$? = $ac_status" >&5
24092   (exit $ac_status); }; }; then
24093   cf_iostream_namespace=yes
24094 else
24095   echo "$as_me: failed program was:" >&5
24096 cat conftest.$ac_ext >&5
24097 cf_iostream_namespace=no
24098 fi
24099 rm -f conftest.$ac_objext conftest.$ac_ext
24100         echo "$as_me:24100: result: $cf_iostream_namespace" >&5
24101 echo "${ECHO_T}$cf_iostream_namespace" >&6
24102         if test "$cf_iostream_namespace" = yes ; then
24103
24104 cat >>confdefs.h <<\EOF
24105 #define IOSTREAM_NAMESPACE 1
24106 EOF
24107
24108         fi
24109 fi
24110
24111 echo "$as_me:24111: checking if we should include stdbool.h" >&5
24112 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24113
24114 if test "${cf_cv_header_stdbool_h+set}" = set; then
24115   echo $ECHO_N "(cached) $ECHO_C" >&6
24116 else
24117
24118         cat >conftest.$ac_ext <<_ACEOF
24119 #line 24119 "configure"
24120 #include "confdefs.h"
24121
24122 int
24123 main (void)
24124 {
24125 bool foo = false
24126   ;
24127   return 0;
24128 }
24129 _ACEOF
24130 rm -f conftest.$ac_objext
24131 if { (eval echo "$as_me:24131: \"$ac_compile\"") >&5
24132   (eval $ac_compile) 2>&5
24133   ac_status=$?
24134   echo "$as_me:24134: \$? = $ac_status" >&5
24135   (exit $ac_status); } &&
24136          { ac_try='test -s conftest.$ac_objext'
24137   { (eval echo "$as_me:24137: \"$ac_try\"") >&5
24138   (eval $ac_try) 2>&5
24139   ac_status=$?
24140   echo "$as_me:24140: \$? = $ac_status" >&5
24141   (exit $ac_status); }; }; then
24142   cf_cv_header_stdbool_h=0
24143 else
24144   echo "$as_me: failed program was:" >&5
24145 cat conftest.$ac_ext >&5
24146 cat >conftest.$ac_ext <<_ACEOF
24147 #line 24147 "configure"
24148 #include "confdefs.h"
24149
24150 #ifndef __BEOS__
24151 #include <stdbool.h>
24152 #endif
24153
24154 int
24155 main (void)
24156 {
24157 bool foo = false
24158   ;
24159   return 0;
24160 }
24161 _ACEOF
24162 rm -f conftest.$ac_objext
24163 if { (eval echo "$as_me:24163: \"$ac_compile\"") >&5
24164   (eval $ac_compile) 2>&5
24165   ac_status=$?
24166   echo "$as_me:24166: \$? = $ac_status" >&5
24167   (exit $ac_status); } &&
24168          { ac_try='test -s conftest.$ac_objext'
24169   { (eval echo "$as_me:24169: \"$ac_try\"") >&5
24170   (eval $ac_try) 2>&5
24171   ac_status=$?
24172   echo "$as_me:24172: \$? = $ac_status" >&5
24173   (exit $ac_status); }; }; then
24174   cf_cv_header_stdbool_h=1
24175 else
24176   echo "$as_me: failed program was:" >&5
24177 cat conftest.$ac_ext >&5
24178 cf_cv_header_stdbool_h=0
24179 fi
24180 rm -f conftest.$ac_objext conftest.$ac_ext
24181 fi
24182 rm -f conftest.$ac_objext conftest.$ac_ext
24183 fi
24184
24185 if test "$cf_cv_header_stdbool_h" = 1
24186 then    echo "$as_me:24186: result: yes" >&5
24187 echo "${ECHO_T}yes" >&6
24188 else    echo "$as_me:24188: result: no" >&5
24189 echo "${ECHO_T}no" >&6
24190 fi
24191
24192 echo "$as_me:24192: checking for builtin bool type" >&5
24193 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24194
24195 if test "${cf_cv_builtin_bool+set}" = set; then
24196   echo $ECHO_N "(cached) $ECHO_C" >&6
24197 else
24198
24199         cat >conftest.$ac_ext <<_ACEOF
24200 #line 24200 "configure"
24201 #include "confdefs.h"
24202
24203 #include <stdio.h>
24204 #include <sys/types.h>
24205
24206 int
24207 main (void)
24208 {
24209 bool x = false
24210   ;
24211   return 0;
24212 }
24213 _ACEOF
24214 rm -f conftest.$ac_objext
24215 if { (eval echo "$as_me:24215: \"$ac_compile\"") >&5
24216   (eval $ac_compile) 2>&5
24217   ac_status=$?
24218   echo "$as_me:24218: \$? = $ac_status" >&5
24219   (exit $ac_status); } &&
24220          { ac_try='test -s conftest.$ac_objext'
24221   { (eval echo "$as_me:24221: \"$ac_try\"") >&5
24222   (eval $ac_try) 2>&5
24223   ac_status=$?
24224   echo "$as_me:24224: \$? = $ac_status" >&5
24225   (exit $ac_status); }; }; then
24226   cf_cv_builtin_bool=1
24227 else
24228   echo "$as_me: failed program was:" >&5
24229 cat conftest.$ac_ext >&5
24230 cf_cv_builtin_bool=0
24231 fi
24232 rm -f conftest.$ac_objext conftest.$ac_ext
24233
24234 fi
24235
24236 if test "$cf_cv_builtin_bool" = 1
24237 then    echo "$as_me:24237: result: yes" >&5
24238 echo "${ECHO_T}yes" >&6
24239 else    echo "$as_me:24239: result: no" >&5
24240 echo "${ECHO_T}no" >&6
24241 fi
24242
24243 echo "$as_me:24243: checking for size of bool" >&5
24244 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24245 if test "${cf_cv_type_of_bool+set}" = set; then
24246   echo $ECHO_N "(cached) $ECHO_C" >&6
24247 else
24248
24249         rm -f cf_test.out
24250         if test "$cross_compiling" = yes; then
24251   cf_cv_type_of_bool=unknown
24252 else
24253   cat >conftest.$ac_ext <<_ACEOF
24254 #line 24254 "configure"
24255 #include "confdefs.h"
24256
24257 #include <stdlib.h>
24258 #include <stdio.h>
24259
24260 #if defined(__cplusplus)
24261
24262 #ifdef HAVE_GXX_BUILTIN_H
24263 #include <g++/builtin.h>
24264 #elif HAVE_GPP_BUILTIN_H
24265 #include <gpp/builtin.h>
24266 #elif HAVE_BUILTIN_H
24267 #include <builtin.h>
24268 #endif
24269
24270 #else
24271
24272 #if $cf_cv_header_stdbool_h
24273 #include <stdbool.h>
24274 #endif
24275
24276 #endif
24277
24278 int main(void)
24279 {
24280         FILE *fp = fopen("cf_test.out", "w");
24281         if (fp != 0) {
24282                 bool x = true;
24283                 if ((bool)(-x) >= 0)
24284                         fputs("unsigned ", fp);
24285                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24286                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24287                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24288                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24289                 fclose(fp);
24290         }
24291         ${cf_cv_main_return:-return}(0);
24292 }
24293
24294 _ACEOF
24295 rm -f conftest$ac_exeext
24296 if { (eval echo "$as_me:24296: \"$ac_link\"") >&5
24297   (eval $ac_link) 2>&5
24298   ac_status=$?
24299   echo "$as_me:24299: \$? = $ac_status" >&5
24300   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24301   { (eval echo "$as_me:24301: \"$ac_try\"") >&5
24302   (eval $ac_try) 2>&5
24303   ac_status=$?
24304   echo "$as_me:24304: \$? = $ac_status" >&5
24305   (exit $ac_status); }; }; then
24306   cf_cv_type_of_bool=`cat cf_test.out`
24307                  if test -z "$cf_cv_type_of_bool"; then
24308                    cf_cv_type_of_bool=unknown
24309                  fi
24310 else
24311   echo "$as_me: program exited with status $ac_status" >&5
24312 echo "$as_me: failed program was:" >&5
24313 cat conftest.$ac_ext >&5
24314 cf_cv_type_of_bool=unknown
24315 fi
24316 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24317 fi
24318
24319 fi
24320
24321         rm -f cf_test.out
24322 echo "$as_me:24322: result: $cf_cv_type_of_bool" >&5
24323 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24324 if test "$cf_cv_type_of_bool" = unknown ; then
24325         case .$NCURSES_BOOL in
24326         (.auto|.) NCURSES_BOOL=unsigned;;
24327         esac
24328         { echo "$as_me:24328: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24329 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24330         cf_cv_type_of_bool=$NCURSES_BOOL
24331 fi
24332
24333 echo "$as_me:24333: checking for special defines needed for etip.h" >&5
24334 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24335 cf_save_CXXFLAGS="$CXXFLAGS"
24336 cf_result="none"
24337
24338 # etip.h includes ncurses.h which includes ncurses_dll.h
24339 # But ncurses_dll.h is generated - fix here.
24340 test -d include || mkdir include
24341 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
24342
24343 for cf_math in "" MATH_H
24344 do
24345 for cf_excp in "" MATH_EXCEPTION
24346 do
24347         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24348         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24349         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24350 cat >conftest.$ac_ext <<_ACEOF
24351 #line 24351 "configure"
24352 #include "confdefs.h"
24353
24354 #include <etip.h.in>
24355
24356 int
24357 main (void)
24358 {
24359
24360   ;
24361   return 0;
24362 }
24363 _ACEOF
24364 rm -f conftest.$ac_objext
24365 if { (eval echo "$as_me:24365: \"$ac_compile\"") >&5
24366   (eval $ac_compile) 2>&5
24367   ac_status=$?
24368   echo "$as_me:24368: \$? = $ac_status" >&5
24369   (exit $ac_status); } &&
24370          { ac_try='test -s conftest.$ac_objext'
24371   { (eval echo "$as_me:24371: \"$ac_try\"") >&5
24372   (eval $ac_try) 2>&5
24373   ac_status=$?
24374   echo "$as_me:24374: \$? = $ac_status" >&5
24375   (exit $ac_status); }; }; then
24376
24377         test -n "$cf_math" && cat >>confdefs.h <<EOF
24378 #define ETIP_NEEDS_${cf_math} 1
24379 EOF
24380
24381         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24382 #define ETIP_NEEDS_${cf_excp} 1
24383 EOF
24384
24385         cf_result="$cf_math $cf_excp"
24386         break 2
24387
24388 else
24389   echo "$as_me: failed program was:" >&5
24390 cat conftest.$ac_ext >&5
24391 fi
24392 rm -f conftest.$ac_objext conftest.$ac_ext
24393 done
24394 done
24395 echo "$as_me:24395: result: $cf_result" >&5
24396 echo "${ECHO_T}$cf_result" >&6
24397 CXXFLAGS="$cf_save_CXXFLAGS"
24398
24399 if test -n "$CXX"; then
24400 echo "$as_me:24400: checking if $CXX accepts parameter initialization" >&5
24401 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24402 if test "${cf_cv_cpp_param_init+set}" = set; then
24403   echo $ECHO_N "(cached) $ECHO_C" >&6
24404 else
24405
24406         ac_ext=cc
24407 ac_cpp='$CXXCPP $CPPFLAGS'
24408 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24409 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24410 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24411 ac_main_return=return
24412
24413         if test "$cross_compiling" = yes; then
24414   cf_cv_cpp_param_init=unknown
24415 else
24416   cat >conftest.$ac_ext <<_ACEOF
24417 #line 24417 "configure"
24418 #include "confdefs.h"
24419
24420 class TEST {
24421 private:
24422         int value;
24423 public:
24424         TEST(int x = 1);
24425         ~TEST();
24426 };
24427
24428 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24429 {
24430         value = x;
24431 }
24432 int main(void) { }
24433
24434 _ACEOF
24435 rm -f conftest$ac_exeext
24436 if { (eval echo "$as_me:24436: \"$ac_link\"") >&5
24437   (eval $ac_link) 2>&5
24438   ac_status=$?
24439   echo "$as_me:24439: \$? = $ac_status" >&5
24440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24441   { (eval echo "$as_me:24441: \"$ac_try\"") >&5
24442   (eval $ac_try) 2>&5
24443   ac_status=$?
24444   echo "$as_me:24444: \$? = $ac_status" >&5
24445   (exit $ac_status); }; }; then
24446   cf_cv_cpp_param_init=yes
24447 else
24448   echo "$as_me: program exited with status $ac_status" >&5
24449 echo "$as_me: failed program was:" >&5
24450 cat conftest.$ac_ext >&5
24451 cf_cv_cpp_param_init=no
24452 fi
24453 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24454 fi
24455         ac_ext=cc
24456 ac_cpp='$CXXCPP $CPPFLAGS'
24457 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24458 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24459 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24460 ac_main_return=return
24461
24462 fi
24463 echo "$as_me:24463: result: $cf_cv_cpp_param_init" >&5
24464 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24465 fi
24466 test "$cf_cv_cpp_param_init" = yes &&
24467 cat >>confdefs.h <<\EOF
24468 #define CPP_HAS_PARAM_INIT 1
24469 EOF
24470
24471 if test -n "$CXX"; then
24472
24473 echo "$as_me:24473: checking if $CXX accepts static_cast" >&5
24474 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24475 if test "${cf_cv_cpp_static_cast+set}" = set; then
24476   echo $ECHO_N "(cached) $ECHO_C" >&6
24477 else
24478
24479         ac_ext=cc
24480 ac_cpp='$CXXCPP $CPPFLAGS'
24481 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24482 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24483 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24484 ac_main_return=return
24485
24486         cat >conftest.$ac_ext <<_ACEOF
24487 #line 24487 "configure"
24488 #include "confdefs.h"
24489
24490 class NCursesPanel
24491 {
24492 public:
24493   NCursesPanel(int nlines,
24494                int ncols,
24495                int begin_y = 0,
24496                int begin_x = 0)
24497   {
24498   }
24499   NCursesPanel();
24500   ~NCursesPanel();
24501 };
24502
24503 template<class T> class NCursesUserPanel : public NCursesPanel
24504 {
24505 public:
24506   NCursesUserPanel (int nlines,
24507                     int ncols,
24508                     int begin_y = 0,
24509                     int begin_x = 0,
24510                     const T* p_UserData = static_cast<T*>(0))
24511     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24512   {
24513   };
24514   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24515   {
24516   };
24517
24518   virtual ~NCursesUserPanel() {};
24519 };
24520
24521 int
24522 main (void)
24523 {
24524
24525         const char* p_UserData = static_cast<char*>(0)
24526   ;
24527   return 0;
24528 }
24529 _ACEOF
24530 rm -f conftest.$ac_objext
24531 if { (eval echo "$as_me:24531: \"$ac_compile\"") >&5
24532   (eval $ac_compile) 2>&5
24533   ac_status=$?
24534   echo "$as_me:24534: \$? = $ac_status" >&5
24535   (exit $ac_status); } &&
24536          { ac_try='test -s conftest.$ac_objext'
24537   { (eval echo "$as_me:24537: \"$ac_try\"") >&5
24538   (eval $ac_try) 2>&5
24539   ac_status=$?
24540   echo "$as_me:24540: \$? = $ac_status" >&5
24541   (exit $ac_status); }; }; then
24542   cf_cv_cpp_static_cast=yes
24543 else
24544   echo "$as_me: failed program was:" >&5
24545 cat conftest.$ac_ext >&5
24546 cf_cv_cpp_static_cast=no
24547 fi
24548 rm -f conftest.$ac_objext conftest.$ac_ext
24549
24550         ac_ext=cc
24551 ac_cpp='$CXXCPP $CPPFLAGS'
24552 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24553 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24554 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24555 ac_main_return=return
24556
24557 fi
24558 echo "$as_me:24558: result: $cf_cv_cpp_static_cast" >&5
24559 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24560
24561 fi
24562
24563 test "$cf_cv_cpp_static_cast" = yes &&
24564 cat >>confdefs.h <<\EOF
24565 #define CPP_HAS_STATIC_CAST 1
24566 EOF
24567
24568         CXX_AR='$(AR)'
24569         CXX_ARFLAGS='$(ARFLAGS)'
24570         case $cf_cv_system_name in
24571         (irix*)
24572             if test "$GXX" != yes ; then
24573                 CXX_AR='$(CXX)'
24574                 CXX_ARFLAGS='-ar -o'
24575             fi
24576             ;;
24577         (sco3.2v5*)
24578             CXXLDFLAGS="-u main"
24579             ;;
24580         (solaris2*)
24581             if test "$GXX" != yes ; then
24582                 CXX_AR='$(CXX)'
24583                 CXX_ARFLAGS='-xar -o'
24584             fi
24585             ;;
24586         esac
24587
24588 else
24589         cf_cxx_library=no
24590         cf_cv_builtin_bool=1
24591
24592         # Just because we are not configuring against C++ right now does not
24593         # mean that a user will not want to use C++.  Some distributors disable
24594         # the C++ portion of this configuration as a shortcut (or just to avoid
24595         # compiling the demo in the c++ directory).  So we need a reasonable
24596         # default for the 'bool' type.
24597         #
24598         # Caveat: since the storage of the bool type is not standardized, it
24599         # may change.
24600
24601         if test "$NCURSES_BOOL" != auto ; then
24602                 cf_cv_type_of_bool=$NCURSES_BOOL
24603                 cf_cv_header_stdbool_h=0
24604         else
24605                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24606
24607 echo "$as_me:24607: checking for size of bool" >&5
24608 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24609 if test "${cf_cv_type_of_bool+set}" = set; then
24610   echo $ECHO_N "(cached) $ECHO_C" >&6
24611 else
24612
24613         rm -f cf_test.out
24614         if test "$cross_compiling" = yes; then
24615   cf_cv_type_of_bool=unknown
24616 else
24617   cat >conftest.$ac_ext <<_ACEOF
24618 #line 24618 "configure"
24619 #include "confdefs.h"
24620
24621 #include <stdlib.h>
24622 #include <stdio.h>
24623
24624 #if defined(__cplusplus)
24625
24626 #ifdef HAVE_GXX_BUILTIN_H
24627 #include <g++/builtin.h>
24628 #elif HAVE_GPP_BUILTIN_H
24629 #include <gpp/builtin.h>
24630 #elif HAVE_BUILTIN_H
24631 #include <builtin.h>
24632 #endif
24633
24634 #else
24635
24636 #if $cf_cv_header_stdbool_h
24637 #include <stdbool.h>
24638 #endif
24639
24640 #endif
24641
24642 int main(void)
24643 {
24644         FILE *fp = fopen("cf_test.out", "w");
24645         if (fp != 0) {
24646                 bool x = true;
24647                 if ((bool)(-x) >= 0)
24648                         fputs("unsigned ", fp);
24649                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24650                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24651                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24652                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24653                 fclose(fp);
24654         }
24655         ${cf_cv_main_return:-return}(0);
24656 }
24657
24658 _ACEOF
24659 rm -f conftest$ac_exeext
24660 if { (eval echo "$as_me:24660: \"$ac_link\"") >&5
24661   (eval $ac_link) 2>&5
24662   ac_status=$?
24663   echo "$as_me:24663: \$? = $ac_status" >&5
24664   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24665   { (eval echo "$as_me:24665: \"$ac_try\"") >&5
24666   (eval $ac_try) 2>&5
24667   ac_status=$?
24668   echo "$as_me:24668: \$? = $ac_status" >&5
24669   (exit $ac_status); }; }; then
24670   cf_cv_type_of_bool=`cat cf_test.out`
24671                  if test -z "$cf_cv_type_of_bool"; then
24672                    cf_cv_type_of_bool=unknown
24673                  fi
24674 else
24675   echo "$as_me: program exited with status $ac_status" >&5
24676 echo "$as_me: failed program was:" >&5
24677 cat conftest.$ac_ext >&5
24678 cf_cv_type_of_bool=unknown
24679 fi
24680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24681 fi
24682
24683 fi
24684
24685         rm -f cf_test.out
24686 echo "$as_me:24686: result: $cf_cv_type_of_bool" >&5
24687 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24688 if test "$cf_cv_type_of_bool" = unknown ; then
24689         case .$NCURSES_BOOL in
24690         (.auto|.) NCURSES_BOOL=unsigned;;
24691         esac
24692         { echo "$as_me:24692: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24693 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24694         cf_cv_type_of_bool=$NCURSES_BOOL
24695 fi
24696
24697                 else
24698                         echo "$as_me:24698: checking for fallback type of bool" >&5
24699 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24700                         case "$host_cpu" in
24701                         (i?86)  cf_cv_type_of_bool=char ;;
24702                         (*)     cf_cv_type_of_bool=int  ;;
24703                         esac
24704                         echo "$as_me:24704: result: $cf_cv_type_of_bool" >&5
24705 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24706                 fi
24707         fi
24708 fi
24709
24710 # If the C compiler did not declare bool, and we did not determine that the C++
24711 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24712 # ncurses library use the same type as C++ bool.  Note that this allows one to
24713 # specify the type of bool in a configure-script option and postpone
24714 # integration with the C++ compiler provided that the types are compatible.
24715 USE_CXX_BOOL=1
24716 if test $cf_cv_cc_bool_type = 1
24717 then
24718         # oops: C has a bool.  Unlikely, but C++ could differ.
24719         USE_CXX_BOOL=0
24720 elif test $cf_cv_builtin_bool = 0
24721 then
24722         # C++ has no bool
24723         USE_CXX_BOOL=0
24724 else
24725         # this is the normal case
24726         USE_CXX_BOOL='defined(__cplusplus)'
24727 fi
24728
24729 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24730
24731         if test "$cf_with_ada" != "no" ; then
24732                 if test "$with_libtool" != "no"; then
24733                         { echo "$as_me:24733: WARNING: libtool does not support Ada - disabling feature" >&5
24734 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24735                         cf_with_ada=no
24736                 fi
24737         fi
24738
24739         if test "$cf_with_ada" != "no" ; then
24740
24741 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24742 do
24743
24744 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24745
24746         unset ac_cv_path_cf_TEMP_gnat
24747         unset cf_TEMP_gnat
24748         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24749 set dummy $cf_prog_gnat; ac_word=$2
24750 echo "$as_me:24750: checking for $ac_word" >&5
24751 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24752 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24753   echo $ECHO_N "(cached) $ECHO_C" >&6
24754 else
24755   case $cf_TEMP_gnat in
24756   [\\/]* | ?:[\\/]*)
24757   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24758   ;;
24759   *)
24760   ac_save_IFS=$IFS; IFS=$ac_path_separator
24761 ac_dummy="$PATH"
24762 for ac_dir in $ac_dummy; do
24763   IFS=$ac_save_IFS
24764   test -z "$ac_dir" && ac_dir=.
24765   if $as_executable_p "$ac_dir/$ac_word"; then
24766    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24767    echo "$as_me:24767: found $ac_dir/$ac_word" >&5
24768    break
24769 fi
24770 done
24771
24772   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24773   ;;
24774 esac
24775 fi
24776 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24777
24778 if test -n "$cf_TEMP_gnat"; then
24779   echo "$as_me:24779: result: $cf_TEMP_gnat" >&5
24780 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24781 else
24782   echo "$as_me:24782: result: no" >&5
24783 echo "${ECHO_T}no" >&6
24784 fi
24785
24786         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24787
24788         if test "x$cf_TEMP_gnat" != xno; then
24789                 unset cf_cv_gnat_version
24790                 unset cf_TEMP_gnat
24791
24792 echo "$as_me:24792: checking for $cf_prog_gnat version" >&5
24793 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24794 if test "${cf_cv_gnat_version+set}" = set; then
24795   echo $ECHO_N "(cached) $ECHO_C" >&6
24796 else
24797
24798 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24799         grep '[0-9].[0-9][0-9]*' |\
24800         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24801
24802 fi
24803 echo "$as_me:24803: result: $cf_cv_gnat_version" >&5
24804 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24805 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24806 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24807
24808         fi
24809         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24810
24811         unset cf_TEMP_gnat
24812         unset cf_cv_gnat_version
24813         unset ac_cv_path_cf_TEMP_gnat
24814 done
24815
24816 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24817         cf_ada_make=
24818         cf_cv_prog_gnat_correct=no
24819 else
24820         cf_ada_make=gnatmake
24821         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24822                 # gprconfig is newer than gnatmake; we can continue...
24823                 cf_ada_config="##"
24824         else
24825                 rm -rf conftest* *~conftest*
24826                 if mkdir conftest.src
24827                 then
24828                         cf_ada_config=""
24829                         cd conftest.src
24830                         for cf_gprconfig in Ada C
24831                         do
24832                                 echo "$as_me:24832: checking for gprconfig name for $cf_gprconfig" >&5
24833 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24834                                 if test $cf_gprconfig = C
24835                                 then
24836                                         for cf_gprconfig_param in \
24837                                                 $cf_gprconfig,,,,GNATGCC \
24838                                                 $cf_gprconfig,,,,GCC \
24839                                                 $cf_gprconfig
24840                                         do
24841                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24842                                                 test -n "$cf_gprconfig_value" && break
24843                                         done
24844                                 else
24845                                         cf_gprconfig_param=$cf_gprconfig
24846                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24847                                 fi
24848                                 if test -n "$cf_gprconfig_value"
24849                                 then
24850                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24851                                         echo "$as_me:24851: result: $cf_gprconfig_value" >&5
24852 echo "${ECHO_T}$cf_gprconfig_value" >&6
24853                                 else
24854                                         echo "$as_me:24854: result: missing" >&5
24855 echo "${ECHO_T}missing" >&6
24856                                         cf_ada_config="#"
24857                                         break
24858                                 fi
24859                         done
24860                         cd ..
24861                         rm -rf conftest* *~conftest*
24862                 fi
24863         fi
24864         if test "x$cf_ada_config" != "x#"
24865         then
24866
24867 echo "$as_me:24867: checking for gnat version" >&5
24868 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24869 if test "${cf_cv_gnat_version+set}" = set; then
24870   echo $ECHO_N "(cached) $ECHO_C" >&6
24871 else
24872
24873 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24874         grep '[0-9].[0-9][0-9]*' |\
24875         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24876
24877 fi
24878 echo "$as_me:24878: result: $cf_cv_gnat_version" >&5
24879 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24880 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24881
24882 case $cf_cv_gnat_version in
24883 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24884         cf_cv_prog_gnat_correct=yes
24885         ;;
24886 (*)
24887         { echo "$as_me:24887: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24888 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24889         cf_cv_prog_gnat_correct=no
24890         ;;
24891 esac
24892
24893                 # Extract the first word of "m4", so it can be a program name with args.
24894 set dummy m4; ac_word=$2
24895 echo "$as_me:24895: checking for $ac_word" >&5
24896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24897 if test "${ac_cv_prog_M4_exists+set}" = set; then
24898   echo $ECHO_N "(cached) $ECHO_C" >&6
24899 else
24900   if test -n "$M4_exists"; then
24901   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24902 else
24903   ac_save_IFS=$IFS; IFS=$ac_path_separator
24904 ac_dummy="$PATH"
24905 for ac_dir in $ac_dummy; do
24906   IFS=$ac_save_IFS
24907   test -z "$ac_dir" && ac_dir=.
24908   $as_executable_p "$ac_dir/$ac_word" || continue
24909 ac_cv_prog_M4_exists="yes"
24910 echo "$as_me:24910: found $ac_dir/$ac_word" >&5
24911 break
24912 done
24913
24914   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24915 fi
24916 fi
24917 M4_exists=$ac_cv_prog_M4_exists
24918 if test -n "$M4_exists"; then
24919   echo "$as_me:24919: result: $M4_exists" >&5
24920 echo "${ECHO_T}$M4_exists" >&6
24921 else
24922   echo "$as_me:24922: result: no" >&5
24923 echo "${ECHO_T}no" >&6
24924 fi
24925
24926                 if test "$ac_cv_prog_M4_exists" = no; then
24927                         cf_cv_prog_gnat_correct=no
24928                         { echo "$as_me:24928: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24929 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24930                 fi
24931                 if test "$cf_cv_prog_gnat_correct" = yes; then
24932                         echo "$as_me:24932: checking if GNAT works" >&5
24933 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24934
24935 rm -rf conftest* *~conftest*
24936 cat >>conftest.ads <<CF_EOF
24937 procedure conftest;
24938 CF_EOF
24939 cat >>conftest.adb <<CF_EOF
24940 with Text_IO;
24941 with GNAT.OS_Lib;
24942 procedure conftest is
24943 begin
24944    Text_IO.Put ("Hello World");
24945    Text_IO.New_Line;
24946    GNAT.OS_Lib.OS_Exit (0);
24947 end conftest;
24948 CF_EOF
24949 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24950    if ( ./conftest 1>&5 2>&1 ) ; then
24951       cf_cv_prog_gnat_correct=yes
24952    else
24953       cf_cv_prog_gnat_correct=no
24954    fi
24955 else
24956    cf_cv_prog_gnat_correct=no
24957 fi
24958 rm -rf conftest* *~conftest*
24959
24960                         echo "$as_me:24960: result: $cf_cv_prog_gnat_correct" >&5
24961 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24962                 fi
24963         else
24964                 cf_cv_prog_gnat_correct=no
24965         fi
24966 fi
24967
24968                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24969
24970         ADAFLAGS="$ADAFLAGS -gnatpn"
24971
24972         echo "$as_me:24972: checking optimization options for ADAFLAGS" >&5
24973 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24974         case "$CFLAGS" in
24975         (*-g*)
24976
24977         ADAFLAGS="$ADAFLAGS -g"
24978
24979                 ;;
24980         esac
24981         case "$CFLAGS" in
24982         (*-O*)
24983                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24984
24985         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24986
24987                 ;;
24988         esac
24989         echo "$as_me:24989: result: $ADAFLAGS" >&5
24990 echo "${ECHO_T}$ADAFLAGS" >&6
24991
24992 echo "$as_me:24992: checking if GNATPREP supports -T option" >&5
24993 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24994 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24995   echo $ECHO_N "(cached) $ECHO_C" >&6
24996 else
24997
24998 cf_cv_gnatprep_opt_t=no
24999 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
25000
25001 fi
25002 echo "$as_me:25002: result: $cf_cv_gnatprep_opt_t" >&5
25003 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
25004 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
25005
25006 echo "$as_me:25006: checking if GNAT supports generics" >&5
25007 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
25008 case $cf_cv_gnat_version in
25009 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
25010         cf_gnat_generics=yes
25011         ;;
25012 (*)
25013         cf_gnat_generics=no
25014         ;;
25015 esac
25016 echo "$as_me:25016: result: $cf_gnat_generics" >&5
25017 echo "${ECHO_T}$cf_gnat_generics" >&6
25018
25019 if test "$cf_gnat_generics" = yes
25020 then
25021         cf_compile_generics=generics
25022         cf_generic_objects="\${GENOBJS}"
25023 else
25024         cf_compile_generics=
25025         cf_generic_objects=
25026 fi
25027
25028 echo "$as_me:25028: checking if GNAT supports SIGINT" >&5
25029 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
25030 if test "${cf_cv_gnat_sigint+set}" = set; then
25031   echo $ECHO_N "(cached) $ECHO_C" >&6
25032 else
25033
25034 rm -rf conftest* *~conftest*
25035 cat >>conftest.ads <<CF_EOF
25036 with Ada.Interrupts.Names;
25037
25038 package ConfTest is
25039
25040    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25041    pragma Unreserve_All_Interrupts;
25042    pragma Warnings (On);
25043
25044    protected Process is
25045       procedure Stop;
25046       function Continue return Boolean;
25047       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25048    private
25049       Done : Boolean := False;
25050    end Process;
25051
25052 end ConfTest;
25053 CF_EOF
25054 cat >>conftest.adb <<CF_EOF
25055 package body ConfTest is
25056    protected body Process is
25057       procedure Stop is
25058       begin
25059          Done := True;
25060       end Stop;
25061       function Continue return Boolean is
25062       begin
25063          return not Done;
25064       end Continue;
25065    end Process;
25066 end ConfTest;
25067 CF_EOF
25068 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25069       cf_cv_gnat_sigint=yes
25070 else
25071    cf_cv_gnat_sigint=no
25072 fi
25073 rm -rf conftest* *~conftest*
25074
25075 fi
25076 echo "$as_me:25076: result: $cf_cv_gnat_sigint" >&5
25077 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25078
25079 if test $cf_cv_gnat_sigint = yes ; then
25080         USE_GNAT_SIGINT=""
25081 else
25082         USE_GNAT_SIGINT="#"
25083 fi
25084
25085 cf_gnat_libraries=no
25086 cf_gnat_projects=no
25087
25088 if test "$enable_gnat_projects" != no ; then
25089 echo "$as_me:25089: checking if GNAT supports project files" >&5
25090 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25091 case $cf_cv_gnat_version in
25092 (3.[0-9]*)
25093         ;;
25094 (*)
25095         case $cf_cv_system_name in
25096         (cygwin*|msys*)
25097                 ;;
25098         (*)
25099                 rm -rf conftest* *~conftest*
25100                 if mkdir conftest.src conftest.bin conftest.lib
25101                 then
25102                         cd conftest.src
25103                         rm -rf conftest* *~conftest*
25104                         cat >>library.gpr <<CF_EOF
25105 project Library is
25106   Kind := External ("LIB_KIND");
25107   for Library_Name use "ConfTest";
25108   for Object_Dir use ".";
25109   for Library_ALI_Dir use External("LIBRARY_DIR");
25110   for Library_Version use External ("SONAME");
25111   for Library_Kind use Kind;
25112   for Library_Dir use External("BUILD_DIR");
25113   Source_Dir := External ("SOURCE_DIR");
25114   for Source_Dirs use (Source_Dir);
25115 end Library;
25116 CF_EOF
25117                         cat >>confpackage.ads <<CF_EOF
25118 package ConfPackage is
25119    procedure conftest;
25120 end ConfPackage;
25121 CF_EOF
25122                         cat >>confpackage.adb <<CF_EOF
25123 with Text_IO;
25124 package body ConfPackage is
25125    procedure conftest is
25126    begin
25127       Text_IO.Put ("Hello World");
25128       Text_IO.New_Line;
25129    end conftest;
25130 end ConfPackage;
25131 CF_EOF
25132                         if ( $cf_ada_make $ADAFLAGS \
25133                                         -Plibrary.gpr \
25134                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25135                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25136                                         -XSOURCE_DIR=`pwd` \
25137                                         -XSONAME=libConfTest.so.1 \
25138                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25139                                 cf_gnat_projects=yes
25140                         fi
25141                         cd ..
25142                 fi
25143                 if test -f conftest.lib/confpackage.ali
25144                 then
25145                         cf_gnat_libraries=yes
25146                 fi
25147                 rm -rf conftest* *~conftest*
25148                 ;;
25149         esac
25150         ;;
25151 esac
25152 echo "$as_me:25152: result: $cf_gnat_projects" >&5
25153 echo "${ECHO_T}$cf_gnat_projects" >&6
25154 fi # enable_gnat_projects
25155
25156 if test $cf_gnat_projects = yes
25157 then
25158         echo "$as_me:25158: checking if GNAT supports libraries" >&5
25159 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25160         echo "$as_me:25160: result: $cf_gnat_libraries" >&5
25161 echo "${ECHO_T}$cf_gnat_libraries" >&6
25162 fi
25163
25164 if test "$cf_gnat_projects" = yes
25165 then
25166         USE_OLD_MAKERULES="#"
25167         USE_GNAT_PROJECTS=""
25168 else
25169         USE_OLD_MAKERULES=""
25170         USE_GNAT_PROJECTS="#"
25171 fi
25172
25173 if test "$cf_gnat_libraries" = yes
25174 then
25175         USE_GNAT_LIBRARIES=""
25176 else
25177         USE_GNAT_LIBRARIES="#"
25178 fi
25179
25180 echo "$as_me:25180: checking for ada-compiler" >&5
25181 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25182
25183 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25184 if test "${with_ada_compiler+set}" = set; then
25185   withval="$with_ada_compiler"
25186   cf_ada_compiler=$withval
25187 else
25188   cf_ada_compiler=gnatmake
25189 fi;
25190
25191 echo "$as_me:25191: result: $cf_ada_compiler" >&5
25192 echo "${ECHO_T}$cf_ada_compiler" >&6
25193
25194                         cf_ada_package=terminal_interface
25195
25196 echo "$as_me:25196: checking for ada-include" >&5
25197 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25198
25199 # Check whether --with-ada-include or --without-ada-include was given.
25200 if test "${with_ada_include+set}" = set; then
25201   withval="$with_ada_include"
25202
25203 else
25204   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25205 fi; if test -n "$prefix/share/ada/adainclude" ; then
25206
25207 if test "x$prefix" != xNONE; then
25208         cf_path_syntax="$prefix"
25209 else
25210         cf_path_syntax="$ac_default_prefix"
25211 fi
25212
25213 case ".$withval" in
25214 (.\$\(*\)*|.\'*\'*)
25215         ;;
25216 (..|./*|.\\*)
25217         ;;
25218 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25219         ;;
25220 (.\${*prefix}*|.\${*dir}*)
25221         eval withval="$withval"
25222         case ".$withval" in
25223         (.NONE/*)
25224                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25225                 ;;
25226         esac
25227         ;;
25228 (.no|.NONE/*)
25229         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25230         ;;
25231 (*)
25232         { { echo "$as_me:25232: error: expected a pathname, not \"$withval\"" >&5
25233 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25234    { (exit 1); exit 1; }; }
25235         ;;
25236 esac
25237
25238 fi
25239 eval ADA_INCLUDE="$withval"
25240
25241 echo "$as_me:25241: result: $ADA_INCLUDE" >&5
25242 echo "${ECHO_T}$ADA_INCLUDE" >&6
25243
25244 echo "$as_me:25244: checking for ada-objects" >&5
25245 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25246
25247 # Check whether --with-ada-objects or --without-ada-objects was given.
25248 if test "${with_ada_objects+set}" = set; then
25249   withval="$with_ada_objects"
25250
25251 else
25252   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25253 fi; if test -n "$prefix/lib/ada/adalib" ; then
25254
25255 if test "x$prefix" != xNONE; then
25256         cf_path_syntax="$prefix"
25257 else
25258         cf_path_syntax="$ac_default_prefix"
25259 fi
25260
25261 case ".$withval" in
25262 (.\$\(*\)*|.\'*\'*)
25263         ;;
25264 (..|./*|.\\*)
25265         ;;
25266 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25267         ;;
25268 (.\${*prefix}*|.\${*dir}*)
25269         eval withval="$withval"
25270         case ".$withval" in
25271         (.NONE/*)
25272                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25273                 ;;
25274         esac
25275         ;;
25276 (.no|.NONE/*)
25277         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25278         ;;
25279 (*)
25280         { { echo "$as_me:25280: error: expected a pathname, not \"$withval\"" >&5
25281 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25282    { (exit 1); exit 1; }; }
25283         ;;
25284 esac
25285
25286 fi
25287 eval ADA_OBJECTS="$withval"
25288
25289 echo "$as_me:25289: result: $ADA_OBJECTS" >&5
25290 echo "${ECHO_T}$ADA_OBJECTS" >&6
25291
25292 echo "$as_me:25292: checking if an Ada95 shared-library should be built" >&5
25293 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25294
25295 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25296 if test "${with_ada_sharedlib+set}" = set; then
25297   withval="$with_ada_sharedlib"
25298   with_ada_sharedlib=$withval
25299 else
25300   with_ada_sharedlib=no
25301 fi;
25302 echo "$as_me:25302: result: $with_ada_sharedlib" >&5
25303 echo "${ECHO_T}$with_ada_sharedlib" >&6
25304
25305 if test "x$with_ada_sharedlib" != xno
25306 then
25307         if test "x$cf_gnat_projects" != xyes
25308         then
25309                 { echo "$as_me:25309: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25310 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25311                 with_ada_sharedlib=no
25312         fi
25313 fi
25314
25315 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25316 MAKE_ADA_SHAREDLIB="#"
25317
25318 if test "x$with_ada_sharedlib" != xno
25319 then
25320         MAKE_ADA_SHAREDLIB=
25321         if test "x$with_ada_sharedlib" != xyes
25322         then
25323                 ADA_SHAREDLIB="$with_ada_sharedlib"
25324         fi
25325 fi
25326
25327                         # allow the Ada binding to be renamed
25328
25329 echo "$as_me:25329: checking for ada-libname" >&5
25330 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25331
25332 # Check whether --with-ada-libname or --without-ada-libname was given.
25333 if test "${with_ada_libname+set}" = set; then
25334   withval="$with_ada_libname"
25335   ADA_LIBNAME=$withval
25336 else
25337   ADA_LIBNAME=AdaCurses
25338 fi;
25339 case "x$ADA_LIBNAME" in
25340 (x|xyes|xno)
25341         ADA_LIBNAME=AdaCurses
25342         ;;
25343 esac
25344
25345 echo "$as_me:25345: result: $ADA_LIBNAME" >&5
25346 echo "${ECHO_T}$ADA_LIBNAME" >&6
25347
25348                 fi
25349         fi
25350 else
25351         cf_with_ada=no
25352 fi
25353
25354 # do this "late" to avoid conflict with header-checks
25355 if test "x$with_widec" = xyes ; then
25356         echo "$as_me:25356: checking for wchar_t" >&5
25357 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25358 if test "${ac_cv_type_wchar_t+set}" = set; then
25359   echo $ECHO_N "(cached) $ECHO_C" >&6
25360 else
25361   cat >conftest.$ac_ext <<_ACEOF
25362 #line 25362 "configure"
25363 #include "confdefs.h"
25364 $ac_includes_default
25365 int
25366 main (void)
25367 {
25368 if ((wchar_t *) 0)
25369   return 0;
25370 if (sizeof (wchar_t))
25371   return 0;
25372   ;
25373   return 0;
25374 }
25375 _ACEOF
25376 rm -f conftest.$ac_objext
25377 if { (eval echo "$as_me:25377: \"$ac_compile\"") >&5
25378   (eval $ac_compile) 2>&5
25379   ac_status=$?
25380   echo "$as_me:25380: \$? = $ac_status" >&5
25381   (exit $ac_status); } &&
25382          { ac_try='test -s conftest.$ac_objext'
25383   { (eval echo "$as_me:25383: \"$ac_try\"") >&5
25384   (eval $ac_try) 2>&5
25385   ac_status=$?
25386   echo "$as_me:25386: \$? = $ac_status" >&5
25387   (exit $ac_status); }; }; then
25388   ac_cv_type_wchar_t=yes
25389 else
25390   echo "$as_me: failed program was:" >&5
25391 cat conftest.$ac_ext >&5
25392 ac_cv_type_wchar_t=no
25393 fi
25394 rm -f conftest.$ac_objext conftest.$ac_ext
25395 fi
25396 echo "$as_me:25396: result: $ac_cv_type_wchar_t" >&5
25397 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25398
25399 echo "$as_me:25399: checking size of wchar_t" >&5
25400 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25401 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25402   echo $ECHO_N "(cached) $ECHO_C" >&6
25403 else
25404   if test "$ac_cv_type_wchar_t" = yes; then
25405   if test "$cross_compiling" = yes; then
25406   # Depending upon the size, compute the lo and hi bounds.
25407 cat >conftest.$ac_ext <<_ACEOF
25408 #line 25408 "configure"
25409 #include "confdefs.h"
25410 $ac_includes_default
25411 int
25412 main (void)
25413 {
25414 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25415   ;
25416   return 0;
25417 }
25418 _ACEOF
25419 rm -f conftest.$ac_objext
25420 if { (eval echo "$as_me:25420: \"$ac_compile\"") >&5
25421   (eval $ac_compile) 2>&5
25422   ac_status=$?
25423   echo "$as_me:25423: \$? = $ac_status" >&5
25424   (exit $ac_status); } &&
25425          { ac_try='test -s conftest.$ac_objext'
25426   { (eval echo "$as_me:25426: \"$ac_try\"") >&5
25427   (eval $ac_try) 2>&5
25428   ac_status=$?
25429   echo "$as_me:25429: \$? = $ac_status" >&5
25430   (exit $ac_status); }; }; then
25431   ac_lo=0 ac_mid=0
25432   while :; do
25433     cat >conftest.$ac_ext <<_ACEOF
25434 #line 25434 "configure"
25435 #include "confdefs.h"
25436 $ac_includes_default
25437 int
25438 main (void)
25439 {
25440 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25441   ;
25442   return 0;
25443 }
25444 _ACEOF
25445 rm -f conftest.$ac_objext
25446 if { (eval echo "$as_me:25446: \"$ac_compile\"") >&5
25447   (eval $ac_compile) 2>&5
25448   ac_status=$?
25449   echo "$as_me:25449: \$? = $ac_status" >&5
25450   (exit $ac_status); } &&
25451          { ac_try='test -s conftest.$ac_objext'
25452   { (eval echo "$as_me:25452: \"$ac_try\"") >&5
25453   (eval $ac_try) 2>&5
25454   ac_status=$?
25455   echo "$as_me:25455: \$? = $ac_status" >&5
25456   (exit $ac_status); }; }; then
25457   ac_hi=$ac_mid; break
25458 else
25459   echo "$as_me: failed program was:" >&5
25460 cat conftest.$ac_ext >&5
25461 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25462 fi
25463 rm -f conftest.$ac_objext conftest.$ac_ext
25464   done
25465 else
25466   echo "$as_me: failed program was:" >&5
25467 cat conftest.$ac_ext >&5
25468 ac_hi=-1 ac_mid=-1
25469   while :; do
25470     cat >conftest.$ac_ext <<_ACEOF
25471 #line 25471 "configure"
25472 #include "confdefs.h"
25473 $ac_includes_default
25474 int
25475 main (void)
25476 {
25477 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25478   ;
25479   return 0;
25480 }
25481 _ACEOF
25482 rm -f conftest.$ac_objext
25483 if { (eval echo "$as_me:25483: \"$ac_compile\"") >&5
25484   (eval $ac_compile) 2>&5
25485   ac_status=$?
25486   echo "$as_me:25486: \$? = $ac_status" >&5
25487   (exit $ac_status); } &&
25488          { ac_try='test -s conftest.$ac_objext'
25489   { (eval echo "$as_me:25489: \"$ac_try\"") >&5
25490   (eval $ac_try) 2>&5
25491   ac_status=$?
25492   echo "$as_me:25492: \$? = $ac_status" >&5
25493   (exit $ac_status); }; }; then
25494   ac_lo=$ac_mid; break
25495 else
25496   echo "$as_me: failed program was:" >&5
25497 cat conftest.$ac_ext >&5
25498 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25499 fi
25500 rm -f conftest.$ac_objext conftest.$ac_ext
25501   done
25502 fi
25503 rm -f conftest.$ac_objext conftest.$ac_ext
25504 # Binary search between lo and hi bounds.
25505 while test "x$ac_lo" != "x$ac_hi"; do
25506   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25507   cat >conftest.$ac_ext <<_ACEOF
25508 #line 25508 "configure"
25509 #include "confdefs.h"
25510 $ac_includes_default
25511 int
25512 main (void)
25513 {
25514 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25515   ;
25516   return 0;
25517 }
25518 _ACEOF
25519 rm -f conftest.$ac_objext
25520 if { (eval echo "$as_me:25520: \"$ac_compile\"") >&5
25521   (eval $ac_compile) 2>&5
25522   ac_status=$?
25523   echo "$as_me:25523: \$? = $ac_status" >&5
25524   (exit $ac_status); } &&
25525          { ac_try='test -s conftest.$ac_objext'
25526   { (eval echo "$as_me:25526: \"$ac_try\"") >&5
25527   (eval $ac_try) 2>&5
25528   ac_status=$?
25529   echo "$as_me:25529: \$? = $ac_status" >&5
25530   (exit $ac_status); }; }; then
25531   ac_hi=$ac_mid
25532 else
25533   echo "$as_me: failed program was:" >&5
25534 cat conftest.$ac_ext >&5
25535 ac_lo=`expr $ac_mid + 1`
25536 fi
25537 rm -f conftest.$ac_objext conftest.$ac_ext
25538 done
25539 ac_cv_sizeof_wchar_t=$ac_lo
25540 else
25541   if test "$cross_compiling" = yes; then
25542   { { echo "$as_me:25542: error: cannot run test program while cross compiling" >&5
25543 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25544    { (exit 1); exit 1; }; }
25545 else
25546   cat >conftest.$ac_ext <<_ACEOF
25547 #line 25547 "configure"
25548 #include "confdefs.h"
25549 $ac_includes_default
25550 int
25551 main (void)
25552 {
25553 FILE *f = fopen ("conftest.val", "w");
25554 if (!f)
25555   $ac_main_return (1);
25556 fprintf (f, "%d", (sizeof (wchar_t)));
25557 fclose (f);
25558   ;
25559   return 0;
25560 }
25561 _ACEOF
25562 rm -f conftest$ac_exeext
25563 if { (eval echo "$as_me:25563: \"$ac_link\"") >&5
25564   (eval $ac_link) 2>&5
25565   ac_status=$?
25566   echo "$as_me:25566: \$? = $ac_status" >&5
25567   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25568   { (eval echo "$as_me:25568: \"$ac_try\"") >&5
25569   (eval $ac_try) 2>&5
25570   ac_status=$?
25571   echo "$as_me:25571: \$? = $ac_status" >&5
25572   (exit $ac_status); }; }; then
25573   ac_cv_sizeof_wchar_t=`cat conftest.val`
25574 else
25575   echo "$as_me: program exited with status $ac_status" >&5
25576 echo "$as_me: failed program was:" >&5
25577 cat conftest.$ac_ext >&5
25578 fi
25579 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25580 fi
25581 fi
25582 rm -f conftest.val
25583 else
25584   ac_cv_sizeof_wchar_t=0
25585 fi
25586 fi
25587 echo "$as_me:25587: result: $ac_cv_sizeof_wchar_t" >&5
25588 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25589 cat >>confdefs.h <<EOF
25590 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25591 EOF
25592
25593         # cross-compiling to mingw can run into the problem that attempting to
25594         # link with the regex library fails, causing the test to not set this to
25595         # a number.  "recent" autoconf does not address this problem either -TD
25596         if test -z "$ac_cv_sizeof_wchar_t"
25597         then
25598                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25599
25600 echo "${as_me:-configure}:25600: testing test failed (assume 2) ..." 1>&5
25601
25602                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25603                 mv confdefs.tmp confdefs.h
25604                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25605         fi
25606 fi
25607
25608 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25609 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25610 ###
25611 ### ticlib modules may be a separate library, otherwise contained in termlib.
25612 ### termlib modules may be a separate library, otherwise contained in ncurses.
25613 ###
25614 ### The of "+" or " " between the tokens controls the way the script
25615 ### chooses to split module lists into libraries.
25616 ###
25617 ### (see CF_LIB_RULES).
25618 echo "$as_me:25618: checking for library subsets" >&5
25619 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25620 LIB_SUBSETS=
25621
25622 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25623         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25624         if test "$with_ticlib" != no ; then
25625                 LIB_SUBSETS="${LIB_SUBSETS} "
25626         else
25627                 LIB_SUBSETS="${LIB_SUBSETS}+"
25628         fi
25629 fi
25630
25631 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25632 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25633
25634 if test "$with_termlib" != no ; then
25635         LIB_SUBSETS="${LIB_SUBSETS} "
25636 else
25637         LIB_SUBSETS="${LIB_SUBSETS}+"
25638 fi
25639
25640 LIB_SUBSETS="${LIB_SUBSETS}base"
25641
25642 # Most term-driver calls are to tinfo, but some like init_pair are to the
25643 # base library (so it resides in base).
25644 if test "$with_term_driver" != no ; then
25645         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25646         case $cf_cv_system_name in
25647         (*mingw32*|*mingw64*)
25648                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25649                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25650                 ;;
25651         (*)
25652                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25653                 ;;
25654         esac
25655 fi
25656
25657 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25658 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25659
25660 echo "$as_me:25660: result: $LIB_SUBSETS" >&5
25661 echo "${ECHO_T}$LIB_SUBSETS" >&6
25662
25663 ### Construct the list of include-directories to be generated
25664
25665 if test "$srcdir" != "."; then
25666         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25667 fi
25668 CPPFLAGS="-I../include $CPPFLAGS"
25669 if test "$srcdir" != "."; then
25670         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25671 fi
25672 CPPFLAGS="-I. $CPPFLAGS"
25673
25674 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25675 if test "$srcdir" != "."; then
25676         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25677 fi
25678 if test "$GCC" != yes; then
25679         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25680 elif test "$includedir" != "/usr/include"; then
25681         if test "$includedir" = '${prefix}/include' ; then
25682                 if test x$prefix != x/usr ; then
25683                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25684                 fi
25685         else
25686                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25687         fi
25688 fi
25689
25690 ### Build up pieces for makefile rules
25691 echo "$as_me:25691: checking default library suffix" >&5
25692 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25693
25694         case $DFT_LWR_MODEL in
25695         (libtool) DFT_ARG_SUFFIX=''   ;;
25696         (normal)  DFT_ARG_SUFFIX=''   ;;
25697         (debug)   DFT_ARG_SUFFIX='_g' ;;
25698         (profile) DFT_ARG_SUFFIX='_p' ;;
25699         (shared)  DFT_ARG_SUFFIX=''   ;;
25700         esac
25701         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25702 echo "$as_me:25702: result: $DFT_ARG_SUFFIX" >&5
25703 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25704
25705 echo "$as_me:25705: checking default library-dependency suffix" >&5
25706 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25707
25708         case X$DFT_LWR_MODEL in
25709         (Xlibtool)
25710                 DFT_LIB_SUFFIX='.la'
25711                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25712                 ;;
25713         (Xdebug)
25714                 case $cf_cv_system_name in
25715                 (*-msvc*)
25716                         DFT_LIB_SUFFIX='_g.lib'
25717                         ;;
25718                 (*)
25719                         DFT_LIB_SUFFIX='_g.a'
25720                         ;;
25721                 esac
25722                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25723                 ;;
25724         (Xprofile)
25725                 case $cf_cv_system_name in
25726                 (*-msvc*)
25727                         DFT_LIB_SUFFIX='_p.lib'
25728                         ;;
25729                 (*)
25730                         DFT_LIB_SUFFIX='_p.a'
25731                         ;;
25732                 esac
25733                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25734                 ;;
25735         (Xshared)
25736                 case $cf_cv_system_name in
25737                 (aix[5-7]*)
25738                         DFT_LIB_SUFFIX='.so'
25739                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25740                         ;;
25741                 (*-msvc*)
25742                         DFT_LIB_SUFFIX='.dll'
25743                         DFT_DEP_SUFFIX='.dll.lib'
25744                         ;;
25745                 (cygwin*|msys*|mingw*)
25746                         DFT_LIB_SUFFIX='.dll'
25747                         DFT_DEP_SUFFIX='.dll.a'
25748                         ;;
25749                 (darwin*)
25750                         DFT_LIB_SUFFIX='.dylib'
25751                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25752                         ;;
25753                 (hpux*)
25754                         case $target in
25755                         (ia64*)
25756                                 DFT_LIB_SUFFIX='.so'
25757                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25758                                 ;;
25759                         (*)
25760                                 DFT_LIB_SUFFIX='.sl'
25761                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25762                                 ;;
25763                         esac
25764                         ;;
25765                 (*)
25766                         DFT_LIB_SUFFIX='.so'
25767                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25768                         ;;
25769                 esac
25770                 ;;
25771         (*)
25772                 case $target in
25773                 (*-msvc*)
25774                         DFT_LIB_SUFFIX='.lib'
25775                         ;;
25776                 (*)
25777                         DFT_LIB_SUFFIX='.a'
25778                         ;;
25779                 esac
25780                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25781                 ;;
25782         esac
25783         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25784         then
25785                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25786                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25787         fi
25788 echo "$as_me:25788: result: $DFT_DEP_SUFFIX" >&5
25789 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25790
25791 echo "$as_me:25791: checking default object directory" >&5
25792 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25793
25794         case $DFT_LWR_MODEL in
25795         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25796         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25797         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25798         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25799         (shared)
25800                 case $cf_cv_system_name in
25801                 (cygwin|msys)
25802                         DFT_OBJ_SUBDIR='objects' ;;
25803                 (*)
25804                         DFT_OBJ_SUBDIR='obj_s' ;;
25805                 esac
25806         esac
25807 echo "$as_me:25807: result: $DFT_OBJ_SUBDIR" >&5
25808 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25809
25810 if test "x$cf_with_cxx" = xyes ; then
25811 echo "$as_me:25811: checking c++ library-dependency suffix" >&5
25812 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25813 if test "$with_libtool" != "no"; then
25814         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25815         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25816 elif test "$with_shared_cxx" != "no"; then
25817         # also for g++ users...
25818         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25819 else
25820         # we normally make a static library because C/C++ library rules differ
25821
25822         case Xnormal in
25823         (Xlibtool)
25824                 CXX_LIB_SUFFIX='.la'
25825                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25826                 ;;
25827         (Xdebug)
25828                 case $cf_cv_system_name in
25829                 (*-msvc*)
25830                         CXX_LIB_SUFFIX='_g.lib'
25831                         ;;
25832                 (*)
25833                         CXX_LIB_SUFFIX='_g.a'
25834                         ;;
25835                 esac
25836                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25837                 ;;
25838         (Xprofile)
25839                 case $cf_cv_system_name in
25840                 (*-msvc*)
25841                         CXX_LIB_SUFFIX='_p.lib'
25842                         ;;
25843                 (*)
25844                         CXX_LIB_SUFFIX='_p.a'
25845                         ;;
25846                 esac
25847                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25848                 ;;
25849         (Xshared)
25850                 case $cf_cv_system_name in
25851                 (aix[5-7]*)
25852                         CXX_LIB_SUFFIX='.so'
25853                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25854                         ;;
25855                 (*-msvc*)
25856                         CXX_LIB_SUFFIX='.dll'
25857                         CXX_DEP_SUFFIX='.dll.lib'
25858                         ;;
25859                 (cygwin*|msys*|mingw*)
25860                         CXX_LIB_SUFFIX='.dll'
25861                         CXX_DEP_SUFFIX='.dll.a'
25862                         ;;
25863                 (darwin*)
25864                         CXX_LIB_SUFFIX='.dylib'
25865                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25866                         ;;
25867                 (hpux*)
25868                         case $target in
25869                         (ia64*)
25870                                 CXX_LIB_SUFFIX='.so'
25871                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25872                                 ;;
25873                         (*)
25874                                 CXX_LIB_SUFFIX='.sl'
25875                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25876                                 ;;
25877                         esac
25878                         ;;
25879                 (*)
25880                         CXX_LIB_SUFFIX='.so'
25881                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25882                         ;;
25883                 esac
25884                 ;;
25885         (*)
25886                 case $target in
25887                 (*-msvc*)
25888                         CXX_LIB_SUFFIX='.lib'
25889                         ;;
25890                 (*)
25891                         CXX_LIB_SUFFIX='.a'
25892                         ;;
25893                 esac
25894                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25895                 ;;
25896         esac
25897         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25898         then
25899                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25900                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25901         fi
25902
25903 fi
25904 echo "$as_me:25904: result: $CXX_LIB_SUFFIX" >&5
25905 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25906
25907 fi
25908
25909 # do not want -ldl in build except as needed for -lncurses dependency
25910 if test "x$with_dlsym" = xyes ; then
25911 if test $DFT_LWR_MODEL = shared || \
25912    test $DFT_LWR_MODEL = libtool ; then
25913
25914 # remove dl library from $LIBS
25915 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25916
25917 fi
25918 fi
25919 ### Set up low-level terminfo dependencies for makefiles.
25920
25921 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25922 # do not need libdl
25923 TICS_LIST=
25924 if test "x$with_dlsym" = xyes ; then
25925
25926 # remove dl library from $SHLIB_LIST
25927 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25928
25929 fi
25930
25931 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25932 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25933 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25934 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25935 then
25936         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25937 fi
25938
25939 if test "$with_ticlib" != no ; then
25940
25941         if test "x$with_ticlib" != xyes ; then
25942                 TICS_NAME=$with_ticlib
25943                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25944                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25945                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25946                 TICS_LIB_SUFFIX="${with_ticlib}"
25947         else
25948                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25949                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25950                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25951                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25952         fi
25953         TICS_LDFLAGS="-L${LIB_DIR}"
25954         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25955 else
25956         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25957         TICS_LDFLAGS="-L${LIB_DIR}"
25958         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25959 fi
25960
25961 if test "$with_termlib" != no ; then
25962
25963         if test "x$with_termlib" != xyes ; then
25964                 TINFO_NAME=$with_termlib
25965                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25966                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25967                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25968                 TINFO_LIB_SUFFIX="${with_termlib}"
25969         else
25970                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25971                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25972                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25973                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25974         fi
25975
25976         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25977         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25978         if test "$DFT_LWR_MODEL" = "libtool"; then
25979                 TEST_ARGS="${TEST_DEPS}"
25980                 TEST_ARG2="${TEST_DEP2}"
25981                 TINFO_LDFLAGS="-L${LIB_DIR}"
25982                 TINFO_LIBS="$TEST_ARGS"
25983                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25984                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25985         else
25986                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25987                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25988                 if test "x$with_term_driver" != xno ; then
25989                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25990                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25991                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25992                 else
25993                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25994                         TINFO_LIBS="$TEST_ARGS"
25995                 fi
25996                 TINFO_LDFLAGS="-L${LIB_DIR}"
25997                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25998         fi
25999 else
26000         # the next lines are needed for linking libtic over libncurses
26001         TINFO_NAME=${LIB_NAME}
26002         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
26003         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
26004         if test "x$with_tic_depends" = xyes ; then
26005                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
26006         else
26007                 TICS_LIST="$SHLIB_LIST"
26008         fi
26009
26010         TINFO_LDFLAGS="-L${LIB_DIR}"
26011         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
26012 fi
26013
26014 if test "$DFT_LWR_MODEL" = shared ; then
26015         case $cf_cv_system_name in
26016         (cygwin*|msys*)
26017                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
26018                 TINFO_SUFFIX=.dll
26019                 ;;
26020         esac
26021 fi
26022
26023 if test "x$with_dlsym" = xyes ; then
26024
26025 # remove dl library from $TICS_LIST
26026 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
26027
26028 fi
26029
26030 if test "$DFT_LWR_MODEL" = "libtool"; then
26031         OBJEXT=lo
26032 fi
26033
26034 # needed for Ada95
26035 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26036
26037 case $DFT_LWR_MODEL in
26038 (normal|debug|profile)
26039
26040 if test "$GCC" = yes ; then
26041         case $cf_cv_system_name in
26042         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26043                 LDFLAGS_STATIC=
26044                 LDFLAGS_SHARED=
26045                 ;;
26046         (*)     # normally, except when broken
26047                 LDFLAGS_STATIC=-static
26048                 LDFLAGS_SHARED=-dynamic
26049                 ;;
26050         esac
26051 else
26052         case $cf_cv_system_name in
26053         (aix[4-7]*)     # from ld manpage
26054                 LDFLAGS_STATIC=-bstatic
26055                 LDFLAGS_SHARED=-bdynamic
26056                 ;;
26057         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26058                 # We could also use just "archive" and "shared".
26059                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26060                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26061                 ;;
26062         (irix*)         # from ld manpage IRIX64
26063                 LDFLAGS_STATIC=-Bstatic
26064                 LDFLAGS_SHARED=-Bdynamic
26065                 ;;
26066         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26067                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26068                 LDFLAGS_STATIC=-noso
26069                 LDFLAGS_SHARED=-so_archive
26070                 ;;
26071         (solaris2*)
26072                 LDFLAGS_STATIC=-Bstatic
26073                 LDFLAGS_SHARED=-Bdynamic
26074                 ;;
26075         esac
26076 fi
26077
26078 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26079 then
26080         echo "$as_me:26080: checking if linker supports switching between static/dynamic" >&5
26081 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26082
26083         rm -f libconftest.a
26084         cat >conftest.$ac_ext <<EOF
26085 #line 26085 "configure"
26086 #include <stdio.h>
26087 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26088 EOF
26089         if { (eval echo "$as_me:26089: \"$ac_compile\"") >&5
26090   (eval $ac_compile) 2>&5
26091   ac_status=$?
26092   echo "$as_me:26092: \$? = $ac_status" >&5
26093   (exit $ac_status); } ; then
26094                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26095                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26096         fi
26097         rm -f conftest.*
26098
26099         cf_save_LIBS="$LIBS"
26100
26101         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26102         cat >conftest.$ac_ext <<_ACEOF
26103 #line 26103 "configure"
26104 #include "confdefs.h"
26105
26106 #line 26106 "configure"
26107 #include <stdio.h>
26108 int cf_ldflags_static(FILE *fp);
26109
26110 int
26111 main (void)
26112 {
26113
26114         return cf_ldflags_static(stdin);
26115
26116   ;
26117   return 0;
26118 }
26119 _ACEOF
26120 rm -f conftest.$ac_objext conftest$ac_exeext
26121 if { (eval echo "$as_me:26121: \"$ac_link\"") >&5
26122   (eval $ac_link) 2>&5
26123   ac_status=$?
26124   echo "$as_me:26124: \$? = $ac_status" >&5
26125   (exit $ac_status); } &&
26126          { ac_try='test -s conftest$ac_exeext'
26127   { (eval echo "$as_me:26127: \"$ac_try\"") >&5
26128   (eval $ac_try) 2>&5
26129   ac_status=$?
26130   echo "$as_me:26130: \$? = $ac_status" >&5
26131   (exit $ac_status); }; }; then
26132
26133         # some linkers simply ignore the -dynamic
26134         case x`file conftest$ac_exeext 2>/dev/null` in
26135         (*static*)
26136                 cf_ldflags_static=no
26137                 ;;
26138         (*)
26139                 cf_ldflags_static=yes
26140                 ;;
26141         esac
26142
26143 else
26144   echo "$as_me: failed program was:" >&5
26145 cat conftest.$ac_ext >&5
26146 cf_ldflags_static=no
26147 fi
26148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26149
26150         rm -f libconftest.*
26151         LIBS="$cf_save_LIBS"
26152
26153         echo "$as_me:26153: result: $cf_ldflags_static" >&5
26154 echo "${ECHO_T}$cf_ldflags_static" >&6
26155
26156         if test $cf_ldflags_static != yes
26157         then
26158                 LDFLAGS_STATIC=
26159                 LDFLAGS_SHARED=
26160         fi
26161 else
26162         LDFLAGS_STATIC=
26163         LDFLAGS_SHARED=
26164 fi
26165
26166         ;;
26167 esac
26168
26169 echo "$as_me:26169: checking where we will install curses.h" >&5
26170 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26171
26172 includesubdir=
26173 if test "$with_overwrite" = no && \
26174  ( test "x$includedir" = 'x${prefix}/include' || \
26175    test "x$includedir" = "x${prefix}/include" )
26176 then
26177         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26178 fi
26179 echo "$as_me:26179: result: ${includedir}${includesubdir}" >&5
26180 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26181
26182 ### Resolve a conflict between normal and wide-curses by forcing applications
26183 ### that will need libutf8 to add it to their configure script.
26184 if test "$with_overwrite" != no ; then
26185 if test "$NCURSES_LIBUTF8" = 1 ; then
26186         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26187         { echo "$as_me:26187: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26188 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26189 fi
26190 fi
26191 WITH_OVERWRITE=$with_overwrite
26192
26193 ### At least on MinGW a shared library build without libtool
26194 ### requires adding the additional libs to the link list.
26195 case $cf_cv_system_name in
26196 (*mingw32*|*mingw64*)
26197         if test "$DFT_LWR_MODEL" != "libtool"; then
26198            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
26199         fi
26200         ;;
26201 *)      ;;
26202 esac
26203
26204 # used to separate tack out of the tree
26205 NCURSES_TREE=
26206
26207 ### predefined stuff for the test programs
26208
26209 cat >>confdefs.h <<\EOF
26210 #define HAVE_SLK_COLOR 1
26211 EOF
26212
26213 # pkgsrc uses these
26214
26215 echo "$as_me:26215: checking for desired basename for form library" >&5
26216 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26217
26218 # Check whether --with-form-libname or --without-form-libname was given.
26219 if test "${with_form_libname+set}" = set; then
26220   withval="$with_form_libname"
26221   with_lib_basename=$withval
26222 else
26223   with_lib_basename=form
26224 fi;
26225 FORM_NAME="$with_lib_basename"
26226
26227 case "x$FORM_NAME" in
26228 (x|xno|xnone|xyes)
26229         FORM_NAME=form
26230         ;;
26231 (*)
26232         ;;
26233 esac
26234
26235 echo "$as_me:26235: result: $FORM_NAME" >&5
26236 echo "${ECHO_T}$FORM_NAME" >&6
26237
26238 echo "$as_me:26238: checking for desired basename for menu library" >&5
26239 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26240
26241 # Check whether --with-menu-libname or --without-menu-libname was given.
26242 if test "${with_menu_libname+set}" = set; then
26243   withval="$with_menu_libname"
26244   with_lib_basename=$withval
26245 else
26246   with_lib_basename=menu
26247 fi;
26248 MENU_NAME="$with_lib_basename"
26249
26250 case "x$MENU_NAME" in
26251 (x|xno|xnone|xyes)
26252         MENU_NAME=menu
26253         ;;
26254 (*)
26255         ;;
26256 esac
26257
26258 echo "$as_me:26258: result: $MENU_NAME" >&5
26259 echo "${ECHO_T}$MENU_NAME" >&6
26260
26261 echo "$as_me:26261: checking for desired basename for panel library" >&5
26262 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26263
26264 # Check whether --with-panel-libname or --without-panel-libname was given.
26265 if test "${with_panel_libname+set}" = set; then
26266   withval="$with_panel_libname"
26267   with_lib_basename=$withval
26268 else
26269   with_lib_basename=panel
26270 fi;
26271 PANEL_NAME="$with_lib_basename"
26272
26273 case "x$PANEL_NAME" in
26274 (x|xno|xnone|xyes)
26275         PANEL_NAME=panel
26276         ;;
26277 (*)
26278         ;;
26279 esac
26280
26281 echo "$as_me:26281: result: $PANEL_NAME" >&5
26282 echo "${ECHO_T}$PANEL_NAME" >&6
26283
26284 echo "$as_me:26284: checking for desired basename for cxx library" >&5
26285 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26286
26287 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26288 if test "${with_cxx_libname+set}" = set; then
26289   withval="$with_cxx_libname"
26290   with_lib_basename=$withval
26291 else
26292   with_lib_basename=ncurses++
26293 fi;
26294 CXX_NAME="$with_lib_basename"
26295
26296 case "x$CXX_NAME" in
26297 (x|xno|xnone|xyes)
26298         CXX_NAME=ncurses++
26299         ;;
26300 (*)
26301         ;;
26302 esac
26303
26304 echo "$as_me:26304: result: $CXX_NAME" >&5
26305 echo "${ECHO_T}$CXX_NAME" >&6
26306
26307 ### Construct the list of subdirectories for which we'll customize makefiles
26308 ### with the appropriate compile-rules.
26309
26310 echo "$as_me:26310: checking for src modules" >&5
26311 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26312
26313 # dependencies and linker-arguments for test-programs
26314 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26315 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26316 if test "$DFT_LWR_MODEL" = "libtool"; then
26317         TEST_ARGS="${TEST_DEPS}"
26318         TEST_ARG2="${TEST_DEP2}"
26319 else
26320         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26321         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26322 fi
26323
26324 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26325 cf_cv_src_modules=
26326 for cf_dir in $modules_to_build
26327 do
26328         if test -f $srcdir/$cf_dir/modules; then
26329
26330                 # We may/may not have tack in the distribution, though the
26331                 # makefile is.
26332                 if test $cf_dir = tack ; then
26333                         if test "x$cf_with_tack" != "xyes"; then
26334                                 continue
26335                         fi
26336                 fi
26337
26338                 if test -z "$cf_cv_src_modules"; then
26339                         cf_cv_src_modules=$cf_dir
26340                 else
26341                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26342                 fi
26343
26344                 # Make the ncurses_cfg.h file record the library interface files as
26345                 # well.  These are header files that are the same name as their
26346                 # directory.  Ncurses is the only library that does not follow
26347                 # that pattern.
26348                 if test $cf_dir = tack ; then
26349                         continue
26350                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26351
26352 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26353
26354                         cat >>confdefs.h <<EOF
26355 #define HAVE_${cf_have_include}_H 1
26356 EOF
26357
26358                         cat >>confdefs.h <<EOF
26359 #define HAVE_LIB${cf_have_include} 1
26360 EOF
26361
26362 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26363
26364 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26365
26366                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26367                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26368                         if test "$DFT_LWR_MODEL" = "libtool"; then
26369                                 TEST_ARGS="${TEST_DEPS}"
26370                                 TEST_ARG2="${TEST_DEP2}"
26371                         else
26372                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26373                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26374                         fi
26375                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26376                 fi
26377         fi
26378 done
26379 echo "$as_me:26379: result: $cf_cv_src_modules" >&5
26380 echo "${ECHO_T}$cf_cv_src_modules" >&6
26381
26382 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26383 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26384
26385 SRC_SUBDIRS=
26386 if test "x$cf_with_manpages" != xno ; then
26387         SRC_SUBDIRS="$SRC_SUBDIRS man"
26388 fi
26389 SRC_SUBDIRS="$SRC_SUBDIRS include"
26390 for cf_dir in $cf_cv_src_modules
26391 do
26392         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26393 done
26394 if test "x$cf_with_tests" != "xno" ; then
26395         SRC_SUBDIRS="$SRC_SUBDIRS test"
26396 fi
26397 # always make this, to install the ncurses-config script
26398 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26399 if test "$cf_with_cxx_binding" != no; then
26400         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26401         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26402 fi
26403
26404 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26405 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26406
26407 ADA_SUBDIRS=
26408 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26409         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26410         ADA_SUBDIRS="gen src"
26411         if test "x$cf_with_tests" != "xno" ; then
26412                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26413         fi
26414 fi
26415
26416 SUB_MAKEFILES=
26417 for cf_dir in $SRC_SUBDIRS
26418 do
26419         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26420 done
26421
26422 if test -n "$ADA_SUBDIRS"; then
26423         for cf_dir in $ADA_SUBDIRS
26424         do
26425                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26426         done
26427
26428 fi
26429
26430 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26431    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26432    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26433    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26434 fi
26435
26436 DIRS_TO_MAKE="lib"
26437 for cf_item in $cf_list_models
26438 do
26439
26440         case $cf_item in
26441         (libtool) cf_subdir='obj_lo'  ;;
26442         (normal)  cf_subdir='objects' ;;
26443         (debug)   cf_subdir='obj_g' ;;
26444         (profile) cf_subdir='obj_p' ;;
26445         (shared)
26446                 case $cf_cv_system_name in
26447                 (cygwin|msys)
26448                         cf_subdir='objects' ;;
26449                 (*)
26450                         cf_subdir='obj_s' ;;
26451                 esac
26452         esac
26453
26454         for cf_item2 in $DIRS_TO_MAKE
26455         do
26456                 test $cf_item2 = $cf_subdir && break
26457         done
26458         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26459 done
26460 for cf_dir in $DIRS_TO_MAKE
26461 do
26462         test ! -d $cf_dir && mkdir $cf_dir
26463 done
26464
26465 # symbols that differ when compiling Ada95 by itself.
26466 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26467
26468 # values to use as strings
26469
26470 cat >>confdefs.h <<EOF
26471 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26472 EOF
26473
26474 cat >>confdefs.h <<EOF
26475 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26476 EOF
26477
26478 ### Now that we're done running tests, add the compiler-warnings, if any
26479
26480 cf_fix_cppflags=no
26481 cf_new_cflags=
26482 cf_new_cppflags=
26483 cf_new_extra_cppflags=
26484
26485 for cf_add_cflags in $EXTRA_CFLAGS
26486 do
26487 case $cf_fix_cppflags in
26488 (no)
26489         case $cf_add_cflags in
26490         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26491                 case $cf_add_cflags in
26492                 (-D*)
26493                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26494
26495                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26496                                 && test -z "${cf_tst_cflags}" \
26497                                 && cf_fix_cppflags=yes
26498
26499                         if test $cf_fix_cppflags = yes ; then
26500
26501         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26502         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26503
26504                                 continue
26505                         elif test "${cf_tst_cflags}" = "\"'" ; then
26506
26507         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26508         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26509
26510                                 continue
26511                         fi
26512                         ;;
26513                 esac
26514                 case "$CPPFLAGS" in
26515                 (*$cf_add_cflags)
26516                         ;;
26517                 (*)
26518                         case $cf_add_cflags in
26519                         (-D*)
26520                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26521
26522 CPPFLAGS=`echo "$CPPFLAGS" | \
26523         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26524                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26525
26526                                 ;;
26527                         esac
26528
26529         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26530         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26531
26532                         ;;
26533                 esac
26534                 ;;
26535         (*)
26536
26537         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26538         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26539
26540                 ;;
26541         esac
26542         ;;
26543 (yes)
26544
26545         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26546         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26547
26548         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26549
26550         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26551                 && test -z "${cf_tst_cflags}" \
26552                 && cf_fix_cppflags=no
26553         ;;
26554 esac
26555 done
26556
26557 if test -n "$cf_new_cflags" ; then
26558
26559         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26560         CFLAGS="${CFLAGS}$cf_new_cflags"
26561
26562 fi
26563
26564 if test -n "$cf_new_cppflags" ; then
26565
26566         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26567         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26568
26569 fi
26570
26571 if test -n "$cf_new_extra_cppflags" ; then
26572
26573         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26574         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26575
26576 fi
26577
26578 ### Define substitutions for header files to avoid name-pollution
26579
26580 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26581         HAVE_TCGETATTR=1
26582 else
26583         HAVE_TCGETATTR=0
26584 fi
26585
26586 if test "x$ac_cv_header_stdint_h" = xyes ; then
26587         HAVE_STDINT_H=1
26588 else
26589         HAVE_STDINT_H=0
26590 fi
26591
26592 if test "x$ac_cv_header_termio_h" = xyes ; then
26593         HAVE_TERMIO_H=1
26594 else
26595         HAVE_TERMIO_H=0
26596 fi
26597
26598 if test "x$ac_cv_header_termios_h" = xyes ; then
26599         HAVE_TERMIOS_H=1
26600 else
26601         HAVE_TERMIOS_H=0
26602 fi
26603
26604 ################################################################################
26605 test "x$use_database" = xyes && \
26606 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26607
26608 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26609 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26610
26611 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26612 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26613 fi
26614
26615 if test "x$cf_with_tests" != xno ; then
26616         MAKE_TESTS=
26617 else
26618         MAKE_TESTS="#"
26619 fi
26620
26621 ADAHTML_DIR=../../doc/html/ada
26622
26623 # workaround for OS/2 (20151017)
26624 case $cf_cv_system_name in
26625 (os2*)
26626         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26627         ;;
26628 (*)
26629         LIBTOOL_OPTS_CXX=
26630         ;;
26631 esac
26632
26633 # workaround for g++ versus Solaris (20131116)
26634 case $cf_cv_system_name in
26635 (solaris2*)
26636         case "x$CPPFLAGS" in
26637         (*-D_XOPEN_SOURCE_EXTENDED*)
26638                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26639
26640 echo "${as_me:-configure}:26640: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26641
26642                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26643                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26644                 ;;
26645         esac
26646         ;;
26647 esac
26648
26649 # Help to automatically enable the extended curses features when using either
26650 # the *-config or the ".pc" files by adding defines.
26651 echo "$as_me:26651: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26652 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26653 PKG_CFLAGS=
26654 for cf_loop1 in $CPPFLAGS_after_XOPEN
26655 do
26656         cf_found=no
26657         for cf_loop2 in $CPPFLAGS_before_XOPEN
26658         do
26659                 if test "x$cf_loop1" = "x$cf_loop2"
26660                 then
26661                         cf_found=yes
26662                         break
26663                 fi
26664         done
26665         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26666 done
26667 echo "$as_me:26667: result: $PKG_CFLAGS" >&5
26668 echo "${ECHO_T}$PKG_CFLAGS" >&6
26669
26670 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26671 case "x$NCURSES_OSPEED" in
26672 (*short*)
26673         cf_compatible=1
26674         ;;
26675 (*)
26676         cf_compatible=0
26677         ;;
26678 esac
26679
26680 cat >>confdefs.h <<EOF
26681 #define NCURSES_OSPEED_COMPAT $cf_compatible
26682 EOF
26683
26684 case "x$cf_cv_typeof_chtype" in
26685 (xshort|xint|xlong)
26686         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26687         ;;
26688 esac
26689
26690 case "x$cf_cv_typeof_mmask_t" in
26691 (xshort|xint|xlong)
26692         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26693         ;;
26694 esac
26695
26696 # substitute into misc/Makefile to suppress
26697 # (un)install.data from the
26698 # (un)install rules.
26699 if test "x$cf_with_db_install" = "xno"; then
26700         MISC_INSTALL_DATA=
26701         MISC_UNINSTALL_DATA=
26702 else
26703         MISC_INSTALL_DATA=install.data
26704         MISC_UNINSTALL_DATA=uninstall.data
26705 fi
26706
26707 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26708         MAKE_DATABASE="#"
26709 else
26710         MAKE_DATABASE="$MAKE_TERMINFO"
26711 fi
26712
26713 if test -n "$PACKAGE"
26714 then
26715         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26716         export PACKAGE
26717         echo "package: $PACKAGE"
26718 fi
26719
26720 UNALTERED_SYMS=
26721 cf_filter_syms=no
26722
26723 if test -n "$RESULTING_SYMS"
26724 then
26725         cf_filter_syms=$cf_dft_filter_syms
26726         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26727
26728 echo "${as_me:-configure}:26728: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26729
26730 fi
26731
26732 if test "x$WILDCARD_SYMS" = xno
26733 then
26734         cf_filter_syms=yes
26735 fi
26736
26737 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26738
26739 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26740 if test $cf_filter_syms = yes
26741 then
26742         RESULTING_SYMS=resulting.map
26743 fi
26744
26745 if test "x$cross_compiling" = xyes ; then
26746         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26747         CHECK_BUILD="#"
26748 else
26749         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26750         CHECK_BUILD=
26751 fi
26752
26753 # This is used for the *-config script and *.pc data files.
26754
26755 echo "$as_me:26755: checking for linker search path" >&5
26756 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26757 if test "${cf_cv_ld_searchpath+set}" = set; then
26758   echo $ECHO_N "(cached) $ECHO_C" >&6
26759 else
26760
26761 if test "$cross_compiling" != yes ; then
26762
26763 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26764 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26765
26766 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26767 # update the cache, which makes it run faster.
26768 test -z "$cf_pathlist" && \
26769         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26770
26771 test -z "$cf_pathlist" &&
26772         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26773
26774 # This works with OpenBSD 6.5, which lists only filenames
26775 test -z "$cf_pathlist" &&
26776         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26777
26778 if test -z "$cf_pathlist"
26779 then
26780         # dyld default path with MacOS
26781         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26782         then
26783                 # do this to bypass check
26784                 cf_cv_ld_searchpath='$HOME/lib'
26785                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26786         fi
26787 fi
26788
26789 if test -z "$cf_pathlist"
26790 then
26791         # Solaris is hardcoded
26792         if test -d /opt/SUNWspro/lib
26793         then
26794                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26795         elif test -d /usr/ccs/lib
26796         then
26797                 cf_pathlist="/usr/ccs/lib /usr/lib"
26798         fi
26799 fi
26800
26801 fi
26802
26803 # If nothing else, assume it is conventional
26804 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26805
26806 # Finally, check that this is only directories
26807 for cf_path in $0 $cf_pathlist
26808 do
26809         if test -d "$cf_path"; then
26810                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26811                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26812         fi
26813 done
26814
26815 # Ensure that it is nonempty
26816 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26817
26818 fi
26819 echo "$as_me:26819: result: $cf_cv_ld_searchpath" >&5
26820 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26821
26822 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26823
26824 cat >>confdefs.h <<\EOF
26825 #define HAVE_CURSES_DATA_BOOLNAMES 1
26826 EOF
26827
26828 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"
26829 ac_config_commands="$ac_config_commands default"
26830 cat >confcache <<\_ACEOF
26831 # This file is a shell script that caches the results of configure
26832 # tests run on this system so they can be shared between configure
26833 # scripts and configure runs, see configure's option --config-cache.
26834 # It is not useful on other systems.  If it contains results you don't
26835 # want to keep, you may remove or edit it.
26836 #
26837 # config.status only pays attention to the cache file if you give it
26838 # the --recheck option to rerun configure.
26839 #
26840 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26841 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26842 # following values.
26843
26844 _ACEOF
26845
26846 # The following way of writing the cache mishandles newlines in values,
26847 # but we know of no workaround that is simple, portable, and efficient.
26848 # So, don't put newlines in cache variables' values.
26849 # Ultrix sh set writes to stderr and can't be redirected directly,
26850 # and sets the high bit in the cache file unless we assign to the vars.
26851 {
26852   (set) 2>&1 |
26853     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26854     *ac_space=\ *)
26855       # `set' does not quote correctly, so add quotes (double-quote
26856       # substitution turns \\\\ into \\, and sed turns \\ into \).
26857       sed -n \
26858         "s/'/'\\\\''/g;
26859           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26860       ;;
26861     *)
26862       # `set' quotes correctly as required by POSIX, so do not add quotes.
26863       sed -n \
26864         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26865       ;;
26866     esac;
26867 } |
26868   sed '
26869      t clear
26870      : clear
26871      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26872      t end
26873      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26874      : end' >>confcache
26875 if cmp -s $cache_file confcache; then :; else
26876   if test -w $cache_file; then
26877     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26878     cat confcache >$cache_file
26879   else
26880     echo "not updating unwritable cache $cache_file"
26881   fi
26882 fi
26883 rm -f confcache
26884
26885 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26886 # Let make expand exec_prefix.
26887 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26888
26889 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26890 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26891 # trailing colons and then remove the whole line if VPATH becomes empty
26892 # (actually we leave an empty line to preserve line numbers).
26893 if test "x$srcdir" = x.; then
26894   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26895 s/:*\$(srcdir):*/:/;
26896 s/:*\${srcdir}:*/:/;
26897 s/:*@srcdir@:*/:/;
26898 s/^\([^=]*=[    ]*\):*/\1/;
26899 s/:*$//;
26900 s/^[^=]*=[      ]*$//;
26901 }'
26902 fi
26903
26904 DEFS=-DHAVE_CONFIG_H
26905
26906 : ${CONFIG_STATUS=./config.status}
26907 ac_clean_files_save=$ac_clean_files
26908 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26909 { echo "$as_me:26909: creating $CONFIG_STATUS" >&5
26910 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26911 cat >$CONFIG_STATUS <<_ACEOF
26912 #! $SHELL
26913 # Generated automatically by configure.
26914 # Run this file to recreate the current configuration.
26915 # Compiler output produced by configure, useful for debugging
26916 # configure, is in config.log if it exists.
26917
26918 debug=false
26919 SHELL=\${CONFIG_SHELL-$SHELL}
26920 ac_cs_invocation="\$0 \$@"
26921
26922 CLICOLOR_FORCE= GREP_OPTIONS=
26923 unset CLICOLOR_FORCE GREP_OPTIONS
26924 _ACEOF
26925
26926 cat >>$CONFIG_STATUS <<\_ACEOF
26927 # Be Bourne compatible
26928 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26929   emulate sh
26930   NULLCMD=:
26931 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26932   set -o posix
26933 fi
26934
26935 # Name of the executable.
26936 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26937
26938 if expr a : '\(a\)' >/dev/null 2>&1; then
26939   as_expr=expr
26940 else
26941   as_expr=false
26942 fi
26943
26944 rm -f conf$$ conf$$.exe conf$$.file
26945 echo >conf$$.file
26946 if ln -s conf$$.file conf$$ 2>/dev/null; then
26947   # We could just check for DJGPP; but this test a) works b) is more generic
26948   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26949   if test -f conf$$.exe; then
26950     # Don't use ln at all; we don't have any links
26951     as_ln_s='cp -p'
26952   else
26953     as_ln_s='ln -s'
26954   fi
26955 elif ln conf$$.file conf$$ 2>/dev/null; then
26956   as_ln_s=ln
26957 else
26958   as_ln_s='cp -p'
26959 fi
26960 rm -f conf$$ conf$$.exe conf$$.file
26961
26962 as_executable_p="test -f"
26963
26964 # Support unset when possible.
26965 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26966   as_unset=unset
26967 else
26968   as_unset=false
26969 fi
26970
26971 # NLS nuisances.
26972 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26973 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26974 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26975 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26976 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26977 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26978 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26979 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26980
26981 # IFS
26982 # We need space, tab and new line, in precisely that order.
26983 as_nl='
26984 '
26985 IFS="   $as_nl"
26986
26987 # CDPATH.
26988 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26989
26990 exec 6>&1
26991
26992 _ACEOF
26993
26994 # Files that config.status was made for.
26995 if test -n "$ac_config_files"; then
26996   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26997 fi
26998
26999 if test -n "$ac_config_headers"; then
27000   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
27001 fi
27002
27003 if test -n "$ac_config_links"; then
27004   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
27005 fi
27006
27007 if test -n "$ac_config_commands"; then
27008   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
27009 fi
27010
27011 cat >>$CONFIG_STATUS <<\EOF
27012
27013 ac_cs_usage="\
27014 \`$as_me' instantiates files from templates according to the
27015 current configuration.
27016
27017 Usage: $0 [OPTIONS] [FILE]...
27018
27019   -h, --help       print this help, then exit
27020   -V, --version    print version number, then exit
27021   -d, --debug      don't remove temporary files
27022       --recheck    update $as_me by reconfiguring in the same conditions
27023   --file=FILE[:TEMPLATE]
27024                    instantiate the configuration file FILE
27025   --header=FILE[:TEMPLATE]
27026                    instantiate the configuration header FILE
27027
27028 Configuration files:
27029 $config_files
27030
27031 Configuration headers:
27032 $config_headers
27033
27034 Configuration commands:
27035 $config_commands
27036
27037 Report bugs to <dickey@invisible-island.net>."
27038 EOF
27039
27040 cat >>$CONFIG_STATUS <<EOF
27041 ac_cs_version="\\
27042 config.status
27043 configured by $0, generated by GNU Autoconf 2.52.20200802,
27044   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
27045
27046 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
27047 Free Software Foundation, Inc.
27048 This config.status script is free software; the Free Software Foundation
27049 gives unlimited permission to copy, distribute and modify it."
27050 srcdir=$srcdir
27051 INSTALL="$INSTALL"
27052 EOF
27053
27054 cat >>$CONFIG_STATUS <<\EOF
27055 # If no file are specified by the user, then we need to provide default
27056 # value.  By we need to know if files were specified by the user.
27057 ac_need_defaults=:
27058 while test $# != 0
27059 do
27060   case $1 in
27061   --*=*)
27062     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27063     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27064     shift
27065     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27066     shift
27067     ;;
27068   -*);;
27069   *) # This is not an option, so the user has probably given explicit
27070      # arguments.
27071      ac_need_defaults=false;;
27072   esac
27073
27074   case $1 in
27075   # Handling of the options.
27076 EOF
27077 cat >>$CONFIG_STATUS <<EOF
27078   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27079     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27080     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27081 EOF
27082 cat >>$CONFIG_STATUS <<\EOF
27083   --version | --vers* | -V )
27084     echo "$ac_cs_version"; exit 0 ;;
27085   --he | --h)
27086     # Conflict between --help and --header
27087     { { echo "$as_me:27087: error: ambiguous option: $1
27088 Try \`$0 --help' for more information." >&5
27089 echo "$as_me: error: ambiguous option: $1
27090 Try \`$0 --help' for more information." >&2;}
27091    { (exit 1); exit 1; }; };;
27092   --help | --hel | -h )
27093     echo "$ac_cs_usage"; exit 0 ;;
27094   --debug | --d* | -d )
27095     debug=: ;;
27096   --file | --fil | --fi | --f )
27097     shift
27098     CONFIG_FILES="$CONFIG_FILES $1"
27099     ac_need_defaults=false;;
27100   --header | --heade | --head | --hea )
27101     shift
27102     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27103     ac_need_defaults=false;;
27104
27105   # This is an error.
27106   -*) { { echo "$as_me:27106: error: unrecognized option: $1
27107 Try \`$0 --help' for more information." >&5
27108 echo "$as_me: error: unrecognized option: $1
27109 Try \`$0 --help' for more information." >&2;}
27110    { (exit 1); exit 1; }; } ;;
27111
27112   *) ac_config_targets="$ac_config_targets $1" ;;
27113
27114   esac
27115   shift
27116 done
27117
27118 exec 5>>config.log
27119 cat >&5 << _ACEOF
27120
27121 ## ----------------------- ##
27122 ## Running config.status.  ##
27123 ## ----------------------- ##
27124
27125 This file was extended by $as_me 2.52.20200802, executed with
27126   CONFIG_FILES    = $CONFIG_FILES
27127   CONFIG_HEADERS  = $CONFIG_HEADERS
27128   CONFIG_LINKS    = $CONFIG_LINKS
27129   CONFIG_COMMANDS = $CONFIG_COMMANDS
27130   > $ac_cs_invocation
27131 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27132
27133 _ACEOF
27134 EOF
27135
27136 cat >>$CONFIG_STATUS <<EOF
27137 #
27138 # INIT-COMMANDS section.
27139 #
27140
27141 ### Special initialization commands, used to pass information from the
27142 ### configuration-run into config.status
27143
27144 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27145 AWK="$AWK"
27146 CXX_NAME="$CXX_NAME"
27147 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27148 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27149 ECHO_LD="$ECHO_LD"
27150 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27151 FORM_NAME="$FORM_NAME"
27152 LDCONFIG="$LDCONFIG"
27153 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27154 LIB_NAME="$LIB_NAME"
27155 LIB_PREFIX="$LIB_PREFIX"
27156 LIB_SUBSETS="$LIB_SUBSETS"
27157 LIB_SUFFIX="$LIB_SUFFIX"
27158 LIB_TRACING="$LIB_TRACING"
27159 LN_S="$LN_S"
27160 MAKE_TERMINFO="$MAKE_TERMINFO"
27161 MENU_NAME="$MENU_NAME"
27162 NCURSES_MAJOR="$NCURSES_MAJOR"
27163 NCURSES_MINOR="$NCURSES_MINOR"
27164 NCURSES_OSPEED="$NCURSES_OSPEED"
27165 NCURSES_PATCH="$NCURSES_PATCH"
27166 PANEL_NAME="$PANEL_NAME"
27167 SRC_SUBDIRS="$SRC_SUBDIRS"
27168 TERMINFO="$TERMINFO"
27169 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27170 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27171 TICS_NAME="$TICS_NAME"
27172 TICS_SUFFIX="$TICS_SUFFIX"
27173 TIC_PATH="$TIC_PATH"
27174 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27175 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27176 TINFO_NAME="$TINFO_NAME"
27177 TINFO_SUFFIX="$TINFO_SUFFIX"
27178 UNALTERED_SYMS="$UNALTERED_SYMS"
27179 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27180 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27181 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27182 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27183 WILDCARD_SYMS="$WILDCARD_SYMS"
27184 WITH_CURSES_H="$with_curses_h"
27185 WITH_ECHO="${enable_echo:=yes}"
27186 WITH_OVERWRITE="$with_overwrite"
27187 cf_LIST_MODELS="$cf_list_models"
27188 cf_cv_abi_version="$cf_cv_abi_version"
27189 cf_cv_do_relink="$cf_cv_do_relink"
27190 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27191 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27192 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27193 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27194 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27195 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27196 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27197 cf_cv_rel_version="$cf_cv_rel_version"
27198 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27199 cf_cv_shared_soname='$cf_cv_shared_soname'
27200 cf_cv_shlib_version="$cf_cv_shlib_version"
27201 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27202 cf_cv_system_name="$cf_cv_system_name"
27203 cf_cv_term_driver="$with_term_driver"
27204 cf_with_ada="$cf_with_ada"
27205 cf_with_cxx_binding="$cf_with_cxx_binding"
27206 cf_with_db_install="$cf_with_db_install"
27207 cf_with_manpages="$cf_with_manpages"
27208 cf_with_tests="$cf_with_tests"
27209 host="$host"
27210 target="$target"
27211 with_shared_cxx="$with_shared_cxx"
27212
27213 EOF
27214
27215 cat >>$CONFIG_STATUS <<\EOF
27216 for ac_config_target in $ac_config_targets
27217 do
27218   case "$ac_config_target" in
27219   # Handling of arguments.
27220   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27221   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27222   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27223   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27224   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27225   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27226   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27227   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27228   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27229   *) { { echo "$as_me:27229: error: invalid argument: $ac_config_target" >&5
27230 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27231    { (exit 1); exit 1; }; };;
27232   esac
27233 done
27234
27235 # If the user did not use the arguments to specify the items to instantiate,
27236 # then the envvar interface is used.  Set only those that are not.
27237 # We use the long form for the default assignment because of an extremely
27238 # bizarre bug on SunOS 4.1.3.
27239 if $ac_need_defaults; then
27240   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27241   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27242   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27243 fi
27244
27245 # Create a temporary directory, and hook for its removal unless debugging.
27246 $debug ||
27247 {
27248   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27249   trap '{ (exit 1); exit 1; }' 1 2 13 15
27250 }
27251
27252 # Create a (secure) tmp directory for tmp files.
27253 : ${TMPDIR=/tmp}
27254 {
27255   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27256   test -n "$tmp" && test -d "$tmp"
27257 }  ||
27258 {
27259   tmp=$TMPDIR/cs$$-$RANDOM
27260   (umask 077 && mkdir $tmp)
27261 } ||
27262 {
27263    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27264    { (exit 1); exit 1; }
27265 }
27266
27267 EOF
27268
27269 cat >>$CONFIG_STATUS <<EOF
27270
27271 #
27272 # CONFIG_FILES section.
27273 #
27274
27275 # No need to generate the scripts if there are no CONFIG_FILES.
27276 # This happens for instance when ./config.status config.h
27277 if test -n "\$CONFIG_FILES"; then
27278   # Protect against being on the right side of a sed subst in config.status.
27279   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27280    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27281 s,@SHELL@,$SHELL,;t t
27282 s,@exec_prefix@,$exec_prefix,;t t
27283 s,@prefix@,$prefix,;t t
27284 s,@program_transform_name@,$program_transform_name,;t t
27285 s,@bindir@,$bindir,;t t
27286 s,@sbindir@,$sbindir,;t t
27287 s,@libexecdir@,$libexecdir,;t t
27288 s,@datarootdir@,$datarootdir,;t t
27289 s,@datadir@,$datadir,;t t
27290 s,@sysconfdir@,$sysconfdir,;t t
27291 s,@sharedstatedir@,$sharedstatedir,;t t
27292 s,@localstatedir@,$localstatedir,;t t
27293 s,@runstatedir@,$runstatedir,;t t
27294 s,@libdir@,$libdir,;t t
27295 s,@includedir@,$includedir,;t t
27296 s,@oldincludedir@,$oldincludedir,;t t
27297 s,@infodir@,$infodir,;t t
27298 s,@mandir@,$mandir,;t t
27299 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27300 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27301 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27302 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27303 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27304 s,@build_alias@,$build_alias,;t t
27305 s,@host_alias@,$host_alias,;t t
27306 s,@target_alias@,$target_alias,;t t
27307 s,@ECHO_C@,$ECHO_C,;t t
27308 s,@ECHO_N@,$ECHO_N,;t t
27309 s,@ECHO_T@,$ECHO_T,;t t
27310 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27311 s,@DEFS@,$DEFS,;t t
27312 s,@LIBS@,$LIBS,;t t
27313 s,@top_builddir@,$top_builddir,;t t
27314 s,@EGREP@,$EGREP,;t t
27315 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27316 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27317 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27318 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27319 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27320 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27321 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27322 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27323 s,@VERSION@,$VERSION,;t t
27324 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27325 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27326 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27327 s,@PACKAGE@,$PACKAGE,;t t
27328 s,@build@,$build,;t t
27329 s,@build_cpu@,$build_cpu,;t t
27330 s,@build_vendor@,$build_vendor,;t t
27331 s,@build_os@,$build_os,;t t
27332 s,@host@,$host,;t t
27333 s,@host_cpu@,$host_cpu,;t t
27334 s,@host_vendor@,$host_vendor,;t t
27335 s,@host_os@,$host_os,;t t
27336 s,@target@,$target,;t t
27337 s,@target_cpu@,$target_cpu,;t t
27338 s,@target_vendor@,$target_vendor,;t t
27339 s,@target_os@,$target_os,;t t
27340 s,@CC@,$CC,;t t
27341 s,@CFLAGS@,$CFLAGS,;t t
27342 s,@LDFLAGS@,$LDFLAGS,;t t
27343 s,@CPPFLAGS@,$CPPFLAGS,;t t
27344 s,@ac_ct_CC@,$ac_ct_CC,;t t
27345 s,@EXEEXT@,$EXEEXT,;t t
27346 s,@OBJEXT@,$OBJEXT,;t t
27347 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27348 s,@CPP@,$CPP,;t t
27349 s,@LDCONFIG@,$LDCONFIG,;t t
27350 s,@CXX@,$CXX,;t t
27351 s,@CXXFLAGS@,$CXXFLAGS,;t t
27352 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27353 s,@AWK@,$AWK,;t t
27354 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27355 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27356 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27357 s,@LINT@,$LINT,;t t
27358 s,@LINT_OPTS@,$LINT_OPTS,;t t
27359 s,@LN_S@,$LN_S,;t t
27360 s,@cf_config_suffix@,$cf_config_suffix,;t t
27361 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27362 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27363 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27364 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27365 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27366 s,@SET_MAKE@,$SET_MAKE,;t t
27367 s,@CTAGS@,$CTAGS,;t t
27368 s,@ETAGS@,$ETAGS,;t t
27369 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27370 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27371 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27372 s,@RANLIB@,$RANLIB,;t t
27373 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27374 s,@LD@,$LD,;t t
27375 s,@ac_ct_LD@,$ac_ct_LD,;t t
27376 s,@AR@,$AR,;t t
27377 s,@ac_ct_AR@,$ac_ct_AR,;t t
27378 s,@NM@,$NM,;t t
27379 s,@ac_ct_NM@,$ac_ct_NM,;t t
27380 s,@ARFLAGS@,$ARFLAGS,;t t
27381 s,@DESTDIR@,$DESTDIR,;t t
27382 s,@BUILD_CC@,$BUILD_CC,;t t
27383 s,@BUILD_CPP@,$BUILD_CPP,;t t
27384 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27385 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27386 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27387 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27388 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27389 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27390 s,@cf_list_models@,$cf_list_models,;t t
27391 s,@ABI_VERSION@,$ABI_VERSION,;t t
27392 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27393 s,@LIBTOOL@,$LIBTOOL,;t t
27394 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27395 s,@LT_UNDEF@,$LT_UNDEF,;t t
27396 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27397 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27398 s,@LIB_CREATE@,$LIB_CREATE,;t t
27399 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27400 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27401 s,@LIB_PREP@,$LIB_PREP,;t t
27402 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27403 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27404 s,@LIB_LINK@,$LIB_LINK,;t t
27405 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27406 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27407 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27408 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27409 s,@TICS_NAME@,$TICS_NAME,;t t
27410 s,@TINFO_NAME@,$TINFO_NAME,;t t
27411 s,@LIB_NAME@,$LIB_NAME,;t t
27412 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27413 s,@CC_G_OPT@,$CC_G_OPT,;t t
27414 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27415 s,@LD_MODEL@,$LD_MODEL,;t t
27416 s,@shlibdir@,$shlibdir,;t t
27417 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27418 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27419 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27420 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27421 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27422 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27423 s,@LINK_PROGS@,$LINK_PROGS,;t t
27424 s,@LINK_TESTS@,$LINK_TESTS,;t t
27425 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27426 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27427 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27428 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27429 s,@RPATH_LIST@,$RPATH_LIST,;t t
27430 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27431 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27432 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27433 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27434 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27435 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27436 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27437 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27438 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27439 s,@TIC@,$TIC,;t t
27440 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
27441 s,@INFOCMP@,$INFOCMP,;t t
27442 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
27443 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27444 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27445 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27446 s,@XTERM_KBS@,$XTERM_KBS,;t t
27447 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27448 s,@TERMINFO@,$TERMINFO,;t t
27449 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27450 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27451 s,@TERMPATH@,$TERMPATH,;t t
27452 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27453 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27454 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27455 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27456 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27457 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27458 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27459 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27460 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27461 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27462 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27463 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27464 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27465 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27466 s,@RGB_PATH@,$RGB_PATH,;t t
27467 s,@no_x11_rgb@,$no_x11_rgb,;t t
27468 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27469 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27470 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27471 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27472 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27473 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27474 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27475 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27476 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27477 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27478 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27479 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27480 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27481 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27482 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27483 s,@PTHREAD@,$PTHREAD,;t t
27484 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27485 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27486 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27487 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27488 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27489 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27490 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27491 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27492 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27493 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27494 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27495 s,@ECHO_LT@,$ECHO_LT,;t t
27496 s,@ECHO_LD@,$ECHO_LD,;t t
27497 s,@RULE_CC@,$RULE_CC,;t t
27498 s,@SHOW_CC@,$SHOW_CC,;t t
27499 s,@ECHO_CC@,$ECHO_CC,;t t
27500 s,@ECHO_LINK@,$ECHO_LINK,;t t
27501 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27502 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27503 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27504 s,@ADAFLAGS@,$ADAFLAGS,;t t
27505 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27506 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27507 s,@ADA_TRACE@,$ADA_TRACE,;t t
27508 s,@MATH_LIB@,$MATH_LIB,;t t
27509 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27510 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27511 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27512 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27513 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27514 s,@TEST_LIBS@,$TEST_LIBS,;t t
27515 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27516 s,@CXXCPP@,$CXXCPP,;t t
27517 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27518 s,@CXX_AR@,$CXX_AR,;t t
27519 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27520 s,@CXXLIBS@,$CXXLIBS,;t t
27521 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27522 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27523 s,@M4_exists@,$M4_exists,;t t
27524 s,@cf_ada_make@,$cf_ada_make,;t t
27525 s,@cf_ada_config@,$cf_ada_config,;t t
27526 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27527 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27528 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27529 s,@cf_compile_generics@,$cf_compile_generics,;t t
27530 s,@cf_generic_objects@,$cf_generic_objects,;t t
27531 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27532 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27533 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27534 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27535 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27536 s,@cf_ada_package@,$cf_ada_package,;t t
27537 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27538 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27539 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27540 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27541 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27542 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27543 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27544 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27545 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27546 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27547 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27548 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27549 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27550 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27551 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27552 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27553 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27554 s,@TICS_LIBS@,$TICS_LIBS,;t t
27555 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27556 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27557 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27558 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27559 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27560 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27561 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27562 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27563 s,@includesubdir@,$includesubdir,;t t
27564 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27565 s,@TICS_LIST@,$TICS_LIST,;t t
27566 s,@TINFO_LIST@,$TINFO_LIST,;t t
27567 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27568 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27569 s,@FORM_NAME@,$FORM_NAME,;t t
27570 s,@MENU_NAME@,$MENU_NAME,;t t
27571 s,@PANEL_NAME@,$PANEL_NAME,;t t
27572 s,@CXX_NAME@,$CXX_NAME,;t t
27573 s,@TEST_ARGS@,$TEST_ARGS,;t t
27574 s,@TEST_DEPS@,$TEST_DEPS,;t t
27575 s,@TEST_ARG2@,$TEST_ARG2,;t t
27576 s,@TEST_DEP2@,$TEST_DEP2,;t t
27577 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27578 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27579 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27580 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27581 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27582 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27583 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27584 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27585 s,@cross_compiling@,$cross_compiling,;t t
27586 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27587 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27588 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27589 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27590 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27591 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27592 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27593 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27594 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27595 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27596 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27597 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27598 CEOF
27599
27600 EOF
27601
27602   cat >>$CONFIG_STATUS <<\EOF
27603   # Split the substitutions into bite-sized pieces for seds with
27604   # small command number limits, like on Digital OSF/1 and HP-UX.
27605   ac_max_sed_lines=48
27606   ac_sed_frag=1 # Number of current file.
27607   ac_beg=1 # First line for current file.
27608   ac_end=$ac_max_sed_lines # Line after last line for current file.
27609   ac_more_lines=:
27610   ac_sed_cmds=
27611   while $ac_more_lines; do
27612     if test $ac_beg -gt 1; then
27613       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27614     else
27615       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27616     fi
27617     if test ! -s $tmp/subs.frag; then
27618       ac_more_lines=false
27619     else
27620       # The purpose of the label and of the branching condition is to
27621       # speed up the sed processing (if there are no `@' at all, there
27622       # is no need to browse any of the substitutions).
27623       # These are the two extra sed commands mentioned above.
27624       (echo ':t
27625   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27626       # It is possible to make a multiline substitution using escaped newlines.
27627       # Ensure that we do not split the substitution between script fragments.
27628       ac_BEG=$ac_end
27629       ac_END=`expr $ac_end + $ac_max_sed_lines`
27630       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27631       if test -s $tmp/subs.next; then
27632         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27633         if test ! -s $tmp/subs.edit; then
27634           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27635           if test ! -s $tmp/subs.edit; then
27636             if test $ac_beg -gt 1; then
27637               ac_end=`expr $ac_end - 1`
27638               continue
27639             fi
27640           fi
27641         fi
27642       fi
27643
27644       if test -z "$ac_sed_cmds"; then
27645         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27646       else
27647         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27648       fi
27649       ac_sed_frag=`expr $ac_sed_frag + 1`
27650       ac_beg=$ac_end
27651       ac_end=`expr $ac_end + $ac_max_sed_lines`
27652     fi
27653   done
27654   if test -z "$ac_sed_cmds"; then
27655     ac_sed_cmds=cat
27656   fi
27657 fi # test -n "$CONFIG_FILES"
27658
27659 EOF
27660 cat >>$CONFIG_STATUS <<\EOF
27661 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27662   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27663   case $ac_file in
27664   - | *:- | *:-:* ) # input from stdin
27665         cat >$tmp/stdin
27666         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27667         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27668   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27669         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27670   * )   ac_file_in=$ac_file.in ;;
27671   esac
27672
27673   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27674   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27675          X"$ac_file" : 'X\(//\)[^/]' \| \
27676          X"$ac_file" : 'X\(//\)$' \| \
27677          X"$ac_file" : 'X\(/\)' \| \
27678          .     : '\(.\)' 2>/dev/null ||
27679 echo X"$ac_file" |
27680     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27681           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27682           /^X\(\/\/\)$/{ s//\1/; q; }
27683           /^X\(\/\).*/{ s//\1/; q; }
27684           s/.*/./; q'`
27685   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27686     { case "$ac_dir" in
27687   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27688   *)                      as_incr_dir=.;;
27689 esac
27690 as_dummy="$ac_dir"
27691 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27692   case $as_mkdir_dir in
27693     # Skip DOS drivespec
27694     ?:) as_incr_dir=$as_mkdir_dir ;;
27695     *)
27696       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27697       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27698     ;;
27699   esac
27700 done; }
27701
27702     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27703     # A "../" for each directory in $ac_dir_suffix.
27704     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27705   else
27706     ac_dir_suffix= ac_dots=
27707   fi
27708
27709   case $srcdir in
27710   .)  ac_srcdir=.
27711       if test -z "$ac_dots"; then
27712          ac_top_srcdir=.
27713       else
27714          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27715       fi ;;
27716   [\\/]* | ?:[\\/]* )
27717       ac_srcdir=$srcdir$ac_dir_suffix;
27718       ac_top_srcdir=$srcdir ;;
27719   *) # Relative path.
27720     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27721     ac_top_srcdir=$ac_dots$srcdir ;;
27722   esac
27723
27724   case $INSTALL in
27725   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27726   *) ac_INSTALL=$ac_dots$INSTALL ;;
27727   esac
27728
27729   if test x"$ac_file" != x-; then
27730     { echo "$as_me:27730: creating $ac_file" >&5
27731 echo "$as_me: creating $ac_file" >&6;}
27732     rm -f "$ac_file"
27733   fi
27734   # Let's still pretend it is `configure' which instantiates (i.e., don't
27735   # use $as_me), people would be surprised to read:
27736   #    /* config.h.  Generated automatically by config.status.  */
27737   configure_input="Generated automatically from `echo $ac_file_in |
27738                                                  sed 's,.*/,,'` by configure."
27739
27740   # First look for the input files in the build tree, otherwise in the
27741   # src tree.
27742   ac_file_inputs=`IFS=:
27743     for f in $ac_file_in; do
27744       case $f in
27745       -) echo $tmp/stdin ;;
27746       [\\/$]*)
27747          # Absolute (can't be DOS-style, as IFS=:)
27748          test -f "$f" || { { echo "$as_me:27748: error: cannot find input file: $f" >&5
27749 echo "$as_me: error: cannot find input file: $f" >&2;}
27750    { (exit 1); exit 1; }; }
27751          echo $f;;
27752       *) # Relative
27753          if test -f "$f"; then
27754            # Build tree
27755            echo $f
27756          elif test -f "$srcdir/$f"; then
27757            # Source tree
27758            echo $srcdir/$f
27759          else
27760            # /dev/null tree
27761            { { echo "$as_me:27761: error: cannot find input file: $f" >&5
27762 echo "$as_me: error: cannot find input file: $f" >&2;}
27763    { (exit 1); exit 1; }; }
27764          fi;;
27765       esac
27766     done` || { (exit 1); exit 1; }
27767 EOF
27768 cat >>$CONFIG_STATUS <<\EOF
27769   ac_warn_datarootdir=no
27770   if test x"$ac_file" != x-; then
27771     for ac_item in $ac_file_inputs
27772     do
27773       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27774       if test -n "$ac_seen"; then
27775         ac_used=`grep '@datarootdir@' $ac_item`
27776         if test -z "$ac_used"; then
27777           { echo "$as_me:27777: WARNING: datarootdir was used implicitly but not set:
27778 $ac_seen" >&5
27779 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27780 $ac_seen" >&2;}
27781           ac_warn_datarootdir=yes
27782         fi
27783       fi
27784       ac_seen=`grep '${datarootdir}' $ac_item`
27785       if test -n "$ac_seen"; then
27786         { echo "$as_me:27786: WARNING: datarootdir was used explicitly but not set:
27787 $ac_seen" >&5
27788 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27789 $ac_seen" >&2;}
27790         ac_warn_datarootdir=yes
27791       fi
27792     done
27793   fi
27794
27795 if test "x$ac_warn_datarootdir" = xyes; then
27796   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27797 fi
27798
27799 EOF
27800 cat >>$CONFIG_STATUS <<EOF
27801   sed "$ac_vpsub
27802 $extrasub
27803 EOF
27804 cat >>$CONFIG_STATUS <<\EOF
27805 :t
27806 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27807 s,@configure_input@,$configure_input,;t t
27808 s,@srcdir@,$ac_srcdir,;t t
27809 s,@top_srcdir@,$ac_top_srcdir,;t t
27810 s,@INSTALL@,$ac_INSTALL,;t t
27811 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27812   rm -f $tmp/stdin
27813   if test x"$ac_file" != x-; then
27814     cp $tmp/out $ac_file
27815
27816     for ac_name in prefix exec_prefix datarootdir
27817     do
27818         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27819         if test -n "$ac_seen"; then
27820             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27821             if test -z "$ac_init"; then
27822               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27823               { echo "$as_me:27823: WARNING: Variable $ac_name is used but was not set:
27824 $ac_seen" >&5
27825 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27826 $ac_seen" >&2;}
27827             fi
27828         fi
27829     done
27830     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27831     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27832     if test -s $tmp/out; then
27833       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27834       { echo "$as_me:27834: WARNING: Some variables may not be substituted:
27835 $ac_seen" >&5
27836 echo "$as_me: WARNING: Some variables may not be substituted:
27837 $ac_seen" >&2;}
27838     fi
27839   else
27840     cat $tmp/out
27841   fi
27842   rm -f $tmp/out
27843
27844 done
27845 EOF
27846 cat >>$CONFIG_STATUS <<\EOF
27847
27848 #
27849 # CONFIG_HEADER section.
27850 #
27851
27852 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27853 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27854 #
27855 # ac_d sets the value in "#define NAME VALUE" lines.
27856 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27857 ac_dB='[        ].*$,\1#\2'
27858 ac_dC=' '
27859 ac_dD=',;t'
27860 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27861 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27862 ac_iB='\([      ]\),\1#\2define\3'
27863 ac_iC=' '
27864 ac_iD='\4,;t'
27865 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27866 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27867 ac_uB='$,\1#\2define\3'
27868 ac_uC=' '
27869 ac_uD=',;t'
27870
27871 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27872   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27873   case $ac_file in
27874   - | *:- | *:-:* ) # input from stdin
27875         cat >$tmp/stdin
27876         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27877         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27878   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27879         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27880   * )   ac_file_in=$ac_file.in ;;
27881   esac
27882
27883   test x"$ac_file" != x- && { echo "$as_me:27883: creating $ac_file" >&5
27884 echo "$as_me: creating $ac_file" >&6;}
27885
27886   # First look for the input files in the build tree, otherwise in the
27887   # src tree.
27888   ac_file_inputs=`IFS=:
27889     for f in $ac_file_in; do
27890       case $f in
27891       -) echo $tmp/stdin ;;
27892       [\\/$]*)
27893          # Absolute (can't be DOS-style, as IFS=:)
27894          test -f "$f" || { { echo "$as_me:27894: error: cannot find input file: $f" >&5
27895 echo "$as_me: error: cannot find input file: $f" >&2;}
27896    { (exit 1); exit 1; }; }
27897          echo $f;;
27898       *) # Relative
27899          if test -f "$f"; then
27900            # Build tree
27901            echo $f
27902          elif test -f "$srcdir/$f"; then
27903            # Source tree
27904            echo $srcdir/$f
27905          else
27906            # /dev/null tree
27907            { { echo "$as_me:27907: error: cannot find input file: $f" >&5
27908 echo "$as_me: error: cannot find input file: $f" >&2;}
27909    { (exit 1); exit 1; }; }
27910          fi;;
27911       esac
27912     done` || { (exit 1); exit 1; }
27913   # Remove the trailing spaces.
27914   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27915
27916 EOF
27917
27918 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27919 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27920 # be either 'cat' or 'sort'.
27921 cat confdefs.h | uniq >conftest.vals
27922
27923 # Break up conftest.vals because some shells have a limit on
27924 # the size of here documents, and old seds have small limits too.
27925
27926 rm -f conftest.tail
27927 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27928 while grep . conftest.vals >/dev/null
27929 do
27930   # Write chunks of a limited-size here document to conftest.frag.
27931   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27932   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27933   echo 'CEOF' >> $CONFIG_STATUS
27934   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27935   rm -f conftest.vals
27936   mv conftest.tail conftest.vals
27937 done
27938 rm -f conftest.vals
27939
27940 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27941 # marker @DEFS@.
27942 echo '  cat >> conftest.edit <<CEOF
27943 /@DEFS@/r conftest.frag
27944 /@DEFS@/d
27945 CEOF
27946 sed -f conftest.edit $tmp/in > $tmp/out
27947 rm -f $tmp/in
27948 mv $tmp/out $tmp/in
27949 rm -f conftest.edit conftest.frag
27950 ' >> $CONFIG_STATUS
27951
27952 cat >>$CONFIG_STATUS <<\EOF
27953   # Let's still pretend it is `configure' which instantiates (i.e., don't
27954   # use $as_me), people would be surprised to read:
27955   #    /* config.h.  Generated automatically by config.status.  */
27956   if test x"$ac_file" = x-; then
27957     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27958   else
27959     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27960   fi
27961   cat $tmp/in >>$tmp/config.h
27962   rm -f $tmp/in
27963   if test x"$ac_file" != x-; then
27964     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27965       { echo "$as_me:27965: $ac_file is unchanged" >&5
27966 echo "$as_me: $ac_file is unchanged" >&6;}
27967     else
27968       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27969          X"$ac_file" : 'X\(//\)[^/]' \| \
27970          X"$ac_file" : 'X\(//\)$' \| \
27971          X"$ac_file" : 'X\(/\)' \| \
27972          .     : '\(.\)' 2>/dev/null ||
27973 echo X"$ac_file" |
27974     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27975           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27976           /^X\(\/\/\)$/{ s//\1/; q; }
27977           /^X\(\/\).*/{ s//\1/; q; }
27978           s/.*/./; q'`
27979       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27980         { case "$ac_dir" in
27981   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27982   *)                      as_incr_dir=.;;
27983 esac
27984 as_dummy="$ac_dir"
27985 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27986   case $as_mkdir_dir in
27987     # Skip DOS drivespec
27988     ?:) as_incr_dir=$as_mkdir_dir ;;
27989     *)
27990       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27991       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27992     ;;
27993   esac
27994 done; }
27995
27996       fi
27997       rm -f $ac_file
27998       mv $tmp/config.h $ac_file
27999     fi
28000   else
28001     cat $tmp/config.h
28002     rm -f $tmp/config.h
28003   fi
28004 done
28005 EOF
28006 cat >>$CONFIG_STATUS <<\EOF
28007 #
28008 # CONFIG_COMMANDS section.
28009 #
28010 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
28011   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
28012   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
28013
28014   case $ac_dest in
28015     default )
28016 if test "x$cf_with_tests" != xno ; then
28017
28018 for cf_dir in test
28019 do
28020         if test ! -d $srcdir/$cf_dir; then
28021                 continue
28022         elif test -f $srcdir/$cf_dir/programs; then
28023                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
28024         fi
28025 done
28026
28027 fi
28028
28029 cf_prefix=$LIB_PREFIX
28030
28031 case $cf_cv_shlib_version in
28032 (cygdll|msysdll|mingw|msvcdll)
28033         TINFO_NAME=$TINFO_ARG_SUFFIX
28034         TINFO_SUFFIX=.dll
28035         ;;
28036 esac
28037
28038 if test -n "$TINFO_SUFFIX" ; then
28039         case $TINFO_SUFFIX in
28040         (tw*)
28041                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
28042                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
28043                 ;;
28044         (t*)
28045                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
28046                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
28047                 ;;
28048         (w*)
28049                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
28050                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28051                 ;;
28052         esac
28053 fi
28054
28055 for cf_dir in $SRC_SUBDIRS
28056 do
28057         if test ! -d $srcdir/$cf_dir ; then
28058                 continue
28059         elif test -f $srcdir/$cf_dir/modules; then
28060
28061                 SHARED_LIB=
28062                 Libs_To_Make=
28063                 cf_awk_program=
28064                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28065                 then
28066                         cf_awk_program="$cf_awk_program\
28067 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28068 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28069 "
28070                 fi
28071
28072                 if test "x$WILDCARD_SYMS" = xno
28073                 then
28074                         cf_awk_program="$cf_awk_program\
28075 /[      ]_\\*;/ { skip=1; next; }\
28076 "
28077                 fi
28078
28079                 if test "x$cf_awk_program" != "x"
28080                 then
28081                         cat >>$cf_dir/Makefile <<CF_EOF
28082
28083 # Generated by CF_LIB_RULES
28084 resulting.map: $UNALTERED_SYMS
28085         $AWK 'BEGIN { skip = 1; last=""; } \
28086 $cf_awk_program \
28087 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28088  skip = 0; last = \$\$0; } \
28089 END { print last; }' < $UNALTERED_SYMS >\$@
28090
28091 distclean::
28092         rm -f resulting.map
28093 CF_EOF
28094                 fi
28095
28096                 for cf_item in $cf_LIST_MODELS
28097                 do
28098
28099         case X$cf_item in
28100         (Xlibtool)
28101                 cf_suffix='.la'
28102                 cf_depsuf=$cf_suffix
28103                 ;;
28104         (Xdebug)
28105                 case $cf_cv_system_name in
28106                 (*-msvc*)
28107                         cf_suffix='_g.lib'
28108                         ;;
28109                 (*)
28110                         cf_suffix='_g.a'
28111                         ;;
28112                 esac
28113                 cf_depsuf=$cf_suffix
28114                 ;;
28115         (Xprofile)
28116                 case $cf_cv_system_name in
28117                 (*-msvc*)
28118                         cf_suffix='_p.lib'
28119                         ;;
28120                 (*)
28121                         cf_suffix='_p.a'
28122                         ;;
28123                 esac
28124                 cf_depsuf=$cf_suffix
28125                 ;;
28126         (Xshared)
28127                 case $cf_cv_system_name in
28128                 (aix[5-7]*)
28129                         cf_suffix='.so'
28130                         cf_depsuf=$cf_suffix
28131                         ;;
28132                 (*-msvc*)
28133                         cf_suffix='.dll'
28134                         cf_depsuf='.dll.lib'
28135                         ;;
28136                 (cygwin*|msys*|mingw*)
28137                         cf_suffix='.dll'
28138                         cf_depsuf='.dll.a'
28139                         ;;
28140                 (darwin*)
28141                         cf_suffix='.dylib'
28142                         cf_depsuf=$cf_suffix
28143                         ;;
28144                 (hpux*)
28145                         case $target in
28146                         (ia64*)
28147                                 cf_suffix='.so'
28148                                 cf_depsuf=$cf_suffix
28149                                 ;;
28150                         (*)
28151                                 cf_suffix='.sl'
28152                                 cf_depsuf=$cf_suffix
28153                                 ;;
28154                         esac
28155                         ;;
28156                 (*)
28157                         cf_suffix='.so'
28158                         cf_depsuf=$cf_suffix
28159                         ;;
28160                 esac
28161                 ;;
28162         (*)
28163                 case $target in
28164                 (*-msvc*)
28165                         cf_suffix='.lib'
28166                         ;;
28167                 (*)
28168                         cf_suffix='.a'
28169                         ;;
28170                 esac
28171                 cf_depsuf=$cf_suffix
28172                 ;;
28173         esac
28174         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28175         then
28176                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28177                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28178         fi
28179
28180                         if test "$cf_dir" = "c++"
28181                         then
28182
28183 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28184
28185 eval cf_libname=\$${cf_map_lib_basename}_NAME
28186
28187                         else
28188
28189 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28190
28191 eval cf_libname=\$${cf_map_lib_basename}_NAME
28192
28193                         fi
28194                         test -z "$cf_libname" && cf_libname="$cf_dir"
28195                         if test $cf_item = shared ; then
28196                                 if test -n "${LIB_SUFFIX}"
28197                                 then
28198                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28199                                 else
28200                                         cf_shared_suffix="$cf_suffix"
28201                                 fi
28202                                 if test "$cf_cv_do_symlinks" = yes ; then
28203                                         cf_version_name=
28204
28205                                         case "$cf_cv_shlib_version" in
28206                                         (rel)
28207                                                 cf_version_name=REL_VERSION
28208                                                 ;;
28209                                         (abi)
28210                                                 cf_version_name=ABI_VERSION
28211                                                 ;;
28212                                         esac
28213
28214                                         if test -n "$cf_version_name"
28215                                         then
28216                                                 case "$cf_cv_system_name" in
28217                                                 (darwin*)
28218                                                         # "w", etc?
28219                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28220                                                         ;;
28221                                                 (*)
28222                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28223                                                         ;;
28224                                                 esac
28225                                         fi
28226                                         if test -n "${USE_LIB_SUFFIX}"
28227                                         then
28228                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28229                                         else
28230                                                 cf_shared_suffix="$cf_suffix"
28231                                         fi
28232                                 fi
28233                                 # cygwin needs import library, and has unique naming convention
28234                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28235                                 # use 'cyg' prefix for shared lib.
28236                                 case $cf_cv_shlib_version in
28237                                 (cygdll)
28238                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28239                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28240                                         ;;
28241                                 (msysdll)
28242                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28243                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28244                                         ;;
28245                                 (mingw)
28246                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28247                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28248                                         ;;
28249                                 (msvcdll)
28250                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28251                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28252                                         ;;
28253                                 (*)
28254                                         cf_add_lib=
28255                                         ;;
28256                                 esac
28257                                 if test -n "$cf_add_lib"
28258                                 then
28259                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28260                                         continue
28261                                 fi
28262                         fi
28263                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28264                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28265                 done
28266
28267                 if test $cf_dir = ncurses ; then
28268                         cf_subsets="$LIB_SUBSETS"
28269                         cf_r_parts="$cf_subsets"
28270                         cf_liblist="$Libs_To_Make"
28271
28272                         while test -n "$cf_r_parts"
28273                         do
28274                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28275                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28276                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28277                                         cf_add_lib=
28278                                         case $cf_l_parts in
28279                                         (*termlib*)
28280                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28281                                                 ;;
28282                                         (*ticlib*)
28283                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28284                                                 ;;
28285                                         (*)
28286                                                 break
28287                                                 ;;
28288                                         esac
28289                                         if test -n "$cf_add_lib"; then
28290                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28291                                         fi
28292                                 else
28293                                         break
28294                                 fi
28295                         done
28296                 else
28297                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28298                 fi
28299
28300                 if test $cf_dir = c++; then
28301                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28302                                 cf_list=
28303                                 for cf_item in $Libs_To_Make
28304                                 do
28305                                         case $cf_item in
28306                                         (*.a)
28307                                                 ;;
28308                                         (*)
28309                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28310                                                 ;;
28311                                         esac
28312                                         for cf_test in $cf_list
28313                                         do
28314                                                 if test "$cf_test" = "$cf_item"
28315                                                 then
28316                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28317                                                         cf_item=
28318                                                         break
28319                                                 fi
28320                                         done
28321                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28322                                 done
28323                                 Libs_To_Make="$cf_list"
28324                         fi
28325                 fi
28326
28327                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28328                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28329                         $cf_dir/Makefile >$cf_dir/Makefile.out
28330                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28331
28332                 $AWK -f $srcdir/mk-0th.awk \
28333                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28334                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28335
28336                 for cf_subset in $cf_subsets
28337                 do
28338                         cf_subdirs=
28339                         for cf_item in $cf_LIST_MODELS
28340                         do
28341
28342                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28343
28344 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28345
28346                         CXX_MODEL=$cf_ITEM
28347                         if test "$CXX_MODEL" = SHARED; then
28348                                 case $cf_cv_shlib_version in
28349                                 (cygdll|msysdll|mingw|msvcdll)
28350                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28351
28352 echo "${as_me:-configure}:28352: testing overriding CXX_MODEL to SHARED ..." 1>&5
28353
28354                                         with_shared_cxx=yes
28355                                         ;;
28356                                 (*)
28357                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28358                                         ;;
28359                                 esac
28360                         fi
28361
28362         case X$cf_item in
28363         (Xlibtool)
28364                 cf_suffix='.la'
28365                 cf_depsuf=$cf_suffix
28366                 ;;
28367         (Xdebug)
28368                 case $cf_cv_system_name in
28369                 (*-msvc*)
28370                         cf_suffix='_g.lib'
28371                         ;;
28372                 (*)
28373                         cf_suffix='_g.a'
28374                         ;;
28375                 esac
28376                 cf_depsuf=$cf_suffix
28377                 ;;
28378         (Xprofile)
28379                 case $cf_cv_system_name in
28380                 (*-msvc*)
28381                         cf_suffix='_p.lib'
28382                         ;;
28383                 (*)
28384                         cf_suffix='_p.a'
28385                         ;;
28386                 esac
28387                 cf_depsuf=$cf_suffix
28388                 ;;
28389         (Xshared)
28390                 case $cf_cv_system_name in
28391                 (aix[5-7]*)
28392                         cf_suffix='.so'
28393                         cf_depsuf=$cf_suffix
28394                         ;;
28395                 (*-msvc*)
28396                         cf_suffix='.dll'
28397                         cf_depsuf='.dll.lib'
28398                         ;;
28399                 (cygwin*|msys*|mingw*)
28400                         cf_suffix='.dll'
28401                         cf_depsuf='.dll.a'
28402                         ;;
28403                 (darwin*)
28404                         cf_suffix='.dylib'
28405                         cf_depsuf=$cf_suffix
28406                         ;;
28407                 (hpux*)
28408                         case $target in
28409                         (ia64*)
28410                                 cf_suffix='.so'
28411                                 cf_depsuf=$cf_suffix
28412                                 ;;
28413                         (*)
28414                                 cf_suffix='.sl'
28415                                 cf_depsuf=$cf_suffix
28416                                 ;;
28417                         esac
28418                         ;;
28419                 (*)
28420                         cf_suffix='.so'
28421                         cf_depsuf=$cf_suffix
28422                         ;;
28423                 esac
28424                 ;;
28425         (*)
28426                 case $target in
28427                 (*-msvc*)
28428                         cf_suffix='.lib'
28429                         ;;
28430                 (*)
28431                         cf_suffix='.a'
28432                         ;;
28433                 esac
28434                 cf_depsuf=$cf_suffix
28435                 ;;
28436         esac
28437         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28438         then
28439                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28440                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28441         fi
28442
28443         case $cf_item in
28444         (libtool) cf_subdir='obj_lo'  ;;
28445         (normal)  cf_subdir='objects' ;;
28446         (debug)   cf_subdir='obj_g' ;;
28447         (profile) cf_subdir='obj_p' ;;
28448         (shared)
28449                 case $cf_cv_system_name in
28450                 (cygwin|msys)
28451                         cf_subdir='objects' ;;
28452                 (*)
28453                         cf_subdir='obj_s' ;;
28454                 esac
28455         esac
28456
28457                         # Test for case where we build libtinfo with a different name.
28458                         cf_libname=$cf_dir
28459                         if test $cf_dir = ncurses ; then
28460                                 case $cf_subset in
28461                                 (*base*)
28462                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28463                                         ;;
28464                                 (*termlib*)
28465                                         cf_libname=$TINFO_LIB_SUFFIX
28466                                         ;;
28467                                 (ticlib*)
28468                                         cf_libname=$TICS_LIB_SUFFIX
28469                                         ;;
28470                                 esac
28471                         elif test $cf_dir = c++ ; then
28472
28473 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28474
28475 eval cf_libname=\$${cf_map_lib_basename}_NAME
28476
28477                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28478                         else
28479
28480 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28481
28482 eval cf_libname=\$${cf_map_lib_basename}_NAME
28483
28484                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28485                         fi
28486                         if test -n "${USE_ARG_SUFFIX}" ; then
28487                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28488                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28489                         fi
28490
28491                         # These dependencies really are for development, not
28492                         # builds, but they are useful in porting, too.
28493                         cf_depend="../include/ncurses_cfg.h"
28494                         if test "$srcdir" = "."; then
28495                                 cf_reldir="."
28496                         else
28497                                 cf_reldir="\${srcdir}"
28498                         fi
28499
28500                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28501                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28502                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28503                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28504                         fi
28505
28506                         cf_dir_suffix=
28507                         old_cf_suffix="$cf_suffix"
28508                         if test "$cf_cv_shlib_version_infix" = yes ; then
28509                         if test -n "$USE_LIB_SUFFIX" ; then
28510                                 case $USE_LIB_SUFFIX in
28511                                 (tw*)
28512                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28513                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28514                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28515                                         ;;
28516                                 (t*)
28517                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28518                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28519                                         cf_dir_suffix=t$EXTRA_SUFFIX
28520                                         ;;
28521                                 (w*)
28522                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28523                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28524                                         cf_dir_suffix=w$EXTRA_SUFFIX
28525                                         ;;
28526                                 (*)
28527                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28528                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28529                                         cf_dir_suffix=$EXTRA_SUFFIX
28530                                         ;;
28531                                 esac
28532                         fi
28533                         fi
28534
28535                         $AWK -f $srcdir/mk-1st.awk \
28536                                 name=${cf_libname}${cf_dir_suffix} \
28537                                 traces=$LIB_TRACING \
28538                                 MODEL=$cf_ITEM \
28539                                 CXX_MODEL=$CXX_MODEL \
28540                                 model=$cf_subdir \
28541                                 prefix=$cf_prefix \
28542                                 suffix=$cf_suffix \
28543                                 subset=$cf_subset \
28544                                 driver=$cf_cv_term_driver \
28545                                 SymLink="$LN_S" \
28546                                 TermlibRoot=$TINFO_NAME \
28547                                 TermlibSuffix=$TINFO_SUFFIX \
28548                                 ShlibVer=$cf_cv_shlib_version \
28549                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28550                                 ReLink=${cf_cv_do_relink:-no} \
28551                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28552                                 DoLinks=$cf_cv_do_symlinks \
28553                                 rmSoLocs=$cf_cv_rm_so_locs \
28554                                 ldconfig="$LDCONFIG" \
28555                                 overwrite=$WITH_OVERWRITE \
28556                                 depend="$cf_depend" \
28557                                 host="$host" \
28558                                 libtool_version="$LIBTOOL_VERSION" \
28559                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28560
28561                         cf_suffix="$old_cf_suffix"
28562
28563                         for cf_subdir2 in $cf_subdirs lib
28564                         do
28565                                 test $cf_subdir = $cf_subdir2 && break
28566                         done
28567                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28568                         $AWK -f $srcdir/mk-2nd.awk \
28569                                 name=$cf_dir \
28570                                 traces=$LIB_TRACING \
28571                                 MODEL=$cf_ITEM \
28572                                 model=$cf_subdir \
28573                                 subset=$cf_subset \
28574                                 srcdir=$srcdir \
28575                                 echo=$WITH_ECHO \
28576                                 crenames=$cf_cv_prog_CC_c_o \
28577                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28578                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28579                         cf_subdirs="$cf_subdirs $cf_subdir"
28580                         done
28581                 done
28582         fi
28583
28584         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28585 done
28586
28587 for cf_dir in $SRC_SUBDIRS
28588 do
28589         if test ! -d $srcdir/$cf_dir ; then
28590                 continue
28591         fi
28592
28593         if test -f $cf_dir/Makefile ; then
28594                 case "$cf_dir" in
28595                 (Ada95)
28596                         echo 'libs \' >> Makefile
28597                         echo 'install.libs \' >> Makefile
28598                         echo 'uninstall.libs ::' >> Makefile
28599                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28600                         ;;
28601                 esac
28602         fi
28603
28604         if test -f $srcdir/$cf_dir/modules; then
28605                 echo >> Makefile
28606                 if test -f $srcdir/$cf_dir/headers; then
28607 cat >> Makefile <<CF_EOF
28608 install.includes \\
28609 uninstall.includes \\
28610 CF_EOF
28611                 fi
28612 if test "$cf_dir" != "c++" ; then
28613 echo 'lint \' >> Makefile
28614 fi
28615 cat >> Makefile <<CF_EOF
28616 libs \\
28617 lintlib \\
28618 install.libs \\
28619 uninstall.libs \\
28620 install.$cf_dir \\
28621 uninstall.$cf_dir ::
28622         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28623 CF_EOF
28624         elif test -f $srcdir/$cf_dir/headers; then
28625 cat >> Makefile <<CF_EOF
28626
28627 libs \\
28628 install.libs \\
28629 uninstall.libs \\
28630 install.includes \\
28631 uninstall.includes ::
28632         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28633 CF_EOF
28634 fi
28635 done
28636
28637 if test "x$cf_with_db_install" = xyes; then
28638 cat >> Makefile <<CF_EOF
28639
28640 install.libs uninstall.libs \\
28641 install.data uninstall.data ::
28642 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28643 CF_EOF
28644 else
28645 cat >> Makefile <<CF_EOF
28646
28647 install.libs uninstall.libs ::
28648         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28649 CF_EOF
28650 fi
28651
28652 if test "x$cf_with_manpages" = xyes; then
28653 cat >> Makefile <<CF_EOF
28654
28655 install.man \\
28656 uninstall.man ::
28657         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28658 CF_EOF
28659 fi
28660
28661 cat >> Makefile <<CF_EOF
28662
28663 distclean ::
28664         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28665         rm -f headers.sh headers.sed mk_shared_lib.sh
28666         rm -f edit_man.* man_alias.*
28667         rm -rf \${DIRS_TO_MAKE}
28668 CF_EOF
28669
28670 # Special case: tack's manpage lives in its own directory.
28671 if test "x$cf_with_manpages" = xyes; then
28672 if test "x$cf_with_tack" = "xyes"; then
28673 cat >> Makefile <<CF_EOF
28674
28675 install.man \\
28676 uninstall.man ::
28677         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28678 CF_EOF
28679 fi
28680 fi
28681
28682 rm -f headers.sed headers.sh
28683
28684 echo creating headers.sh
28685 cat >headers.sh <<CF_EOF
28686 #! $SHELL
28687 # This shell script is generated by the 'configure' script.  It is invoked in a
28688 # subdirectory of the build tree.  It generates a sed-script in the parent
28689 # directory that is used to adjust includes for header files that reside in a
28690 # subdirectory of /usr/include, etc.
28691 PRG=""
28692 while test \$# != 3
28693 do
28694 PRG="\$PRG \$1"; shift
28695 done
28696 DST=\$1
28697 REF=\$2
28698 SRC=\$3
28699 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28700 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28701 echo installing \$SRC in \$DST
28702 CF_EOF
28703
28704 if test $WITH_CURSES_H = yes; then
28705         cat >>headers.sh <<CF_EOF
28706 case \$DST in
28707 (/*/include/*)
28708         END=\`basename \$DST\`
28709         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28710         do
28711                 NAME=\`basename \$i\`
28712                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28713         done
28714         ;;
28715 (*)
28716         echo "" >> \$TMPSED
28717         ;;
28718 esac
28719 CF_EOF
28720
28721 else
28722         cat >>headers.sh <<CF_EOF
28723 case \$DST in
28724 (/*/include/*)
28725         END=\`basename \$DST\`
28726         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28727         do
28728                 NAME=\`basename \$i\`
28729                 if test "\$NAME" = "curses.h"
28730                 then
28731                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28732                         NAME=ncurses.h
28733                 fi
28734                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28735         done
28736         ;;
28737 (*)
28738         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28739         ;;
28740 esac
28741 CF_EOF
28742 fi
28743 cat >>headers.sh <<CF_EOF
28744 rm -f \$TMPSRC
28745 sed -f \$TMPSED \$SRC > \$TMPSRC
28746 NAME=\`basename \$SRC\`
28747 CF_EOF
28748 if test $WITH_CURSES_H != yes; then
28749         cat >>headers.sh <<CF_EOF
28750 test "\$NAME" = "curses.h" && NAME=ncurses.h
28751 CF_EOF
28752 fi
28753 cat >>headers.sh <<CF_EOF
28754 # Just in case someone gzip'd manpages, remove the conflicting copy.
28755 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28756
28757 eval \$PRG \$TMPSRC \$DST/\$NAME
28758 rm -f \$TMPSRC \$TMPSED
28759 CF_EOF
28760
28761 chmod 0755 headers.sh
28762
28763 for cf_dir in $SRC_SUBDIRS
28764 do
28765         if test ! -d $srcdir/$cf_dir ; then
28766                 continue
28767         fi
28768
28769         if test -f $srcdir/$cf_dir/headers; then
28770                 $AWK -f $srcdir/mk-hdr.awk \
28771                         subset="$LIB_SUBSETS" \
28772                         compat="$WITH_CURSES_H" \
28773                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28774         fi
28775
28776         if test -f $srcdir/$cf_dir/modules; then
28777                 if test "$cf_dir" != "c++" ; then
28778                         cat >>$cf_dir/Makefile <<"CF_EOF"
28779 depend : ${AUTO_SRC}
28780         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28781
28782 # DO NOT DELETE THIS LINE -- make depend depends on it.
28783 CF_EOF
28784                 fi
28785         fi
28786 done
28787
28788 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28789 if test -z "$USE_OLD_MAKERULES" ; then
28790         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28791 fi
28792 fi
28793  ;;
28794   esac
28795 done
28796 EOF
28797
28798 cat >>$CONFIG_STATUS <<\EOF
28799
28800 { (exit 0); exit 0; }
28801 EOF
28802 chmod +x $CONFIG_STATUS
28803 ac_clean_files=$ac_clean_files_save
28804
28805 # configure is writing to config.log, and then calls config.status.
28806 # config.status does its own redirection, appending to config.log.
28807 # Unfortunately, on DOS this fails, as config.log is still kept open
28808 # by configure, so config.status won't be able to write to it; its
28809 # output is simply discarded.  So we exec the FD to /dev/null,
28810 # effectively closing config.log, so it can be properly (re)opened and
28811 # appended to by config.status.  When coming back to configure, we
28812 # need to make the FD available again.
28813 if test "$no_create" != yes; then
28814   ac_cs_success=:
28815   exec 5>/dev/null
28816   $SHELL $CONFIG_STATUS || ac_cs_success=false
28817   exec 5>>config.log
28818   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28819   # would make configure fail if this is the last instruction.
28820   $ac_cs_success || { (exit 1); exit 1; }
28821 fi
28822 ${MAKE:-make} preinstall