]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20190914
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.689 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20190901.
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 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --with-tic-path=XXX     specify path of tic for fallbacks
771   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772   --without-xterm-new     specify if xterm terminfo should be old version
773   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776   --disable-big-core      assume machine has little memory
777   --disable-big-strings   assume compiler has only standard-size strings
778   --enable-termcap        compile in termcap fallback support
779   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780   --enable-getcap         fast termcap load, no xrefs to terminfo
781   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783   --disable-root-environ  restrict environment when running as root
784   --enable-symlinks       make tic use symbolic links not hard links
785   --enable-broken_linker  compile with broken-linker support code
786   --enable-bsdpad         recognize BSD-style prefix padding
787   --enable-widec          compile with wide-char/UTF-8 code
788   --disable-lp64          allow chtype to be long (ignore _LP64)
789   --disable-largefile     omit support for large files
790   --disable-tparm-varargs compile tparm() without varargs interface
791   --disable-tic-depends   link tic library without explicit dependency on ncurses library
792   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794   --with-bool=TYPE        override fallback type of bool variable
795   --with-caps=alt         compile with alternate Caps file
796   --with-chtype=TYPE      override type of chtype
797   --with-ospeed=TYPE      override type of ospeed variable
798   --with-mmask-t=TYPE     override type of mmask_t
799   --with-ccharw-max=XXX   override size CCHARW_MAX
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --with-tparm-arg=TYPE   override parameter type of tparm
802   --with-rcs-ids          compile-in RCS identifiers
803 Options to Specify How Manpages are Installed:
804   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                           optionally formatted/catonly, e.g., gzip,formatted
806   --with-manpage-renames  specify manpage-renaming
807   --with-manpage-aliases  specify manpage-aliases using .so
808   --with-manpage-symlinks specify manpage-aliases using symlinks
809   --with-manpage-tbl      specify manpage processing with tbl
810 Extensions:
811   --disable-ext-funcs     disable function-extensions
812   --enable-sp-funcs       enable SCREEN-extensions
813   --enable-term-driver    enable terminal-driver
814   --enable-const          compile with extra/non-standard const
815   --enable-ext-colors     compile for 256-color support
816   --enable-ext-mouse      compile for extended mouse-encoding
817   --enable-ext-putwin     compile with extended putwin/screendump
818   --enable-no-padding     compile with $NCURSES_NO_PADDING code
819   --enable-sigwinch       compile with SIGWINCH handler
820   --enable-tcap-names     compile with user-definable terminal capabilities
821 Reentrant Code:
822   --with-pthread          use POSIX thread library
823   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824   --enable-weak-symbols   enable weak-symbols for pthreads
825   --enable-reentrant      compile with reentrant code
826   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827   --enable-opaque-form    make form-library structures "opaque"
828   --enable-opaque-menu    make menu-library structures "opaque"
829   --enable-opaque-panel   make panel-library structures "opaque"
830   --with-wrap-prefix=XXX  override prefix used for public variables
831 Development Code:
832   --without-develop       disable development options
833   --enable-hard-tabs      compile with hard-tabs code
834   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835 Experimental Code:
836   --disable-assumed-color do not assume anything about default-colors
837   --disable-hashmap       compile without hashmap scrolling-optimization
838   --enable-colorfgbg      compile-in experimental $COLORFGBG code
839   --enable-interop        compile-in interop bindings
840   --enable-safe-sprintf   compile with experimental safe-sprintf code
841   --disable-scroll-hints  compile without scroll-hints code
842   --enable-wgetch-events  compile with wgetch-events code
843 Testing/development Options:
844   --disable-echo          do not display "compiling" commands
845   --disable-stripping     do not strip (debug info) installed executables
846   --enable-warnings       build: turn on GCC compiler warnings
847   --enable-string-hacks   work around bogus compiler/loader warnings
848   --enable-assertions     test: turn on generation of assertion code
849   --with-dmalloc          test: use Gray Watson's dmalloc library
850   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
851   --with-valgrind         test: use valgrind
852   --disable-leaks         test: free permanent memory, analyze leaks
853   --enable-expanded       test: generate functions for certain macros
854   --disable-macros        test: use functions rather than macros
855   --with-trace            test: add trace() function to all models of ncurses
856   --disable-gnat-projects test: disable GNAT projects even if usable
857 Ada Binding Options:
858   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
859   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
860   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
861   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
862   --with-ada-libname=XXX  override default Ada library-name
863
864 Some influential environment variables:
865   CC          C compiler command
866   CFLAGS      C compiler flags
867   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
868               nonstandard directory <lib dir>
869   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
870               headers in a nonstandard directory <include dir>
871   CPP         C preprocessor
872   CXX         C++ compiler command
873   CXXFLAGS    C++ compiler flags
874   CXXCPP      C++ preprocessor
875
876 Use these variables to override the choices made by `configure' or to help
877 it to find libraries and programs with nonstandard names/locations.
878
879 EOF
880 fi
881
882 if test "$ac_init_help" = "recursive"; then
883   # If there are subdirs, report their specific --help.
884   ac_popdir=`pwd`
885   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
886     cd $ac_subdir
887     # A "../" for each directory in /$ac_subdir.
888     ac_dots=`echo $ac_subdir |
889              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
890
891     case $srcdir in
892     .) # No --srcdir option.  We are building in place.
893       ac_sub_srcdir=$srcdir ;;
894     [\\/]* | ?:[\\/]* ) # Absolute path.
895       ac_sub_srcdir=$srcdir/$ac_subdir ;;
896     *) # Relative path.
897       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
898     esac
899
900     # Check for guested configure; otherwise get Cygnus style configure.
901     if test -f $ac_sub_srcdir/configure.gnu; then
902       echo
903       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
904     elif test -f $ac_sub_srcdir/configure; then
905       echo
906       $SHELL $ac_sub_srcdir/configure  --help=recursive
907     elif test -f $ac_sub_srcdir/configure.ac ||
908            test -f $ac_sub_srcdir/configure.in; then
909       echo
910       $ac_configure --help
911     else
912       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
913     fi
914     cd $ac_popdir
915   done
916 fi
917
918 test -n "$ac_init_help" && exit 0
919 if $ac_init_version; then
920   cat <<\EOF
921
922 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
923 Free Software Foundation, Inc.
924 This configure script is free software; the Free Software Foundation
925 gives unlimited permission to copy, distribute and modify it.
926 EOF
927   exit 0
928 fi
929 exec 5>config.log
930 cat >&5 <<EOF
931 This file contains any messages produced by compilers while
932 running configure, to aid debugging if configure makes a mistake.
933
934 It was created by $as_me, which was
935 generated by GNU Autoconf 2.52.20190901.  Invocation command line was
936
937   $ $0 $@
938
939 EOF
940 {
941 cat <<_ASUNAME
942 ## ---------- ##
943 ## Platform.  ##
944 ## ---------- ##
945
946 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
947 uname -m = `(uname -m) 2>/dev/null || echo unknown`
948 uname -r = `(uname -r) 2>/dev/null || echo unknown`
949 uname -s = `(uname -s) 2>/dev/null || echo unknown`
950 uname -v = `(uname -v) 2>/dev/null || echo unknown`
951
952 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
953 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
954
955 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
956 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
957 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
958 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
959 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
960 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
961 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
962
963 PATH = $PATH
964
965 _ASUNAME
966 } >&5
967
968 cat >&5 <<EOF
969 ## ------------ ##
970 ## Core tests.  ##
971 ## ------------ ##
972
973 EOF
974
975 # Keep a trace of the command line.
976 # Strip out --no-create and --no-recursion so they do not pile up.
977 # Also quote any args containing shell meta-characters.
978 ac_configure_args=
979 ac_sep=
980 for ac_arg
981 do
982   case $ac_arg in
983   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
984   | --no-cr | --no-c) ;;
985   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
986   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
987   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
988     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
989     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
990     ac_sep=" " ;;
991   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
992      ac_sep=" " ;;
993   esac
994   # Get rid of the leading space.
995 done
996
997 # When interrupted or exit'd, cleanup temporary files, and complete
998 # config.log.  We remove comments because anyway the quotes in there
999 # would cause problems or look ugly.
1000 trap 'exit_status=$?
1001   # Save into config.log some information that might help in debugging.
1002   echo >&5
1003   echo "## ----------------- ##" >&5
1004   echo "## Cache variables.  ##" >&5
1005   echo "## ----------------- ##" >&5
1006   echo >&5
1007   # The following way of writing the cache mishandles newlines in values,
1008 {
1009   (set) 2>&1 |
1010     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1011     *ac_space=\ *)
1012       sed -n \
1013         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1014           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1015       ;;
1016     *)
1017       sed -n \
1018         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1019       ;;
1020     esac;
1021 } >&5
1022   sed "/^$/d" confdefs.h >conftest.log
1023   if test -s conftest.log; then
1024     echo >&5
1025     echo "## ------------ ##" >&5
1026     echo "## confdefs.h.  ##" >&5
1027     echo "## ------------ ##" >&5
1028     echo >&5
1029     cat conftest.log >&5
1030   fi
1031   (echo; echo) >&5
1032   test "$ac_signal" != 0 &&
1033     echo "$as_me: caught signal $ac_signal" >&5
1034   echo "$as_me: exit $exit_status" >&5
1035   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1036     exit $exit_status
1037      ' 0
1038 for ac_signal in 1 2 13 15; do
1039   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1040 done
1041 ac_signal=0
1042
1043 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1044 rm -rf conftest* confdefs.h
1045 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1046 echo >confdefs.h
1047
1048 # Let the site file select an alternate cache file if it wants to.
1049 # Prefer explicitly selected file to automatically selected ones.
1050 if test -z "$CONFIG_SITE"; then
1051   if test "x$prefix" != xNONE; then
1052     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1053   else
1054     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1055   fi
1056 fi
1057 for ac_site_file in $CONFIG_SITE; do
1058   if test -r "$ac_site_file"; then
1059     { echo "$as_me:1059: loading site script $ac_site_file" >&5
1060 echo "$as_me: loading site script $ac_site_file" >&6;}
1061     cat "$ac_site_file" >&5
1062     . "$ac_site_file"
1063   fi
1064 done
1065
1066 if test -r "$cache_file"; then
1067   # Some versions of bash will fail to source /dev/null (special
1068   # files actually), so we avoid doing that.
1069   if test -f "$cache_file"; then
1070     { echo "$as_me:1070: loading cache $cache_file" >&5
1071 echo "$as_me: loading cache $cache_file" >&6;}
1072     case $cache_file in
1073       [\\/]* | ?:[\\/]* ) . $cache_file;;
1074       *)                      . ./$cache_file;;
1075     esac
1076   fi
1077 else
1078   { echo "$as_me:1078: creating cache $cache_file" >&5
1079 echo "$as_me: creating cache $cache_file" >&6;}
1080   >$cache_file
1081 fi
1082
1083 # Check that the precious variables saved in the cache have kept the same
1084 # value.
1085 ac_cache_corrupted=false
1086 for ac_var in `(set) 2>&1 |
1087                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1088   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1089   eval ac_new_set=\$ac_env_${ac_var}_set
1090   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1091   eval ac_new_val="\$ac_env_${ac_var}_value"
1092   case $ac_old_set,$ac_new_set in
1093     set,)
1094       { echo "$as_me:1094: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1095 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1096       ac_cache_corrupted=: ;;
1097     ,set)
1098       { echo "$as_me:1098: error: \`$ac_var' was not set in the previous run" >&5
1099 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1100       ac_cache_corrupted=: ;;
1101     ,);;
1102     *)
1103       if test "x$ac_old_val" != "x$ac_new_val"; then
1104         { echo "$as_me:1104: error: \`$ac_var' has changed since the previous run:" >&5
1105 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1106         { echo "$as_me:1106:   former value:  $ac_old_val" >&5
1107 echo "$as_me:   former value:  $ac_old_val" >&2;}
1108         { echo "$as_me:1108:   current value: $ac_new_val" >&5
1109 echo "$as_me:   current value: $ac_new_val" >&2;}
1110         ac_cache_corrupted=:
1111       fi;;
1112   esac
1113   # Pass precious variables to config.status.  It doesn't matter if
1114   # we pass some twice (in addition to the command line arguments).
1115   if test "$ac_new_set" = set; then
1116     case $ac_new_val in
1117     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1118       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1119       ac_configure_args="$ac_configure_args '$ac_arg'"
1120       ;;
1121     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1122        ;;
1123     esac
1124   fi
1125 done
1126 if $ac_cache_corrupted; then
1127   { echo "$as_me:1127: error: changes in the environment can compromise the build" >&5
1128 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1129   { { echo "$as_me:1129: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1130 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1131    { (exit 1); exit 1; }; }
1132 fi
1133
1134 ac_ext=c
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140
1141 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1142   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1143                    ECHO_T='     ' ;;
1144   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1145   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1146 esac
1147 echo "#! $SHELL" >conftest.sh
1148 echo  "exit 0"   >>conftest.sh
1149 chmod +x conftest.sh
1150 if { (echo "$as_me:1150: PATH=\".;.\"; conftest.sh") >&5
1151   (PATH=".;."; conftest.sh) 2>&5
1152   ac_status=$?
1153   echo "$as_me:1153: \$? = $ac_status" >&5
1154   (exit $ac_status); }; then
1155   ac_path_separator=';'
1156 else
1157   ac_path_separator=:
1158 fi
1159 PATH_SEPARATOR="$ac_path_separator"
1160 rm -f conftest.sh
1161
1162 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1163
1164 top_builddir=`pwd`
1165
1166 echo "$as_me:1166: checking for egrep" >&5
1167 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1168 if test "${ac_cv_prog_egrep+set}" = set; then
1169   echo $ECHO_N "(cached) $ECHO_C" >&6
1170 else
1171   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1172                 then ac_cv_prog_egrep='grep -E'
1173                 else ac_cv_prog_egrep='egrep'
1174         fi
1175 fi
1176 echo "$as_me:1176: result: $ac_cv_prog_egrep" >&5
1177 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1178         EGREP=$ac_cv_prog_egrep
1179
1180         test -z "$EGREP" && { { echo "$as_me:1180: error: No egrep program found" >&5
1181 echo "$as_me: error: No egrep program found" >&2;}
1182    { (exit 1); exit 1; }; }
1183
1184 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1185 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1186 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1187 cf_cv_abi_version=${NCURSES_MAJOR}
1188 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1189 cf_cv_timestamp=`date`
1190 echo "$as_me:1190: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1191 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1192
1193 if test -f $srcdir/VERSION ; then
1194         echo "$as_me:1194: checking for package version" >&5
1195 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1196
1197         # if there are not enough fields, cut returns the last one...
1198         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1199         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1200         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1201
1202         # this is how CF_BUNDLED_INTL uses $VERSION:
1203         VERSION="$cf_field1"
1204
1205         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1206         test -z "$VERSION_MAJOR" && { { echo "$as_me:1206: error: missing major-version" >&5
1207 echo "$as_me: error: missing major-version" >&2;}
1208    { (exit 1); exit 1; }; }
1209
1210         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1211         test -z "$VERSION_MINOR" && { { echo "$as_me:1211: error: missing minor-version" >&5
1212 echo "$as_me: error: missing minor-version" >&2;}
1213    { (exit 1); exit 1; }; }
1214
1215         echo "$as_me:1215: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1216 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1217
1218         echo "$as_me:1218: checking for package patch date" >&5
1219 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1220         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1221         case .$VERSION_PATCH in
1222         (.)
1223                 { { echo "$as_me:1223: error: missing patch-date $VERSION_PATCH" >&5
1224 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1225    { (exit 1); exit 1; }; }
1226                 ;;
1227         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1228                 ;;
1229         (*)
1230                 { { echo "$as_me:1230: error: illegal patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         esac
1235         echo "$as_me:1235: result: $VERSION_PATCH" >&5
1236 echo "${ECHO_T}$VERSION_PATCH" >&6
1237 else
1238         { { echo "$as_me:1238: error: did not find $srcdir/VERSION" >&5
1239 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1240    { (exit 1); exit 1; }; }
1241 fi
1242
1243 # show the actual data that we have for versions:
1244 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1245
1246 echo "${as_me:-configure}:1246: testing ABI VERSION $VERSION ..." 1>&5
1247
1248 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1249
1250 echo "${as_me:-configure}:1250: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1251
1252 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1253
1254 echo "${as_me:-configure}:1254: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1255
1256 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1257
1258 echo "${as_me:-configure}:1258: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1259
1260         cf_PACKAGE=NCURSES
1261         PACKAGE=ncurses
1262
1263 cat >>confdefs.h <<EOF
1264 #define PACKAGE "$PACKAGE"
1265 EOF
1266
1267 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1268
1269         cat >>confdefs.h <<EOF
1270 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1271 EOF
1272
1273         cat >>confdefs.h <<EOF
1274 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1275 EOF
1276
1277 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1278
1279 # Check whether --with-rel-version or --without-rel-version was given.
1280 if test "${with_rel_version+set}" = set; then
1281   withval="$with_rel_version"
1282   { echo "$as_me:1282: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1283 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1284  cf_cv_rel_version=$withval
1285 fi;
1286
1287  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1288  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1289
1290 if test -n "$NCURSES_MAJOR" ; then
1291   case $NCURSES_MAJOR in
1292   ([0-9]*)
1293         ;;
1294   (*)
1295         { { echo "$as_me:1295: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1296 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1297    { (exit 1); exit 1; }; }
1298         ;;
1299   esac
1300 else
1301   { { echo "$as_me:1301: error: Release major-version value is empty" >&5
1302 echo "$as_me: error: Release major-version value is empty" >&2;}
1303    { (exit 1); exit 1; }; }
1304 fi
1305
1306 if test -n "$NCURSES_MINOR" ; then
1307   case $NCURSES_MINOR in
1308   ([0-9]*)
1309         ;;
1310   (*)
1311         { { echo "$as_me:1311: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1312 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1313    { (exit 1); exit 1; }; }
1314         ;;
1315   esac
1316 else
1317   { { echo "$as_me:1317: error: Release minor-version value is empty" >&5
1318 echo "$as_me: error: Release minor-version value is empty" >&2;}
1319    { (exit 1); exit 1; }; }
1320 fi
1321
1322 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1323
1324 # Check whether --with-abi-version or --without-abi-version was given.
1325 if test "${with_abi_version+set}" = set; then
1326   withval="$with_abi_version"
1327
1328         if test "x$cf_cv_abi_version" != "x$withval"
1329         then
1330                 { echo "$as_me:1330: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1331 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1332                 case $cf_cv_rel_version in
1333                 (5.*)
1334                         cf_cv_rel_version=$withval.0
1335                         ;;
1336                 (6.*)
1337                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1338                         ;;
1339                 esac
1340         fi
1341         cf_cv_abi_version=$withval
1342 fi;
1343
1344 if test -n "$cf_cv_abi_version" ; then
1345   case $cf_cv_abi_version in
1346   ([0-9]*)
1347         ;;
1348   (*)
1349         { { echo "$as_me:1349: error: ABI version is not a number: $cf_cv_abi_version" >&5
1350 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1351    { (exit 1); exit 1; }; }
1352         ;;
1353   esac
1354 else
1355   { { echo "$as_me:1355: error: ABI version value is empty" >&5
1356 echo "$as_me: error: ABI version value is empty" >&2;}
1357    { (exit 1); exit 1; }; }
1358 fi
1359
1360 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1361 then
1362         case $cf_cv_rel_version in
1363         (5.*)
1364                 cf_cv_rel_version=$with_abi_version.0
1365                 ;;
1366         esac
1367 fi
1368
1369 ac_aux_dir=
1370 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1371   if test -f $ac_dir/install-sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install-sh -c"
1374     break
1375   elif test -f $ac_dir/install.sh; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/install.sh -c"
1378     break
1379   elif test -f $ac_dir/shtool; then
1380     ac_aux_dir=$ac_dir
1381     ac_install_sh="$ac_aux_dir/shtool install -c"
1382     break
1383   fi
1384 done
1385 if test -z "$ac_aux_dir"; then
1386   { { echo "$as_me:1386: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1387 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1388    { (exit 1); exit 1; }; }
1389 fi
1390 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1391 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1392 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1393
1394 # Make sure we can run config.sub.
1395 $ac_config_sub sun4 >/dev/null 2>&1 ||
1396   { { echo "$as_me:1396: error: cannot run $ac_config_sub" >&5
1397 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1398    { (exit 1); exit 1; }; }
1399
1400 echo "$as_me:1400: checking build system type" >&5
1401 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1402 if test "${ac_cv_build+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_build_alias=$build_alias
1406 test -z "$ac_cv_build_alias" &&
1407   ac_cv_build_alias=`$ac_config_guess`
1408 test -z "$ac_cv_build_alias" &&
1409   { { echo "$as_me:1409: error: cannot guess build type; you must specify one" >&5
1410 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1411    { (exit 1); exit 1; }; }
1412 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1413   { { echo "$as_me:1413: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1414 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1415    { (exit 1); exit 1; }; }
1416
1417 fi
1418 echo "$as_me:1418: result: $ac_cv_build" >&5
1419 echo "${ECHO_T}$ac_cv_build" >&6
1420 build=$ac_cv_build
1421 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1422 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1423 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1424
1425 echo "$as_me:1425: checking host system type" >&5
1426 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1427 if test "${ac_cv_host+set}" = set; then
1428   echo $ECHO_N "(cached) $ECHO_C" >&6
1429 else
1430   ac_cv_host_alias=$host_alias
1431 test -z "$ac_cv_host_alias" &&
1432   ac_cv_host_alias=$ac_cv_build_alias
1433 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1434   { { echo "$as_me:1434: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1435 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1436    { (exit 1); exit 1; }; }
1437
1438 fi
1439 echo "$as_me:1439: result: $ac_cv_host" >&5
1440 echo "${ECHO_T}$ac_cv_host" >&6
1441 host=$ac_cv_host
1442 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1447         echo "$as_me:1447: checking target system type" >&5
1448 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1449 if test "${ac_cv_target+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   ac_cv_target_alias=$target_alias
1453 test "x$ac_cv_target_alias" = "x" &&
1454   ac_cv_target_alias=$ac_cv_host_alias
1455 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1456   { { echo "$as_me:1456: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1457 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1458    { (exit 1); exit 1; }; }
1459
1460 fi
1461 echo "$as_me:1461: result: $ac_cv_target" >&5
1462 echo "${ECHO_T}$ac_cv_target" >&6
1463 target=$ac_cv_target
1464 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468 # The aliases save the names the user supplied, while $host etc.
1469 # will get canonicalized.
1470 test -n "$target_alias" &&
1471   test "$program_prefix$program_suffix$program_transform_name" = \
1472     NONENONEs,x,x, &&
1473   program_prefix=${target_alias}-
1474         system_name="$host_os"
1475 else
1476         system_name="`(uname -s -r) 2>/dev/null`"
1477         if test -z "$system_name" ; then
1478                 system_name="`(hostname) 2>/dev/null`"
1479         fi
1480 fi
1481 test -n "$system_name" &&
1482 cat >>confdefs.h <<EOF
1483 #define SYSTEM_NAME "$system_name"
1484 EOF
1485
1486 if test "${cf_cv_system_name+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   cf_cv_system_name="$system_name"
1490 fi
1491
1492 test -z "$system_name" && system_name="$cf_cv_system_name"
1493 test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5
1494 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1495
1496 if test ".$system_name" != ".$cf_cv_system_name" ; then
1497         echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1498 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1499         { { echo "$as_me:1499: error: \"Please remove config.cache and try again.\"" >&5
1500 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1501    { (exit 1); exit 1; }; }
1502 fi
1503
1504 # Check whether --with-system-type or --without-system-type was given.
1505 if test "${with_system_type+set}" = set; then
1506   withval="$with_system_type"
1507   { echo "$as_me:1507: WARNING: overriding system type to $withval" >&5
1508 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1509         cf_cv_system_name=$withval
1510         host_os=$withval
1511
1512 fi;
1513
1514 ###     Save the given $CFLAGS to allow user-override.
1515 cf_user_CFLAGS="$CFLAGS"
1516
1517 ###     Default install-location
1518
1519 echo "$as_me:1519: checking for prefix" >&5
1520 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1521 if test "x$prefix" = "xNONE" ; then
1522         case "$cf_cv_system_name" in
1523                 # non-vendor systems don't have a conflict
1524         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1525                 prefix=/usr
1526                 ;;
1527         (*)     prefix=$ac_default_prefix
1528                 ;;
1529         esac
1530 fi
1531 echo "$as_me:1531: result: $prefix" >&5
1532 echo "${ECHO_T}$prefix" >&6
1533
1534 if test "x$prefix" = "xNONE" ; then
1535 echo "$as_me:1535: checking for default include-directory" >&5
1536 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1537 test -n "$verbose" && echo 1>&6
1538 for cf_symbol in \
1539         $includedir \
1540         $includedir/ncurses \
1541         $prefix/include \
1542         $prefix/include/ncurses \
1543         /usr/local/include \
1544         /usr/local/include/ncurses \
1545         /usr/include \
1546         /usr/include/ncurses
1547 do
1548         cf_dir=`eval echo $cf_symbol`
1549         if test -f $cf_dir/curses.h ; then
1550         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1551                 includedir="$cf_symbol"
1552                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1553                 break
1554         fi
1555         fi
1556         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1557 done
1558 echo "$as_me:1558: result: $includedir" >&5
1559 echo "${ECHO_T}$includedir" >&6
1560 fi
1561
1562 ### Defaults for ncurses ABI
1563
1564 case x$cf_cv_abi_version in
1565 (x[6789])
1566         cf_dft_ext_colors=yes
1567         cf_dft_ext_const=yes
1568         cf_dft_ext_mouse=yes
1569         cf_dft_ext_putwin=yes
1570         cf_dft_ext_spfuncs=yes
1571         cf_dft_filter_syms=yes
1572         cf_dft_chtype=uint32_t
1573         cf_dft_mmask_t=uint32_t
1574         cf_dft_interop=yes
1575         cf_dft_tparm_arg=intptr_t
1576         cf_dft_with_lp64=yes
1577         ;;
1578 (*)
1579         cf_dft_ext_colors=no
1580         cf_dft_ext_const=no
1581         cf_dft_ext_mouse=no
1582         cf_dft_ext_putwin=no
1583         cf_dft_ext_spfuncs=no
1584         cf_dft_filter_syms=no
1585         cf_dft_chtype=auto
1586         cf_dft_mmask_t=auto
1587         cf_dft_interop=no
1588         cf_dft_tparm_arg=long
1589         cf_dft_with_lp64=no
1590         ;;
1591 esac
1592
1593 ###     Checks for programs.
1594
1595 # Check whether --with-ada or --without-ada was given.
1596 if test "${with_ada+set}" = set; then
1597   withval="$with_ada"
1598   cf_with_ada=$withval
1599 else
1600   cf_with_ada=yes
1601 fi;
1602
1603 if test "x$cf_with_ada" = xyes
1604 then
1605         cf_prog_cc="gnatgcc gcc cc"
1606 else
1607         cf_prog_cc="gcc cc"
1608 fi
1609
1610 ac_ext=c
1611 ac_cpp='$CPP $CPPFLAGS'
1612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1615 ac_main_return=return
1616 if test -n "$ac_tool_prefix"; then
1617   for ac_prog in $cf_prog_cc
1618   do
1619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1621 echo "$as_me:1621: checking for $ac_word" >&5
1622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1623 if test "${ac_cv_prog_CC+set}" = set; then
1624   echo $ECHO_N "(cached) $ECHO_C" >&6
1625 else
1626   if test -n "$CC"; then
1627   ac_cv_prog_CC="$CC" # Let the user override the test.
1628 else
1629   ac_save_IFS=$IFS; IFS=$ac_path_separator
1630 ac_dummy="$PATH"
1631 for ac_dir in $ac_dummy; do
1632   IFS=$ac_save_IFS
1633   test -z "$ac_dir" && ac_dir=.
1634   $as_executable_p "$ac_dir/$ac_word" || continue
1635 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636 echo "$as_me:1636: found $ac_dir/$ac_word" >&5
1637 break
1638 done
1639
1640 fi
1641 fi
1642 CC=$ac_cv_prog_CC
1643 if test -n "$CC"; then
1644   echo "$as_me:1644: result: $CC" >&5
1645 echo "${ECHO_T}$CC" >&6
1646 else
1647   echo "$as_me:1647: result: no" >&5
1648 echo "${ECHO_T}no" >&6
1649 fi
1650
1651     test -n "$CC" && break
1652   done
1653 fi
1654 if test -z "$CC"; then
1655   ac_ct_CC=$CC
1656   for ac_prog in $cf_prog_cc
1657 do
1658   # Extract the first word of "$ac_prog", so it can be a program name with args.
1659 set dummy $ac_prog; ac_word=$2
1660 echo "$as_me:1660: checking for $ac_word" >&5
1661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1662 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1663   echo $ECHO_N "(cached) $ECHO_C" >&6
1664 else
1665   if test -n "$ac_ct_CC"; then
1666   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1667 else
1668   ac_save_IFS=$IFS; IFS=$ac_path_separator
1669 ac_dummy="$PATH"
1670 for ac_dir in $ac_dummy; do
1671   IFS=$ac_save_IFS
1672   test -z "$ac_dir" && ac_dir=.
1673   $as_executable_p "$ac_dir/$ac_word" || continue
1674 ac_cv_prog_ac_ct_CC="$ac_prog"
1675 echo "$as_me:1675: found $ac_dir/$ac_word" >&5
1676 break
1677 done
1678
1679 fi
1680 fi
1681 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1682 if test -n "$ac_ct_CC"; then
1683   echo "$as_me:1683: result: $ac_ct_CC" >&5
1684 echo "${ECHO_T}$ac_ct_CC" >&6
1685 else
1686   echo "$as_me:1686: result: no" >&5
1687 echo "${ECHO_T}no" >&6
1688 fi
1689
1690   test -n "$ac_ct_CC" && break
1691 done
1692
1693   CC=$ac_ct_CC
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main (void)
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main (void)
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main (void)
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main (void)
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main (void)
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main (void)
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         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.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 INTEL_COMPILER=no
2115
2116 if test "$GCC" = yes ; then
2117         case $host_os in
2118         (linux*|gnu*)
2119                 echo "$as_me:2119: checking if this is really Intel C compiler" >&5
2120 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2121                 cf_save_CFLAGS="$CFLAGS"
2122                 CFLAGS="$CFLAGS -no-gcc"
2123                 cat >conftest.$ac_ext <<_ACEOF
2124 #line 2124 "configure"
2125 #include "confdefs.h"
2126
2127 int
2128 main (void)
2129 {
2130
2131 #ifdef __INTEL_COMPILER
2132 #else
2133 make an error
2134 #endif
2135
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 rm -f conftest.$ac_objext
2141 if { (eval echo "$as_me:2141: \"$ac_compile\"") >&5
2142   (eval $ac_compile) 2>&5
2143   ac_status=$?
2144   echo "$as_me:2144: \$? = $ac_status" >&5
2145   (exit $ac_status); } &&
2146          { ac_try='test -s conftest.$ac_objext'
2147   { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148   (eval $ac_try) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); }; }; then
2152   INTEL_COMPILER=yes
2153 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2154
2155 else
2156   echo "$as_me: failed program was:" >&5
2157 cat conftest.$ac_ext >&5
2158 fi
2159 rm -f conftest.$ac_objext conftest.$ac_ext
2160                 CFLAGS="$cf_save_CFLAGS"
2161                 echo "$as_me:2161: result: $INTEL_COMPILER" >&5
2162 echo "${ECHO_T}$INTEL_COMPILER" >&6
2163                 ;;
2164         esac
2165 fi
2166
2167 CLANG_COMPILER=no
2168
2169 if test "$GCC" = yes ; then
2170         echo "$as_me:2170: checking if this is really Clang C compiler" >&5
2171 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2172         cf_save_CFLAGS="$CFLAGS"
2173         CFLAGS="$CFLAGS -Qunused-arguments"
2174         cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177
2178 int
2179 main (void)
2180 {
2181
2182 #ifdef __clang__
2183 #else
2184 make an error
2185 #endif
2186
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:2195: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   CLANG_COMPILER=yes
2204 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2205
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211         CFLAGS="$cf_save_CFLAGS"
2212         echo "$as_me:2212: result: $CLANG_COMPILER" >&5
2213 echo "${ECHO_T}$CLANG_COMPILER" >&6
2214 fi
2215
2216 echo "$as_me:2216: checking for $CC option to accept ANSI C" >&5
2217 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2218 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2219   echo $ECHO_N "(cached) $ECHO_C" >&6
2220 else
2221   ac_cv_prog_cc_stdc=no
2222 ac_save_CC=$CC
2223 cat >conftest.$ac_ext <<_ACEOF
2224 #line 2224 "configure"
2225 #include "confdefs.h"
2226 #include <stdarg.h>
2227 #include <stdio.h>
2228 #include <sys/types.h>
2229 #include <sys/stat.h>
2230 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2231 struct buf { int x; };
2232 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2233 static char *e (p, i)
2234      char **p;
2235      int i;
2236 {
2237   return p[i];
2238 }
2239 static char *f (char * (*g) (char **, int), char **p, ...)
2240 {
2241   char *s;
2242   va_list v;
2243   va_start (v,p);
2244   s = g (p, va_arg (v,int));
2245   va_end (v);
2246   return s;
2247 }
2248 int test (int i, double x);
2249 struct s1 {int (*f) (int a);};
2250 struct s2 {int (*f) (double a);};
2251 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2252 int argc;
2253 char **argv;
2254 int
2255 main (void)
2256 {
2257 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 # Don't try gcc -ansi; that turns off useful extensions and
2263 # breaks some systems' header files.
2264 # AIX                   -qlanglvl=ansi
2265 # Ultrix and OSF/1      -std1
2266 # HP-UX 10.20 and later -Ae
2267 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2268 # SVR4                  -Xc -D__EXTENSIONS__
2269 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2270 do
2271   CC="$ac_save_CC $ac_arg"
2272   rm -f conftest.$ac_objext
2273 if { (eval echo "$as_me:2273: \"$ac_compile\"") >&5
2274   (eval $ac_compile) 2>&5
2275   ac_status=$?
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } &&
2278          { ac_try='test -s conftest.$ac_objext'
2279   { (eval echo "$as_me:2279: \"$ac_try\"") >&5
2280   (eval $ac_try) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); }; }; then
2284   ac_cv_prog_cc_stdc=$ac_arg
2285 break
2286 else
2287   echo "$as_me: failed program was:" >&5
2288 cat conftest.$ac_ext >&5
2289 fi
2290 rm -f conftest.$ac_objext
2291 done
2292 rm -f conftest.$ac_ext conftest.$ac_objext
2293 CC=$ac_save_CC
2294
2295 fi
2296
2297 case "x$ac_cv_prog_cc_stdc" in
2298   x|xno)
2299     echo "$as_me:2299: result: none needed" >&5
2300 echo "${ECHO_T}none needed" >&6 ;;
2301   *)
2302     echo "$as_me:2302: result: $ac_cv_prog_cc_stdc" >&5
2303 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2304     CC="$CC $ac_cv_prog_cc_stdc" ;;
2305 esac
2306
2307 # This should have been defined by AC_PROG_CC
2308 : ${CC:=cc}
2309
2310 echo "$as_me:2310: checking \$CFLAGS variable" >&5
2311 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2312 case "x$CFLAGS" in
2313 (*-[IUD]*)
2314         echo "$as_me:2314: result: broken" >&5
2315 echo "${ECHO_T}broken" >&6
2316         { echo "$as_me:2316: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2317 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2318         cf_flags="$CFLAGS"
2319         CFLAGS=
2320         for cf_arg in $cf_flags
2321         do
2322
2323 cf_fix_cppflags=no
2324 cf_new_cflags=
2325 cf_new_cppflags=
2326 cf_new_extra_cppflags=
2327
2328 for cf_add_cflags in $cf_arg
2329 do
2330 case $cf_fix_cppflags in
2331 (no)
2332         case $cf_add_cflags in
2333         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2334                 case $cf_add_cflags in
2335                 (-D*)
2336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2337
2338                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2339                                 && test -z "${cf_tst_cflags}" \
2340                                 && cf_fix_cppflags=yes
2341
2342                         if test $cf_fix_cppflags = yes ; then
2343
2344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2346
2347                                 continue
2348                         elif test "${cf_tst_cflags}" = "\"'" ; 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                         fi
2355                         ;;
2356                 esac
2357                 case "$CPPFLAGS" in
2358                 (*$cf_add_cflags)
2359                         ;;
2360                 (*)
2361                         case $cf_add_cflags in
2362                         (-D*)
2363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365 CPPFLAGS=`echo "$CPPFLAGS" | \
2366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2368
2369                                 ;;
2370                         esac
2371
2372         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2373         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2374
2375                         ;;
2376                 esac
2377                 ;;
2378         (*)
2379
2380         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2381         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2382
2383                 ;;
2384         esac
2385         ;;
2386 (yes)
2387
2388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2390
2391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2392
2393         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2394                 && test -z "${cf_tst_cflags}" \
2395                 && cf_fix_cppflags=no
2396         ;;
2397 esac
2398 done
2399
2400 if test -n "$cf_new_cflags" ; then
2401
2402         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2403         CFLAGS="${CFLAGS}$cf_new_cflags"
2404
2405 fi
2406
2407 if test -n "$cf_new_cppflags" ; then
2408
2409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2410         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2411
2412 fi
2413
2414 if test -n "$cf_new_extra_cppflags" ; then
2415
2416         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2417         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2418
2419 fi
2420
2421         done
2422         ;;
2423 (*)
2424         echo "$as_me:2424: result: ok" >&5
2425 echo "${ECHO_T}ok" >&6
2426         ;;
2427 esac
2428
2429 echo "$as_me:2429: checking \$CC variable" >&5
2430 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2431 case "$CC" in
2432 (*[\ \  ]-*)
2433         echo "$as_me:2433: result: broken" >&5
2434 echo "${ECHO_T}broken" >&6
2435         { echo "$as_me:2435: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2436 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2437         # humor him...
2438         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2439         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2440         CC="$cf_prog"
2441         for cf_arg in $cf_flags
2442         do
2443                 case "x$cf_arg" in
2444                 (x-[IUDfgOW]*)
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_arg
2452 do
2453 case $cf_fix_cppflags in
2454 (no)
2455         case $cf_add_cflags in
2456         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2457                 case $cf_add_cflags in
2458                 (-D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466
2467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2469
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; 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                         fi
2478                         ;;
2479                 esac
2480                 case "$CPPFLAGS" in
2481                 (*$cf_add_cflags)
2482                         ;;
2483                 (*)
2484                         case $cf_add_cflags in
2485                         (-D*)
2486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2487
2488 CPPFLAGS=`echo "$CPPFLAGS" | \
2489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2491
2492                                 ;;
2493                         esac
2494
2495         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2496         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2497
2498                         ;;
2499                 esac
2500                 ;;
2501         (*)
2502
2503         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2504         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2505
2506                 ;;
2507         esac
2508         ;;
2509 (yes)
2510
2511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2513
2514         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2515
2516         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2517                 && test -z "${cf_tst_cflags}" \
2518                 && cf_fix_cppflags=no
2519         ;;
2520 esac
2521 done
2522
2523 if test -n "$cf_new_cflags" ; then
2524
2525         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2526         CFLAGS="${CFLAGS}$cf_new_cflags"
2527
2528 fi
2529
2530 if test -n "$cf_new_cppflags" ; then
2531
2532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2533         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2534
2535 fi
2536
2537 if test -n "$cf_new_extra_cppflags" ; then
2538
2539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2541
2542 fi
2543
2544                         ;;
2545                 (*)
2546                         CC="$CC $cf_arg"
2547                         ;;
2548                 esac
2549         done
2550         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2551
2552 echo "${as_me:-configure}:2552: testing resulting CC: '$CC' ..." 1>&5
2553
2554         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2555
2556 echo "${as_me:-configure}:2556: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2557
2558         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2559
2560 echo "${as_me:-configure}:2560: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2561
2562         ;;
2563 (*)
2564         echo "$as_me:2564: result: ok" >&5
2565 echo "${ECHO_T}ok" >&6
2566         ;;
2567 esac
2568
2569 ac_ext=c
2570 ac_cpp='$CPP $CPPFLAGS'
2571 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2574 ac_main_return=return
2575 echo "$as_me:2575: checking how to run the C preprocessor" >&5
2576 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2577 # On Suns, sometimes $CPP names a directory.
2578 if test -n "$CPP" && test -d "$CPP"; then
2579   CPP=
2580 fi
2581 if test -z "$CPP"; then
2582   if test "${ac_cv_prog_CPP+set}" = set; then
2583   echo $ECHO_N "(cached) $ECHO_C" >&6
2584 else
2585       # Double quotes because CPP needs to be expanded
2586     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2587     do
2588       ac_preproc_ok=false
2589 for ac_c_preproc_warn_flag in '' yes
2590 do
2591   # Use a header file that comes with gcc, so configuring glibc
2592   # with a fresh cross-compiler works.
2593   # On the NeXT, cc -E runs the code through the compiler's parser,
2594   # not just through cpp. "Syntax error" is here to catch this case.
2595   cat >conftest.$ac_ext <<_ACEOF
2596 #line 2596 "configure"
2597 #include "confdefs.h"
2598 #include <assert.h>
2599                      Syntax error
2600 _ACEOF
2601 if { (eval echo "$as_me:2601: \"$ac_cpp conftest.$ac_ext\"") >&5
2602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2603   ac_status=$?
2604   egrep -v '^ *\+' conftest.er1 >conftest.err
2605   rm -f conftest.er1
2606   cat conftest.err >&5
2607   echo "$as_me:2607: \$? = $ac_status" >&5
2608   (exit $ac_status); } >/dev/null; then
2609   if test -s conftest.err; then
2610     ac_cpp_err=$ac_c_preproc_warn_flag
2611   else
2612     ac_cpp_err=
2613   fi
2614 else
2615   ac_cpp_err=yes
2616 fi
2617 if test -z "$ac_cpp_err"; then
2618   :
2619 else
2620   echo "$as_me: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   # Broken: fails on valid input.
2623 continue
2624 fi
2625 rm -f conftest.err conftest.$ac_ext
2626
2627   # OK, works on sane cases.  Now check whether non-existent headers
2628   # can be detected and how.
2629   cat >conftest.$ac_ext <<_ACEOF
2630 #line 2630 "configure"
2631 #include "confdefs.h"
2632 #include <ac_nonexistent.h>
2633 _ACEOF
2634 if { (eval echo "$as_me:2634: \"$ac_cpp conftest.$ac_ext\"") >&5
2635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2636   ac_status=$?
2637   egrep -v '^ *\+' conftest.er1 >conftest.err
2638   rm -f conftest.er1
2639   cat conftest.err >&5
2640   echo "$as_me:2640: \$? = $ac_status" >&5
2641   (exit $ac_status); } >/dev/null; then
2642   if test -s conftest.err; then
2643     ac_cpp_err=$ac_c_preproc_warn_flag
2644   else
2645     ac_cpp_err=
2646   fi
2647 else
2648   ac_cpp_err=yes
2649 fi
2650 if test -z "$ac_cpp_err"; then
2651   # Broken: success on invalid input.
2652 continue
2653 else
2654   echo "$as_me: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   # Passes both tests.
2657 ac_preproc_ok=:
2658 break
2659 fi
2660 rm -f conftest.err conftest.$ac_ext
2661
2662 done
2663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2664 rm -f conftest.err conftest.$ac_ext
2665 if $ac_preproc_ok; then
2666   break
2667 fi
2668
2669     done
2670     ac_cv_prog_CPP=$CPP
2671
2672 fi
2673   CPP=$ac_cv_prog_CPP
2674 else
2675   ac_cv_prog_CPP=$CPP
2676 fi
2677 echo "$as_me:2677: result: $CPP" >&5
2678 echo "${ECHO_T}$CPP" >&6
2679 ac_preproc_ok=false
2680 for ac_c_preproc_warn_flag in '' yes
2681 do
2682   # Use a header file that comes with gcc, so configuring glibc
2683   # with a fresh cross-compiler works.
2684   # On the NeXT, cc -E runs the code through the compiler's parser,
2685   # not just through cpp. "Syntax error" is here to catch this case.
2686   cat >conftest.$ac_ext <<_ACEOF
2687 #line 2687 "configure"
2688 #include "confdefs.h"
2689 #include <assert.h>
2690                      Syntax error
2691 _ACEOF
2692 if { (eval echo "$as_me:2692: \"$ac_cpp conftest.$ac_ext\"") >&5
2693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694   ac_status=$?
2695   egrep -v '^ *\+' conftest.er1 >conftest.err
2696   rm -f conftest.er1
2697   cat conftest.err >&5
2698   echo "$as_me:2698: \$? = $ac_status" >&5
2699   (exit $ac_status); } >/dev/null; then
2700   if test -s conftest.err; then
2701     ac_cpp_err=$ac_c_preproc_warn_flag
2702   else
2703     ac_cpp_err=
2704   fi
2705 else
2706   ac_cpp_err=yes
2707 fi
2708 if test -z "$ac_cpp_err"; then
2709   :
2710 else
2711   echo "$as_me: failed program was:" >&5
2712   cat conftest.$ac_ext >&5
2713   # Broken: fails on valid input.
2714 continue
2715 fi
2716 rm -f conftest.err conftest.$ac_ext
2717
2718   # OK, works on sane cases.  Now check whether non-existent headers
2719   # can be detected and how.
2720   cat >conftest.$ac_ext <<_ACEOF
2721 #line 2721 "configure"
2722 #include "confdefs.h"
2723 #include <ac_nonexistent.h>
2724 _ACEOF
2725 if { (eval echo "$as_me:2725: \"$ac_cpp conftest.$ac_ext\"") >&5
2726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2727   ac_status=$?
2728   egrep -v '^ *\+' conftest.er1 >conftest.err
2729   rm -f conftest.er1
2730   cat conftest.err >&5
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); } >/dev/null; then
2733   if test -s conftest.err; then
2734     ac_cpp_err=$ac_c_preproc_warn_flag
2735   else
2736     ac_cpp_err=
2737   fi
2738 else
2739   ac_cpp_err=yes
2740 fi
2741 if test -z "$ac_cpp_err"; then
2742   # Broken: success on invalid input.
2743 continue
2744 else
2745   echo "$as_me: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   # Passes both tests.
2748 ac_preproc_ok=:
2749 break
2750 fi
2751 rm -f conftest.err conftest.$ac_ext
2752
2753 done
2754 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2755 rm -f conftest.err conftest.$ac_ext
2756 if $ac_preproc_ok; then
2757   :
2758 else
2759   { { echo "$as_me:2759: error: C preprocessor \"$CPP\" fails sanity check" >&5
2760 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2761    { (exit 1); exit 1; }; }
2762 fi
2763
2764 ac_ext=c
2765 ac_cpp='$CPP $CPPFLAGS'
2766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769 ac_main_return=return
2770
2771 if test $ac_cv_c_compiler_gnu = yes; then
2772     echo "$as_me:2772: checking whether $CC needs -traditional" >&5
2773 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2774 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777     ac_pattern="Autoconf.*'x'"
2778   cat >conftest.$ac_ext <<_ACEOF
2779 #line 2779 "configure"
2780 #include "confdefs.h"
2781 #include <sgtty.h>
2782 int Autoconf = TIOCGETP;
2783 _ACEOF
2784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2785   egrep "$ac_pattern" >/dev/null 2>&1; then
2786   ac_cv_prog_gcc_traditional=yes
2787 else
2788   ac_cv_prog_gcc_traditional=no
2789 fi
2790 rm -rf conftest*
2791
2792   if test $ac_cv_prog_gcc_traditional = no; then
2793     cat >conftest.$ac_ext <<_ACEOF
2794 #line 2794 "configure"
2795 #include "confdefs.h"
2796 #include <termio.h>
2797 int Autoconf = TCGETA;
2798 _ACEOF
2799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2800   egrep "$ac_pattern" >/dev/null 2>&1; then
2801   ac_cv_prog_gcc_traditional=yes
2802 fi
2803 rm -rf conftest*
2804
2805   fi
2806 fi
2807 echo "$as_me:2807: result: $ac_cv_prog_gcc_traditional" >&5
2808 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2809   if test $ac_cv_prog_gcc_traditional = yes; then
2810     CC="$CC -traditional"
2811   fi
2812 fi
2813
2814 echo "$as_me:2814: checking whether $CC understands -c and -o together" >&5
2815 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2816 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819
2820 cat > conftest.$ac_ext <<CF_EOF
2821 int main(void)
2822 {
2823         ${cf_cv_main_return:-return}(0);
2824 }
2825 CF_EOF
2826 # We do the test twice because some compilers refuse to overwrite an
2827 # existing .o file with -o, though they will create one.
2828 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2829 if { (eval echo "$as_me:2829: \"$ac_try\"") >&5
2830   (eval $ac_try) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); } &&
2834   test -f conftest2.$ac_objext && { (eval echo "$as_me:2834: \"$ac_try\"") >&5
2835   (eval $ac_try) 2>&5
2836   ac_status=$?
2837   echo "$as_me:2837: \$? = $ac_status" >&5
2838   (exit $ac_status); };
2839 then
2840   eval cf_cv_prog_CC_c_o=yes
2841 else
2842   eval cf_cv_prog_CC_c_o=no
2843 fi
2844 rm -rf conftest*
2845
2846 fi
2847 if test $cf_cv_prog_CC_c_o = yes; then
2848   echo "$as_me:2848: result: yes" >&5
2849 echo "${ECHO_T}yes" >&6
2850 else
2851   echo "$as_me:2851: result: no" >&5
2852 echo "${ECHO_T}no" >&6
2853 fi
2854
2855 if test "$cross_compiling" = yes ; then
2856         LDCONFIG=:
2857 else
2858         case "$cf_cv_system_name" in
2859         (dragonfly*|mirbsd*|freebsd*)
2860                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2861                 ;;
2862         (*) LDPATH=$PATH:/sbin:/usr/sbin
2863                 # Extract the first word of "ldconfig", so it can be a program name with args.
2864 set dummy ldconfig; ac_word=$2
2865 echo "$as_me:2865: checking for $ac_word" >&5
2866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2867 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870   case $LDCONFIG in
2871   [\\/]* | ?:[\\/]*)
2872   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2873   ;;
2874   *)
2875   ac_save_IFS=$IFS; IFS=$ac_path_separator
2876 ac_dummy="$LDPATH"
2877 for ac_dir in $ac_dummy; do
2878   IFS=$ac_save_IFS
2879   test -z "$ac_dir" && ac_dir=.
2880   if $as_executable_p "$ac_dir/$ac_word"; then
2881    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2882    echo "$as_me:2882: found $ac_dir/$ac_word" >&5
2883    break
2884 fi
2885 done
2886
2887   ;;
2888 esac
2889 fi
2890 LDCONFIG=$ac_cv_path_LDCONFIG
2891
2892 if test -n "$LDCONFIG"; then
2893   echo "$as_me:2893: result: $LDCONFIG" >&5
2894 echo "${ECHO_T}$LDCONFIG" >&6
2895 else
2896   echo "$as_me:2896: result: no" >&5
2897 echo "${ECHO_T}no" >&6
2898 fi
2899
2900                 ;;
2901         esac
2902 fi
2903
2904 echo "$as_me:2904: checking if you want to ensure bool is consistent with C++" >&5
2905 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2906
2907 # Check whether --with-cxx or --without-cxx was given.
2908 if test "${with_cxx+set}" = set; then
2909   withval="$with_cxx"
2910   cf_with_cxx=$withval
2911 else
2912   cf_with_cxx=yes
2913 fi;
2914 echo "$as_me:2914: result: $cf_with_cxx" >&5
2915 echo "${ECHO_T}$cf_with_cxx" >&6
2916 if test "X$cf_with_cxx" = Xno ; then
2917         CXX=""
2918         GXX=""
2919 else
2920         # with autoconf 2.13, we can change the error to a warning:
2921                 ac_ext=cc
2922 ac_cpp='$CXXCPP $CPPFLAGS'
2923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2926 ac_main_return=return
2927 if test -n "$ac_tool_prefix"; then
2928   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2929   do
2930     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2931 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2932 echo "$as_me:2932: checking for $ac_word" >&5
2933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2934 if test "${ac_cv_prog_CXX+set}" = set; then
2935   echo $ECHO_N "(cached) $ECHO_C" >&6
2936 else
2937   if test -n "$CXX"; then
2938   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2939 else
2940   ac_save_IFS=$IFS; IFS=$ac_path_separator
2941 ac_dummy="$PATH"
2942 for ac_dir in $ac_dummy; do
2943   IFS=$ac_save_IFS
2944   test -z "$ac_dir" && ac_dir=.
2945   $as_executable_p "$ac_dir/$ac_word" || continue
2946 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2947 echo "$as_me:2947: found $ac_dir/$ac_word" >&5
2948 break
2949 done
2950
2951 fi
2952 fi
2953 CXX=$ac_cv_prog_CXX
2954 if test -n "$CXX"; then
2955   echo "$as_me:2955: result: $CXX" >&5
2956 echo "${ECHO_T}$CXX" >&6
2957 else
2958   echo "$as_me:2958: result: no" >&5
2959 echo "${ECHO_T}no" >&6
2960 fi
2961
2962     test -n "$CXX" && break
2963   done
2964 fi
2965 if test -z "$CXX"; then
2966   ac_ct_CXX=$CXX
2967   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2968 do
2969   # Extract the first word of "$ac_prog", so it can be a program name with args.
2970 set dummy $ac_prog; ac_word=$2
2971 echo "$as_me:2971: checking for $ac_word" >&5
2972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2973 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   if test -n "$ac_ct_CXX"; then
2977   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2978 else
2979   ac_save_IFS=$IFS; IFS=$ac_path_separator
2980 ac_dummy="$PATH"
2981 for ac_dir in $ac_dummy; do
2982   IFS=$ac_save_IFS
2983   test -z "$ac_dir" && ac_dir=.
2984   $as_executable_p "$ac_dir/$ac_word" || continue
2985 ac_cv_prog_ac_ct_CXX="$ac_prog"
2986 echo "$as_me:2986: found $ac_dir/$ac_word" >&5
2987 break
2988 done
2989
2990 fi
2991 fi
2992 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2993 if test -n "$ac_ct_CXX"; then
2994   echo "$as_me:2994: result: $ac_ct_CXX" >&5
2995 echo "${ECHO_T}$ac_ct_CXX" >&6
2996 else
2997   echo "$as_me:2997: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999 fi
3000
3001   test -n "$ac_ct_CXX" && break
3002 done
3003 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3004
3005   CXX=$ac_ct_CXX
3006 fi
3007
3008 # Provide some information about the compiler.
3009 echo "$as_me:3009:" \
3010      "checking for C++ compiler version" >&5
3011 ac_compiler=`set X $ac_compile; echo $2`
3012 { (eval echo "$as_me:3012: \"$ac_compiler --version </dev/null >&5\"") >&5
3013   (eval $ac_compiler --version </dev/null >&5) 2>&5
3014   ac_status=$?
3015   echo "$as_me:3015: \$? = $ac_status" >&5
3016   (exit $ac_status); }
3017 { (eval echo "$as_me:3017: \"$ac_compiler -v </dev/null >&5\"") >&5
3018   (eval $ac_compiler -v </dev/null >&5) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }
3022 { (eval echo "$as_me:3022: \"$ac_compiler -V </dev/null >&5\"") >&5
3023   (eval $ac_compiler -V </dev/null >&5) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); }
3027
3028 echo "$as_me:3028: checking whether we are using the GNU C++ compiler" >&5
3029 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3030 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3031   echo $ECHO_N "(cached) $ECHO_C" >&6
3032 else
3033   cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036
3037 int
3038 main (void)
3039 {
3040 #ifndef __GNUC__
3041        choke me
3042 #endif
3043
3044   ;
3045   return 0;
3046 }
3047 _ACEOF
3048 rm -f conftest.$ac_objext
3049 if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
3050   (eval $ac_compile) 2>&5
3051   ac_status=$?
3052   echo "$as_me:3052: \$? = $ac_status" >&5
3053   (exit $ac_status); } &&
3054          { ac_try='test -s conftest.$ac_objext'
3055   { (eval echo "$as_me:3055: \"$ac_try\"") >&5
3056   (eval $ac_try) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); }; }; then
3060   ac_compiler_gnu=yes
3061 else
3062   echo "$as_me: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 ac_compiler_gnu=no
3065 fi
3066 rm -f conftest.$ac_objext conftest.$ac_ext
3067 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3068
3069 fi
3070 echo "$as_me:3070: result: $ac_cv_cxx_compiler_gnu" >&5
3071 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3072 GXX=`test $ac_compiler_gnu = yes && echo yes`
3073 ac_test_CXXFLAGS=${CXXFLAGS+set}
3074 ac_save_CXXFLAGS=$CXXFLAGS
3075 CXXFLAGS="-g"
3076 echo "$as_me:3076: checking whether $CXX accepts -g" >&5
3077 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3078 if test "${ac_cv_prog_cxx_g+set}" = set; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081   cat >conftest.$ac_ext <<_ACEOF
3082 #line 3082 "configure"
3083 #include "confdefs.h"
3084
3085 int
3086 main (void)
3087 {
3088
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 rm -f conftest.$ac_objext
3094 if { (eval echo "$as_me:3094: \"$ac_compile\"") >&5
3095   (eval $ac_compile) 2>&5
3096   ac_status=$?
3097   echo "$as_me:3097: \$? = $ac_status" >&5
3098   (exit $ac_status); } &&
3099          { ac_try='test -s conftest.$ac_objext'
3100   { (eval echo "$as_me:3100: \"$ac_try\"") >&5
3101   (eval $ac_try) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); }; }; then
3105   ac_cv_prog_cxx_g=yes
3106 else
3107   echo "$as_me: failed program was:" >&5
3108 cat conftest.$ac_ext >&5
3109 ac_cv_prog_cxx_g=no
3110 fi
3111 rm -f conftest.$ac_objext conftest.$ac_ext
3112 fi
3113 echo "$as_me:3113: result: $ac_cv_prog_cxx_g" >&5
3114 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3115 if test "$ac_test_CXXFLAGS" = set; then
3116   CXXFLAGS=$ac_save_CXXFLAGS
3117 elif test $ac_cv_prog_cxx_g = yes; then
3118   if test "$GXX" = yes; then
3119     CXXFLAGS="-g -O2"
3120   else
3121     CXXFLAGS="-g"
3122   fi
3123 else
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-O2"
3126   else
3127     CXXFLAGS=
3128   fi
3129 fi
3130 for ac_declaration in \
3131    ''\
3132    '#include <stdlib.h>' \
3133    'extern "C" void std::exit (int) throw (); using std::exit;' \
3134    'extern "C" void std::exit (int); using std::exit;' \
3135    'extern "C" void exit (int) throw ();' \
3136    'extern "C" void exit (int);' \
3137    'void exit (int);'
3138 do
3139   cat >conftest.$ac_ext <<_ACEOF
3140 #line 3140 "configure"
3141 #include "confdefs.h"
3142 #include <stdlib.h>
3143 $ac_declaration
3144 int
3145 main (void)
3146 {
3147 exit (42);
3148   ;
3149   return 0;
3150 }
3151 _ACEOF
3152 rm -f conftest.$ac_objext
3153 if { (eval echo "$as_me:3153: \"$ac_compile\"") >&5
3154   (eval $ac_compile) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); } &&
3158          { ac_try='test -s conftest.$ac_objext'
3159   { (eval echo "$as_me:3159: \"$ac_try\"") >&5
3160   (eval $ac_try) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); }; }; then
3164   :
3165 else
3166   echo "$as_me: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3168 continue
3169 fi
3170 rm -f conftest.$ac_objext conftest.$ac_ext
3171   cat >conftest.$ac_ext <<_ACEOF
3172 #line 3172 "configure"
3173 #include "confdefs.h"
3174 $ac_declaration
3175 int
3176 main (void)
3177 {
3178 exit (42);
3179   ;
3180   return 0;
3181 }
3182 _ACEOF
3183 rm -f conftest.$ac_objext
3184 if { (eval echo "$as_me:3184: \"$ac_compile\"") >&5
3185   (eval $ac_compile) 2>&5
3186   ac_status=$?
3187   echo "$as_me:3187: \$? = $ac_status" >&5
3188   (exit $ac_status); } &&
3189          { ac_try='test -s conftest.$ac_objext'
3190   { (eval echo "$as_me:3190: \"$ac_try\"") >&5
3191   (eval $ac_try) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); }; }; then
3195   break
3196 else
3197   echo "$as_me: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 fi
3200 rm -f conftest.$ac_objext conftest.$ac_ext
3201 done
3202 rm -rf conftest*
3203 if test -n "$ac_declaration"; then
3204   echo '#ifdef __cplusplus' >>confdefs.h
3205   echo $ac_declaration      >>confdefs.h
3206   echo '#endif'             >>confdefs.h
3207 fi
3208
3209 ac_ext=c
3210 ac_cpp='$CPP $CPPFLAGS'
3211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3214 ac_main_return=return
3215
3216         ac_ext=cc
3217 ac_cpp='$CXXCPP $CPPFLAGS'
3218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3221 ac_main_return=return
3222
3223         if test "x$cf_with_cxx" != xno
3224         then
3225                 # Several of the C++ configurations do not work, particularly when
3226                 # cross-compiling (20140913 -TD)
3227                 echo "$as_me:3227: checking if $CXX works" >&5
3228 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3229
3230                 save_CPPFLAGS="$CPPFLAGS"
3231                 eval cf_includedir=${includedir}
3232                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3233
3234 cat >conftest.$ac_ext <<_ACEOF
3235 #line 3235 "configure"
3236 #include "confdefs.h"
3237
3238 #include <stdlib.h>
3239 #include <stdio.h>
3240
3241 int
3242 main (void)
3243 {
3244
3245                 printf("Hello world!\n")
3246
3247   ;
3248   return 0;
3249 }
3250 _ACEOF
3251 rm -f conftest.$ac_objext
3252 if { (eval echo "$as_me:3252: \"$ac_compile\"") >&5
3253   (eval $ac_compile) 2>&5
3254   ac_status=$?
3255   echo "$as_me:3255: \$? = $ac_status" >&5
3256   (exit $ac_status); } &&
3257          { ac_try='test -s conftest.$ac_objext'
3258   { (eval echo "$as_me:3258: \"$ac_try\"") >&5
3259   (eval $ac_try) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); }; }; then
3263   cf_cxx_works=yes
3264 else
3265   echo "$as_me: failed program was:" >&5
3266 cat conftest.$ac_ext >&5
3267 cf_cxx_works=no
3268 fi
3269 rm -f conftest.$ac_objext conftest.$ac_ext
3270                 CPPFLAGS="$save_CPPFLAGS"
3271
3272                 echo "$as_me:3272: result: $cf_cxx_works" >&5
3273 echo "${ECHO_T}$cf_cxx_works" >&6
3274                 if test "x$cf_cxx_works" = xno
3275                 then
3276                         { echo "$as_me:3276: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3277 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3278                         cf_with_cxx=no; CXX=""; GXX="";
3279                 fi
3280         fi
3281         ac_ext=c
3282 ac_cpp='$CPP $CPPFLAGS'
3283 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3284 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3285 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3286 ac_main_return=return
3287
3288         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3289         if test "$CXX" = "g++" ; then
3290                 # Extract the first word of "g++", so it can be a program name with args.
3291 set dummy g++; ac_word=$2
3292 echo "$as_me:3292: checking for $ac_word" >&5
3293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3294 if test "${ac_cv_path_CXX+set}" = set; then
3295   echo $ECHO_N "(cached) $ECHO_C" >&6
3296 else
3297   case $CXX in
3298   [\\/]* | ?:[\\/]*)
3299   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3300   ;;
3301   *)
3302   ac_save_IFS=$IFS; IFS=$ac_path_separator
3303 ac_dummy="$PATH"
3304 for ac_dir in $ac_dummy; do
3305   IFS=$ac_save_IFS
3306   test -z "$ac_dir" && ac_dir=.
3307   if $as_executable_p "$ac_dir/$ac_word"; then
3308    ac_cv_path_CXX="$ac_dir/$ac_word"
3309    echo "$as_me:3309: found $ac_dir/$ac_word" >&5
3310    break
3311 fi
3312 done
3313
3314   ;;
3315 esac
3316 fi
3317 CXX=$ac_cv_path_CXX
3318
3319 if test -n "$CXX"; then
3320   echo "$as_me:3320: result: $CXX" >&5
3321 echo "${ECHO_T}$CXX" >&6
3322 else
3323   echo "$as_me:3323: result: no" >&5
3324 echo "${ECHO_T}no" >&6
3325 fi
3326
3327         fi
3328         case "x$CXX" in
3329         (x|xg++)
3330                 { echo "$as_me:3330: WARNING: You don't have any C++ compiler, too bad" >&5
3331 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3332                 cf_with_cxx=no; CXX=""; GXX="";
3333                 ;;
3334         esac
3335 fi
3336
3337 GXX_VERSION=none
3338 if test "$GXX" = yes; then
3339         echo "$as_me:3339: checking version of ${CXX:-g++}" >&5
3340 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3341         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3342         if test -z "$GXX_VERSION"
3343         then
3344                 GXX_VERSION=unknown
3345                 GXX=no
3346         fi
3347         echo "$as_me:3347: result: $GXX_VERSION" >&5
3348 echo "${ECHO_T}$GXX_VERSION" >&6
3349 fi
3350
3351 case $GXX_VERSION in
3352 (1*|2.[0-6]*)
3353         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3354         # cf_cxx_library=no
3355         { echo "$as_me:3355: WARNING: templates do not work" >&5
3356 echo "$as_me: WARNING: templates do not work" >&2;}
3357         ;;
3358 esac
3359
3360 echo "$as_me:3360: checking if you want to build C++ binding and demo" >&5
3361 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3362
3363 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3364 if test "${with_cxx_binding+set}" = set; then
3365   withval="$with_cxx_binding"
3366   cf_with_cxx_binding=$withval
3367 else
3368   cf_with_cxx_binding=$cf_with_cxx
3369 fi;
3370 echo "$as_me:3370: result: $cf_with_cxx_binding" >&5
3371 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3372
3373 echo "$as_me:3373: checking if you want to build with Ada" >&5
3374 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3375 echo "$as_me:3375: result: $cf_with_ada" >&5
3376 echo "${ECHO_T}$cf_with_ada" >&6
3377
3378 echo "$as_me:3378: checking if you want to install terminal database" >&5
3379 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3380
3381 # Check whether --enable-db-install or --disable-db-install was given.
3382 if test "${enable_db_install+set}" = set; then
3383   enableval="$enable_db_install"
3384   cf_with_db_install=$enableval
3385 else
3386   cf_with_db_install=yes
3387 fi;
3388 echo "$as_me:3388: result: $cf_with_db_install" >&5
3389 echo "${ECHO_T}$cf_with_db_install" >&6
3390
3391 echo "$as_me:3391: checking if you want to install manpages" >&5
3392 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3393
3394 # Check whether --with-manpages or --without-manpages was given.
3395 if test "${with_manpages+set}" = set; then
3396   withval="$with_manpages"
3397   cf_with_manpages=$withval
3398 else
3399   cf_with_manpages=yes
3400 fi;
3401 echo "$as_me:3401: result: $cf_with_manpages" >&5
3402 echo "${ECHO_T}$cf_with_manpages" >&6
3403
3404 echo "$as_me:3404: checking if you want to build programs such as tic" >&5
3405 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3406
3407 # Check whether --with-progs or --without-progs was given.
3408 if test "${with_progs+set}" = set; then
3409   withval="$with_progs"
3410   cf_with_progs=$withval
3411 else
3412   cf_with_progs=yes
3413 fi;
3414 echo "$as_me:3414: result: $cf_with_progs" >&5
3415 echo "${ECHO_T}$cf_with_progs" >&6
3416
3417 if test -f $srcdir/tack/tack.h; then
3418         if test "x$cross_compiling" = xyes ; then
3419                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3420
3421 echo "${as_me:-configure}:3421: testing ignoring tack because we are cross-compiling ..." 1>&5
3422
3423                 cf_with_tack=no
3424         else
3425                 echo "$as_me:3425: checking if you want to build the tack program" >&5
3426 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3427
3428 # Check whether --with-tack or --without-tack was given.
3429 if test "${with_tack+set}" = set; then
3430   withval="$with_tack"
3431   cf_with_tack=$withval
3432 else
3433   cf_with_tack=$cf_with_progs
3434 fi;
3435                 echo "$as_me:3435: result: $cf_with_tack" >&5
3436 echo "${ECHO_T}$cf_with_tack" >&6
3437         fi
3438 else
3439         cf_with_tack=no
3440 fi
3441
3442 echo "$as_me:3442: checking if you want to build test-programs" >&5
3443 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3444
3445 # Check whether --with-tests or --without-tests was given.
3446 if test "${with_tests+set}" = set; then
3447   withval="$with_tests"
3448   cf_with_tests=$withval
3449 else
3450   cf_with_tests=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_tests" >&5
3453 echo "${ECHO_T}$cf_with_tests" >&6
3454
3455 echo "$as_me:3455: checking if you wish to install curses.h" >&5
3456 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3457
3458 # Check whether --with-curses-h or --without-curses-h was given.
3459 if test "${with_curses_h+set}" = set; then
3460   withval="$with_curses_h"
3461   with_curses_h=$withval
3462 else
3463   with_curses_h=yes
3464 fi;
3465 echo "$as_me:3465: result: $with_curses_h" >&5
3466 echo "${ECHO_T}$with_curses_h" >&6
3467
3468 modules_to_build="ncurses"
3469 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3470 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3471 modules_to_build="$modules_to_build panel menu form"
3472
3473 test "$program_prefix" != NONE &&
3474   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3475 # Use a double $ so make ignores it.
3476 test "$program_suffix" != NONE &&
3477   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3478 # Double any \ or $.  echo might interpret backslashes.
3479 # By default was `s,x,x', remove it if useless.
3480 cat <<\_ACEOF >conftest.sed
3481 s/[\\$]/&&/g;s/;s,x,x,$//
3482 _ACEOF
3483 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3484 rm conftest.sed
3485
3486 for ac_prog in mawk gawk nawk awk
3487 do
3488   # Extract the first word of "$ac_prog", so it can be a program name with args.
3489 set dummy $ac_prog; ac_word=$2
3490 echo "$as_me:3490: checking for $ac_word" >&5
3491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3492 if test "${ac_cv_prog_AWK+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495   if test -n "$AWK"; then
3496   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3497 else
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   $as_executable_p "$ac_dir/$ac_word" || continue
3504 ac_cv_prog_AWK="$ac_prog"
3505 echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506 break
3507 done
3508
3509 fi
3510 fi
3511 AWK=$ac_cv_prog_AWK
3512 if test -n "$AWK"; then
3513   echo "$as_me:3513: result: $AWK" >&5
3514 echo "${ECHO_T}$AWK" >&6
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518 fi
3519
3520   test -n "$AWK" && break
3521 done
3522
3523 test -z "$AWK" && { { echo "$as_me:3523: error: No awk program found" >&5
3524 echo "$as_me: error: No awk program found" >&2;}
3525    { (exit 1); exit 1; }; }
3526
3527 echo "$as_me:3527: checking for egrep" >&5
3528 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3529 if test "${ac_cv_prog_egrep+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3533                 then ac_cv_prog_egrep='grep -E'
3534                 else ac_cv_prog_egrep='egrep'
3535         fi
3536 fi
3537 echo "$as_me:3537: result: $ac_cv_prog_egrep" >&5
3538 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3539         EGREP=$ac_cv_prog_egrep
3540
3541         test -z "$EGREP" && { { echo "$as_me:3541: error: No egrep program found" >&5
3542 echo "$as_me: error: No egrep program found" >&2;}
3543    { (exit 1); exit 1; }; }
3544
3545 # Find a good install program.  We prefer a C program (faster),
3546 # so one script is as good as another.  But avoid the broken or
3547 # incompatible versions:
3548 # SysV /etc/install, /usr/sbin/install
3549 # SunOS /usr/etc/install
3550 # IRIX /sbin/install
3551 # AIX /bin/install
3552 # AmigaOS /C/install, which installs bootblocks on floppy discs
3553 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3554 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3555 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3556 # ./install, which can be erroneously created by make from ./install.sh.
3557 echo "$as_me:3557: checking for a BSD compatible install" >&5
3558 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3559 if test -z "$INSTALL"; then
3560 if test "${ac_cv_path_install+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563     ac_save_IFS=$IFS; IFS=$ac_path_separator
3564   for ac_dir in $PATH; do
3565     IFS=$ac_save_IFS
3566     # Account for people who put trailing slashes in PATH elements.
3567     case $ac_dir/ in
3568     / | ./ | .// | /cC/* \
3569     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3570     | /usr/ucb/* ) ;;
3571     *)
3572       # OSF1 and SCO ODT 3.0 have their own names for install.
3573       # Don't use installbsd from OSF since it installs stuff as root
3574       # by default.
3575       for ac_prog in ginstall scoinst install; do
3576         if $as_executable_p "$ac_dir/$ac_prog"; then
3577           if test $ac_prog = install &&
3578             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3579             # AIX install.  It has an incompatible calling convention.
3580             :
3581           elif test $ac_prog = install &&
3582             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3583             # program-specific install script used by HP pwplus--don't use.
3584             :
3585           else
3586             ac_cv_path_install="$ac_dir/$ac_prog -c"
3587             break 2
3588           fi
3589         fi
3590       done
3591       ;;
3592     esac
3593   done
3594
3595 fi
3596   if test "${ac_cv_path_install+set}" = set; then
3597     INSTALL=$ac_cv_path_install
3598   else
3599     # As a last resort, use the slow shell script.  We don't cache a
3600     # path for INSTALL within a source directory, because that will
3601     # break other packages using the cache if that directory is
3602     # removed, or if the path is relative.
3603     INSTALL=$ac_install_sh
3604   fi
3605 fi
3606 echo "$as_me:3606: result: $INSTALL" >&5
3607 echo "${ECHO_T}$INSTALL" >&6
3608
3609 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3610 # It thinks the first close brace ends the variable substitution.
3611 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3612
3613 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3614
3615 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3616
3617 case $INSTALL in
3618 (/*)
3619         ;;
3620 (*)
3621         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3622         test -z "$cf_dir" && cf_dir=.
3623         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3624         ;;
3625 esac
3626
3627 for ac_prog in lint cppcheck splint
3628 do
3629   # Extract the first word of "$ac_prog", so it can be a program name with args.
3630 set dummy $ac_prog; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_LINT+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$LINT"; then
3637   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_LINT="$ac_prog"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650 fi
3651 fi
3652 LINT=$ac_cv_prog_LINT
3653 if test -n "$LINT"; then
3654   echo "$as_me:3654: result: $LINT" >&5
3655 echo "${ECHO_T}$LINT" >&6
3656 else
3657   echo "$as_me:3657: result: no" >&5
3658 echo "${ECHO_T}no" >&6
3659 fi
3660
3661   test -n "$LINT" && break
3662 done
3663
3664 echo "$as_me:3664: checking whether ln -s works" >&5
3665 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3666 LN_S=$as_ln_s
3667 if test "$LN_S" = "ln -s"; then
3668   echo "$as_me:3668: result: yes" >&5
3669 echo "${ECHO_T}yes" >&6
3670 else
3671   echo "$as_me:3671: result: no, using $LN_S" >&5
3672 echo "${ECHO_T}no, using $LN_S" >&6
3673 fi
3674
3675 echo "$as_me:3675: checking if $LN_S -f options work" >&5
3676 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3677
3678 rm -f conf$$.src conf$$dst
3679 echo >conf$$.dst
3680 echo first >conf$$.src
3681 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3682         cf_prog_ln_sf=yes
3683 else
3684         cf_prog_ln_sf=no
3685 fi
3686 rm -f conf$$.dst conf$$src
3687 echo "$as_me:3687: result: $cf_prog_ln_sf" >&5
3688 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3689
3690 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3691
3692 echo "$as_me:3692: checking for long file names" >&5
3693 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3694 if test "${ac_cv_sys_long_file_names+set}" = set; then
3695   echo $ECHO_N "(cached) $ECHO_C" >&6
3696 else
3697   ac_cv_sys_long_file_names=yes
3698 # Test for long file names in all the places we know might matter:
3699 #      .                the current directory, where building will happen
3700 #      $prefix/lib      where we will be installing things
3701 #      $exec_prefix/lib likewise
3702 # eval it to expand exec_prefix.
3703 #      $TMPDIR          if set, where it might want to write temporary files
3704 # if $TMPDIR is not set:
3705 #      /tmp             where it might want to write temporary files
3706 #      /var/tmp         likewise
3707 #      /usr/tmp         likewise
3708 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3709   ac_tmpdirs=$TMPDIR
3710 else
3711   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3712 fi
3713 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3714   test -d $ac_dir || continue
3715   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3716   ac_xdir=$ac_dir/cf$$
3717   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3718   ac_tf1=$ac_xdir/conftest9012345
3719   ac_tf2=$ac_xdir/conftest9012346
3720   (echo 1 >$ac_tf1) 2>/dev/null
3721   (echo 2 >$ac_tf2) 2>/dev/null
3722   ac_val=`cat $ac_tf1 2>/dev/null`
3723   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3724     ac_cv_sys_long_file_names=no
3725     rm -rf $ac_xdir 2>/dev/null
3726     break
3727   fi
3728   rm -rf $ac_xdir 2>/dev/null
3729 done
3730 fi
3731 echo "$as_me:3731: result: $ac_cv_sys_long_file_names" >&5
3732 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3733 if test $ac_cv_sys_long_file_names = yes; then
3734
3735 cat >>confdefs.h <<\EOF
3736 #define HAVE_LONG_FILE_NAMES 1
3737 EOF
3738
3739 fi
3740
3741 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3742 # of package conflict.
3743 cf_config_suffix=
3744
3745 # Check whether --with-config-suffix or --without-config-suffix was given.
3746 if test "${with_config_suffix+set}" = set; then
3747   withval="$with_config_suffix"
3748   case "x$withval" in
3749         (xyes|xno)
3750                 { echo "$as_me:3750: WARNING: expected a value for config-suffix option" >&5
3751 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3752                 ;;
3753         (*)     cf_config_suffix="$withval"
3754                 ;;
3755         esac
3756 fi;
3757
3758 # If we find pkg-config, check if we should install the ".pc" files.
3759
3760 echo "$as_me:3760: checking if you want to use pkg-config" >&5
3761 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3762
3763 # Check whether --with-pkg-config or --without-pkg-config was given.
3764 if test "${with_pkg_config+set}" = set; then
3765   withval="$with_pkg_config"
3766   cf_pkg_config=$withval
3767 else
3768   cf_pkg_config=yes
3769 fi;
3770 echo "$as_me:3770: result: $cf_pkg_config" >&5
3771 echo "${ECHO_T}$cf_pkg_config" >&6
3772
3773 case $cf_pkg_config in
3774 (no)
3775         PKG_CONFIG=none
3776         ;;
3777 (yes)
3778
3779 if test -n "$ac_tool_prefix"; then
3780   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3781 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3782 echo "$as_me:3782: checking for $ac_word" >&5
3783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3784 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3785   echo $ECHO_N "(cached) $ECHO_C" >&6
3786 else
3787   case $PKG_CONFIG in
3788   [\\/]* | ?:[\\/]*)
3789   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3790   ;;
3791   *)
3792   ac_save_IFS=$IFS; IFS=$ac_path_separator
3793 ac_dummy="$PATH"
3794 for ac_dir in $ac_dummy; do
3795   IFS=$ac_save_IFS
3796   test -z "$ac_dir" && ac_dir=.
3797   if $as_executable_p "$ac_dir/$ac_word"; then
3798    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3799    echo "$as_me:3799: found $ac_dir/$ac_word" >&5
3800    break
3801 fi
3802 done
3803
3804   ;;
3805 esac
3806 fi
3807 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3808
3809 if test -n "$PKG_CONFIG"; then
3810   echo "$as_me:3810: result: $PKG_CONFIG" >&5
3811 echo "${ECHO_T}$PKG_CONFIG" >&6
3812 else
3813   echo "$as_me:3813: result: no" >&5
3814 echo "${ECHO_T}no" >&6
3815 fi
3816
3817 fi
3818 if test -z "$ac_cv_path_PKG_CONFIG"; then
3819   ac_pt_PKG_CONFIG=$PKG_CONFIG
3820   # Extract the first word of "pkg-config", so it can be a program name with args.
3821 set dummy pkg-config; ac_word=$2
3822 echo "$as_me:3822: checking for $ac_word" >&5
3823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3824 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3825   echo $ECHO_N "(cached) $ECHO_C" >&6
3826 else
3827   case $ac_pt_PKG_CONFIG in
3828   [\\/]* | ?:[\\/]*)
3829   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3830   ;;
3831   *)
3832   ac_save_IFS=$IFS; IFS=$ac_path_separator
3833 ac_dummy="$PATH"
3834 for ac_dir in $ac_dummy; do
3835   IFS=$ac_save_IFS
3836   test -z "$ac_dir" && ac_dir=.
3837   if $as_executable_p "$ac_dir/$ac_word"; then
3838    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3839    echo "$as_me:3839: found $ac_dir/$ac_word" >&5
3840    break
3841 fi
3842 done
3843
3844   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3845   ;;
3846 esac
3847 fi
3848 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3849
3850 if test -n "$ac_pt_PKG_CONFIG"; then
3851   echo "$as_me:3851: result: $ac_pt_PKG_CONFIG" >&5
3852 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3853 else
3854   echo "$as_me:3854: result: no" >&5
3855 echo "${ECHO_T}no" >&6
3856 fi
3857
3858   PKG_CONFIG=$ac_pt_PKG_CONFIG
3859 else
3860   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3861 fi
3862
3863         ;;
3864 (*)
3865         PKG_CONFIG=$withval
3866         ;;
3867 esac
3868
3869 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3870 if test "$PKG_CONFIG" != none ; then
3871
3872 if test "x$prefix" != xNONE; then
3873         cf_path_syntax="$prefix"
3874 else
3875         cf_path_syntax="$ac_default_prefix"
3876 fi
3877
3878 case ".$PKG_CONFIG" in
3879 (.\$\(*\)*|.\'*\'*)
3880         ;;
3881 (..|./*|.\\*)
3882         ;;
3883 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3884         ;;
3885 (.\${*prefix}*|.\${*dir}*)
3886         eval PKG_CONFIG="$PKG_CONFIG"
3887         case ".$PKG_CONFIG" in
3888         (.NONE/*)
3889                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3890                 ;;
3891         esac
3892         ;;
3893 (.no|.NONE/*)
3894         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3895         ;;
3896 (*)
3897         { { echo "$as_me:3897: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3898 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3899    { (exit 1); exit 1; }; }
3900         ;;
3901 esac
3902
3903 elif test "x$cf_pkg_config" != xno ; then
3904         { echo "$as_me:3904: WARNING: pkg-config is not installed" >&5
3905 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3906 fi
3907
3908 case $PKG_CONFIG in
3909 (no|none|yes)
3910         echo "$as_me:3910: checking for pkg-config library directory" >&5
3911 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3912         ;;
3913 (*)
3914         echo "$as_me:3914: checking for $PKG_CONFIG library directory" >&5
3915 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3916         ;;
3917 esac
3918
3919 PKG_CONFIG_LIBDIR=no
3920
3921 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3922 if test "${with_pkg_config_libdir+set}" = set; then
3923   withval="$with_pkg_config_libdir"
3924   PKG_CONFIG_LIBDIR=$withval
3925 else
3926   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3927 fi;
3928
3929 case x$PKG_CONFIG_LIBDIR in
3930 (x/*)
3931         ;;
3932 (xyes)
3933         # Look for the library directory using the same prefix as the executable
3934         if test "x$PKG_CONFIG" = xnone
3935         then
3936                 cf_path=$prefix
3937         else
3938                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3939         fi
3940
3941         # If you don't like using the default architecture, you have to specify the
3942         # intended library directory and corresponding compiler/linker options.
3943         #
3944         # This case allows for Debian's 2014-flavor of multiarch, along with the
3945         # most common variations before that point.  Some other variants spell the
3946         # directory differently, e.g., "pkg-config", and put it in unusual places.
3947         # pkg-config has always been poorly standardized, which is ironic...
3948         case x`(arch) 2>/dev/null` in
3949         (*64)
3950                 cf_search_path="\
3951                         $cf_path/lib/*64-linux-gnu \
3952                         $cf_path/share \
3953                         $cf_path/lib64 \
3954                         $cf_path/lib32 \
3955                         $cf_path/lib"
3956                 ;;
3957         (*)
3958                 cf_search_path="\
3959                         $cf_path/lib/*-linux-gnu \
3960                         $cf_path/share \
3961                         $cf_path/lib32 \
3962                         $cf_path/lib \
3963                         $cf_path/libdata"
3964                 ;;
3965         esac
3966
3967         test -n "$verbose" && echo "    list..." 1>&6
3968
3969 echo "${as_me:-configure}:3969: testing list... ..." 1>&5
3970
3971         for cf_config in $cf_search_path
3972         do
3973                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3974
3975 echo "${as_me:-configure}:3975: testing checking $cf_config/pkgconfig ..." 1>&5
3976
3977                 if test -d $cf_config/pkgconfig
3978                 then
3979                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3980                         echo "$as_me:3980: checking done" >&5
3981 echo $ECHO_N "checking done... $ECHO_C" >&6
3982                         break
3983                 fi
3984         done
3985         ;;
3986 (*)
3987         ;;
3988 esac
3989
3990 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3991         echo "$as_me:3991: result: $PKG_CONFIG_LIBDIR" >&5
3992 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3993 fi
3994
3995 if test "x$PKG_CONFIG" != xnone
3996 then
3997         echo "$as_me:3997: checking if we should install .pc files for $PKG_CONFIG" >&5
3998 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3999 else
4000         echo "$as_me:4000: checking if we should install .pc files" >&5
4001 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4002 fi
4003
4004 # Check whether --enable-pc-files or --disable-pc-files was given.
4005 if test "${enable_pc_files+set}" = set; then
4006   enableval="$enable_pc_files"
4007   enable_pc_files=$enableval
4008 else
4009   enable_pc_files=no
4010 fi;
4011 echo "$as_me:4011: result: $enable_pc_files" >&5
4012 echo "${ECHO_T}$enable_pc_files" >&6
4013
4014 if test "x$enable_pc_files" != xno
4015 then
4016         MAKE_PC_FILES=
4017         case "x$PKG_CONFIG_LIBDIR" in
4018         (xno|xyes)
4019                 { echo "$as_me:4019: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4020 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4021                 ;;
4022         (*)
4023
4024 if test "x$prefix" != xNONE; then
4025         cf_path_syntax="$prefix"
4026 else
4027         cf_path_syntax="$ac_default_prefix"
4028 fi
4029
4030 case ".$PKG_CONFIG_LIBDIR" in
4031 (.\$\(*\)*|.\'*\'*)
4032         ;;
4033 (..|./*|.\\*)
4034         ;;
4035 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4036         ;;
4037 (.\${*prefix}*|.\${*dir}*)
4038         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4039         case ".$PKG_CONFIG_LIBDIR" in
4040         (.NONE/*)
4041                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4042                 ;;
4043         esac
4044         ;;
4045 (.no|.NONE/*)
4046         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4047         ;;
4048 (*)
4049         { { echo "$as_me:4049: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4050 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4051    { (exit 1); exit 1; }; }
4052         ;;
4053 esac
4054
4055                 ;;
4056         esac
4057 else
4058         MAKE_PC_FILES="#"
4059 fi
4060
4061 if test -z "$MAKE_PC_FILES"
4062 then
4063         echo "$as_me:4063: checking for suffix to add to pc-files" >&5
4064 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4065
4066 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4067 if test "${with_pc_suffix+set}" = set; then
4068   withval="$with_pc_suffix"
4069   case "x$withval" in
4070         (xyes|xno)
4071                 PC_MODULE_SUFFIX=
4072                 ;;
4073         (*)     PC_MODULE_SUFFIX="$withval"
4074                 ;;
4075         esac
4076 fi;
4077         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4078         echo "$as_me:4078: result: $PC_MODULE_SUFFIX" >&5
4079 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4080         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4081
4082 fi
4083
4084 echo "$as_me:4084: checking if we should assume mixed-case filenames" >&5
4085 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4086
4087 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4088 if test "${enable_mixed_case+set}" = set; then
4089   enableval="$enable_mixed_case"
4090   enable_mixedcase=$enableval
4091 else
4092   enable_mixedcase=auto
4093 fi;
4094 echo "$as_me:4094: result: $enable_mixedcase" >&5
4095 echo "${ECHO_T}$enable_mixedcase" >&6
4096 if test "$enable_mixedcase" = "auto" ; then
4097
4098 echo "$as_me:4098: checking if filesystem supports mixed-case filenames" >&5
4099 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4100 if test "${cf_cv_mixedcase+set}" = set; then
4101   echo $ECHO_N "(cached) $ECHO_C" >&6
4102 else
4103
4104 if test "$cross_compiling" = yes ; then
4105         case $target_alias in
4106         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4107                 cf_cv_mixedcase=no
4108                 ;;
4109         (*)
4110                 cf_cv_mixedcase=yes
4111                 ;;
4112         esac
4113 else
4114         rm -f conftest CONFTEST
4115         echo test >conftest
4116         if test -f CONFTEST ; then
4117                 cf_cv_mixedcase=no
4118         else
4119                 cf_cv_mixedcase=yes
4120         fi
4121         rm -f conftest CONFTEST
4122 fi
4123
4124 fi
4125 echo "$as_me:4125: result: $cf_cv_mixedcase" >&5
4126 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4127 test "$cf_cv_mixedcase" = yes &&
4128 cat >>confdefs.h <<\EOF
4129 #define MIXEDCASE_FILENAMES 1
4130 EOF
4131
4132 else
4133         cf_cv_mixedcase=$enable_mixedcase
4134         if test "x$enable_mixedcase" = "xyes" ; then
4135
4136 cat >>confdefs.h <<\EOF
4137 #define MIXEDCASE_FILENAMES 1
4138 EOF
4139
4140         fi
4141 fi
4142
4143 # do this after mixed-case option (tags/TAGS is not as important as tic).
4144 echo "$as_me:4144: checking whether ${MAKE-make} sets \${MAKE}" >&5
4145 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4146 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4147 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4148   echo $ECHO_N "(cached) $ECHO_C" >&6
4149 else
4150   cat >conftest.make <<\EOF
4151 all:
4152         @echo 'ac_maketemp="${MAKE}"'
4153 EOF
4154 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4155 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4156 if test -n "$ac_maketemp"; then
4157   eval ac_cv_prog_make_${ac_make}_set=yes
4158 else
4159   eval ac_cv_prog_make_${ac_make}_set=no
4160 fi
4161 rm -f conftest.make
4162 fi
4163 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4164   echo "$as_me:4164: result: yes" >&5
4165 echo "${ECHO_T}yes" >&6
4166   SET_MAKE=
4167 else
4168   echo "$as_me:4168: result: no" >&5
4169 echo "${ECHO_T}no" >&6
4170   SET_MAKE="MAKE=${MAKE-make}"
4171 fi
4172
4173 for ac_prog in exctags ctags
4174 do
4175   # Extract the first word of "$ac_prog", so it can be a program name with args.
4176 set dummy $ac_prog; ac_word=$2
4177 echo "$as_me:4177: checking for $ac_word" >&5
4178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4179 if test "${ac_cv_prog_CTAGS+set}" = set; then
4180   echo $ECHO_N "(cached) $ECHO_C" >&6
4181 else
4182   if test -n "$CTAGS"; then
4183   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4184 else
4185   ac_save_IFS=$IFS; IFS=$ac_path_separator
4186 ac_dummy="$PATH"
4187 for ac_dir in $ac_dummy; do
4188   IFS=$ac_save_IFS
4189   test -z "$ac_dir" && ac_dir=.
4190   $as_executable_p "$ac_dir/$ac_word" || continue
4191 ac_cv_prog_CTAGS="$ac_prog"
4192 echo "$as_me:4192: found $ac_dir/$ac_word" >&5
4193 break
4194 done
4195
4196 fi
4197 fi
4198 CTAGS=$ac_cv_prog_CTAGS
4199 if test -n "$CTAGS"; then
4200   echo "$as_me:4200: result: $CTAGS" >&5
4201 echo "${ECHO_T}$CTAGS" >&6
4202 else
4203   echo "$as_me:4203: result: no" >&5
4204 echo "${ECHO_T}no" >&6
4205 fi
4206
4207   test -n "$CTAGS" && break
4208 done
4209
4210 for ac_prog in exetags etags
4211 do
4212   # Extract the first word of "$ac_prog", so it can be a program name with args.
4213 set dummy $ac_prog; ac_word=$2
4214 echo "$as_me:4214: checking for $ac_word" >&5
4215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216 if test "${ac_cv_prog_ETAGS+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219   if test -n "$ETAGS"; then
4220   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4221 else
4222   ac_save_IFS=$IFS; IFS=$ac_path_separator
4223 ac_dummy="$PATH"
4224 for ac_dir in $ac_dummy; do
4225   IFS=$ac_save_IFS
4226   test -z "$ac_dir" && ac_dir=.
4227   $as_executable_p "$ac_dir/$ac_word" || continue
4228 ac_cv_prog_ETAGS="$ac_prog"
4229 echo "$as_me:4229: found $ac_dir/$ac_word" >&5
4230 break
4231 done
4232
4233 fi
4234 fi
4235 ETAGS=$ac_cv_prog_ETAGS
4236 if test -n "$ETAGS"; then
4237   echo "$as_me:4237: result: $ETAGS" >&5
4238 echo "${ECHO_T}$ETAGS" >&6
4239 else
4240   echo "$as_me:4240: result: no" >&5
4241 echo "${ECHO_T}no" >&6
4242 fi
4243
4244   test -n "$ETAGS" && break
4245 done
4246
4247 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4248 set dummy ${CTAGS:-ctags}; ac_word=$2
4249 echo "$as_me:4249: checking for $ac_word" >&5
4250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4251 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4252   echo $ECHO_N "(cached) $ECHO_C" >&6
4253 else
4254   if test -n "$MAKE_LOWER_TAGS"; then
4255   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4256 else
4257   ac_save_IFS=$IFS; IFS=$ac_path_separator
4258 ac_dummy="$PATH"
4259 for ac_dir in $ac_dummy; do
4260   IFS=$ac_save_IFS
4261   test -z "$ac_dir" && ac_dir=.
4262   $as_executable_p "$ac_dir/$ac_word" || continue
4263 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4264 echo "$as_me:4264: found $ac_dir/$ac_word" >&5
4265 break
4266 done
4267
4268   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4269 fi
4270 fi
4271 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4272 if test -n "$MAKE_LOWER_TAGS"; then
4273   echo "$as_me:4273: result: $MAKE_LOWER_TAGS" >&5
4274 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4275 else
4276   echo "$as_me:4276: result: no" >&5
4277 echo "${ECHO_T}no" >&6
4278 fi
4279
4280 if test "$cf_cv_mixedcase" = yes ; then
4281         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4282 set dummy ${ETAGS:-etags}; ac_word=$2
4283 echo "$as_me:4283: checking for $ac_word" >&5
4284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4285 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4286   echo $ECHO_N "(cached) $ECHO_C" >&6
4287 else
4288   if test -n "$MAKE_UPPER_TAGS"; then
4289   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4290 else
4291   ac_save_IFS=$IFS; IFS=$ac_path_separator
4292 ac_dummy="$PATH"
4293 for ac_dir in $ac_dummy; do
4294   IFS=$ac_save_IFS
4295   test -z "$ac_dir" && ac_dir=.
4296   $as_executable_p "$ac_dir/$ac_word" || continue
4297 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4298 echo "$as_me:4298: found $ac_dir/$ac_word" >&5
4299 break
4300 done
4301
4302   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4303 fi
4304 fi
4305 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4306 if test -n "$MAKE_UPPER_TAGS"; then
4307   echo "$as_me:4307: result: $MAKE_UPPER_TAGS" >&5
4308 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4309 else
4310   echo "$as_me:4310: result: no" >&5
4311 echo "${ECHO_T}no" >&6
4312 fi
4313
4314 else
4315         MAKE_UPPER_TAGS=no
4316 fi
4317
4318 if test "$MAKE_UPPER_TAGS" = yes ; then
4319         MAKE_UPPER_TAGS=
4320 else
4321         MAKE_UPPER_TAGS="#"
4322 fi
4323
4324 if test "$MAKE_LOWER_TAGS" = yes ; then
4325         MAKE_LOWER_TAGS=
4326 else
4327         MAKE_LOWER_TAGS="#"
4328 fi
4329
4330 echo "$as_me:4330: checking for makeflags variable" >&5
4331 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4332 if test "${cf_cv_makeflags+set}" = set; then
4333   echo $ECHO_N "(cached) $ECHO_C" >&6
4334 else
4335
4336         cf_cv_makeflags=''
4337         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4338         do
4339                 cat >cf_makeflags.tmp <<CF_EOF
4340 SHELL = $SHELL
4341 all :
4342         @ echo '.$cf_option'
4343 CF_EOF
4344                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4345                 case "$cf_result" in
4346                 (.*k|.*kw)
4347                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4348                         case "$cf_result" in
4349                         (.*CC=*)        cf_cv_makeflags=
4350                                 ;;
4351                         (*)     cf_cv_makeflags=$cf_option
4352                                 ;;
4353                         esac
4354                         break
4355                         ;;
4356                 (.-)
4357                         ;;
4358                 (*)
4359
4360 echo "${as_me:-configure}:4360: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4361
4362                         ;;
4363                 esac
4364         done
4365         rm -f cf_makeflags.tmp
4366
4367 fi
4368 echo "$as_me:4368: result: $cf_cv_makeflags" >&5
4369 echo "${ECHO_T}$cf_cv_makeflags" >&6
4370
4371 if test -n "$ac_tool_prefix"; then
4372   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4373 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4374 echo "$as_me:4374: checking for $ac_word" >&5
4375 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4376 if test "${ac_cv_prog_RANLIB+set}" = set; then
4377   echo $ECHO_N "(cached) $ECHO_C" >&6
4378 else
4379   if test -n "$RANLIB"; then
4380   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4381 else
4382   ac_save_IFS=$IFS; IFS=$ac_path_separator
4383 ac_dummy="$PATH"
4384 for ac_dir in $ac_dummy; do
4385   IFS=$ac_save_IFS
4386   test -z "$ac_dir" && ac_dir=.
4387   $as_executable_p "$ac_dir/$ac_word" || continue
4388 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4389 echo "$as_me:4389: found $ac_dir/$ac_word" >&5
4390 break
4391 done
4392
4393 fi
4394 fi
4395 RANLIB=$ac_cv_prog_RANLIB
4396 if test -n "$RANLIB"; then
4397   echo "$as_me:4397: result: $RANLIB" >&5
4398 echo "${ECHO_T}$RANLIB" >&6
4399 else
4400   echo "$as_me:4400: result: no" >&5
4401 echo "${ECHO_T}no" >&6
4402 fi
4403
4404 fi
4405 if test -z "$ac_cv_prog_RANLIB"; then
4406   ac_ct_RANLIB=$RANLIB
4407   # Extract the first word of "ranlib", so it can be a program name with args.
4408 set dummy ranlib; ac_word=$2
4409 echo "$as_me:4409: checking for $ac_word" >&5
4410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4411 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4412   echo $ECHO_N "(cached) $ECHO_C" >&6
4413 else
4414   if test -n "$ac_ct_RANLIB"; then
4415   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4416 else
4417   ac_save_IFS=$IFS; IFS=$ac_path_separator
4418 ac_dummy="$PATH"
4419 for ac_dir in $ac_dummy; do
4420   IFS=$ac_save_IFS
4421   test -z "$ac_dir" && ac_dir=.
4422   $as_executable_p "$ac_dir/$ac_word" || continue
4423 ac_cv_prog_ac_ct_RANLIB="ranlib"
4424 echo "$as_me:4424: found $ac_dir/$ac_word" >&5
4425 break
4426 done
4427
4428   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4429 fi
4430 fi
4431 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4432 if test -n "$ac_ct_RANLIB"; then
4433   echo "$as_me:4433: result: $ac_ct_RANLIB" >&5
4434 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4435 else
4436   echo "$as_me:4436: result: no" >&5
4437 echo "${ECHO_T}no" >&6
4438 fi
4439
4440   RANLIB=$ac_ct_RANLIB
4441 else
4442   RANLIB="$ac_cv_prog_RANLIB"
4443 fi
4444
4445 if test -n "$ac_tool_prefix"; then
4446   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4447 set dummy ${ac_tool_prefix}ld; ac_word=$2
4448 echo "$as_me:4448: checking for $ac_word" >&5
4449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4450 if test "${ac_cv_prog_LD+set}" = set; then
4451   echo $ECHO_N "(cached) $ECHO_C" >&6
4452 else
4453   if test -n "$LD"; then
4454   ac_cv_prog_LD="$LD" # Let the user override the test.
4455 else
4456   ac_save_IFS=$IFS; IFS=$ac_path_separator
4457 ac_dummy="$PATH"
4458 for ac_dir in $ac_dummy; do
4459   IFS=$ac_save_IFS
4460   test -z "$ac_dir" && ac_dir=.
4461   $as_executable_p "$ac_dir/$ac_word" || continue
4462 ac_cv_prog_LD="${ac_tool_prefix}ld"
4463 echo "$as_me:4463: found $ac_dir/$ac_word" >&5
4464 break
4465 done
4466
4467 fi
4468 fi
4469 LD=$ac_cv_prog_LD
4470 if test -n "$LD"; then
4471   echo "$as_me:4471: result: $LD" >&5
4472 echo "${ECHO_T}$LD" >&6
4473 else
4474   echo "$as_me:4474: result: no" >&5
4475 echo "${ECHO_T}no" >&6
4476 fi
4477
4478 fi
4479 if test -z "$ac_cv_prog_LD"; then
4480   ac_ct_LD=$LD
4481   # Extract the first word of "ld", so it can be a program name with args.
4482 set dummy ld; ac_word=$2
4483 echo "$as_me:4483: checking for $ac_word" >&5
4484 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4485 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4486   echo $ECHO_N "(cached) $ECHO_C" >&6
4487 else
4488   if test -n "$ac_ct_LD"; then
4489   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4490 else
4491   ac_save_IFS=$IFS; IFS=$ac_path_separator
4492 ac_dummy="$PATH"
4493 for ac_dir in $ac_dummy; do
4494   IFS=$ac_save_IFS
4495   test -z "$ac_dir" && ac_dir=.
4496   $as_executable_p "$ac_dir/$ac_word" || continue
4497 ac_cv_prog_ac_ct_LD="ld"
4498 echo "$as_me:4498: found $ac_dir/$ac_word" >&5
4499 break
4500 done
4501
4502   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4503 fi
4504 fi
4505 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4506 if test -n "$ac_ct_LD"; then
4507   echo "$as_me:4507: result: $ac_ct_LD" >&5
4508 echo "${ECHO_T}$ac_ct_LD" >&6
4509 else
4510   echo "$as_me:4510: result: no" >&5
4511 echo "${ECHO_T}no" >&6
4512 fi
4513
4514   LD=$ac_ct_LD
4515 else
4516   LD="$ac_cv_prog_LD"
4517 fi
4518
4519 if test -n "$ac_tool_prefix"; then
4520   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4521 set dummy ${ac_tool_prefix}ar; ac_word=$2
4522 echo "$as_me:4522: checking for $ac_word" >&5
4523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4524 if test "${ac_cv_prog_AR+set}" = set; then
4525   echo $ECHO_N "(cached) $ECHO_C" >&6
4526 else
4527   if test -n "$AR"; then
4528   ac_cv_prog_AR="$AR" # Let the user override the test.
4529 else
4530   ac_save_IFS=$IFS; IFS=$ac_path_separator
4531 ac_dummy="$PATH"
4532 for ac_dir in $ac_dummy; do
4533   IFS=$ac_save_IFS
4534   test -z "$ac_dir" && ac_dir=.
4535   $as_executable_p "$ac_dir/$ac_word" || continue
4536 ac_cv_prog_AR="${ac_tool_prefix}ar"
4537 echo "$as_me:4537: found $ac_dir/$ac_word" >&5
4538 break
4539 done
4540
4541 fi
4542 fi
4543 AR=$ac_cv_prog_AR
4544 if test -n "$AR"; then
4545   echo "$as_me:4545: result: $AR" >&5
4546 echo "${ECHO_T}$AR" >&6
4547 else
4548   echo "$as_me:4548: result: no" >&5
4549 echo "${ECHO_T}no" >&6
4550 fi
4551
4552 fi
4553 if test -z "$ac_cv_prog_AR"; then
4554   ac_ct_AR=$AR
4555   # Extract the first word of "ar", so it can be a program name with args.
4556 set dummy ar; ac_word=$2
4557 echo "$as_me:4557: checking for $ac_word" >&5
4558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4559 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4560   echo $ECHO_N "(cached) $ECHO_C" >&6
4561 else
4562   if test -n "$ac_ct_AR"; then
4563   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4564 else
4565   ac_save_IFS=$IFS; IFS=$ac_path_separator
4566 ac_dummy="$PATH"
4567 for ac_dir in $ac_dummy; do
4568   IFS=$ac_save_IFS
4569   test -z "$ac_dir" && ac_dir=.
4570   $as_executable_p "$ac_dir/$ac_word" || continue
4571 ac_cv_prog_ac_ct_AR="ar"
4572 echo "$as_me:4572: found $ac_dir/$ac_word" >&5
4573 break
4574 done
4575
4576   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4577 fi
4578 fi
4579 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4580 if test -n "$ac_ct_AR"; then
4581   echo "$as_me:4581: result: $ac_ct_AR" >&5
4582 echo "${ECHO_T}$ac_ct_AR" >&6
4583 else
4584   echo "$as_me:4584: result: no" >&5
4585 echo "${ECHO_T}no" >&6
4586 fi
4587
4588   AR=$ac_ct_AR
4589 else
4590   AR="$ac_cv_prog_AR"
4591 fi
4592
4593 if test -n "$ac_tool_prefix"; then
4594   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4595 set dummy ${ac_tool_prefix}nm; ac_word=$2
4596 echo "$as_me:4596: checking for $ac_word" >&5
4597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4598 if test "${ac_cv_prog_NM+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   if test -n "$NM"; then
4602   ac_cv_prog_NM="$NM" # Let the user override the test.
4603 else
4604   ac_save_IFS=$IFS; IFS=$ac_path_separator
4605 ac_dummy="$PATH"
4606 for ac_dir in $ac_dummy; do
4607   IFS=$ac_save_IFS
4608   test -z "$ac_dir" && ac_dir=.
4609   $as_executable_p "$ac_dir/$ac_word" || continue
4610 ac_cv_prog_NM="${ac_tool_prefix}nm"
4611 echo "$as_me:4611: found $ac_dir/$ac_word" >&5
4612 break
4613 done
4614
4615 fi
4616 fi
4617 NM=$ac_cv_prog_NM
4618 if test -n "$NM"; then
4619   echo "$as_me:4619: result: $NM" >&5
4620 echo "${ECHO_T}$NM" >&6
4621 else
4622   echo "$as_me:4622: result: no" >&5
4623 echo "${ECHO_T}no" >&6
4624 fi
4625
4626 fi
4627 if test -z "$ac_cv_prog_NM"; then
4628   ac_ct_NM=$NM
4629   # Extract the first word of "nm", so it can be a program name with args.
4630 set dummy nm; ac_word=$2
4631 echo "$as_me:4631: checking for $ac_word" >&5
4632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4633 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4634   echo $ECHO_N "(cached) $ECHO_C" >&6
4635 else
4636   if test -n "$ac_ct_NM"; then
4637   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4638 else
4639   ac_save_IFS=$IFS; IFS=$ac_path_separator
4640 ac_dummy="$PATH"
4641 for ac_dir in $ac_dummy; do
4642   IFS=$ac_save_IFS
4643   test -z "$ac_dir" && ac_dir=.
4644   $as_executable_p "$ac_dir/$ac_word" || continue
4645 ac_cv_prog_ac_ct_NM="nm"
4646 echo "$as_me:4646: found $ac_dir/$ac_word" >&5
4647 break
4648 done
4649
4650   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4651 fi
4652 fi
4653 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4654 if test -n "$ac_ct_NM"; then
4655   echo "$as_me:4655: result: $ac_ct_NM" >&5
4656 echo "${ECHO_T}$ac_ct_NM" >&6
4657 else
4658   echo "$as_me:4658: result: no" >&5
4659 echo "${ECHO_T}no" >&6
4660 fi
4661
4662   NM=$ac_ct_NM
4663 else
4664   NM="$ac_cv_prog_NM"
4665 fi
4666
4667 if test -n "$ac_tool_prefix"; then
4668   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4669 set dummy ${ac_tool_prefix}ar; ac_word=$2
4670 echo "$as_me:4670: checking for $ac_word" >&5
4671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4672 if test "${ac_cv_prog_AR+set}" = set; then
4673   echo $ECHO_N "(cached) $ECHO_C" >&6
4674 else
4675   if test -n "$AR"; then
4676   ac_cv_prog_AR="$AR" # Let the user override the test.
4677 else
4678   ac_save_IFS=$IFS; IFS=$ac_path_separator
4679 ac_dummy="$PATH"
4680 for ac_dir in $ac_dummy; do
4681   IFS=$ac_save_IFS
4682   test -z "$ac_dir" && ac_dir=.
4683   $as_executable_p "$ac_dir/$ac_word" || continue
4684 ac_cv_prog_AR="${ac_tool_prefix}ar"
4685 echo "$as_me:4685: found $ac_dir/$ac_word" >&5
4686 break
4687 done
4688
4689 fi
4690 fi
4691 AR=$ac_cv_prog_AR
4692 if test -n "$AR"; then
4693   echo "$as_me:4693: result: $AR" >&5
4694 echo "${ECHO_T}$AR" >&6
4695 else
4696   echo "$as_me:4696: result: no" >&5
4697 echo "${ECHO_T}no" >&6
4698 fi
4699
4700 fi
4701 if test -z "$ac_cv_prog_AR"; then
4702   ac_ct_AR=$AR
4703   # Extract the first word of "ar", so it can be a program name with args.
4704 set dummy ar; ac_word=$2
4705 echo "$as_me:4705: checking for $ac_word" >&5
4706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4707 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4708   echo $ECHO_N "(cached) $ECHO_C" >&6
4709 else
4710   if test -n "$ac_ct_AR"; then
4711   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4712 else
4713   ac_save_IFS=$IFS; IFS=$ac_path_separator
4714 ac_dummy="$PATH"
4715 for ac_dir in $ac_dummy; do
4716   IFS=$ac_save_IFS
4717   test -z "$ac_dir" && ac_dir=.
4718   $as_executable_p "$ac_dir/$ac_word" || continue
4719 ac_cv_prog_ac_ct_AR="ar"
4720 echo "$as_me:4720: found $ac_dir/$ac_word" >&5
4721 break
4722 done
4723
4724   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4725 fi
4726 fi
4727 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4728 if test -n "$ac_ct_AR"; then
4729   echo "$as_me:4729: result: $ac_ct_AR" >&5
4730 echo "${ECHO_T}$ac_ct_AR" >&6
4731 else
4732   echo "$as_me:4732: result: no" >&5
4733 echo "${ECHO_T}no" >&6
4734 fi
4735
4736   AR=$ac_ct_AR
4737 else
4738   AR="$ac_cv_prog_AR"
4739 fi
4740
4741 echo "$as_me:4741: checking for options to update archives" >&5
4742 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4743 if test "${cf_cv_ar_flags+set}" = set; then
4744   echo $ECHO_N "(cached) $ECHO_C" >&6
4745 else
4746
4747         cf_cv_ar_flags=unknown
4748         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4749         do
4750
4751                 # check if $ARFLAGS already contains this choice
4752                 if test "x$ARFLAGS" != "x" ; then
4753                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4754                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4755                                 cf_cv_ar_flags=
4756                                 break
4757                         fi
4758                 fi
4759
4760                 rm -f conftest.$ac_cv_objext
4761                 rm -f conftest.a
4762
4763                 cat >conftest.$ac_ext <<EOF
4764 #line 4764 "configure"
4765 int     testdata[3] = { 123, 456, 789 };
4766 EOF
4767                 if { (eval echo "$as_me:4767: \"$ac_compile\"") >&5
4768   (eval $ac_compile) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } ; then
4772                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4773                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4774                         if test -f conftest.a ; then
4775                                 cf_cv_ar_flags=$cf_ar_flags
4776                                 break
4777                         fi
4778                 else
4779                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4780
4781 echo "${as_me:-configure}:4781: testing cannot compile test-program ..." 1>&5
4782
4783                         break
4784                 fi
4785         done
4786         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4787
4788 fi
4789 echo "$as_me:4789: result: $cf_cv_ar_flags" >&5
4790 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4791
4792 if test -n "$ARFLAGS" ; then
4793         if test -n "$cf_cv_ar_flags" ; then
4794                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4795         fi
4796 else
4797         ARFLAGS=$cf_cv_ar_flags
4798 fi
4799
4800 echo "$as_me:4800: checking if you have specified an install-prefix" >&5
4801 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4802
4803 # Check whether --with-install-prefix or --without-install-prefix was given.
4804 if test "${with_install_prefix+set}" = set; then
4805   withval="$with_install_prefix"
4806   case "x$withval" in
4807         (xyes|xno)
4808                 ;;
4809         (*)     DESTDIR="$withval"
4810                 ;;
4811         esac
4812 fi;
4813 echo "$as_me:4813: result: $DESTDIR" >&5
4814 echo "${ECHO_T}$DESTDIR" >&6
4815
4816 ###############################################################################
4817
4818 # If we're cross-compiling, allow the user to override the tools and their
4819 # options.  The configure script is oriented toward identifying the host
4820 # compiler, etc., but we need a build compiler to generate parts of the source.
4821
4822 if test "$cross_compiling" = yes ; then
4823
4824         # defaults that we might want to override
4825         : ${BUILD_CFLAGS:=''}
4826         : ${BUILD_CPPFLAGS:=''}
4827         : ${BUILD_LDFLAGS:=''}
4828         : ${BUILD_LIBS:=''}
4829         : ${BUILD_EXEEXT:='$x'}
4830         : ${BUILD_OBJEXT:='o'}
4831
4832 # Check whether --with-build-cc or --without-build-cc was given.
4833 if test "${with_build_cc+set}" = set; then
4834   withval="$with_build_cc"
4835   BUILD_CC="$withval"
4836 else
4837   for ac_prog in gcc clang c99 c89 cc cl
4838 do
4839   # Extract the first word of "$ac_prog", so it can be a program name with args.
4840 set dummy $ac_prog; ac_word=$2
4841 echo "$as_me:4841: checking for $ac_word" >&5
4842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4843 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4844   echo $ECHO_N "(cached) $ECHO_C" >&6
4845 else
4846   if test -n "$BUILD_CC"; then
4847   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4848 else
4849   ac_save_IFS=$IFS; IFS=$ac_path_separator
4850 ac_dummy="$PATH"
4851 for ac_dir in $ac_dummy; do
4852   IFS=$ac_save_IFS
4853   test -z "$ac_dir" && ac_dir=.
4854   $as_executable_p "$ac_dir/$ac_word" || continue
4855 ac_cv_prog_BUILD_CC="$ac_prog"
4856 echo "$as_me:4856: found $ac_dir/$ac_word" >&5
4857 break
4858 done
4859
4860 fi
4861 fi
4862 BUILD_CC=$ac_cv_prog_BUILD_CC
4863 if test -n "$BUILD_CC"; then
4864   echo "$as_me:4864: result: $BUILD_CC" >&5
4865 echo "${ECHO_T}$BUILD_CC" >&6
4866 else
4867   echo "$as_me:4867: result: no" >&5
4868 echo "${ECHO_T}no" >&6
4869 fi
4870
4871   test -n "$BUILD_CC" && break
4872 done
4873 test -n "$BUILD_CC" || BUILD_CC="none"
4874
4875 fi;
4876         echo "$as_me:4876: checking for native build C compiler" >&5
4877 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4878         echo "$as_me:4878: result: $BUILD_CC" >&5
4879 echo "${ECHO_T}$BUILD_CC" >&6
4880
4881         echo "$as_me:4881: checking for native build C preprocessor" >&5
4882 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4883
4884 # Check whether --with-build-cpp or --without-build-cpp was given.
4885 if test "${with_build_cpp+set}" = set; then
4886   withval="$with_build_cpp"
4887   BUILD_CPP="$withval"
4888 else
4889   BUILD_CPP='${BUILD_CC} -E'
4890 fi;
4891         echo "$as_me:4891: result: $BUILD_CPP" >&5
4892 echo "${ECHO_T}$BUILD_CPP" >&6
4893
4894         echo "$as_me:4894: checking for native build C flags" >&5
4895 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4896
4897 # Check whether --with-build-cflags or --without-build-cflags was given.
4898 if test "${with_build_cflags+set}" = set; then
4899   withval="$with_build_cflags"
4900   BUILD_CFLAGS="$withval"
4901 fi;
4902         echo "$as_me:4902: result: $BUILD_CFLAGS" >&5
4903 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4904
4905         echo "$as_me:4905: checking for native build C preprocessor-flags" >&5
4906 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4907
4908 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4909 if test "${with_build_cppflags+set}" = set; then
4910   withval="$with_build_cppflags"
4911   BUILD_CPPFLAGS="$withval"
4912 fi;
4913         echo "$as_me:4913: result: $BUILD_CPPFLAGS" >&5
4914 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4915
4916         echo "$as_me:4916: checking for native build linker-flags" >&5
4917 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4918
4919 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4920 if test "${with_build_ldflags+set}" = set; then
4921   withval="$with_build_ldflags"
4922   BUILD_LDFLAGS="$withval"
4923 fi;
4924         echo "$as_me:4924: result: $BUILD_LDFLAGS" >&5
4925 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4926
4927         echo "$as_me:4927: checking for native build linker-libraries" >&5
4928 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4929
4930 # Check whether --with-build-libs or --without-build-libs was given.
4931 if test "${with_build_libs+set}" = set; then
4932   withval="$with_build_libs"
4933   BUILD_LIBS="$withval"
4934 fi;
4935         echo "$as_me:4935: result: $BUILD_LIBS" >&5
4936 echo "${ECHO_T}$BUILD_LIBS" >&6
4937
4938         # this assumes we're on Unix.
4939         BUILD_EXEEXT=
4940         BUILD_OBJEXT=o
4941
4942         : ${BUILD_CC:='${CC}'}
4943
4944         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4945                 { { echo "$as_me:4945: error: Cross-build requires two compilers.
4946 Use --with-build-cc to specify the native compiler." >&5
4947 echo "$as_me: error: Cross-build requires two compilers.
4948 Use --with-build-cc to specify the native compiler." >&2;}
4949    { (exit 1); exit 1; }; }
4950         fi
4951
4952 else
4953         : ${BUILD_CC:='${CC}'}
4954         : ${BUILD_CPP:='${CPP}'}
4955         : ${BUILD_CFLAGS:='${CFLAGS}'}
4956         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4957         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4958         : ${BUILD_LIBS:='${LIBS}'}
4959         : ${BUILD_EXEEXT:='$x'}
4960         : ${BUILD_OBJEXT:='o'}
4961 fi
4962
4963 ###############################################################################
4964
4965 ### Options to allow the user to specify the set of libraries which are used.
4966 ### Use "--without-normal --with-shared" to allow the default model to be
4967 ### shared, for example.
4968 cf_list_models=""
4969
4970 echo "$as_me:4970: checking if libtool -version-number should be used" >&5
4971 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4972
4973 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4974 if test "${enable_libtool_version+set}" = set; then
4975   enableval="$enable_libtool_version"
4976   test "$enableval" != no && enableval=yes
4977         if test "$enableval" != "yes" ; then
4978     cf_libtool_version=no
4979         else
4980                 cf_libtool_version=yes
4981         fi
4982 else
4983   enableval=yes
4984         cf_libtool_version=yes
4985
4986 fi;
4987 echo "$as_me:4987: result: $cf_libtool_version" >&5
4988 echo "${ECHO_T}$cf_libtool_version" >&6
4989
4990 if test "$cf_libtool_version" = yes ; then
4991         LIBTOOL_VERSION="-version-number"
4992 else
4993         LIBTOOL_VERSION="-version-info"
4994         case "x$VERSION" in
4995         (x)
4996                 { echo "$as_me:4996: WARNING: VERSION was not set" >&5
4997 echo "$as_me: WARNING: VERSION was not set" >&2;}
4998                 ;;
4999         (x*.*.*)
5000                 ABI_VERSION="$VERSION"
5001                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5002
5003 echo "${as_me:-configure}:5003: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5004
5005                 ;;
5006         (x*:*:*)
5007                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5008                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5009
5010 echo "${as_me:-configure}:5010: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5011
5012                 ;;
5013         (*)
5014                 { echo "$as_me:5014: WARNING: unexpected VERSION value: $VERSION" >&5
5015 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5016                 ;;
5017         esac
5018 fi
5019
5020 LIBTOOL=
5021
5022 # common library maintenance symbols that are convenient for libtool scripts:
5023 LIB_CREATE='${AR} -cr'
5024 LIB_OBJECT='${OBJECTS}'
5025 LIB_SUFFIX=.a
5026 LIB_PREP="$RANLIB"
5027
5028 # symbols used to prop libtool up to enable it to determine what it should be
5029 # doing:
5030 LIB_CLEAN=
5031 LIB_COMPILE=
5032 LIB_LINK='${CC}'
5033 LIB_INSTALL=
5034 LIB_UNINSTALL=
5035
5036 echo "$as_me:5036: checking if you want to build libraries with libtool" >&5
5037 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5038
5039 # Check whether --with-libtool or --without-libtool was given.
5040 if test "${with_libtool+set}" = set; then
5041   withval="$with_libtool"
5042   with_libtool=$withval
5043 else
5044   with_libtool=no
5045 fi;
5046 echo "$as_me:5046: result: $with_libtool" >&5
5047 echo "${ECHO_T}$with_libtool" >&6
5048 if test "$with_libtool" != "no"; then
5049
5050         if test "$with_libtool" != "yes" ; then
5051
5052 if test "x$prefix" != xNONE; then
5053         cf_path_syntax="$prefix"
5054 else
5055         cf_path_syntax="$ac_default_prefix"
5056 fi
5057
5058 case ".$with_libtool" in
5059 (.\$\(*\)*|.\'*\'*)
5060         ;;
5061 (..|./*|.\\*)
5062         ;;
5063 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5064         ;;
5065 (.\${*prefix}*|.\${*dir}*)
5066         eval with_libtool="$with_libtool"
5067         case ".$with_libtool" in
5068         (.NONE/*)
5069                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5070                 ;;
5071         esac
5072         ;;
5073 (.no|.NONE/*)
5074         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5075         ;;
5076 (*)
5077         { { echo "$as_me:5077: error: expected a pathname, not \"$with_libtool\"" >&5
5078 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5079    { (exit 1); exit 1; }; }
5080         ;;
5081 esac
5082
5083                 LIBTOOL=$with_libtool
5084         else
5085                 if test -n "$ac_tool_prefix"; then
5086   for ac_prog in libtool glibtool
5087   do
5088     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5089 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5090 echo "$as_me:5090: checking for $ac_word" >&5
5091 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5092 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5093   echo $ECHO_N "(cached) $ECHO_C" >&6
5094 else
5095   if test -n "$LIBTOOL"; then
5096   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5097 else
5098   ac_save_IFS=$IFS; IFS=$ac_path_separator
5099 ac_dummy="$PATH"
5100 for ac_dir in $ac_dummy; do
5101   IFS=$ac_save_IFS
5102   test -z "$ac_dir" && ac_dir=.
5103   $as_executable_p "$ac_dir/$ac_word" || continue
5104 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5105 echo "$as_me:5105: found $ac_dir/$ac_word" >&5
5106 break
5107 done
5108
5109 fi
5110 fi
5111 LIBTOOL=$ac_cv_prog_LIBTOOL
5112 if test -n "$LIBTOOL"; then
5113   echo "$as_me:5113: result: $LIBTOOL" >&5
5114 echo "${ECHO_T}$LIBTOOL" >&6
5115 else
5116   echo "$as_me:5116: result: no" >&5
5117 echo "${ECHO_T}no" >&6
5118 fi
5119
5120     test -n "$LIBTOOL" && break
5121   done
5122 fi
5123 if test -z "$LIBTOOL"; then
5124   ac_ct_LIBTOOL=$LIBTOOL
5125   for ac_prog in libtool glibtool
5126 do
5127   # Extract the first word of "$ac_prog", so it can be a program name with args.
5128 set dummy $ac_prog; ac_word=$2
5129 echo "$as_me:5129: checking for $ac_word" >&5
5130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5131 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5132   echo $ECHO_N "(cached) $ECHO_C" >&6
5133 else
5134   if test -n "$ac_ct_LIBTOOL"; then
5135   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5136 else
5137   ac_save_IFS=$IFS; IFS=$ac_path_separator
5138 ac_dummy="$PATH"
5139 for ac_dir in $ac_dummy; do
5140   IFS=$ac_save_IFS
5141   test -z "$ac_dir" && ac_dir=.
5142   $as_executable_p "$ac_dir/$ac_word" || continue
5143 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5144 echo "$as_me:5144: found $ac_dir/$ac_word" >&5
5145 break
5146 done
5147
5148 fi
5149 fi
5150 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5151 if test -n "$ac_ct_LIBTOOL"; then
5152   echo "$as_me:5152: result: $ac_ct_LIBTOOL" >&5
5153 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5154 else
5155   echo "$as_me:5155: result: no" >&5
5156 echo "${ECHO_T}no" >&6
5157 fi
5158
5159   test -n "$ac_ct_LIBTOOL" && break
5160 done
5161 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5162
5163   LIBTOOL=$ac_ct_LIBTOOL
5164 fi
5165
5166 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5167 then
5168         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.].*//'`
5169 else
5170         cf_cv_libtool_version=
5171 fi
5172 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5173
5174                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5175                 then
5176
5177 unset ac_cv_prog_ac_ct_LIBTOOL
5178 unset ac_ct_LIBTOOL
5179 unset LIBTOOL
5180
5181                         if test -n "$ac_tool_prefix"; then
5182   for ac_prog in glibtool
5183   do
5184     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5185 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5186 echo "$as_me:5186: checking for $ac_word" >&5
5187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5188 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5189   echo $ECHO_N "(cached) $ECHO_C" >&6
5190 else
5191   if test -n "$LIBTOOL"; then
5192   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5193 else
5194   ac_save_IFS=$IFS; IFS=$ac_path_separator
5195 ac_dummy="$PATH"
5196 for ac_dir in $ac_dummy; do
5197   IFS=$ac_save_IFS
5198   test -z "$ac_dir" && ac_dir=.
5199   $as_executable_p "$ac_dir/$ac_word" || continue
5200 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5201 echo "$as_me:5201: found $ac_dir/$ac_word" >&5
5202 break
5203 done
5204
5205 fi
5206 fi
5207 LIBTOOL=$ac_cv_prog_LIBTOOL
5208 if test -n "$LIBTOOL"; then
5209   echo "$as_me:5209: result: $LIBTOOL" >&5
5210 echo "${ECHO_T}$LIBTOOL" >&6
5211 else
5212   echo "$as_me:5212: result: no" >&5
5213 echo "${ECHO_T}no" >&6
5214 fi
5215
5216     test -n "$LIBTOOL" && break
5217   done
5218 fi
5219 if test -z "$LIBTOOL"; then
5220   ac_ct_LIBTOOL=$LIBTOOL
5221   for ac_prog in glibtool
5222 do
5223   # Extract the first word of "$ac_prog", so it can be a program name with args.
5224 set dummy $ac_prog; ac_word=$2
5225 echo "$as_me:5225: checking for $ac_word" >&5
5226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5227 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5228   echo $ECHO_N "(cached) $ECHO_C" >&6
5229 else
5230   if test -n "$ac_ct_LIBTOOL"; then
5231   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5232 else
5233   ac_save_IFS=$IFS; IFS=$ac_path_separator
5234 ac_dummy="$PATH"
5235 for ac_dir in $ac_dummy; do
5236   IFS=$ac_save_IFS
5237   test -z "$ac_dir" && ac_dir=.
5238   $as_executable_p "$ac_dir/$ac_word" || continue
5239 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5240 echo "$as_me:5240: found $ac_dir/$ac_word" >&5
5241 break
5242 done
5243
5244 fi
5245 fi
5246 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5247 if test -n "$ac_ct_LIBTOOL"; then
5248   echo "$as_me:5248: result: $ac_ct_LIBTOOL" >&5
5249 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5250 else
5251   echo "$as_me:5251: result: no" >&5
5252 echo "${ECHO_T}no" >&6
5253 fi
5254
5255   test -n "$ac_ct_LIBTOOL" && break
5256 done
5257 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5258
5259   LIBTOOL=$ac_ct_LIBTOOL
5260 fi
5261
5262 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5263 then
5264         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.].*//'`
5265 else
5266         cf_cv_libtool_version=
5267 fi
5268 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5269
5270                 fi
5271         fi
5272         if test -z "$LIBTOOL" ; then
5273                 { { echo "$as_me:5273: error: Cannot find libtool" >&5
5274 echo "$as_me: error: Cannot find libtool" >&2;}
5275    { (exit 1); exit 1; }; }
5276         fi
5277         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5278         LIB_OBJECT='${OBJECTS:.o=.lo}'
5279         LIB_SUFFIX=.la
5280         LIB_CLEAN='${LIBTOOL} --mode=clean'
5281         LIB_COMPILE='${LIBTOOL} --mode=compile'
5282         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5283         LIB_INSTALL='${LIBTOOL} --mode=install'
5284         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5285         LIB_PREP=:
5286
5287 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5288 then
5289         echo "$as_me:5289: checking version of $LIBTOOL" >&5
5290 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5291
5292 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5293 then
5294         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.].*//'`
5295 else
5296         cf_cv_libtool_version=
5297 fi
5298 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5299
5300         echo "$as_me:5300: result: $cf_cv_libtool_version" >&5
5301 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5302         if test -z "$cf_cv_libtool_version" ; then
5303                 { { echo "$as_me:5303: error: This is not GNU libtool" >&5
5304 echo "$as_me: error: This is not GNU libtool" >&2;}
5305    { (exit 1); exit 1; }; }
5306         fi
5307 else
5308         { { echo "$as_me:5308: error: GNU libtool has not been found" >&5
5309 echo "$as_me: error: GNU libtool has not been found" >&2;}
5310    { (exit 1); exit 1; }; }
5311 fi
5312
5313         # special hack to add -no-undefined (which libtool should do for itself)
5314         LT_UNDEF=
5315         case "$cf_cv_system_name" in
5316         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5317                 LT_UNDEF=-no-undefined
5318                 ;;
5319         esac
5320
5321         # special hack to add --tag option for C++ compiler
5322         case $cf_cv_libtool_version in
5323         (1.[5-9]*|[2-9].[0-9.a-z]*)
5324                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5325                 LIBTOOL="$LIBTOOL --tag=CC"
5326                 ;;
5327         (*)
5328                 LIBTOOL_CXX="$LIBTOOL"
5329                 ;;
5330         esac
5331 else
5332         LIBTOOL=""
5333         LIBTOOL_CXX=""
5334 fi
5335
5336 test -z "$LIBTOOL" && ECHO_LT=
5337
5338 if test "$with_libtool" != "no" ; then
5339
5340 cf_list_models="$cf_list_models libtool"
5341
5342 else
5343
5344 echo "$as_me:5344: checking if you want to build shared libraries" >&5
5345 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5346
5347 # Check whether --with-shared or --without-shared was given.
5348 if test "${with_shared+set}" = set; then
5349   withval="$with_shared"
5350   with_shared=$withval
5351 else
5352   with_shared=no
5353 fi;
5354 echo "$as_me:5354: result: $with_shared" >&5
5355 echo "${ECHO_T}$with_shared" >&6
5356 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5357
5358 echo "$as_me:5358: checking if you want to build static libraries" >&5
5359 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5360
5361 # Check whether --with-normal or --without-normal was given.
5362 if test "${with_normal+set}" = set; then
5363   withval="$with_normal"
5364   with_normal=$withval
5365 else
5366   with_normal=yes
5367 fi;
5368 echo "$as_me:5368: result: $with_normal" >&5
5369 echo "${ECHO_T}$with_normal" >&6
5370 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5371
5372 echo "$as_me:5372: checking if you want to build debug libraries" >&5
5373 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5374
5375 # Check whether --with-debug or --without-debug was given.
5376 if test "${with_debug+set}" = set; then
5377   withval="$with_debug"
5378   with_debug=$withval
5379 else
5380   with_debug=yes
5381 fi;
5382 echo "$as_me:5382: result: $with_debug" >&5
5383 echo "${ECHO_T}$with_debug" >&6
5384 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5385
5386 echo "$as_me:5386: checking if you want to build profiling libraries" >&5
5387 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5388
5389 # Check whether --with-profile or --without-profile was given.
5390 if test "${with_profile+set}" = set; then
5391   withval="$with_profile"
5392   with_profile=$withval
5393 else
5394   with_profile=no
5395 fi;
5396 echo "$as_me:5396: result: $with_profile" >&5
5397 echo "${ECHO_T}$with_profile" >&6
5398 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5399
5400 fi
5401
5402 if test "X$cf_with_cxx_binding" != Xno; then
5403 if test "x$with_shared" = "xyes"; then
5404 echo "$as_me:5404: checking if you want to build C++ shared libraries" >&5
5405 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5406
5407 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5408 if test "${with_cxx_shared+set}" = set; then
5409   withval="$with_cxx_shared"
5410   with_shared_cxx=$withval
5411 else
5412   with_shared_cxx=no
5413 fi;
5414 echo "$as_me:5414: result: $with_shared_cxx" >&5
5415 echo "${ECHO_T}$with_shared_cxx" >&6
5416 fi
5417 fi
5418
5419 ###############################################################################
5420
5421 echo "$as_me:5421: checking for specified models" >&5
5422 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5423 test -z "$cf_list_models" && cf_list_models=normal
5424 test "$with_libtool" != "no" && cf_list_models=libtool
5425 echo "$as_me:5425: result: $cf_list_models" >&5
5426 echo "${ECHO_T}$cf_list_models" >&6
5427
5428 ### Use the first model as the default, and save its suffix for use in building
5429 ### up test-applications.
5430 echo "$as_me:5430: checking for default model" >&5
5431 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5432 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5433 echo "$as_me:5433: result: $DFT_LWR_MODEL" >&5
5434 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5435
5436 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5437
5438 TICS_NAME=tic
5439
5440 TINFO_NAME=tinfo
5441
5442 LIB_NAME=ncurses
5443
5444 LIB_DIR=../lib
5445 LIB_2ND=../../lib
5446
5447 echo "$as_me:5447: checking if you want to have a library-prefix" >&5
5448 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5449
5450 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5451 if test "${with_lib_prefix+set}" = set; then
5452   withval="$with_lib_prefix"
5453   with_lib_prefix=$withval
5454 else
5455   with_lib_prefix=auto
5456 fi;
5457 echo "$as_me:5457: result: $with_lib_prefix" >&5
5458 echo "${ECHO_T}$with_lib_prefix" >&6
5459
5460 if test $with_lib_prefix = auto
5461 then
5462
5463         case $cf_cv_system_name in
5464         (OS/2*|os2*)
5465                 if test "$DFT_LWR_MODEL" = libtool; then
5466                         LIB_PREFIX='lib'
5467                 else
5468                         LIB_PREFIX=''
5469                 fi
5470                 ;;
5471         (*)     LIB_PREFIX='lib'
5472                 ;;
5473         esac
5474 cf_prefix=$LIB_PREFIX
5475
5476 elif test $with_lib_prefix = no
5477 then
5478         LIB_PREFIX=
5479 else
5480         LIB_PREFIX=$with_lib_prefix
5481 fi
5482
5483 LIB_SUFFIX=
5484
5485         echo "$as_me:5485: checking for PATH separator" >&5
5486 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5487         case $cf_cv_system_name in
5488         (os2*)  PATH_SEPARATOR=';'  ;;
5489         (*)     ${PATH_SEPARATOR:=':'}  ;;
5490         esac
5491
5492         echo "$as_me:5492: result: $PATH_SEPARATOR" >&5
5493 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5494
5495 ###############################################################################
5496
5497 echo "$as_me:5497: checking if you want to build a separate terminfo library" >&5
5498 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5499
5500 # Check whether --with-termlib or --without-termlib was given.
5501 if test "${with_termlib+set}" = set; then
5502   withval="$with_termlib"
5503   with_termlib=$withval
5504 else
5505   with_termlib=no
5506 fi;
5507 echo "$as_me:5507: result: $with_termlib" >&5
5508 echo "${ECHO_T}$with_termlib" >&6
5509
5510 echo "$as_me:5510: checking if you want to build a separate tic library" >&5
5511 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5512
5513 # Check whether --with-ticlib or --without-ticlib was given.
5514 if test "${with_ticlib+set}" = set; then
5515   withval="$with_ticlib"
5516   with_ticlib=$withval
5517 else
5518   with_ticlib=no
5519 fi;
5520 echo "$as_me:5520: result: $with_ticlib" >&5
5521 echo "${ECHO_T}$with_ticlib" >&6
5522
5523 if test X"$CC_G_OPT" = X"" ; then
5524         CC_G_OPT='-g'
5525         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5526 fi
5527
5528 if test X"$CXX_G_OPT" = X"" ; then
5529         CXX_G_OPT='-g'
5530         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5531 fi
5532
5533 echo "$as_me:5533: checking for default loader flags" >&5
5534 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5535 case $DFT_LWR_MODEL in
5536 (libtool) LD_MODEL=''   ;;
5537 (normal)  LD_MODEL=''   ;;
5538 (debug)   LD_MODEL=$CC_G_OPT ;;
5539 (profile) LD_MODEL='-pg';;
5540 (shared)  LD_MODEL=''   ;;
5541 esac
5542 echo "$as_me:5542: result: $LD_MODEL" >&5
5543 echo "${ECHO_T}$LD_MODEL" >&6
5544
5545 case $DFT_LWR_MODEL in
5546 (shared)
5547
5548 echo "$as_me:5548: checking if rpath option should be used" >&5
5549 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5550
5551 # Check whether --enable-rpath or --disable-rpath was given.
5552 if test "${enable_rpath+set}" = set; then
5553   enableval="$enable_rpath"
5554   cf_cv_enable_rpath=$enableval
5555 else
5556   cf_cv_enable_rpath=no
5557 fi;
5558 echo "$as_me:5558: result: $cf_cv_enable_rpath" >&5
5559 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5560
5561 echo "$as_me:5561: checking if shared libraries should be relinked during install" >&5
5562 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5563
5564 # Check whether --enable-relink or --disable-relink was given.
5565 if test "${enable_relink+set}" = set; then
5566   enableval="$enable_relink"
5567   cf_cv_do_relink=$enableval
5568 else
5569   cf_cv_do_relink=yes
5570 fi;
5571 echo "$as_me:5571: result: $cf_cv_do_relink" >&5
5572 echo "${ECHO_T}$cf_cv_do_relink" >&6
5573         ;;
5574 esac
5575
5576 # we will build libraries one-level down.
5577 rel_builddir=..
5578
5579 LD_RPATH_OPT=
5580 if test "x$cf_cv_enable_rpath" != xno
5581 then
5582         echo "$as_me:5582: checking for an rpath option" >&5
5583 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5584         case $cf_cv_system_name in
5585         (irix*)
5586                 if test "$GCC" = yes; then
5587                         LD_RPATH_OPT="-Wl,-rpath,"
5588                 else
5589                         LD_RPATH_OPT="-rpath "
5590                 fi
5591                 ;;
5592         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5593                 LD_RPATH_OPT="-Wl,-rpath,"
5594                 ;;
5595         (openbsd[2-9].*|mirbsd*)
5596                 LD_RPATH_OPT="-Wl,-rpath,"
5597                 ;;
5598         (dragonfly*)
5599                 LD_RPATH_OPT="-rpath "
5600                 ;;
5601         (netbsd*)
5602                 LD_RPATH_OPT="-Wl,-rpath,"
5603                 ;;
5604         (osf*|mls+*)
5605                 LD_RPATH_OPT="-rpath "
5606                 ;;
5607         (solaris2*)
5608                 LD_RPATH_OPT="-R"
5609                 ;;
5610         (*)
5611                 ;;
5612         esac
5613         echo "$as_me:5613: result: $LD_RPATH_OPT" >&5
5614 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5615
5616         case "x$LD_RPATH_OPT" in
5617         (x-R*)
5618                 echo "$as_me:5618: checking if we need a space after rpath option" >&5
5619 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5620                 cf_save_LIBS="$LIBS"
5621
5622 cf_add_libs="${LD_RPATH_OPT}$libdir"
5623 # Filter out duplicates - this happens with badly-designed ".pc" files...
5624 for cf_add_1lib in $LIBS
5625 do
5626         for cf_add_2lib in $cf_add_libs
5627         do
5628                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5629                 then
5630                         cf_add_1lib=
5631                         break
5632                 fi
5633         done
5634         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5635 done
5636 LIBS="$cf_add_libs"
5637
5638                 cat >conftest.$ac_ext <<_ACEOF
5639 #line 5639 "configure"
5640 #include "confdefs.h"
5641
5642 int
5643 main (void)
5644 {
5645
5646   ;
5647   return 0;
5648 }
5649 _ACEOF
5650 rm -f conftest.$ac_objext conftest$ac_exeext
5651 if { (eval echo "$as_me:5651: \"$ac_link\"") >&5
5652   (eval $ac_link) 2>&5
5653   ac_status=$?
5654   echo "$as_me:5654: \$? = $ac_status" >&5
5655   (exit $ac_status); } &&
5656          { ac_try='test -s conftest$ac_exeext'
5657   { (eval echo "$as_me:5657: \"$ac_try\"") >&5
5658   (eval $ac_try) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); }; }; then
5662   cf_rpath_space=no
5663 else
5664   echo "$as_me: failed program was:" >&5
5665 cat conftest.$ac_ext >&5
5666 cf_rpath_space=yes
5667 fi
5668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5669                 LIBS="$cf_save_LIBS"
5670                 echo "$as_me:5670: result: $cf_rpath_space" >&5
5671 echo "${ECHO_T}$cf_rpath_space" >&6
5672                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5673                 ;;
5674         esac
5675 fi
5676
5677         RM_SHARED_OPTS=
5678         LOCAL_LDFLAGS=
5679         LOCAL_LDFLAGS2=
5680         LD_SHARED_OPTS=
5681         INSTALL_LIB="-m 644"
5682         : ${rel_builddir:=.}
5683
5684         shlibdir=$libdir
5685
5686         MAKE_DLLS="#"
5687
5688         cf_cv_do_symlinks=no
5689         cf_ld_rpath_opt=
5690         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5691
5692         echo "$as_me:5692: checking if release/abi version should be used for shared libs" >&5
5693 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5694
5695 # Check whether --with-shlib-version or --without-shlib-version was given.
5696 if test "${with_shlib_version+set}" = set; then
5697   withval="$with_shlib_version"
5698   test -z "$withval" && withval=auto
5699         case $withval in
5700         (yes)
5701                 cf_cv_shlib_version=auto
5702                 ;;
5703         (rel|abi|auto)
5704                 cf_cv_shlib_version=$withval
5705                 ;;
5706         (*)
5707                 echo "$as_me:5707: result: $withval" >&5
5708 echo "${ECHO_T}$withval" >&6
5709                 { { echo "$as_me:5709: error: option value must be one of: rel, abi, or auto" >&5
5710 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5711    { (exit 1); exit 1; }; }
5712                 ;;
5713         esac
5714
5715 else
5716   cf_cv_shlib_version=auto
5717 fi;
5718         echo "$as_me:5718: result: $cf_cv_shlib_version" >&5
5719 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5720
5721         cf_cv_rm_so_locs=no
5722         cf_try_cflags=
5723
5724         # Some less-capable ports of gcc support only -fpic
5725         CC_SHARED_OPTS=
5726
5727         cf_try_fPIC=no
5728         if test "$GCC" = yes
5729         then
5730                 cf_try_fPIC=yes
5731         else
5732                 case $cf_cv_system_name in
5733                 (*linux*)       # e.g., PGI compiler
5734                         cf_try_fPIC=yes
5735                         ;;
5736                 esac
5737         fi
5738
5739         if test "$cf_try_fPIC" = yes
5740         then
5741                 echo "$as_me:5741: checking which $CC option to use" >&5
5742 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5743                 cf_save_CFLAGS="$CFLAGS"
5744                 for CC_SHARED_OPTS in -fPIC -fpic ''
5745                 do
5746                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5747                         cat >conftest.$ac_ext <<_ACEOF
5748 #line 5748 "configure"
5749 #include "confdefs.h"
5750 #include <stdio.h>
5751 int
5752 main (void)
5753 {
5754 int x = 1
5755   ;
5756   return 0;
5757 }
5758 _ACEOF
5759 rm -f conftest.$ac_objext
5760 if { (eval echo "$as_me:5760: \"$ac_compile\"") >&5
5761   (eval $ac_compile) 2>&5
5762   ac_status=$?
5763   echo "$as_me:5763: \$? = $ac_status" >&5
5764   (exit $ac_status); } &&
5765          { ac_try='test -s conftest.$ac_objext'
5766   { (eval echo "$as_me:5766: \"$ac_try\"") >&5
5767   (eval $ac_try) 2>&5
5768   ac_status=$?
5769   echo "$as_me:5769: \$? = $ac_status" >&5
5770   (exit $ac_status); }; }; then
5771   break
5772 else
5773   echo "$as_me: failed program was:" >&5
5774 cat conftest.$ac_ext >&5
5775 fi
5776 rm -f conftest.$ac_objext conftest.$ac_ext
5777                 done
5778                 echo "$as_me:5778: result: $CC_SHARED_OPTS" >&5
5779 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5780                 CFLAGS="$cf_save_CFLAGS"
5781         fi
5782
5783         cf_cv_shlib_version_infix=no
5784
5785         case $cf_cv_system_name in
5786         (aix4.3-9*|aix[5-7]*)
5787                 if test "$GCC" = yes; then
5788                         CC_SHARED_OPTS='-Wl,-brtl'
5789                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5790                 else
5791                         CC_SHARED_OPTS='-brtl'
5792                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5793                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5794                 fi
5795                 ;;
5796         (beos*)
5797                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5798                 ;;
5799         (cygwin*)
5800                 CC_SHARED_OPTS=
5801                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5802                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5803                 cf_cv_shlib_version=cygdll
5804                 cf_cv_shlib_version_infix=cygdll
5805                 shlibdir=$bindir
5806                 MAKE_DLLS=
5807                 cat >mk_shared_lib.sh <<-CF_EOF
5808                 #!$SHELL
5809                 SHARED_LIB=\$1
5810                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5811                 shift
5812                 cat <<-EOF
5813                 Linking shared library
5814                 ** SHARED_LIB \$SHARED_LIB
5815                 ** IMPORT_LIB \$IMPORT_LIB
5816 EOF
5817                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5818 CF_EOF
5819                 chmod +x mk_shared_lib.sh
5820                 ;;
5821         (msys*)
5822                 CC_SHARED_OPTS=
5823                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5824                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5825                 cf_cv_shlib_version=msysdll
5826                 cf_cv_shlib_version_infix=msysdll
5827                 shlibdir=$bindir
5828                 MAKE_DLLS=
5829                 cat >mk_shared_lib.sh <<-CF_EOF
5830                 #!$SHELL
5831                 SHARED_LIB=\$1
5832                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5833                 shift
5834                 cat <<-EOF
5835                 Linking shared library
5836                 ** SHARED_LIB \$SHARED_LIB
5837                 ** IMPORT_LIB \$IMPORT_LIB
5838 EOF
5839                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5840 CF_EOF
5841                 chmod +x mk_shared_lib.sh
5842                 ;;
5843         (darwin*)
5844                 cf_try_cflags="no-cpp-precomp"
5845                 CC_SHARED_OPTS="-dynamic"
5846                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5847                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5848                 cf_cv_shlib_version_infix=yes
5849                 echo "$as_me:5849: checking if ld -search_paths_first works" >&5
5850 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5851 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854
5855                         cf_save_LDFLAGS=$LDFLAGS
5856                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5857                         cat >conftest.$ac_ext <<_ACEOF
5858 #line 5858 "configure"
5859 #include "confdefs.h"
5860
5861 int
5862 main (void)
5863 {
5864 int i;
5865   ;
5866   return 0;
5867 }
5868 _ACEOF
5869 rm -f conftest.$ac_objext conftest$ac_exeext
5870 if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
5871   (eval $ac_link) 2>&5
5872   ac_status=$?
5873   echo "$as_me:5873: \$? = $ac_status" >&5
5874   (exit $ac_status); } &&
5875          { ac_try='test -s conftest$ac_exeext'
5876   { (eval echo "$as_me:5876: \"$ac_try\"") >&5
5877   (eval $ac_try) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); }; }; then
5881   cf_cv_ldflags_search_paths_first=yes
5882 else
5883   echo "$as_me: failed program was:" >&5
5884 cat conftest.$ac_ext >&5
5885 cf_cv_ldflags_search_paths_first=no
5886 fi
5887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5888                                 LDFLAGS=$cf_save_LDFLAGS
5889 fi
5890 echo "$as_me:5890: result: $cf_cv_ldflags_search_paths_first" >&5
5891 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5892                 if test $cf_cv_ldflags_search_paths_first = yes; then
5893                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5894                 fi
5895                 ;;
5896         (hpux[7-8]*)
5897                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5898                 if test "$GCC" != yes; then
5899                         CC_SHARED_OPTS='+Z'
5900                 fi
5901                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5902                 INSTALL_LIB="-m 555"
5903                 ;;
5904         (hpux*)
5905                 # (tested with gcc 2.7.2 -- I don't have c89)
5906                 if test "$GCC" = yes; then
5907                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5908                 else
5909                         CC_SHARED_OPTS='+Z'
5910                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5911                 fi
5912                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5913                 # HP-UX shared libraries must be executable, and should be
5914                 # readonly to exploit a quirk in the memory manager.
5915                 INSTALL_LIB="-m 555"
5916                 ;;
5917         (interix*)
5918                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5919                 if test "$cf_cv_shlib_version" = rel; then
5920                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5921                 else
5922                         cf_shared_soname='`basename $@`'
5923                 fi
5924                 CC_SHARED_OPTS=
5925                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5926                 ;;
5927         (irix*)
5928                 if test "$cf_cv_enable_rpath" = yes ; then
5929                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5930                 fi
5931                 # tested with IRIX 5.2 and 'cc'.
5932                 if test "$GCC" != yes; then
5933                         CC_SHARED_OPTS='-KPIC'
5934                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5935                 else
5936                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5937                 fi
5938                 cf_cv_rm_so_locs=yes
5939                 ;;
5940         (linux*|gnu*|k*bsd*-gnu)
5941                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5942                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5943                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5944                 fi
5945                 if test "$cf_cv_enable_rpath" = yes ; then
5946                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5947                 fi
5948
5949         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5950         if test "$cf_cv_shlib_version" = rel; then
5951                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5952         else
5953                 cf_cv_shared_soname='`basename $@`'
5954         fi
5955
5956                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5957                 ;;
5958         (mingw*)
5959                 cf_cv_shlib_version=mingw
5960                 cf_cv_shlib_version_infix=mingw
5961                 shlibdir=$bindir
5962                 MAKE_DLLS=
5963                 if test "$DFT_LWR_MODEL" = "shared" ; then
5964                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5965                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5966                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5967                 fi
5968                 CC_SHARED_OPTS=
5969                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5970                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5971                 cat >mk_shared_lib.sh <<-CF_EOF
5972                 #!$SHELL
5973                 SHARED_LIB=\$1
5974                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5975                 shift
5976                 cat <<-EOF
5977                 Linking shared library
5978                 ** SHARED_LIB \$SHARED_LIB
5979                 ** IMPORT_LIB \$IMPORT_LIB
5980 EOF
5981                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5982 CF_EOF
5983                 chmod +x mk_shared_lib.sh
5984                 ;;
5985         (openbsd[2-9].*|mirbsd*)
5986                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5987                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5988                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5989                 fi
5990                 if test "$cf_cv_enable_rpath" = yes ; then
5991                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5992                 fi
5993                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5994
5995         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5996         if test "$cf_cv_shlib_version" = rel; then
5997                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5998         else
5999                 cf_cv_shared_soname='`basename $@`'
6000         fi
6001
6002                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6003                 ;;
6004         (nto-qnx*|openbsd*|freebsd[12].*)
6005                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6006                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6007                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6008                 ;;
6009         (dragonfly*|freebsd*)
6010                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6011                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6012                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6013                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6014                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6015                 fi
6016
6017         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6018         if test "$cf_cv_shlib_version" = rel; then
6019                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6020         else
6021                 cf_cv_shared_soname='`basename $@`'
6022         fi
6023
6024                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6025                 ;;
6026         (netbsd*)
6027                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6028                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6029                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6030                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6031                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6032                         if test "$cf_cv_shlib_version" = auto; then
6033                         if test -f /usr/libexec/ld.elf_so; then
6034                                 cf_cv_shlib_version=abi
6035                         else
6036                                 cf_cv_shlib_version=rel
6037                         fi
6038                         fi
6039
6040         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6041         if test "$cf_cv_shlib_version" = rel; then
6042                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6043         else
6044                 cf_cv_shared_soname='`basename $@`'
6045         fi
6046
6047                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6048                 else
6049                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6050                 fi
6051                 ;;
6052         (osf*|mls+*)
6053                 # tested with OSF/1 V3.2 and 'cc'
6054                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6055                 # link with shared libs).
6056                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6057                 case $host_os in
6058                 (osf4*)
6059                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6060                         ;;
6061                 esac
6062                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6063                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6064                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6065                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6066                 fi
6067                 cf_cv_rm_so_locs=yes
6068                 ;;
6069         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6070                 # tested with osr5.0.5
6071                 if test "$GCC" != yes; then
6072                         CC_SHARED_OPTS='-belf -KPIC'
6073                 fi
6074                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6075                 if test "$cf_cv_enable_rpath" = yes ; then
6076                         # only way is to set LD_RUN_PATH but no switch for it
6077                         RUN_PATH=$libdir
6078                 fi
6079                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6080                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6081                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6082                 ;;
6083         (sunos4*)
6084                 # tested with SunOS 4.1.1 and gcc 2.7.0
6085                 if test "$GCC" != yes; then
6086                         CC_SHARED_OPTS='-KPIC'
6087                 fi
6088                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6089                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6090                 ;;
6091         (solaris2*)
6092                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6093                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6094                 if test "$DFT_LWR_MODEL" = "shared" ; then
6095                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6096                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6097                 fi
6098                 if test "$cf_cv_enable_rpath" = yes ; then
6099                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6100                 fi
6101
6102         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6103         if test "$cf_cv_shlib_version" = rel; then
6104                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6105         else
6106                 cf_cv_shared_soname='`basename $@`'
6107         fi
6108
6109                 if test "$GCC" != yes; then
6110                         cf_save_CFLAGS="$CFLAGS"
6111                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6112                         do
6113                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6114                                 cat >conftest.$ac_ext <<_ACEOF
6115 #line 6115 "configure"
6116 #include "confdefs.h"
6117 #include <stdio.h>
6118 int
6119 main (void)
6120 {
6121 printf("Hello\n");
6122   ;
6123   return 0;
6124 }
6125 _ACEOF
6126 rm -f conftest.$ac_objext
6127 if { (eval echo "$as_me:6127: \"$ac_compile\"") >&5
6128   (eval $ac_compile) 2>&5
6129   ac_status=$?
6130   echo "$as_me:6130: \$? = $ac_status" >&5
6131   (exit $ac_status); } &&
6132          { ac_try='test -s conftest.$ac_objext'
6133   { (eval echo "$as_me:6133: \"$ac_try\"") >&5
6134   (eval $ac_try) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); }; }; then
6138   break
6139 else
6140   echo "$as_me: failed program was:" >&5
6141 cat conftest.$ac_ext >&5
6142 fi
6143 rm -f conftest.$ac_objext conftest.$ac_ext
6144                         done
6145                         CFLAGS="$cf_save_CFLAGS"
6146                         CC_SHARED_OPTS=$cf_shared_opts
6147                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6148                 else
6149                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6150                 fi
6151                 ;;
6152         (sysv5uw7*|unix_sv*)
6153                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6154                 if test "$GCC" != yes; then
6155                         CC_SHARED_OPTS='-KPIC'
6156                 fi
6157                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6158                 ;;
6159         (*)
6160                 CC_SHARED_OPTS='unknown'
6161                 MK_SHARED_LIB='echo unknown'
6162                 ;;
6163         esac
6164
6165         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6166         case "$cf_cv_shlib_version" in
6167         (rel|abi)
6168                 case "$MK_SHARED_LIB" in
6169                 (*'-o $@')
6170                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6171                         ;;
6172                 (*)
6173                         { echo "$as_me:6173: WARNING: ignored --with-shlib-version" >&5
6174 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6175                         ;;
6176                 esac
6177                 ;;
6178         esac
6179
6180         if test -n "$cf_try_cflags"
6181         then
6182 cat > conftest.$ac_ext <<EOF
6183 #line 6183 "${as_me:-configure}"
6184 #include <stdio.h>
6185 int main(int argc, char *argv[])
6186 {
6187         printf("hello\n");
6188         return (argv[argc-1] == 0) ;
6189 }
6190 EOF
6191                 cf_save_CFLAGS="$CFLAGS"
6192                 for cf_opt in $cf_try_cflags
6193                 do
6194                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6195                         echo "$as_me:6195: checking if CFLAGS option -$cf_opt works" >&5
6196 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6197                         if { (eval echo "$as_me:6197: \"$ac_compile\"") >&5
6198   (eval $ac_compile) 2>&5
6199   ac_status=$?
6200   echo "$as_me:6200: \$? = $ac_status" >&5
6201   (exit $ac_status); }; then
6202                                 echo "$as_me:6202: result: yes" >&5
6203 echo "${ECHO_T}yes" >&6
6204                                 cf_save_CFLAGS="$CFLAGS"
6205                         else
6206                                 echo "$as_me:6206: result: no" >&5
6207 echo "${ECHO_T}no" >&6
6208                         fi
6209                 done
6210                 CFLAGS="$cf_save_CFLAGS"
6211         fi
6212
6213         # RPATH_LIST is a colon-separated list of directories
6214         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6215         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6216
6217         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6218
6219         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6220
6221 echo "${as_me:-configure}:6221: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6222
6223         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6224
6225 echo "${as_me:-configure}:6225: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6226
6227 for model in $cf_list_models; do
6228         case $model in
6229         (libtool)
6230
6231 echo "$as_me:6231: checking for additional libtool options" >&5
6232 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6233
6234 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6235 if test "${with_libtool_opts+set}" = set; then
6236   withval="$with_libtool_opts"
6237   with_libtool_opts=$withval
6238 else
6239   with_libtool_opts=no
6240 fi;
6241 echo "$as_me:6241: result: $with_libtool_opts" >&5
6242 echo "${ECHO_T}$with_libtool_opts" >&6
6243
6244 case .$with_libtool_opts in
6245 (.yes|.no|.)
6246         ;;
6247 (*)
6248         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6249         ;;
6250 esac
6251
6252 echo "$as_me:6252: checking if exported-symbols file should be used" >&5
6253 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6254
6255 # Check whether --with-export-syms or --without-export-syms was given.
6256 if test "${with_export_syms+set}" = set; then
6257   withval="$with_export_syms"
6258   with_export_syms=$withval
6259 else
6260   with_export_syms=no
6261 fi;
6262 if test "x$with_export_syms" = xyes
6263 then
6264         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6265
6266 fi
6267 echo "$as_me:6267: result: $with_export_syms" >&5
6268 echo "${ECHO_T}$with_export_syms" >&6
6269 if test "x$with_export_syms" != xno
6270 then
6271         EXPORT_SYMS="-export-symbols $with_export_syms"
6272
6273 fi
6274
6275                 ;;
6276         (shared)
6277                 if test "$CC_SHARED_OPTS" = "unknown"; then
6278                         { { echo "$as_me:6278: error: Shared libraries are not supported in this version" >&5
6279 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6280    { (exit 1); exit 1; }; }
6281                 fi
6282                 # workaround for inept transition to PIE vs PIC...
6283                 echo "$as_me:6283: checking if current CFLAGS link properly" >&5
6284 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6285                 cat >conftest.$ac_ext <<_ACEOF
6286 #line 6286 "configure"
6287 #include "confdefs.h"
6288 #include <stdio.h>
6289 int
6290 main (void)
6291 {
6292 printf("Hello work\n");
6293   ;
6294   return 0;
6295 }
6296 _ACEOF
6297 rm -f conftest.$ac_objext conftest$ac_exeext
6298 if { (eval echo "$as_me:6298: \"$ac_link\"") >&5
6299   (eval $ac_link) 2>&5
6300   ac_status=$?
6301   echo "$as_me:6301: \$? = $ac_status" >&5
6302   (exit $ac_status); } &&
6303          { ac_try='test -s conftest$ac_exeext'
6304   { (eval echo "$as_me:6304: \"$ac_try\"") >&5
6305   (eval $ac_try) 2>&5
6306   ac_status=$?
6307   echo "$as_me:6307: \$? = $ac_status" >&5
6308   (exit $ac_status); }; }; then
6309   cf_cflags_work=yes
6310 else
6311   echo "$as_me: failed program was:" >&5
6312 cat conftest.$ac_ext >&5
6313 cf_cflags_work=no
6314 fi
6315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6316                 echo "$as_me:6316: result: $cf_cflags_work" >&5
6317 echo "${ECHO_T}$cf_cflags_work" >&6
6318                 if test "$cf_cflags_work" = no
6319                 then
6320                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6321
6322 echo "${as_me:-configure}:6322: testing try to work around by appending shared-options ..." 1>&5
6323
6324                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6325                 fi
6326
6327 echo "$as_me:6327: checking if versioned-symbols file should be used" >&5
6328 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6329
6330 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6331 if test "${with_versioned_syms+set}" = set; then
6332   withval="$with_versioned_syms"
6333   with_versioned_syms=$withval
6334 else
6335   with_versioned_syms=no
6336 fi;
6337 case "x$with_versioned_syms" in
6338 (xyes)
6339         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6340
6341         ;;
6342 (xno)
6343         ;;
6344 (x/*)
6345         test -f "$with_versioned_syms" || { { echo "$as_me:6345: error: expected a filename: $with_versioned_syms" >&5
6346 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6347    { (exit 1); exit 1; }; }
6348         ;;
6349 (*)
6350         test -f "$with_versioned_syms" || { { echo "$as_me:6350: error: expected a filename: $with_versioned_syms" >&5
6351 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6352    { (exit 1); exit 1; }; }
6353         with_versioned_syms=`pwd`/"$with_versioned_syms"
6354         ;;
6355 esac
6356 echo "$as_me:6356: result: $with_versioned_syms" >&5
6357 echo "${ECHO_T}$with_versioned_syms" >&6
6358
6359 RESULTING_SYMS=
6360 VERSIONED_SYMS=
6361 WILDCARD_SYMS=
6362
6363 if test "x$with_versioned_syms" != xno
6364 then
6365         RESULTING_SYMS=$with_versioned_syms
6366         case "x$MK_SHARED_LIB" in
6367         (*-Wl,*)
6368                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6369                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6370                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6371
6372 echo "${as_me:-configure}:6372: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6373
6374                 ;;
6375         (*-dy\ *)
6376                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6377                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6378                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6379
6380 echo "${as_me:-configure}:6380: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6381
6382                 ;;
6383         (*)
6384                 { echo "$as_me:6384: WARNING: this system does not support versioned-symbols" >&5
6385 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6386                 ;;
6387         esac
6388
6389         # Linux ld can selectively override scope, e.g., of symbols beginning with
6390         # "_" by first declaring some as global, and then using a wildcard to
6391         # declare the others as local.  Some other loaders cannot do this.  Check
6392         # by constructing a (very) simple shared library and inspecting its
6393         # symbols.
6394         if test "x$VERSIONED_SYMS" != "x"
6395         then
6396                 echo "$as_me:6396: checking if wildcards can be used to selectively omit symbols" >&5
6397 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6398                 WILDCARD_SYMS=no
6399
6400                 # make sources
6401                 rm -f conftest.*
6402
6403                 cat >conftest.ver <<EOF
6404 module_1.0 {
6405 global:
6406         globalf1;
6407 local:
6408         localf1;
6409 };
6410 module_2.0 {
6411 global:
6412         globalf2;
6413 local:
6414         localf2;
6415         _*;
6416 } module_1.0;
6417 submodule_1.0 {
6418 global:
6419         subglobalf1;
6420         _ismissing;
6421 local:
6422         sublocalf1;
6423 };
6424 submodule_2.0 {
6425 global:
6426         subglobalf2;
6427 local:
6428         sublocalf2;
6429         _*;
6430 } submodule_1.0;
6431 EOF
6432                 cat >conftest.$ac_ext <<EOF
6433 #line 6433 "configure"
6434 int     _ismissing(void) { return 1; }
6435 int     _localf1(void) { return 1; }
6436 int     _localf2(void) { return 2; }
6437 int     globalf1(void) { return 1; }
6438 int     globalf2(void) { return 2; }
6439 int     _sublocalf1(void) { return 1; }
6440 int     _sublocalf2(void) { return 2; }
6441 int     subglobalf1(void) { return 1; }
6442 int     subglobalf2(void) { return 2; }
6443 EOF
6444                 cat >conftest.mk <<EOF
6445 CC=${CC}
6446 CFLAGS=${CFLAGS}
6447 CPPFLAGS=${CPPFLAGS}
6448 LDFLAGS=${LDFLAGS}
6449 LIBS=${LIBS}
6450 VERSIONED_SYMS=${VERSIONED_SYMS}
6451 RESULTING_SYMS=conftest.ver
6452 MK_SHARED_LIB=${MK_SHARED_LIB}
6453 conftest.so: conftest.$ac_cv_objext
6454                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6455 EOF
6456
6457                 # compile source, make library
6458                 if make -f conftest.mk 2>&5 >/dev/null
6459                 then
6460                         # test for missing symbol in either Data or Text section
6461                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6462                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6463                 fi
6464                 echo "$as_me:6464: result: $WILDCARD_SYMS" >&5
6465 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6466                 rm -f conftest.*
6467         fi
6468 fi
6469
6470                 ;;
6471         esac
6472 done
6473
6474 ### Checks for special libraries, must be done up-front.
6475 SHLIB_LIST=""
6476
6477 echo "$as_me:6477: checking if you want to link with the GPM mouse library" >&5
6478 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6479
6480 # Check whether --with-gpm or --without-gpm was given.
6481 if test "${with_gpm+set}" = set; then
6482   withval="$with_gpm"
6483   with_gpm=$withval
6484 else
6485   with_gpm=maybe
6486 fi;
6487 echo "$as_me:6487: result: $with_gpm" >&5
6488 echo "${ECHO_T}$with_gpm" >&6
6489
6490 if test "$with_gpm" != no ; then
6491         echo "$as_me:6491: checking for gpm.h" >&5
6492 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6493 if test "${ac_cv_header_gpm_h+set}" = set; then
6494   echo $ECHO_N "(cached) $ECHO_C" >&6
6495 else
6496   cat >conftest.$ac_ext <<_ACEOF
6497 #line 6497 "configure"
6498 #include "confdefs.h"
6499 #include <gpm.h>
6500 _ACEOF
6501 if { (eval echo "$as_me:6501: \"$ac_cpp conftest.$ac_ext\"") >&5
6502   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6503   ac_status=$?
6504   egrep -v '^ *\+' conftest.er1 >conftest.err
6505   rm -f conftest.er1
6506   cat conftest.err >&5
6507   echo "$as_me:6507: \$? = $ac_status" >&5
6508   (exit $ac_status); } >/dev/null; then
6509   if test -s conftest.err; then
6510     ac_cpp_err=$ac_c_preproc_warn_flag
6511   else
6512     ac_cpp_err=
6513   fi
6514 else
6515   ac_cpp_err=yes
6516 fi
6517 if test -z "$ac_cpp_err"; then
6518   ac_cv_header_gpm_h=yes
6519 else
6520   echo "$as_me: failed program was:" >&5
6521   cat conftest.$ac_ext >&5
6522   ac_cv_header_gpm_h=no
6523 fi
6524 rm -f conftest.err conftest.$ac_ext
6525 fi
6526 echo "$as_me:6526: result: $ac_cv_header_gpm_h" >&5
6527 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6528 if test $ac_cv_header_gpm_h = yes; then
6529
6530 cat >>confdefs.h <<\EOF
6531 #define HAVE_GPM_H 1
6532 EOF
6533
6534                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6535                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6536
6537 echo "${as_me:-configure}:6537: testing assuming we really have GPM library ..." 1>&5
6538
6539 cat >>confdefs.h <<\EOF
6540 #define HAVE_LIBGPM 1
6541 EOF
6542
6543                         with_gpm=yes
6544                 else
6545                         echo "$as_me:6545: checking for Gpm_Open in -lgpm" >&5
6546 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6547 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6548   echo $ECHO_N "(cached) $ECHO_C" >&6
6549 else
6550   ac_check_lib_save_LIBS=$LIBS
6551 LIBS="-lgpm  $LIBS"
6552 cat >conftest.$ac_ext <<_ACEOF
6553 #line 6553 "configure"
6554 #include "confdefs.h"
6555
6556 /* Override any gcc2 internal prototype to avoid an error.  */
6557 #ifdef __cplusplus
6558 extern "C"
6559 #endif
6560 /* We use char because int might match the return type of a gcc2
6561    builtin and then its argument prototype would still apply.  */
6562 char Gpm_Open ();
6563 int
6564 main (void)
6565 {
6566 Gpm_Open ();
6567   ;
6568   return 0;
6569 }
6570 _ACEOF
6571 rm -f conftest.$ac_objext conftest$ac_exeext
6572 if { (eval echo "$as_me:6572: \"$ac_link\"") >&5
6573   (eval $ac_link) 2>&5
6574   ac_status=$?
6575   echo "$as_me:6575: \$? = $ac_status" >&5
6576   (exit $ac_status); } &&
6577          { ac_try='test -s conftest$ac_exeext'
6578   { (eval echo "$as_me:6578: \"$ac_try\"") >&5
6579   (eval $ac_try) 2>&5
6580   ac_status=$?
6581   echo "$as_me:6581: \$? = $ac_status" >&5
6582   (exit $ac_status); }; }; then
6583   ac_cv_lib_gpm_Gpm_Open=yes
6584 else
6585   echo "$as_me: failed program was:" >&5
6586 cat conftest.$ac_ext >&5
6587 ac_cv_lib_gpm_Gpm_Open=no
6588 fi
6589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6590 LIBS=$ac_check_lib_save_LIBS
6591 fi
6592 echo "$as_me:6592: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6593 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6594 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6595   with_gpm=yes
6596 else
6597
6598                                 if test "$with_gpm" = maybe; then
6599                                         { echo "$as_me:6599: WARNING: Cannot link with GPM library" >&5
6600 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6601                                         with_gpm=no
6602                                 else
6603                                         { { echo "$as_me:6603: error: Cannot link with GPM library" >&5
6604 echo "$as_me: error: Cannot link with GPM library" >&2;}
6605    { (exit 1); exit 1; }; }
6606                                 fi
6607
6608 fi
6609
6610                 fi
6611
6612 else
6613
6614                 test "$with_gpm" != maybe && { echo "$as_me:6614: WARNING: Cannot find GPM header" >&5
6615 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6616                 with_gpm=no
6617
6618 fi
6619
6620 fi
6621
6622 if test "$with_gpm" != no ; then
6623         echo "$as_me:6623: checking if you want to load GPM dynamically" >&5
6624 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6625
6626 # Check whether --with-dlsym or --without-dlsym was given.
6627 if test "${with_dlsym+set}" = set; then
6628   withval="$with_dlsym"
6629   with_dlsym=$withval
6630 else
6631   with_dlsym=yes
6632 fi;
6633         echo "$as_me:6633: result: $with_dlsym" >&5
6634 echo "${ECHO_T}$with_dlsym" >&6
6635         if test "x$with_dlsym" = xyes ; then
6636
6637 cf_have_dlsym=no
6638 echo "$as_me:6638: checking for dlsym" >&5
6639 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6640 if test "${ac_cv_func_dlsym+set}" = set; then
6641   echo $ECHO_N "(cached) $ECHO_C" >&6
6642 else
6643   cat >conftest.$ac_ext <<_ACEOF
6644 #line 6644 "configure"
6645 #include "confdefs.h"
6646 #define dlsym autoconf_temporary
6647 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6648 #undef dlsym
6649
6650 #ifdef __cplusplus
6651 extern "C"
6652 #endif
6653
6654 /* We use char because int might match the return type of a gcc2
6655    builtin and then its argument prototype would still apply.  */
6656 char dlsym (void);
6657
6658 int
6659 main (void)
6660 {
6661
6662 /* The GNU C library defines stubs for functions which it implements
6663     to always fail with ENOSYS.  Some functions are actually named
6664     something starting with __ and the normal name is an alias.  */
6665 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6666 #error found stub for dlsym
6667 #endif
6668
6669         return dlsym ();
6670   ;
6671   return 0;
6672 }
6673 _ACEOF
6674 rm -f conftest.$ac_objext conftest$ac_exeext
6675 if { (eval echo "$as_me:6675: \"$ac_link\"") >&5
6676   (eval $ac_link) 2>&5
6677   ac_status=$?
6678   echo "$as_me:6678: \$? = $ac_status" >&5
6679   (exit $ac_status); } &&
6680          { ac_try='test -s conftest$ac_exeext'
6681   { (eval echo "$as_me:6681: \"$ac_try\"") >&5
6682   (eval $ac_try) 2>&5
6683   ac_status=$?
6684   echo "$as_me:6684: \$? = $ac_status" >&5
6685   (exit $ac_status); }; }; then
6686   ac_cv_func_dlsym=yes
6687 else
6688   echo "$as_me: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690 ac_cv_func_dlsym=no
6691 fi
6692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6693 fi
6694 echo "$as_me:6694: result: $ac_cv_func_dlsym" >&5
6695 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6696 if test $ac_cv_func_dlsym = yes; then
6697   cf_have_dlsym=yes
6698 else
6699
6700 cf_have_libdl=no
6701 echo "$as_me:6701: checking for dlsym in -ldl" >&5
6702 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6703 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6704   echo $ECHO_N "(cached) $ECHO_C" >&6
6705 else
6706   ac_check_lib_save_LIBS=$LIBS
6707 LIBS="-ldl  $LIBS"
6708 cat >conftest.$ac_ext <<_ACEOF
6709 #line 6709 "configure"
6710 #include "confdefs.h"
6711
6712 /* Override any gcc2 internal prototype to avoid an error.  */
6713 #ifdef __cplusplus
6714 extern "C"
6715 #endif
6716 /* We use char because int might match the return type of a gcc2
6717    builtin and then its argument prototype would still apply.  */
6718 char dlsym ();
6719 int
6720 main (void)
6721 {
6722 dlsym ();
6723   ;
6724   return 0;
6725 }
6726 _ACEOF
6727 rm -f conftest.$ac_objext conftest$ac_exeext
6728 if { (eval echo "$as_me:6728: \"$ac_link\"") >&5
6729   (eval $ac_link) 2>&5
6730   ac_status=$?
6731   echo "$as_me:6731: \$? = $ac_status" >&5
6732   (exit $ac_status); } &&
6733          { ac_try='test -s conftest$ac_exeext'
6734   { (eval echo "$as_me:6734: \"$ac_try\"") >&5
6735   (eval $ac_try) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit $ac_status); }; }; then
6739   ac_cv_lib_dl_dlsym=yes
6740 else
6741   echo "$as_me: failed program was:" >&5
6742 cat conftest.$ac_ext >&5
6743 ac_cv_lib_dl_dlsym=no
6744 fi
6745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6746 LIBS=$ac_check_lib_save_LIBS
6747 fi
6748 echo "$as_me:6748: result: $ac_cv_lib_dl_dlsym" >&5
6749 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6750 if test $ac_cv_lib_dl_dlsym = yes; then
6751
6752         cf_have_dlsym=yes
6753         cf_have_libdl=yes
6754 fi
6755
6756 fi
6757
6758 if test "$cf_have_dlsym" = yes ; then
6759         test "$cf_have_libdl" = yes && {
6760 cf_add_libs="-ldl"
6761 # Filter out duplicates - this happens with badly-designed ".pc" files...
6762 for cf_add_1lib in $LIBS
6763 do
6764         for cf_add_2lib in $cf_add_libs
6765         do
6766                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6767                 then
6768                         cf_add_1lib=
6769                         break
6770                 fi
6771         done
6772         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6773 done
6774 LIBS="$cf_add_libs"
6775  }
6776
6777         echo "$as_me:6777: checking whether able to link to dl*() functions" >&5
6778 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6779         cat >conftest.$ac_ext <<_ACEOF
6780 #line 6780 "configure"
6781 #include "confdefs.h"
6782 #include <dlfcn.h>
6783 int
6784 main (void)
6785 {
6786
6787                 void *obj;
6788                 if ((obj = dlopen("filename", 0)) != 0) {
6789                         if (dlsym(obj, "symbolname") == 0) {
6790                         dlclose(obj);
6791                         }
6792                 }
6793   ;
6794   return 0;
6795 }
6796 _ACEOF
6797 rm -f conftest.$ac_objext conftest$ac_exeext
6798 if { (eval echo "$as_me:6798: \"$ac_link\"") >&5
6799   (eval $ac_link) 2>&5
6800   ac_status=$?
6801   echo "$as_me:6801: \$? = $ac_status" >&5
6802   (exit $ac_status); } &&
6803          { ac_try='test -s conftest$ac_exeext'
6804   { (eval echo "$as_me:6804: \"$ac_try\"") >&5
6805   (eval $ac_try) 2>&5
6806   ac_status=$?
6807   echo "$as_me:6807: \$? = $ac_status" >&5
6808   (exit $ac_status); }; }; then
6809
6810 cat >>confdefs.h <<\EOF
6811 #define HAVE_LIBDL 1
6812 EOF
6813
6814 else
6815   echo "$as_me: failed program was:" >&5
6816 cat conftest.$ac_ext >&5
6817
6818                 { { echo "$as_me:6818: error: Cannot link test program for libdl" >&5
6819 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6820    { (exit 1); exit 1; }; }
6821 fi
6822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6823         echo "$as_me:6823: result: ok" >&5
6824 echo "${ECHO_T}ok" >&6
6825 else
6826         { { echo "$as_me:6826: error: Cannot find dlsym function" >&5
6827 echo "$as_me: error: Cannot find dlsym function" >&2;}
6828    { (exit 1); exit 1; }; }
6829 fi
6830
6831                 if test "x$with_gpm" != xyes ; then
6832                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6833
6834 echo "${as_me:-configure}:6834: testing assuming soname for gpm is $with_gpm ..." 1>&5
6835
6836                         cf_cv_gpm_soname="$with_gpm"
6837                 else
6838
6839 echo "$as_me:6839: checking for soname of gpm library" >&5
6840 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6841 if test "${cf_cv_gpm_soname+set}" = set; then
6842   echo $ECHO_N "(cached) $ECHO_C" >&6
6843 else
6844
6845 cf_cv_gpm_soname=unknown
6846 if test "$cross_compiling" != yes ; then
6847 cat >conftest.$ac_ext <<CF_EOF
6848 #include <gpm.h>
6849 int main(void)
6850 {
6851 if (Gpm_Open(0,0)) Gpm_Close();
6852         ${cf_cv_main_return:-return}(0);
6853 }
6854 CF_EOF
6855 cf_save_LIBS="$LIBS"
6856
6857 cf_add_libs="-lgpm"
6858 # Filter out duplicates - this happens with badly-designed ".pc" files...
6859 for cf_add_1lib in $LIBS
6860 do
6861         for cf_add_2lib in $cf_add_libs
6862         do
6863                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6864                 then
6865                         cf_add_1lib=
6866                         break
6867                 fi
6868         done
6869         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6870 done
6871 LIBS="$cf_add_libs"
6872
6873         if { (eval echo "$as_me:6873: \"$ac_compile\"") >&5
6874   (eval $ac_compile) 2>&5
6875   ac_status=$?
6876   echo "$as_me:6876: \$? = $ac_status" >&5
6877   (exit $ac_status); } ; then
6878                 if { (eval echo "$as_me:6878: \"$ac_link\"") >&5
6879   (eval $ac_link) 2>&5
6880   ac_status=$?
6881   echo "$as_me:6881: \$? = $ac_status" >&5
6882   (exit $ac_status); } ; then
6883                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6884                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6885                 fi
6886         fi
6887 rm -rf conftest*
6888 LIBS="$cf_save_LIBS"
6889 fi
6890
6891 fi
6892 echo "$as_me:6892: result: $cf_cv_gpm_soname" >&5
6893 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6894
6895                 fi
6896                 test "$cf_cv_gpm_soname" != "unknown" &&
6897 cat >>confdefs.h <<EOF
6898 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6899 EOF
6900
6901                 SHLIB_LIST="-ldl $SHLIB_LIST"
6902
6903 cf_add_libs="-ldl"
6904 # Filter out duplicates - this happens with badly-designed ".pc" files...
6905 for cf_add_1lib in $PRIVATE_LIBS
6906 do
6907         for cf_add_2lib in $cf_add_libs
6908         do
6909                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6910                 then
6911                         cf_add_1lib=
6912                         break
6913                 fi
6914         done
6915         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6916 done
6917 PRIVATE_LIBS="$cf_add_libs"
6918
6919         else
6920                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6921
6922 cf_add_libs="-lgpm"
6923 # Filter out duplicates - this happens with badly-designed ".pc" files...
6924 for cf_add_1lib in $TEST_LIBS
6925 do
6926         for cf_add_2lib in $cf_add_libs
6927         do
6928                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6929                 then
6930                         cf_add_1lib=
6931                         break
6932                 fi
6933         done
6934         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6935 done
6936 TEST_LIBS="$cf_add_libs"
6937
6938 cf_add_libs="-lgpm"
6939 # Filter out duplicates - this happens with badly-designed ".pc" files...
6940 for cf_add_1lib in $PRIVATE_LIBS
6941 do
6942         for cf_add_2lib in $cf_add_libs
6943         do
6944                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6945                 then
6946                         cf_add_1lib=
6947                         break
6948                 fi
6949         done
6950         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6951 done
6952 PRIVATE_LIBS="$cf_add_libs"
6953
6954         fi
6955
6956 cat >>confdefs.h <<\EOF
6957 #define HAVE_LIBGPM 1
6958 EOF
6959
6960 echo "$as_me:6960: checking for Gpm_Wgetch in -lgpm" >&5
6961 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6962 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6963   echo $ECHO_N "(cached) $ECHO_C" >&6
6964 else
6965   ac_check_lib_save_LIBS=$LIBS
6966 LIBS="-lgpm  $LIBS"
6967 cat >conftest.$ac_ext <<_ACEOF
6968 #line 6968 "configure"
6969 #include "confdefs.h"
6970
6971 /* Override any gcc2 internal prototype to avoid an error.  */
6972 #ifdef __cplusplus
6973 extern "C"
6974 #endif
6975 /* We use char because int might match the return type of a gcc2
6976    builtin and then its argument prototype would still apply.  */
6977 char Gpm_Wgetch ();
6978 int
6979 main (void)
6980 {
6981 Gpm_Wgetch ();
6982   ;
6983   return 0;
6984 }
6985 _ACEOF
6986 rm -f conftest.$ac_objext conftest$ac_exeext
6987 if { (eval echo "$as_me:6987: \"$ac_link\"") >&5
6988   (eval $ac_link) 2>&5
6989   ac_status=$?
6990   echo "$as_me:6990: \$? = $ac_status" >&5
6991   (exit $ac_status); } &&
6992          { ac_try='test -s conftest$ac_exeext'
6993   { (eval echo "$as_me:6993: \"$ac_try\"") >&5
6994   (eval $ac_try) 2>&5
6995   ac_status=$?
6996   echo "$as_me:6996: \$? = $ac_status" >&5
6997   (exit $ac_status); }; }; then
6998   ac_cv_lib_gpm_Gpm_Wgetch=yes
6999 else
7000   echo "$as_me: failed program was:" >&5
7001 cat conftest.$ac_ext >&5
7002 ac_cv_lib_gpm_Gpm_Wgetch=no
7003 fi
7004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7005 LIBS=$ac_check_lib_save_LIBS
7006 fi
7007 echo "$as_me:7007: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7008 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7009 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7010
7011 echo "$as_me:7011: checking if GPM is weakly bound to curses library" >&5
7012 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7013 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7014   echo $ECHO_N "(cached) $ECHO_C" >&6
7015 else
7016
7017 cf_cv_check_gpm_wgetch=unknown
7018 if test "$cross_compiling" != yes ; then
7019
7020 cat >conftest.$ac_ext <<CF_EOF
7021 #include <gpm.h>
7022 int main(void)
7023 {
7024         Gpm_Wgetch();
7025         ${cf_cv_main_return:-return}(0);
7026 }
7027 CF_EOF
7028
7029         cf_save_LIBS="$LIBS"
7030         # This only works if we can look at the symbol table.  If a shared
7031         # library is stripped for install, we cannot use that.  So we're forced
7032         # to rely on the static library, noting that some packagers may not
7033         # include it.
7034         LIBS="-static -lgpm -dynamic $LIBS"
7035         if { (eval echo "$as_me:7035: \"$ac_compile\"") >&5
7036   (eval $ac_compile) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); } ; then
7040                 if { (eval echo "$as_me:7040: \"$ac_link\"") >&5
7041   (eval $ac_link) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); } ; then
7045                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7046                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7047                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7048                 fi
7049         fi
7050         rm -rf conftest*
7051         LIBS="$cf_save_LIBS"
7052 fi
7053
7054 fi
7055 echo "$as_me:7055: result: $cf_cv_check_gpm_wgetch" >&5
7056 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7057
7058 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7059         { echo "$as_me:7059: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7060 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7061 fi
7062
7063 fi
7064
7065 fi
7066
7067 echo "$as_me:7067: checking if you want to use PCRE2 for regular-expressions" >&5
7068 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7069
7070 # Check whether --with-pcre2 or --without-pcre2 was given.
7071 if test "${with_pcre2+set}" = set; then
7072   withval="$with_pcre2"
7073
7074 fi;
7075 test -z "$with_pcre2" && with_pcre2=no
7076 echo "$as_me:7076: result: $with_pcre2" >&5
7077 echo "${ECHO_T}$with_pcre2" >&6
7078
7079 if test "x$with_pcre2" != xno ; then
7080
7081 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7082         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7083
7084 echo "${as_me:-configure}:7084: testing found package libpcre2 ..." 1>&5
7085
7086         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7087         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7088         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7089
7090 echo "${as_me:-configure}:7090: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7091
7092         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7093
7094 echo "${as_me:-configure}:7094: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7095
7096 cf_fix_cppflags=no
7097 cf_new_cflags=
7098 cf_new_cppflags=
7099 cf_new_extra_cppflags=
7100
7101 for cf_add_cflags in $cf_pkgconfig_incs
7102 do
7103 case $cf_fix_cppflags in
7104 (no)
7105         case $cf_add_cflags in
7106         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7107                 case $cf_add_cflags in
7108                 (-D*)
7109                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7110
7111                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7112                                 && test -z "${cf_tst_cflags}" \
7113                                 && cf_fix_cppflags=yes
7114
7115                         if test $cf_fix_cppflags = yes ; then
7116
7117         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7118         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7119
7120                                 continue
7121                         elif test "${cf_tst_cflags}" = "\"'" ; then
7122
7123         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7124         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7125
7126                                 continue
7127                         fi
7128                         ;;
7129                 esac
7130                 case "$CPPFLAGS" in
7131                 (*$cf_add_cflags)
7132                         ;;
7133                 (*)
7134                         case $cf_add_cflags in
7135                         (-D*)
7136                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7137
7138 CPPFLAGS=`echo "$CPPFLAGS" | \
7139         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7140                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7141
7142                                 ;;
7143                         esac
7144
7145         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7146         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7147
7148                         ;;
7149                 esac
7150                 ;;
7151         (*)
7152
7153         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7154         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7155
7156                 ;;
7157         esac
7158         ;;
7159 (yes)
7160
7161         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7162         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7163
7164         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7165
7166         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7167                 && test -z "${cf_tst_cflags}" \
7168                 && cf_fix_cppflags=no
7169         ;;
7170 esac
7171 done
7172
7173 if test -n "$cf_new_cflags" ; then
7174
7175         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7176         CFLAGS="${CFLAGS}$cf_new_cflags"
7177
7178 fi
7179
7180 if test -n "$cf_new_cppflags" ; then
7181
7182         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7183         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7184
7185 fi
7186
7187 if test -n "$cf_new_extra_cppflags" ; then
7188
7189         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7190         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7191
7192 fi
7193
7194 cf_add_libs="$cf_pkgconfig_libs"
7195 # Filter out duplicates - this happens with badly-designed ".pc" files...
7196 for cf_add_1lib in $LIBS
7197 do
7198         for cf_add_2lib in $cf_add_libs
7199         do
7200                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7201                 then
7202                         cf_add_1lib=
7203                         break
7204                 fi
7205         done
7206         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7207 done
7208 LIBS="$cf_add_libs"
7209
7210         :
7211 else
7212         cf_pkgconfig_incs=
7213         cf_pkgconfig_libs=
7214
7215 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7216         test -n "$verbose" && echo "    found package libpcre" 1>&6
7217
7218 echo "${as_me:-configure}:7218: testing found package libpcre ..." 1>&5
7219
7220         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7221         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7222         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7223
7224 echo "${as_me:-configure}:7224: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7225
7226         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7227
7228 echo "${as_me:-configure}:7228: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7229
7230 cf_fix_cppflags=no
7231 cf_new_cflags=
7232 cf_new_cppflags=
7233 cf_new_extra_cppflags=
7234
7235 for cf_add_cflags in $cf_pkgconfig_incs
7236 do
7237 case $cf_fix_cppflags in
7238 (no)
7239         case $cf_add_cflags in
7240         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7241                 case $cf_add_cflags in
7242                 (-D*)
7243                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7244
7245                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7246                                 && test -z "${cf_tst_cflags}" \
7247                                 && cf_fix_cppflags=yes
7248
7249                         if test $cf_fix_cppflags = yes ; then
7250
7251         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7252         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7253
7254                                 continue
7255                         elif test "${cf_tst_cflags}" = "\"'" ; then
7256
7257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7259
7260                                 continue
7261                         fi
7262                         ;;
7263                 esac
7264                 case "$CPPFLAGS" in
7265                 (*$cf_add_cflags)
7266                         ;;
7267                 (*)
7268                         case $cf_add_cflags in
7269                         (-D*)
7270                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7271
7272 CPPFLAGS=`echo "$CPPFLAGS" | \
7273         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7274                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7275
7276                                 ;;
7277                         esac
7278
7279         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7280         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7281
7282                         ;;
7283                 esac
7284                 ;;
7285         (*)
7286
7287         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7288         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7289
7290                 ;;
7291         esac
7292         ;;
7293 (yes)
7294
7295         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7296         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7297
7298         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7299
7300         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7301                 && test -z "${cf_tst_cflags}" \
7302                 && cf_fix_cppflags=no
7303         ;;
7304 esac
7305 done
7306
7307 if test -n "$cf_new_cflags" ; then
7308
7309         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7310         CFLAGS="${CFLAGS}$cf_new_cflags"
7311
7312 fi
7313
7314 if test -n "$cf_new_cppflags" ; then
7315
7316         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7317         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7318
7319 fi
7320
7321 if test -n "$cf_new_extra_cppflags" ; then
7322
7323         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7324         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7325
7326 fi
7327
7328 cf_add_libs="$cf_pkgconfig_libs"
7329 # Filter out duplicates - this happens with badly-designed ".pc" files...
7330 for cf_add_1lib in $LIBS
7331 do
7332         for cf_add_2lib in $cf_add_libs
7333         do
7334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7335                 then
7336                         cf_add_1lib=
7337                         break
7338                 fi
7339         done
7340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7341 done
7342 LIBS="$cf_add_libs"
7343
7344         :
7345 else
7346         cf_pkgconfig_incs=
7347         cf_pkgconfig_libs=
7348
7349                         { { echo "$as_me:7349: error: Cannot find PCRE2 library" >&5
7350 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7351    { (exit 1); exit 1; }; }
7352 fi
7353
7354 fi
7355
7356 cat >>confdefs.h <<\EOF
7357 #define HAVE_LIB_PCRE2 1
7358 EOF
7359
7360         # if pkgconfig gave no results, look for the libraries directly
7361         case $LIBS in
7362         (*pcre2-posix*|*pcreposix*)
7363                 ;;
7364         (*)
7365                 echo "$as_me:7365: checking for regcomp in -lpcre2-posix" >&5
7366 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7367 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370   ac_check_lib_save_LIBS=$LIBS
7371 LIBS="-lpcre2-posix  $LIBS"
7372 cat >conftest.$ac_ext <<_ACEOF
7373 #line 7373 "configure"
7374 #include "confdefs.h"
7375
7376 /* Override any gcc2 internal prototype to avoid an error.  */
7377 #ifdef __cplusplus
7378 extern "C"
7379 #endif
7380 /* We use char because int might match the return type of a gcc2
7381    builtin and then its argument prototype would still apply.  */
7382 char regcomp ();
7383 int
7384 main (void)
7385 {
7386 regcomp ();
7387   ;
7388   return 0;
7389 }
7390 _ACEOF
7391 rm -f conftest.$ac_objext conftest$ac_exeext
7392 if { (eval echo "$as_me:7392: \"$ac_link\"") >&5
7393   (eval $ac_link) 2>&5
7394   ac_status=$?
7395   echo "$as_me:7395: \$? = $ac_status" >&5
7396   (exit $ac_status); } &&
7397          { ac_try='test -s conftest$ac_exeext'
7398   { (eval echo "$as_me:7398: \"$ac_try\"") >&5
7399   (eval $ac_try) 2>&5
7400   ac_status=$?
7401   echo "$as_me:7401: \$? = $ac_status" >&5
7402   (exit $ac_status); }; }; then
7403   ac_cv_lib_pcre2_posix_regcomp=yes
7404 else
7405   echo "$as_me: failed program was:" >&5
7406 cat conftest.$ac_ext >&5
7407 ac_cv_lib_pcre2_posix_regcomp=no
7408 fi
7409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7410 LIBS=$ac_check_lib_save_LIBS
7411 fi
7412 echo "$as_me:7412: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7413 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7414 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7415
7416 cf_add_libs="-lpcre2-posix"
7417 # Filter out duplicates - this happens with badly-designed ".pc" files...
7418 for cf_add_1lib in $LIBS
7419 do
7420         for cf_add_2lib in $cf_add_libs
7421         do
7422                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7423                 then
7424                         cf_add_1lib=
7425                         break
7426                 fi
7427         done
7428         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7429 done
7430 LIBS="$cf_add_libs"
7431
7432 else
7433   echo "$as_me:7433: checking for regcomp in -lpcreposix" >&5
7434 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7435 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7436   echo $ECHO_N "(cached) $ECHO_C" >&6
7437 else
7438   ac_check_lib_save_LIBS=$LIBS
7439 LIBS="-lpcreposix  $LIBS"
7440 cat >conftest.$ac_ext <<_ACEOF
7441 #line 7441 "configure"
7442 #include "confdefs.h"
7443
7444 /* Override any gcc2 internal prototype to avoid an error.  */
7445 #ifdef __cplusplus
7446 extern "C"
7447 #endif
7448 /* We use char because int might match the return type of a gcc2
7449    builtin and then its argument prototype would still apply.  */
7450 char regcomp ();
7451 int
7452 main (void)
7453 {
7454 regcomp ();
7455   ;
7456   return 0;
7457 }
7458 _ACEOF
7459 rm -f conftest.$ac_objext conftest$ac_exeext
7460 if { (eval echo "$as_me:7460: \"$ac_link\"") >&5
7461   (eval $ac_link) 2>&5
7462   ac_status=$?
7463   echo "$as_me:7463: \$? = $ac_status" >&5
7464   (exit $ac_status); } &&
7465          { ac_try='test -s conftest$ac_exeext'
7466   { (eval echo "$as_me:7466: \"$ac_try\"") >&5
7467   (eval $ac_try) 2>&5
7468   ac_status=$?
7469   echo "$as_me:7469: \$? = $ac_status" >&5
7470   (exit $ac_status); }; }; then
7471   ac_cv_lib_pcreposix_regcomp=yes
7472 else
7473   echo "$as_me: failed program was:" >&5
7474 cat conftest.$ac_ext >&5
7475 ac_cv_lib_pcreposix_regcomp=no
7476 fi
7477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7478 LIBS=$ac_check_lib_save_LIBS
7479 fi
7480 echo "$as_me:7480: result: $ac_cv_lib_pcreposix_regcomp" >&5
7481 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7482 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7483
7484 cf_add_libs="-lpcreposix"
7485 # Filter out duplicates - this happens with badly-designed ".pc" files...
7486 for cf_add_1lib in $LIBS
7487 do
7488         for cf_add_2lib in $cf_add_libs
7489         do
7490                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7491                 then
7492                         cf_add_1lib=
7493                         break
7494                 fi
7495         done
7496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7497 done
7498 LIBS="$cf_add_libs"
7499
7500 else
7501   { { echo "$as_me:7501: error: Cannot find PCRE2 POSIX library" >&5
7502 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7503    { (exit 1); exit 1; }; }
7504 fi
7505
7506 fi
7507
7508                 ;;
7509         esac
7510
7511         # either way, check for the library header files
7512
7513 for ac_header in pcre2-posix.h pcreposix.h
7514 do
7515 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7516 echo "$as_me:7516: checking for $ac_header" >&5
7517 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7518 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7519   echo $ECHO_N "(cached) $ECHO_C" >&6
7520 else
7521   cat >conftest.$ac_ext <<_ACEOF
7522 #line 7522 "configure"
7523 #include "confdefs.h"
7524 #include <$ac_header>
7525 _ACEOF
7526 if { (eval echo "$as_me:7526: \"$ac_cpp conftest.$ac_ext\"") >&5
7527   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7528   ac_status=$?
7529   egrep -v '^ *\+' conftest.er1 >conftest.err
7530   rm -f conftest.er1
7531   cat conftest.err >&5
7532   echo "$as_me:7532: \$? = $ac_status" >&5
7533   (exit $ac_status); } >/dev/null; then
7534   if test -s conftest.err; then
7535     ac_cpp_err=$ac_c_preproc_warn_flag
7536   else
7537     ac_cpp_err=
7538   fi
7539 else
7540   ac_cpp_err=yes
7541 fi
7542 if test -z "$ac_cpp_err"; then
7543   eval "$as_ac_Header=yes"
7544 else
7545   echo "$as_me: failed program was:" >&5
7546   cat conftest.$ac_ext >&5
7547   eval "$as_ac_Header=no"
7548 fi
7549 rm -f conftest.err conftest.$ac_ext
7550 fi
7551 echo "$as_me:7551: result: `eval echo '${'$as_ac_Header'}'`" >&5
7552 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7553 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7554   cat >>confdefs.h <<EOF
7555 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7556 EOF
7557
7558 fi
7559 done
7560
7561 fi
7562
7563 # not everyone has "test -c"
7564 if test -c /dev/sysmouse 2>/dev/null ; then
7565 echo "$as_me:7565: checking if you want to use sysmouse" >&5
7566 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7567
7568 # Check whether --with-sysmouse or --without-sysmouse was given.
7569 if test "${with_sysmouse+set}" = set; then
7570   withval="$with_sysmouse"
7571   cf_with_sysmouse=$withval
7572 else
7573   cf_with_sysmouse=maybe
7574 fi;
7575         if test "$cf_with_sysmouse" != no ; then
7576         cat >conftest.$ac_ext <<_ACEOF
7577 #line 7577 "configure"
7578 #include "confdefs.h"
7579
7580 #include <osreldate.h>
7581 #if (__FreeBSD_version >= 400017)
7582 #include <sys/consio.h>
7583 #include <sys/fbio.h>
7584 #else
7585 #include <machine/console.h>
7586 #endif
7587
7588 int
7589 main (void)
7590 {
7591
7592         struct mouse_info the_mouse;
7593         ioctl(0, CONS_MOUSECTL, &the_mouse);
7594
7595   ;
7596   return 0;
7597 }
7598 _ACEOF
7599 rm -f conftest.$ac_objext
7600 if { (eval echo "$as_me:7600: \"$ac_compile\"") >&5
7601   (eval $ac_compile) 2>&5
7602   ac_status=$?
7603   echo "$as_me:7603: \$? = $ac_status" >&5
7604   (exit $ac_status); } &&
7605          { ac_try='test -s conftest.$ac_objext'
7606   { (eval echo "$as_me:7606: \"$ac_try\"") >&5
7607   (eval $ac_try) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); }; }; then
7611   cf_with_sysmouse=yes
7612 else
7613   echo "$as_me: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 cf_with_sysmouse=no
7616 fi
7617 rm -f conftest.$ac_objext conftest.$ac_ext
7618         fi
7619 echo "$as_me:7619: result: $cf_with_sysmouse" >&5
7620 echo "${ECHO_T}$cf_with_sysmouse" >&6
7621 test "$cf_with_sysmouse" = yes &&
7622 cat >>confdefs.h <<\EOF
7623 #define USE_SYSMOUSE 1
7624 EOF
7625
7626 fi
7627
7628 # pretend that ncurses==ncursesw==ncursest
7629 echo "$as_me:7629: checking if you want to disable library suffixes" >&5
7630 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7631
7632 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7633 if test "${enable_lib_suffixes+set}" = set; then
7634   enableval="$enable_lib_suffixes"
7635   test "$enableval" != no && enableval=yes
7636         if test "$enableval" != "yes" ; then
7637     disable_lib_suffixes=yes
7638         else
7639                 disable_lib_suffixes=no
7640         fi
7641 else
7642   enableval=yes
7643         disable_lib_suffixes=no
7644
7645 fi;
7646 echo "$as_me:7646: result: $disable_lib_suffixes" >&5
7647 echo "${ECHO_T}$disable_lib_suffixes" >&6
7648
7649 ### If we're building with rpath, try to link non-standard libs that way too.
7650 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7651
7652 echo "$as_me:7652: checking if rpath-hack should be disabled" >&5
7653 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7654
7655 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7656 if test "${enable_rpath_hack+set}" = set; then
7657   enableval="$enable_rpath_hack"
7658   test "$enableval" != no && enableval=yes
7659         if test "$enableval" != "yes" ; then
7660     cf_disable_rpath_hack=yes
7661         else
7662                 cf_disable_rpath_hack=no
7663         fi
7664 else
7665   enableval=yes
7666         cf_disable_rpath_hack=no
7667
7668 fi;
7669 echo "$as_me:7669: result: $cf_disable_rpath_hack" >&5
7670 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7671 if test "$cf_disable_rpath_hack" = no ; then
7672
7673 echo "$as_me:7673: checking for updated LDFLAGS" >&5
7674 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7675 if test -n "$LD_RPATH_OPT" ; then
7676         echo "$as_me:7676: result: maybe" >&5
7677 echo "${ECHO_T}maybe" >&6
7678
7679         for ac_prog in ldd
7680 do
7681   # Extract the first word of "$ac_prog", so it can be a program name with args.
7682 set dummy $ac_prog; ac_word=$2
7683 echo "$as_me:7683: checking for $ac_word" >&5
7684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7685 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7686   echo $ECHO_N "(cached) $ECHO_C" >&6
7687 else
7688   if test -n "$cf_ldd_prog"; then
7689   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7690 else
7691   ac_save_IFS=$IFS; IFS=$ac_path_separator
7692 ac_dummy="$PATH"
7693 for ac_dir in $ac_dummy; do
7694   IFS=$ac_save_IFS
7695   test -z "$ac_dir" && ac_dir=.
7696   $as_executable_p "$ac_dir/$ac_word" || continue
7697 ac_cv_prog_cf_ldd_prog="$ac_prog"
7698 echo "$as_me:7698: found $ac_dir/$ac_word" >&5
7699 break
7700 done
7701
7702 fi
7703 fi
7704 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7705 if test -n "$cf_ldd_prog"; then
7706   echo "$as_me:7706: result: $cf_ldd_prog" >&5
7707 echo "${ECHO_T}$cf_ldd_prog" >&6
7708 else
7709   echo "$as_me:7709: result: no" >&5
7710 echo "${ECHO_T}no" >&6
7711 fi
7712
7713   test -n "$cf_ldd_prog" && break
7714 done
7715 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7716
7717         cf_rpath_list="/usr/lib /lib"
7718         if test "$cf_ldd_prog" != no
7719         then
7720                 cf_rpath_oops=
7721
7722 cat >conftest.$ac_ext <<_ACEOF
7723 #line 7723 "configure"
7724 #include "confdefs.h"
7725 #include <stdio.h>
7726 int
7727 main (void)
7728 {
7729 printf("Hello");
7730   ;
7731   return 0;
7732 }
7733 _ACEOF
7734 rm -f conftest.$ac_objext conftest$ac_exeext
7735 if { (eval echo "$as_me:7735: \"$ac_link\"") >&5
7736   (eval $ac_link) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit $ac_status); } &&
7740          { ac_try='test -s conftest$ac_exeext'
7741   { (eval echo "$as_me:7741: \"$ac_try\"") >&5
7742   (eval $ac_try) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); }; }; then
7746   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7747                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7748 else
7749   echo "$as_me: failed program was:" >&5
7750 cat conftest.$ac_ext >&5
7751 fi
7752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7753
7754                 # If we passed the link-test, but get a "not found" on a given library,
7755                 # this could be due to inept reconfiguration of gcc to make it only
7756                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7757                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7758                 # /usr/local libraries.
7759                 if test -n "$cf_rpath_oops"
7760                 then
7761                         for cf_rpath_src in $cf_rpath_oops
7762                         do
7763                                 for cf_rpath_dir in \
7764                                         /usr/local \
7765                                         /usr/pkg \
7766                                         /opt/sfw
7767                                 do
7768                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7769                                         then
7770                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7771
7772 echo "${as_me:-configure}:7772: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7773
7774                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7775                                                 break
7776                                         fi
7777                                 done
7778                         done
7779                 fi
7780         fi
7781
7782         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7783
7784 echo "${as_me:-configure}:7784: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7785
7786 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7787
7788 echo "${as_me:-configure}:7788: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7789
7790 cf_rpath_dst=
7791 for cf_rpath_src in $LDFLAGS
7792 do
7793         case $cf_rpath_src in
7794         (-L*)
7795
7796                 # check if this refers to a directory which we will ignore
7797                 cf_rpath_skip=no
7798                 if test -n "$cf_rpath_list"
7799                 then
7800                         for cf_rpath_item in $cf_rpath_list
7801                         do
7802                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7803                                 then
7804                                         cf_rpath_skip=yes
7805                                         break
7806                                 fi
7807                         done
7808                 fi
7809
7810                 if test "$cf_rpath_skip" = no
7811                 then
7812                         # transform the option
7813                         if test "$LD_RPATH_OPT" = "-R " ; then
7814                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7815                         else
7816                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7817                         fi
7818
7819                         # if we have not already added this, add it now
7820                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7821                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7822                         then
7823                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7824
7825 echo "${as_me:-configure}:7825: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7826
7827                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7828                         fi
7829                 fi
7830                 ;;
7831         esac
7832         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7833 done
7834 LDFLAGS=$cf_rpath_dst
7835
7836 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7837
7838 echo "${as_me:-configure}:7838: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7839
7840 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7841
7842 echo "${as_me:-configure}:7842: testing ...checking LIBS $LIBS ..." 1>&5
7843
7844 cf_rpath_dst=
7845 for cf_rpath_src in $LIBS
7846 do
7847         case $cf_rpath_src in
7848         (-L*)
7849
7850                 # check if this refers to a directory which we will ignore
7851                 cf_rpath_skip=no
7852                 if test -n "$cf_rpath_list"
7853                 then
7854                         for cf_rpath_item in $cf_rpath_list
7855                         do
7856                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7857                                 then
7858                                         cf_rpath_skip=yes
7859                                         break
7860                                 fi
7861                         done
7862                 fi
7863
7864                 if test "$cf_rpath_skip" = no
7865                 then
7866                         # transform the option
7867                         if test "$LD_RPATH_OPT" = "-R " ; then
7868                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7869                         else
7870                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7871                         fi
7872
7873                         # if we have not already added this, add it now
7874                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7875                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7876                         then
7877                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7878
7879 echo "${as_me:-configure}:7879: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7880
7881                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7882                         fi
7883                 fi
7884                 ;;
7885         esac
7886         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7887 done
7888 LIBS=$cf_rpath_dst
7889
7890 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7891
7892 echo "${as_me:-configure}:7892: testing ...checked LIBS $LIBS ..." 1>&5
7893
7894         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7895
7896 echo "${as_me:-configure}:7896: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7897
7898 else
7899         echo "$as_me:7899: result: no" >&5
7900 echo "${ECHO_T}no" >&6
7901 fi
7902
7903 fi
7904
7905 fi
7906
7907 ###############################################################################
7908
7909 ###     use option --with-extra-suffix to append suffix to headers and libraries
7910 echo "$as_me:7910: checking if you wish to append extra suffix to header/library paths" >&5
7911 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7912 EXTRA_SUFFIX=
7913
7914 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7915 if test "${with_extra_suffix+set}" = set; then
7916   withval="$with_extra_suffix"
7917   case x$withval in
7918         (no)
7919                 ;;
7920         (xyes|x)
7921                 EXTRA_SUFFIX=$cf_cv_abi_version
7922                 ;;
7923         (*)
7924                 EXTRA_SUFFIX=$withval
7925                 ;;
7926         esac
7927
7928 fi;
7929 echo "$as_me:7929: result: $EXTRA_SUFFIX" >&5
7930 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7931
7932 ###     use option --disable-overwrite to leave out the link to -lcurses
7933 echo "$as_me:7933: checking if you wish to install ncurses overwriting curses" >&5
7934 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7935
7936 # Check whether --enable-overwrite or --disable-overwrite was given.
7937 if test "${enable_overwrite+set}" = set; then
7938   enableval="$enable_overwrite"
7939   with_overwrite=$enableval
7940 else
7941   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7942 fi;
7943 echo "$as_me:7943: result: $with_overwrite" >&5
7944 echo "${ECHO_T}$with_overwrite" >&6
7945
7946 echo "$as_me:7946: checking if external terminfo-database is used" >&5
7947 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7948
7949 # Check whether --enable-database or --disable-database was given.
7950 if test "${enable_database+set}" = set; then
7951   enableval="$enable_database"
7952   use_database=$enableval
7953 else
7954   use_database=yes
7955 fi;
7956 echo "$as_me:7956: result: $use_database" >&5
7957 echo "${ECHO_T}$use_database" >&6
7958
7959 case $host_os in
7960 (os2*)
7961         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7962         ;;
7963 (*)
7964         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7965         ;;
7966 esac
7967
7968 NCURSES_USE_DATABASE=0
7969 if test "$use_database" != no ; then
7970         NCURSES_USE_DATABASE=1
7971
7972         echo "$as_me:7972: checking which terminfo source-file will be installed" >&5
7973 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7974
7975 # Check whether --with-database or --without-database was given.
7976 if test "${with_database+set}" = set; then
7977   withval="$with_database"
7978   TERMINFO_SRC=$withval
7979 fi;
7980         echo "$as_me:7980: result: $TERMINFO_SRC" >&5
7981 echo "${ECHO_T}$TERMINFO_SRC" >&6
7982
7983         echo "$as_me:7983: checking whether to use hashed database instead of directory/tree" >&5
7984 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7985
7986 # Check whether --with-hashed-db or --without-hashed-db was given.
7987 if test "${with_hashed_db+set}" = set; then
7988   withval="$with_hashed_db"
7989
7990 else
7991   with_hashed_db=no
7992 fi;
7993         echo "$as_me:7993: result: $with_hashed_db" >&5
7994 echo "${ECHO_T}$with_hashed_db" >&6
7995 else
7996         with_hashed_db=no
7997 fi
7998
7999 echo "$as_me:7999: checking for list of fallback descriptions" >&5
8000 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8001
8002 # Check whether --with-fallbacks or --without-fallbacks was given.
8003 if test "${with_fallbacks+set}" = set; then
8004   withval="$with_fallbacks"
8005   with_fallback=$withval
8006 else
8007   with_fallback=
8008 fi;
8009 echo "$as_me:8009: result: $with_fallback" >&5
8010 echo "${ECHO_T}$with_fallback" >&6
8011
8012 case ".$with_fallback" in
8013 (.|.no)
8014         FALLBACK_LIST=
8015         ;;
8016 (.yes)
8017         { echo "$as_me:8017: WARNING: expected a list of terminal descriptions" >&5
8018 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8019         ;;
8020 (*)
8021         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8022         ;;
8023 esac
8024
8025 USE_FALLBACKS=
8026 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8027
8028 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8029 # tree for generating the terminal descriptions that will be compiled into the
8030 # library.  If your toolchain is old, it may not handle current terminal
8031 # databases.  Use configure-options to point to the tools which will be used,
8032 # rather than the first ones found on the $PATH.
8033 if test -n "$FALLBACK_LIST"
8034 then
8035
8036 # Check whether --with-tic-path or --without-tic-path was given.
8037 if test "${with_tic_path+set}" = set; then
8038   withval="$with_tic_path"
8039   echo "$as_me:8039: checking for tic program for fallbacks" >&5
8040 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8041                 TIC=$withval
8042                 echo "$as_me:8042: result: $TIC" >&5
8043 echo "${ECHO_T}$TIC" >&6
8044
8045 if test "x$prefix" != xNONE; then
8046         cf_path_syntax="$prefix"
8047 else
8048         cf_path_syntax="$ac_default_prefix"
8049 fi
8050
8051 case ".$TIC" in
8052 (.\$\(*\)*|.\'*\'*)
8053         ;;
8054 (..|./*|.\\*)
8055         ;;
8056 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8057         ;;
8058 (.\${*prefix}*|.\${*dir}*)
8059         eval TIC="$TIC"
8060         case ".$TIC" in
8061         (.NONE/*)
8062                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8063                 ;;
8064         esac
8065         ;;
8066 (.no|.NONE/*)
8067         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8068         ;;
8069 (*)
8070         { { echo "$as_me:8070: error: expected a pathname, not \"$TIC\"" >&5
8071 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8072    { (exit 1); exit 1; }; }
8073         ;;
8074 esac
8075
8076 else
8077
8078 test -z "$TIC" && TIC=tic
8079 for ac_prog in $TIC tic
8080 do
8081   # Extract the first word of "$ac_prog", so it can be a program name with args.
8082 set dummy $ac_prog; ac_word=$2
8083 echo "$as_me:8083: checking for $ac_word" >&5
8084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8085 if test "${ac_cv_path_TIC+set}" = set; then
8086   echo $ECHO_N "(cached) $ECHO_C" >&6
8087 else
8088   case $TIC in
8089   [\\/]* | ?:[\\/]*)
8090   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8091   ;;
8092   *)
8093   ac_save_IFS=$IFS; IFS=$ac_path_separator
8094 ac_dummy="$PATH:/usr/local/ncurses/bin"
8095 for ac_dir in $ac_dummy; do
8096   IFS=$ac_save_IFS
8097   test -z "$ac_dir" && ac_dir=.
8098   if $as_executable_p "$ac_dir/$ac_word"; then
8099    ac_cv_path_TIC="$ac_dir/$ac_word"
8100    echo "$as_me:8100: found $ac_dir/$ac_word" >&5
8101    break
8102 fi
8103 done
8104
8105   ;;
8106 esac
8107 fi
8108 TIC=$ac_cv_path_TIC
8109
8110 if test -n "$TIC"; then
8111   echo "$as_me:8111: result: $TIC" >&5
8112 echo "${ECHO_T}$TIC" >&6
8113 else
8114   echo "$as_me:8114: result: no" >&5
8115 echo "${ECHO_T}no" >&6
8116 fi
8117
8118   test -n "$TIC" && break
8119 done
8120 test -n "$TIC" || TIC="$TIC"
8121
8122 cf_path_prog=""
8123 cf_path_args=""
8124 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8125 for cf_temp in $ac_cv_path_TIC
8126 do
8127         if test -z "$cf_path_prog" ; then
8128                 if test "$with_full_paths" = yes ; then
8129
8130 if test "x$prefix" != xNONE; then
8131         cf_path_syntax="$prefix"
8132 else
8133         cf_path_syntax="$ac_default_prefix"
8134 fi
8135
8136 case ".$cf_temp" in
8137 (.\$\(*\)*|.\'*\'*)
8138         ;;
8139 (..|./*|.\\*)
8140         ;;
8141 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8142         ;;
8143 (.\${*prefix}*|.\${*dir}*)
8144         eval cf_temp="$cf_temp"
8145         case ".$cf_temp" in
8146         (.NONE/*)
8147                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8148                 ;;
8149         esac
8150         ;;
8151 (.no|.NONE/*)
8152         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8153         ;;
8154 (*)
8155         break
8156         ;;
8157 esac
8158
8159                         cf_path_prog="$cf_temp"
8160                 else
8161                         cf_path_prog="`basename $cf_temp`"
8162                 fi
8163         elif test -z "$cf_path_args" ; then
8164                 cf_path_args="$cf_temp"
8165         else
8166                 cf_path_args="$cf_path_args $cf_temp"
8167         fi
8168 done
8169 IFS="$cf_save_ifs"
8170
8171 if test -n "$cf_path_prog" ; then
8172
8173 echo "${as_me:-configure}:8173: testing defining path for ${cf_path_prog} ..." 1>&5
8174
8175 cat >>confdefs.h <<EOF
8176 #define TIC_PATH "$cf_path_prog"
8177 EOF
8178
8179         test -n "$cf_path_args" &&
8180 cat >>confdefs.h <<EOF
8181 #define TIC_ARGS "$cf_path_args"
8182 EOF
8183
8184 fi
8185
8186                 if test -z "$TIC"
8187                 then
8188                         { echo "$as_me:8188: WARNING: no tic program found for fallbacks" >&5
8189 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8190                 fi
8191
8192 fi;
8193
8194 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8195 if test "${with_infocmp_path+set}" = set; then
8196   withval="$with_infocmp_path"
8197   echo "$as_me:8197: checking for infocmp program for fallbacks" >&5
8198 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8199                 INFOCMP=$withval
8200                 echo "$as_me:8200: result: $INFOCMP" >&5
8201 echo "${ECHO_T}$INFOCMP" >&6
8202
8203 if test "x$prefix" != xNONE; then
8204         cf_path_syntax="$prefix"
8205 else
8206         cf_path_syntax="$ac_default_prefix"
8207 fi
8208
8209 case ".$INFOCMP" in
8210 (.\$\(*\)*|.\'*\'*)
8211         ;;
8212 (..|./*|.\\*)
8213         ;;
8214 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8215         ;;
8216 (.\${*prefix}*|.\${*dir}*)
8217         eval INFOCMP="$INFOCMP"
8218         case ".$INFOCMP" in
8219         (.NONE/*)
8220                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8221                 ;;
8222         esac
8223         ;;
8224 (.no|.NONE/*)
8225         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8226         ;;
8227 (*)
8228         { { echo "$as_me:8228: error: expected a pathname, not \"$INFOCMP\"" >&5
8229 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8230    { (exit 1); exit 1; }; }
8231         ;;
8232 esac
8233
8234 else
8235
8236 test -z "$INFOCMP" && INFOCMP=infocmp
8237 for ac_prog in $INFOCMP infocmp
8238 do
8239   # Extract the first word of "$ac_prog", so it can be a program name with args.
8240 set dummy $ac_prog; ac_word=$2
8241 echo "$as_me:8241: checking for $ac_word" >&5
8242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8243 if test "${ac_cv_path_INFOCMP+set}" = set; then
8244   echo $ECHO_N "(cached) $ECHO_C" >&6
8245 else
8246   case $INFOCMP in
8247   [\\/]* | ?:[\\/]*)
8248   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8249   ;;
8250   *)
8251   ac_save_IFS=$IFS; IFS=$ac_path_separator
8252 ac_dummy="$PATH:/usr/local/ncurses/bin"
8253 for ac_dir in $ac_dummy; do
8254   IFS=$ac_save_IFS
8255   test -z "$ac_dir" && ac_dir=.
8256   if $as_executable_p "$ac_dir/$ac_word"; then
8257    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8258    echo "$as_me:8258: found $ac_dir/$ac_word" >&5
8259    break
8260 fi
8261 done
8262
8263   ;;
8264 esac
8265 fi
8266 INFOCMP=$ac_cv_path_INFOCMP
8267
8268 if test -n "$INFOCMP"; then
8269   echo "$as_me:8269: result: $INFOCMP" >&5
8270 echo "${ECHO_T}$INFOCMP" >&6
8271 else
8272   echo "$as_me:8272: result: no" >&5
8273 echo "${ECHO_T}no" >&6
8274 fi
8275
8276   test -n "$INFOCMP" && break
8277 done
8278 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8279
8280 cf_path_prog=""
8281 cf_path_args=""
8282 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8283 for cf_temp in $ac_cv_path_INFOCMP
8284 do
8285         if test -z "$cf_path_prog" ; then
8286                 if test "$with_full_paths" = yes ; then
8287
8288 if test "x$prefix" != xNONE; then
8289         cf_path_syntax="$prefix"
8290 else
8291         cf_path_syntax="$ac_default_prefix"
8292 fi
8293
8294 case ".$cf_temp" in
8295 (.\$\(*\)*|.\'*\'*)
8296         ;;
8297 (..|./*|.\\*)
8298         ;;
8299 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8300         ;;
8301 (.\${*prefix}*|.\${*dir}*)
8302         eval cf_temp="$cf_temp"
8303         case ".$cf_temp" in
8304         (.NONE/*)
8305                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8306                 ;;
8307         esac
8308         ;;
8309 (.no|.NONE/*)
8310         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8311         ;;
8312 (*)
8313         break
8314         ;;
8315 esac
8316
8317                         cf_path_prog="$cf_temp"
8318                 else
8319                         cf_path_prog="`basename $cf_temp`"
8320                 fi
8321         elif test -z "$cf_path_args" ; then
8322                 cf_path_args="$cf_temp"
8323         else
8324                 cf_path_args="$cf_path_args $cf_temp"
8325         fi
8326 done
8327 IFS="$cf_save_ifs"
8328
8329 if test -n "$cf_path_prog" ; then
8330
8331 echo "${as_me:-configure}:8331: testing defining path for ${cf_path_prog} ..." 1>&5
8332
8333 cat >>confdefs.h <<EOF
8334 #define INFOCMP_PATH "$cf_path_prog"
8335 EOF
8336
8337         test -n "$cf_path_args" &&
8338 cat >>confdefs.h <<EOF
8339 #define INFOCMP_ARGS "$cf_path_args"
8340 EOF
8341
8342 fi
8343
8344                 if test -z "$INFOCMP"
8345                 then
8346                         { echo "$as_me:8346: WARNING: no infocmp program found for fallbacks" >&5
8347 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8348                 fi
8349
8350 fi;
8351
8352 else
8353         : ${TIC:=tic}
8354         : ${INFOCMP:=infocmp}
8355 fi
8356
8357 echo "$as_me:8357: checking if you want modern xterm or antique" >&5
8358 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8359
8360 # Check whether --with-xterm-new or --without-xterm-new was given.
8361 if test "${with_xterm_new+set}" = set; then
8362   withval="$with_xterm_new"
8363   with_xterm_new=$withval
8364 else
8365   with_xterm_new=yes
8366 fi;
8367 case $with_xterm_new in
8368 (no) with_xterm_new=xterm-old;;
8369 (*)      with_xterm_new=xterm-new;;
8370 esac
8371 echo "$as_me:8371: result: $with_xterm_new" >&5
8372 echo "${ECHO_T}$with_xterm_new" >&6
8373 WHICH_XTERM=$with_xterm_new
8374
8375 echo "$as_me:8375: checking if xterm backspace sends BS or DEL" >&5
8376 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8377
8378 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8379 if test "${with_xterm_kbs+set}" = set; then
8380   withval="$with_xterm_kbs"
8381   with_xterm_kbs=$withval
8382 else
8383   with_xterm_kbs=BS
8384 fi;
8385 case x$with_xterm_kbs in
8386 (xyes|xno|xBS|xbs|x8)
8387         with_xterm_kbs=BS
8388         ;;
8389 (xDEL|xdel|x127)
8390         with_xterm_kbs=DEL
8391         ;;
8392 (*)
8393         with_xterm_kbs=$withval
8394         ;;
8395 esac
8396 echo "$as_me:8396: result: $with_xterm_kbs" >&5
8397 echo "${ECHO_T}$with_xterm_kbs" >&6
8398 XTERM_KBS=$with_xterm_kbs
8399
8400 MAKE_TERMINFO=
8401 if test "$use_database" = no ; then
8402         TERMINFO="${datadir}/terminfo"
8403         MAKE_TERMINFO="#"
8404 else
8405
8406 echo "$as_me:8406: checking for list of terminfo directories" >&5
8407 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8408
8409 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8410 if test "${with_terminfo_dirs+set}" = set; then
8411   withval="$with_terminfo_dirs"
8412
8413 else
8414   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8415 fi;
8416 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8417 cf_dst_path=
8418 for cf_src_path in $withval
8419 do
8420
8421 if test "x$prefix" != xNONE; then
8422         cf_path_syntax="$prefix"
8423 else
8424         cf_path_syntax="$ac_default_prefix"
8425 fi
8426
8427 case ".$cf_src_path" in
8428 (.\$\(*\)*|.\'*\'*)
8429         ;;
8430 (..|./*|.\\*)
8431         ;;
8432 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8433         ;;
8434 (.\${*prefix}*|.\${*dir}*)
8435         eval cf_src_path="$cf_src_path"
8436         case ".$cf_src_path" in
8437         (.NONE/*)
8438                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8439                 ;;
8440         esac
8441         ;;
8442 (.no|.NONE/*)
8443         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8444         ;;
8445 (*)
8446         { { echo "$as_me:8446: error: expected a pathname, not \"$cf_src_path\"" >&5
8447 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8448    { (exit 1); exit 1; }; }
8449         ;;
8450 esac
8451
8452   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8453   cf_dst_path="${cf_dst_path}${cf_src_path}"
8454 done
8455 IFS="$ac_save_ifs"
8456
8457 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8458 # so we have to check/work around.  We do prefer the result of "eval"...
8459 eval cf_dst_eval="$cf_dst_path"
8460 case "x$cf_dst_eval" in
8461 (xNONE*)
8462         TERMINFO_DIRS=$cf_dst_path
8463         ;;
8464 (*)
8465         TERMINFO_DIRS="$cf_dst_eval"
8466         ;;
8467 esac
8468
8469 echo "$as_me:8469: result: $TERMINFO_DIRS" >&5
8470 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8471 test -n "$TERMINFO_DIRS" &&
8472 cat >>confdefs.h <<EOF
8473 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8474 EOF
8475
8476 case "x$TERMINFO" in
8477 x???:*)
8478         { echo "$as_me:8478: WARNING: ignoring non-directory/file TERMINFO value" >&5
8479 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8480         unset TERMINFO
8481         ;;
8482 esac
8483
8484 echo "$as_me:8484: checking for default terminfo directory" >&5
8485 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8486
8487 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8488 if test "${with_default_terminfo_dir+set}" = set; then
8489   withval="$with_default_terminfo_dir"
8490
8491 else
8492   withval="${TERMINFO:-${datadir}/terminfo}"
8493 fi; if test -n "${datadir}/terminfo" ; then
8494
8495 if test "x$prefix" != xNONE; then
8496         cf_path_syntax="$prefix"
8497 else
8498         cf_path_syntax="$ac_default_prefix"
8499 fi
8500
8501 case ".$withval" in
8502 (.\$\(*\)*|.\'*\'*)
8503         ;;
8504 (..|./*|.\\*)
8505         ;;
8506 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8507         ;;
8508 (.\${*prefix}*|.\${*dir}*)
8509         eval withval="$withval"
8510         case ".$withval" in
8511         (.NONE/*)
8512                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8513                 ;;
8514         esac
8515         ;;
8516 (.no|.NONE/*)
8517         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8518         ;;
8519 (*)
8520         { { echo "$as_me:8520: error: expected a pathname, not \"$withval\"" >&5
8521 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8522    { (exit 1); exit 1; }; }
8523         ;;
8524 esac
8525
8526 fi
8527 eval TERMINFO="$withval"
8528
8529 echo "$as_me:8529: result: $TERMINFO" >&5
8530 echo "${ECHO_T}$TERMINFO" >&6
8531
8532 cat >>confdefs.h <<EOF
8533 #define TERMINFO "$TERMINFO"
8534 EOF
8535
8536 fi
8537
8538 ###     use option --disable-big-core to make tic run on small machines
8539 ###     We need 4Mb, check if we can allocate 50% more than that.
8540 echo "$as_me:8540: checking if big-core option selected" >&5
8541 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8542
8543 # Check whether --enable-big-core or --disable-big-core was given.
8544 if test "${enable_big_core+set}" = set; then
8545   enableval="$enable_big_core"
8546   with_big_core=$enableval
8547 else
8548   if test "$cross_compiling" = yes; then
8549   with_big_core=no
8550 else
8551   cat >conftest.$ac_ext <<_ACEOF
8552 #line 8552 "configure"
8553 #include "confdefs.h"
8554
8555 #include <stdlib.h>
8556 #include <string.h>
8557 int main() {
8558         unsigned long n = 6000000L;
8559         char *s = malloc(n);
8560         if (s != 0)
8561                 s[0] = s[n-1] = 0;
8562         ${cf_cv_main_return:-return}(s == 0);
8563 }
8564 _ACEOF
8565 rm -f conftest$ac_exeext
8566 if { (eval echo "$as_me:8566: \"$ac_link\"") >&5
8567   (eval $ac_link) 2>&5
8568   ac_status=$?
8569   echo "$as_me:8569: \$? = $ac_status" >&5
8570   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8571   { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8572   (eval $ac_try) 2>&5
8573   ac_status=$?
8574   echo "$as_me:8574: \$? = $ac_status" >&5
8575   (exit $ac_status); }; }; then
8576   with_big_core=yes
8577 else
8578   echo "$as_me: program exited with status $ac_status" >&5
8579 echo "$as_me: failed program was:" >&5
8580 cat conftest.$ac_ext >&5
8581 with_big_core=no
8582 fi
8583 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8584 fi
8585 fi;
8586 echo "$as_me:8586: result: $with_big_core" >&5
8587 echo "${ECHO_T}$with_big_core" >&6
8588 test "x$with_big_core" = "xyes" &&
8589 cat >>confdefs.h <<\EOF
8590 #define HAVE_BIG_CORE 1
8591 EOF
8592
8593 ### ISO C only guarantees 512-char strings, we have tables which load faster
8594 ### when constructed using "big" strings.  More than the C compiler, the awk
8595 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8596 echo "$as_me:8596: checking if big-strings option selected" >&5
8597 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8598
8599 # Check whether --enable-big-strings or --disable-big-strings was given.
8600 if test "${enable_big_strings+set}" = set; then
8601   enableval="$enable_big_strings"
8602   with_big_strings=$enableval
8603 else
8604
8605         case x$AWK in
8606         (x)
8607                 eval with_big_strings=no
8608                 ;;
8609         (*)
8610                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8611                         | $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
8612                         eval with_big_strings=yes
8613                 else
8614                         eval with_big_strings=no
8615                 fi
8616                 ;;
8617         esac
8618
8619 fi;
8620 echo "$as_me:8620: result: $with_big_strings" >&5
8621 echo "${ECHO_T}$with_big_strings" >&6
8622
8623 USE_BIG_STRINGS=0
8624 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8625
8626 ###     use option --enable-termcap to compile in the termcap fallback support
8627 echo "$as_me:8627: checking if you want termcap-fallback support" >&5
8628 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8629
8630 # Check whether --enable-termcap or --disable-termcap was given.
8631 if test "${enable_termcap+set}" = set; then
8632   enableval="$enable_termcap"
8633   with_termcap=$enableval
8634 else
8635   with_termcap=no
8636 fi;
8637 echo "$as_me:8637: result: $with_termcap" >&5
8638 echo "${ECHO_T}$with_termcap" >&6
8639
8640 NCURSES_USE_TERMCAP=0
8641 if test "x$with_termcap" != "xyes" ; then
8642         if test "$use_database" = no ; then
8643                 if test -z "$with_fallback" ; then
8644                         { { echo "$as_me:8644: error: You have disabled the database w/o specifying fallbacks" >&5
8645 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8646    { (exit 1); exit 1; }; }
8647                 fi
8648         fi
8649
8650 cat >>confdefs.h <<\EOF
8651 #define PURE_TERMINFO 1
8652 EOF
8653
8654 else
8655
8656         if test "$with_ticlib" != no ; then
8657                 { { echo "$as_me:8657: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8658 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8659    { (exit 1); exit 1; }; }
8660         fi
8661
8662         NCURSES_USE_TERMCAP=1
8663         echo "$as_me:8663: checking for list of termcap files" >&5
8664 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8665
8666 # Check whether --with-termpath or --without-termpath was given.
8667 if test "${with_termpath+set}" = set; then
8668   withval="$with_termpath"
8669
8670 else
8671   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8672 fi;
8673 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8674 cf_dst_path=
8675 for cf_src_path in $withval
8676 do
8677
8678 if test "x$prefix" != xNONE; then
8679         cf_path_syntax="$prefix"
8680 else
8681         cf_path_syntax="$ac_default_prefix"
8682 fi
8683
8684 case ".$cf_src_path" in
8685 (.\$\(*\)*|.\'*\'*)
8686         ;;
8687 (..|./*|.\\*)
8688         ;;
8689 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8690         ;;
8691 (.\${*prefix}*|.\${*dir}*)
8692         eval cf_src_path="$cf_src_path"
8693         case ".$cf_src_path" in
8694         (.NONE/*)
8695                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8696                 ;;
8697         esac
8698         ;;
8699 (.no|.NONE/*)
8700         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8701         ;;
8702 (*)
8703         { { echo "$as_me:8703: error: expected a pathname, not \"$cf_src_path\"" >&5
8704 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8705    { (exit 1); exit 1; }; }
8706         ;;
8707 esac
8708
8709   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8710   cf_dst_path="${cf_dst_path}${cf_src_path}"
8711 done
8712 IFS="$ac_save_ifs"
8713
8714 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8715 # so we have to check/work around.  We do prefer the result of "eval"...
8716 eval cf_dst_eval="$cf_dst_path"
8717 case "x$cf_dst_eval" in
8718 (xNONE*)
8719         TERMPATH=$cf_dst_path
8720         ;;
8721 (*)
8722         TERMPATH="$cf_dst_eval"
8723         ;;
8724 esac
8725
8726         echo "$as_me:8726: result: $TERMPATH" >&5
8727 echo "${ECHO_T}$TERMPATH" >&6
8728         test -n "$TERMPATH" &&
8729 cat >>confdefs.h <<EOF
8730 #define TERMPATH "$TERMPATH"
8731 EOF
8732
8733         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8734         echo "$as_me:8734: checking if fast termcap-loader is needed" >&5
8735 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8736
8737 # Check whether --enable-getcap or --disable-getcap was given.
8738 if test "${enable_getcap+set}" = set; then
8739   enableval="$enable_getcap"
8740   with_getcap=$enableval
8741 else
8742   with_getcap=no
8743 fi;
8744         echo "$as_me:8744: result: $with_getcap" >&5
8745 echo "${ECHO_T}$with_getcap" >&6
8746         test "x$with_getcap" = "xyes" &&
8747 cat >>confdefs.h <<\EOF
8748 #define USE_GETCAP 1
8749 EOF
8750
8751         echo "$as_me:8751: checking if translated termcaps will be cached in ~/.terminfo" >&5
8752 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8753
8754 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8755 if test "${enable_getcap_cache+set}" = set; then
8756   enableval="$enable_getcap_cache"
8757   with_getcap_cache=$enableval
8758 else
8759   with_getcap_cache=no
8760 fi;
8761         echo "$as_me:8761: result: $with_getcap_cache" >&5
8762 echo "${ECHO_T}$with_getcap_cache" >&6
8763         test "x$with_getcap_cache" = "xyes" &&
8764 cat >>confdefs.h <<\EOF
8765 #define USE_GETCAP_CACHE 1
8766 EOF
8767
8768 fi
8769
8770 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8771 echo "$as_me:8771: checking if ~/.terminfo is wanted" >&5
8772 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8773
8774 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8775 if test "${enable_home_terminfo+set}" = set; then
8776   enableval="$enable_home_terminfo"
8777   with_home_terminfo=$enableval
8778 else
8779   with_home_terminfo=yes
8780 fi;
8781 echo "$as_me:8781: result: $with_home_terminfo" >&5
8782 echo "${ECHO_T}$with_home_terminfo" >&6
8783 test "x$with_home_terminfo" = "xyes" &&
8784 cat >>confdefs.h <<\EOF
8785 #define USE_HOME_TERMINFO 1
8786 EOF
8787
8788 echo "$as_me:8788: checking if you want to use restricted environment when running as root" >&5
8789 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8790
8791 # Check whether --enable-root-environ or --disable-root-environ was given.
8792 if test "${enable_root_environ+set}" = set; then
8793   enableval="$enable_root_environ"
8794   with_root_environ=$enableval
8795 else
8796   with_root_environ=yes
8797 fi;
8798 echo "$as_me:8798: result: $with_root_environ" >&5
8799 echo "${ECHO_T}$with_root_environ" >&6
8800 test "x$with_root_environ" = xyes &&
8801 cat >>confdefs.h <<\EOF
8802 #define USE_ROOT_ENVIRON 1
8803 EOF
8804
8805 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8806 ###   to reduce storage requirements for the terminfo database.
8807
8808 for ac_header in \
8809 unistd.h \
8810
8811 do
8812 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8813 echo "$as_me:8813: checking for $ac_header" >&5
8814 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8815 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8816   echo $ECHO_N "(cached) $ECHO_C" >&6
8817 else
8818   cat >conftest.$ac_ext <<_ACEOF
8819 #line 8819 "configure"
8820 #include "confdefs.h"
8821 #include <$ac_header>
8822 _ACEOF
8823 if { (eval echo "$as_me:8823: \"$ac_cpp conftest.$ac_ext\"") >&5
8824   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8825   ac_status=$?
8826   egrep -v '^ *\+' conftest.er1 >conftest.err
8827   rm -f conftest.er1
8828   cat conftest.err >&5
8829   echo "$as_me:8829: \$? = $ac_status" >&5
8830   (exit $ac_status); } >/dev/null; then
8831   if test -s conftest.err; then
8832     ac_cpp_err=$ac_c_preproc_warn_flag
8833   else
8834     ac_cpp_err=
8835   fi
8836 else
8837   ac_cpp_err=yes
8838 fi
8839 if test -z "$ac_cpp_err"; then
8840   eval "$as_ac_Header=yes"
8841 else
8842   echo "$as_me: failed program was:" >&5
8843   cat conftest.$ac_ext >&5
8844   eval "$as_ac_Header=no"
8845 fi
8846 rm -f conftest.err conftest.$ac_ext
8847 fi
8848 echo "$as_me:8848: result: `eval echo '${'$as_ac_Header'}'`" >&5
8849 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8850 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8851   cat >>confdefs.h <<EOF
8852 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8853 EOF
8854
8855 fi
8856 done
8857
8858 for ac_func in \
8859         remove \
8860         unlink
8861 do
8862 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8863 echo "$as_me:8863: checking for $ac_func" >&5
8864 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8865 if eval "test \"\${$as_ac_var+set}\" = set"; then
8866   echo $ECHO_N "(cached) $ECHO_C" >&6
8867 else
8868   cat >conftest.$ac_ext <<_ACEOF
8869 #line 8869 "configure"
8870 #include "confdefs.h"
8871 #define $ac_func autoconf_temporary
8872 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8873 #undef $ac_func
8874
8875 #ifdef __cplusplus
8876 extern "C"
8877 #endif
8878
8879 /* We use char because int might match the return type of a gcc2
8880    builtin and then its argument prototype would still apply.  */
8881 char $ac_func (void);
8882
8883 int
8884 main (void)
8885 {
8886
8887 /* The GNU C library defines stubs for functions which it implements
8888     to always fail with ENOSYS.  Some functions are actually named
8889     something starting with __ and the normal name is an alias.  */
8890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8891 #error found stub for $ac_func
8892 #endif
8893
8894         return $ac_func ();
8895   ;
8896   return 0;
8897 }
8898 _ACEOF
8899 rm -f conftest.$ac_objext conftest$ac_exeext
8900 if { (eval echo "$as_me:8900: \"$ac_link\"") >&5
8901   (eval $ac_link) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); } &&
8905          { ac_try='test -s conftest$ac_exeext'
8906   { (eval echo "$as_me:8906: \"$ac_try\"") >&5
8907   (eval $ac_try) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); }; }; then
8911   eval "$as_ac_var=yes"
8912 else
8913   echo "$as_me: failed program was:" >&5
8914 cat conftest.$ac_ext >&5
8915 eval "$as_ac_var=no"
8916 fi
8917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8918 fi
8919 echo "$as_me:8919: result: `eval echo '${'$as_ac_var'}'`" >&5
8920 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8921 if test `eval echo '${'$as_ac_var'}'` = yes; then
8922   cat >>confdefs.h <<EOF
8923 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8924 EOF
8925
8926 fi
8927 done
8928
8929 if test "$cross_compiling" = yes ; then
8930
8931 for ac_func in \
8932                 link \
8933                 symlink
8934 do
8935 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8936 echo "$as_me:8936: checking for $ac_func" >&5
8937 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8938 if eval "test \"\${$as_ac_var+set}\" = set"; then
8939   echo $ECHO_N "(cached) $ECHO_C" >&6
8940 else
8941   cat >conftest.$ac_ext <<_ACEOF
8942 #line 8942 "configure"
8943 #include "confdefs.h"
8944 #define $ac_func autoconf_temporary
8945 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8946 #undef $ac_func
8947
8948 #ifdef __cplusplus
8949 extern "C"
8950 #endif
8951
8952 /* We use char because int might match the return type of a gcc2
8953    builtin and then its argument prototype would still apply.  */
8954 char $ac_func (void);
8955
8956 int
8957 main (void)
8958 {
8959
8960 /* The GNU C library defines stubs for functions which it implements
8961     to always fail with ENOSYS.  Some functions are actually named
8962     something starting with __ and the normal name is an alias.  */
8963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8964 #error found stub for $ac_func
8965 #endif
8966
8967         return $ac_func ();
8968   ;
8969   return 0;
8970 }
8971 _ACEOF
8972 rm -f conftest.$ac_objext conftest$ac_exeext
8973 if { (eval echo "$as_me:8973: \"$ac_link\"") >&5
8974   (eval $ac_link) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); } &&
8978          { ac_try='test -s conftest$ac_exeext'
8979   { (eval echo "$as_me:8979: \"$ac_try\"") >&5
8980   (eval $ac_try) 2>&5
8981   ac_status=$?
8982   echo "$as_me:8982: \$? = $ac_status" >&5
8983   (exit $ac_status); }; }; then
8984   eval "$as_ac_var=yes"
8985 else
8986   echo "$as_me: failed program was:" >&5
8987 cat conftest.$ac_ext >&5
8988 eval "$as_ac_var=no"
8989 fi
8990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8991 fi
8992 echo "$as_me:8992: result: `eval echo '${'$as_ac_var'}'`" >&5
8993 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8994 if test `eval echo '${'$as_ac_var'}'` = yes; then
8995   cat >>confdefs.h <<EOF
8996 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8997 EOF
8998
8999 fi
9000 done
9001
9002 else
9003         echo "$as_me:9003: checking if link/symlink functions work" >&5
9004 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9005 if test "${cf_cv_link_funcs+set}" = set; then
9006   echo $ECHO_N "(cached) $ECHO_C" >&6
9007 else
9008
9009                 cf_cv_link_funcs=
9010                 for cf_func in link symlink ; do
9011                         if test "$cross_compiling" = yes; then
9012
9013                         eval 'ac_cv_func_'$cf_func'=error'
9014 else
9015   cat >conftest.$ac_ext <<_ACEOF
9016 #line 9016 "configure"
9017 #include "confdefs.h"
9018
9019 #include <sys/types.h>
9020 #include <sys/stat.h>
9021 #ifdef HAVE_UNISTD_H
9022 #include <unistd.h>
9023 #endif
9024 int main(void)
9025 {
9026         int fail = 0;
9027         char *src = "config.log";
9028         char *dst = "conftest.chk";
9029         struct stat src_sb;
9030         struct stat dst_sb;
9031
9032         stat(src, &src_sb);
9033         fail = ($cf_func("config.log", "conftest.chk") < 0)
9034             || (stat(dst, &dst_sb) < 0)
9035             || (dst_sb.st_mtime != src_sb.st_mtime);
9036 #ifdef HAVE_UNLINK
9037         unlink(dst);
9038 #else
9039         remove(dst);
9040 #endif
9041         ${cf_cv_main_return:-return} (fail);
9042 }
9043
9044 _ACEOF
9045 rm -f conftest$ac_exeext
9046 if { (eval echo "$as_me:9046: \"$ac_link\"") >&5
9047   (eval $ac_link) 2>&5
9048   ac_status=$?
9049   echo "$as_me:9049: \$? = $ac_status" >&5
9050   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9051   { (eval echo "$as_me:9051: \"$ac_try\"") >&5
9052   (eval $ac_try) 2>&5
9053   ac_status=$?
9054   echo "$as_me:9054: \$? = $ac_status" >&5
9055   (exit $ac_status); }; }; then
9056
9057                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9058                         eval 'ac_cv_func_'$cf_func'=yes'
9059 else
9060   echo "$as_me: program exited with status $ac_status" >&5
9061 echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063
9064                         eval 'ac_cv_func_'$cf_func'=no'
9065 fi
9066 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9067 fi
9068                 done
9069                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9070
9071 fi
9072 echo "$as_me:9072: result: $cf_cv_link_funcs" >&5
9073 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9074         test "$ac_cv_func_link"    = yes &&
9075 cat >>confdefs.h <<\EOF
9076 #define HAVE_LINK 1
9077 EOF
9078
9079         test "$ac_cv_func_symlink" = yes &&
9080 cat >>confdefs.h <<\EOF
9081 #define HAVE_SYMLINK 1
9082 EOF
9083
9084 fi
9085
9086 with_links=no
9087 with_symlinks=no
9088
9089 # soft links (symbolic links) are useful for some systems where hard links do
9090 # not work, or to make it simpler to copy terminfo trees around.
9091 if test "x$ac_cv_func_symlink" = xyes ; then
9092         echo "$as_me:9092: checking if tic should use symbolic links" >&5
9093 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9094
9095 # Check whether --enable-symlinks or --disable-symlinks was given.
9096 if test "${enable_symlinks+set}" = set; then
9097   enableval="$enable_symlinks"
9098   with_symlinks=$enableval
9099 else
9100   with_symlinks=no
9101 fi;
9102         echo "$as_me:9102: result: $with_symlinks" >&5
9103 echo "${ECHO_T}$with_symlinks" >&6
9104 fi
9105
9106 # If we have hard links and did not choose to use soft links instead, there is
9107 # no reason to make this choice optional - use the hard links.
9108 if test "$with_symlinks" = no ; then
9109         echo "$as_me:9109: checking if tic should use hard links" >&5
9110 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9111         if test "x$ac_cv_func_link" = xyes ; then
9112                 with_links=yes
9113         else
9114                 with_links=no
9115         fi
9116         echo "$as_me:9116: result: $with_links" >&5
9117 echo "${ECHO_T}$with_links" >&6
9118 fi
9119
9120 test "x$with_links" = xyes &&
9121 cat >>confdefs.h <<\EOF
9122 #define USE_LINKS 1
9123 EOF
9124
9125 test "x$with_symlinks" = xyes &&
9126 cat >>confdefs.h <<\EOF
9127 #define USE_SYMLINKS 1
9128 EOF
9129
9130 ###   use option --enable-broken-linker to force on use of broken-linker support
9131 echo "$as_me:9131: checking if you want broken-linker support code" >&5
9132 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9133
9134 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9135 if test "${enable_broken_linker+set}" = set; then
9136   enableval="$enable_broken_linker"
9137   with_broken_linker=$enableval
9138 else
9139   with_broken_linker=${BROKEN_LINKER:-no}
9140 fi;
9141 echo "$as_me:9141: result: $with_broken_linker" >&5
9142 echo "${ECHO_T}$with_broken_linker" >&6
9143
9144 BROKEN_LINKER=0
9145 if test "x$with_broken_linker" = xyes ; then
9146
9147 cat >>confdefs.h <<\EOF
9148 #define BROKEN_LINKER 1
9149 EOF
9150
9151         BROKEN_LINKER=1
9152 elif test "$DFT_LWR_MODEL" = shared ; then
9153         case $cf_cv_system_name in
9154         (cygwin*)
9155
9156 cat >>confdefs.h <<\EOF
9157 #define BROKEN_LINKER 1
9158 EOF
9159
9160                 BROKEN_LINKER=1
9161                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
9162
9163 echo "${as_me:-configure}:9163: testing cygwin linker is broken anyway ..." 1>&5
9164
9165                 ;;
9166         esac
9167 fi
9168
9169 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9170 echo "$as_me:9170: checking if tputs should process BSD-style prefix padding" >&5
9171 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9172
9173 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9174 if test "${enable_bsdpad+set}" = set; then
9175   enableval="$enable_bsdpad"
9176   with_bsdpad=$enableval
9177 else
9178   with_bsdpad=no
9179 fi;
9180 echo "$as_me:9180: result: $with_bsdpad" >&5
9181 echo "${ECHO_T}$with_bsdpad" >&6
9182 test "x$with_bsdpad" = xyes &&
9183 cat >>confdefs.h <<\EOF
9184 #define BSD_TPUTS 1
9185 EOF
9186
9187 ###   use option --enable-widec to turn on use of wide-character support
9188 NCURSES_CH_T=chtype
9189 NCURSES_LIBUTF8=0
9190
9191 NEED_WCHAR_H=0
9192 NCURSES_MBSTATE_T=0
9193 NCURSES_WCHAR_T=0
9194 NCURSES_WINT_T=0
9195
9196 # Check to define _XOPEN_SOURCE "automatically"
9197 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9198
9199 echo "$as_me:9199: checking if the POSIX test-macros are already defined" >&5
9200 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9201 if test "${cf_cv_posix_visible+set}" = set; then
9202   echo $ECHO_N "(cached) $ECHO_C" >&6
9203 else
9204
9205 cat >conftest.$ac_ext <<_ACEOF
9206 #line 9206 "configure"
9207 #include "confdefs.h"
9208 #include <stdio.h>
9209 int
9210 main (void)
9211 {
9212
9213 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9214         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9215         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9216         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9217 #error conflicting symbols found
9218 #endif
9219
9220   ;
9221   return 0;
9222 }
9223 _ACEOF
9224 rm -f conftest.$ac_objext
9225 if { (eval echo "$as_me:9225: \"$ac_compile\"") >&5
9226   (eval $ac_compile) 2>&5
9227   ac_status=$?
9228   echo "$as_me:9228: \$? = $ac_status" >&5
9229   (exit $ac_status); } &&
9230          { ac_try='test -s conftest.$ac_objext'
9231   { (eval echo "$as_me:9231: \"$ac_try\"") >&5
9232   (eval $ac_try) 2>&5
9233   ac_status=$?
9234   echo "$as_me:9234: \$? = $ac_status" >&5
9235   (exit $ac_status); }; }; then
9236   cf_cv_posix_visible=no
9237 else
9238   echo "$as_me: failed program was:" >&5
9239 cat conftest.$ac_ext >&5
9240 cf_cv_posix_visible=yes
9241 fi
9242 rm -f conftest.$ac_objext conftest.$ac_ext
9243
9244 fi
9245 echo "$as_me:9245: result: $cf_cv_posix_visible" >&5
9246 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9247
9248 if test "$cf_cv_posix_visible" = no; then
9249
9250 cf_XOPEN_SOURCE=600
9251 cf_POSIX_C_SOURCE=199506L
9252 cf_xopen_source=
9253
9254 case $host_os in
9255 (aix[4-7]*)
9256         cf_xopen_source="-D_ALL_SOURCE"
9257         ;;
9258 (msys)
9259         cf_XOPEN_SOURCE=600
9260         ;;
9261 (darwin[0-8].*)
9262         cf_xopen_source="-D_APPLE_C_SOURCE"
9263         ;;
9264 (darwin*)
9265         cf_xopen_source="-D_DARWIN_C_SOURCE"
9266         cf_XOPEN_SOURCE=
9267         ;;
9268 (freebsd*|dragonfly*|midnightbsd*)
9269         # 5.x headers associate
9270         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9271         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9272         cf_POSIX_C_SOURCE=200112L
9273         cf_XOPEN_SOURCE=600
9274         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9275         ;;
9276 (hpux11*)
9277         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9278         ;;
9279 (hpux*)
9280         cf_xopen_source="-D_HPUX_SOURCE"
9281         ;;
9282 (irix[56].*)
9283         cf_xopen_source="-D_SGI_SOURCE"
9284         cf_XOPEN_SOURCE=
9285         ;;
9286 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9287
9288 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9289
9290 echo "$as_me:9290: checking if this is the GNU C library" >&5
9291 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9292 if test "${cf_cv_gnu_library+set}" = set; then
9293   echo $ECHO_N "(cached) $ECHO_C" >&6
9294 else
9295
9296 cat >conftest.$ac_ext <<_ACEOF
9297 #line 9297 "configure"
9298 #include "confdefs.h"
9299 #include <sys/types.h>
9300 int
9301 main (void)
9302 {
9303
9304         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9305                 return 0;
9306         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9307                 return 0;
9308         #else
9309         #       error not GNU C library
9310         #endif
9311   ;
9312   return 0;
9313 }
9314 _ACEOF
9315 rm -f conftest.$ac_objext
9316 if { (eval echo "$as_me:9316: \"$ac_compile\"") >&5
9317   (eval $ac_compile) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit $ac_status); } &&
9321          { ac_try='test -s conftest.$ac_objext'
9322   { (eval echo "$as_me:9322: \"$ac_try\"") >&5
9323   (eval $ac_try) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit $ac_status); }; }; then
9327   cf_cv_gnu_library=yes
9328 else
9329   echo "$as_me: failed program was:" >&5
9330 cat conftest.$ac_ext >&5
9331 cf_cv_gnu_library=no
9332 fi
9333 rm -f conftest.$ac_objext conftest.$ac_ext
9334
9335 fi
9336 echo "$as_me:9336: result: $cf_cv_gnu_library" >&5
9337 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9338
9339 if test x$cf_cv_gnu_library = xyes; then
9340
9341         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9342         # was changed to help a little.  newlib incorporated the change about 4
9343         # years later.
9344         echo "$as_me:9344: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9345 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9346 if test "${cf_cv_gnu_library_219+set}" = set; then
9347   echo $ECHO_N "(cached) $ECHO_C" >&6
9348 else
9349
9350                 cf_save="$CPPFLAGS"
9351
9352         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9353         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9354
9355                 cat >conftest.$ac_ext <<_ACEOF
9356 #line 9356 "configure"
9357 #include "confdefs.h"
9358 #include <sys/types.h>
9359 int
9360 main (void)
9361 {
9362
9363                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9364                                 return 0;
9365                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9366                                 return 0;
9367                         #else
9368                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9369                         #endif
9370   ;
9371   return 0;
9372 }
9373 _ACEOF
9374 rm -f conftest.$ac_objext
9375 if { (eval echo "$as_me:9375: \"$ac_compile\"") >&5
9376   (eval $ac_compile) 2>&5
9377   ac_status=$?
9378   echo "$as_me:9378: \$? = $ac_status" >&5
9379   (exit $ac_status); } &&
9380          { ac_try='test -s conftest.$ac_objext'
9381   { (eval echo "$as_me:9381: \"$ac_try\"") >&5
9382   (eval $ac_try) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); }; }; then
9386   cf_cv_gnu_library_219=yes
9387 else
9388   echo "$as_me: failed program was:" >&5
9389 cat conftest.$ac_ext >&5
9390 cf_cv_gnu_library_219=no
9391 fi
9392 rm -f conftest.$ac_objext conftest.$ac_ext
9393                 CPPFLAGS="$cf_save"
9394
9395 fi
9396 echo "$as_me:9396: result: $cf_cv_gnu_library_219" >&5
9397 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9398
9399         if test "x$cf_cv_gnu_library_219" = xyes; then
9400                 cf_save="$CPPFLAGS"
9401                 echo "$as_me:9401: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9402 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9403 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9404   echo $ECHO_N "(cached) $ECHO_C" >&6
9405 else
9406
9407 cf_fix_cppflags=no
9408 cf_new_cflags=
9409 cf_new_cppflags=
9410 cf_new_extra_cppflags=
9411
9412 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9413 do
9414 case $cf_fix_cppflags in
9415 (no)
9416         case $cf_add_cflags in
9417         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9418                 case $cf_add_cflags in
9419                 (-D*)
9420                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9421
9422                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9423                                 && test -z "${cf_tst_cflags}" \
9424                                 && cf_fix_cppflags=yes
9425
9426                         if test $cf_fix_cppflags = yes ; then
9427
9428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9430
9431                                 continue
9432                         elif test "${cf_tst_cflags}" = "\"'" ; then
9433
9434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9436
9437                                 continue
9438                         fi
9439                         ;;
9440                 esac
9441                 case "$CPPFLAGS" in
9442                 (*$cf_add_cflags)
9443                         ;;
9444                 (*)
9445                         case $cf_add_cflags in
9446                         (-D*)
9447                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9448
9449 CPPFLAGS=`echo "$CPPFLAGS" | \
9450         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9451                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9452
9453                                 ;;
9454                         esac
9455
9456         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9457         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9458
9459                         ;;
9460                 esac
9461                 ;;
9462         (*)
9463
9464         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9465         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9466
9467                 ;;
9468         esac
9469         ;;
9470 (yes)
9471
9472         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9473         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9474
9475         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9476
9477         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9478                 && test -z "${cf_tst_cflags}" \
9479                 && cf_fix_cppflags=no
9480         ;;
9481 esac
9482 done
9483
9484 if test -n "$cf_new_cflags" ; then
9485
9486         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9487         CFLAGS="${CFLAGS}$cf_new_cflags"
9488
9489 fi
9490
9491 if test -n "$cf_new_cppflags" ; then
9492
9493         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9494         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9495
9496 fi
9497
9498 if test -n "$cf_new_extra_cppflags" ; then
9499
9500         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9501         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9502
9503 fi
9504
9505                         cat >conftest.$ac_ext <<_ACEOF
9506 #line 9506 "configure"
9507 #include "confdefs.h"
9508
9509                                 #include <limits.h>
9510                                 #include <sys/types.h>
9511
9512 int
9513 main (void)
9514 {
9515
9516                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9517                                         return 0;
9518                                 #else
9519                                 #       error GNU C library is too old
9520                                 #endif
9521   ;
9522   return 0;
9523 }
9524 _ACEOF
9525 rm -f conftest.$ac_objext
9526 if { (eval echo "$as_me:9526: \"$ac_compile\"") >&5
9527   (eval $ac_compile) 2>&5
9528   ac_status=$?
9529   echo "$as_me:9529: \$? = $ac_status" >&5
9530   (exit $ac_status); } &&
9531          { ac_try='test -s conftest.$ac_objext'
9532   { (eval echo "$as_me:9532: \"$ac_try\"") >&5
9533   (eval $ac_try) 2>&5
9534   ac_status=$?
9535   echo "$as_me:9535: \$? = $ac_status" >&5
9536   (exit $ac_status); }; }; then
9537   cf_cv_gnu_dftsrc_219=yes
9538 else
9539   echo "$as_me: failed program was:" >&5
9540 cat conftest.$ac_ext >&5
9541 cf_cv_gnu_dftsrc_219=no
9542 fi
9543 rm -f conftest.$ac_objext conftest.$ac_ext
9544
9545 fi
9546 echo "$as_me:9546: result: $cf_cv_gnu_dftsrc_219" >&5
9547 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9548                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9549         else
9550                 cf_cv_gnu_dftsrc_219=maybe
9551         fi
9552
9553         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9554
9555                 echo "$as_me:9555: checking if we must define _GNU_SOURCE" >&5
9556 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9557 if test "${cf_cv_gnu_source+set}" = set; then
9558   echo $ECHO_N "(cached) $ECHO_C" >&6
9559 else
9560
9561                 cat >conftest.$ac_ext <<_ACEOF
9562 #line 9562 "configure"
9563 #include "confdefs.h"
9564 #include <sys/types.h>
9565 int
9566 main (void)
9567 {
9568
9569                         #ifndef _XOPEN_SOURCE
9570                         #error  expected _XOPEN_SOURCE to be defined
9571                         #endif
9572   ;
9573   return 0;
9574 }
9575 _ACEOF
9576 rm -f conftest.$ac_objext
9577 if { (eval echo "$as_me:9577: \"$ac_compile\"") >&5
9578   (eval $ac_compile) 2>&5
9579   ac_status=$?
9580   echo "$as_me:9580: \$? = $ac_status" >&5
9581   (exit $ac_status); } &&
9582          { ac_try='test -s conftest.$ac_objext'
9583   { (eval echo "$as_me:9583: \"$ac_try\"") >&5
9584   (eval $ac_try) 2>&5
9585   ac_status=$?
9586   echo "$as_me:9586: \$? = $ac_status" >&5
9587   (exit $ac_status); }; }; then
9588   cf_cv_gnu_source=no
9589 else
9590   echo "$as_me: failed program was:" >&5
9591 cat conftest.$ac_ext >&5
9592 cf_save="$CPPFLAGS"
9593
9594 cf_fix_cppflags=no
9595 cf_new_cflags=
9596 cf_new_cppflags=
9597 cf_new_extra_cppflags=
9598
9599 for cf_add_cflags in -D_GNU_SOURCE
9600 do
9601 case $cf_fix_cppflags in
9602 (no)
9603         case $cf_add_cflags in
9604         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9605                 case $cf_add_cflags in
9606                 (-D*)
9607                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9608
9609                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9610                                 && test -z "${cf_tst_cflags}" \
9611                                 && cf_fix_cppflags=yes
9612
9613                         if test $cf_fix_cppflags = yes ; then
9614
9615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9617
9618                                 continue
9619                         elif test "${cf_tst_cflags}" = "\"'" ; then
9620
9621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9623
9624                                 continue
9625                         fi
9626                         ;;
9627                 esac
9628                 case "$CPPFLAGS" in
9629                 (*$cf_add_cflags)
9630                         ;;
9631                 (*)
9632                         case $cf_add_cflags in
9633                         (-D*)
9634                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9635
9636 CPPFLAGS=`echo "$CPPFLAGS" | \
9637         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9638                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9639
9640                                 ;;
9641                         esac
9642
9643         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9644         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9645
9646                         ;;
9647                 esac
9648                 ;;
9649         (*)
9650
9651         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9652         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9653
9654                 ;;
9655         esac
9656         ;;
9657 (yes)
9658
9659         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9660         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9661
9662         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9663
9664         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9665                 && test -z "${cf_tst_cflags}" \
9666                 && cf_fix_cppflags=no
9667         ;;
9668 esac
9669 done
9670
9671 if test -n "$cf_new_cflags" ; then
9672
9673         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9674         CFLAGS="${CFLAGS}$cf_new_cflags"
9675
9676 fi
9677
9678 if test -n "$cf_new_cppflags" ; then
9679
9680         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9681         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9682
9683 fi
9684
9685 if test -n "$cf_new_extra_cppflags" ; then
9686
9687         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9688         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9689
9690 fi
9691
9692                          cat >conftest.$ac_ext <<_ACEOF
9693 #line 9693 "configure"
9694 #include "confdefs.h"
9695 #include <sys/types.h>
9696 int
9697 main (void)
9698 {
9699
9700                                 #ifdef _XOPEN_SOURCE
9701                                 #error  expected _XOPEN_SOURCE to be undefined
9702                                 #endif
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 rm -f conftest.$ac_objext
9708 if { (eval echo "$as_me:9708: \"$ac_compile\"") >&5
9709   (eval $ac_compile) 2>&5
9710   ac_status=$?
9711   echo "$as_me:9711: \$? = $ac_status" >&5
9712   (exit $ac_status); } &&
9713          { ac_try='test -s conftest.$ac_objext'
9714   { (eval echo "$as_me:9714: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); }; }; then
9719   cf_cv_gnu_source=no
9720 else
9721   echo "$as_me: failed program was:" >&5
9722 cat conftest.$ac_ext >&5
9723 cf_cv_gnu_source=yes
9724 fi
9725 rm -f conftest.$ac_objext conftest.$ac_ext
9726                         CPPFLAGS="$cf_save"
9727
9728 fi
9729 rm -f conftest.$ac_objext conftest.$ac_ext
9730
9731 fi
9732 echo "$as_me:9732: result: $cf_cv_gnu_source" >&5
9733 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9734
9735                 if test "$cf_cv_gnu_source" = yes
9736                 then
9737                 echo "$as_me:9737: checking if we should also define _DEFAULT_SOURCE" >&5
9738 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9739 if test "${cf_cv_default_source+set}" = set; then
9740   echo $ECHO_N "(cached) $ECHO_C" >&6
9741 else
9742
9743         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9744         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9745
9746                         cat >conftest.$ac_ext <<_ACEOF
9747 #line 9747 "configure"
9748 #include "confdefs.h"
9749 #include <sys/types.h>
9750 int
9751 main (void)
9752 {
9753
9754                                 #ifdef _DEFAULT_SOURCE
9755                                 #error  expected _DEFAULT_SOURCE to be undefined
9756                                 #endif
9757   ;
9758   return 0;
9759 }
9760 _ACEOF
9761 rm -f conftest.$ac_objext
9762 if { (eval echo "$as_me:9762: \"$ac_compile\"") >&5
9763   (eval $ac_compile) 2>&5
9764   ac_status=$?
9765   echo "$as_me:9765: \$? = $ac_status" >&5
9766   (exit $ac_status); } &&
9767          { ac_try='test -s conftest.$ac_objext'
9768   { (eval echo "$as_me:9768: \"$ac_try\"") >&5
9769   (eval $ac_try) 2>&5
9770   ac_status=$?
9771   echo "$as_me:9771: \$? = $ac_status" >&5
9772   (exit $ac_status); }; }; then
9773   cf_cv_default_source=no
9774 else
9775   echo "$as_me: failed program was:" >&5
9776 cat conftest.$ac_ext >&5
9777 cf_cv_default_source=yes
9778 fi
9779 rm -f conftest.$ac_objext conftest.$ac_ext
9780
9781 fi
9782 echo "$as_me:9782: result: $cf_cv_default_source" >&5
9783 echo "${ECHO_T}$cf_cv_default_source" >&6
9784                         if test "$cf_cv_default_source" = yes
9785                         then
9786
9787         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9788         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9789
9790                         fi
9791                 fi
9792         fi
9793
9794 fi
9795
9796         ;;
9797 (minix*)
9798         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9799         ;;
9800 (mirbsd*)
9801         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9802         cf_XOPEN_SOURCE=
9803
9804 if test "$cf_cv_posix_visible" = no; then
9805
9806 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9807
9808 cf_save_CFLAGS="$CFLAGS"
9809 cf_save_CPPFLAGS="$CPPFLAGS"
9810
9811 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9812         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9813                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9814
9815 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9816         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9817                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9818
9819 echo "$as_me:9819: checking if we should define _POSIX_C_SOURCE" >&5
9820 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9821 if test "${cf_cv_posix_c_source+set}" = set; then
9822   echo $ECHO_N "(cached) $ECHO_C" >&6
9823 else
9824
9825 echo "${as_me:-configure}:9825: testing if the symbol is already defined go no further ..." 1>&5
9826
9827         cat >conftest.$ac_ext <<_ACEOF
9828 #line 9828 "configure"
9829 #include "confdefs.h"
9830 #include <sys/types.h>
9831 int
9832 main (void)
9833 {
9834
9835 #ifndef _POSIX_C_SOURCE
9836 make an error
9837 #endif
9838   ;
9839   return 0;
9840 }
9841 _ACEOF
9842 rm -f conftest.$ac_objext
9843 if { (eval echo "$as_me:9843: \"$ac_compile\"") >&5
9844   (eval $ac_compile) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); } &&
9848          { ac_try='test -s conftest.$ac_objext'
9849   { (eval echo "$as_me:9849: \"$ac_try\"") >&5
9850   (eval $ac_try) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); }; }; then
9854   cf_cv_posix_c_source=no
9855 else
9856   echo "$as_me: failed program was:" >&5
9857 cat conftest.$ac_ext >&5
9858 cf_want_posix_source=no
9859          case .$cf_POSIX_C_SOURCE in
9860          (.[12]??*)
9861                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9862                 ;;
9863          (.2)
9864                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9865                 cf_want_posix_source=yes
9866                 ;;
9867          (.*)
9868                 cf_want_posix_source=yes
9869                 ;;
9870          esac
9871          if test "$cf_want_posix_source" = yes ; then
9872                 cat >conftest.$ac_ext <<_ACEOF
9873 #line 9873 "configure"
9874 #include "confdefs.h"
9875 #include <sys/types.h>
9876 int
9877 main (void)
9878 {
9879
9880 #ifdef _POSIX_SOURCE
9881 make an error
9882 #endif
9883   ;
9884   return 0;
9885 }
9886 _ACEOF
9887 rm -f conftest.$ac_objext
9888 if { (eval echo "$as_me:9888: \"$ac_compile\"") >&5
9889   (eval $ac_compile) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit $ac_status); } &&
9893          { ac_try='test -s conftest.$ac_objext'
9894   { (eval echo "$as_me:9894: \"$ac_try\"") >&5
9895   (eval $ac_try) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); }; }; then
9899   :
9900 else
9901   echo "$as_me: failed program was:" >&5
9902 cat conftest.$ac_ext >&5
9903 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9904 fi
9905 rm -f conftest.$ac_objext conftest.$ac_ext
9906          fi
9907
9908 echo "${as_me:-configure}:9908: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9909
9910          CFLAGS="$cf_trim_CFLAGS"
9911          CPPFLAGS="$cf_trim_CPPFLAGS"
9912
9913         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9914         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9915
9916 echo "${as_me:-configure}:9916: testing if the second compile does not leave our definition intact error ..." 1>&5
9917
9918          cat >conftest.$ac_ext <<_ACEOF
9919 #line 9919 "configure"
9920 #include "confdefs.h"
9921 #include <sys/types.h>
9922 int
9923 main (void)
9924 {
9925
9926 #ifndef _POSIX_C_SOURCE
9927 make an error
9928 #endif
9929   ;
9930   return 0;
9931 }
9932 _ACEOF
9933 rm -f conftest.$ac_objext
9934 if { (eval echo "$as_me:9934: \"$ac_compile\"") >&5
9935   (eval $ac_compile) 2>&5
9936   ac_status=$?
9937   echo "$as_me:9937: \$? = $ac_status" >&5
9938   (exit $ac_status); } &&
9939          { ac_try='test -s conftest.$ac_objext'
9940   { (eval echo "$as_me:9940: \"$ac_try\"") >&5
9941   (eval $ac_try) 2>&5
9942   ac_status=$?
9943   echo "$as_me:9943: \$? = $ac_status" >&5
9944   (exit $ac_status); }; }; then
9945   :
9946 else
9947   echo "$as_me: failed program was:" >&5
9948 cat conftest.$ac_ext >&5
9949 cf_cv_posix_c_source=no
9950 fi
9951 rm -f conftest.$ac_objext conftest.$ac_ext
9952          CFLAGS="$cf_save_CFLAGS"
9953          CPPFLAGS="$cf_save_CPPFLAGS"
9954
9955 fi
9956 rm -f conftest.$ac_objext conftest.$ac_ext
9957
9958 fi
9959 echo "$as_me:9959: result: $cf_cv_posix_c_source" >&5
9960 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9961
9962 if test "$cf_cv_posix_c_source" != no ; then
9963         CFLAGS="$cf_trim_CFLAGS"
9964         CPPFLAGS="$cf_trim_CPPFLAGS"
9965
9966 cf_fix_cppflags=no
9967 cf_new_cflags=
9968 cf_new_cppflags=
9969 cf_new_extra_cppflags=
9970
9971 for cf_add_cflags in $cf_cv_posix_c_source
9972 do
9973 case $cf_fix_cppflags in
9974 (no)
9975         case $cf_add_cflags in
9976         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9977                 case $cf_add_cflags in
9978                 (-D*)
9979                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9980
9981                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9982                                 && test -z "${cf_tst_cflags}" \
9983                                 && cf_fix_cppflags=yes
9984
9985                         if test $cf_fix_cppflags = yes ; then
9986
9987         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9988         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9989
9990                                 continue
9991                         elif test "${cf_tst_cflags}" = "\"'" ; then
9992
9993         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9994         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9995
9996                                 continue
9997                         fi
9998                         ;;
9999                 esac
10000                 case "$CPPFLAGS" in
10001                 (*$cf_add_cflags)
10002                         ;;
10003                 (*)
10004                         case $cf_add_cflags in
10005                         (-D*)
10006                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10007
10008 CPPFLAGS=`echo "$CPPFLAGS" | \
10009         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10010                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10011
10012                                 ;;
10013                         esac
10014
10015         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10016         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10017
10018                         ;;
10019                 esac
10020                 ;;
10021         (*)
10022
10023         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10024         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10025
10026                 ;;
10027         esac
10028         ;;
10029 (yes)
10030
10031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10033
10034         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10035
10036         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10037                 && test -z "${cf_tst_cflags}" \
10038                 && cf_fix_cppflags=no
10039         ;;
10040 esac
10041 done
10042
10043 if test -n "$cf_new_cflags" ; then
10044
10045         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10046         CFLAGS="${CFLAGS}$cf_new_cflags"
10047
10048 fi
10049
10050 if test -n "$cf_new_cppflags" ; then
10051
10052         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10053         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10054
10055 fi
10056
10057 if test -n "$cf_new_extra_cppflags" ; then
10058
10059         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10060         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10061
10062 fi
10063
10064 fi
10065
10066 fi # cf_cv_posix_visible
10067
10068         ;;
10069 (netbsd*)
10070         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10071         ;;
10072 (openbsd[4-9]*)
10073         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10074         cf_xopen_source="-D_BSD_SOURCE"
10075         cf_XOPEN_SOURCE=600
10076         ;;
10077 (openbsd*)
10078         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10079         ;;
10080 (osf[45]*)
10081         cf_xopen_source="-D_OSF_SOURCE"
10082         ;;
10083 (nto-qnx*)
10084         cf_xopen_source="-D_QNX_SOURCE"
10085         ;;
10086 (sco*)
10087         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10088         ;;
10089 (solaris2.*)
10090         cf_xopen_source="-D__EXTENSIONS__"
10091         cf_cv_xopen_source=broken
10092         ;;
10093 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10094         cf_XOPEN_SOURCE=
10095         cf_POSIX_C_SOURCE=
10096         ;;
10097 (*)
10098
10099 echo "$as_me:10099: checking if we should define _XOPEN_SOURCE" >&5
10100 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10101 if test "${cf_cv_xopen_source+set}" = set; then
10102   echo $ECHO_N "(cached) $ECHO_C" >&6
10103 else
10104
10105         cat >conftest.$ac_ext <<_ACEOF
10106 #line 10106 "configure"
10107 #include "confdefs.h"
10108
10109 #include <stdlib.h>
10110 #include <string.h>
10111 #include <sys/types.h>
10112
10113 int
10114 main (void)
10115 {
10116
10117 #ifndef _XOPEN_SOURCE
10118 make an error
10119 #endif
10120   ;
10121   return 0;
10122 }
10123 _ACEOF
10124 rm -f conftest.$ac_objext
10125 if { (eval echo "$as_me:10125: \"$ac_compile\"") >&5
10126   (eval $ac_compile) 2>&5
10127   ac_status=$?
10128   echo "$as_me:10128: \$? = $ac_status" >&5
10129   (exit $ac_status); } &&
10130          { ac_try='test -s conftest.$ac_objext'
10131   { (eval echo "$as_me:10131: \"$ac_try\"") >&5
10132   (eval $ac_try) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); }; }; then
10136   cf_cv_xopen_source=no
10137 else
10138   echo "$as_me: failed program was:" >&5
10139 cat conftest.$ac_ext >&5
10140 cf_save="$CPPFLAGS"
10141
10142         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10143         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10144
10145          cat >conftest.$ac_ext <<_ACEOF
10146 #line 10146 "configure"
10147 #include "confdefs.h"
10148
10149 #include <stdlib.h>
10150 #include <string.h>
10151 #include <sys/types.h>
10152
10153 int
10154 main (void)
10155 {
10156
10157 #ifdef _XOPEN_SOURCE
10158 make an error
10159 #endif
10160   ;
10161   return 0;
10162 }
10163 _ACEOF
10164 rm -f conftest.$ac_objext
10165 if { (eval echo "$as_me:10165: \"$ac_compile\"") >&5
10166   (eval $ac_compile) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); } &&
10170          { ac_try='test -s conftest.$ac_objext'
10171   { (eval echo "$as_me:10171: \"$ac_try\"") >&5
10172   (eval $ac_try) 2>&5
10173   ac_status=$?
10174   echo "$as_me:10174: \$? = $ac_status" >&5
10175   (exit $ac_status); }; }; then
10176   cf_cv_xopen_source=no
10177 else
10178   echo "$as_me: failed program was:" >&5
10179 cat conftest.$ac_ext >&5
10180 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10181 fi
10182 rm -f conftest.$ac_objext conftest.$ac_ext
10183         CPPFLAGS="$cf_save"
10184
10185 fi
10186 rm -f conftest.$ac_objext conftest.$ac_ext
10187
10188 fi
10189 echo "$as_me:10189: result: $cf_cv_xopen_source" >&5
10190 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10191
10192 if test "$cf_cv_xopen_source" != no ; then
10193
10194 CFLAGS=`echo "$CFLAGS" | \
10195         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10196                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10197
10198 CPPFLAGS=`echo "$CPPFLAGS" | \
10199         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10200                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10201
10202         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10203
10204 cf_fix_cppflags=no
10205 cf_new_cflags=
10206 cf_new_cppflags=
10207 cf_new_extra_cppflags=
10208
10209 for cf_add_cflags in $cf_temp_xopen_source
10210 do
10211 case $cf_fix_cppflags in
10212 (no)
10213         case $cf_add_cflags in
10214         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10215                 case $cf_add_cflags in
10216                 (-D*)
10217                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10218
10219                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10220                                 && test -z "${cf_tst_cflags}" \
10221                                 && cf_fix_cppflags=yes
10222
10223                         if test $cf_fix_cppflags = yes ; then
10224
10225         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10226         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10227
10228                                 continue
10229                         elif test "${cf_tst_cflags}" = "\"'" ; then
10230
10231         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10232         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10233
10234                                 continue
10235                         fi
10236                         ;;
10237                 esac
10238                 case "$CPPFLAGS" in
10239                 (*$cf_add_cflags)
10240                         ;;
10241                 (*)
10242                         case $cf_add_cflags in
10243                         (-D*)
10244                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10245
10246 CPPFLAGS=`echo "$CPPFLAGS" | \
10247         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10248                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10249
10250                                 ;;
10251                         esac
10252
10253         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10254         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10255
10256                         ;;
10257                 esac
10258                 ;;
10259         (*)
10260
10261         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10262         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10263
10264                 ;;
10265         esac
10266         ;;
10267 (yes)
10268
10269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10271
10272         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10273
10274         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10275                 && test -z "${cf_tst_cflags}" \
10276                 && cf_fix_cppflags=no
10277         ;;
10278 esac
10279 done
10280
10281 if test -n "$cf_new_cflags" ; then
10282
10283         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10284         CFLAGS="${CFLAGS}$cf_new_cflags"
10285
10286 fi
10287
10288 if test -n "$cf_new_cppflags" ; then
10289
10290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10291         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10292
10293 fi
10294
10295 if test -n "$cf_new_extra_cppflags" ; then
10296
10297         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10298         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10299
10300 fi
10301
10302 fi
10303
10304 if test "$cf_cv_posix_visible" = no; then
10305
10306 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10307
10308 cf_save_CFLAGS="$CFLAGS"
10309 cf_save_CPPFLAGS="$CPPFLAGS"
10310
10311 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10312         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10313                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10314
10315 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10316         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10317                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10318
10319 echo "$as_me:10319: checking if we should define _POSIX_C_SOURCE" >&5
10320 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10321 if test "${cf_cv_posix_c_source+set}" = set; then
10322   echo $ECHO_N "(cached) $ECHO_C" >&6
10323 else
10324
10325 echo "${as_me:-configure}:10325: testing if the symbol is already defined go no further ..." 1>&5
10326
10327         cat >conftest.$ac_ext <<_ACEOF
10328 #line 10328 "configure"
10329 #include "confdefs.h"
10330 #include <sys/types.h>
10331 int
10332 main (void)
10333 {
10334
10335 #ifndef _POSIX_C_SOURCE
10336 make an error
10337 #endif
10338   ;
10339   return 0;
10340 }
10341 _ACEOF
10342 rm -f conftest.$ac_objext
10343 if { (eval echo "$as_me:10343: \"$ac_compile\"") >&5
10344   (eval $ac_compile) 2>&5
10345   ac_status=$?
10346   echo "$as_me:10346: \$? = $ac_status" >&5
10347   (exit $ac_status); } &&
10348          { ac_try='test -s conftest.$ac_objext'
10349   { (eval echo "$as_me:10349: \"$ac_try\"") >&5
10350   (eval $ac_try) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); }; }; then
10354   cf_cv_posix_c_source=no
10355 else
10356   echo "$as_me: failed program was:" >&5
10357 cat conftest.$ac_ext >&5
10358 cf_want_posix_source=no
10359          case .$cf_POSIX_C_SOURCE in
10360          (.[12]??*)
10361                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10362                 ;;
10363          (.2)
10364                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10365                 cf_want_posix_source=yes
10366                 ;;
10367          (.*)
10368                 cf_want_posix_source=yes
10369                 ;;
10370          esac
10371          if test "$cf_want_posix_source" = yes ; then
10372                 cat >conftest.$ac_ext <<_ACEOF
10373 #line 10373 "configure"
10374 #include "confdefs.h"
10375 #include <sys/types.h>
10376 int
10377 main (void)
10378 {
10379
10380 #ifdef _POSIX_SOURCE
10381 make an error
10382 #endif
10383   ;
10384   return 0;
10385 }
10386 _ACEOF
10387 rm -f conftest.$ac_objext
10388 if { (eval echo "$as_me:10388: \"$ac_compile\"") >&5
10389   (eval $ac_compile) 2>&5
10390   ac_status=$?
10391   echo "$as_me:10391: \$? = $ac_status" >&5
10392   (exit $ac_status); } &&
10393          { ac_try='test -s conftest.$ac_objext'
10394   { (eval echo "$as_me:10394: \"$ac_try\"") >&5
10395   (eval $ac_try) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); }; }; then
10399   :
10400 else
10401   echo "$as_me: failed program was:" >&5
10402 cat conftest.$ac_ext >&5
10403 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10404 fi
10405 rm -f conftest.$ac_objext conftest.$ac_ext
10406          fi
10407
10408 echo "${as_me:-configure}:10408: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10409
10410          CFLAGS="$cf_trim_CFLAGS"
10411          CPPFLAGS="$cf_trim_CPPFLAGS"
10412
10413         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10414         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10415
10416 echo "${as_me:-configure}:10416: testing if the second compile does not leave our definition intact error ..." 1>&5
10417
10418          cat >conftest.$ac_ext <<_ACEOF
10419 #line 10419 "configure"
10420 #include "confdefs.h"
10421 #include <sys/types.h>
10422 int
10423 main (void)
10424 {
10425
10426 #ifndef _POSIX_C_SOURCE
10427 make an error
10428 #endif
10429   ;
10430   return 0;
10431 }
10432 _ACEOF
10433 rm -f conftest.$ac_objext
10434 if { (eval echo "$as_me:10434: \"$ac_compile\"") >&5
10435   (eval $ac_compile) 2>&5
10436   ac_status=$?
10437   echo "$as_me:10437: \$? = $ac_status" >&5
10438   (exit $ac_status); } &&
10439          { ac_try='test -s conftest.$ac_objext'
10440   { (eval echo "$as_me:10440: \"$ac_try\"") >&5
10441   (eval $ac_try) 2>&5
10442   ac_status=$?
10443   echo "$as_me:10443: \$? = $ac_status" >&5
10444   (exit $ac_status); }; }; then
10445   :
10446 else
10447   echo "$as_me: failed program was:" >&5
10448 cat conftest.$ac_ext >&5
10449 cf_cv_posix_c_source=no
10450 fi
10451 rm -f conftest.$ac_objext conftest.$ac_ext
10452          CFLAGS="$cf_save_CFLAGS"
10453          CPPFLAGS="$cf_save_CPPFLAGS"
10454
10455 fi
10456 rm -f conftest.$ac_objext conftest.$ac_ext
10457
10458 fi
10459 echo "$as_me:10459: result: $cf_cv_posix_c_source" >&5
10460 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10461
10462 if test "$cf_cv_posix_c_source" != no ; then
10463         CFLAGS="$cf_trim_CFLAGS"
10464         CPPFLAGS="$cf_trim_CPPFLAGS"
10465
10466 cf_fix_cppflags=no
10467 cf_new_cflags=
10468 cf_new_cppflags=
10469 cf_new_extra_cppflags=
10470
10471 for cf_add_cflags in $cf_cv_posix_c_source
10472 do
10473 case $cf_fix_cppflags in
10474 (no)
10475         case $cf_add_cflags in
10476         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10477                 case $cf_add_cflags in
10478                 (-D*)
10479                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10480
10481                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10482                                 && test -z "${cf_tst_cflags}" \
10483                                 && cf_fix_cppflags=yes
10484
10485                         if test $cf_fix_cppflags = yes ; then
10486
10487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10489
10490                                 continue
10491                         elif test "${cf_tst_cflags}" = "\"'" ; then
10492
10493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10495
10496                                 continue
10497                         fi
10498                         ;;
10499                 esac
10500                 case "$CPPFLAGS" in
10501                 (*$cf_add_cflags)
10502                         ;;
10503                 (*)
10504                         case $cf_add_cflags in
10505                         (-D*)
10506                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10507
10508 CPPFLAGS=`echo "$CPPFLAGS" | \
10509         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10510                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10511
10512                                 ;;
10513                         esac
10514
10515         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10516         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10517
10518                         ;;
10519                 esac
10520                 ;;
10521         (*)
10522
10523         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10524         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10525
10526                 ;;
10527         esac
10528         ;;
10529 (yes)
10530
10531         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10532         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10533
10534         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10535
10536         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10537                 && test -z "${cf_tst_cflags}" \
10538                 && cf_fix_cppflags=no
10539         ;;
10540 esac
10541 done
10542
10543 if test -n "$cf_new_cflags" ; then
10544
10545         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10546         CFLAGS="${CFLAGS}$cf_new_cflags"
10547
10548 fi
10549
10550 if test -n "$cf_new_cppflags" ; then
10551
10552         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10553         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10554
10555 fi
10556
10557 if test -n "$cf_new_extra_cppflags" ; then
10558
10559         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10560         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10561
10562 fi
10563
10564 fi
10565
10566 fi # cf_cv_posix_visible
10567
10568         ;;
10569 esac
10570
10571 if test -n "$cf_xopen_source" ; then
10572
10573 cf_fix_cppflags=no
10574 cf_new_cflags=
10575 cf_new_cppflags=
10576 cf_new_extra_cppflags=
10577
10578 for cf_add_cflags in $cf_xopen_source
10579 do
10580 case $cf_fix_cppflags in
10581 (no)
10582         case $cf_add_cflags in
10583         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10584                 case $cf_add_cflags in
10585                 (-D*)
10586                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10587
10588                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10589                                 && test -z "${cf_tst_cflags}" \
10590                                 && cf_fix_cppflags=yes
10591
10592                         if test $cf_fix_cppflags = yes ; then
10593
10594         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10595         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10596
10597                                 continue
10598                         elif test "${cf_tst_cflags}" = "\"'" ; then
10599
10600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602
10603                                 continue
10604                         fi
10605                         ;;
10606                 esac
10607                 case "$CPPFLAGS" in
10608                 (*$cf_add_cflags)
10609                         ;;
10610                 (*)
10611                         case $cf_add_cflags in
10612                         (-D*)
10613                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10614
10615 CPPFLAGS=`echo "$CPPFLAGS" | \
10616         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10617                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10618
10619                                 ;;
10620                         esac
10621
10622         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10623         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10624
10625                         ;;
10626                 esac
10627                 ;;
10628         (*)
10629
10630         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10631         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10632
10633                 ;;
10634         esac
10635         ;;
10636 (yes)
10637
10638         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10639         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10640
10641         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10642
10643         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10644                 && test -z "${cf_tst_cflags}" \
10645                 && cf_fix_cppflags=no
10646         ;;
10647 esac
10648 done
10649
10650 if test -n "$cf_new_cflags" ; then
10651         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10652
10653 echo "${as_me:-configure}:10653: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10654
10655         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10656         CFLAGS="${CFLAGS}$cf_new_cflags"
10657
10658 fi
10659
10660 if test -n "$cf_new_cppflags" ; then
10661         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10662
10663 echo "${as_me:-configure}:10663: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10664
10665         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10666         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10667
10668 fi
10669
10670 if test -n "$cf_new_extra_cppflags" ; then
10671         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10672
10673 echo "${as_me:-configure}:10673: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10674
10675         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10676         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10677
10678 fi
10679
10680 fi
10681
10682 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10683         echo "$as_me:10683: checking if _XOPEN_SOURCE really is set" >&5
10684 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10685         cat >conftest.$ac_ext <<_ACEOF
10686 #line 10686 "configure"
10687 #include "confdefs.h"
10688 #include <stdlib.h>
10689 int
10690 main (void)
10691 {
10692
10693 #ifndef _XOPEN_SOURCE
10694 make an error
10695 #endif
10696   ;
10697   return 0;
10698 }
10699 _ACEOF
10700 rm -f conftest.$ac_objext
10701 if { (eval echo "$as_me:10701: \"$ac_compile\"") >&5
10702   (eval $ac_compile) 2>&5
10703   ac_status=$?
10704   echo "$as_me:10704: \$? = $ac_status" >&5
10705   (exit $ac_status); } &&
10706          { ac_try='test -s conftest.$ac_objext'
10707   { (eval echo "$as_me:10707: \"$ac_try\"") >&5
10708   (eval $ac_try) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); }; }; then
10712   cf_XOPEN_SOURCE_set=yes
10713 else
10714   echo "$as_me: failed program was:" >&5
10715 cat conftest.$ac_ext >&5
10716 cf_XOPEN_SOURCE_set=no
10717 fi
10718 rm -f conftest.$ac_objext conftest.$ac_ext
10719         echo "$as_me:10719: result: $cf_XOPEN_SOURCE_set" >&5
10720 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10721         if test $cf_XOPEN_SOURCE_set = yes
10722         then
10723                 cat >conftest.$ac_ext <<_ACEOF
10724 #line 10724 "configure"
10725 #include "confdefs.h"
10726 #include <stdlib.h>
10727 int
10728 main (void)
10729 {
10730
10731 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10732 make an error
10733 #endif
10734   ;
10735   return 0;
10736 }
10737 _ACEOF
10738 rm -f conftest.$ac_objext
10739 if { (eval echo "$as_me:10739: \"$ac_compile\"") >&5
10740   (eval $ac_compile) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit $ac_status); } &&
10744          { ac_try='test -s conftest.$ac_objext'
10745   { (eval echo "$as_me:10745: \"$ac_try\"") >&5
10746   (eval $ac_try) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit $ac_status); }; }; then
10750   cf_XOPEN_SOURCE_set_ok=yes
10751 else
10752   echo "$as_me: failed program was:" >&5
10753 cat conftest.$ac_ext >&5
10754 cf_XOPEN_SOURCE_set_ok=no
10755 fi
10756 rm -f conftest.$ac_objext conftest.$ac_ext
10757                 if test $cf_XOPEN_SOURCE_set_ok = no
10758                 then
10759                         { echo "$as_me:10759: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10760 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10761                 fi
10762         else
10763
10764 echo "$as_me:10764: checking if we should define _XOPEN_SOURCE" >&5
10765 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10766 if test "${cf_cv_xopen_source+set}" = set; then
10767   echo $ECHO_N "(cached) $ECHO_C" >&6
10768 else
10769
10770         cat >conftest.$ac_ext <<_ACEOF
10771 #line 10771 "configure"
10772 #include "confdefs.h"
10773
10774 #include <stdlib.h>
10775 #include <string.h>
10776 #include <sys/types.h>
10777
10778 int
10779 main (void)
10780 {
10781
10782 #ifndef _XOPEN_SOURCE
10783 make an error
10784 #endif
10785   ;
10786   return 0;
10787 }
10788 _ACEOF
10789 rm -f conftest.$ac_objext
10790 if { (eval echo "$as_me:10790: \"$ac_compile\"") >&5
10791   (eval $ac_compile) 2>&5
10792   ac_status=$?
10793   echo "$as_me:10793: \$? = $ac_status" >&5
10794   (exit $ac_status); } &&
10795          { ac_try='test -s conftest.$ac_objext'
10796   { (eval echo "$as_me:10796: \"$ac_try\"") >&5
10797   (eval $ac_try) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); }; }; then
10801   cf_cv_xopen_source=no
10802 else
10803   echo "$as_me: failed program was:" >&5
10804 cat conftest.$ac_ext >&5
10805 cf_save="$CPPFLAGS"
10806
10807         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10808         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10809
10810          cat >conftest.$ac_ext <<_ACEOF
10811 #line 10811 "configure"
10812 #include "confdefs.h"
10813
10814 #include <stdlib.h>
10815 #include <string.h>
10816 #include <sys/types.h>
10817
10818 int
10819 main (void)
10820 {
10821
10822 #ifdef _XOPEN_SOURCE
10823 make an error
10824 #endif
10825   ;
10826   return 0;
10827 }
10828 _ACEOF
10829 rm -f conftest.$ac_objext
10830 if { (eval echo "$as_me:10830: \"$ac_compile\"") >&5
10831   (eval $ac_compile) 2>&5
10832   ac_status=$?
10833   echo "$as_me:10833: \$? = $ac_status" >&5
10834   (exit $ac_status); } &&
10835          { ac_try='test -s conftest.$ac_objext'
10836   { (eval echo "$as_me:10836: \"$ac_try\"") >&5
10837   (eval $ac_try) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit $ac_status); }; }; then
10841   cf_cv_xopen_source=no
10842 else
10843   echo "$as_me: failed program was:" >&5
10844 cat conftest.$ac_ext >&5
10845 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10846 fi
10847 rm -f conftest.$ac_objext conftest.$ac_ext
10848         CPPFLAGS="$cf_save"
10849
10850 fi
10851 rm -f conftest.$ac_objext conftest.$ac_ext
10852
10853 fi
10854 echo "$as_me:10854: result: $cf_cv_xopen_source" >&5
10855 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10856
10857 if test "$cf_cv_xopen_source" != no ; then
10858
10859 CFLAGS=`echo "$CFLAGS" | \
10860         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10861                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10862
10863 CPPFLAGS=`echo "$CPPFLAGS" | \
10864         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10865                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10866
10867         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10868
10869 cf_fix_cppflags=no
10870 cf_new_cflags=
10871 cf_new_cppflags=
10872 cf_new_extra_cppflags=
10873
10874 for cf_add_cflags in $cf_temp_xopen_source
10875 do
10876 case $cf_fix_cppflags in
10877 (no)
10878         case $cf_add_cflags in
10879         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10880                 case $cf_add_cflags in
10881                 (-D*)
10882                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10883
10884                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10885                                 && test -z "${cf_tst_cflags}" \
10886                                 && cf_fix_cppflags=yes
10887
10888                         if test $cf_fix_cppflags = yes ; then
10889
10890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10892
10893                                 continue
10894                         elif test "${cf_tst_cflags}" = "\"'" ; then
10895
10896         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10897         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10898
10899                                 continue
10900                         fi
10901                         ;;
10902                 esac
10903                 case "$CPPFLAGS" in
10904                 (*$cf_add_cflags)
10905                         ;;
10906                 (*)
10907                         case $cf_add_cflags in
10908                         (-D*)
10909                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10910
10911 CPPFLAGS=`echo "$CPPFLAGS" | \
10912         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10913                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10914
10915                                 ;;
10916                         esac
10917
10918         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10919         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10920
10921                         ;;
10922                 esac
10923                 ;;
10924         (*)
10925
10926         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10927         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10928
10929                 ;;
10930         esac
10931         ;;
10932 (yes)
10933
10934         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10935         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10936
10937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10938
10939         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10940                 && test -z "${cf_tst_cflags}" \
10941                 && cf_fix_cppflags=no
10942         ;;
10943 esac
10944 done
10945
10946 if test -n "$cf_new_cflags" ; then
10947
10948         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10949         CFLAGS="${CFLAGS}$cf_new_cflags"
10950
10951 fi
10952
10953 if test -n "$cf_new_cppflags" ; then
10954
10955         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10956         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10957
10958 fi
10959
10960 if test -n "$cf_new_extra_cppflags" ; then
10961
10962         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10963         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10964
10965 fi
10966
10967 fi
10968
10969         fi
10970 fi
10971 fi # cf_cv_posix_visible
10972
10973 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10974
10975 # Work around breakage on OS X
10976
10977 echo "$as_me:10977: checking if SIGWINCH is defined" >&5
10978 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10979 if test "${cf_cv_define_sigwinch+set}" = set; then
10980   echo $ECHO_N "(cached) $ECHO_C" >&6
10981 else
10982
10983         cat >conftest.$ac_ext <<_ACEOF
10984 #line 10984 "configure"
10985 #include "confdefs.h"
10986
10987 #include <sys/types.h>
10988 #include <sys/signal.h>
10989
10990 int
10991 main (void)
10992 {
10993 int x = SIGWINCH
10994   ;
10995   return 0;
10996 }
10997 _ACEOF
10998 rm -f conftest.$ac_objext
10999 if { (eval echo "$as_me:10999: \"$ac_compile\"") >&5
11000   (eval $ac_compile) 2>&5
11001   ac_status=$?
11002   echo "$as_me:11002: \$? = $ac_status" >&5
11003   (exit $ac_status); } &&
11004          { ac_try='test -s conftest.$ac_objext'
11005   { (eval echo "$as_me:11005: \"$ac_try\"") >&5
11006   (eval $ac_try) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); }; }; then
11010   cf_cv_define_sigwinch=yes
11011 else
11012   echo "$as_me: failed program was:" >&5
11013 cat conftest.$ac_ext >&5
11014 cat >conftest.$ac_ext <<_ACEOF
11015 #line 11015 "configure"
11016 #include "confdefs.h"
11017
11018 #undef _XOPEN_SOURCE
11019 #undef _POSIX_SOURCE
11020 #undef _POSIX_C_SOURCE
11021 #include <sys/types.h>
11022 #include <sys/signal.h>
11023
11024 int
11025 main (void)
11026 {
11027 int x = SIGWINCH
11028   ;
11029   return 0;
11030 }
11031 _ACEOF
11032 rm -f conftest.$ac_objext
11033 if { (eval echo "$as_me:11033: \"$ac_compile\"") >&5
11034   (eval $ac_compile) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); } &&
11038          { ac_try='test -s conftest.$ac_objext'
11039   { (eval echo "$as_me:11039: \"$ac_try\"") >&5
11040   (eval $ac_try) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); }; }; then
11044   cf_cv_define_sigwinch=maybe
11045 else
11046   echo "$as_me: failed program was:" >&5
11047 cat conftest.$ac_ext >&5
11048 cf_cv_define_sigwinch=no
11049 fi
11050 rm -f conftest.$ac_objext conftest.$ac_ext
11051
11052 fi
11053 rm -f conftest.$ac_objext conftest.$ac_ext
11054
11055 fi
11056 echo "$as_me:11056: result: $cf_cv_define_sigwinch" >&5
11057 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11058
11059 if test "$cf_cv_define_sigwinch" = maybe ; then
11060 echo "$as_me:11060: checking for actual SIGWINCH definition" >&5
11061 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11062 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11063   echo $ECHO_N "(cached) $ECHO_C" >&6
11064 else
11065
11066 cf_cv_fixup_sigwinch=unknown
11067 cf_sigwinch=32
11068 while test $cf_sigwinch != 1
11069 do
11070         cat >conftest.$ac_ext <<_ACEOF
11071 #line 11071 "configure"
11072 #include "confdefs.h"
11073
11074 #undef _XOPEN_SOURCE
11075 #undef _POSIX_SOURCE
11076 #undef _POSIX_C_SOURCE
11077 #include <sys/types.h>
11078 #include <sys/signal.h>
11079
11080 int
11081 main (void)
11082 {
11083
11084 #if SIGWINCH != $cf_sigwinch
11085 make an error
11086 #endif
11087 int x = SIGWINCH
11088   ;
11089   return 0;
11090 }
11091 _ACEOF
11092 rm -f conftest.$ac_objext
11093 if { (eval echo "$as_me:11093: \"$ac_compile\"") >&5
11094   (eval $ac_compile) 2>&5
11095   ac_status=$?
11096   echo "$as_me:11096: \$? = $ac_status" >&5
11097   (exit $ac_status); } &&
11098          { ac_try='test -s conftest.$ac_objext'
11099   { (eval echo "$as_me:11099: \"$ac_try\"") >&5
11100   (eval $ac_try) 2>&5
11101   ac_status=$?
11102   echo "$as_me:11102: \$? = $ac_status" >&5
11103   (exit $ac_status); }; }; then
11104   cf_cv_fixup_sigwinch=$cf_sigwinch
11105          break
11106 else
11107   echo "$as_me: failed program was:" >&5
11108 cat conftest.$ac_ext >&5
11109 fi
11110 rm -f conftest.$ac_objext conftest.$ac_ext
11111
11112 cf_sigwinch=`expr $cf_sigwinch - 1`
11113 done
11114
11115 fi
11116 echo "$as_me:11116: result: $cf_cv_fixup_sigwinch" >&5
11117 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11118
11119         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11120                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11121         fi
11122 fi
11123
11124 # Checks for CODESET support.
11125
11126 echo "$as_me:11126: checking for nl_langinfo and CODESET" >&5
11127 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11128 if test "${am_cv_langinfo_codeset+set}" = set; then
11129   echo $ECHO_N "(cached) $ECHO_C" >&6
11130 else
11131   cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134 #include <langinfo.h>
11135 int
11136 main (void)
11137 {
11138 char* cs = nl_langinfo(CODESET);
11139   ;
11140   return 0;
11141 }
11142 _ACEOF
11143 rm -f conftest.$ac_objext conftest$ac_exeext
11144 if { (eval echo "$as_me:11144: \"$ac_link\"") >&5
11145   (eval $ac_link) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit $ac_status); } &&
11149          { ac_try='test -s conftest$ac_exeext'
11150   { (eval echo "$as_me:11150: \"$ac_try\"") >&5
11151   (eval $ac_try) 2>&5
11152   ac_status=$?
11153   echo "$as_me:11153: \$? = $ac_status" >&5
11154   (exit $ac_status); }; }; then
11155   am_cv_langinfo_codeset=yes
11156 else
11157   echo "$as_me: failed program was:" >&5
11158 cat conftest.$ac_ext >&5
11159 am_cv_langinfo_codeset=no
11160 fi
11161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11162
11163 fi
11164 echo "$as_me:11164: result: $am_cv_langinfo_codeset" >&5
11165 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11166         if test $am_cv_langinfo_codeset = yes; then
11167
11168 cat >>confdefs.h <<\EOF
11169 #define HAVE_LANGINFO_CODESET 1
11170 EOF
11171
11172         fi
11173
11174 # use these variables to work around a defect in gcc's fixincludes.
11175 NCURSES_OK_WCHAR_T=
11176 NCURSES_OK_WINT_T=
11177
11178 echo "$as_me:11178: checking if you want wide-character code" >&5
11179 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11180
11181 # Check whether --enable-widec or --disable-widec was given.
11182 if test "${enable_widec+set}" = set; then
11183   enableval="$enable_widec"
11184   with_widec=$enableval
11185 else
11186   with_widec=no
11187 fi;
11188 echo "$as_me:11188: result: $with_widec" >&5
11189 echo "${ECHO_T}$with_widec" >&6
11190
11191 NCURSES_WCWIDTH_GRAPHICS=1
11192
11193 if test "x$with_widec" = xyes ; then
11194         if test "x$disable_lib_suffixes" = xno ; then
11195                 LIB_SUFFIX="w${LIB_SUFFIX}"
11196         fi
11197
11198 cat >>confdefs.h <<\EOF
11199 #define USE_WIDEC_SUPPORT 1
11200 EOF
11201
11202 cat >>confdefs.h <<\EOF
11203 #define NCURSES_WIDECHAR 1
11204 EOF
11205
11206 for ac_header in \
11207 wchar.h \
11208 wctype.h \
11209
11210 do
11211 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11212 echo "$as_me:11212: checking for $ac_header" >&5
11213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11215   echo $ECHO_N "(cached) $ECHO_C" >&6
11216 else
11217   cat >conftest.$ac_ext <<_ACEOF
11218 #line 11218 "configure"
11219 #include "confdefs.h"
11220 #include <$ac_header>
11221 _ACEOF
11222 if { (eval echo "$as_me:11222: \"$ac_cpp conftest.$ac_ext\"") >&5
11223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11224   ac_status=$?
11225   egrep -v '^ *\+' conftest.er1 >conftest.err
11226   rm -f conftest.er1
11227   cat conftest.err >&5
11228   echo "$as_me:11228: \$? = $ac_status" >&5
11229   (exit $ac_status); } >/dev/null; then
11230   if test -s conftest.err; then
11231     ac_cpp_err=$ac_c_preproc_warn_flag
11232   else
11233     ac_cpp_err=
11234   fi
11235 else
11236   ac_cpp_err=yes
11237 fi
11238 if test -z "$ac_cpp_err"; then
11239   eval "$as_ac_Header=yes"
11240 else
11241   echo "$as_me: failed program was:" >&5
11242   cat conftest.$ac_ext >&5
11243   eval "$as_ac_Header=no"
11244 fi
11245 rm -f conftest.err conftest.$ac_ext
11246 fi
11247 echo "$as_me:11247: result: `eval echo '${'$as_ac_Header'}'`" >&5
11248 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11249 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11250   cat >>confdefs.h <<EOF
11251 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11252 EOF
11253
11254 fi
11255 done
11256
11257 echo "$as_me:11257: checking if wchar.h can be used as is" >&5
11258 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11259 if test "${cf_cv_wchar_h_okay+set}" = set; then
11260   echo $ECHO_N "(cached) $ECHO_C" >&6
11261 else
11262
11263 cat >conftest.$ac_ext <<_ACEOF
11264 #line 11264 "configure"
11265 #include "confdefs.h"
11266
11267 #include <stdlib.h>
11268 #ifdef HAVE_WCHAR_H
11269 #include <wchar.h>
11270 #endif
11271 #ifdef HAVE_WCTYPE_H
11272 #include <wctype.h>
11273 #endif
11274
11275 int
11276 main (void)
11277 {
11278
11279         wint_t foo = 0;
11280         int bar = iswpunct(foo)
11281   ;
11282   return 0;
11283 }
11284 _ACEOF
11285 rm -f conftest.$ac_objext
11286 if { (eval echo "$as_me:11286: \"$ac_compile\"") >&5
11287   (eval $ac_compile) 2>&5
11288   ac_status=$?
11289   echo "$as_me:11289: \$? = $ac_status" >&5
11290   (exit $ac_status); } &&
11291          { ac_try='test -s conftest.$ac_objext'
11292   { (eval echo "$as_me:11292: \"$ac_try\"") >&5
11293   (eval $ac_try) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); }; }; then
11297   cf_cv_wchar_h_okay=yes
11298 else
11299   echo "$as_me: failed program was:" >&5
11300 cat conftest.$ac_ext >&5
11301 cf_cv_wchar_h_okay=no
11302 fi
11303 rm -f conftest.$ac_objext conftest.$ac_ext
11304 fi
11305 echo "$as_me:11305: result: $cf_cv_wchar_h_okay" >&5
11306 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11307
11308 if test $cf_cv_wchar_h_okay = no
11309 then
11310
11311 echo "$as_me:11311: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11312 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11313 cat >conftest.$ac_ext <<_ACEOF
11314 #line 11314 "configure"
11315 #include "confdefs.h"
11316 #include <sys/types.h>
11317
11318 int
11319 main (void)
11320 {
11321
11322 #ifndef _XOPEN_SOURCE_EXTENDED
11323 make an error
11324 #endif
11325   ;
11326   return 0;
11327 }
11328 _ACEOF
11329 rm -f conftest.$ac_objext
11330 if { (eval echo "$as_me:11330: \"$ac_compile\"") >&5
11331   (eval $ac_compile) 2>&5
11332   ac_status=$?
11333   echo "$as_me:11333: \$? = $ac_status" >&5
11334   (exit $ac_status); } &&
11335          { ac_try='test -s conftest.$ac_objext'
11336   { (eval echo "$as_me:11336: \"$ac_try\"") >&5
11337   (eval $ac_try) 2>&5
11338   ac_status=$?
11339   echo "$as_me:11339: \$? = $ac_status" >&5
11340   (exit $ac_status); }; }; then
11341   cf_result=no
11342 else
11343   echo "$as_me: failed program was:" >&5
11344 cat conftest.$ac_ext >&5
11345 cf_result=yes
11346 fi
11347 rm -f conftest.$ac_objext conftest.$ac_ext
11348 echo "$as_me:11348: result: $cf_result" >&5
11349 echo "${ECHO_T}$cf_result" >&6
11350
11351 if test "$cf_result" = yes ; then
11352         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11353 elif test "x" != "x" ; then
11354         echo "$as_me:11354: checking checking for compatible value versus " >&5
11355 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11356         cat >conftest.$ac_ext <<_ACEOF
11357 #line 11357 "configure"
11358 #include "confdefs.h"
11359 #include <sys/types.h>
11360
11361 int
11362 main (void)
11363 {
11364
11365 #if _XOPEN_SOURCE_EXTENDED- < 0
11366 make an error
11367 #endif
11368   ;
11369   return 0;
11370 }
11371 _ACEOF
11372 rm -f conftest.$ac_objext
11373 if { (eval echo "$as_me:11373: \"$ac_compile\"") >&5
11374   (eval $ac_compile) 2>&5
11375   ac_status=$?
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit $ac_status); } &&
11378          { ac_try='test -s conftest.$ac_objext'
11379   { (eval echo "$as_me:11379: \"$ac_try\"") >&5
11380   (eval $ac_try) 2>&5
11381   ac_status=$?
11382   echo "$as_me:11382: \$? = $ac_status" >&5
11383   (exit $ac_status); }; }; then
11384   cf_result=yes
11385 else
11386   echo "$as_me: failed program was:" >&5
11387 cat conftest.$ac_ext >&5
11388 cf_result=no
11389 fi
11390 rm -f conftest.$ac_objext conftest.$ac_ext
11391         echo "$as_me:11391: result: $cf_result" >&5
11392 echo "${ECHO_T}$cf_result" >&6
11393         if test "$cf_result" = no ; then
11394                 # perhaps we can override it - try...
11395                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11396         fi
11397 fi
11398
11399 fi
11400
11401 echo "$as_me:11401: checking if wcwidth agrees graphics are single-width" >&5
11402 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11403 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11404   echo $ECHO_N "(cached) $ECHO_C" >&6
11405 else
11406
11407 cat >conftest.in <<CF_EOF
11408 -       VT100 symbols
11409 0x250c  upper left corner
11410 0x2514  lower left corner
11411 0x2510  upper right corner
11412 0x2518  lower right corner
11413 0x251c  tee pointing left
11414 0x2524  tee pointing right
11415 0x2534  tee pointing up
11416 0x252c  tee pointing down
11417 0x2500  horizontal line
11418 0x2502  vertical line
11419 0x253c  large plus or crossover
11420 0x23ba  scan line 1
11421 0x23bd  scan line 9
11422 0x25c6  diamond
11423 0x2592  checker board (stipple)
11424 0x00b0  degree symbol
11425 0x00b1  plus/minus
11426 0x00b7  bullet
11427 -       Teletype 5410v1 symbols
11428 0x2190  arrow pointing left
11429 0x2192  arrow pointing right
11430 0x2193  arrow pointing down
11431 0x2191  arrow pointing up
11432 0x2592  board of squares
11433 0x2603  lantern symbol
11434 0x25ae  solid square block
11435 -       these defaults were invented for ncurses
11436 0x23bb  scan line 3
11437 0x23bc  scan line 7
11438 0x2264  less-than-or-equal-to
11439 0x2265  greater-than-or-equal-to
11440 0x03c0  greek pi
11441 0x2260  not-equal
11442 0x00a3  pound-sterling symbol
11443 -       thick-line-drawing
11444 0x250f  upper left corner
11445 0x2517  lower left corner
11446 0x2513  upper right corner
11447 0x251b  lower right corner
11448 0x2523  tee pointing left
11449 0x252b  tee pointing right
11450 0x253b  tee pointing up
11451 0x2533  tee pointing down
11452 0x2501  horizontal line
11453 0x2503  vertical line
11454 0x254b  large plus or crossover
11455 -       double-line-drawing
11456 0x2554  upper left corner
11457 0x255a  lower left corner
11458 0x2557  upper right corner
11459 0x255d  lower right corner
11460 0x2563  tee pointing left
11461 0x2560  tee pointing right
11462 0x2569  tee pointing up
11463 0x2566  tee pointing down
11464 0x2550  horizontal line
11465 0x2551  vertical line
11466 0x256c  large plus or crossover
11467 CF_EOF
11468 if test "$cross_compiling" = yes; then
11469   cf_cv_wcwidth_graphics=unknown
11470 else
11471   cat >conftest.$ac_ext <<_ACEOF
11472 #line 11472 "configure"
11473 #include "confdefs.h"
11474
11475 #include <locale.h>
11476 #include <stdio.h>
11477 #include <wchar.h>
11478
11479 #define MY_LEN 80
11480
11481 int
11482 main(void)
11483 {
11484         FILE *fp;
11485         int value;
11486         char buffer[MY_LEN + 1];
11487         char notes[MY_LEN + 1];
11488         int totals = 0;
11489         int passed = 0;
11490
11491         if (setlocale(LC_ALL, "en_US.UTF8") ||
11492                 setlocale(LC_ALL, "en_US.UTF-8") ||
11493                 setlocale(LC_ALL, "en_US.utf8") ||
11494                 setlocale(LC_ALL, "en_US.utf-8")) {
11495                 if ((fp = fopen("conftest.in", "r")) != 0) {
11496                         while (fgets(buffer, MY_LEN, fp) != 0) {
11497                                 if (*buffer == '-') {
11498                                         fprintf(stderr, "\t%s", buffer);
11499                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11500                                         ++totals;
11501                                         if (wcwidth(value) == 1)
11502                                                 ++passed;
11503                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11504                                 } else {
11505                                         fprintf(stderr, "?\t%s", buffer);
11506                                 }
11507                         }
11508                 }
11509         }
11510         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11511         return (totals == passed) ? 0 : 1;
11512 }
11513
11514 _ACEOF
11515 rm -f conftest$ac_exeext
11516 if { (eval echo "$as_me:11516: \"$ac_link\"") >&5
11517   (eval $ac_link) 2>&5
11518   ac_status=$?
11519   echo "$as_me:11519: \$? = $ac_status" >&5
11520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit $ac_status); }; }; then
11526   cf_cv_wcwidth_graphics=yes
11527 else
11528   echo "$as_me: program exited with status $ac_status" >&5
11529 echo "$as_me: failed program was:" >&5
11530 cat conftest.$ac_ext >&5
11531 cf_cv_wcwidth_graphics=no
11532 fi
11533 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11534 fi
11535
11536 fi
11537 echo "$as_me:11537: result: $cf_cv_wcwidth_graphics" >&5
11538 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11539
11540         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11541
11542         # with_overwrite=no
11543         NCURSES_CH_T=cchar_t
11544
11545 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11546 do
11547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11548 echo "$as_me:11548: checking for $ac_func" >&5
11549 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11550 if eval "test \"\${$as_ac_var+set}\" = set"; then
11551   echo $ECHO_N "(cached) $ECHO_C" >&6
11552 else
11553   cat >conftest.$ac_ext <<_ACEOF
11554 #line 11554 "configure"
11555 #include "confdefs.h"
11556 #define $ac_func autoconf_temporary
11557 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11558 #undef $ac_func
11559
11560 #ifdef __cplusplus
11561 extern "C"
11562 #endif
11563
11564 /* We use char because int might match the return type of a gcc2
11565    builtin and then its argument prototype would still apply.  */
11566 char $ac_func (void);
11567
11568 int
11569 main (void)
11570 {
11571
11572 /* The GNU C library defines stubs for functions which it implements
11573     to always fail with ENOSYS.  Some functions are actually named
11574     something starting with __ and the normal name is an alias.  */
11575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11576 #error found stub for $ac_func
11577 #endif
11578
11579         return $ac_func ();
11580   ;
11581   return 0;
11582 }
11583 _ACEOF
11584 rm -f conftest.$ac_objext conftest$ac_exeext
11585 if { (eval echo "$as_me:11585: \"$ac_link\"") >&5
11586   (eval $ac_link) 2>&5
11587   ac_status=$?
11588   echo "$as_me:11588: \$? = $ac_status" >&5
11589   (exit $ac_status); } &&
11590          { ac_try='test -s conftest$ac_exeext'
11591   { (eval echo "$as_me:11591: \"$ac_try\"") >&5
11592   (eval $ac_try) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); }; }; then
11596   eval "$as_ac_var=yes"
11597 else
11598   echo "$as_me: failed program was:" >&5
11599 cat conftest.$ac_ext >&5
11600 eval "$as_ac_var=no"
11601 fi
11602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11603 fi
11604 echo "$as_me:11604: result: `eval echo '${'$as_ac_var'}'`" >&5
11605 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11606 if test `eval echo '${'$as_ac_var'}'` = yes; then
11607   cat >>confdefs.h <<EOF
11608 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11609 EOF
11610
11611 fi
11612 done
11613
11614         if test "x$ac_cv_func_putwc" != xyes ; then
11615
11616 echo "$as_me:11616: checking for multibyte character support" >&5
11617 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11618 if test "${cf_cv_utf8_lib+set}" = set; then
11619   echo $ECHO_N "(cached) $ECHO_C" >&6
11620 else
11621
11622         cf_save_LIBS="$LIBS"
11623         cat >conftest.$ac_ext <<_ACEOF
11624 #line 11624 "configure"
11625 #include "confdefs.h"
11626
11627 #include <stdlib.h>
11628 int
11629 main (void)
11630 {
11631 putwc(0,0);
11632   ;
11633   return 0;
11634 }
11635 _ACEOF
11636 rm -f conftest.$ac_objext conftest$ac_exeext
11637 if { (eval echo "$as_me:11637: \"$ac_link\"") >&5
11638   (eval $ac_link) 2>&5
11639   ac_status=$?
11640   echo "$as_me:11640: \$? = $ac_status" >&5
11641   (exit $ac_status); } &&
11642          { ac_try='test -s conftest$ac_exeext'
11643   { (eval echo "$as_me:11643: \"$ac_try\"") >&5
11644   (eval $ac_try) 2>&5
11645   ac_status=$?
11646   echo "$as_me:11646: \$? = $ac_status" >&5
11647   (exit $ac_status); }; }; then
11648   cf_cv_utf8_lib=yes
11649 else
11650   echo "$as_me: failed program was:" >&5
11651 cat conftest.$ac_ext >&5
11652
11653 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11654 # will be set on completion of the AC_TRY_LINK below.
11655 cf_cv_header_path_utf8=
11656 cf_cv_library_path_utf8=
11657
11658 echo "${as_me:-configure}:11658: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11659
11660 cf_save_LIBS="$LIBS"
11661
11662 cat >conftest.$ac_ext <<_ACEOF
11663 #line 11663 "configure"
11664 #include "confdefs.h"
11665
11666 #include <libutf8.h>
11667 int
11668 main (void)
11669 {
11670 putwc(0,0);
11671   ;
11672   return 0;
11673 }
11674 _ACEOF
11675 rm -f conftest.$ac_objext conftest$ac_exeext
11676 if { (eval echo "$as_me:11676: \"$ac_link\"") >&5
11677   (eval $ac_link) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); } &&
11681          { ac_try='test -s conftest$ac_exeext'
11682   { (eval echo "$as_me:11682: \"$ac_try\"") >&5
11683   (eval $ac_try) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); }; }; then
11687
11688         cf_cv_find_linkage_utf8=yes
11689         cf_cv_header_path_utf8=/usr/include
11690         cf_cv_library_path_utf8=/usr/lib
11691
11692 else
11693   echo "$as_me: failed program was:" >&5
11694 cat conftest.$ac_ext >&5
11695
11696 LIBS="-lutf8  $cf_save_LIBS"
11697
11698 cat >conftest.$ac_ext <<_ACEOF
11699 #line 11699 "configure"
11700 #include "confdefs.h"
11701
11702 #include <libutf8.h>
11703 int
11704 main (void)
11705 {
11706 putwc(0,0);
11707   ;
11708   return 0;
11709 }
11710 _ACEOF
11711 rm -f conftest.$ac_objext conftest$ac_exeext
11712 if { (eval echo "$as_me:11712: \"$ac_link\"") >&5
11713   (eval $ac_link) 2>&5
11714   ac_status=$?
11715   echo "$as_me:11715: \$? = $ac_status" >&5
11716   (exit $ac_status); } &&
11717          { ac_try='test -s conftest$ac_exeext'
11718   { (eval echo "$as_me:11718: \"$ac_try\"") >&5
11719   (eval $ac_try) 2>&5
11720   ac_status=$?
11721   echo "$as_me:11721: \$? = $ac_status" >&5
11722   (exit $ac_status); }; }; then
11723
11724         cf_cv_find_linkage_utf8=yes
11725         cf_cv_header_path_utf8=/usr/include
11726         cf_cv_library_path_utf8=/usr/lib
11727         cf_cv_library_file_utf8="-lutf8"
11728
11729 else
11730   echo "$as_me: failed program was:" >&5
11731 cat conftest.$ac_ext >&5
11732
11733         cf_cv_find_linkage_utf8=no
11734         LIBS="$cf_save_LIBS"
11735
11736         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11737
11738 echo "${as_me:-configure}:11738: testing find linkage for utf8 library ..." 1>&5
11739
11740 echo "${as_me:-configure}:11740: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11741
11742         cf_save_CPPFLAGS="$CPPFLAGS"
11743         cf_test_CPPFLAGS="$CPPFLAGS"
11744
11745 cf_search=
11746
11747 # collect the current set of include-directories from compiler flags
11748 cf_header_path_list=""
11749 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11750         for cf_header_path in $CPPFLAGS $CFLAGS
11751         do
11752                 case $cf_header_path in
11753                 (-I*)
11754                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11755
11756 test "x$cf_header_path" != "xNONE" && \
11757 test -d "$cf_header_path" && \
11758  {
11759         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11760         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11761         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11762         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11763         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11764         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11765 }
11766
11767                         cf_header_path_list="$cf_header_path_list $cf_search"
11768                         ;;
11769                 esac
11770         done
11771 fi
11772
11773 # add the variations for the package we are looking for
11774
11775 cf_search=
11776
11777 test "x$prefix" != "xNONE" && \
11778 test -d "$prefix" && \
11779  {
11780         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11781         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11782         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11783         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11784         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11785         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11786 }
11787
11788 for cf_subdir_prefix in \
11789         /usr \
11790         /usr/local \
11791         /usr/pkg \
11792         /opt \
11793         /opt/local \
11794         $HOME
11795 do
11796
11797 test "x$cf_subdir_prefix" != "x$prefix" && \
11798 test -d "$cf_subdir_prefix" && \
11799 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11800         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11801         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11802         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11803         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11804         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11805         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11806 }
11807
11808 done
11809
11810 test "$includedir" != NONE && \
11811 test "$includedir" != "/usr/include" && \
11812 test -d "$includedir" && {
11813         test -d $includedir &&    cf_search="$cf_search $includedir"
11814         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11815 }
11816
11817 test "$oldincludedir" != NONE && \
11818 test "$oldincludedir" != "/usr/include" && \
11819 test -d "$oldincludedir" && {
11820         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11821         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11822 }
11823
11824 cf_search="$cf_search $cf_header_path_list"
11825
11826         for cf_cv_header_path_utf8 in $cf_search
11827         do
11828                 if test -d $cf_cv_header_path_utf8 ; then
11829                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11830
11831 echo "${as_me:-configure}:11831: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11832
11833                         CPPFLAGS="$cf_save_CPPFLAGS"
11834
11835         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11836         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11837
11838                         cat >conftest.$ac_ext <<_ACEOF
11839 #line 11839 "configure"
11840 #include "confdefs.h"
11841
11842 #include <libutf8.h>
11843 int
11844 main (void)
11845 {
11846 putwc(0,0);
11847   ;
11848   return 0;
11849 }
11850 _ACEOF
11851 rm -f conftest.$ac_objext
11852 if { (eval echo "$as_me:11852: \"$ac_compile\"") >&5
11853   (eval $ac_compile) 2>&5
11854   ac_status=$?
11855   echo "$as_me:11855: \$? = $ac_status" >&5
11856   (exit $ac_status); } &&
11857          { ac_try='test -s conftest.$ac_objext'
11858   { (eval echo "$as_me:11858: \"$ac_try\"") >&5
11859   (eval $ac_try) 2>&5
11860   ac_status=$?
11861   echo "$as_me:11861: \$? = $ac_status" >&5
11862   (exit $ac_status); }; }; then
11863
11864                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11865
11866 echo "${as_me:-configure}:11866: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11867
11868                                 cf_cv_find_linkage_utf8=maybe
11869                                 cf_test_CPPFLAGS="$CPPFLAGS"
11870                                 break
11871 else
11872   echo "$as_me: failed program was:" >&5
11873 cat conftest.$ac_ext >&5
11874
11875                                 CPPFLAGS="$cf_save_CPPFLAGS"
11876
11877 fi
11878 rm -f conftest.$ac_objext conftest.$ac_ext
11879                 fi
11880         done
11881
11882         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11883
11884 echo "${as_me:-configure}:11884: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11885
11886                 cf_save_LIBS="$LIBS"
11887                 cf_save_LDFLAGS="$LDFLAGS"
11888
11889                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11890
11891 cf_search=
11892 cf_library_path_list=""
11893 if test -n "${LDFLAGS}${LIBS}" ; then
11894         for cf_library_path in $LDFLAGS $LIBS
11895         do
11896                 case $cf_library_path in
11897                 (-L*)
11898                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11899
11900 test "x$cf_library_path" != "xNONE" && \
11901 test -d "$cf_library_path" && \
11902  {
11903         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11904         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11905         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11906         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11907         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11908         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11909 }
11910
11911                         cf_library_path_list="$cf_library_path_list $cf_search"
11912                         ;;
11913                 esac
11914         done
11915 fi
11916
11917 cf_search=
11918
11919 test "x$prefix" != "xNONE" && \
11920 test -d "$prefix" && \
11921  {
11922         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11923         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11924         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11925         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11926         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11927         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11928 }
11929
11930 for cf_subdir_prefix in \
11931         /usr \
11932         /usr/local \
11933         /usr/pkg \
11934         /opt \
11935         /opt/local \
11936         $HOME
11937 do
11938
11939 test "x$cf_subdir_prefix" != "x$prefix" && \
11940 test -d "$cf_subdir_prefix" && \
11941 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11942         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11943         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11944         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11945         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11946         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11947         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11948 }
11949
11950 done
11951
11952 cf_search="$cf_library_path_list $cf_search"
11953
11954                         for cf_cv_library_path_utf8 in $cf_search
11955                         do
11956                                 if test -d $cf_cv_library_path_utf8 ; then
11957                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11958
11959 echo "${as_me:-configure}:11959: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11960
11961                                         CPPFLAGS="$cf_test_CPPFLAGS"
11962                                         LIBS="-lutf8  $cf_save_LIBS"
11963                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11964                                         cat >conftest.$ac_ext <<_ACEOF
11965 #line 11965 "configure"
11966 #include "confdefs.h"
11967
11968 #include <libutf8.h>
11969 int
11970 main (void)
11971 {
11972 putwc(0,0);
11973   ;
11974   return 0;
11975 }
11976 _ACEOF
11977 rm -f conftest.$ac_objext conftest$ac_exeext
11978 if { (eval echo "$as_me:11978: \"$ac_link\"") >&5
11979   (eval $ac_link) 2>&5
11980   ac_status=$?
11981   echo "$as_me:11981: \$? = $ac_status" >&5
11982   (exit $ac_status); } &&
11983          { ac_try='test -s conftest$ac_exeext'
11984   { (eval echo "$as_me:11984: \"$ac_try\"") >&5
11985   (eval $ac_try) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); }; }; then
11989
11990                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11991
11992 echo "${as_me:-configure}:11992: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11993
11994                                         cf_cv_find_linkage_utf8=yes
11995                                         cf_cv_library_file_utf8="-lutf8"
11996                                         break
11997 else
11998   echo "$as_me: failed program was:" >&5
11999 cat conftest.$ac_ext >&5
12000
12001                                         CPPFLAGS="$cf_save_CPPFLAGS"
12002                                         LIBS="$cf_save_LIBS"
12003                                         LDFLAGS="$cf_save_LDFLAGS"
12004
12005 fi
12006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12007                                 fi
12008                         done
12009                         CPPFLAGS="$cf_save_CPPFLAGS"
12010                         LDFLAGS="$cf_save_LDFLAGS"
12011                 fi
12012
12013         else
12014                 cf_cv_find_linkage_utf8=no
12015         fi
12016
12017 fi
12018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12019
12020 fi
12021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12022
12023 LIBS="$cf_save_LIBS"
12024
12025 if test "$cf_cv_find_linkage_utf8" = yes ; then
12026 cf_cv_utf8_lib=add-on
12027 else
12028 cf_cv_utf8_lib=no
12029 fi
12030
12031 fi
12032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12033 fi
12034 echo "$as_me:12034: result: $cf_cv_utf8_lib" >&5
12035 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12036
12037 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12038 # ncurses/ncursesw:
12039 if test "$cf_cv_utf8_lib" = "add-on" ; then
12040
12041 cat >>confdefs.h <<\EOF
12042 #define HAVE_LIBUTF8_H 1
12043 EOF
12044
12045 if test -n "$cf_cv_header_path_utf8" ; then
12046   for cf_add_incdir in $cf_cv_header_path_utf8
12047   do
12048         while test $cf_add_incdir != /usr/include
12049         do
12050           if test -d $cf_add_incdir
12051           then
12052                 cf_have_incdir=no
12053                 if test -n "$CFLAGS$CPPFLAGS" ; then
12054                   # a loop is needed to ensure we can add subdirs of existing dirs
12055                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12056                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12057                           cf_have_incdir=yes; break
12058                         fi
12059                   done
12060                 fi
12061
12062                 if test "$cf_have_incdir" = no ; then
12063                   if test "$cf_add_incdir" = /usr/local/include ; then
12064                         if test "$GCC" = yes
12065                         then
12066                           cf_save_CPPFLAGS=$CPPFLAGS
12067
12068         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12069         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12070
12071                           cat >conftest.$ac_ext <<_ACEOF
12072 #line 12072 "configure"
12073 #include "confdefs.h"
12074 #include <stdio.h>
12075 int
12076 main (void)
12077 {
12078 printf("Hello")
12079   ;
12080   return 0;
12081 }
12082 _ACEOF
12083 rm -f conftest.$ac_objext
12084 if { (eval echo "$as_me:12084: \"$ac_compile\"") >&5
12085   (eval $ac_compile) 2>&5
12086   ac_status=$?
12087   echo "$as_me:12087: \$? = $ac_status" >&5
12088   (exit $ac_status); } &&
12089          { ac_try='test -s conftest.$ac_objext'
12090   { (eval echo "$as_me:12090: \"$ac_try\"") >&5
12091   (eval $ac_try) 2>&5
12092   ac_status=$?
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit $ac_status); }; }; then
12095   :
12096 else
12097   echo "$as_me: failed program was:" >&5
12098 cat conftest.$ac_ext >&5
12099 cf_have_incdir=yes
12100 fi
12101 rm -f conftest.$ac_objext conftest.$ac_ext
12102                           CPPFLAGS=$cf_save_CPPFLAGS
12103                         fi
12104                   fi
12105                 fi
12106
12107                 if test "$cf_have_incdir" = no ; then
12108                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12109
12110 echo "${as_me:-configure}:12110: testing adding $cf_add_incdir to include-path ..." 1>&5
12111
12112                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12113
12114                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12115                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12116                   cf_add_incdir="$cf_top_incdir"
12117                 else
12118                   break
12119                 fi
12120           else
12121                 break
12122           fi
12123         done
12124   done
12125 fi
12126
12127 if test -n "$cf_cv_library_path_utf8" ; then
12128         for cf_add_libdir in $cf_cv_library_path_utf8
12129         do
12130                 if test $cf_add_libdir = /usr/lib ; then
12131                         :
12132                 elif test -d $cf_add_libdir
12133                 then
12134                         cf_have_libdir=no
12135                         if test -n "$LDFLAGS$LIBS" ; then
12136                                 # a loop is needed to ensure we can add subdirs of existing dirs
12137                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12138                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12139                                                 cf_have_libdir=yes; break
12140                                         fi
12141                                 done
12142                         fi
12143                         if test "$cf_have_libdir" = no ; then
12144                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12145
12146 echo "${as_me:-configure}:12146: testing adding $cf_add_libdir to library-path ..." 1>&5
12147
12148                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12149                         fi
12150                 fi
12151         done
12152 fi
12153
12154 cf_add_libs="$cf_cv_library_file_utf8"
12155 # Filter out duplicates - this happens with badly-designed ".pc" files...
12156 for cf_add_1lib in $LIBS
12157 do
12158         for cf_add_2lib in $cf_add_libs
12159         do
12160                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12161                 then
12162                         cf_add_1lib=
12163                         break
12164                 fi
12165         done
12166         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12167 done
12168 LIBS="$cf_add_libs"
12169
12170 fi
12171
12172                 if test "$cf_cv_utf8_lib" != no ; then
12173                         NCURSES_LIBUTF8=1
12174                 fi
12175         fi
12176
12177 # This is needed on Tru64 5.0 to declare mbstate_t
12178 echo "$as_me:12178: checking if we must include wchar.h to declare mbstate_t" >&5
12179 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12180 if test "${cf_cv_mbstate_t+set}" = set; then
12181   echo $ECHO_N "(cached) $ECHO_C" >&6
12182 else
12183
12184 cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187
12188 #include <stdlib.h>
12189 #include <stdarg.h>
12190 #include <stdio.h>
12191 #ifdef HAVE_LIBUTF8_H
12192 #include <libutf8.h>
12193 #endif
12194 int
12195 main (void)
12196 {
12197 mbstate_t state
12198   ;
12199   return 0;
12200 }
12201 _ACEOF
12202 rm -f conftest.$ac_objext
12203 if { (eval echo "$as_me:12203: \"$ac_compile\"") >&5
12204   (eval $ac_compile) 2>&5
12205   ac_status=$?
12206   echo "$as_me:12206: \$? = $ac_status" >&5
12207   (exit $ac_status); } &&
12208          { ac_try='test -s conftest.$ac_objext'
12209   { (eval echo "$as_me:12209: \"$ac_try\"") >&5
12210   (eval $ac_try) 2>&5
12211   ac_status=$?
12212   echo "$as_me:12212: \$? = $ac_status" >&5
12213   (exit $ac_status); }; }; then
12214   cf_cv_mbstate_t=no
12215 else
12216   echo "$as_me: failed program was:" >&5
12217 cat conftest.$ac_ext >&5
12218 cat >conftest.$ac_ext <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12221
12222 #include <stdlib.h>
12223 #include <stdarg.h>
12224 #include <stdio.h>
12225 #include <wchar.h>
12226 #ifdef HAVE_LIBUTF8_H
12227 #include <libutf8.h>
12228 #endif
12229 int
12230 main (void)
12231 {
12232 mbstate_t value
12233   ;
12234   return 0;
12235 }
12236 _ACEOF
12237 rm -f conftest.$ac_objext
12238 if { (eval echo "$as_me:12238: \"$ac_compile\"") >&5
12239   (eval $ac_compile) 2>&5
12240   ac_status=$?
12241   echo "$as_me:12241: \$? = $ac_status" >&5
12242   (exit $ac_status); } &&
12243          { ac_try='test -s conftest.$ac_objext'
12244   { (eval echo "$as_me:12244: \"$ac_try\"") >&5
12245   (eval $ac_try) 2>&5
12246   ac_status=$?
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit $ac_status); }; }; then
12249   cf_cv_mbstate_t=yes
12250 else
12251   echo "$as_me: failed program was:" >&5
12252 cat conftest.$ac_ext >&5
12253 cf_cv_mbstate_t=unknown
12254 fi
12255 rm -f conftest.$ac_objext conftest.$ac_ext
12256 fi
12257 rm -f conftest.$ac_objext conftest.$ac_ext
12258 fi
12259 echo "$as_me:12259: result: $cf_cv_mbstate_t" >&5
12260 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12261
12262 if test "$cf_cv_mbstate_t" = yes ; then
12263
12264 cat >>confdefs.h <<\EOF
12265 #define NEED_WCHAR_H 1
12266 EOF
12267
12268         NEED_WCHAR_H=1
12269 fi
12270
12271 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12272 if test "$cf_cv_mbstate_t" = unknown ; then
12273         NCURSES_MBSTATE_T=1
12274 fi
12275
12276 # This is needed on Tru64 5.0 to declare wchar_t
12277 echo "$as_me:12277: checking if we must include wchar.h to declare wchar_t" >&5
12278 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12279 if test "${cf_cv_wchar_t+set}" = set; then
12280   echo $ECHO_N "(cached) $ECHO_C" >&6
12281 else
12282
12283 cat >conftest.$ac_ext <<_ACEOF
12284 #line 12284 "configure"
12285 #include "confdefs.h"
12286
12287 #include <stdlib.h>
12288 #include <stdarg.h>
12289 #include <stdio.h>
12290 #ifdef HAVE_LIBUTF8_H
12291 #include <libutf8.h>
12292 #endif
12293 int
12294 main (void)
12295 {
12296 wchar_t state
12297   ;
12298   return 0;
12299 }
12300 _ACEOF
12301 rm -f conftest.$ac_objext
12302 if { (eval echo "$as_me:12302: \"$ac_compile\"") >&5
12303   (eval $ac_compile) 2>&5
12304   ac_status=$?
12305   echo "$as_me:12305: \$? = $ac_status" >&5
12306   (exit $ac_status); } &&
12307          { ac_try='test -s conftest.$ac_objext'
12308   { (eval echo "$as_me:12308: \"$ac_try\"") >&5
12309   (eval $ac_try) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); }; }; then
12313   cf_cv_wchar_t=no
12314 else
12315   echo "$as_me: failed program was:" >&5
12316 cat conftest.$ac_ext >&5
12317 cat >conftest.$ac_ext <<_ACEOF
12318 #line 12318 "configure"
12319 #include "confdefs.h"
12320
12321 #include <stdlib.h>
12322 #include <stdarg.h>
12323 #include <stdio.h>
12324 #include <wchar.h>
12325 #ifdef HAVE_LIBUTF8_H
12326 #include <libutf8.h>
12327 #endif
12328 int
12329 main (void)
12330 {
12331 wchar_t value
12332   ;
12333   return 0;
12334 }
12335 _ACEOF
12336 rm -f conftest.$ac_objext
12337 if { (eval echo "$as_me:12337: \"$ac_compile\"") >&5
12338   (eval $ac_compile) 2>&5
12339   ac_status=$?
12340   echo "$as_me:12340: \$? = $ac_status" >&5
12341   (exit $ac_status); } &&
12342          { ac_try='test -s conftest.$ac_objext'
12343   { (eval echo "$as_me:12343: \"$ac_try\"") >&5
12344   (eval $ac_try) 2>&5
12345   ac_status=$?
12346   echo "$as_me:12346: \$? = $ac_status" >&5
12347   (exit $ac_status); }; }; then
12348   cf_cv_wchar_t=yes
12349 else
12350   echo "$as_me: failed program was:" >&5
12351 cat conftest.$ac_ext >&5
12352 cf_cv_wchar_t=unknown
12353 fi
12354 rm -f conftest.$ac_objext conftest.$ac_ext
12355 fi
12356 rm -f conftest.$ac_objext conftest.$ac_ext
12357 fi
12358 echo "$as_me:12358: result: $cf_cv_wchar_t" >&5
12359 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12360
12361 if test "$cf_cv_wchar_t" = yes ; then
12362
12363 cat >>confdefs.h <<\EOF
12364 #define NEED_WCHAR_H 1
12365 EOF
12366
12367         NEED_WCHAR_H=1
12368 fi
12369
12370 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12371 if test "$cf_cv_wchar_t" = unknown ; then
12372         NCURSES_WCHAR_T=1
12373 fi
12374
12375 # if we find wchar_t in either place, use substitution to provide a fallback.
12376 if test "$cf_cv_wchar_t" != unknown ; then
12377         NCURSES_OK_WCHAR_T=1
12378 fi
12379
12380 # This is needed on Tru64 5.0 to declare wint_t
12381 echo "$as_me:12381: checking if we must include wchar.h to declare wint_t" >&5
12382 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12383 if test "${cf_cv_wint_t+set}" = set; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386
12387 cat >conftest.$ac_ext <<_ACEOF
12388 #line 12388 "configure"
12389 #include "confdefs.h"
12390
12391 #include <stdlib.h>
12392 #include <stdarg.h>
12393 #include <stdio.h>
12394 #ifdef HAVE_LIBUTF8_H
12395 #include <libutf8.h>
12396 #endif
12397 int
12398 main (void)
12399 {
12400 wint_t state
12401   ;
12402   return 0;
12403 }
12404 _ACEOF
12405 rm -f conftest.$ac_objext
12406 if { (eval echo "$as_me:12406: \"$ac_compile\"") >&5
12407   (eval $ac_compile) 2>&5
12408   ac_status=$?
12409   echo "$as_me:12409: \$? = $ac_status" >&5
12410   (exit $ac_status); } &&
12411          { ac_try='test -s conftest.$ac_objext'
12412   { (eval echo "$as_me:12412: \"$ac_try\"") >&5
12413   (eval $ac_try) 2>&5
12414   ac_status=$?
12415   echo "$as_me:12415: \$? = $ac_status" >&5
12416   (exit $ac_status); }; }; then
12417   cf_cv_wint_t=no
12418 else
12419   echo "$as_me: failed program was:" >&5
12420 cat conftest.$ac_ext >&5
12421 cat >conftest.$ac_ext <<_ACEOF
12422 #line 12422 "configure"
12423 #include "confdefs.h"
12424
12425 #include <stdlib.h>
12426 #include <stdarg.h>
12427 #include <stdio.h>
12428 #include <wchar.h>
12429 #ifdef HAVE_LIBUTF8_H
12430 #include <libutf8.h>
12431 #endif
12432 int
12433 main (void)
12434 {
12435 wint_t value
12436   ;
12437   return 0;
12438 }
12439 _ACEOF
12440 rm -f conftest.$ac_objext
12441 if { (eval echo "$as_me:12441: \"$ac_compile\"") >&5
12442   (eval $ac_compile) 2>&5
12443   ac_status=$?
12444   echo "$as_me:12444: \$? = $ac_status" >&5
12445   (exit $ac_status); } &&
12446          { ac_try='test -s conftest.$ac_objext'
12447   { (eval echo "$as_me:12447: \"$ac_try\"") >&5
12448   (eval $ac_try) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); }; }; then
12452   cf_cv_wint_t=yes
12453 else
12454   echo "$as_me: failed program was:" >&5
12455 cat conftest.$ac_ext >&5
12456 cf_cv_wint_t=unknown
12457 fi
12458 rm -f conftest.$ac_objext conftest.$ac_ext
12459 fi
12460 rm -f conftest.$ac_objext conftest.$ac_ext
12461 fi
12462 echo "$as_me:12462: result: $cf_cv_wint_t" >&5
12463 echo "${ECHO_T}$cf_cv_wint_t" >&6
12464
12465 if test "$cf_cv_wint_t" = yes ; then
12466
12467 cat >>confdefs.h <<\EOF
12468 #define NEED_WCHAR_H 1
12469 EOF
12470
12471         NEED_WCHAR_H=1
12472 fi
12473
12474 # if we do not find wint_t in either place, use substitution to provide a fallback.
12475 if test "$cf_cv_wint_t" = unknown ; then
12476         NCURSES_WINT_T=1
12477 fi
12478
12479 # if we find wint_t in either place, use substitution to provide a fallback.
12480 if test "$cf_cv_wint_t" != unknown ; then
12481         NCURSES_OK_WINT_T=1
12482 fi
12483
12484         if test "$NCURSES_MBSTATE_T" != 0; then
12485
12486 cat >>confdefs.h <<\EOF
12487 #define NEED_MBSTATE_T_DEF 1
12488 EOF
12489
12490         fi
12491 fi
12492
12493 ###   use option --disable-lp64 to allow long chtype
12494 echo "$as_me:12494: checking whether to enable _LP64 definition in curses.h" >&5
12495 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12496
12497 # Check whether --enable-lp64 or --disable-lp64 was given.
12498 if test "${enable_lp64+set}" = set; then
12499   enableval="$enable_lp64"
12500   with_lp64=$enableval
12501 else
12502   with_lp64=$cf_dft_with_lp64
12503 fi;
12504 echo "$as_me:12504: result: $with_lp64" >&5
12505 echo "${ECHO_T}$with_lp64" >&6
12506
12507 if test "x$with_lp64" = xyes ; then
12508         cf_cv_enable_lp64=1
12509 else
12510         cf_cv_enable_lp64=0
12511 fi
12512
12513 # Check whether --enable-largefile or --disable-largefile was given.
12514 if test "${enable_largefile+set}" = set; then
12515   enableval="$enable_largefile"
12516
12517 fi;
12518 if test "$enable_largefile" != no; then
12519
12520   echo "$as_me:12520: checking for special C compiler options needed for large files" >&5
12521 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12522 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12523   echo $ECHO_N "(cached) $ECHO_C" >&6
12524 else
12525   ac_cv_sys_largefile_CC=no
12526      if test "$GCC" != yes; then
12527        ac_save_CC=$CC
12528        while :; do
12529          # IRIX 6.2 and later do not support large files by default,
12530          # so use the C compiler's -n32 option if that helps.
12531          cat >conftest.$ac_ext <<_ACEOF
12532 #line 12532 "configure"
12533 #include "confdefs.h"
12534 #include <sys/types.h>
12535  /* Check that off_t can represent 2**63 - 1 correctly.
12536     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12537     since some C++ compilers masquerading as C compilers
12538     incorrectly reject 9223372036854775807.  */
12539 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12540   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12541                        && LARGE_OFF_T % 2147483647 == 1)
12542                       ? 1 : -1];
12543 int
12544 main (void)
12545 {
12546
12547   ;
12548   return 0;
12549 }
12550 _ACEOF
12551          rm -f conftest.$ac_objext
12552 if { (eval echo "$as_me:12552: \"$ac_compile\"") >&5
12553   (eval $ac_compile) 2>&5
12554   ac_status=$?
12555   echo "$as_me:12555: \$? = $ac_status" >&5
12556   (exit $ac_status); } &&
12557          { ac_try='test -s conftest.$ac_objext'
12558   { (eval echo "$as_me:12558: \"$ac_try\"") >&5
12559   (eval $ac_try) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); }; }; then
12563   break
12564 else
12565   echo "$as_me: failed program was:" >&5
12566 cat conftest.$ac_ext >&5
12567 fi
12568 rm -f conftest.$ac_objext
12569          CC="$CC -n32"
12570          rm -f conftest.$ac_objext
12571 if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
12572   (eval $ac_compile) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest.$ac_objext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   ac_cv_sys_largefile_CC=' -n32'; break
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 fi
12587 rm -f conftest.$ac_objext
12588          break
12589        done
12590        CC=$ac_save_CC
12591        rm -f conftest.$ac_ext
12592     fi
12593 fi
12594 echo "$as_me:12594: result: $ac_cv_sys_largefile_CC" >&5
12595 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12596   if test "$ac_cv_sys_largefile_CC" != no; then
12597     CC=$CC$ac_cv_sys_largefile_CC
12598   fi
12599
12600   echo "$as_me:12600: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12601 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12602 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12603   echo $ECHO_N "(cached) $ECHO_C" >&6
12604 else
12605   while :; do
12606   ac_cv_sys_file_offset_bits=no
12607   cat >conftest.$ac_ext <<_ACEOF
12608 #line 12608 "configure"
12609 #include "confdefs.h"
12610 #include <sys/types.h>
12611  /* Check that off_t can represent 2**63 - 1 correctly.
12612     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12613     since some C++ compilers masquerading as C compilers
12614     incorrectly reject 9223372036854775807.  */
12615 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12616   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12617                        && LARGE_OFF_T % 2147483647 == 1)
12618                       ? 1 : -1];
12619 int
12620 main (void)
12621 {
12622
12623   ;
12624   return 0;
12625 }
12626 _ACEOF
12627 rm -f conftest.$ac_objext
12628 if { (eval echo "$as_me:12628: \"$ac_compile\"") >&5
12629   (eval $ac_compile) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); } &&
12633          { ac_try='test -s conftest.$ac_objext'
12634   { (eval echo "$as_me:12634: \"$ac_try\"") >&5
12635   (eval $ac_try) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit $ac_status); }; }; then
12639   break
12640 else
12641   echo "$as_me: failed program was:" >&5
12642 cat conftest.$ac_ext >&5
12643 fi
12644 rm -f conftest.$ac_objext conftest.$ac_ext
12645   cat >conftest.$ac_ext <<_ACEOF
12646 #line 12646 "configure"
12647 #include "confdefs.h"
12648 #define _FILE_OFFSET_BITS 64
12649 #include <sys/types.h>
12650  /* Check that off_t can represent 2**63 - 1 correctly.
12651     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12652     since some C++ compilers masquerading as C compilers
12653     incorrectly reject 9223372036854775807.  */
12654 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12655   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12656                        && LARGE_OFF_T % 2147483647 == 1)
12657                       ? 1 : -1];
12658 int
12659 main (void)
12660 {
12661
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 rm -f conftest.$ac_objext
12667 if { (eval echo "$as_me:12667: \"$ac_compile\"") >&5
12668   (eval $ac_compile) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); } &&
12672          { ac_try='test -s conftest.$ac_objext'
12673   { (eval echo "$as_me:12673: \"$ac_try\"") >&5
12674   (eval $ac_try) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); }; }; then
12678   ac_cv_sys_file_offset_bits=64; break
12679 else
12680   echo "$as_me: failed program was:" >&5
12681 cat conftest.$ac_ext >&5
12682 fi
12683 rm -f conftest.$ac_objext conftest.$ac_ext
12684   break
12685 done
12686 fi
12687 echo "$as_me:12687: result: $ac_cv_sys_file_offset_bits" >&5
12688 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12689 if test "$ac_cv_sys_file_offset_bits" != no; then
12690
12691 cat >>confdefs.h <<EOF
12692 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12693 EOF
12694
12695 fi
12696 rm -rf conftest*
12697   echo "$as_me:12697: checking for _LARGE_FILES value needed for large files" >&5
12698 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12699 if test "${ac_cv_sys_large_files+set}" = set; then
12700   echo $ECHO_N "(cached) $ECHO_C" >&6
12701 else
12702   while :; do
12703   ac_cv_sys_large_files=no
12704   cat >conftest.$ac_ext <<_ACEOF
12705 #line 12705 "configure"
12706 #include "confdefs.h"
12707 #include <sys/types.h>
12708  /* Check that off_t can represent 2**63 - 1 correctly.
12709     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12710     since some C++ compilers masquerading as C compilers
12711     incorrectly reject 9223372036854775807.  */
12712 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12713   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12714                        && LARGE_OFF_T % 2147483647 == 1)
12715                       ? 1 : -1];
12716 int
12717 main (void)
12718 {
12719
12720   ;
12721   return 0;
12722 }
12723 _ACEOF
12724 rm -f conftest.$ac_objext
12725 if { (eval echo "$as_me:12725: \"$ac_compile\"") >&5
12726   (eval $ac_compile) 2>&5
12727   ac_status=$?
12728   echo "$as_me:12728: \$? = $ac_status" >&5
12729   (exit $ac_status); } &&
12730          { ac_try='test -s conftest.$ac_objext'
12731   { (eval echo "$as_me:12731: \"$ac_try\"") >&5
12732   (eval $ac_try) 2>&5
12733   ac_status=$?
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit $ac_status); }; }; then
12736   break
12737 else
12738   echo "$as_me: failed program was:" >&5
12739 cat conftest.$ac_ext >&5
12740 fi
12741 rm -f conftest.$ac_objext conftest.$ac_ext
12742   cat >conftest.$ac_ext <<_ACEOF
12743 #line 12743 "configure"
12744 #include "confdefs.h"
12745 #define _LARGE_FILES 1
12746 #include <sys/types.h>
12747  /* Check that off_t can represent 2**63 - 1 correctly.
12748     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12749     since some C++ compilers masquerading as C compilers
12750     incorrectly reject 9223372036854775807.  */
12751 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12752   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12753                        && LARGE_OFF_T % 2147483647 == 1)
12754                       ? 1 : -1];
12755 int
12756 main (void)
12757 {
12758
12759   ;
12760   return 0;
12761 }
12762 _ACEOF
12763 rm -f conftest.$ac_objext
12764 if { (eval echo "$as_me:12764: \"$ac_compile\"") >&5
12765   (eval $ac_compile) 2>&5
12766   ac_status=$?
12767   echo "$as_me:12767: \$? = $ac_status" >&5
12768   (exit $ac_status); } &&
12769          { ac_try='test -s conftest.$ac_objext'
12770   { (eval echo "$as_me:12770: \"$ac_try\"") >&5
12771   (eval $ac_try) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit $ac_status); }; }; then
12775   ac_cv_sys_large_files=1; break
12776 else
12777   echo "$as_me: failed program was:" >&5
12778 cat conftest.$ac_ext >&5
12779 fi
12780 rm -f conftest.$ac_objext conftest.$ac_ext
12781   break
12782 done
12783 fi
12784 echo "$as_me:12784: result: $ac_cv_sys_large_files" >&5
12785 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12786 if test "$ac_cv_sys_large_files" != no; then
12787
12788 cat >>confdefs.h <<EOF
12789 #define _LARGE_FILES $ac_cv_sys_large_files
12790 EOF
12791
12792 fi
12793 rm -rf conftest*
12794 fi
12795
12796         if test "$enable_largefile" != no ; then
12797         echo "$as_me:12797: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12798 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12799 if test "${ac_cv_sys_largefile_source+set}" = set; then
12800   echo $ECHO_N "(cached) $ECHO_C" >&6
12801 else
12802   while :; do
12803   ac_cv_sys_largefile_source=no
12804   cat >conftest.$ac_ext <<_ACEOF
12805 #line 12805 "configure"
12806 #include "confdefs.h"
12807 #include <stdio.h>
12808 int
12809 main (void)
12810 {
12811 return !fseeko;
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 rm -f conftest.$ac_objext
12817 if { (eval echo "$as_me:12817: \"$ac_compile\"") >&5
12818   (eval $ac_compile) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); } &&
12822          { ac_try='test -s conftest.$ac_objext'
12823   { (eval echo "$as_me:12823: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   break
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 cat conftest.$ac_ext >&5
12832 fi
12833 rm -f conftest.$ac_objext conftest.$ac_ext
12834   cat >conftest.$ac_ext <<_ACEOF
12835 #line 12835 "configure"
12836 #include "confdefs.h"
12837 #define _LARGEFILE_SOURCE 1
12838 #include <stdio.h>
12839 int
12840 main (void)
12841 {
12842 return !fseeko;
12843   ;
12844   return 0;
12845 }
12846 _ACEOF
12847 rm -f conftest.$ac_objext
12848 if { (eval echo "$as_me:12848: \"$ac_compile\"") >&5
12849   (eval $ac_compile) 2>&5
12850   ac_status=$?
12851   echo "$as_me:12851: \$? = $ac_status" >&5
12852   (exit $ac_status); } &&
12853          { ac_try='test -s conftest.$ac_objext'
12854   { (eval echo "$as_me:12854: \"$ac_try\"") >&5
12855   (eval $ac_try) 2>&5
12856   ac_status=$?
12857   echo "$as_me:12857: \$? = $ac_status" >&5
12858   (exit $ac_status); }; }; then
12859   ac_cv_sys_largefile_source=1; break
12860 else
12861   echo "$as_me: failed program was:" >&5
12862 cat conftest.$ac_ext >&5
12863 fi
12864 rm -f conftest.$ac_objext conftest.$ac_ext
12865   break
12866 done
12867 fi
12868 echo "$as_me:12868: result: $ac_cv_sys_largefile_source" >&5
12869 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12870 if test "$ac_cv_sys_largefile_source" != no; then
12871
12872 cat >>confdefs.h <<EOF
12873 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12874 EOF
12875
12876 fi
12877 rm -rf conftest*
12878
12879 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12880 # in glibc 2.1.3, but that breaks too many other things.
12881 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12882 echo "$as_me:12882: checking for fseeko" >&5
12883 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12884 if test "${ac_cv_func_fseeko+set}" = set; then
12885   echo $ECHO_N "(cached) $ECHO_C" >&6
12886 else
12887   cat >conftest.$ac_ext <<_ACEOF
12888 #line 12888 "configure"
12889 #include "confdefs.h"
12890 #include <stdio.h>
12891 int
12892 main (void)
12893 {
12894 return fseeko && fseeko (stdin, 0, 0);
12895   ;
12896   return 0;
12897 }
12898 _ACEOF
12899 rm -f conftest.$ac_objext conftest$ac_exeext
12900 if { (eval echo "$as_me:12900: \"$ac_link\"") >&5
12901   (eval $ac_link) 2>&5
12902   ac_status=$?
12903   echo "$as_me:12903: \$? = $ac_status" >&5
12904   (exit $ac_status); } &&
12905          { ac_try='test -s conftest$ac_exeext'
12906   { (eval echo "$as_me:12906: \"$ac_try\"") >&5
12907   (eval $ac_try) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); }; }; then
12911   ac_cv_func_fseeko=yes
12912 else
12913   echo "$as_me: failed program was:" >&5
12914 cat conftest.$ac_ext >&5
12915 ac_cv_func_fseeko=no
12916 fi
12917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12918 fi
12919 echo "$as_me:12919: result: $ac_cv_func_fseeko" >&5
12920 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12921 if test $ac_cv_func_fseeko = yes; then
12922
12923 cat >>confdefs.h <<\EOF
12924 #define HAVE_FSEEKO 1
12925 EOF
12926
12927 fi
12928
12929         # Normally we would collect these definitions in the config.h,
12930         # but (like _XOPEN_SOURCE), some environments rely on having these
12931         # defined before any of the system headers are included.  Another
12932         # case comes up with C++, e.g., on AIX the compiler compiles the
12933         # header files by themselves before looking at the body files it is
12934         # told to compile.  For ncurses, those header files do not include
12935         # the config.h
12936         if test "$ac_cv_sys_large_files" != no
12937         then
12938
12939         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12940         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12941
12942         fi
12943         if test "$ac_cv_sys_largefile_source" != no
12944         then
12945
12946         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12947         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12948
12949         fi
12950         if test "$ac_cv_sys_file_offset_bits" != no
12951         then
12952
12953         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12954         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12955
12956         fi
12957
12958         echo "$as_me:12958: checking whether to use struct dirent64" >&5
12959 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12960 if test "${cf_cv_struct_dirent64+set}" = set; then
12961   echo $ECHO_N "(cached) $ECHO_C" >&6
12962 else
12963
12964                 cat >conftest.$ac_ext <<_ACEOF
12965 #line 12965 "configure"
12966 #include "confdefs.h"
12967
12968 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12969 #include <sys/types.h>
12970 #include <dirent.h>
12971
12972 int
12973 main (void)
12974 {
12975
12976                 /* if transitional largefile support is setup, this is true */
12977                 extern struct dirent64 * readdir(DIR *);
12978                 struct dirent64 *x = readdir((DIR *)0);
12979                 struct dirent *y = readdir((DIR *)0);
12980                 int z = x - y;
12981
12982   ;
12983   return 0;
12984 }
12985 _ACEOF
12986 rm -f conftest.$ac_objext
12987 if { (eval echo "$as_me:12987: \"$ac_compile\"") >&5
12988   (eval $ac_compile) 2>&5
12989   ac_status=$?
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit $ac_status); } &&
12992          { ac_try='test -s conftest.$ac_objext'
12993   { (eval echo "$as_me:12993: \"$ac_try\"") >&5
12994   (eval $ac_try) 2>&5
12995   ac_status=$?
12996   echo "$as_me:12996: \$? = $ac_status" >&5
12997   (exit $ac_status); }; }; then
12998   cf_cv_struct_dirent64=yes
12999 else
13000   echo "$as_me: failed program was:" >&5
13001 cat conftest.$ac_ext >&5
13002 cf_cv_struct_dirent64=no
13003 fi
13004 rm -f conftest.$ac_objext conftest.$ac_ext
13005
13006 fi
13007 echo "$as_me:13007: result: $cf_cv_struct_dirent64" >&5
13008 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13009         test "$cf_cv_struct_dirent64" = yes &&
13010 cat >>confdefs.h <<\EOF
13011 #define HAVE_STRUCT_DIRENT64 1
13012 EOF
13013
13014         fi
13015
13016 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13017 echo "$as_me:13017: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13018 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13019
13020 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13021 if test "${enable_tparm_varargs+set}" = set; then
13022   enableval="$enable_tparm_varargs"
13023   with_tparm_varargs=$enableval
13024 else
13025   with_tparm_varargs=yes
13026 fi;
13027 echo "$as_me:13027: result: $with_tparm_varargs" >&5
13028 echo "${ECHO_T}$with_tparm_varargs" >&6
13029 NCURSES_TPARM_VARARGS=0
13030 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13031
13032 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13033 if test "$with_ticlib" != no ; then
13034 echo "$as_me:13034: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13035 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13036
13037 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13038 if test "${enable_tic_depends+set}" = set; then
13039   enableval="$enable_tic_depends"
13040   with_tic_depends=$enableval
13041 else
13042   with_tic_depends=yes
13043 fi;
13044 echo "$as_me:13044: result: $with_tic_depends" >&5
13045 echo "${ECHO_T}$with_tic_depends" >&6
13046 else
13047         with_tic_depends=no
13048 fi
13049
13050 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13051 echo "$as_me:13051: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13052 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13053
13054 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13055 if test "${enable_wattr_macros+set}" = set; then
13056   enableval="$enable_wattr_macros"
13057   with_wattr_macros=$enableval
13058 else
13059   with_wattr_macros=yes
13060 fi;
13061 if [ "x$with_wattr_macros" != xyes ]; then
13062         NCURSES_WATTR_MACROS=0
13063         echo "$as_me:13063: result: yes" >&5
13064 echo "${ECHO_T}yes" >&6
13065 else
13066         NCURSES_WATTR_MACROS=1
13067         echo "$as_me:13067: result: no" >&5
13068 echo "${ECHO_T}no" >&6
13069 fi
13070
13071 echo "$as_me:13071: checking for X11 rgb file" >&5
13072 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13073
13074 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13075 if test "${with_x11_rgb+set}" = set; then
13076   withval="$with_x11_rgb"
13077   RGB_PATH=$withval
13078 else
13079   RGB_PATH=auto
13080 fi;
13081
13082 if test "x$RGB_PATH" = xauto
13083 then
13084         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13085         for cf_path in \
13086                 /opt/local/share/X11/rgb.txt \
13087                 /opt/X11/share/X11/rgb.txt \
13088                 /usr/share/X11/rgb.txt \
13089                 /usr/X11/share/X11/rgb.txt \
13090                 /usr/X11/lib/X11/rgb.txt \
13091                 /usr/lib/X11/rgb.txt \
13092                 /etc/X11/rgb.txt \
13093                 /usr/pkg/lib/X11/rgb.txt \
13094                 /usr/X11R7/lib/X11/rgb.txt \
13095                 /usr/X11R6/lib/X11/rgb.txt \
13096                 /usr/X11R5/lib/X11/rgb.txt \
13097                 /usr/X11R4/lib/X11/rgb.txt \
13098                 /usr/local/lib/X11/rgb.txt \
13099                 /usr/local/share/X11/rgb.txt \
13100                 /usr/lib64/X11/rgb.txt
13101         do
13102                 if test -f "$cf_path" ; then
13103                         RGB_PATH="$cf_path"
13104                         break
13105                 fi
13106         done
13107 else
13108         cf_path=$RGB_PATH
13109
13110 if test "x$prefix" != xNONE; then
13111         cf_path_syntax="$prefix"
13112 else
13113         cf_path_syntax="$ac_default_prefix"
13114 fi
13115
13116 case ".$cf_path" in
13117 (.\$\(*\)*|.\'*\'*)
13118         ;;
13119 (..|./*|.\\*)
13120         ;;
13121 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13122         ;;
13123 (.\${*prefix}*|.\${*dir}*)
13124         eval cf_path="$cf_path"
13125         case ".$cf_path" in
13126         (.NONE/*)
13127                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13128                 ;;
13129         esac
13130         ;;
13131 (.no|.NONE/*)
13132         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13133         ;;
13134 (*)
13135         { { echo "$as_me:13135: error: expected a pathname, not \"$cf_path\"" >&5
13136 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13137    { (exit 1); exit 1; }; }
13138         ;;
13139 esac
13140
13141 fi
13142
13143 echo "$as_me:13143: result: $RGB_PATH" >&5
13144 echo "${ECHO_T}$RGB_PATH" >&6
13145
13146 cat >>confdefs.h <<EOF
13147 #define RGB_PATH "$cf_path"
13148 EOF
13149
13150 no_x11_rgb=
13151 if test "$RGB_PATH" = no
13152 then
13153         no_x11_rgb="#"
13154 fi
13155
13156 ###   use option --with-bool to override bool's type
13157 echo "$as_me:13157: checking for type of bool" >&5
13158 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13159
13160 # Check whether --with-bool or --without-bool was given.
13161 if test "${with_bool+set}" = set; then
13162   withval="$with_bool"
13163   NCURSES_BOOL="$withval"
13164 else
13165   NCURSES_BOOL=auto
13166 fi;
13167 echo "$as_me:13167: result: $NCURSES_BOOL" >&5
13168 echo "${ECHO_T}$NCURSES_BOOL" >&6
13169
13170 echo "$as_me:13170: checking for alternate terminal capabilities file" >&5
13171 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13172
13173 # Check whether --with-caps or --without-caps was given.
13174 if test "${with_caps+set}" = set; then
13175   withval="$with_caps"
13176   TERMINFO_CAPS=Caps.$withval
13177 else
13178   TERMINFO_CAPS=Caps
13179 fi;
13180 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13181 echo "$as_me:13181: result: $TERMINFO_CAPS" >&5
13182 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13183
13184 ###   use option --with-chtype to override chtype's type
13185 echo "$as_me:13185: checking for type of chtype" >&5
13186 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13187
13188 # Check whether --with-chtype or --without-chtype was given.
13189 if test "${with_chtype+set}" = set; then
13190   withval="$with_chtype"
13191   NCURSES_CHTYPE="$withval"
13192 else
13193   NCURSES_CHTYPE=$cf_dft_chtype
13194 fi;
13195 echo "$as_me:13195: result: $NCURSES_CHTYPE" >&5
13196 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13197
13198 ###   use option --with-ospeed to override ospeed's type
13199 echo "$as_me:13199: checking for type of ospeed" >&5
13200 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13201
13202 # Check whether --with-ospeed or --without-ospeed was given.
13203 if test "${with_ospeed+set}" = set; then
13204   withval="$with_ospeed"
13205   NCURSES_OSPEED="$withval"
13206 else
13207   NCURSES_OSPEED=short
13208 fi;
13209 echo "$as_me:13209: result: $NCURSES_OSPEED" >&5
13210 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13211
13212 ###   use option --with-mmask-t to override mmask_t's type
13213 echo "$as_me:13213: checking for type of mmask_t" >&5
13214 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13215
13216 # Check whether --with-mmask-t or --without-mmask-t was given.
13217 if test "${with_mmask_t+set}" = set; then
13218   withval="$with_mmask_t"
13219   NCURSES_MMASK_T="$withval"
13220 else
13221   NCURSES_MMASK_T=$cf_dft_mmask_t
13222 fi;
13223 echo "$as_me:13223: result: $NCURSES_MMASK_T" >&5
13224 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13225
13226 ###   use option --with-ccharw-max to override CCHARW_MAX size
13227 echo "$as_me:13227: checking for size CCHARW_MAX" >&5
13228 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13229
13230 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13231 if test "${with_ccharw_max+set}" = set; then
13232   withval="$with_ccharw_max"
13233   NCURSES_CCHARW_MAX="$withval"
13234 else
13235   NCURSES_CCHARW_MAX=5
13236 fi;
13237 echo "$as_me:13237: result: $NCURSES_CCHARW_MAX" >&5
13238 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13239
13240 echo "$as_me:13240: checking for ANSI C header files" >&5
13241 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13242 if test "${ac_cv_header_stdc+set}" = set; then
13243   echo $ECHO_N "(cached) $ECHO_C" >&6
13244 else
13245   cat >conftest.$ac_ext <<_ACEOF
13246 #line 13246 "configure"
13247 #include "confdefs.h"
13248 #include <stdlib.h>
13249 #include <stdarg.h>
13250 #include <string.h>
13251 #include <float.h>
13252
13253 _ACEOF
13254 if { (eval echo "$as_me:13254: \"$ac_cpp conftest.$ac_ext\"") >&5
13255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13256   ac_status=$?
13257   egrep -v '^ *\+' conftest.er1 >conftest.err
13258   rm -f conftest.er1
13259   cat conftest.err >&5
13260   echo "$as_me:13260: \$? = $ac_status" >&5
13261   (exit $ac_status); } >/dev/null; then
13262   if test -s conftest.err; then
13263     ac_cpp_err=$ac_c_preproc_warn_flag
13264   else
13265     ac_cpp_err=
13266   fi
13267 else
13268   ac_cpp_err=yes
13269 fi
13270 if test -z "$ac_cpp_err"; then
13271   ac_cv_header_stdc=yes
13272 else
13273   echo "$as_me: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275   ac_cv_header_stdc=no
13276 fi
13277 rm -f conftest.err conftest.$ac_ext
13278
13279 if test $ac_cv_header_stdc = yes; then
13280   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13281   cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284 #include <string.h>
13285
13286 _ACEOF
13287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13288   egrep "memchr" >/dev/null 2>&1; then
13289   :
13290 else
13291   ac_cv_header_stdc=no
13292 fi
13293 rm -rf conftest*
13294
13295 fi
13296
13297 if test $ac_cv_header_stdc = yes; then
13298   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13299   cat >conftest.$ac_ext <<_ACEOF
13300 #line 13300 "configure"
13301 #include "confdefs.h"
13302 #include <stdlib.h>
13303
13304 _ACEOF
13305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13306   egrep "free" >/dev/null 2>&1; then
13307   :
13308 else
13309   ac_cv_header_stdc=no
13310 fi
13311 rm -rf conftest*
13312
13313 fi
13314
13315 if test $ac_cv_header_stdc = yes; then
13316   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13317   if test "$cross_compiling" = yes; then
13318   :
13319 else
13320   cat >conftest.$ac_ext <<_ACEOF
13321 #line 13321 "configure"
13322 #include "confdefs.h"
13323 #include <ctype.h>
13324 #if ((' ' & 0x0FF) == 0x020)
13325 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13326 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13327 #else
13328 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13329                      || ('j' <= (c) && (c) <= 'r') \
13330                      || ('s' <= (c) && (c) <= 'z'))
13331 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13332 #endif
13333
13334 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13335 int
13336 main (void)
13337 {
13338   int i;
13339   for (i = 0; i < 256; i++)
13340     if (XOR (islower (i), ISLOWER (i))
13341         || toupper (i) != TOUPPER (i))
13342       $ac_main_return(2);
13343   $ac_main_return (0);
13344 }
13345 _ACEOF
13346 rm -f conftest$ac_exeext
13347 if { (eval echo "$as_me:13347: \"$ac_link\"") >&5
13348   (eval $ac_link) 2>&5
13349   ac_status=$?
13350   echo "$as_me:13350: \$? = $ac_status" >&5
13351   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13352   { (eval echo "$as_me:13352: \"$ac_try\"") >&5
13353   (eval $ac_try) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit $ac_status); }; }; then
13357   :
13358 else
13359   echo "$as_me: program exited with status $ac_status" >&5
13360 echo "$as_me: failed program was:" >&5
13361 cat conftest.$ac_ext >&5
13362 ac_cv_header_stdc=no
13363 fi
13364 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13365 fi
13366 fi
13367 fi
13368 echo "$as_me:13368: result: $ac_cv_header_stdc" >&5
13369 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13370 if test $ac_cv_header_stdc = yes; then
13371
13372 cat >>confdefs.h <<\EOF
13373 #define STDC_HEADERS 1
13374 EOF
13375
13376 fi
13377
13378 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13379
13380 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13381                   inttypes.h stdint.h unistd.h
13382 do
13383 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13384 echo "$as_me:13384: checking for $ac_header" >&5
13385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13387   echo $ECHO_N "(cached) $ECHO_C" >&6
13388 else
13389   cat >conftest.$ac_ext <<_ACEOF
13390 #line 13390 "configure"
13391 #include "confdefs.h"
13392 $ac_includes_default
13393 #include <$ac_header>
13394 _ACEOF
13395 rm -f conftest.$ac_objext
13396 if { (eval echo "$as_me:13396: \"$ac_compile\"") >&5
13397   (eval $ac_compile) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit $ac_status); } &&
13401          { ac_try='test -s conftest.$ac_objext'
13402   { (eval echo "$as_me:13402: \"$ac_try\"") >&5
13403   (eval $ac_try) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); }; }; then
13407   eval "$as_ac_Header=yes"
13408 else
13409   echo "$as_me: failed program was:" >&5
13410 cat conftest.$ac_ext >&5
13411 eval "$as_ac_Header=no"
13412 fi
13413 rm -f conftest.$ac_objext conftest.$ac_ext
13414 fi
13415 echo "$as_me:13415: result: `eval echo '${'$as_ac_Header'}'`" >&5
13416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13417 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13418   cat >>confdefs.h <<EOF
13419 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13420 EOF
13421
13422 fi
13423 done
13424
13425 echo "$as_me:13425: checking for signed char" >&5
13426 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13427 if test "${ac_cv_type_signed_char+set}" = set; then
13428   echo $ECHO_N "(cached) $ECHO_C" >&6
13429 else
13430   cat >conftest.$ac_ext <<_ACEOF
13431 #line 13431 "configure"
13432 #include "confdefs.h"
13433 $ac_includes_default
13434 int
13435 main (void)
13436 {
13437 if ((signed char *) 0)
13438   return 0;
13439 if (sizeof (signed char))
13440   return 0;
13441   ;
13442   return 0;
13443 }
13444 _ACEOF
13445 rm -f conftest.$ac_objext
13446 if { (eval echo "$as_me:13446: \"$ac_compile\"") >&5
13447   (eval $ac_compile) 2>&5
13448   ac_status=$?
13449   echo "$as_me:13449: \$? = $ac_status" >&5
13450   (exit $ac_status); } &&
13451          { ac_try='test -s conftest.$ac_objext'
13452   { (eval echo "$as_me:13452: \"$ac_try\"") >&5
13453   (eval $ac_try) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); }; }; then
13457   ac_cv_type_signed_char=yes
13458 else
13459   echo "$as_me: failed program was:" >&5
13460 cat conftest.$ac_ext >&5
13461 ac_cv_type_signed_char=no
13462 fi
13463 rm -f conftest.$ac_objext conftest.$ac_ext
13464 fi
13465 echo "$as_me:13465: result: $ac_cv_type_signed_char" >&5
13466 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13467
13468 echo "$as_me:13468: checking size of signed char" >&5
13469 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13470 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13471   echo $ECHO_N "(cached) $ECHO_C" >&6
13472 else
13473   if test "$ac_cv_type_signed_char" = yes; then
13474   if test "$cross_compiling" = yes; then
13475   # Depending upon the size, compute the lo and hi bounds.
13476 cat >conftest.$ac_ext <<_ACEOF
13477 #line 13477 "configure"
13478 #include "confdefs.h"
13479 $ac_includes_default
13480 int
13481 main (void)
13482 {
13483 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13484   ;
13485   return 0;
13486 }
13487 _ACEOF
13488 rm -f conftest.$ac_objext
13489 if { (eval echo "$as_me:13489: \"$ac_compile\"") >&5
13490   (eval $ac_compile) 2>&5
13491   ac_status=$?
13492   echo "$as_me:13492: \$? = $ac_status" >&5
13493   (exit $ac_status); } &&
13494          { ac_try='test -s conftest.$ac_objext'
13495   { (eval echo "$as_me:13495: \"$ac_try\"") >&5
13496   (eval $ac_try) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); }; }; then
13500   ac_lo=0 ac_mid=0
13501   while :; do
13502     cat >conftest.$ac_ext <<_ACEOF
13503 #line 13503 "configure"
13504 #include "confdefs.h"
13505 $ac_includes_default
13506 int
13507 main (void)
13508 {
13509 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13510   ;
13511   return 0;
13512 }
13513 _ACEOF
13514 rm -f conftest.$ac_objext
13515 if { (eval echo "$as_me:13515: \"$ac_compile\"") >&5
13516   (eval $ac_compile) 2>&5
13517   ac_status=$?
13518   echo "$as_me:13518: \$? = $ac_status" >&5
13519   (exit $ac_status); } &&
13520          { ac_try='test -s conftest.$ac_objext'
13521   { (eval echo "$as_me:13521: \"$ac_try\"") >&5
13522   (eval $ac_try) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); }; }; then
13526   ac_hi=$ac_mid; break
13527 else
13528   echo "$as_me: failed program was:" >&5
13529 cat conftest.$ac_ext >&5
13530 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13531 fi
13532 rm -f conftest.$ac_objext conftest.$ac_ext
13533   done
13534 else
13535   echo "$as_me: failed program was:" >&5
13536 cat conftest.$ac_ext >&5
13537 ac_hi=-1 ac_mid=-1
13538   while :; do
13539     cat >conftest.$ac_ext <<_ACEOF
13540 #line 13540 "configure"
13541 #include "confdefs.h"
13542 $ac_includes_default
13543 int
13544 main (void)
13545 {
13546 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13547   ;
13548   return 0;
13549 }
13550 _ACEOF
13551 rm -f conftest.$ac_objext
13552 if { (eval echo "$as_me:13552: \"$ac_compile\"") >&5
13553   (eval $ac_compile) 2>&5
13554   ac_status=$?
13555   echo "$as_me:13555: \$? = $ac_status" >&5
13556   (exit $ac_status); } &&
13557          { ac_try='test -s conftest.$ac_objext'
13558   { (eval echo "$as_me:13558: \"$ac_try\"") >&5
13559   (eval $ac_try) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit $ac_status); }; }; then
13563   ac_lo=$ac_mid; break
13564 else
13565   echo "$as_me: failed program was:" >&5
13566 cat conftest.$ac_ext >&5
13567 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13568 fi
13569 rm -f conftest.$ac_objext conftest.$ac_ext
13570   done
13571 fi
13572 rm -f conftest.$ac_objext conftest.$ac_ext
13573 # Binary search between lo and hi bounds.
13574 while test "x$ac_lo" != "x$ac_hi"; do
13575   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13576   cat >conftest.$ac_ext <<_ACEOF
13577 #line 13577 "configure"
13578 #include "confdefs.h"
13579 $ac_includes_default
13580 int
13581 main (void)
13582 {
13583 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13584   ;
13585   return 0;
13586 }
13587 _ACEOF
13588 rm -f conftest.$ac_objext
13589 if { (eval echo "$as_me:13589: \"$ac_compile\"") >&5
13590   (eval $ac_compile) 2>&5
13591   ac_status=$?
13592   echo "$as_me:13592: \$? = $ac_status" >&5
13593   (exit $ac_status); } &&
13594          { ac_try='test -s conftest.$ac_objext'
13595   { (eval echo "$as_me:13595: \"$ac_try\"") >&5
13596   (eval $ac_try) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); }; }; then
13600   ac_hi=$ac_mid
13601 else
13602   echo "$as_me: failed program was:" >&5
13603 cat conftest.$ac_ext >&5
13604 ac_lo=`expr $ac_mid + 1`
13605 fi
13606 rm -f conftest.$ac_objext conftest.$ac_ext
13607 done
13608 ac_cv_sizeof_signed_char=$ac_lo
13609 else
13610   if test "$cross_compiling" = yes; then
13611   { { echo "$as_me:13611: error: cannot run test program while cross compiling" >&5
13612 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13613    { (exit 1); exit 1; }; }
13614 else
13615   cat >conftest.$ac_ext <<_ACEOF
13616 #line 13616 "configure"
13617 #include "confdefs.h"
13618 $ac_includes_default
13619 int
13620 main (void)
13621 {
13622 FILE *f = fopen ("conftest.val", "w");
13623 if (!f)
13624   $ac_main_return (1);
13625 fprintf (f, "%d", (sizeof (signed char)));
13626 fclose (f);
13627   ;
13628   return 0;
13629 }
13630 _ACEOF
13631 rm -f conftest$ac_exeext
13632 if { (eval echo "$as_me:13632: \"$ac_link\"") >&5
13633   (eval $ac_link) 2>&5
13634   ac_status=$?
13635   echo "$as_me:13635: \$? = $ac_status" >&5
13636   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13637   { (eval echo "$as_me:13637: \"$ac_try\"") >&5
13638   (eval $ac_try) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); }; }; then
13642   ac_cv_sizeof_signed_char=`cat conftest.val`
13643 else
13644   echo "$as_me: program exited with status $ac_status" >&5
13645 echo "$as_me: failed program was:" >&5
13646 cat conftest.$ac_ext >&5
13647 fi
13648 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13649 fi
13650 fi
13651 rm -f conftest.val
13652 else
13653   ac_cv_sizeof_signed_char=0
13654 fi
13655 fi
13656 echo "$as_me:13656: result: $ac_cv_sizeof_signed_char" >&5
13657 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13658 cat >>confdefs.h <<EOF
13659 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13660 EOF
13661
13662 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13663         NCURSES_SBOOL="signed char"
13664 else
13665         NCURSES_SBOOL="char"
13666 fi
13667 echo "$as_me:13667: checking if you want to use signed Boolean array in term.h" >&5
13668 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13669
13670 # Check whether --enable-signed-char or --disable-signed-char was given.
13671 if test "${enable_signed_char+set}" = set; then
13672   enableval="$enable_signed_char"
13673   with_signed_char=$enableval
13674 else
13675   with_signed_char=no
13676 fi;
13677 echo "$as_me:13677: result: $with_signed_char" >&5
13678 echo "${ECHO_T}$with_signed_char" >&6
13679 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13680
13681 ###   use option --with-tparm-arg to override tparm's argument type
13682 echo "$as_me:13682: checking for type of tparm args" >&5
13683 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13684
13685 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13686 if test "${with_tparm_arg+set}" = set; then
13687   withval="$with_tparm_arg"
13688   NCURSES_TPARM_ARG="$withval"
13689 else
13690   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13691 fi;
13692 echo "$as_me:13692: result: $NCURSES_TPARM_ARG" >&5
13693 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13694
13695 ### Enable compiling-in rcs id's
13696 echo "$as_me:13696: checking if RCS identifiers should be compiled-in" >&5
13697 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13698
13699 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13700 if test "${with_rcs_ids+set}" = set; then
13701   withval="$with_rcs_ids"
13702   with_rcs_ids=$withval
13703 else
13704   with_rcs_ids=no
13705 fi;
13706 echo "$as_me:13706: result: $with_rcs_ids" >&5
13707 echo "${ECHO_T}$with_rcs_ids" >&6
13708 test "x$with_rcs_ids" = xyes &&
13709 cat >>confdefs.h <<\EOF
13710 #define USE_RCS_IDS 1
13711 EOF
13712
13713 ###############################################################################
13714
13715 echo "$as_me:13715: checking format of man-pages" >&5
13716 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13717
13718 # Check whether --with-manpage-format or --without-manpage-format was given.
13719 if test "${with_manpage_format+set}" = set; then
13720   withval="$with_manpage_format"
13721   MANPAGE_FORMAT=$withval
13722 else
13723   MANPAGE_FORMAT=unknown
13724 fi;
13725
13726 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13727 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13728
13729 cf_unknown=
13730
13731 case $MANPAGE_FORMAT in
13732 (unknown)
13733         if test -z "$MANPATH" ; then
13734                 MANPATH="/usr/man:/usr/share/man"
13735         fi
13736
13737         # look for the 'date' man-page (it's most likely to be installed!)
13738         MANPAGE_FORMAT=
13739         cf_preform=no
13740         cf_catonly=yes
13741         cf_example=date
13742
13743         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13744         for cf_dir in $MANPATH; do
13745                 test -z "$cf_dir" && cf_dir=/usr/man
13746                 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
13747                 do
13748                         cf_test=`echo $cf_name | sed -e 's/*//'`
13749                         if test "x$cf_test" = "x$cf_name" ; then
13750
13751                                 case "$cf_name" in
13752                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13753                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13754                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13755                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13756                                 esac
13757
13758                                 case "$cf_name" in
13759                                 ($cf_dir/man*)
13760                                         cf_catonly=no
13761                                         ;;
13762                                 ($cf_dir/cat*)
13763                                         cf_preform=yes
13764                                         ;;
13765                                 esac
13766                                 break
13767                         fi
13768
13769                         # if we found a match in either man* or cat*, stop looking
13770                         if test -n "$MANPAGE_FORMAT" ; then
13771                                 cf_found=no
13772                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13773                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13774                                 case "$cf_name" in
13775                                 ($cf_dir/cat*)
13776                                         cf_found=yes
13777                                         ;;
13778                                 esac
13779                                 test $cf_found=yes && break
13780                         fi
13781                 done
13782                 # only check the first directory in $MANPATH where we find manpages
13783                 if test -n "$MANPAGE_FORMAT" ; then
13784                         break
13785                 fi
13786         done
13787         # if we did not find the example, just assume it is normal
13788         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13789         IFS="$ac_save_ifs"
13790         ;;
13791 (*)
13792         for cf_option in $MANPAGE_FORMAT; do
13793         case $cf_option in
13794         (gzip|compress|BSDI|normal|formatted|catonly)
13795                 ;;
13796         (*)
13797                 cf_unknown="$cf_unknown $cf_option"
13798                 ;;
13799         esac
13800         done
13801         ;;
13802 esac
13803
13804 echo "$as_me:13804: result: $MANPAGE_FORMAT" >&5
13805 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13806 if test -n "$cf_unknown" ; then
13807         { echo "$as_me:13807: WARNING: Unexpected manpage-format $cf_unknown" >&5
13808 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13809 fi
13810
13811 echo "$as_me:13811: checking for manpage renaming" >&5
13812 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13813
13814 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13815 if test "${with_manpage_renames+set}" = set; then
13816   withval="$with_manpage_renames"
13817   MANPAGE_RENAMES=$withval
13818 else
13819   MANPAGE_RENAMES=yes
13820 fi;
13821
13822 case ".$MANPAGE_RENAMES" in
13823 (.no)
13824         ;;
13825 (.|.yes)
13826         # Debian 'man' program?
13827         if test -f /etc/debian_version ; then
13828                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13829         else
13830                 MANPAGE_RENAMES=no
13831         fi
13832         ;;
13833 esac
13834
13835 if test "$MANPAGE_RENAMES" != no ; then
13836         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13837                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13838         elif test ! -f $MANPAGE_RENAMES ; then
13839                 { { echo "$as_me:13839: error: not a filename: $MANPAGE_RENAMES" >&5
13840 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13841    { (exit 1); exit 1; }; }
13842         fi
13843
13844         test ! -d man && mkdir man
13845
13846         # Construct a sed-script to perform renaming within man-pages
13847         if test -n "$MANPAGE_RENAMES" ; then
13848                 test ! -d man && mkdir man
13849                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13850         fi
13851 fi
13852
13853 echo "$as_me:13853: result: $MANPAGE_RENAMES" >&5
13854 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13855
13856 echo "$as_me:13856: checking if manpage aliases will be installed" >&5
13857 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13858
13859 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13860 if test "${with_manpage_aliases+set}" = set; then
13861   withval="$with_manpage_aliases"
13862   MANPAGE_ALIASES=$withval
13863 else
13864   MANPAGE_ALIASES=yes
13865 fi;
13866
13867 echo "$as_me:13867: result: $MANPAGE_ALIASES" >&5
13868 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13869
13870 case "x$LN_S" in
13871 (xln*)
13872         cf_use_symlinks=yes
13873         ;;
13874 (*)
13875         cf_use_symlinks=no
13876         ;;
13877 esac
13878
13879 MANPAGE_SYMLINKS=no
13880 if test "$MANPAGE_ALIASES" = yes ; then
13881 echo "$as_me:13881: checking if manpage symlinks should be used" >&5
13882 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13883
13884 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13885 if test "${with_manpage_symlinks+set}" = set; then
13886   withval="$with_manpage_symlinks"
13887   MANPAGE_SYMLINKS=$withval
13888 else
13889   MANPAGE_SYMLINKS=$cf_use_symlinks
13890 fi;
13891
13892 if test "$$cf_use_symlinks" = no; then
13893 if test "$MANPAGE_SYMLINKS" = yes ; then
13894         { echo "$as_me:13894: WARNING: cannot make symlinks" >&5
13895 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13896         MANPAGE_SYMLINKS=no
13897 fi
13898 fi
13899
13900 echo "$as_me:13900: result: $MANPAGE_SYMLINKS" >&5
13901 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13902 fi
13903
13904 echo "$as_me:13904: checking for manpage tbl" >&5
13905 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13906
13907 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13908 if test "${with_manpage_tbl+set}" = set; then
13909   withval="$with_manpage_tbl"
13910   MANPAGE_TBL=$withval
13911 else
13912   MANPAGE_TBL=no
13913 fi;
13914
13915 echo "$as_me:13915: result: $MANPAGE_TBL" >&5
13916 echo "${ECHO_T}$MANPAGE_TBL" >&6
13917
13918 if test "$prefix" = "NONE" ; then
13919         cf_prefix="$ac_default_prefix"
13920 else
13921         cf_prefix="$prefix"
13922 fi
13923
13924 case "$MANPAGE_FORMAT" in
13925 (*catonly*)
13926         cf_format=yes
13927         cf_inboth=no
13928         ;;
13929 (*formatted*)
13930         cf_format=yes
13931         cf_inboth=yes
13932         ;;
13933 (*)
13934         cf_format=no
13935         cf_inboth=no
13936         ;;
13937 esac
13938
13939 test ! -d man && mkdir man
13940
13941 cf_so_strip=
13942 cf_compress=
13943 case "$MANPAGE_FORMAT" in
13944 (*compress*)
13945         cf_so_strip="Z"
13946         cf_compress=compress
13947         ;;
13948 (*gzip*)
13949         cf_so_strip="gz"
13950         cf_compress=gzip
13951         ;;
13952 esac
13953
13954 cf_edit_man=./edit_man.sh
13955 cf_man_alias=`pwd`/man_alias.sed
13956
13957 cat >$cf_edit_man <<CF_EOF
13958 #! $SHELL
13959 # this script is generated by the configure-script CF_MAN_PAGES macro.
13960
13961 prefix="$cf_prefix"
13962 datarootdir="$datarootdir"
13963 datadir="$datadir"
13964
13965 NCURSES_MAJOR="$NCURSES_MAJOR"
13966 NCURSES_MINOR="$NCURSES_MINOR"
13967 NCURSES_PATCH="$NCURSES_PATCH"
13968
13969 NCURSES_OSPEED="$NCURSES_OSPEED"
13970 TERMINFO="$TERMINFO"
13971
13972 INSTALL="$INSTALL"
13973 INSTALL_DATA="$INSTALL_DATA"
13974
13975 transform="$program_transform_name"
13976
13977 TMP=\${TMPDIR:=/tmp}/man\$\$
13978 trap "rm -f \$TMP" 0 1 2 3 15
13979
13980 form=\$1
13981 shift || exit 1
13982
13983 verb=\$1
13984 shift || exit 1
13985
13986 mandir=\$1
13987 shift || exit 1
13988
13989 srcdir=\$1
13990 top_srcdir=\$srcdir/..
13991 shift || exit 1
13992
13993 if test "\$form" = normal ; then
13994         if test "$cf_format" = yes ; then
13995         if test "$cf_inboth" = no ; then
13996                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13997                 exit $?
13998         fi
13999         fi
14000         cf_subdir=\$mandir/man
14001         cf_tables=$MANPAGE_TBL
14002 else
14003         cf_subdir=\$mandir/cat
14004         cf_tables=yes
14005 fi
14006
14007 # process the list of source-files
14008 for i in \$* ; do
14009 case \$i in
14010 (*.orig|*.rej) ;;
14011 (*.[0-9]*)
14012         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14013         if test \$verb = installing ; then
14014         if test ! -d \$cf_subdir\${section} ; then
14015                 mkdir -p \$cf_subdir\$section
14016         fi
14017         fi
14018
14019         # replace variables in man page
14020         if test ! -f $cf_man_alias ; then
14021 cat >>$cf_man_alias <<-CF_EOF2
14022                 s,@DATADIR@,\$datadir,g
14023                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14024                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14025                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14026                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14027                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14028                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14029 CF_EOF
14030
14031         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14032         do
14033                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14034                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14035 cat >>$cf_edit_man <<-CF_EOF
14036                 s,@$cf_NAME@,$cf_name,g
14037 CF_EOF
14038         done
14039
14040 cat >>$cf_edit_man <<CF_EOF
14041 CF_EOF2
14042                 echo "...made $cf_man_alias"
14043         fi
14044
14045         aliases=
14046         cf_source=\`basename \$i\`
14047         inalias=\$cf_source
14048         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14049         if test ! -f \$inalias ; then
14050                 echo .. skipped \$cf_source
14051                 continue
14052         fi
14053 CF_EOF
14054
14055 if test "$MANPAGE_ALIASES" != no ; then
14056 cat >>$cf_edit_man <<CF_EOF
14057         nCurses=ignore.3x
14058         test $with_curses_h = yes && nCurses=ncurses.3x
14059         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14060 CF_EOF
14061 fi
14062
14063 if test "$MANPAGE_RENAMES" = no ; then
14064 cat >>$cf_edit_man <<CF_EOF
14065         # perform program transformations for section 1 man pages
14066         if test \$section = 1 ; then
14067                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14068         else
14069                 cf_target=\$cf_subdir\${section}/\$cf_source
14070         fi
14071 CF_EOF
14072 else
14073 cat >>$cf_edit_man <<CF_EOF
14074         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14075         if test -z "\$cf_target" ; then
14076                 echo '? missing rename for '\$cf_source
14077                 cf_target="\$cf_source"
14078         fi
14079         cf_target="\$cf_subdir\${section}/\${cf_target}"
14080
14081 CF_EOF
14082 fi
14083
14084 cat >>$cf_edit_man <<CF_EOF
14085         sed     -f $cf_man_alias \\
14086 CF_EOF
14087
14088 if test -f $MANPAGE_RENAMES ; then
14089 cat >>$cf_edit_man <<CF_EOF
14090                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14091 CF_EOF
14092 else
14093 cat >>$cf_edit_man <<CF_EOF
14094                 < \$i >\$TMP
14095 CF_EOF
14096 fi
14097
14098 cat >>$cf_edit_man <<CF_EOF
14099 if test \$cf_tables = yes ; then
14100         tbl \$TMP >\$TMP.out
14101         mv \$TMP.out \$TMP
14102 fi
14103 CF_EOF
14104
14105 if test $with_overwrite != yes ; then
14106 cat >>$cf_edit_man <<CF_EOF
14107         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14108         mv \$TMP.out \$TMP
14109 CF_EOF
14110 fi
14111
14112 if test $with_curses_h != yes ; then
14113 cat >>$cf_edit_man <<CF_EOF
14114         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14115         mv \$TMP.out \$TMP
14116 CF_EOF
14117 fi
14118
14119 cat >>$cf_edit_man <<CF_EOF
14120         if test \$form = format ; then
14121                 nroff -man \$TMP >\$TMP.out
14122                 mv \$TMP.out \$TMP
14123         fi
14124 CF_EOF
14125
14126 if test -n "$cf_compress" ; then
14127 cat >>$cf_edit_man <<CF_EOF
14128         if test \$verb = installing ; then
14129         if ( $cf_compress -f \$TMP )
14130         then
14131                 mv \$TMP.$cf_so_strip \$TMP
14132         fi
14133         fi
14134         cf_target="\$cf_target.$cf_so_strip"
14135 CF_EOF
14136 fi
14137
14138 case "$MANPAGE_FORMAT" in
14139 (*BSDI*)
14140 cat >>$cf_edit_man <<CF_EOF
14141         if test \$form = format ; then
14142                 # BSDI installs only .0 suffixes in the cat directories
14143                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14144         fi
14145 CF_EOF
14146   ;;
14147 esac
14148
14149 cat >>$cf_edit_man <<CF_EOF
14150         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14151         if test \$verb = installing ; then
14152                 echo \$verb \$cf_target
14153                 \$INSTALL_DATA \$TMP \$cf_target
14154                 test -d \$cf_subdir\${section} &&
14155                 test -n "\$aliases" && (
14156                         cd \$cf_subdir\${section} && (
14157                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14158                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14159                                 cf_target=\`basename \$cf_target\`
14160                                 for cf_alias in \$aliases
14161                                 do
14162                                         if test \$section = 1 ; then
14163                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14164                                         fi
14165
14166                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14167                                                 if test -f \$cf_alias\${suffix} ; then
14168                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14169                                                         then
14170                                                                 continue
14171                                                         fi
14172                                                 fi
14173                                                 echo .. \$verb alias \$cf_alias\${suffix}
14174 CF_EOF
14175 case "x$LN_S" in
14176 (*-f)
14177 cat >>$cf_edit_man <<CF_EOF
14178                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14179 CF_EOF
14180         ;;
14181 (*)
14182 cat >>$cf_edit_man <<CF_EOF
14183                                                 rm -f \$cf_alias\${suffix}
14184                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14185 CF_EOF
14186         ;;
14187 esac
14188 cat >>$cf_edit_man <<CF_EOF
14189                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14190                                                 echo ".so \$cf_source" >\$TMP
14191 CF_EOF
14192 if test -n "$cf_compress" ; then
14193 cat >>$cf_edit_man <<CF_EOF
14194                                                 if test -n "$cf_so_strip" ; then
14195                                                         $cf_compress -f \$TMP
14196                                                         mv \$TMP.$cf_so_strip \$TMP
14197                                                 fi
14198 CF_EOF
14199 fi
14200 cat >>$cf_edit_man <<CF_EOF
14201                                                 echo .. \$verb alias \$cf_alias\${suffix}
14202                                                 rm -f \$cf_alias\${suffix}
14203                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14204                                         fi
14205                                 done
14206                         )
14207                 )
14208         elif test \$verb = removing ; then
14209                 test -f \$cf_target && (
14210                         echo \$verb \$cf_target
14211                         rm -f \$cf_target
14212                 )
14213                 test -d \$cf_subdir\${section} &&
14214                 test -n "\$aliases" && (
14215                         cd \$cf_subdir\${section} && (
14216                                 for cf_alias in \$aliases
14217                                 do
14218                                         if test \$section = 1 ; then
14219                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14220                                         fi
14221
14222                                         echo .. \$verb alias \$cf_alias\${suffix}
14223                                         rm -f \$cf_alias\${suffix}
14224                                 done
14225                         )
14226                 )
14227         else
14228 #               echo ".hy 0"
14229                 cat \$TMP
14230         fi
14231         ;;
14232 esac
14233 done
14234
14235 if test $cf_inboth = yes ; then
14236 if test \$form != format ; then
14237         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14238 fi
14239 fi
14240
14241 exit 0
14242 CF_EOF
14243 chmod 755 $cf_edit_man
14244
14245 ###############################################################################
14246
14247 ### Note that some functions (such as const) are normally disabled anyway.
14248 echo "$as_me:14248: checking if you want to build with function extensions" >&5
14249 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14250
14251 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14252 if test "${enable_ext_funcs+set}" = set; then
14253   enableval="$enable_ext_funcs"
14254   with_ext_funcs=$enableval
14255 else
14256   with_ext_funcs=yes
14257 fi;
14258 echo "$as_me:14258: result: $with_ext_funcs" >&5
14259 echo "${ECHO_T}$with_ext_funcs" >&6
14260 if test "x$with_ext_funcs" = xyes ; then
14261         NCURSES_EXT_FUNCS=1
14262
14263 cat >>confdefs.h <<\EOF
14264 #define NCURSES_EXT_FUNCS 1
14265 EOF
14266
14267 cat >>confdefs.h <<\EOF
14268 #define HAVE_ASSUME_DEFAULT_COLORS 1
14269 EOF
14270
14271 cat >>confdefs.h <<\EOF
14272 #define HAVE_CURSES_VERSION 1
14273 EOF
14274
14275 cat >>confdefs.h <<\EOF
14276 #define HAVE_HAS_KEY 1
14277 EOF
14278
14279 cat >>confdefs.h <<\EOF
14280 #define HAVE_RESIZETERM 1
14281 EOF
14282
14283 cat >>confdefs.h <<\EOF
14284 #define HAVE_RESIZE_TERM 1
14285 EOF
14286
14287 cat >>confdefs.h <<\EOF
14288 #define HAVE_TERM_ENTRY_H 1
14289 EOF
14290
14291 cat >>confdefs.h <<\EOF
14292 #define HAVE_USE_DEFAULT_COLORS 1
14293 EOF
14294
14295 cat >>confdefs.h <<\EOF
14296 #define HAVE_USE_EXTENDED_NAMES 1
14297 EOF
14298
14299 cat >>confdefs.h <<\EOF
14300 #define HAVE_USE_SCREEN 1
14301 EOF
14302
14303 cat >>confdefs.h <<\EOF
14304 #define HAVE_USE_WINDOW 1
14305 EOF
14306
14307 cat >>confdefs.h <<\EOF
14308 #define HAVE_WRESIZE 1
14309 EOF
14310
14311         GENERATED_EXT_FUNCS=generated
14312         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14313 else
14314         NCURSES_EXT_FUNCS=0
14315         GENERATED_EXT_FUNCS=
14316 fi
14317
14318 echo "$as_me:14318: checking if you want to build with SCREEN extensions" >&5
14319 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14320
14321 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14322 if test "${enable_sp_funcs+set}" = set; then
14323   enableval="$enable_sp_funcs"
14324   with_sp_funcs=$enableval
14325 else
14326   with_sp_funcs=$cf_dft_ext_spfuncs
14327 fi;
14328 echo "$as_me:14328: result: $with_sp_funcs" >&5
14329 echo "${ECHO_T}$with_sp_funcs" >&6
14330 if test "x$with_sp_funcs" = xyes ; then
14331         NCURSES_SP_FUNCS=1
14332
14333 cat >>confdefs.h <<\EOF
14334 #define NCURSES_SP_FUNCS 1
14335 EOF
14336
14337 cat >>confdefs.h <<\EOF
14338 #define HAVE_TPUTS_SP 1
14339 EOF
14340
14341         GENERATED_SP_FUNCS=generated
14342 else
14343         NCURSES_SP_FUNCS=0
14344         GENERATED_SP_FUNCS=
14345 fi
14346
14347 echo "$as_me:14347: checking if you want to build with terminal-driver" >&5
14348 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14349
14350 # Check whether --enable-term-driver or --disable-term-driver was given.
14351 if test "${enable_term_driver+set}" = set; then
14352   enableval="$enable_term_driver"
14353   with_term_driver=$enableval
14354 else
14355   with_term_driver=no
14356 fi;
14357 echo "$as_me:14357: result: $with_term_driver" >&5
14358 echo "${ECHO_T}$with_term_driver" >&6
14359 if test "x$with_term_driver" = xyes ; then
14360
14361 cat >>confdefs.h <<\EOF
14362 #define USE_TERM_DRIVER 1
14363 EOF
14364
14365         if test "x$with_termlib" != xno ; then
14366                 { { echo "$as_me:14366: error: The term-driver option conflicts with the termlib option" >&5
14367 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14368    { (exit 1); exit 1; }; }
14369         fi
14370         if test "x$with_sp_funcs" != xyes ; then
14371                 { { echo "$as_me:14371: error: The term-driver option relies upon sp-funcs" >&5
14372 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14373    { (exit 1); exit 1; }; }
14374         fi
14375 fi
14376
14377 ###   use option --enable-const to turn on use of const beyond that in XSI.
14378 echo "$as_me:14378: checking for extended use of const keyword" >&5
14379 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14380
14381 # Check whether --enable-const or --disable-const was given.
14382 if test "${enable_const+set}" = set; then
14383   enableval="$enable_const"
14384   with_ext_const=$enableval
14385 else
14386   with_ext_const=$cf_dft_ext_const
14387 fi;
14388 echo "$as_me:14388: result: $with_ext_const" >&5
14389 echo "${ECHO_T}$with_ext_const" >&6
14390 NCURSES_CONST='/*nothing*/'
14391 if test "x$with_ext_const" = xyes ; then
14392         NCURSES_CONST=const
14393 fi
14394
14395 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14396 echo "$as_me:14396: checking if you want to use extended colors" >&5
14397 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14398
14399 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14400 if test "${enable_ext_colors+set}" = set; then
14401   enableval="$enable_ext_colors"
14402   with_ext_colors=$enableval
14403 else
14404   with_ext_colors=$cf_dft_ext_colors
14405 fi;
14406 echo "$as_me:14406: result: $with_ext_colors" >&5
14407 echo "${ECHO_T}$with_ext_colors" >&6
14408 NCURSES_EXT_COLORS=0
14409 if test "x$with_ext_colors" = xyes ; then
14410         if test "x$with_widec" != xyes ; then
14411                 { echo "$as_me:14411: WARNING: This option applies only to wide-character library" >&5
14412 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14413         else
14414                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14415
14416 if test "${with_abi_version+set}" != set; then
14417         case $cf_cv_rel_version in
14418         (5.*)
14419                 cf_cv_rel_version=6.0
14420                 cf_cv_abi_version=6
14421                 { echo "$as_me:14421: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14422 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14423                 ;;
14424         esac
14425 fi
14426
14427                 NCURSES_EXT_COLORS=1
14428
14429 cat >>confdefs.h <<\EOF
14430 #define NCURSES_EXT_COLORS 1
14431 EOF
14432
14433 cat >>confdefs.h <<\EOF
14434 #define HAVE_ALLOC_PAIR 1
14435 EOF
14436
14437 cat >>confdefs.h <<\EOF
14438 #define HAVE_INIT_EXTENDED_COLOR 1
14439 EOF
14440
14441 cat >>confdefs.h <<\EOF
14442 #define HAVE_RESET_COLOR_PAIRS 1
14443 EOF
14444
14445         fi
14446 fi
14447
14448 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14449 echo "$as_me:14449: checking if you want to use extended mouse encoding" >&5
14450 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14451
14452 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14453 if test "${enable_ext_mouse+set}" = set; then
14454   enableval="$enable_ext_mouse"
14455   with_ext_mouse=$enableval
14456 else
14457   with_ext_mouse=$cf_dft_ext_mouse
14458 fi;
14459 echo "$as_me:14459: result: $with_ext_mouse" >&5
14460 echo "${ECHO_T}$with_ext_mouse" >&6
14461 NCURSES_MOUSE_VERSION=1
14462 if test "x$with_ext_mouse" = xyes ; then
14463         NCURSES_MOUSE_VERSION=2
14464
14465 if test "${with_abi_version+set}" != set; then
14466         case $cf_cv_rel_version in
14467         (5.*)
14468                 cf_cv_rel_version=6.0
14469                 cf_cv_abi_version=6
14470                 { echo "$as_me:14470: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14471 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14472                 ;;
14473         esac
14474 fi
14475
14476 fi
14477
14478 ###   use option --enable-ext-putwin to turn on extended screendumps
14479 echo "$as_me:14479: checking if you want to use extended putwin/screendump" >&5
14480 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14481
14482 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14483 if test "${enable_ext_putwin+set}" = set; then
14484   enableval="$enable_ext_putwin"
14485   with_ext_putwin=$enableval
14486 else
14487   with_ext_putwin=$cf_dft_ext_putwin
14488 fi;
14489 echo "$as_me:14489: result: $with_ext_putwin" >&5
14490 echo "${ECHO_T}$with_ext_putwin" >&6
14491 if test "x$with_ext_putwin" = xyes ; then
14492
14493 cat >>confdefs.h <<\EOF
14494 #define NCURSES_EXT_PUTWIN 1
14495 EOF
14496
14497 fi
14498
14499 echo "$as_me:14499: checking if you want \$NCURSES_NO_PADDING code" >&5
14500 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14501
14502 # Check whether --enable-no-padding or --disable-no-padding was given.
14503 if test "${enable_no_padding+set}" = set; then
14504   enableval="$enable_no_padding"
14505   with_no_padding=$enableval
14506 else
14507   with_no_padding=$with_ext_funcs
14508 fi;
14509 echo "$as_me:14509: result: $with_no_padding" >&5
14510 echo "${ECHO_T}$with_no_padding" >&6
14511 test "x$with_no_padding" = xyes &&
14512 cat >>confdefs.h <<\EOF
14513 #define NCURSES_NO_PADDING 1
14514 EOF
14515
14516 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14517 echo "$as_me:14517: checking if you want SIGWINCH handler" >&5
14518 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14519
14520 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14521 if test "${enable_sigwinch+set}" = set; then
14522   enableval="$enable_sigwinch"
14523   with_sigwinch=$enableval
14524 else
14525   with_sigwinch=$with_ext_funcs
14526 fi;
14527 echo "$as_me:14527: result: $with_sigwinch" >&5
14528 echo "${ECHO_T}$with_sigwinch" >&6
14529 test "x$with_sigwinch" = xyes &&
14530 cat >>confdefs.h <<\EOF
14531 #define USE_SIGWINCH 1
14532 EOF
14533
14534 ###   use option --enable-tcap-names to allow user to define new capabilities
14535 echo "$as_me:14535: checking if you want user-definable terminal capabilities like termcap" >&5
14536 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14537
14538 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14539 if test "${enable_tcap_names+set}" = set; then
14540   enableval="$enable_tcap_names"
14541   with_tcap_names=$enableval
14542 else
14543   with_tcap_names=$with_ext_funcs
14544 fi;
14545 echo "$as_me:14545: result: $with_tcap_names" >&5
14546 echo "${ECHO_T}$with_tcap_names" >&6
14547 NCURSES_XNAMES=0
14548 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14549
14550 ##############################################################################
14551
14552 echo "$as_me:14552: checking if you want to link with the pthread library" >&5
14553 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14554
14555 # Check whether --with-pthread or --without-pthread was given.
14556 if test "${with_pthread+set}" = set; then
14557   withval="$with_pthread"
14558   with_pthread=$withval
14559 else
14560   with_pthread=no
14561 fi;
14562 echo "$as_me:14562: result: $with_pthread" >&5
14563 echo "${ECHO_T}$with_pthread" >&6
14564
14565 if test "$with_pthread" != no ; then
14566         echo "$as_me:14566: checking for pthread.h" >&5
14567 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14568 if test "${ac_cv_header_pthread_h+set}" = set; then
14569   echo $ECHO_N "(cached) $ECHO_C" >&6
14570 else
14571   cat >conftest.$ac_ext <<_ACEOF
14572 #line 14572 "configure"
14573 #include "confdefs.h"
14574 #include <pthread.h>
14575 _ACEOF
14576 if { (eval echo "$as_me:14576: \"$ac_cpp conftest.$ac_ext\"") >&5
14577   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14578   ac_status=$?
14579   egrep -v '^ *\+' conftest.er1 >conftest.err
14580   rm -f conftest.er1
14581   cat conftest.err >&5
14582   echo "$as_me:14582: \$? = $ac_status" >&5
14583   (exit $ac_status); } >/dev/null; then
14584   if test -s conftest.err; then
14585     ac_cpp_err=$ac_c_preproc_warn_flag
14586   else
14587     ac_cpp_err=
14588   fi
14589 else
14590   ac_cpp_err=yes
14591 fi
14592 if test -z "$ac_cpp_err"; then
14593   ac_cv_header_pthread_h=yes
14594 else
14595   echo "$as_me: failed program was:" >&5
14596   cat conftest.$ac_ext >&5
14597   ac_cv_header_pthread_h=no
14598 fi
14599 rm -f conftest.err conftest.$ac_ext
14600 fi
14601 echo "$as_me:14601: result: $ac_cv_header_pthread_h" >&5
14602 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14603 if test $ac_cv_header_pthread_h = yes; then
14604
14605 cat >>confdefs.h <<\EOF
14606 #define HAVE_PTHREADS_H 1
14607 EOF
14608
14609         for cf_lib_pthread in pthread c_r
14610         do
14611             echo "$as_me:14611: checking if we can link with the $cf_lib_pthread library" >&5
14612 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14613             cf_save_LIBS="$LIBS"
14614
14615 cf_add_libs="-l$cf_lib_pthread"
14616 # Filter out duplicates - this happens with badly-designed ".pc" files...
14617 for cf_add_1lib in $LIBS
14618 do
14619         for cf_add_2lib in $cf_add_libs
14620         do
14621                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14622                 then
14623                         cf_add_1lib=
14624                         break
14625                 fi
14626         done
14627         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14628 done
14629 LIBS="$cf_add_libs"
14630
14631             cat >conftest.$ac_ext <<_ACEOF
14632 #line 14632 "configure"
14633 #include "confdefs.h"
14634
14635 #include <pthread.h>
14636
14637 int
14638 main (void)
14639 {
14640
14641                 int rc = pthread_create(0,0,0,0);
14642                 int r2 = pthread_mutexattr_settype(0, 0);
14643
14644   ;
14645   return 0;
14646 }
14647 _ACEOF
14648 rm -f conftest.$ac_objext conftest$ac_exeext
14649 if { (eval echo "$as_me:14649: \"$ac_link\"") >&5
14650   (eval $ac_link) 2>&5
14651   ac_status=$?
14652   echo "$as_me:14652: \$? = $ac_status" >&5
14653   (exit $ac_status); } &&
14654          { ac_try='test -s conftest$ac_exeext'
14655   { (eval echo "$as_me:14655: \"$ac_try\"") >&5
14656   (eval $ac_try) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); }; }; then
14660   with_pthread=yes
14661 else
14662   echo "$as_me: failed program was:" >&5
14663 cat conftest.$ac_ext >&5
14664 with_pthread=no
14665 fi
14666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14667             LIBS="$cf_save_LIBS"
14668             echo "$as_me:14668: result: $with_pthread" >&5
14669 echo "${ECHO_T}$with_pthread" >&6
14670             test "$with_pthread" = yes && break
14671         done
14672
14673         if test "$with_pthread" = yes ; then
14674
14675 cf_add_libs="-l$cf_lib_pthread"
14676 # Filter out duplicates - this happens with badly-designed ".pc" files...
14677 for cf_add_1lib in $LIBS
14678 do
14679         for cf_add_2lib in $cf_add_libs
14680         do
14681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14682                 then
14683                         cf_add_1lib=
14684                         break
14685                 fi
14686         done
14687         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14688 done
14689 LIBS="$cf_add_libs"
14690
14691 cat >>confdefs.h <<\EOF
14692 #define HAVE_LIBPTHREADS 1
14693 EOF
14694
14695         else
14696             { { echo "$as_me:14696: error: Cannot link with pthread library" >&5
14697 echo "$as_me: error: Cannot link with pthread library" >&2;}
14698    { (exit 1); exit 1; }; }
14699         fi
14700
14701 fi
14702
14703 fi
14704
14705 if test "x$with_pthread" != xno; then
14706         echo "$as_me:14706: checking for pthread_kill" >&5
14707 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14708 if test "${ac_cv_func_pthread_kill+set}" = set; then
14709   echo $ECHO_N "(cached) $ECHO_C" >&6
14710 else
14711   cat >conftest.$ac_ext <<_ACEOF
14712 #line 14712 "configure"
14713 #include "confdefs.h"
14714 #define pthread_kill autoconf_temporary
14715 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14716 #undef pthread_kill
14717
14718 #ifdef __cplusplus
14719 extern "C"
14720 #endif
14721
14722 /* We use char because int might match the return type of a gcc2
14723    builtin and then its argument prototype would still apply.  */
14724 char pthread_kill (void);
14725
14726 int
14727 main (void)
14728 {
14729
14730 /* The GNU C library defines stubs for functions which it implements
14731     to always fail with ENOSYS.  Some functions are actually named
14732     something starting with __ and the normal name is an alias.  */
14733 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14734 #error found stub for pthread_kill
14735 #endif
14736
14737         return pthread_kill ();
14738   ;
14739   return 0;
14740 }
14741 _ACEOF
14742 rm -f conftest.$ac_objext conftest$ac_exeext
14743 if { (eval echo "$as_me:14743: \"$ac_link\"") >&5
14744   (eval $ac_link) 2>&5
14745   ac_status=$?
14746   echo "$as_me:14746: \$? = $ac_status" >&5
14747   (exit $ac_status); } &&
14748          { ac_try='test -s conftest$ac_exeext'
14749   { (eval echo "$as_me:14749: \"$ac_try\"") >&5
14750   (eval $ac_try) 2>&5
14751   ac_status=$?
14752   echo "$as_me:14752: \$? = $ac_status" >&5
14753   (exit $ac_status); }; }; then
14754   ac_cv_func_pthread_kill=yes
14755 else
14756   echo "$as_me: failed program was:" >&5
14757 cat conftest.$ac_ext >&5
14758 ac_cv_func_pthread_kill=no
14759 fi
14760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14761 fi
14762 echo "$as_me:14762: result: $ac_cv_func_pthread_kill" >&5
14763 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14764 if test $ac_cv_func_pthread_kill = yes; then
14765
14766                 echo "$as_me:14766: checking if you want to allow EINTR in wgetch with pthreads" >&5
14767 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14768
14769 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14770 if test "${enable_pthreads_eintr+set}" = set; then
14771   enableval="$enable_pthreads_eintr"
14772   use_pthreads_eintr=$enableval
14773 else
14774   use_pthreads_eintr=no
14775 fi;
14776                 echo "$as_me:14776: result: $use_pthreads_eintr" >&5
14777 echo "${ECHO_T}$use_pthreads_eintr" >&6
14778                 if test "x$use_pthreads_eintr" = xyes ; then
14779
14780 cat >>confdefs.h <<\EOF
14781 #define USE_PTHREADS_EINTR 1
14782 EOF
14783
14784                 fi
14785 fi
14786
14787         echo "$as_me:14787: checking if you want to use weak-symbols for pthreads" >&5
14788 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14789
14790 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14791 if test "${enable_weak_symbols+set}" = set; then
14792   enableval="$enable_weak_symbols"
14793   use_weak_symbols=$enableval
14794 else
14795   use_weak_symbols=no
14796 fi;
14797         echo "$as_me:14797: result: $use_weak_symbols" >&5
14798 echo "${ECHO_T}$use_weak_symbols" >&6
14799         if test "x$use_weak_symbols" = xyes ; then
14800
14801 echo "$as_me:14801: checking if $CC supports weak symbols" >&5
14802 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14803 if test "${cf_cv_weak_symbols+set}" = set; then
14804   echo $ECHO_N "(cached) $ECHO_C" >&6
14805 else
14806
14807 cat >conftest.$ac_ext <<_ACEOF
14808 #line 14808 "configure"
14809 #include "confdefs.h"
14810
14811 #include <stdio.h>
14812 int
14813 main (void)
14814 {
14815
14816 #if defined(__GNUC__)
14817 #  if defined __USE_ISOC99
14818 #    define _cat_pragma(exp)    _Pragma(#exp)
14819 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14820 #  else
14821 #    define _weak_pragma(exp)
14822 #  endif
14823 #  define _declare(name)        __extension__ extern __typeof__(name) name
14824 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14825 #endif
14826
14827 weak_symbol(fopen);
14828
14829   ;
14830   return 0;
14831 }
14832 _ACEOF
14833 rm -f conftest.$ac_objext
14834 if { (eval echo "$as_me:14834: \"$ac_compile\"") >&5
14835   (eval $ac_compile) 2>&5
14836   ac_status=$?
14837   echo "$as_me:14837: \$? = $ac_status" >&5
14838   (exit $ac_status); } &&
14839          { ac_try='test -s conftest.$ac_objext'
14840   { (eval echo "$as_me:14840: \"$ac_try\"") >&5
14841   (eval $ac_try) 2>&5
14842   ac_status=$?
14843   echo "$as_me:14843: \$? = $ac_status" >&5
14844   (exit $ac_status); }; }; then
14845   cf_cv_weak_symbols=yes
14846 else
14847   echo "$as_me: failed program was:" >&5
14848 cat conftest.$ac_ext >&5
14849 cf_cv_weak_symbols=no
14850 fi
14851 rm -f conftest.$ac_objext conftest.$ac_ext
14852
14853 fi
14854 echo "$as_me:14854: result: $cf_cv_weak_symbols" >&5
14855 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14856
14857         else
14858                 cf_cv_weak_symbols=no
14859         fi
14860
14861         if test "x$cf_cv_weak_symbols" = xyes ; then
14862
14863 cat >>confdefs.h <<\EOF
14864 #define USE_WEAK_SYMBOLS 1
14865 EOF
14866
14867         fi
14868 fi
14869
14870 PTHREAD=
14871 if test "x$with_pthread" = "xyes" ; then
14872
14873 cat >>confdefs.h <<\EOF
14874 #define USE_PTHREADS 1
14875 EOF
14876
14877         enable_reentrant=yes
14878         if test "x$cf_cv_weak_symbols" = xyes ; then
14879                 PTHREAD=-lpthread
14880
14881 cf_add_libs="-lpthread"
14882 # Filter out duplicates - this happens with badly-designed ".pc" files...
14883 for cf_add_1lib in $PRIVATE_LIBS
14884 do
14885         for cf_add_2lib in $cf_add_libs
14886         do
14887                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14888                 then
14889                         cf_add_1lib=
14890                         break
14891                 fi
14892         done
14893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14894 done
14895 PRIVATE_LIBS="$cf_add_libs"
14896
14897         fi
14898 fi
14899
14900 # Reentrant code has to be opaque; there's little advantage to making ncurses
14901 # opaque outside of that, so there is no --enable-opaque option.  We can use
14902 # this option without --with-pthreads, but this will be always set for
14903 # pthreads.
14904 echo "$as_me:14904: checking if you want reentrant code" >&5
14905 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14906
14907 # Check whether --enable-reentrant or --disable-reentrant was given.
14908 if test "${enable_reentrant+set}" = set; then
14909   enableval="$enable_reentrant"
14910   with_reentrant=$enableval
14911 else
14912   with_reentrant=no
14913 fi;
14914 echo "$as_me:14914: result: $with_reentrant" >&5
14915 echo "${ECHO_T}$with_reentrant" >&6
14916 if test "x$with_reentrant" = xyes ; then
14917         cf_cv_enable_reentrant=1
14918         cf_cv_enable_opaque="NCURSES_INTERNALS"
14919         NCURSES_SIZE_T=int
14920         if test "x$cf_cv_weak_symbols" = xyes ; then
14921
14922 # remove pthread library from $LIBS
14923 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14924
14925 cf_add_libs="-lpthread"
14926 # Filter out duplicates - this happens with badly-designed ".pc" files...
14927 for cf_add_1lib in $TEST_LIBS
14928 do
14929         for cf_add_2lib in $cf_add_libs
14930         do
14931                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14932                 then
14933                         cf_add_1lib=
14934                         break
14935                 fi
14936         done
14937         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14938 done
14939 TEST_LIBS="$cf_add_libs"
14940
14941 cf_add_libs="-lpthread"
14942 # Filter out duplicates - this happens with badly-designed ".pc" files...
14943 for cf_add_1lib in $TEST_LIBS2
14944 do
14945         for cf_add_2lib in $cf_add_libs
14946         do
14947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14948                 then
14949                         cf_add_1lib=
14950                         break
14951                 fi
14952         done
14953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14954 done
14955 TEST_LIBS2="$cf_add_libs"
14956
14957 cf_add_libs="-lpthread"
14958 # Filter out duplicates - this happens with badly-designed ".pc" files...
14959 for cf_add_1lib in $PRIVATE_LIBS
14960 do
14961         for cf_add_2lib in $cf_add_libs
14962         do
14963                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14964                 then
14965                         cf_add_1lib=
14966                         break
14967                 fi
14968         done
14969         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14970 done
14971 PRIVATE_LIBS="$cf_add_libs"
14972
14973         else
14974                 # when not using weak symbols but with_reentrant,
14975                 # add 't' to the library suffix on all platforms
14976                 # except cygwin, where we only do that if ALSO
14977                 # compiling with full thread support.
14978                 case "$host" in
14979                 (*cygwin* | *msys*)
14980                         if test "$with_pthread" = "yes" ; then
14981                                 if test "x$disable_lib_suffixes" = "xno" ; then
14982                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14983                                 fi
14984                         fi ;;
14985                 (*)
14986                         if test "x$disable_lib_suffixes" = "xno" ; then
14987                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14988                         fi
14989                         ;;
14990                 esac
14991         fi
14992
14993 cat >>confdefs.h <<\EOF
14994 #define USE_REENTRANT 1
14995 EOF
14996
14997 if test "${with_abi_version+set}" != set; then
14998         case $cf_cv_rel_version in
14999         (5.*)
15000                 cf_cv_rel_version=6.0
15001                 cf_cv_abi_version=6
15002                 { echo "$as_me:15002: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15003 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15004                 ;;
15005         esac
15006 fi
15007
15008 else
15009         cf_cv_enable_reentrant=0
15010         cf_cv_enable_opaque="NCURSES_OPAQUE"
15011         NCURSES_SIZE_T=short
15012 fi
15013
15014 echo "$as_me:15014: checking if you want opaque curses-library structures" >&5
15015 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15016
15017 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15018 if test "${enable_opaque_curses+set}" = set; then
15019   enableval="$enable_opaque_curses"
15020   test "$enableval" != yes && enableval=no
15021         if test "$enableval" != "no" ; then
15022     enable_opaque_curses=yes
15023         else
15024
15025          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15026          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15027
15028         fi
15029 else
15030   enableval=no
15031
15032          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15033          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15034
15035 fi;
15036 echo "$as_me:15036: result: $enable_opaque_curses" >&5
15037 echo "${ECHO_T}$enable_opaque_curses" >&6
15038
15039 test "$cf_cv_enable_reentrant" = 1 && \
15040 test "$enable_opaque_curses" = no && \
15041 { { echo "$as_me:15041: error: reentrant configuration requires opaque library" >&5
15042 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15043    { (exit 1); exit 1; }; }
15044
15045 echo "$as_me:15045: checking if you want opaque form-library structures" >&5
15046 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15047
15048 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15049 if test "${enable_opaque_form+set}" = set; then
15050   enableval="$enable_opaque_form"
15051   enable_opaque_form=yes
15052 else
15053   enable_opaque_form=no
15054 fi;
15055 echo "$as_me:15055: result: $enable_opaque_form" >&5
15056 echo "${ECHO_T}$enable_opaque_form" >&6
15057
15058 echo "$as_me:15058: checking if you want opaque menu-library structures" >&5
15059 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15060
15061 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15062 if test "${enable_opaque_menu+set}" = set; then
15063   enableval="$enable_opaque_menu"
15064   enable_opaque_menu=yes
15065 else
15066   enable_opaque_menu=no
15067 fi;
15068 echo "$as_me:15068: result: $enable_opaque_menu" >&5
15069 echo "${ECHO_T}$enable_opaque_menu" >&6
15070
15071 echo "$as_me:15071: checking if you want opaque panel-library structures" >&5
15072 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15073
15074 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15075 if test "${enable_opaque_panel+set}" = set; then
15076   enableval="$enable_opaque_panel"
15077   enable_opaque_panel=yes
15078 else
15079   enable_opaque_panel=no
15080 fi;
15081 echo "$as_me:15081: result: $enable_opaque_panel" >&5
15082 echo "${ECHO_T}$enable_opaque_panel" >&6
15083
15084 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15085 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15086 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15087 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15088
15089 ### Allow using a different wrap-prefix
15090 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15091         echo "$as_me:15091: checking for prefix used to wrap public variables" >&5
15092 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15093
15094 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15095 if test "${with_wrap_prefix+set}" = set; then
15096   withval="$with_wrap_prefix"
15097   NCURSES_WRAP_PREFIX=$withval
15098 else
15099   NCURSES_WRAP_PREFIX=_nc_
15100 fi;
15101         echo "$as_me:15101: result: $NCURSES_WRAP_PREFIX" >&5
15102 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15103 else
15104         NCURSES_WRAP_PREFIX=_nc_
15105 fi
15106
15107 cat >>confdefs.h <<EOF
15108 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15109 EOF
15110
15111 ###############################################################################
15112 # These options are relatively safe to experiment with.
15113
15114 echo "$as_me:15114: checking if you want all development code" >&5
15115 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15116
15117 # Check whether --with-develop or --without-develop was given.
15118 if test "${with_develop+set}" = set; then
15119   withval="$with_develop"
15120   with_develop=$withval
15121 else
15122   with_develop=no
15123 fi;
15124 echo "$as_me:15124: result: $with_develop" >&5
15125 echo "${ECHO_T}$with_develop" >&6
15126
15127 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15128 echo "$as_me:15128: checking if you want hard-tabs code" >&5
15129 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15130
15131 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15132 if test "${enable_hard_tabs+set}" = set; then
15133   enableval="$enable_hard_tabs"
15134
15135 else
15136   enable_hard_tabs=$with_develop
15137 fi;
15138 echo "$as_me:15138: result: $enable_hard_tabs" >&5
15139 echo "${ECHO_T}$enable_hard_tabs" >&6
15140 test "x$enable_hard_tabs" = xyes &&
15141 cat >>confdefs.h <<\EOF
15142 #define USE_HARD_TABS 1
15143 EOF
15144
15145 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15146 echo "$as_me:15146: checking if you want limited support for xmc" >&5
15147 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15148
15149 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15150 if test "${enable_xmc_glitch+set}" = set; then
15151   enableval="$enable_xmc_glitch"
15152
15153 else
15154   enable_xmc_glitch=$with_develop
15155 fi;
15156 echo "$as_me:15156: result: $enable_xmc_glitch" >&5
15157 echo "${ECHO_T}$enable_xmc_glitch" >&6
15158 test "x$enable_xmc_glitch" = xyes &&
15159 cat >>confdefs.h <<\EOF
15160 #define USE_XMC_SUPPORT 1
15161 EOF
15162
15163 ###############################################################################
15164 # These are just experimental, probably should not be in a package:
15165
15166 echo "$as_me:15166: checking if you do not want to assume colors are white-on-black" >&5
15167 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15168
15169 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15170 if test "${enable_assumed_color+set}" = set; then
15171   enableval="$enable_assumed_color"
15172   with_assumed_color=$enableval
15173 else
15174   with_assumed_color=yes
15175 fi;
15176 echo "$as_me:15176: result: $with_assumed_color" >&5
15177 echo "${ECHO_T}$with_assumed_color" >&6
15178 test "x$with_assumed_color" = xyes &&
15179 cat >>confdefs.h <<\EOF
15180 #define USE_ASSUMED_COLOR 1
15181 EOF
15182
15183 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15184 echo "$as_me:15184: checking if you want hashmap scrolling-optimization code" >&5
15185 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15186
15187 # Check whether --enable-hashmap or --disable-hashmap was given.
15188 if test "${enable_hashmap+set}" = set; then
15189   enableval="$enable_hashmap"
15190   with_hashmap=$enableval
15191 else
15192   with_hashmap=yes
15193 fi;
15194 echo "$as_me:15194: result: $with_hashmap" >&5
15195 echo "${ECHO_T}$with_hashmap" >&6
15196 test "x$with_hashmap" = xyes &&
15197 cat >>confdefs.h <<\EOF
15198 #define USE_HASHMAP 1
15199 EOF
15200
15201 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15202 echo "$as_me:15202: checking if you want colorfgbg code" >&5
15203 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15204
15205 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15206 if test "${enable_colorfgbg+set}" = set; then
15207   enableval="$enable_colorfgbg"
15208   with_colorfgbg=$enableval
15209 else
15210   with_colorfgbg=no
15211 fi;
15212 echo "$as_me:15212: result: $with_colorfgbg" >&5
15213 echo "${ECHO_T}$with_colorfgbg" >&6
15214 test "x$with_colorfgbg" = xyes &&
15215 cat >>confdefs.h <<\EOF
15216 #define USE_COLORFGBG 1
15217 EOF
15218
15219 ###   use option --enable-interop to turn on use of bindings used for interop
15220 echo "$as_me:15220: checking if you want interop bindings" >&5
15221 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15222
15223 # Check whether --enable-interop or --disable-interop was given.
15224 if test "${enable_interop+set}" = set; then
15225   enableval="$enable_interop"
15226   with_exp_interop=$enableval
15227 else
15228   with_exp_interop=$cf_dft_interop
15229 fi;
15230 echo "$as_me:15230: result: $with_exp_interop" >&5
15231 echo "${ECHO_T}$with_exp_interop" >&6
15232
15233 NCURSES_INTEROP_FUNCS=0
15234 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15235
15236 echo "$as_me:15236: checking if you want experimental safe-sprintf code" >&5
15237 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15238
15239 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15240 if test "${enable_safe_sprintf+set}" = set; then
15241   enableval="$enable_safe_sprintf"
15242   with_safe_sprintf=$enableval
15243 else
15244   with_safe_sprintf=no
15245 fi;
15246 echo "$as_me:15246: result: $with_safe_sprintf" >&5
15247 echo "${ECHO_T}$with_safe_sprintf" >&6
15248
15249 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15250 # when hashmap is used scroll hints are useless
15251 if test "$with_hashmap" = no ; then
15252 echo "$as_me:15252: checking if you want to experiment without scrolling-hints code" >&5
15253 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15254
15255 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15256 if test "${enable_scroll_hints+set}" = set; then
15257   enableval="$enable_scroll_hints"
15258   with_scroll_hints=$enableval
15259 else
15260   with_scroll_hints=yes
15261 fi;
15262 echo "$as_me:15262: result: $with_scroll_hints" >&5
15263 echo "${ECHO_T}$with_scroll_hints" >&6
15264 test "x$with_scroll_hints" = xyes &&
15265 cat >>confdefs.h <<\EOF
15266 #define USE_SCROLL_HINTS 1
15267 EOF
15268
15269 fi
15270
15271 echo "$as_me:15271: checking if you want wgetch-events code" >&5
15272 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15273
15274 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15275 if test "${enable_wgetch_events+set}" = set; then
15276   enableval="$enable_wgetch_events"
15277   with_wgetch_events=$enableval
15278 else
15279   with_wgetch_events=no
15280 fi;
15281 echo "$as_me:15281: result: $with_wgetch_events" >&5
15282 echo "${ECHO_T}$with_wgetch_events" >&6
15283 test "x$with_wgetch_events" = xyes &&
15284 cat >>confdefs.h <<\EOF
15285 #define NCURSES_WGETCH_EVENTS 1
15286 EOF
15287
15288 ###############################################################################
15289
15290 ###     use option --disable-echo to suppress full display compiling commands
15291
15292 echo "$as_me:15292: checking if you want to see long compiling messages" >&5
15293 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15294
15295 # Check whether --enable-echo or --disable-echo was given.
15296 if test "${enable_echo+set}" = set; then
15297   enableval="$enable_echo"
15298   test "$enableval" != no && enableval=yes
15299         if test "$enableval" != "yes" ; then
15300
15301         ECHO_LT='--silent'
15302         ECHO_LD='@echo linking $@;'
15303         RULE_CC='@echo compiling $<'
15304         SHOW_CC='@echo compiling $@'
15305         ECHO_CC='@'
15306
15307         else
15308
15309         ECHO_LT=''
15310         ECHO_LD=''
15311         RULE_CC=''
15312         SHOW_CC=''
15313         ECHO_CC=''
15314
15315         fi
15316 else
15317   enableval=yes
15318
15319         ECHO_LT=''
15320         ECHO_LD=''
15321         RULE_CC=''
15322         SHOW_CC=''
15323         ECHO_CC=''
15324
15325 fi;
15326 echo "$as_me:15326: result: $enableval" >&5
15327 echo "${ECHO_T}$enableval" >&6
15328
15329 if test "x$enable_echo" = xyes; then
15330         ECHO_LINK=
15331 else
15332         ECHO_LINK='@ echo linking $@ ... ;'
15333         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15334         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15335 fi
15336
15337 # --disable-stripping is used for debugging
15338
15339 echo "$as_me:15339: checking if you want to install stripped executables" >&5
15340 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15341
15342 # Check whether --enable-stripping or --disable-stripping was given.
15343 if test "${enable_stripping+set}" = set; then
15344   enableval="$enable_stripping"
15345   test "$enableval" != no && enableval=yes
15346         if test "$enableval" != "yes" ; then
15347     with_stripping=no
15348         else
15349                 with_stripping=yes
15350         fi
15351 else
15352   enableval=yes
15353         with_stripping=yes
15354
15355 fi;
15356 echo "$as_me:15356: result: $with_stripping" >&5
15357 echo "${ECHO_T}$with_stripping" >&6
15358
15359 if test "$with_stripping" = yes
15360 then
15361         INSTALL_OPT_S="-s"
15362 else
15363         INSTALL_OPT_S=
15364 fi
15365
15366 : ${INSTALL:=install}
15367 echo "$as_me:15367: checking if install accepts -p option" >&5
15368 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15369 if test "${cf_cv_install_p+set}" = set; then
15370   echo $ECHO_N "(cached) $ECHO_C" >&6
15371 else
15372
15373         rm -rf conftest*
15374         date >conftest.in
15375         mkdir conftest.out
15376         sleep 3
15377         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15378         then
15379                 if test -f conftest.out/conftest.in
15380                 then
15381                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15382                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15383                         if test -s conftest.err
15384                         then
15385                                 cf_cv_install_p=no
15386                         else
15387                                 cf_cv_install_p=yes
15388                         fi
15389                 else
15390                         cf_cv_install_p=no
15391                 fi
15392         else
15393                 cf_cv_install_p=no
15394         fi
15395         rm -rf conftest*
15396
15397 fi
15398 echo "$as_me:15398: result: $cf_cv_install_p" >&5
15399 echo "${ECHO_T}$cf_cv_install_p" >&6
15400
15401 echo "$as_me:15401: checking if install needs to be told about ownership" >&5
15402 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15403 case `$ac_config_guess` in
15404 (*minix)
15405         with_install_o=yes
15406         ;;
15407 (*)
15408         with_install_o=no
15409         ;;
15410 esac
15411
15412 echo "$as_me:15412: result: $with_install_o" >&5
15413 echo "${ECHO_T}$with_install_o" >&6
15414 if test "x$with_install_o" = xyes
15415 then
15416         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'`
15417 else
15418         INSTALL_OPT_O=
15419 fi
15420
15421 # If we're avoiding relinking of shared libraries during install, that is to
15422 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15423 # the install program has "-p" (for preserving timestamps).
15424 cf_cv_do_reranlib=yes
15425 if test "x$cf_cv_install_p" = xyes
15426 then
15427         if test "x$cf_cv_do_relink" != xyes
15428         then
15429                 cf_cv_do_reranlib=no
15430                 INSTALL_OPT_P="-p"
15431                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15432         fi
15433 fi
15434
15435 ###     use option --enable-warnings to turn on all gcc warnings
15436 echo "$as_me:15436: checking if you want to see compiler warnings" >&5
15437 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15438
15439 # Check whether --enable-warnings or --disable-warnings was given.
15440 if test "${enable_warnings+set}" = set; then
15441   enableval="$enable_warnings"
15442   with_warnings=$enableval
15443 fi;
15444 echo "$as_me:15444: result: $with_warnings" >&5
15445 echo "${ECHO_T}$with_warnings" >&6
15446
15447 if test "x$with_warnings" = "xyes"; then
15448
15449         ADAFLAGS="$ADAFLAGS -gnatg"
15450
15451 if test "x$have_x" = xyes; then
15452 cat >conftest.$ac_ext <<_ACEOF
15453 #line 15453 "configure"
15454 #include "confdefs.h"
15455
15456 #include <stdlib.h>
15457 #include <X11/Intrinsic.h>
15458
15459 int
15460 main (void)
15461 {
15462 String foo = malloc(1)
15463   ;
15464   return 0;
15465 }
15466 _ACEOF
15467 rm -f conftest.$ac_objext
15468 if { (eval echo "$as_me:15468: \"$ac_compile\"") >&5
15469   (eval $ac_compile) 2>&5
15470   ac_status=$?
15471   echo "$as_me:15471: \$? = $ac_status" >&5
15472   (exit $ac_status); } &&
15473          { ac_try='test -s conftest.$ac_objext'
15474   { (eval echo "$as_me:15474: \"$ac_try\"") >&5
15475   (eval $ac_try) 2>&5
15476   ac_status=$?
15477   echo "$as_me:15477: \$? = $ac_status" >&5
15478   (exit $ac_status); }; }; then
15479
15480 echo "$as_me:15480: checking for X11/Xt const-feature" >&5
15481 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15482 if test "${cf_cv_const_x_string+set}" = set; then
15483   echo $ECHO_N "(cached) $ECHO_C" >&6
15484 else
15485
15486         cat >conftest.$ac_ext <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489
15490 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15491 #undef  XTSTRINGDEFINES /* X11R5 and later */
15492 #include <stdlib.h>
15493 #include <X11/Intrinsic.h>
15494
15495 int
15496 main (void)
15497 {
15498 String foo = malloc(1); *foo = 0
15499   ;
15500   return 0;
15501 }
15502 _ACEOF
15503 rm -f conftest.$ac_objext
15504 if { (eval echo "$as_me:15504: \"$ac_compile\"") >&5
15505   (eval $ac_compile) 2>&5
15506   ac_status=$?
15507   echo "$as_me:15507: \$? = $ac_status" >&5
15508   (exit $ac_status); } &&
15509          { ac_try='test -s conftest.$ac_objext'
15510   { (eval echo "$as_me:15510: \"$ac_try\"") >&5
15511   (eval $ac_try) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); }; }; then
15515
15516                         cf_cv_const_x_string=no
15517
15518 else
15519   echo "$as_me: failed program was:" >&5
15520 cat conftest.$ac_ext >&5
15521
15522                         cf_cv_const_x_string=yes
15523
15524 fi
15525 rm -f conftest.$ac_objext conftest.$ac_ext
15526
15527 fi
15528 echo "$as_me:15528: result: $cf_cv_const_x_string" >&5
15529 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15530
15531 case $cf_cv_const_x_string in
15532 (no)
15533
15534         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15535         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15536
15537         ;;
15538 (*)
15539
15540         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15541         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15542
15543         ;;
15544 esac
15545
15546 else
15547   echo "$as_me: failed program was:" >&5
15548 cat conftest.$ac_ext >&5
15549 fi
15550 rm -f conftest.$ac_objext conftest.$ac_ext
15551  fi
15552 cat > conftest.$ac_ext <<EOF
15553 #line 15553 "${as_me:-configure}"
15554 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15555 EOF
15556 if test "$INTEL_COMPILER" = yes
15557 then
15558 # The "-wdXXX" options suppress warnings:
15559 # remark #1419: external declaration in primary source file
15560 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15561 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15562 # remark #193: zero used for undefined preprocessing identifier
15563 # remark #593: variable "curs_sb_left_arrow" was set but never used
15564 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15565 # remark #869: parameter "tw" was never referenced
15566 # remark #981: operands are evaluated in unspecified order
15567 # warning #279: controlling expression is constant
15568
15569         { echo "$as_me:15569: checking for $CC warning options..." >&5
15570 echo "$as_me: checking for $CC warning options..." >&6;}
15571         cf_save_CFLAGS="$CFLAGS"
15572         EXTRA_CFLAGS="-Wall"
15573         for cf_opt in \
15574                 wd1419 \
15575                 wd1683 \
15576                 wd1684 \
15577                 wd193 \
15578                 wd593 \
15579                 wd279 \
15580                 wd810 \
15581                 wd869 \
15582                 wd981
15583         do
15584                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15585                 if { (eval echo "$as_me:15585: \"$ac_compile\"") >&5
15586   (eval $ac_compile) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); }; then
15590                         test -n "$verbose" && echo "$as_me:15590: result: ... -$cf_opt" >&5
15591 echo "${ECHO_T}... -$cf_opt" >&6
15592                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15593                 fi
15594         done
15595         CFLAGS="$cf_save_CFLAGS"
15596 elif test "$GCC" = yes
15597 then
15598         { echo "$as_me:15598: checking for $CC warning options..." >&5
15599 echo "$as_me: checking for $CC warning options..." >&6;}
15600         cf_save_CFLAGS="$CFLAGS"
15601         EXTRA_CFLAGS=
15602         cf_warn_CONST=""
15603         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15604         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15605         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15606         for cf_opt in W Wall \
15607                 Wbad-function-cast \
15608                 Wcast-align \
15609                 Wcast-qual \
15610                 Wdeclaration-after-statement \
15611                 Wextra \
15612                 Winline \
15613                 Wmissing-declarations \
15614                 Wmissing-prototypes \
15615                 Wnested-externs \
15616                 Wpointer-arith \
15617                 Wshadow \
15618                 Wstrict-prototypes \
15619                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15620         do
15621                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15622                 if { (eval echo "$as_me:15622: \"$ac_compile\"") >&5
15623   (eval $ac_compile) 2>&5
15624   ac_status=$?
15625   echo "$as_me:15625: \$? = $ac_status" >&5
15626   (exit $ac_status); }; then
15627                         test -n "$verbose" && echo "$as_me:15627: result: ... -$cf_opt" >&5
15628 echo "${ECHO_T}... -$cf_opt" >&6
15629                         case $cf_opt in
15630                         (Winline)
15631                                 case $GCC_VERSION in
15632                                 ([34].*)
15633                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15634
15635 echo "${as_me:-configure}:15635: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15636
15637                                         continue;;
15638                                 esac
15639                                 ;;
15640                         (Wpointer-arith)
15641                                 case $GCC_VERSION in
15642                                 ([12].*)
15643                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15644
15645 echo "${as_me:-configure}:15645: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15646
15647                                         continue;;
15648                                 esac
15649                                 ;;
15650                         esac
15651                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15652                 fi
15653         done
15654         CFLAGS="$cf_save_CFLAGS"
15655 fi
15656 rm -rf conftest*
15657
15658         if test "x$cf_with_cxx" = xyes ; then
15659
15660 INTEL_CPLUSPLUS=no
15661
15662 if test "$GCC" = yes ; then
15663         case $host_os in
15664         (linux*|gnu*)
15665                 echo "$as_me:15665: checking if this is really Intel C++ compiler" >&5
15666 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15667                 cf_save_CFLAGS="$CXXFLAGS"
15668                 CXXFLAGS="$CXXFLAGS -no-gcc"
15669                 cat >conftest.$ac_ext <<_ACEOF
15670 #line 15670 "configure"
15671 #include "confdefs.h"
15672
15673 int
15674 main (void)
15675 {
15676
15677 #ifdef __INTEL_COMPILER
15678 #else
15679 make an error
15680 #endif
15681
15682   ;
15683   return 0;
15684 }
15685 _ACEOF
15686 rm -f conftest.$ac_objext
15687 if { (eval echo "$as_me:15687: \"$ac_compile\"") >&5
15688   (eval $ac_compile) 2>&5
15689   ac_status=$?
15690   echo "$as_me:15690: \$? = $ac_status" >&5
15691   (exit $ac_status); } &&
15692          { ac_try='test -s conftest.$ac_objext'
15693   { (eval echo "$as_me:15693: \"$ac_try\"") >&5
15694   (eval $ac_try) 2>&5
15695   ac_status=$?
15696   echo "$as_me:15696: \$? = $ac_status" >&5
15697   (exit $ac_status); }; }; then
15698   INTEL_CPLUSPLUS=yes
15699 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15700
15701 else
15702   echo "$as_me: failed program was:" >&5
15703 cat conftest.$ac_ext >&5
15704 fi
15705 rm -f conftest.$ac_objext conftest.$ac_ext
15706                 CXXFLAGS="$cf_save_CFLAGS"
15707                 echo "$as_me:15707: result: $INTEL_CPLUSPLUS" >&5
15708 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15709                 ;;
15710         esac
15711 fi
15712
15713 CLANG_CPLUSPLUS=no
15714
15715 if test "$GCC" = yes ; then
15716         echo "$as_me:15716: checking if this is really Clang C++ compiler" >&5
15717 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15718         cf_save_CFLAGS="$CXXFLAGS"
15719         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15720         cat >conftest.$ac_ext <<_ACEOF
15721 #line 15721 "configure"
15722 #include "confdefs.h"
15723
15724 int
15725 main (void)
15726 {
15727
15728 #ifdef __clang__
15729 #else
15730 make an error
15731 #endif
15732
15733   ;
15734   return 0;
15735 }
15736 _ACEOF
15737 rm -f conftest.$ac_objext
15738 if { (eval echo "$as_me:15738: \"$ac_compile\"") >&5
15739   (eval $ac_compile) 2>&5
15740   ac_status=$?
15741   echo "$as_me:15741: \$? = $ac_status" >&5
15742   (exit $ac_status); } &&
15743          { ac_try='test -s conftest.$ac_objext'
15744   { (eval echo "$as_me:15744: \"$ac_try\"") >&5
15745   (eval $ac_try) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); }; }; then
15749   CLANG_CPLUSPLUS=yes
15750 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15751
15752 else
15753   echo "$as_me: failed program was:" >&5
15754 cat conftest.$ac_ext >&5
15755 fi
15756 rm -f conftest.$ac_objext conftest.$ac_ext
15757         CXXFLAGS="$cf_save_CFLAGS"
15758         echo "$as_me:15758: result: $CLANG_CPLUSPLUS" >&5
15759 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15760 fi
15761
15762 ac_ext=cc
15763 ac_cpp='$CXXCPP $CPPFLAGS'
15764 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15765 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15766 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15767 ac_main_return=return
15768
15769 cat > conftest.$ac_ext <<EOF
15770 #line 15770 "configure"
15771 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15772 EOF
15773
15774 if test "$INTEL_CPLUSPLUS" = yes
15775 then
15776 # The "-wdXXX" options suppress warnings:
15777 # remark #1419: external declaration in primary source file
15778 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15779 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15780 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15781 # remark #193: zero used for undefined preprocessing identifier
15782 # remark #593: variable "curs_sb_left_arrow" was set but never used
15783 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15784 # remark #869: parameter "tw" was never referenced
15785 # remark #981: operands are evaluated in unspecified order
15786 # warning #269: invalid format string conversion
15787
15788         { echo "$as_me:15788: checking for $CC warning options..." >&5
15789 echo "$as_me: checking for $CC warning options..." >&6;}
15790         cf_save_CXXFLAGS="$CXXFLAGS"
15791         EXTRA_CXXFLAGS="-Wall"
15792         for cf_opt in \
15793                 wd1419 \
15794                 wd1682 \
15795                 wd1683 \
15796                 wd1684 \
15797                 wd193 \
15798                 wd279 \
15799                 wd593 \
15800                 wd810 \
15801                 wd869 \
15802                 wd981
15803         do
15804                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15805                 if { (eval echo "$as_me:15805: \"$ac_compile\"") >&5
15806   (eval $ac_compile) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); }; then
15810                         test -n "$verbose" && echo "$as_me:15810: result: ... -$cf_opt" >&5
15811 echo "${ECHO_T}... -$cf_opt" >&6
15812                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15813                 fi
15814         done
15815         CXXFLAGS="$cf_save_CXXFLAGS"
15816
15817 elif test "$GXX" = yes
15818 then
15819         { echo "$as_me:15819: checking for $CXX warning options..." >&5
15820 echo "$as_me: checking for $CXX warning options..." >&6;}
15821         cf_save_CXXFLAGS="$CXXFLAGS"
15822         EXTRA_CXXFLAGS="-W -Wall"
15823         cf_gxx_extra_warnings=""
15824         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15825         case "$GCC_VERSION" in
15826         ([1-2].*)
15827                 ;;
15828         (*)
15829                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15830                 ;;
15831         esac
15832         for cf_opt in \
15833                 Wabi \
15834                 fabi-version=0 \
15835                 Wextra \
15836                 Wignored-qualifiers \
15837                 Wlogical-op \
15838                 Woverloaded-virtual \
15839                 Wsign-promo \
15840                 Wsynth \
15841                 Wold-style-cast \
15842                 Wcast-align \
15843                 Wcast-qual \
15844                 Wpointer-arith \
15845                 Wshadow \
15846                 Wundef $cf_gxx_extra_warnings Wno-unused
15847         do
15848                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15849                 if { (eval echo "$as_me:15849: \"$ac_compile\"") >&5
15850   (eval $ac_compile) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit $ac_status); }; then
15854                         test -n "$verbose" && echo "$as_me:15854: result: ... -$cf_opt" >&5
15855 echo "${ECHO_T}... -$cf_opt" >&6
15856                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15857                 else
15858                         test -n "$verbose" && echo "$as_me:15858: result: ... no -$cf_opt" >&5
15859 echo "${ECHO_T}... no -$cf_opt" >&6
15860                 fi
15861         done
15862         CXXFLAGS="$cf_save_CXXFLAGS"
15863 fi
15864
15865 rm -rf conftest*
15866 ac_ext=c
15867 ac_cpp='$CPP $CPPFLAGS'
15868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15871 ac_main_return=return
15872
15873         fi
15874 fi
15875
15876 if test "$GCC" = yes
15877 then
15878 cat > conftest.i <<EOF
15879 #ifndef GCC_PRINTF
15880 #define GCC_PRINTF 0
15881 #endif
15882 #ifndef GCC_SCANF
15883 #define GCC_SCANF 0
15884 #endif
15885 #ifndef GCC_NORETURN
15886 #define GCC_NORETURN /* nothing */
15887 #endif
15888 #ifndef GCC_UNUSED
15889 #define GCC_UNUSED /* nothing */
15890 #endif
15891 EOF
15892 if test "$GCC" = yes
15893 then
15894         { echo "$as_me:15894: checking for $CC __attribute__ directives..." >&5
15895 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15896 cat > conftest.$ac_ext <<EOF
15897 #line 15897 "${as_me:-configure}"
15898 #include "confdefs.h"
15899 #include "conftest.h"
15900 #include "conftest.i"
15901 #if     GCC_PRINTF
15902 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15903 #else
15904 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15905 #endif
15906 #if     GCC_SCANF
15907 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15908 #else
15909 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15910 #endif
15911 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15912 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15913 extern void foo(void) GCC_NORETURN;
15914 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15915 EOF
15916         cf_printf_attribute=no
15917         cf_scanf_attribute=no
15918         for cf_attribute in scanf printf unused noreturn
15919         do
15920
15921 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15922
15923                 cf_directive="__attribute__(($cf_attribute))"
15924                 echo "checking for $CC $cf_directive" 1>&5
15925
15926                 case $cf_attribute in
15927                 (printf)
15928                         cf_printf_attribute=yes
15929                         cat >conftest.h <<EOF
15930 #define GCC_$cf_ATTRIBUTE 1
15931 EOF
15932                         ;;
15933                 (scanf)
15934                         cf_scanf_attribute=yes
15935                         cat >conftest.h <<EOF
15936 #define GCC_$cf_ATTRIBUTE 1
15937 EOF
15938                         ;;
15939                 (*)
15940                         cat >conftest.h <<EOF
15941 #define GCC_$cf_ATTRIBUTE $cf_directive
15942 EOF
15943                         ;;
15944                 esac
15945
15946                 if { (eval echo "$as_me:15946: \"$ac_compile\"") >&5
15947   (eval $ac_compile) 2>&5
15948   ac_status=$?
15949   echo "$as_me:15949: \$? = $ac_status" >&5
15950   (exit $ac_status); }; then
15951                         test -n "$verbose" && echo "$as_me:15951: result: ... $cf_attribute" >&5
15952 echo "${ECHO_T}... $cf_attribute" >&6
15953                         cat conftest.h >>confdefs.h
15954                         case $cf_attribute in
15955                         (noreturn)
15956
15957 cat >>confdefs.h <<EOF
15958 #define GCC_NORETURN $cf_directive
15959 EOF
15960
15961                                 ;;
15962                         (printf)
15963                                 cf_value='/* nothing */'
15964                                 if test "$cf_printf_attribute" != no ; then
15965                                         cf_value='__attribute__((format(printf,fmt,var)))'
15966
15967 cat >>confdefs.h <<\EOF
15968 #define GCC_PRINTF 1
15969 EOF
15970
15971                                 fi
15972
15973 cat >>confdefs.h <<EOF
15974 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15975 EOF
15976
15977                                 ;;
15978                         (scanf)
15979                                 cf_value='/* nothing */'
15980                                 if test "$cf_scanf_attribute" != no ; then
15981                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15982
15983 cat >>confdefs.h <<\EOF
15984 #define GCC_SCANF 1
15985 EOF
15986
15987                                 fi
15988
15989 cat >>confdefs.h <<EOF
15990 #define GCC_SCANFLIKE(fmt,var) $cf_value
15991 EOF
15992
15993                                 ;;
15994                         (unused)
15995
15996 cat >>confdefs.h <<EOF
15997 #define GCC_UNUSED $cf_directive
15998 EOF
15999
16000                                 ;;
16001                         esac
16002                 fi
16003         done
16004 else
16005         fgrep define conftest.i >>confdefs.h
16006 fi
16007 rm -rf conftest*
16008 fi
16009
16010 echo "$as_me:16010: checking if you want to work around bogus compiler/loader warnings" >&5
16011 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16012
16013 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16014 if test "${enable_string_hacks+set}" = set; then
16015   enableval="$enable_string_hacks"
16016   with_string_hacks=$enableval
16017 else
16018   with_string_hacks=no
16019 fi;
16020 echo "$as_me:16020: result: $with_string_hacks" >&5
16021 echo "${ECHO_T}$with_string_hacks" >&6
16022
16023 if test "x$with_string_hacks" = "xyes"; then
16024
16025 cat >>confdefs.h <<\EOF
16026 #define USE_STRING_HACKS 1
16027 EOF
16028
16029         { echo "$as_me:16029: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16030 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16031         echo "$as_me:16031: checking for strlcat" >&5
16032 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16033 if test "${ac_cv_func_strlcat+set}" = set; then
16034   echo $ECHO_N "(cached) $ECHO_C" >&6
16035 else
16036   cat >conftest.$ac_ext <<_ACEOF
16037 #line 16037 "configure"
16038 #include "confdefs.h"
16039 #define strlcat autoconf_temporary
16040 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16041 #undef strlcat
16042
16043 #ifdef __cplusplus
16044 extern "C"
16045 #endif
16046
16047 /* We use char because int might match the return type of a gcc2
16048    builtin and then its argument prototype would still apply.  */
16049 char strlcat (void);
16050
16051 int
16052 main (void)
16053 {
16054
16055 /* The GNU C library defines stubs for functions which it implements
16056     to always fail with ENOSYS.  Some functions are actually named
16057     something starting with __ and the normal name is an alias.  */
16058 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16059 #error found stub for strlcat
16060 #endif
16061
16062         return strlcat ();
16063   ;
16064   return 0;
16065 }
16066 _ACEOF
16067 rm -f conftest.$ac_objext conftest$ac_exeext
16068 if { (eval echo "$as_me:16068: \"$ac_link\"") >&5
16069   (eval $ac_link) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit $ac_status); } &&
16073          { ac_try='test -s conftest$ac_exeext'
16074   { (eval echo "$as_me:16074: \"$ac_try\"") >&5
16075   (eval $ac_try) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); }; }; then
16079   ac_cv_func_strlcat=yes
16080 else
16081   echo "$as_me: failed program was:" >&5
16082 cat conftest.$ac_ext >&5
16083 ac_cv_func_strlcat=no
16084 fi
16085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16086 fi
16087 echo "$as_me:16087: result: $ac_cv_func_strlcat" >&5
16088 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16089 if test $ac_cv_func_strlcat = yes; then
16090
16091 cat >>confdefs.h <<\EOF
16092 #define HAVE_STRLCAT 1
16093 EOF
16094
16095 else
16096
16097                 echo "$as_me:16097: checking for strlcat in -lbsd" >&5
16098 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16099 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16100   echo $ECHO_N "(cached) $ECHO_C" >&6
16101 else
16102   ac_check_lib_save_LIBS=$LIBS
16103 LIBS="-lbsd  $LIBS"
16104 cat >conftest.$ac_ext <<_ACEOF
16105 #line 16105 "configure"
16106 #include "confdefs.h"
16107
16108 /* Override any gcc2 internal prototype to avoid an error.  */
16109 #ifdef __cplusplus
16110 extern "C"
16111 #endif
16112 /* We use char because int might match the return type of a gcc2
16113    builtin and then its argument prototype would still apply.  */
16114 char strlcat ();
16115 int
16116 main (void)
16117 {
16118 strlcat ();
16119   ;
16120   return 0;
16121 }
16122 _ACEOF
16123 rm -f conftest.$ac_objext conftest$ac_exeext
16124 if { (eval echo "$as_me:16124: \"$ac_link\"") >&5
16125   (eval $ac_link) 2>&5
16126   ac_status=$?
16127   echo "$as_me:16127: \$? = $ac_status" >&5
16128   (exit $ac_status); } &&
16129          { ac_try='test -s conftest$ac_exeext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   ac_cv_lib_bsd_strlcat=yes
16136 else
16137   echo "$as_me: failed program was:" >&5
16138 cat conftest.$ac_ext >&5
16139 ac_cv_lib_bsd_strlcat=no
16140 fi
16141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16142 LIBS=$ac_check_lib_save_LIBS
16143 fi
16144 echo "$as_me:16144: result: $ac_cv_lib_bsd_strlcat" >&5
16145 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16146 if test $ac_cv_lib_bsd_strlcat = yes; then
16147
16148 cf_add_libs="-lbsd"
16149 # Filter out duplicates - this happens with badly-designed ".pc" files...
16150 for cf_add_1lib in $LIBS
16151 do
16152         for cf_add_2lib in $cf_add_libs
16153         do
16154                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16155                 then
16156                         cf_add_1lib=
16157                         break
16158                 fi
16159         done
16160         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16161 done
16162 LIBS="$cf_add_libs"
16163
16164 for ac_header in bsd/string.h
16165 do
16166 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16167 echo "$as_me:16167: checking for $ac_header" >&5
16168 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16169 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16170   echo $ECHO_N "(cached) $ECHO_C" >&6
16171 else
16172   cat >conftest.$ac_ext <<_ACEOF
16173 #line 16173 "configure"
16174 #include "confdefs.h"
16175 #include <$ac_header>
16176 _ACEOF
16177 if { (eval echo "$as_me:16177: \"$ac_cpp conftest.$ac_ext\"") >&5
16178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16179   ac_status=$?
16180   egrep -v '^ *\+' conftest.er1 >conftest.err
16181   rm -f conftest.er1
16182   cat conftest.err >&5
16183   echo "$as_me:16183: \$? = $ac_status" >&5
16184   (exit $ac_status); } >/dev/null; then
16185   if test -s conftest.err; then
16186     ac_cpp_err=$ac_c_preproc_warn_flag
16187   else
16188     ac_cpp_err=
16189   fi
16190 else
16191   ac_cpp_err=yes
16192 fi
16193 if test -z "$ac_cpp_err"; then
16194   eval "$as_ac_Header=yes"
16195 else
16196   echo "$as_me: failed program was:" >&5
16197   cat conftest.$ac_ext >&5
16198   eval "$as_ac_Header=no"
16199 fi
16200 rm -f conftest.err conftest.$ac_ext
16201 fi
16202 echo "$as_me:16202: result: `eval echo '${'$as_ac_Header'}'`" >&5
16203 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16204 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16205   cat >>confdefs.h <<EOF
16206 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16207 EOF
16208
16209 fi
16210 done
16211
16212 cat >>confdefs.h <<\EOF
16213 #define HAVE_STRLCAT 1
16214 EOF
16215
16216 fi
16217
16218 fi
16219
16220 for ac_func in strlcpy snprintf
16221 do
16222 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16223 echo "$as_me:16223: checking for $ac_func" >&5
16224 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16225 if eval "test \"\${$as_ac_var+set}\" = set"; then
16226   echo $ECHO_N "(cached) $ECHO_C" >&6
16227 else
16228   cat >conftest.$ac_ext <<_ACEOF
16229 #line 16229 "configure"
16230 #include "confdefs.h"
16231 #define $ac_func autoconf_temporary
16232 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16233 #undef $ac_func
16234
16235 #ifdef __cplusplus
16236 extern "C"
16237 #endif
16238
16239 /* We use char because int might match the return type of a gcc2
16240    builtin and then its argument prototype would still apply.  */
16241 char $ac_func (void);
16242
16243 int
16244 main (void)
16245 {
16246
16247 /* The GNU C library defines stubs for functions which it implements
16248     to always fail with ENOSYS.  Some functions are actually named
16249     something starting with __ and the normal name is an alias.  */
16250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16251 #error found stub for $ac_func
16252 #endif
16253
16254         return $ac_func ();
16255   ;
16256   return 0;
16257 }
16258 _ACEOF
16259 rm -f conftest.$ac_objext conftest$ac_exeext
16260 if { (eval echo "$as_me:16260: \"$ac_link\"") >&5
16261   (eval $ac_link) 2>&5
16262   ac_status=$?
16263   echo "$as_me:16263: \$? = $ac_status" >&5
16264   (exit $ac_status); } &&
16265          { ac_try='test -s conftest$ac_exeext'
16266   { (eval echo "$as_me:16266: \"$ac_try\"") >&5
16267   (eval $ac_try) 2>&5
16268   ac_status=$?
16269   echo "$as_me:16269: \$? = $ac_status" >&5
16270   (exit $ac_status); }; }; then
16271   eval "$as_ac_var=yes"
16272 else
16273   echo "$as_me: failed program was:" >&5
16274 cat conftest.$ac_ext >&5
16275 eval "$as_ac_var=no"
16276 fi
16277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16278 fi
16279 echo "$as_me:16279: result: `eval echo '${'$as_ac_var'}'`" >&5
16280 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16281 if test `eval echo '${'$as_ac_var'}'` = yes; then
16282   cat >>confdefs.h <<EOF
16283 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16284 EOF
16285
16286 fi
16287 done
16288
16289 fi
16290
16291 ###     use option --enable-assertions to turn on generation of assertion code
16292 echo "$as_me:16292: checking if you want to enable runtime assertions" >&5
16293 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16294
16295 # Check whether --enable-assertions or --disable-assertions was given.
16296 if test "${enable_assertions+set}" = set; then
16297   enableval="$enable_assertions"
16298   with_assertions=$enableval
16299 else
16300   with_assertions=no
16301 fi;
16302 echo "$as_me:16302: result: $with_assertions" >&5
16303 echo "${ECHO_T}$with_assertions" >&6
16304 if test -n "$GCC"
16305 then
16306         if test "$with_assertions" = no
16307         then
16308                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16309         else
16310
16311         ADAFLAGS="$ADAFLAGS -gnata"
16312
16313         fi
16314 fi
16315
16316 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16317
16318 echo "$as_me:16318: checking if you want to use dmalloc for testing" >&5
16319 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16320
16321 # Check whether --with-dmalloc or --without-dmalloc was given.
16322 if test "${with_dmalloc+set}" = set; then
16323   withval="$with_dmalloc"
16324
16325 cat >>confdefs.h <<EOF
16326 #define USE_DMALLOC 1
16327 EOF
16328
16329         : ${with_cflags:=-g}
16330         : ${with_no_leaks:=yes}
16331          with_dmalloc=yes
16332 else
16333   with_dmalloc=
16334 fi;
16335 echo "$as_me:16335: result: ${with_dmalloc:-no}" >&5
16336 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16337
16338 case .$with_cflags in
16339 (.*-g*)
16340         case .$CFLAGS in
16341         (.*-g*)
16342                 ;;
16343         (*)
16344
16345 cf_fix_cppflags=no
16346 cf_new_cflags=
16347 cf_new_cppflags=
16348 cf_new_extra_cppflags=
16349
16350 for cf_add_cflags in -g
16351 do
16352 case $cf_fix_cppflags in
16353 (no)
16354         case $cf_add_cflags in
16355         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16356                 case $cf_add_cflags in
16357                 (-D*)
16358                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16359
16360                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16361                                 && test -z "${cf_tst_cflags}" \
16362                                 && cf_fix_cppflags=yes
16363
16364                         if test $cf_fix_cppflags = yes ; then
16365
16366         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16367         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16368
16369                                 continue
16370                         elif test "${cf_tst_cflags}" = "\"'" ; then
16371
16372         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16373         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16374
16375                                 continue
16376                         fi
16377                         ;;
16378                 esac
16379                 case "$CPPFLAGS" in
16380                 (*$cf_add_cflags)
16381                         ;;
16382                 (*)
16383                         case $cf_add_cflags in
16384                         (-D*)
16385                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16386
16387 CPPFLAGS=`echo "$CPPFLAGS" | \
16388         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16389                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16390
16391                                 ;;
16392                         esac
16393
16394         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16395         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16396
16397                         ;;
16398                 esac
16399                 ;;
16400         (*)
16401
16402         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16403         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16404
16405                 ;;
16406         esac
16407         ;;
16408 (yes)
16409
16410         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16411         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16412
16413         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16414
16415         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16416                 && test -z "${cf_tst_cflags}" \
16417                 && cf_fix_cppflags=no
16418         ;;
16419 esac
16420 done
16421
16422 if test -n "$cf_new_cflags" ; then
16423
16424         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16425         CFLAGS="${CFLAGS}$cf_new_cflags"
16426
16427 fi
16428
16429 if test -n "$cf_new_cppflags" ; then
16430
16431         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16432         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16433
16434 fi
16435
16436 if test -n "$cf_new_extra_cppflags" ; then
16437
16438         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16439         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16440
16441 fi
16442
16443                 ;;
16444         esac
16445         ;;
16446 esac
16447
16448 if test "$with_dmalloc" = yes ; then
16449         echo "$as_me:16449: checking for dmalloc.h" >&5
16450 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16451 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16452   echo $ECHO_N "(cached) $ECHO_C" >&6
16453 else
16454   cat >conftest.$ac_ext <<_ACEOF
16455 #line 16455 "configure"
16456 #include "confdefs.h"
16457 #include <dmalloc.h>
16458 _ACEOF
16459 if { (eval echo "$as_me:16459: \"$ac_cpp conftest.$ac_ext\"") >&5
16460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16461   ac_status=$?
16462   egrep -v '^ *\+' conftest.er1 >conftest.err
16463   rm -f conftest.er1
16464   cat conftest.err >&5
16465   echo "$as_me:16465: \$? = $ac_status" >&5
16466   (exit $ac_status); } >/dev/null; then
16467   if test -s conftest.err; then
16468     ac_cpp_err=$ac_c_preproc_warn_flag
16469   else
16470     ac_cpp_err=
16471   fi
16472 else
16473   ac_cpp_err=yes
16474 fi
16475 if test -z "$ac_cpp_err"; then
16476   ac_cv_header_dmalloc_h=yes
16477 else
16478   echo "$as_me: failed program was:" >&5
16479   cat conftest.$ac_ext >&5
16480   ac_cv_header_dmalloc_h=no
16481 fi
16482 rm -f conftest.err conftest.$ac_ext
16483 fi
16484 echo "$as_me:16484: result: $ac_cv_header_dmalloc_h" >&5
16485 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16486 if test $ac_cv_header_dmalloc_h = yes; then
16487
16488 echo "$as_me:16488: checking for dmalloc_debug in -ldmalloc" >&5
16489 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16490 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16491   echo $ECHO_N "(cached) $ECHO_C" >&6
16492 else
16493   ac_check_lib_save_LIBS=$LIBS
16494 LIBS="-ldmalloc  $LIBS"
16495 cat >conftest.$ac_ext <<_ACEOF
16496 #line 16496 "configure"
16497 #include "confdefs.h"
16498
16499 /* Override any gcc2 internal prototype to avoid an error.  */
16500 #ifdef __cplusplus
16501 extern "C"
16502 #endif
16503 /* We use char because int might match the return type of a gcc2
16504    builtin and then its argument prototype would still apply.  */
16505 char dmalloc_debug ();
16506 int
16507 main (void)
16508 {
16509 dmalloc_debug ();
16510   ;
16511   return 0;
16512 }
16513 _ACEOF
16514 rm -f conftest.$ac_objext conftest$ac_exeext
16515 if { (eval echo "$as_me:16515: \"$ac_link\"") >&5
16516   (eval $ac_link) 2>&5
16517   ac_status=$?
16518   echo "$as_me:16518: \$? = $ac_status" >&5
16519   (exit $ac_status); } &&
16520          { ac_try='test -s conftest$ac_exeext'
16521   { (eval echo "$as_me:16521: \"$ac_try\"") >&5
16522   (eval $ac_try) 2>&5
16523   ac_status=$?
16524   echo "$as_me:16524: \$? = $ac_status" >&5
16525   (exit $ac_status); }; }; then
16526   ac_cv_lib_dmalloc_dmalloc_debug=yes
16527 else
16528   echo "$as_me: failed program was:" >&5
16529 cat conftest.$ac_ext >&5
16530 ac_cv_lib_dmalloc_dmalloc_debug=no
16531 fi
16532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16533 LIBS=$ac_check_lib_save_LIBS
16534 fi
16535 echo "$as_me:16535: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16536 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16537 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16538   cat >>confdefs.h <<EOF
16539 #define HAVE_LIBDMALLOC 1
16540 EOF
16541
16542   LIBS="-ldmalloc $LIBS"
16543
16544 fi
16545
16546 fi
16547
16548 fi
16549
16550 echo "$as_me:16550: checking if you want to use dbmalloc for testing" >&5
16551 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16552
16553 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16554 if test "${with_dbmalloc+set}" = set; then
16555   withval="$with_dbmalloc"
16556
16557 cat >>confdefs.h <<EOF
16558 #define USE_DBMALLOC 1
16559 EOF
16560
16561         : ${with_cflags:=-g}
16562         : ${with_no_leaks:=yes}
16563          with_dbmalloc=yes
16564 else
16565   with_dbmalloc=
16566 fi;
16567 echo "$as_me:16567: result: ${with_dbmalloc:-no}" >&5
16568 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16569
16570 case .$with_cflags in
16571 (.*-g*)
16572         case .$CFLAGS in
16573         (.*-g*)
16574                 ;;
16575         (*)
16576
16577 cf_fix_cppflags=no
16578 cf_new_cflags=
16579 cf_new_cppflags=
16580 cf_new_extra_cppflags=
16581
16582 for cf_add_cflags in -g
16583 do
16584 case $cf_fix_cppflags in
16585 (no)
16586         case $cf_add_cflags in
16587         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16588                 case $cf_add_cflags in
16589                 (-D*)
16590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16591
16592                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16593                                 && test -z "${cf_tst_cflags}" \
16594                                 && cf_fix_cppflags=yes
16595
16596                         if test $cf_fix_cppflags = yes ; then
16597
16598         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16599         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16600
16601                                 continue
16602                         elif test "${cf_tst_cflags}" = "\"'" ; then
16603
16604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16606
16607                                 continue
16608                         fi
16609                         ;;
16610                 esac
16611                 case "$CPPFLAGS" in
16612                 (*$cf_add_cflags)
16613                         ;;
16614                 (*)
16615                         case $cf_add_cflags in
16616                         (-D*)
16617                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16618
16619 CPPFLAGS=`echo "$CPPFLAGS" | \
16620         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16621                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16622
16623                                 ;;
16624                         esac
16625
16626         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16627         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16628
16629                         ;;
16630                 esac
16631                 ;;
16632         (*)
16633
16634         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16635         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16636
16637                 ;;
16638         esac
16639         ;;
16640 (yes)
16641
16642         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16643         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16644
16645         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16646
16647         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16648                 && test -z "${cf_tst_cflags}" \
16649                 && cf_fix_cppflags=no
16650         ;;
16651 esac
16652 done
16653
16654 if test -n "$cf_new_cflags" ; then
16655
16656         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16657         CFLAGS="${CFLAGS}$cf_new_cflags"
16658
16659 fi
16660
16661 if test -n "$cf_new_cppflags" ; then
16662
16663         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16664         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16665
16666 fi
16667
16668 if test -n "$cf_new_extra_cppflags" ; then
16669
16670         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16671         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16672
16673 fi
16674
16675                 ;;
16676         esac
16677         ;;
16678 esac
16679
16680 if test "$with_dbmalloc" = yes ; then
16681         echo "$as_me:16681: checking for dbmalloc.h" >&5
16682 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16683 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16684   echo $ECHO_N "(cached) $ECHO_C" >&6
16685 else
16686   cat >conftest.$ac_ext <<_ACEOF
16687 #line 16687 "configure"
16688 #include "confdefs.h"
16689 #include <dbmalloc.h>
16690 _ACEOF
16691 if { (eval echo "$as_me:16691: \"$ac_cpp conftest.$ac_ext\"") >&5
16692   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16693   ac_status=$?
16694   egrep -v '^ *\+' conftest.er1 >conftest.err
16695   rm -f conftest.er1
16696   cat conftest.err >&5
16697   echo "$as_me:16697: \$? = $ac_status" >&5
16698   (exit $ac_status); } >/dev/null; then
16699   if test -s conftest.err; then
16700     ac_cpp_err=$ac_c_preproc_warn_flag
16701   else
16702     ac_cpp_err=
16703   fi
16704 else
16705   ac_cpp_err=yes
16706 fi
16707 if test -z "$ac_cpp_err"; then
16708   ac_cv_header_dbmalloc_h=yes
16709 else
16710   echo "$as_me: failed program was:" >&5
16711   cat conftest.$ac_ext >&5
16712   ac_cv_header_dbmalloc_h=no
16713 fi
16714 rm -f conftest.err conftest.$ac_ext
16715 fi
16716 echo "$as_me:16716: result: $ac_cv_header_dbmalloc_h" >&5
16717 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16718 if test $ac_cv_header_dbmalloc_h = yes; then
16719
16720 echo "$as_me:16720: checking for debug_malloc in -ldbmalloc" >&5
16721 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16722 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16723   echo $ECHO_N "(cached) $ECHO_C" >&6
16724 else
16725   ac_check_lib_save_LIBS=$LIBS
16726 LIBS="-ldbmalloc  $LIBS"
16727 cat >conftest.$ac_ext <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16730
16731 /* Override any gcc2 internal prototype to avoid an error.  */
16732 #ifdef __cplusplus
16733 extern "C"
16734 #endif
16735 /* We use char because int might match the return type of a gcc2
16736    builtin and then its argument prototype would still apply.  */
16737 char debug_malloc ();
16738 int
16739 main (void)
16740 {
16741 debug_malloc ();
16742   ;
16743   return 0;
16744 }
16745 _ACEOF
16746 rm -f conftest.$ac_objext conftest$ac_exeext
16747 if { (eval echo "$as_me:16747: \"$ac_link\"") >&5
16748   (eval $ac_link) 2>&5
16749   ac_status=$?
16750   echo "$as_me:16750: \$? = $ac_status" >&5
16751   (exit $ac_status); } &&
16752          { ac_try='test -s conftest$ac_exeext'
16753   { (eval echo "$as_me:16753: \"$ac_try\"") >&5
16754   (eval $ac_try) 2>&5
16755   ac_status=$?
16756   echo "$as_me:16756: \$? = $ac_status" >&5
16757   (exit $ac_status); }; }; then
16758   ac_cv_lib_dbmalloc_debug_malloc=yes
16759 else
16760   echo "$as_me: failed program was:" >&5
16761 cat conftest.$ac_ext >&5
16762 ac_cv_lib_dbmalloc_debug_malloc=no
16763 fi
16764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16765 LIBS=$ac_check_lib_save_LIBS
16766 fi
16767 echo "$as_me:16767: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16768 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16769 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16770   cat >>confdefs.h <<EOF
16771 #define HAVE_LIBDBMALLOC 1
16772 EOF
16773
16774   LIBS="-ldbmalloc $LIBS"
16775
16776 fi
16777
16778 fi
16779
16780 fi
16781
16782 echo "$as_me:16782: checking if you want to use valgrind for testing" >&5
16783 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16784
16785 # Check whether --with-valgrind or --without-valgrind was given.
16786 if test "${with_valgrind+set}" = set; then
16787   withval="$with_valgrind"
16788
16789 cat >>confdefs.h <<EOF
16790 #define USE_VALGRIND 1
16791 EOF
16792
16793         : ${with_cflags:=-g}
16794         : ${with_no_leaks:=yes}
16795          with_valgrind=yes
16796 else
16797   with_valgrind=
16798 fi;
16799 echo "$as_me:16799: result: ${with_valgrind:-no}" >&5
16800 echo "${ECHO_T}${with_valgrind:-no}" >&6
16801
16802 case .$with_cflags in
16803 (.*-g*)
16804         case .$CFLAGS in
16805         (.*-g*)
16806                 ;;
16807         (*)
16808
16809 cf_fix_cppflags=no
16810 cf_new_cflags=
16811 cf_new_cppflags=
16812 cf_new_extra_cppflags=
16813
16814 for cf_add_cflags in -g
16815 do
16816 case $cf_fix_cppflags in
16817 (no)
16818         case $cf_add_cflags in
16819         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16820                 case $cf_add_cflags in
16821                 (-D*)
16822                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16823
16824                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16825                                 && test -z "${cf_tst_cflags}" \
16826                                 && cf_fix_cppflags=yes
16827
16828                         if test $cf_fix_cppflags = yes ; then
16829
16830         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16831         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16832
16833                                 continue
16834                         elif test "${cf_tst_cflags}" = "\"'" ; then
16835
16836         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16837         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16838
16839                                 continue
16840                         fi
16841                         ;;
16842                 esac
16843                 case "$CPPFLAGS" in
16844                 (*$cf_add_cflags)
16845                         ;;
16846                 (*)
16847                         case $cf_add_cflags in
16848                         (-D*)
16849                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16850
16851 CPPFLAGS=`echo "$CPPFLAGS" | \
16852         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16853                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16854
16855                                 ;;
16856                         esac
16857
16858         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16859         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16860
16861                         ;;
16862                 esac
16863                 ;;
16864         (*)
16865
16866         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16867         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16868
16869                 ;;
16870         esac
16871         ;;
16872 (yes)
16873
16874         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16875         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16876
16877         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16878
16879         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16880                 && test -z "${cf_tst_cflags}" \
16881                 && cf_fix_cppflags=no
16882         ;;
16883 esac
16884 done
16885
16886 if test -n "$cf_new_cflags" ; then
16887
16888         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16889         CFLAGS="${CFLAGS}$cf_new_cflags"
16890
16891 fi
16892
16893 if test -n "$cf_new_cppflags" ; then
16894
16895         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16896         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16897
16898 fi
16899
16900 if test -n "$cf_new_extra_cppflags" ; then
16901
16902         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16903         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16904
16905 fi
16906
16907                 ;;
16908         esac
16909         ;;
16910 esac
16911
16912 echo "$as_me:16912: checking if you want to perform memory-leak testing" >&5
16913 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16914
16915 # Check whether --enable-leaks or --disable-leaks was given.
16916 if test "${enable_leaks+set}" = set; then
16917   enableval="$enable_leaks"
16918   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16919 else
16920   : ${with_no_leaks:=no}
16921 fi;
16922 echo "$as_me:16922: result: $with_no_leaks" >&5
16923 echo "${ECHO_T}$with_no_leaks" >&6
16924
16925 if test "$with_no_leaks" = yes ; then
16926
16927 cat >>confdefs.h <<\EOF
16928 #define NO_LEAKS 1
16929 EOF
16930
16931 cat >>confdefs.h <<\EOF
16932 #define YY_NO_LEAKS 1
16933 EOF
16934
16935 fi
16936
16937 cat >>confdefs.h <<\EOF
16938 #define HAVE_NC_ALLOC_H 1
16939 EOF
16940
16941 ###     use option --enable-expanded to generate certain macros as functions
16942
16943 # Check whether --enable-expanded or --disable-expanded was given.
16944 if test "${enable_expanded+set}" = set; then
16945   enableval="$enable_expanded"
16946   test "x$enableval" = xyes &&
16947 cat >>confdefs.h <<\EOF
16948 #define NCURSES_EXPANDED 1
16949 EOF
16950
16951 fi;
16952
16953 ###     use option --disable-macros to suppress macros in favor of functions
16954
16955 # Check whether --enable-macros or --disable-macros was given.
16956 if test "${enable_macros+set}" = set; then
16957   enableval="$enable_macros"
16958   test "$enableval" = no &&
16959 cat >>confdefs.h <<\EOF
16960 #define NCURSES_NOMACROS 1
16961 EOF
16962
16963 fi;
16964
16965 # Normally we only add trace() to the debug-library.  Allow this to be
16966 # extended to all models of the ncurses library:
16967 cf_all_traces=no
16968 case "$CFLAGS $CPPFLAGS" in
16969 (*-DTRACE*)
16970         cf_all_traces=yes
16971         ;;
16972 esac
16973
16974 echo "$as_me:16974: checking whether to add trace feature to all models" >&5
16975 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16976
16977 # Check whether --with-trace or --without-trace was given.
16978 if test "${with_trace+set}" = set; then
16979   withval="$with_trace"
16980   cf_with_trace=$withval
16981 else
16982   cf_with_trace=$cf_all_traces
16983 fi;
16984 echo "$as_me:16984: result: $cf_with_trace" >&5
16985 echo "${ECHO_T}$cf_with_trace" >&6
16986
16987 if test "x$cf_with_trace" = xyes ; then
16988         LIB_TRACING=all
16989         ADA_TRACE=TRUE
16990
16991 cf_fix_cppflags=no
16992 cf_new_cflags=
16993 cf_new_cppflags=
16994 cf_new_extra_cppflags=
16995
16996 for cf_add_cflags in -DTRACE
16997 do
16998 case $cf_fix_cppflags in
16999 (no)
17000         case $cf_add_cflags in
17001         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17002                 case $cf_add_cflags in
17003                 (-D*)
17004                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17005
17006                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17007                                 && test -z "${cf_tst_cflags}" \
17008                                 && cf_fix_cppflags=yes
17009
17010                         if test $cf_fix_cppflags = yes ; then
17011
17012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17014
17015                                 continue
17016                         elif test "${cf_tst_cflags}" = "\"'" ; then
17017
17018         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17019         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17020
17021                                 continue
17022                         fi
17023                         ;;
17024                 esac
17025                 case "$CPPFLAGS" in
17026                 (*$cf_add_cflags)
17027                         ;;
17028                 (*)
17029                         case $cf_add_cflags in
17030                         (-D*)
17031                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17032
17033 CPPFLAGS=`echo "$CPPFLAGS" | \
17034         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17035                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17036
17037                                 ;;
17038                         esac
17039
17040         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17041         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17042
17043                         ;;
17044                 esac
17045                 ;;
17046         (*)
17047
17048         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17049         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17050
17051                 ;;
17052         esac
17053         ;;
17054 (yes)
17055
17056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17058
17059         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17060
17061         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17062                 && test -z "${cf_tst_cflags}" \
17063                 && cf_fix_cppflags=no
17064         ;;
17065 esac
17066 done
17067
17068 if test -n "$cf_new_cflags" ; then
17069
17070         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17071         CFLAGS="${CFLAGS}$cf_new_cflags"
17072
17073 fi
17074
17075 if test -n "$cf_new_cppflags" ; then
17076
17077         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17078         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17079
17080 fi
17081
17082 if test -n "$cf_new_extra_cppflags" ; then
17083
17084         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17085         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17086
17087 fi
17088
17089 cat >>confdefs.h <<\EOF
17090 #define HAVE__TRACEF 1
17091 EOF
17092
17093 else
17094         LIB_TRACING=DEBUG
17095         ADA_TRACE=FALSE
17096 fi
17097
17098 echo "$as_me:17098: checking if we want to use GNAT projects" >&5
17099 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17100
17101 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17102 if test "${enable_gnat_projects+set}" = set; then
17103   enableval="$enable_gnat_projects"
17104   test "$enableval" != no && enableval=yes
17105         if test "$enableval" != "yes" ; then
17106     enable_gnat_projects=no
17107         else
17108                 enable_gnat_projects=yes
17109         fi
17110 else
17111   enableval=yes
17112         enable_gnat_projects=yes
17113
17114 fi;
17115 echo "$as_me:17115: result: $enable_gnat_projects" >&5
17116 echo "${ECHO_T}$enable_gnat_projects" >&6
17117
17118 ###     Checks for libraries.
17119 case $cf_cv_system_name in
17120 (*mingw32*|*mingw64*)
17121         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17122         LIBS=" -lpsapi $LIBS"
17123         ;;
17124 (*)
17125 echo "$as_me:17125: checking for gettimeofday" >&5
17126 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17127 if test "${ac_cv_func_gettimeofday+set}" = set; then
17128   echo $ECHO_N "(cached) $ECHO_C" >&6
17129 else
17130   cat >conftest.$ac_ext <<_ACEOF
17131 #line 17131 "configure"
17132 #include "confdefs.h"
17133 #define gettimeofday autoconf_temporary
17134 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17135 #undef gettimeofday
17136
17137 #ifdef __cplusplus
17138 extern "C"
17139 #endif
17140
17141 /* We use char because int might match the return type of a gcc2
17142    builtin and then its argument prototype would still apply.  */
17143 char gettimeofday (void);
17144
17145 int
17146 main (void)
17147 {
17148
17149 /* The GNU C library defines stubs for functions which it implements
17150     to always fail with ENOSYS.  Some functions are actually named
17151     something starting with __ and the normal name is an alias.  */
17152 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17153 #error found stub for gettimeofday
17154 #endif
17155
17156         return gettimeofday ();
17157   ;
17158   return 0;
17159 }
17160 _ACEOF
17161 rm -f conftest.$ac_objext conftest$ac_exeext
17162 if { (eval echo "$as_me:17162: \"$ac_link\"") >&5
17163   (eval $ac_link) 2>&5
17164   ac_status=$?
17165   echo "$as_me:17165: \$? = $ac_status" >&5
17166   (exit $ac_status); } &&
17167          { ac_try='test -s conftest$ac_exeext'
17168   { (eval echo "$as_me:17168: \"$ac_try\"") >&5
17169   (eval $ac_try) 2>&5
17170   ac_status=$?
17171   echo "$as_me:17171: \$? = $ac_status" >&5
17172   (exit $ac_status); }; }; then
17173   ac_cv_func_gettimeofday=yes
17174 else
17175   echo "$as_me: failed program was:" >&5
17176 cat conftest.$ac_ext >&5
17177 ac_cv_func_gettimeofday=no
17178 fi
17179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17180 fi
17181 echo "$as_me:17181: result: $ac_cv_func_gettimeofday" >&5
17182 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17183 if test $ac_cv_func_gettimeofday = yes; then
17184
17185 cat >>confdefs.h <<\EOF
17186 #define HAVE_GETTIMEOFDAY 1
17187 EOF
17188
17189 else
17190
17191 echo "$as_me:17191: checking for gettimeofday in -lbsd" >&5
17192 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17193 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17194   echo $ECHO_N "(cached) $ECHO_C" >&6
17195 else
17196   ac_check_lib_save_LIBS=$LIBS
17197 LIBS="-lbsd  $LIBS"
17198 cat >conftest.$ac_ext <<_ACEOF
17199 #line 17199 "configure"
17200 #include "confdefs.h"
17201
17202 /* Override any gcc2 internal prototype to avoid an error.  */
17203 #ifdef __cplusplus
17204 extern "C"
17205 #endif
17206 /* We use char because int might match the return type of a gcc2
17207    builtin and then its argument prototype would still apply.  */
17208 char gettimeofday ();
17209 int
17210 main (void)
17211 {
17212 gettimeofday ();
17213   ;
17214   return 0;
17215 }
17216 _ACEOF
17217 rm -f conftest.$ac_objext conftest$ac_exeext
17218 if { (eval echo "$as_me:17218: \"$ac_link\"") >&5
17219   (eval $ac_link) 2>&5
17220   ac_status=$?
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); } &&
17223          { ac_try='test -s conftest$ac_exeext'
17224   { (eval echo "$as_me:17224: \"$ac_try\"") >&5
17225   (eval $ac_try) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); }; }; then
17229   ac_cv_lib_bsd_gettimeofday=yes
17230 else
17231   echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 ac_cv_lib_bsd_gettimeofday=no
17234 fi
17235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17236 LIBS=$ac_check_lib_save_LIBS
17237 fi
17238 echo "$as_me:17238: result: $ac_cv_lib_bsd_gettimeofday" >&5
17239 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17240 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17241
17242 cat >>confdefs.h <<\EOF
17243 #define HAVE_GETTIMEOFDAY 1
17244 EOF
17245
17246 cf_add_libs="-lbsd"
17247 # Filter out duplicates - this happens with badly-designed ".pc" files...
17248 for cf_add_1lib in $LIBS
17249 do
17250         for cf_add_2lib in $cf_add_libs
17251         do
17252                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17253                 then
17254                         cf_add_1lib=
17255                         break
17256                 fi
17257         done
17258         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17259 done
17260 LIBS="$cf_add_libs"
17261
17262 fi
17263
17264 fi
17265         ;;
17266 esac
17267
17268 echo "$as_me:17268: checking if -lm needed for math functions" >&5
17269 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17270 if test "${cf_cv_need_libm+set}" = set; then
17271   echo $ECHO_N "(cached) $ECHO_C" >&6
17272 else
17273
17274         cat >conftest.$ac_ext <<_ACEOF
17275 #line 17275 "configure"
17276 #include "confdefs.h"
17277
17278         #include <stdio.h>
17279         #include <stdlib.h>
17280         #include <math.h>
17281
17282 int
17283 main (void)
17284 {
17285 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17286   ;
17287   return 0;
17288 }
17289 _ACEOF
17290 rm -f conftest.$ac_objext conftest$ac_exeext
17291 if { (eval echo "$as_me:17291: \"$ac_link\"") >&5
17292   (eval $ac_link) 2>&5
17293   ac_status=$?
17294   echo "$as_me:17294: \$? = $ac_status" >&5
17295   (exit $ac_status); } &&
17296          { ac_try='test -s conftest$ac_exeext'
17297   { (eval echo "$as_me:17297: \"$ac_try\"") >&5
17298   (eval $ac_try) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); }; }; then
17302   cf_cv_need_libm=no
17303 else
17304   echo "$as_me: failed program was:" >&5
17305 cat conftest.$ac_ext >&5
17306 cf_cv_need_libm=yes
17307 fi
17308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17309 fi
17310 echo "$as_me:17310: result: $cf_cv_need_libm" >&5
17311 echo "${ECHO_T}$cf_cv_need_libm" >&6
17312 if test "$cf_cv_need_libm" = yes
17313 then
17314 MATH_LIB=-lm
17315 fi
17316
17317 ###     Checks for header files.
17318 echo "$as_me:17318: checking for ANSI C header files" >&5
17319 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17320 if test "${ac_cv_header_stdc+set}" = set; then
17321   echo $ECHO_N "(cached) $ECHO_C" >&6
17322 else
17323   cat >conftest.$ac_ext <<_ACEOF
17324 #line 17324 "configure"
17325 #include "confdefs.h"
17326 #include <stdlib.h>
17327 #include <stdarg.h>
17328 #include <string.h>
17329 #include <float.h>
17330
17331 _ACEOF
17332 if { (eval echo "$as_me:17332: \"$ac_cpp conftest.$ac_ext\"") >&5
17333   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17334   ac_status=$?
17335   egrep -v '^ *\+' conftest.er1 >conftest.err
17336   rm -f conftest.er1
17337   cat conftest.err >&5
17338   echo "$as_me:17338: \$? = $ac_status" >&5
17339   (exit $ac_status); } >/dev/null; then
17340   if test -s conftest.err; then
17341     ac_cpp_err=$ac_c_preproc_warn_flag
17342   else
17343     ac_cpp_err=
17344   fi
17345 else
17346   ac_cpp_err=yes
17347 fi
17348 if test -z "$ac_cpp_err"; then
17349   ac_cv_header_stdc=yes
17350 else
17351   echo "$as_me: failed program was:" >&5
17352   cat conftest.$ac_ext >&5
17353   ac_cv_header_stdc=no
17354 fi
17355 rm -f conftest.err conftest.$ac_ext
17356
17357 if test $ac_cv_header_stdc = yes; then
17358   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17359   cat >conftest.$ac_ext <<_ACEOF
17360 #line 17360 "configure"
17361 #include "confdefs.h"
17362 #include <string.h>
17363
17364 _ACEOF
17365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17366   egrep "memchr" >/dev/null 2>&1; then
17367   :
17368 else
17369   ac_cv_header_stdc=no
17370 fi
17371 rm -rf conftest*
17372
17373 fi
17374
17375 if test $ac_cv_header_stdc = yes; then
17376   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17377   cat >conftest.$ac_ext <<_ACEOF
17378 #line 17378 "configure"
17379 #include "confdefs.h"
17380 #include <stdlib.h>
17381
17382 _ACEOF
17383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17384   egrep "free" >/dev/null 2>&1; then
17385   :
17386 else
17387   ac_cv_header_stdc=no
17388 fi
17389 rm -rf conftest*
17390
17391 fi
17392
17393 if test $ac_cv_header_stdc = yes; then
17394   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17395   if test "$cross_compiling" = yes; then
17396   :
17397 else
17398   cat >conftest.$ac_ext <<_ACEOF
17399 #line 17399 "configure"
17400 #include "confdefs.h"
17401 #include <ctype.h>
17402 #if ((' ' & 0x0FF) == 0x020)
17403 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17404 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17405 #else
17406 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17407                      || ('j' <= (c) && (c) <= 'r') \
17408                      || ('s' <= (c) && (c) <= 'z'))
17409 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17410 #endif
17411
17412 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17413 int
17414 main (void)
17415 {
17416   int i;
17417   for (i = 0; i < 256; i++)
17418     if (XOR (islower (i), ISLOWER (i))
17419         || toupper (i) != TOUPPER (i))
17420       $ac_main_return(2);
17421   $ac_main_return (0);
17422 }
17423 _ACEOF
17424 rm -f conftest$ac_exeext
17425 if { (eval echo "$as_me:17425: \"$ac_link\"") >&5
17426   (eval $ac_link) 2>&5
17427   ac_status=$?
17428   echo "$as_me:17428: \$? = $ac_status" >&5
17429   (exit $ac_status); } && { ac_try='./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   :
17436 else
17437   echo "$as_me: program exited with status $ac_status" >&5
17438 echo "$as_me: failed program was:" >&5
17439 cat conftest.$ac_ext >&5
17440 ac_cv_header_stdc=no
17441 fi
17442 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17443 fi
17444 fi
17445 fi
17446 echo "$as_me:17446: result: $ac_cv_header_stdc" >&5
17447 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17448 if test $ac_cv_header_stdc = yes; then
17449
17450 cat >>confdefs.h <<\EOF
17451 #define STDC_HEADERS 1
17452 EOF
17453
17454 fi
17455
17456 ac_header_dirent=no
17457 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17458   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17459 echo "$as_me:17459: checking for $ac_hdr that defines DIR" >&5
17460 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17461 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17462   echo $ECHO_N "(cached) $ECHO_C" >&6
17463 else
17464   cat >conftest.$ac_ext <<_ACEOF
17465 #line 17465 "configure"
17466 #include "confdefs.h"
17467 #include <sys/types.h>
17468 #include <$ac_hdr>
17469
17470 int
17471 main (void)
17472 {
17473 if ((DIR *) 0)
17474 return 0;
17475   ;
17476   return 0;
17477 }
17478 _ACEOF
17479 rm -f conftest.$ac_objext
17480 if { (eval echo "$as_me:17480: \"$ac_compile\"") >&5
17481   (eval $ac_compile) 2>&5
17482   ac_status=$?
17483   echo "$as_me:17483: \$? = $ac_status" >&5
17484   (exit $ac_status); } &&
17485          { ac_try='test -s conftest.$ac_objext'
17486   { (eval echo "$as_me:17486: \"$ac_try\"") >&5
17487   (eval $ac_try) 2>&5
17488   ac_status=$?
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit $ac_status); }; }; then
17491   eval "$as_ac_Header=yes"
17492 else
17493   echo "$as_me: failed program was:" >&5
17494 cat conftest.$ac_ext >&5
17495 eval "$as_ac_Header=no"
17496 fi
17497 rm -f conftest.$ac_objext conftest.$ac_ext
17498 fi
17499 echo "$as_me:17499: result: `eval echo '${'$as_ac_Header'}'`" >&5
17500 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17501 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17502   cat >>confdefs.h <<EOF
17503 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17504 EOF
17505
17506 ac_header_dirent=$ac_hdr; break
17507 fi
17508
17509 done
17510 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17511 if test $ac_header_dirent = dirent.h; then
17512   echo "$as_me:17512: checking for opendir in -ldir" >&5
17513 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17514 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17515   echo $ECHO_N "(cached) $ECHO_C" >&6
17516 else
17517   ac_check_lib_save_LIBS=$LIBS
17518 LIBS="-ldir  $LIBS"
17519 cat >conftest.$ac_ext <<_ACEOF
17520 #line 17520 "configure"
17521 #include "confdefs.h"
17522
17523 /* Override any gcc2 internal prototype to avoid an error.  */
17524 #ifdef __cplusplus
17525 extern "C"
17526 #endif
17527 /* We use char because int might match the return type of a gcc2
17528    builtin and then its argument prototype would still apply.  */
17529 char opendir ();
17530 int
17531 main (void)
17532 {
17533 opendir ();
17534   ;
17535   return 0;
17536 }
17537 _ACEOF
17538 rm -f conftest.$ac_objext conftest$ac_exeext
17539 if { (eval echo "$as_me:17539: \"$ac_link\"") >&5
17540   (eval $ac_link) 2>&5
17541   ac_status=$?
17542   echo "$as_me:17542: \$? = $ac_status" >&5
17543   (exit $ac_status); } &&
17544          { ac_try='test -s conftest$ac_exeext'
17545   { (eval echo "$as_me:17545: \"$ac_try\"") >&5
17546   (eval $ac_try) 2>&5
17547   ac_status=$?
17548   echo "$as_me:17548: \$? = $ac_status" >&5
17549   (exit $ac_status); }; }; then
17550   ac_cv_lib_dir_opendir=yes
17551 else
17552   echo "$as_me: failed program was:" >&5
17553 cat conftest.$ac_ext >&5
17554 ac_cv_lib_dir_opendir=no
17555 fi
17556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17557 LIBS=$ac_check_lib_save_LIBS
17558 fi
17559 echo "$as_me:17559: result: $ac_cv_lib_dir_opendir" >&5
17560 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17561 if test $ac_cv_lib_dir_opendir = yes; then
17562   LIBS="$LIBS -ldir"
17563 fi
17564
17565 else
17566   echo "$as_me:17566: checking for opendir in -lx" >&5
17567 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17568 if test "${ac_cv_lib_x_opendir+set}" = set; then
17569   echo $ECHO_N "(cached) $ECHO_C" >&6
17570 else
17571   ac_check_lib_save_LIBS=$LIBS
17572 LIBS="-lx  $LIBS"
17573 cat >conftest.$ac_ext <<_ACEOF
17574 #line 17574 "configure"
17575 #include "confdefs.h"
17576
17577 /* Override any gcc2 internal prototype to avoid an error.  */
17578 #ifdef __cplusplus
17579 extern "C"
17580 #endif
17581 /* We use char because int might match the return type of a gcc2
17582    builtin and then its argument prototype would still apply.  */
17583 char opendir ();
17584 int
17585 main (void)
17586 {
17587 opendir ();
17588   ;
17589   return 0;
17590 }
17591 _ACEOF
17592 rm -f conftest.$ac_objext conftest$ac_exeext
17593 if { (eval echo "$as_me:17593: \"$ac_link\"") >&5
17594   (eval $ac_link) 2>&5
17595   ac_status=$?
17596   echo "$as_me:17596: \$? = $ac_status" >&5
17597   (exit $ac_status); } &&
17598          { ac_try='test -s conftest$ac_exeext'
17599   { (eval echo "$as_me:17599: \"$ac_try\"") >&5
17600   (eval $ac_try) 2>&5
17601   ac_status=$?
17602   echo "$as_me:17602: \$? = $ac_status" >&5
17603   (exit $ac_status); }; }; then
17604   ac_cv_lib_x_opendir=yes
17605 else
17606   echo "$as_me: failed program was:" >&5
17607 cat conftest.$ac_ext >&5
17608 ac_cv_lib_x_opendir=no
17609 fi
17610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17611 LIBS=$ac_check_lib_save_LIBS
17612 fi
17613 echo "$as_me:17613: result: $ac_cv_lib_x_opendir" >&5
17614 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17615 if test $ac_cv_lib_x_opendir = yes; then
17616   LIBS="$LIBS -lx"
17617 fi
17618
17619 fi
17620
17621 echo "$as_me:17621: checking whether time.h and sys/time.h may both be included" >&5
17622 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17623 if test "${ac_cv_header_time+set}" = set; then
17624   echo $ECHO_N "(cached) $ECHO_C" >&6
17625 else
17626   cat >conftest.$ac_ext <<_ACEOF
17627 #line 17627 "configure"
17628 #include "confdefs.h"
17629 #include <sys/types.h>
17630 #include <sys/time.h>
17631 #include <time.h>
17632
17633 int
17634 main (void)
17635 {
17636 if ((struct tm *) 0)
17637 return 0;
17638   ;
17639   return 0;
17640 }
17641 _ACEOF
17642 rm -f conftest.$ac_objext
17643 if { (eval echo "$as_me:17643: \"$ac_compile\"") >&5
17644   (eval $ac_compile) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); } &&
17648          { ac_try='test -s conftest.$ac_objext'
17649   { (eval echo "$as_me:17649: \"$ac_try\"") >&5
17650   (eval $ac_try) 2>&5
17651   ac_status=$?
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit $ac_status); }; }; then
17654   ac_cv_header_time=yes
17655 else
17656   echo "$as_me: failed program was:" >&5
17657 cat conftest.$ac_ext >&5
17658 ac_cv_header_time=no
17659 fi
17660 rm -f conftest.$ac_objext conftest.$ac_ext
17661 fi
17662 echo "$as_me:17662: result: $ac_cv_header_time" >&5
17663 echo "${ECHO_T}$ac_cv_header_time" >&6
17664 if test $ac_cv_header_time = yes; then
17665
17666 cat >>confdefs.h <<\EOF
17667 #define TIME_WITH_SYS_TIME 1
17668 EOF
17669
17670 fi
17671
17672 cf_regex_func=no
17673
17674 cf_regex_libs="regex re"
17675 case $host_os in
17676 (mingw*)
17677         cf_regex_libs="gnurx $cf_regex_libs"
17678         ;;
17679 esac
17680
17681 echo "$as_me:17681: checking for regcomp" >&5
17682 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17683 if test "${ac_cv_func_regcomp+set}" = set; then
17684   echo $ECHO_N "(cached) $ECHO_C" >&6
17685 else
17686   cat >conftest.$ac_ext <<_ACEOF
17687 #line 17687 "configure"
17688 #include "confdefs.h"
17689 #define regcomp autoconf_temporary
17690 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17691 #undef regcomp
17692
17693 #ifdef __cplusplus
17694 extern "C"
17695 #endif
17696
17697 /* We use char because int might match the return type of a gcc2
17698    builtin and then its argument prototype would still apply.  */
17699 char regcomp (void);
17700
17701 int
17702 main (void)
17703 {
17704
17705 /* The GNU C library defines stubs for functions which it implements
17706     to always fail with ENOSYS.  Some functions are actually named
17707     something starting with __ and the normal name is an alias.  */
17708 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17709 #error found stub for regcomp
17710 #endif
17711
17712         return regcomp ();
17713   ;
17714   return 0;
17715 }
17716 _ACEOF
17717 rm -f conftest.$ac_objext conftest$ac_exeext
17718 if { (eval echo "$as_me:17718: \"$ac_link\"") >&5
17719   (eval $ac_link) 2>&5
17720   ac_status=$?
17721   echo "$as_me:17721: \$? = $ac_status" >&5
17722   (exit $ac_status); } &&
17723          { ac_try='test -s conftest$ac_exeext'
17724   { (eval echo "$as_me:17724: \"$ac_try\"") >&5
17725   (eval $ac_try) 2>&5
17726   ac_status=$?
17727   echo "$as_me:17727: \$? = $ac_status" >&5
17728   (exit $ac_status); }; }; then
17729   ac_cv_func_regcomp=yes
17730 else
17731   echo "$as_me: failed program was:" >&5
17732 cat conftest.$ac_ext >&5
17733 ac_cv_func_regcomp=no
17734 fi
17735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17736 fi
17737 echo "$as_me:17737: result: $ac_cv_func_regcomp" >&5
17738 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17739 if test $ac_cv_func_regcomp = yes; then
17740   cf_regex_func=regcomp
17741 else
17742
17743         for cf_regex_lib in $cf_regex_libs
17744         do
17745                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17746 echo "$as_me:17746: checking for regcomp in -l$cf_regex_lib" >&5
17747 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17748 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17749   echo $ECHO_N "(cached) $ECHO_C" >&6
17750 else
17751   ac_check_lib_save_LIBS=$LIBS
17752 LIBS="-l$cf_regex_lib  $LIBS"
17753 cat >conftest.$ac_ext <<_ACEOF
17754 #line 17754 "configure"
17755 #include "confdefs.h"
17756
17757 /* Override any gcc2 internal prototype to avoid an error.  */
17758 #ifdef __cplusplus
17759 extern "C"
17760 #endif
17761 /* We use char because int might match the return type of a gcc2
17762    builtin and then its argument prototype would still apply.  */
17763 char regcomp ();
17764 int
17765 main (void)
17766 {
17767 regcomp ();
17768   ;
17769   return 0;
17770 }
17771 _ACEOF
17772 rm -f conftest.$ac_objext conftest$ac_exeext
17773 if { (eval echo "$as_me:17773: \"$ac_link\"") >&5
17774   (eval $ac_link) 2>&5
17775   ac_status=$?
17776   echo "$as_me:17776: \$? = $ac_status" >&5
17777   (exit $ac_status); } &&
17778          { ac_try='test -s conftest$ac_exeext'
17779   { (eval echo "$as_me:17779: \"$ac_try\"") >&5
17780   (eval $ac_try) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit $ac_status); }; }; then
17784   eval "$as_ac_Lib=yes"
17785 else
17786   echo "$as_me: failed program was:" >&5
17787 cat conftest.$ac_ext >&5
17788 eval "$as_ac_Lib=no"
17789 fi
17790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17791 LIBS=$ac_check_lib_save_LIBS
17792 fi
17793 echo "$as_me:17793: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17794 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17795 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17796
17797 cf_add_libs="-l$cf_regex_lib"
17798 # Filter out duplicates - this happens with badly-designed ".pc" files...
17799 for cf_add_1lib in $LIBS
17800 do
17801         for cf_add_2lib in $cf_add_libs
17802         do
17803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17804                 then
17805                         cf_add_1lib=
17806                         break
17807                 fi
17808         done
17809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17810 done
17811 LIBS="$cf_add_libs"
17812
17813                                 cf_regex_func=regcomp
17814                                 break
17815 fi
17816
17817         done
17818
17819 fi
17820
17821 if test "$cf_regex_func" = no ; then
17822         echo "$as_me:17822: checking for compile" >&5
17823 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17824 if test "${ac_cv_func_compile+set}" = set; then
17825   echo $ECHO_N "(cached) $ECHO_C" >&6
17826 else
17827   cat >conftest.$ac_ext <<_ACEOF
17828 #line 17828 "configure"
17829 #include "confdefs.h"
17830 #define compile autoconf_temporary
17831 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17832 #undef compile
17833
17834 #ifdef __cplusplus
17835 extern "C"
17836 #endif
17837
17838 /* We use char because int might match the return type of a gcc2
17839    builtin and then its argument prototype would still apply.  */
17840 char compile (void);
17841
17842 int
17843 main (void)
17844 {
17845
17846 /* The GNU C library defines stubs for functions which it implements
17847     to always fail with ENOSYS.  Some functions are actually named
17848     something starting with __ and the normal name is an alias.  */
17849 #if defined (__stub_compile) || defined (__stub___compile)
17850 #error found stub for compile
17851 #endif
17852
17853         return compile ();
17854   ;
17855   return 0;
17856 }
17857 _ACEOF
17858 rm -f conftest.$ac_objext conftest$ac_exeext
17859 if { (eval echo "$as_me:17859: \"$ac_link\"") >&5
17860   (eval $ac_link) 2>&5
17861   ac_status=$?
17862   echo "$as_me:17862: \$? = $ac_status" >&5
17863   (exit $ac_status); } &&
17864          { ac_try='test -s conftest$ac_exeext'
17865   { (eval echo "$as_me:17865: \"$ac_try\"") >&5
17866   (eval $ac_try) 2>&5
17867   ac_status=$?
17868   echo "$as_me:17868: \$? = $ac_status" >&5
17869   (exit $ac_status); }; }; then
17870   ac_cv_func_compile=yes
17871 else
17872   echo "$as_me: failed program was:" >&5
17873 cat conftest.$ac_ext >&5
17874 ac_cv_func_compile=no
17875 fi
17876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17877 fi
17878 echo "$as_me:17878: result: $ac_cv_func_compile" >&5
17879 echo "${ECHO_T}$ac_cv_func_compile" >&6
17880 if test $ac_cv_func_compile = yes; then
17881   cf_regex_func=compile
17882 else
17883
17884                 echo "$as_me:17884: checking for compile in -lgen" >&5
17885 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17886 if test "${ac_cv_lib_gen_compile+set}" = set; then
17887   echo $ECHO_N "(cached) $ECHO_C" >&6
17888 else
17889   ac_check_lib_save_LIBS=$LIBS
17890 LIBS="-lgen  $LIBS"
17891 cat >conftest.$ac_ext <<_ACEOF
17892 #line 17892 "configure"
17893 #include "confdefs.h"
17894
17895 /* Override any gcc2 internal prototype to avoid an error.  */
17896 #ifdef __cplusplus
17897 extern "C"
17898 #endif
17899 /* We use char because int might match the return type of a gcc2
17900    builtin and then its argument prototype would still apply.  */
17901 char compile ();
17902 int
17903 main (void)
17904 {
17905 compile ();
17906   ;
17907   return 0;
17908 }
17909 _ACEOF
17910 rm -f conftest.$ac_objext conftest$ac_exeext
17911 if { (eval echo "$as_me:17911: \"$ac_link\"") >&5
17912   (eval $ac_link) 2>&5
17913   ac_status=$?
17914   echo "$as_me:17914: \$? = $ac_status" >&5
17915   (exit $ac_status); } &&
17916          { ac_try='test -s conftest$ac_exeext'
17917   { (eval echo "$as_me:17917: \"$ac_try\"") >&5
17918   (eval $ac_try) 2>&5
17919   ac_status=$?
17920   echo "$as_me:17920: \$? = $ac_status" >&5
17921   (exit $ac_status); }; }; then
17922   ac_cv_lib_gen_compile=yes
17923 else
17924   echo "$as_me: failed program was:" >&5
17925 cat conftest.$ac_ext >&5
17926 ac_cv_lib_gen_compile=no
17927 fi
17928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17929 LIBS=$ac_check_lib_save_LIBS
17930 fi
17931 echo "$as_me:17931: result: $ac_cv_lib_gen_compile" >&5
17932 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17933 if test $ac_cv_lib_gen_compile = yes; then
17934
17935 cf_add_libs="-lgen"
17936 # Filter out duplicates - this happens with badly-designed ".pc" files...
17937 for cf_add_1lib in $LIBS
17938 do
17939         for cf_add_2lib in $cf_add_libs
17940         do
17941                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17942                 then
17943                         cf_add_1lib=
17944                         break
17945                 fi
17946         done
17947         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17948 done
17949 LIBS="$cf_add_libs"
17950
17951                                 cf_regex_func=compile
17952 fi
17953
17954 fi
17955
17956 fi
17957
17958 if test "$cf_regex_func" = no ; then
17959         { echo "$as_me:17959: WARNING: cannot find regular expression library" >&5
17960 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17961 fi
17962
17963 echo "$as_me:17963: checking for regular-expression headers" >&5
17964 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17965 if test "${cf_cv_regex_hdrs+set}" = set; then
17966   echo $ECHO_N "(cached) $ECHO_C" >&6
17967 else
17968
17969 cf_cv_regex_hdrs=no
17970 case $cf_regex_func in
17971 (compile)
17972         for cf_regex_hdr in regexp.h regexpr.h
17973         do
17974                 cat >conftest.$ac_ext <<_ACEOF
17975 #line 17975 "configure"
17976 #include "confdefs.h"
17977 #include <$cf_regex_hdr>
17978 int
17979 main (void)
17980 {
17981
17982                         char *p = compile("", "", "", 0);
17983                         int x = step("", "");
17984
17985   ;
17986   return 0;
17987 }
17988 _ACEOF
17989 rm -f conftest.$ac_objext conftest$ac_exeext
17990 if { (eval echo "$as_me:17990: \"$ac_link\"") >&5
17991   (eval $ac_link) 2>&5
17992   ac_status=$?
17993   echo "$as_me:17993: \$? = $ac_status" >&5
17994   (exit $ac_status); } &&
17995          { ac_try='test -s conftest$ac_exeext'
17996   { (eval echo "$as_me:17996: \"$ac_try\"") >&5
17997   (eval $ac_try) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); }; }; then
18001
18002                         cf_cv_regex_hdrs=$cf_regex_hdr
18003                         break
18004
18005 else
18006   echo "$as_me: failed program was:" >&5
18007 cat conftest.$ac_ext >&5
18008 fi
18009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18010         done
18011         ;;
18012 (*)
18013         for cf_regex_hdr in regex.h
18014         do
18015                 cat >conftest.$ac_ext <<_ACEOF
18016 #line 18016 "configure"
18017 #include "confdefs.h"
18018 #include <sys/types.h>
18019 #include <$cf_regex_hdr>
18020 int
18021 main (void)
18022 {
18023
18024                         regex_t *p;
18025                         int x = regcomp(p, "", 0);
18026                         int y = regexec(p, "", 0, 0, 0);
18027                         regfree(p);
18028
18029   ;
18030   return 0;
18031 }
18032 _ACEOF
18033 rm -f conftest.$ac_objext conftest$ac_exeext
18034 if { (eval echo "$as_me:18034: \"$ac_link\"") >&5
18035   (eval $ac_link) 2>&5
18036   ac_status=$?
18037   echo "$as_me:18037: \$? = $ac_status" >&5
18038   (exit $ac_status); } &&
18039          { ac_try='test -s conftest$ac_exeext'
18040   { (eval echo "$as_me:18040: \"$ac_try\"") >&5
18041   (eval $ac_try) 2>&5
18042   ac_status=$?
18043   echo "$as_me:18043: \$? = $ac_status" >&5
18044   (exit $ac_status); }; }; then
18045
18046                         cf_cv_regex_hdrs=$cf_regex_hdr
18047                         break
18048
18049 else
18050   echo "$as_me: failed program was:" >&5
18051 cat conftest.$ac_ext >&5
18052 fi
18053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18054         done
18055         ;;
18056 esac
18057
18058 fi
18059 echo "$as_me:18059: result: $cf_cv_regex_hdrs" >&5
18060 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18061
18062 case $cf_cv_regex_hdrs in
18063         (no)            { echo "$as_me:18063: WARNING: no regular expression header found" >&5
18064 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18065         (regex.h)
18066 cat >>confdefs.h <<\EOF
18067 #define HAVE_REGEX_H_FUNCS 1
18068 EOF
18069  ;;
18070         (regexp.h)
18071 cat >>confdefs.h <<\EOF
18072 #define HAVE_REGEXP_H_FUNCS 1
18073 EOF
18074  ;;
18075         (regexpr.h)
18076 cat >>confdefs.h <<\EOF
18077 #define HAVE_REGEXPR_H_FUNCS 1
18078 EOF
18079  ;;
18080 esac
18081
18082 for ac_header in \
18083 fcntl.h \
18084 getopt.h \
18085 limits.h \
18086 locale.h \
18087 math.h \
18088 poll.h \
18089 sys/bsdtypes.h \
18090 sys/ioctl.h \
18091 sys/param.h \
18092 sys/poll.h \
18093 sys/select.h \
18094 sys/time.h \
18095 sys/times.h \
18096 ttyent.h \
18097 unistd.h \
18098 wctype.h \
18099
18100 do
18101 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18102 echo "$as_me:18102: checking for $ac_header" >&5
18103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18105   echo $ECHO_N "(cached) $ECHO_C" >&6
18106 else
18107   cat >conftest.$ac_ext <<_ACEOF
18108 #line 18108 "configure"
18109 #include "confdefs.h"
18110 #include <$ac_header>
18111 _ACEOF
18112 if { (eval echo "$as_me:18112: \"$ac_cpp conftest.$ac_ext\"") >&5
18113   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18114   ac_status=$?
18115   egrep -v '^ *\+' conftest.er1 >conftest.err
18116   rm -f conftest.er1
18117   cat conftest.err >&5
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); } >/dev/null; then
18120   if test -s conftest.err; then
18121     ac_cpp_err=$ac_c_preproc_warn_flag
18122   else
18123     ac_cpp_err=
18124   fi
18125 else
18126   ac_cpp_err=yes
18127 fi
18128 if test -z "$ac_cpp_err"; then
18129   eval "$as_ac_Header=yes"
18130 else
18131   echo "$as_me: failed program was:" >&5
18132   cat conftest.$ac_ext >&5
18133   eval "$as_ac_Header=no"
18134 fi
18135 rm -f conftest.err conftest.$ac_ext
18136 fi
18137 echo "$as_me:18137: result: `eval echo '${'$as_ac_Header'}'`" >&5
18138 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18139 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18140   cat >>confdefs.h <<EOF
18141 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18142 EOF
18143
18144 fi
18145 done
18146
18147 for ac_header in unistd.h getopt.h
18148 do
18149 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18150 echo "$as_me:18150: checking for $ac_header" >&5
18151 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18152 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18153   echo $ECHO_N "(cached) $ECHO_C" >&6
18154 else
18155   cat >conftest.$ac_ext <<_ACEOF
18156 #line 18156 "configure"
18157 #include "confdefs.h"
18158 #include <$ac_header>
18159 _ACEOF
18160 if { (eval echo "$as_me:18160: \"$ac_cpp conftest.$ac_ext\"") >&5
18161   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18162   ac_status=$?
18163   egrep -v '^ *\+' conftest.er1 >conftest.err
18164   rm -f conftest.er1
18165   cat conftest.err >&5
18166   echo "$as_me:18166: \$? = $ac_status" >&5
18167   (exit $ac_status); } >/dev/null; then
18168   if test -s conftest.err; then
18169     ac_cpp_err=$ac_c_preproc_warn_flag
18170   else
18171     ac_cpp_err=
18172   fi
18173 else
18174   ac_cpp_err=yes
18175 fi
18176 if test -z "$ac_cpp_err"; then
18177   eval "$as_ac_Header=yes"
18178 else
18179   echo "$as_me: failed program was:" >&5
18180   cat conftest.$ac_ext >&5
18181   eval "$as_ac_Header=no"
18182 fi
18183 rm -f conftest.err conftest.$ac_ext
18184 fi
18185 echo "$as_me:18185: result: `eval echo '${'$as_ac_Header'}'`" >&5
18186 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18187 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18188   cat >>confdefs.h <<EOF
18189 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18190 EOF
18191
18192 fi
18193 done
18194
18195 echo "$as_me:18195: checking for header declaring getopt variables" >&5
18196 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18197 if test "${cf_cv_getopt_header+set}" = set; then
18198   echo $ECHO_N "(cached) $ECHO_C" >&6
18199 else
18200
18201 cf_cv_getopt_header=none
18202 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18203 do
18204 cat >conftest.$ac_ext <<_ACEOF
18205 #line 18205 "configure"
18206 #include "confdefs.h"
18207
18208 #include <$cf_header>
18209 int
18210 main (void)
18211 {
18212 int x = optind; char *y = optarg
18213   ;
18214   return 0;
18215 }
18216 _ACEOF
18217 rm -f conftest.$ac_objext
18218 if { (eval echo "$as_me:18218: \"$ac_compile\"") >&5
18219   (eval $ac_compile) 2>&5
18220   ac_status=$?
18221   echo "$as_me:18221: \$? = $ac_status" >&5
18222   (exit $ac_status); } &&
18223          { ac_try='test -s conftest.$ac_objext'
18224   { (eval echo "$as_me:18224: \"$ac_try\"") >&5
18225   (eval $ac_try) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit $ac_status); }; }; then
18229   cf_cv_getopt_header=$cf_header
18230  break
18231 else
18232   echo "$as_me: failed program was:" >&5
18233 cat conftest.$ac_ext >&5
18234 fi
18235 rm -f conftest.$ac_objext conftest.$ac_ext
18236 done
18237
18238 fi
18239 echo "$as_me:18239: result: $cf_cv_getopt_header" >&5
18240 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18241 if test $cf_cv_getopt_header != none ; then
18242
18243 cat >>confdefs.h <<\EOF
18244 #define HAVE_GETOPT_HEADER 1
18245 EOF
18246
18247 fi
18248 if test $cf_cv_getopt_header = getopt.h ; then
18249
18250 cat >>confdefs.h <<\EOF
18251 #define NEED_GETOPT_H 1
18252 EOF
18253
18254 fi
18255
18256 echo "$as_me:18256: checking if external environ is declared" >&5
18257 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18258 if test "${cf_cv_dcl_environ+set}" = set; then
18259   echo $ECHO_N "(cached) $ECHO_C" >&6
18260 else
18261
18262     cat >conftest.$ac_ext <<_ACEOF
18263 #line 18263 "configure"
18264 #include "confdefs.h"
18265
18266 #ifdef HAVE_STDLIB_H
18267 #include <stdlib.h>
18268 #endif
18269 #include <unistd.h>
18270 int
18271 main (void)
18272 {
18273 int x = (int) environ
18274   ;
18275   return 0;
18276 }
18277 _ACEOF
18278 rm -f conftest.$ac_objext
18279 if { (eval echo "$as_me:18279: \"$ac_compile\"") >&5
18280   (eval $ac_compile) 2>&5
18281   ac_status=$?
18282   echo "$as_me:18282: \$? = $ac_status" >&5
18283   (exit $ac_status); } &&
18284          { ac_try='test -s conftest.$ac_objext'
18285   { (eval echo "$as_me:18285: \"$ac_try\"") >&5
18286   (eval $ac_try) 2>&5
18287   ac_status=$?
18288   echo "$as_me:18288: \$? = $ac_status" >&5
18289   (exit $ac_status); }; }; then
18290   cf_cv_dcl_environ=yes
18291 else
18292   echo "$as_me: failed program was:" >&5
18293 cat conftest.$ac_ext >&5
18294 cf_cv_dcl_environ=no
18295 fi
18296 rm -f conftest.$ac_objext conftest.$ac_ext
18297
18298 fi
18299 echo "$as_me:18299: result: $cf_cv_dcl_environ" >&5
18300 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18301
18302 if test "$cf_cv_dcl_environ" = no ; then
18303
18304 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18305
18306     cat >>confdefs.h <<EOF
18307 #define $cf_result 1
18308 EOF
18309
18310 fi
18311
18312 # It's possible (for near-UNIX clones) that the data doesn't exist
18313
18314 echo "$as_me:18314: checking if external environ exists" >&5
18315 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18316 if test "${cf_cv_have_environ+set}" = set; then
18317   echo $ECHO_N "(cached) $ECHO_C" >&6
18318 else
18319
18320         cat >conftest.$ac_ext <<_ACEOF
18321 #line 18321 "configure"
18322 #include "confdefs.h"
18323
18324 #undef environ
18325 extern int environ;
18326
18327 int
18328 main (void)
18329 {
18330 environ = 2
18331   ;
18332   return 0;
18333 }
18334 _ACEOF
18335 rm -f conftest.$ac_objext conftest$ac_exeext
18336 if { (eval echo "$as_me:18336: \"$ac_link\"") >&5
18337   (eval $ac_link) 2>&5
18338   ac_status=$?
18339   echo "$as_me:18339: \$? = $ac_status" >&5
18340   (exit $ac_status); } &&
18341          { ac_try='test -s conftest$ac_exeext'
18342   { (eval echo "$as_me:18342: \"$ac_try\"") >&5
18343   (eval $ac_try) 2>&5
18344   ac_status=$?
18345   echo "$as_me:18345: \$? = $ac_status" >&5
18346   (exit $ac_status); }; }; then
18347   cf_cv_have_environ=yes
18348 else
18349   echo "$as_me: failed program was:" >&5
18350 cat conftest.$ac_ext >&5
18351 cf_cv_have_environ=no
18352 fi
18353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18354
18355 fi
18356 echo "$as_me:18356: result: $cf_cv_have_environ" >&5
18357 echo "${ECHO_T}$cf_cv_have_environ" >&6
18358
18359 if test "$cf_cv_have_environ" = yes ; then
18360
18361 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18362
18363         cat >>confdefs.h <<EOF
18364 #define $cf_result 1
18365 EOF
18366
18367 fi
18368
18369 echo "$as_me:18369: checking for getenv" >&5
18370 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18371 if test "${ac_cv_func_getenv+set}" = set; then
18372   echo $ECHO_N "(cached) $ECHO_C" >&6
18373 else
18374   cat >conftest.$ac_ext <<_ACEOF
18375 #line 18375 "configure"
18376 #include "confdefs.h"
18377 #define getenv autoconf_temporary
18378 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18379 #undef getenv
18380
18381 #ifdef __cplusplus
18382 extern "C"
18383 #endif
18384
18385 /* We use char because int might match the return type of a gcc2
18386    builtin and then its argument prototype would still apply.  */
18387 char getenv (void);
18388
18389 int
18390 main (void)
18391 {
18392
18393 /* The GNU C library defines stubs for functions which it implements
18394     to always fail with ENOSYS.  Some functions are actually named
18395     something starting with __ and the normal name is an alias.  */
18396 #if defined (__stub_getenv) || defined (__stub___getenv)
18397 #error found stub for getenv
18398 #endif
18399
18400         return getenv ();
18401   ;
18402   return 0;
18403 }
18404 _ACEOF
18405 rm -f conftest.$ac_objext conftest$ac_exeext
18406 if { (eval echo "$as_me:18406: \"$ac_link\"") >&5
18407   (eval $ac_link) 2>&5
18408   ac_status=$?
18409   echo "$as_me:18409: \$? = $ac_status" >&5
18410   (exit $ac_status); } &&
18411          { ac_try='test -s conftest$ac_exeext'
18412   { (eval echo "$as_me:18412: \"$ac_try\"") >&5
18413   (eval $ac_try) 2>&5
18414   ac_status=$?
18415   echo "$as_me:18415: \$? = $ac_status" >&5
18416   (exit $ac_status); }; }; then
18417   ac_cv_func_getenv=yes
18418 else
18419   echo "$as_me: failed program was:" >&5
18420 cat conftest.$ac_ext >&5
18421 ac_cv_func_getenv=no
18422 fi
18423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18424 fi
18425 echo "$as_me:18425: result: $ac_cv_func_getenv" >&5
18426 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18427
18428 for ac_func in putenv setenv strdup
18429 do
18430 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18431 echo "$as_me:18431: checking for $ac_func" >&5
18432 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18433 if eval "test \"\${$as_ac_var+set}\" = set"; then
18434   echo $ECHO_N "(cached) $ECHO_C" >&6
18435 else
18436   cat >conftest.$ac_ext <<_ACEOF
18437 #line 18437 "configure"
18438 #include "confdefs.h"
18439 #define $ac_func autoconf_temporary
18440 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18441 #undef $ac_func
18442
18443 #ifdef __cplusplus
18444 extern "C"
18445 #endif
18446
18447 /* We use char because int might match the return type of a gcc2
18448    builtin and then its argument prototype would still apply.  */
18449 char $ac_func (void);
18450
18451 int
18452 main (void)
18453 {
18454
18455 /* The GNU C library defines stubs for functions which it implements
18456     to always fail with ENOSYS.  Some functions are actually named
18457     something starting with __ and the normal name is an alias.  */
18458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18459 #error found stub for $ac_func
18460 #endif
18461
18462         return $ac_func ();
18463   ;
18464   return 0;
18465 }
18466 _ACEOF
18467 rm -f conftest.$ac_objext conftest$ac_exeext
18468 if { (eval echo "$as_me:18468: \"$ac_link\"") >&5
18469   (eval $ac_link) 2>&5
18470   ac_status=$?
18471   echo "$as_me:18471: \$? = $ac_status" >&5
18472   (exit $ac_status); } &&
18473          { ac_try='test -s conftest$ac_exeext'
18474   { (eval echo "$as_me:18474: \"$ac_try\"") >&5
18475   (eval $ac_try) 2>&5
18476   ac_status=$?
18477   echo "$as_me:18477: \$? = $ac_status" >&5
18478   (exit $ac_status); }; }; then
18479   eval "$as_ac_var=yes"
18480 else
18481   echo "$as_me: failed program was:" >&5
18482 cat conftest.$ac_ext >&5
18483 eval "$as_ac_var=no"
18484 fi
18485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18486 fi
18487 echo "$as_me:18487: result: `eval echo '${'$as_ac_var'}'`" >&5
18488 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18489 if test `eval echo '${'$as_ac_var'}'` = yes; then
18490   cat >>confdefs.h <<EOF
18491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18492 EOF
18493
18494 fi
18495 done
18496
18497 echo "$as_me:18497: checking if getenv returns consistent values" >&5
18498 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18499 if test "${cf_cv_consistent_getenv+set}" = set; then
18500   echo $ECHO_N "(cached) $ECHO_C" >&6
18501 else
18502
18503 if test "$cross_compiling" = yes; then
18504   cf_cv_consistent_getenv=unknown
18505 else
18506   cat >conftest.$ac_ext <<_ACEOF
18507 #line 18507 "configure"
18508 #include "confdefs.h"
18509
18510 #include <stdlib.h>
18511 #include <unistd.h>
18512 #include <stdio.h>
18513 #include <string.h>
18514 #include <sys/types.h>
18515
18516 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18517 extern char **environ;  /* POSIX, but some systems are not... */
18518 #endif
18519
18520 #if defined(HAVE_STRDUP)
18521 #define str_alloc(s) strdup(s)
18522 #else
18523 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18524 #endif
18525
18526 static void set_value(const char *name, const char *value)
18527 {
18528 #if defined(HAVE_SETENV)
18529         setenv(name, value, 1);
18530 #elif defined(HAVE_PUTENV)
18531         char buffer[1024];
18532         sprintf(buffer, "%s=%s", name, value);
18533         putenv(str_alloc(buffer));
18534 #else
18535 #error neither putenv/setenv found
18536 #endif
18537 }
18538 int main(void)
18539 {
18540         int pass;
18541         size_t numenv, limit, j;
18542         char **mynames;
18543         char **myvalues;
18544         char **mypointer;
18545         char *equals;
18546         for (numenv = 0; environ[numenv]; ++numenv) ;
18547         limit = numenv + 10;
18548         mynames = (char **) calloc(limit + 1, sizeof(char *));
18549         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18550         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18551 #if defined(HAVE_ENVIRON)
18552         for (j = 0; environ[j]; ++j) {
18553                 mynames[j] = str_alloc(environ[j]);
18554                 equals = strchr(mynames[j], '=');
18555                 if (equals != 0) {
18556                         *equals++ = '\0';
18557                         myvalues[j] = str_alloc(equals);
18558                 } else {
18559                         myvalues[j] = str_alloc("");
18560                 }
18561         }
18562 #endif
18563         for (j = numenv; j < limit; ++j) {
18564                 char name[80];
18565                 char value[80];
18566                 size_t found;
18567                 size_t k = 0;
18568                 do {
18569                         size_t jk;
18570                         found = 0;
18571                         sprintf(name, "TERM%lu", (unsigned long) k);
18572                         for (jk = 0; jk < j; ++jk) {
18573                                 if (!strcmp(name, mynames[jk])) {
18574                                         found = 1;
18575                                         ++k;
18576                                         break;
18577                                 }
18578                         }
18579                 } while (found);
18580                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18581                 set_value(name, value);
18582                 mynames[j] = str_alloc(name);
18583                 myvalues[j] = str_alloc(value);
18584         }
18585         for (pass = 0; pass < 3; ++pass) {
18586                 for (j = 0; j < limit; ++j) {
18587                         char *value = getenv(mynames[j]);
18588                         if (pass) {
18589                                 if (value == 0) {
18590                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18591                                         ${cf_cv_main_return:-return}(1);
18592                                 } else if (value != mypointer[j]) {
18593                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18594                                         ${cf_cv_main_return:-return}(1);
18595                                 } else if (strcmp(value, myvalues[j])) {
18596                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18597                                         ${cf_cv_main_return:-return}(1);
18598                                 }
18599                         } else {
18600                                 size_t k;
18601                                 mypointer[j] = value;
18602                                 for (k = 0; k < j; ++k) {
18603                                         if (mypointer[j] == mypointer[k]) {
18604                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18605                                                 ${cf_cv_main_return:-return}(1);
18606                                         }
18607                                 }
18608                         }
18609                 }
18610         }
18611         ${cf_cv_main_return:-return}(0);
18612 }
18613
18614 _ACEOF
18615 rm -f conftest$ac_exeext
18616 if { (eval echo "$as_me:18616: \"$ac_link\"") >&5
18617   (eval $ac_link) 2>&5
18618   ac_status=$?
18619   echo "$as_me:18619: \$? = $ac_status" >&5
18620   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18621   { (eval echo "$as_me:18621: \"$ac_try\"") >&5
18622   (eval $ac_try) 2>&5
18623   ac_status=$?
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); }; }; then
18626   cf_cv_consistent_getenv=yes
18627 else
18628   echo "$as_me: program exited with status $ac_status" >&5
18629 echo "$as_me: failed program was:" >&5
18630 cat conftest.$ac_ext >&5
18631 cf_cv_consistent_getenv=no
18632 fi
18633 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18634 fi
18635
18636 fi
18637 echo "$as_me:18637: result: $cf_cv_consistent_getenv" >&5
18638 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18639
18640 if test "x$cf_cv_consistent_getenv" = xno
18641 then
18642
18643 cat >>confdefs.h <<\EOF
18644 #define HAVE_CONSISTENT_GETENV 1
18645 EOF
18646
18647 fi
18648
18649 if test "x$cf_cv_consistent_getenv" = xno && \
18650         test "x$cf_with_trace" = xyes
18651 then
18652         { echo "$as_me:18652: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18653 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18654 fi
18655
18656 # check for ISC (this may also define _POSIX_SOURCE)
18657 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18658 if test "x$ISC" = xyes ; then
18659
18660 echo "$as_me:18660: checking for main in -lcposix" >&5
18661 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18662 if test "${ac_cv_lib_cposix_main+set}" = set; then
18663   echo $ECHO_N "(cached) $ECHO_C" >&6
18664 else
18665   ac_check_lib_save_LIBS=$LIBS
18666 LIBS="-lcposix  $LIBS"
18667 cat >conftest.$ac_ext <<_ACEOF
18668 #line 18668 "configure"
18669 #include "confdefs.h"
18670
18671 int
18672 main (void)
18673 {
18674 main ();
18675   ;
18676   return 0;
18677 }
18678 _ACEOF
18679 rm -f conftest.$ac_objext conftest$ac_exeext
18680 if { (eval echo "$as_me:18680: \"$ac_link\"") >&5
18681   (eval $ac_link) 2>&5
18682   ac_status=$?
18683   echo "$as_me:18683: \$? = $ac_status" >&5
18684   (exit $ac_status); } &&
18685          { ac_try='test -s conftest$ac_exeext'
18686   { (eval echo "$as_me:18686: \"$ac_try\"") >&5
18687   (eval $ac_try) 2>&5
18688   ac_status=$?
18689   echo "$as_me:18689: \$? = $ac_status" >&5
18690   (exit $ac_status); }; }; then
18691   ac_cv_lib_cposix_main=yes
18692 else
18693   echo "$as_me: failed program was:" >&5
18694 cat conftest.$ac_ext >&5
18695 ac_cv_lib_cposix_main=no
18696 fi
18697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18698 LIBS=$ac_check_lib_save_LIBS
18699 fi
18700 echo "$as_me:18700: result: $ac_cv_lib_cposix_main" >&5
18701 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18702 if test $ac_cv_lib_cposix_main = yes; then
18703   cat >>confdefs.h <<EOF
18704 #define HAVE_LIBCPOSIX 1
18705 EOF
18706
18707   LIBS="-lcposix $LIBS"
18708
18709 fi
18710
18711         echo "$as_me:18711: checking for bzero in -linet" >&5
18712 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18713 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18714   echo $ECHO_N "(cached) $ECHO_C" >&6
18715 else
18716   ac_check_lib_save_LIBS=$LIBS
18717 LIBS="-linet  $LIBS"
18718 cat >conftest.$ac_ext <<_ACEOF
18719 #line 18719 "configure"
18720 #include "confdefs.h"
18721
18722 /* Override any gcc2 internal prototype to avoid an error.  */
18723 #ifdef __cplusplus
18724 extern "C"
18725 #endif
18726 /* We use char because int might match the return type of a gcc2
18727    builtin and then its argument prototype would still apply.  */
18728 char bzero ();
18729 int
18730 main (void)
18731 {
18732 bzero ();
18733   ;
18734   return 0;
18735 }
18736 _ACEOF
18737 rm -f conftest.$ac_objext conftest$ac_exeext
18738 if { (eval echo "$as_me:18738: \"$ac_link\"") >&5
18739   (eval $ac_link) 2>&5
18740   ac_status=$?
18741   echo "$as_me:18741: \$? = $ac_status" >&5
18742   (exit $ac_status); } &&
18743          { ac_try='test -s conftest$ac_exeext'
18744   { (eval echo "$as_me:18744: \"$ac_try\"") >&5
18745   (eval $ac_try) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); }; }; then
18749   ac_cv_lib_inet_bzero=yes
18750 else
18751   echo "$as_me: failed program was:" >&5
18752 cat conftest.$ac_ext >&5
18753 ac_cv_lib_inet_bzero=no
18754 fi
18755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18756 LIBS=$ac_check_lib_save_LIBS
18757 fi
18758 echo "$as_me:18758: result: $ac_cv_lib_inet_bzero" >&5
18759 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18760 if test $ac_cv_lib_inet_bzero = yes; then
18761
18762 cf_add_libs="-linet"
18763 # Filter out duplicates - this happens with badly-designed ".pc" files...
18764 for cf_add_1lib in $LIBS
18765 do
18766         for cf_add_2lib in $cf_add_libs
18767         do
18768                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18769                 then
18770                         cf_add_1lib=
18771                         break
18772                 fi
18773         done
18774         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18775 done
18776 LIBS="$cf_add_libs"
18777
18778 fi
18779 fi
18780
18781 echo "$as_me:18781: checking if sys/time.h works with sys/select.h" >&5
18782 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18783 if test "${cf_cv_sys_time_select+set}" = set; then
18784   echo $ECHO_N "(cached) $ECHO_C" >&6
18785 else
18786
18787 cat >conftest.$ac_ext <<_ACEOF
18788 #line 18788 "configure"
18789 #include "confdefs.h"
18790
18791 #include <sys/types.h>
18792 #ifdef HAVE_SYS_TIME_H
18793 #include <sys/time.h>
18794 #endif
18795 #ifdef HAVE_SYS_SELECT_H
18796 #include <sys/select.h>
18797 #endif
18798
18799 int
18800 main (void)
18801 {
18802
18803   ;
18804   return 0;
18805 }
18806 _ACEOF
18807 rm -f conftest.$ac_objext
18808 if { (eval echo "$as_me:18808: \"$ac_compile\"") >&5
18809   (eval $ac_compile) 2>&5
18810   ac_status=$?
18811   echo "$as_me:18811: \$? = $ac_status" >&5
18812   (exit $ac_status); } &&
18813          { ac_try='test -s conftest.$ac_objext'
18814   { (eval echo "$as_me:18814: \"$ac_try\"") >&5
18815   (eval $ac_try) 2>&5
18816   ac_status=$?
18817   echo "$as_me:18817: \$? = $ac_status" >&5
18818   (exit $ac_status); }; }; then
18819   cf_cv_sys_time_select=yes
18820 else
18821   echo "$as_me: failed program was:" >&5
18822 cat conftest.$ac_ext >&5
18823 cf_cv_sys_time_select=no
18824 fi
18825 rm -f conftest.$ac_objext conftest.$ac_ext
18826
18827 fi
18828
18829 echo "$as_me:18829: result: $cf_cv_sys_time_select" >&5
18830 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18831 test "$cf_cv_sys_time_select" = yes &&
18832 cat >>confdefs.h <<\EOF
18833 #define HAVE_SYS_TIME_SELECT 1
18834 EOF
18835
18836 ###     checks for compiler characteristics
18837 ac_ext=c
18838 ac_cpp='$CPP $CPPFLAGS'
18839 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18840 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18841 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18842 ac_main_return=return
18843
18844 echo "$as_me:18844: checking for an ANSI C-conforming const" >&5
18845 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18846 if test "${ac_cv_c_const+set}" = set; then
18847   echo $ECHO_N "(cached) $ECHO_C" >&6
18848 else
18849   cat >conftest.$ac_ext <<_ACEOF
18850 #line 18850 "configure"
18851 #include "confdefs.h"
18852
18853 int
18854 main (void)
18855 {
18856 /* FIXME: Include the comments suggested by Paul. */
18857 #ifndef __cplusplus
18858   /* Ultrix mips cc rejects this.  */
18859   typedef int charset[2];
18860   const charset x;
18861   /* SunOS 4.1.1 cc rejects this.  */
18862   char const *const *ccp;
18863   char **p;
18864   /* NEC SVR4.0.2 mips cc rejects this.  */
18865   struct point {int x, y;};
18866   static struct point const zero = {0,0};
18867   /* AIX XL C 1.02.0.0 rejects this.
18868      It does not let you subtract one const X* pointer from another in
18869      an arm of an if-expression whose if-part is not a constant
18870      expression */
18871   const char *g = "string";
18872   ccp = &g + (g ? g-g : 0);
18873   /* HPUX 7.0 cc rejects these. */
18874   ++ccp;
18875   p = (char**) ccp;
18876   ccp = (char const *const *) p;
18877   { /* SCO 3.2v4 cc rejects this.  */
18878     char *t;
18879     char const *s = 0 ? (char *) 0 : (char const *) 0;
18880
18881     *t++ = 0;
18882   }
18883   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18884     int x[] = {25, 17};
18885     const int *foo = &x[0];
18886     ++foo;
18887   }
18888   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18889     typedef const int *iptr;
18890     iptr p = 0;
18891     ++p;
18892   }
18893   { /* AIX XL C 1.02.0.0 rejects this saying
18894        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18895     struct s { int j; const int *ap[3]; };
18896     struct s *b; b->j = 5;
18897   }
18898   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18899     const int foo = 10;
18900   }
18901 #endif
18902
18903   ;
18904   return 0;
18905 }
18906 _ACEOF
18907 rm -f conftest.$ac_objext
18908 if { (eval echo "$as_me:18908: \"$ac_compile\"") >&5
18909   (eval $ac_compile) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit $ac_status); } &&
18913          { ac_try='test -s conftest.$ac_objext'
18914   { (eval echo "$as_me:18914: \"$ac_try\"") >&5
18915   (eval $ac_try) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit $ac_status); }; }; then
18919   ac_cv_c_const=yes
18920 else
18921   echo "$as_me: failed program was:" >&5
18922 cat conftest.$ac_ext >&5
18923 ac_cv_c_const=no
18924 fi
18925 rm -f conftest.$ac_objext conftest.$ac_ext
18926 fi
18927 echo "$as_me:18927: result: $ac_cv_c_const" >&5
18928 echo "${ECHO_T}$ac_cv_c_const" >&6
18929 if test $ac_cv_c_const = no; then
18930
18931 cat >>confdefs.h <<\EOF
18932 #define const
18933 EOF
18934
18935 fi
18936
18937 echo "$as_me:18937: checking for inline" >&5
18938 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18939 if test "${ac_cv_c_inline+set}" = set; then
18940   echo $ECHO_N "(cached) $ECHO_C" >&6
18941 else
18942   ac_cv_c_inline=no
18943 for ac_kw in inline __inline__ __inline; do
18944   cat >conftest.$ac_ext <<_ACEOF
18945 #line 18945 "configure"
18946 #include "confdefs.h"
18947 #ifndef __cplusplus
18948 static $ac_kw int static_foo () {return 0; }
18949 $ac_kw int foo () {return 0; }
18950 #endif
18951
18952 _ACEOF
18953 rm -f conftest.$ac_objext
18954 if { (eval echo "$as_me:18954: \"$ac_compile\"") >&5
18955   (eval $ac_compile) 2>&5
18956   ac_status=$?
18957   echo "$as_me:18957: \$? = $ac_status" >&5
18958   (exit $ac_status); } &&
18959          { ac_try='test -s conftest.$ac_objext'
18960   { (eval echo "$as_me:18960: \"$ac_try\"") >&5
18961   (eval $ac_try) 2>&5
18962   ac_status=$?
18963   echo "$as_me:18963: \$? = $ac_status" >&5
18964   (exit $ac_status); }; }; then
18965   ac_cv_c_inline=$ac_kw; break
18966 else
18967   echo "$as_me: failed program was:" >&5
18968 cat conftest.$ac_ext >&5
18969 fi
18970 rm -f conftest.$ac_objext conftest.$ac_ext
18971 done
18972
18973 fi
18974 echo "$as_me:18974: result: $ac_cv_c_inline" >&5
18975 echo "${ECHO_T}$ac_cv_c_inline" >&6
18976 case $ac_cv_c_inline in
18977   inline | yes) ;;
18978   no)
18979 cat >>confdefs.h <<\EOF
18980 #define inline
18981 EOF
18982  ;;
18983   *)  cat >>confdefs.h <<EOF
18984 #define inline $ac_cv_c_inline
18985 EOF
18986  ;;
18987 esac
18988
18989 NCURSES_INLINE=
18990 if test "$ac_cv_c_inline" != no ; then
18991         NCURSES_INLINE=inline
18992         if test "$INTEL_COMPILER" = yes
18993         then
18994                 :
18995         elif test "$CLANG_COMPILER" = yes
18996         then
18997                 :
18998         elif test "$GCC" = yes
18999         then
19000                 echo "$as_me:19000: checking if $CC supports options to tune inlining" >&5
19001 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19002 if test "${cf_cv_gcc_inline+set}" = set; then
19003   echo $ECHO_N "(cached) $ECHO_C" >&6
19004 else
19005
19006                 cf_save_CFLAGS=$CFLAGS
19007                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19008                 cat >conftest.$ac_ext <<_ACEOF
19009 #line 19009 "configure"
19010 #include "confdefs.h"
19011 inline int foo(void) { return 1; }
19012 int
19013 main (void)
19014 {
19015 ${cf_cv_main_return:-return} foo()
19016   ;
19017   return 0;
19018 }
19019 _ACEOF
19020 rm -f conftest.$ac_objext
19021 if { (eval echo "$as_me:19021: \"$ac_compile\"") >&5
19022   (eval $ac_compile) 2>&5
19023   ac_status=$?
19024   echo "$as_me:19024: \$? = $ac_status" >&5
19025   (exit $ac_status); } &&
19026          { ac_try='test -s conftest.$ac_objext'
19027   { (eval echo "$as_me:19027: \"$ac_try\"") >&5
19028   (eval $ac_try) 2>&5
19029   ac_status=$?
19030   echo "$as_me:19030: \$? = $ac_status" >&5
19031   (exit $ac_status); }; }; then
19032   cf_cv_gcc_inline=yes
19033 else
19034   echo "$as_me: failed program was:" >&5
19035 cat conftest.$ac_ext >&5
19036 cf_cv_gcc_inline=no
19037 fi
19038 rm -f conftest.$ac_objext conftest.$ac_ext
19039                 CFLAGS=$cf_save_CFLAGS
19040
19041 fi
19042 echo "$as_me:19042: result: $cf_cv_gcc_inline" >&5
19043 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19044                 if test "$cf_cv_gcc_inline" = yes ; then
19045
19046 cf_fix_cppflags=no
19047 cf_new_cflags=
19048 cf_new_cppflags=
19049 cf_new_extra_cppflags=
19050
19051 for cf_add_cflags in --param max-inline-insns-single=1200
19052 do
19053 case $cf_fix_cppflags in
19054 (no)
19055         case $cf_add_cflags in
19056         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19057                 case $cf_add_cflags in
19058                 (-D*)
19059                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19060
19061                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19062                                 && test -z "${cf_tst_cflags}" \
19063                                 && cf_fix_cppflags=yes
19064
19065                         if test $cf_fix_cppflags = yes ; then
19066
19067         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19068         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19069
19070                                 continue
19071                         elif test "${cf_tst_cflags}" = "\"'" ; then
19072
19073         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19074         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19075
19076                                 continue
19077                         fi
19078                         ;;
19079                 esac
19080                 case "$CPPFLAGS" in
19081                 (*$cf_add_cflags)
19082                         ;;
19083                 (*)
19084                         case $cf_add_cflags in
19085                         (-D*)
19086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19087
19088 CPPFLAGS=`echo "$CPPFLAGS" | \
19089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19091
19092                                 ;;
19093                         esac
19094
19095         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19096         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19097
19098                         ;;
19099                 esac
19100                 ;;
19101         (*)
19102
19103         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19104         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19105
19106                 ;;
19107         esac
19108         ;;
19109 (yes)
19110
19111         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19112         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19113
19114         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19115
19116         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19117                 && test -z "${cf_tst_cflags}" \
19118                 && cf_fix_cppflags=no
19119         ;;
19120 esac
19121 done
19122
19123 if test -n "$cf_new_cflags" ; then
19124
19125         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19126         CFLAGS="${CFLAGS}$cf_new_cflags"
19127
19128 fi
19129
19130 if test -n "$cf_new_cppflags" ; then
19131
19132         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19133         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19134
19135 fi
19136
19137 if test -n "$cf_new_extra_cppflags" ; then
19138
19139         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19140         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19141
19142 fi
19143
19144                 fi
19145         fi
19146 fi
19147
19148 echo "$as_me:19148: checking for signal global datatype" >&5
19149 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19150 if test "${cf_cv_sig_atomic_t+set}" = set; then
19151   echo $ECHO_N "(cached) $ECHO_C" >&6
19152 else
19153
19154         for cf_type in \
19155                 "volatile sig_atomic_t" \
19156                 "sig_atomic_t" \
19157                 "int"
19158         do
19159         cat >conftest.$ac_ext <<_ACEOF
19160 #line 19160 "configure"
19161 #include "confdefs.h"
19162
19163 #include <sys/types.h>
19164 #include <signal.h>
19165 #include <stdio.h>
19166
19167 extern $cf_type x;
19168 $cf_type x;
19169 static void handler(int sig)
19170 {
19171         x = 5;
19172 }
19173 int
19174 main (void)
19175 {
19176 signal(SIGINT, handler);
19177                  x = 1
19178   ;
19179   return 0;
19180 }
19181 _ACEOF
19182 rm -f conftest.$ac_objext
19183 if { (eval echo "$as_me:19183: \"$ac_compile\"") >&5
19184   (eval $ac_compile) 2>&5
19185   ac_status=$?
19186   echo "$as_me:19186: \$? = $ac_status" >&5
19187   (exit $ac_status); } &&
19188          { ac_try='test -s conftest.$ac_objext'
19189   { (eval echo "$as_me:19189: \"$ac_try\"") >&5
19190   (eval $ac_try) 2>&5
19191   ac_status=$?
19192   echo "$as_me:19192: \$? = $ac_status" >&5
19193   (exit $ac_status); }; }; then
19194   cf_cv_sig_atomic_t=$cf_type
19195 else
19196   echo "$as_me: failed program was:" >&5
19197 cat conftest.$ac_ext >&5
19198 cf_cv_sig_atomic_t=no
19199 fi
19200 rm -f conftest.$ac_objext conftest.$ac_ext
19201                 test "$cf_cv_sig_atomic_t" != no && break
19202         done
19203
19204 fi
19205
19206 echo "$as_me:19206: result: $cf_cv_sig_atomic_t" >&5
19207 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19208 test "$cf_cv_sig_atomic_t" != no &&
19209 cat >>confdefs.h <<EOF
19210 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19211 EOF
19212
19213 if test $NCURSES_CHTYPE = auto ; then
19214
19215 echo "$as_me:19215: checking for type of chtype" >&5
19216 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19217 if test "${cf_cv_typeof_chtype+set}" = set; then
19218   echo $ECHO_N "(cached) $ECHO_C" >&6
19219 else
19220
19221                 if test "$cross_compiling" = yes; then
19222   cf_cv_typeof_chtype=long
19223 else
19224   cat >conftest.$ac_ext <<_ACEOF
19225 #line 19225 "configure"
19226 #include "confdefs.h"
19227
19228 #define WANT_BITS 31
19229 #include <stdio.h>
19230 int main(void)
19231 {
19232         FILE *fp = fopen("cf_test.out", "w");
19233         if (fp != 0) {
19234                 char *result = "long";
19235                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19236                         int n;
19237                         unsigned int x, y;
19238                         for (n = 0; n < WANT_BITS; n++) {
19239                                 x = (1 << n);
19240                                 y = (x >> n);
19241                                 if (y != 1 || x == 0) {
19242                                         x = 0;
19243                                         break;
19244                                 }
19245                         }
19246                         /*
19247                          * If x is nonzero, an int is big enough for the bits
19248                          * that we want.
19249                          */
19250                         result = (x != 0) ? "int" : "long";
19251                 }
19252                 fputs(result, fp);
19253                 fclose(fp);
19254         }
19255         ${cf_cv_main_return:-return}(0);
19256 }
19257
19258 _ACEOF
19259 rm -f conftest$ac_exeext
19260 if { (eval echo "$as_me:19260: \"$ac_link\"") >&5
19261   (eval $ac_link) 2>&5
19262   ac_status=$?
19263   echo "$as_me:19263: \$? = $ac_status" >&5
19264   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19265   { (eval echo "$as_me:19265: \"$ac_try\"") >&5
19266   (eval $ac_try) 2>&5
19267   ac_status=$?
19268   echo "$as_me:19268: \$? = $ac_status" >&5
19269   (exit $ac_status); }; }; then
19270   cf_cv_typeof_chtype=`cat cf_test.out`
19271 else
19272   echo "$as_me: program exited with status $ac_status" >&5
19273 echo "$as_me: failed program was:" >&5
19274 cat conftest.$ac_ext >&5
19275 cf_cv_typeof_chtype=long
19276 fi
19277 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19278 fi
19279                 rm -f cf_test.out
19280
19281 fi
19282
19283 echo "$as_me:19283: result: $cf_cv_typeof_chtype" >&5
19284 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19285
19286 cat >>confdefs.h <<EOF
19287 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19288 EOF
19289
19290 else
19291         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19292 fi
19293 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19294
19295 echo "$as_me:19295: checking if unsigned literals are legal" >&5
19296 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19297 if test "${cf_cv_unsigned_literals+set}" = set; then
19298   echo $ECHO_N "(cached) $ECHO_C" >&6
19299 else
19300
19301         cat >conftest.$ac_ext <<_ACEOF
19302 #line 19302 "configure"
19303 #include "confdefs.h"
19304
19305 int
19306 main (void)
19307 {
19308 long x = 1L + 1UL + 1U + 1
19309   ;
19310   return 0;
19311 }
19312 _ACEOF
19313 rm -f conftest.$ac_objext
19314 if { (eval echo "$as_me:19314: \"$ac_compile\"") >&5
19315   (eval $ac_compile) 2>&5
19316   ac_status=$?
19317   echo "$as_me:19317: \$? = $ac_status" >&5
19318   (exit $ac_status); } &&
19319          { ac_try='test -s conftest.$ac_objext'
19320   { (eval echo "$as_me:19320: \"$ac_try\"") >&5
19321   (eval $ac_try) 2>&5
19322   ac_status=$?
19323   echo "$as_me:19323: \$? = $ac_status" >&5
19324   (exit $ac_status); }; }; then
19325   cf_cv_unsigned_literals=yes
19326 else
19327   echo "$as_me: failed program was:" >&5
19328 cat conftest.$ac_ext >&5
19329 cf_cv_unsigned_literals=no
19330 fi
19331 rm -f conftest.$ac_objext conftest.$ac_ext
19332
19333 fi
19334
19335 echo "$as_me:19335: result: $cf_cv_unsigned_literals" >&5
19336 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19337
19338 cf_cv_1UL="1"
19339 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19340 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19341
19342 if test $NCURSES_MMASK_T = auto ; then
19343         cf_cv_typeof_mmask_t=long
19344 else
19345         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19346 fi
19347 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19348
19349 ###     Checks for external-data
19350
19351 echo "$as_me:19351: checking if external errno is declared" >&5
19352 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19353 if test "${cf_cv_dcl_errno+set}" = set; then
19354   echo $ECHO_N "(cached) $ECHO_C" >&6
19355 else
19356
19357         cat >conftest.$ac_ext <<_ACEOF
19358 #line 19358 "configure"
19359 #include "confdefs.h"
19360
19361 #ifdef HAVE_STDLIB_H
19362 #include <stdlib.h>
19363 #endif
19364 #include <stdio.h>
19365 #include <sys/types.h>
19366 #include <errno.h>
19367 int
19368 main (void)
19369 {
19370 int x = (int) errno
19371   ;
19372   return 0;
19373 }
19374 _ACEOF
19375 rm -f conftest.$ac_objext
19376 if { (eval echo "$as_me:19376: \"$ac_compile\"") >&5
19377   (eval $ac_compile) 2>&5
19378   ac_status=$?
19379   echo "$as_me:19379: \$? = $ac_status" >&5
19380   (exit $ac_status); } &&
19381          { ac_try='test -s conftest.$ac_objext'
19382   { (eval echo "$as_me:19382: \"$ac_try\"") >&5
19383   (eval $ac_try) 2>&5
19384   ac_status=$?
19385   echo "$as_me:19385: \$? = $ac_status" >&5
19386   (exit $ac_status); }; }; then
19387   cf_cv_dcl_errno=yes
19388 else
19389   echo "$as_me: failed program was:" >&5
19390 cat conftest.$ac_ext >&5
19391 cf_cv_dcl_errno=no
19392 fi
19393 rm -f conftest.$ac_objext conftest.$ac_ext
19394
19395 fi
19396 echo "$as_me:19396: result: $cf_cv_dcl_errno" >&5
19397 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19398
19399 if test "$cf_cv_dcl_errno" = no ; then
19400
19401 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19402
19403         cat >>confdefs.h <<EOF
19404 #define $cf_result 1
19405 EOF
19406
19407 fi
19408
19409 # It's possible (for near-UNIX clones) that the data doesn't exist
19410
19411 echo "$as_me:19411: checking if external errno exists" >&5
19412 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19413 if test "${cf_cv_have_errno+set}" = set; then
19414   echo $ECHO_N "(cached) $ECHO_C" >&6
19415 else
19416
19417         cat >conftest.$ac_ext <<_ACEOF
19418 #line 19418 "configure"
19419 #include "confdefs.h"
19420
19421 #undef errno
19422 extern int errno;
19423
19424 int
19425 main (void)
19426 {
19427 errno = 2
19428   ;
19429   return 0;
19430 }
19431 _ACEOF
19432 rm -f conftest.$ac_objext conftest$ac_exeext
19433 if { (eval echo "$as_me:19433: \"$ac_link\"") >&5
19434   (eval $ac_link) 2>&5
19435   ac_status=$?
19436   echo "$as_me:19436: \$? = $ac_status" >&5
19437   (exit $ac_status); } &&
19438          { ac_try='test -s conftest$ac_exeext'
19439   { (eval echo "$as_me:19439: \"$ac_try\"") >&5
19440   (eval $ac_try) 2>&5
19441   ac_status=$?
19442   echo "$as_me:19442: \$? = $ac_status" >&5
19443   (exit $ac_status); }; }; then
19444   cf_cv_have_errno=yes
19445 else
19446   echo "$as_me: failed program was:" >&5
19447 cat conftest.$ac_ext >&5
19448 cf_cv_have_errno=no
19449 fi
19450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19451
19452 fi
19453 echo "$as_me:19453: result: $cf_cv_have_errno" >&5
19454 echo "${ECHO_T}$cf_cv_have_errno" >&6
19455
19456 if test "$cf_cv_have_errno" = yes ; then
19457
19458 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19459
19460         cat >>confdefs.h <<EOF
19461 #define $cf_result 1
19462 EOF
19463
19464 fi
19465
19466 echo "$as_me:19466: checking if data-only library module links" >&5
19467 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19468 if test "${cf_cv_link_dataonly+set}" = set; then
19469   echo $ECHO_N "(cached) $ECHO_C" >&6
19470 else
19471
19472         rm -f conftest.a
19473         cat >conftest.$ac_ext <<EOF
19474 #line 19474 "configure"
19475 int     testdata[3] = { 123, 456, 789 };
19476 EOF
19477         if { (eval echo "$as_me:19477: \"$ac_compile\"") >&5
19478   (eval $ac_compile) 2>&5
19479   ac_status=$?
19480   echo "$as_me:19480: \$? = $ac_status" >&5
19481   (exit $ac_status); } ; then
19482                 mv conftest.o data.o && \
19483                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19484         fi
19485         rm -f conftest.$ac_ext data.o
19486         cat >conftest.$ac_ext <<EOF
19487 #line 19487 "configure"
19488 int     testfunc(void)
19489 {
19490 #if defined(NeXT)
19491         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19492 #else
19493         extern int testdata[3];
19494         return testdata[0] == 123
19495            &&  testdata[1] == 456
19496            &&  testdata[2] == 789;
19497 #endif
19498 }
19499 EOF
19500         if { (eval echo "$as_me:19500: \"$ac_compile\"") >&5
19501   (eval $ac_compile) 2>&5
19502   ac_status=$?
19503   echo "$as_me:19503: \$? = $ac_status" >&5
19504   (exit $ac_status); }; then
19505                 mv conftest.o func.o && \
19506                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19507         fi
19508         rm -f conftest.$ac_ext func.o
19509         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19510         cf_saveLIBS="$LIBS"
19511         LIBS="conftest.a $LIBS"
19512         if test "$cross_compiling" = yes; then
19513   cf_cv_link_dataonly=unknown
19514 else
19515   cat >conftest.$ac_ext <<_ACEOF
19516 #line 19516 "configure"
19517 #include "confdefs.h"
19518
19519         int main(void)
19520         {
19521                 extern int testfunc();
19522                 ${cf_cv_main_return:-return} (!testfunc());
19523         }
19524
19525 _ACEOF
19526 rm -f conftest$ac_exeext
19527 if { (eval echo "$as_me:19527: \"$ac_link\"") >&5
19528   (eval $ac_link) 2>&5
19529   ac_status=$?
19530   echo "$as_me:19530: \$? = $ac_status" >&5
19531   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19532   { (eval echo "$as_me:19532: \"$ac_try\"") >&5
19533   (eval $ac_try) 2>&5
19534   ac_status=$?
19535   echo "$as_me:19535: \$? = $ac_status" >&5
19536   (exit $ac_status); }; }; then
19537   cf_cv_link_dataonly=yes
19538 else
19539   echo "$as_me: program exited with status $ac_status" >&5
19540 echo "$as_me: failed program was:" >&5
19541 cat conftest.$ac_ext >&5
19542 cf_cv_link_dataonly=no
19543 fi
19544 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19545 fi
19546         LIBS="$cf_saveLIBS"
19547
19548 fi
19549
19550 echo "$as_me:19550: result: $cf_cv_link_dataonly" >&5
19551 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19552
19553 if test "$cf_cv_link_dataonly" = no ; then
19554
19555 cat >>confdefs.h <<\EOF
19556 #define BROKEN_LINKER 1
19557 EOF
19558
19559         BROKEN_LINKER=1
19560 fi
19561
19562 ###     Checks for library functions.
19563
19564 for ac_func in \
19565 getcwd \
19566 getegid \
19567 geteuid \
19568 getopt \
19569 getttynam \
19570 issetugid \
19571 localeconv \
19572 poll \
19573 putenv \
19574 remove \
19575 select \
19576 setbuf \
19577 setbuffer \
19578 setenv \
19579 setvbuf \
19580 sigaction \
19581 sigvec \
19582 strdup \
19583 strstr \
19584 sysconf \
19585 tcgetpgrp \
19586 times \
19587 tsearch \
19588 vsnprintf \
19589
19590 do
19591 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19592 echo "$as_me:19592: checking for $ac_func" >&5
19593 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19594 if eval "test \"\${$as_ac_var+set}\" = set"; then
19595   echo $ECHO_N "(cached) $ECHO_C" >&6
19596 else
19597   cat >conftest.$ac_ext <<_ACEOF
19598 #line 19598 "configure"
19599 #include "confdefs.h"
19600 #define $ac_func autoconf_temporary
19601 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19602 #undef $ac_func
19603
19604 #ifdef __cplusplus
19605 extern "C"
19606 #endif
19607
19608 /* We use char because int might match the return type of a gcc2
19609    builtin and then its argument prototype would still apply.  */
19610 char $ac_func (void);
19611
19612 int
19613 main (void)
19614 {
19615
19616 /* The GNU C library defines stubs for functions which it implements
19617     to always fail with ENOSYS.  Some functions are actually named
19618     something starting with __ and the normal name is an alias.  */
19619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19620 #error found stub for $ac_func
19621 #endif
19622
19623         return $ac_func ();
19624   ;
19625   return 0;
19626 }
19627 _ACEOF
19628 rm -f conftest.$ac_objext conftest$ac_exeext
19629 if { (eval echo "$as_me:19629: \"$ac_link\"") >&5
19630   (eval $ac_link) 2>&5
19631   ac_status=$?
19632   echo "$as_me:19632: \$? = $ac_status" >&5
19633   (exit $ac_status); } &&
19634          { ac_try='test -s conftest$ac_exeext'
19635   { (eval echo "$as_me:19635: \"$ac_try\"") >&5
19636   (eval $ac_try) 2>&5
19637   ac_status=$?
19638   echo "$as_me:19638: \$? = $ac_status" >&5
19639   (exit $ac_status); }; }; then
19640   eval "$as_ac_var=yes"
19641 else
19642   echo "$as_me: failed program was:" >&5
19643 cat conftest.$ac_ext >&5
19644 eval "$as_ac_var=no"
19645 fi
19646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19647 fi
19648 echo "$as_me:19648: result: `eval echo '${'$as_ac_var'}'`" >&5
19649 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19650 if test `eval echo '${'$as_ac_var'}'` = yes; then
19651   cat >>confdefs.h <<EOF
19652 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19653 EOF
19654
19655 fi
19656 done
19657
19658 if test "x$ac_cv_func_getopt" = xno && \
19659    test "x$cf_with_progs$cf_with_tests" != xnono; then
19660         { { echo "$as_me:19660: error: getopt is required for building programs" >&5
19661 echo "$as_me: error: getopt is required for building programs" >&2;}
19662    { (exit 1); exit 1; }; }
19663 fi
19664
19665 if test "x$with_safe_sprintf" = xyes
19666 then
19667         if test "x$ac_cv_func_vsnprintf" = xyes
19668         then
19669                 { echo "$as_me:19669: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19670 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19671         else
19672
19673 cat >>confdefs.h <<\EOF
19674 #define USE_SAFE_SPRINTF 1
19675 EOF
19676
19677         fi
19678 fi
19679
19680 if test "x$with_getcap" = "xyes" ; then
19681
19682 echo "$as_me:19682: checking for terminal-capability database functions" >&5
19683 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19684 if test "${cf_cv_cgetent+set}" = set; then
19685   echo $ECHO_N "(cached) $ECHO_C" >&6
19686 else
19687
19688 cat >conftest.$ac_ext <<_ACEOF
19689 #line 19689 "configure"
19690 #include "confdefs.h"
19691
19692 #include <stdlib.h>
19693 int
19694 main (void)
19695 {
19696
19697         char temp[128];
19698         char *buf = temp;
19699         char *db_array = temp;
19700         cgetent(&buf, &db_array, "vt100");
19701         cgetcap(buf, "tc", '=');
19702         cgetmatch(buf, "tc");
19703
19704   ;
19705   return 0;
19706 }
19707 _ACEOF
19708 rm -f conftest.$ac_objext conftest$ac_exeext
19709 if { (eval echo "$as_me:19709: \"$ac_link\"") >&5
19710   (eval $ac_link) 2>&5
19711   ac_status=$?
19712   echo "$as_me:19712: \$? = $ac_status" >&5
19713   (exit $ac_status); } &&
19714          { ac_try='test -s conftest$ac_exeext'
19715   { (eval echo "$as_me:19715: \"$ac_try\"") >&5
19716   (eval $ac_try) 2>&5
19717   ac_status=$?
19718   echo "$as_me:19718: \$? = $ac_status" >&5
19719   (exit $ac_status); }; }; then
19720   cf_cv_cgetent=yes
19721 else
19722   echo "$as_me: failed program was:" >&5
19723 cat conftest.$ac_ext >&5
19724 cf_cv_cgetent=no
19725 fi
19726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19727
19728 fi
19729 echo "$as_me:19729: result: $cf_cv_cgetent" >&5
19730 echo "${ECHO_T}$cf_cv_cgetent" >&6
19731
19732 if test "$cf_cv_cgetent" = yes
19733 then
19734
19735 cat >>confdefs.h <<\EOF
19736 #define HAVE_BSD_CGETENT 1
19737 EOF
19738
19739 echo "$as_me:19739: checking if cgetent uses const parameter" >&5
19740 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19741 if test "${cf_cv_cgetent_const+set}" = set; then
19742   echo $ECHO_N "(cached) $ECHO_C" >&6
19743 else
19744
19745 cat >conftest.$ac_ext <<_ACEOF
19746 #line 19746 "configure"
19747 #include "confdefs.h"
19748
19749 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19750 #include <stdlib.h>
19751 int
19752 main (void)
19753 {
19754
19755         char temp[128];
19756         char *buf = temp;
19757 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19758         const char *db_array = temp;
19759         cgetent(&buf, &db_array, "vt100");
19760 #endif
19761         cgetcap(buf, "tc", '=');
19762         cgetmatch(buf, "tc");
19763
19764   ;
19765   return 0;
19766 }
19767 _ACEOF
19768 rm -f conftest.$ac_objext conftest$ac_exeext
19769 if { (eval echo "$as_me:19769: \"$ac_link\"") >&5
19770   (eval $ac_link) 2>&5
19771   ac_status=$?
19772   echo "$as_me:19772: \$? = $ac_status" >&5
19773   (exit $ac_status); } &&
19774          { ac_try='test -s conftest$ac_exeext'
19775   { (eval echo "$as_me:19775: \"$ac_try\"") >&5
19776   (eval $ac_try) 2>&5
19777   ac_status=$?
19778   echo "$as_me:19778: \$? = $ac_status" >&5
19779   (exit $ac_status); }; }; then
19780   cf_cv_cgetent_const=yes
19781 else
19782   echo "$as_me: failed program was:" >&5
19783 cat conftest.$ac_ext >&5
19784 cf_cv_cgetent_const=no
19785 fi
19786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19787
19788 fi
19789 echo "$as_me:19789: result: $cf_cv_cgetent_const" >&5
19790 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19791         if test "$cf_cv_cgetent_const" = yes
19792         then
19793
19794 cat >>confdefs.h <<EOF
19795 #define CGETENT_CONST const
19796 EOF
19797
19798         fi
19799 fi
19800
19801 fi
19802
19803 echo "$as_me:19803: checking for isascii" >&5
19804 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19805 if test "${cf_cv_have_isascii+set}" = set; then
19806   echo $ECHO_N "(cached) $ECHO_C" >&6
19807 else
19808
19809         cat >conftest.$ac_ext <<_ACEOF
19810 #line 19810 "configure"
19811 #include "confdefs.h"
19812 #include <ctype.h>
19813 int
19814 main (void)
19815 {
19816 int x = isascii(' ')
19817   ;
19818   return 0;
19819 }
19820 _ACEOF
19821 rm -f conftest.$ac_objext conftest$ac_exeext
19822 if { (eval echo "$as_me:19822: \"$ac_link\"") >&5
19823   (eval $ac_link) 2>&5
19824   ac_status=$?
19825   echo "$as_me:19825: \$? = $ac_status" >&5
19826   (exit $ac_status); } &&
19827          { ac_try='test -s conftest$ac_exeext'
19828   { (eval echo "$as_me:19828: \"$ac_try\"") >&5
19829   (eval $ac_try) 2>&5
19830   ac_status=$?
19831   echo "$as_me:19831: \$? = $ac_status" >&5
19832   (exit $ac_status); }; }; then
19833   cf_cv_have_isascii=yes
19834 else
19835   echo "$as_me: failed program was:" >&5
19836 cat conftest.$ac_ext >&5
19837 cf_cv_have_isascii=no
19838 fi
19839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19840
19841 fi
19842 echo "$as_me:19842: result: $cf_cv_have_isascii" >&5
19843 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19844 test "$cf_cv_have_isascii" = yes &&
19845 cat >>confdefs.h <<\EOF
19846 #define HAVE_ISASCII 1
19847 EOF
19848
19849 if test "$ac_cv_func_sigaction" = yes; then
19850 echo "$as_me:19850: checking whether sigaction needs _POSIX_SOURCE" >&5
19851 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19852 cat >conftest.$ac_ext <<_ACEOF
19853 #line 19853 "configure"
19854 #include "confdefs.h"
19855
19856 #include <sys/types.h>
19857 #include <signal.h>
19858 int
19859 main (void)
19860 {
19861 struct sigaction act
19862   ;
19863   return 0;
19864 }
19865 _ACEOF
19866 rm -f conftest.$ac_objext
19867 if { (eval echo "$as_me:19867: \"$ac_compile\"") >&5
19868   (eval $ac_compile) 2>&5
19869   ac_status=$?
19870   echo "$as_me:19870: \$? = $ac_status" >&5
19871   (exit $ac_status); } &&
19872          { ac_try='test -s conftest.$ac_objext'
19873   { (eval echo "$as_me:19873: \"$ac_try\"") >&5
19874   (eval $ac_try) 2>&5
19875   ac_status=$?
19876   echo "$as_me:19876: \$? = $ac_status" >&5
19877   (exit $ac_status); }; }; then
19878   sigact_bad=no
19879 else
19880   echo "$as_me: failed program was:" >&5
19881 cat conftest.$ac_ext >&5
19882
19883 cat >conftest.$ac_ext <<_ACEOF
19884 #line 19884 "configure"
19885 #include "confdefs.h"
19886
19887 #define _POSIX_SOURCE
19888 #include <sys/types.h>
19889 #include <signal.h>
19890 int
19891 main (void)
19892 {
19893 struct sigaction act
19894   ;
19895   return 0;
19896 }
19897 _ACEOF
19898 rm -f conftest.$ac_objext
19899 if { (eval echo "$as_me:19899: \"$ac_compile\"") >&5
19900   (eval $ac_compile) 2>&5
19901   ac_status=$?
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit $ac_status); } &&
19904          { ac_try='test -s conftest.$ac_objext'
19905   { (eval echo "$as_me:19905: \"$ac_try\"") >&5
19906   (eval $ac_try) 2>&5
19907   ac_status=$?
19908   echo "$as_me:19908: \$? = $ac_status" >&5
19909   (exit $ac_status); }; }; then
19910   sigact_bad=yes
19911
19912 cat >>confdefs.h <<\EOF
19913 #define _POSIX_SOURCE 1
19914 EOF
19915
19916 else
19917   echo "$as_me: failed program was:" >&5
19918 cat conftest.$ac_ext >&5
19919 sigact_bad=unknown
19920 fi
19921 rm -f conftest.$ac_objext conftest.$ac_ext
19922 fi
19923 rm -f conftest.$ac_objext conftest.$ac_ext
19924 echo "$as_me:19924: result: $sigact_bad" >&5
19925 echo "${ECHO_T}$sigact_bad" >&6
19926 fi
19927
19928 echo "$as_me:19928: checking if nanosleep really works" >&5
19929 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19930 if test "${cf_cv_func_nanosleep+set}" = set; then
19931   echo $ECHO_N "(cached) $ECHO_C" >&6
19932 else
19933
19934 if test "$cross_compiling" = yes; then
19935   cf_cv_func_nanosleep=unknown
19936 else
19937   cat >conftest.$ac_ext <<_ACEOF
19938 #line 19938 "configure"
19939 #include "confdefs.h"
19940
19941 #include <stdio.h>
19942 #include <errno.h>
19943 #include <time.h>
19944
19945 #ifdef HAVE_SYS_TIME_H
19946 #include <sys/time.h>
19947 #endif
19948
19949 int main(void) {
19950         struct timespec ts1, ts2;
19951         int code;
19952         ts1.tv_sec  = 0;
19953         ts1.tv_nsec = 750000000;
19954         ts2.tv_sec  = 0;
19955         ts2.tv_nsec = 0;
19956         errno = 0;
19957         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19958         ${cf_cv_main_return:-return}(code != 0);
19959 }
19960
19961 _ACEOF
19962 rm -f conftest$ac_exeext
19963 if { (eval echo "$as_me:19963: \"$ac_link\"") >&5
19964   (eval $ac_link) 2>&5
19965   ac_status=$?
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19968   { (eval echo "$as_me:19968: \"$ac_try\"") >&5
19969   (eval $ac_try) 2>&5
19970   ac_status=$?
19971   echo "$as_me:19971: \$? = $ac_status" >&5
19972   (exit $ac_status); }; }; then
19973   cf_cv_func_nanosleep=yes
19974 else
19975   echo "$as_me: program exited with status $ac_status" >&5
19976 echo "$as_me: failed program was:" >&5
19977 cat conftest.$ac_ext >&5
19978 cf_cv_func_nanosleep=no
19979 fi
19980 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19981 fi
19982 fi
19983 echo "$as_me:19983: result: $cf_cv_func_nanosleep" >&5
19984 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19985
19986 test "$cf_cv_func_nanosleep" = "yes" &&
19987 cat >>confdefs.h <<\EOF
19988 #define HAVE_NANOSLEEP 1
19989 EOF
19990
19991 for ac_header in \
19992 termio.h \
19993 termios.h \
19994 unistd.h \
19995 sys/ioctl.h \
19996 sys/termio.h \
19997
19998 do
19999 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20000 echo "$as_me:20000: checking for $ac_header" >&5
20001 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20002 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20003   echo $ECHO_N "(cached) $ECHO_C" >&6
20004 else
20005   cat >conftest.$ac_ext <<_ACEOF
20006 #line 20006 "configure"
20007 #include "confdefs.h"
20008 #include <$ac_header>
20009 _ACEOF
20010 if { (eval echo "$as_me:20010: \"$ac_cpp conftest.$ac_ext\"") >&5
20011   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20012   ac_status=$?
20013   egrep -v '^ *\+' conftest.er1 >conftest.err
20014   rm -f conftest.er1
20015   cat conftest.err >&5
20016   echo "$as_me:20016: \$? = $ac_status" >&5
20017   (exit $ac_status); } >/dev/null; then
20018   if test -s conftest.err; then
20019     ac_cpp_err=$ac_c_preproc_warn_flag
20020   else
20021     ac_cpp_err=
20022   fi
20023 else
20024   ac_cpp_err=yes
20025 fi
20026 if test -z "$ac_cpp_err"; then
20027   eval "$as_ac_Header=yes"
20028 else
20029   echo "$as_me: failed program was:" >&5
20030   cat conftest.$ac_ext >&5
20031   eval "$as_ac_Header=no"
20032 fi
20033 rm -f conftest.err conftest.$ac_ext
20034 fi
20035 echo "$as_me:20035: result: `eval echo '${'$as_ac_Header'}'`" >&5
20036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20037 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20038   cat >>confdefs.h <<EOF
20039 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20040 EOF
20041
20042 fi
20043 done
20044
20045 if test "$ac_cv_header_termios_h" = yes ; then
20046         case "$CFLAGS $CPPFLAGS" in
20047         (*-D_POSIX_SOURCE*)
20048                 termios_bad=dunno ;;
20049         (*)     termios_bad=maybe ;;
20050         esac
20051         if test "$termios_bad" = maybe ; then
20052         echo "$as_me:20052: checking whether termios.h needs _POSIX_SOURCE" >&5
20053 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20054         cat >conftest.$ac_ext <<_ACEOF
20055 #line 20055 "configure"
20056 #include "confdefs.h"
20057 #include <termios.h>
20058 int
20059 main (void)
20060 {
20061 struct termios foo; int x = foo.c_iflag
20062   ;
20063   return 0;
20064 }
20065 _ACEOF
20066 rm -f conftest.$ac_objext
20067 if { (eval echo "$as_me:20067: \"$ac_compile\"") >&5
20068   (eval $ac_compile) 2>&5
20069   ac_status=$?
20070   echo "$as_me:20070: \$? = $ac_status" >&5
20071   (exit $ac_status); } &&
20072          { ac_try='test -s conftest.$ac_objext'
20073   { (eval echo "$as_me:20073: \"$ac_try\"") >&5
20074   (eval $ac_try) 2>&5
20075   ac_status=$?
20076   echo "$as_me:20076: \$? = $ac_status" >&5
20077   (exit $ac_status); }; }; then
20078   termios_bad=no
20079 else
20080   echo "$as_me: failed program was:" >&5
20081 cat conftest.$ac_ext >&5
20082
20083                 cat >conftest.$ac_ext <<_ACEOF
20084 #line 20084 "configure"
20085 #include "confdefs.h"
20086
20087 #define _POSIX_SOURCE
20088 #include <termios.h>
20089 int
20090 main (void)
20091 {
20092 struct termios foo; int x = foo.c_iflag
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 rm -f conftest.$ac_objext
20098 if { (eval echo "$as_me:20098: \"$ac_compile\"") >&5
20099   (eval $ac_compile) 2>&5
20100   ac_status=$?
20101   echo "$as_me:20101: \$? = $ac_status" >&5
20102   (exit $ac_status); } &&
20103          { ac_try='test -s conftest.$ac_objext'
20104   { (eval echo "$as_me:20104: \"$ac_try\"") >&5
20105   (eval $ac_try) 2>&5
20106   ac_status=$?
20107   echo "$as_me:20107: \$? = $ac_status" >&5
20108   (exit $ac_status); }; }; then
20109   termios_bad=unknown
20110 else
20111   echo "$as_me: failed program was:" >&5
20112 cat conftest.$ac_ext >&5
20113 termios_bad=yes
20114 cat >>confdefs.h <<\EOF
20115 #define _POSIX_SOURCE 1
20116 EOF
20117
20118 fi
20119 rm -f conftest.$ac_objext conftest.$ac_ext
20120
20121 fi
20122 rm -f conftest.$ac_objext conftest.$ac_ext
20123         echo "$as_me:20123: result: $termios_bad" >&5
20124 echo "${ECHO_T}$termios_bad" >&6
20125         fi
20126 fi
20127
20128 echo "$as_me:20128: checking for tcgetattr" >&5
20129 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20130 if test "${cf_cv_have_tcgetattr+set}" = set; then
20131   echo $ECHO_N "(cached) $ECHO_C" >&6
20132 else
20133
20134 cat >conftest.$ac_ext <<_ACEOF
20135 #line 20135 "configure"
20136 #include "confdefs.h"
20137
20138 #include <sys/types.h>
20139 #ifdef HAVE_UNISTD_H
20140 #include <unistd.h>
20141 #endif
20142 #ifdef HAVE_TERMIOS_H
20143 #include <termios.h>
20144 #define TTY struct termios
20145 #else
20146 #ifdef HAVE_TERMIO_H
20147 #include <termio.h>
20148 #define TTY struct termio
20149 #endif
20150 #endif
20151
20152 int
20153 main (void)
20154 {
20155
20156 TTY foo;
20157 tcgetattr(1, &foo);
20158   ;
20159   return 0;
20160 }
20161 _ACEOF
20162 rm -f conftest.$ac_objext conftest$ac_exeext
20163 if { (eval echo "$as_me:20163: \"$ac_link\"") >&5
20164   (eval $ac_link) 2>&5
20165   ac_status=$?
20166   echo "$as_me:20166: \$? = $ac_status" >&5
20167   (exit $ac_status); } &&
20168          { ac_try='test -s conftest$ac_exeext'
20169   { (eval echo "$as_me:20169: \"$ac_try\"") >&5
20170   (eval $ac_try) 2>&5
20171   ac_status=$?
20172   echo "$as_me:20172: \$? = $ac_status" >&5
20173   (exit $ac_status); }; }; then
20174   cf_cv_have_tcgetattr=yes
20175 else
20176   echo "$as_me: failed program was:" >&5
20177 cat conftest.$ac_ext >&5
20178 cf_cv_have_tcgetattr=no
20179 fi
20180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20181 fi
20182 echo "$as_me:20182: result: $cf_cv_have_tcgetattr" >&5
20183 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20184 test "$cf_cv_have_tcgetattr" = yes &&
20185 cat >>confdefs.h <<\EOF
20186 #define HAVE_TCGETATTR 1
20187 EOF
20188
20189 echo "$as_me:20189: checking for vsscanf function or workaround" >&5
20190 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20191 if test "${cf_cv_func_vsscanf+set}" = set; then
20192   echo $ECHO_N "(cached) $ECHO_C" >&6
20193 else
20194
20195 cat >conftest.$ac_ext <<_ACEOF
20196 #line 20196 "configure"
20197 #include "confdefs.h"
20198
20199 #include <stdarg.h>
20200 #include <stdio.h>
20201 int
20202 main (void)
20203 {
20204
20205         va_list ap;
20206         vsscanf("from", "%d", ap)
20207   ;
20208   return 0;
20209 }
20210 _ACEOF
20211 rm -f conftest.$ac_objext conftest$ac_exeext
20212 if { (eval echo "$as_me:20212: \"$ac_link\"") >&5
20213   (eval $ac_link) 2>&5
20214   ac_status=$?
20215   echo "$as_me:20215: \$? = $ac_status" >&5
20216   (exit $ac_status); } &&
20217          { ac_try='test -s conftest$ac_exeext'
20218   { (eval echo "$as_me:20218: \"$ac_try\"") >&5
20219   (eval $ac_try) 2>&5
20220   ac_status=$?
20221   echo "$as_me:20221: \$? = $ac_status" >&5
20222   (exit $ac_status); }; }; then
20223   cf_cv_func_vsscanf=vsscanf
20224 else
20225   echo "$as_me: failed program was:" >&5
20226 cat conftest.$ac_ext >&5
20227
20228 cat >conftest.$ac_ext <<_ACEOF
20229 #line 20229 "configure"
20230 #include "confdefs.h"
20231
20232 #include <stdarg.h>
20233 #include <stdio.h>
20234 int
20235 main (void)
20236 {
20237
20238         FILE strbuf;
20239         char *str = "from";
20240
20241         strbuf._flag = _IOREAD;
20242         strbuf._ptr = strbuf._base = (unsigned char *) str;
20243         strbuf._cnt = strlen(str);
20244         strbuf._file = _NFILE;
20245         return (vfscanf(&strbuf, "%d", ap))
20246   ;
20247   return 0;
20248 }
20249 _ACEOF
20250 rm -f conftest.$ac_objext conftest$ac_exeext
20251 if { (eval echo "$as_me:20251: \"$ac_link\"") >&5
20252   (eval $ac_link) 2>&5
20253   ac_status=$?
20254   echo "$as_me:20254: \$? = $ac_status" >&5
20255   (exit $ac_status); } &&
20256          { ac_try='test -s conftest$ac_exeext'
20257   { (eval echo "$as_me:20257: \"$ac_try\"") >&5
20258   (eval $ac_try) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit $ac_status); }; }; then
20262   cf_cv_func_vsscanf=vfscanf
20263 else
20264   echo "$as_me: failed program was:" >&5
20265 cat conftest.$ac_ext >&5
20266
20267 cat >conftest.$ac_ext <<_ACEOF
20268 #line 20268 "configure"
20269 #include "confdefs.h"
20270
20271 #include <stdarg.h>
20272 #include <stdio.h>
20273 int
20274 main (void)
20275 {
20276
20277         FILE strbuf;
20278         char *str = "from";
20279
20280         strbuf._flag = _IOREAD;
20281         strbuf._ptr = strbuf._base = (unsigned char *) str;
20282         strbuf._cnt = strlen(str);
20283         strbuf._file = _NFILE;
20284         return (_doscan(&strbuf, "%d", ap))
20285   ;
20286   return 0;
20287 }
20288 _ACEOF
20289 rm -f conftest.$ac_objext conftest$ac_exeext
20290 if { (eval echo "$as_me:20290: \"$ac_link\"") >&5
20291   (eval $ac_link) 2>&5
20292   ac_status=$?
20293   echo "$as_me:20293: \$? = $ac_status" >&5
20294   (exit $ac_status); } &&
20295          { ac_try='test -s conftest$ac_exeext'
20296   { (eval echo "$as_me:20296: \"$ac_try\"") >&5
20297   (eval $ac_try) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); }; }; then
20301   cf_cv_func_vsscanf=_doscan
20302 else
20303   echo "$as_me: failed program was:" >&5
20304 cat conftest.$ac_ext >&5
20305
20306 cf_cv_func_vsscanf=no
20307 fi
20308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20309 fi
20310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20311 fi
20312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20313 fi
20314 echo "$as_me:20314: result: $cf_cv_func_vsscanf" >&5
20315 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20316
20317 case $cf_cv_func_vsscanf in
20318 (vsscanf)
20319 cat >>confdefs.h <<\EOF
20320 #define HAVE_VSSCANF 1
20321 EOF
20322 ;;
20323 (vfscanf)
20324 cat >>confdefs.h <<\EOF
20325 #define HAVE_VFSCANF 1
20326 EOF
20327 ;;
20328 (_doscan)
20329 cat >>confdefs.h <<\EOF
20330 #define HAVE__DOSCAN 1
20331 EOF
20332 ;;
20333 esac
20334
20335 for ac_header in \
20336 unistd.h \
20337
20338 do
20339 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20340 echo "$as_me:20340: checking for $ac_header" >&5
20341 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20342 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20343   echo $ECHO_N "(cached) $ECHO_C" >&6
20344 else
20345   cat >conftest.$ac_ext <<_ACEOF
20346 #line 20346 "configure"
20347 #include "confdefs.h"
20348 #include <$ac_header>
20349 _ACEOF
20350 if { (eval echo "$as_me:20350: \"$ac_cpp conftest.$ac_ext\"") >&5
20351   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20352   ac_status=$?
20353   egrep -v '^ *\+' conftest.er1 >conftest.err
20354   rm -f conftest.er1
20355   cat conftest.err >&5
20356   echo "$as_me:20356: \$? = $ac_status" >&5
20357   (exit $ac_status); } >/dev/null; then
20358   if test -s conftest.err; then
20359     ac_cpp_err=$ac_c_preproc_warn_flag
20360   else
20361     ac_cpp_err=
20362   fi
20363 else
20364   ac_cpp_err=yes
20365 fi
20366 if test -z "$ac_cpp_err"; then
20367   eval "$as_ac_Header=yes"
20368 else
20369   echo "$as_me: failed program was:" >&5
20370   cat conftest.$ac_ext >&5
20371   eval "$as_ac_Header=no"
20372 fi
20373 rm -f conftest.err conftest.$ac_ext
20374 fi
20375 echo "$as_me:20375: result: `eval echo '${'$as_ac_Header'}'`" >&5
20376 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20377 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20378   cat >>confdefs.h <<EOF
20379 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20380 EOF
20381
20382 fi
20383 done
20384
20385 echo "$as_me:20385: checking for working mkstemp" >&5
20386 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20387 if test "${cf_cv_func_mkstemp+set}" = set; then
20388   echo $ECHO_N "(cached) $ECHO_C" >&6
20389 else
20390
20391 rm -rf conftest*
20392 if test "$cross_compiling" = yes; then
20393   cf_cv_func_mkstemp=maybe
20394 else
20395   cat >conftest.$ac_ext <<_ACEOF
20396 #line 20396 "configure"
20397 #include "confdefs.h"
20398
20399 #include <sys/types.h>
20400 #ifdef HAVE_UNISTD_H
20401 #include <unistd.h>
20402 #endif
20403 #include <stdlib.h>
20404 #include <stdio.h>
20405 #include <string.h>
20406 #include <sys/stat.h>
20407 int main(void)
20408 {
20409         char *tmpl = "conftestXXXXXX";
20410         char name[2][80];
20411         int n;
20412         int result = 0;
20413         int fd;
20414         struct stat sb;
20415
20416         umask(077);
20417         for (n = 0; n < 2; ++n) {
20418                 strcpy(name[n], tmpl);
20419                 if ((fd = mkstemp(name[n])) >= 0) {
20420                         if (!strcmp(name[n], tmpl)
20421                          || stat(name[n], &sb) != 0
20422                          || (sb.st_mode & S_IFMT) != S_IFREG
20423                          || (sb.st_mode & 077) != 0) {
20424                                 result = 1;
20425                         }
20426                         close(fd);
20427                 }
20428         }
20429         if (result == 0
20430          && !strcmp(name[0], name[1]))
20431                 result = 1;
20432         ${cf_cv_main_return:-return}(result);
20433 }
20434
20435 _ACEOF
20436 rm -f conftest$ac_exeext
20437 if { (eval echo "$as_me:20437: \"$ac_link\"") >&5
20438   (eval $ac_link) 2>&5
20439   ac_status=$?
20440   echo "$as_me:20440: \$? = $ac_status" >&5
20441   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20442   { (eval echo "$as_me:20442: \"$ac_try\"") >&5
20443   (eval $ac_try) 2>&5
20444   ac_status=$?
20445   echo "$as_me:20445: \$? = $ac_status" >&5
20446   (exit $ac_status); }; }; then
20447   cf_cv_func_mkstemp=yes
20448
20449 else
20450   echo "$as_me: program exited with status $ac_status" >&5
20451 echo "$as_me: failed program was:" >&5
20452 cat conftest.$ac_ext >&5
20453 cf_cv_func_mkstemp=no
20454
20455 fi
20456 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20457 fi
20458
20459 fi
20460 echo "$as_me:20460: result: $cf_cv_func_mkstemp" >&5
20461 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20462 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20463         echo "$as_me:20463: checking for mkstemp" >&5
20464 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20465 if test "${ac_cv_func_mkstemp+set}" = set; then
20466   echo $ECHO_N "(cached) $ECHO_C" >&6
20467 else
20468   cat >conftest.$ac_ext <<_ACEOF
20469 #line 20469 "configure"
20470 #include "confdefs.h"
20471 #define mkstemp autoconf_temporary
20472 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20473 #undef mkstemp
20474
20475 #ifdef __cplusplus
20476 extern "C"
20477 #endif
20478
20479 /* We use char because int might match the return type of a gcc2
20480    builtin and then its argument prototype would still apply.  */
20481 char mkstemp (void);
20482
20483 int
20484 main (void)
20485 {
20486
20487 /* The GNU C library defines stubs for functions which it implements
20488     to always fail with ENOSYS.  Some functions are actually named
20489     something starting with __ and the normal name is an alias.  */
20490 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20491 #error found stub for mkstemp
20492 #endif
20493
20494         return mkstemp ();
20495   ;
20496   return 0;
20497 }
20498 _ACEOF
20499 rm -f conftest.$ac_objext conftest$ac_exeext
20500 if { (eval echo "$as_me:20500: \"$ac_link\"") >&5
20501   (eval $ac_link) 2>&5
20502   ac_status=$?
20503   echo "$as_me:20503: \$? = $ac_status" >&5
20504   (exit $ac_status); } &&
20505          { ac_try='test -s conftest$ac_exeext'
20506   { (eval echo "$as_me:20506: \"$ac_try\"") >&5
20507   (eval $ac_try) 2>&5
20508   ac_status=$?
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit $ac_status); }; }; then
20511   ac_cv_func_mkstemp=yes
20512 else
20513   echo "$as_me: failed program was:" >&5
20514 cat conftest.$ac_ext >&5
20515 ac_cv_func_mkstemp=no
20516 fi
20517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20518 fi
20519 echo "$as_me:20519: result: $ac_cv_func_mkstemp" >&5
20520 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20521
20522 fi
20523 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20524
20525 cat >>confdefs.h <<\EOF
20526 #define HAVE_MKSTEMP 1
20527 EOF
20528
20529 fi
20530
20531 # setup for prototype of fallback for vsscanf()
20532
20533 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20534         HAVE_VSSCANF=1
20535 else
20536         HAVE_VSSCANF=0
20537 fi
20538
20539 if test "x$cross_compiling" = xyes ; then
20540         { echo "$as_me:20540: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20541 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20542 else
20543         echo "$as_me:20543: checking whether setvbuf arguments are reversed" >&5
20544 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20545 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20546   echo $ECHO_N "(cached) $ECHO_C" >&6
20547 else
20548   if test "$cross_compiling" = yes; then
20549   { { echo "$as_me:20549: error: cannot run test program while cross compiling" >&5
20550 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20551    { (exit 1); exit 1; }; }
20552 else
20553   cat >conftest.$ac_ext <<_ACEOF
20554 #line 20554 "configure"
20555 #include "confdefs.h"
20556 #include <stdio.h>
20557 /* If setvbuf has the reversed format, exit 0. */
20558 int
20559 main (void)
20560 {
20561   /* This call has the arguments reversed.
20562      A reversed system may check and see that the address of main
20563      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20564   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20565     $ac_main_return(1);
20566   putc('\r', stdout);
20567   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20568 }
20569 _ACEOF
20570 rm -f conftest$ac_exeext
20571 if { (eval echo "$as_me:20571: \"$ac_link\"") >&5
20572   (eval $ac_link) 2>&5
20573   ac_status=$?
20574   echo "$as_me:20574: \$? = $ac_status" >&5
20575   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20576   { (eval echo "$as_me:20576: \"$ac_try\"") >&5
20577   (eval $ac_try) 2>&5
20578   ac_status=$?
20579   echo "$as_me:20579: \$? = $ac_status" >&5
20580   (exit $ac_status); }; }; then
20581   ac_cv_func_setvbuf_reversed=yes
20582 else
20583   echo "$as_me: program exited with status $ac_status" >&5
20584 echo "$as_me: failed program was:" >&5
20585 cat conftest.$ac_ext >&5
20586 ac_cv_func_setvbuf_reversed=no
20587 fi
20588 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20589 fi
20590 rm -f core core.* *.core
20591 fi
20592 echo "$as_me:20592: result: $ac_cv_func_setvbuf_reversed" >&5
20593 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20594 if test $ac_cv_func_setvbuf_reversed = yes; then
20595
20596 cat >>confdefs.h <<\EOF
20597 #define SETVBUF_REVERSED 1
20598 EOF
20599
20600 fi
20601
20602 fi
20603 echo "$as_me:20603: checking for intptr_t" >&5
20604 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20605 if test "${ac_cv_type_intptr_t+set}" = set; then
20606   echo $ECHO_N "(cached) $ECHO_C" >&6
20607 else
20608   cat >conftest.$ac_ext <<_ACEOF
20609 #line 20609 "configure"
20610 #include "confdefs.h"
20611 $ac_includes_default
20612 int
20613 main (void)
20614 {
20615 if ((intptr_t *) 0)
20616   return 0;
20617 if (sizeof (intptr_t))
20618   return 0;
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   ac_cv_type_intptr_t=yes
20636 else
20637   echo "$as_me: failed program was:" >&5
20638 cat conftest.$ac_ext >&5
20639 ac_cv_type_intptr_t=no
20640 fi
20641 rm -f conftest.$ac_objext conftest.$ac_ext
20642 fi
20643 echo "$as_me:20643: result: $ac_cv_type_intptr_t" >&5
20644 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20645 if test $ac_cv_type_intptr_t = yes; then
20646   :
20647 else
20648
20649 cat >>confdefs.h <<EOF
20650 #define intptr_t long
20651 EOF
20652
20653 fi
20654
20655 echo "$as_me:20655: checking for ssize_t" >&5
20656 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20657 if test "${ac_cv_type_ssize_t+set}" = set; then
20658   echo $ECHO_N "(cached) $ECHO_C" >&6
20659 else
20660   cat >conftest.$ac_ext <<_ACEOF
20661 #line 20661 "configure"
20662 #include "confdefs.h"
20663 $ac_includes_default
20664 int
20665 main (void)
20666 {
20667 if ((ssize_t *) 0)
20668   return 0;
20669 if (sizeof (ssize_t))
20670   return 0;
20671   ;
20672   return 0;
20673 }
20674 _ACEOF
20675 rm -f conftest.$ac_objext
20676 if { (eval echo "$as_me:20676: \"$ac_compile\"") >&5
20677   (eval $ac_compile) 2>&5
20678   ac_status=$?
20679   echo "$as_me:20679: \$? = $ac_status" >&5
20680   (exit $ac_status); } &&
20681          { ac_try='test -s conftest.$ac_objext'
20682   { (eval echo "$as_me:20682: \"$ac_try\"") >&5
20683   (eval $ac_try) 2>&5
20684   ac_status=$?
20685   echo "$as_me:20685: \$? = $ac_status" >&5
20686   (exit $ac_status); }; }; then
20687   ac_cv_type_ssize_t=yes
20688 else
20689   echo "$as_me: failed program was:" >&5
20690 cat conftest.$ac_ext >&5
20691 ac_cv_type_ssize_t=no
20692 fi
20693 rm -f conftest.$ac_objext conftest.$ac_ext
20694 fi
20695 echo "$as_me:20695: result: $ac_cv_type_ssize_t" >&5
20696 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20697 if test $ac_cv_type_ssize_t = yes; then
20698   :
20699 else
20700
20701 cat >>confdefs.h <<EOF
20702 #define ssize_t int
20703 EOF
20704
20705 fi
20706
20707 echo "$as_me:20707: checking for type sigaction_t" >&5
20708 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20709 if test "${cf_cv_type_sigaction+set}" = set; then
20710   echo $ECHO_N "(cached) $ECHO_C" >&6
20711 else
20712
20713         cat >conftest.$ac_ext <<_ACEOF
20714 #line 20714 "configure"
20715 #include "confdefs.h"
20716
20717 #include <signal.h>
20718 int
20719 main (void)
20720 {
20721 sigaction_t x
20722   ;
20723   return 0;
20724 }
20725 _ACEOF
20726 rm -f conftest.$ac_objext
20727 if { (eval echo "$as_me:20727: \"$ac_compile\"") >&5
20728   (eval $ac_compile) 2>&5
20729   ac_status=$?
20730   echo "$as_me:20730: \$? = $ac_status" >&5
20731   (exit $ac_status); } &&
20732          { ac_try='test -s conftest.$ac_objext'
20733   { (eval echo "$as_me:20733: \"$ac_try\"") >&5
20734   (eval $ac_try) 2>&5
20735   ac_status=$?
20736   echo "$as_me:20736: \$? = $ac_status" >&5
20737   (exit $ac_status); }; }; then
20738   cf_cv_type_sigaction=yes
20739 else
20740   echo "$as_me: failed program was:" >&5
20741 cat conftest.$ac_ext >&5
20742 cf_cv_type_sigaction=no
20743 fi
20744 rm -f conftest.$ac_objext conftest.$ac_ext
20745 fi
20746
20747 echo "$as_me:20747: result: $cf_cv_type_sigaction" >&5
20748 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20749 test "$cf_cv_type_sigaction" = yes &&
20750 cat >>confdefs.h <<\EOF
20751 #define HAVE_TYPE_SIGACTION 1
20752 EOF
20753
20754 echo "$as_me:20754: checking declaration of size-change" >&5
20755 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20756 if test "${cf_cv_sizechange+set}" = set; then
20757   echo $ECHO_N "(cached) $ECHO_C" >&6
20758 else
20759
20760         cf_cv_sizechange=unknown
20761         cf_save_CPPFLAGS="$CPPFLAGS"
20762
20763 for cf_opts in "" "NEED_PTEM_H"
20764 do
20765
20766         CPPFLAGS="$cf_save_CPPFLAGS"
20767         if test -n "$cf_opts"
20768         then
20769
20770         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20771         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20772
20773         fi
20774         cat >conftest.$ac_ext <<_ACEOF
20775 #line 20775 "configure"
20776 #include "confdefs.h"
20777 #include <sys/types.h>
20778 #ifdef HAVE_TERMIOS_H
20779 #include <termios.h>
20780 #else
20781 #ifdef HAVE_TERMIO_H
20782 #include <termio.h>
20783 #endif
20784 #endif
20785
20786 #ifdef NEED_PTEM_H
20787 /* This is a workaround for SCO:  they neglected to define struct winsize in
20788  * termios.h -- it's only in termio.h and ptem.h
20789  */
20790 #include <sys/stream.h>
20791 #include <sys/ptem.h>
20792 #endif
20793
20794 #ifdef HAVE_SYS_IOCTL_H
20795 #include <sys/ioctl.h>
20796 #endif
20797
20798 int
20799 main (void)
20800 {
20801
20802 #ifdef TIOCGSIZE
20803         struct ttysize win;     /* SunOS 3.0... */
20804         int y = win.ts_lines;
20805         int x = win.ts_cols;
20806 #else
20807 #ifdef TIOCGWINSZ
20808         struct winsize win;     /* everything else */
20809         int y = win.ws_row;
20810         int x = win.ws_col;
20811 #else
20812         no TIOCGSIZE or TIOCGWINSZ
20813 #endif /* TIOCGWINSZ */
20814 #endif /* TIOCGSIZE */
20815
20816   ;
20817   return 0;
20818 }
20819 _ACEOF
20820 rm -f conftest.$ac_objext
20821 if { (eval echo "$as_me:20821: \"$ac_compile\"") >&5
20822   (eval $ac_compile) 2>&5
20823   ac_status=$?
20824   echo "$as_me:20824: \$? = $ac_status" >&5
20825   (exit $ac_status); } &&
20826          { ac_try='test -s conftest.$ac_objext'
20827   { (eval echo "$as_me:20827: \"$ac_try\"") >&5
20828   (eval $ac_try) 2>&5
20829   ac_status=$?
20830   echo "$as_me:20830: \$? = $ac_status" >&5
20831   (exit $ac_status); }; }; then
20832   cf_cv_sizechange=yes
20833 else
20834   echo "$as_me: failed program was:" >&5
20835 cat conftest.$ac_ext >&5
20836 cf_cv_sizechange=no
20837 fi
20838 rm -f conftest.$ac_objext conftest.$ac_ext
20839
20840         CPPFLAGS="$cf_save_CPPFLAGS"
20841         if test "$cf_cv_sizechange" = yes ; then
20842                 echo "size-change succeeded ($cf_opts)" >&5
20843                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20844                 break
20845         fi
20846 done
20847
20848 fi
20849 echo "$as_me:20849: result: $cf_cv_sizechange" >&5
20850 echo "${ECHO_T}$cf_cv_sizechange" >&6
20851 if test "$cf_cv_sizechange" != no ; then
20852
20853 cat >>confdefs.h <<\EOF
20854 #define HAVE_SIZECHANGE 1
20855 EOF
20856
20857         case $cf_cv_sizechange in
20858         (NEED*)
20859                 cat >>confdefs.h <<EOF
20860 #define $cf_cv_sizechange  1
20861 EOF
20862
20863                 ;;
20864         esac
20865 fi
20866
20867 echo "$as_me:20867: checking for memmove" >&5
20868 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20869 if test "${ac_cv_func_memmove+set}" = set; then
20870   echo $ECHO_N "(cached) $ECHO_C" >&6
20871 else
20872   cat >conftest.$ac_ext <<_ACEOF
20873 #line 20873 "configure"
20874 #include "confdefs.h"
20875 #define memmove autoconf_temporary
20876 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20877 #undef memmove
20878
20879 #ifdef __cplusplus
20880 extern "C"
20881 #endif
20882
20883 /* We use char because int might match the return type of a gcc2
20884    builtin and then its argument prototype would still apply.  */
20885 char memmove (void);
20886
20887 int
20888 main (void)
20889 {
20890
20891 /* The GNU C library defines stubs for functions which it implements
20892     to always fail with ENOSYS.  Some functions are actually named
20893     something starting with __ and the normal name is an alias.  */
20894 #if defined (__stub_memmove) || defined (__stub___memmove)
20895 #error found stub for memmove
20896 #endif
20897
20898         return memmove ();
20899   ;
20900   return 0;
20901 }
20902 _ACEOF
20903 rm -f conftest.$ac_objext conftest$ac_exeext
20904 if { (eval echo "$as_me:20904: \"$ac_link\"") >&5
20905   (eval $ac_link) 2>&5
20906   ac_status=$?
20907   echo "$as_me:20907: \$? = $ac_status" >&5
20908   (exit $ac_status); } &&
20909          { ac_try='test -s conftest$ac_exeext'
20910   { (eval echo "$as_me:20910: \"$ac_try\"") >&5
20911   (eval $ac_try) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); }; }; then
20915   ac_cv_func_memmove=yes
20916 else
20917   echo "$as_me: failed program was:" >&5
20918 cat conftest.$ac_ext >&5
20919 ac_cv_func_memmove=no
20920 fi
20921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20922 fi
20923 echo "$as_me:20923: result: $ac_cv_func_memmove" >&5
20924 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20925 if test $ac_cv_func_memmove = yes; then
20926   :
20927 else
20928
20929 echo "$as_me:20929: checking for bcopy" >&5
20930 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20931 if test "${ac_cv_func_bcopy+set}" = set; then
20932   echo $ECHO_N "(cached) $ECHO_C" >&6
20933 else
20934   cat >conftest.$ac_ext <<_ACEOF
20935 #line 20935 "configure"
20936 #include "confdefs.h"
20937 #define bcopy autoconf_temporary
20938 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20939 #undef bcopy
20940
20941 #ifdef __cplusplus
20942 extern "C"
20943 #endif
20944
20945 /* We use char because int might match the return type of a gcc2
20946    builtin and then its argument prototype would still apply.  */
20947 char bcopy (void);
20948
20949 int
20950 main (void)
20951 {
20952
20953 /* The GNU C library defines stubs for functions which it implements
20954     to always fail with ENOSYS.  Some functions are actually named
20955     something starting with __ and the normal name is an alias.  */
20956 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20957 #error found stub for bcopy
20958 #endif
20959
20960         return bcopy ();
20961   ;
20962   return 0;
20963 }
20964 _ACEOF
20965 rm -f conftest.$ac_objext conftest$ac_exeext
20966 if { (eval echo "$as_me:20966: \"$ac_link\"") >&5
20967   (eval $ac_link) 2>&5
20968   ac_status=$?
20969   echo "$as_me:20969: \$? = $ac_status" >&5
20970   (exit $ac_status); } &&
20971          { ac_try='test -s conftest$ac_exeext'
20972   { (eval echo "$as_me:20972: \"$ac_try\"") >&5
20973   (eval $ac_try) 2>&5
20974   ac_status=$?
20975   echo "$as_me:20975: \$? = $ac_status" >&5
20976   (exit $ac_status); }; }; then
20977   ac_cv_func_bcopy=yes
20978 else
20979   echo "$as_me: failed program was:" >&5
20980 cat conftest.$ac_ext >&5
20981 ac_cv_func_bcopy=no
20982 fi
20983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20984 fi
20985 echo "$as_me:20985: result: $ac_cv_func_bcopy" >&5
20986 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20987 if test $ac_cv_func_bcopy = yes; then
20988
20989         echo "$as_me:20989: checking if bcopy does overlapping moves" >&5
20990 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20991 if test "${cf_cv_good_bcopy+set}" = set; then
20992   echo $ECHO_N "(cached) $ECHO_C" >&6
20993 else
20994
20995                 if test "$cross_compiling" = yes; then
20996   cf_cv_good_bcopy=unknown
20997 else
20998   cat >conftest.$ac_ext <<_ACEOF
20999 #line 20999 "configure"
21000 #include "confdefs.h"
21001
21002 int main(void) {
21003         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21004         char temp[40];
21005         bcopy(data, temp, sizeof(data));
21006         bcopy(temp+10, temp, 15);
21007         bcopy(temp+5, temp+15, 10);
21008         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21009 }
21010
21011 _ACEOF
21012 rm -f conftest$ac_exeext
21013 if { (eval echo "$as_me:21013: \"$ac_link\"") >&5
21014   (eval $ac_link) 2>&5
21015   ac_status=$?
21016   echo "$as_me:21016: \$? = $ac_status" >&5
21017   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21018   { (eval echo "$as_me:21018: \"$ac_try\"") >&5
21019   (eval $ac_try) 2>&5
21020   ac_status=$?
21021   echo "$as_me:21021: \$? = $ac_status" >&5
21022   (exit $ac_status); }; }; then
21023   cf_cv_good_bcopy=yes
21024 else
21025   echo "$as_me: program exited with status $ac_status" >&5
21026 echo "$as_me: failed program was:" >&5
21027 cat conftest.$ac_ext >&5
21028 cf_cv_good_bcopy=no
21029 fi
21030 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21031 fi
21032
21033 fi
21034 echo "$as_me:21034: result: $cf_cv_good_bcopy" >&5
21035 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21036
21037 else
21038   cf_cv_good_bcopy=no
21039 fi
21040
21041         if test "$cf_cv_good_bcopy" = yes ; then
21042
21043 cat >>confdefs.h <<\EOF
21044 #define USE_OK_BCOPY 1
21045 EOF
21046
21047         else
21048
21049 cat >>confdefs.h <<\EOF
21050 #define USE_MY_MEMMOVE 1
21051 EOF
21052
21053         fi
21054
21055 fi
21056
21057 tty 2>&1 >/dev/null || {
21058 for ac_func in posix_openpt
21059 do
21060 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21061 echo "$as_me:21061: checking for $ac_func" >&5
21062 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21063 if eval "test \"\${$as_ac_var+set}\" = set"; then
21064   echo $ECHO_N "(cached) $ECHO_C" >&6
21065 else
21066   cat >conftest.$ac_ext <<_ACEOF
21067 #line 21067 "configure"
21068 #include "confdefs.h"
21069 #define $ac_func autoconf_temporary
21070 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21071 #undef $ac_func
21072
21073 #ifdef __cplusplus
21074 extern "C"
21075 #endif
21076
21077 /* We use char because int might match the return type of a gcc2
21078    builtin and then its argument prototype would still apply.  */
21079 char $ac_func (void);
21080
21081 int
21082 main (void)
21083 {
21084
21085 /* The GNU C library defines stubs for functions which it implements
21086     to always fail with ENOSYS.  Some functions are actually named
21087     something starting with __ and the normal name is an alias.  */
21088 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21089 #error found stub for $ac_func
21090 #endif
21091
21092         return $ac_func ();
21093   ;
21094   return 0;
21095 }
21096 _ACEOF
21097 rm -f conftest.$ac_objext conftest$ac_exeext
21098 if { (eval echo "$as_me:21098: \"$ac_link\"") >&5
21099   (eval $ac_link) 2>&5
21100   ac_status=$?
21101   echo "$as_me:21101: \$? = $ac_status" >&5
21102   (exit $ac_status); } &&
21103          { ac_try='test -s conftest$ac_exeext'
21104   { (eval echo "$as_me:21104: \"$ac_try\"") >&5
21105   (eval $ac_try) 2>&5
21106   ac_status=$?
21107   echo "$as_me:21107: \$? = $ac_status" >&5
21108   (exit $ac_status); }; }; then
21109   eval "$as_ac_var=yes"
21110 else
21111   echo "$as_me: failed program was:" >&5
21112 cat conftest.$ac_ext >&5
21113 eval "$as_ac_var=no"
21114 fi
21115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21116 fi
21117 echo "$as_me:21117: result: `eval echo '${'$as_ac_var'}'`" >&5
21118 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21119 if test `eval echo '${'$as_ac_var'}'` = yes; then
21120   cat >>confdefs.h <<EOF
21121 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21122 EOF
21123
21124 fi
21125 done
21126  }
21127 echo "$as_me:21127: checking if poll really works" >&5
21128 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21129 if test "${cf_cv_working_poll+set}" = set; then
21130   echo $ECHO_N "(cached) $ECHO_C" >&6
21131 else
21132
21133 if test "$cross_compiling" = yes; then
21134   cf_cv_working_poll=unknown
21135 else
21136   cat >conftest.$ac_ext <<_ACEOF
21137 #line 21137 "configure"
21138 #include "confdefs.h"
21139
21140 #include <stdlib.h>
21141 #include <stdio.h>
21142 #include <unistd.h>
21143 #include <fcntl.h>
21144 #ifdef HAVE_POLL_H
21145 #include <poll.h>
21146 #else
21147 #include <sys/poll.h>
21148 #endif
21149 int main(void) {
21150         struct pollfd myfds;
21151         int ret;
21152
21153         /* check for Darwin bug with respect to "devices" */
21154         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21155         if (myfds.fd < 0)
21156                 myfds.fd = 0;
21157         myfds.events = POLLIN;
21158         myfds.revents = 0;
21159
21160         ret = poll(&myfds, 1, 100);
21161
21162         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21163                 ret = -1;
21164         } else {
21165                 int fd = 0;
21166                 if (!isatty(fd)) {
21167                         fd = open("/dev/tty", 2);       /* O_RDWR */
21168                 }
21169 #ifdef HAVE_POSIX_OPENPT
21170                 if (fd < 0) {
21171                         fd = posix_openpt(O_RDWR);
21172                 }
21173 #endif
21174
21175                 if (fd >= 0) {
21176                         /* also check with standard input */
21177                         myfds.fd = fd;
21178                         myfds.events = POLLIN;
21179                         myfds.revents = 0;
21180                         ret = poll(&myfds, 1, 100);
21181                 } else {
21182                         ret = -1;
21183                 }
21184         }
21185         ${cf_cv_main_return:-return}(ret < 0);
21186 }
21187 _ACEOF
21188 rm -f conftest$ac_exeext
21189 if { (eval echo "$as_me:21189: \"$ac_link\"") >&5
21190   (eval $ac_link) 2>&5
21191   ac_status=$?
21192   echo "$as_me:21192: \$? = $ac_status" >&5
21193   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21194   { (eval echo "$as_me:21194: \"$ac_try\"") >&5
21195   (eval $ac_try) 2>&5
21196   ac_status=$?
21197   echo "$as_me:21197: \$? = $ac_status" >&5
21198   (exit $ac_status); }; }; then
21199   cf_cv_working_poll=yes
21200 else
21201   echo "$as_me: program exited with status $ac_status" >&5
21202 echo "$as_me: failed program was:" >&5
21203 cat conftest.$ac_ext >&5
21204 cf_cv_working_poll=no
21205 fi
21206 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21207 fi
21208 fi
21209 echo "$as_me:21209: result: $cf_cv_working_poll" >&5
21210 echo "${ECHO_T}$cf_cv_working_poll" >&6
21211 test "$cf_cv_working_poll" = "yes" &&
21212 cat >>confdefs.h <<\EOF
21213 #define HAVE_WORKING_POLL 1
21214 EOF
21215
21216 echo "$as_me:21216: checking for va_copy" >&5
21217 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21218 if test "${cf_cv_have_va_copy+set}" = set; then
21219   echo $ECHO_N "(cached) $ECHO_C" >&6
21220 else
21221
21222 cat >conftest.$ac_ext <<_ACEOF
21223 #line 21223 "configure"
21224 #include "confdefs.h"
21225
21226 #include <stdarg.h>
21227
21228 int
21229 main (void)
21230 {
21231
21232         static va_list dst;
21233         static va_list src;
21234         va_copy(dst, src)
21235   ;
21236   return 0;
21237 }
21238 _ACEOF
21239 rm -f conftest.$ac_objext conftest$ac_exeext
21240 if { (eval echo "$as_me:21240: \"$ac_link\"") >&5
21241   (eval $ac_link) 2>&5
21242   ac_status=$?
21243   echo "$as_me:21243: \$? = $ac_status" >&5
21244   (exit $ac_status); } &&
21245          { ac_try='test -s conftest$ac_exeext'
21246   { (eval echo "$as_me:21246: \"$ac_try\"") >&5
21247   (eval $ac_try) 2>&5
21248   ac_status=$?
21249   echo "$as_me:21249: \$? = $ac_status" >&5
21250   (exit $ac_status); }; }; then
21251   cf_cv_have_va_copy=yes
21252 else
21253   echo "$as_me: failed program was:" >&5
21254 cat conftest.$ac_ext >&5
21255 cf_cv_have_va_copy=no
21256 fi
21257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21258 fi
21259 echo "$as_me:21259: result: $cf_cv_have_va_copy" >&5
21260 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21261
21262 if test "$cf_cv_have_va_copy" = yes;
21263 then
21264
21265 cat >>confdefs.h <<\EOF
21266 #define HAVE_VA_COPY 1
21267 EOF
21268
21269 else # !cf_cv_have_va_copy
21270
21271 echo "$as_me:21271: checking for __va_copy" >&5
21272 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21273 if test "${cf_cv_have___va_copy+set}" = set; then
21274   echo $ECHO_N "(cached) $ECHO_C" >&6
21275 else
21276
21277 cat >conftest.$ac_ext <<_ACEOF
21278 #line 21278 "configure"
21279 #include "confdefs.h"
21280
21281 #include <stdarg.h>
21282
21283 int
21284 main (void)
21285 {
21286
21287         static va_list dst;
21288         static va_list src;
21289         __va_copy(dst, src)
21290   ;
21291   return 0;
21292 }
21293 _ACEOF
21294 rm -f conftest.$ac_objext conftest$ac_exeext
21295 if { (eval echo "$as_me:21295: \"$ac_link\"") >&5
21296   (eval $ac_link) 2>&5
21297   ac_status=$?
21298   echo "$as_me:21298: \$? = $ac_status" >&5
21299   (exit $ac_status); } &&
21300          { ac_try='test -s conftest$ac_exeext'
21301   { (eval echo "$as_me:21301: \"$ac_try\"") >&5
21302   (eval $ac_try) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit $ac_status); }; }; then
21306   cf_cv_have___va_copy=yes
21307 else
21308   echo "$as_me: failed program was:" >&5
21309 cat conftest.$ac_ext >&5
21310 cf_cv_have___va_copy=no
21311 fi
21312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21313 fi
21314 echo "$as_me:21314: result: $cf_cv_have___va_copy" >&5
21315 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21316
21317 if test "$cf_cv_have___va_copy" = yes
21318 then
21319
21320 cat >>confdefs.h <<\EOF
21321 #define HAVE___VA_COPY 1
21322 EOF
21323
21324 else # !cf_cv_have___va_copy
21325
21326 echo "$as_me:21326: checking for __builtin_va_copy" >&5
21327 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21328 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21329   echo $ECHO_N "(cached) $ECHO_C" >&6
21330 else
21331
21332 cat >conftest.$ac_ext <<_ACEOF
21333 #line 21333 "configure"
21334 #include "confdefs.h"
21335
21336 #include <stdarg.h>
21337
21338 int
21339 main (void)
21340 {
21341
21342         static va_list dst;
21343         static va_list src;
21344         __builtin_va_copy(dst, src)
21345   ;
21346   return 0;
21347 }
21348 _ACEOF
21349 rm -f conftest.$ac_objext conftest$ac_exeext
21350 if { (eval echo "$as_me:21350: \"$ac_link\"") >&5
21351   (eval $ac_link) 2>&5
21352   ac_status=$?
21353   echo "$as_me:21353: \$? = $ac_status" >&5
21354   (exit $ac_status); } &&
21355          { ac_try='test -s conftest$ac_exeext'
21356   { (eval echo "$as_me:21356: \"$ac_try\"") >&5
21357   (eval $ac_try) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit $ac_status); }; }; then
21361   cf_cv_have___builtin_va_copy=yes
21362 else
21363   echo "$as_me: failed program was:" >&5
21364 cat conftest.$ac_ext >&5
21365 cf_cv_have___builtin_va_copy=no
21366 fi
21367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21368 fi
21369 echo "$as_me:21369: result: $cf_cv_have___builtin_va_copy" >&5
21370 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21371
21372 test "$cf_cv_have___builtin_va_copy" = yes &&
21373
21374 cat >>confdefs.h <<\EOF
21375 #define HAVE___BUILTIN_VA_COPY 1
21376 EOF
21377
21378 fi # cf_cv_have___va_copy
21379
21380 fi # cf_cv_have_va_copy
21381
21382 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21383 (*yes*)
21384         ;;
21385
21386 (*)
21387         echo "$as_me:21387: checking if we can simply copy va_list" >&5
21388 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21389 if test "${cf_cv_pointer_va_list+set}" = set; then
21390   echo $ECHO_N "(cached) $ECHO_C" >&6
21391 else
21392
21393 cat >conftest.$ac_ext <<_ACEOF
21394 #line 21394 "configure"
21395 #include "confdefs.h"
21396
21397 #include <stdarg.h>
21398
21399 int
21400 main (void)
21401 {
21402
21403         va_list dst;
21404         va_list src;
21405         dst = src
21406   ;
21407   return 0;
21408 }
21409 _ACEOF
21410 rm -f conftest.$ac_objext conftest$ac_exeext
21411 if { (eval echo "$as_me:21411: \"$ac_link\"") >&5
21412   (eval $ac_link) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit $ac_status); } &&
21416          { ac_try='test -s conftest$ac_exeext'
21417   { (eval echo "$as_me:21417: \"$ac_try\"") >&5
21418   (eval $ac_try) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit $ac_status); }; }; then
21422   cf_cv_pointer_va_list=yes
21423 else
21424   echo "$as_me: failed program was:" >&5
21425 cat conftest.$ac_ext >&5
21426 cf_cv_pointer_va_list=no
21427 fi
21428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21429 fi
21430 echo "$as_me:21430: result: $cf_cv_pointer_va_list" >&5
21431 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21432
21433         if test "$cf_cv_pointer_va_list" = no
21434         then
21435                 echo "$as_me:21435: checking if we can copy va_list indirectly" >&5
21436 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21437 if test "${cf_cv_array_va_list+set}" = set; then
21438   echo $ECHO_N "(cached) $ECHO_C" >&6
21439 else
21440
21441 cat >conftest.$ac_ext <<_ACEOF
21442 #line 21442 "configure"
21443 #include "confdefs.h"
21444
21445 #include <stdarg.h>
21446
21447 int
21448 main (void)
21449 {
21450
21451         va_list dst;
21452         va_list src;
21453         *dst = *src
21454   ;
21455   return 0;
21456 }
21457 _ACEOF
21458 rm -f conftest.$ac_objext conftest$ac_exeext
21459 if { (eval echo "$as_me:21459: \"$ac_link\"") >&5
21460   (eval $ac_link) 2>&5
21461   ac_status=$?
21462   echo "$as_me:21462: \$? = $ac_status" >&5
21463   (exit $ac_status); } &&
21464          { ac_try='test -s conftest$ac_exeext'
21465   { (eval echo "$as_me:21465: \"$ac_try\"") >&5
21466   (eval $ac_try) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit $ac_status); }; }; then
21470   cf_cv_array_va_list=yes
21471 else
21472   echo "$as_me: failed program was:" >&5
21473 cat conftest.$ac_ext >&5
21474 cf_cv_array_va_list=no
21475 fi
21476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21477 fi
21478 echo "$as_me:21478: result: $cf_cv_array_va_list" >&5
21479 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21480                 test "$cf_cv_array_va_list" = yes &&
21481 cat >>confdefs.h <<\EOF
21482 #define ARRAY_VA_LIST 1
21483 EOF
21484
21485         fi
21486         ;;
21487 esac
21488
21489 echo "$as_me:21489: checking for pid_t" >&5
21490 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21491 if test "${ac_cv_type_pid_t+set}" = set; then
21492   echo $ECHO_N "(cached) $ECHO_C" >&6
21493 else
21494   cat >conftest.$ac_ext <<_ACEOF
21495 #line 21495 "configure"
21496 #include "confdefs.h"
21497 $ac_includes_default
21498 int
21499 main (void)
21500 {
21501 if ((pid_t *) 0)
21502   return 0;
21503 if (sizeof (pid_t))
21504   return 0;
21505   ;
21506   return 0;
21507 }
21508 _ACEOF
21509 rm -f conftest.$ac_objext
21510 if { (eval echo "$as_me:21510: \"$ac_compile\"") >&5
21511   (eval $ac_compile) 2>&5
21512   ac_status=$?
21513   echo "$as_me:21513: \$? = $ac_status" >&5
21514   (exit $ac_status); } &&
21515          { ac_try='test -s conftest.$ac_objext'
21516   { (eval echo "$as_me:21516: \"$ac_try\"") >&5
21517   (eval $ac_try) 2>&5
21518   ac_status=$?
21519   echo "$as_me:21519: \$? = $ac_status" >&5
21520   (exit $ac_status); }; }; then
21521   ac_cv_type_pid_t=yes
21522 else
21523   echo "$as_me: failed program was:" >&5
21524 cat conftest.$ac_ext >&5
21525 ac_cv_type_pid_t=no
21526 fi
21527 rm -f conftest.$ac_objext conftest.$ac_ext
21528 fi
21529 echo "$as_me:21529: result: $ac_cv_type_pid_t" >&5
21530 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21531 if test $ac_cv_type_pid_t = yes; then
21532   :
21533 else
21534
21535 cat >>confdefs.h <<EOF
21536 #define pid_t int
21537 EOF
21538
21539 fi
21540
21541 for ac_header in unistd.h vfork.h
21542 do
21543 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21544 echo "$as_me:21544: checking for $ac_header" >&5
21545 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21546 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21547   echo $ECHO_N "(cached) $ECHO_C" >&6
21548 else
21549   cat >conftest.$ac_ext <<_ACEOF
21550 #line 21550 "configure"
21551 #include "confdefs.h"
21552 #include <$ac_header>
21553 _ACEOF
21554 if { (eval echo "$as_me:21554: \"$ac_cpp conftest.$ac_ext\"") >&5
21555   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21556   ac_status=$?
21557   egrep -v '^ *\+' conftest.er1 >conftest.err
21558   rm -f conftest.er1
21559   cat conftest.err >&5
21560   echo "$as_me:21560: \$? = $ac_status" >&5
21561   (exit $ac_status); } >/dev/null; then
21562   if test -s conftest.err; then
21563     ac_cpp_err=$ac_c_preproc_warn_flag
21564   else
21565     ac_cpp_err=
21566   fi
21567 else
21568   ac_cpp_err=yes
21569 fi
21570 if test -z "$ac_cpp_err"; then
21571   eval "$as_ac_Header=yes"
21572 else
21573   echo "$as_me: failed program was:" >&5
21574   cat conftest.$ac_ext >&5
21575   eval "$as_ac_Header=no"
21576 fi
21577 rm -f conftest.err conftest.$ac_ext
21578 fi
21579 echo "$as_me:21579: result: `eval echo '${'$as_ac_Header'}'`" >&5
21580 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21582   cat >>confdefs.h <<EOF
21583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21584 EOF
21585
21586 fi
21587 done
21588
21589 for ac_func in fork vfork
21590 do
21591 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21592 echo "$as_me:21592: checking for $ac_func" >&5
21593 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21594 if eval "test \"\${$as_ac_var+set}\" = set"; then
21595   echo $ECHO_N "(cached) $ECHO_C" >&6
21596 else
21597   cat >conftest.$ac_ext <<_ACEOF
21598 #line 21598 "configure"
21599 #include "confdefs.h"
21600 #define $ac_func autoconf_temporary
21601 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21602 #undef $ac_func
21603
21604 #ifdef __cplusplus
21605 extern "C"
21606 #endif
21607
21608 /* We use char because int might match the return type of a gcc2
21609    builtin and then its argument prototype would still apply.  */
21610 char $ac_func (void);
21611
21612 int
21613 main (void)
21614 {
21615
21616 /* The GNU C library defines stubs for functions which it implements
21617     to always fail with ENOSYS.  Some functions are actually named
21618     something starting with __ and the normal name is an alias.  */
21619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21620 #error found stub for $ac_func
21621 #endif
21622
21623         return $ac_func ();
21624   ;
21625   return 0;
21626 }
21627 _ACEOF
21628 rm -f conftest.$ac_objext conftest$ac_exeext
21629 if { (eval echo "$as_me:21629: \"$ac_link\"") >&5
21630   (eval $ac_link) 2>&5
21631   ac_status=$?
21632   echo "$as_me:21632: \$? = $ac_status" >&5
21633   (exit $ac_status); } &&
21634          { ac_try='test -s conftest$ac_exeext'
21635   { (eval echo "$as_me:21635: \"$ac_try\"") >&5
21636   (eval $ac_try) 2>&5
21637   ac_status=$?
21638   echo "$as_me:21638: \$? = $ac_status" >&5
21639   (exit $ac_status); }; }; then
21640   eval "$as_ac_var=yes"
21641 else
21642   echo "$as_me: failed program was:" >&5
21643 cat conftest.$ac_ext >&5
21644 eval "$as_ac_var=no"
21645 fi
21646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21647 fi
21648 echo "$as_me:21648: result: `eval echo '${'$as_ac_var'}'`" >&5
21649 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21650 if test `eval echo '${'$as_ac_var'}'` = yes; then
21651   cat >>confdefs.h <<EOF
21652 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21653 EOF
21654
21655 fi
21656 done
21657
21658 ac_cv_func_fork_works=$ac_cv_func_fork
21659 if test "x$ac_cv_func_fork" = xyes; then
21660   echo "$as_me:21660: checking for working fork" >&5
21661 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21662 if test "${ac_cv_func_fork_works+set}" = set; then
21663   echo $ECHO_N "(cached) $ECHO_C" >&6
21664 else
21665   if test "$cross_compiling" = yes; then
21666   ac_cv_func_fork_works=cross
21667 else
21668   cat >conftest.$ac_ext <<_ACEOF
21669 /* By Rüdiger Kuhlmann. */
21670       #include <sys/types.h>
21671       #if HAVE_UNISTD_H
21672       # include <unistd.h>
21673       #endif
21674       /* Some systems only have a dummy stub for fork() */
21675       int main (void)
21676       {
21677         if (fork() < 0)
21678           $ac_main_return (1);
21679         $ac_main_return (0);
21680       }
21681 _ACEOF
21682 rm -f conftest$ac_exeext
21683 if { (eval echo "$as_me:21683: \"$ac_link\"") >&5
21684   (eval $ac_link) 2>&5
21685   ac_status=$?
21686   echo "$as_me:21686: \$? = $ac_status" >&5
21687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21688   { (eval echo "$as_me:21688: \"$ac_try\"") >&5
21689   (eval $ac_try) 2>&5
21690   ac_status=$?
21691   echo "$as_me:21691: \$? = $ac_status" >&5
21692   (exit $ac_status); }; }; then
21693   ac_cv_func_fork_works=yes
21694 else
21695   echo "$as_me: program exited with status $ac_status" >&5
21696 echo "$as_me: failed program was:" >&5
21697 cat conftest.$ac_ext >&5
21698 ac_cv_func_fork_works=no
21699 fi
21700 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21701 fi
21702 fi
21703 echo "$as_me:21703: result: $ac_cv_func_fork_works" >&5
21704 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21705
21706 fi
21707 if test "x$ac_cv_func_fork_works" = xcross; then
21708   case $host in
21709     *-*-amigaos* | *-*-msdosdjgpp*)
21710       # Override, as these systems have only a dummy fork() stub
21711       ac_cv_func_fork_works=no
21712       ;;
21713     *)
21714       ac_cv_func_fork_works=yes
21715       ;;
21716   esac
21717   { echo "$as_me:21717: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21718 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21719 fi
21720 ac_cv_func_vfork_works=$ac_cv_func_vfork
21721 if test "x$ac_cv_func_vfork" = xyes; then
21722   echo "$as_me:21722: checking for working vfork" >&5
21723 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21724 if test "${ac_cv_func_vfork_works+set}" = set; then
21725   echo $ECHO_N "(cached) $ECHO_C" >&6
21726 else
21727   if test "$cross_compiling" = yes; then
21728   ac_cv_func_vfork_works=cross
21729 else
21730   cat >conftest.$ac_ext <<_ACEOF
21731 #line 21731 "configure"
21732 #include "confdefs.h"
21733 /* Thanks to Paul Eggert for this test.  */
21734 #include <stdio.h>
21735 #include <sys/types.h>
21736 #include <sys/stat.h>
21737 #if HAVE_UNISTD_H
21738 # include <unistd.h>
21739 #endif
21740 #if HAVE_VFORK_H
21741 # include <vfork.h>
21742 #endif
21743 /* On some sparc systems, changes by the child to local and incoming
21744    argument registers are propagated back to the parent.  The compiler
21745    is told about this with #include <vfork.h>, but some compilers
21746    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21747    static variable whose address is put into a register that is
21748    clobbered by the vfork.  */
21749 static
21750 #ifdef __cplusplus
21751 sparc_address_test (int arg)
21752 # else
21753 sparc_address_test (arg) int arg;
21754 #endif
21755 {
21756   static pid_t child;
21757   if (!child) {
21758     child = vfork ();
21759     if (child < 0) {
21760       perror ("vfork");
21761       _exit(2);
21762     }
21763     if (!child) {
21764       arg = getpid();
21765       write(-1, "", 0);
21766       _exit (arg);
21767     }
21768   }
21769 }
21770
21771 int
21772 main (void)
21773 {
21774   pid_t parent = getpid ();
21775   pid_t child;
21776
21777   sparc_address_test ();
21778
21779   child = vfork ();
21780
21781   if (child == 0) {
21782     /* Here is another test for sparc vfork register problems.  This
21783        test uses lots of local variables, at least as many local
21784        variables as main has allocated so far including compiler
21785        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21786        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21787        reuse the register of parent for one of the local variables,
21788        since it will think that parent can't possibly be used any more
21789        in this routine.  Assigning to the local variable will thus
21790        munge parent in the parent process.  */
21791     pid_t
21792       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21793       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21794     /* Convince the compiler that p..p7 are live; otherwise, it might
21795        use the same hardware register for all 8 local variables.  */
21796     if (p != p1 || p != p2 || p != p3 || p != p4
21797         || p != p5 || p != p6 || p != p7)
21798       _exit(1);
21799
21800     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21801        from child file descriptors.  If the child closes a descriptor
21802        before it execs or exits, this munges the parent's descriptor
21803        as well.  Test for this by closing stdout in the child.  */
21804     _exit(close(fileno(stdout)) != 0);
21805   } else {
21806     int status;
21807     struct stat st;
21808
21809     while (wait(&status) != child)
21810       ;
21811     $ac_main_return(
21812          /* Was there some problem with vforking?  */
21813          child < 0
21814
21815          /* Did the child fail?  (This shouldn't happen.)  */
21816          || status
21817
21818          /* Did the vfork/compiler bug occur?  */
21819          || parent != getpid()
21820
21821          /* Did the file descriptor bug occur?  */
21822          || fstat(fileno(stdout), &st) != 0
21823          );
21824   }
21825 }
21826 _ACEOF
21827 rm -f conftest$ac_exeext
21828 if { (eval echo "$as_me:21828: \"$ac_link\"") >&5
21829   (eval $ac_link) 2>&5
21830   ac_status=$?
21831   echo "$as_me:21831: \$? = $ac_status" >&5
21832   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21833   { (eval echo "$as_me:21833: \"$ac_try\"") >&5
21834   (eval $ac_try) 2>&5
21835   ac_status=$?
21836   echo "$as_me:21836: \$? = $ac_status" >&5
21837   (exit $ac_status); }; }; then
21838   ac_cv_func_vfork_works=yes
21839 else
21840   echo "$as_me: program exited with status $ac_status" >&5
21841 echo "$as_me: failed program was:" >&5
21842 cat conftest.$ac_ext >&5
21843 ac_cv_func_vfork_works=no
21844 fi
21845 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21846 fi
21847 fi
21848 echo "$as_me:21848: result: $ac_cv_func_vfork_works" >&5
21849 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21850
21851 fi;
21852 if test "x$ac_cv_func_fork_works" = xcross; then
21853   ac_cv_func_vfork_works=ac_cv_func_vfork
21854   { echo "$as_me:21854: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21855 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21856 fi
21857
21858 if test "x$ac_cv_func_vfork_works" = xyes; then
21859
21860 cat >>confdefs.h <<\EOF
21861 #define HAVE_WORKING_VFORK 1
21862 EOF
21863
21864 else
21865
21866 cat >>confdefs.h <<\EOF
21867 #define vfork fork
21868 EOF
21869
21870 fi
21871 if test "x$ac_cv_func_fork_works" = xyes; then
21872
21873 cat >>confdefs.h <<\EOF
21874 #define HAVE_WORKING_FORK 1
21875 EOF
21876
21877 fi
21878
21879 echo "$as_me:21879: checking if fopen accepts explicit binary mode" >&5
21880 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21881 if test "${cf_cv_fopen_bin_r+set}" = set; then
21882   echo $ECHO_N "(cached) $ECHO_C" >&6
21883 else
21884
21885         if test "$cross_compiling" = yes; then
21886   cf_cv_fopen_bin_r=unknown
21887 else
21888   cat >conftest.$ac_ext <<_ACEOF
21889 #line 21889 "configure"
21890 #include "confdefs.h"
21891
21892 #include <stdio.h>
21893 int main(void) {
21894         FILE *fp = fopen("conftest.tmp", "wb");
21895         int rc = 0;
21896         if (fp != 0) {
21897                 int p, q;
21898                 for (p = 0; p < 256; ++p) {
21899                         fputc(p, fp);
21900                 }
21901                 fclose(fp);
21902                 fp = fopen("conftest.tmp", "rb");
21903                 if (fp != 0) {
21904                         for (p = 0; p < 256; ++p) {
21905                                 q = fgetc(fp);
21906                                 if (q != p) {
21907                                         rc = 1;
21908                                         break;
21909                                 }
21910                         }
21911                 } else {
21912                         rc = 1;
21913                 }
21914         } else {
21915                 rc = 1;
21916         }
21917         ${cf_cv_main_return:-return} (rc);
21918 }
21919
21920 _ACEOF
21921 rm -f conftest$ac_exeext
21922 if { (eval echo "$as_me:21922: \"$ac_link\"") >&5
21923   (eval $ac_link) 2>&5
21924   ac_status=$?
21925   echo "$as_me:21925: \$? = $ac_status" >&5
21926   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21927   { (eval echo "$as_me:21927: \"$ac_try\"") >&5
21928   (eval $ac_try) 2>&5
21929   ac_status=$?
21930   echo "$as_me:21930: \$? = $ac_status" >&5
21931   (exit $ac_status); }; }; then
21932   cf_cv_fopen_bin_r=yes
21933 else
21934   echo "$as_me: program exited with status $ac_status" >&5
21935 echo "$as_me: failed program was:" >&5
21936 cat conftest.$ac_ext >&5
21937 cf_cv_fopen_bin_r=no
21938 fi
21939 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21940 fi
21941
21942 fi
21943 echo "$as_me:21943: result: $cf_cv_fopen_bin_r" >&5
21944 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21945 test "x$cf_cv_fopen_bin_r" != xno && cat >>confdefs.h <<\EOF
21946 #define USE_FOPEN_BIN_R 1
21947 EOF
21948
21949 # special check for test/ditto.c
21950
21951 echo "$as_me:21951: checking for openpty in -lutil" >&5
21952 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21953 if test "${ac_cv_lib_util_openpty+set}" = set; then
21954   echo $ECHO_N "(cached) $ECHO_C" >&6
21955 else
21956   ac_check_lib_save_LIBS=$LIBS
21957 LIBS="-lutil  $LIBS"
21958 cat >conftest.$ac_ext <<_ACEOF
21959 #line 21959 "configure"
21960 #include "confdefs.h"
21961
21962 /* Override any gcc2 internal prototype to avoid an error.  */
21963 #ifdef __cplusplus
21964 extern "C"
21965 #endif
21966 /* We use char because int might match the return type of a gcc2
21967    builtin and then its argument prototype would still apply.  */
21968 char openpty ();
21969 int
21970 main (void)
21971 {
21972 openpty ();
21973   ;
21974   return 0;
21975 }
21976 _ACEOF
21977 rm -f conftest.$ac_objext conftest$ac_exeext
21978 if { (eval echo "$as_me:21978: \"$ac_link\"") >&5
21979   (eval $ac_link) 2>&5
21980   ac_status=$?
21981   echo "$as_me:21981: \$? = $ac_status" >&5
21982   (exit $ac_status); } &&
21983          { ac_try='test -s conftest$ac_exeext'
21984   { (eval echo "$as_me:21984: \"$ac_try\"") >&5
21985   (eval $ac_try) 2>&5
21986   ac_status=$?
21987   echo "$as_me:21987: \$? = $ac_status" >&5
21988   (exit $ac_status); }; }; then
21989   ac_cv_lib_util_openpty=yes
21990 else
21991   echo "$as_me: failed program was:" >&5
21992 cat conftest.$ac_ext >&5
21993 ac_cv_lib_util_openpty=no
21994 fi
21995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21996 LIBS=$ac_check_lib_save_LIBS
21997 fi
21998 echo "$as_me:21998: result: $ac_cv_lib_util_openpty" >&5
21999 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22000 if test $ac_cv_lib_util_openpty = yes; then
22001   cf_cv_lib_util=yes
22002 else
22003   cf_cv_lib_util=no
22004 fi
22005
22006 echo "$as_me:22006: checking for openpty header" >&5
22007 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22008 if test "${cf_cv_func_openpty+set}" = set; then
22009   echo $ECHO_N "(cached) $ECHO_C" >&6
22010 else
22011
22012         cf_save_LIBS="$LIBS"
22013         test $cf_cv_lib_util = yes && {
22014 cf_add_libs="-lutil"
22015 # Filter out duplicates - this happens with badly-designed ".pc" files...
22016 for cf_add_1lib in $LIBS
22017 do
22018         for cf_add_2lib in $cf_add_libs
22019         do
22020                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22021                 then
22022                         cf_add_1lib=
22023                         break
22024                 fi
22025         done
22026         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22027 done
22028 LIBS="$cf_add_libs"
22029  }
22030         for cf_header in pty.h libutil.h util.h
22031         do
22032         cat >conftest.$ac_ext <<_ACEOF
22033 #line 22033 "configure"
22034 #include "confdefs.h"
22035
22036 #include <$cf_header>
22037
22038 int
22039 main (void)
22040 {
22041
22042         int x = openpty((int *)0, (int *)0, (char *)0,
22043                                    (struct termios *)0, (struct winsize *)0);
22044
22045   ;
22046   return 0;
22047 }
22048 _ACEOF
22049 rm -f conftest.$ac_objext conftest$ac_exeext
22050 if { (eval echo "$as_me:22050: \"$ac_link\"") >&5
22051   (eval $ac_link) 2>&5
22052   ac_status=$?
22053   echo "$as_me:22053: \$? = $ac_status" >&5
22054   (exit $ac_status); } &&
22055          { ac_try='test -s conftest$ac_exeext'
22056   { (eval echo "$as_me:22056: \"$ac_try\"") >&5
22057   (eval $ac_try) 2>&5
22058   ac_status=$?
22059   echo "$as_me:22059: \$? = $ac_status" >&5
22060   (exit $ac_status); }; }; then
22061
22062                 cf_cv_func_openpty=$cf_header
22063                 break
22064
22065 else
22066   echo "$as_me: failed program was:" >&5
22067 cat conftest.$ac_ext >&5
22068
22069                 cf_cv_func_openpty=no
22070
22071 fi
22072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22073         done
22074         LIBS="$cf_save_LIBS"
22075
22076 fi
22077 echo "$as_me:22077: result: $cf_cv_func_openpty" >&5
22078 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22079
22080 if test "$cf_cv_func_openpty" != no ; then
22081
22082 cat >>confdefs.h <<EOF
22083 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22084 EOF
22085
22086 cat >>confdefs.h <<\EOF
22087 #define USE_XTERM_PTY 1
22088 EOF
22089
22090         if test "x$cf_cv_lib_util" = xyes ; then
22091
22092 cf_add_libs="-lutil"
22093 # Filter out duplicates - this happens with badly-designed ".pc" files...
22094 for cf_add_1lib in $TEST_LIBS
22095 do
22096         for cf_add_2lib in $cf_add_libs
22097         do
22098                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22099                 then
22100                         cf_add_1lib=
22101                         break
22102                 fi
22103         done
22104         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22105 done
22106 TEST_LIBS="$cf_add_libs"
22107
22108         fi
22109 fi
22110
22111 if test "$with_hashed_db" != no ; then
22112
22113 cat >>confdefs.h <<\EOF
22114 #define USE_HASHED_DB 1
22115 EOF
22116
22117 case $with_hashed_db in
22118 (yes|*able*)
22119         ;;
22120 (*)
22121         if test -d "$with_hashed_db" ; then
22122
22123 if test -n "$with_hashed_db/include" ; then
22124   for cf_add_incdir in $with_hashed_db/include
22125   do
22126         while test $cf_add_incdir != /usr/include
22127         do
22128           if test -d $cf_add_incdir
22129           then
22130                 cf_have_incdir=no
22131                 if test -n "$CFLAGS$CPPFLAGS" ; then
22132                   # a loop is needed to ensure we can add subdirs of existing dirs
22133                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22134                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22135                           cf_have_incdir=yes; break
22136                         fi
22137                   done
22138                 fi
22139
22140                 if test "$cf_have_incdir" = no ; then
22141                   if test "$cf_add_incdir" = /usr/local/include ; then
22142                         if test "$GCC" = yes
22143                         then
22144                           cf_save_CPPFLAGS=$CPPFLAGS
22145
22146         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22147         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22148
22149                           cat >conftest.$ac_ext <<_ACEOF
22150 #line 22150 "configure"
22151 #include "confdefs.h"
22152 #include <stdio.h>
22153 int
22154 main (void)
22155 {
22156 printf("Hello")
22157   ;
22158   return 0;
22159 }
22160 _ACEOF
22161 rm -f conftest.$ac_objext
22162 if { (eval echo "$as_me:22162: \"$ac_compile\"") >&5
22163   (eval $ac_compile) 2>&5
22164   ac_status=$?
22165   echo "$as_me:22165: \$? = $ac_status" >&5
22166   (exit $ac_status); } &&
22167          { ac_try='test -s conftest.$ac_objext'
22168   { (eval echo "$as_me:22168: \"$ac_try\"") >&5
22169   (eval $ac_try) 2>&5
22170   ac_status=$?
22171   echo "$as_me:22171: \$? = $ac_status" >&5
22172   (exit $ac_status); }; }; then
22173   :
22174 else
22175   echo "$as_me: failed program was:" >&5
22176 cat conftest.$ac_ext >&5
22177 cf_have_incdir=yes
22178 fi
22179 rm -f conftest.$ac_objext conftest.$ac_ext
22180                           CPPFLAGS=$cf_save_CPPFLAGS
22181                         fi
22182                   fi
22183                 fi
22184
22185                 if test "$cf_have_incdir" = no ; then
22186                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22187
22188 echo "${as_me:-configure}:22188: testing adding $cf_add_incdir to include-path ..." 1>&5
22189
22190                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22191
22192                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22193                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22194                   cf_add_incdir="$cf_top_incdir"
22195                 else
22196                   break
22197                 fi
22198           else
22199                 break
22200           fi
22201         done
22202   done
22203 fi
22204
22205 if test -n "$with_hashed_db/lib" ; then
22206         for cf_add_libdir in $with_hashed_db/lib
22207         do
22208                 if test $cf_add_libdir = /usr/lib ; then
22209                         :
22210                 elif test -d $cf_add_libdir
22211                 then
22212                         cf_have_libdir=no
22213                         if test -n "$LDFLAGS$LIBS" ; then
22214                                 # a loop is needed to ensure we can add subdirs of existing dirs
22215                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22216                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22217                                                 cf_have_libdir=yes; break
22218                                         fi
22219                                 done
22220                         fi
22221                         if test "$cf_have_libdir" = no ; then
22222                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22223
22224 echo "${as_me:-configure}:22224: testing adding $cf_add_libdir to library-path ..." 1>&5
22225
22226                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22227                         fi
22228                 fi
22229         done
22230 fi
22231
22232         else
22233                 case "$with_hashed_db" in
22234                 (./*|../*|/*)
22235                         { echo "$as_me:22235: WARNING: no such directory $with_hashed_db" >&5
22236 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22237                         ;;
22238                 (*)
22239
22240 cf_search=
22241
22242 test "x$prefix" != "xNONE" && \
22243 test -d "$prefix" && \
22244  {
22245         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22246         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22247         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22248         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22249         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22250         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22251 }
22252
22253 for cf_subdir_prefix in \
22254         /usr \
22255         /usr/local \
22256         /usr/pkg \
22257         /opt \
22258         /opt/local \
22259         $HOME
22260 do
22261
22262 test "x$cf_subdir_prefix" != "x$prefix" && \
22263 test -d "$cf_subdir_prefix" && \
22264 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22265         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22266         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22267         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22268         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22269         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22270         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"
22271 }
22272
22273 done
22274
22275         for cf_item in $cf_search
22276         do
22277                 case $cf_item in
22278                 (*/$with_hashed_db)
22279
22280 if test -n "$cf_item" ; then
22281   for cf_add_incdir in $cf_item
22282   do
22283         while test $cf_add_incdir != /usr/include
22284         do
22285           if test -d $cf_add_incdir
22286           then
22287                 cf_have_incdir=no
22288                 if test -n "$CFLAGS$CPPFLAGS" ; then
22289                   # a loop is needed to ensure we can add subdirs of existing dirs
22290                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22291                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22292                           cf_have_incdir=yes; break
22293                         fi
22294                   done
22295                 fi
22296
22297                 if test "$cf_have_incdir" = no ; then
22298                   if test "$cf_add_incdir" = /usr/local/include ; then
22299                         if test "$GCC" = yes
22300                         then
22301                           cf_save_CPPFLAGS=$CPPFLAGS
22302
22303         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22304         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22305
22306                           cat >conftest.$ac_ext <<_ACEOF
22307 #line 22307 "configure"
22308 #include "confdefs.h"
22309 #include <stdio.h>
22310 int
22311 main (void)
22312 {
22313 printf("Hello")
22314   ;
22315   return 0;
22316 }
22317 _ACEOF
22318 rm -f conftest.$ac_objext
22319 if { (eval echo "$as_me:22319: \"$ac_compile\"") >&5
22320   (eval $ac_compile) 2>&5
22321   ac_status=$?
22322   echo "$as_me:22322: \$? = $ac_status" >&5
22323   (exit $ac_status); } &&
22324          { ac_try='test -s conftest.$ac_objext'
22325   { (eval echo "$as_me:22325: \"$ac_try\"") >&5
22326   (eval $ac_try) 2>&5
22327   ac_status=$?
22328   echo "$as_me:22328: \$? = $ac_status" >&5
22329   (exit $ac_status); }; }; then
22330   :
22331 else
22332   echo "$as_me: failed program was:" >&5
22333 cat conftest.$ac_ext >&5
22334 cf_have_incdir=yes
22335 fi
22336 rm -f conftest.$ac_objext conftest.$ac_ext
22337                           CPPFLAGS=$cf_save_CPPFLAGS
22338                         fi
22339                   fi
22340                 fi
22341
22342                 if test "$cf_have_incdir" = no ; then
22343                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22344
22345 echo "${as_me:-configure}:22345: testing adding $cf_add_incdir to include-path ..." 1>&5
22346
22347                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22348
22349                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22350                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22351                   cf_add_incdir="$cf_top_incdir"
22352                 else
22353                   break
22354                 fi
22355           else
22356                 break
22357           fi
22358         done
22359   done
22360 fi
22361
22362                         ;;
22363                 esac
22364         done
22365
22366 cf_search=
22367
22368 test "x$prefix" != "xNONE" && \
22369 test -d "$prefix" && \
22370  {
22371         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22372         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22373         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22374         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22375         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22376         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22377 }
22378
22379 for cf_subdir_prefix in \
22380         /usr \
22381         /usr/local \
22382         /usr/pkg \
22383         /opt \
22384         /opt/local \
22385         $HOME
22386 do
22387
22388 test "x$cf_subdir_prefix" != "x$prefix" && \
22389 test -d "$cf_subdir_prefix" && \
22390 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22391         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22392         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22393         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22394         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22395         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22396         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"
22397 }
22398
22399 done
22400
22401         for cf_item in $cf_search
22402         do
22403                 case $cf_item in
22404                 (*/$with_hashed_db)
22405
22406 if test -n "$cf_item" ; then
22407         for cf_add_libdir in $cf_item
22408         do
22409                 if test $cf_add_libdir = /usr/lib ; then
22410                         :
22411                 elif test -d $cf_add_libdir
22412                 then
22413                         cf_have_libdir=no
22414                         if test -n "$LDFLAGS$LIBS" ; then
22415                                 # a loop is needed to ensure we can add subdirs of existing dirs
22416                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22417                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22418                                                 cf_have_libdir=yes; break
22419                                         fi
22420                                 done
22421                         fi
22422                         if test "$cf_have_libdir" = no ; then
22423                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22424
22425 echo "${as_me:-configure}:22425: testing adding $cf_add_libdir to library-path ..." 1>&5
22426
22427                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22428                         fi
22429                 fi
22430         done
22431 fi
22432
22433                         ;;
22434                 esac
22435         done
22436
22437                         ;;
22438                 esac
22439         fi
22440 esac
22441
22442 echo "$as_me:22442: checking for db.h" >&5
22443 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22444 if test "${ac_cv_header_db_h+set}" = set; then
22445   echo $ECHO_N "(cached) $ECHO_C" >&6
22446 else
22447   cat >conftest.$ac_ext <<_ACEOF
22448 #line 22448 "configure"
22449 #include "confdefs.h"
22450 #include <db.h>
22451 _ACEOF
22452 if { (eval echo "$as_me:22452: \"$ac_cpp conftest.$ac_ext\"") >&5
22453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22454   ac_status=$?
22455   egrep -v '^ *\+' conftest.er1 >conftest.err
22456   rm -f conftest.er1
22457   cat conftest.err >&5
22458   echo "$as_me:22458: \$? = $ac_status" >&5
22459   (exit $ac_status); } >/dev/null; then
22460   if test -s conftest.err; then
22461     ac_cpp_err=$ac_c_preproc_warn_flag
22462   else
22463     ac_cpp_err=
22464   fi
22465 else
22466   ac_cpp_err=yes
22467 fi
22468 if test -z "$ac_cpp_err"; then
22469   ac_cv_header_db_h=yes
22470 else
22471   echo "$as_me: failed program was:" >&5
22472   cat conftest.$ac_ext >&5
22473   ac_cv_header_db_h=no
22474 fi
22475 rm -f conftest.err conftest.$ac_ext
22476 fi
22477 echo "$as_me:22477: result: $ac_cv_header_db_h" >&5
22478 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22479 if test $ac_cv_header_db_h = yes; then
22480
22481 echo "$as_me:22481: checking for version of db" >&5
22482 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22483 if test "${cf_cv_hashed_db_version+set}" = set; then
22484   echo $ECHO_N "(cached) $ECHO_C" >&6
22485 else
22486
22487 cf_cv_hashed_db_version=unknown
22488
22489 for cf_db_version in 1 2 3 4 5 6
22490 do
22491
22492 echo "${as_me:-configure}:22492: testing checking for db version $cf_db_version ..." 1>&5
22493
22494         cat >conftest.$ac_ext <<_ACEOF
22495 #line 22495 "configure"
22496 #include "confdefs.h"
22497
22498 $ac_includes_default
22499 #include <db.h>
22500
22501 #ifdef DB_VERSION_MAJOR
22502         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22503 #if $cf_db_version == DB_VERSION_MAJOR
22504         /* ok */
22505 #else
22506         make an error
22507 #endif
22508 #else
22509 #if $cf_db_version == 1
22510         /* ok: assuming this is DB 1.8.5 */
22511 #else
22512         make an error
22513 #endif
22514 #endif
22515
22516 int
22517 main (void)
22518 {
22519 DBT *foo = 0
22520   ;
22521   return 0;
22522 }
22523 _ACEOF
22524 rm -f conftest.$ac_objext
22525 if { (eval echo "$as_me:22525: \"$ac_compile\"") >&5
22526   (eval $ac_compile) 2>&5
22527   ac_status=$?
22528   echo "$as_me:22528: \$? = $ac_status" >&5
22529   (exit $ac_status); } &&
22530          { ac_try='test -s conftest.$ac_objext'
22531   { (eval echo "$as_me:22531: \"$ac_try\"") >&5
22532   (eval $ac_try) 2>&5
22533   ac_status=$?
22534   echo "$as_me:22534: \$? = $ac_status" >&5
22535   (exit $ac_status); }; }; then
22536
22537         cf_cv_hashed_db_version=$cf_db_version
22538         break
22539
22540 else
22541   echo "$as_me: failed program was:" >&5
22542 cat conftest.$ac_ext >&5
22543 fi
22544 rm -f conftest.$ac_objext conftest.$ac_ext
22545 done
22546
22547 fi
22548 echo "$as_me:22548: result: $cf_cv_hashed_db_version" >&5
22549 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22550
22551 if test "$cf_cv_hashed_db_version" = unknown ; then
22552         { { echo "$as_me:22552: error: Cannot determine version of db" >&5
22553 echo "$as_me: error: Cannot determine version of db" >&2;}
22554    { (exit 1); exit 1; }; }
22555 else
22556
22557 echo "$as_me:22557: checking for db libraries" >&5
22558 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22559 if test "${cf_cv_hashed_db_libs+set}" = set; then
22560   echo $ECHO_N "(cached) $ECHO_C" >&6
22561 else
22562
22563 cf_cv_hashed_db_libs=unknown
22564 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22565 do
22566         cf_save_libs="$LIBS"
22567         if test -n "$cf_db_libs"; then
22568
22569 cf_add_libs="-l$cf_db_libs"
22570 # Filter out duplicates - this happens with badly-designed ".pc" files...
22571 for cf_add_1lib in $LIBS
22572 do
22573         for cf_add_2lib in $cf_add_libs
22574         do
22575                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22576                 then
22577                         cf_add_1lib=
22578                         break
22579                 fi
22580         done
22581         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22582 done
22583 LIBS="$cf_add_libs"
22584
22585         fi
22586
22587 echo "${as_me:-configure}:22587: testing checking for library "$cf_db_libs" ..." 1>&5
22588
22589         cat >conftest.$ac_ext <<_ACEOF
22590 #line 22590 "configure"
22591 #include "confdefs.h"
22592
22593 $ac_includes_default
22594 #include <db.h>
22595
22596 int
22597 main (void)
22598 {
22599
22600         char *path = "/tmp/foo";
22601 #ifdef DB_VERSION_MAJOR
22602 #if DB_VERSION_MAJOR >= 4
22603         DB *result = 0;
22604         db_create(&result, NULL, 0);
22605         result->open(result,
22606                 NULL,
22607                 path,
22608                 path,
22609                 DB_HASH,
22610                 DB_CREATE,
22611                 0644);
22612 #elif DB_VERSION_MAJOR >= 3
22613         DB *result = 0;
22614         db_create(&result, NULL, 0);
22615         result->open(result,
22616                 path,
22617                 path,
22618                 DB_HASH,
22619                 DB_CREATE,
22620                 0644);
22621 #elif DB_VERSION_MAJOR >= 2
22622         DB *result = 0;
22623         db_open(path,
22624                 DB_HASH,
22625                 DB_CREATE,
22626                 0644,
22627                 (DB_ENV *) 0,
22628                 (DB_INFO *) 0,
22629                 &result);
22630 #endif /* DB_VERSION_MAJOR */
22631 #else
22632         DB *result = dbopen(path,
22633                      2,
22634                      0644,
22635                      DB_HASH,
22636                      0);
22637 #endif
22638         ${cf_cv_main_return:-return}(result != 0)
22639
22640   ;
22641   return 0;
22642 }
22643 _ACEOF
22644 rm -f conftest.$ac_objext conftest$ac_exeext
22645 if { (eval echo "$as_me:22645: \"$ac_link\"") >&5
22646   (eval $ac_link) 2>&5
22647   ac_status=$?
22648   echo "$as_me:22648: \$? = $ac_status" >&5
22649   (exit $ac_status); } &&
22650          { ac_try='test -s conftest$ac_exeext'
22651   { (eval echo "$as_me:22651: \"$ac_try\"") >&5
22652   (eval $ac_try) 2>&5
22653   ac_status=$?
22654   echo "$as_me:22654: \$? = $ac_status" >&5
22655   (exit $ac_status); }; }; then
22656
22657         if test -n "$cf_db_libs" ; then
22658                 cf_cv_hashed_db_libs=$cf_db_libs
22659         else
22660                 cf_cv_hashed_db_libs=default
22661         fi
22662         LIBS="$cf_save_libs"
22663         break
22664
22665 else
22666   echo "$as_me: failed program was:" >&5
22667 cat conftest.$ac_ext >&5
22668 fi
22669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22670         LIBS="$cf_save_libs"
22671 done
22672
22673 fi
22674 echo "$as_me:22674: result: $cf_cv_hashed_db_libs" >&5
22675 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22676
22677         if test "$cf_cv_hashed_db_libs" = unknown ; then
22678                 { { echo "$as_me:22678: error: Cannot determine library for db" >&5
22679 echo "$as_me: error: Cannot determine library for db" >&2;}
22680    { (exit 1); exit 1; }; }
22681         elif test "$cf_cv_hashed_db_libs" != default ; then
22682
22683 cf_add_libs="-l$cf_cv_hashed_db_libs"
22684 # Filter out duplicates - this happens with badly-designed ".pc" files...
22685 for cf_add_1lib in $LIBS
22686 do
22687         for cf_add_2lib in $cf_add_libs
22688         do
22689                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22690                 then
22691                         cf_add_1lib=
22692                         break
22693                 fi
22694         done
22695         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22696 done
22697 LIBS="$cf_add_libs"
22698
22699         fi
22700 fi
22701
22702 else
22703
22704         { { echo "$as_me:22704: error: Cannot find db.h" >&5
22705 echo "$as_me: error: Cannot find db.h" >&2;}
22706    { (exit 1); exit 1; }; }
22707
22708 fi
22709
22710 fi
22711
22712 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22713         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22714         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22715 fi
22716
22717 # Just in case, check if the C compiler has a bool type.
22718
22719 echo "$as_me:22719: checking if we should include stdbool.h" >&5
22720 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22721
22722 if test "${cf_cv_header_stdbool_h+set}" = set; then
22723   echo $ECHO_N "(cached) $ECHO_C" >&6
22724 else
22725
22726         cat >conftest.$ac_ext <<_ACEOF
22727 #line 22727 "configure"
22728 #include "confdefs.h"
22729
22730 int
22731 main (void)
22732 {
22733 bool foo = false
22734   ;
22735   return 0;
22736 }
22737 _ACEOF
22738 rm -f conftest.$ac_objext
22739 if { (eval echo "$as_me:22739: \"$ac_compile\"") >&5
22740   (eval $ac_compile) 2>&5
22741   ac_status=$?
22742   echo "$as_me:22742: \$? = $ac_status" >&5
22743   (exit $ac_status); } &&
22744          { ac_try='test -s conftest.$ac_objext'
22745   { (eval echo "$as_me:22745: \"$ac_try\"") >&5
22746   (eval $ac_try) 2>&5
22747   ac_status=$?
22748   echo "$as_me:22748: \$? = $ac_status" >&5
22749   (exit $ac_status); }; }; then
22750   cf_cv_header_stdbool_h=0
22751 else
22752   echo "$as_me: failed program was:" >&5
22753 cat conftest.$ac_ext >&5
22754 cat >conftest.$ac_ext <<_ACEOF
22755 #line 22755 "configure"
22756 #include "confdefs.h"
22757
22758 #ifndef __BEOS__
22759 #include <stdbool.h>
22760 #endif
22761
22762 int
22763 main (void)
22764 {
22765 bool foo = false
22766   ;
22767   return 0;
22768 }
22769 _ACEOF
22770 rm -f conftest.$ac_objext
22771 if { (eval echo "$as_me:22771: \"$ac_compile\"") >&5
22772   (eval $ac_compile) 2>&5
22773   ac_status=$?
22774   echo "$as_me:22774: \$? = $ac_status" >&5
22775   (exit $ac_status); } &&
22776          { ac_try='test -s conftest.$ac_objext'
22777   { (eval echo "$as_me:22777: \"$ac_try\"") >&5
22778   (eval $ac_try) 2>&5
22779   ac_status=$?
22780   echo "$as_me:22780: \$? = $ac_status" >&5
22781   (exit $ac_status); }; }; then
22782   cf_cv_header_stdbool_h=1
22783 else
22784   echo "$as_me: failed program was:" >&5
22785 cat conftest.$ac_ext >&5
22786 cf_cv_header_stdbool_h=0
22787 fi
22788 rm -f conftest.$ac_objext conftest.$ac_ext
22789 fi
22790 rm -f conftest.$ac_objext conftest.$ac_ext
22791 fi
22792
22793 if test "$cf_cv_header_stdbool_h" = 1
22794 then    echo "$as_me:22794: result: yes" >&5
22795 echo "${ECHO_T}yes" >&6
22796 else    echo "$as_me:22796: result: no" >&5
22797 echo "${ECHO_T}no" >&6
22798 fi
22799
22800 echo "$as_me:22800: checking for builtin bool type" >&5
22801 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22802
22803 if test "${cf_cv_cc_bool_type+set}" = set; then
22804   echo $ECHO_N "(cached) $ECHO_C" >&6
22805 else
22806
22807         cat >conftest.$ac_ext <<_ACEOF
22808 #line 22808 "configure"
22809 #include "confdefs.h"
22810
22811 #include <stdio.h>
22812 #include <sys/types.h>
22813
22814 int
22815 main (void)
22816 {
22817 bool x = false
22818   ;
22819   return 0;
22820 }
22821 _ACEOF
22822 rm -f conftest.$ac_objext
22823 if { (eval echo "$as_me:22823: \"$ac_compile\"") >&5
22824   (eval $ac_compile) 2>&5
22825   ac_status=$?
22826   echo "$as_me:22826: \$? = $ac_status" >&5
22827   (exit $ac_status); } &&
22828          { ac_try='test -s conftest.$ac_objext'
22829   { (eval echo "$as_me:22829: \"$ac_try\"") >&5
22830   (eval $ac_try) 2>&5
22831   ac_status=$?
22832   echo "$as_me:22832: \$? = $ac_status" >&5
22833   (exit $ac_status); }; }; then
22834   cf_cv_cc_bool_type=1
22835 else
22836   echo "$as_me: failed program was:" >&5
22837 cat conftest.$ac_ext >&5
22838 cf_cv_cc_bool_type=0
22839 fi
22840 rm -f conftest.$ac_objext conftest.$ac_ext
22841
22842 fi
22843
22844 if test "$cf_cv_cc_bool_type" = 1
22845 then    echo "$as_me:22845: result: yes" >&5
22846 echo "${ECHO_T}yes" >&6
22847 else    echo "$as_me:22847: result: no" >&5
22848 echo "${ECHO_T}no" >&6
22849 fi
22850
22851 # Check for C++ compiler characteristics (and ensure that it's there!)
22852 if test -n "$CXX" ; then
22853         ac_ext=cc
22854 ac_cpp='$CXXCPP $CPPFLAGS'
22855 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22856 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22857 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22858 ac_main_return=return
22859
22860 if test -n "$GXX" ; then
22861
22862         cf_save="$LIBS"
22863         LIBS="$LIBS $CXXLIBS"
22864         echo "$as_me:22864: checking if we already have C++ library" >&5
22865 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22866         cat >conftest.$ac_ext <<_ACEOF
22867 #line 22867 "configure"
22868 #include "confdefs.h"
22869
22870                         #include <iostream>
22871 int
22872 main (void)
22873 {
22874
22875                         std::cout << "Hello World!" << std::endl;
22876   ;
22877   return 0;
22878 }
22879 _ACEOF
22880 rm -f conftest.$ac_objext conftest$ac_exeext
22881 if { (eval echo "$as_me:22881: \"$ac_link\"") >&5
22882   (eval $ac_link) 2>&5
22883   ac_status=$?
22884   echo "$as_me:22884: \$? = $ac_status" >&5
22885   (exit $ac_status); } &&
22886          { ac_try='test -s conftest$ac_exeext'
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   cf_have_libstdcpp=yes
22893 else
22894   echo "$as_me: failed program was:" >&5
22895 cat conftest.$ac_ext >&5
22896 cf_have_libstdcpp=no
22897 fi
22898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22899         echo "$as_me:22899: result: $cf_have_libstdcpp" >&5
22900 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22901         LIBS="$cf_save"
22902
22903         if test $cf_have_libstdcpp != yes
22904         then
22905                 case $cf_cv_system_name in
22906                 (os2*)
22907                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22908                                 cf_stdcpp_libname=stdcpp
22909                         else
22910                                 cf_stdcpp_libname=stdc++
22911                         fi
22912                         ;;
22913                 (*)
22914                         cf_stdcpp_libname=stdc++
22915                         ;;
22916                 esac
22917
22918                 echo "$as_me:22918: checking for library $cf_stdcpp_libname" >&5
22919 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22920 if test "${cf_cv_libstdcpp+set}" = set; then
22921   echo $ECHO_N "(cached) $ECHO_C" >&6
22922 else
22923
22924                         cf_save="$LIBS"
22925                         LIBS="$LIBS $CXXLIBS"
22926
22927 cf_add_libs="-l$cf_stdcpp_libname"
22928 # Filter out duplicates - this happens with badly-designed ".pc" files...
22929 for cf_add_1lib in $LIBS
22930 do
22931         for cf_add_2lib in $cf_add_libs
22932         do
22933                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22934                 then
22935                         cf_add_1lib=
22936                         break
22937                 fi
22938         done
22939         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22940 done
22941 LIBS="$cf_add_libs"
22942
22943                 cat >conftest.$ac_ext <<_ACEOF
22944 #line 22944 "configure"
22945 #include "confdefs.h"
22946
22947                                 #include <iostream>
22948 int
22949 main (void)
22950 {
22951
22952                                 std::cout << "Hello World!" << std::endl;
22953   ;
22954   return 0;
22955 }
22956 _ACEOF
22957 rm -f conftest.$ac_objext conftest$ac_exeext
22958 if { (eval echo "$as_me:22958: \"$ac_link\"") >&5
22959   (eval $ac_link) 2>&5
22960   ac_status=$?
22961   echo "$as_me:22961: \$? = $ac_status" >&5
22962   (exit $ac_status); } &&
22963          { ac_try='test -s conftest$ac_exeext'
22964   { (eval echo "$as_me:22964: \"$ac_try\"") >&5
22965   (eval $ac_try) 2>&5
22966   ac_status=$?
22967   echo "$as_me:22967: \$? = $ac_status" >&5
22968   (exit $ac_status); }; }; then
22969   cf_cv_libstdcpp=yes
22970 else
22971   echo "$as_me: failed program was:" >&5
22972 cat conftest.$ac_ext >&5
22973 cf_cv_libstdcpp=no
22974 fi
22975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22976                         LIBS="$cf_save"
22977
22978 fi
22979 echo "$as_me:22979: result: $cf_cv_libstdcpp" >&5
22980 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22981                 test "$cf_cv_libstdcpp" = yes && {
22982 cf_add_libs="-l$cf_stdcpp_libname"
22983 # Filter out duplicates - this happens with badly-designed ".pc" files...
22984 for cf_add_1lib in $CXXLIBS
22985 do
22986         for cf_add_2lib in $cf_add_libs
22987         do
22988                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22989                 then
22990                         cf_add_1lib=
22991                         break
22992                 fi
22993         done
22994         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22995 done
22996 CXXLIBS="$cf_add_libs"
22997  }
22998         fi
22999 fi
23000
23001         echo "$as_me:23001: checking whether $CXX understands -c and -o together" >&5
23002 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23003 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23004   echo $ECHO_N "(cached) $ECHO_C" >&6
23005 else
23006
23007 cat > conftest.$ac_ext <<CF_EOF
23008 int main(void)
23009 {
23010         ${cf_cv_main_return:-return}(0);
23011 }
23012 CF_EOF
23013 # We do the test twice because some compilers refuse to overwrite an
23014 # existing .o file with -o, though they will create one.
23015 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23016 if { (eval echo "$as_me:23016: \"$ac_try\"") >&5
23017   (eval $ac_try) 2>&5
23018   ac_status=$?
23019   echo "$as_me:23019: \$? = $ac_status" >&5
23020   (exit $ac_status); } &&
23021   test -f conftest2.$ac_objext && { (eval echo "$as_me:23021: \"$ac_try\"") >&5
23022   (eval $ac_try) 2>&5
23023   ac_status=$?
23024   echo "$as_me:23024: \$? = $ac_status" >&5
23025   (exit $ac_status); };
23026 then
23027   eval cf_cv_prog_CXX_c_o=yes
23028 else
23029   eval cf_cv_prog_CXX_c_o=no
23030 fi
23031 rm -rf conftest*
23032
23033 fi
23034 if test $cf_cv_prog_CXX_c_o = yes; then
23035   echo "$as_me:23035: result: yes" >&5
23036 echo "${ECHO_T}yes" >&6
23037 else
23038   echo "$as_me:23038: result: no" >&5
23039 echo "${ECHO_T}no" >&6
23040 fi
23041
23042         case $GXX_VERSION in
23043         (1*|2.0-6*)
23044                 cf_cxx_library=yes
23045                 ;;
23046         (*-2.7*|2.7*)
23047
23048 cf_cxx_library=unknown
23049 case $cf_cv_system_name in
23050 (os2*)
23051         cf_gpp_libname=gpp
23052         ;;
23053 (*)
23054         cf_gpp_libname=g++
23055         ;;
23056 esac
23057 if test "$GXX" = yes; then
23058         echo "$as_me:23058: checking for lib$cf_gpp_libname" >&5
23059 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23060         cf_save="$LIBS"
23061
23062 cf_add_libs="-l$cf_gpp_libname"
23063 # Filter out duplicates - this happens with badly-designed ".pc" files...
23064 for cf_add_1lib in $LIBS
23065 do
23066         for cf_add_2lib in $cf_add_libs
23067         do
23068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
23069                 then
23070                         cf_add_1lib=
23071                         break
23072                 fi
23073         done
23074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
23075 done
23076 LIBS="$cf_add_libs"
23077
23078         cat >conftest.$ac_ext <<_ACEOF
23079 #line 23079 "configure"
23080 #include "confdefs.h"
23081
23082 #include <$cf_gpp_libname/builtin.h>
23083
23084 int
23085 main (void)
23086 {
23087 two_arg_error_handler_t foo2 = lib_error_handler
23088   ;
23089   return 0;
23090 }
23091 _ACEOF
23092 rm -f conftest.$ac_objext conftest$ac_exeext
23093 if { (eval echo "$as_me:23093: \"$ac_link\"") >&5
23094   (eval $ac_link) 2>&5
23095   ac_status=$?
23096   echo "$as_me:23096: \$? = $ac_status" >&5
23097   (exit $ac_status); } &&
23098          { ac_try='test -s conftest$ac_exeext'
23099   { (eval echo "$as_me:23099: \"$ac_try\"") >&5
23100   (eval $ac_try) 2>&5
23101   ac_status=$?
23102   echo "$as_me:23102: \$? = $ac_status" >&5
23103   (exit $ac_status); }; }; then
23104   cf_cxx_library=yes
23105
23106 cf_add_libs="-l$cf_gpp_libname"
23107 # Filter out duplicates - this happens with badly-designed ".pc" files...
23108 for cf_add_1lib in $CXXLIBS
23109 do
23110         for cf_add_2lib in $cf_add_libs
23111         do
23112                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
23113                 then
23114                         cf_add_1lib=
23115                         break
23116                 fi
23117         done
23118         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
23119 done
23120 CXXLIBS="$cf_add_libs"
23121
23122          if test "$cf_gpp_libname" = cpp ; then
23123
23124 cat >>confdefs.h <<\EOF
23125 #define HAVE_GPP_BUILTIN_H 1
23126 EOF
23127
23128          else
23129
23130 cat >>confdefs.h <<\EOF
23131 #define HAVE_GXX_BUILTIN_H 1
23132 EOF
23133
23134          fi
23135 else
23136   echo "$as_me: failed program was:" >&5
23137 cat conftest.$ac_ext >&5
23138 cat >conftest.$ac_ext <<_ACEOF
23139 #line 23139 "configure"
23140 #include "confdefs.h"
23141
23142 #include <builtin.h>
23143
23144 int
23145 main (void)
23146 {
23147 two_arg_error_handler_t foo2 = lib_error_handler
23148   ;
23149   return 0;
23150 }
23151 _ACEOF
23152 rm -f conftest.$ac_objext conftest$ac_exeext
23153 if { (eval echo "$as_me:23153: \"$ac_link\"") >&5
23154   (eval $ac_link) 2>&5
23155   ac_status=$?
23156   echo "$as_me:23156: \$? = $ac_status" >&5
23157   (exit $ac_status); } &&
23158          { ac_try='test -s conftest$ac_exeext'
23159   { (eval echo "$as_me:23159: \"$ac_try\"") >&5
23160   (eval $ac_try) 2>&5
23161   ac_status=$?
23162   echo "$as_me:23162: \$? = $ac_status" >&5
23163   (exit $ac_status); }; }; then
23164   cf_cxx_library=yes
23165
23166 cf_add_libs="-l$cf_gpp_libname"
23167 # Filter out duplicates - this happens with badly-designed ".pc" files...
23168 for cf_add_1lib in $CXXLIBS
23169 do
23170         for cf_add_2lib in $cf_add_libs
23171         do
23172                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
23173                 then
23174                         cf_add_1lib=
23175                         break
23176                 fi
23177         done
23178         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
23179 done
23180 CXXLIBS="$cf_add_libs"
23181
23182 cat >>confdefs.h <<\EOF
23183 #define HAVE_BUILTIN_H 1
23184 EOF
23185
23186 else
23187   echo "$as_me: failed program was:" >&5
23188 cat conftest.$ac_ext >&5
23189 cf_cxx_library=no
23190 fi
23191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23192 fi
23193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23194         LIBS="$cf_save"
23195         echo "$as_me:23195: result: $cf_cxx_library" >&5
23196 echo "${ECHO_T}$cf_cxx_library" >&6
23197 fi
23198
23199                 ;;
23200         (*)
23201                 cf_cxx_library=no
23202                 ;;
23203         esac
23204
23205         ac_ext=cc
23206 ac_cpp='$CXXCPP $CPPFLAGS'
23207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23210 ac_main_return=return
23211 echo "$as_me:23211: checking how to run the C++ preprocessor" >&5
23212 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23213 if test -z "$CXXCPP"; then
23214   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23215   echo $ECHO_N "(cached) $ECHO_C" >&6
23216 else
23217       # Double quotes because CXXCPP needs to be expanded
23218     for CXXCPP in "$CXX -E" "/lib/cpp"
23219     do
23220       ac_preproc_ok=false
23221 for ac_cxx_preproc_warn_flag in '' yes
23222 do
23223   # Use a header file that comes with gcc, so configuring glibc
23224   # with a fresh cross-compiler works.
23225   # On the NeXT, cc -E runs the code through the compiler's parser,
23226   # not just through cpp. "Syntax error" is here to catch this case.
23227   cat >conftest.$ac_ext <<_ACEOF
23228 #line 23228 "configure"
23229 #include "confdefs.h"
23230 #include <assert.h>
23231                      Syntax error
23232 _ACEOF
23233 if { (eval echo "$as_me:23233: \"$ac_cpp conftest.$ac_ext\"") >&5
23234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23235   ac_status=$?
23236   egrep -v '^ *\+' conftest.er1 >conftest.err
23237   rm -f conftest.er1
23238   cat conftest.err >&5
23239   echo "$as_me:23239: \$? = $ac_status" >&5
23240   (exit $ac_status); } >/dev/null; then
23241   if test -s conftest.err; then
23242     ac_cpp_err=$ac_cxx_preproc_warn_flag
23243   else
23244     ac_cpp_err=
23245   fi
23246 else
23247   ac_cpp_err=yes
23248 fi
23249 if test -z "$ac_cpp_err"; then
23250   :
23251 else
23252   echo "$as_me: failed program was:" >&5
23253   cat conftest.$ac_ext >&5
23254   # Broken: fails on valid input.
23255 continue
23256 fi
23257 rm -f conftest.err conftest.$ac_ext
23258
23259   # OK, works on sane cases.  Now check whether non-existent headers
23260   # can be detected and how.
23261   cat >conftest.$ac_ext <<_ACEOF
23262 #line 23262 "configure"
23263 #include "confdefs.h"
23264 #include <ac_nonexistent.h>
23265 _ACEOF
23266 if { (eval echo "$as_me:23266: \"$ac_cpp conftest.$ac_ext\"") >&5
23267   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23268   ac_status=$?
23269   egrep -v '^ *\+' conftest.er1 >conftest.err
23270   rm -f conftest.er1
23271   cat conftest.err >&5
23272   echo "$as_me:23272: \$? = $ac_status" >&5
23273   (exit $ac_status); } >/dev/null; then
23274   if test -s conftest.err; then
23275     ac_cpp_err=$ac_cxx_preproc_warn_flag
23276   else
23277     ac_cpp_err=
23278   fi
23279 else
23280   ac_cpp_err=yes
23281 fi
23282 if test -z "$ac_cpp_err"; then
23283   # Broken: success on invalid input.
23284 continue
23285 else
23286   echo "$as_me: failed program was:" >&5
23287   cat conftest.$ac_ext >&5
23288   # Passes both tests.
23289 ac_preproc_ok=:
23290 break
23291 fi
23292 rm -f conftest.err conftest.$ac_ext
23293
23294 done
23295 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23296 rm -f conftest.err conftest.$ac_ext
23297 if $ac_preproc_ok; then
23298   break
23299 fi
23300
23301     done
23302     ac_cv_prog_CXXCPP=$CXXCPP
23303
23304 fi
23305   CXXCPP=$ac_cv_prog_CXXCPP
23306 else
23307   ac_cv_prog_CXXCPP=$CXXCPP
23308 fi
23309 echo "$as_me:23309: result: $CXXCPP" >&5
23310 echo "${ECHO_T}$CXXCPP" >&6
23311 ac_preproc_ok=false
23312 for ac_cxx_preproc_warn_flag in '' yes
23313 do
23314   # Use a header file that comes with gcc, so configuring glibc
23315   # with a fresh cross-compiler works.
23316   # On the NeXT, cc -E runs the code through the compiler's parser,
23317   # not just through cpp. "Syntax error" is here to catch this case.
23318   cat >conftest.$ac_ext <<_ACEOF
23319 #line 23319 "configure"
23320 #include "confdefs.h"
23321 #include <assert.h>
23322                      Syntax error
23323 _ACEOF
23324 if { (eval echo "$as_me:23324: \"$ac_cpp conftest.$ac_ext\"") >&5
23325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23326   ac_status=$?
23327   egrep -v '^ *\+' conftest.er1 >conftest.err
23328   rm -f conftest.er1
23329   cat conftest.err >&5
23330   echo "$as_me:23330: \$? = $ac_status" >&5
23331   (exit $ac_status); } >/dev/null; then
23332   if test -s conftest.err; then
23333     ac_cpp_err=$ac_cxx_preproc_warn_flag
23334   else
23335     ac_cpp_err=
23336   fi
23337 else
23338   ac_cpp_err=yes
23339 fi
23340 if test -z "$ac_cpp_err"; then
23341   :
23342 else
23343   echo "$as_me: failed program was:" >&5
23344   cat conftest.$ac_ext >&5
23345   # Broken: fails on valid input.
23346 continue
23347 fi
23348 rm -f conftest.err conftest.$ac_ext
23349
23350   # OK, works on sane cases.  Now check whether non-existent headers
23351   # can be detected and how.
23352   cat >conftest.$ac_ext <<_ACEOF
23353 #line 23353 "configure"
23354 #include "confdefs.h"
23355 #include <ac_nonexistent.h>
23356 _ACEOF
23357 if { (eval echo "$as_me:23357: \"$ac_cpp conftest.$ac_ext\"") >&5
23358   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23359   ac_status=$?
23360   egrep -v '^ *\+' conftest.er1 >conftest.err
23361   rm -f conftest.er1
23362   cat conftest.err >&5
23363   echo "$as_me:23363: \$? = $ac_status" >&5
23364   (exit $ac_status); } >/dev/null; then
23365   if test -s conftest.err; then
23366     ac_cpp_err=$ac_cxx_preproc_warn_flag
23367   else
23368     ac_cpp_err=
23369   fi
23370 else
23371   ac_cpp_err=yes
23372 fi
23373 if test -z "$ac_cpp_err"; then
23374   # Broken: success on invalid input.
23375 continue
23376 else
23377   echo "$as_me: failed program was:" >&5
23378   cat conftest.$ac_ext >&5
23379   # Passes both tests.
23380 ac_preproc_ok=:
23381 break
23382 fi
23383 rm -f conftest.err conftest.$ac_ext
23384
23385 done
23386 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23387 rm -f conftest.err conftest.$ac_ext
23388 if $ac_preproc_ok; then
23389   :
23390 else
23391   { { echo "$as_me:23391: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23392 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23393    { (exit 1); exit 1; }; }
23394 fi
23395
23396 ac_ext=cc
23397 ac_cpp='$CXXCPP $CPPFLAGS'
23398 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23399 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23400 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23401 ac_main_return=return
23402
23403 for ac_header in typeinfo
23404 do
23405 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23406 echo "$as_me:23406: checking for $ac_header" >&5
23407 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23408 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23409   echo $ECHO_N "(cached) $ECHO_C" >&6
23410 else
23411   cat >conftest.$ac_ext <<_ACEOF
23412 #line 23412 "configure"
23413 #include "confdefs.h"
23414 #include <$ac_header>
23415 _ACEOF
23416 if { (eval echo "$as_me:23416: \"$ac_cpp conftest.$ac_ext\"") >&5
23417   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23418   ac_status=$?
23419   egrep -v '^ *\+' conftest.er1 >conftest.err
23420   rm -f conftest.er1
23421   cat conftest.err >&5
23422   echo "$as_me:23422: \$? = $ac_status" >&5
23423   (exit $ac_status); } >/dev/null; then
23424   if test -s conftest.err; then
23425     ac_cpp_err=$ac_cxx_preproc_warn_flag
23426   else
23427     ac_cpp_err=
23428   fi
23429 else
23430   ac_cpp_err=yes
23431 fi
23432 if test -z "$ac_cpp_err"; then
23433   eval "$as_ac_Header=yes"
23434 else
23435   echo "$as_me: failed program was:" >&5
23436   cat conftest.$ac_ext >&5
23437   eval "$as_ac_Header=no"
23438 fi
23439 rm -f conftest.err conftest.$ac_ext
23440 fi
23441 echo "$as_me:23441: result: `eval echo '${'$as_ac_Header'}'`" >&5
23442 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23443 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23444   cat >>confdefs.h <<EOF
23445 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23446 EOF
23447
23448 fi
23449 done
23450
23451 for ac_header in iostream
23452 do
23453 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23454 echo "$as_me:23454: checking for $ac_header" >&5
23455 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23456 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23457   echo $ECHO_N "(cached) $ECHO_C" >&6
23458 else
23459   cat >conftest.$ac_ext <<_ACEOF
23460 #line 23460 "configure"
23461 #include "confdefs.h"
23462 #include <$ac_header>
23463 _ACEOF
23464 if { (eval echo "$as_me:23464: \"$ac_cpp conftest.$ac_ext\"") >&5
23465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23466   ac_status=$?
23467   egrep -v '^ *\+' conftest.er1 >conftest.err
23468   rm -f conftest.er1
23469   cat conftest.err >&5
23470   echo "$as_me:23470: \$? = $ac_status" >&5
23471   (exit $ac_status); } >/dev/null; then
23472   if test -s conftest.err; then
23473     ac_cpp_err=$ac_cxx_preproc_warn_flag
23474   else
23475     ac_cpp_err=
23476   fi
23477 else
23478   ac_cpp_err=yes
23479 fi
23480 if test -z "$ac_cpp_err"; then
23481   eval "$as_ac_Header=yes"
23482 else
23483   echo "$as_me: failed program was:" >&5
23484   cat conftest.$ac_ext >&5
23485   eval "$as_ac_Header=no"
23486 fi
23487 rm -f conftest.err conftest.$ac_ext
23488 fi
23489 echo "$as_me:23489: result: `eval echo '${'$as_ac_Header'}'`" >&5
23490 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23492   cat >>confdefs.h <<EOF
23493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23494 EOF
23495
23496 fi
23497 done
23498
23499 if test x"$ac_cv_header_iostream" = xyes ; then
23500         echo "$as_me:23500: checking if iostream uses std-namespace" >&5
23501 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23502         cat >conftest.$ac_ext <<_ACEOF
23503 #line 23503 "configure"
23504 #include "confdefs.h"
23505
23506 #include <iostream>
23507 using std::endl;
23508 using std::cerr;
23509 int
23510 main (void)
23511 {
23512
23513 cerr << "testing" << endl;
23514
23515   ;
23516   return 0;
23517 }
23518 _ACEOF
23519 rm -f conftest.$ac_objext
23520 if { (eval echo "$as_me:23520: \"$ac_compile\"") >&5
23521   (eval $ac_compile) 2>&5
23522   ac_status=$?
23523   echo "$as_me:23523: \$? = $ac_status" >&5
23524   (exit $ac_status); } &&
23525          { ac_try='test -s conftest.$ac_objext'
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_iostream_namespace=yes
23532 else
23533   echo "$as_me: failed program was:" >&5
23534 cat conftest.$ac_ext >&5
23535 cf_iostream_namespace=no
23536 fi
23537 rm -f conftest.$ac_objext conftest.$ac_ext
23538         echo "$as_me:23538: result: $cf_iostream_namespace" >&5
23539 echo "${ECHO_T}$cf_iostream_namespace" >&6
23540         if test "$cf_iostream_namespace" = yes ; then
23541
23542 cat >>confdefs.h <<\EOF
23543 #define IOSTREAM_NAMESPACE 1
23544 EOF
23545
23546         fi
23547 fi
23548
23549 echo "$as_me:23549: checking if we should include stdbool.h" >&5
23550 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23551
23552 if test "${cf_cv_header_stdbool_h+set}" = set; then
23553   echo $ECHO_N "(cached) $ECHO_C" >&6
23554 else
23555
23556         cat >conftest.$ac_ext <<_ACEOF
23557 #line 23557 "configure"
23558 #include "confdefs.h"
23559
23560 int
23561 main (void)
23562 {
23563 bool foo = false
23564   ;
23565   return 0;
23566 }
23567 _ACEOF
23568 rm -f conftest.$ac_objext
23569 if { (eval echo "$as_me:23569: \"$ac_compile\"") >&5
23570   (eval $ac_compile) 2>&5
23571   ac_status=$?
23572   echo "$as_me:23572: \$? = $ac_status" >&5
23573   (exit $ac_status); } &&
23574          { ac_try='test -s conftest.$ac_objext'
23575   { (eval echo "$as_me:23575: \"$ac_try\"") >&5
23576   (eval $ac_try) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit $ac_status); }; }; then
23580   cf_cv_header_stdbool_h=0
23581 else
23582   echo "$as_me: failed program was:" >&5
23583 cat conftest.$ac_ext >&5
23584 cat >conftest.$ac_ext <<_ACEOF
23585 #line 23585 "configure"
23586 #include "confdefs.h"
23587
23588 #ifndef __BEOS__
23589 #include <stdbool.h>
23590 #endif
23591
23592 int
23593 main (void)
23594 {
23595 bool foo = false
23596   ;
23597   return 0;
23598 }
23599 _ACEOF
23600 rm -f conftest.$ac_objext
23601 if { (eval echo "$as_me:23601: \"$ac_compile\"") >&5
23602   (eval $ac_compile) 2>&5
23603   ac_status=$?
23604   echo "$as_me:23604: \$? = $ac_status" >&5
23605   (exit $ac_status); } &&
23606          { ac_try='test -s conftest.$ac_objext'
23607   { (eval echo "$as_me:23607: \"$ac_try\"") >&5
23608   (eval $ac_try) 2>&5
23609   ac_status=$?
23610   echo "$as_me:23610: \$? = $ac_status" >&5
23611   (exit $ac_status); }; }; then
23612   cf_cv_header_stdbool_h=1
23613 else
23614   echo "$as_me: failed program was:" >&5
23615 cat conftest.$ac_ext >&5
23616 cf_cv_header_stdbool_h=0
23617 fi
23618 rm -f conftest.$ac_objext conftest.$ac_ext
23619 fi
23620 rm -f conftest.$ac_objext conftest.$ac_ext
23621 fi
23622
23623 if test "$cf_cv_header_stdbool_h" = 1
23624 then    echo "$as_me:23624: result: yes" >&5
23625 echo "${ECHO_T}yes" >&6
23626 else    echo "$as_me:23626: result: no" >&5
23627 echo "${ECHO_T}no" >&6
23628 fi
23629
23630 echo "$as_me:23630: checking for builtin bool type" >&5
23631 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23632
23633 if test "${cf_cv_builtin_bool+set}" = set; then
23634   echo $ECHO_N "(cached) $ECHO_C" >&6
23635 else
23636
23637         cat >conftest.$ac_ext <<_ACEOF
23638 #line 23638 "configure"
23639 #include "confdefs.h"
23640
23641 #include <stdio.h>
23642 #include <sys/types.h>
23643
23644 int
23645 main (void)
23646 {
23647 bool x = false
23648   ;
23649   return 0;
23650 }
23651 _ACEOF
23652 rm -f conftest.$ac_objext
23653 if { (eval echo "$as_me:23653: \"$ac_compile\"") >&5
23654   (eval $ac_compile) 2>&5
23655   ac_status=$?
23656   echo "$as_me:23656: \$? = $ac_status" >&5
23657   (exit $ac_status); } &&
23658          { ac_try='test -s conftest.$ac_objext'
23659   { (eval echo "$as_me:23659: \"$ac_try\"") >&5
23660   (eval $ac_try) 2>&5
23661   ac_status=$?
23662   echo "$as_me:23662: \$? = $ac_status" >&5
23663   (exit $ac_status); }; }; then
23664   cf_cv_builtin_bool=1
23665 else
23666   echo "$as_me: failed program was:" >&5
23667 cat conftest.$ac_ext >&5
23668 cf_cv_builtin_bool=0
23669 fi
23670 rm -f conftest.$ac_objext conftest.$ac_ext
23671
23672 fi
23673
23674 if test "$cf_cv_builtin_bool" = 1
23675 then    echo "$as_me:23675: result: yes" >&5
23676 echo "${ECHO_T}yes" >&6
23677 else    echo "$as_me:23677: result: no" >&5
23678 echo "${ECHO_T}no" >&6
23679 fi
23680
23681 echo "$as_me:23681: checking for size of bool" >&5
23682 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23683 if test "${cf_cv_type_of_bool+set}" = set; then
23684   echo $ECHO_N "(cached) $ECHO_C" >&6
23685 else
23686
23687         rm -f cf_test.out
23688         if test "$cross_compiling" = yes; then
23689   cf_cv_type_of_bool=unknown
23690 else
23691   cat >conftest.$ac_ext <<_ACEOF
23692 #line 23692 "configure"
23693 #include "confdefs.h"
23694
23695 #include <stdlib.h>
23696 #include <stdio.h>
23697
23698 #if defined(__cplusplus)
23699
23700 #ifdef HAVE_GXX_BUILTIN_H
23701 #include <g++/builtin.h>
23702 #elif HAVE_GPP_BUILTIN_H
23703 #include <gpp/builtin.h>
23704 #elif HAVE_BUILTIN_H
23705 #include <builtin.h>
23706 #endif
23707
23708 #else
23709
23710 #if $cf_cv_header_stdbool_h
23711 #include <stdbool.h>
23712 #endif
23713
23714 #endif
23715
23716 int main(void)
23717 {
23718         FILE *fp = fopen("cf_test.out", "w");
23719         if (fp != 0) {
23720                 bool x = true;
23721                 if ((bool)(-x) >= 0)
23722                         fputs("unsigned ", fp);
23723                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23724                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23725                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23726                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23727                 fclose(fp);
23728         }
23729         ${cf_cv_main_return:-return}(0);
23730 }
23731
23732 _ACEOF
23733 rm -f conftest$ac_exeext
23734 if { (eval echo "$as_me:23734: \"$ac_link\"") >&5
23735   (eval $ac_link) 2>&5
23736   ac_status=$?
23737   echo "$as_me:23737: \$? = $ac_status" >&5
23738   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23739   { (eval echo "$as_me:23739: \"$ac_try\"") >&5
23740   (eval $ac_try) 2>&5
23741   ac_status=$?
23742   echo "$as_me:23742: \$? = $ac_status" >&5
23743   (exit $ac_status); }; }; then
23744   cf_cv_type_of_bool=`cat cf_test.out`
23745                  if test -z "$cf_cv_type_of_bool"; then
23746                    cf_cv_type_of_bool=unknown
23747                  fi
23748 else
23749   echo "$as_me: program exited with status $ac_status" >&5
23750 echo "$as_me: failed program was:" >&5
23751 cat conftest.$ac_ext >&5
23752 cf_cv_type_of_bool=unknown
23753 fi
23754 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23755 fi
23756
23757 fi
23758
23759         rm -f cf_test.out
23760 echo "$as_me:23760: result: $cf_cv_type_of_bool" >&5
23761 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23762 if test "$cf_cv_type_of_bool" = unknown ; then
23763         case .$NCURSES_BOOL in
23764         (.auto|.) NCURSES_BOOL=unsigned;;
23765         esac
23766         { echo "$as_me:23766: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23767 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23768         cf_cv_type_of_bool=$NCURSES_BOOL
23769 fi
23770
23771 echo "$as_me:23771: checking for special defines needed for etip.h" >&5
23772 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23773 cf_save_CXXFLAGS="$CXXFLAGS"
23774 cf_result="none"
23775
23776 # etip.h includes ncurses.h which includes ncurses_dll.h
23777 # But ncurses_dll.h is generated - fix here.
23778 test -d include || mkdir include
23779 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
23780
23781 for cf_math in "" MATH_H
23782 do
23783 for cf_excp in "" MATH_EXCEPTION
23784 do
23785         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23786         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23787         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23788 cat >conftest.$ac_ext <<_ACEOF
23789 #line 23789 "configure"
23790 #include "confdefs.h"
23791
23792 #include <etip.h.in>
23793
23794 int
23795 main (void)
23796 {
23797
23798   ;
23799   return 0;
23800 }
23801 _ACEOF
23802 rm -f conftest.$ac_objext
23803 if { (eval echo "$as_me:23803: \"$ac_compile\"") >&5
23804   (eval $ac_compile) 2>&5
23805   ac_status=$?
23806   echo "$as_me:23806: \$? = $ac_status" >&5
23807   (exit $ac_status); } &&
23808          { ac_try='test -s conftest.$ac_objext'
23809   { (eval echo "$as_me:23809: \"$ac_try\"") >&5
23810   (eval $ac_try) 2>&5
23811   ac_status=$?
23812   echo "$as_me:23812: \$? = $ac_status" >&5
23813   (exit $ac_status); }; }; then
23814
23815         test -n "$cf_math" && cat >>confdefs.h <<EOF
23816 #define ETIP_NEEDS_${cf_math} 1
23817 EOF
23818
23819         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23820 #define ETIP_NEEDS_${cf_excp} 1
23821 EOF
23822
23823         cf_result="$cf_math $cf_excp"
23824         break 2
23825
23826 else
23827   echo "$as_me: failed program was:" >&5
23828 cat conftest.$ac_ext >&5
23829 fi
23830 rm -f conftest.$ac_objext conftest.$ac_ext
23831 done
23832 done
23833 echo "$as_me:23833: result: $cf_result" >&5
23834 echo "${ECHO_T}$cf_result" >&6
23835 CXXFLAGS="$cf_save_CXXFLAGS"
23836
23837 if test -n "$CXX"; then
23838 echo "$as_me:23838: checking if $CXX accepts parameter initialization" >&5
23839 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23840 if test "${cf_cv_cpp_param_init+set}" = set; then
23841   echo $ECHO_N "(cached) $ECHO_C" >&6
23842 else
23843
23844         ac_ext=cc
23845 ac_cpp='$CXXCPP $CPPFLAGS'
23846 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23847 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23848 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23849 ac_main_return=return
23850
23851         if test "$cross_compiling" = yes; then
23852   cf_cv_cpp_param_init=unknown
23853 else
23854   cat >conftest.$ac_ext <<_ACEOF
23855 #line 23855 "configure"
23856 #include "confdefs.h"
23857
23858 class TEST {
23859 private:
23860         int value;
23861 public:
23862         TEST(int x = 1);
23863         ~TEST();
23864 };
23865
23866 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23867 {
23868         value = x;
23869 }
23870 int main(void) { }
23871
23872 _ACEOF
23873 rm -f conftest$ac_exeext
23874 if { (eval echo "$as_me:23874: \"$ac_link\"") >&5
23875   (eval $ac_link) 2>&5
23876   ac_status=$?
23877   echo "$as_me:23877: \$? = $ac_status" >&5
23878   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23879   { (eval echo "$as_me:23879: \"$ac_try\"") >&5
23880   (eval $ac_try) 2>&5
23881   ac_status=$?
23882   echo "$as_me:23882: \$? = $ac_status" >&5
23883   (exit $ac_status); }; }; then
23884   cf_cv_cpp_param_init=yes
23885 else
23886   echo "$as_me: program exited with status $ac_status" >&5
23887 echo "$as_me: failed program was:" >&5
23888 cat conftest.$ac_ext >&5
23889 cf_cv_cpp_param_init=no
23890 fi
23891 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23892 fi
23893         ac_ext=cc
23894 ac_cpp='$CXXCPP $CPPFLAGS'
23895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23898 ac_main_return=return
23899
23900 fi
23901 echo "$as_me:23901: result: $cf_cv_cpp_param_init" >&5
23902 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23903 fi
23904 test "$cf_cv_cpp_param_init" = yes &&
23905 cat >>confdefs.h <<\EOF
23906 #define CPP_HAS_PARAM_INIT 1
23907 EOF
23908
23909 if test -n "$CXX"; then
23910
23911 echo "$as_me:23911: checking if $CXX accepts static_cast" >&5
23912 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23913 if test "${cf_cv_cpp_static_cast+set}" = set; then
23914   echo $ECHO_N "(cached) $ECHO_C" >&6
23915 else
23916
23917         ac_ext=cc
23918 ac_cpp='$CXXCPP $CPPFLAGS'
23919 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23920 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23921 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23922 ac_main_return=return
23923
23924         cat >conftest.$ac_ext <<_ACEOF
23925 #line 23925 "configure"
23926 #include "confdefs.h"
23927
23928 class NCursesPanel
23929 {
23930 public:
23931   NCursesPanel(int nlines,
23932                int ncols,
23933                int begin_y = 0,
23934                int begin_x = 0)
23935   {
23936   }
23937   NCursesPanel();
23938   ~NCursesPanel();
23939 };
23940
23941 template<class T> class NCursesUserPanel : public NCursesPanel
23942 {
23943 public:
23944   NCursesUserPanel (int nlines,
23945                     int ncols,
23946                     int begin_y = 0,
23947                     int begin_x = 0,
23948                     const T* p_UserData = static_cast<T*>(0))
23949     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23950   {
23951   };
23952   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23953   {
23954   };
23955
23956   virtual ~NCursesUserPanel() {};
23957 };
23958
23959 int
23960 main (void)
23961 {
23962
23963         const char* p_UserData = static_cast<char*>(0)
23964   ;
23965   return 0;
23966 }
23967 _ACEOF
23968 rm -f conftest.$ac_objext
23969 if { (eval echo "$as_me:23969: \"$ac_compile\"") >&5
23970   (eval $ac_compile) 2>&5
23971   ac_status=$?
23972   echo "$as_me:23972: \$? = $ac_status" >&5
23973   (exit $ac_status); } &&
23974          { ac_try='test -s conftest.$ac_objext'
23975   { (eval echo "$as_me:23975: \"$ac_try\"") >&5
23976   (eval $ac_try) 2>&5
23977   ac_status=$?
23978   echo "$as_me:23978: \$? = $ac_status" >&5
23979   (exit $ac_status); }; }; then
23980   cf_cv_cpp_static_cast=yes
23981 else
23982   echo "$as_me: failed program was:" >&5
23983 cat conftest.$ac_ext >&5
23984 cf_cv_cpp_static_cast=no
23985 fi
23986 rm -f conftest.$ac_objext conftest.$ac_ext
23987
23988         ac_ext=cc
23989 ac_cpp='$CXXCPP $CPPFLAGS'
23990 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23991 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23992 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23993 ac_main_return=return
23994
23995 fi
23996 echo "$as_me:23996: result: $cf_cv_cpp_static_cast" >&5
23997 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
23998
23999 fi
24000
24001 test "$cf_cv_cpp_static_cast" = yes &&
24002 cat >>confdefs.h <<\EOF
24003 #define CPP_HAS_STATIC_CAST 1
24004 EOF
24005
24006         CXX_AR='$(AR)'
24007         CXX_ARFLAGS='$(ARFLAGS)'
24008         case $cf_cv_system_name in
24009         (irix*)
24010             if test "$GXX" != yes ; then
24011                 CXX_AR='$(CXX)'
24012                 CXX_ARFLAGS='-ar -o'
24013             fi
24014             ;;
24015         (sco3.2v5*)
24016             CXXLDFLAGS="-u main"
24017             ;;
24018         (solaris2*)
24019             if test "$GXX" != yes ; then
24020                 CXX_AR='$(CXX)'
24021                 CXX_ARFLAGS='-xar -o'
24022             fi
24023             ;;
24024         esac
24025
24026 else
24027         cf_cxx_library=no
24028         cf_cv_builtin_bool=1
24029
24030         # Just because we are not configuring against C++ right now does not
24031         # mean that a user will not want to use C++.  Some distributors disable
24032         # the C++ portion of this configuration as a shortcut (or just to avoid
24033         # compiling the demo in the c++ directory).  So we need a reasonable
24034         # default for the 'bool' type.
24035         #
24036         # Caveat: since the storage of the bool type is not standardized, it
24037         # may change.
24038
24039         if test "$NCURSES_BOOL" != auto ; then
24040                 cf_cv_type_of_bool=$NCURSES_BOOL
24041                 cf_cv_header_stdbool_h=0
24042         else
24043                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24044
24045 echo "$as_me:24045: checking for size of bool" >&5
24046 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24047 if test "${cf_cv_type_of_bool+set}" = set; then
24048   echo $ECHO_N "(cached) $ECHO_C" >&6
24049 else
24050
24051         rm -f cf_test.out
24052         if test "$cross_compiling" = yes; then
24053   cf_cv_type_of_bool=unknown
24054 else
24055   cat >conftest.$ac_ext <<_ACEOF
24056 #line 24056 "configure"
24057 #include "confdefs.h"
24058
24059 #include <stdlib.h>
24060 #include <stdio.h>
24061
24062 #if defined(__cplusplus)
24063
24064 #ifdef HAVE_GXX_BUILTIN_H
24065 #include <g++/builtin.h>
24066 #elif HAVE_GPP_BUILTIN_H
24067 #include <gpp/builtin.h>
24068 #elif HAVE_BUILTIN_H
24069 #include <builtin.h>
24070 #endif
24071
24072 #else
24073
24074 #if $cf_cv_header_stdbool_h
24075 #include <stdbool.h>
24076 #endif
24077
24078 #endif
24079
24080 int main(void)
24081 {
24082         FILE *fp = fopen("cf_test.out", "w");
24083         if (fp != 0) {
24084                 bool x = true;
24085                 if ((bool)(-x) >= 0)
24086                         fputs("unsigned ", fp);
24087                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24088                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24089                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24090                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24091                 fclose(fp);
24092         }
24093         ${cf_cv_main_return:-return}(0);
24094 }
24095
24096 _ACEOF
24097 rm -f conftest$ac_exeext
24098 if { (eval echo "$as_me:24098: \"$ac_link\"") >&5
24099   (eval $ac_link) 2>&5
24100   ac_status=$?
24101   echo "$as_me:24101: \$? = $ac_status" >&5
24102   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24103   { (eval echo "$as_me:24103: \"$ac_try\"") >&5
24104   (eval $ac_try) 2>&5
24105   ac_status=$?
24106   echo "$as_me:24106: \$? = $ac_status" >&5
24107   (exit $ac_status); }; }; then
24108   cf_cv_type_of_bool=`cat cf_test.out`
24109                  if test -z "$cf_cv_type_of_bool"; then
24110                    cf_cv_type_of_bool=unknown
24111                  fi
24112 else
24113   echo "$as_me: program exited with status $ac_status" >&5
24114 echo "$as_me: failed program was:" >&5
24115 cat conftest.$ac_ext >&5
24116 cf_cv_type_of_bool=unknown
24117 fi
24118 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24119 fi
24120
24121 fi
24122
24123         rm -f cf_test.out
24124 echo "$as_me:24124: result: $cf_cv_type_of_bool" >&5
24125 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24126 if test "$cf_cv_type_of_bool" = unknown ; then
24127         case .$NCURSES_BOOL in
24128         (.auto|.) NCURSES_BOOL=unsigned;;
24129         esac
24130         { echo "$as_me:24130: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24131 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24132         cf_cv_type_of_bool=$NCURSES_BOOL
24133 fi
24134
24135                 else
24136                         echo "$as_me:24136: checking for fallback type of bool" >&5
24137 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24138                         case "$host_cpu" in
24139                         (i?86)  cf_cv_type_of_bool=char ;;
24140                         (*)     cf_cv_type_of_bool=int  ;;
24141                         esac
24142                         echo "$as_me:24142: result: $cf_cv_type_of_bool" >&5
24143 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24144                 fi
24145         fi
24146 fi
24147
24148 # If the C compiler did not declare bool, and we did not determine that the C++
24149 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24150 # ncurses library use the same type as C++ bool.  Note that this allows one to
24151 # specify the type of bool in a configure-script option and postpone
24152 # integration with the C++ compiler provided that the types are compatible.
24153 USE_CXX_BOOL=1
24154 if test $cf_cv_cc_bool_type = 1
24155 then
24156         # oops: C has a bool.  Unlikely, but C++ could differ.
24157         USE_CXX_BOOL=0
24158 elif test $cf_cv_builtin_bool = 0
24159 then
24160         # C++ has no bool
24161         USE_CXX_BOOL=0
24162 else
24163         # this is the normal case
24164         USE_CXX_BOOL='defined(__cplusplus)'
24165 fi
24166
24167 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24168
24169         if test "$cf_with_ada" != "no" ; then
24170                 if test "$with_libtool" != "no"; then
24171                         { echo "$as_me:24171: WARNING: libtool does not support Ada - disabling feature" >&5
24172 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24173                         cf_with_ada=no
24174                 fi
24175         fi
24176
24177         if test "$cf_with_ada" != "no" ; then
24178
24179 cf_ada_make=gnatmake
24180 cf_ada_config="#"
24181 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
24182 set dummy $cf_ada_make; ac_word=$2
24183 echo "$as_me:24183: checking for $ac_word" >&5
24184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24185 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
24186   echo $ECHO_N "(cached) $ECHO_C" >&6
24187 else
24188   if test -n "$gnatmake_exists"; then
24189   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
24190 else
24191   ac_save_IFS=$IFS; IFS=$ac_path_separator
24192 ac_dummy="$PATH"
24193 for ac_dir in $ac_dummy; do
24194   IFS=$ac_save_IFS
24195   test -z "$ac_dir" && ac_dir=.
24196   $as_executable_p "$ac_dir/$ac_word" || continue
24197 ac_cv_prog_gnatmake_exists="yes"
24198 echo "$as_me:24198: found $ac_dir/$ac_word" >&5
24199 break
24200 done
24201
24202   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
24203 fi
24204 fi
24205 gnatmake_exists=$ac_cv_prog_gnatmake_exists
24206 if test -n "$gnatmake_exists"; then
24207   echo "$as_me:24207: result: $gnatmake_exists" >&5
24208 echo "${ECHO_T}$gnatmake_exists" >&6
24209 else
24210   echo "$as_me:24210: result: no" >&5
24211 echo "${ECHO_T}no" >&6
24212 fi
24213
24214 if test "$ac_cv_prog_gnatmake_exists" = no; then
24215         cf_ada_make=
24216         cf_cv_prog_gnat_correct=no
24217 else
24218         # Extract the first word of "gprconfig", so it can be a program name with args.
24219 set dummy gprconfig; ac_word=$2
24220 echo "$as_me:24220: checking for $ac_word" >&5
24221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24222 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
24223   echo $ECHO_N "(cached) $ECHO_C" >&6
24224 else
24225   if test -n "$gprconfig_exists"; then
24226   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
24227 else
24228   ac_save_IFS=$IFS; IFS=$ac_path_separator
24229 ac_dummy="$PATH"
24230 for ac_dir in $ac_dummy; do
24231   IFS=$ac_save_IFS
24232   test -z "$ac_dir" && ac_dir=.
24233   $as_executable_p "$ac_dir/$ac_word" || continue
24234 ac_cv_prog_gprconfig_exists="yes"
24235 echo "$as_me:24235: found $ac_dir/$ac_word" >&5
24236 break
24237 done
24238
24239   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
24240 fi
24241 fi
24242 gprconfig_exists=$ac_cv_prog_gprconfig_exists
24243 if test -n "$gprconfig_exists"; then
24244   echo "$as_me:24244: result: $gprconfig_exists" >&5
24245 echo "${ECHO_T}$gprconfig_exists" >&6
24246 else
24247   echo "$as_me:24247: result: no" >&5
24248 echo "${ECHO_T}no" >&6
24249 fi
24250
24251         if test "$ac_cv_prog_gprconfig_exists" = yes
24252         then
24253                 rm -rf conftest* *~conftest*
24254                 if mkdir conftest.src
24255                 then
24256                         cf_ada_config=""
24257                         cd conftest.src
24258                         for cf_gprconfig in Ada C
24259                         do
24260                                 echo "$as_me:24260: checking for gprconfig name for $cf_gprconfig" >&5
24261 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24262                                 if test $cf_gprconfig = C
24263                                 then
24264                                         for cf_gprconfig_param in \
24265                                                 $cf_gprconfig,,,,GNATGCC \
24266                                                 $cf_gprconfig,,,,GCC \
24267                                                 $cf_gprconfig
24268                                         do
24269                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24270                                                 test -n "$cf_gprconfig_value" && break
24271                                         done
24272                                 else
24273                                         cf_gprconfig_param=$cf_gprconfig
24274                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24275                                 fi
24276                                 if test -n "$cf_gprconfig_value"
24277                                 then
24278                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24279                                         echo "$as_me:24279: result: $cf_gprconfig_value" >&5
24280 echo "${ECHO_T}$cf_gprconfig_value" >&6
24281                                 else
24282                                         echo "$as_me:24282: result: missing" >&5
24283 echo "${ECHO_T}missing" >&6
24284                                         cf_ada_config="#"
24285                                         break
24286                                 fi
24287                         done
24288                         cd ..
24289                         rm -rf conftest* *~conftest*
24290                 fi
24291         else
24292                 # gprconfig is newer than gnatmake; we can continue...
24293                 cf_ada_config="##"
24294         fi
24295         if test "x$cf_ada_config" != "x#"
24296         then
24297
24298 echo "$as_me:24298: checking for gnat version" >&5
24299 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24300 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
24301         grep '[0-9].[0-9][0-9]*' |\
24302         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24303 echo "$as_me:24303: result: $cf_gnat_version" >&5
24304 echo "${ECHO_T}$cf_gnat_version" >&6
24305
24306 case $cf_gnat_version in
24307 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24308         cf_cv_prog_gnat_correct=yes
24309         ;;
24310 (*)
24311         { echo "$as_me:24311: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24312 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24313         cf_cv_prog_gnat_correct=no
24314         ;;
24315 esac
24316
24317                 # Extract the first word of "m4", so it can be a program name with args.
24318 set dummy m4; ac_word=$2
24319 echo "$as_me:24319: checking for $ac_word" >&5
24320 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24321 if test "${ac_cv_prog_M4_exists+set}" = set; then
24322   echo $ECHO_N "(cached) $ECHO_C" >&6
24323 else
24324   if test -n "$M4_exists"; then
24325   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24326 else
24327   ac_save_IFS=$IFS; IFS=$ac_path_separator
24328 ac_dummy="$PATH"
24329 for ac_dir in $ac_dummy; do
24330   IFS=$ac_save_IFS
24331   test -z "$ac_dir" && ac_dir=.
24332   $as_executable_p "$ac_dir/$ac_word" || continue
24333 ac_cv_prog_M4_exists="yes"
24334 echo "$as_me:24334: found $ac_dir/$ac_word" >&5
24335 break
24336 done
24337
24338   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24339 fi
24340 fi
24341 M4_exists=$ac_cv_prog_M4_exists
24342 if test -n "$M4_exists"; then
24343   echo "$as_me:24343: result: $M4_exists" >&5
24344 echo "${ECHO_T}$M4_exists" >&6
24345 else
24346   echo "$as_me:24346: result: no" >&5
24347 echo "${ECHO_T}no" >&6
24348 fi
24349
24350                 if test "$ac_cv_prog_M4_exists" = no; then
24351                         cf_cv_prog_gnat_correct=no
24352                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
24353                 fi
24354                 if test "$cf_cv_prog_gnat_correct" = yes; then
24355                         echo "$as_me:24355: checking if GNAT works" >&5
24356 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24357
24358 rm -rf conftest* *~conftest*
24359 cat >>conftest.ads <<CF_EOF
24360 procedure conftest;
24361 CF_EOF
24362 cat >>conftest.adb <<CF_EOF
24363 with Text_IO;
24364 with GNAT.OS_Lib;
24365 procedure conftest is
24366 begin
24367    Text_IO.Put ("Hello World");
24368    Text_IO.New_Line;
24369    GNAT.OS_Lib.OS_Exit (0);
24370 end conftest;
24371 CF_EOF
24372 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24373    if ( ./conftest 1>&5 2>&1 ) ; then
24374       cf_cv_prog_gnat_correct=yes
24375    else
24376       cf_cv_prog_gnat_correct=no
24377    fi
24378 else
24379    cf_cv_prog_gnat_correct=no
24380 fi
24381 rm -rf conftest* *~conftest*
24382
24383                         echo "$as_me:24383: result: $cf_cv_prog_gnat_correct" >&5
24384 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24385                 fi
24386         else
24387                 cf_cv_prog_gnat_correct=no
24388         fi
24389 fi
24390
24391                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24392
24393         ADAFLAGS="$ADAFLAGS -gnatpn"
24394
24395         echo "$as_me:24395: checking optimization options for ADAFLAGS" >&5
24396 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24397         case "$CFLAGS" in
24398         (*-g*)
24399
24400         ADAFLAGS="$ADAFLAGS -g"
24401
24402                 ;;
24403         esac
24404         case "$CFLAGS" in
24405         (*-O*)
24406                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24407
24408         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24409
24410                 ;;
24411         esac
24412         echo "$as_me:24412: result: $ADAFLAGS" >&5
24413 echo "${ECHO_T}$ADAFLAGS" >&6
24414
24415 echo "$as_me:24415: checking if GNATPREP supports -T option" >&5
24416 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24417 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24418   echo $ECHO_N "(cached) $ECHO_C" >&6
24419 else
24420
24421 cf_cv_gnatprep_opt_t=no
24422 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24423
24424 fi
24425 echo "$as_me:24425: result: $cf_cv_gnatprep_opt_t" >&5
24426 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24427 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24428
24429 echo "$as_me:24429: checking if GNAT supports generics" >&5
24430 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24431 case $cf_gnat_version in
24432 (3.[1-9]*|[4-9].*)
24433         cf_gnat_generics=yes
24434         ;;
24435 (*)
24436         cf_gnat_generics=no
24437         ;;
24438 esac
24439 echo "$as_me:24439: result: $cf_gnat_generics" >&5
24440 echo "${ECHO_T}$cf_gnat_generics" >&6
24441
24442 if test "$cf_gnat_generics" = yes
24443 then
24444         cf_compile_generics=generics
24445         cf_generic_objects="\${GENOBJS}"
24446 else
24447         cf_compile_generics=
24448         cf_generic_objects=
24449 fi
24450
24451 echo "$as_me:24451: checking if GNAT supports SIGINT" >&5
24452 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24453 if test "${cf_cv_gnat_sigint+set}" = set; then
24454   echo $ECHO_N "(cached) $ECHO_C" >&6
24455 else
24456
24457 rm -rf conftest* *~conftest*
24458 cat >>conftest.ads <<CF_EOF
24459 with Ada.Interrupts.Names;
24460
24461 package ConfTest is
24462
24463    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24464    pragma Unreserve_All_Interrupts;
24465    pragma Warnings (On);
24466
24467    protected Process is
24468       procedure Stop;
24469       function Continue return Boolean;
24470       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24471    private
24472       Done : Boolean := False;
24473    end Process;
24474
24475 end ConfTest;
24476 CF_EOF
24477 cat >>conftest.adb <<CF_EOF
24478 package body ConfTest is
24479    protected body Process is
24480       procedure Stop is
24481       begin
24482          Done := True;
24483       end Stop;
24484       function Continue return Boolean is
24485       begin
24486          return not Done;
24487       end Continue;
24488    end Process;
24489 end ConfTest;
24490 CF_EOF
24491 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24492       cf_cv_gnat_sigint=yes
24493 else
24494    cf_cv_gnat_sigint=no
24495 fi
24496 rm -rf conftest* *~conftest*
24497
24498 fi
24499 echo "$as_me:24499: result: $cf_cv_gnat_sigint" >&5
24500 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24501
24502 if test $cf_cv_gnat_sigint = yes ; then
24503         USE_GNAT_SIGINT=""
24504 else
24505         USE_GNAT_SIGINT="#"
24506 fi
24507
24508 cf_gnat_libraries=no
24509 cf_gnat_projects=no
24510
24511 if test "$enable_gnat_projects" != no ; then
24512 echo "$as_me:24512: checking if GNAT supports project files" >&5
24513 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24514 case $cf_gnat_version in
24515 (3.[0-9]*)
24516         ;;
24517 (*)
24518         case $cf_cv_system_name in
24519         (cygwin*|msys*)
24520                 ;;
24521         (*)
24522                 rm -rf conftest* *~conftest*
24523                 if mkdir conftest.src conftest.bin conftest.lib
24524                 then
24525                         cd conftest.src
24526                         rm -rf conftest* *~conftest*
24527                         cat >>library.gpr <<CF_EOF
24528 project Library is
24529   Kind := External ("LIB_KIND");
24530   for Library_Name use "ConfTest";
24531   for Object_Dir use ".";
24532   for Library_ALI_Dir use External("LIBRARY_DIR");
24533   for Library_Version use External ("SONAME");
24534   for Library_Kind use Kind;
24535   for Library_Dir use External("BUILD_DIR");
24536   Source_Dir := External ("SOURCE_DIR");
24537   for Source_Dirs use (Source_Dir);
24538 end Library;
24539 CF_EOF
24540                         cat >>confpackage.ads <<CF_EOF
24541 package ConfPackage is
24542    procedure conftest;
24543 end ConfPackage;
24544 CF_EOF
24545                         cat >>confpackage.adb <<CF_EOF
24546 with Text_IO;
24547 package body ConfPackage is
24548    procedure conftest is
24549    begin
24550       Text_IO.Put ("Hello World");
24551       Text_IO.New_Line;
24552    end conftest;
24553 end ConfPackage;
24554 CF_EOF
24555                         if ( $cf_ada_make $ADAFLAGS \
24556                                         -Plibrary.gpr \
24557                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24558                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24559                                         -XSOURCE_DIR=`pwd` \
24560                                         -XSONAME=libConfTest.so.1 \
24561                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24562                                 cf_gnat_projects=yes
24563                         fi
24564                         cd ..
24565                 fi
24566                 if test -f conftest.lib/confpackage.ali
24567                 then
24568                         cf_gnat_libraries=yes
24569                 fi
24570                 rm -rf conftest* *~conftest*
24571                 ;;
24572         esac
24573         ;;
24574 esac
24575 echo "$as_me:24575: result: $cf_gnat_projects" >&5
24576 echo "${ECHO_T}$cf_gnat_projects" >&6
24577 fi # enable_gnat_projects
24578
24579 if test $cf_gnat_projects = yes
24580 then
24581         echo "$as_me:24581: checking if GNAT supports libraries" >&5
24582 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24583         echo "$as_me:24583: result: $cf_gnat_libraries" >&5
24584 echo "${ECHO_T}$cf_gnat_libraries" >&6
24585 fi
24586
24587 if test "$cf_gnat_projects" = yes
24588 then
24589         USE_OLD_MAKERULES="#"
24590         USE_GNAT_PROJECTS=""
24591 else
24592         USE_OLD_MAKERULES=""
24593         USE_GNAT_PROJECTS="#"
24594 fi
24595
24596 if test "$cf_gnat_libraries" = yes
24597 then
24598         USE_GNAT_LIBRARIES=""
24599 else
24600         USE_GNAT_LIBRARIES="#"
24601 fi
24602
24603 echo "$as_me:24603: checking for ada-compiler" >&5
24604 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24605
24606 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24607 if test "${with_ada_compiler+set}" = set; then
24608   withval="$with_ada_compiler"
24609   cf_ada_compiler=$withval
24610 else
24611   cf_ada_compiler=gnatmake
24612 fi;
24613
24614 echo "$as_me:24614: result: $cf_ada_compiler" >&5
24615 echo "${ECHO_T}$cf_ada_compiler" >&6
24616
24617                         cf_ada_package=terminal_interface
24618
24619 echo "$as_me:24619: checking for ada-include" >&5
24620 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24621
24622 # Check whether --with-ada-include or --without-ada-include was given.
24623 if test "${with_ada_include+set}" = set; then
24624   withval="$with_ada_include"
24625
24626 else
24627   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24628 fi; if test -n "$prefix/share/ada/adainclude" ; then
24629
24630 if test "x$prefix" != xNONE; then
24631         cf_path_syntax="$prefix"
24632 else
24633         cf_path_syntax="$ac_default_prefix"
24634 fi
24635
24636 case ".$withval" in
24637 (.\$\(*\)*|.\'*\'*)
24638         ;;
24639 (..|./*|.\\*)
24640         ;;
24641 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24642         ;;
24643 (.\${*prefix}*|.\${*dir}*)
24644         eval withval="$withval"
24645         case ".$withval" in
24646         (.NONE/*)
24647                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24648                 ;;
24649         esac
24650         ;;
24651 (.no|.NONE/*)
24652         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24653         ;;
24654 (*)
24655         { { echo "$as_me:24655: error: expected a pathname, not \"$withval\"" >&5
24656 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24657    { (exit 1); exit 1; }; }
24658         ;;
24659 esac
24660
24661 fi
24662 eval ADA_INCLUDE="$withval"
24663
24664 echo "$as_me:24664: result: $ADA_INCLUDE" >&5
24665 echo "${ECHO_T}$ADA_INCLUDE" >&6
24666
24667 echo "$as_me:24667: checking for ada-objects" >&5
24668 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24669
24670 # Check whether --with-ada-objects or --without-ada-objects was given.
24671 if test "${with_ada_objects+set}" = set; then
24672   withval="$with_ada_objects"
24673
24674 else
24675   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24676 fi; if test -n "$prefix/lib/ada/adalib" ; then
24677
24678 if test "x$prefix" != xNONE; then
24679         cf_path_syntax="$prefix"
24680 else
24681         cf_path_syntax="$ac_default_prefix"
24682 fi
24683
24684 case ".$withval" in
24685 (.\$\(*\)*|.\'*\'*)
24686         ;;
24687 (..|./*|.\\*)
24688         ;;
24689 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24690         ;;
24691 (.\${*prefix}*|.\${*dir}*)
24692         eval withval="$withval"
24693         case ".$withval" in
24694         (.NONE/*)
24695                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24696                 ;;
24697         esac
24698         ;;
24699 (.no|.NONE/*)
24700         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24701         ;;
24702 (*)
24703         { { echo "$as_me:24703: error: expected a pathname, not \"$withval\"" >&5
24704 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24705    { (exit 1); exit 1; }; }
24706         ;;
24707 esac
24708
24709 fi
24710 eval ADA_OBJECTS="$withval"
24711
24712 echo "$as_me:24712: result: $ADA_OBJECTS" >&5
24713 echo "${ECHO_T}$ADA_OBJECTS" >&6
24714
24715 echo "$as_me:24715: checking if an Ada95 shared-library should be built" >&5
24716 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24717
24718 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24719 if test "${with_ada_sharedlib+set}" = set; then
24720   withval="$with_ada_sharedlib"
24721   with_ada_sharedlib=$withval
24722 else
24723   with_ada_sharedlib=no
24724 fi;
24725 echo "$as_me:24725: result: $with_ada_sharedlib" >&5
24726 echo "${ECHO_T}$with_ada_sharedlib" >&6
24727
24728 if test "x$with_ada_sharedlib" != xno
24729 then
24730         if test "x$cf_gnat_projects" != xyes
24731         then
24732                 { echo "$as_me:24732: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24733 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24734                 with_ada_sharedlib=no
24735         fi
24736 fi
24737
24738 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24739 MAKE_ADA_SHAREDLIB="#"
24740
24741 if test "x$with_ada_sharedlib" != xno
24742 then
24743         MAKE_ADA_SHAREDLIB=
24744         if test "x$with_ada_sharedlib" != xyes
24745         then
24746                 ADA_SHAREDLIB="$with_ada_sharedlib"
24747         fi
24748 fi
24749
24750                         # allow the Ada binding to be renamed
24751
24752 echo "$as_me:24752: checking for ada-libname" >&5
24753 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24754
24755 # Check whether --with-ada-libname or --without-ada-libname was given.
24756 if test "${with_ada_libname+set}" = set; then
24757   withval="$with_ada_libname"
24758   ADA_LIBNAME=$withval
24759 else
24760   ADA_LIBNAME=AdaCurses
24761 fi;
24762 case "x$ADA_LIBNAME" in
24763 (x|xyes|xno)
24764         ADA_LIBNAME=AdaCurses
24765         ;;
24766 esac
24767
24768 echo "$as_me:24768: result: $ADA_LIBNAME" >&5
24769 echo "${ECHO_T}$ADA_LIBNAME" >&6
24770
24771                 fi
24772         fi
24773 else
24774         cf_with_ada=no
24775 fi
24776
24777 # do this "late" to avoid conflict with header-checks
24778 if test "x$with_widec" = xyes ; then
24779         echo "$as_me:24779: checking for wchar_t" >&5
24780 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24781 if test "${ac_cv_type_wchar_t+set}" = set; then
24782   echo $ECHO_N "(cached) $ECHO_C" >&6
24783 else
24784   cat >conftest.$ac_ext <<_ACEOF
24785 #line 24785 "configure"
24786 #include "confdefs.h"
24787 $ac_includes_default
24788 int
24789 main (void)
24790 {
24791 if ((wchar_t *) 0)
24792   return 0;
24793 if (sizeof (wchar_t))
24794   return 0;
24795   ;
24796   return 0;
24797 }
24798 _ACEOF
24799 rm -f conftest.$ac_objext
24800 if { (eval echo "$as_me:24800: \"$ac_compile\"") >&5
24801   (eval $ac_compile) 2>&5
24802   ac_status=$?
24803   echo "$as_me:24803: \$? = $ac_status" >&5
24804   (exit $ac_status); } &&
24805          { ac_try='test -s conftest.$ac_objext'
24806   { (eval echo "$as_me:24806: \"$ac_try\"") >&5
24807   (eval $ac_try) 2>&5
24808   ac_status=$?
24809   echo "$as_me:24809: \$? = $ac_status" >&5
24810   (exit $ac_status); }; }; then
24811   ac_cv_type_wchar_t=yes
24812 else
24813   echo "$as_me: failed program was:" >&5
24814 cat conftest.$ac_ext >&5
24815 ac_cv_type_wchar_t=no
24816 fi
24817 rm -f conftest.$ac_objext conftest.$ac_ext
24818 fi
24819 echo "$as_me:24819: result: $ac_cv_type_wchar_t" >&5
24820 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24821
24822 echo "$as_me:24822: checking size of wchar_t" >&5
24823 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24824 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24825   echo $ECHO_N "(cached) $ECHO_C" >&6
24826 else
24827   if test "$ac_cv_type_wchar_t" = yes; then
24828   if test "$cross_compiling" = yes; then
24829   # Depending upon the size, compute the lo and hi bounds.
24830 cat >conftest.$ac_ext <<_ACEOF
24831 #line 24831 "configure"
24832 #include "confdefs.h"
24833 $ac_includes_default
24834 int
24835 main (void)
24836 {
24837 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24838   ;
24839   return 0;
24840 }
24841 _ACEOF
24842 rm -f conftest.$ac_objext
24843 if { (eval echo "$as_me:24843: \"$ac_compile\"") >&5
24844   (eval $ac_compile) 2>&5
24845   ac_status=$?
24846   echo "$as_me:24846: \$? = $ac_status" >&5
24847   (exit $ac_status); } &&
24848          { ac_try='test -s conftest.$ac_objext'
24849   { (eval echo "$as_me:24849: \"$ac_try\"") >&5
24850   (eval $ac_try) 2>&5
24851   ac_status=$?
24852   echo "$as_me:24852: \$? = $ac_status" >&5
24853   (exit $ac_status); }; }; then
24854   ac_lo=0 ac_mid=0
24855   while :; do
24856     cat >conftest.$ac_ext <<_ACEOF
24857 #line 24857 "configure"
24858 #include "confdefs.h"
24859 $ac_includes_default
24860 int
24861 main (void)
24862 {
24863 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24864   ;
24865   return 0;
24866 }
24867 _ACEOF
24868 rm -f conftest.$ac_objext
24869 if { (eval echo "$as_me:24869: \"$ac_compile\"") >&5
24870   (eval $ac_compile) 2>&5
24871   ac_status=$?
24872   echo "$as_me:24872: \$? = $ac_status" >&5
24873   (exit $ac_status); } &&
24874          { ac_try='test -s conftest.$ac_objext'
24875   { (eval echo "$as_me:24875: \"$ac_try\"") >&5
24876   (eval $ac_try) 2>&5
24877   ac_status=$?
24878   echo "$as_me:24878: \$? = $ac_status" >&5
24879   (exit $ac_status); }; }; then
24880   ac_hi=$ac_mid; break
24881 else
24882   echo "$as_me: failed program was:" >&5
24883 cat conftest.$ac_ext >&5
24884 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24885 fi
24886 rm -f conftest.$ac_objext conftest.$ac_ext
24887   done
24888 else
24889   echo "$as_me: failed program was:" >&5
24890 cat conftest.$ac_ext >&5
24891 ac_hi=-1 ac_mid=-1
24892   while :; do
24893     cat >conftest.$ac_ext <<_ACEOF
24894 #line 24894 "configure"
24895 #include "confdefs.h"
24896 $ac_includes_default
24897 int
24898 main (void)
24899 {
24900 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24901   ;
24902   return 0;
24903 }
24904 _ACEOF
24905 rm -f conftest.$ac_objext
24906 if { (eval echo "$as_me:24906: \"$ac_compile\"") >&5
24907   (eval $ac_compile) 2>&5
24908   ac_status=$?
24909   echo "$as_me:24909: \$? = $ac_status" >&5
24910   (exit $ac_status); } &&
24911          { ac_try='test -s conftest.$ac_objext'
24912   { (eval echo "$as_me:24912: \"$ac_try\"") >&5
24913   (eval $ac_try) 2>&5
24914   ac_status=$?
24915   echo "$as_me:24915: \$? = $ac_status" >&5
24916   (exit $ac_status); }; }; then
24917   ac_lo=$ac_mid; break
24918 else
24919   echo "$as_me: failed program was:" >&5
24920 cat conftest.$ac_ext >&5
24921 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24922 fi
24923 rm -f conftest.$ac_objext conftest.$ac_ext
24924   done
24925 fi
24926 rm -f conftest.$ac_objext conftest.$ac_ext
24927 # Binary search between lo and hi bounds.
24928 while test "x$ac_lo" != "x$ac_hi"; do
24929   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24930   cat >conftest.$ac_ext <<_ACEOF
24931 #line 24931 "configure"
24932 #include "confdefs.h"
24933 $ac_includes_default
24934 int
24935 main (void)
24936 {
24937 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24938   ;
24939   return 0;
24940 }
24941 _ACEOF
24942 rm -f conftest.$ac_objext
24943 if { (eval echo "$as_me:24943: \"$ac_compile\"") >&5
24944   (eval $ac_compile) 2>&5
24945   ac_status=$?
24946   echo "$as_me:24946: \$? = $ac_status" >&5
24947   (exit $ac_status); } &&
24948          { ac_try='test -s conftest.$ac_objext'
24949   { (eval echo "$as_me:24949: \"$ac_try\"") >&5
24950   (eval $ac_try) 2>&5
24951   ac_status=$?
24952   echo "$as_me:24952: \$? = $ac_status" >&5
24953   (exit $ac_status); }; }; then
24954   ac_hi=$ac_mid
24955 else
24956   echo "$as_me: failed program was:" >&5
24957 cat conftest.$ac_ext >&5
24958 ac_lo=`expr $ac_mid + 1`
24959 fi
24960 rm -f conftest.$ac_objext conftest.$ac_ext
24961 done
24962 ac_cv_sizeof_wchar_t=$ac_lo
24963 else
24964   if test "$cross_compiling" = yes; then
24965   { { echo "$as_me:24965: error: cannot run test program while cross compiling" >&5
24966 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
24967    { (exit 1); exit 1; }; }
24968 else
24969   cat >conftest.$ac_ext <<_ACEOF
24970 #line 24970 "configure"
24971 #include "confdefs.h"
24972 $ac_includes_default
24973 int
24974 main (void)
24975 {
24976 FILE *f = fopen ("conftest.val", "w");
24977 if (!f)
24978   $ac_main_return (1);
24979 fprintf (f, "%d", (sizeof (wchar_t)));
24980 fclose (f);
24981   ;
24982   return 0;
24983 }
24984 _ACEOF
24985 rm -f conftest$ac_exeext
24986 if { (eval echo "$as_me:24986: \"$ac_link\"") >&5
24987   (eval $ac_link) 2>&5
24988   ac_status=$?
24989   echo "$as_me:24989: \$? = $ac_status" >&5
24990   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24991   { (eval echo "$as_me:24991: \"$ac_try\"") >&5
24992   (eval $ac_try) 2>&5
24993   ac_status=$?
24994   echo "$as_me:24994: \$? = $ac_status" >&5
24995   (exit $ac_status); }; }; then
24996   ac_cv_sizeof_wchar_t=`cat conftest.val`
24997 else
24998   echo "$as_me: program exited with status $ac_status" >&5
24999 echo "$as_me: failed program was:" >&5
25000 cat conftest.$ac_ext >&5
25001 fi
25002 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25003 fi
25004 fi
25005 rm -f conftest.val
25006 else
25007   ac_cv_sizeof_wchar_t=0
25008 fi
25009 fi
25010 echo "$as_me:25010: result: $ac_cv_sizeof_wchar_t" >&5
25011 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25012 cat >>confdefs.h <<EOF
25013 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25014 EOF
25015
25016 fi
25017
25018 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25019 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25020 ###
25021 ### ticlib modules may be a separate library, otherwise contained in termlib.
25022 ### termlib modules may be a separate library, otherwise contained in ncurses.
25023 ###
25024 ### The of "+" or " " between the tokens controls the way the script
25025 ### chooses to split module lists into libraries.
25026 ###
25027 ### (see CF_LIB_RULES).
25028 echo "$as_me:25028: checking for library subsets" >&5
25029 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25030 LIB_SUBSETS=
25031
25032 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25033         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25034         if test "$with_ticlib" != no ; then
25035                 LIB_SUBSETS="${LIB_SUBSETS} "
25036         else
25037                 LIB_SUBSETS="${LIB_SUBSETS}+"
25038         fi
25039 fi
25040
25041 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25042 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25043
25044 if test "$with_termlib" != no ; then
25045         LIB_SUBSETS="${LIB_SUBSETS} "
25046 else
25047         LIB_SUBSETS="${LIB_SUBSETS}+"
25048 fi
25049
25050 LIB_SUBSETS="${LIB_SUBSETS}base"
25051
25052 # Most term-driver calls are to tinfo, but some like init_pair are to the
25053 # base library (so it resides in base).
25054 if test "$with_term_driver" != no ; then
25055         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25056         case $cf_cv_system_name in
25057         (*mingw32*|*mingw64*)
25058                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25059                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25060                 ;;
25061         (*)
25062                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25063                 ;;
25064         esac
25065 fi
25066
25067 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25068 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25069
25070 echo "$as_me:25070: result: $LIB_SUBSETS" >&5
25071 echo "${ECHO_T}$LIB_SUBSETS" >&6
25072
25073 ### Construct the list of include-directories to be generated
25074
25075 if test "$srcdir" != "."; then
25076         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25077 fi
25078 CPPFLAGS="-I../include $CPPFLAGS"
25079 if test "$srcdir" != "."; then
25080         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25081 fi
25082 CPPFLAGS="-I. $CPPFLAGS"
25083
25084 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25085 if test "$srcdir" != "."; then
25086         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25087 fi
25088 if test "$GCC" != yes; then
25089         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25090 elif test "$includedir" != "/usr/include"; then
25091         if test "$includedir" = '${prefix}/include' ; then
25092                 if test x$prefix != x/usr ; then
25093                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25094                 fi
25095         else
25096                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25097         fi
25098 fi
25099
25100 ### Build up pieces for makefile rules
25101 echo "$as_me:25101: checking default library suffix" >&5
25102 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25103
25104         case $DFT_LWR_MODEL in
25105         (libtool) DFT_ARG_SUFFIX=''   ;;
25106         (normal)  DFT_ARG_SUFFIX=''   ;;
25107         (debug)   DFT_ARG_SUFFIX='_g' ;;
25108         (profile) DFT_ARG_SUFFIX='_p' ;;
25109         (shared)  DFT_ARG_SUFFIX=''   ;;
25110         esac
25111         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25112 echo "$as_me:25112: result: $DFT_ARG_SUFFIX" >&5
25113 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25114
25115 echo "$as_me:25115: checking default library-dependency suffix" >&5
25116 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25117
25118         case X$DFT_LWR_MODEL in
25119         (Xlibtool)
25120                 DFT_LIB_SUFFIX='.la'
25121                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25122                 ;;
25123         (Xdebug)
25124                 DFT_LIB_SUFFIX='_g.a'
25125                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25126                 ;;
25127         (Xprofile)
25128                 DFT_LIB_SUFFIX='_p.a'
25129                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25130                 ;;
25131         (Xshared)
25132                 case $cf_cv_system_name in
25133                 (aix[5-7]*)
25134                         DFT_LIB_SUFFIX='.so'
25135                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25136                         ;;
25137                 (cygwin*|msys*|mingw*)
25138                         DFT_LIB_SUFFIX='.dll'
25139                         DFT_DEP_SUFFIX='.dll.a'
25140                         ;;
25141                 (darwin*)
25142                         DFT_LIB_SUFFIX='.dylib'
25143                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25144                         ;;
25145                 (hpux*)
25146                         case $target in
25147                         (ia64*)
25148                                 DFT_LIB_SUFFIX='.so'
25149                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25150                                 ;;
25151                         (*)
25152                                 DFT_LIB_SUFFIX='.sl'
25153                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25154                                 ;;
25155                         esac
25156                         ;;
25157                 (*)
25158                         DFT_LIB_SUFFIX='.so'
25159                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25160                         ;;
25161                 esac
25162                 ;;
25163         (*)
25164                 DFT_LIB_SUFFIX='.a'
25165                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25166                 ;;
25167         esac
25168         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25169         then
25170                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25171                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25172         fi
25173 echo "$as_me:25173: result: $DFT_DEP_SUFFIX" >&5
25174 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25175
25176 echo "$as_me:25176: checking default object directory" >&5
25177 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25178
25179         case $DFT_LWR_MODEL in
25180         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25181         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25182         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25183         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25184         (shared)
25185                 case $cf_cv_system_name in
25186                 (cygwin|msys)
25187                         DFT_OBJ_SUBDIR='objects' ;;
25188                 (*)
25189                         DFT_OBJ_SUBDIR='obj_s' ;;
25190                 esac
25191         esac
25192 echo "$as_me:25192: result: $DFT_OBJ_SUBDIR" >&5
25193 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25194
25195 if test "x$cf_with_cxx" = xyes ; then
25196 echo "$as_me:25196: checking c++ library-dependency suffix" >&5
25197 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25198 if test "$with_libtool" != "no"; then
25199         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25200         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25201 elif test "$with_shared_cxx" != "no"; then
25202         # also for g++ users...
25203         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25204 else
25205         # we normally make a static library because C/C++ library rules differ
25206
25207         case Xnormal in
25208         (Xlibtool)
25209                 CXX_LIB_SUFFIX='.la'
25210                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25211                 ;;
25212         (Xdebug)
25213                 CXX_LIB_SUFFIX='_g.a'
25214                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25215                 ;;
25216         (Xprofile)
25217                 CXX_LIB_SUFFIX='_p.a'
25218                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25219                 ;;
25220         (Xshared)
25221                 case $cf_cv_system_name in
25222                 (aix[5-7]*)
25223                         CXX_LIB_SUFFIX='.so'
25224                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25225                         ;;
25226                 (cygwin*|msys*|mingw*)
25227                         CXX_LIB_SUFFIX='.dll'
25228                         CXX_DEP_SUFFIX='.dll.a'
25229                         ;;
25230                 (darwin*)
25231                         CXX_LIB_SUFFIX='.dylib'
25232                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25233                         ;;
25234                 (hpux*)
25235                         case $target in
25236                         (ia64*)
25237                                 CXX_LIB_SUFFIX='.so'
25238                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25239                                 ;;
25240                         (*)
25241                                 CXX_LIB_SUFFIX='.sl'
25242                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25243                                 ;;
25244                         esac
25245                         ;;
25246                 (*)
25247                         CXX_LIB_SUFFIX='.so'
25248                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25249                         ;;
25250                 esac
25251                 ;;
25252         (*)
25253                 CXX_LIB_SUFFIX='.a'
25254                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25255                 ;;
25256         esac
25257         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25258         then
25259                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25260                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25261         fi
25262
25263 fi
25264 echo "$as_me:25264: result: $CXX_LIB_SUFFIX" >&5
25265 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25266
25267 fi
25268
25269 # do not want -ldl in build except as needed for -lncurses dependency
25270 if test "x$with_dlsym" = xyes ; then
25271 if test $DFT_LWR_MODEL = shared || \
25272    test $DFT_LWR_MODEL = libtool ; then
25273
25274 # remove dl library from $LIBS
25275 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25276
25277 fi
25278 fi
25279 ### Set up low-level terminfo dependencies for makefiles.
25280
25281 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25282 # do not need libdl
25283 TICS_LIST=
25284 if test "x$with_dlsym" = xyes ; then
25285
25286 # remove dl library from $SHLIB_LIST
25287 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25288
25289 fi
25290
25291 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25292 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25293 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25294 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25295 then
25296         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25297 fi
25298
25299 if test "$with_ticlib" != no ; then
25300
25301         if test "x$with_ticlib" != xyes ; then
25302                 TICS_NAME=$with_ticlib
25303                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25304                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25305                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25306                 TICS_LIB_SUFFIX="${with_ticlib}"
25307         else
25308                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25309                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25310                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25311                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25312         fi
25313         TICS_LDFLAGS="-L${LIB_DIR}"
25314         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25315 else
25316         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25317         TICS_LDFLAGS="-L${LIB_DIR}"
25318         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25319 fi
25320
25321 if test "$with_termlib" != no ; then
25322
25323         if test "x$with_termlib" != xyes ; then
25324                 TINFO_NAME=$with_termlib
25325                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25326                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25327                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25328                 TINFO_LIB_SUFFIX="${with_termlib}"
25329         else
25330                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25331                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25332                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25333                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25334         fi
25335
25336         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25337         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25338         if test "$DFT_LWR_MODEL" = "libtool"; then
25339                 TEST_ARGS="${TEST_DEPS}"
25340                 TEST_ARG2="${TEST_DEP2}"
25341                 TINFO_LDFLAGS="-L${LIB_DIR}"
25342                 TINFO_LIBS="$TEST_ARGS"
25343                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25344                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25345         else
25346                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25347                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25348                 if test "x$with_term_driver" != xno ; then
25349                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25350                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25351                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25352                 else
25353                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25354                         TINFO_LIBS="$TEST_ARGS"
25355                 fi
25356                 TINFO_LDFLAGS="-L${LIB_DIR}"
25357                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25358         fi
25359 else
25360         # the next lines are needed for linking libtic over libncurses
25361         TINFO_NAME=${LIB_NAME}
25362         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25363         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25364         if test "x$with_tic_depends" = xyes ; then
25365                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25366         else
25367                 TICS_LIST="$SHLIB_LIST"
25368         fi
25369
25370         TINFO_LDFLAGS="-L${LIB_DIR}"
25371         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25372 fi
25373
25374 if test "$DFT_LWR_MODEL" = shared ; then
25375         case $cf_cv_system_name in
25376         (cygwin*|msys*)
25377                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25378                 TINFO_SUFFIX=.dll
25379                 ;;
25380         esac
25381 fi
25382
25383 if test "x$with_dlsym" = xyes ; then
25384
25385 # remove dl library from $TICS_LIST
25386 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25387
25388 fi
25389
25390 if test "$DFT_LWR_MODEL" = "libtool"; then
25391         OBJEXT=lo
25392 fi
25393
25394 # needed for Ada95
25395 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25396
25397 case $DFT_LWR_MODEL in
25398 (normal|debug|profile)
25399
25400 if test "$GCC" = yes ; then
25401         case $cf_cv_system_name in
25402         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25403                 LDFLAGS_STATIC=
25404                 LDFLAGS_SHARED=
25405                 ;;
25406         (*)     # normally, except when broken
25407                 LDFLAGS_STATIC=-static
25408                 LDFLAGS_SHARED=-dynamic
25409                 ;;
25410         esac
25411 else
25412         case $cf_cv_system_name in
25413         (aix[4-7]*)     # from ld manpage
25414                 LDFLAGS_STATIC=-bstatic
25415                 LDFLAGS_SHARED=-bdynamic
25416                 ;;
25417         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25418                 # We could also use just "archive" and "shared".
25419                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25420                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25421                 ;;
25422         (irix*)         # from ld manpage IRIX64
25423                 LDFLAGS_STATIC=-Bstatic
25424                 LDFLAGS_SHARED=-Bdynamic
25425                 ;;
25426         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25427                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25428                 LDFLAGS_STATIC=-noso
25429                 LDFLAGS_SHARED=-so_archive
25430                 ;;
25431         (solaris2*)
25432                 LDFLAGS_STATIC=-Bstatic
25433                 LDFLAGS_SHARED=-Bdynamic
25434                 ;;
25435         esac
25436 fi
25437
25438 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25439 then
25440         echo "$as_me:25440: checking if linker supports switching between static/dynamic" >&5
25441 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25442
25443         rm -f libconftest.a
25444         cat >conftest.$ac_ext <<EOF
25445 #line 25445 "configure"
25446 #include <stdio.h>
25447 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25448 EOF
25449         if { (eval echo "$as_me:25449: \"$ac_compile\"") >&5
25450   (eval $ac_compile) 2>&5
25451   ac_status=$?
25452   echo "$as_me:25452: \$? = $ac_status" >&5
25453   (exit $ac_status); } ; then
25454                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25455                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25456         fi
25457         rm -f conftest.*
25458
25459         cf_save_LIBS="$LIBS"
25460
25461         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25462         cat >conftest.$ac_ext <<_ACEOF
25463 #line 25463 "configure"
25464 #include "confdefs.h"
25465
25466 #line 25466 "configure"
25467 #include <stdio.h>
25468 int cf_ldflags_static(FILE *fp);
25469
25470 int
25471 main (void)
25472 {
25473
25474         return cf_ldflags_static(stdin);
25475
25476   ;
25477   return 0;
25478 }
25479 _ACEOF
25480 rm -f conftest.$ac_objext conftest$ac_exeext
25481 if { (eval echo "$as_me:25481: \"$ac_link\"") >&5
25482   (eval $ac_link) 2>&5
25483   ac_status=$?
25484   echo "$as_me:25484: \$? = $ac_status" >&5
25485   (exit $ac_status); } &&
25486          { ac_try='test -s conftest$ac_exeext'
25487   { (eval echo "$as_me:25487: \"$ac_try\"") >&5
25488   (eval $ac_try) 2>&5
25489   ac_status=$?
25490   echo "$as_me:25490: \$? = $ac_status" >&5
25491   (exit $ac_status); }; }; then
25492
25493         # some linkers simply ignore the -dynamic
25494         case x`file conftest$ac_exeext 2>/dev/null` in
25495         (*static*)
25496                 cf_ldflags_static=no
25497                 ;;
25498         (*)
25499                 cf_ldflags_static=yes
25500                 ;;
25501         esac
25502
25503 else
25504   echo "$as_me: failed program was:" >&5
25505 cat conftest.$ac_ext >&5
25506 cf_ldflags_static=no
25507 fi
25508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25509
25510         rm -f libconftest.*
25511         LIBS="$cf_save_LIBS"
25512
25513         echo "$as_me:25513: result: $cf_ldflags_static" >&5
25514 echo "${ECHO_T}$cf_ldflags_static" >&6
25515
25516         if test $cf_ldflags_static != yes
25517         then
25518                 LDFLAGS_STATIC=
25519                 LDFLAGS_SHARED=
25520         fi
25521 else
25522         LDFLAGS_STATIC=
25523         LDFLAGS_SHARED=
25524 fi
25525
25526         ;;
25527 esac
25528
25529 echo "$as_me:25529: checking where we will install curses.h" >&5
25530 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25531
25532 includesubdir=
25533 if test "$with_overwrite" = no && \
25534  ( test "x$includedir" = 'x${prefix}/include' || \
25535    test "x$includedir" = "x${prefix}/include" )
25536 then
25537         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25538 fi
25539 echo "$as_me:25539: result: ${includedir}${includesubdir}" >&5
25540 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25541
25542 ### Resolve a conflict between normal and wide-curses by forcing applications
25543 ### that will need libutf8 to add it to their configure script.
25544 if test "$with_overwrite" != no ; then
25545 if test "$NCURSES_LIBUTF8" = 1 ; then
25546         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25547         { echo "$as_me:25547: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25548 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25549 fi
25550 fi
25551 WITH_OVERWRITE=$with_overwrite
25552
25553 # used to separate tack out of the tree
25554 NCURSES_TREE=
25555
25556 ### predefined stuff for the test programs
25557
25558 cat >>confdefs.h <<\EOF
25559 #define HAVE_SLK_COLOR 1
25560 EOF
25561
25562 ### Construct the list of subdirectories for which we'll customize makefiles
25563 ### with the appropriate compile-rules.
25564
25565 echo "$as_me:25565: checking for src modules" >&5
25566 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25567
25568 # dependencies and linker-arguments for test-programs
25569 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25570 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25571 if test "$DFT_LWR_MODEL" = "libtool"; then
25572         TEST_ARGS="${TEST_DEPS}"
25573         TEST_ARG2="${TEST_DEP2}"
25574 else
25575         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25576         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25577 fi
25578
25579 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25580 cf_cv_src_modules=
25581 for cf_dir in $modules_to_build
25582 do
25583         if test -f $srcdir/$cf_dir/modules; then
25584
25585                 # We may/may not have tack in the distribution, though the
25586                 # makefile is.
25587                 if test $cf_dir = tack ; then
25588                         if test "x$cf_with_tack" != "xyes"; then
25589                                 continue
25590                         fi
25591                 fi
25592
25593                 if test -z "$cf_cv_src_modules"; then
25594                         cf_cv_src_modules=$cf_dir
25595                 else
25596                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25597                 fi
25598
25599                 # Make the ncurses_cfg.h file record the library interface files as
25600                 # well.  These are header files that are the same name as their
25601                 # directory.  Ncurses is the only library that does not follow
25602                 # that pattern.
25603                 if test $cf_dir = tack ; then
25604                         continue
25605                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25606
25607 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25608
25609                         cat >>confdefs.h <<EOF
25610 #define HAVE_${cf_have_include}_H 1
25611 EOF
25612
25613                         cat >>confdefs.h <<EOF
25614 #define HAVE_LIB${cf_have_include} 1
25615 EOF
25616
25617                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25618                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25619                         if test "$DFT_LWR_MODEL" = "libtool"; then
25620                                 TEST_ARGS="${TEST_DEPS}"
25621                                 TEST_ARG2="${TEST_DEP2}"
25622                         else
25623                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25624                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25625                         fi
25626                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25627                 fi
25628         fi
25629 done
25630 echo "$as_me:25630: result: $cf_cv_src_modules" >&5
25631 echo "${ECHO_T}$cf_cv_src_modules" >&6
25632
25633 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25634 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25635
25636 SRC_SUBDIRS=
25637 if test "x$cf_with_manpages" != xno ; then
25638         SRC_SUBDIRS="$SRC_SUBDIRS man"
25639 fi
25640 SRC_SUBDIRS="$SRC_SUBDIRS include"
25641 for cf_dir in $cf_cv_src_modules
25642 do
25643         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25644 done
25645 if test "x$cf_with_tests" != "xno" ; then
25646         SRC_SUBDIRS="$SRC_SUBDIRS test"
25647 fi
25648 # always make this, to install the ncurses-config script
25649 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25650 if test "$cf_with_cxx_binding" != no; then
25651         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25652         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25653 fi
25654
25655 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25656 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25657
25658 ADA_SUBDIRS=
25659 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25660         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25661         ADA_SUBDIRS="gen src"
25662         if test "x$cf_with_tests" != "xno" ; then
25663                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25664         fi
25665 fi
25666
25667 SUB_MAKEFILES=
25668 for cf_dir in $SRC_SUBDIRS
25669 do
25670         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25671 done
25672
25673 if test -n "$ADA_SUBDIRS"; then
25674         for cf_dir in $ADA_SUBDIRS
25675         do
25676                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25677         done
25678
25679 fi
25680
25681 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25682    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25683    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25684    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25685 fi
25686
25687 DIRS_TO_MAKE="lib"
25688 for cf_item in $cf_list_models
25689 do
25690
25691         case $cf_item in
25692         (libtool) cf_subdir='obj_lo'  ;;
25693         (normal)  cf_subdir='objects' ;;
25694         (debug)   cf_subdir='obj_g' ;;
25695         (profile) cf_subdir='obj_p' ;;
25696         (shared)
25697                 case $cf_cv_system_name in
25698                 (cygwin|msys)
25699                         cf_subdir='objects' ;;
25700                 (*)
25701                         cf_subdir='obj_s' ;;
25702                 esac
25703         esac
25704
25705         for cf_item2 in $DIRS_TO_MAKE
25706         do
25707                 test $cf_item2 = $cf_subdir && break
25708         done
25709         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25710 done
25711 for cf_dir in $DIRS_TO_MAKE
25712 do
25713         test ! -d $cf_dir && mkdir $cf_dir
25714 done
25715
25716 # symbols that differ when compiling Ada95 by itself.
25717 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25718
25719 # values to use as strings
25720
25721 cat >>confdefs.h <<EOF
25722 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25723 EOF
25724
25725 cat >>confdefs.h <<EOF
25726 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25727 EOF
25728
25729 ### Now that we're done running tests, add the compiler-warnings, if any
25730
25731 cf_fix_cppflags=no
25732 cf_new_cflags=
25733 cf_new_cppflags=
25734 cf_new_extra_cppflags=
25735
25736 for cf_add_cflags in $EXTRA_CFLAGS
25737 do
25738 case $cf_fix_cppflags in
25739 (no)
25740         case $cf_add_cflags in
25741         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25742                 case $cf_add_cflags in
25743                 (-D*)
25744                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25745
25746                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25747                                 && test -z "${cf_tst_cflags}" \
25748                                 && cf_fix_cppflags=yes
25749
25750                         if test $cf_fix_cppflags = yes ; then
25751
25752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25754
25755                                 continue
25756                         elif test "${cf_tst_cflags}" = "\"'" ; then
25757
25758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25760
25761                                 continue
25762                         fi
25763                         ;;
25764                 esac
25765                 case "$CPPFLAGS" in
25766                 (*$cf_add_cflags)
25767                         ;;
25768                 (*)
25769                         case $cf_add_cflags in
25770                         (-D*)
25771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25772
25773 CPPFLAGS=`echo "$CPPFLAGS" | \
25774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25776
25777                                 ;;
25778                         esac
25779
25780         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25781         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25782
25783                         ;;
25784                 esac
25785                 ;;
25786         (*)
25787
25788         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25789         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25790
25791                 ;;
25792         esac
25793         ;;
25794 (yes)
25795
25796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25798
25799         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25800
25801         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25802                 && test -z "${cf_tst_cflags}" \
25803                 && cf_fix_cppflags=no
25804         ;;
25805 esac
25806 done
25807
25808 if test -n "$cf_new_cflags" ; then
25809
25810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25811         CFLAGS="${CFLAGS}$cf_new_cflags"
25812
25813 fi
25814
25815 if test -n "$cf_new_cppflags" ; then
25816
25817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25818         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25819
25820 fi
25821
25822 if test -n "$cf_new_extra_cppflags" ; then
25823
25824         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25825         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25826
25827 fi
25828
25829 ### Define substitutions for header files to avoid name-pollution
25830
25831 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25832         HAVE_TCGETATTR=1
25833 else
25834         HAVE_TCGETATTR=0
25835 fi
25836
25837 if test "x$ac_cv_header_stdint_h" = xyes ; then
25838         HAVE_STDINT_H=1
25839 else
25840         HAVE_STDINT_H=0
25841 fi
25842
25843 if test "x$ac_cv_header_termio_h" = xyes ; then
25844         HAVE_TERMIO_H=1
25845 else
25846         HAVE_TERMIO_H=0
25847 fi
25848
25849 if test "x$ac_cv_header_termios_h" = xyes ; then
25850         HAVE_TERMIOS_H=1
25851 else
25852         HAVE_TERMIOS_H=0
25853 fi
25854
25855 ################################################################################
25856 test "x$use_database" = xyes && \
25857 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25858
25859 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25860 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25861
25862 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25863 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25864 fi
25865
25866 if test "x$cf_with_tests" != xno ; then
25867         MAKE_TESTS=
25868 else
25869         MAKE_TESTS="#"
25870 fi
25871
25872 ADAHTML_DIR=../../doc/html/ada
25873
25874 # these could be configurable, but are not currently
25875 PANEL_NAME=panel
25876 MENU_NAME=menu
25877 FORM_NAME=form
25878 CXX_NAME=ncurses++
25879
25880 # workaround for OS/2 (20151017)
25881 case $cf_cv_system_name in
25882 (os2*)
25883         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25884         ;;
25885 (*)
25886         LIBTOOL_OPTS_CXX=
25887         ;;
25888 esac
25889
25890 # workaround for g++ versus Solaris (20131116)
25891 case $cf_cv_system_name in
25892 (solaris2*)
25893         case "x$CPPFLAGS" in
25894         (*-D_XOPEN_SOURCE_EXTENDED*)
25895                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25896
25897 echo "${as_me:-configure}:25897: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25898
25899                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25900                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25901                 ;;
25902         esac
25903         ;;
25904 esac
25905
25906 # Help to automatically enable the extended curses features when using either
25907 # the *-config or the ".pc" files by adding defines.
25908 echo "$as_me:25908: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25909 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25910 PKG_CFLAGS=
25911 for cf_loop1 in $CPPFLAGS_after_XOPEN
25912 do
25913         cf_found=no
25914         for cf_loop2 in $CPPFLAGS_before_XOPEN
25915         do
25916                 if test "x$cf_loop1" = "x$cf_loop2"
25917                 then
25918                         cf_found=yes
25919                         break
25920                 fi
25921         done
25922         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25923 done
25924 echo "$as_me:25924: result: $PKG_CFLAGS" >&5
25925 echo "${ECHO_T}$PKG_CFLAGS" >&6
25926
25927 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25928 case "x$NCURSES_OSPEED" in
25929 (*short*)
25930         cf_compatible=1
25931         ;;
25932 (*)
25933         cf_compatible=0
25934         ;;
25935 esac
25936
25937 cat >>confdefs.h <<EOF
25938 #define NCURSES_OSPEED_COMPAT $cf_compatible
25939 EOF
25940
25941 case "x$cf_cv_typeof_chtype" in
25942 (xshort|xint|xlong)
25943         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25944         ;;
25945 esac
25946
25947 case "x$cf_cv_typeof_mmask_t" in
25948 (xshort|xint|xlong)
25949         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25950         ;;
25951 esac
25952
25953 # substitute into misc/Makefile to suppress
25954 # (un)install.data from the
25955 # (un)install rules.
25956 if test "x$cf_with_db_install" = "xno"; then
25957         MISC_INSTALL_DATA=
25958         MISC_UNINSTALL_DATA=
25959 else
25960         MISC_INSTALL_DATA=install.data
25961         MISC_UNINSTALL_DATA=uninstall.data
25962 fi
25963
25964 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
25965         MAKE_DATABASE="#"
25966 else
25967         MAKE_DATABASE="$MAKE_TERMINFO"
25968 fi
25969
25970 if test -n "$PACKAGE"
25971 then
25972         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
25973         export PACKAGE
25974         echo "package: $PACKAGE"
25975 fi
25976
25977 UNALTERED_SYMS=
25978 cf_filter_syms=no
25979
25980 if test -n "$RESULTING_SYMS"
25981 then
25982         cf_filter_syms=$cf_dft_filter_syms
25983         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
25984
25985 echo "${as_me:-configure}:25985: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
25986
25987 fi
25988
25989 if test "x$WILDCARD_SYMS" = xno
25990 then
25991         cf_filter_syms=yes
25992 fi
25993
25994 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
25995
25996 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
25997 if test $cf_filter_syms = yes
25998 then
25999         RESULTING_SYMS=resulting.map
26000 fi
26001
26002 if test "x$cross_compiling" = xyes ; then
26003         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26004         CHECK_BUILD="#"
26005 else
26006         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26007         CHECK_BUILD=
26008 fi
26009
26010 cat >>confdefs.h <<\EOF
26011 #define HAVE_CURSES_DATA_BOOLNAMES 1
26012 EOF
26013
26014 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"
26015 ac_config_commands="$ac_config_commands default"
26016 cat >confcache <<\_ACEOF
26017 # This file is a shell script that caches the results of configure
26018 # tests run on this system so they can be shared between configure
26019 # scripts and configure runs, see configure's option --config-cache.
26020 # It is not useful on other systems.  If it contains results you don't
26021 # want to keep, you may remove or edit it.
26022 #
26023 # config.status only pays attention to the cache file if you give it
26024 # the --recheck option to rerun configure.
26025 #
26026 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26027 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26028 # following values.
26029
26030 _ACEOF
26031
26032 # The following way of writing the cache mishandles newlines in values,
26033 # but we know of no workaround that is simple, portable, and efficient.
26034 # So, don't put newlines in cache variables' values.
26035 # Ultrix sh set writes to stderr and can't be redirected directly,
26036 # and sets the high bit in the cache file unless we assign to the vars.
26037 {
26038   (set) 2>&1 |
26039     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26040     *ac_space=\ *)
26041       # `set' does not quote correctly, so add quotes (double-quote
26042       # substitution turns \\\\ into \\, and sed turns \\ into \).
26043       sed -n \
26044         "s/'/'\\\\''/g;
26045           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26046       ;;
26047     *)
26048       # `set' quotes correctly as required by POSIX, so do not add quotes.
26049       sed -n \
26050         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26051       ;;
26052     esac;
26053 } |
26054   sed '
26055      t clear
26056      : clear
26057      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26058      t end
26059      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26060      : end' >>confcache
26061 if cmp -s $cache_file confcache; then :; else
26062   if test -w $cache_file; then
26063     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26064     cat confcache >$cache_file
26065   else
26066     echo "not updating unwritable cache $cache_file"
26067   fi
26068 fi
26069 rm -f confcache
26070
26071 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26072 # Let make expand exec_prefix.
26073 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26074
26075 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26076 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26077 # trailing colons and then remove the whole line if VPATH becomes empty
26078 # (actually we leave an empty line to preserve line numbers).
26079 if test "x$srcdir" = x.; then
26080   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26081 s/:*\$(srcdir):*/:/;
26082 s/:*\${srcdir}:*/:/;
26083 s/:*@srcdir@:*/:/;
26084 s/^\([^=]*=[    ]*\):*/\1/;
26085 s/:*$//;
26086 s/^[^=]*=[      ]*$//;
26087 }'
26088 fi
26089
26090 DEFS=-DHAVE_CONFIG_H
26091
26092 : ${CONFIG_STATUS=./config.status}
26093 ac_clean_files_save=$ac_clean_files
26094 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26095 { echo "$as_me:26095: creating $CONFIG_STATUS" >&5
26096 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26097 cat >$CONFIG_STATUS <<_ACEOF
26098 #! $SHELL
26099 # Generated automatically by configure.
26100 # Run this file to recreate the current configuration.
26101 # Compiler output produced by configure, useful for debugging
26102 # configure, is in config.log if it exists.
26103
26104 debug=false
26105 SHELL=\${CONFIG_SHELL-$SHELL}
26106 ac_cs_invocation="\$0 \$@"
26107
26108 _ACEOF
26109
26110 cat >>$CONFIG_STATUS <<\_ACEOF
26111 # Be Bourne compatible
26112 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26113   emulate sh
26114   NULLCMD=:
26115 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26116   set -o posix
26117 fi
26118
26119 # Name of the executable.
26120 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26121
26122 if expr a : '\(a\)' >/dev/null 2>&1; then
26123   as_expr=expr
26124 else
26125   as_expr=false
26126 fi
26127
26128 rm -f conf$$ conf$$.exe conf$$.file
26129 echo >conf$$.file
26130 if ln -s conf$$.file conf$$ 2>/dev/null; then
26131   # We could just check for DJGPP; but this test a) works b) is more generic
26132   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26133   if test -f conf$$.exe; then
26134     # Don't use ln at all; we don't have any links
26135     as_ln_s='cp -p'
26136   else
26137     as_ln_s='ln -s'
26138   fi
26139 elif ln conf$$.file conf$$ 2>/dev/null; then
26140   as_ln_s=ln
26141 else
26142   as_ln_s='cp -p'
26143 fi
26144 rm -f conf$$ conf$$.exe conf$$.file
26145
26146 as_executable_p="test -f"
26147
26148 # Support unset when possible.
26149 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26150   as_unset=unset
26151 else
26152   as_unset=false
26153 fi
26154
26155 # NLS nuisances.
26156 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26157 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26158 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26159 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26160 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26161 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26162 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26163 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26164
26165 # IFS
26166 # We need space, tab and new line, in precisely that order.
26167 as_nl='
26168 '
26169 IFS="   $as_nl"
26170
26171 # CDPATH.
26172 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26173
26174 exec 6>&1
26175
26176 _ACEOF
26177
26178 # Files that config.status was made for.
26179 if test -n "$ac_config_files"; then
26180   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26181 fi
26182
26183 if test -n "$ac_config_headers"; then
26184   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26185 fi
26186
26187 if test -n "$ac_config_links"; then
26188   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26189 fi
26190
26191 if test -n "$ac_config_commands"; then
26192   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26193 fi
26194
26195 cat >>$CONFIG_STATUS <<\EOF
26196
26197 ac_cs_usage="\
26198 \`$as_me' instantiates files from templates according to the
26199 current configuration.
26200
26201 Usage: $0 [OPTIONS] [FILE]...
26202
26203   -h, --help       print this help, then exit
26204   -V, --version    print version number, then exit
26205   -d, --debug      don't remove temporary files
26206       --recheck    update $as_me by reconfiguring in the same conditions
26207   --file=FILE[:TEMPLATE]
26208                    instantiate the configuration file FILE
26209   --header=FILE[:TEMPLATE]
26210                    instantiate the configuration header FILE
26211
26212 Configuration files:
26213 $config_files
26214
26215 Configuration headers:
26216 $config_headers
26217
26218 Configuration commands:
26219 $config_commands
26220
26221 Report bugs to <dickey@invisible-island.net>."
26222 EOF
26223
26224 cat >>$CONFIG_STATUS <<EOF
26225 ac_cs_version="\\
26226 config.status
26227 configured by $0, generated by GNU Autoconf 2.52.20190901,
26228   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26229
26230 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26231 Free Software Foundation, Inc.
26232 This config.status script is free software; the Free Software Foundation
26233 gives unlimited permission to copy, distribute and modify it."
26234 srcdir=$srcdir
26235 INSTALL="$INSTALL"
26236 EOF
26237
26238 cat >>$CONFIG_STATUS <<\EOF
26239 # If no file are specified by the user, then we need to provide default
26240 # value.  By we need to know if files were specified by the user.
26241 ac_need_defaults=:
26242 while test $# != 0
26243 do
26244   case $1 in
26245   --*=*)
26246     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26247     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26248     shift
26249     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26250     shift
26251     ;;
26252   -*);;
26253   *) # This is not an option, so the user has probably given explicit
26254      # arguments.
26255      ac_need_defaults=false;;
26256   esac
26257
26258   case $1 in
26259   # Handling of the options.
26260 EOF
26261 cat >>$CONFIG_STATUS <<EOF
26262   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26263     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26264     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26265 EOF
26266 cat >>$CONFIG_STATUS <<\EOF
26267   --version | --vers* | -V )
26268     echo "$ac_cs_version"; exit 0 ;;
26269   --he | --h)
26270     # Conflict between --help and --header
26271     { { echo "$as_me:26271: error: ambiguous option: $1
26272 Try \`$0 --help' for more information." >&5
26273 echo "$as_me: error: ambiguous option: $1
26274 Try \`$0 --help' for more information." >&2;}
26275    { (exit 1); exit 1; }; };;
26276   --help | --hel | -h )
26277     echo "$ac_cs_usage"; exit 0 ;;
26278   --debug | --d* | -d )
26279     debug=: ;;
26280   --file | --fil | --fi | --f )
26281     shift
26282     CONFIG_FILES="$CONFIG_FILES $1"
26283     ac_need_defaults=false;;
26284   --header | --heade | --head | --hea )
26285     shift
26286     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26287     ac_need_defaults=false;;
26288
26289   # This is an error.
26290   -*) { { echo "$as_me:26290: error: unrecognized option: $1
26291 Try \`$0 --help' for more information." >&5
26292 echo "$as_me: error: unrecognized option: $1
26293 Try \`$0 --help' for more information." >&2;}
26294    { (exit 1); exit 1; }; } ;;
26295
26296   *) ac_config_targets="$ac_config_targets $1" ;;
26297
26298   esac
26299   shift
26300 done
26301
26302 exec 5>>config.log
26303 cat >&5 << _ACEOF
26304
26305 ## ----------------------- ##
26306 ## Running config.status.  ##
26307 ## ----------------------- ##
26308
26309 This file was extended by $as_me 2.52.20190901, executed with
26310   CONFIG_FILES    = $CONFIG_FILES
26311   CONFIG_HEADERS  = $CONFIG_HEADERS
26312   CONFIG_LINKS    = $CONFIG_LINKS
26313   CONFIG_COMMANDS = $CONFIG_COMMANDS
26314   > $ac_cs_invocation
26315 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26316
26317 _ACEOF
26318 EOF
26319
26320 cat >>$CONFIG_STATUS <<EOF
26321 #
26322 # INIT-COMMANDS section.
26323 #
26324
26325 ### Special initialization commands, used to pass information from the
26326 ### configuration-run into config.status
26327
26328 AWK="$AWK"
26329 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26330 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26331 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26332 ECHO_LD="$ECHO_LD"
26333 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26334 LDCONFIG="$LDCONFIG"
26335 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26336 LIB_NAME="$LIB_NAME"
26337 LIB_PREFIX="$LIB_PREFIX"
26338 LIB_SUBSETS="$LIB_SUBSETS"
26339 LIB_SUFFIX="$LIB_SUFFIX"
26340 LIB_TRACING="$LIB_TRACING"
26341 LN_S="$LN_S"
26342 MAKE_TERMINFO="$MAKE_TERMINFO"
26343 NCURSES_MAJOR="$NCURSES_MAJOR"
26344 NCURSES_MINOR="$NCURSES_MINOR"
26345 NCURSES_OSPEED="$NCURSES_OSPEED"
26346 NCURSES_PATCH="$NCURSES_PATCH"
26347 SRC_SUBDIRS="$SRC_SUBDIRS"
26348 TERMINFO="$TERMINFO"
26349 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26350 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26351 TICS_NAME="$TICS_NAME"
26352 TICS_SUFFIX="$TICS_SUFFIX"
26353 TIC_PATH="$TIC_PATH"
26354 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26355 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26356 TINFO_NAME="$TINFO_NAME"
26357 TINFO_SUFFIX="$TINFO_SUFFIX"
26358 UNALTERED_SYMS="$UNALTERED_SYMS"
26359 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26360 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26361 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26362 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26363 WILDCARD_SYMS="$WILDCARD_SYMS"
26364 WITH_CURSES_H="$with_curses_h"
26365 WITH_ECHO="${enable_echo:=yes}"
26366 WITH_OVERWRITE="$with_overwrite"
26367 cf_LIST_MODELS="$cf_list_models"
26368 cf_cv_abi_version="$cf_cv_abi_version"
26369 cf_cv_do_relink="$cf_cv_do_relink"
26370 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26371 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26372 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26373 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26374 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26375 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26376 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26377 cf_cv_rel_version="$cf_cv_rel_version"
26378 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26379 cf_cv_shared_soname='$cf_cv_shared_soname'
26380 cf_cv_shlib_version="$cf_cv_shlib_version"
26381 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26382 cf_cv_system_name="$cf_cv_system_name"
26383 cf_cv_term_driver="$with_term_driver"
26384 cf_with_ada="$cf_with_ada"
26385 cf_with_cxx_binding="$cf_with_cxx_binding"
26386 cf_with_db_install="$cf_with_db_install"
26387 cf_with_manpages="$cf_with_manpages"
26388 cf_with_tests="$cf_with_tests"
26389 host="$host"
26390 target="$target"
26391 with_shared_cxx="$with_shared_cxx"
26392
26393 EOF
26394
26395 cat >>$CONFIG_STATUS <<\EOF
26396 for ac_config_target in $ac_config_targets
26397 do
26398   case "$ac_config_target" in
26399   # Handling of arguments.
26400   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26401   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26402   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26403   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26404   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26405   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26406   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26407   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26408   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26409   *) { { echo "$as_me:26409: error: invalid argument: $ac_config_target" >&5
26410 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26411    { (exit 1); exit 1; }; };;
26412   esac
26413 done
26414
26415 # If the user did not use the arguments to specify the items to instantiate,
26416 # then the envvar interface is used.  Set only those that are not.
26417 # We use the long form for the default assignment because of an extremely
26418 # bizarre bug on SunOS 4.1.3.
26419 if $ac_need_defaults; then
26420   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26421   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26422   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26423 fi
26424
26425 # Create a temporary directory, and hook for its removal unless debugging.
26426 $debug ||
26427 {
26428   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26429   trap '{ (exit 1); exit 1; }' 1 2 13 15
26430 }
26431
26432 # Create a (secure) tmp directory for tmp files.
26433 : ${TMPDIR=/tmp}
26434 {
26435   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26436   test -n "$tmp" && test -d "$tmp"
26437 }  ||
26438 {
26439   tmp=$TMPDIR/cs$$-$RANDOM
26440   (umask 077 && mkdir $tmp)
26441 } ||
26442 {
26443    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26444    { (exit 1); exit 1; }
26445 }
26446
26447 EOF
26448
26449 cat >>$CONFIG_STATUS <<EOF
26450
26451 #
26452 # CONFIG_FILES section.
26453 #
26454
26455 # No need to generate the scripts if there are no CONFIG_FILES.
26456 # This happens for instance when ./config.status config.h
26457 if test -n "\$CONFIG_FILES"; then
26458   # Protect against being on the right side of a sed subst in config.status.
26459   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26460    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26461 s,@SHELL@,$SHELL,;t t
26462 s,@exec_prefix@,$exec_prefix,;t t
26463 s,@prefix@,$prefix,;t t
26464 s,@program_transform_name@,$program_transform_name,;t t
26465 s,@bindir@,$bindir,;t t
26466 s,@sbindir@,$sbindir,;t t
26467 s,@libexecdir@,$libexecdir,;t t
26468 s,@datarootdir@,$datarootdir,;t t
26469 s,@datadir@,$datadir,;t t
26470 s,@sysconfdir@,$sysconfdir,;t t
26471 s,@sharedstatedir@,$sharedstatedir,;t t
26472 s,@localstatedir@,$localstatedir,;t t
26473 s,@runstatedir@,$runstatedir,;t t
26474 s,@libdir@,$libdir,;t t
26475 s,@includedir@,$includedir,;t t
26476 s,@oldincludedir@,$oldincludedir,;t t
26477 s,@infodir@,$infodir,;t t
26478 s,@mandir@,$mandir,;t t
26479 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26480 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26481 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26482 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26483 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26484 s,@build_alias@,$build_alias,;t t
26485 s,@host_alias@,$host_alias,;t t
26486 s,@target_alias@,$target_alias,;t t
26487 s,@ECHO_C@,$ECHO_C,;t t
26488 s,@ECHO_N@,$ECHO_N,;t t
26489 s,@ECHO_T@,$ECHO_T,;t t
26490 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26491 s,@DEFS@,$DEFS,;t t
26492 s,@LIBS@,$LIBS,;t t
26493 s,@top_builddir@,$top_builddir,;t t
26494 s,@EGREP@,$EGREP,;t t
26495 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26496 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26497 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26498 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26499 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26500 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26501 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26502 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26503 s,@VERSION@,$VERSION,;t t
26504 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26505 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26506 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26507 s,@PACKAGE@,$PACKAGE,;t t
26508 s,@build@,$build,;t t
26509 s,@build_cpu@,$build_cpu,;t t
26510 s,@build_vendor@,$build_vendor,;t t
26511 s,@build_os@,$build_os,;t t
26512 s,@host@,$host,;t t
26513 s,@host_cpu@,$host_cpu,;t t
26514 s,@host_vendor@,$host_vendor,;t t
26515 s,@host_os@,$host_os,;t t
26516 s,@target@,$target,;t t
26517 s,@target_cpu@,$target_cpu,;t t
26518 s,@target_vendor@,$target_vendor,;t t
26519 s,@target_os@,$target_os,;t t
26520 s,@CC@,$CC,;t t
26521 s,@CFLAGS@,$CFLAGS,;t t
26522 s,@LDFLAGS@,$LDFLAGS,;t t
26523 s,@CPPFLAGS@,$CPPFLAGS,;t t
26524 s,@ac_ct_CC@,$ac_ct_CC,;t t
26525 s,@EXEEXT@,$EXEEXT,;t t
26526 s,@OBJEXT@,$OBJEXT,;t t
26527 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26528 s,@CPP@,$CPP,;t t
26529 s,@LDCONFIG@,$LDCONFIG,;t t
26530 s,@CXX@,$CXX,;t t
26531 s,@CXXFLAGS@,$CXXFLAGS,;t t
26532 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26533 s,@AWK@,$AWK,;t t
26534 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26535 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26536 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26537 s,@LINT@,$LINT,;t t
26538 s,@LINT_OPTS@,$LINT_OPTS,;t t
26539 s,@LN_S@,$LN_S,;t t
26540 s,@cf_config_suffix@,$cf_config_suffix,;t t
26541 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26542 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26543 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26544 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26545 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26546 s,@SET_MAKE@,$SET_MAKE,;t t
26547 s,@CTAGS@,$CTAGS,;t t
26548 s,@ETAGS@,$ETAGS,;t t
26549 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26550 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26551 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26552 s,@RANLIB@,$RANLIB,;t t
26553 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26554 s,@LD@,$LD,;t t
26555 s,@ac_ct_LD@,$ac_ct_LD,;t t
26556 s,@AR@,$AR,;t t
26557 s,@ac_ct_AR@,$ac_ct_AR,;t t
26558 s,@NM@,$NM,;t t
26559 s,@ac_ct_NM@,$ac_ct_NM,;t t
26560 s,@ARFLAGS@,$ARFLAGS,;t t
26561 s,@DESTDIR@,$DESTDIR,;t t
26562 s,@BUILD_CC@,$BUILD_CC,;t t
26563 s,@BUILD_CPP@,$BUILD_CPP,;t t
26564 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26565 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26566 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26567 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26568 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26569 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26570 s,@cf_list_models@,$cf_list_models,;t t
26571 s,@ABI_VERSION@,$ABI_VERSION,;t t
26572 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26573 s,@LIBTOOL@,$LIBTOOL,;t t
26574 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26575 s,@LT_UNDEF@,$LT_UNDEF,;t t
26576 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26577 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26578 s,@LIB_CREATE@,$LIB_CREATE,;t t
26579 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26580 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26581 s,@LIB_PREP@,$LIB_PREP,;t t
26582 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26583 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26584 s,@LIB_LINK@,$LIB_LINK,;t t
26585 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26586 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26587 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26588 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26589 s,@TICS_NAME@,$TICS_NAME,;t t
26590 s,@TINFO_NAME@,$TINFO_NAME,;t t
26591 s,@LIB_NAME@,$LIB_NAME,;t t
26592 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26593 s,@CC_G_OPT@,$CC_G_OPT,;t t
26594 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26595 s,@LD_MODEL@,$LD_MODEL,;t t
26596 s,@shlibdir@,$shlibdir,;t t
26597 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26598 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26599 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26600 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26601 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26602 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26603 s,@LINK_PROGS@,$LINK_PROGS,;t t
26604 s,@LINK_TESTS@,$LINK_TESTS,;t t
26605 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26606 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26607 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26608 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26609 s,@RPATH_LIST@,$RPATH_LIST,;t t
26610 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26611 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26612 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26613 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26614 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26615 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26616 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26617 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26618 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26619 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26620 s,@TIC@,$TIC,;t t
26621 s,@INFOCMP@,$INFOCMP,;t t
26622 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26623 s,@XTERM_KBS@,$XTERM_KBS,;t t
26624 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26625 s,@TERMINFO@,$TERMINFO,;t t
26626 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26627 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26628 s,@TERMPATH@,$TERMPATH,;t t
26629 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26630 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26631 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26632 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26633 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26634 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26635 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26636 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26637 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26638 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26639 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26640 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26641 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26642 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26643 s,@RGB_PATH@,$RGB_PATH,;t t
26644 s,@no_x11_rgb@,$no_x11_rgb,;t t
26645 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26646 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26647 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26648 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26649 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26650 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26651 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26652 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26653 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26654 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26655 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26656 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26657 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26658 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26659 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26660 s,@PTHREAD@,$PTHREAD,;t t
26661 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26662 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26663 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26664 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26665 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26666 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26667 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26668 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26669 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26670 s,@ECHO_LT@,$ECHO_LT,;t t
26671 s,@ECHO_LD@,$ECHO_LD,;t t
26672 s,@RULE_CC@,$RULE_CC,;t t
26673 s,@SHOW_CC@,$SHOW_CC,;t t
26674 s,@ECHO_CC@,$ECHO_CC,;t t
26675 s,@ECHO_LINK@,$ECHO_LINK,;t t
26676 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26677 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26678 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26679 s,@ADAFLAGS@,$ADAFLAGS,;t t
26680 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26681 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26682 s,@ADA_TRACE@,$ADA_TRACE,;t t
26683 s,@MATH_LIB@,$MATH_LIB,;t t
26684 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26685 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26686 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26687 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26688 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26689 s,@TEST_LIBS@,$TEST_LIBS,;t t
26690 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26691 s,@CXXCPP@,$CXXCPP,;t t
26692 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26693 s,@CXX_AR@,$CXX_AR,;t t
26694 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26695 s,@CXXLIBS@,$CXXLIBS,;t t
26696 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26697 s,@gnatmake_exists@,$gnatmake_exists,;t t
26698 s,@gprconfig_exists@,$gprconfig_exists,;t t
26699 s,@M4_exists@,$M4_exists,;t t
26700 s,@cf_ada_make@,$cf_ada_make,;t t
26701 s,@cf_ada_config@,$cf_ada_config,;t t
26702 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26703 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26704 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26705 s,@cf_compile_generics@,$cf_compile_generics,;t t
26706 s,@cf_generic_objects@,$cf_generic_objects,;t t
26707 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26708 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26709 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26710 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26711 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26712 s,@cf_ada_package@,$cf_ada_package,;t t
26713 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26714 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26715 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26716 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26717 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26718 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26719 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26720 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26721 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26722 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26723 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26724 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26725 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26726 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26727 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26728 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26729 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26730 s,@TICS_LIBS@,$TICS_LIBS,;t t
26731 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26732 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26733 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26734 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26735 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26736 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26737 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26738 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26739 s,@includesubdir@,$includesubdir,;t t
26740 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26741 s,@TICS_LIST@,$TICS_LIST,;t t
26742 s,@TINFO_LIST@,$TINFO_LIST,;t t
26743 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26744 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26745 s,@TEST_ARGS@,$TEST_ARGS,;t t
26746 s,@TEST_DEPS@,$TEST_DEPS,;t t
26747 s,@TEST_ARG2@,$TEST_ARG2,;t t
26748 s,@TEST_DEP2@,$TEST_DEP2,;t t
26749 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26750 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26751 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26752 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26753 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26754 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26755 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26756 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26757 s,@cross_compiling@,$cross_compiling,;t t
26758 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26759 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26760 s,@PANEL_NAME@,$PANEL_NAME,;t t
26761 s,@MENU_NAME@,$MENU_NAME,;t t
26762 s,@FORM_NAME@,$FORM_NAME,;t t
26763 s,@CXX_NAME@,$CXX_NAME,;t t
26764 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26765 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26766 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26767 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26768 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26769 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26770 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26771 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26772 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26773 CEOF
26774
26775 EOF
26776
26777   cat >>$CONFIG_STATUS <<\EOF
26778   # Split the substitutions into bite-sized pieces for seds with
26779   # small command number limits, like on Digital OSF/1 and HP-UX.
26780   ac_max_sed_lines=48
26781   ac_sed_frag=1 # Number of current file.
26782   ac_beg=1 # First line for current file.
26783   ac_end=$ac_max_sed_lines # Line after last line for current file.
26784   ac_more_lines=:
26785   ac_sed_cmds=
26786   while $ac_more_lines; do
26787     if test $ac_beg -gt 1; then
26788       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26789     else
26790       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26791     fi
26792     if test ! -s $tmp/subs.frag; then
26793       ac_more_lines=false
26794     else
26795       # The purpose of the label and of the branching condition is to
26796       # speed up the sed processing (if there are no `@' at all, there
26797       # is no need to browse any of the substitutions).
26798       # These are the two extra sed commands mentioned above.
26799       (echo ':t
26800   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26801       # It is possible to make a multiline substitution using escaped newlines.
26802       # Ensure that we do not split the substitution between script fragments.
26803       ac_BEG=$ac_end
26804       ac_END=`expr $ac_end + $ac_max_sed_lines`
26805       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26806       if test -s $tmp/subs.next; then
26807         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26808         if test ! -s $tmp/subs.edit; then
26809           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26810           if test ! -s $tmp/subs.edit; then
26811             if test $ac_beg -gt 1; then
26812               ac_end=`expr $ac_end - 1`
26813               continue
26814             fi
26815           fi
26816         fi
26817       fi
26818
26819       if test -z "$ac_sed_cmds"; then
26820         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26821       else
26822         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26823       fi
26824       ac_sed_frag=`expr $ac_sed_frag + 1`
26825       ac_beg=$ac_end
26826       ac_end=`expr $ac_end + $ac_max_sed_lines`
26827     fi
26828   done
26829   if test -z "$ac_sed_cmds"; then
26830     ac_sed_cmds=cat
26831   fi
26832 fi # test -n "$CONFIG_FILES"
26833
26834 EOF
26835 cat >>$CONFIG_STATUS <<\EOF
26836 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26837   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26838   case $ac_file in
26839   - | *:- | *:-:* ) # input from stdin
26840         cat >$tmp/stdin
26841         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26842         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26843   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26844         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26845   * )   ac_file_in=$ac_file.in ;;
26846   esac
26847
26848   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26849   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26850          X"$ac_file" : 'X\(//\)[^/]' \| \
26851          X"$ac_file" : 'X\(//\)$' \| \
26852          X"$ac_file" : 'X\(/\)' \| \
26853          .     : '\(.\)' 2>/dev/null ||
26854 echo X"$ac_file" |
26855     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26856           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26857           /^X\(\/\/\)$/{ s//\1/; q; }
26858           /^X\(\/\).*/{ s//\1/; q; }
26859           s/.*/./; q'`
26860   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26861     { case "$ac_dir" in
26862   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26863   *)                      as_incr_dir=.;;
26864 esac
26865 as_dummy="$ac_dir"
26866 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26867   case $as_mkdir_dir in
26868     # Skip DOS drivespec
26869     ?:) as_incr_dir=$as_mkdir_dir ;;
26870     *)
26871       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26872       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26873     ;;
26874   esac
26875 done; }
26876
26877     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26878     # A "../" for each directory in $ac_dir_suffix.
26879     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26880   else
26881     ac_dir_suffix= ac_dots=
26882   fi
26883
26884   case $srcdir in
26885   .)  ac_srcdir=.
26886       if test -z "$ac_dots"; then
26887          ac_top_srcdir=.
26888       else
26889          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
26890       fi ;;
26891   [\\/]* | ?:[\\/]* )
26892       ac_srcdir=$srcdir$ac_dir_suffix;
26893       ac_top_srcdir=$srcdir ;;
26894   *) # Relative path.
26895     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
26896     ac_top_srcdir=$ac_dots$srcdir ;;
26897   esac
26898
26899   case $INSTALL in
26900   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26901   *) ac_INSTALL=$ac_dots$INSTALL ;;
26902   esac
26903
26904   if test x"$ac_file" != x-; then
26905     { echo "$as_me:26905: creating $ac_file" >&5
26906 echo "$as_me: creating $ac_file" >&6;}
26907     rm -f "$ac_file"
26908   fi
26909   # Let's still pretend it is `configure' which instantiates (i.e., don't
26910   # use $as_me), people would be surprised to read:
26911   #    /* config.h.  Generated automatically by config.status.  */
26912   configure_input="Generated automatically from `echo $ac_file_in |
26913                                                  sed 's,.*/,,'` by configure."
26914
26915   # First look for the input files in the build tree, otherwise in the
26916   # src tree.
26917   ac_file_inputs=`IFS=:
26918     for f in $ac_file_in; do
26919       case $f in
26920       -) echo $tmp/stdin ;;
26921       [\\/$]*)
26922          # Absolute (can't be DOS-style, as IFS=:)
26923          test -f "$f" || { { echo "$as_me:26923: error: cannot find input file: $f" >&5
26924 echo "$as_me: error: cannot find input file: $f" >&2;}
26925    { (exit 1); exit 1; }; }
26926          echo $f;;
26927       *) # Relative
26928          if test -f "$f"; then
26929            # Build tree
26930            echo $f
26931          elif test -f "$srcdir/$f"; then
26932            # Source tree
26933            echo $srcdir/$f
26934          else
26935            # /dev/null tree
26936            { { echo "$as_me:26936: error: cannot find input file: $f" >&5
26937 echo "$as_me: error: cannot find input file: $f" >&2;}
26938    { (exit 1); exit 1; }; }
26939          fi;;
26940       esac
26941     done` || { (exit 1); exit 1; }
26942 EOF
26943 cat >>$CONFIG_STATUS <<\EOF
26944   ac_warn_datarootdir=no
26945   if test x"$ac_file" != x-; then
26946     for ac_item in $ac_file_inputs
26947     do
26948       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
26949       if test -n "$ac_seen"; then
26950         ac_used=`grep '@datarootdir@' $ac_item`
26951         if test -z "$ac_used"; then
26952           { echo "$as_me:26952: WARNING: datarootdir was used implicitly but not set:
26953 $ac_seen" >&5
26954 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26955 $ac_seen" >&2;}
26956           ac_warn_datarootdir=yes
26957         fi
26958       fi
26959       ac_seen=`grep '${datarootdir}' $ac_item`
26960       if test -n "$ac_seen"; then
26961         { echo "$as_me:26961: WARNING: datarootdir was used explicitly but not set:
26962 $ac_seen" >&5
26963 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26964 $ac_seen" >&2;}
26965         ac_warn_datarootdir=yes
26966       fi
26967     done
26968   fi
26969
26970 if test "x$ac_warn_datarootdir" = xyes; then
26971   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26972 fi
26973
26974 EOF
26975 cat >>$CONFIG_STATUS <<EOF
26976   sed "$ac_vpsub
26977 $extrasub
26978 EOF
26979 cat >>$CONFIG_STATUS <<\EOF
26980 :t
26981 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26982 s,@configure_input@,$configure_input,;t t
26983 s,@srcdir@,$ac_srcdir,;t t
26984 s,@top_srcdir@,$ac_top_srcdir,;t t
26985 s,@INSTALL@,$ac_INSTALL,;t t
26986 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
26987   rm -f $tmp/stdin
26988   if test x"$ac_file" != x-; then
26989     cp $tmp/out $ac_file
26990
26991     for ac_name in prefix exec_prefix datarootdir
26992     do
26993         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
26994         if test -n "$ac_seen"; then
26995             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
26996             if test -z "$ac_init"; then
26997               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
26998               { echo "$as_me:26998: WARNING: Variable $ac_name is used but was not set:
26999 $ac_seen" >&5
27000 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27001 $ac_seen" >&2;}
27002             fi
27003         fi
27004     done
27005     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27006     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27007     if test -s $tmp/out; then
27008       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27009       { echo "$as_me:27009: WARNING: Some variables may not be substituted:
27010 $ac_seen" >&5
27011 echo "$as_me: WARNING: Some variables may not be substituted:
27012 $ac_seen" >&2;}
27013     fi
27014   else
27015     cat $tmp/out
27016   fi
27017   rm -f $tmp/out
27018
27019 done
27020 EOF
27021 cat >>$CONFIG_STATUS <<\EOF
27022
27023 #
27024 # CONFIG_HEADER section.
27025 #
27026
27027 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27028 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27029 #
27030 # ac_d sets the value in "#define NAME VALUE" lines.
27031 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27032 ac_dB='[        ].*$,\1#\2'
27033 ac_dC=' '
27034 ac_dD=',;t'
27035 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27036 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27037 ac_iB='\([      ]\),\1#\2define\3'
27038 ac_iC=' '
27039 ac_iD='\4,;t'
27040 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27041 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27042 ac_uB='$,\1#\2define\3'
27043 ac_uC=' '
27044 ac_uD=',;t'
27045
27046 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27047   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27048   case $ac_file in
27049   - | *:- | *:-:* ) # input from stdin
27050         cat >$tmp/stdin
27051         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27052         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27053   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27054         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27055   * )   ac_file_in=$ac_file.in ;;
27056   esac
27057
27058   test x"$ac_file" != x- && { echo "$as_me:27058: creating $ac_file" >&5
27059 echo "$as_me: creating $ac_file" >&6;}
27060
27061   # First look for the input files in the build tree, otherwise in the
27062   # src tree.
27063   ac_file_inputs=`IFS=:
27064     for f in $ac_file_in; do
27065       case $f in
27066       -) echo $tmp/stdin ;;
27067       [\\/$]*)
27068          # Absolute (can't be DOS-style, as IFS=:)
27069          test -f "$f" || { { echo "$as_me:27069: error: cannot find input file: $f" >&5
27070 echo "$as_me: error: cannot find input file: $f" >&2;}
27071    { (exit 1); exit 1; }; }
27072          echo $f;;
27073       *) # Relative
27074          if test -f "$f"; then
27075            # Build tree
27076            echo $f
27077          elif test -f "$srcdir/$f"; then
27078            # Source tree
27079            echo $srcdir/$f
27080          else
27081            # /dev/null tree
27082            { { echo "$as_me:27082: error: cannot find input file: $f" >&5
27083 echo "$as_me: error: cannot find input file: $f" >&2;}
27084    { (exit 1); exit 1; }; }
27085          fi;;
27086       esac
27087     done` || { (exit 1); exit 1; }
27088   # Remove the trailing spaces.
27089   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27090
27091 EOF
27092
27093 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27094 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27095 # be either 'cat' or 'sort'.
27096 cat confdefs.h | uniq >conftest.vals
27097
27098 # Break up conftest.vals because some shells have a limit on
27099 # the size of here documents, and old seds have small limits too.
27100
27101 rm -f conftest.tail
27102 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27103 while grep . conftest.vals >/dev/null
27104 do
27105   # Write chunks of a limited-size here document to conftest.frag.
27106   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27107   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27108   echo 'CEOF' >> $CONFIG_STATUS
27109   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27110   rm -f conftest.vals
27111   mv conftest.tail conftest.vals
27112 done
27113 rm -f conftest.vals
27114
27115 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27116 # marker @DEFS@.
27117 echo '  cat >> conftest.edit <<CEOF
27118 /@DEFS@/r conftest.frag
27119 /@DEFS@/d
27120 CEOF
27121 sed -f conftest.edit $tmp/in > $tmp/out
27122 rm -f $tmp/in
27123 mv $tmp/out $tmp/in
27124 rm -f conftest.edit conftest.frag
27125 ' >> $CONFIG_STATUS
27126
27127 cat >>$CONFIG_STATUS <<\EOF
27128   # Let's still pretend it is `configure' which instantiates (i.e., don't
27129   # use $as_me), people would be surprised to read:
27130   #    /* config.h.  Generated automatically by config.status.  */
27131   if test x"$ac_file" = x-; then
27132     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27133   else
27134     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27135   fi
27136   cat $tmp/in >>$tmp/config.h
27137   rm -f $tmp/in
27138   if test x"$ac_file" != x-; then
27139     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27140       { echo "$as_me:27140: $ac_file is unchanged" >&5
27141 echo "$as_me: $ac_file is unchanged" >&6;}
27142     else
27143       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27144          X"$ac_file" : 'X\(//\)[^/]' \| \
27145          X"$ac_file" : 'X\(//\)$' \| \
27146          X"$ac_file" : 'X\(/\)' \| \
27147          .     : '\(.\)' 2>/dev/null ||
27148 echo X"$ac_file" |
27149     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27150           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27151           /^X\(\/\/\)$/{ s//\1/; q; }
27152           /^X\(\/\).*/{ s//\1/; q; }
27153           s/.*/./; q'`
27154       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27155         { case "$ac_dir" in
27156   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27157   *)                      as_incr_dir=.;;
27158 esac
27159 as_dummy="$ac_dir"
27160 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27161   case $as_mkdir_dir in
27162     # Skip DOS drivespec
27163     ?:) as_incr_dir=$as_mkdir_dir ;;
27164     *)
27165       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27166       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27167     ;;
27168   esac
27169 done; }
27170
27171       fi
27172       rm -f $ac_file
27173       mv $tmp/config.h $ac_file
27174     fi
27175   else
27176     cat $tmp/config.h
27177     rm -f $tmp/config.h
27178   fi
27179 done
27180 EOF
27181 cat >>$CONFIG_STATUS <<\EOF
27182 #
27183 # CONFIG_COMMANDS section.
27184 #
27185 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27186   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27187   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27188
27189   case $ac_dest in
27190     default )
27191 if test "x$cf_with_tests" != xno ; then
27192
27193 for cf_dir in test
27194 do
27195         if test ! -d $srcdir/$cf_dir; then
27196                 continue
27197         elif test -f $srcdir/$cf_dir/programs; then
27198                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27199         fi
27200 done
27201
27202 fi
27203
27204 cf_prefix=$LIB_PREFIX
27205
27206 case $cf_cv_shlib_version in
27207 (cygdll|msysdll|mingw)
27208         TINFO_NAME=$TINFO_ARG_SUFFIX
27209         TINFO_SUFFIX=.dll
27210         ;;
27211 esac
27212
27213 if test -n "$TINFO_SUFFIX" ; then
27214         case $TINFO_SUFFIX in
27215         (tw*)
27216                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27217                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27218                 ;;
27219         (t*)
27220                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27221                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27222                 ;;
27223         (w*)
27224                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27225                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27226                 ;;
27227         esac
27228 fi
27229
27230 for cf_dir in $SRC_SUBDIRS
27231 do
27232         if test ! -d $srcdir/$cf_dir ; then
27233                 continue
27234         elif test -f $srcdir/$cf_dir/modules; then
27235
27236                 SHARED_LIB=
27237                 Libs_To_Make=
27238                 cf_awk_program=
27239                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27240                 then
27241                         cf_awk_program="$cf_awk_program\
27242 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27243 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27244 "
27245                 fi
27246
27247                 if test "x$WILDCARD_SYMS" = xno
27248                 then
27249                         cf_awk_program="$cf_awk_program\
27250 /[      ]_\\*;/ { skip=1; next; }\
27251 "
27252                 fi
27253
27254                 if test "x$cf_awk_program" != "x"
27255                 then
27256                         cat >>$cf_dir/Makefile <<CF_EOF
27257
27258 # Generated by CF_LIB_RULES
27259 resulting.map: $UNALTERED_SYMS
27260         $AWK 'BEGIN { skip = 1; last=""; } \
27261 $cf_awk_program \
27262 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27263  skip = 0; last = \$\$0; } \
27264 END { print last; }' < $UNALTERED_SYMS >\$@
27265
27266 distclean::
27267         rm -f resulting.map
27268 CF_EOF
27269                 fi
27270
27271                 for cf_item in $cf_LIST_MODELS
27272                 do
27273
27274         case X$cf_item in
27275         (Xlibtool)
27276                 cf_suffix='.la'
27277                 cf_depsuf=$cf_suffix
27278                 ;;
27279         (Xdebug)
27280                 cf_suffix='_g.a'
27281                 cf_depsuf=$cf_suffix
27282                 ;;
27283         (Xprofile)
27284                 cf_suffix='_p.a'
27285                 cf_depsuf=$cf_suffix
27286                 ;;
27287         (Xshared)
27288                 case $cf_cv_system_name in
27289                 (aix[5-7]*)
27290                         cf_suffix='.so'
27291                         cf_depsuf=$cf_suffix
27292                         ;;
27293                 (cygwin*|msys*|mingw*)
27294                         cf_suffix='.dll'
27295                         cf_depsuf='.dll.a'
27296                         ;;
27297                 (darwin*)
27298                         cf_suffix='.dylib'
27299                         cf_depsuf=$cf_suffix
27300                         ;;
27301                 (hpux*)
27302                         case $target in
27303                         (ia64*)
27304                                 cf_suffix='.so'
27305                                 cf_depsuf=$cf_suffix
27306                                 ;;
27307                         (*)
27308                                 cf_suffix='.sl'
27309                                 cf_depsuf=$cf_suffix
27310                                 ;;
27311                         esac
27312                         ;;
27313                 (*)
27314                         cf_suffix='.so'
27315                         cf_depsuf=$cf_suffix
27316                         ;;
27317                 esac
27318                 ;;
27319         (*)
27320                 cf_suffix='.a'
27321                 cf_depsuf=$cf_suffix
27322                 ;;
27323         esac
27324         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27325         then
27326                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27327                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27328         fi
27329
27330                         cf_libname=$cf_dir
27331                         test "$cf_dir" = c++ && cf_libname=ncurses++
27332                         if test $cf_item = shared ; then
27333                                 if test -n "${LIB_SUFFIX}"
27334                                 then
27335                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27336                                 else
27337                                         cf_shared_suffix="$cf_suffix"
27338                                 fi
27339                                 if test "$cf_cv_do_symlinks" = yes ; then
27340                                         cf_version_name=
27341
27342                                         case "$cf_cv_shlib_version" in
27343                                         (rel)
27344                                                 cf_version_name=REL_VERSION
27345                                                 ;;
27346                                         (abi)
27347                                                 cf_version_name=ABI_VERSION
27348                                                 ;;
27349                                         esac
27350
27351                                         if test -n "$cf_version_name"
27352                                         then
27353                                                 case "$cf_cv_system_name" in
27354                                                 (darwin*)
27355                                                         # "w", etc?
27356                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27357                                                         ;;
27358                                                 (*)
27359                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27360                                                         ;;
27361                                                 esac
27362                                         fi
27363                                         if test -n "${USE_LIB_SUFFIX}"
27364                                         then
27365                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27366                                         else
27367                                                 cf_shared_suffix="$cf_suffix"
27368                                         fi
27369                                 fi
27370                                 # cygwin needs import library, and has unique naming convention
27371                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27372                                 # use 'cyg' prefix for shared lib.
27373                                 case $cf_cv_shlib_version in
27374                                 (cygdll)
27375                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27376                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27377                                         ;;
27378                                 (msysdll)
27379                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27380                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27381                                         ;;
27382                                 (mingw)
27383                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27384                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27385                                         ;;
27386                                 (*)
27387                                         cf_add_lib=
27388                                         ;;
27389                                 esac
27390                                 if test -n "$cf_add_lib"
27391                                 then
27392                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27393                                         continue
27394                                 fi
27395                         fi
27396                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27397                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27398                 done
27399
27400                 if test $cf_dir = ncurses ; then
27401                         cf_subsets="$LIB_SUBSETS"
27402                         cf_r_parts="$cf_subsets"
27403                         cf_liblist="$Libs_To_Make"
27404
27405                         while test -n "$cf_r_parts"
27406                         do
27407                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27408                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27409                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27410                                         cf_add_lib=
27411                                         case $cf_l_parts in
27412                                         (*termlib*)
27413                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27414                                                 ;;
27415                                         (*ticlib*)
27416                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27417                                                 ;;
27418                                         (*)
27419                                                 break
27420                                                 ;;
27421                                         esac
27422                                         if test -n "$cf_add_lib"; then
27423                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27424                                         fi
27425                                 else
27426                                         break
27427                                 fi
27428                         done
27429                 else
27430                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27431                 fi
27432
27433                 if test $cf_dir = c++; then
27434                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27435                                 cf_list=
27436                                 for cf_item in $Libs_To_Make
27437                                 do
27438                                         case $cf_item in
27439                                         (*.a)
27440                                                 ;;
27441                                         (*)
27442                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27443                                                 ;;
27444                                         esac
27445                                         for cf_test in $cf_list
27446                                         do
27447                                                 if test "$cf_test" = "$cf_item"
27448                                                 then
27449                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27450                                                         cf_item=
27451                                                         break
27452                                                 fi
27453                                         done
27454                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27455                                 done
27456                                 Libs_To_Make="$cf_list"
27457                         fi
27458                 fi
27459
27460                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27461                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27462                         $cf_dir/Makefile >$cf_dir/Makefile.out
27463                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27464
27465                 $AWK -f $srcdir/mk-0th.awk \
27466                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27467                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27468
27469                 for cf_subset in $cf_subsets
27470                 do
27471                         cf_subdirs=
27472                         for cf_item in $cf_LIST_MODELS
27473                         do
27474
27475                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27476
27477 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27478
27479                         CXX_MODEL=$cf_ITEM
27480                         if test "$CXX_MODEL" = SHARED; then
27481                                 case $cf_cv_shlib_version in
27482                                 (cygdll|msysdll|mingw)
27483                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27484
27485 echo "${as_me:-configure}:27485: testing overriding CXX_MODEL to SHARED ..." 1>&5
27486
27487                                         with_shared_cxx=yes
27488                                         ;;
27489                                 (*)
27490                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27491                                         ;;
27492                                 esac
27493                         fi
27494
27495         case X$cf_item in
27496         (Xlibtool)
27497                 cf_suffix='.la'
27498                 cf_depsuf=$cf_suffix
27499                 ;;
27500         (Xdebug)
27501                 cf_suffix='_g.a'
27502                 cf_depsuf=$cf_suffix
27503                 ;;
27504         (Xprofile)
27505                 cf_suffix='_p.a'
27506                 cf_depsuf=$cf_suffix
27507                 ;;
27508         (Xshared)
27509                 case $cf_cv_system_name in
27510                 (aix[5-7]*)
27511                         cf_suffix='.so'
27512                         cf_depsuf=$cf_suffix
27513                         ;;
27514                 (cygwin*|msys*|mingw*)
27515                         cf_suffix='.dll'
27516                         cf_depsuf='.dll.a'
27517                         ;;
27518                 (darwin*)
27519                         cf_suffix='.dylib'
27520                         cf_depsuf=$cf_suffix
27521                         ;;
27522                 (hpux*)
27523                         case $target in
27524                         (ia64*)
27525                                 cf_suffix='.so'
27526                                 cf_depsuf=$cf_suffix
27527                                 ;;
27528                         (*)
27529                                 cf_suffix='.sl'
27530                                 cf_depsuf=$cf_suffix
27531                                 ;;
27532                         esac
27533                         ;;
27534                 (*)
27535                         cf_suffix='.so'
27536                         cf_depsuf=$cf_suffix
27537                         ;;
27538                 esac
27539                 ;;
27540         (*)
27541                 cf_suffix='.a'
27542                 cf_depsuf=$cf_suffix
27543                 ;;
27544         esac
27545         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27546         then
27547                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27548                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27549         fi
27550
27551         case $cf_item in
27552         (libtool) cf_subdir='obj_lo'  ;;
27553         (normal)  cf_subdir='objects' ;;
27554         (debug)   cf_subdir='obj_g' ;;
27555         (profile) cf_subdir='obj_p' ;;
27556         (shared)
27557                 case $cf_cv_system_name in
27558                 (cygwin|msys)
27559                         cf_subdir='objects' ;;
27560                 (*)
27561                         cf_subdir='obj_s' ;;
27562                 esac
27563         esac
27564
27565                         # Test for case where we build libtinfo with a different name.
27566                         cf_libname=$cf_dir
27567                         if test $cf_dir = ncurses ; then
27568                                 case $cf_subset in
27569                                 (*base*)
27570                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27571                                         ;;
27572                                 (*termlib*)
27573                                         cf_libname=$TINFO_LIB_SUFFIX
27574                                         ;;
27575                                 (ticlib*)
27576                                         cf_libname=$TICS_LIB_SUFFIX
27577                                         ;;
27578                                 esac
27579                         elif test $cf_dir = c++ ; then
27580                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27581                         else
27582                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27583                         fi
27584                         if test -n "${USE_ARG_SUFFIX}" ; then
27585                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27586                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27587                         fi
27588
27589                         # These dependencies really are for development, not
27590                         # builds, but they are useful in porting, too.
27591                         cf_depend="../include/ncurses_cfg.h"
27592                         if test "$srcdir" = "."; then
27593                                 cf_reldir="."
27594                         else
27595                                 cf_reldir="\${srcdir}"
27596                         fi
27597
27598                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27599                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27600                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27601                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27602                         fi
27603
27604                         cf_dir_suffix=
27605                         old_cf_suffix="$cf_suffix"
27606                         if test "$cf_cv_shlib_version_infix" = yes ; then
27607                         if test -n "$USE_LIB_SUFFIX" ; then
27608                                 case $USE_LIB_SUFFIX in
27609                                 (tw*)
27610                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27611                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27612                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27613                                         ;;
27614                                 (t*)
27615                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27616                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27617                                         cf_dir_suffix=t$EXTRA_SUFFIX
27618                                         ;;
27619                                 (w*)
27620                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27621                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27622                                         cf_dir_suffix=w$EXTRA_SUFFIX
27623                                         ;;
27624                                 (*)
27625                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27626                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27627                                         cf_dir_suffix=$EXTRA_SUFFIX
27628                                         ;;
27629                                 esac
27630                         fi
27631                         fi
27632
27633                         $AWK -f $srcdir/mk-1st.awk \
27634                                 name=${cf_libname}${cf_dir_suffix} \
27635                                 traces=$LIB_TRACING \
27636                                 MODEL=$cf_ITEM \
27637                                 CXX_MODEL=$CXX_MODEL \
27638                                 model=$cf_subdir \
27639                                 prefix=$cf_prefix \
27640                                 suffix=$cf_suffix \
27641                                 subset=$cf_subset \
27642                                 driver=$cf_cv_term_driver \
27643                                 SymLink="$LN_S" \
27644                                 TermlibRoot=$TINFO_NAME \
27645                                 TermlibSuffix=$TINFO_SUFFIX \
27646                                 ShlibVer=$cf_cv_shlib_version \
27647                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27648                                 ReLink=${cf_cv_do_relink:-no} \
27649                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27650                                 DoLinks=$cf_cv_do_symlinks \
27651                                 rmSoLocs=$cf_cv_rm_so_locs \
27652                                 ldconfig="$LDCONFIG" \
27653                                 overwrite=$WITH_OVERWRITE \
27654                                 depend="$cf_depend" \
27655                                 host="$host" \
27656                                 libtool_version="$LIBTOOL_VERSION" \
27657                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27658
27659                         cf_suffix="$old_cf_suffix"
27660
27661                         for cf_subdir2 in $cf_subdirs lib
27662                         do
27663                                 test $cf_subdir = $cf_subdir2 && break
27664                         done
27665                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27666                         $AWK -f $srcdir/mk-2nd.awk \
27667                                 name=$cf_dir \
27668                                 traces=$LIB_TRACING \
27669                                 MODEL=$cf_ITEM \
27670                                 model=$cf_subdir \
27671                                 subset=$cf_subset \
27672                                 srcdir=$srcdir \
27673                                 echo=$WITH_ECHO \
27674                                 crenames=$cf_cv_prog_CC_c_o \
27675                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27676                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27677                         cf_subdirs="$cf_subdirs $cf_subdir"
27678                         done
27679                 done
27680         fi
27681
27682         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27683 done
27684
27685 for cf_dir in $SRC_SUBDIRS
27686 do
27687         if test ! -d $srcdir/$cf_dir ; then
27688                 continue
27689         fi
27690
27691         if test -f $cf_dir/Makefile ; then
27692                 case "$cf_dir" in
27693                 (Ada95)
27694                         echo 'libs \' >> Makefile
27695                         echo 'install.libs \' >> Makefile
27696                         echo 'uninstall.libs ::' >> Makefile
27697                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27698                         ;;
27699                 esac
27700         fi
27701
27702         if test -f $srcdir/$cf_dir/modules; then
27703                 echo >> Makefile
27704                 if test -f $srcdir/$cf_dir/headers; then
27705 cat >> Makefile <<CF_EOF
27706 install.includes \\
27707 uninstall.includes \\
27708 CF_EOF
27709                 fi
27710 if test "$cf_dir" != "c++" ; then
27711 echo 'lint \' >> Makefile
27712 fi
27713 cat >> Makefile <<CF_EOF
27714 libs \\
27715 lintlib \\
27716 install.libs \\
27717 uninstall.libs \\
27718 install.$cf_dir \\
27719 uninstall.$cf_dir ::
27720         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27721 CF_EOF
27722         elif test -f $srcdir/$cf_dir/headers; then
27723 cat >> Makefile <<CF_EOF
27724
27725 libs \\
27726 install.libs \\
27727 uninstall.libs \\
27728 install.includes \\
27729 uninstall.includes ::
27730         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27731 CF_EOF
27732 fi
27733 done
27734
27735 if test "x$cf_with_db_install" = xyes; then
27736 cat >> Makefile <<CF_EOF
27737
27738 install.libs uninstall.libs \\
27739 install.data uninstall.data ::
27740 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27741 CF_EOF
27742 else
27743 cat >> Makefile <<CF_EOF
27744
27745 install.libs uninstall.libs ::
27746         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27747 CF_EOF
27748 fi
27749
27750 if test "x$cf_with_manpages" = xyes; then
27751 cat >> Makefile <<CF_EOF
27752
27753 install.man \\
27754 uninstall.man ::
27755         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27756 CF_EOF
27757 fi
27758
27759 cat >> Makefile <<CF_EOF
27760
27761 distclean ::
27762         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27763         rm -f headers.sh headers.sed mk_shared_lib.sh
27764         rm -f edit_man.* man_alias.*
27765         rm -rf \${DIRS_TO_MAKE}
27766 CF_EOF
27767
27768 # Special case: tack's manpage lives in its own directory.
27769 if test "x$cf_with_manpages" = xyes; then
27770 if test "x$cf_with_tack" = "xyes"; then
27771 cat >> Makefile <<CF_EOF
27772
27773 install.man \\
27774 uninstall.man ::
27775         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27776 CF_EOF
27777 fi
27778 fi
27779
27780 rm -f headers.sed headers.sh
27781
27782 echo creating headers.sh
27783 cat >headers.sh <<CF_EOF
27784 #! $SHELL
27785 # This shell script is generated by the 'configure' script.  It is invoked in a
27786 # subdirectory of the build tree.  It generates a sed-script in the parent
27787 # directory that is used to adjust includes for header files that reside in a
27788 # subdirectory of /usr/include, etc.
27789 PRG=""
27790 while test \$# != 3
27791 do
27792 PRG="\$PRG \$1"; shift
27793 done
27794 DST=\$1
27795 REF=\$2
27796 SRC=\$3
27797 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27798 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27799 echo installing \$SRC in \$DST
27800 CF_EOF
27801
27802 if test $WITH_CURSES_H = yes; then
27803         cat >>headers.sh <<CF_EOF
27804 case \$DST in
27805 (/*/include/*)
27806         END=\`basename \$DST\`
27807         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27808         do
27809                 NAME=\`basename \$i\`
27810                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27811         done
27812         ;;
27813 (*)
27814         echo "" >> \$TMPSED
27815         ;;
27816 esac
27817 CF_EOF
27818
27819 else
27820         cat >>headers.sh <<CF_EOF
27821 case \$DST in
27822 (/*/include/*)
27823         END=\`basename \$DST\`
27824         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27825         do
27826                 NAME=\`basename \$i\`
27827                 if test "\$NAME" = "curses.h"
27828                 then
27829                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27830                         NAME=ncurses.h
27831                 fi
27832                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27833         done
27834         ;;
27835 (*)
27836         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27837         ;;
27838 esac
27839 CF_EOF
27840 fi
27841 cat >>headers.sh <<CF_EOF
27842 rm -f \$TMPSRC
27843 sed -f \$TMPSED \$SRC > \$TMPSRC
27844 NAME=\`basename \$SRC\`
27845 CF_EOF
27846 if test $WITH_CURSES_H != yes; then
27847         cat >>headers.sh <<CF_EOF
27848 test "\$NAME" = "curses.h" && NAME=ncurses.h
27849 CF_EOF
27850 fi
27851 cat >>headers.sh <<CF_EOF
27852 # Just in case someone gzip'd manpages, remove the conflicting copy.
27853 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27854
27855 eval \$PRG \$TMPSRC \$DST/\$NAME
27856 rm -f \$TMPSRC \$TMPSED
27857 CF_EOF
27858
27859 chmod 0755 headers.sh
27860
27861 for cf_dir in $SRC_SUBDIRS
27862 do
27863         if test ! -d $srcdir/$cf_dir ; then
27864                 continue
27865         fi
27866
27867         if test -f $srcdir/$cf_dir/headers; then
27868                 $AWK -f $srcdir/mk-hdr.awk \
27869                         subset="$LIB_SUBSETS" \
27870                         compat="$WITH_CURSES_H" \
27871                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
27872         fi
27873
27874         if test -f $srcdir/$cf_dir/modules; then
27875                 if test "$cf_dir" != "c++" ; then
27876                         cat >>$cf_dir/Makefile <<"CF_EOF"
27877 depend : ${AUTO_SRC}
27878         makedepend -- ${CPPFLAGS} -- ${C_SRC}
27879
27880 # DO NOT DELETE THIS LINE -- make depend depends on it.
27881 CF_EOF
27882                 fi
27883         fi
27884 done
27885
27886 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27887 if test -z "$USE_OLD_MAKERULES" ; then
27888         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
27889 fi
27890 fi
27891  ;;
27892   esac
27893 done
27894 EOF
27895
27896 cat >>$CONFIG_STATUS <<\EOF
27897
27898 { (exit 0); exit 0; }
27899 EOF
27900 chmod +x $CONFIG_STATUS
27901 ac_clean_files=$ac_clean_files_save
27902
27903 # configure is writing to config.log, and then calls config.status.
27904 # config.status does its own redirection, appending to config.log.
27905 # Unfortunately, on DOS this fails, as config.log is still kept open
27906 # by configure, so config.status won't be able to write to it; its
27907 # output is simply discarded.  So we exec the FD to /dev/null,
27908 # effectively closing config.log, so it can be properly (re)opened and
27909 # appended to by config.status.  When coming back to configure, we
27910 # need to make the FD available again.
27911 if test "$no_create" != yes; then
27912   ac_cs_success=:
27913   exec 5>/dev/null
27914   $SHELL $CONFIG_STATUS || ac_cs_success=false
27915   exec 5>>config.log
27916   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27917   # would make configure fail if this is the last instruction.
27918   $ac_cs_success || { (exit 1); exit 1; }
27919 fi
27920 ${MAKE:-make} preinstall