]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20190630
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.688 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
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 Ada95, 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 Ada95 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
863 Some influential environment variables:
864   CC          C compiler command
865   CFLAGS      C compiler flags
866   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
867               nonstandard directory <lib dir>
868   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
869               headers in a nonstandard directory <include dir>
870   CPP         C preprocessor
871   CXX         C++ compiler command
872   CXXFLAGS    C++ compiler flags
873   CXXCPP      C++ preprocessor
874
875 Use these variables to override the choices made by `configure' or to help
876 it to find libraries and programs with nonstandard names/locations.
877
878 EOF
879 fi
880
881 if test "$ac_init_help" = "recursive"; then
882   # If there are subdirs, report their specific --help.
883   ac_popdir=`pwd`
884   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
885     cd $ac_subdir
886     # A "../" for each directory in /$ac_subdir.
887     ac_dots=`echo $ac_subdir |
888              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
889
890     case $srcdir in
891     .) # No --srcdir option.  We are building in place.
892       ac_sub_srcdir=$srcdir ;;
893     [\\/]* | ?:[\\/]* ) # Absolute path.
894       ac_sub_srcdir=$srcdir/$ac_subdir ;;
895     *) # Relative path.
896       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
897     esac
898
899     # Check for guested configure; otherwise get Cygnus style configure.
900     if test -f $ac_sub_srcdir/configure.gnu; then
901       echo
902       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
903     elif test -f $ac_sub_srcdir/configure; then
904       echo
905       $SHELL $ac_sub_srcdir/configure  --help=recursive
906     elif test -f $ac_sub_srcdir/configure.ac ||
907            test -f $ac_sub_srcdir/configure.in; then
908       echo
909       $ac_configure --help
910     else
911       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
912     fi
913     cd $ac_popdir
914   done
915 fi
916
917 test -n "$ac_init_help" && exit 0
918 if $ac_init_version; then
919   cat <<\EOF
920
921 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
922 Free Software Foundation, Inc.
923 This configure script is free software; the Free Software Foundation
924 gives unlimited permission to copy, distribute and modify it.
925 EOF
926   exit 0
927 fi
928 exec 5>config.log
929 cat >&5 <<EOF
930 This file contains any messages produced by compilers while
931 running configure, to aid debugging if configure makes a mistake.
932
933 It was created by $as_me, which was
934 generated by GNU Autoconf 2.52.20181006.  Invocation command line was
935
936   $ $0 $@
937
938 EOF
939 {
940 cat <<_ASUNAME
941 ## ---------- ##
942 ## Platform.  ##
943 ## ---------- ##
944
945 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
946 uname -m = `(uname -m) 2>/dev/null || echo unknown`
947 uname -r = `(uname -r) 2>/dev/null || echo unknown`
948 uname -s = `(uname -s) 2>/dev/null || echo unknown`
949 uname -v = `(uname -v) 2>/dev/null || echo unknown`
950
951 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
952 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
953
954 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
955 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
956 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
957 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
958 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
959 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
960 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
961
962 PATH = $PATH
963
964 _ASUNAME
965 } >&5
966
967 cat >&5 <<EOF
968 ## ------------ ##
969 ## Core tests.  ##
970 ## ------------ ##
971
972 EOF
973
974 # Keep a trace of the command line.
975 # Strip out --no-create and --no-recursion so they do not pile up.
976 # Also quote any args containing shell meta-characters.
977 ac_configure_args=
978 ac_sep=
979 for ac_arg
980 do
981   case $ac_arg in
982   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
983   | --no-cr | --no-c) ;;
984   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
985   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
986   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
987     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
988     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
989     ac_sep=" " ;;
990   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
991      ac_sep=" " ;;
992   esac
993   # Get rid of the leading space.
994 done
995
996 # When interrupted or exit'd, cleanup temporary files, and complete
997 # config.log.  We remove comments because anyway the quotes in there
998 # would cause problems or look ugly.
999 trap 'exit_status=$?
1000   # Save into config.log some information that might help in debugging.
1001   echo >&5
1002   echo "## ----------------- ##" >&5
1003   echo "## Cache variables.  ##" >&5
1004   echo "## ----------------- ##" >&5
1005   echo >&5
1006   # The following way of writing the cache mishandles newlines in values,
1007 {
1008   (set) 2>&1 |
1009     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1010     *ac_space=\ *)
1011       sed -n \
1012         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1013           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1014       ;;
1015     *)
1016       sed -n \
1017         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1018       ;;
1019     esac;
1020 } >&5
1021   sed "/^$/d" confdefs.h >conftest.log
1022   if test -s conftest.log; then
1023     echo >&5
1024     echo "## ------------ ##" >&5
1025     echo "## confdefs.h.  ##" >&5
1026     echo "## ------------ ##" >&5
1027     echo >&5
1028     cat conftest.log >&5
1029   fi
1030   (echo; echo) >&5
1031   test "$ac_signal" != 0 &&
1032     echo "$as_me: caught signal $ac_signal" >&5
1033   echo "$as_me: exit $exit_status" >&5
1034   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1035     exit $exit_status
1036      ' 0
1037 for ac_signal in 1 2 13 15; do
1038   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1039 done
1040 ac_signal=0
1041
1042 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1043 rm -rf conftest* confdefs.h
1044 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1045 echo >confdefs.h
1046
1047 # Let the site file select an alternate cache file if it wants to.
1048 # Prefer explicitly selected file to automatically selected ones.
1049 if test -z "$CONFIG_SITE"; then
1050   if test "x$prefix" != xNONE; then
1051     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1052   else
1053     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1054   fi
1055 fi
1056 for ac_site_file in $CONFIG_SITE; do
1057   if test -r "$ac_site_file"; then
1058     { echo "$as_me:1058: loading site script $ac_site_file" >&5
1059 echo "$as_me: loading site script $ac_site_file" >&6;}
1060     cat "$ac_site_file" >&5
1061     . "$ac_site_file"
1062   fi
1063 done
1064
1065 if test -r "$cache_file"; then
1066   # Some versions of bash will fail to source /dev/null (special
1067   # files actually), so we avoid doing that.
1068   if test -f "$cache_file"; then
1069     { echo "$as_me:1069: loading cache $cache_file" >&5
1070 echo "$as_me: loading cache $cache_file" >&6;}
1071     case $cache_file in
1072       [\\/]* | ?:[\\/]* ) . $cache_file;;
1073       *)                      . ./$cache_file;;
1074     esac
1075   fi
1076 else
1077   { echo "$as_me:1077: creating cache $cache_file" >&5
1078 echo "$as_me: creating cache $cache_file" >&6;}
1079   >$cache_file
1080 fi
1081
1082 # Check that the precious variables saved in the cache have kept the same
1083 # value.
1084 ac_cache_corrupted=false
1085 for ac_var in `(set) 2>&1 |
1086                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1087   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1088   eval ac_new_set=\$ac_env_${ac_var}_set
1089   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1090   eval ac_new_val="\$ac_env_${ac_var}_value"
1091   case $ac_old_set,$ac_new_set in
1092     set,)
1093       { echo "$as_me:1093: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1094 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1095       ac_cache_corrupted=: ;;
1096     ,set)
1097       { echo "$as_me:1097: error: \`$ac_var' was not set in the previous run" >&5
1098 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1099       ac_cache_corrupted=: ;;
1100     ,);;
1101     *)
1102       if test "x$ac_old_val" != "x$ac_new_val"; then
1103         { echo "$as_me:1103: error: \`$ac_var' has changed since the previous run:" >&5
1104 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1105         { echo "$as_me:1105:   former value:  $ac_old_val" >&5
1106 echo "$as_me:   former value:  $ac_old_val" >&2;}
1107         { echo "$as_me:1107:   current value: $ac_new_val" >&5
1108 echo "$as_me:   current value: $ac_new_val" >&2;}
1109         ac_cache_corrupted=:
1110       fi;;
1111   esac
1112   # Pass precious variables to config.status.  It doesn't matter if
1113   # we pass some twice (in addition to the command line arguments).
1114   if test "$ac_new_set" = set; then
1115     case $ac_new_val in
1116     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1117       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1118       ac_configure_args="$ac_configure_args '$ac_arg'"
1119       ;;
1120     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1121        ;;
1122     esac
1123   fi
1124 done
1125 if $ac_cache_corrupted; then
1126   { echo "$as_me:1126: error: changes in the environment can compromise the build" >&5
1127 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1128   { { echo "$as_me:1128: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1129 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1130    { (exit 1); exit 1; }; }
1131 fi
1132
1133 ac_ext=c
1134 ac_cpp='$CPP $CPPFLAGS'
1135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1138 ac_main_return=return
1139
1140 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1141   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1142                    ECHO_T='     ' ;;
1143   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1144   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1145 esac
1146 echo "#! $SHELL" >conftest.sh
1147 echo  "exit 0"   >>conftest.sh
1148 chmod +x conftest.sh
1149 if { (echo "$as_me:1149: PATH=\".;.\"; conftest.sh") >&5
1150   (PATH=".;."; conftest.sh) 2>&5
1151   ac_status=$?
1152   echo "$as_me:1152: \$? = $ac_status" >&5
1153   (exit $ac_status); }; then
1154   ac_path_separator=';'
1155 else
1156   ac_path_separator=:
1157 fi
1158 PATH_SEPARATOR="$ac_path_separator"
1159 rm -f conftest.sh
1160
1161 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1162
1163 top_builddir=`pwd`
1164
1165 echo "$as_me:1165: checking for egrep" >&5
1166 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1167 if test "${ac_cv_prog_egrep+set}" = set; then
1168   echo $ECHO_N "(cached) $ECHO_C" >&6
1169 else
1170   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1171                 then ac_cv_prog_egrep='grep -E'
1172                 else ac_cv_prog_egrep='egrep'
1173         fi
1174 fi
1175 echo "$as_me:1175: result: $ac_cv_prog_egrep" >&5
1176 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1177         EGREP=$ac_cv_prog_egrep
1178
1179         test -z "$EGREP" && { { echo "$as_me:1179: error: No egrep program found" >&5
1180 echo "$as_me: error: No egrep program found" >&2;}
1181    { (exit 1); exit 1; }; }
1182
1183 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1184 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1185 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1186 cf_cv_abi_version=${NCURSES_MAJOR}
1187 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1188 cf_cv_timestamp=`date`
1189 echo "$as_me:1189: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1190 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1191
1192 if test -f $srcdir/VERSION ; then
1193         echo "$as_me:1193: checking for package version" >&5
1194 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1195
1196         # if there are not enough fields, cut returns the last one...
1197         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1198         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1199         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1200
1201         # this is how CF_BUNDLED_INTL uses $VERSION:
1202         VERSION="$cf_field1"
1203
1204         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1205         test -z "$VERSION_MAJOR" && { { echo "$as_me:1205: error: missing major-version" >&5
1206 echo "$as_me: error: missing major-version" >&2;}
1207    { (exit 1); exit 1; }; }
1208
1209         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1210         test -z "$VERSION_MINOR" && { { echo "$as_me:1210: error: missing minor-version" >&5
1211 echo "$as_me: error: missing minor-version" >&2;}
1212    { (exit 1); exit 1; }; }
1213
1214         echo "$as_me:1214: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1215 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1216
1217         echo "$as_me:1217: checking for package patch date" >&5
1218 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1219         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1220         case .$VERSION_PATCH in
1221         (.)
1222                 { { echo "$as_me:1222: error: missing patch-date $VERSION_PATCH" >&5
1223 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1224    { (exit 1); exit 1; }; }
1225                 ;;
1226         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1227                 ;;
1228         (*)
1229                 { { echo "$as_me:1229: error: illegal patch-date $VERSION_PATCH" >&5
1230 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1231    { (exit 1); exit 1; }; }
1232                 ;;
1233         esac
1234         echo "$as_me:1234: result: $VERSION_PATCH" >&5
1235 echo "${ECHO_T}$VERSION_PATCH" >&6
1236 else
1237         { { echo "$as_me:1237: error: did not find $srcdir/VERSION" >&5
1238 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1239    { (exit 1); exit 1; }; }
1240 fi
1241
1242 # show the actual data that we have for versions:
1243 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1244
1245 echo "${as_me:-configure}:1245: testing ABI VERSION $VERSION ..." 1>&5
1246
1247 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1248
1249 echo "${as_me:-configure}:1249: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1250
1251 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1252
1253 echo "${as_me:-configure}:1253: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1254
1255 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1256
1257 echo "${as_me:-configure}:1257: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1258
1259         cf_PACKAGE=NCURSES
1260         PACKAGE=ncurses
1261
1262 cat >>confdefs.h <<EOF
1263 #define PACKAGE "$PACKAGE"
1264 EOF
1265
1266 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1267
1268         cat >>confdefs.h <<EOF
1269 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1270 EOF
1271
1272         cat >>confdefs.h <<EOF
1273 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1274 EOF
1275
1276 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1277
1278 # Check whether --with-rel-version or --without-rel-version was given.
1279 if test "${with_rel_version+set}" = set; then
1280   withval="$with_rel_version"
1281   { echo "$as_me:1281: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1282 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1283  cf_cv_rel_version=$withval
1284 fi;
1285
1286  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1287  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1288
1289 if test -n "$NCURSES_MAJOR" ; then
1290   case $NCURSES_MAJOR in
1291   ([0-9]*)
1292         ;;
1293   (*)
1294         { { echo "$as_me:1294: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1295 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1296    { (exit 1); exit 1; }; }
1297         ;;
1298   esac
1299 else
1300   { { echo "$as_me:1300: error: Release major-version value is empty" >&5
1301 echo "$as_me: error: Release major-version value is empty" >&2;}
1302    { (exit 1); exit 1; }; }
1303 fi
1304
1305 if test -n "$NCURSES_MINOR" ; then
1306   case $NCURSES_MINOR in
1307   ([0-9]*)
1308         ;;
1309   (*)
1310         { { echo "$as_me:1310: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1311 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1312    { (exit 1); exit 1; }; }
1313         ;;
1314   esac
1315 else
1316   { { echo "$as_me:1316: error: Release minor-version value is empty" >&5
1317 echo "$as_me: error: Release minor-version value is empty" >&2;}
1318    { (exit 1); exit 1; }; }
1319 fi
1320
1321 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1322
1323 # Check whether --with-abi-version or --without-abi-version was given.
1324 if test "${with_abi_version+set}" = set; then
1325   withval="$with_abi_version"
1326
1327         if test "x$cf_cv_abi_version" != "x$withval"
1328         then
1329                 { echo "$as_me:1329: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1330 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1331                 case $cf_cv_rel_version in
1332                 (5.*)
1333                         cf_cv_rel_version=$withval.0
1334                         ;;
1335                 (6.*)
1336                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1337                         ;;
1338                 esac
1339         fi
1340         cf_cv_abi_version=$withval
1341 fi;
1342
1343 if test -n "$cf_cv_abi_version" ; then
1344   case $cf_cv_abi_version in
1345   ([0-9]*)
1346         ;;
1347   (*)
1348         { { echo "$as_me:1348: error: ABI version is not a number: $cf_cv_abi_version" >&5
1349 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1350    { (exit 1); exit 1; }; }
1351         ;;
1352   esac
1353 else
1354   { { echo "$as_me:1354: error: ABI version value is empty" >&5
1355 echo "$as_me: error: ABI version value is empty" >&2;}
1356    { (exit 1); exit 1; }; }
1357 fi
1358
1359 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1360 then
1361         case $cf_cv_rel_version in
1362         (5.*)
1363                 cf_cv_rel_version=$with_abi_version.0
1364                 ;;
1365         esac
1366 fi
1367
1368 ac_aux_dir=
1369 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1370   if test -f $ac_dir/install-sh; then
1371     ac_aux_dir=$ac_dir
1372     ac_install_sh="$ac_aux_dir/install-sh -c"
1373     break
1374   elif test -f $ac_dir/install.sh; then
1375     ac_aux_dir=$ac_dir
1376     ac_install_sh="$ac_aux_dir/install.sh -c"
1377     break
1378   elif test -f $ac_dir/shtool; then
1379     ac_aux_dir=$ac_dir
1380     ac_install_sh="$ac_aux_dir/shtool install -c"
1381     break
1382   fi
1383 done
1384 if test -z "$ac_aux_dir"; then
1385   { { echo "$as_me:1385: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1386 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1387    { (exit 1); exit 1; }; }
1388 fi
1389 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1390 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1391 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1392
1393 # Make sure we can run config.sub.
1394 $ac_config_sub sun4 >/dev/null 2>&1 ||
1395   { { echo "$as_me:1395: error: cannot run $ac_config_sub" >&5
1396 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1397    { (exit 1); exit 1; }; }
1398
1399 echo "$as_me:1399: checking build system type" >&5
1400 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1401 if test "${ac_cv_build+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   ac_cv_build_alias=$build_alias
1405 test -z "$ac_cv_build_alias" &&
1406   ac_cv_build_alias=`$ac_config_guess`
1407 test -z "$ac_cv_build_alias" &&
1408   { { echo "$as_me:1408: error: cannot guess build type; you must specify one" >&5
1409 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1410    { (exit 1); exit 1; }; }
1411 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1412   { { echo "$as_me:1412: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1413 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1414    { (exit 1); exit 1; }; }
1415
1416 fi
1417 echo "$as_me:1417: result: $ac_cv_build" >&5
1418 echo "${ECHO_T}$ac_cv_build" >&6
1419 build=$ac_cv_build
1420 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1421 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1422 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1423
1424 echo "$as_me:1424: checking host system type" >&5
1425 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1426 if test "${ac_cv_host+set}" = set; then
1427   echo $ECHO_N "(cached) $ECHO_C" >&6
1428 else
1429   ac_cv_host_alias=$host_alias
1430 test -z "$ac_cv_host_alias" &&
1431   ac_cv_host_alias=$ac_cv_build_alias
1432 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1433   { { echo "$as_me:1433: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1434 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1435    { (exit 1); exit 1; }; }
1436
1437 fi
1438 echo "$as_me:1438: result: $ac_cv_host" >&5
1439 echo "${ECHO_T}$ac_cv_host" >&6
1440 host=$ac_cv_host
1441 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1442 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1443 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1444
1445 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1446         echo "$as_me:1446: checking target system type" >&5
1447 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1448 if test "${ac_cv_target+set}" = set; then
1449   echo $ECHO_N "(cached) $ECHO_C" >&6
1450 else
1451   ac_cv_target_alias=$target_alias
1452 test "x$ac_cv_target_alias" = "x" &&
1453   ac_cv_target_alias=$ac_cv_host_alias
1454 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1455   { { echo "$as_me:1455: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1456 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1457    { (exit 1); exit 1; }; }
1458
1459 fi
1460 echo "$as_me:1460: result: $ac_cv_target" >&5
1461 echo "${ECHO_T}$ac_cv_target" >&6
1462 target=$ac_cv_target
1463 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1464 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1465 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1466
1467 # The aliases save the names the user supplied, while $host etc.
1468 # will get canonicalized.
1469 test -n "$target_alias" &&
1470   test "$program_prefix$program_suffix$program_transform_name" = \
1471     NONENONEs,x,x, &&
1472   program_prefix=${target_alias}-
1473         system_name="$host_os"
1474 else
1475         system_name="`(uname -s -r) 2>/dev/null`"
1476         if test -z "$system_name" ; then
1477                 system_name="`(hostname) 2>/dev/null`"
1478         fi
1479 fi
1480 test -n "$system_name" &&
1481 cat >>confdefs.h <<EOF
1482 #define SYSTEM_NAME "$system_name"
1483 EOF
1484
1485 if test "${cf_cv_system_name+set}" = set; then
1486   echo $ECHO_N "(cached) $ECHO_C" >&6
1487 else
1488   cf_cv_system_name="$system_name"
1489 fi
1490
1491 test -z "$system_name" && system_name="$cf_cv_system_name"
1492 test -n "$cf_cv_system_name" && echo "$as_me:1492: result: Configuring for $cf_cv_system_name" >&5
1493 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1494
1495 if test ".$system_name" != ".$cf_cv_system_name" ; then
1496         echo "$as_me:1496: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1497 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1498         { { echo "$as_me:1498: error: \"Please remove config.cache and try again.\"" >&5
1499 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1500    { (exit 1); exit 1; }; }
1501 fi
1502
1503 # Check whether --with-system-type or --without-system-type was given.
1504 if test "${with_system_type+set}" = set; then
1505   withval="$with_system_type"
1506   { echo "$as_me:1506: WARNING: overriding system type to $withval" >&5
1507 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1508         cf_cv_system_name=$withval
1509         host_os=$withval
1510
1511 fi;
1512
1513 ###     Save the given $CFLAGS to allow user-override.
1514 cf_user_CFLAGS="$CFLAGS"
1515
1516 ###     Default install-location
1517
1518 echo "$as_me:1518: checking for prefix" >&5
1519 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1520 if test "x$prefix" = "xNONE" ; then
1521         case "$cf_cv_system_name" in
1522                 # non-vendor systems don't have a conflict
1523         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1524                 prefix=/usr
1525                 ;;
1526         (*)     prefix=$ac_default_prefix
1527                 ;;
1528         esac
1529 fi
1530 echo "$as_me:1530: result: $prefix" >&5
1531 echo "${ECHO_T}$prefix" >&6
1532
1533 if test "x$prefix" = "xNONE" ; then
1534 echo "$as_me:1534: checking for default include-directory" >&5
1535 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1536 test -n "$verbose" && echo 1>&6
1537 for cf_symbol in \
1538         $includedir \
1539         $includedir/ncurses \
1540         $prefix/include \
1541         $prefix/include/ncurses \
1542         /usr/local/include \
1543         /usr/local/include/ncurses \
1544         /usr/include \
1545         /usr/include/ncurses
1546 do
1547         cf_dir=`eval echo $cf_symbol`
1548         if test -f $cf_dir/curses.h ; then
1549         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1550                 includedir="$cf_symbol"
1551                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1552                 break
1553         fi
1554         fi
1555         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1556 done
1557 echo "$as_me:1557: result: $includedir" >&5
1558 echo "${ECHO_T}$includedir" >&6
1559 fi
1560
1561 ### Defaults for ncurses ABI
1562
1563 case x$cf_cv_abi_version in
1564 (x[6789])
1565         cf_dft_ext_colors=yes
1566         cf_dft_ext_const=yes
1567         cf_dft_ext_mouse=yes
1568         cf_dft_ext_putwin=yes
1569         cf_dft_ext_spfuncs=yes
1570         cf_dft_filter_syms=yes
1571         cf_dft_chtype=uint32_t
1572         cf_dft_mmask_t=uint32_t
1573         cf_dft_interop=yes
1574         cf_dft_tparm_arg=intptr_t
1575         cf_dft_with_lp64=yes
1576         ;;
1577 (*)
1578         cf_dft_ext_colors=no
1579         cf_dft_ext_const=no
1580         cf_dft_ext_mouse=no
1581         cf_dft_ext_putwin=no
1582         cf_dft_ext_spfuncs=no
1583         cf_dft_filter_syms=no
1584         cf_dft_chtype=auto
1585         cf_dft_mmask_t=auto
1586         cf_dft_interop=no
1587         cf_dft_tparm_arg=long
1588         cf_dft_with_lp64=no
1589         ;;
1590 esac
1591
1592 ###     Checks for programs.
1593
1594 # Check whether --with-ada or --without-ada was given.
1595 if test "${with_ada+set}" = set; then
1596   withval="$with_ada"
1597   cf_with_ada=$withval
1598 else
1599   cf_with_ada=yes
1600 fi;
1601
1602 if test "x$cf_with_ada" = xyes
1603 then
1604         cf_prog_cc="gnatgcc gcc cc"
1605 else
1606         cf_prog_cc="gcc cc"
1607 fi
1608
1609 ac_ext=c
1610 ac_cpp='$CPP $CPPFLAGS'
1611 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1612 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1613 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1614 ac_main_return=return
1615 if test -n "$ac_tool_prefix"; then
1616   for ac_prog in $cf_prog_cc
1617   do
1618     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1619 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1620 echo "$as_me:1620: checking for $ac_word" >&5
1621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1622 if test "${ac_cv_prog_CC+set}" = set; then
1623   echo $ECHO_N "(cached) $ECHO_C" >&6
1624 else
1625   if test -n "$CC"; then
1626   ac_cv_prog_CC="$CC" # Let the user override the test.
1627 else
1628   ac_save_IFS=$IFS; IFS=$ac_path_separator
1629 ac_dummy="$PATH"
1630 for ac_dir in $ac_dummy; do
1631   IFS=$ac_save_IFS
1632   test -z "$ac_dir" && ac_dir=.
1633   $as_executable_p "$ac_dir/$ac_word" || continue
1634 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1635 echo "$as_me:1635: found $ac_dir/$ac_word" >&5
1636 break
1637 done
1638
1639 fi
1640 fi
1641 CC=$ac_cv_prog_CC
1642 if test -n "$CC"; then
1643   echo "$as_me:1643: result: $CC" >&5
1644 echo "${ECHO_T}$CC" >&6
1645 else
1646   echo "$as_me:1646: result: no" >&5
1647 echo "${ECHO_T}no" >&6
1648 fi
1649
1650     test -n "$CC" && break
1651   done
1652 fi
1653 if test -z "$CC"; then
1654   ac_ct_CC=$CC
1655   for ac_prog in $cf_prog_cc
1656 do
1657   # Extract the first word of "$ac_prog", so it can be a program name with args.
1658 set dummy $ac_prog; ac_word=$2
1659 echo "$as_me:1659: checking for $ac_word" >&5
1660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1661 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1662   echo $ECHO_N "(cached) $ECHO_C" >&6
1663 else
1664   if test -n "$ac_ct_CC"; then
1665   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1666 else
1667   ac_save_IFS=$IFS; IFS=$ac_path_separator
1668 ac_dummy="$PATH"
1669 for ac_dir in $ac_dummy; do
1670   IFS=$ac_save_IFS
1671   test -z "$ac_dir" && ac_dir=.
1672   $as_executable_p "$ac_dir/$ac_word" || continue
1673 ac_cv_prog_ac_ct_CC="$ac_prog"
1674 echo "$as_me:1674: found $ac_dir/$ac_word" >&5
1675 break
1676 done
1677
1678 fi
1679 fi
1680 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1681 if test -n "$ac_ct_CC"; then
1682   echo "$as_me:1682: result: $ac_ct_CC" >&5
1683 echo "${ECHO_T}$ac_ct_CC" >&6
1684 else
1685   echo "$as_me:1685: result: no" >&5
1686 echo "${ECHO_T}no" >&6
1687 fi
1688
1689   test -n "$ac_ct_CC" && break
1690 done
1691
1692   CC=$ac_ct_CC
1693 fi
1694
1695 test -z "$CC" && { { echo "$as_me:1695: error: no acceptable cc found in \$PATH" >&5
1696 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1697    { (exit 1); exit 1; }; }
1698
1699 # Provide some information about the compiler.
1700 echo "$as_me:1700:" \
1701      "checking for C compiler version" >&5
1702 ac_compiler=`set X $ac_compile; echo $2`
1703 { (eval echo "$as_me:1703: \"$ac_compiler --version </dev/null >&5\"") >&5
1704   (eval $ac_compiler --version </dev/null >&5) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }
1708 { (eval echo "$as_me:1708: \"$ac_compiler -v </dev/null >&5\"") >&5
1709   (eval $ac_compiler -v </dev/null >&5) 2>&5
1710   ac_status=$?
1711   echo "$as_me:1711: \$? = $ac_status" >&5
1712   (exit $ac_status); }
1713 { (eval echo "$as_me:1713: \"$ac_compiler -V </dev/null >&5\"") >&5
1714   (eval $ac_compiler -V </dev/null >&5) 2>&5
1715   ac_status=$?
1716   echo "$as_me:1716: \$? = $ac_status" >&5
1717   (exit $ac_status); }
1718
1719 cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main (void)
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 ac_clean_files_save=$ac_clean_files
1732 ac_clean_files="$ac_clean_files a.out a.exe"
1733 # Try to create an executable without -o first, disregard a.out.
1734 # It will help us diagnose broken compilers, and finding out an intuition
1735 # of exeext.
1736 echo "$as_me:1736: checking for C compiler default output" >&5
1737 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1738 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1739 if { (eval echo "$as_me:1739: \"$ac_link_default\"") >&5
1740   (eval $ac_link_default) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); }; then
1744   # Find the output, starting from the most likely.  This scheme is
1745 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1746 # resort.
1747 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1748                 ls a.out conftest 2>/dev/null;
1749                 ls a.* conftest.* 2>/dev/null`; do
1750   case $ac_file in
1751     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1752     a.out ) # We found the default executable, but exeext='' is most
1753             # certainly right.
1754             break;;
1755     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1756           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1757           export ac_cv_exeext
1758           break;;
1759     * ) break;;
1760   esac
1761 done
1762 else
1763   echo "$as_me: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 { { echo "$as_me:1765: error: C compiler cannot create executables" >&5
1766 echo "$as_me: error: C compiler cannot create executables" >&2;}
1767    { (exit 77); exit 77; }; }
1768 fi
1769
1770 ac_exeext=$ac_cv_exeext
1771 echo "$as_me:1771: result: $ac_file" >&5
1772 echo "${ECHO_T}$ac_file" >&6
1773
1774 # Check the compiler produces executables we can run.  If not, either
1775 # the compiler is broken, or we cross compile.
1776 echo "$as_me:1776: checking whether the C compiler works" >&5
1777 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1778 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1779 # If not cross compiling, check that we can run a simple program.
1780 if test "$cross_compiling" != yes; then
1781   if { ac_try='./$ac_file'
1782   { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783   (eval $ac_try) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); }; }; then
1787     cross_compiling=no
1788   else
1789     if test "$cross_compiling" = maybe; then
1790         cross_compiling=yes
1791     else
1792         { { echo "$as_me:1792: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&5
1794 echo "$as_me: error: cannot run C compiled programs.
1795 If you meant to cross compile, use \`--host'." >&2;}
1796    { (exit 1); exit 1; }; }
1797     fi
1798   fi
1799 fi
1800 echo "$as_me:1800: result: yes" >&5
1801 echo "${ECHO_T}yes" >&6
1802
1803 rm -f a.out a.exe conftest$ac_cv_exeext
1804 ac_clean_files=$ac_clean_files_save
1805 # Check the compiler produces executables we can run.  If not, either
1806 # the compiler is broken, or we cross compile.
1807 echo "$as_me:1807: checking whether we are cross compiling" >&5
1808 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1809 echo "$as_me:1809: result: $cross_compiling" >&5
1810 echo "${ECHO_T}$cross_compiling" >&6
1811
1812 echo "$as_me:1812: checking for executable suffix" >&5
1813 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1814 if { (eval echo "$as_me:1814: \"$ac_link\"") >&5
1815   (eval $ac_link) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; then
1819   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1820 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1821 # work properly (i.e., refer to `conftest.exe'), while it won't with
1822 # `rm'.
1823 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1824   case $ac_file in
1825     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1826     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1827           export ac_cv_exeext
1828           break;;
1829     * ) break;;
1830   esac
1831 done
1832 else
1833   { { echo "$as_me:1833: error: cannot compute EXEEXT: cannot compile and link" >&5
1834 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1835    { (exit 1); exit 1; }; }
1836 fi
1837
1838 rm -f conftest$ac_cv_exeext
1839 echo "$as_me:1839: result: $ac_cv_exeext" >&5
1840 echo "${ECHO_T}$ac_cv_exeext" >&6
1841
1842 rm -f conftest.$ac_ext
1843 EXEEXT=$ac_cv_exeext
1844 ac_exeext=$EXEEXT
1845 echo "$as_me:1845: checking for object suffix" >&5
1846 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1847 if test "${ac_cv_objext+set}" = set; then
1848   echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853
1854 int
1855 main (void)
1856 {
1857
1858   ;
1859   return 0;
1860 }
1861 _ACEOF
1862 rm -f conftest.o conftest.obj
1863 if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
1864   (eval $ac_compile) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit $ac_status); }; then
1868   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1869   case $ac_file in
1870     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1871     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1872        break;;
1873   esac
1874 done
1875 else
1876   echo "$as_me: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 { { echo "$as_me:1878: error: cannot compute OBJEXT: cannot compile" >&5
1879 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1880    { (exit 1); exit 1; }; }
1881 fi
1882
1883 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1884 fi
1885 echo "$as_me:1885: result: $ac_cv_objext" >&5
1886 echo "${ECHO_T}$ac_cv_objext" >&6
1887 OBJEXT=$ac_cv_objext
1888 ac_objext=$OBJEXT
1889 echo "$as_me:1889: checking whether we are using the GNU C compiler" >&5
1890 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1891 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1892   echo $ECHO_N "(cached) $ECHO_C" >&6
1893 else
1894   cat >conftest.$ac_ext <<_ACEOF
1895 #line 1895 "configure"
1896 #include "confdefs.h"
1897
1898 int
1899 main (void)
1900 {
1901 #ifndef __GNUC__
1902        choke me
1903 #endif
1904
1905   ;
1906   return 0;
1907 }
1908 _ACEOF
1909 rm -f conftest.$ac_objext
1910 if { (eval echo "$as_me:1910: \"$ac_compile\"") >&5
1911   (eval $ac_compile) 2>&5
1912   ac_status=$?
1913   echo "$as_me:1913: \$? = $ac_status" >&5
1914   (exit $ac_status); } &&
1915          { ac_try='test -s conftest.$ac_objext'
1916   { (eval echo "$as_me:1916: \"$ac_try\"") >&5
1917   (eval $ac_try) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); }; }; then
1921   ac_compiler_gnu=yes
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat conftest.$ac_ext >&5
1925 ac_compiler_gnu=no
1926 fi
1927 rm -f conftest.$ac_objext conftest.$ac_ext
1928 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1929
1930 fi
1931 echo "$as_me:1931: result: $ac_cv_c_compiler_gnu" >&5
1932 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1933 GCC=`test $ac_compiler_gnu = yes && echo yes`
1934 ac_test_CFLAGS=${CFLAGS+set}
1935 ac_save_CFLAGS=$CFLAGS
1936 CFLAGS="-g"
1937 echo "$as_me:1937: checking whether $CC accepts -g" >&5
1938 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1939 if test "${ac_cv_prog_cc_g+set}" = set; then
1940   echo $ECHO_N "(cached) $ECHO_C" >&6
1941 else
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945
1946 int
1947 main (void)
1948 {
1949
1950   ;
1951   return 0;
1952 }
1953 _ACEOF
1954 rm -f conftest.$ac_objext
1955 if { (eval echo "$as_me:1955: \"$ac_compile\"") >&5
1956   (eval $ac_compile) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit $ac_status); } &&
1960          { ac_try='test -s conftest.$ac_objext'
1961   { (eval echo "$as_me:1961: \"$ac_try\"") >&5
1962   (eval $ac_try) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); }; }; then
1966   ac_cv_prog_cc_g=yes
1967 else
1968   echo "$as_me: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 ac_cv_prog_cc_g=no
1971 fi
1972 rm -f conftest.$ac_objext conftest.$ac_ext
1973 fi
1974 echo "$as_me:1974: result: $ac_cv_prog_cc_g" >&5
1975 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1976 if test "$ac_test_CFLAGS" = set; then
1977   CFLAGS=$ac_save_CFLAGS
1978 elif test $ac_cv_prog_cc_g = yes; then
1979   if test "$GCC" = yes; then
1980     CFLAGS="-g -O2"
1981   else
1982     CFLAGS="-g"
1983   fi
1984 else
1985   if test "$GCC" = yes; then
1986     CFLAGS="-O2"
1987   else
1988     CFLAGS=
1989   fi
1990 fi
1991 # Some people use a C++ compiler to compile C.  Since we use `exit',
1992 # in C++ we need to declare it.  In case someone uses the same compiler
1993 # for both compiling C and C++ we need to have the C++ compiler decide
1994 # the declaration of exit, since it's the most demanding environment.
1995 cat >conftest.$ac_ext <<_ACEOF
1996 #ifndef __cplusplus
1997   choke me
1998 #endif
1999 _ACEOF
2000 rm -f conftest.$ac_objext
2001 if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002   (eval $ac_compile) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); } &&
2006          { ac_try='test -s conftest.$ac_objext'
2007   { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008   (eval $ac_try) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); }; }; then
2012   for ac_declaration in \
2013    ''\
2014    '#include <stdlib.h>' \
2015    'extern "C" void std::exit (int) throw (); using std::exit;' \
2016    'extern "C" void std::exit (int); using std::exit;' \
2017    'extern "C" void exit (int) throw ();' \
2018    'extern "C" void exit (int);' \
2019    'void exit (int);'
2020 do
2021   cat >conftest.$ac_ext <<_ACEOF
2022 #line 2022 "configure"
2023 #include "confdefs.h"
2024 #include <stdlib.h>
2025 $ac_declaration
2026 int
2027 main (void)
2028 {
2029 exit (42);
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 rm -f conftest.$ac_objext
2035 if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036   (eval $ac_compile) 2>&5
2037   ac_status=$?
2038   echo "$as_me:2038: \$? = $ac_status" >&5
2039   (exit $ac_status); } &&
2040          { ac_try='test -s conftest.$ac_objext'
2041   { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042   (eval $ac_try) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); }; }; then
2046   :
2047 else
2048   echo "$as_me: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2050 continue
2051 fi
2052 rm -f conftest.$ac_objext conftest.$ac_ext
2053   cat >conftest.$ac_ext <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056 $ac_declaration
2057 int
2058 main (void)
2059 {
2060 exit (42);
2061   ;
2062   return 0;
2063 }
2064 _ACEOF
2065 rm -f conftest.$ac_objext
2066 if { (eval echo "$as_me:2066: \"$ac_compile\"") >&5
2067   (eval $ac_compile) 2>&5
2068   ac_status=$?
2069   echo "$as_me:2069: \$? = $ac_status" >&5
2070   (exit $ac_status); } &&
2071          { ac_try='test -s conftest.$ac_objext'
2072   { (eval echo "$as_me:2072: \"$ac_try\"") >&5
2073   (eval $ac_try) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); }; }; then
2077   break
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 done
2084 rm -rf conftest*
2085 if test -n "$ac_declaration"; then
2086   echo '#ifdef __cplusplus' >>confdefs.h
2087   echo $ac_declaration      >>confdefs.h
2088   echo '#endif'             >>confdefs.h
2089 fi
2090
2091 else
2092   echo "$as_me: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 fi
2095 rm -f conftest.$ac_objext conftest.$ac_ext
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102
2103 GCC_VERSION=none
2104 if test "$GCC" = yes ; then
2105         echo "$as_me:2105: checking version of $CC" >&5
2106 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2107         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.].*//'`"
2108         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2109         echo "$as_me:2109: result: $GCC_VERSION" >&5
2110 echo "${ECHO_T}$GCC_VERSION" >&6
2111 fi
2112
2113 echo "$as_me:2113: checking for $CC option to accept ANSI C" >&5
2114 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2115 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2116   echo $ECHO_N "(cached) $ECHO_C" >&6
2117 else
2118   ac_cv_prog_cc_stdc=no
2119 ac_save_CC=$CC
2120 cat >conftest.$ac_ext <<_ACEOF
2121 #line 2121 "configure"
2122 #include "confdefs.h"
2123 #include <stdarg.h>
2124 #include <stdio.h>
2125 #include <sys/types.h>
2126 #include <sys/stat.h>
2127 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2128 struct buf { int x; };
2129 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2130 static char *e (p, i)
2131      char **p;
2132      int i;
2133 {
2134   return p[i];
2135 }
2136 static char *f (char * (*g) (char **, int), char **p, ...)
2137 {
2138   char *s;
2139   va_list v;
2140   va_start (v,p);
2141   s = g (p, va_arg (v,int));
2142   va_end (v);
2143   return s;
2144 }
2145 int test (int i, double x);
2146 struct s1 {int (*f) (int a);};
2147 struct s2 {int (*f) (double a);};
2148 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2149 int argc;
2150 char **argv;
2151 int
2152 main (void)
2153 {
2154 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2155   ;
2156   return 0;
2157 }
2158 _ACEOF
2159 # Don't try gcc -ansi; that turns off useful extensions and
2160 # breaks some systems' header files.
2161 # AIX                   -qlanglvl=ansi
2162 # Ultrix and OSF/1      -std1
2163 # HP-UX 10.20 and later -Ae
2164 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2165 # SVR4                  -Xc -D__EXTENSIONS__
2166 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2167 do
2168   CC="$ac_save_CC $ac_arg"
2169   rm -f conftest.$ac_objext
2170 if { (eval echo "$as_me:2170: \"$ac_compile\"") >&5
2171   (eval $ac_compile) 2>&5
2172   ac_status=$?
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit $ac_status); } &&
2175          { ac_try='test -s conftest.$ac_objext'
2176   { (eval echo "$as_me:2176: \"$ac_try\"") >&5
2177   (eval $ac_try) 2>&5
2178   ac_status=$?
2179   echo "$as_me:2179: \$? = $ac_status" >&5
2180   (exit $ac_status); }; }; then
2181   ac_cv_prog_cc_stdc=$ac_arg
2182 break
2183 else
2184   echo "$as_me: failed program was:" >&5
2185 cat conftest.$ac_ext >&5
2186 fi
2187 rm -f conftest.$ac_objext
2188 done
2189 rm -f conftest.$ac_ext conftest.$ac_objext
2190 CC=$ac_save_CC
2191
2192 fi
2193
2194 case "x$ac_cv_prog_cc_stdc" in
2195   x|xno)
2196     echo "$as_me:2196: result: none needed" >&5
2197 echo "${ECHO_T}none needed" >&6 ;;
2198   *)
2199     echo "$as_me:2199: result: $ac_cv_prog_cc_stdc" >&5
2200 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2201     CC="$CC $ac_cv_prog_cc_stdc" ;;
2202 esac
2203
2204 # This should have been defined by AC_PROG_CC
2205 : ${CC:=cc}
2206
2207 echo "$as_me:2207: checking \$CFLAGS variable" >&5
2208 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2209 case "x$CFLAGS" in
2210 (*-[IUD]*)
2211         echo "$as_me:2211: result: broken" >&5
2212 echo "${ECHO_T}broken" >&6
2213         { echo "$as_me:2213: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2214 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2215         cf_flags="$CFLAGS"
2216         CFLAGS=
2217         for cf_arg in $cf_flags
2218         do
2219
2220 cf_fix_cppflags=no
2221 cf_new_cflags=
2222 cf_new_cppflags=
2223 cf_new_extra_cppflags=
2224
2225 for cf_add_cflags in $cf_arg
2226 do
2227 case $cf_fix_cppflags in
2228 (no)
2229         case $cf_add_cflags in
2230         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2231                 case $cf_add_cflags in
2232                 (-D*)
2233                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2234
2235                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2236                                 && test -z "${cf_tst_cflags}" \
2237                                 && cf_fix_cppflags=yes
2238
2239                         if test $cf_fix_cppflags = yes ; then
2240
2241         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2242         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2243
2244                                 continue
2245                         elif test "${cf_tst_cflags}" = "\"'" ; then
2246
2247         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2248         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2249
2250                                 continue
2251                         fi
2252                         ;;
2253                 esac
2254                 case "$CPPFLAGS" in
2255                 (*$cf_add_cflags)
2256                         ;;
2257                 (*)
2258                         case $cf_add_cflags in
2259                         (-D*)
2260                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2261
2262 CPPFLAGS=`echo "$CPPFLAGS" | \
2263         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2264                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2265
2266                                 ;;
2267                         esac
2268
2269         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2270         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2271
2272                         ;;
2273                 esac
2274                 ;;
2275         (*)
2276
2277         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2278         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2279
2280                 ;;
2281         esac
2282         ;;
2283 (yes)
2284
2285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2287
2288         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2289
2290         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2291                 && test -z "${cf_tst_cflags}" \
2292                 && cf_fix_cppflags=no
2293         ;;
2294 esac
2295 done
2296
2297 if test -n "$cf_new_cflags" ; then
2298
2299         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2300         CFLAGS="${CFLAGS}$cf_new_cflags"
2301
2302 fi
2303
2304 if test -n "$cf_new_cppflags" ; then
2305
2306         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2307         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2308
2309 fi
2310
2311 if test -n "$cf_new_extra_cppflags" ; then
2312
2313         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2314         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2315
2316 fi
2317
2318         done
2319         ;;
2320 (*)
2321         echo "$as_me:2321: result: ok" >&5
2322 echo "${ECHO_T}ok" >&6
2323         ;;
2324 esac
2325
2326 echo "$as_me:2326: checking \$CC variable" >&5
2327 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2328 case "$CC" in
2329 (*[\ \  ]-*)
2330         echo "$as_me:2330: result: broken" >&5
2331 echo "${ECHO_T}broken" >&6
2332         { echo "$as_me:2332: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2333 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2334         # humor him...
2335         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2336         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2337         CC="$cf_prog"
2338         for cf_arg in $cf_flags
2339         do
2340                 case "x$cf_arg" in
2341                 (x-[IUDfgOW]*)
2342
2343 cf_fix_cppflags=no
2344 cf_new_cflags=
2345 cf_new_cppflags=
2346 cf_new_extra_cppflags=
2347
2348 for cf_add_cflags in $cf_arg
2349 do
2350 case $cf_fix_cppflags in
2351 (no)
2352         case $cf_add_cflags in
2353         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2354                 case $cf_add_cflags in
2355                 (-D*)
2356                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2357
2358                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2359                                 && test -z "${cf_tst_cflags}" \
2360                                 && cf_fix_cppflags=yes
2361
2362                         if test $cf_fix_cppflags = yes ; then
2363
2364         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2365         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2366
2367                                 continue
2368                         elif test "${cf_tst_cflags}" = "\"'" ; then
2369
2370         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2371         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2372
2373                                 continue
2374                         fi
2375                         ;;
2376                 esac
2377                 case "$CPPFLAGS" in
2378                 (*$cf_add_cflags)
2379                         ;;
2380                 (*)
2381                         case $cf_add_cflags in
2382                         (-D*)
2383                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2384
2385 CPPFLAGS=`echo "$CPPFLAGS" | \
2386         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2387                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2388
2389                                 ;;
2390                         esac
2391
2392         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2393         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2394
2395                         ;;
2396                 esac
2397                 ;;
2398         (*)
2399
2400         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2401         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2402
2403                 ;;
2404         esac
2405         ;;
2406 (yes)
2407
2408         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2409         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2410
2411         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2412
2413         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2414                 && test -z "${cf_tst_cflags}" \
2415                 && cf_fix_cppflags=no
2416         ;;
2417 esac
2418 done
2419
2420 if test -n "$cf_new_cflags" ; then
2421
2422         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2423         CFLAGS="${CFLAGS}$cf_new_cflags"
2424
2425 fi
2426
2427 if test -n "$cf_new_cppflags" ; then
2428
2429         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2430         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2431
2432 fi
2433
2434 if test -n "$cf_new_extra_cppflags" ; then
2435
2436         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2437         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2438
2439 fi
2440
2441                         ;;
2442                 (*)
2443                         CC="$CC $cf_arg"
2444                         ;;
2445                 esac
2446         done
2447         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2448
2449 echo "${as_me:-configure}:2449: testing resulting CC: '$CC' ..." 1>&5
2450
2451         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2452
2453 echo "${as_me:-configure}:2453: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2454
2455         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2456
2457 echo "${as_me:-configure}:2457: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2458
2459         ;;
2460 (*)
2461         echo "$as_me:2461: result: ok" >&5
2462 echo "${ECHO_T}ok" >&6
2463         ;;
2464 esac
2465
2466 ac_ext=c
2467 ac_cpp='$CPP $CPPFLAGS'
2468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2471 ac_main_return=return
2472 echo "$as_me:2472: checking how to run the C preprocessor" >&5
2473 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2474 # On Suns, sometimes $CPP names a directory.
2475 if test -n "$CPP" && test -d "$CPP"; then
2476   CPP=
2477 fi
2478 if test -z "$CPP"; then
2479   if test "${ac_cv_prog_CPP+set}" = set; then
2480   echo $ECHO_N "(cached) $ECHO_C" >&6
2481 else
2482       # Double quotes because CPP needs to be expanded
2483     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2484     do
2485       ac_preproc_ok=false
2486 for ac_c_preproc_warn_flag in '' yes
2487 do
2488   # Use a header file that comes with gcc, so configuring glibc
2489   # with a fresh cross-compiler works.
2490   # On the NeXT, cc -E runs the code through the compiler's parser,
2491   # not just through cpp. "Syntax error" is here to catch this case.
2492   cat >conftest.$ac_ext <<_ACEOF
2493 #line 2493 "configure"
2494 #include "confdefs.h"
2495 #include <assert.h>
2496                      Syntax error
2497 _ACEOF
2498 if { (eval echo "$as_me:2498: \"$ac_cpp conftest.$ac_ext\"") >&5
2499   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2500   ac_status=$?
2501   egrep -v '^ *\+' conftest.er1 >conftest.err
2502   rm -f conftest.er1
2503   cat conftest.err >&5
2504   echo "$as_me:2504: \$? = $ac_status" >&5
2505   (exit $ac_status); } >/dev/null; then
2506   if test -s conftest.err; then
2507     ac_cpp_err=$ac_c_preproc_warn_flag
2508   else
2509     ac_cpp_err=
2510   fi
2511 else
2512   ac_cpp_err=yes
2513 fi
2514 if test -z "$ac_cpp_err"; then
2515   :
2516 else
2517   echo "$as_me: failed program was:" >&5
2518   cat conftest.$ac_ext >&5
2519   # Broken: fails on valid input.
2520 continue
2521 fi
2522 rm -f conftest.err conftest.$ac_ext
2523
2524   # OK, works on sane cases.  Now check whether non-existent headers
2525   # can be detected and how.
2526   cat >conftest.$ac_ext <<_ACEOF
2527 #line 2527 "configure"
2528 #include "confdefs.h"
2529 #include <ac_nonexistent.h>
2530 _ACEOF
2531 if { (eval echo "$as_me:2531: \"$ac_cpp conftest.$ac_ext\"") >&5
2532   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2533   ac_status=$?
2534   egrep -v '^ *\+' conftest.er1 >conftest.err
2535   rm -f conftest.er1
2536   cat conftest.err >&5
2537   echo "$as_me:2537: \$? = $ac_status" >&5
2538   (exit $ac_status); } >/dev/null; then
2539   if test -s conftest.err; then
2540     ac_cpp_err=$ac_c_preproc_warn_flag
2541   else
2542     ac_cpp_err=
2543   fi
2544 else
2545   ac_cpp_err=yes
2546 fi
2547 if test -z "$ac_cpp_err"; then
2548   # Broken: success on invalid input.
2549 continue
2550 else
2551   echo "$as_me: failed program was:" >&5
2552   cat conftest.$ac_ext >&5
2553   # Passes both tests.
2554 ac_preproc_ok=:
2555 break
2556 fi
2557 rm -f conftest.err conftest.$ac_ext
2558
2559 done
2560 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2561 rm -f conftest.err conftest.$ac_ext
2562 if $ac_preproc_ok; then
2563   break
2564 fi
2565
2566     done
2567     ac_cv_prog_CPP=$CPP
2568
2569 fi
2570   CPP=$ac_cv_prog_CPP
2571 else
2572   ac_cv_prog_CPP=$CPP
2573 fi
2574 echo "$as_me:2574: result: $CPP" >&5
2575 echo "${ECHO_T}$CPP" >&6
2576 ac_preproc_ok=false
2577 for ac_c_preproc_warn_flag in '' yes
2578 do
2579   # Use a header file that comes with gcc, so configuring glibc
2580   # with a fresh cross-compiler works.
2581   # On the NeXT, cc -E runs the code through the compiler's parser,
2582   # not just through cpp. "Syntax error" is here to catch this case.
2583   cat >conftest.$ac_ext <<_ACEOF
2584 #line 2584 "configure"
2585 #include "confdefs.h"
2586 #include <assert.h>
2587                      Syntax error
2588 _ACEOF
2589 if { (eval echo "$as_me:2589: \"$ac_cpp conftest.$ac_ext\"") >&5
2590   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2591   ac_status=$?
2592   egrep -v '^ *\+' conftest.er1 >conftest.err
2593   rm -f conftest.er1
2594   cat conftest.err >&5
2595   echo "$as_me:2595: \$? = $ac_status" >&5
2596   (exit $ac_status); } >/dev/null; then
2597   if test -s conftest.err; then
2598     ac_cpp_err=$ac_c_preproc_warn_flag
2599   else
2600     ac_cpp_err=
2601   fi
2602 else
2603   ac_cpp_err=yes
2604 fi
2605 if test -z "$ac_cpp_err"; then
2606   :
2607 else
2608   echo "$as_me: failed program was:" >&5
2609   cat conftest.$ac_ext >&5
2610   # Broken: fails on valid input.
2611 continue
2612 fi
2613 rm -f conftest.err conftest.$ac_ext
2614
2615   # OK, works on sane cases.  Now check whether non-existent headers
2616   # can be detected and how.
2617   cat >conftest.$ac_ext <<_ACEOF
2618 #line 2618 "configure"
2619 #include "confdefs.h"
2620 #include <ac_nonexistent.h>
2621 _ACEOF
2622 if { (eval echo "$as_me:2622: \"$ac_cpp conftest.$ac_ext\"") >&5
2623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2624   ac_status=$?
2625   egrep -v '^ *\+' conftest.er1 >conftest.err
2626   rm -f conftest.er1
2627   cat conftest.err >&5
2628   echo "$as_me:2628: \$? = $ac_status" >&5
2629   (exit $ac_status); } >/dev/null; then
2630   if test -s conftest.err; then
2631     ac_cpp_err=$ac_c_preproc_warn_flag
2632   else
2633     ac_cpp_err=
2634   fi
2635 else
2636   ac_cpp_err=yes
2637 fi
2638 if test -z "$ac_cpp_err"; then
2639   # Broken: success on invalid input.
2640 continue
2641 else
2642   echo "$as_me: failed program was:" >&5
2643   cat conftest.$ac_ext >&5
2644   # Passes both tests.
2645 ac_preproc_ok=:
2646 break
2647 fi
2648 rm -f conftest.err conftest.$ac_ext
2649
2650 done
2651 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2652 rm -f conftest.err conftest.$ac_ext
2653 if $ac_preproc_ok; then
2654   :
2655 else
2656   { { echo "$as_me:2656: error: C preprocessor \"$CPP\" fails sanity check" >&5
2657 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2658    { (exit 1); exit 1; }; }
2659 fi
2660
2661 ac_ext=c
2662 ac_cpp='$CPP $CPPFLAGS'
2663 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2664 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2666 ac_main_return=return
2667
2668 if test $ac_cv_c_compiler_gnu = yes; then
2669     echo "$as_me:2669: checking whether $CC needs -traditional" >&5
2670 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2671 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2672   echo $ECHO_N "(cached) $ECHO_C" >&6
2673 else
2674     ac_pattern="Autoconf.*'x'"
2675   cat >conftest.$ac_ext <<_ACEOF
2676 #line 2676 "configure"
2677 #include "confdefs.h"
2678 #include <sgtty.h>
2679 int Autoconf = TIOCGETP;
2680 _ACEOF
2681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2682   egrep "$ac_pattern" >/dev/null 2>&1; then
2683   ac_cv_prog_gcc_traditional=yes
2684 else
2685   ac_cv_prog_gcc_traditional=no
2686 fi
2687 rm -rf conftest*
2688
2689   if test $ac_cv_prog_gcc_traditional = no; then
2690     cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693 #include <termio.h>
2694 int Autoconf = TCGETA;
2695 _ACEOF
2696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2697   egrep "$ac_pattern" >/dev/null 2>&1; then
2698   ac_cv_prog_gcc_traditional=yes
2699 fi
2700 rm -rf conftest*
2701
2702   fi
2703 fi
2704 echo "$as_me:2704: result: $ac_cv_prog_gcc_traditional" >&5
2705 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2706   if test $ac_cv_prog_gcc_traditional = yes; then
2707     CC="$CC -traditional"
2708   fi
2709 fi
2710
2711 echo "$as_me:2711: checking whether $CC understands -c and -o together" >&5
2712 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2713 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2714   echo $ECHO_N "(cached) $ECHO_C" >&6
2715 else
2716
2717 cat > conftest.$ac_ext <<CF_EOF
2718 int main(void)
2719 {
2720         ${cf_cv_main_return:-return}(0);
2721 }
2722 CF_EOF
2723 # We do the test twice because some compilers refuse to overwrite an
2724 # existing .o file with -o, though they will create one.
2725 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2726 if { (eval echo "$as_me:2726: \"$ac_try\"") >&5
2727   (eval $ac_try) 2>&5
2728   ac_status=$?
2729   echo "$as_me:2729: \$? = $ac_status" >&5
2730   (exit $ac_status); } &&
2731   test -f conftest2.$ac_objext && { (eval echo "$as_me:2731: \"$ac_try\"") >&5
2732   (eval $ac_try) 2>&5
2733   ac_status=$?
2734   echo "$as_me:2734: \$? = $ac_status" >&5
2735   (exit $ac_status); };
2736 then
2737   eval cf_cv_prog_CC_c_o=yes
2738 else
2739   eval cf_cv_prog_CC_c_o=no
2740 fi
2741 rm -rf conftest*
2742
2743 fi
2744 if test $cf_cv_prog_CC_c_o = yes; then
2745   echo "$as_me:2745: result: yes" >&5
2746 echo "${ECHO_T}yes" >&6
2747 else
2748   echo "$as_me:2748: result: no" >&5
2749 echo "${ECHO_T}no" >&6
2750 fi
2751
2752 if test "$cross_compiling" = yes ; then
2753         LDCONFIG=:
2754 else
2755         case "$cf_cv_system_name" in
2756         (dragonfly*|mirbsd*|freebsd*)
2757                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2758                 ;;
2759         (*) LDPATH=$PATH:/sbin:/usr/sbin
2760                 # Extract the first word of "ldconfig", so it can be a program name with args.
2761 set dummy ldconfig; ac_word=$2
2762 echo "$as_me:2762: checking for $ac_word" >&5
2763 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2764 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2765   echo $ECHO_N "(cached) $ECHO_C" >&6
2766 else
2767   case $LDCONFIG in
2768   [\\/]* | ?:[\\/]*)
2769   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2770   ;;
2771   *)
2772   ac_save_IFS=$IFS; IFS=$ac_path_separator
2773 ac_dummy="$LDPATH"
2774 for ac_dir in $ac_dummy; do
2775   IFS=$ac_save_IFS
2776   test -z "$ac_dir" && ac_dir=.
2777   if $as_executable_p "$ac_dir/$ac_word"; then
2778    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2779    echo "$as_me:2779: found $ac_dir/$ac_word" >&5
2780    break
2781 fi
2782 done
2783
2784   ;;
2785 esac
2786 fi
2787 LDCONFIG=$ac_cv_path_LDCONFIG
2788
2789 if test -n "$LDCONFIG"; then
2790   echo "$as_me:2790: result: $LDCONFIG" >&5
2791 echo "${ECHO_T}$LDCONFIG" >&6
2792 else
2793   echo "$as_me:2793: result: no" >&5
2794 echo "${ECHO_T}no" >&6
2795 fi
2796
2797                 ;;
2798         esac
2799 fi
2800
2801 echo "$as_me:2801: checking if you want to ensure bool is consistent with C++" >&5
2802 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2803
2804 # Check whether --with-cxx or --without-cxx was given.
2805 if test "${with_cxx+set}" = set; then
2806   withval="$with_cxx"
2807   cf_with_cxx=$withval
2808 else
2809   cf_with_cxx=yes
2810 fi;
2811 echo "$as_me:2811: result: $cf_with_cxx" >&5
2812 echo "${ECHO_T}$cf_with_cxx" >&6
2813 if test "X$cf_with_cxx" = Xno ; then
2814         CXX=""
2815         GXX=""
2816 else
2817         # with autoconf 2.13, we can change the error to a warning:
2818                 ac_ext=cc
2819 ac_cpp='$CXXCPP $CPPFLAGS'
2820 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2821 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2822 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2823 ac_main_return=return
2824 if test -n "$ac_tool_prefix"; then
2825   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2826   do
2827     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2828 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2829 echo "$as_me:2829: checking for $ac_word" >&5
2830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2831 if test "${ac_cv_prog_CXX+set}" = set; then
2832   echo $ECHO_N "(cached) $ECHO_C" >&6
2833 else
2834   if test -n "$CXX"; then
2835   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2836 else
2837   ac_save_IFS=$IFS; IFS=$ac_path_separator
2838 ac_dummy="$PATH"
2839 for ac_dir in $ac_dummy; do
2840   IFS=$ac_save_IFS
2841   test -z "$ac_dir" && ac_dir=.
2842   $as_executable_p "$ac_dir/$ac_word" || continue
2843 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2844 echo "$as_me:2844: found $ac_dir/$ac_word" >&5
2845 break
2846 done
2847
2848 fi
2849 fi
2850 CXX=$ac_cv_prog_CXX
2851 if test -n "$CXX"; then
2852   echo "$as_me:2852: result: $CXX" >&5
2853 echo "${ECHO_T}$CXX" >&6
2854 else
2855   echo "$as_me:2855: result: no" >&5
2856 echo "${ECHO_T}no" >&6
2857 fi
2858
2859     test -n "$CXX" && break
2860   done
2861 fi
2862 if test -z "$CXX"; then
2863   ac_ct_CXX=$CXX
2864   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2865 do
2866   # Extract the first word of "$ac_prog", so it can be a program name with args.
2867 set dummy $ac_prog; ac_word=$2
2868 echo "$as_me:2868: checking for $ac_word" >&5
2869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2870 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2871   echo $ECHO_N "(cached) $ECHO_C" >&6
2872 else
2873   if test -n "$ac_ct_CXX"; then
2874   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2875 else
2876   ac_save_IFS=$IFS; IFS=$ac_path_separator
2877 ac_dummy="$PATH"
2878 for ac_dir in $ac_dummy; do
2879   IFS=$ac_save_IFS
2880   test -z "$ac_dir" && ac_dir=.
2881   $as_executable_p "$ac_dir/$ac_word" || continue
2882 ac_cv_prog_ac_ct_CXX="$ac_prog"
2883 echo "$as_me:2883: found $ac_dir/$ac_word" >&5
2884 break
2885 done
2886
2887 fi
2888 fi
2889 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2890 if test -n "$ac_ct_CXX"; then
2891   echo "$as_me:2891: result: $ac_ct_CXX" >&5
2892 echo "${ECHO_T}$ac_ct_CXX" >&6
2893 else
2894   echo "$as_me:2894: result: no" >&5
2895 echo "${ECHO_T}no" >&6
2896 fi
2897
2898   test -n "$ac_ct_CXX" && break
2899 done
2900 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2901
2902   CXX=$ac_ct_CXX
2903 fi
2904
2905 # Provide some information about the compiler.
2906 echo "$as_me:2906:" \
2907      "checking for C++ compiler version" >&5
2908 ac_compiler=`set X $ac_compile; echo $2`
2909 { (eval echo "$as_me:2909: \"$ac_compiler --version </dev/null >&5\"") >&5
2910   (eval $ac_compiler --version </dev/null >&5) 2>&5
2911   ac_status=$?
2912   echo "$as_me:2912: \$? = $ac_status" >&5
2913   (exit $ac_status); }
2914 { (eval echo "$as_me:2914: \"$ac_compiler -v </dev/null >&5\"") >&5
2915   (eval $ac_compiler -v </dev/null >&5) 2>&5
2916   ac_status=$?
2917   echo "$as_me:2917: \$? = $ac_status" >&5
2918   (exit $ac_status); }
2919 { (eval echo "$as_me:2919: \"$ac_compiler -V </dev/null >&5\"") >&5
2920   (eval $ac_compiler -V </dev/null >&5) 2>&5
2921   ac_status=$?
2922   echo "$as_me:2922: \$? = $ac_status" >&5
2923   (exit $ac_status); }
2924
2925 echo "$as_me:2925: checking whether we are using the GNU C++ compiler" >&5
2926 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2927 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2928   echo $ECHO_N "(cached) $ECHO_C" >&6
2929 else
2930   cat >conftest.$ac_ext <<_ACEOF
2931 #line 2931 "configure"
2932 #include "confdefs.h"
2933
2934 int
2935 main (void)
2936 {
2937 #ifndef __GNUC__
2938        choke me
2939 #endif
2940
2941   ;
2942   return 0;
2943 }
2944 _ACEOF
2945 rm -f conftest.$ac_objext
2946 if { (eval echo "$as_me:2946: \"$ac_compile\"") >&5
2947   (eval $ac_compile) 2>&5
2948   ac_status=$?
2949   echo "$as_me:2949: \$? = $ac_status" >&5
2950   (exit $ac_status); } &&
2951          { ac_try='test -s conftest.$ac_objext'
2952   { (eval echo "$as_me:2952: \"$ac_try\"") >&5
2953   (eval $ac_try) 2>&5
2954   ac_status=$?
2955   echo "$as_me:2955: \$? = $ac_status" >&5
2956   (exit $ac_status); }; }; then
2957   ac_compiler_gnu=yes
2958 else
2959   echo "$as_me: failed program was:" >&5
2960 cat conftest.$ac_ext >&5
2961 ac_compiler_gnu=no
2962 fi
2963 rm -f conftest.$ac_objext conftest.$ac_ext
2964 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2965
2966 fi
2967 echo "$as_me:2967: result: $ac_cv_cxx_compiler_gnu" >&5
2968 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2969 GXX=`test $ac_compiler_gnu = yes && echo yes`
2970 ac_test_CXXFLAGS=${CXXFLAGS+set}
2971 ac_save_CXXFLAGS=$CXXFLAGS
2972 CXXFLAGS="-g"
2973 echo "$as_me:2973: checking whether $CXX accepts -g" >&5
2974 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2975 if test "${ac_cv_prog_cxx_g+set}" = set; then
2976   echo $ECHO_N "(cached) $ECHO_C" >&6
2977 else
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981
2982 int
2983 main (void)
2984 {
2985
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); } &&
2996          { ac_try='test -s conftest.$ac_objext'
2997   { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998   (eval $ac_try) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002   ac_cv_prog_cxx_g=yes
3003 else
3004   echo "$as_me: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 ac_cv_prog_cxx_g=no
3007 fi
3008 rm -f conftest.$ac_objext conftest.$ac_ext
3009 fi
3010 echo "$as_me:3010: result: $ac_cv_prog_cxx_g" >&5
3011 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3012 if test "$ac_test_CXXFLAGS" = set; then
3013   CXXFLAGS=$ac_save_CXXFLAGS
3014 elif test $ac_cv_prog_cxx_g = yes; then
3015   if test "$GXX" = yes; then
3016     CXXFLAGS="-g -O2"
3017   else
3018     CXXFLAGS="-g"
3019   fi
3020 else
3021   if test "$GXX" = yes; then
3022     CXXFLAGS="-O2"
3023   else
3024     CXXFLAGS=
3025   fi
3026 fi
3027 for ac_declaration in \
3028    ''\
3029    '#include <stdlib.h>' \
3030    'extern "C" void std::exit (int) throw (); using std::exit;' \
3031    'extern "C" void std::exit (int); using std::exit;' \
3032    'extern "C" void exit (int) throw ();' \
3033    'extern "C" void exit (int);' \
3034    'void exit (int);'
3035 do
3036   cat >conftest.$ac_ext <<_ACEOF
3037 #line 3037 "configure"
3038 #include "confdefs.h"
3039 #include <stdlib.h>
3040 $ac_declaration
3041 int
3042 main (void)
3043 {
3044 exit (42);
3045   ;
3046   return 0;
3047 }
3048 _ACEOF
3049 rm -f conftest.$ac_objext
3050 if { (eval echo "$as_me:3050: \"$ac_compile\"") >&5
3051   (eval $ac_compile) 2>&5
3052   ac_status=$?
3053   echo "$as_me:3053: \$? = $ac_status" >&5
3054   (exit $ac_status); } &&
3055          { ac_try='test -s conftest.$ac_objext'
3056   { (eval echo "$as_me:3056: \"$ac_try\"") >&5
3057   (eval $ac_try) 2>&5
3058   ac_status=$?
3059   echo "$as_me:3059: \$? = $ac_status" >&5
3060   (exit $ac_status); }; }; then
3061   :
3062 else
3063   echo "$as_me: failed program was:" >&5
3064 cat conftest.$ac_ext >&5
3065 continue
3066 fi
3067 rm -f conftest.$ac_objext conftest.$ac_ext
3068   cat >conftest.$ac_ext <<_ACEOF
3069 #line 3069 "configure"
3070 #include "confdefs.h"
3071 $ac_declaration
3072 int
3073 main (void)
3074 {
3075 exit (42);
3076   ;
3077   return 0;
3078 }
3079 _ACEOF
3080 rm -f conftest.$ac_objext
3081 if { (eval echo "$as_me:3081: \"$ac_compile\"") >&5
3082   (eval $ac_compile) 2>&5
3083   ac_status=$?
3084   echo "$as_me:3084: \$? = $ac_status" >&5
3085   (exit $ac_status); } &&
3086          { ac_try='test -s conftest.$ac_objext'
3087   { (eval echo "$as_me:3087: \"$ac_try\"") >&5
3088   (eval $ac_try) 2>&5
3089   ac_status=$?
3090   echo "$as_me:3090: \$? = $ac_status" >&5
3091   (exit $ac_status); }; }; then
3092   break
3093 else
3094   echo "$as_me: failed program was:" >&5
3095 cat conftest.$ac_ext >&5
3096 fi
3097 rm -f conftest.$ac_objext conftest.$ac_ext
3098 done
3099 rm -rf conftest*
3100 if test -n "$ac_declaration"; then
3101   echo '#ifdef __cplusplus' >>confdefs.h
3102   echo $ac_declaration      >>confdefs.h
3103   echo '#endif'             >>confdefs.h
3104 fi
3105
3106 ac_ext=c
3107 ac_cpp='$CPP $CPPFLAGS'
3108 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3109 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3111 ac_main_return=return
3112
3113         ac_ext=cc
3114 ac_cpp='$CXXCPP $CPPFLAGS'
3115 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3116 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3117 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3118 ac_main_return=return
3119
3120         if test "x$cf_with_cxx" != xno
3121         then
3122                 # Several of the C++ configurations do not work, particularly when
3123                 # cross-compiling (20140913 -TD)
3124                 echo "$as_me:3124: checking if $CXX works" >&5
3125 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3126
3127                 save_CPPFLAGS="$CPPFLAGS"
3128                 eval cf_includedir=${includedir}
3129                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3130
3131 cat >conftest.$ac_ext <<_ACEOF
3132 #line 3132 "configure"
3133 #include "confdefs.h"
3134
3135 #include <stdlib.h>
3136 #include <stdio.h>
3137
3138 int
3139 main (void)
3140 {
3141
3142                 printf("Hello world!\n")
3143
3144   ;
3145   return 0;
3146 }
3147 _ACEOF
3148 rm -f conftest.$ac_objext
3149 if { (eval echo "$as_me:3149: \"$ac_compile\"") >&5
3150   (eval $ac_compile) 2>&5
3151   ac_status=$?
3152   echo "$as_me:3152: \$? = $ac_status" >&5
3153   (exit $ac_status); } &&
3154          { ac_try='test -s conftest.$ac_objext'
3155   { (eval echo "$as_me:3155: \"$ac_try\"") >&5
3156   (eval $ac_try) 2>&5
3157   ac_status=$?
3158   echo "$as_me:3158: \$? = $ac_status" >&5
3159   (exit $ac_status); }; }; then
3160   cf_cxx_works=yes
3161 else
3162   echo "$as_me: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
3164 cf_cxx_works=no
3165 fi
3166 rm -f conftest.$ac_objext conftest.$ac_ext
3167                 CPPFLAGS="$save_CPPFLAGS"
3168
3169                 echo "$as_me:3169: result: $cf_cxx_works" >&5
3170 echo "${ECHO_T}$cf_cxx_works" >&6
3171                 if test "x$cf_cxx_works" = xno
3172                 then
3173                         { echo "$as_me:3173: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3174 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3175                         cf_with_cxx=no; CXX=""; GXX="";
3176                 fi
3177         fi
3178         ac_ext=c
3179 ac_cpp='$CPP $CPPFLAGS'
3180 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3181 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3182 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3183 ac_main_return=return
3184
3185         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3186         if test "$CXX" = "g++" ; then
3187                 # Extract the first word of "g++", so it can be a program name with args.
3188 set dummy g++; ac_word=$2
3189 echo "$as_me:3189: checking for $ac_word" >&5
3190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3191 if test "${ac_cv_path_CXX+set}" = set; then
3192   echo $ECHO_N "(cached) $ECHO_C" >&6
3193 else
3194   case $CXX in
3195   [\\/]* | ?:[\\/]*)
3196   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3197   ;;
3198   *)
3199   ac_save_IFS=$IFS; IFS=$ac_path_separator
3200 ac_dummy="$PATH"
3201 for ac_dir in $ac_dummy; do
3202   IFS=$ac_save_IFS
3203   test -z "$ac_dir" && ac_dir=.
3204   if $as_executable_p "$ac_dir/$ac_word"; then
3205    ac_cv_path_CXX="$ac_dir/$ac_word"
3206    echo "$as_me:3206: found $ac_dir/$ac_word" >&5
3207    break
3208 fi
3209 done
3210
3211   ;;
3212 esac
3213 fi
3214 CXX=$ac_cv_path_CXX
3215
3216 if test -n "$CXX"; then
3217   echo "$as_me:3217: result: $CXX" >&5
3218 echo "${ECHO_T}$CXX" >&6
3219 else
3220   echo "$as_me:3220: result: no" >&5
3221 echo "${ECHO_T}no" >&6
3222 fi
3223
3224         fi
3225         case "x$CXX" in
3226         (x|xg++)
3227                 { echo "$as_me:3227: WARNING: You don't have any C++ compiler, too bad" >&5
3228 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3229                 cf_with_cxx=no; CXX=""; GXX="";
3230                 ;;
3231         esac
3232 fi
3233
3234 GXX_VERSION=none
3235 if test "$GXX" = yes; then
3236         echo "$as_me:3236: checking version of ${CXX:-g++}" >&5
3237 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3238         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3239         if test -z "$GXX_VERSION"
3240         then
3241                 GXX_VERSION=unknown
3242                 GXX=no
3243         fi
3244         echo "$as_me:3244: result: $GXX_VERSION" >&5
3245 echo "${ECHO_T}$GXX_VERSION" >&6
3246 fi
3247
3248 case $GXX_VERSION in
3249 (1*|2.[0-6]*)
3250         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3251         # cf_cxx_library=no
3252         { echo "$as_me:3252: WARNING: templates do not work" >&5
3253 echo "$as_me: WARNING: templates do not work" >&2;}
3254         ;;
3255 esac
3256
3257 echo "$as_me:3257: checking if you want to build C++ binding and demo" >&5
3258 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3259
3260 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3261 if test "${with_cxx_binding+set}" = set; then
3262   withval="$with_cxx_binding"
3263   cf_with_cxx_binding=$withval
3264 else
3265   cf_with_cxx_binding=$cf_with_cxx
3266 fi;
3267 echo "$as_me:3267: result: $cf_with_cxx_binding" >&5
3268 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3269
3270 echo "$as_me:3270: checking if you want to build with Ada95" >&5
3271 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3272 echo "$as_me:3272: result: $cf_with_ada" >&5
3273 echo "${ECHO_T}$cf_with_ada" >&6
3274
3275 echo "$as_me:3275: checking if you want to install terminal database" >&5
3276 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3277
3278 # Check whether --enable-db-install or --disable-db-install was given.
3279 if test "${enable_db_install+set}" = set; then
3280   enableval="$enable_db_install"
3281   cf_with_db_install=$enableval
3282 else
3283   cf_with_db_install=yes
3284 fi;
3285 echo "$as_me:3285: result: $cf_with_db_install" >&5
3286 echo "${ECHO_T}$cf_with_db_install" >&6
3287
3288 echo "$as_me:3288: checking if you want to install manpages" >&5
3289 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3290
3291 # Check whether --with-manpages or --without-manpages was given.
3292 if test "${with_manpages+set}" = set; then
3293   withval="$with_manpages"
3294   cf_with_manpages=$withval
3295 else
3296   cf_with_manpages=yes
3297 fi;
3298 echo "$as_me:3298: result: $cf_with_manpages" >&5
3299 echo "${ECHO_T}$cf_with_manpages" >&6
3300
3301 echo "$as_me:3301: checking if you want to build programs such as tic" >&5
3302 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3303
3304 # Check whether --with-progs or --without-progs was given.
3305 if test "${with_progs+set}" = set; then
3306   withval="$with_progs"
3307   cf_with_progs=$withval
3308 else
3309   cf_with_progs=yes
3310 fi;
3311 echo "$as_me:3311: result: $cf_with_progs" >&5
3312 echo "${ECHO_T}$cf_with_progs" >&6
3313
3314 if test -f $srcdir/tack/tack.h; then
3315         if test "x$cross_compiling" = xyes ; then
3316                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3317
3318 echo "${as_me:-configure}:3318: testing ignoring tack because we are cross-compiling ..." 1>&5
3319
3320                 cf_with_tack=no
3321         else
3322                 echo "$as_me:3322: checking if you want to build the tack program" >&5
3323 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3324
3325 # Check whether --with-tack or --without-tack was given.
3326 if test "${with_tack+set}" = set; then
3327   withval="$with_tack"
3328   cf_with_tack=$withval
3329 else
3330   cf_with_tack=$cf_with_progs
3331 fi;
3332                 echo "$as_me:3332: result: $cf_with_tack" >&5
3333 echo "${ECHO_T}$cf_with_tack" >&6
3334         fi
3335 else
3336         cf_with_tack=no
3337 fi
3338
3339 echo "$as_me:3339: checking if you want to build test-programs" >&5
3340 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3341
3342 # Check whether --with-tests or --without-tests was given.
3343 if test "${with_tests+set}" = set; then
3344   withval="$with_tests"
3345   cf_with_tests=$withval
3346 else
3347   cf_with_tests=yes
3348 fi;
3349 echo "$as_me:3349: result: $cf_with_tests" >&5
3350 echo "${ECHO_T}$cf_with_tests" >&6
3351
3352 echo "$as_me:3352: checking if you wish to install curses.h" >&5
3353 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3354
3355 # Check whether --with-curses-h or --without-curses-h was given.
3356 if test "${with_curses_h+set}" = set; then
3357   withval="$with_curses_h"
3358   with_curses_h=$withval
3359 else
3360   with_curses_h=yes
3361 fi;
3362 echo "$as_me:3362: result: $with_curses_h" >&5
3363 echo "${ECHO_T}$with_curses_h" >&6
3364
3365 modules_to_build="ncurses"
3366 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3367 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3368 modules_to_build="$modules_to_build panel menu form"
3369
3370 test "$program_prefix" != NONE &&
3371   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3372 # Use a double $ so make ignores it.
3373 test "$program_suffix" != NONE &&
3374   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3375 # Double any \ or $.  echo might interpret backslashes.
3376 # By default was `s,x,x', remove it if useless.
3377 cat <<\_ACEOF >conftest.sed
3378 s/[\\$]/&&/g;s/;s,x,x,$//
3379 _ACEOF
3380 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3381 rm conftest.sed
3382
3383 for ac_prog in mawk gawk nawk awk
3384 do
3385   # Extract the first word of "$ac_prog", so it can be a program name with args.
3386 set dummy $ac_prog; ac_word=$2
3387 echo "$as_me:3387: checking for $ac_word" >&5
3388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3389 if test "${ac_cv_prog_AWK+set}" = set; then
3390   echo $ECHO_N "(cached) $ECHO_C" >&6
3391 else
3392   if test -n "$AWK"; then
3393   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3394 else
3395   ac_save_IFS=$IFS; IFS=$ac_path_separator
3396 ac_dummy="$PATH"
3397 for ac_dir in $ac_dummy; do
3398   IFS=$ac_save_IFS
3399   test -z "$ac_dir" && ac_dir=.
3400   $as_executable_p "$ac_dir/$ac_word" || continue
3401 ac_cv_prog_AWK="$ac_prog"
3402 echo "$as_me:3402: found $ac_dir/$ac_word" >&5
3403 break
3404 done
3405
3406 fi
3407 fi
3408 AWK=$ac_cv_prog_AWK
3409 if test -n "$AWK"; then
3410   echo "$as_me:3410: result: $AWK" >&5
3411 echo "${ECHO_T}$AWK" >&6
3412 else
3413   echo "$as_me:3413: result: no" >&5
3414 echo "${ECHO_T}no" >&6
3415 fi
3416
3417   test -n "$AWK" && break
3418 done
3419
3420 test -z "$AWK" && { { echo "$as_me:3420: error: No awk program found" >&5
3421 echo "$as_me: error: No awk program found" >&2;}
3422    { (exit 1); exit 1; }; }
3423
3424 echo "$as_me:3424: checking for egrep" >&5
3425 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3426 if test "${ac_cv_prog_egrep+set}" = set; then
3427   echo $ECHO_N "(cached) $ECHO_C" >&6
3428 else
3429   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3430                 then ac_cv_prog_egrep='grep -E'
3431                 else ac_cv_prog_egrep='egrep'
3432         fi
3433 fi
3434 echo "$as_me:3434: result: $ac_cv_prog_egrep" >&5
3435 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3436         EGREP=$ac_cv_prog_egrep
3437
3438         test -z "$EGREP" && { { echo "$as_me:3438: error: No egrep program found" >&5
3439 echo "$as_me: error: No egrep program found" >&2;}
3440    { (exit 1); exit 1; }; }
3441
3442 # Find a good install program.  We prefer a C program (faster),
3443 # so one script is as good as another.  But avoid the broken or
3444 # incompatible versions:
3445 # SysV /etc/install, /usr/sbin/install
3446 # SunOS /usr/etc/install
3447 # IRIX /sbin/install
3448 # AIX /bin/install
3449 # AmigaOS /C/install, which installs bootblocks on floppy discs
3450 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3451 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3452 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3453 # ./install, which can be erroneously created by make from ./install.sh.
3454 echo "$as_me:3454: checking for a BSD compatible install" >&5
3455 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3456 if test -z "$INSTALL"; then
3457 if test "${ac_cv_path_install+set}" = set; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460     ac_save_IFS=$IFS; IFS=$ac_path_separator
3461   for ac_dir in $PATH; do
3462     IFS=$ac_save_IFS
3463     # Account for people who put trailing slashes in PATH elements.
3464     case $ac_dir/ in
3465     / | ./ | .// | /cC/* \
3466     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3467     | /usr/ucb/* ) ;;
3468     *)
3469       # OSF1 and SCO ODT 3.0 have their own names for install.
3470       # Don't use installbsd from OSF since it installs stuff as root
3471       # by default.
3472       for ac_prog in ginstall scoinst install; do
3473         if $as_executable_p "$ac_dir/$ac_prog"; then
3474           if test $ac_prog = install &&
3475             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3476             # AIX install.  It has an incompatible calling convention.
3477             :
3478           elif test $ac_prog = install &&
3479             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3480             # program-specific install script used by HP pwplus--don't use.
3481             :
3482           else
3483             ac_cv_path_install="$ac_dir/$ac_prog -c"
3484             break 2
3485           fi
3486         fi
3487       done
3488       ;;
3489     esac
3490   done
3491
3492 fi
3493   if test "${ac_cv_path_install+set}" = set; then
3494     INSTALL=$ac_cv_path_install
3495   else
3496     # As a last resort, use the slow shell script.  We don't cache a
3497     # path for INSTALL within a source directory, because that will
3498     # break other packages using the cache if that directory is
3499     # removed, or if the path is relative.
3500     INSTALL=$ac_install_sh
3501   fi
3502 fi
3503 echo "$as_me:3503: result: $INSTALL" >&5
3504 echo "${ECHO_T}$INSTALL" >&6
3505
3506 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3507 # It thinks the first close brace ends the variable substitution.
3508 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3509
3510 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3511
3512 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3513
3514 case $INSTALL in
3515 (/*)
3516         ;;
3517 (*)
3518         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3519         test -z "$cf_dir" && cf_dir=.
3520         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3521         ;;
3522 esac
3523
3524 for ac_prog in lint cppcheck splint
3525 do
3526   # Extract the first word of "$ac_prog", so it can be a program name with args.
3527 set dummy $ac_prog; ac_word=$2
3528 echo "$as_me:3528: checking for $ac_word" >&5
3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3530 if test "${ac_cv_prog_LINT+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   if test -n "$LINT"; then
3534   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3535 else
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   $as_executable_p "$ac_dir/$ac_word" || continue
3542 ac_cv_prog_LINT="$ac_prog"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544 break
3545 done
3546
3547 fi
3548 fi
3549 LINT=$ac_cv_prog_LINT
3550 if test -n "$LINT"; then
3551   echo "$as_me:3551: result: $LINT" >&5
3552 echo "${ECHO_T}$LINT" >&6
3553 else
3554   echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3556 fi
3557
3558   test -n "$LINT" && break
3559 done
3560
3561 echo "$as_me:3561: checking whether ln -s works" >&5
3562 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3563 LN_S=$as_ln_s
3564 if test "$LN_S" = "ln -s"; then
3565   echo "$as_me:3565: result: yes" >&5
3566 echo "${ECHO_T}yes" >&6
3567 else
3568   echo "$as_me:3568: result: no, using $LN_S" >&5
3569 echo "${ECHO_T}no, using $LN_S" >&6
3570 fi
3571
3572 echo "$as_me:3572: checking if $LN_S -f options work" >&5
3573 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3574
3575 rm -f conf$$.src conf$$dst
3576 echo >conf$$.dst
3577 echo first >conf$$.src
3578 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3579         cf_prog_ln_sf=yes
3580 else
3581         cf_prog_ln_sf=no
3582 fi
3583 rm -f conf$$.dst conf$$src
3584 echo "$as_me:3584: result: $cf_prog_ln_sf" >&5
3585 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3586
3587 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3588
3589 echo "$as_me:3589: checking for long file names" >&5
3590 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3591 if test "${ac_cv_sys_long_file_names+set}" = set; then
3592   echo $ECHO_N "(cached) $ECHO_C" >&6
3593 else
3594   ac_cv_sys_long_file_names=yes
3595 # Test for long file names in all the places we know might matter:
3596 #      .                the current directory, where building will happen
3597 #      $prefix/lib      where we will be installing things
3598 #      $exec_prefix/lib likewise
3599 # eval it to expand exec_prefix.
3600 #      $TMPDIR          if set, where it might want to write temporary files
3601 # if $TMPDIR is not set:
3602 #      /tmp             where it might want to write temporary files
3603 #      /var/tmp         likewise
3604 #      /usr/tmp         likewise
3605 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3606   ac_tmpdirs=$TMPDIR
3607 else
3608   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3609 fi
3610 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3611   test -d $ac_dir || continue
3612   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3613   ac_xdir=$ac_dir/cf$$
3614   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3615   ac_tf1=$ac_xdir/conftest9012345
3616   ac_tf2=$ac_xdir/conftest9012346
3617   (echo 1 >$ac_tf1) 2>/dev/null
3618   (echo 2 >$ac_tf2) 2>/dev/null
3619   ac_val=`cat $ac_tf1 2>/dev/null`
3620   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3621     ac_cv_sys_long_file_names=no
3622     rm -rf $ac_xdir 2>/dev/null
3623     break
3624   fi
3625   rm -rf $ac_xdir 2>/dev/null
3626 done
3627 fi
3628 echo "$as_me:3628: result: $ac_cv_sys_long_file_names" >&5
3629 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3630 if test $ac_cv_sys_long_file_names = yes; then
3631
3632 cat >>confdefs.h <<\EOF
3633 #define HAVE_LONG_FILE_NAMES 1
3634 EOF
3635
3636 fi
3637
3638 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3639 # of package conflict.
3640 cf_config_suffix=
3641
3642 # Check whether --with-config-suffix or --without-config-suffix was given.
3643 if test "${with_config_suffix+set}" = set; then
3644   withval="$with_config_suffix"
3645   case "x$withval" in
3646         (xyes|xno)
3647                 { echo "$as_me:3647: WARNING: expected a value for config-suffix option" >&5
3648 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3649                 ;;
3650         (*)     cf_config_suffix="$withval"
3651                 ;;
3652         esac
3653 fi;
3654
3655 # If we find pkg-config, check if we should install the ".pc" files.
3656
3657 echo "$as_me:3657: checking if you want to use pkg-config" >&5
3658 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3659
3660 # Check whether --with-pkg-config or --without-pkg-config was given.
3661 if test "${with_pkg_config+set}" = set; then
3662   withval="$with_pkg_config"
3663   cf_pkg_config=$withval
3664 else
3665   cf_pkg_config=yes
3666 fi;
3667 echo "$as_me:3667: result: $cf_pkg_config" >&5
3668 echo "${ECHO_T}$cf_pkg_config" >&6
3669
3670 case $cf_pkg_config in
3671 (no)
3672         PKG_CONFIG=none
3673         ;;
3674 (yes)
3675
3676 if test -n "$ac_tool_prefix"; then
3677   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3678 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3679 echo "$as_me:3679: checking for $ac_word" >&5
3680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3681 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3682   echo $ECHO_N "(cached) $ECHO_C" >&6
3683 else
3684   case $PKG_CONFIG in
3685   [\\/]* | ?:[\\/]*)
3686   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3687   ;;
3688   *)
3689   ac_save_IFS=$IFS; IFS=$ac_path_separator
3690 ac_dummy="$PATH"
3691 for ac_dir in $ac_dummy; do
3692   IFS=$ac_save_IFS
3693   test -z "$ac_dir" && ac_dir=.
3694   if $as_executable_p "$ac_dir/$ac_word"; then
3695    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3696    echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3697    break
3698 fi
3699 done
3700
3701   ;;
3702 esac
3703 fi
3704 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3705
3706 if test -n "$PKG_CONFIG"; then
3707   echo "$as_me:3707: result: $PKG_CONFIG" >&5
3708 echo "${ECHO_T}$PKG_CONFIG" >&6
3709 else
3710   echo "$as_me:3710: result: no" >&5
3711 echo "${ECHO_T}no" >&6
3712 fi
3713
3714 fi
3715 if test -z "$ac_cv_path_PKG_CONFIG"; then
3716   ac_pt_PKG_CONFIG=$PKG_CONFIG
3717   # Extract the first word of "pkg-config", so it can be a program name with args.
3718 set dummy pkg-config; ac_word=$2
3719 echo "$as_me:3719: checking for $ac_word" >&5
3720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3721 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3722   echo $ECHO_N "(cached) $ECHO_C" >&6
3723 else
3724   case $ac_pt_PKG_CONFIG in
3725   [\\/]* | ?:[\\/]*)
3726   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3727   ;;
3728   *)
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   if $as_executable_p "$ac_dir/$ac_word"; then
3735    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3736    echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737    break
3738 fi
3739 done
3740
3741   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3742   ;;
3743 esac
3744 fi
3745 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3746
3747 if test -n "$ac_pt_PKG_CONFIG"; then
3748   echo "$as_me:3748: result: $ac_pt_PKG_CONFIG" >&5
3749 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3750 else
3751   echo "$as_me:3751: result: no" >&5
3752 echo "${ECHO_T}no" >&6
3753 fi
3754
3755   PKG_CONFIG=$ac_pt_PKG_CONFIG
3756 else
3757   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3758 fi
3759
3760         ;;
3761 (*)
3762         PKG_CONFIG=$withval
3763         ;;
3764 esac
3765
3766 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3767 if test "$PKG_CONFIG" != none ; then
3768
3769 if test "x$prefix" != xNONE; then
3770         cf_path_syntax="$prefix"
3771 else
3772         cf_path_syntax="$ac_default_prefix"
3773 fi
3774
3775 case ".$PKG_CONFIG" in
3776 (.\$\(*\)*|.\'*\'*)
3777         ;;
3778 (..|./*|.\\*)
3779         ;;
3780 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3781         ;;
3782 (.\${*prefix}*|.\${*dir}*)
3783         eval PKG_CONFIG="$PKG_CONFIG"
3784         case ".$PKG_CONFIG" in
3785         (.NONE/*)
3786                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3787                 ;;
3788         esac
3789         ;;
3790 (.no|.NONE/*)
3791         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3792         ;;
3793 (*)
3794         { { echo "$as_me:3794: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3795 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3796    { (exit 1); exit 1; }; }
3797         ;;
3798 esac
3799
3800 elif test "x$cf_pkg_config" != xno ; then
3801         { echo "$as_me:3801: WARNING: pkg-config is not installed" >&5
3802 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3803 fi
3804
3805 case $PKG_CONFIG in
3806 (no|none|yes)
3807         echo "$as_me:3807: checking for pkg-config library directory" >&5
3808 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3809         ;;
3810 (*)
3811         echo "$as_me:3811: checking for $PKG_CONFIG library directory" >&5
3812 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3813         ;;
3814 esac
3815
3816 PKG_CONFIG_LIBDIR=no
3817
3818 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3819 if test "${with_pkg_config_libdir+set}" = set; then
3820   withval="$with_pkg_config_libdir"
3821   PKG_CONFIG_LIBDIR=$withval
3822 else
3823   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3824 fi;
3825
3826 case x$PKG_CONFIG_LIBDIR in
3827 (x/*)
3828         ;;
3829 (xyes)
3830         # Look for the library directory using the same prefix as the executable
3831         if test "x$PKG_CONFIG" = xnone
3832         then
3833                 cf_path=$prefix
3834         else
3835                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3836         fi
3837
3838         # If you don't like using the default architecture, you have to specify the
3839         # intended library directory and corresponding compiler/linker options.
3840         #
3841         # This case allows for Debian's 2014-flavor of multiarch, along with the
3842         # most common variations before that point.  Some other variants spell the
3843         # directory differently, e.g., "pkg-config", and put it in unusual places.
3844         # pkg-config has always been poorly standardized, which is ironic...
3845         case x`(arch) 2>/dev/null` in
3846         (*64)
3847                 cf_search_path="\
3848                         $cf_path/lib/*64-linux-gnu \
3849                         $cf_path/share \
3850                         $cf_path/lib64 \
3851                         $cf_path/lib32 \
3852                         $cf_path/lib"
3853                 ;;
3854         (*)
3855                 cf_search_path="\
3856                         $cf_path/lib/*-linux-gnu \
3857                         $cf_path/share \
3858                         $cf_path/lib32 \
3859                         $cf_path/lib \
3860                         $cf_path/libdata"
3861                 ;;
3862         esac
3863
3864         test -n "$verbose" && echo "    list..." 1>&6
3865
3866 echo "${as_me:-configure}:3866: testing list... ..." 1>&5
3867
3868         for cf_config in $cf_search_path
3869         do
3870                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3871
3872 echo "${as_me:-configure}:3872: testing checking $cf_config/pkgconfig ..." 1>&5
3873
3874                 if test -d $cf_config/pkgconfig
3875                 then
3876                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3877                         echo "$as_me:3877: checking done" >&5
3878 echo $ECHO_N "checking done... $ECHO_C" >&6
3879                         break
3880                 fi
3881         done
3882         ;;
3883 (*)
3884         ;;
3885 esac
3886
3887 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3888         echo "$as_me:3888: result: $PKG_CONFIG_LIBDIR" >&5
3889 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3890 fi
3891
3892 if test "x$PKG_CONFIG" != xnone
3893 then
3894         echo "$as_me:3894: checking if we should install .pc files for $PKG_CONFIG" >&5
3895 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3896 else
3897         echo "$as_me:3897: checking if we should install .pc files" >&5
3898 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3899 fi
3900
3901 # Check whether --enable-pc-files or --disable-pc-files was given.
3902 if test "${enable_pc_files+set}" = set; then
3903   enableval="$enable_pc_files"
3904   enable_pc_files=$enableval
3905 else
3906   enable_pc_files=no
3907 fi;
3908 echo "$as_me:3908: result: $enable_pc_files" >&5
3909 echo "${ECHO_T}$enable_pc_files" >&6
3910
3911 if test "x$enable_pc_files" != xno
3912 then
3913         MAKE_PC_FILES=
3914         case "x$PKG_CONFIG_LIBDIR" in
3915         (xno|xyes)
3916                 { echo "$as_me:3916: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3917 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3918                 ;;
3919         (*)
3920
3921 if test "x$prefix" != xNONE; then
3922         cf_path_syntax="$prefix"
3923 else
3924         cf_path_syntax="$ac_default_prefix"
3925 fi
3926
3927 case ".$PKG_CONFIG_LIBDIR" in
3928 (.\$\(*\)*|.\'*\'*)
3929         ;;
3930 (..|./*|.\\*)
3931         ;;
3932 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3933         ;;
3934 (.\${*prefix}*|.\${*dir}*)
3935         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3936         case ".$PKG_CONFIG_LIBDIR" in
3937         (.NONE/*)
3938                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3939                 ;;
3940         esac
3941         ;;
3942 (.no|.NONE/*)
3943         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3944         ;;
3945 (*)
3946         { { echo "$as_me:3946: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3947 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3948    { (exit 1); exit 1; }; }
3949         ;;
3950 esac
3951
3952                 ;;
3953         esac
3954 else
3955         MAKE_PC_FILES="#"
3956 fi
3957
3958 if test -z "$MAKE_PC_FILES"
3959 then
3960         echo "$as_me:3960: checking for suffix to add to pc-files" >&5
3961 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3962
3963 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3964 if test "${with_pc_suffix+set}" = set; then
3965   withval="$with_pc_suffix"
3966   case "x$withval" in
3967         (xyes|xno)
3968                 PC_MODULE_SUFFIX=
3969                 ;;
3970         (*)     PC_MODULE_SUFFIX="$withval"
3971                 ;;
3972         esac
3973 fi;
3974         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3975         echo "$as_me:3975: result: $PC_MODULE_SUFFIX" >&5
3976 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3977         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3978
3979 fi
3980
3981 echo "$as_me:3981: checking if we should assume mixed-case filenames" >&5
3982 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3983
3984 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3985 if test "${enable_mixed_case+set}" = set; then
3986   enableval="$enable_mixed_case"
3987   enable_mixedcase=$enableval
3988 else
3989   enable_mixedcase=auto
3990 fi;
3991 echo "$as_me:3991: result: $enable_mixedcase" >&5
3992 echo "${ECHO_T}$enable_mixedcase" >&6
3993 if test "$enable_mixedcase" = "auto" ; then
3994
3995 echo "$as_me:3995: checking if filesystem supports mixed-case filenames" >&5
3996 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3997 if test "${cf_cv_mixedcase+set}" = set; then
3998   echo $ECHO_N "(cached) $ECHO_C" >&6
3999 else
4000
4001 if test "$cross_compiling" = yes ; then
4002         case $target_alias in
4003         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4004                 cf_cv_mixedcase=no
4005                 ;;
4006         (*)
4007                 cf_cv_mixedcase=yes
4008                 ;;
4009         esac
4010 else
4011         rm -f conftest CONFTEST
4012         echo test >conftest
4013         if test -f CONFTEST ; then
4014                 cf_cv_mixedcase=no
4015         else
4016                 cf_cv_mixedcase=yes
4017         fi
4018         rm -f conftest CONFTEST
4019 fi
4020
4021 fi
4022 echo "$as_me:4022: result: $cf_cv_mixedcase" >&5
4023 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4024 test "$cf_cv_mixedcase" = yes &&
4025 cat >>confdefs.h <<\EOF
4026 #define MIXEDCASE_FILENAMES 1
4027 EOF
4028
4029 else
4030         cf_cv_mixedcase=$enable_mixedcase
4031         if test "x$enable_mixedcase" = "xyes" ; then
4032
4033 cat >>confdefs.h <<\EOF
4034 #define MIXEDCASE_FILENAMES 1
4035 EOF
4036
4037         fi
4038 fi
4039
4040 # do this after mixed-case option (tags/TAGS is not as important as tic).
4041 echo "$as_me:4041: checking whether ${MAKE-make} sets \${MAKE}" >&5
4042 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4043 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4044 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4045   echo $ECHO_N "(cached) $ECHO_C" >&6
4046 else
4047   cat >conftest.make <<\EOF
4048 all:
4049         @echo 'ac_maketemp="${MAKE}"'
4050 EOF
4051 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4052 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4053 if test -n "$ac_maketemp"; then
4054   eval ac_cv_prog_make_${ac_make}_set=yes
4055 else
4056   eval ac_cv_prog_make_${ac_make}_set=no
4057 fi
4058 rm -f conftest.make
4059 fi
4060 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4061   echo "$as_me:4061: result: yes" >&5
4062 echo "${ECHO_T}yes" >&6
4063   SET_MAKE=
4064 else
4065   echo "$as_me:4065: result: no" >&5
4066 echo "${ECHO_T}no" >&6
4067   SET_MAKE="MAKE=${MAKE-make}"
4068 fi
4069
4070 for ac_prog in exctags ctags
4071 do
4072   # Extract the first word of "$ac_prog", so it can be a program name with args.
4073 set dummy $ac_prog; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_prog_CTAGS+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$CTAGS"; then
4080   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4081 else
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   $as_executable_p "$ac_dir/$ac_word" || continue
4088 ac_cv_prog_CTAGS="$ac_prog"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 CTAGS=$ac_cv_prog_CTAGS
4096 if test -n "$CTAGS"; then
4097   echo "$as_me:4097: result: $CTAGS" >&5
4098 echo "${ECHO_T}$CTAGS" >&6
4099 else
4100   echo "$as_me:4100: result: no" >&5
4101 echo "${ECHO_T}no" >&6
4102 fi
4103
4104   test -n "$CTAGS" && break
4105 done
4106
4107 for ac_prog in exetags etags
4108 do
4109   # Extract the first word of "$ac_prog", so it can be a program name with args.
4110 set dummy $ac_prog; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_ETAGS+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$ETAGS"; then
4117   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_ETAGS="$ac_prog"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 ETAGS=$ac_cv_prog_ETAGS
4133 if test -n "$ETAGS"; then
4134   echo "$as_me:4134: result: $ETAGS" >&5
4135 echo "${ECHO_T}$ETAGS" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   test -n "$ETAGS" && break
4142 done
4143
4144 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4145 set dummy ${CTAGS:-ctags}; ac_word=$2
4146 echo "$as_me:4146: checking for $ac_word" >&5
4147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4148 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151   if test -n "$MAKE_LOWER_TAGS"; then
4152   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4153 else
4154   ac_save_IFS=$IFS; IFS=$ac_path_separator
4155 ac_dummy="$PATH"
4156 for ac_dir in $ac_dummy; do
4157   IFS=$ac_save_IFS
4158   test -z "$ac_dir" && ac_dir=.
4159   $as_executable_p "$ac_dir/$ac_word" || continue
4160 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4161 echo "$as_me:4161: found $ac_dir/$ac_word" >&5
4162 break
4163 done
4164
4165   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4166 fi
4167 fi
4168 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4169 if test -n "$MAKE_LOWER_TAGS"; then
4170   echo "$as_me:4170: result: $MAKE_LOWER_TAGS" >&5
4171 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4172 else
4173   echo "$as_me:4173: result: no" >&5
4174 echo "${ECHO_T}no" >&6
4175 fi
4176
4177 if test "$cf_cv_mixedcase" = yes ; then
4178         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4179 set dummy ${ETAGS:-etags}; ac_word=$2
4180 echo "$as_me:4180: checking for $ac_word" >&5
4181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4182 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4183   echo $ECHO_N "(cached) $ECHO_C" >&6
4184 else
4185   if test -n "$MAKE_UPPER_TAGS"; then
4186   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4187 else
4188   ac_save_IFS=$IFS; IFS=$ac_path_separator
4189 ac_dummy="$PATH"
4190 for ac_dir in $ac_dummy; do
4191   IFS=$ac_save_IFS
4192   test -z "$ac_dir" && ac_dir=.
4193   $as_executable_p "$ac_dir/$ac_word" || continue
4194 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4195 echo "$as_me:4195: found $ac_dir/$ac_word" >&5
4196 break
4197 done
4198
4199   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4200 fi
4201 fi
4202 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4203 if test -n "$MAKE_UPPER_TAGS"; then
4204   echo "$as_me:4204: result: $MAKE_UPPER_TAGS" >&5
4205 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4206 else
4207   echo "$as_me:4207: result: no" >&5
4208 echo "${ECHO_T}no" >&6
4209 fi
4210
4211 else
4212         MAKE_UPPER_TAGS=no
4213 fi
4214
4215 if test "$MAKE_UPPER_TAGS" = yes ; then
4216         MAKE_UPPER_TAGS=
4217 else
4218         MAKE_UPPER_TAGS="#"
4219 fi
4220
4221 if test "$MAKE_LOWER_TAGS" = yes ; then
4222         MAKE_LOWER_TAGS=
4223 else
4224         MAKE_LOWER_TAGS="#"
4225 fi
4226
4227 echo "$as_me:4227: checking for makeflags variable" >&5
4228 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4229 if test "${cf_cv_makeflags+set}" = set; then
4230   echo $ECHO_N "(cached) $ECHO_C" >&6
4231 else
4232
4233         cf_cv_makeflags=''
4234         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4235         do
4236                 cat >cf_makeflags.tmp <<CF_EOF
4237 SHELL = $SHELL
4238 all :
4239         @ echo '.$cf_option'
4240 CF_EOF
4241                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4242                 case "$cf_result" in
4243                 (.*k|.*kw)
4244                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4245                         case "$cf_result" in
4246                         (.*CC=*)        cf_cv_makeflags=
4247                                 ;;
4248                         (*)     cf_cv_makeflags=$cf_option
4249                                 ;;
4250                         esac
4251                         break
4252                         ;;
4253                 (.-)
4254                         ;;
4255                 (*)
4256
4257 echo "${as_me:-configure}:4257: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4258
4259                         ;;
4260                 esac
4261         done
4262         rm -f cf_makeflags.tmp
4263
4264 fi
4265 echo "$as_me:4265: result: $cf_cv_makeflags" >&5
4266 echo "${ECHO_T}$cf_cv_makeflags" >&6
4267
4268 if test -n "$ac_tool_prefix"; then
4269   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4270 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4271 echo "$as_me:4271: checking for $ac_word" >&5
4272 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4273 if test "${ac_cv_prog_RANLIB+set}" = set; then
4274   echo $ECHO_N "(cached) $ECHO_C" >&6
4275 else
4276   if test -n "$RANLIB"; then
4277   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4278 else
4279   ac_save_IFS=$IFS; IFS=$ac_path_separator
4280 ac_dummy="$PATH"
4281 for ac_dir in $ac_dummy; do
4282   IFS=$ac_save_IFS
4283   test -z "$ac_dir" && ac_dir=.
4284   $as_executable_p "$ac_dir/$ac_word" || continue
4285 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4286 echo "$as_me:4286: found $ac_dir/$ac_word" >&5
4287 break
4288 done
4289
4290 fi
4291 fi
4292 RANLIB=$ac_cv_prog_RANLIB
4293 if test -n "$RANLIB"; then
4294   echo "$as_me:4294: result: $RANLIB" >&5
4295 echo "${ECHO_T}$RANLIB" >&6
4296 else
4297   echo "$as_me:4297: result: no" >&5
4298 echo "${ECHO_T}no" >&6
4299 fi
4300
4301 fi
4302 if test -z "$ac_cv_prog_RANLIB"; then
4303   ac_ct_RANLIB=$RANLIB
4304   # Extract the first word of "ranlib", so it can be a program name with args.
4305 set dummy ranlib; ac_word=$2
4306 echo "$as_me:4306: checking for $ac_word" >&5
4307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4308 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4309   echo $ECHO_N "(cached) $ECHO_C" >&6
4310 else
4311   if test -n "$ac_ct_RANLIB"; then
4312   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4313 else
4314   ac_save_IFS=$IFS; IFS=$ac_path_separator
4315 ac_dummy="$PATH"
4316 for ac_dir in $ac_dummy; do
4317   IFS=$ac_save_IFS
4318   test -z "$ac_dir" && ac_dir=.
4319   $as_executable_p "$ac_dir/$ac_word" || continue
4320 ac_cv_prog_ac_ct_RANLIB="ranlib"
4321 echo "$as_me:4321: found $ac_dir/$ac_word" >&5
4322 break
4323 done
4324
4325   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4326 fi
4327 fi
4328 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4329 if test -n "$ac_ct_RANLIB"; then
4330   echo "$as_me:4330: result: $ac_ct_RANLIB" >&5
4331 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4332 else
4333   echo "$as_me:4333: result: no" >&5
4334 echo "${ECHO_T}no" >&6
4335 fi
4336
4337   RANLIB=$ac_ct_RANLIB
4338 else
4339   RANLIB="$ac_cv_prog_RANLIB"
4340 fi
4341
4342 if test -n "$ac_tool_prefix"; then
4343   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4344 set dummy ${ac_tool_prefix}ld; ac_word=$2
4345 echo "$as_me:4345: checking for $ac_word" >&5
4346 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4347 if test "${ac_cv_prog_LD+set}" = set; then
4348   echo $ECHO_N "(cached) $ECHO_C" >&6
4349 else
4350   if test -n "$LD"; then
4351   ac_cv_prog_LD="$LD" # Let the user override the test.
4352 else
4353   ac_save_IFS=$IFS; IFS=$ac_path_separator
4354 ac_dummy="$PATH"
4355 for ac_dir in $ac_dummy; do
4356   IFS=$ac_save_IFS
4357   test -z "$ac_dir" && ac_dir=.
4358   $as_executable_p "$ac_dir/$ac_word" || continue
4359 ac_cv_prog_LD="${ac_tool_prefix}ld"
4360 echo "$as_me:4360: found $ac_dir/$ac_word" >&5
4361 break
4362 done
4363
4364 fi
4365 fi
4366 LD=$ac_cv_prog_LD
4367 if test -n "$LD"; then
4368   echo "$as_me:4368: result: $LD" >&5
4369 echo "${ECHO_T}$LD" >&6
4370 else
4371   echo "$as_me:4371: result: no" >&5
4372 echo "${ECHO_T}no" >&6
4373 fi
4374
4375 fi
4376 if test -z "$ac_cv_prog_LD"; then
4377   ac_ct_LD=$LD
4378   # Extract the first word of "ld", so it can be a program name with args.
4379 set dummy ld; ac_word=$2
4380 echo "$as_me:4380: checking for $ac_word" >&5
4381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4382 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4383   echo $ECHO_N "(cached) $ECHO_C" >&6
4384 else
4385   if test -n "$ac_ct_LD"; then
4386   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4387 else
4388   ac_save_IFS=$IFS; IFS=$ac_path_separator
4389 ac_dummy="$PATH"
4390 for ac_dir in $ac_dummy; do
4391   IFS=$ac_save_IFS
4392   test -z "$ac_dir" && ac_dir=.
4393   $as_executable_p "$ac_dir/$ac_word" || continue
4394 ac_cv_prog_ac_ct_LD="ld"
4395 echo "$as_me:4395: found $ac_dir/$ac_word" >&5
4396 break
4397 done
4398
4399   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4400 fi
4401 fi
4402 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4403 if test -n "$ac_ct_LD"; then
4404   echo "$as_me:4404: result: $ac_ct_LD" >&5
4405 echo "${ECHO_T}$ac_ct_LD" >&6
4406 else
4407   echo "$as_me:4407: result: no" >&5
4408 echo "${ECHO_T}no" >&6
4409 fi
4410
4411   LD=$ac_ct_LD
4412 else
4413   LD="$ac_cv_prog_LD"
4414 fi
4415
4416 if test -n "$ac_tool_prefix"; then
4417   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4418 set dummy ${ac_tool_prefix}ar; ac_word=$2
4419 echo "$as_me:4419: checking for $ac_word" >&5
4420 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4421 if test "${ac_cv_prog_AR+set}" = set; then
4422   echo $ECHO_N "(cached) $ECHO_C" >&6
4423 else
4424   if test -n "$AR"; then
4425   ac_cv_prog_AR="$AR" # Let the user override the test.
4426 else
4427   ac_save_IFS=$IFS; IFS=$ac_path_separator
4428 ac_dummy="$PATH"
4429 for ac_dir in $ac_dummy; do
4430   IFS=$ac_save_IFS
4431   test -z "$ac_dir" && ac_dir=.
4432   $as_executable_p "$ac_dir/$ac_word" || continue
4433 ac_cv_prog_AR="${ac_tool_prefix}ar"
4434 echo "$as_me:4434: found $ac_dir/$ac_word" >&5
4435 break
4436 done
4437
4438 fi
4439 fi
4440 AR=$ac_cv_prog_AR
4441 if test -n "$AR"; then
4442   echo "$as_me:4442: result: $AR" >&5
4443 echo "${ECHO_T}$AR" >&6
4444 else
4445   echo "$as_me:4445: result: no" >&5
4446 echo "${ECHO_T}no" >&6
4447 fi
4448
4449 fi
4450 if test -z "$ac_cv_prog_AR"; then
4451   ac_ct_AR=$AR
4452   # Extract the first word of "ar", so it can be a program name with args.
4453 set dummy ar; ac_word=$2
4454 echo "$as_me:4454: checking for $ac_word" >&5
4455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4456 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   if test -n "$ac_ct_AR"; then
4460   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4461 else
4462   ac_save_IFS=$IFS; IFS=$ac_path_separator
4463 ac_dummy="$PATH"
4464 for ac_dir in $ac_dummy; do
4465   IFS=$ac_save_IFS
4466   test -z "$ac_dir" && ac_dir=.
4467   $as_executable_p "$ac_dir/$ac_word" || continue
4468 ac_cv_prog_ac_ct_AR="ar"
4469 echo "$as_me:4469: found $ac_dir/$ac_word" >&5
4470 break
4471 done
4472
4473   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4474 fi
4475 fi
4476 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4477 if test -n "$ac_ct_AR"; then
4478   echo "$as_me:4478: result: $ac_ct_AR" >&5
4479 echo "${ECHO_T}$ac_ct_AR" >&6
4480 else
4481   echo "$as_me:4481: result: no" >&5
4482 echo "${ECHO_T}no" >&6
4483 fi
4484
4485   AR=$ac_ct_AR
4486 else
4487   AR="$ac_cv_prog_AR"
4488 fi
4489
4490 if test -n "$ac_tool_prefix"; then
4491   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4492 set dummy ${ac_tool_prefix}nm; ac_word=$2
4493 echo "$as_me:4493: checking for $ac_word" >&5
4494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4495 if test "${ac_cv_prog_NM+set}" = set; then
4496   echo $ECHO_N "(cached) $ECHO_C" >&6
4497 else
4498   if test -n "$NM"; then
4499   ac_cv_prog_NM="$NM" # Let the user override the test.
4500 else
4501   ac_save_IFS=$IFS; IFS=$ac_path_separator
4502 ac_dummy="$PATH"
4503 for ac_dir in $ac_dummy; do
4504   IFS=$ac_save_IFS
4505   test -z "$ac_dir" && ac_dir=.
4506   $as_executable_p "$ac_dir/$ac_word" || continue
4507 ac_cv_prog_NM="${ac_tool_prefix}nm"
4508 echo "$as_me:4508: found $ac_dir/$ac_word" >&5
4509 break
4510 done
4511
4512 fi
4513 fi
4514 NM=$ac_cv_prog_NM
4515 if test -n "$NM"; then
4516   echo "$as_me:4516: result: $NM" >&5
4517 echo "${ECHO_T}$NM" >&6
4518 else
4519   echo "$as_me:4519: result: no" >&5
4520 echo "${ECHO_T}no" >&6
4521 fi
4522
4523 fi
4524 if test -z "$ac_cv_prog_NM"; then
4525   ac_ct_NM=$NM
4526   # Extract the first word of "nm", so it can be a program name with args.
4527 set dummy nm; ac_word=$2
4528 echo "$as_me:4528: checking for $ac_word" >&5
4529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4530 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4531   echo $ECHO_N "(cached) $ECHO_C" >&6
4532 else
4533   if test -n "$ac_ct_NM"; then
4534   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4535 else
4536   ac_save_IFS=$IFS; IFS=$ac_path_separator
4537 ac_dummy="$PATH"
4538 for ac_dir in $ac_dummy; do
4539   IFS=$ac_save_IFS
4540   test -z "$ac_dir" && ac_dir=.
4541   $as_executable_p "$ac_dir/$ac_word" || continue
4542 ac_cv_prog_ac_ct_NM="nm"
4543 echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544 break
4545 done
4546
4547   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4548 fi
4549 fi
4550 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4551 if test -n "$ac_ct_NM"; then
4552   echo "$as_me:4552: result: $ac_ct_NM" >&5
4553 echo "${ECHO_T}$ac_ct_NM" >&6
4554 else
4555   echo "$as_me:4555: result: no" >&5
4556 echo "${ECHO_T}no" >&6
4557 fi
4558
4559   NM=$ac_ct_NM
4560 else
4561   NM="$ac_cv_prog_NM"
4562 fi
4563
4564 if test -n "$ac_tool_prefix"; then
4565   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4566 set dummy ${ac_tool_prefix}ar; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_AR+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$AR"; then
4573   ac_cv_prog_AR="$AR" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_AR="${ac_tool_prefix}ar"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586 fi
4587 fi
4588 AR=$ac_cv_prog_AR
4589 if test -n "$AR"; then
4590   echo "$as_me:4590: result: $AR" >&5
4591 echo "${ECHO_T}$AR" >&6
4592 else
4593   echo "$as_me:4593: result: no" >&5
4594 echo "${ECHO_T}no" >&6
4595 fi
4596
4597 fi
4598 if test -z "$ac_cv_prog_AR"; then
4599   ac_ct_AR=$AR
4600   # Extract the first word of "ar", so it can be a program name with args.
4601 set dummy ar; ac_word=$2
4602 echo "$as_me:4602: checking for $ac_word" >&5
4603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4604 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4605   echo $ECHO_N "(cached) $ECHO_C" >&6
4606 else
4607   if test -n "$ac_ct_AR"; then
4608   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4609 else
4610   ac_save_IFS=$IFS; IFS=$ac_path_separator
4611 ac_dummy="$PATH"
4612 for ac_dir in $ac_dummy; do
4613   IFS=$ac_save_IFS
4614   test -z "$ac_dir" && ac_dir=.
4615   $as_executable_p "$ac_dir/$ac_word" || continue
4616 ac_cv_prog_ac_ct_AR="ar"
4617 echo "$as_me:4617: found $ac_dir/$ac_word" >&5
4618 break
4619 done
4620
4621   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4622 fi
4623 fi
4624 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4625 if test -n "$ac_ct_AR"; then
4626   echo "$as_me:4626: result: $ac_ct_AR" >&5
4627 echo "${ECHO_T}$ac_ct_AR" >&6
4628 else
4629   echo "$as_me:4629: result: no" >&5
4630 echo "${ECHO_T}no" >&6
4631 fi
4632
4633   AR=$ac_ct_AR
4634 else
4635   AR="$ac_cv_prog_AR"
4636 fi
4637
4638 echo "$as_me:4638: checking for options to update archives" >&5
4639 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4640 if test "${cf_cv_ar_flags+set}" = set; then
4641   echo $ECHO_N "(cached) $ECHO_C" >&6
4642 else
4643
4644         cf_cv_ar_flags=unknown
4645         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4646         do
4647
4648                 # check if $ARFLAGS already contains this choice
4649                 if test "x$ARFLAGS" != "x" ; then
4650                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4651                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4652                                 cf_cv_ar_flags=
4653                                 break
4654                         fi
4655                 fi
4656
4657                 rm -f conftest.$ac_cv_objext
4658                 rm -f conftest.a
4659
4660                 cat >conftest.$ac_ext <<EOF
4661 #line 4661 "configure"
4662 int     testdata[3] = { 123, 456, 789 };
4663 EOF
4664                 if { (eval echo "$as_me:4664: \"$ac_compile\"") >&5
4665   (eval $ac_compile) 2>&5
4666   ac_status=$?
4667   echo "$as_me:4667: \$? = $ac_status" >&5
4668   (exit $ac_status); } ; then
4669                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4670                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4671                         if test -f conftest.a ; then
4672                                 cf_cv_ar_flags=$cf_ar_flags
4673                                 break
4674                         fi
4675                 else
4676                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4677
4678 echo "${as_me:-configure}:4678: testing cannot compile test-program ..." 1>&5
4679
4680                         break
4681                 fi
4682         done
4683         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4684
4685 fi
4686 echo "$as_me:4686: result: $cf_cv_ar_flags" >&5
4687 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4688
4689 if test -n "$ARFLAGS" ; then
4690         if test -n "$cf_cv_ar_flags" ; then
4691                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4692         fi
4693 else
4694         ARFLAGS=$cf_cv_ar_flags
4695 fi
4696
4697 echo "$as_me:4697: checking if you have specified an install-prefix" >&5
4698 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4699
4700 # Check whether --with-install-prefix or --without-install-prefix was given.
4701 if test "${with_install_prefix+set}" = set; then
4702   withval="$with_install_prefix"
4703   case "x$withval" in
4704         (xyes|xno)
4705                 ;;
4706         (*)     DESTDIR="$withval"
4707                 ;;
4708         esac
4709 fi;
4710 echo "$as_me:4710: result: $DESTDIR" >&5
4711 echo "${ECHO_T}$DESTDIR" >&6
4712
4713 ###############################################################################
4714
4715 # If we're cross-compiling, allow the user to override the tools and their
4716 # options.  The configure script is oriented toward identifying the host
4717 # compiler, etc., but we need a build compiler to generate parts of the source.
4718
4719 if test "$cross_compiling" = yes ; then
4720
4721         # defaults that we might want to override
4722         : ${BUILD_CFLAGS:=''}
4723         : ${BUILD_CPPFLAGS:=''}
4724         : ${BUILD_LDFLAGS:=''}
4725         : ${BUILD_LIBS:=''}
4726         : ${BUILD_EXEEXT:='$x'}
4727         : ${BUILD_OBJEXT:='o'}
4728
4729 # Check whether --with-build-cc or --without-build-cc was given.
4730 if test "${with_build_cc+set}" = set; then
4731   withval="$with_build_cc"
4732   BUILD_CC="$withval"
4733 else
4734   for ac_prog in gcc clang c99 c89 cc cl
4735 do
4736   # Extract the first word of "$ac_prog", so it can be a program name with args.
4737 set dummy $ac_prog; ac_word=$2
4738 echo "$as_me:4738: checking for $ac_word" >&5
4739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4740 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4741   echo $ECHO_N "(cached) $ECHO_C" >&6
4742 else
4743   if test -n "$BUILD_CC"; then
4744   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4745 else
4746   ac_save_IFS=$IFS; IFS=$ac_path_separator
4747 ac_dummy="$PATH"
4748 for ac_dir in $ac_dummy; do
4749   IFS=$ac_save_IFS
4750   test -z "$ac_dir" && ac_dir=.
4751   $as_executable_p "$ac_dir/$ac_word" || continue
4752 ac_cv_prog_BUILD_CC="$ac_prog"
4753 echo "$as_me:4753: found $ac_dir/$ac_word" >&5
4754 break
4755 done
4756
4757 fi
4758 fi
4759 BUILD_CC=$ac_cv_prog_BUILD_CC
4760 if test -n "$BUILD_CC"; then
4761   echo "$as_me:4761: result: $BUILD_CC" >&5
4762 echo "${ECHO_T}$BUILD_CC" >&6
4763 else
4764   echo "$as_me:4764: result: no" >&5
4765 echo "${ECHO_T}no" >&6
4766 fi
4767
4768   test -n "$BUILD_CC" && break
4769 done
4770 test -n "$BUILD_CC" || BUILD_CC="none"
4771
4772 fi;
4773         echo "$as_me:4773: checking for native build C compiler" >&5
4774 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4775         echo "$as_me:4775: result: $BUILD_CC" >&5
4776 echo "${ECHO_T}$BUILD_CC" >&6
4777
4778         echo "$as_me:4778: checking for native build C preprocessor" >&5
4779 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4780
4781 # Check whether --with-build-cpp or --without-build-cpp was given.
4782 if test "${with_build_cpp+set}" = set; then
4783   withval="$with_build_cpp"
4784   BUILD_CPP="$withval"
4785 else
4786   BUILD_CPP='${BUILD_CC} -E'
4787 fi;
4788         echo "$as_me:4788: result: $BUILD_CPP" >&5
4789 echo "${ECHO_T}$BUILD_CPP" >&6
4790
4791         echo "$as_me:4791: checking for native build C flags" >&5
4792 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4793
4794 # Check whether --with-build-cflags or --without-build-cflags was given.
4795 if test "${with_build_cflags+set}" = set; then
4796   withval="$with_build_cflags"
4797   BUILD_CFLAGS="$withval"
4798 fi;
4799         echo "$as_me:4799: result: $BUILD_CFLAGS" >&5
4800 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4801
4802         echo "$as_me:4802: checking for native build C preprocessor-flags" >&5
4803 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4804
4805 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4806 if test "${with_build_cppflags+set}" = set; then
4807   withval="$with_build_cppflags"
4808   BUILD_CPPFLAGS="$withval"
4809 fi;
4810         echo "$as_me:4810: result: $BUILD_CPPFLAGS" >&5
4811 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4812
4813         echo "$as_me:4813: checking for native build linker-flags" >&5
4814 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4815
4816 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4817 if test "${with_build_ldflags+set}" = set; then
4818   withval="$with_build_ldflags"
4819   BUILD_LDFLAGS="$withval"
4820 fi;
4821         echo "$as_me:4821: result: $BUILD_LDFLAGS" >&5
4822 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4823
4824         echo "$as_me:4824: checking for native build linker-libraries" >&5
4825 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4826
4827 # Check whether --with-build-libs or --without-build-libs was given.
4828 if test "${with_build_libs+set}" = set; then
4829   withval="$with_build_libs"
4830   BUILD_LIBS="$withval"
4831 fi;
4832         echo "$as_me:4832: result: $BUILD_LIBS" >&5
4833 echo "${ECHO_T}$BUILD_LIBS" >&6
4834
4835         # this assumes we're on Unix.
4836         BUILD_EXEEXT=
4837         BUILD_OBJEXT=o
4838
4839         : ${BUILD_CC:='${CC}'}
4840
4841         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4842                 { { echo "$as_me:4842: error: Cross-build requires two compilers.
4843 Use --with-build-cc to specify the native compiler." >&5
4844 echo "$as_me: error: Cross-build requires two compilers.
4845 Use --with-build-cc to specify the native compiler." >&2;}
4846    { (exit 1); exit 1; }; }
4847         fi
4848
4849 else
4850         : ${BUILD_CC:='${CC}'}
4851         : ${BUILD_CPP:='${CPP}'}
4852         : ${BUILD_CFLAGS:='${CFLAGS}'}
4853         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4854         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4855         : ${BUILD_LIBS:='${LIBS}'}
4856         : ${BUILD_EXEEXT:='$x'}
4857         : ${BUILD_OBJEXT:='o'}
4858 fi
4859
4860 ###############################################################################
4861
4862 ### Options to allow the user to specify the set of libraries which are used.
4863 ### Use "--without-normal --with-shared" to allow the default model to be
4864 ### shared, for example.
4865 cf_list_models=""
4866
4867 echo "$as_me:4867: checking if libtool -version-number should be used" >&5
4868 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4869
4870 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4871 if test "${enable_libtool_version+set}" = set; then
4872   enableval="$enable_libtool_version"
4873   test "$enableval" != no && enableval=yes
4874         if test "$enableval" != "yes" ; then
4875     cf_libtool_version=no
4876         else
4877                 cf_libtool_version=yes
4878         fi
4879 else
4880   enableval=yes
4881         cf_libtool_version=yes
4882
4883 fi;
4884 echo "$as_me:4884: result: $cf_libtool_version" >&5
4885 echo "${ECHO_T}$cf_libtool_version" >&6
4886
4887 if test "$cf_libtool_version" = yes ; then
4888         LIBTOOL_VERSION="-version-number"
4889 else
4890         LIBTOOL_VERSION="-version-info"
4891         case "x$VERSION" in
4892         (x)
4893                 { echo "$as_me:4893: WARNING: VERSION was not set" >&5
4894 echo "$as_me: WARNING: VERSION was not set" >&2;}
4895                 ;;
4896         (x*.*.*)
4897                 ABI_VERSION="$VERSION"
4898                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4899
4900 echo "${as_me:-configure}:4900: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4901
4902                 ;;
4903         (x*:*:*)
4904                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4905                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4906
4907 echo "${as_me:-configure}:4907: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4908
4909                 ;;
4910         (*)
4911                 { echo "$as_me:4911: WARNING: unexpected VERSION value: $VERSION" >&5
4912 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4913                 ;;
4914         esac
4915 fi
4916
4917 LIBTOOL=
4918
4919 # common library maintenance symbols that are convenient for libtool scripts:
4920 LIB_CREATE='${AR} -cr'
4921 LIB_OBJECT='${OBJECTS}'
4922 LIB_SUFFIX=.a
4923 LIB_PREP="$RANLIB"
4924
4925 # symbols used to prop libtool up to enable it to determine what it should be
4926 # doing:
4927 LIB_CLEAN=
4928 LIB_COMPILE=
4929 LIB_LINK='${CC}'
4930 LIB_INSTALL=
4931 LIB_UNINSTALL=
4932
4933 echo "$as_me:4933: checking if you want to build libraries with libtool" >&5
4934 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4935
4936 # Check whether --with-libtool or --without-libtool was given.
4937 if test "${with_libtool+set}" = set; then
4938   withval="$with_libtool"
4939   with_libtool=$withval
4940 else
4941   with_libtool=no
4942 fi;
4943 echo "$as_me:4943: result: $with_libtool" >&5
4944 echo "${ECHO_T}$with_libtool" >&6
4945 if test "$with_libtool" != "no"; then
4946
4947         if test "$with_libtool" != "yes" ; then
4948
4949 if test "x$prefix" != xNONE; then
4950         cf_path_syntax="$prefix"
4951 else
4952         cf_path_syntax="$ac_default_prefix"
4953 fi
4954
4955 case ".$with_libtool" in
4956 (.\$\(*\)*|.\'*\'*)
4957         ;;
4958 (..|./*|.\\*)
4959         ;;
4960 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4961         ;;
4962 (.\${*prefix}*|.\${*dir}*)
4963         eval with_libtool="$with_libtool"
4964         case ".$with_libtool" in
4965         (.NONE/*)
4966                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4967                 ;;
4968         esac
4969         ;;
4970 (.no|.NONE/*)
4971         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4972         ;;
4973 (*)
4974         { { echo "$as_me:4974: error: expected a pathname, not \"$with_libtool\"" >&5
4975 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4976    { (exit 1); exit 1; }; }
4977         ;;
4978 esac
4979
4980                 LIBTOOL=$with_libtool
4981         else
4982                 if test -n "$ac_tool_prefix"; then
4983   for ac_prog in libtool glibtool
4984   do
4985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4987 echo "$as_me:4987: checking for $ac_word" >&5
4988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4989 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4990   echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992   if test -n "$LIBTOOL"; then
4993   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4994 else
4995   ac_save_IFS=$IFS; IFS=$ac_path_separator
4996 ac_dummy="$PATH"
4997 for ac_dir in $ac_dummy; do
4998   IFS=$ac_save_IFS
4999   test -z "$ac_dir" && ac_dir=.
5000   $as_executable_p "$ac_dir/$ac_word" || continue
5001 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5002 echo "$as_me:5002: found $ac_dir/$ac_word" >&5
5003 break
5004 done
5005
5006 fi
5007 fi
5008 LIBTOOL=$ac_cv_prog_LIBTOOL
5009 if test -n "$LIBTOOL"; then
5010   echo "$as_me:5010: result: $LIBTOOL" >&5
5011 echo "${ECHO_T}$LIBTOOL" >&6
5012 else
5013   echo "$as_me:5013: result: no" >&5
5014 echo "${ECHO_T}no" >&6
5015 fi
5016
5017     test -n "$LIBTOOL" && break
5018   done
5019 fi
5020 if test -z "$LIBTOOL"; then
5021   ac_ct_LIBTOOL=$LIBTOOL
5022   for ac_prog in libtool glibtool
5023 do
5024   # Extract the first word of "$ac_prog", so it can be a program name with args.
5025 set dummy $ac_prog; ac_word=$2
5026 echo "$as_me:5026: checking for $ac_word" >&5
5027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5028 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5029   echo $ECHO_N "(cached) $ECHO_C" >&6
5030 else
5031   if test -n "$ac_ct_LIBTOOL"; then
5032   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5033 else
5034   ac_save_IFS=$IFS; IFS=$ac_path_separator
5035 ac_dummy="$PATH"
5036 for ac_dir in $ac_dummy; do
5037   IFS=$ac_save_IFS
5038   test -z "$ac_dir" && ac_dir=.
5039   $as_executable_p "$ac_dir/$ac_word" || continue
5040 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5041 echo "$as_me:5041: found $ac_dir/$ac_word" >&5
5042 break
5043 done
5044
5045 fi
5046 fi
5047 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5048 if test -n "$ac_ct_LIBTOOL"; then
5049   echo "$as_me:5049: result: $ac_ct_LIBTOOL" >&5
5050 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5051 else
5052   echo "$as_me:5052: result: no" >&5
5053 echo "${ECHO_T}no" >&6
5054 fi
5055
5056   test -n "$ac_ct_LIBTOOL" && break
5057 done
5058 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5059
5060   LIBTOOL=$ac_ct_LIBTOOL
5061 fi
5062
5063 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5064 then
5065         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.].*//'`
5066 else
5067         cf_cv_libtool_version=
5068 fi
5069 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5070
5071                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5072                 then
5073
5074 unset ac_cv_prog_ac_ct_LIBTOOL
5075 unset ac_ct_LIBTOOL
5076 unset LIBTOOL
5077
5078                         if test -n "$ac_tool_prefix"; then
5079   for ac_prog in glibtool
5080   do
5081     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5082 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5083 echo "$as_me:5083: checking for $ac_word" >&5
5084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5085 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5086   echo $ECHO_N "(cached) $ECHO_C" >&6
5087 else
5088   if test -n "$LIBTOOL"; then
5089   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5090 else
5091   ac_save_IFS=$IFS; IFS=$ac_path_separator
5092 ac_dummy="$PATH"
5093 for ac_dir in $ac_dummy; do
5094   IFS=$ac_save_IFS
5095   test -z "$ac_dir" && ac_dir=.
5096   $as_executable_p "$ac_dir/$ac_word" || continue
5097 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5098 echo "$as_me:5098: found $ac_dir/$ac_word" >&5
5099 break
5100 done
5101
5102 fi
5103 fi
5104 LIBTOOL=$ac_cv_prog_LIBTOOL
5105 if test -n "$LIBTOOL"; then
5106   echo "$as_me:5106: result: $LIBTOOL" >&5
5107 echo "${ECHO_T}$LIBTOOL" >&6
5108 else
5109   echo "$as_me:5109: result: no" >&5
5110 echo "${ECHO_T}no" >&6
5111 fi
5112
5113     test -n "$LIBTOOL" && break
5114   done
5115 fi
5116 if test -z "$LIBTOOL"; then
5117   ac_ct_LIBTOOL=$LIBTOOL
5118   for ac_prog in glibtool
5119 do
5120   # Extract the first word of "$ac_prog", so it can be a program name with args.
5121 set dummy $ac_prog; ac_word=$2
5122 echo "$as_me:5122: checking for $ac_word" >&5
5123 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5124 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5125   echo $ECHO_N "(cached) $ECHO_C" >&6
5126 else
5127   if test -n "$ac_ct_LIBTOOL"; then
5128   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5129 else
5130   ac_save_IFS=$IFS; IFS=$ac_path_separator
5131 ac_dummy="$PATH"
5132 for ac_dir in $ac_dummy; do
5133   IFS=$ac_save_IFS
5134   test -z "$ac_dir" && ac_dir=.
5135   $as_executable_p "$ac_dir/$ac_word" || continue
5136 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5137 echo "$as_me:5137: found $ac_dir/$ac_word" >&5
5138 break
5139 done
5140
5141 fi
5142 fi
5143 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5144 if test -n "$ac_ct_LIBTOOL"; then
5145   echo "$as_me:5145: result: $ac_ct_LIBTOOL" >&5
5146 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5147 else
5148   echo "$as_me:5148: result: no" >&5
5149 echo "${ECHO_T}no" >&6
5150 fi
5151
5152   test -n "$ac_ct_LIBTOOL" && break
5153 done
5154 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5155
5156   LIBTOOL=$ac_ct_LIBTOOL
5157 fi
5158
5159 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5160 then
5161         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.].*//'`
5162 else
5163         cf_cv_libtool_version=
5164 fi
5165 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5166
5167                 fi
5168         fi
5169         if test -z "$LIBTOOL" ; then
5170                 { { echo "$as_me:5170: error: Cannot find libtool" >&5
5171 echo "$as_me: error: Cannot find libtool" >&2;}
5172    { (exit 1); exit 1; }; }
5173         fi
5174         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5175         LIB_OBJECT='${OBJECTS:.o=.lo}'
5176         LIB_SUFFIX=.la
5177         LIB_CLEAN='${LIBTOOL} --mode=clean'
5178         LIB_COMPILE='${LIBTOOL} --mode=compile'
5179         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5180         LIB_INSTALL='${LIBTOOL} --mode=install'
5181         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5182         LIB_PREP=:
5183
5184 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5185 then
5186         echo "$as_me:5186: checking version of $LIBTOOL" >&5
5187 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5188
5189 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5190 then
5191         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.].*//'`
5192 else
5193         cf_cv_libtool_version=
5194 fi
5195 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5196
5197         echo "$as_me:5197: result: $cf_cv_libtool_version" >&5
5198 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5199         if test -z "$cf_cv_libtool_version" ; then
5200                 { { echo "$as_me:5200: error: This is not GNU libtool" >&5
5201 echo "$as_me: error: This is not GNU libtool" >&2;}
5202    { (exit 1); exit 1; }; }
5203         fi
5204 else
5205         { { echo "$as_me:5205: error: GNU libtool has not been found" >&5
5206 echo "$as_me: error: GNU libtool has not been found" >&2;}
5207    { (exit 1); exit 1; }; }
5208 fi
5209
5210         # special hack to add -no-undefined (which libtool should do for itself)
5211         LT_UNDEF=
5212         case "$cf_cv_system_name" in
5213         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5214                 LT_UNDEF=-no-undefined
5215                 ;;
5216         esac
5217
5218         # special hack to add --tag option for C++ compiler
5219         case $cf_cv_libtool_version in
5220         (1.[5-9]*|[2-9].[0-9.a-z]*)
5221                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5222                 LIBTOOL="$LIBTOOL --tag=CC"
5223                 ;;
5224         (*)
5225                 LIBTOOL_CXX="$LIBTOOL"
5226                 ;;
5227         esac
5228 else
5229         LIBTOOL=""
5230         LIBTOOL_CXX=""
5231 fi
5232
5233 test -z "$LIBTOOL" && ECHO_LT=
5234
5235 if test "$with_libtool" != "no" ; then
5236
5237 cf_list_models="$cf_list_models libtool"
5238
5239 else
5240
5241 echo "$as_me:5241: checking if you want to build shared libraries" >&5
5242 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5243
5244 # Check whether --with-shared or --without-shared was given.
5245 if test "${with_shared+set}" = set; then
5246   withval="$with_shared"
5247   with_shared=$withval
5248 else
5249   with_shared=no
5250 fi;
5251 echo "$as_me:5251: result: $with_shared" >&5
5252 echo "${ECHO_T}$with_shared" >&6
5253 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5254
5255 echo "$as_me:5255: checking if you want to build static libraries" >&5
5256 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5257
5258 # Check whether --with-normal or --without-normal was given.
5259 if test "${with_normal+set}" = set; then
5260   withval="$with_normal"
5261   with_normal=$withval
5262 else
5263   with_normal=yes
5264 fi;
5265 echo "$as_me:5265: result: $with_normal" >&5
5266 echo "${ECHO_T}$with_normal" >&6
5267 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5268
5269 echo "$as_me:5269: checking if you want to build debug libraries" >&5
5270 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5271
5272 # Check whether --with-debug or --without-debug was given.
5273 if test "${with_debug+set}" = set; then
5274   withval="$with_debug"
5275   with_debug=$withval
5276 else
5277   with_debug=yes
5278 fi;
5279 echo "$as_me:5279: result: $with_debug" >&5
5280 echo "${ECHO_T}$with_debug" >&6
5281 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5282
5283 echo "$as_me:5283: checking if you want to build profiling libraries" >&5
5284 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5285
5286 # Check whether --with-profile or --without-profile was given.
5287 if test "${with_profile+set}" = set; then
5288   withval="$with_profile"
5289   with_profile=$withval
5290 else
5291   with_profile=no
5292 fi;
5293 echo "$as_me:5293: result: $with_profile" >&5
5294 echo "${ECHO_T}$with_profile" >&6
5295 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5296
5297 fi
5298
5299 if test "X$cf_with_cxx_binding" != Xno; then
5300 if test "x$with_shared" = "xyes"; then
5301 echo "$as_me:5301: checking if you want to build C++ shared libraries" >&5
5302 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5303
5304 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5305 if test "${with_cxx_shared+set}" = set; then
5306   withval="$with_cxx_shared"
5307   with_shared_cxx=$withval
5308 else
5309   with_shared_cxx=no
5310 fi;
5311 echo "$as_me:5311: result: $with_shared_cxx" >&5
5312 echo "${ECHO_T}$with_shared_cxx" >&6
5313 fi
5314 fi
5315
5316 ###############################################################################
5317
5318 echo "$as_me:5318: checking for specified models" >&5
5319 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5320 test -z "$cf_list_models" && cf_list_models=normal
5321 test "$with_libtool" != "no" && cf_list_models=libtool
5322 echo "$as_me:5322: result: $cf_list_models" >&5
5323 echo "${ECHO_T}$cf_list_models" >&6
5324
5325 ### Use the first model as the default, and save its suffix for use in building
5326 ### up test-applications.
5327 echo "$as_me:5327: checking for default model" >&5
5328 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5329 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5330 echo "$as_me:5330: result: $DFT_LWR_MODEL" >&5
5331 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5332
5333 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5334
5335 TICS_NAME=tic
5336
5337 TINFO_NAME=tinfo
5338
5339 LIB_NAME=ncurses
5340
5341 LIB_DIR=../lib
5342 LIB_2ND=../../lib
5343
5344 echo "$as_me:5344: checking if you want to have a library-prefix" >&5
5345 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5346
5347 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5348 if test "${with_lib_prefix+set}" = set; then
5349   withval="$with_lib_prefix"
5350   with_lib_prefix=$withval
5351 else
5352   with_lib_prefix=auto
5353 fi;
5354 echo "$as_me:5354: result: $with_lib_prefix" >&5
5355 echo "${ECHO_T}$with_lib_prefix" >&6
5356
5357 if test $with_lib_prefix = auto
5358 then
5359
5360         case $cf_cv_system_name in
5361         (OS/2*|os2*)
5362                 if test "$DFT_LWR_MODEL" = libtool; then
5363                         LIB_PREFIX='lib'
5364                 else
5365                         LIB_PREFIX=''
5366                 fi
5367                 ;;
5368         (*)     LIB_PREFIX='lib'
5369                 ;;
5370         esac
5371 cf_prefix=$LIB_PREFIX
5372
5373 elif test $with_lib_prefix = no
5374 then
5375         LIB_PREFIX=
5376 else
5377         LIB_PREFIX=$with_lib_prefix
5378 fi
5379
5380 LIB_SUFFIX=
5381
5382         echo "$as_me:5382: checking for PATH separator" >&5
5383 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5384         case $cf_cv_system_name in
5385         (os2*)  PATH_SEPARATOR=';'  ;;
5386         (*)     ${PATH_SEPARATOR:=':'}  ;;
5387         esac
5388
5389         echo "$as_me:5389: result: $PATH_SEPARATOR" >&5
5390 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5391
5392 ###############################################################################
5393
5394 echo "$as_me:5394: checking if you want to build a separate terminfo library" >&5
5395 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5396
5397 # Check whether --with-termlib or --without-termlib was given.
5398 if test "${with_termlib+set}" = set; then
5399   withval="$with_termlib"
5400   with_termlib=$withval
5401 else
5402   with_termlib=no
5403 fi;
5404 echo "$as_me:5404: result: $with_termlib" >&5
5405 echo "${ECHO_T}$with_termlib" >&6
5406
5407 echo "$as_me:5407: checking if you want to build a separate tic library" >&5
5408 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5409
5410 # Check whether --with-ticlib or --without-ticlib was given.
5411 if test "${with_ticlib+set}" = set; then
5412   withval="$with_ticlib"
5413   with_ticlib=$withval
5414 else
5415   with_ticlib=no
5416 fi;
5417 echo "$as_me:5417: result: $with_ticlib" >&5
5418 echo "${ECHO_T}$with_ticlib" >&6
5419
5420 if test X"$CC_G_OPT" = X"" ; then
5421         CC_G_OPT='-g'
5422         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5423 fi
5424
5425 if test X"$CXX_G_OPT" = X"" ; then
5426         CXX_G_OPT='-g'
5427         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5428 fi
5429
5430 echo "$as_me:5430: checking for default loader flags" >&5
5431 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5432 case $DFT_LWR_MODEL in
5433 (libtool) LD_MODEL=''   ;;
5434 (normal)  LD_MODEL=''   ;;
5435 (debug)   LD_MODEL=$CC_G_OPT ;;
5436 (profile) LD_MODEL='-pg';;
5437 (shared)  LD_MODEL=''   ;;
5438 esac
5439 echo "$as_me:5439: result: $LD_MODEL" >&5
5440 echo "${ECHO_T}$LD_MODEL" >&6
5441
5442 case $DFT_LWR_MODEL in
5443 (shared)
5444
5445 echo "$as_me:5445: checking if rpath option should be used" >&5
5446 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5447
5448 # Check whether --enable-rpath or --disable-rpath was given.
5449 if test "${enable_rpath+set}" = set; then
5450   enableval="$enable_rpath"
5451   cf_cv_enable_rpath=$enableval
5452 else
5453   cf_cv_enable_rpath=no
5454 fi;
5455 echo "$as_me:5455: result: $cf_cv_enable_rpath" >&5
5456 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5457
5458 echo "$as_me:5458: checking if shared libraries should be relinked during install" >&5
5459 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5460
5461 # Check whether --enable-relink or --disable-relink was given.
5462 if test "${enable_relink+set}" = set; then
5463   enableval="$enable_relink"
5464   cf_cv_do_relink=$enableval
5465 else
5466   cf_cv_do_relink=yes
5467 fi;
5468 echo "$as_me:5468: result: $cf_cv_do_relink" >&5
5469 echo "${ECHO_T}$cf_cv_do_relink" >&6
5470         ;;
5471 esac
5472
5473 # we will build libraries one-level down.
5474 rel_builddir=..
5475
5476 LD_RPATH_OPT=
5477 if test "x$cf_cv_enable_rpath" != xno
5478 then
5479         echo "$as_me:5479: checking for an rpath option" >&5
5480 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5481         case $cf_cv_system_name in
5482         (irix*)
5483                 if test "$GCC" = yes; then
5484                         LD_RPATH_OPT="-Wl,-rpath,"
5485                 else
5486                         LD_RPATH_OPT="-rpath "
5487                 fi
5488                 ;;
5489         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5490                 LD_RPATH_OPT="-Wl,-rpath,"
5491                 ;;
5492         (openbsd[2-9].*|mirbsd*)
5493                 LD_RPATH_OPT="-Wl,-rpath,"
5494                 ;;
5495         (dragonfly*)
5496                 LD_RPATH_OPT="-rpath "
5497                 ;;
5498         (netbsd*)
5499                 LD_RPATH_OPT="-Wl,-rpath,"
5500                 ;;
5501         (osf*|mls+*)
5502                 LD_RPATH_OPT="-rpath "
5503                 ;;
5504         (solaris2*)
5505                 LD_RPATH_OPT="-R"
5506                 ;;
5507         (*)
5508                 ;;
5509         esac
5510         echo "$as_me:5510: result: $LD_RPATH_OPT" >&5
5511 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5512
5513         case "x$LD_RPATH_OPT" in
5514         (x-R*)
5515                 echo "$as_me:5515: checking if we need a space after rpath option" >&5
5516 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5517                 cf_save_LIBS="$LIBS"
5518
5519 cf_add_libs="${LD_RPATH_OPT}$libdir"
5520 # Filter out duplicates - this happens with badly-designed ".pc" files...
5521 for cf_add_1lib in $LIBS
5522 do
5523         for cf_add_2lib in $cf_add_libs
5524         do
5525                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5526                 then
5527                         cf_add_1lib=
5528                         break
5529                 fi
5530         done
5531         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5532 done
5533 LIBS="$cf_add_libs"
5534
5535                 cat >conftest.$ac_ext <<_ACEOF
5536 #line 5536 "configure"
5537 #include "confdefs.h"
5538
5539 int
5540 main (void)
5541 {
5542
5543   ;
5544   return 0;
5545 }
5546 _ACEOF
5547 rm -f conftest.$ac_objext conftest$ac_exeext
5548 if { (eval echo "$as_me:5548: \"$ac_link\"") >&5
5549   (eval $ac_link) 2>&5
5550   ac_status=$?
5551   echo "$as_me:5551: \$? = $ac_status" >&5
5552   (exit $ac_status); } &&
5553          { ac_try='test -s conftest$ac_exeext'
5554   { (eval echo "$as_me:5554: \"$ac_try\"") >&5
5555   (eval $ac_try) 2>&5
5556   ac_status=$?
5557   echo "$as_me:5557: \$? = $ac_status" >&5
5558   (exit $ac_status); }; }; then
5559   cf_rpath_space=no
5560 else
5561   echo "$as_me: failed program was:" >&5
5562 cat conftest.$ac_ext >&5
5563 cf_rpath_space=yes
5564 fi
5565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5566                 LIBS="$cf_save_LIBS"
5567                 echo "$as_me:5567: result: $cf_rpath_space" >&5
5568 echo "${ECHO_T}$cf_rpath_space" >&6
5569                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5570                 ;;
5571         esac
5572 fi
5573
5574         RM_SHARED_OPTS=
5575         LOCAL_LDFLAGS=
5576         LOCAL_LDFLAGS2=
5577         LD_SHARED_OPTS=
5578         INSTALL_LIB="-m 644"
5579         : ${rel_builddir:=.}
5580
5581         shlibdir=$libdir
5582
5583         MAKE_DLLS="#"
5584
5585         cf_cv_do_symlinks=no
5586         cf_ld_rpath_opt=
5587         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5588
5589         echo "$as_me:5589: checking if release/abi version should be used for shared libs" >&5
5590 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5591
5592 # Check whether --with-shlib-version or --without-shlib-version was given.
5593 if test "${with_shlib_version+set}" = set; then
5594   withval="$with_shlib_version"
5595   test -z "$withval" && withval=auto
5596         case $withval in
5597         (yes)
5598                 cf_cv_shlib_version=auto
5599                 ;;
5600         (rel|abi|auto)
5601                 cf_cv_shlib_version=$withval
5602                 ;;
5603         (*)
5604                 echo "$as_me:5604: result: $withval" >&5
5605 echo "${ECHO_T}$withval" >&6
5606                 { { echo "$as_me:5606: error: option value must be one of: rel, abi, or auto" >&5
5607 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5608    { (exit 1); exit 1; }; }
5609                 ;;
5610         esac
5611
5612 else
5613   cf_cv_shlib_version=auto
5614 fi;
5615         echo "$as_me:5615: result: $cf_cv_shlib_version" >&5
5616 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5617
5618         cf_cv_rm_so_locs=no
5619         cf_try_cflags=
5620
5621         # Some less-capable ports of gcc support only -fpic
5622         CC_SHARED_OPTS=
5623
5624         cf_try_fPIC=no
5625         if test "$GCC" = yes
5626         then
5627                 cf_try_fPIC=yes
5628         else
5629                 case $cf_cv_system_name in
5630                 (*linux*)       # e.g., PGI compiler
5631                         cf_try_fPIC=yes
5632                         ;;
5633                 esac
5634         fi
5635
5636         if test "$cf_try_fPIC" = yes
5637         then
5638                 echo "$as_me:5638: checking which $CC option to use" >&5
5639 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5640                 cf_save_CFLAGS="$CFLAGS"
5641                 for CC_SHARED_OPTS in -fPIC -fpic ''
5642                 do
5643                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5644                         cat >conftest.$ac_ext <<_ACEOF
5645 #line 5645 "configure"
5646 #include "confdefs.h"
5647 #include <stdio.h>
5648 int
5649 main (void)
5650 {
5651 int x = 1
5652   ;
5653   return 0;
5654 }
5655 _ACEOF
5656 rm -f conftest.$ac_objext
5657 if { (eval echo "$as_me:5657: \"$ac_compile\"") >&5
5658   (eval $ac_compile) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); } &&
5662          { ac_try='test -s conftest.$ac_objext'
5663   { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664   (eval $ac_try) 2>&5
5665   ac_status=$?
5666   echo "$as_me:5666: \$? = $ac_status" >&5
5667   (exit $ac_status); }; }; then
5668   break
5669 else
5670   echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 fi
5673 rm -f conftest.$ac_objext conftest.$ac_ext
5674                 done
5675                 echo "$as_me:5675: result: $CC_SHARED_OPTS" >&5
5676 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5677                 CFLAGS="$cf_save_CFLAGS"
5678         fi
5679
5680         cf_cv_shlib_version_infix=no
5681
5682         case $cf_cv_system_name in
5683         (aix4.3-9*|aix[5-7]*)
5684                 if test "$GCC" = yes; then
5685                         CC_SHARED_OPTS='-Wl,-brtl'
5686                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5687                 else
5688                         CC_SHARED_OPTS='-brtl'
5689                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5690                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5691                 fi
5692                 ;;
5693         (beos*)
5694                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5695                 ;;
5696         (cygwin*)
5697                 CC_SHARED_OPTS=
5698                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5699                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5700                 cf_cv_shlib_version=cygdll
5701                 cf_cv_shlib_version_infix=cygdll
5702                 shlibdir=$bindir
5703                 MAKE_DLLS=
5704                 cat >mk_shared_lib.sh <<-CF_EOF
5705                 #!$SHELL
5706                 SHARED_LIB=\$1
5707                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5708                 shift
5709                 cat <<-EOF
5710                 Linking shared library
5711                 ** SHARED_LIB \$SHARED_LIB
5712                 ** IMPORT_LIB \$IMPORT_LIB
5713 EOF
5714                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5715 CF_EOF
5716                 chmod +x mk_shared_lib.sh
5717                 ;;
5718         (msys*)
5719                 CC_SHARED_OPTS=
5720                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5721                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5722                 cf_cv_shlib_version=msysdll
5723                 cf_cv_shlib_version_infix=msysdll
5724                 shlibdir=$bindir
5725                 MAKE_DLLS=
5726                 cat >mk_shared_lib.sh <<-CF_EOF
5727                 #!$SHELL
5728                 SHARED_LIB=\$1
5729                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5730                 shift
5731                 cat <<-EOF
5732                 Linking shared library
5733                 ** SHARED_LIB \$SHARED_LIB
5734                 ** IMPORT_LIB \$IMPORT_LIB
5735 EOF
5736                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5737 CF_EOF
5738                 chmod +x mk_shared_lib.sh
5739                 ;;
5740         (darwin*)
5741                 cf_try_cflags="no-cpp-precomp"
5742                 CC_SHARED_OPTS="-dynamic"
5743                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5744                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5745                 cf_cv_shlib_version_infix=yes
5746                 echo "$as_me:5746: checking if ld -search_paths_first works" >&5
5747 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5748 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5749   echo $ECHO_N "(cached) $ECHO_C" >&6
5750 else
5751
5752                         cf_save_LDFLAGS=$LDFLAGS
5753                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5754                         cat >conftest.$ac_ext <<_ACEOF
5755 #line 5755 "configure"
5756 #include "confdefs.h"
5757
5758 int
5759 main (void)
5760 {
5761 int i;
5762   ;
5763   return 0;
5764 }
5765 _ACEOF
5766 rm -f conftest.$ac_objext conftest$ac_exeext
5767 if { (eval echo "$as_me:5767: \"$ac_link\"") >&5
5768   (eval $ac_link) 2>&5
5769   ac_status=$?
5770   echo "$as_me:5770: \$? = $ac_status" >&5
5771   (exit $ac_status); } &&
5772          { ac_try='test -s conftest$ac_exeext'
5773   { (eval echo "$as_me:5773: \"$ac_try\"") >&5
5774   (eval $ac_try) 2>&5
5775   ac_status=$?
5776   echo "$as_me:5776: \$? = $ac_status" >&5
5777   (exit $ac_status); }; }; then
5778   cf_cv_ldflags_search_paths_first=yes
5779 else
5780   echo "$as_me: failed program was:" >&5
5781 cat conftest.$ac_ext >&5
5782 cf_cv_ldflags_search_paths_first=no
5783 fi
5784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5785                                 LDFLAGS=$cf_save_LDFLAGS
5786 fi
5787 echo "$as_me:5787: result: $cf_cv_ldflags_search_paths_first" >&5
5788 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5789                 if test $cf_cv_ldflags_search_paths_first = yes; then
5790                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5791                 fi
5792                 ;;
5793         (hpux[7-8]*)
5794                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5795                 if test "$GCC" != yes; then
5796                         CC_SHARED_OPTS='+Z'
5797                 fi
5798                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5799                 INSTALL_LIB="-m 555"
5800                 ;;
5801         (hpux*)
5802                 # (tested with gcc 2.7.2 -- I don't have c89)
5803                 if test "$GCC" = yes; then
5804                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5805                 else
5806                         CC_SHARED_OPTS='+Z'
5807                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5808                 fi
5809                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5810                 # HP-UX shared libraries must be executable, and should be
5811                 # readonly to exploit a quirk in the memory manager.
5812                 INSTALL_LIB="-m 555"
5813                 ;;
5814         (interix*)
5815                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5816                 if test "$cf_cv_shlib_version" = rel; then
5817                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5818                 else
5819                         cf_shared_soname='`basename $@`'
5820                 fi
5821                 CC_SHARED_OPTS=
5822                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5823                 ;;
5824         (irix*)
5825                 if test "$cf_cv_enable_rpath" = yes ; then
5826                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5827                 fi
5828                 # tested with IRIX 5.2 and 'cc'.
5829                 if test "$GCC" != yes; then
5830                         CC_SHARED_OPTS='-KPIC'
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5832                 else
5833                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5834                 fi
5835                 cf_cv_rm_so_locs=yes
5836                 ;;
5837         (linux*|gnu*|k*bsd*-gnu)
5838                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5839                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5840                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5841                 fi
5842                 if test "$cf_cv_enable_rpath" = yes ; then
5843                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5844                 fi
5845
5846         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5847         if test "$cf_cv_shlib_version" = rel; then
5848                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5849         else
5850                 cf_cv_shared_soname='`basename $@`'
5851         fi
5852
5853                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5854                 ;;
5855         (mingw*)
5856                 cf_cv_shlib_version=mingw
5857                 cf_cv_shlib_version_infix=mingw
5858                 shlibdir=$bindir
5859                 MAKE_DLLS=
5860                 if test "$DFT_LWR_MODEL" = "shared" ; then
5861                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5862                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5863                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5864                 fi
5865                 CC_SHARED_OPTS=
5866                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5867                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5868                 cat >mk_shared_lib.sh <<-CF_EOF
5869                 #!$SHELL
5870                 SHARED_LIB=\$1
5871                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5872                 shift
5873                 cat <<-EOF
5874                 Linking shared library
5875                 ** SHARED_LIB \$SHARED_LIB
5876                 ** IMPORT_LIB \$IMPORT_LIB
5877 EOF
5878                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5879 CF_EOF
5880                 chmod +x mk_shared_lib.sh
5881                 ;;
5882         (openbsd[2-9].*|mirbsd*)
5883                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5884                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5885                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5886                 fi
5887                 if test "$cf_cv_enable_rpath" = yes ; then
5888                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5889                 fi
5890                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5891
5892         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5893         if test "$cf_cv_shlib_version" = rel; then
5894                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5895         else
5896                 cf_cv_shared_soname='`basename $@`'
5897         fi
5898
5899                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5900                 ;;
5901         (nto-qnx*|openbsd*|freebsd[12].*)
5902                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5903                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5904                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5905                 ;;
5906         (dragonfly*|freebsd*)
5907                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5908                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5909                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5910                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5911                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5912                 fi
5913
5914         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5915         if test "$cf_cv_shlib_version" = rel; then
5916                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5917         else
5918                 cf_cv_shared_soname='`basename $@`'
5919         fi
5920
5921                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5922                 ;;
5923         (netbsd*)
5924                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5925                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5926                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5927                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5928                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5929                         if test "$cf_cv_shlib_version" = auto; then
5930                         if test -f /usr/libexec/ld.elf_so; then
5931                                 cf_cv_shlib_version=abi
5932                         else
5933                                 cf_cv_shlib_version=rel
5934                         fi
5935                         fi
5936
5937         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5938         if test "$cf_cv_shlib_version" = rel; then
5939                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5940         else
5941                 cf_cv_shared_soname='`basename $@`'
5942         fi
5943
5944                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5945                 else
5946                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5947                 fi
5948                 ;;
5949         (osf*|mls+*)
5950                 # tested with OSF/1 V3.2 and 'cc'
5951                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5952                 # link with shared libs).
5953                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5954                 case $host_os in
5955                 (osf4*)
5956                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5957                         ;;
5958                 esac
5959                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5960                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5961                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5962                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5963                 fi
5964                 cf_cv_rm_so_locs=yes
5965                 ;;
5966         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5967                 # tested with osr5.0.5
5968                 if test "$GCC" != yes; then
5969                         CC_SHARED_OPTS='-belf -KPIC'
5970                 fi
5971                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5972                 if test "$cf_cv_enable_rpath" = yes ; then
5973                         # only way is to set LD_RUN_PATH but no switch for it
5974                         RUN_PATH=$libdir
5975                 fi
5976                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5977                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5978                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5979                 ;;
5980         (sunos4*)
5981                 # tested with SunOS 4.1.1 and gcc 2.7.0
5982                 if test "$GCC" != yes; then
5983                         CC_SHARED_OPTS='-KPIC'
5984                 fi
5985                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5986                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5987                 ;;
5988         (solaris2*)
5989                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5990                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5991                 if test "$DFT_LWR_MODEL" = "shared" ; then
5992                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5993                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5994                 fi
5995                 if test "$cf_cv_enable_rpath" = yes ; then
5996                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5997                 fi
5998
5999         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6000         if test "$cf_cv_shlib_version" = rel; then
6001                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6002         else
6003                 cf_cv_shared_soname='`basename $@`'
6004         fi
6005
6006                 if test "$GCC" != yes; then
6007                         cf_save_CFLAGS="$CFLAGS"
6008                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6009                         do
6010                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6011                                 cat >conftest.$ac_ext <<_ACEOF
6012 #line 6012 "configure"
6013 #include "confdefs.h"
6014 #include <stdio.h>
6015 int
6016 main (void)
6017 {
6018 printf("Hello\n");
6019   ;
6020   return 0;
6021 }
6022 _ACEOF
6023 rm -f conftest.$ac_objext
6024 if { (eval echo "$as_me:6024: \"$ac_compile\"") >&5
6025   (eval $ac_compile) 2>&5
6026   ac_status=$?
6027   echo "$as_me:6027: \$? = $ac_status" >&5
6028   (exit $ac_status); } &&
6029          { ac_try='test -s conftest.$ac_objext'
6030   { (eval echo "$as_me:6030: \"$ac_try\"") >&5
6031   (eval $ac_try) 2>&5
6032   ac_status=$?
6033   echo "$as_me:6033: \$? = $ac_status" >&5
6034   (exit $ac_status); }; }; then
6035   break
6036 else
6037   echo "$as_me: failed program was:" >&5
6038 cat conftest.$ac_ext >&5
6039 fi
6040 rm -f conftest.$ac_objext conftest.$ac_ext
6041                         done
6042                         CFLAGS="$cf_save_CFLAGS"
6043                         CC_SHARED_OPTS=$cf_shared_opts
6044                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6045                 else
6046                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6047                 fi
6048                 ;;
6049         (sysv5uw7*|unix_sv*)
6050                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6051                 if test "$GCC" != yes; then
6052                         CC_SHARED_OPTS='-KPIC'
6053                 fi
6054                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6055                 ;;
6056         (*)
6057                 CC_SHARED_OPTS='unknown'
6058                 MK_SHARED_LIB='echo unknown'
6059                 ;;
6060         esac
6061
6062         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6063         case "$cf_cv_shlib_version" in
6064         (rel|abi)
6065                 case "$MK_SHARED_LIB" in
6066                 (*'-o $@')
6067                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6068                         ;;
6069                 (*)
6070                         { echo "$as_me:6070: WARNING: ignored --with-shlib-version" >&5
6071 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6072                         ;;
6073                 esac
6074                 ;;
6075         esac
6076
6077         if test -n "$cf_try_cflags"
6078         then
6079 cat > conftest.$ac_ext <<EOF
6080 #line 6080 "${as_me:-configure}"
6081 #include <stdio.h>
6082 int main(int argc, char *argv[])
6083 {
6084         printf("hello\n");
6085         return (argv[argc-1] == 0) ;
6086 }
6087 EOF
6088                 cf_save_CFLAGS="$CFLAGS"
6089                 for cf_opt in $cf_try_cflags
6090                 do
6091                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6092                         echo "$as_me:6092: checking if CFLAGS option -$cf_opt works" >&5
6093 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6094                         if { (eval echo "$as_me:6094: \"$ac_compile\"") >&5
6095   (eval $ac_compile) 2>&5
6096   ac_status=$?
6097   echo "$as_me:6097: \$? = $ac_status" >&5
6098   (exit $ac_status); }; then
6099                                 echo "$as_me:6099: result: yes" >&5
6100 echo "${ECHO_T}yes" >&6
6101                                 cf_save_CFLAGS="$CFLAGS"
6102                         else
6103                                 echo "$as_me:6103: result: no" >&5
6104 echo "${ECHO_T}no" >&6
6105                         fi
6106                 done
6107                 CFLAGS="$cf_save_CFLAGS"
6108         fi
6109
6110         # RPATH_LIST is a colon-separated list of directories
6111         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6112         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6113
6114         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6115
6116         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6117
6118 echo "${as_me:-configure}:6118: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6119
6120         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6121
6122 echo "${as_me:-configure}:6122: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6123
6124 for model in $cf_list_models; do
6125         case $model in
6126         (libtool)
6127
6128 echo "$as_me:6128: checking for additional libtool options" >&5
6129 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6130
6131 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6132 if test "${with_libtool_opts+set}" = set; then
6133   withval="$with_libtool_opts"
6134   with_libtool_opts=$withval
6135 else
6136   with_libtool_opts=no
6137 fi;
6138 echo "$as_me:6138: result: $with_libtool_opts" >&5
6139 echo "${ECHO_T}$with_libtool_opts" >&6
6140
6141 case .$with_libtool_opts in
6142 (.yes|.no|.)
6143         ;;
6144 (*)
6145         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6146         ;;
6147 esac
6148
6149 echo "$as_me:6149: checking if exported-symbols file should be used" >&5
6150 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6151
6152 # Check whether --with-export-syms or --without-export-syms was given.
6153 if test "${with_export_syms+set}" = set; then
6154   withval="$with_export_syms"
6155   with_export_syms=$withval
6156 else
6157   with_export_syms=no
6158 fi;
6159 if test "x$with_export_syms" = xyes
6160 then
6161         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6162
6163 fi
6164 echo "$as_me:6164: result: $with_export_syms" >&5
6165 echo "${ECHO_T}$with_export_syms" >&6
6166 if test "x$with_export_syms" != xno
6167 then
6168         EXPORT_SYMS="-export-symbols $with_export_syms"
6169
6170 fi
6171
6172                 ;;
6173         (shared)
6174                 if test "$CC_SHARED_OPTS" = "unknown"; then
6175                         { { echo "$as_me:6175: error: Shared libraries are not supported in this version" >&5
6176 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6177    { (exit 1); exit 1; }; }
6178                 fi
6179                 # workaround for inept transition to PIE vs PIC...
6180                 echo "$as_me:6180: checking if current CFLAGS link properly" >&5
6181 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6182                 cat >conftest.$ac_ext <<_ACEOF
6183 #line 6183 "configure"
6184 #include "confdefs.h"
6185 #include <stdio.h>
6186 int
6187 main (void)
6188 {
6189 printf("Hello work\n");
6190   ;
6191   return 0;
6192 }
6193 _ACEOF
6194 rm -f conftest.$ac_objext conftest$ac_exeext
6195 if { (eval echo "$as_me:6195: \"$ac_link\"") >&5
6196   (eval $ac_link) 2>&5
6197   ac_status=$?
6198   echo "$as_me:6198: \$? = $ac_status" >&5
6199   (exit $ac_status); } &&
6200          { ac_try='test -s conftest$ac_exeext'
6201   { (eval echo "$as_me:6201: \"$ac_try\"") >&5
6202   (eval $ac_try) 2>&5
6203   ac_status=$?
6204   echo "$as_me:6204: \$? = $ac_status" >&5
6205   (exit $ac_status); }; }; then
6206   cf_cflags_work=yes
6207 else
6208   echo "$as_me: failed program was:" >&5
6209 cat conftest.$ac_ext >&5
6210 cf_cflags_work=no
6211 fi
6212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6213                 echo "$as_me:6213: result: $cf_cflags_work" >&5
6214 echo "${ECHO_T}$cf_cflags_work" >&6
6215                 if test "$cf_cflags_work" = no
6216                 then
6217                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6218
6219 echo "${as_me:-configure}:6219: testing try to work around by appending shared-options ..." 1>&5
6220
6221                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6222                 fi
6223
6224 echo "$as_me:6224: checking if versioned-symbols file should be used" >&5
6225 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6226
6227 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6228 if test "${with_versioned_syms+set}" = set; then
6229   withval="$with_versioned_syms"
6230   with_versioned_syms=$withval
6231 else
6232   with_versioned_syms=no
6233 fi;
6234 case "x$with_versioned_syms" in
6235 (xyes)
6236         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6237
6238         ;;
6239 (xno)
6240         ;;
6241 (x/*)
6242         test -f "$with_versioned_syms" || { { echo "$as_me:6242: error: expected a filename: $with_versioned_syms" >&5
6243 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6244    { (exit 1); exit 1; }; }
6245         ;;
6246 (*)
6247         test -f "$with_versioned_syms" || { { echo "$as_me:6247: error: expected a filename: $with_versioned_syms" >&5
6248 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6249    { (exit 1); exit 1; }; }
6250         with_versioned_syms=`pwd`/"$with_versioned_syms"
6251         ;;
6252 esac
6253 echo "$as_me:6253: result: $with_versioned_syms" >&5
6254 echo "${ECHO_T}$with_versioned_syms" >&6
6255
6256 RESULTING_SYMS=
6257 VERSIONED_SYMS=
6258 WILDCARD_SYMS=
6259
6260 if test "x$with_versioned_syms" != xno
6261 then
6262         RESULTING_SYMS=$with_versioned_syms
6263         case "x$MK_SHARED_LIB" in
6264         (*-Wl,*)
6265                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6266                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6267                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6268
6269 echo "${as_me:-configure}:6269: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6270
6271                 ;;
6272         (*-dy\ *)
6273                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6274                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6275                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6278
6279                 ;;
6280         (*)
6281                 { echo "$as_me:6281: WARNING: this system does not support versioned-symbols" >&5
6282 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6283                 ;;
6284         esac
6285
6286         # Linux ld can selectively override scope, e.g., of symbols beginning with
6287         # "_" by first declaring some as global, and then using a wildcard to
6288         # declare the others as local.  Some other loaders cannot do this.  Check
6289         # by constructing a (very) simple shared library and inspecting its
6290         # symbols.
6291         if test "x$VERSIONED_SYMS" != "x"
6292         then
6293                 echo "$as_me:6293: checking if wildcards can be used to selectively omit symbols" >&5
6294 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6295                 WILDCARD_SYMS=no
6296
6297                 # make sources
6298                 rm -f conftest.*
6299
6300                 cat >conftest.ver <<EOF
6301 module_1.0 {
6302 global:
6303         globalf1;
6304 local:
6305         localf1;
6306 };
6307 module_2.0 {
6308 global:
6309         globalf2;
6310 local:
6311         localf2;
6312         _*;
6313 } module_1.0;
6314 submodule_1.0 {
6315 global:
6316         subglobalf1;
6317         _ismissing;
6318 local:
6319         sublocalf1;
6320 };
6321 submodule_2.0 {
6322 global:
6323         subglobalf2;
6324 local:
6325         sublocalf2;
6326         _*;
6327 } submodule_1.0;
6328 EOF
6329                 cat >conftest.$ac_ext <<EOF
6330 #line 6330 "configure"
6331 int     _ismissing(void) { return 1; }
6332 int     _localf1(void) { return 1; }
6333 int     _localf2(void) { return 2; }
6334 int     globalf1(void) { return 1; }
6335 int     globalf2(void) { return 2; }
6336 int     _sublocalf1(void) { return 1; }
6337 int     _sublocalf2(void) { return 2; }
6338 int     subglobalf1(void) { return 1; }
6339 int     subglobalf2(void) { return 2; }
6340 EOF
6341                 cat >conftest.mk <<EOF
6342 CC=${CC}
6343 CFLAGS=${CFLAGS}
6344 CPPFLAGS=${CPPFLAGS}
6345 LDFLAGS=${LDFLAGS}
6346 LIBS=${LIBS}
6347 VERSIONED_SYMS=${VERSIONED_SYMS}
6348 RESULTING_SYMS=conftest.ver
6349 MK_SHARED_LIB=${MK_SHARED_LIB}
6350 conftest.so: conftest.$ac_cv_objext
6351                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6352 EOF
6353
6354                 # compile source, make library
6355                 if make -f conftest.mk 2>&5 >/dev/null
6356                 then
6357                         # test for missing symbol in either Data or Text section
6358                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6359                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6360                 fi
6361                 echo "$as_me:6361: result: $WILDCARD_SYMS" >&5
6362 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6363                 rm -f conftest.*
6364         fi
6365 fi
6366
6367                 ;;
6368         esac
6369 done
6370
6371 ### Checks for special libraries, must be done up-front.
6372 SHLIB_LIST=""
6373
6374 echo "$as_me:6374: checking if you want to link with the GPM mouse library" >&5
6375 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6376
6377 # Check whether --with-gpm or --without-gpm was given.
6378 if test "${with_gpm+set}" = set; then
6379   withval="$with_gpm"
6380   with_gpm=$withval
6381 else
6382   with_gpm=maybe
6383 fi;
6384 echo "$as_me:6384: result: $with_gpm" >&5
6385 echo "${ECHO_T}$with_gpm" >&6
6386
6387 if test "$with_gpm" != no ; then
6388         echo "$as_me:6388: checking for gpm.h" >&5
6389 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6390 if test "${ac_cv_header_gpm_h+set}" = set; then
6391   echo $ECHO_N "(cached) $ECHO_C" >&6
6392 else
6393   cat >conftest.$ac_ext <<_ACEOF
6394 #line 6394 "configure"
6395 #include "confdefs.h"
6396 #include <gpm.h>
6397 _ACEOF
6398 if { (eval echo "$as_me:6398: \"$ac_cpp conftest.$ac_ext\"") >&5
6399   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6400   ac_status=$?
6401   egrep -v '^ *\+' conftest.er1 >conftest.err
6402   rm -f conftest.er1
6403   cat conftest.err >&5
6404   echo "$as_me:6404: \$? = $ac_status" >&5
6405   (exit $ac_status); } >/dev/null; then
6406   if test -s conftest.err; then
6407     ac_cpp_err=$ac_c_preproc_warn_flag
6408   else
6409     ac_cpp_err=
6410   fi
6411 else
6412   ac_cpp_err=yes
6413 fi
6414 if test -z "$ac_cpp_err"; then
6415   ac_cv_header_gpm_h=yes
6416 else
6417   echo "$as_me: failed program was:" >&5
6418   cat conftest.$ac_ext >&5
6419   ac_cv_header_gpm_h=no
6420 fi
6421 rm -f conftest.err conftest.$ac_ext
6422 fi
6423 echo "$as_me:6423: result: $ac_cv_header_gpm_h" >&5
6424 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6425 if test $ac_cv_header_gpm_h = yes; then
6426
6427 cat >>confdefs.h <<\EOF
6428 #define HAVE_GPM_H 1
6429 EOF
6430
6431                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6432                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6433
6434 echo "${as_me:-configure}:6434: testing assuming we really have GPM library ..." 1>&5
6435
6436 cat >>confdefs.h <<\EOF
6437 #define HAVE_LIBGPM 1
6438 EOF
6439
6440                         with_gpm=yes
6441                 else
6442                         echo "$as_me:6442: checking for Gpm_Open in -lgpm" >&5
6443 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6444 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6445   echo $ECHO_N "(cached) $ECHO_C" >&6
6446 else
6447   ac_check_lib_save_LIBS=$LIBS
6448 LIBS="-lgpm  $LIBS"
6449 cat >conftest.$ac_ext <<_ACEOF
6450 #line 6450 "configure"
6451 #include "confdefs.h"
6452
6453 /* Override any gcc2 internal prototype to avoid an error.  */
6454 #ifdef __cplusplus
6455 extern "C"
6456 #endif
6457 /* We use char because int might match the return type of a gcc2
6458    builtin and then its argument prototype would still apply.  */
6459 char Gpm_Open ();
6460 int
6461 main (void)
6462 {
6463 Gpm_Open ();
6464   ;
6465   return 0;
6466 }
6467 _ACEOF
6468 rm -f conftest.$ac_objext conftest$ac_exeext
6469 if { (eval echo "$as_me:6469: \"$ac_link\"") >&5
6470   (eval $ac_link) 2>&5
6471   ac_status=$?
6472   echo "$as_me:6472: \$? = $ac_status" >&5
6473   (exit $ac_status); } &&
6474          { ac_try='test -s conftest$ac_exeext'
6475   { (eval echo "$as_me:6475: \"$ac_try\"") >&5
6476   (eval $ac_try) 2>&5
6477   ac_status=$?
6478   echo "$as_me:6478: \$? = $ac_status" >&5
6479   (exit $ac_status); }; }; then
6480   ac_cv_lib_gpm_Gpm_Open=yes
6481 else
6482   echo "$as_me: failed program was:" >&5
6483 cat conftest.$ac_ext >&5
6484 ac_cv_lib_gpm_Gpm_Open=no
6485 fi
6486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6487 LIBS=$ac_check_lib_save_LIBS
6488 fi
6489 echo "$as_me:6489: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6490 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6491 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6492   with_gpm=yes
6493 else
6494
6495                                 if test "$with_gpm" = maybe; then
6496                                         { echo "$as_me:6496: WARNING: Cannot link with GPM library" >&5
6497 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6498                                         with_gpm=no
6499                                 else
6500                                         { { echo "$as_me:6500: error: Cannot link with GPM library" >&5
6501 echo "$as_me: error: Cannot link with GPM library" >&2;}
6502    { (exit 1); exit 1; }; }
6503                                 fi
6504
6505 fi
6506
6507                 fi
6508
6509 else
6510
6511                 test "$with_gpm" != maybe && { echo "$as_me:6511: WARNING: Cannot find GPM header" >&5
6512 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6513                 with_gpm=no
6514
6515 fi
6516
6517 fi
6518
6519 if test "$with_gpm" != no ; then
6520         echo "$as_me:6520: checking if you want to load GPM dynamically" >&5
6521 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6522
6523 # Check whether --with-dlsym or --without-dlsym was given.
6524 if test "${with_dlsym+set}" = set; then
6525   withval="$with_dlsym"
6526   with_dlsym=$withval
6527 else
6528   with_dlsym=yes
6529 fi;
6530         echo "$as_me:6530: result: $with_dlsym" >&5
6531 echo "${ECHO_T}$with_dlsym" >&6
6532         if test "x$with_dlsym" = xyes ; then
6533
6534 cf_have_dlsym=no
6535 echo "$as_me:6535: checking for dlsym" >&5
6536 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6537 if test "${ac_cv_func_dlsym+set}" = set; then
6538   echo $ECHO_N "(cached) $ECHO_C" >&6
6539 else
6540   cat >conftest.$ac_ext <<_ACEOF
6541 #line 6541 "configure"
6542 #include "confdefs.h"
6543 #define dlsym autoconf_temporary
6544 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6545 #undef dlsym
6546
6547 #ifdef __cplusplus
6548 extern "C"
6549 #endif
6550
6551 /* We use char because int might match the return type of a gcc2
6552    builtin and then its argument prototype would still apply.  */
6553 char dlsym (void);
6554
6555 int
6556 main (void)
6557 {
6558
6559 /* The GNU C library defines stubs for functions which it implements
6560     to always fail with ENOSYS.  Some functions are actually named
6561     something starting with __ and the normal name is an alias.  */
6562 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6563 #error found stub for dlsym
6564 #endif
6565
6566         return dlsym ();
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_func_dlsym=yes
6584 else
6585   echo "$as_me: failed program was:" >&5
6586 cat conftest.$ac_ext >&5
6587 ac_cv_func_dlsym=no
6588 fi
6589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6590 fi
6591 echo "$as_me:6591: result: $ac_cv_func_dlsym" >&5
6592 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6593 if test $ac_cv_func_dlsym = yes; then
6594   cf_have_dlsym=yes
6595 else
6596
6597 cf_have_libdl=no
6598 echo "$as_me:6598: checking for dlsym in -ldl" >&5
6599 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6600 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6601   echo $ECHO_N "(cached) $ECHO_C" >&6
6602 else
6603   ac_check_lib_save_LIBS=$LIBS
6604 LIBS="-ldl  $LIBS"
6605 cat >conftest.$ac_ext <<_ACEOF
6606 #line 6606 "configure"
6607 #include "confdefs.h"
6608
6609 /* Override any gcc2 internal prototype to avoid an error.  */
6610 #ifdef __cplusplus
6611 extern "C"
6612 #endif
6613 /* We use char because int might match the return type of a gcc2
6614    builtin and then its argument prototype would still apply.  */
6615 char dlsym ();
6616 int
6617 main (void)
6618 {
6619 dlsym ();
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -f conftest.$ac_objext conftest$ac_exeext
6625 if { (eval echo "$as_me:6625: \"$ac_link\"") >&5
6626   (eval $ac_link) 2>&5
6627   ac_status=$?
6628   echo "$as_me:6628: \$? = $ac_status" >&5
6629   (exit $ac_status); } &&
6630          { ac_try='test -s conftest$ac_exeext'
6631   { (eval echo "$as_me:6631: \"$ac_try\"") >&5
6632   (eval $ac_try) 2>&5
6633   ac_status=$?
6634   echo "$as_me:6634: \$? = $ac_status" >&5
6635   (exit $ac_status); }; }; then
6636   ac_cv_lib_dl_dlsym=yes
6637 else
6638   echo "$as_me: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 ac_cv_lib_dl_dlsym=no
6641 fi
6642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6643 LIBS=$ac_check_lib_save_LIBS
6644 fi
6645 echo "$as_me:6645: result: $ac_cv_lib_dl_dlsym" >&5
6646 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6647 if test $ac_cv_lib_dl_dlsym = yes; then
6648
6649         cf_have_dlsym=yes
6650         cf_have_libdl=yes
6651 fi
6652
6653 fi
6654
6655 if test "$cf_have_dlsym" = yes ; then
6656         test "$cf_have_libdl" = yes && {
6657 cf_add_libs="-ldl"
6658 # Filter out duplicates - this happens with badly-designed ".pc" files...
6659 for cf_add_1lib in $LIBS
6660 do
6661         for cf_add_2lib in $cf_add_libs
6662         do
6663                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6664                 then
6665                         cf_add_1lib=
6666                         break
6667                 fi
6668         done
6669         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6670 done
6671 LIBS="$cf_add_libs"
6672  }
6673
6674         echo "$as_me:6674: checking whether able to link to dl*() functions" >&5
6675 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6676         cat >conftest.$ac_ext <<_ACEOF
6677 #line 6677 "configure"
6678 #include "confdefs.h"
6679 #include <dlfcn.h>
6680 int
6681 main (void)
6682 {
6683
6684                 void *obj;
6685                 if ((obj = dlopen("filename", 0)) != 0) {
6686                         if (dlsym(obj, "symbolname") == 0) {
6687                         dlclose(obj);
6688                         }
6689                 }
6690   ;
6691   return 0;
6692 }
6693 _ACEOF
6694 rm -f conftest.$ac_objext conftest$ac_exeext
6695 if { (eval echo "$as_me:6695: \"$ac_link\"") >&5
6696   (eval $ac_link) 2>&5
6697   ac_status=$?
6698   echo "$as_me:6698: \$? = $ac_status" >&5
6699   (exit $ac_status); } &&
6700          { ac_try='test -s conftest$ac_exeext'
6701   { (eval echo "$as_me:6701: \"$ac_try\"") >&5
6702   (eval $ac_try) 2>&5
6703   ac_status=$?
6704   echo "$as_me:6704: \$? = $ac_status" >&5
6705   (exit $ac_status); }; }; then
6706
6707 cat >>confdefs.h <<\EOF
6708 #define HAVE_LIBDL 1
6709 EOF
6710
6711 else
6712   echo "$as_me: failed program was:" >&5
6713 cat conftest.$ac_ext >&5
6714
6715                 { { echo "$as_me:6715: error: Cannot link test program for libdl" >&5
6716 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6717    { (exit 1); exit 1; }; }
6718 fi
6719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6720         echo "$as_me:6720: result: ok" >&5
6721 echo "${ECHO_T}ok" >&6
6722 else
6723         { { echo "$as_me:6723: error: Cannot find dlsym function" >&5
6724 echo "$as_me: error: Cannot find dlsym function" >&2;}
6725    { (exit 1); exit 1; }; }
6726 fi
6727
6728                 if test "x$with_gpm" != xyes ; then
6729                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6730
6731 echo "${as_me:-configure}:6731: testing assuming soname for gpm is $with_gpm ..." 1>&5
6732
6733                         cf_cv_gpm_soname="$with_gpm"
6734                 else
6735
6736 echo "$as_me:6736: checking for soname of gpm library" >&5
6737 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6738 if test "${cf_cv_gpm_soname+set}" = set; then
6739   echo $ECHO_N "(cached) $ECHO_C" >&6
6740 else
6741
6742 cf_cv_gpm_soname=unknown
6743 if test "$cross_compiling" != yes ; then
6744 cat >conftest.$ac_ext <<CF_EOF
6745 #include <gpm.h>
6746 int main(void)
6747 {
6748 if (Gpm_Open(0,0)) Gpm_Close();
6749         ${cf_cv_main_return:-return}(0);
6750 }
6751 CF_EOF
6752 cf_save_LIBS="$LIBS"
6753
6754 cf_add_libs="-lgpm"
6755 # Filter out duplicates - this happens with badly-designed ".pc" files...
6756 for cf_add_1lib in $LIBS
6757 do
6758         for cf_add_2lib in $cf_add_libs
6759         do
6760                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6761                 then
6762                         cf_add_1lib=
6763                         break
6764                 fi
6765         done
6766         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6767 done
6768 LIBS="$cf_add_libs"
6769
6770         if { (eval echo "$as_me:6770: \"$ac_compile\"") >&5
6771   (eval $ac_compile) 2>&5
6772   ac_status=$?
6773   echo "$as_me:6773: \$? = $ac_status" >&5
6774   (exit $ac_status); } ; then
6775                 if { (eval echo "$as_me:6775: \"$ac_link\"") >&5
6776   (eval $ac_link) 2>&5
6777   ac_status=$?
6778   echo "$as_me:6778: \$? = $ac_status" >&5
6779   (exit $ac_status); } ; then
6780                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6781                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6782                 fi
6783         fi
6784 rm -rf conftest*
6785 LIBS="$cf_save_LIBS"
6786 fi
6787
6788 fi
6789 echo "$as_me:6789: result: $cf_cv_gpm_soname" >&5
6790 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6791
6792                 fi
6793                 test "$cf_cv_gpm_soname" != "unknown" &&
6794 cat >>confdefs.h <<EOF
6795 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6796 EOF
6797
6798                 SHLIB_LIST="-ldl $SHLIB_LIST"
6799
6800 cf_add_libs="-ldl"
6801 # Filter out duplicates - this happens with badly-designed ".pc" files...
6802 for cf_add_1lib in $PRIVATE_LIBS
6803 do
6804         for cf_add_2lib in $cf_add_libs
6805         do
6806                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6807                 then
6808                         cf_add_1lib=
6809                         break
6810                 fi
6811         done
6812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6813 done
6814 PRIVATE_LIBS="$cf_add_libs"
6815
6816         else
6817                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6818
6819 cf_add_libs="-lgpm"
6820 # Filter out duplicates - this happens with badly-designed ".pc" files...
6821 for cf_add_1lib in $TEST_LIBS
6822 do
6823         for cf_add_2lib in $cf_add_libs
6824         do
6825                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6826                 then
6827                         cf_add_1lib=
6828                         break
6829                 fi
6830         done
6831         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6832 done
6833 TEST_LIBS="$cf_add_libs"
6834
6835 cf_add_libs="-lgpm"
6836 # Filter out duplicates - this happens with badly-designed ".pc" files...
6837 for cf_add_1lib in $PRIVATE_LIBS
6838 do
6839         for cf_add_2lib in $cf_add_libs
6840         do
6841                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6842                 then
6843                         cf_add_1lib=
6844                         break
6845                 fi
6846         done
6847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6848 done
6849 PRIVATE_LIBS="$cf_add_libs"
6850
6851         fi
6852
6853 cat >>confdefs.h <<\EOF
6854 #define HAVE_LIBGPM 1
6855 EOF
6856
6857 echo "$as_me:6857: checking for Gpm_Wgetch in -lgpm" >&5
6858 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6859 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6860   echo $ECHO_N "(cached) $ECHO_C" >&6
6861 else
6862   ac_check_lib_save_LIBS=$LIBS
6863 LIBS="-lgpm  $LIBS"
6864 cat >conftest.$ac_ext <<_ACEOF
6865 #line 6865 "configure"
6866 #include "confdefs.h"
6867
6868 /* Override any gcc2 internal prototype to avoid an error.  */
6869 #ifdef __cplusplus
6870 extern "C"
6871 #endif
6872 /* We use char because int might match the return type of a gcc2
6873    builtin and then its argument prototype would still apply.  */
6874 char Gpm_Wgetch ();
6875 int
6876 main (void)
6877 {
6878 Gpm_Wgetch ();
6879   ;
6880   return 0;
6881 }
6882 _ACEOF
6883 rm -f conftest.$ac_objext conftest$ac_exeext
6884 if { (eval echo "$as_me:6884: \"$ac_link\"") >&5
6885   (eval $ac_link) 2>&5
6886   ac_status=$?
6887   echo "$as_me:6887: \$? = $ac_status" >&5
6888   (exit $ac_status); } &&
6889          { ac_try='test -s conftest$ac_exeext'
6890   { (eval echo "$as_me:6890: \"$ac_try\"") >&5
6891   (eval $ac_try) 2>&5
6892   ac_status=$?
6893   echo "$as_me:6893: \$? = $ac_status" >&5
6894   (exit $ac_status); }; }; then
6895   ac_cv_lib_gpm_Gpm_Wgetch=yes
6896 else
6897   echo "$as_me: failed program was:" >&5
6898 cat conftest.$ac_ext >&5
6899 ac_cv_lib_gpm_Gpm_Wgetch=no
6900 fi
6901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6902 LIBS=$ac_check_lib_save_LIBS
6903 fi
6904 echo "$as_me:6904: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6905 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6906 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6907
6908 echo "$as_me:6908: checking if GPM is weakly bound to curses library" >&5
6909 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6910 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6911   echo $ECHO_N "(cached) $ECHO_C" >&6
6912 else
6913
6914 cf_cv_check_gpm_wgetch=unknown
6915 if test "$cross_compiling" != yes ; then
6916
6917 cat >conftest.$ac_ext <<CF_EOF
6918 #include <gpm.h>
6919 int main(void)
6920 {
6921         Gpm_Wgetch();
6922         ${cf_cv_main_return:-return}(0);
6923 }
6924 CF_EOF
6925
6926         cf_save_LIBS="$LIBS"
6927         # This only works if we can look at the symbol table.  If a shared
6928         # library is stripped for install, we cannot use that.  So we're forced
6929         # to rely on the static library, noting that some packagers may not
6930         # include it.
6931         LIBS="-static -lgpm -dynamic $LIBS"
6932         if { (eval echo "$as_me:6932: \"$ac_compile\"") >&5
6933   (eval $ac_compile) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit $ac_status); } ; then
6937                 if { (eval echo "$as_me:6937: \"$ac_link\"") >&5
6938   (eval $ac_link) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); } ; then
6942                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6943                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6944                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6945                 fi
6946         fi
6947         rm -rf conftest*
6948         LIBS="$cf_save_LIBS"
6949 fi
6950
6951 fi
6952 echo "$as_me:6952: result: $cf_cv_check_gpm_wgetch" >&5
6953 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6954
6955 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6956         { echo "$as_me:6956: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6957 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6958 fi
6959
6960 fi
6961
6962 fi
6963
6964 echo "$as_me:6964: checking if you want to use PCRE2 for regular-expressions" >&5
6965 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6966
6967 # Check whether --with-pcre2 or --without-pcre2 was given.
6968 if test "${with_pcre2+set}" = set; then
6969   withval="$with_pcre2"
6970
6971 fi;
6972 test -z "$with_pcre2" && with_pcre2=no
6973 echo "$as_me:6973: result: $with_pcre2" >&5
6974 echo "${ECHO_T}$with_pcre2" >&6
6975
6976 if test "x$with_pcre2" != xno ; then
6977
6978 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6979         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6980
6981 echo "${as_me:-configure}:6981: testing found package libpcre2 ..." 1>&5
6982
6983         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6984         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6985         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6986
6987 echo "${as_me:-configure}:6987: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6988
6989         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6990
6991 echo "${as_me:-configure}:6991: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6992
6993 cf_fix_cppflags=no
6994 cf_new_cflags=
6995 cf_new_cppflags=
6996 cf_new_extra_cppflags=
6997
6998 for cf_add_cflags in $cf_pkgconfig_incs
6999 do
7000 case $cf_fix_cppflags in
7001 (no)
7002         case $cf_add_cflags in
7003         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7004                 case $cf_add_cflags in
7005                 (-D*)
7006                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7007
7008                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7009                                 && test -z "${cf_tst_cflags}" \
7010                                 && cf_fix_cppflags=yes
7011
7012                         if test $cf_fix_cppflags = yes ; then
7013
7014         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7015         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7016
7017                                 continue
7018                         elif test "${cf_tst_cflags}" = "\"'" ; then
7019
7020         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7021         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7022
7023                                 continue
7024                         fi
7025                         ;;
7026                 esac
7027                 case "$CPPFLAGS" in
7028                 (*$cf_add_cflags)
7029                         ;;
7030                 (*)
7031                         case $cf_add_cflags in
7032                         (-D*)
7033                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7034
7035 CPPFLAGS=`echo "$CPPFLAGS" | \
7036         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7037                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7038
7039                                 ;;
7040                         esac
7041
7042         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7043         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7044
7045                         ;;
7046                 esac
7047                 ;;
7048         (*)
7049
7050         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7051         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7052
7053                 ;;
7054         esac
7055         ;;
7056 (yes)
7057
7058         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7059         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7060
7061         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7062
7063         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7064                 && test -z "${cf_tst_cflags}" \
7065                 && cf_fix_cppflags=no
7066         ;;
7067 esac
7068 done
7069
7070 if test -n "$cf_new_cflags" ; then
7071
7072         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7073         CFLAGS="${CFLAGS}$cf_new_cflags"
7074
7075 fi
7076
7077 if test -n "$cf_new_cppflags" ; then
7078
7079         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7080         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7081
7082 fi
7083
7084 if test -n "$cf_new_extra_cppflags" ; then
7085
7086         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7087         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7088
7089 fi
7090
7091 cf_add_libs="$cf_pkgconfig_libs"
7092 # Filter out duplicates - this happens with badly-designed ".pc" files...
7093 for cf_add_1lib in $LIBS
7094 do
7095         for cf_add_2lib in $cf_add_libs
7096         do
7097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7098                 then
7099                         cf_add_1lib=
7100                         break
7101                 fi
7102         done
7103         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7104 done
7105 LIBS="$cf_add_libs"
7106
7107         :
7108 else
7109         cf_pkgconfig_incs=
7110         cf_pkgconfig_libs=
7111
7112 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7113         test -n "$verbose" && echo "    found package libpcre" 1>&6
7114
7115 echo "${as_me:-configure}:7115: testing found package libpcre ..." 1>&5
7116
7117         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7118         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7119         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7120
7121 echo "${as_me:-configure}:7121: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7122
7123         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7124
7125 echo "${as_me:-configure}:7125: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7126
7127 cf_fix_cppflags=no
7128 cf_new_cflags=
7129 cf_new_cppflags=
7130 cf_new_extra_cppflags=
7131
7132 for cf_add_cflags in $cf_pkgconfig_incs
7133 do
7134 case $cf_fix_cppflags in
7135 (no)
7136         case $cf_add_cflags in
7137         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7138                 case $cf_add_cflags in
7139                 (-D*)
7140                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7141
7142                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7143                                 && test -z "${cf_tst_cflags}" \
7144                                 && cf_fix_cppflags=yes
7145
7146                         if test $cf_fix_cppflags = yes ; then
7147
7148         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7149         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7150
7151                                 continue
7152                         elif test "${cf_tst_cflags}" = "\"'" ; then
7153
7154         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7155         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7156
7157                                 continue
7158                         fi
7159                         ;;
7160                 esac
7161                 case "$CPPFLAGS" in
7162                 (*$cf_add_cflags)
7163                         ;;
7164                 (*)
7165                         case $cf_add_cflags in
7166                         (-D*)
7167                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7168
7169 CPPFLAGS=`echo "$CPPFLAGS" | \
7170         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7171                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7172
7173                                 ;;
7174                         esac
7175
7176         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7177         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7178
7179                         ;;
7180                 esac
7181                 ;;
7182         (*)
7183
7184         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7185         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7186
7187                 ;;
7188         esac
7189         ;;
7190 (yes)
7191
7192         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7193         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7194
7195         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7196
7197         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7198                 && test -z "${cf_tst_cflags}" \
7199                 && cf_fix_cppflags=no
7200         ;;
7201 esac
7202 done
7203
7204 if test -n "$cf_new_cflags" ; then
7205
7206         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7207         CFLAGS="${CFLAGS}$cf_new_cflags"
7208
7209 fi
7210
7211 if test -n "$cf_new_cppflags" ; then
7212
7213         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7214         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7215
7216 fi
7217
7218 if test -n "$cf_new_extra_cppflags" ; then
7219
7220         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7221         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7222
7223 fi
7224
7225 cf_add_libs="$cf_pkgconfig_libs"
7226 # Filter out duplicates - this happens with badly-designed ".pc" files...
7227 for cf_add_1lib in $LIBS
7228 do
7229         for cf_add_2lib in $cf_add_libs
7230         do
7231                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7232                 then
7233                         cf_add_1lib=
7234                         break
7235                 fi
7236         done
7237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7238 done
7239 LIBS="$cf_add_libs"
7240
7241         :
7242 else
7243         cf_pkgconfig_incs=
7244         cf_pkgconfig_libs=
7245
7246                         { { echo "$as_me:7246: error: Cannot find PCRE2 library" >&5
7247 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7248    { (exit 1); exit 1; }; }
7249 fi
7250
7251 fi
7252
7253 cat >>confdefs.h <<\EOF
7254 #define HAVE_LIB_PCRE2 1
7255 EOF
7256
7257         # if pkgconfig gave no results, look for the libraries directly
7258         case $LIBS in
7259         (*pcre2-posix*|*pcreposix*)
7260                 ;;
7261         (*)
7262                 echo "$as_me:7262: checking for regcomp in -lpcre2-posix" >&5
7263 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7264 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7265   echo $ECHO_N "(cached) $ECHO_C" >&6
7266 else
7267   ac_check_lib_save_LIBS=$LIBS
7268 LIBS="-lpcre2-posix  $LIBS"
7269 cat >conftest.$ac_ext <<_ACEOF
7270 #line 7270 "configure"
7271 #include "confdefs.h"
7272
7273 /* Override any gcc2 internal prototype to avoid an error.  */
7274 #ifdef __cplusplus
7275 extern "C"
7276 #endif
7277 /* We use char because int might match the return type of a gcc2
7278    builtin and then its argument prototype would still apply.  */
7279 char regcomp ();
7280 int
7281 main (void)
7282 {
7283 regcomp ();
7284   ;
7285   return 0;
7286 }
7287 _ACEOF
7288 rm -f conftest.$ac_objext conftest$ac_exeext
7289 if { (eval echo "$as_me:7289: \"$ac_link\"") >&5
7290   (eval $ac_link) 2>&5
7291   ac_status=$?
7292   echo "$as_me:7292: \$? = $ac_status" >&5
7293   (exit $ac_status); } &&
7294          { ac_try='test -s conftest$ac_exeext'
7295   { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296   (eval $ac_try) 2>&5
7297   ac_status=$?
7298   echo "$as_me:7298: \$? = $ac_status" >&5
7299   (exit $ac_status); }; }; then
7300   ac_cv_lib_pcre2_posix_regcomp=yes
7301 else
7302   echo "$as_me: failed program was:" >&5
7303 cat conftest.$ac_ext >&5
7304 ac_cv_lib_pcre2_posix_regcomp=no
7305 fi
7306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7307 LIBS=$ac_check_lib_save_LIBS
7308 fi
7309 echo "$as_me:7309: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7310 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7311 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7312
7313 cf_add_libs="-lpcre2-posix"
7314 # Filter out duplicates - this happens with badly-designed ".pc" files...
7315 for cf_add_1lib in $LIBS
7316 do
7317         for cf_add_2lib in $cf_add_libs
7318         do
7319                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7320                 then
7321                         cf_add_1lib=
7322                         break
7323                 fi
7324         done
7325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7326 done
7327 LIBS="$cf_add_libs"
7328
7329 else
7330   echo "$as_me:7330: checking for regcomp in -lpcreposix" >&5
7331 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7332 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7333   echo $ECHO_N "(cached) $ECHO_C" >&6
7334 else
7335   ac_check_lib_save_LIBS=$LIBS
7336 LIBS="-lpcreposix  $LIBS"
7337 cat >conftest.$ac_ext <<_ACEOF
7338 #line 7338 "configure"
7339 #include "confdefs.h"
7340
7341 /* Override any gcc2 internal prototype to avoid an error.  */
7342 #ifdef __cplusplus
7343 extern "C"
7344 #endif
7345 /* We use char because int might match the return type of a gcc2
7346    builtin and then its argument prototype would still apply.  */
7347 char regcomp ();
7348 int
7349 main (void)
7350 {
7351 regcomp ();
7352   ;
7353   return 0;
7354 }
7355 _ACEOF
7356 rm -f conftest.$ac_objext conftest$ac_exeext
7357 if { (eval echo "$as_me:7357: \"$ac_link\"") >&5
7358   (eval $ac_link) 2>&5
7359   ac_status=$?
7360   echo "$as_me:7360: \$? = $ac_status" >&5
7361   (exit $ac_status); } &&
7362          { ac_try='test -s conftest$ac_exeext'
7363   { (eval echo "$as_me:7363: \"$ac_try\"") >&5
7364   (eval $ac_try) 2>&5
7365   ac_status=$?
7366   echo "$as_me:7366: \$? = $ac_status" >&5
7367   (exit $ac_status); }; }; then
7368   ac_cv_lib_pcreposix_regcomp=yes
7369 else
7370   echo "$as_me: failed program was:" >&5
7371 cat conftest.$ac_ext >&5
7372 ac_cv_lib_pcreposix_regcomp=no
7373 fi
7374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7375 LIBS=$ac_check_lib_save_LIBS
7376 fi
7377 echo "$as_me:7377: result: $ac_cv_lib_pcreposix_regcomp" >&5
7378 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7379 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7380
7381 cf_add_libs="-lpcreposix"
7382 # Filter out duplicates - this happens with badly-designed ".pc" files...
7383 for cf_add_1lib in $LIBS
7384 do
7385         for cf_add_2lib in $cf_add_libs
7386         do
7387                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7388                 then
7389                         cf_add_1lib=
7390                         break
7391                 fi
7392         done
7393         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7394 done
7395 LIBS="$cf_add_libs"
7396
7397 else
7398   { { echo "$as_me:7398: error: Cannot find PCRE2 POSIX library" >&5
7399 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7400    { (exit 1); exit 1; }; }
7401 fi
7402
7403 fi
7404
7405                 ;;
7406         esac
7407
7408         # either way, check for the library header files
7409
7410 for ac_header in pcre2-posix.h pcreposix.h
7411 do
7412 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7413 echo "$as_me:7413: checking for $ac_header" >&5
7414 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7415 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7416   echo $ECHO_N "(cached) $ECHO_C" >&6
7417 else
7418   cat >conftest.$ac_ext <<_ACEOF
7419 #line 7419 "configure"
7420 #include "confdefs.h"
7421 #include <$ac_header>
7422 _ACEOF
7423 if { (eval echo "$as_me:7423: \"$ac_cpp conftest.$ac_ext\"") >&5
7424   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7425   ac_status=$?
7426   egrep -v '^ *\+' conftest.er1 >conftest.err
7427   rm -f conftest.er1
7428   cat conftest.err >&5
7429   echo "$as_me:7429: \$? = $ac_status" >&5
7430   (exit $ac_status); } >/dev/null; then
7431   if test -s conftest.err; then
7432     ac_cpp_err=$ac_c_preproc_warn_flag
7433   else
7434     ac_cpp_err=
7435   fi
7436 else
7437   ac_cpp_err=yes
7438 fi
7439 if test -z "$ac_cpp_err"; then
7440   eval "$as_ac_Header=yes"
7441 else
7442   echo "$as_me: failed program was:" >&5
7443   cat conftest.$ac_ext >&5
7444   eval "$as_ac_Header=no"
7445 fi
7446 rm -f conftest.err conftest.$ac_ext
7447 fi
7448 echo "$as_me:7448: result: `eval echo '${'$as_ac_Header'}'`" >&5
7449 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7450 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7451   cat >>confdefs.h <<EOF
7452 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7453 EOF
7454
7455 fi
7456 done
7457
7458 fi
7459
7460 # not everyone has "test -c"
7461 if test -c /dev/sysmouse 2>/dev/null ; then
7462 echo "$as_me:7462: checking if you want to use sysmouse" >&5
7463 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7464
7465 # Check whether --with-sysmouse or --without-sysmouse was given.
7466 if test "${with_sysmouse+set}" = set; then
7467   withval="$with_sysmouse"
7468   cf_with_sysmouse=$withval
7469 else
7470   cf_with_sysmouse=maybe
7471 fi;
7472         if test "$cf_with_sysmouse" != no ; then
7473         cat >conftest.$ac_ext <<_ACEOF
7474 #line 7474 "configure"
7475 #include "confdefs.h"
7476
7477 #include <osreldate.h>
7478 #if (__FreeBSD_version >= 400017)
7479 #include <sys/consio.h>
7480 #include <sys/fbio.h>
7481 #else
7482 #include <machine/console.h>
7483 #endif
7484
7485 int
7486 main (void)
7487 {
7488
7489         struct mouse_info the_mouse;
7490         ioctl(0, CONS_MOUSECTL, &the_mouse);
7491
7492   ;
7493   return 0;
7494 }
7495 _ACEOF
7496 rm -f conftest.$ac_objext
7497 if { (eval echo "$as_me:7497: \"$ac_compile\"") >&5
7498   (eval $ac_compile) 2>&5
7499   ac_status=$?
7500   echo "$as_me:7500: \$? = $ac_status" >&5
7501   (exit $ac_status); } &&
7502          { ac_try='test -s conftest.$ac_objext'
7503   { (eval echo "$as_me:7503: \"$ac_try\"") >&5
7504   (eval $ac_try) 2>&5
7505   ac_status=$?
7506   echo "$as_me:7506: \$? = $ac_status" >&5
7507   (exit $ac_status); }; }; then
7508   cf_with_sysmouse=yes
7509 else
7510   echo "$as_me: failed program was:" >&5
7511 cat conftest.$ac_ext >&5
7512 cf_with_sysmouse=no
7513 fi
7514 rm -f conftest.$ac_objext conftest.$ac_ext
7515         fi
7516 echo "$as_me:7516: result: $cf_with_sysmouse" >&5
7517 echo "${ECHO_T}$cf_with_sysmouse" >&6
7518 test "$cf_with_sysmouse" = yes &&
7519 cat >>confdefs.h <<\EOF
7520 #define USE_SYSMOUSE 1
7521 EOF
7522
7523 fi
7524
7525 # pretend that ncurses==ncursesw==ncursest
7526 echo "$as_me:7526: checking if you want to disable library suffixes" >&5
7527 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7528
7529 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7530 if test "${enable_lib_suffixes+set}" = set; then
7531   enableval="$enable_lib_suffixes"
7532   test "$enableval" != no && enableval=yes
7533         if test "$enableval" != "yes" ; then
7534     disable_lib_suffixes=yes
7535         else
7536                 disable_lib_suffixes=no
7537         fi
7538 else
7539   enableval=yes
7540         disable_lib_suffixes=no
7541
7542 fi;
7543 echo "$as_me:7543: result: $disable_lib_suffixes" >&5
7544 echo "${ECHO_T}$disable_lib_suffixes" >&6
7545
7546 ### If we're building with rpath, try to link non-standard libs that way too.
7547 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7548
7549 echo "$as_me:7549: checking if rpath-hack should be disabled" >&5
7550 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7551
7552 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7553 if test "${enable_rpath_hack+set}" = set; then
7554   enableval="$enable_rpath_hack"
7555   test "$enableval" != no && enableval=yes
7556         if test "$enableval" != "yes" ; then
7557     cf_disable_rpath_hack=yes
7558         else
7559                 cf_disable_rpath_hack=no
7560         fi
7561 else
7562   enableval=yes
7563         cf_disable_rpath_hack=no
7564
7565 fi;
7566 echo "$as_me:7566: result: $cf_disable_rpath_hack" >&5
7567 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7568 if test "$cf_disable_rpath_hack" = no ; then
7569
7570 echo "$as_me:7570: checking for updated LDFLAGS" >&5
7571 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7572 if test -n "$LD_RPATH_OPT" ; then
7573         echo "$as_me:7573: result: maybe" >&5
7574 echo "${ECHO_T}maybe" >&6
7575
7576         for ac_prog in ldd
7577 do
7578   # Extract the first word of "$ac_prog", so it can be a program name with args.
7579 set dummy $ac_prog; ac_word=$2
7580 echo "$as_me:7580: checking for $ac_word" >&5
7581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7582 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7583   echo $ECHO_N "(cached) $ECHO_C" >&6
7584 else
7585   if test -n "$cf_ldd_prog"; then
7586   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7587 else
7588   ac_save_IFS=$IFS; IFS=$ac_path_separator
7589 ac_dummy="$PATH"
7590 for ac_dir in $ac_dummy; do
7591   IFS=$ac_save_IFS
7592   test -z "$ac_dir" && ac_dir=.
7593   $as_executable_p "$ac_dir/$ac_word" || continue
7594 ac_cv_prog_cf_ldd_prog="$ac_prog"
7595 echo "$as_me:7595: found $ac_dir/$ac_word" >&5
7596 break
7597 done
7598
7599 fi
7600 fi
7601 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7602 if test -n "$cf_ldd_prog"; then
7603   echo "$as_me:7603: result: $cf_ldd_prog" >&5
7604 echo "${ECHO_T}$cf_ldd_prog" >&6
7605 else
7606   echo "$as_me:7606: result: no" >&5
7607 echo "${ECHO_T}no" >&6
7608 fi
7609
7610   test -n "$cf_ldd_prog" && break
7611 done
7612 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7613
7614         cf_rpath_list="/usr/lib /lib"
7615         if test "$cf_ldd_prog" != no
7616         then
7617                 cf_rpath_oops=
7618
7619 cat >conftest.$ac_ext <<_ACEOF
7620 #line 7620 "configure"
7621 #include "confdefs.h"
7622 #include <stdio.h>
7623 int
7624 main (void)
7625 {
7626 printf("Hello");
7627   ;
7628   return 0;
7629 }
7630 _ACEOF
7631 rm -f conftest.$ac_objext conftest$ac_exeext
7632 if { (eval echo "$as_me:7632: \"$ac_link\"") >&5
7633   (eval $ac_link) 2>&5
7634   ac_status=$?
7635   echo "$as_me:7635: \$? = $ac_status" >&5
7636   (exit $ac_status); } &&
7637          { ac_try='test -s conftest$ac_exeext'
7638   { (eval echo "$as_me:7638: \"$ac_try\"") >&5
7639   (eval $ac_try) 2>&5
7640   ac_status=$?
7641   echo "$as_me:7641: \$? = $ac_status" >&5
7642   (exit $ac_status); }; }; then
7643   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7644                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7645 else
7646   echo "$as_me: failed program was:" >&5
7647 cat conftest.$ac_ext >&5
7648 fi
7649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7650
7651                 # If we passed the link-test, but get a "not found" on a given library,
7652                 # this could be due to inept reconfiguration of gcc to make it only
7653                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7654                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7655                 # /usr/local libraries.
7656                 if test -n "$cf_rpath_oops"
7657                 then
7658                         for cf_rpath_src in $cf_rpath_oops
7659                         do
7660                                 for cf_rpath_dir in \
7661                                         /usr/local \
7662                                         /usr/pkg \
7663                                         /opt/sfw
7664                                 do
7665                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7666                                         then
7667                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7668
7669 echo "${as_me:-configure}:7669: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7670
7671                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7672                                                 break
7673                                         fi
7674                                 done
7675                         done
7676                 fi
7677         fi
7678
7679         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7680
7681 echo "${as_me:-configure}:7681: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7682
7683 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7684
7685 echo "${as_me:-configure}:7685: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7686
7687 cf_rpath_dst=
7688 for cf_rpath_src in $LDFLAGS
7689 do
7690         case $cf_rpath_src in
7691         (-L*)
7692
7693                 # check if this refers to a directory which we will ignore
7694                 cf_rpath_skip=no
7695                 if test -n "$cf_rpath_list"
7696                 then
7697                         for cf_rpath_item in $cf_rpath_list
7698                         do
7699                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7700                                 then
7701                                         cf_rpath_skip=yes
7702                                         break
7703                                 fi
7704                         done
7705                 fi
7706
7707                 if test "$cf_rpath_skip" = no
7708                 then
7709                         # transform the option
7710                         if test "$LD_RPATH_OPT" = "-R " ; then
7711                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7712                         else
7713                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7714                         fi
7715
7716                         # if we have not already added this, add it now
7717                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7718                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7719                         then
7720                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7721
7722 echo "${as_me:-configure}:7722: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7723
7724                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7725                         fi
7726                 fi
7727                 ;;
7728         esac
7729         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7730 done
7731 LDFLAGS=$cf_rpath_dst
7732
7733 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7734
7735 echo "${as_me:-configure}:7735: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7736
7737 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7738
7739 echo "${as_me:-configure}:7739: testing ...checking LIBS $LIBS ..." 1>&5
7740
7741 cf_rpath_dst=
7742 for cf_rpath_src in $LIBS
7743 do
7744         case $cf_rpath_src in
7745         (-L*)
7746
7747                 # check if this refers to a directory which we will ignore
7748                 cf_rpath_skip=no
7749                 if test -n "$cf_rpath_list"
7750                 then
7751                         for cf_rpath_item in $cf_rpath_list
7752                         do
7753                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7754                                 then
7755                                         cf_rpath_skip=yes
7756                                         break
7757                                 fi
7758                         done
7759                 fi
7760
7761                 if test "$cf_rpath_skip" = no
7762                 then
7763                         # transform the option
7764                         if test "$LD_RPATH_OPT" = "-R " ; then
7765                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7766                         else
7767                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7768                         fi
7769
7770                         # if we have not already added this, add it now
7771                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7772                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7773                         then
7774                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7775
7776 echo "${as_me:-configure}:7776: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7777
7778                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7779                         fi
7780                 fi
7781                 ;;
7782         esac
7783         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7784 done
7785 LIBS=$cf_rpath_dst
7786
7787 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7788
7789 echo "${as_me:-configure}:7789: testing ...checked LIBS $LIBS ..." 1>&5
7790
7791         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7792
7793 echo "${as_me:-configure}:7793: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7794
7795 else
7796         echo "$as_me:7796: result: no" >&5
7797 echo "${ECHO_T}no" >&6
7798 fi
7799
7800 fi
7801
7802 fi
7803
7804 ###############################################################################
7805
7806 ###     use option --with-extra-suffix to append suffix to headers and libraries
7807 echo "$as_me:7807: checking if you wish to append extra suffix to header/library paths" >&5
7808 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7809 EXTRA_SUFFIX=
7810
7811 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7812 if test "${with_extra_suffix+set}" = set; then
7813   withval="$with_extra_suffix"
7814   case x$withval in
7815         (no)
7816                 ;;
7817         (xyes|x)
7818                 EXTRA_SUFFIX=$cf_cv_abi_version
7819                 ;;
7820         (*)
7821                 EXTRA_SUFFIX=$withval
7822                 ;;
7823         esac
7824
7825 fi;
7826 echo "$as_me:7826: result: $EXTRA_SUFFIX" >&5
7827 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7828
7829 ###     use option --disable-overwrite to leave out the link to -lcurses
7830 echo "$as_me:7830: checking if you wish to install ncurses overwriting curses" >&5
7831 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7832
7833 # Check whether --enable-overwrite or --disable-overwrite was given.
7834 if test "${enable_overwrite+set}" = set; then
7835   enableval="$enable_overwrite"
7836   with_overwrite=$enableval
7837 else
7838   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7839 fi;
7840 echo "$as_me:7840: result: $with_overwrite" >&5
7841 echo "${ECHO_T}$with_overwrite" >&6
7842
7843 echo "$as_me:7843: checking if external terminfo-database is used" >&5
7844 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7845
7846 # Check whether --enable-database or --disable-database was given.
7847 if test "${enable_database+set}" = set; then
7848   enableval="$enable_database"
7849   use_database=$enableval
7850 else
7851   use_database=yes
7852 fi;
7853 echo "$as_me:7853: result: $use_database" >&5
7854 echo "${ECHO_T}$use_database" >&6
7855
7856 case $host_os in
7857 (os2*)
7858         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7859         ;;
7860 (*)
7861         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7862         ;;
7863 esac
7864
7865 NCURSES_USE_DATABASE=0
7866 if test "$use_database" != no ; then
7867         NCURSES_USE_DATABASE=1
7868
7869         echo "$as_me:7869: checking which terminfo source-file will be installed" >&5
7870 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7871
7872 # Check whether --with-database or --without-database was given.
7873 if test "${with_database+set}" = set; then
7874   withval="$with_database"
7875   TERMINFO_SRC=$withval
7876 fi;
7877         echo "$as_me:7877: result: $TERMINFO_SRC" >&5
7878 echo "${ECHO_T}$TERMINFO_SRC" >&6
7879
7880         echo "$as_me:7880: checking whether to use hashed database instead of directory/tree" >&5
7881 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7882
7883 # Check whether --with-hashed-db or --without-hashed-db was given.
7884 if test "${with_hashed_db+set}" = set; then
7885   withval="$with_hashed_db"
7886
7887 else
7888   with_hashed_db=no
7889 fi;
7890         echo "$as_me:7890: result: $with_hashed_db" >&5
7891 echo "${ECHO_T}$with_hashed_db" >&6
7892 else
7893         with_hashed_db=no
7894 fi
7895
7896 echo "$as_me:7896: checking for list of fallback descriptions" >&5
7897 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7898
7899 # Check whether --with-fallbacks or --without-fallbacks was given.
7900 if test "${with_fallbacks+set}" = set; then
7901   withval="$with_fallbacks"
7902   with_fallback=$withval
7903 else
7904   with_fallback=
7905 fi;
7906 echo "$as_me:7906: result: $with_fallback" >&5
7907 echo "${ECHO_T}$with_fallback" >&6
7908
7909 case ".$with_fallback" in
7910 (.|.no)
7911         FALLBACK_LIST=
7912         ;;
7913 (.yes)
7914         { echo "$as_me:7914: WARNING: expected a list of terminal descriptions" >&5
7915 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
7916         ;;
7917 (*)
7918         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7919         ;;
7920 esac
7921
7922 USE_FALLBACKS=
7923 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
7924
7925 # The fallback feature in ncurses relies upon tic/infocmp outside the build
7926 # tree for generating the terminal descriptions that will be compiled into the
7927 # library.  If your toolchain is old, it may not handle current terminal
7928 # databases.  Use configure-options to point to the tools which will be used,
7929 # rather than the first ones found on the $PATH.
7930 if test -n "$FALLBACK_LIST"
7931 then
7932
7933 # Check whether --with-tic-path or --without-tic-path was given.
7934 if test "${with_tic_path+set}" = set; then
7935   withval="$with_tic_path"
7936   echo "$as_me:7936: checking for tic program for fallbacks" >&5
7937 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
7938                 TIC=$withval
7939                 echo "$as_me:7939: result: $TIC" >&5
7940 echo "${ECHO_T}$TIC" >&6
7941
7942 if test "x$prefix" != xNONE; then
7943         cf_path_syntax="$prefix"
7944 else
7945         cf_path_syntax="$ac_default_prefix"
7946 fi
7947
7948 case ".$TIC" in
7949 (.\$\(*\)*|.\'*\'*)
7950         ;;
7951 (..|./*|.\\*)
7952         ;;
7953 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7954         ;;
7955 (.\${*prefix}*|.\${*dir}*)
7956         eval TIC="$TIC"
7957         case ".$TIC" in
7958         (.NONE/*)
7959                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
7960                 ;;
7961         esac
7962         ;;
7963 (.no|.NONE/*)
7964         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
7965         ;;
7966 (*)
7967         { { echo "$as_me:7967: error: expected a pathname, not \"$TIC\"" >&5
7968 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
7969    { (exit 1); exit 1; }; }
7970         ;;
7971 esac
7972
7973 else
7974
7975 test -z "$TIC" && TIC=tic
7976 for ac_prog in $TIC tic
7977 do
7978   # Extract the first word of "$ac_prog", so it can be a program name with args.
7979 set dummy $ac_prog; ac_word=$2
7980 echo "$as_me:7980: checking for $ac_word" >&5
7981 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7982 if test "${ac_cv_path_TIC+set}" = set; then
7983   echo $ECHO_N "(cached) $ECHO_C" >&6
7984 else
7985   case $TIC in
7986   [\\/]* | ?:[\\/]*)
7987   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
7988   ;;
7989   *)
7990   ac_save_IFS=$IFS; IFS=$ac_path_separator
7991 ac_dummy="$PATH:/usr/local/ncurses/bin"
7992 for ac_dir in $ac_dummy; do
7993   IFS=$ac_save_IFS
7994   test -z "$ac_dir" && ac_dir=.
7995   if $as_executable_p "$ac_dir/$ac_word"; then
7996    ac_cv_path_TIC="$ac_dir/$ac_word"
7997    echo "$as_me:7997: found $ac_dir/$ac_word" >&5
7998    break
7999 fi
8000 done
8001
8002   ;;
8003 esac
8004 fi
8005 TIC=$ac_cv_path_TIC
8006
8007 if test -n "$TIC"; then
8008   echo "$as_me:8008: result: $TIC" >&5
8009 echo "${ECHO_T}$TIC" >&6
8010 else
8011   echo "$as_me:8011: result: no" >&5
8012 echo "${ECHO_T}no" >&6
8013 fi
8014
8015   test -n "$TIC" && break
8016 done
8017 test -n "$TIC" || TIC="$TIC"
8018
8019 cf_path_prog=""
8020 cf_path_args=""
8021 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8022 for cf_temp in $ac_cv_path_TIC
8023 do
8024         if test -z "$cf_path_prog" ; then
8025                 if test "$with_full_paths" = yes ; then
8026
8027 if test "x$prefix" != xNONE; then
8028         cf_path_syntax="$prefix"
8029 else
8030         cf_path_syntax="$ac_default_prefix"
8031 fi
8032
8033 case ".$cf_temp" in
8034 (.\$\(*\)*|.\'*\'*)
8035         ;;
8036 (..|./*|.\\*)
8037         ;;
8038 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8039         ;;
8040 (.\${*prefix}*|.\${*dir}*)
8041         eval cf_temp="$cf_temp"
8042         case ".$cf_temp" in
8043         (.NONE/*)
8044                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8045                 ;;
8046         esac
8047         ;;
8048 (.no|.NONE/*)
8049         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8050         ;;
8051 (*)
8052         break
8053         ;;
8054 esac
8055
8056                         cf_path_prog="$cf_temp"
8057                 else
8058                         cf_path_prog="`basename $cf_temp`"
8059                 fi
8060         elif test -z "$cf_path_args" ; then
8061                 cf_path_args="$cf_temp"
8062         else
8063                 cf_path_args="$cf_path_args $cf_temp"
8064         fi
8065 done
8066 IFS="$cf_save_ifs"
8067
8068 if test -n "$cf_path_prog" ; then
8069
8070 echo "${as_me:-configure}:8070: testing defining path for ${cf_path_prog} ..." 1>&5
8071
8072 cat >>confdefs.h <<EOF
8073 #define TIC_PATH "$cf_path_prog"
8074 EOF
8075
8076         test -n "$cf_path_args" &&
8077 cat >>confdefs.h <<EOF
8078 #define TIC_ARGS "$cf_path_args"
8079 EOF
8080
8081 fi
8082
8083                 if test -z "$TIC"
8084                 then
8085                         { echo "$as_me:8085: WARNING: no tic program found for fallbacks" >&5
8086 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8087                 fi
8088
8089 fi;
8090
8091 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8092 if test "${with_infocmp_path+set}" = set; then
8093   withval="$with_infocmp_path"
8094   echo "$as_me:8094: checking for infocmp program for fallbacks" >&5
8095 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8096                 INFOCMP=$withval
8097                 echo "$as_me:8097: result: $INFOCMP" >&5
8098 echo "${ECHO_T}$INFOCMP" >&6
8099
8100 if test "x$prefix" != xNONE; then
8101         cf_path_syntax="$prefix"
8102 else
8103         cf_path_syntax="$ac_default_prefix"
8104 fi
8105
8106 case ".$INFOCMP" in
8107 (.\$\(*\)*|.\'*\'*)
8108         ;;
8109 (..|./*|.\\*)
8110         ;;
8111 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8112         ;;
8113 (.\${*prefix}*|.\${*dir}*)
8114         eval INFOCMP="$INFOCMP"
8115         case ".$INFOCMP" in
8116         (.NONE/*)
8117                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8118                 ;;
8119         esac
8120         ;;
8121 (.no|.NONE/*)
8122         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8123         ;;
8124 (*)
8125         { { echo "$as_me:8125: error: expected a pathname, not \"$INFOCMP\"" >&5
8126 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8127    { (exit 1); exit 1; }; }
8128         ;;
8129 esac
8130
8131 else
8132
8133 test -z "$INFOCMP" && INFOCMP=infocmp
8134 for ac_prog in $INFOCMP infocmp
8135 do
8136   # Extract the first word of "$ac_prog", so it can be a program name with args.
8137 set dummy $ac_prog; ac_word=$2
8138 echo "$as_me:8138: checking for $ac_word" >&5
8139 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8140 if test "${ac_cv_path_INFOCMP+set}" = set; then
8141   echo $ECHO_N "(cached) $ECHO_C" >&6
8142 else
8143   case $INFOCMP in
8144   [\\/]* | ?:[\\/]*)
8145   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8146   ;;
8147   *)
8148   ac_save_IFS=$IFS; IFS=$ac_path_separator
8149 ac_dummy="$PATH:/usr/local/ncurses/bin"
8150 for ac_dir in $ac_dummy; do
8151   IFS=$ac_save_IFS
8152   test -z "$ac_dir" && ac_dir=.
8153   if $as_executable_p "$ac_dir/$ac_word"; then
8154    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8155    echo "$as_me:8155: found $ac_dir/$ac_word" >&5
8156    break
8157 fi
8158 done
8159
8160   ;;
8161 esac
8162 fi
8163 INFOCMP=$ac_cv_path_INFOCMP
8164
8165 if test -n "$INFOCMP"; then
8166   echo "$as_me:8166: result: $INFOCMP" >&5
8167 echo "${ECHO_T}$INFOCMP" >&6
8168 else
8169   echo "$as_me:8169: result: no" >&5
8170 echo "${ECHO_T}no" >&6
8171 fi
8172
8173   test -n "$INFOCMP" && break
8174 done
8175 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8176
8177 cf_path_prog=""
8178 cf_path_args=""
8179 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8180 for cf_temp in $ac_cv_path_INFOCMP
8181 do
8182         if test -z "$cf_path_prog" ; then
8183                 if test "$with_full_paths" = yes ; then
8184
8185 if test "x$prefix" != xNONE; then
8186         cf_path_syntax="$prefix"
8187 else
8188         cf_path_syntax="$ac_default_prefix"
8189 fi
8190
8191 case ".$cf_temp" in
8192 (.\$\(*\)*|.\'*\'*)
8193         ;;
8194 (..|./*|.\\*)
8195         ;;
8196 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8197         ;;
8198 (.\${*prefix}*|.\${*dir}*)
8199         eval cf_temp="$cf_temp"
8200         case ".$cf_temp" in
8201         (.NONE/*)
8202                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8203                 ;;
8204         esac
8205         ;;
8206 (.no|.NONE/*)
8207         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8208         ;;
8209 (*)
8210         break
8211         ;;
8212 esac
8213
8214                         cf_path_prog="$cf_temp"
8215                 else
8216                         cf_path_prog="`basename $cf_temp`"
8217                 fi
8218         elif test -z "$cf_path_args" ; then
8219                 cf_path_args="$cf_temp"
8220         else
8221                 cf_path_args="$cf_path_args $cf_temp"
8222         fi
8223 done
8224 IFS="$cf_save_ifs"
8225
8226 if test -n "$cf_path_prog" ; then
8227
8228 echo "${as_me:-configure}:8228: testing defining path for ${cf_path_prog} ..." 1>&5
8229
8230 cat >>confdefs.h <<EOF
8231 #define INFOCMP_PATH "$cf_path_prog"
8232 EOF
8233
8234         test -n "$cf_path_args" &&
8235 cat >>confdefs.h <<EOF
8236 #define INFOCMP_ARGS "$cf_path_args"
8237 EOF
8238
8239 fi
8240
8241                 if test -z "$INFOCMP"
8242                 then
8243                         { echo "$as_me:8243: WARNING: no infocmp program found for fallbacks" >&5
8244 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8245                 fi
8246
8247 fi;
8248
8249 else
8250         : ${TIC:=tic}
8251         : ${INFOCMP:=infocmp}
8252 fi
8253
8254 echo "$as_me:8254: checking if you want modern xterm or antique" >&5
8255 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8256
8257 # Check whether --with-xterm-new or --without-xterm-new was given.
8258 if test "${with_xterm_new+set}" = set; then
8259   withval="$with_xterm_new"
8260   with_xterm_new=$withval
8261 else
8262   with_xterm_new=yes
8263 fi;
8264 case $with_xterm_new in
8265 (no) with_xterm_new=xterm-old;;
8266 (*)      with_xterm_new=xterm-new;;
8267 esac
8268 echo "$as_me:8268: result: $with_xterm_new" >&5
8269 echo "${ECHO_T}$with_xterm_new" >&6
8270 WHICH_XTERM=$with_xterm_new
8271
8272 echo "$as_me:8272: checking if xterm backspace sends BS or DEL" >&5
8273 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8274
8275 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8276 if test "${with_xterm_kbs+set}" = set; then
8277   withval="$with_xterm_kbs"
8278   with_xterm_kbs=$withval
8279 else
8280   with_xterm_kbs=BS
8281 fi;
8282 case x$with_xterm_kbs in
8283 (xyes|xno|xBS|xbs|x8)
8284         with_xterm_kbs=BS
8285         ;;
8286 (xDEL|xdel|x127)
8287         with_xterm_kbs=DEL
8288         ;;
8289 (*)
8290         with_xterm_kbs=$withval
8291         ;;
8292 esac
8293 echo "$as_me:8293: result: $with_xterm_kbs" >&5
8294 echo "${ECHO_T}$with_xterm_kbs" >&6
8295 XTERM_KBS=$with_xterm_kbs
8296
8297 MAKE_TERMINFO=
8298 if test "$use_database" = no ; then
8299         TERMINFO="${datadir}/terminfo"
8300         MAKE_TERMINFO="#"
8301 else
8302
8303 echo "$as_me:8303: checking for list of terminfo directories" >&5
8304 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8305
8306 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8307 if test "${with_terminfo_dirs+set}" = set; then
8308   withval="$with_terminfo_dirs"
8309
8310 else
8311   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8312 fi;
8313 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8314 cf_dst_path=
8315 for cf_src_path in $withval
8316 do
8317
8318 if test "x$prefix" != xNONE; then
8319         cf_path_syntax="$prefix"
8320 else
8321         cf_path_syntax="$ac_default_prefix"
8322 fi
8323
8324 case ".$cf_src_path" in
8325 (.\$\(*\)*|.\'*\'*)
8326         ;;
8327 (..|./*|.\\*)
8328         ;;
8329 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8330         ;;
8331 (.\${*prefix}*|.\${*dir}*)
8332         eval cf_src_path="$cf_src_path"
8333         case ".$cf_src_path" in
8334         (.NONE/*)
8335                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8336                 ;;
8337         esac
8338         ;;
8339 (.no|.NONE/*)
8340         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8341         ;;
8342 (*)
8343         { { echo "$as_me:8343: error: expected a pathname, not \"$cf_src_path\"" >&5
8344 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8345    { (exit 1); exit 1; }; }
8346         ;;
8347 esac
8348
8349   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8350   cf_dst_path="${cf_dst_path}${cf_src_path}"
8351 done
8352 IFS="$ac_save_ifs"
8353
8354 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8355 # so we have to check/work around.  We do prefer the result of "eval"...
8356 eval cf_dst_eval="$cf_dst_path"
8357 case "x$cf_dst_eval" in
8358 (xNONE*)
8359         TERMINFO_DIRS=$cf_dst_path
8360         ;;
8361 (*)
8362         TERMINFO_DIRS="$cf_dst_eval"
8363         ;;
8364 esac
8365
8366 echo "$as_me:8366: result: $TERMINFO_DIRS" >&5
8367 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8368 test -n "$TERMINFO_DIRS" &&
8369 cat >>confdefs.h <<EOF
8370 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8371 EOF
8372
8373 case "x$TERMINFO" in
8374 x???:*)
8375         { echo "$as_me:8375: WARNING: ignoring non-directory/file TERMINFO value" >&5
8376 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8377         unset TERMINFO
8378         ;;
8379 esac
8380
8381 echo "$as_me:8381: checking for default terminfo directory" >&5
8382 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8383
8384 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8385 if test "${with_default_terminfo_dir+set}" = set; then
8386   withval="$with_default_terminfo_dir"
8387
8388 else
8389   withval="${TERMINFO:-${datadir}/terminfo}"
8390 fi; if test -n "${datadir}/terminfo" ; then
8391
8392 if test "x$prefix" != xNONE; then
8393         cf_path_syntax="$prefix"
8394 else
8395         cf_path_syntax="$ac_default_prefix"
8396 fi
8397
8398 case ".$withval" in
8399 (.\$\(*\)*|.\'*\'*)
8400         ;;
8401 (..|./*|.\\*)
8402         ;;
8403 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8404         ;;
8405 (.\${*prefix}*|.\${*dir}*)
8406         eval withval="$withval"
8407         case ".$withval" in
8408         (.NONE/*)
8409                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8410                 ;;
8411         esac
8412         ;;
8413 (.no|.NONE/*)
8414         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8415         ;;
8416 (*)
8417         { { echo "$as_me:8417: error: expected a pathname, not \"$withval\"" >&5
8418 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8419    { (exit 1); exit 1; }; }
8420         ;;
8421 esac
8422
8423 fi
8424 eval TERMINFO="$withval"
8425
8426 echo "$as_me:8426: result: $TERMINFO" >&5
8427 echo "${ECHO_T}$TERMINFO" >&6
8428
8429 cat >>confdefs.h <<EOF
8430 #define TERMINFO "$TERMINFO"
8431 EOF
8432
8433 fi
8434
8435 ###     use option --disable-big-core to make tic run on small machines
8436 ###     We need 4Mb, check if we can allocate 50% more than that.
8437 echo "$as_me:8437: checking if big-core option selected" >&5
8438 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8439
8440 # Check whether --enable-big-core or --disable-big-core was given.
8441 if test "${enable_big_core+set}" = set; then
8442   enableval="$enable_big_core"
8443   with_big_core=$enableval
8444 else
8445   if test "$cross_compiling" = yes; then
8446   with_big_core=no
8447 else
8448   cat >conftest.$ac_ext <<_ACEOF
8449 #line 8449 "configure"
8450 #include "confdefs.h"
8451
8452 #include <stdlib.h>
8453 #include <string.h>
8454 int main() {
8455         unsigned long n = 6000000L;
8456         char *s = malloc(n);
8457         if (s != 0)
8458                 s[0] = s[n-1] = 0;
8459         ${cf_cv_main_return:-return}(s == 0);
8460 }
8461 _ACEOF
8462 rm -f conftest$ac_exeext
8463 if { (eval echo "$as_me:8463: \"$ac_link\"") >&5
8464   (eval $ac_link) 2>&5
8465   ac_status=$?
8466   echo "$as_me:8466: \$? = $ac_status" >&5
8467   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8468   { (eval echo "$as_me:8468: \"$ac_try\"") >&5
8469   (eval $ac_try) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit $ac_status); }; }; then
8473   with_big_core=yes
8474 else
8475   echo "$as_me: program exited with status $ac_status" >&5
8476 echo "$as_me: failed program was:" >&5
8477 cat conftest.$ac_ext >&5
8478 with_big_core=no
8479 fi
8480 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8481 fi
8482 fi;
8483 echo "$as_me:8483: result: $with_big_core" >&5
8484 echo "${ECHO_T}$with_big_core" >&6
8485 test "x$with_big_core" = "xyes" &&
8486 cat >>confdefs.h <<\EOF
8487 #define HAVE_BIG_CORE 1
8488 EOF
8489
8490 ### ISO C only guarantees 512-char strings, we have tables which load faster
8491 ### when constructed using "big" strings.  More than the C compiler, the awk
8492 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8493 echo "$as_me:8493: checking if big-strings option selected" >&5
8494 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8495
8496 # Check whether --enable-big-strings or --disable-big-strings was given.
8497 if test "${enable_big_strings+set}" = set; then
8498   enableval="$enable_big_strings"
8499   with_big_strings=$enableval
8500 else
8501
8502         case x$AWK in
8503         (x)
8504                 eval with_big_strings=no
8505                 ;;
8506         (*)
8507                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8508                         | $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
8509                         eval with_big_strings=yes
8510                 else
8511                         eval with_big_strings=no
8512                 fi
8513                 ;;
8514         esac
8515
8516 fi;
8517 echo "$as_me:8517: result: $with_big_strings" >&5
8518 echo "${ECHO_T}$with_big_strings" >&6
8519
8520 USE_BIG_STRINGS=0
8521 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8522
8523 ###     use option --enable-termcap to compile in the termcap fallback support
8524 echo "$as_me:8524: checking if you want termcap-fallback support" >&5
8525 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8526
8527 # Check whether --enable-termcap or --disable-termcap was given.
8528 if test "${enable_termcap+set}" = set; then
8529   enableval="$enable_termcap"
8530   with_termcap=$enableval
8531 else
8532   with_termcap=no
8533 fi;
8534 echo "$as_me:8534: result: $with_termcap" >&5
8535 echo "${ECHO_T}$with_termcap" >&6
8536
8537 NCURSES_USE_TERMCAP=0
8538 if test "x$with_termcap" != "xyes" ; then
8539         if test "$use_database" = no ; then
8540                 if test -z "$with_fallback" ; then
8541                         { { echo "$as_me:8541: error: You have disabled the database w/o specifying fallbacks" >&5
8542 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8543    { (exit 1); exit 1; }; }
8544                 fi
8545         fi
8546
8547 cat >>confdefs.h <<\EOF
8548 #define PURE_TERMINFO 1
8549 EOF
8550
8551 else
8552
8553         if test "$with_ticlib" != no ; then
8554                 { { echo "$as_me:8554: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8555 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8556    { (exit 1); exit 1; }; }
8557         fi
8558
8559         NCURSES_USE_TERMCAP=1
8560         echo "$as_me:8560: checking for list of termcap files" >&5
8561 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8562
8563 # Check whether --with-termpath or --without-termpath was given.
8564 if test "${with_termpath+set}" = set; then
8565   withval="$with_termpath"
8566
8567 else
8568   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8569 fi;
8570 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8571 cf_dst_path=
8572 for cf_src_path in $withval
8573 do
8574
8575 if test "x$prefix" != xNONE; then
8576         cf_path_syntax="$prefix"
8577 else
8578         cf_path_syntax="$ac_default_prefix"
8579 fi
8580
8581 case ".$cf_src_path" in
8582 (.\$\(*\)*|.\'*\'*)
8583         ;;
8584 (..|./*|.\\*)
8585         ;;
8586 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8587         ;;
8588 (.\${*prefix}*|.\${*dir}*)
8589         eval cf_src_path="$cf_src_path"
8590         case ".$cf_src_path" in
8591         (.NONE/*)
8592                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8593                 ;;
8594         esac
8595         ;;
8596 (.no|.NONE/*)
8597         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8598         ;;
8599 (*)
8600         { { echo "$as_me:8600: error: expected a pathname, not \"$cf_src_path\"" >&5
8601 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8602    { (exit 1); exit 1; }; }
8603         ;;
8604 esac
8605
8606   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8607   cf_dst_path="${cf_dst_path}${cf_src_path}"
8608 done
8609 IFS="$ac_save_ifs"
8610
8611 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8612 # so we have to check/work around.  We do prefer the result of "eval"...
8613 eval cf_dst_eval="$cf_dst_path"
8614 case "x$cf_dst_eval" in
8615 (xNONE*)
8616         TERMPATH=$cf_dst_path
8617         ;;
8618 (*)
8619         TERMPATH="$cf_dst_eval"
8620         ;;
8621 esac
8622
8623         echo "$as_me:8623: result: $TERMPATH" >&5
8624 echo "${ECHO_T}$TERMPATH" >&6
8625         test -n "$TERMPATH" &&
8626 cat >>confdefs.h <<EOF
8627 #define TERMPATH "$TERMPATH"
8628 EOF
8629
8630         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8631         echo "$as_me:8631: checking if fast termcap-loader is needed" >&5
8632 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8633
8634 # Check whether --enable-getcap or --disable-getcap was given.
8635 if test "${enable_getcap+set}" = set; then
8636   enableval="$enable_getcap"
8637   with_getcap=$enableval
8638 else
8639   with_getcap=no
8640 fi;
8641         echo "$as_me:8641: result: $with_getcap" >&5
8642 echo "${ECHO_T}$with_getcap" >&6
8643         test "x$with_getcap" = "xyes" &&
8644 cat >>confdefs.h <<\EOF
8645 #define USE_GETCAP 1
8646 EOF
8647
8648         echo "$as_me:8648: checking if translated termcaps will be cached in ~/.terminfo" >&5
8649 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8650
8651 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8652 if test "${enable_getcap_cache+set}" = set; then
8653   enableval="$enable_getcap_cache"
8654   with_getcap_cache=$enableval
8655 else
8656   with_getcap_cache=no
8657 fi;
8658         echo "$as_me:8658: result: $with_getcap_cache" >&5
8659 echo "${ECHO_T}$with_getcap_cache" >&6
8660         test "x$with_getcap_cache" = "xyes" &&
8661 cat >>confdefs.h <<\EOF
8662 #define USE_GETCAP_CACHE 1
8663 EOF
8664
8665 fi
8666
8667 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8668 echo "$as_me:8668: checking if ~/.terminfo is wanted" >&5
8669 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8670
8671 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8672 if test "${enable_home_terminfo+set}" = set; then
8673   enableval="$enable_home_terminfo"
8674   with_home_terminfo=$enableval
8675 else
8676   with_home_terminfo=yes
8677 fi;
8678 echo "$as_me:8678: result: $with_home_terminfo" >&5
8679 echo "${ECHO_T}$with_home_terminfo" >&6
8680 test "x$with_home_terminfo" = "xyes" &&
8681 cat >>confdefs.h <<\EOF
8682 #define USE_HOME_TERMINFO 1
8683 EOF
8684
8685 echo "$as_me:8685: checking if you want to use restricted environment when running as root" >&5
8686 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8687
8688 # Check whether --enable-root-environ or --disable-root-environ was given.
8689 if test "${enable_root_environ+set}" = set; then
8690   enableval="$enable_root_environ"
8691   with_root_environ=$enableval
8692 else
8693   with_root_environ=yes
8694 fi;
8695 echo "$as_me:8695: result: $with_root_environ" >&5
8696 echo "${ECHO_T}$with_root_environ" >&6
8697 test "x$with_root_environ" = xyes &&
8698 cat >>confdefs.h <<\EOF
8699 #define USE_ROOT_ENVIRON 1
8700 EOF
8701
8702 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8703 ###   to reduce storage requirements for the terminfo database.
8704
8705 for ac_header in \
8706 unistd.h \
8707
8708 do
8709 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8710 echo "$as_me:8710: checking for $ac_header" >&5
8711 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8712 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8713   echo $ECHO_N "(cached) $ECHO_C" >&6
8714 else
8715   cat >conftest.$ac_ext <<_ACEOF
8716 #line 8716 "configure"
8717 #include "confdefs.h"
8718 #include <$ac_header>
8719 _ACEOF
8720 if { (eval echo "$as_me:8720: \"$ac_cpp conftest.$ac_ext\"") >&5
8721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8722   ac_status=$?
8723   egrep -v '^ *\+' conftest.er1 >conftest.err
8724   rm -f conftest.er1
8725   cat conftest.err >&5
8726   echo "$as_me:8726: \$? = $ac_status" >&5
8727   (exit $ac_status); } >/dev/null; then
8728   if test -s conftest.err; then
8729     ac_cpp_err=$ac_c_preproc_warn_flag
8730   else
8731     ac_cpp_err=
8732   fi
8733 else
8734   ac_cpp_err=yes
8735 fi
8736 if test -z "$ac_cpp_err"; then
8737   eval "$as_ac_Header=yes"
8738 else
8739   echo "$as_me: failed program was:" >&5
8740   cat conftest.$ac_ext >&5
8741   eval "$as_ac_Header=no"
8742 fi
8743 rm -f conftest.err conftest.$ac_ext
8744 fi
8745 echo "$as_me:8745: result: `eval echo '${'$as_ac_Header'}'`" >&5
8746 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8748   cat >>confdefs.h <<EOF
8749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8750 EOF
8751
8752 fi
8753 done
8754
8755 for ac_func in \
8756         remove \
8757         unlink
8758 do
8759 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8760 echo "$as_me:8760: checking for $ac_func" >&5
8761 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8762 if eval "test \"\${$as_ac_var+set}\" = set"; then
8763   echo $ECHO_N "(cached) $ECHO_C" >&6
8764 else
8765   cat >conftest.$ac_ext <<_ACEOF
8766 #line 8766 "configure"
8767 #include "confdefs.h"
8768 #define $ac_func autoconf_temporary
8769 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8770 #undef $ac_func
8771
8772 #ifdef __cplusplus
8773 extern "C"
8774 #endif
8775
8776 /* We use char because int might match the return type of a gcc2
8777    builtin and then its argument prototype would still apply.  */
8778 char $ac_func (void);
8779
8780 int
8781 main (void)
8782 {
8783
8784 /* The GNU C library defines stubs for functions which it implements
8785     to always fail with ENOSYS.  Some functions are actually named
8786     something starting with __ and the normal name is an alias.  */
8787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8788 #error found stub for $ac_func
8789 #endif
8790
8791         return $ac_func ();
8792   ;
8793   return 0;
8794 }
8795 _ACEOF
8796 rm -f conftest.$ac_objext conftest$ac_exeext
8797 if { (eval echo "$as_me:8797: \"$ac_link\"") >&5
8798   (eval $ac_link) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); } &&
8802          { ac_try='test -s conftest$ac_exeext'
8803   { (eval echo "$as_me:8803: \"$ac_try\"") >&5
8804   (eval $ac_try) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); }; }; then
8808   eval "$as_ac_var=yes"
8809 else
8810   echo "$as_me: failed program was:" >&5
8811 cat conftest.$ac_ext >&5
8812 eval "$as_ac_var=no"
8813 fi
8814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8815 fi
8816 echo "$as_me:8816: result: `eval echo '${'$as_ac_var'}'`" >&5
8817 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8818 if test `eval echo '${'$as_ac_var'}'` = yes; then
8819   cat >>confdefs.h <<EOF
8820 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8821 EOF
8822
8823 fi
8824 done
8825
8826 if test "$cross_compiling" = yes ; then
8827
8828 for ac_func in \
8829                 link \
8830                 symlink
8831 do
8832 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8833 echo "$as_me:8833: checking for $ac_func" >&5
8834 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8835 if eval "test \"\${$as_ac_var+set}\" = set"; then
8836   echo $ECHO_N "(cached) $ECHO_C" >&6
8837 else
8838   cat >conftest.$ac_ext <<_ACEOF
8839 #line 8839 "configure"
8840 #include "confdefs.h"
8841 #define $ac_func autoconf_temporary
8842 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8843 #undef $ac_func
8844
8845 #ifdef __cplusplus
8846 extern "C"
8847 #endif
8848
8849 /* We use char because int might match the return type of a gcc2
8850    builtin and then its argument prototype would still apply.  */
8851 char $ac_func (void);
8852
8853 int
8854 main (void)
8855 {
8856
8857 /* The GNU C library defines stubs for functions which it implements
8858     to always fail with ENOSYS.  Some functions are actually named
8859     something starting with __ and the normal name is an alias.  */
8860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8861 #error found stub for $ac_func
8862 #endif
8863
8864         return $ac_func ();
8865   ;
8866   return 0;
8867 }
8868 _ACEOF
8869 rm -f conftest.$ac_objext conftest$ac_exeext
8870 if { (eval echo "$as_me:8870: \"$ac_link\"") >&5
8871   (eval $ac_link) 2>&5
8872   ac_status=$?
8873   echo "$as_me:8873: \$? = $ac_status" >&5
8874   (exit $ac_status); } &&
8875          { ac_try='test -s conftest$ac_exeext'
8876   { (eval echo "$as_me:8876: \"$ac_try\"") >&5
8877   (eval $ac_try) 2>&5
8878   ac_status=$?
8879   echo "$as_me:8879: \$? = $ac_status" >&5
8880   (exit $ac_status); }; }; then
8881   eval "$as_ac_var=yes"
8882 else
8883   echo "$as_me: failed program was:" >&5
8884 cat conftest.$ac_ext >&5
8885 eval "$as_ac_var=no"
8886 fi
8887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8888 fi
8889 echo "$as_me:8889: result: `eval echo '${'$as_ac_var'}'`" >&5
8890 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8891 if test `eval echo '${'$as_ac_var'}'` = yes; then
8892   cat >>confdefs.h <<EOF
8893 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8894 EOF
8895
8896 fi
8897 done
8898
8899 else
8900         echo "$as_me:8900: checking if link/symlink functions work" >&5
8901 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8902 if test "${cf_cv_link_funcs+set}" = set; then
8903   echo $ECHO_N "(cached) $ECHO_C" >&6
8904 else
8905
8906                 cf_cv_link_funcs=
8907                 for cf_func in link symlink ; do
8908                         if test "$cross_compiling" = yes; then
8909
8910                         eval 'ac_cv_func_'$cf_func'=error'
8911 else
8912   cat >conftest.$ac_ext <<_ACEOF
8913 #line 8913 "configure"
8914 #include "confdefs.h"
8915
8916 #include <sys/types.h>
8917 #include <sys/stat.h>
8918 #ifdef HAVE_UNISTD_H
8919 #include <unistd.h>
8920 #endif
8921 int main(void)
8922 {
8923         int fail = 0;
8924         char *src = "config.log";
8925         char *dst = "conftest.chk";
8926         struct stat src_sb;
8927         struct stat dst_sb;
8928
8929         stat(src, &src_sb);
8930         fail = ($cf_func("config.log", "conftest.chk") < 0)
8931             || (stat(dst, &dst_sb) < 0)
8932             || (dst_sb.st_mtime != src_sb.st_mtime);
8933 #ifdef HAVE_UNLINK
8934         unlink(dst);
8935 #else
8936         remove(dst);
8937 #endif
8938         ${cf_cv_main_return:-return} (fail);
8939 }
8940
8941 _ACEOF
8942 rm -f conftest$ac_exeext
8943 if { (eval echo "$as_me:8943: \"$ac_link\"") >&5
8944   (eval $ac_link) 2>&5
8945   ac_status=$?
8946   echo "$as_me:8946: \$? = $ac_status" >&5
8947   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8948   { (eval echo "$as_me:8948: \"$ac_try\"") >&5
8949   (eval $ac_try) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); }; }; then
8953
8954                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8955                         eval 'ac_cv_func_'$cf_func'=yes'
8956 else
8957   echo "$as_me: program exited with status $ac_status" >&5
8958 echo "$as_me: failed program was:" >&5
8959 cat conftest.$ac_ext >&5
8960
8961                         eval 'ac_cv_func_'$cf_func'=no'
8962 fi
8963 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8964 fi
8965                 done
8966                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8967
8968 fi
8969 echo "$as_me:8969: result: $cf_cv_link_funcs" >&5
8970 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8971         test "$ac_cv_func_link"    = yes &&
8972 cat >>confdefs.h <<\EOF
8973 #define HAVE_LINK 1
8974 EOF
8975
8976         test "$ac_cv_func_symlink" = yes &&
8977 cat >>confdefs.h <<\EOF
8978 #define HAVE_SYMLINK 1
8979 EOF
8980
8981 fi
8982
8983 with_links=no
8984 with_symlinks=no
8985
8986 # soft links (symbolic links) are useful for some systems where hard links do
8987 # not work, or to make it simpler to copy terminfo trees around.
8988 if test "x$ac_cv_func_symlink" = xyes ; then
8989         echo "$as_me:8989: checking if tic should use symbolic links" >&5
8990 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8991
8992 # Check whether --enable-symlinks or --disable-symlinks was given.
8993 if test "${enable_symlinks+set}" = set; then
8994   enableval="$enable_symlinks"
8995   with_symlinks=$enableval
8996 else
8997   with_symlinks=no
8998 fi;
8999         echo "$as_me:8999: result: $with_symlinks" >&5
9000 echo "${ECHO_T}$with_symlinks" >&6
9001 fi
9002
9003 # If we have hard links and did not choose to use soft links instead, there is
9004 # no reason to make this choice optional - use the hard links.
9005 if test "$with_symlinks" = no ; then
9006         echo "$as_me:9006: checking if tic should use hard links" >&5
9007 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9008         if test "x$ac_cv_func_link" = xyes ; then
9009                 with_links=yes
9010         else
9011                 with_links=no
9012         fi
9013         echo "$as_me:9013: result: $with_links" >&5
9014 echo "${ECHO_T}$with_links" >&6
9015 fi
9016
9017 test "x$with_links" = xyes &&
9018 cat >>confdefs.h <<\EOF
9019 #define USE_LINKS 1
9020 EOF
9021
9022 test "x$with_symlinks" = xyes &&
9023 cat >>confdefs.h <<\EOF
9024 #define USE_SYMLINKS 1
9025 EOF
9026
9027 ###   use option --enable-broken-linker to force on use of broken-linker support
9028 echo "$as_me:9028: checking if you want broken-linker support code" >&5
9029 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9030
9031 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9032 if test "${enable_broken_linker+set}" = set; then
9033   enableval="$enable_broken_linker"
9034   with_broken_linker=$enableval
9035 else
9036   with_broken_linker=${BROKEN_LINKER:-no}
9037 fi;
9038 echo "$as_me:9038: result: $with_broken_linker" >&5
9039 echo "${ECHO_T}$with_broken_linker" >&6
9040
9041 BROKEN_LINKER=0
9042 if test "x$with_broken_linker" = xyes ; then
9043
9044 cat >>confdefs.h <<\EOF
9045 #define BROKEN_LINKER 1
9046 EOF
9047
9048         BROKEN_LINKER=1
9049 elif test "$DFT_LWR_MODEL" = shared ; then
9050         case $cf_cv_system_name in
9051         (cygwin*)
9052
9053 cat >>confdefs.h <<\EOF
9054 #define BROKEN_LINKER 1
9055 EOF
9056
9057                 BROKEN_LINKER=1
9058                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
9059
9060 echo "${as_me:-configure}:9060: testing cygwin linker is broken anyway ..." 1>&5
9061
9062                 ;;
9063         esac
9064 fi
9065
9066 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9067 echo "$as_me:9067: checking if tputs should process BSD-style prefix padding" >&5
9068 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9069
9070 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9071 if test "${enable_bsdpad+set}" = set; then
9072   enableval="$enable_bsdpad"
9073   with_bsdpad=$enableval
9074 else
9075   with_bsdpad=no
9076 fi;
9077 echo "$as_me:9077: result: $with_bsdpad" >&5
9078 echo "${ECHO_T}$with_bsdpad" >&6
9079 test "x$with_bsdpad" = xyes &&
9080 cat >>confdefs.h <<\EOF
9081 #define BSD_TPUTS 1
9082 EOF
9083
9084 ###   use option --enable-widec to turn on use of wide-character support
9085 NCURSES_CH_T=chtype
9086 NCURSES_LIBUTF8=0
9087
9088 NEED_WCHAR_H=0
9089 NCURSES_MBSTATE_T=0
9090 NCURSES_WCHAR_T=0
9091 NCURSES_WINT_T=0
9092
9093 # Check to define _XOPEN_SOURCE "automatically"
9094 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9095
9096 echo "$as_me:9096: checking if the POSIX test-macros are already defined" >&5
9097 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9098 if test "${cf_cv_posix_visible+set}" = set; then
9099   echo $ECHO_N "(cached) $ECHO_C" >&6
9100 else
9101
9102 cat >conftest.$ac_ext <<_ACEOF
9103 #line 9103 "configure"
9104 #include "confdefs.h"
9105 #include <stdio.h>
9106 int
9107 main (void)
9108 {
9109
9110 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9111         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9112         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9113         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9114 #error conflicting symbols found
9115 #endif
9116
9117   ;
9118   return 0;
9119 }
9120 _ACEOF
9121 rm -f conftest.$ac_objext
9122 if { (eval echo "$as_me:9122: \"$ac_compile\"") >&5
9123   (eval $ac_compile) 2>&5
9124   ac_status=$?
9125   echo "$as_me:9125: \$? = $ac_status" >&5
9126   (exit $ac_status); } &&
9127          { ac_try='test -s conftest.$ac_objext'
9128   { (eval echo "$as_me:9128: \"$ac_try\"") >&5
9129   (eval $ac_try) 2>&5
9130   ac_status=$?
9131   echo "$as_me:9131: \$? = $ac_status" >&5
9132   (exit $ac_status); }; }; then
9133   cf_cv_posix_visible=no
9134 else
9135   echo "$as_me: failed program was:" >&5
9136 cat conftest.$ac_ext >&5
9137 cf_cv_posix_visible=yes
9138 fi
9139 rm -f conftest.$ac_objext conftest.$ac_ext
9140
9141 fi
9142 echo "$as_me:9142: result: $cf_cv_posix_visible" >&5
9143 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9144
9145 if test "$cf_cv_posix_visible" = no; then
9146
9147 cf_XOPEN_SOURCE=600
9148 cf_POSIX_C_SOURCE=199506L
9149 cf_xopen_source=
9150
9151 case $host_os in
9152 (aix[4-7]*)
9153         cf_xopen_source="-D_ALL_SOURCE"
9154         ;;
9155 (msys)
9156         cf_XOPEN_SOURCE=600
9157         ;;
9158 (darwin[0-8].*)
9159         cf_xopen_source="-D_APPLE_C_SOURCE"
9160         ;;
9161 (darwin*)
9162         cf_xopen_source="-D_DARWIN_C_SOURCE"
9163         cf_XOPEN_SOURCE=
9164         ;;
9165 (freebsd*|dragonfly*|midnightbsd*)
9166         # 5.x headers associate
9167         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9168         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9169         cf_POSIX_C_SOURCE=200112L
9170         cf_XOPEN_SOURCE=600
9171         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9172         ;;
9173 (hpux11*)
9174         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9175         ;;
9176 (hpux*)
9177         cf_xopen_source="-D_HPUX_SOURCE"
9178         ;;
9179 (irix[56].*)
9180         cf_xopen_source="-D_SGI_SOURCE"
9181         cf_XOPEN_SOURCE=
9182         ;;
9183 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9184
9185 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9186
9187 echo "$as_me:9187: checking if this is the GNU C library" >&5
9188 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9189 if test "${cf_cv_gnu_library+set}" = set; then
9190   echo $ECHO_N "(cached) $ECHO_C" >&6
9191 else
9192
9193 cat >conftest.$ac_ext <<_ACEOF
9194 #line 9194 "configure"
9195 #include "confdefs.h"
9196 #include <sys/types.h>
9197 int
9198 main (void)
9199 {
9200
9201         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9202                 return 0;
9203         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9204                 return 0;
9205         #else
9206         #       error not GNU C library
9207         #endif
9208   ;
9209   return 0;
9210 }
9211 _ACEOF
9212 rm -f conftest.$ac_objext
9213 if { (eval echo "$as_me:9213: \"$ac_compile\"") >&5
9214   (eval $ac_compile) 2>&5
9215   ac_status=$?
9216   echo "$as_me:9216: \$? = $ac_status" >&5
9217   (exit $ac_status); } &&
9218          { ac_try='test -s conftest.$ac_objext'
9219   { (eval echo "$as_me:9219: \"$ac_try\"") >&5
9220   (eval $ac_try) 2>&5
9221   ac_status=$?
9222   echo "$as_me:9222: \$? = $ac_status" >&5
9223   (exit $ac_status); }; }; then
9224   cf_cv_gnu_library=yes
9225 else
9226   echo "$as_me: failed program was:" >&5
9227 cat conftest.$ac_ext >&5
9228 cf_cv_gnu_library=no
9229 fi
9230 rm -f conftest.$ac_objext conftest.$ac_ext
9231
9232 fi
9233 echo "$as_me:9233: result: $cf_cv_gnu_library" >&5
9234 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9235
9236 if test x$cf_cv_gnu_library = xyes; then
9237
9238         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9239         # was changed to help a little.  newlib incorporated the change about 4
9240         # years later.
9241         echo "$as_me:9241: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9242 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9243 if test "${cf_cv_gnu_library_219+set}" = set; then
9244   echo $ECHO_N "(cached) $ECHO_C" >&6
9245 else
9246
9247                 cf_save="$CPPFLAGS"
9248
9249         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9250         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9251
9252                 cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 #include <sys/types.h>
9256 int
9257 main (void)
9258 {
9259
9260                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9261                                 return 0;
9262                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9263                                 return 0;
9264                         #else
9265                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9266                         #endif
9267   ;
9268   return 0;
9269 }
9270 _ACEOF
9271 rm -f conftest.$ac_objext
9272 if { (eval echo "$as_me:9272: \"$ac_compile\"") >&5
9273   (eval $ac_compile) 2>&5
9274   ac_status=$?
9275   echo "$as_me:9275: \$? = $ac_status" >&5
9276   (exit $ac_status); } &&
9277          { ac_try='test -s conftest.$ac_objext'
9278   { (eval echo "$as_me:9278: \"$ac_try\"") >&5
9279   (eval $ac_try) 2>&5
9280   ac_status=$?
9281   echo "$as_me:9281: \$? = $ac_status" >&5
9282   (exit $ac_status); }; }; then
9283   cf_cv_gnu_library_219=yes
9284 else
9285   echo "$as_me: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9287 cf_cv_gnu_library_219=no
9288 fi
9289 rm -f conftest.$ac_objext conftest.$ac_ext
9290                 CPPFLAGS="$cf_save"
9291
9292 fi
9293 echo "$as_me:9293: result: $cf_cv_gnu_library_219" >&5
9294 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9295
9296         if test "x$cf_cv_gnu_library_219" = xyes; then
9297                 cf_save="$CPPFLAGS"
9298                 echo "$as_me:9298: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9299 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9300 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9301   echo $ECHO_N "(cached) $ECHO_C" >&6
9302 else
9303
9304 cf_fix_cppflags=no
9305 cf_new_cflags=
9306 cf_new_cppflags=
9307 cf_new_extra_cppflags=
9308
9309 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9310 do
9311 case $cf_fix_cppflags in
9312 (no)
9313         case $cf_add_cflags in
9314         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9315                 case $cf_add_cflags in
9316                 (-D*)
9317                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9318
9319                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9320                                 && test -z "${cf_tst_cflags}" \
9321                                 && cf_fix_cppflags=yes
9322
9323                         if test $cf_fix_cppflags = yes ; then
9324
9325         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9326         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9327
9328                                 continue
9329                         elif test "${cf_tst_cflags}" = "\"'" ; then
9330
9331         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9332         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9333
9334                                 continue
9335                         fi
9336                         ;;
9337                 esac
9338                 case "$CPPFLAGS" in
9339                 (*$cf_add_cflags)
9340                         ;;
9341                 (*)
9342                         case $cf_add_cflags in
9343                         (-D*)
9344                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9345
9346 CPPFLAGS=`echo "$CPPFLAGS" | \
9347         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9348                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9349
9350                                 ;;
9351                         esac
9352
9353         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9354         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9355
9356                         ;;
9357                 esac
9358                 ;;
9359         (*)
9360
9361         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9362         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9363
9364                 ;;
9365         esac
9366         ;;
9367 (yes)
9368
9369         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9370         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9371
9372         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9373
9374         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9375                 && test -z "${cf_tst_cflags}" \
9376                 && cf_fix_cppflags=no
9377         ;;
9378 esac
9379 done
9380
9381 if test -n "$cf_new_cflags" ; then
9382
9383         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9384         CFLAGS="${CFLAGS}$cf_new_cflags"
9385
9386 fi
9387
9388 if test -n "$cf_new_cppflags" ; then
9389
9390         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9391         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9392
9393 fi
9394
9395 if test -n "$cf_new_extra_cppflags" ; then
9396
9397         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9398         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9399
9400 fi
9401
9402                         cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405
9406                                 #include <limits.h>
9407                                 #include <sys/types.h>
9408
9409 int
9410 main (void)
9411 {
9412
9413                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9414                                         return 0;
9415                                 #else
9416                                 #       error GNU C library is too old
9417                                 #endif
9418   ;
9419   return 0;
9420 }
9421 _ACEOF
9422 rm -f conftest.$ac_objext
9423 if { (eval echo "$as_me:9423: \"$ac_compile\"") >&5
9424   (eval $ac_compile) 2>&5
9425   ac_status=$?
9426   echo "$as_me:9426: \$? = $ac_status" >&5
9427   (exit $ac_status); } &&
9428          { ac_try='test -s conftest.$ac_objext'
9429   { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9430   (eval $ac_try) 2>&5
9431   ac_status=$?
9432   echo "$as_me:9432: \$? = $ac_status" >&5
9433   (exit $ac_status); }; }; then
9434   cf_cv_gnu_dftsrc_219=yes
9435 else
9436   echo "$as_me: failed program was:" >&5
9437 cat conftest.$ac_ext >&5
9438 cf_cv_gnu_dftsrc_219=no
9439 fi
9440 rm -f conftest.$ac_objext conftest.$ac_ext
9441
9442 fi
9443 echo "$as_me:9443: result: $cf_cv_gnu_dftsrc_219" >&5
9444 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9445                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9446         else
9447                 cf_cv_gnu_dftsrc_219=maybe
9448         fi
9449
9450         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9451
9452                 echo "$as_me:9452: checking if we must define _GNU_SOURCE" >&5
9453 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9454 if test "${cf_cv_gnu_source+set}" = set; then
9455   echo $ECHO_N "(cached) $ECHO_C" >&6
9456 else
9457
9458                 cat >conftest.$ac_ext <<_ACEOF
9459 #line 9459 "configure"
9460 #include "confdefs.h"
9461 #include <sys/types.h>
9462 int
9463 main (void)
9464 {
9465
9466                         #ifndef _XOPEN_SOURCE
9467                         #error  expected _XOPEN_SOURCE to be defined
9468                         #endif
9469   ;
9470   return 0;
9471 }
9472 _ACEOF
9473 rm -f conftest.$ac_objext
9474 if { (eval echo "$as_me:9474: \"$ac_compile\"") >&5
9475   (eval $ac_compile) 2>&5
9476   ac_status=$?
9477   echo "$as_me:9477: \$? = $ac_status" >&5
9478   (exit $ac_status); } &&
9479          { ac_try='test -s conftest.$ac_objext'
9480   { (eval echo "$as_me:9480: \"$ac_try\"") >&5
9481   (eval $ac_try) 2>&5
9482   ac_status=$?
9483   echo "$as_me:9483: \$? = $ac_status" >&5
9484   (exit $ac_status); }; }; then
9485   cf_cv_gnu_source=no
9486 else
9487   echo "$as_me: failed program was:" >&5
9488 cat conftest.$ac_ext >&5
9489 cf_save="$CPPFLAGS"
9490
9491 cf_fix_cppflags=no
9492 cf_new_cflags=
9493 cf_new_cppflags=
9494 cf_new_extra_cppflags=
9495
9496 for cf_add_cflags in -D_GNU_SOURCE
9497 do
9498 case $cf_fix_cppflags in
9499 (no)
9500         case $cf_add_cflags in
9501         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9502                 case $cf_add_cflags in
9503                 (-D*)
9504                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9505
9506                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9507                                 && test -z "${cf_tst_cflags}" \
9508                                 && cf_fix_cppflags=yes
9509
9510                         if test $cf_fix_cppflags = yes ; then
9511
9512         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9513         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9514
9515                                 continue
9516                         elif test "${cf_tst_cflags}" = "\"'" ; then
9517
9518         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9519         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9520
9521                                 continue
9522                         fi
9523                         ;;
9524                 esac
9525                 case "$CPPFLAGS" in
9526                 (*$cf_add_cflags)
9527                         ;;
9528                 (*)
9529                         case $cf_add_cflags in
9530                         (-D*)
9531                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9532
9533 CPPFLAGS=`echo "$CPPFLAGS" | \
9534         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9535                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9536
9537                                 ;;
9538                         esac
9539
9540         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9541         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9542
9543                         ;;
9544                 esac
9545                 ;;
9546         (*)
9547
9548         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9549         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9550
9551                 ;;
9552         esac
9553         ;;
9554 (yes)
9555
9556         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9557         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9558
9559         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9560
9561         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9562                 && test -z "${cf_tst_cflags}" \
9563                 && cf_fix_cppflags=no
9564         ;;
9565 esac
9566 done
9567
9568 if test -n "$cf_new_cflags" ; then
9569
9570         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9571         CFLAGS="${CFLAGS}$cf_new_cflags"
9572
9573 fi
9574
9575 if test -n "$cf_new_cppflags" ; then
9576
9577         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9578         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9579
9580 fi
9581
9582 if test -n "$cf_new_extra_cppflags" ; then
9583
9584         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9585         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9586
9587 fi
9588
9589                          cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592 #include <sys/types.h>
9593 int
9594 main (void)
9595 {
9596
9597                                 #ifdef _XOPEN_SOURCE
9598                                 #error  expected _XOPEN_SOURCE to be undefined
9599                                 #endif
9600   ;
9601   return 0;
9602 }
9603 _ACEOF
9604 rm -f conftest.$ac_objext
9605 if { (eval echo "$as_me:9605: \"$ac_compile\"") >&5
9606   (eval $ac_compile) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); } &&
9610          { ac_try='test -s conftest.$ac_objext'
9611   { (eval echo "$as_me:9611: \"$ac_try\"") >&5
9612   (eval $ac_try) 2>&5
9613   ac_status=$?
9614   echo "$as_me:9614: \$? = $ac_status" >&5
9615   (exit $ac_status); }; }; then
9616   cf_cv_gnu_source=no
9617 else
9618   echo "$as_me: failed program was:" >&5
9619 cat conftest.$ac_ext >&5
9620 cf_cv_gnu_source=yes
9621 fi
9622 rm -f conftest.$ac_objext conftest.$ac_ext
9623                         CPPFLAGS="$cf_save"
9624
9625 fi
9626 rm -f conftest.$ac_objext conftest.$ac_ext
9627
9628 fi
9629 echo "$as_me:9629: result: $cf_cv_gnu_source" >&5
9630 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9631
9632                 if test "$cf_cv_gnu_source" = yes
9633                 then
9634                 echo "$as_me:9634: checking if we should also define _DEFAULT_SOURCE" >&5
9635 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9636 if test "${cf_cv_default_source+set}" = set; then
9637   echo $ECHO_N "(cached) $ECHO_C" >&6
9638 else
9639
9640         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9641         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9642
9643                         cat >conftest.$ac_ext <<_ACEOF
9644 #line 9644 "configure"
9645 #include "confdefs.h"
9646 #include <sys/types.h>
9647 int
9648 main (void)
9649 {
9650
9651                                 #ifdef _DEFAULT_SOURCE
9652                                 #error  expected _DEFAULT_SOURCE to be undefined
9653                                 #endif
9654   ;
9655   return 0;
9656 }
9657 _ACEOF
9658 rm -f conftest.$ac_objext
9659 if { (eval echo "$as_me:9659: \"$ac_compile\"") >&5
9660   (eval $ac_compile) 2>&5
9661   ac_status=$?
9662   echo "$as_me:9662: \$? = $ac_status" >&5
9663   (exit $ac_status); } &&
9664          { ac_try='test -s conftest.$ac_objext'
9665   { (eval echo "$as_me:9665: \"$ac_try\"") >&5
9666   (eval $ac_try) 2>&5
9667   ac_status=$?
9668   echo "$as_me:9668: \$? = $ac_status" >&5
9669   (exit $ac_status); }; }; then
9670   cf_cv_default_source=no
9671 else
9672   echo "$as_me: failed program was:" >&5
9673 cat conftest.$ac_ext >&5
9674 cf_cv_default_source=yes
9675 fi
9676 rm -f conftest.$ac_objext conftest.$ac_ext
9677
9678 fi
9679 echo "$as_me:9679: result: $cf_cv_default_source" >&5
9680 echo "${ECHO_T}$cf_cv_default_source" >&6
9681                         if test "$cf_cv_default_source" = yes
9682                         then
9683
9684         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9685         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9686
9687                         fi
9688                 fi
9689         fi
9690
9691 fi
9692
9693         ;;
9694 (minix*)
9695         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9696         ;;
9697 (mirbsd*)
9698         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9699         cf_XOPEN_SOURCE=
9700
9701 if test "$cf_cv_posix_visible" = no; then
9702
9703 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9704
9705 cf_save_CFLAGS="$CFLAGS"
9706 cf_save_CPPFLAGS="$CPPFLAGS"
9707
9708 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9709         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9710                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9711
9712 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9713         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9714                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9715
9716 echo "$as_me:9716: checking if we should define _POSIX_C_SOURCE" >&5
9717 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9718 if test "${cf_cv_posix_c_source+set}" = set; then
9719   echo $ECHO_N "(cached) $ECHO_C" >&6
9720 else
9721
9722 echo "${as_me:-configure}:9722: testing if the symbol is already defined go no further ..." 1>&5
9723
9724         cat >conftest.$ac_ext <<_ACEOF
9725 #line 9725 "configure"
9726 #include "confdefs.h"
9727 #include <sys/types.h>
9728 int
9729 main (void)
9730 {
9731
9732 #ifndef _POSIX_C_SOURCE
9733 make an error
9734 #endif
9735   ;
9736   return 0;
9737 }
9738 _ACEOF
9739 rm -f conftest.$ac_objext
9740 if { (eval echo "$as_me:9740: \"$ac_compile\"") >&5
9741   (eval $ac_compile) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); } &&
9745          { ac_try='test -s conftest.$ac_objext'
9746   { (eval echo "$as_me:9746: \"$ac_try\"") >&5
9747   (eval $ac_try) 2>&5
9748   ac_status=$?
9749   echo "$as_me:9749: \$? = $ac_status" >&5
9750   (exit $ac_status); }; }; then
9751   cf_cv_posix_c_source=no
9752 else
9753   echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 cf_want_posix_source=no
9756          case .$cf_POSIX_C_SOURCE in
9757          (.[12]??*)
9758                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9759                 ;;
9760          (.2)
9761                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9762                 cf_want_posix_source=yes
9763                 ;;
9764          (.*)
9765                 cf_want_posix_source=yes
9766                 ;;
9767          esac
9768          if test "$cf_want_posix_source" = yes ; then
9769                 cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9772 #include <sys/types.h>
9773 int
9774 main (void)
9775 {
9776
9777 #ifdef _POSIX_SOURCE
9778 make an error
9779 #endif
9780   ;
9781   return 0;
9782 }
9783 _ACEOF
9784 rm -f conftest.$ac_objext
9785 if { (eval echo "$as_me:9785: \"$ac_compile\"") >&5
9786   (eval $ac_compile) 2>&5
9787   ac_status=$?
9788   echo "$as_me:9788: \$? = $ac_status" >&5
9789   (exit $ac_status); } &&
9790          { ac_try='test -s conftest.$ac_objext'
9791   { (eval echo "$as_me:9791: \"$ac_try\"") >&5
9792   (eval $ac_try) 2>&5
9793   ac_status=$?
9794   echo "$as_me:9794: \$? = $ac_status" >&5
9795   (exit $ac_status); }; }; then
9796   :
9797 else
9798   echo "$as_me: failed program was:" >&5
9799 cat conftest.$ac_ext >&5
9800 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9801 fi
9802 rm -f conftest.$ac_objext conftest.$ac_ext
9803          fi
9804
9805 echo "${as_me:-configure}:9805: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9806
9807          CFLAGS="$cf_trim_CFLAGS"
9808          CPPFLAGS="$cf_trim_CPPFLAGS"
9809
9810         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9811         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9812
9813 echo "${as_me:-configure}:9813: testing if the second compile does not leave our definition intact error ..." 1>&5
9814
9815          cat >conftest.$ac_ext <<_ACEOF
9816 #line 9816 "configure"
9817 #include "confdefs.h"
9818 #include <sys/types.h>
9819 int
9820 main (void)
9821 {
9822
9823 #ifndef _POSIX_C_SOURCE
9824 make an error
9825 #endif
9826   ;
9827   return 0;
9828 }
9829 _ACEOF
9830 rm -f conftest.$ac_objext
9831 if { (eval echo "$as_me:9831: \"$ac_compile\"") >&5
9832   (eval $ac_compile) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit $ac_status); } &&
9836          { ac_try='test -s conftest.$ac_objext'
9837   { (eval echo "$as_me:9837: \"$ac_try\"") >&5
9838   (eval $ac_try) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); }; }; then
9842   :
9843 else
9844   echo "$as_me: failed program was:" >&5
9845 cat conftest.$ac_ext >&5
9846 cf_cv_posix_c_source=no
9847 fi
9848 rm -f conftest.$ac_objext conftest.$ac_ext
9849          CFLAGS="$cf_save_CFLAGS"
9850          CPPFLAGS="$cf_save_CPPFLAGS"
9851
9852 fi
9853 rm -f conftest.$ac_objext conftest.$ac_ext
9854
9855 fi
9856 echo "$as_me:9856: result: $cf_cv_posix_c_source" >&5
9857 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9858
9859 if test "$cf_cv_posix_c_source" != no ; then
9860         CFLAGS="$cf_trim_CFLAGS"
9861         CPPFLAGS="$cf_trim_CPPFLAGS"
9862
9863 cf_fix_cppflags=no
9864 cf_new_cflags=
9865 cf_new_cppflags=
9866 cf_new_extra_cppflags=
9867
9868 for cf_add_cflags in $cf_cv_posix_c_source
9869 do
9870 case $cf_fix_cppflags in
9871 (no)
9872         case $cf_add_cflags in
9873         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9874                 case $cf_add_cflags in
9875                 (-D*)
9876                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9877
9878                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9879                                 && test -z "${cf_tst_cflags}" \
9880                                 && cf_fix_cppflags=yes
9881
9882                         if test $cf_fix_cppflags = yes ; then
9883
9884         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9885         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9886
9887                                 continue
9888                         elif test "${cf_tst_cflags}" = "\"'" ; then
9889
9890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9892
9893                                 continue
9894                         fi
9895                         ;;
9896                 esac
9897                 case "$CPPFLAGS" in
9898                 (*$cf_add_cflags)
9899                         ;;
9900                 (*)
9901                         case $cf_add_cflags in
9902                         (-D*)
9903                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9904
9905 CPPFLAGS=`echo "$CPPFLAGS" | \
9906         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9907                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9908
9909                                 ;;
9910                         esac
9911
9912         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9913         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9914
9915                         ;;
9916                 esac
9917                 ;;
9918         (*)
9919
9920         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9921         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9922
9923                 ;;
9924         esac
9925         ;;
9926 (yes)
9927
9928         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9929         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9930
9931         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9932
9933         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9934                 && test -z "${cf_tst_cflags}" \
9935                 && cf_fix_cppflags=no
9936         ;;
9937 esac
9938 done
9939
9940 if test -n "$cf_new_cflags" ; then
9941
9942         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9943         CFLAGS="${CFLAGS}$cf_new_cflags"
9944
9945 fi
9946
9947 if test -n "$cf_new_cppflags" ; then
9948
9949         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9950         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9951
9952 fi
9953
9954 if test -n "$cf_new_extra_cppflags" ; then
9955
9956         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9957         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9958
9959 fi
9960
9961 fi
9962
9963 fi # cf_cv_posix_visible
9964
9965         ;;
9966 (netbsd*)
9967         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9968         ;;
9969 (openbsd[4-9]*)
9970         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9971         cf_xopen_source="-D_BSD_SOURCE"
9972         cf_XOPEN_SOURCE=600
9973         ;;
9974 (openbsd*)
9975         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9976         ;;
9977 (osf[45]*)
9978         cf_xopen_source="-D_OSF_SOURCE"
9979         ;;
9980 (nto-qnx*)
9981         cf_xopen_source="-D_QNX_SOURCE"
9982         ;;
9983 (sco*)
9984         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9985         ;;
9986 (solaris2.*)
9987         cf_xopen_source="-D__EXTENSIONS__"
9988         cf_cv_xopen_source=broken
9989         ;;
9990 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9991         cf_XOPEN_SOURCE=
9992         cf_POSIX_C_SOURCE=
9993         ;;
9994 (*)
9995
9996 echo "$as_me:9996: checking if we should define _XOPEN_SOURCE" >&5
9997 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9998 if test "${cf_cv_xopen_source+set}" = set; then
9999   echo $ECHO_N "(cached) $ECHO_C" >&6
10000 else
10001
10002         cat >conftest.$ac_ext <<_ACEOF
10003 #line 10003 "configure"
10004 #include "confdefs.h"
10005
10006 #include <stdlib.h>
10007 #include <string.h>
10008 #include <sys/types.h>
10009
10010 int
10011 main (void)
10012 {
10013
10014 #ifndef _XOPEN_SOURCE
10015 make an error
10016 #endif
10017   ;
10018   return 0;
10019 }
10020 _ACEOF
10021 rm -f conftest.$ac_objext
10022 if { (eval echo "$as_me:10022: \"$ac_compile\"") >&5
10023   (eval $ac_compile) 2>&5
10024   ac_status=$?
10025   echo "$as_me:10025: \$? = $ac_status" >&5
10026   (exit $ac_status); } &&
10027          { ac_try='test -s conftest.$ac_objext'
10028   { (eval echo "$as_me:10028: \"$ac_try\"") >&5
10029   (eval $ac_try) 2>&5
10030   ac_status=$?
10031   echo "$as_me:10031: \$? = $ac_status" >&5
10032   (exit $ac_status); }; }; then
10033   cf_cv_xopen_source=no
10034 else
10035   echo "$as_me: failed program was:" >&5
10036 cat conftest.$ac_ext >&5
10037 cf_save="$CPPFLAGS"
10038
10039         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10040         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10041
10042          cat >conftest.$ac_ext <<_ACEOF
10043 #line 10043 "configure"
10044 #include "confdefs.h"
10045
10046 #include <stdlib.h>
10047 #include <string.h>
10048 #include <sys/types.h>
10049
10050 int
10051 main (void)
10052 {
10053
10054 #ifdef _XOPEN_SOURCE
10055 make an error
10056 #endif
10057   ;
10058   return 0;
10059 }
10060 _ACEOF
10061 rm -f conftest.$ac_objext
10062 if { (eval echo "$as_me:10062: \"$ac_compile\"") >&5
10063   (eval $ac_compile) 2>&5
10064   ac_status=$?
10065   echo "$as_me:10065: \$? = $ac_status" >&5
10066   (exit $ac_status); } &&
10067          { ac_try='test -s conftest.$ac_objext'
10068   { (eval echo "$as_me:10068: \"$ac_try\"") >&5
10069   (eval $ac_try) 2>&5
10070   ac_status=$?
10071   echo "$as_me:10071: \$? = $ac_status" >&5
10072   (exit $ac_status); }; }; then
10073   cf_cv_xopen_source=no
10074 else
10075   echo "$as_me: failed program was:" >&5
10076 cat conftest.$ac_ext >&5
10077 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10078 fi
10079 rm -f conftest.$ac_objext conftest.$ac_ext
10080         CPPFLAGS="$cf_save"
10081
10082 fi
10083 rm -f conftest.$ac_objext conftest.$ac_ext
10084
10085 fi
10086 echo "$as_me:10086: result: $cf_cv_xopen_source" >&5
10087 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10088
10089 if test "$cf_cv_xopen_source" != no ; then
10090
10091 CFLAGS=`echo "$CFLAGS" | \
10092         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10093                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10094
10095 CPPFLAGS=`echo "$CPPFLAGS" | \
10096         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10097                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10098
10099         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10100
10101 cf_fix_cppflags=no
10102 cf_new_cflags=
10103 cf_new_cppflags=
10104 cf_new_extra_cppflags=
10105
10106 for cf_add_cflags in $cf_temp_xopen_source
10107 do
10108 case $cf_fix_cppflags in
10109 (no)
10110         case $cf_add_cflags in
10111         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10112                 case $cf_add_cflags in
10113                 (-D*)
10114                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10115
10116                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10117                                 && test -z "${cf_tst_cflags}" \
10118                                 && cf_fix_cppflags=yes
10119
10120                         if test $cf_fix_cppflags = yes ; then
10121
10122         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10123         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10124
10125                                 continue
10126                         elif test "${cf_tst_cflags}" = "\"'" ; then
10127
10128         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10129         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10130
10131                                 continue
10132                         fi
10133                         ;;
10134                 esac
10135                 case "$CPPFLAGS" in
10136                 (*$cf_add_cflags)
10137                         ;;
10138                 (*)
10139                         case $cf_add_cflags in
10140                         (-D*)
10141                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10142
10143 CPPFLAGS=`echo "$CPPFLAGS" | \
10144         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10145                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10146
10147                                 ;;
10148                         esac
10149
10150         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10151         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10152
10153                         ;;
10154                 esac
10155                 ;;
10156         (*)
10157
10158         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10159         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10160
10161                 ;;
10162         esac
10163         ;;
10164 (yes)
10165
10166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10168
10169         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10170
10171         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10172                 && test -z "${cf_tst_cflags}" \
10173                 && cf_fix_cppflags=no
10174         ;;
10175 esac
10176 done
10177
10178 if test -n "$cf_new_cflags" ; then
10179
10180         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10181         CFLAGS="${CFLAGS}$cf_new_cflags"
10182
10183 fi
10184
10185 if test -n "$cf_new_cppflags" ; then
10186
10187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10188         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10189
10190 fi
10191
10192 if test -n "$cf_new_extra_cppflags" ; then
10193
10194         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10195         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10196
10197 fi
10198
10199 fi
10200
10201 if test "$cf_cv_posix_visible" = no; then
10202
10203 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10204
10205 cf_save_CFLAGS="$CFLAGS"
10206 cf_save_CPPFLAGS="$CPPFLAGS"
10207
10208 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10209         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10210                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10211
10212 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10213         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10214                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10215
10216 echo "$as_me:10216: checking if we should define _POSIX_C_SOURCE" >&5
10217 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10218 if test "${cf_cv_posix_c_source+set}" = set; then
10219   echo $ECHO_N "(cached) $ECHO_C" >&6
10220 else
10221
10222 echo "${as_me:-configure}:10222: testing if the symbol is already defined go no further ..." 1>&5
10223
10224         cat >conftest.$ac_ext <<_ACEOF
10225 #line 10225 "configure"
10226 #include "confdefs.h"
10227 #include <sys/types.h>
10228 int
10229 main (void)
10230 {
10231
10232 #ifndef _POSIX_C_SOURCE
10233 make an error
10234 #endif
10235   ;
10236   return 0;
10237 }
10238 _ACEOF
10239 rm -f conftest.$ac_objext
10240 if { (eval echo "$as_me:10240: \"$ac_compile\"") >&5
10241   (eval $ac_compile) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); } &&
10245          { ac_try='test -s conftest.$ac_objext'
10246   { (eval echo "$as_me:10246: \"$ac_try\"") >&5
10247   (eval $ac_try) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); }; }; then
10251   cf_cv_posix_c_source=no
10252 else
10253   echo "$as_me: failed program was:" >&5
10254 cat conftest.$ac_ext >&5
10255 cf_want_posix_source=no
10256          case .$cf_POSIX_C_SOURCE in
10257          (.[12]??*)
10258                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10259                 ;;
10260          (.2)
10261                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10262                 cf_want_posix_source=yes
10263                 ;;
10264          (.*)
10265                 cf_want_posix_source=yes
10266                 ;;
10267          esac
10268          if test "$cf_want_posix_source" = yes ; then
10269                 cat >conftest.$ac_ext <<_ACEOF
10270 #line 10270 "configure"
10271 #include "confdefs.h"
10272 #include <sys/types.h>
10273 int
10274 main (void)
10275 {
10276
10277 #ifdef _POSIX_SOURCE
10278 make an error
10279 #endif
10280   ;
10281   return 0;
10282 }
10283 _ACEOF
10284 rm -f conftest.$ac_objext
10285 if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5
10286   (eval $ac_compile) 2>&5
10287   ac_status=$?
10288   echo "$as_me:10288: \$? = $ac_status" >&5
10289   (exit $ac_status); } &&
10290          { ac_try='test -s conftest.$ac_objext'
10291   { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292   (eval $ac_try) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); }; }; then
10296   :
10297 else
10298   echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10300 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10301 fi
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10303          fi
10304
10305 echo "${as_me:-configure}:10305: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10306
10307          CFLAGS="$cf_trim_CFLAGS"
10308          CPPFLAGS="$cf_trim_CPPFLAGS"
10309
10310         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10311         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10312
10313 echo "${as_me:-configure}:10313: testing if the second compile does not leave our definition intact error ..." 1>&5
10314
10315          cat >conftest.$ac_ext <<_ACEOF
10316 #line 10316 "configure"
10317 #include "confdefs.h"
10318 #include <sys/types.h>
10319 int
10320 main (void)
10321 {
10322
10323 #ifndef _POSIX_C_SOURCE
10324 make an error
10325 #endif
10326   ;
10327   return 0;
10328 }
10329 _ACEOF
10330 rm -f conftest.$ac_objext
10331 if { (eval echo "$as_me:10331: \"$ac_compile\"") >&5
10332   (eval $ac_compile) 2>&5
10333   ac_status=$?
10334   echo "$as_me:10334: \$? = $ac_status" >&5
10335   (exit $ac_status); } &&
10336          { ac_try='test -s conftest.$ac_objext'
10337   { (eval echo "$as_me:10337: \"$ac_try\"") >&5
10338   (eval $ac_try) 2>&5
10339   ac_status=$?
10340   echo "$as_me:10340: \$? = $ac_status" >&5
10341   (exit $ac_status); }; }; then
10342   :
10343 else
10344   echo "$as_me: failed program was:" >&5
10345 cat conftest.$ac_ext >&5
10346 cf_cv_posix_c_source=no
10347 fi
10348 rm -f conftest.$ac_objext conftest.$ac_ext
10349          CFLAGS="$cf_save_CFLAGS"
10350          CPPFLAGS="$cf_save_CPPFLAGS"
10351
10352 fi
10353 rm -f conftest.$ac_objext conftest.$ac_ext
10354
10355 fi
10356 echo "$as_me:10356: result: $cf_cv_posix_c_source" >&5
10357 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10358
10359 if test "$cf_cv_posix_c_source" != no ; then
10360         CFLAGS="$cf_trim_CFLAGS"
10361         CPPFLAGS="$cf_trim_CPPFLAGS"
10362
10363 cf_fix_cppflags=no
10364 cf_new_cflags=
10365 cf_new_cppflags=
10366 cf_new_extra_cppflags=
10367
10368 for cf_add_cflags in $cf_cv_posix_c_source
10369 do
10370 case $cf_fix_cppflags in
10371 (no)
10372         case $cf_add_cflags in
10373         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10374                 case $cf_add_cflags in
10375                 (-D*)
10376                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10377
10378                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10379                                 && test -z "${cf_tst_cflags}" \
10380                                 && cf_fix_cppflags=yes
10381
10382                         if test $cf_fix_cppflags = yes ; then
10383
10384         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10385         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10386
10387                                 continue
10388                         elif test "${cf_tst_cflags}" = "\"'" ; then
10389
10390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10392
10393                                 continue
10394                         fi
10395                         ;;
10396                 esac
10397                 case "$CPPFLAGS" in
10398                 (*$cf_add_cflags)
10399                         ;;
10400                 (*)
10401                         case $cf_add_cflags in
10402                         (-D*)
10403                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10404
10405 CPPFLAGS=`echo "$CPPFLAGS" | \
10406         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10407                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10408
10409                                 ;;
10410                         esac
10411
10412         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10413         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10414
10415                         ;;
10416                 esac
10417                 ;;
10418         (*)
10419
10420         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10421         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10422
10423                 ;;
10424         esac
10425         ;;
10426 (yes)
10427
10428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10430
10431         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10432
10433         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10434                 && test -z "${cf_tst_cflags}" \
10435                 && cf_fix_cppflags=no
10436         ;;
10437 esac
10438 done
10439
10440 if test -n "$cf_new_cflags" ; then
10441
10442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10443         CFLAGS="${CFLAGS}$cf_new_cflags"
10444
10445 fi
10446
10447 if test -n "$cf_new_cppflags" ; then
10448
10449         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10450         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10451
10452 fi
10453
10454 if test -n "$cf_new_extra_cppflags" ; then
10455
10456         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10457         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10458
10459 fi
10460
10461 fi
10462
10463 fi # cf_cv_posix_visible
10464
10465         ;;
10466 esac
10467
10468 if test -n "$cf_xopen_source" ; then
10469
10470 cf_fix_cppflags=no
10471 cf_new_cflags=
10472 cf_new_cppflags=
10473 cf_new_extra_cppflags=
10474
10475 for cf_add_cflags in $cf_xopen_source
10476 do
10477 case $cf_fix_cppflags in
10478 (no)
10479         case $cf_add_cflags in
10480         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10481                 case $cf_add_cflags in
10482                 (-D*)
10483                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10484
10485                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10486                                 && test -z "${cf_tst_cflags}" \
10487                                 && cf_fix_cppflags=yes
10488
10489                         if test $cf_fix_cppflags = yes ; then
10490
10491         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10492         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10493
10494                                 continue
10495                         elif test "${cf_tst_cflags}" = "\"'" ; then
10496
10497         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10498         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10499
10500                                 continue
10501                         fi
10502                         ;;
10503                 esac
10504                 case "$CPPFLAGS" in
10505                 (*$cf_add_cflags)
10506                         ;;
10507                 (*)
10508                         case $cf_add_cflags in
10509                         (-D*)
10510                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10511
10512 CPPFLAGS=`echo "$CPPFLAGS" | \
10513         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10514                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10515
10516                                 ;;
10517                         esac
10518
10519         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10520         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10521
10522                         ;;
10523                 esac
10524                 ;;
10525         (*)
10526
10527         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10528         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10529
10530                 ;;
10531         esac
10532         ;;
10533 (yes)
10534
10535         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10536         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10537
10538         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10539
10540         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10541                 && test -z "${cf_tst_cflags}" \
10542                 && cf_fix_cppflags=no
10543         ;;
10544 esac
10545 done
10546
10547 if test -n "$cf_new_cflags" ; then
10548         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10549
10550 echo "${as_me:-configure}:10550: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10551
10552         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10553         CFLAGS="${CFLAGS}$cf_new_cflags"
10554
10555 fi
10556
10557 if test -n "$cf_new_cppflags" ; then
10558         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10559
10560 echo "${as_me:-configure}:10560: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10561
10562         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10563         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10564
10565 fi
10566
10567 if test -n "$cf_new_extra_cppflags" ; then
10568         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10569
10570 echo "${as_me:-configure}:10570: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10571
10572         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10573         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10574
10575 fi
10576
10577 fi
10578
10579 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10580         echo "$as_me:10580: checking if _XOPEN_SOURCE really is set" >&5
10581 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10582         cat >conftest.$ac_ext <<_ACEOF
10583 #line 10583 "configure"
10584 #include "confdefs.h"
10585 #include <stdlib.h>
10586 int
10587 main (void)
10588 {
10589
10590 #ifndef _XOPEN_SOURCE
10591 make an error
10592 #endif
10593   ;
10594   return 0;
10595 }
10596 _ACEOF
10597 rm -f conftest.$ac_objext
10598 if { (eval echo "$as_me:10598: \"$ac_compile\"") >&5
10599   (eval $ac_compile) 2>&5
10600   ac_status=$?
10601   echo "$as_me:10601: \$? = $ac_status" >&5
10602   (exit $ac_status); } &&
10603          { ac_try='test -s conftest.$ac_objext'
10604   { (eval echo "$as_me:10604: \"$ac_try\"") >&5
10605   (eval $ac_try) 2>&5
10606   ac_status=$?
10607   echo "$as_me:10607: \$? = $ac_status" >&5
10608   (exit $ac_status); }; }; then
10609   cf_XOPEN_SOURCE_set=yes
10610 else
10611   echo "$as_me: failed program was:" >&5
10612 cat conftest.$ac_ext >&5
10613 cf_XOPEN_SOURCE_set=no
10614 fi
10615 rm -f conftest.$ac_objext conftest.$ac_ext
10616         echo "$as_me:10616: result: $cf_XOPEN_SOURCE_set" >&5
10617 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10618         if test $cf_XOPEN_SOURCE_set = yes
10619         then
10620                 cat >conftest.$ac_ext <<_ACEOF
10621 #line 10621 "configure"
10622 #include "confdefs.h"
10623 #include <stdlib.h>
10624 int
10625 main (void)
10626 {
10627
10628 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10629 make an error
10630 #endif
10631   ;
10632   return 0;
10633 }
10634 _ACEOF
10635 rm -f conftest.$ac_objext
10636 if { (eval echo "$as_me:10636: \"$ac_compile\"") >&5
10637   (eval $ac_compile) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit $ac_status); } &&
10641          { ac_try='test -s conftest.$ac_objext'
10642   { (eval echo "$as_me:10642: \"$ac_try\"") >&5
10643   (eval $ac_try) 2>&5
10644   ac_status=$?
10645   echo "$as_me:10645: \$? = $ac_status" >&5
10646   (exit $ac_status); }; }; then
10647   cf_XOPEN_SOURCE_set_ok=yes
10648 else
10649   echo "$as_me: failed program was:" >&5
10650 cat conftest.$ac_ext >&5
10651 cf_XOPEN_SOURCE_set_ok=no
10652 fi
10653 rm -f conftest.$ac_objext conftest.$ac_ext
10654                 if test $cf_XOPEN_SOURCE_set_ok = no
10655                 then
10656                         { echo "$as_me:10656: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10657 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10658                 fi
10659         else
10660
10661 echo "$as_me:10661: checking if we should define _XOPEN_SOURCE" >&5
10662 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10663 if test "${cf_cv_xopen_source+set}" = set; then
10664   echo $ECHO_N "(cached) $ECHO_C" >&6
10665 else
10666
10667         cat >conftest.$ac_ext <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10670
10671 #include <stdlib.h>
10672 #include <string.h>
10673 #include <sys/types.h>
10674
10675 int
10676 main (void)
10677 {
10678
10679 #ifndef _XOPEN_SOURCE
10680 make an error
10681 #endif
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 rm -f conftest.$ac_objext
10687 if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
10688   (eval $ac_compile) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit $ac_status); } &&
10692          { ac_try='test -s conftest.$ac_objext'
10693   { (eval echo "$as_me:10693: \"$ac_try\"") >&5
10694   (eval $ac_try) 2>&5
10695   ac_status=$?
10696   echo "$as_me:10696: \$? = $ac_status" >&5
10697   (exit $ac_status); }; }; then
10698   cf_cv_xopen_source=no
10699 else
10700   echo "$as_me: failed program was:" >&5
10701 cat conftest.$ac_ext >&5
10702 cf_save="$CPPFLAGS"
10703
10704         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10705         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10706
10707          cat >conftest.$ac_ext <<_ACEOF
10708 #line 10708 "configure"
10709 #include "confdefs.h"
10710
10711 #include <stdlib.h>
10712 #include <string.h>
10713 #include <sys/types.h>
10714
10715 int
10716 main (void)
10717 {
10718
10719 #ifdef _XOPEN_SOURCE
10720 make an error
10721 #endif
10722   ;
10723   return 0;
10724 }
10725 _ACEOF
10726 rm -f conftest.$ac_objext
10727 if { (eval echo "$as_me:10727: \"$ac_compile\"") >&5
10728   (eval $ac_compile) 2>&5
10729   ac_status=$?
10730   echo "$as_me:10730: \$? = $ac_status" >&5
10731   (exit $ac_status); } &&
10732          { ac_try='test -s conftest.$ac_objext'
10733   { (eval echo "$as_me:10733: \"$ac_try\"") >&5
10734   (eval $ac_try) 2>&5
10735   ac_status=$?
10736   echo "$as_me:10736: \$? = $ac_status" >&5
10737   (exit $ac_status); }; }; then
10738   cf_cv_xopen_source=no
10739 else
10740   echo "$as_me: failed program was:" >&5
10741 cat conftest.$ac_ext >&5
10742 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10743 fi
10744 rm -f conftest.$ac_objext conftest.$ac_ext
10745         CPPFLAGS="$cf_save"
10746
10747 fi
10748 rm -f conftest.$ac_objext conftest.$ac_ext
10749
10750 fi
10751 echo "$as_me:10751: result: $cf_cv_xopen_source" >&5
10752 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10753
10754 if test "$cf_cv_xopen_source" != no ; then
10755
10756 CFLAGS=`echo "$CFLAGS" | \
10757         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10758                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10759
10760 CPPFLAGS=`echo "$CPPFLAGS" | \
10761         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10762                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10763
10764         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10765
10766 cf_fix_cppflags=no
10767 cf_new_cflags=
10768 cf_new_cppflags=
10769 cf_new_extra_cppflags=
10770
10771 for cf_add_cflags in $cf_temp_xopen_source
10772 do
10773 case $cf_fix_cppflags in
10774 (no)
10775         case $cf_add_cflags in
10776         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10777                 case $cf_add_cflags in
10778                 (-D*)
10779                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10780
10781                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10782                                 && test -z "${cf_tst_cflags}" \
10783                                 && cf_fix_cppflags=yes
10784
10785                         if test $cf_fix_cppflags = yes ; then
10786
10787         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10788         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10789
10790                                 continue
10791                         elif test "${cf_tst_cflags}" = "\"'" ; then
10792
10793         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10794         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10795
10796                                 continue
10797                         fi
10798                         ;;
10799                 esac
10800                 case "$CPPFLAGS" in
10801                 (*$cf_add_cflags)
10802                         ;;
10803                 (*)
10804                         case $cf_add_cflags in
10805                         (-D*)
10806                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10807
10808 CPPFLAGS=`echo "$CPPFLAGS" | \
10809         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10810                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10811
10812                                 ;;
10813                         esac
10814
10815         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10816         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10817
10818                         ;;
10819                 esac
10820                 ;;
10821         (*)
10822
10823         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10824         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10825
10826                 ;;
10827         esac
10828         ;;
10829 (yes)
10830
10831         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10832         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10833
10834         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10835
10836         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10837                 && test -z "${cf_tst_cflags}" \
10838                 && cf_fix_cppflags=no
10839         ;;
10840 esac
10841 done
10842
10843 if test -n "$cf_new_cflags" ; then
10844
10845         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10846         CFLAGS="${CFLAGS}$cf_new_cflags"
10847
10848 fi
10849
10850 if test -n "$cf_new_cppflags" ; then
10851
10852         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10853         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10854
10855 fi
10856
10857 if test -n "$cf_new_extra_cppflags" ; then
10858
10859         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10860         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10861
10862 fi
10863
10864 fi
10865
10866         fi
10867 fi
10868 fi # cf_cv_posix_visible
10869
10870 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10871
10872 # Work around breakage on OS X
10873
10874 echo "$as_me:10874: checking if SIGWINCH is defined" >&5
10875 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10876 if test "${cf_cv_define_sigwinch+set}" = set; then
10877   echo $ECHO_N "(cached) $ECHO_C" >&6
10878 else
10879
10880         cat >conftest.$ac_ext <<_ACEOF
10881 #line 10881 "configure"
10882 #include "confdefs.h"
10883
10884 #include <sys/types.h>
10885 #include <sys/signal.h>
10886
10887 int
10888 main (void)
10889 {
10890 int x = SIGWINCH
10891   ;
10892   return 0;
10893 }
10894 _ACEOF
10895 rm -f conftest.$ac_objext
10896 if { (eval echo "$as_me:10896: \"$ac_compile\"") >&5
10897   (eval $ac_compile) 2>&5
10898   ac_status=$?
10899   echo "$as_me:10899: \$? = $ac_status" >&5
10900   (exit $ac_status); } &&
10901          { ac_try='test -s conftest.$ac_objext'
10902   { (eval echo "$as_me:10902: \"$ac_try\"") >&5
10903   (eval $ac_try) 2>&5
10904   ac_status=$?
10905   echo "$as_me:10905: \$? = $ac_status" >&5
10906   (exit $ac_status); }; }; then
10907   cf_cv_define_sigwinch=yes
10908 else
10909   echo "$as_me: failed program was:" >&5
10910 cat conftest.$ac_ext >&5
10911 cat >conftest.$ac_ext <<_ACEOF
10912 #line 10912 "configure"
10913 #include "confdefs.h"
10914
10915 #undef _XOPEN_SOURCE
10916 #undef _POSIX_SOURCE
10917 #undef _POSIX_C_SOURCE
10918 #include <sys/types.h>
10919 #include <sys/signal.h>
10920
10921 int
10922 main (void)
10923 {
10924 int x = SIGWINCH
10925   ;
10926   return 0;
10927 }
10928 _ACEOF
10929 rm -f conftest.$ac_objext
10930 if { (eval echo "$as_me:10930: \"$ac_compile\"") >&5
10931   (eval $ac_compile) 2>&5
10932   ac_status=$?
10933   echo "$as_me:10933: \$? = $ac_status" >&5
10934   (exit $ac_status); } &&
10935          { ac_try='test -s conftest.$ac_objext'
10936   { (eval echo "$as_me:10936: \"$ac_try\"") >&5
10937   (eval $ac_try) 2>&5
10938   ac_status=$?
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); }; }; then
10941   cf_cv_define_sigwinch=maybe
10942 else
10943   echo "$as_me: failed program was:" >&5
10944 cat conftest.$ac_ext >&5
10945 cf_cv_define_sigwinch=no
10946 fi
10947 rm -f conftest.$ac_objext conftest.$ac_ext
10948
10949 fi
10950 rm -f conftest.$ac_objext conftest.$ac_ext
10951
10952 fi
10953 echo "$as_me:10953: result: $cf_cv_define_sigwinch" >&5
10954 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10955
10956 if test "$cf_cv_define_sigwinch" = maybe ; then
10957 echo "$as_me:10957: checking for actual SIGWINCH definition" >&5
10958 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10959 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10960   echo $ECHO_N "(cached) $ECHO_C" >&6
10961 else
10962
10963 cf_cv_fixup_sigwinch=unknown
10964 cf_sigwinch=32
10965 while test $cf_sigwinch != 1
10966 do
10967         cat >conftest.$ac_ext <<_ACEOF
10968 #line 10968 "configure"
10969 #include "confdefs.h"
10970
10971 #undef _XOPEN_SOURCE
10972 #undef _POSIX_SOURCE
10973 #undef _POSIX_C_SOURCE
10974 #include <sys/types.h>
10975 #include <sys/signal.h>
10976
10977 int
10978 main (void)
10979 {
10980
10981 #if SIGWINCH != $cf_sigwinch
10982 make an error
10983 #endif
10984 int x = SIGWINCH
10985   ;
10986   return 0;
10987 }
10988 _ACEOF
10989 rm -f conftest.$ac_objext
10990 if { (eval echo "$as_me:10990: \"$ac_compile\"") >&5
10991   (eval $ac_compile) 2>&5
10992   ac_status=$?
10993   echo "$as_me:10993: \$? = $ac_status" >&5
10994   (exit $ac_status); } &&
10995          { ac_try='test -s conftest.$ac_objext'
10996   { (eval echo "$as_me:10996: \"$ac_try\"") >&5
10997   (eval $ac_try) 2>&5
10998   ac_status=$?
10999   echo "$as_me:10999: \$? = $ac_status" >&5
11000   (exit $ac_status); }; }; then
11001   cf_cv_fixup_sigwinch=$cf_sigwinch
11002          break
11003 else
11004   echo "$as_me: failed program was:" >&5
11005 cat conftest.$ac_ext >&5
11006 fi
11007 rm -f conftest.$ac_objext conftest.$ac_ext
11008
11009 cf_sigwinch=`expr $cf_sigwinch - 1`
11010 done
11011
11012 fi
11013 echo "$as_me:11013: result: $cf_cv_fixup_sigwinch" >&5
11014 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11015
11016         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11017                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11018         fi
11019 fi
11020
11021 # Checks for CODESET support.
11022
11023 echo "$as_me:11023: checking for nl_langinfo and CODESET" >&5
11024 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11025 if test "${am_cv_langinfo_codeset+set}" = set; then
11026   echo $ECHO_N "(cached) $ECHO_C" >&6
11027 else
11028   cat >conftest.$ac_ext <<_ACEOF
11029 #line 11029 "configure"
11030 #include "confdefs.h"
11031 #include <langinfo.h>
11032 int
11033 main (void)
11034 {
11035 char* cs = nl_langinfo(CODESET);
11036   ;
11037   return 0;
11038 }
11039 _ACEOF
11040 rm -f conftest.$ac_objext conftest$ac_exeext
11041 if { (eval echo "$as_me:11041: \"$ac_link\"") >&5
11042   (eval $ac_link) 2>&5
11043   ac_status=$?
11044   echo "$as_me:11044: \$? = $ac_status" >&5
11045   (exit $ac_status); } &&
11046          { ac_try='test -s conftest$ac_exeext'
11047   { (eval echo "$as_me:11047: \"$ac_try\"") >&5
11048   (eval $ac_try) 2>&5
11049   ac_status=$?
11050   echo "$as_me:11050: \$? = $ac_status" >&5
11051   (exit $ac_status); }; }; then
11052   am_cv_langinfo_codeset=yes
11053 else
11054   echo "$as_me: failed program was:" >&5
11055 cat conftest.$ac_ext >&5
11056 am_cv_langinfo_codeset=no
11057 fi
11058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11059
11060 fi
11061 echo "$as_me:11061: result: $am_cv_langinfo_codeset" >&5
11062 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11063         if test $am_cv_langinfo_codeset = yes; then
11064
11065 cat >>confdefs.h <<\EOF
11066 #define HAVE_LANGINFO_CODESET 1
11067 EOF
11068
11069         fi
11070
11071 # use these variables to work around a defect in gcc's fixincludes.
11072 NCURSES_OK_WCHAR_T=
11073 NCURSES_OK_WINT_T=
11074
11075 echo "$as_me:11075: checking if you want wide-character code" >&5
11076 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11077
11078 # Check whether --enable-widec or --disable-widec was given.
11079 if test "${enable_widec+set}" = set; then
11080   enableval="$enable_widec"
11081   with_widec=$enableval
11082 else
11083   with_widec=no
11084 fi;
11085 echo "$as_me:11085: result: $with_widec" >&5
11086 echo "${ECHO_T}$with_widec" >&6
11087
11088 NCURSES_WCWIDTH_GRAPHICS=1
11089
11090 if test "x$with_widec" = xyes ; then
11091         if test "x$disable_lib_suffixes" = xno ; then
11092                 LIB_SUFFIX="w${LIB_SUFFIX}"
11093         fi
11094
11095 cat >>confdefs.h <<\EOF
11096 #define USE_WIDEC_SUPPORT 1
11097 EOF
11098
11099 cat >>confdefs.h <<\EOF
11100 #define NCURSES_WIDECHAR 1
11101 EOF
11102
11103 for ac_header in \
11104 wchar.h \
11105 wctype.h \
11106
11107 do
11108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11109 echo "$as_me:11109: checking for $ac_header" >&5
11110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11112   echo $ECHO_N "(cached) $ECHO_C" >&6
11113 else
11114   cat >conftest.$ac_ext <<_ACEOF
11115 #line 11115 "configure"
11116 #include "confdefs.h"
11117 #include <$ac_header>
11118 _ACEOF
11119 if { (eval echo "$as_me:11119: \"$ac_cpp conftest.$ac_ext\"") >&5
11120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11121   ac_status=$?
11122   egrep -v '^ *\+' conftest.er1 >conftest.err
11123   rm -f conftest.er1
11124   cat conftest.err >&5
11125   echo "$as_me:11125: \$? = $ac_status" >&5
11126   (exit $ac_status); } >/dev/null; then
11127   if test -s conftest.err; then
11128     ac_cpp_err=$ac_c_preproc_warn_flag
11129   else
11130     ac_cpp_err=
11131   fi
11132 else
11133   ac_cpp_err=yes
11134 fi
11135 if test -z "$ac_cpp_err"; then
11136   eval "$as_ac_Header=yes"
11137 else
11138   echo "$as_me: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   eval "$as_ac_Header=no"
11141 fi
11142 rm -f conftest.err conftest.$ac_ext
11143 fi
11144 echo "$as_me:11144: result: `eval echo '${'$as_ac_Header'}'`" >&5
11145 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11146 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11147   cat >>confdefs.h <<EOF
11148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11149 EOF
11150
11151 fi
11152 done
11153
11154 echo "$as_me:11154: checking if wchar.h can be used as is" >&5
11155 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11156 if test "${cf_cv_wchar_h_okay+set}" = set; then
11157   echo $ECHO_N "(cached) $ECHO_C" >&6
11158 else
11159
11160 cat >conftest.$ac_ext <<_ACEOF
11161 #line 11161 "configure"
11162 #include "confdefs.h"
11163
11164 #include <stdlib.h>
11165 #ifdef HAVE_WCHAR_H
11166 #include <wchar.h>
11167 #endif
11168 #ifdef HAVE_WCTYPE_H
11169 #include <wctype.h>
11170 #endif
11171
11172 int
11173 main (void)
11174 {
11175
11176         wint_t foo = 0;
11177         int bar = iswpunct(foo)
11178   ;
11179   return 0;
11180 }
11181 _ACEOF
11182 rm -f conftest.$ac_objext
11183 if { (eval echo "$as_me:11183: \"$ac_compile\"") >&5
11184   (eval $ac_compile) 2>&5
11185   ac_status=$?
11186   echo "$as_me:11186: \$? = $ac_status" >&5
11187   (exit $ac_status); } &&
11188          { ac_try='test -s conftest.$ac_objext'
11189   { (eval echo "$as_me:11189: \"$ac_try\"") >&5
11190   (eval $ac_try) 2>&5
11191   ac_status=$?
11192   echo "$as_me:11192: \$? = $ac_status" >&5
11193   (exit $ac_status); }; }; then
11194   cf_cv_wchar_h_okay=yes
11195 else
11196   echo "$as_me: failed program was:" >&5
11197 cat conftest.$ac_ext >&5
11198 cf_cv_wchar_h_okay=no
11199 fi
11200 rm -f conftest.$ac_objext conftest.$ac_ext
11201 fi
11202 echo "$as_me:11202: result: $cf_cv_wchar_h_okay" >&5
11203 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11204
11205 if test $cf_cv_wchar_h_okay = no
11206 then
11207
11208 echo "$as_me:11208: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11209 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11210 cat >conftest.$ac_ext <<_ACEOF
11211 #line 11211 "configure"
11212 #include "confdefs.h"
11213 #include <sys/types.h>
11214
11215 int
11216 main (void)
11217 {
11218
11219 #ifndef _XOPEN_SOURCE_EXTENDED
11220 make an error
11221 #endif
11222   ;
11223   return 0;
11224 }
11225 _ACEOF
11226 rm -f conftest.$ac_objext
11227 if { (eval echo "$as_me:11227: \"$ac_compile\"") >&5
11228   (eval $ac_compile) 2>&5
11229   ac_status=$?
11230   echo "$as_me:11230: \$? = $ac_status" >&5
11231   (exit $ac_status); } &&
11232          { ac_try='test -s conftest.$ac_objext'
11233   { (eval echo "$as_me:11233: \"$ac_try\"") >&5
11234   (eval $ac_try) 2>&5
11235   ac_status=$?
11236   echo "$as_me:11236: \$? = $ac_status" >&5
11237   (exit $ac_status); }; }; then
11238   cf_result=no
11239 else
11240   echo "$as_me: failed program was:" >&5
11241 cat conftest.$ac_ext >&5
11242 cf_result=yes
11243 fi
11244 rm -f conftest.$ac_objext conftest.$ac_ext
11245 echo "$as_me:11245: result: $cf_result" >&5
11246 echo "${ECHO_T}$cf_result" >&6
11247
11248 if test "$cf_result" = yes ; then
11249         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11250 elif test "x" != "x" ; then
11251         echo "$as_me:11251: checking checking for compatible value versus " >&5
11252 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11253         cat >conftest.$ac_ext <<_ACEOF
11254 #line 11254 "configure"
11255 #include "confdefs.h"
11256 #include <sys/types.h>
11257
11258 int
11259 main (void)
11260 {
11261
11262 #if _XOPEN_SOURCE_EXTENDED- < 0
11263 make an error
11264 #endif
11265   ;
11266   return 0;
11267 }
11268 _ACEOF
11269 rm -f conftest.$ac_objext
11270 if { (eval echo "$as_me:11270: \"$ac_compile\"") >&5
11271   (eval $ac_compile) 2>&5
11272   ac_status=$?
11273   echo "$as_me:11273: \$? = $ac_status" >&5
11274   (exit $ac_status); } &&
11275          { ac_try='test -s conftest.$ac_objext'
11276   { (eval echo "$as_me:11276: \"$ac_try\"") >&5
11277   (eval $ac_try) 2>&5
11278   ac_status=$?
11279   echo "$as_me:11279: \$? = $ac_status" >&5
11280   (exit $ac_status); }; }; then
11281   cf_result=yes
11282 else
11283   echo "$as_me: failed program was:" >&5
11284 cat conftest.$ac_ext >&5
11285 cf_result=no
11286 fi
11287 rm -f conftest.$ac_objext conftest.$ac_ext
11288         echo "$as_me:11288: result: $cf_result" >&5
11289 echo "${ECHO_T}$cf_result" >&6
11290         if test "$cf_result" = no ; then
11291                 # perhaps we can override it - try...
11292                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11293         fi
11294 fi
11295
11296 fi
11297
11298 echo "$as_me:11298: checking if wcwidth agrees graphics are single-width" >&5
11299 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11300 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11301   echo $ECHO_N "(cached) $ECHO_C" >&6
11302 else
11303
11304 cat >conftest.in <<CF_EOF
11305 -       VT100 symbols
11306 0x250c  upper left corner
11307 0x2514  lower left corner
11308 0x2510  upper right corner
11309 0x2518  lower right corner
11310 0x251c  tee pointing left
11311 0x2524  tee pointing right
11312 0x2534  tee pointing up
11313 0x252c  tee pointing down
11314 0x2500  horizontal line
11315 0x2502  vertical line
11316 0x253c  large plus or crossover
11317 0x23ba  scan line 1
11318 0x23bd  scan line 9
11319 0x25c6  diamond
11320 0x2592  checker board (stipple)
11321 0x00b0  degree symbol
11322 0x00b1  plus/minus
11323 0x00b7  bullet
11324 -       Teletype 5410v1 symbols
11325 0x2190  arrow pointing left
11326 0x2192  arrow pointing right
11327 0x2193  arrow pointing down
11328 0x2191  arrow pointing up
11329 0x2592  board of squares
11330 0x2603  lantern symbol
11331 0x25ae  solid square block
11332 -       these defaults were invented for ncurses
11333 0x23bb  scan line 3
11334 0x23bc  scan line 7
11335 0x2264  less-than-or-equal-to
11336 0x2265  greater-than-or-equal-to
11337 0x03c0  greek pi
11338 0x2260  not-equal
11339 0x00a3  pound-sterling symbol
11340 -       thick-line-drawing
11341 0x250f  upper left corner
11342 0x2517  lower left corner
11343 0x2513  upper right corner
11344 0x251b  lower right corner
11345 0x2523  tee pointing left
11346 0x252b  tee pointing right
11347 0x253b  tee pointing up
11348 0x2533  tee pointing down
11349 0x2501  horizontal line
11350 0x2503  vertical line
11351 0x254b  large plus or crossover
11352 -       double-line-drawing
11353 0x2554  upper left corner
11354 0x255a  lower left corner
11355 0x2557  upper right corner
11356 0x255d  lower right corner
11357 0x2563  tee pointing left
11358 0x2560  tee pointing right
11359 0x2569  tee pointing up
11360 0x2566  tee pointing down
11361 0x2550  horizontal line
11362 0x2551  vertical line
11363 0x256c  large plus or crossover
11364 CF_EOF
11365 if test "$cross_compiling" = yes; then
11366   cf_cv_wcwidth_graphics=unknown
11367 else
11368   cat >conftest.$ac_ext <<_ACEOF
11369 #line 11369 "configure"
11370 #include "confdefs.h"
11371
11372 #include <locale.h>
11373 #include <stdio.h>
11374 #include <wchar.h>
11375
11376 #define MY_LEN 80
11377
11378 int
11379 main(void)
11380 {
11381         FILE *fp;
11382         int value;
11383         char buffer[MY_LEN + 1];
11384         char notes[MY_LEN + 1];
11385         int totals = 0;
11386         int passed = 0;
11387
11388         if (setlocale(LC_ALL, "en_US.UTF8") ||
11389                 setlocale(LC_ALL, "en_US.UTF-8") ||
11390                 setlocale(LC_ALL, "en_US.utf8") ||
11391                 setlocale(LC_ALL, "en_US.utf-8")) {
11392                 if ((fp = fopen("conftest.in", "r")) != 0) {
11393                         while (fgets(buffer, MY_LEN, fp) != 0) {
11394                                 if (*buffer == '-') {
11395                                         fprintf(stderr, "\t%s", buffer);
11396                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11397                                         ++totals;
11398                                         if (wcwidth(value) == 1)
11399                                                 ++passed;
11400                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11401                                 } else {
11402                                         fprintf(stderr, "?\t%s", buffer);
11403                                 }
11404                         }
11405                 }
11406         }
11407         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11408         return (totals == passed) ? 0 : 1;
11409 }
11410
11411 _ACEOF
11412 rm -f conftest$ac_exeext
11413 if { (eval echo "$as_me:11413: \"$ac_link\"") >&5
11414   (eval $ac_link) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11418   { (eval echo "$as_me:11418: \"$ac_try\"") >&5
11419   (eval $ac_try) 2>&5
11420   ac_status=$?
11421   echo "$as_me:11421: \$? = $ac_status" >&5
11422   (exit $ac_status); }; }; then
11423   cf_cv_wcwidth_graphics=yes
11424 else
11425   echo "$as_me: program exited with status $ac_status" >&5
11426 echo "$as_me: failed program was:" >&5
11427 cat conftest.$ac_ext >&5
11428 cf_cv_wcwidth_graphics=no
11429 fi
11430 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11431 fi
11432
11433 fi
11434 echo "$as_me:11434: result: $cf_cv_wcwidth_graphics" >&5
11435 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11436
11437         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11438
11439         # with_overwrite=no
11440         NCURSES_CH_T=cchar_t
11441
11442 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11443 do
11444 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11445 echo "$as_me:11445: checking for $ac_func" >&5
11446 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11447 if eval "test \"\${$as_ac_var+set}\" = set"; then
11448   echo $ECHO_N "(cached) $ECHO_C" >&6
11449 else
11450   cat >conftest.$ac_ext <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11453 #define $ac_func autoconf_temporary
11454 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11455 #undef $ac_func
11456
11457 #ifdef __cplusplus
11458 extern "C"
11459 #endif
11460
11461 /* We use char because int might match the return type of a gcc2
11462    builtin and then its argument prototype would still apply.  */
11463 char $ac_func (void);
11464
11465 int
11466 main (void)
11467 {
11468
11469 /* The GNU C library defines stubs for functions which it implements
11470     to always fail with ENOSYS.  Some functions are actually named
11471     something starting with __ and the normal name is an alias.  */
11472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11473 #error found stub for $ac_func
11474 #endif
11475
11476         return $ac_func ();
11477   ;
11478   return 0;
11479 }
11480 _ACEOF
11481 rm -f conftest.$ac_objext conftest$ac_exeext
11482 if { (eval echo "$as_me:11482: \"$ac_link\"") >&5
11483   (eval $ac_link) 2>&5
11484   ac_status=$?
11485   echo "$as_me:11485: \$? = $ac_status" >&5
11486   (exit $ac_status); } &&
11487          { ac_try='test -s conftest$ac_exeext'
11488   { (eval echo "$as_me:11488: \"$ac_try\"") >&5
11489   (eval $ac_try) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit $ac_status); }; }; then
11493   eval "$as_ac_var=yes"
11494 else
11495   echo "$as_me: failed program was:" >&5
11496 cat conftest.$ac_ext >&5
11497 eval "$as_ac_var=no"
11498 fi
11499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11500 fi
11501 echo "$as_me:11501: result: `eval echo '${'$as_ac_var'}'`" >&5
11502 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11503 if test `eval echo '${'$as_ac_var'}'` = yes; then
11504   cat >>confdefs.h <<EOF
11505 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11506 EOF
11507
11508 fi
11509 done
11510
11511         if test "x$ac_cv_func_putwc" != xyes ; then
11512
11513 echo "$as_me:11513: checking for multibyte character support" >&5
11514 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11515 if test "${cf_cv_utf8_lib+set}" = set; then
11516   echo $ECHO_N "(cached) $ECHO_C" >&6
11517 else
11518
11519         cf_save_LIBS="$LIBS"
11520         cat >conftest.$ac_ext <<_ACEOF
11521 #line 11521 "configure"
11522 #include "confdefs.h"
11523
11524 #include <stdlib.h>
11525 int
11526 main (void)
11527 {
11528 putwc(0,0);
11529   ;
11530   return 0;
11531 }
11532 _ACEOF
11533 rm -f conftest.$ac_objext conftest$ac_exeext
11534 if { (eval echo "$as_me:11534: \"$ac_link\"") >&5
11535   (eval $ac_link) 2>&5
11536   ac_status=$?
11537   echo "$as_me:11537: \$? = $ac_status" >&5
11538   (exit $ac_status); } &&
11539          { ac_try='test -s conftest$ac_exeext'
11540   { (eval echo "$as_me:11540: \"$ac_try\"") >&5
11541   (eval $ac_try) 2>&5
11542   ac_status=$?
11543   echo "$as_me:11543: \$? = $ac_status" >&5
11544   (exit $ac_status); }; }; then
11545   cf_cv_utf8_lib=yes
11546 else
11547   echo "$as_me: failed program was:" >&5
11548 cat conftest.$ac_ext >&5
11549
11550 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11551 # will be set on completion of the AC_TRY_LINK below.
11552 cf_cv_header_path_utf8=
11553 cf_cv_library_path_utf8=
11554
11555 echo "${as_me:-configure}:11555: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11556
11557 cf_save_LIBS="$LIBS"
11558
11559 cat >conftest.$ac_ext <<_ACEOF
11560 #line 11560 "configure"
11561 #include "confdefs.h"
11562
11563 #include <libutf8.h>
11564 int
11565 main (void)
11566 {
11567 putwc(0,0);
11568   ;
11569   return 0;
11570 }
11571 _ACEOF
11572 rm -f conftest.$ac_objext conftest$ac_exeext
11573 if { (eval echo "$as_me:11573: \"$ac_link\"") >&5
11574   (eval $ac_link) 2>&5
11575   ac_status=$?
11576   echo "$as_me:11576: \$? = $ac_status" >&5
11577   (exit $ac_status); } &&
11578          { ac_try='test -s conftest$ac_exeext'
11579   { (eval echo "$as_me:11579: \"$ac_try\"") >&5
11580   (eval $ac_try) 2>&5
11581   ac_status=$?
11582   echo "$as_me:11582: \$? = $ac_status" >&5
11583   (exit $ac_status); }; }; then
11584
11585         cf_cv_find_linkage_utf8=yes
11586         cf_cv_header_path_utf8=/usr/include
11587         cf_cv_library_path_utf8=/usr/lib
11588
11589 else
11590   echo "$as_me: failed program was:" >&5
11591 cat conftest.$ac_ext >&5
11592
11593 LIBS="-lutf8  $cf_save_LIBS"
11594
11595 cat >conftest.$ac_ext <<_ACEOF
11596 #line 11596 "configure"
11597 #include "confdefs.h"
11598
11599 #include <libutf8.h>
11600 int
11601 main (void)
11602 {
11603 putwc(0,0);
11604   ;
11605   return 0;
11606 }
11607 _ACEOF
11608 rm -f conftest.$ac_objext conftest$ac_exeext
11609 if { (eval echo "$as_me:11609: \"$ac_link\"") >&5
11610   (eval $ac_link) 2>&5
11611   ac_status=$?
11612   echo "$as_me:11612: \$? = $ac_status" >&5
11613   (exit $ac_status); } &&
11614          { ac_try='test -s conftest$ac_exeext'
11615   { (eval echo "$as_me:11615: \"$ac_try\"") >&5
11616   (eval $ac_try) 2>&5
11617   ac_status=$?
11618   echo "$as_me:11618: \$? = $ac_status" >&5
11619   (exit $ac_status); }; }; then
11620
11621         cf_cv_find_linkage_utf8=yes
11622         cf_cv_header_path_utf8=/usr/include
11623         cf_cv_library_path_utf8=/usr/lib
11624         cf_cv_library_file_utf8="-lutf8"
11625
11626 else
11627   echo "$as_me: failed program was:" >&5
11628 cat conftest.$ac_ext >&5
11629
11630         cf_cv_find_linkage_utf8=no
11631         LIBS="$cf_save_LIBS"
11632
11633         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11634
11635 echo "${as_me:-configure}:11635: testing find linkage for utf8 library ..." 1>&5
11636
11637 echo "${as_me:-configure}:11637: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11638
11639         cf_save_CPPFLAGS="$CPPFLAGS"
11640         cf_test_CPPFLAGS="$CPPFLAGS"
11641
11642 cf_search=
11643
11644 # collect the current set of include-directories from compiler flags
11645 cf_header_path_list=""
11646 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11647         for cf_header_path in $CPPFLAGS $CFLAGS
11648         do
11649                 case $cf_header_path in
11650                 (-I*)
11651                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11652
11653 test "x$cf_header_path" != "xNONE" && \
11654 test -d "$cf_header_path" && \
11655  {
11656         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11657         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11658         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11659         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11660         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11661         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11662 }
11663
11664                         cf_header_path_list="$cf_header_path_list $cf_search"
11665                         ;;
11666                 esac
11667         done
11668 fi
11669
11670 # add the variations for the package we are looking for
11671
11672 cf_search=
11673
11674 test "x$prefix" != "xNONE" && \
11675 test -d "$prefix" && \
11676  {
11677         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11678         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11679         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11680         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11681         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11682         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11683 }
11684
11685 for cf_subdir_prefix in \
11686         /usr \
11687         /usr/local \
11688         /usr/pkg \
11689         /opt \
11690         /opt/local \
11691         $HOME
11692 do
11693
11694 test "x$cf_subdir_prefix" != "x$prefix" && \
11695 test -d "$cf_subdir_prefix" && \
11696 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11697         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11698         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11699         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11700         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11701         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11702         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11703 }
11704
11705 done
11706
11707 test "$includedir" != NONE && \
11708 test "$includedir" != "/usr/include" && \
11709 test -d "$includedir" && {
11710         test -d $includedir &&    cf_search="$cf_search $includedir"
11711         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11712 }
11713
11714 test "$oldincludedir" != NONE && \
11715 test "$oldincludedir" != "/usr/include" && \
11716 test -d "$oldincludedir" && {
11717         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11718         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11719 }
11720
11721 cf_search="$cf_search $cf_header_path_list"
11722
11723         for cf_cv_header_path_utf8 in $cf_search
11724         do
11725                 if test -d $cf_cv_header_path_utf8 ; then
11726                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11727
11728 echo "${as_me:-configure}:11728: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11729
11730                         CPPFLAGS="$cf_save_CPPFLAGS"
11731
11732         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11733         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11734
11735                         cat >conftest.$ac_ext <<_ACEOF
11736 #line 11736 "configure"
11737 #include "confdefs.h"
11738
11739 #include <libutf8.h>
11740 int
11741 main (void)
11742 {
11743 putwc(0,0);
11744   ;
11745   return 0;
11746 }
11747 _ACEOF
11748 rm -f conftest.$ac_objext
11749 if { (eval echo "$as_me:11749: \"$ac_compile\"") >&5
11750   (eval $ac_compile) 2>&5
11751   ac_status=$?
11752   echo "$as_me:11752: \$? = $ac_status" >&5
11753   (exit $ac_status); } &&
11754          { ac_try='test -s conftest.$ac_objext'
11755   { (eval echo "$as_me:11755: \"$ac_try\"") >&5
11756   (eval $ac_try) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit $ac_status); }; }; then
11760
11761                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11762
11763 echo "${as_me:-configure}:11763: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11764
11765                                 cf_cv_find_linkage_utf8=maybe
11766                                 cf_test_CPPFLAGS="$CPPFLAGS"
11767                                 break
11768 else
11769   echo "$as_me: failed program was:" >&5
11770 cat conftest.$ac_ext >&5
11771
11772                                 CPPFLAGS="$cf_save_CPPFLAGS"
11773
11774 fi
11775 rm -f conftest.$ac_objext conftest.$ac_ext
11776                 fi
11777         done
11778
11779         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11780
11781 echo "${as_me:-configure}:11781: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11782
11783                 cf_save_LIBS="$LIBS"
11784                 cf_save_LDFLAGS="$LDFLAGS"
11785
11786                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11787
11788 cf_search=
11789 cf_library_path_list=""
11790 if test -n "${LDFLAGS}${LIBS}" ; then
11791         for cf_library_path in $LDFLAGS $LIBS
11792         do
11793                 case $cf_library_path in
11794                 (-L*)
11795                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11796
11797 test "x$cf_library_path" != "xNONE" && \
11798 test -d "$cf_library_path" && \
11799  {
11800         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11801         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11802         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11803         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11804         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11805         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11806 }
11807
11808                         cf_library_path_list="$cf_library_path_list $cf_search"
11809                         ;;
11810                 esac
11811         done
11812 fi
11813
11814 cf_search=
11815
11816 test "x$prefix" != "xNONE" && \
11817 test -d "$prefix" && \
11818  {
11819         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11820         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11821         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11822         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11823         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11824         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11825 }
11826
11827 for cf_subdir_prefix in \
11828         /usr \
11829         /usr/local \
11830         /usr/pkg \
11831         /opt \
11832         /opt/local \
11833         $HOME
11834 do
11835
11836 test "x$cf_subdir_prefix" != "x$prefix" && \
11837 test -d "$cf_subdir_prefix" && \
11838 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11839         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11840         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11841         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11842         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11843         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11844         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11845 }
11846
11847 done
11848
11849 cf_search="$cf_library_path_list $cf_search"
11850
11851                         for cf_cv_library_path_utf8 in $cf_search
11852                         do
11853                                 if test -d $cf_cv_library_path_utf8 ; then
11854                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11855
11856 echo "${as_me:-configure}:11856: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11857
11858                                         CPPFLAGS="$cf_test_CPPFLAGS"
11859                                         LIBS="-lutf8  $cf_save_LIBS"
11860                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11861                                         cat >conftest.$ac_ext <<_ACEOF
11862 #line 11862 "configure"
11863 #include "confdefs.h"
11864
11865 #include <libutf8.h>
11866 int
11867 main (void)
11868 {
11869 putwc(0,0);
11870   ;
11871   return 0;
11872 }
11873 _ACEOF
11874 rm -f conftest.$ac_objext conftest$ac_exeext
11875 if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
11876   (eval $ac_link) 2>&5
11877   ac_status=$?
11878   echo "$as_me:11878: \$? = $ac_status" >&5
11879   (exit $ac_status); } &&
11880          { ac_try='test -s conftest$ac_exeext'
11881   { (eval echo "$as_me:11881: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:11884: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886
11887                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11888
11889 echo "${as_me:-configure}:11889: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11890
11891                                         cf_cv_find_linkage_utf8=yes
11892                                         cf_cv_library_file_utf8="-lutf8"
11893                                         break
11894 else
11895   echo "$as_me: failed program was:" >&5
11896 cat conftest.$ac_ext >&5
11897
11898                                         CPPFLAGS="$cf_save_CPPFLAGS"
11899                                         LIBS="$cf_save_LIBS"
11900                                         LDFLAGS="$cf_save_LDFLAGS"
11901
11902 fi
11903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11904                                 fi
11905                         done
11906                         CPPFLAGS="$cf_save_CPPFLAGS"
11907                         LDFLAGS="$cf_save_LDFLAGS"
11908                 fi
11909
11910         else
11911                 cf_cv_find_linkage_utf8=no
11912         fi
11913
11914 fi
11915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11916
11917 fi
11918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11919
11920 LIBS="$cf_save_LIBS"
11921
11922 if test "$cf_cv_find_linkage_utf8" = yes ; then
11923 cf_cv_utf8_lib=add-on
11924 else
11925 cf_cv_utf8_lib=no
11926 fi
11927
11928 fi
11929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11930 fi
11931 echo "$as_me:11931: result: $cf_cv_utf8_lib" >&5
11932 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11933
11934 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11935 # ncurses/ncursesw:
11936 if test "$cf_cv_utf8_lib" = "add-on" ; then
11937
11938 cat >>confdefs.h <<\EOF
11939 #define HAVE_LIBUTF8_H 1
11940 EOF
11941
11942 if test -n "$cf_cv_header_path_utf8" ; then
11943   for cf_add_incdir in $cf_cv_header_path_utf8
11944   do
11945         while test $cf_add_incdir != /usr/include
11946         do
11947           if test -d $cf_add_incdir
11948           then
11949                 cf_have_incdir=no
11950                 if test -n "$CFLAGS$CPPFLAGS" ; then
11951                   # a loop is needed to ensure we can add subdirs of existing dirs
11952                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11953                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11954                           cf_have_incdir=yes; break
11955                         fi
11956                   done
11957                 fi
11958
11959                 if test "$cf_have_incdir" = no ; then
11960                   if test "$cf_add_incdir" = /usr/local/include ; then
11961                         if test "$GCC" = yes
11962                         then
11963                           cf_save_CPPFLAGS=$CPPFLAGS
11964
11965         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11966         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11967
11968                           cat >conftest.$ac_ext <<_ACEOF
11969 #line 11969 "configure"
11970 #include "confdefs.h"
11971 #include <stdio.h>
11972 int
11973 main (void)
11974 {
11975 printf("Hello")
11976   ;
11977   return 0;
11978 }
11979 _ACEOF
11980 rm -f conftest.$ac_objext
11981 if { (eval echo "$as_me:11981: \"$ac_compile\"") >&5
11982   (eval $ac_compile) 2>&5
11983   ac_status=$?
11984   echo "$as_me:11984: \$? = $ac_status" >&5
11985   (exit $ac_status); } &&
11986          { ac_try='test -s conftest.$ac_objext'
11987   { (eval echo "$as_me:11987: \"$ac_try\"") >&5
11988   (eval $ac_try) 2>&5
11989   ac_status=$?
11990   echo "$as_me:11990: \$? = $ac_status" >&5
11991   (exit $ac_status); }; }; then
11992   :
11993 else
11994   echo "$as_me: failed program was:" >&5
11995 cat conftest.$ac_ext >&5
11996 cf_have_incdir=yes
11997 fi
11998 rm -f conftest.$ac_objext conftest.$ac_ext
11999                           CPPFLAGS=$cf_save_CPPFLAGS
12000                         fi
12001                   fi
12002                 fi
12003
12004                 if test "$cf_have_incdir" = no ; then
12005                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12006
12007 echo "${as_me:-configure}:12007: testing adding $cf_add_incdir to include-path ..." 1>&5
12008
12009                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12010
12011                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12012                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12013                   cf_add_incdir="$cf_top_incdir"
12014                 else
12015                   break
12016                 fi
12017           else
12018                 break
12019           fi
12020         done
12021   done
12022 fi
12023
12024 if test -n "$cf_cv_library_path_utf8" ; then
12025         for cf_add_libdir in $cf_cv_library_path_utf8
12026         do
12027                 if test $cf_add_libdir = /usr/lib ; then
12028                         :
12029                 elif test -d $cf_add_libdir
12030                 then
12031                         cf_have_libdir=no
12032                         if test -n "$LDFLAGS$LIBS" ; then
12033                                 # a loop is needed to ensure we can add subdirs of existing dirs
12034                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12035                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12036                                                 cf_have_libdir=yes; break
12037                                         fi
12038                                 done
12039                         fi
12040                         if test "$cf_have_libdir" = no ; then
12041                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12042
12043 echo "${as_me:-configure}:12043: testing adding $cf_add_libdir to library-path ..." 1>&5
12044
12045                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12046                         fi
12047                 fi
12048         done
12049 fi
12050
12051 cf_add_libs="$cf_cv_library_file_utf8"
12052 # Filter out duplicates - this happens with badly-designed ".pc" files...
12053 for cf_add_1lib in $LIBS
12054 do
12055         for cf_add_2lib in $cf_add_libs
12056         do
12057                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12058                 then
12059                         cf_add_1lib=
12060                         break
12061                 fi
12062         done
12063         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12064 done
12065 LIBS="$cf_add_libs"
12066
12067 fi
12068
12069                 if test "$cf_cv_utf8_lib" != no ; then
12070                         NCURSES_LIBUTF8=1
12071                 fi
12072         fi
12073
12074 # This is needed on Tru64 5.0 to declare mbstate_t
12075 echo "$as_me:12075: checking if we must include wchar.h to declare mbstate_t" >&5
12076 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12077 if test "${cf_cv_mbstate_t+set}" = set; then
12078   echo $ECHO_N "(cached) $ECHO_C" >&6
12079 else
12080
12081 cat >conftest.$ac_ext <<_ACEOF
12082 #line 12082 "configure"
12083 #include "confdefs.h"
12084
12085 #include <stdlib.h>
12086 #include <stdarg.h>
12087 #include <stdio.h>
12088 #ifdef HAVE_LIBUTF8_H
12089 #include <libutf8.h>
12090 #endif
12091 int
12092 main (void)
12093 {
12094 mbstate_t state
12095   ;
12096   return 0;
12097 }
12098 _ACEOF
12099 rm -f conftest.$ac_objext
12100 if { (eval echo "$as_me:12100: \"$ac_compile\"") >&5
12101   (eval $ac_compile) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit $ac_status); } &&
12105          { ac_try='test -s conftest.$ac_objext'
12106   { (eval echo "$as_me:12106: \"$ac_try\"") >&5
12107   (eval $ac_try) 2>&5
12108   ac_status=$?
12109   echo "$as_me:12109: \$? = $ac_status" >&5
12110   (exit $ac_status); }; }; then
12111   cf_cv_mbstate_t=no
12112 else
12113   echo "$as_me: failed program was:" >&5
12114 cat conftest.$ac_ext >&5
12115 cat >conftest.$ac_ext <<_ACEOF
12116 #line 12116 "configure"
12117 #include "confdefs.h"
12118
12119 #include <stdlib.h>
12120 #include <stdarg.h>
12121 #include <stdio.h>
12122 #include <wchar.h>
12123 #ifdef HAVE_LIBUTF8_H
12124 #include <libutf8.h>
12125 #endif
12126 int
12127 main (void)
12128 {
12129 mbstate_t value
12130   ;
12131   return 0;
12132 }
12133 _ACEOF
12134 rm -f conftest.$ac_objext
12135 if { (eval echo "$as_me:12135: \"$ac_compile\"") >&5
12136   (eval $ac_compile) 2>&5
12137   ac_status=$?
12138   echo "$as_me:12138: \$? = $ac_status" >&5
12139   (exit $ac_status); } &&
12140          { ac_try='test -s conftest.$ac_objext'
12141   { (eval echo "$as_me:12141: \"$ac_try\"") >&5
12142   (eval $ac_try) 2>&5
12143   ac_status=$?
12144   echo "$as_me:12144: \$? = $ac_status" >&5
12145   (exit $ac_status); }; }; then
12146   cf_cv_mbstate_t=yes
12147 else
12148   echo "$as_me: failed program was:" >&5
12149 cat conftest.$ac_ext >&5
12150 cf_cv_mbstate_t=unknown
12151 fi
12152 rm -f conftest.$ac_objext conftest.$ac_ext
12153 fi
12154 rm -f conftest.$ac_objext conftest.$ac_ext
12155 fi
12156 echo "$as_me:12156: result: $cf_cv_mbstate_t" >&5
12157 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12158
12159 if test "$cf_cv_mbstate_t" = yes ; then
12160
12161 cat >>confdefs.h <<\EOF
12162 #define NEED_WCHAR_H 1
12163 EOF
12164
12165         NEED_WCHAR_H=1
12166 fi
12167
12168 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12169 if test "$cf_cv_mbstate_t" = unknown ; then
12170         NCURSES_MBSTATE_T=1
12171 fi
12172
12173 # This is needed on Tru64 5.0 to declare wchar_t
12174 echo "$as_me:12174: checking if we must include wchar.h to declare wchar_t" >&5
12175 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12176 if test "${cf_cv_wchar_t+set}" = set; then
12177   echo $ECHO_N "(cached) $ECHO_C" >&6
12178 else
12179
12180 cat >conftest.$ac_ext <<_ACEOF
12181 #line 12181 "configure"
12182 #include "confdefs.h"
12183
12184 #include <stdlib.h>
12185 #include <stdarg.h>
12186 #include <stdio.h>
12187 #ifdef HAVE_LIBUTF8_H
12188 #include <libutf8.h>
12189 #endif
12190 int
12191 main (void)
12192 {
12193 wchar_t state
12194   ;
12195   return 0;
12196 }
12197 _ACEOF
12198 rm -f conftest.$ac_objext
12199 if { (eval echo "$as_me:12199: \"$ac_compile\"") >&5
12200   (eval $ac_compile) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit $ac_status); } &&
12204          { ac_try='test -s conftest.$ac_objext'
12205   { (eval echo "$as_me:12205: \"$ac_try\"") >&5
12206   (eval $ac_try) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit $ac_status); }; }; then
12210   cf_cv_wchar_t=no
12211 else
12212   echo "$as_me: failed program was:" >&5
12213 cat conftest.$ac_ext >&5
12214 cat >conftest.$ac_ext <<_ACEOF
12215 #line 12215 "configure"
12216 #include "confdefs.h"
12217
12218 #include <stdlib.h>
12219 #include <stdarg.h>
12220 #include <stdio.h>
12221 #include <wchar.h>
12222 #ifdef HAVE_LIBUTF8_H
12223 #include <libutf8.h>
12224 #endif
12225 int
12226 main (void)
12227 {
12228 wchar_t value
12229   ;
12230   return 0;
12231 }
12232 _ACEOF
12233 rm -f conftest.$ac_objext
12234 if { (eval echo "$as_me:12234: \"$ac_compile\"") >&5
12235   (eval $ac_compile) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); } &&
12239          { ac_try='test -s conftest.$ac_objext'
12240   { (eval echo "$as_me:12240: \"$ac_try\"") >&5
12241   (eval $ac_try) 2>&5
12242   ac_status=$?
12243   echo "$as_me:12243: \$? = $ac_status" >&5
12244   (exit $ac_status); }; }; then
12245   cf_cv_wchar_t=yes
12246 else
12247   echo "$as_me: failed program was:" >&5
12248 cat conftest.$ac_ext >&5
12249 cf_cv_wchar_t=unknown
12250 fi
12251 rm -f conftest.$ac_objext conftest.$ac_ext
12252 fi
12253 rm -f conftest.$ac_objext conftest.$ac_ext
12254 fi
12255 echo "$as_me:12255: result: $cf_cv_wchar_t" >&5
12256 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12257
12258 if test "$cf_cv_wchar_t" = yes ; then
12259
12260 cat >>confdefs.h <<\EOF
12261 #define NEED_WCHAR_H 1
12262 EOF
12263
12264         NEED_WCHAR_H=1
12265 fi
12266
12267 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12268 if test "$cf_cv_wchar_t" = unknown ; then
12269         NCURSES_WCHAR_T=1
12270 fi
12271
12272 # if we find wchar_t in either place, use substitution to provide a fallback.
12273 if test "$cf_cv_wchar_t" != unknown ; then
12274         NCURSES_OK_WCHAR_T=1
12275 fi
12276
12277 # This is needed on Tru64 5.0 to declare wint_t
12278 echo "$as_me:12278: checking if we must include wchar.h to declare wint_t" >&5
12279 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12280 if test "${cf_cv_wint_t+set}" = set; then
12281   echo $ECHO_N "(cached) $ECHO_C" >&6
12282 else
12283
12284 cat >conftest.$ac_ext <<_ACEOF
12285 #line 12285 "configure"
12286 #include "confdefs.h"
12287
12288 #include <stdlib.h>
12289 #include <stdarg.h>
12290 #include <stdio.h>
12291 #ifdef HAVE_LIBUTF8_H
12292 #include <libutf8.h>
12293 #endif
12294 int
12295 main (void)
12296 {
12297 wint_t state
12298   ;
12299   return 0;
12300 }
12301 _ACEOF
12302 rm -f conftest.$ac_objext
12303 if { (eval echo "$as_me:12303: \"$ac_compile\"") >&5
12304   (eval $ac_compile) 2>&5
12305   ac_status=$?
12306   echo "$as_me:12306: \$? = $ac_status" >&5
12307   (exit $ac_status); } &&
12308          { ac_try='test -s conftest.$ac_objext'
12309   { (eval echo "$as_me:12309: \"$ac_try\"") >&5
12310   (eval $ac_try) 2>&5
12311   ac_status=$?
12312   echo "$as_me:12312: \$? = $ac_status" >&5
12313   (exit $ac_status); }; }; then
12314   cf_cv_wint_t=no
12315 else
12316   echo "$as_me: failed program was:" >&5
12317 cat conftest.$ac_ext >&5
12318 cat >conftest.$ac_ext <<_ACEOF
12319 #line 12319 "configure"
12320 #include "confdefs.h"
12321
12322 #include <stdlib.h>
12323 #include <stdarg.h>
12324 #include <stdio.h>
12325 #include <wchar.h>
12326 #ifdef HAVE_LIBUTF8_H
12327 #include <libutf8.h>
12328 #endif
12329 int
12330 main (void)
12331 {
12332 wint_t value
12333   ;
12334   return 0;
12335 }
12336 _ACEOF
12337 rm -f conftest.$ac_objext
12338 if { (eval echo "$as_me:12338: \"$ac_compile\"") >&5
12339   (eval $ac_compile) 2>&5
12340   ac_status=$?
12341   echo "$as_me:12341: \$? = $ac_status" >&5
12342   (exit $ac_status); } &&
12343          { ac_try='test -s conftest.$ac_objext'
12344   { (eval echo "$as_me:12344: \"$ac_try\"") >&5
12345   (eval $ac_try) 2>&5
12346   ac_status=$?
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); }; }; then
12349   cf_cv_wint_t=yes
12350 else
12351   echo "$as_me: failed program was:" >&5
12352 cat conftest.$ac_ext >&5
12353 cf_cv_wint_t=unknown
12354 fi
12355 rm -f conftest.$ac_objext conftest.$ac_ext
12356 fi
12357 rm -f conftest.$ac_objext conftest.$ac_ext
12358 fi
12359 echo "$as_me:12359: result: $cf_cv_wint_t" >&5
12360 echo "${ECHO_T}$cf_cv_wint_t" >&6
12361
12362 if test "$cf_cv_wint_t" = yes ; then
12363
12364 cat >>confdefs.h <<\EOF
12365 #define NEED_WCHAR_H 1
12366 EOF
12367
12368         NEED_WCHAR_H=1
12369 fi
12370
12371 # if we do not find wint_t in either place, use substitution to provide a fallback.
12372 if test "$cf_cv_wint_t" = unknown ; then
12373         NCURSES_WINT_T=1
12374 fi
12375
12376 # if we find wint_t in either place, use substitution to provide a fallback.
12377 if test "$cf_cv_wint_t" != unknown ; then
12378         NCURSES_OK_WINT_T=1
12379 fi
12380
12381         if test "$NCURSES_MBSTATE_T" != 0; then
12382
12383 cat >>confdefs.h <<\EOF
12384 #define NEED_MBSTATE_T_DEF 1
12385 EOF
12386
12387         fi
12388 fi
12389
12390 ###   use option --disable-lp64 to allow long chtype
12391 echo "$as_me:12391: checking whether to enable _LP64 definition in curses.h" >&5
12392 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12393
12394 # Check whether --enable-lp64 or --disable-lp64 was given.
12395 if test "${enable_lp64+set}" = set; then
12396   enableval="$enable_lp64"
12397   with_lp64=$enableval
12398 else
12399   with_lp64=$cf_dft_with_lp64
12400 fi;
12401 echo "$as_me:12401: result: $with_lp64" >&5
12402 echo "${ECHO_T}$with_lp64" >&6
12403
12404 if test "x$with_lp64" = xyes ; then
12405         cf_cv_enable_lp64=1
12406 else
12407         cf_cv_enable_lp64=0
12408 fi
12409
12410 # Check whether --enable-largefile or --disable-largefile was given.
12411 if test "${enable_largefile+set}" = set; then
12412   enableval="$enable_largefile"
12413
12414 fi;
12415 if test "$enable_largefile" != no; then
12416
12417   echo "$as_me:12417: checking for special C compiler options needed for large files" >&5
12418 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12419 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12420   echo $ECHO_N "(cached) $ECHO_C" >&6
12421 else
12422   ac_cv_sys_largefile_CC=no
12423      if test "$GCC" != yes; then
12424        ac_save_CC=$CC
12425        while :; do
12426          # IRIX 6.2 and later do not support large files by default,
12427          # so use the C compiler's -n32 option if that helps.
12428          cat >conftest.$ac_ext <<_ACEOF
12429 #line 12429 "configure"
12430 #include "confdefs.h"
12431 #include <sys/types.h>
12432  /* Check that off_t can represent 2**63 - 1 correctly.
12433     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12434     since some C++ compilers masquerading as C compilers
12435     incorrectly reject 9223372036854775807.  */
12436 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12437   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12438                        && LARGE_OFF_T % 2147483647 == 1)
12439                       ? 1 : -1];
12440 int
12441 main (void)
12442 {
12443
12444   ;
12445   return 0;
12446 }
12447 _ACEOF
12448          rm -f conftest.$ac_objext
12449 if { (eval echo "$as_me:12449: \"$ac_compile\"") >&5
12450   (eval $ac_compile) 2>&5
12451   ac_status=$?
12452   echo "$as_me:12452: \$? = $ac_status" >&5
12453   (exit $ac_status); } &&
12454          { ac_try='test -s conftest.$ac_objext'
12455   { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456   (eval $ac_try) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); }; }; then
12460   break
12461 else
12462   echo "$as_me: failed program was:" >&5
12463 cat conftest.$ac_ext >&5
12464 fi
12465 rm -f conftest.$ac_objext
12466          CC="$CC -n32"
12467          rm -f conftest.$ac_objext
12468 if { (eval echo "$as_me:12468: \"$ac_compile\"") >&5
12469   (eval $ac_compile) 2>&5
12470   ac_status=$?
12471   echo "$as_me:12471: \$? = $ac_status" >&5
12472   (exit $ac_status); } &&
12473          { ac_try='test -s conftest.$ac_objext'
12474   { (eval echo "$as_me:12474: \"$ac_try\"") >&5
12475   (eval $ac_try) 2>&5
12476   ac_status=$?
12477   echo "$as_me:12477: \$? = $ac_status" >&5
12478   (exit $ac_status); }; }; then
12479   ac_cv_sys_largefile_CC=' -n32'; break
12480 else
12481   echo "$as_me: failed program was:" >&5
12482 cat conftest.$ac_ext >&5
12483 fi
12484 rm -f conftest.$ac_objext
12485          break
12486        done
12487        CC=$ac_save_CC
12488        rm -f conftest.$ac_ext
12489     fi
12490 fi
12491 echo "$as_me:12491: result: $ac_cv_sys_largefile_CC" >&5
12492 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12493   if test "$ac_cv_sys_largefile_CC" != no; then
12494     CC=$CC$ac_cv_sys_largefile_CC
12495   fi
12496
12497   echo "$as_me:12497: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12498 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12499 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12500   echo $ECHO_N "(cached) $ECHO_C" >&6
12501 else
12502   while :; do
12503   ac_cv_sys_file_offset_bits=no
12504   cat >conftest.$ac_ext <<_ACEOF
12505 #line 12505 "configure"
12506 #include "confdefs.h"
12507 #include <sys/types.h>
12508  /* Check that off_t can represent 2**63 - 1 correctly.
12509     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12510     since some C++ compilers masquerading as C compilers
12511     incorrectly reject 9223372036854775807.  */
12512 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12513   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12514                        && LARGE_OFF_T % 2147483647 == 1)
12515                       ? 1 : -1];
12516 int
12517 main (void)
12518 {
12519
12520   ;
12521   return 0;
12522 }
12523 _ACEOF
12524 rm -f conftest.$ac_objext
12525 if { (eval echo "$as_me:12525: \"$ac_compile\"") >&5
12526   (eval $ac_compile) 2>&5
12527   ac_status=$?
12528   echo "$as_me:12528: \$? = $ac_status" >&5
12529   (exit $ac_status); } &&
12530          { ac_try='test -s conftest.$ac_objext'
12531   { (eval echo "$as_me:12531: \"$ac_try\"") >&5
12532   (eval $ac_try) 2>&5
12533   ac_status=$?
12534   echo "$as_me:12534: \$? = $ac_status" >&5
12535   (exit $ac_status); }; }; then
12536   break
12537 else
12538   echo "$as_me: failed program was:" >&5
12539 cat conftest.$ac_ext >&5
12540 fi
12541 rm -f conftest.$ac_objext conftest.$ac_ext
12542   cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545 #define _FILE_OFFSET_BITS 64
12546 #include <sys/types.h>
12547  /* Check that off_t can represent 2**63 - 1 correctly.
12548     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12549     since some C++ compilers masquerading as C compilers
12550     incorrectly reject 9223372036854775807.  */
12551 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12552   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12553                        && LARGE_OFF_T % 2147483647 == 1)
12554                       ? 1 : -1];
12555 int
12556 main (void)
12557 {
12558
12559   ;
12560   return 0;
12561 }
12562 _ACEOF
12563 rm -f conftest.$ac_objext
12564 if { (eval echo "$as_me:12564: \"$ac_compile\"") >&5
12565   (eval $ac_compile) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); } &&
12569          { ac_try='test -s conftest.$ac_objext'
12570   { (eval echo "$as_me:12570: \"$ac_try\"") >&5
12571   (eval $ac_try) 2>&5
12572   ac_status=$?
12573   echo "$as_me:12573: \$? = $ac_status" >&5
12574   (exit $ac_status); }; }; then
12575   ac_cv_sys_file_offset_bits=64; break
12576 else
12577   echo "$as_me: failed program was:" >&5
12578 cat conftest.$ac_ext >&5
12579 fi
12580 rm -f conftest.$ac_objext conftest.$ac_ext
12581   break
12582 done
12583 fi
12584 echo "$as_me:12584: result: $ac_cv_sys_file_offset_bits" >&5
12585 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12586 if test "$ac_cv_sys_file_offset_bits" != no; then
12587
12588 cat >>confdefs.h <<EOF
12589 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12590 EOF
12591
12592 fi
12593 rm -rf conftest*
12594   echo "$as_me:12594: checking for _LARGE_FILES value needed for large files" >&5
12595 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12596 if test "${ac_cv_sys_large_files+set}" = set; then
12597   echo $ECHO_N "(cached) $ECHO_C" >&6
12598 else
12599   while :; do
12600   ac_cv_sys_large_files=no
12601   cat >conftest.$ac_ext <<_ACEOF
12602 #line 12602 "configure"
12603 #include "confdefs.h"
12604 #include <sys/types.h>
12605  /* Check that off_t can represent 2**63 - 1 correctly.
12606     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12607     since some C++ compilers masquerading as C compilers
12608     incorrectly reject 9223372036854775807.  */
12609 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12610   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12611                        && LARGE_OFF_T % 2147483647 == 1)
12612                       ? 1 : -1];
12613 int
12614 main (void)
12615 {
12616
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f conftest.$ac_objext
12622 if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
12623   (eval $ac_compile) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); } &&
12627          { ac_try='test -s conftest.$ac_objext'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); }; }; then
12633   break
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat conftest.$ac_ext >&5
12637 fi
12638 rm -f conftest.$ac_objext conftest.$ac_ext
12639   cat >conftest.$ac_ext <<_ACEOF
12640 #line 12640 "configure"
12641 #include "confdefs.h"
12642 #define _LARGE_FILES 1
12643 #include <sys/types.h>
12644  /* Check that off_t can represent 2**63 - 1 correctly.
12645     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12646     since some C++ compilers masquerading as C compilers
12647     incorrectly reject 9223372036854775807.  */
12648 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12649   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12650                        && LARGE_OFF_T % 2147483647 == 1)
12651                       ? 1 : -1];
12652 int
12653 main (void)
12654 {
12655
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f conftest.$ac_objext
12661 if { (eval echo "$as_me:12661: \"$ac_compile\"") >&5
12662   (eval $ac_compile) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); } &&
12666          { ac_try='test -s conftest.$ac_objext'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); }; }; then
12672   ac_cv_sys_large_files=1; break
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 cat conftest.$ac_ext >&5
12676 fi
12677 rm -f conftest.$ac_objext conftest.$ac_ext
12678   break
12679 done
12680 fi
12681 echo "$as_me:12681: result: $ac_cv_sys_large_files" >&5
12682 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12683 if test "$ac_cv_sys_large_files" != no; then
12684
12685 cat >>confdefs.h <<EOF
12686 #define _LARGE_FILES $ac_cv_sys_large_files
12687 EOF
12688
12689 fi
12690 rm -rf conftest*
12691 fi
12692
12693         if test "$enable_largefile" != no ; then
12694         echo "$as_me:12694: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12695 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12696 if test "${ac_cv_sys_largefile_source+set}" = set; then
12697   echo $ECHO_N "(cached) $ECHO_C" >&6
12698 else
12699   while :; do
12700   ac_cv_sys_largefile_source=no
12701   cat >conftest.$ac_ext <<_ACEOF
12702 #line 12702 "configure"
12703 #include "confdefs.h"
12704 #include <stdio.h>
12705 int
12706 main (void)
12707 {
12708 return !fseeko;
12709   ;
12710   return 0;
12711 }
12712 _ACEOF
12713 rm -f conftest.$ac_objext
12714 if { (eval echo "$as_me:12714: \"$ac_compile\"") >&5
12715   (eval $ac_compile) 2>&5
12716   ac_status=$?
12717   echo "$as_me:12717: \$? = $ac_status" >&5
12718   (exit $ac_status); } &&
12719          { ac_try='test -s conftest.$ac_objext'
12720   { (eval echo "$as_me:12720: \"$ac_try\"") >&5
12721   (eval $ac_try) 2>&5
12722   ac_status=$?
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); }; }; then
12725   break
12726 else
12727   echo "$as_me: failed program was:" >&5
12728 cat conftest.$ac_ext >&5
12729 fi
12730 rm -f conftest.$ac_objext conftest.$ac_ext
12731   cat >conftest.$ac_ext <<_ACEOF
12732 #line 12732 "configure"
12733 #include "confdefs.h"
12734 #define _LARGEFILE_SOURCE 1
12735 #include <stdio.h>
12736 int
12737 main (void)
12738 {
12739 return !fseeko;
12740   ;
12741   return 0;
12742 }
12743 _ACEOF
12744 rm -f conftest.$ac_objext
12745 if { (eval echo "$as_me:12745: \"$ac_compile\"") >&5
12746   (eval $ac_compile) 2>&5
12747   ac_status=$?
12748   echo "$as_me:12748: \$? = $ac_status" >&5
12749   (exit $ac_status); } &&
12750          { ac_try='test -s conftest.$ac_objext'
12751   { (eval echo "$as_me:12751: \"$ac_try\"") >&5
12752   (eval $ac_try) 2>&5
12753   ac_status=$?
12754   echo "$as_me:12754: \$? = $ac_status" >&5
12755   (exit $ac_status); }; }; then
12756   ac_cv_sys_largefile_source=1; break
12757 else
12758   echo "$as_me: failed program was:" >&5
12759 cat conftest.$ac_ext >&5
12760 fi
12761 rm -f conftest.$ac_objext conftest.$ac_ext
12762   break
12763 done
12764 fi
12765 echo "$as_me:12765: result: $ac_cv_sys_largefile_source" >&5
12766 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12767 if test "$ac_cv_sys_largefile_source" != no; then
12768
12769 cat >>confdefs.h <<EOF
12770 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12771 EOF
12772
12773 fi
12774 rm -rf conftest*
12775
12776 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12777 # in glibc 2.1.3, but that breaks too many other things.
12778 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12779 echo "$as_me:12779: checking for fseeko" >&5
12780 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12781 if test "${ac_cv_func_fseeko+set}" = set; then
12782   echo $ECHO_N "(cached) $ECHO_C" >&6
12783 else
12784   cat >conftest.$ac_ext <<_ACEOF
12785 #line 12785 "configure"
12786 #include "confdefs.h"
12787 #include <stdio.h>
12788 int
12789 main (void)
12790 {
12791 return fseeko && fseeko (stdin, 0, 0);
12792   ;
12793   return 0;
12794 }
12795 _ACEOF
12796 rm -f conftest.$ac_objext conftest$ac_exeext
12797 if { (eval echo "$as_me:12797: \"$ac_link\"") >&5
12798   (eval $ac_link) 2>&5
12799   ac_status=$?
12800   echo "$as_me:12800: \$? = $ac_status" >&5
12801   (exit $ac_status); } &&
12802          { ac_try='test -s conftest$ac_exeext'
12803   { (eval echo "$as_me:12803: \"$ac_try\"") >&5
12804   (eval $ac_try) 2>&5
12805   ac_status=$?
12806   echo "$as_me:12806: \$? = $ac_status" >&5
12807   (exit $ac_status); }; }; then
12808   ac_cv_func_fseeko=yes
12809 else
12810   echo "$as_me: failed program was:" >&5
12811 cat conftest.$ac_ext >&5
12812 ac_cv_func_fseeko=no
12813 fi
12814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12815 fi
12816 echo "$as_me:12816: result: $ac_cv_func_fseeko" >&5
12817 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12818 if test $ac_cv_func_fseeko = yes; then
12819
12820 cat >>confdefs.h <<\EOF
12821 #define HAVE_FSEEKO 1
12822 EOF
12823
12824 fi
12825
12826         # Normally we would collect these definitions in the config.h,
12827         # but (like _XOPEN_SOURCE), some environments rely on having these
12828         # defined before any of the system headers are included.  Another
12829         # case comes up with C++, e.g., on AIX the compiler compiles the
12830         # header files by themselves before looking at the body files it is
12831         # told to compile.  For ncurses, those header files do not include
12832         # the config.h
12833         if test "$ac_cv_sys_large_files" != no
12834         then
12835
12836         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12837         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12838
12839         fi
12840         if test "$ac_cv_sys_largefile_source" != no
12841         then
12842
12843         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12844         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12845
12846         fi
12847         if test "$ac_cv_sys_file_offset_bits" != no
12848         then
12849
12850         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12851         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12852
12853         fi
12854
12855         echo "$as_me:12855: checking whether to use struct dirent64" >&5
12856 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12857 if test "${cf_cv_struct_dirent64+set}" = set; then
12858   echo $ECHO_N "(cached) $ECHO_C" >&6
12859 else
12860
12861                 cat >conftest.$ac_ext <<_ACEOF
12862 #line 12862 "configure"
12863 #include "confdefs.h"
12864
12865 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12866 #include <sys/types.h>
12867 #include <dirent.h>
12868
12869 int
12870 main (void)
12871 {
12872
12873                 /* if transitional largefile support is setup, this is true */
12874                 extern struct dirent64 * readdir(DIR *);
12875                 struct dirent64 *x = readdir((DIR *)0);
12876                 struct dirent *y = readdir((DIR *)0);
12877                 int z = x - y;
12878
12879   ;
12880   return 0;
12881 }
12882 _ACEOF
12883 rm -f conftest.$ac_objext
12884 if { (eval echo "$as_me:12884: \"$ac_compile\"") >&5
12885   (eval $ac_compile) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit $ac_status); } &&
12889          { ac_try='test -s conftest.$ac_objext'
12890   { (eval echo "$as_me:12890: \"$ac_try\"") >&5
12891   (eval $ac_try) 2>&5
12892   ac_status=$?
12893   echo "$as_me:12893: \$? = $ac_status" >&5
12894   (exit $ac_status); }; }; then
12895   cf_cv_struct_dirent64=yes
12896 else
12897   echo "$as_me: failed program was:" >&5
12898 cat conftest.$ac_ext >&5
12899 cf_cv_struct_dirent64=no
12900 fi
12901 rm -f conftest.$ac_objext conftest.$ac_ext
12902
12903 fi
12904 echo "$as_me:12904: result: $cf_cv_struct_dirent64" >&5
12905 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12906         test "$cf_cv_struct_dirent64" = yes &&
12907 cat >>confdefs.h <<\EOF
12908 #define HAVE_STRUCT_DIRENT64 1
12909 EOF
12910
12911         fi
12912
12913 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12914 echo "$as_me:12914: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12915 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12916
12917 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12918 if test "${enable_tparm_varargs+set}" = set; then
12919   enableval="$enable_tparm_varargs"
12920   with_tparm_varargs=$enableval
12921 else
12922   with_tparm_varargs=yes
12923 fi;
12924 echo "$as_me:12924: result: $with_tparm_varargs" >&5
12925 echo "${ECHO_T}$with_tparm_varargs" >&6
12926 NCURSES_TPARM_VARARGS=0
12927 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12928
12929 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12930 if test "$with_ticlib" != no ; then
12931 echo "$as_me:12931: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12932 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12933
12934 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12935 if test "${enable_tic_depends+set}" = set; then
12936   enableval="$enable_tic_depends"
12937   with_tic_depends=$enableval
12938 else
12939   with_tic_depends=yes
12940 fi;
12941 echo "$as_me:12941: result: $with_tic_depends" >&5
12942 echo "${ECHO_T}$with_tic_depends" >&6
12943 else
12944         with_tic_depends=no
12945 fi
12946
12947 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12948 echo "$as_me:12948: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12949 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12950
12951 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12952 if test "${enable_wattr_macros+set}" = set; then
12953   enableval="$enable_wattr_macros"
12954   with_wattr_macros=$enableval
12955 else
12956   with_wattr_macros=yes
12957 fi;
12958 if [ "x$with_wattr_macros" != xyes ]; then
12959         NCURSES_WATTR_MACROS=0
12960         echo "$as_me:12960: result: yes" >&5
12961 echo "${ECHO_T}yes" >&6
12962 else
12963         NCURSES_WATTR_MACROS=1
12964         echo "$as_me:12964: result: no" >&5
12965 echo "${ECHO_T}no" >&6
12966 fi
12967
12968 echo "$as_me:12968: checking for X11 rgb file" >&5
12969 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12970
12971 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12972 if test "${with_x11_rgb+set}" = set; then
12973   withval="$with_x11_rgb"
12974   RGB_PATH=$withval
12975 else
12976   RGB_PATH=auto
12977 fi;
12978
12979 if test "x$RGB_PATH" = xauto
12980 then
12981         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12982         for cf_path in \
12983                 /opt/local/share/X11/rgb.txt \
12984                 /opt/X11/share/X11/rgb.txt \
12985                 /usr/share/X11/rgb.txt \
12986                 /usr/X11/share/X11/rgb.txt \
12987                 /usr/X11/lib/X11/rgb.txt \
12988                 /usr/lib/X11/rgb.txt \
12989                 /etc/X11/rgb.txt \
12990                 /usr/pkg/lib/X11/rgb.txt \
12991                 /usr/X11R7/lib/X11/rgb.txt \
12992                 /usr/X11R6/lib/X11/rgb.txt \
12993                 /usr/X11R5/lib/X11/rgb.txt \
12994                 /usr/X11R4/lib/X11/rgb.txt \
12995                 /usr/local/lib/X11/rgb.txt \
12996                 /usr/local/share/X11/rgb.txt \
12997                 /usr/lib64/X11/rgb.txt
12998         do
12999                 if test -f "$cf_path" ; then
13000                         RGB_PATH="$cf_path"
13001                         break
13002                 fi
13003         done
13004 else
13005         cf_path=$RGB_PATH
13006
13007 if test "x$prefix" != xNONE; then
13008         cf_path_syntax="$prefix"
13009 else
13010         cf_path_syntax="$ac_default_prefix"
13011 fi
13012
13013 case ".$cf_path" in
13014 (.\$\(*\)*|.\'*\'*)
13015         ;;
13016 (..|./*|.\\*)
13017         ;;
13018 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13019         ;;
13020 (.\${*prefix}*|.\${*dir}*)
13021         eval cf_path="$cf_path"
13022         case ".$cf_path" in
13023         (.NONE/*)
13024                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13025                 ;;
13026         esac
13027         ;;
13028 (.no|.NONE/*)
13029         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13030         ;;
13031 (*)
13032         { { echo "$as_me:13032: error: expected a pathname, not \"$cf_path\"" >&5
13033 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13034    { (exit 1); exit 1; }; }
13035         ;;
13036 esac
13037
13038 fi
13039
13040 echo "$as_me:13040: result: $RGB_PATH" >&5
13041 echo "${ECHO_T}$RGB_PATH" >&6
13042
13043 cat >>confdefs.h <<EOF
13044 #define RGB_PATH "$cf_path"
13045 EOF
13046
13047 no_x11_rgb=
13048 if test "$RGB_PATH" = no
13049 then
13050         no_x11_rgb="#"
13051 fi
13052
13053 ###   use option --with-bool to override bool's type
13054 echo "$as_me:13054: checking for type of bool" >&5
13055 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13056
13057 # Check whether --with-bool or --without-bool was given.
13058 if test "${with_bool+set}" = set; then
13059   withval="$with_bool"
13060   NCURSES_BOOL="$withval"
13061 else
13062   NCURSES_BOOL=auto
13063 fi;
13064 echo "$as_me:13064: result: $NCURSES_BOOL" >&5
13065 echo "${ECHO_T}$NCURSES_BOOL" >&6
13066
13067 echo "$as_me:13067: checking for alternate terminal capabilities file" >&5
13068 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13069
13070 # Check whether --with-caps or --without-caps was given.
13071 if test "${with_caps+set}" = set; then
13072   withval="$with_caps"
13073   TERMINFO_CAPS=Caps.$withval
13074 else
13075   TERMINFO_CAPS=Caps
13076 fi;
13077 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13078 echo "$as_me:13078: result: $TERMINFO_CAPS" >&5
13079 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13080
13081 ###   use option --with-chtype to override chtype's type
13082 echo "$as_me:13082: checking for type of chtype" >&5
13083 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13084
13085 # Check whether --with-chtype or --without-chtype was given.
13086 if test "${with_chtype+set}" = set; then
13087   withval="$with_chtype"
13088   NCURSES_CHTYPE="$withval"
13089 else
13090   NCURSES_CHTYPE=$cf_dft_chtype
13091 fi;
13092 echo "$as_me:13092: result: $NCURSES_CHTYPE" >&5
13093 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13094
13095 ###   use option --with-ospeed to override ospeed's type
13096 echo "$as_me:13096: checking for type of ospeed" >&5
13097 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13098
13099 # Check whether --with-ospeed or --without-ospeed was given.
13100 if test "${with_ospeed+set}" = set; then
13101   withval="$with_ospeed"
13102   NCURSES_OSPEED="$withval"
13103 else
13104   NCURSES_OSPEED=short
13105 fi;
13106 echo "$as_me:13106: result: $NCURSES_OSPEED" >&5
13107 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13108
13109 ###   use option --with-mmask-t to override mmask_t's type
13110 echo "$as_me:13110: checking for type of mmask_t" >&5
13111 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13112
13113 # Check whether --with-mmask-t or --without-mmask-t was given.
13114 if test "${with_mmask_t+set}" = set; then
13115   withval="$with_mmask_t"
13116   NCURSES_MMASK_T="$withval"
13117 else
13118   NCURSES_MMASK_T=$cf_dft_mmask_t
13119 fi;
13120 echo "$as_me:13120: result: $NCURSES_MMASK_T" >&5
13121 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13122
13123 ###   use option --with-ccharw-max to override CCHARW_MAX size
13124 echo "$as_me:13124: checking for size CCHARW_MAX" >&5
13125 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13126
13127 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13128 if test "${with_ccharw_max+set}" = set; then
13129   withval="$with_ccharw_max"
13130   NCURSES_CCHARW_MAX="$withval"
13131 else
13132   NCURSES_CCHARW_MAX=5
13133 fi;
13134 echo "$as_me:13134: result: $NCURSES_CCHARW_MAX" >&5
13135 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13136
13137 echo "$as_me:13137: checking for ANSI C header files" >&5
13138 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13139 if test "${ac_cv_header_stdc+set}" = set; then
13140   echo $ECHO_N "(cached) $ECHO_C" >&6
13141 else
13142   cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145 #include <stdlib.h>
13146 #include <stdarg.h>
13147 #include <string.h>
13148 #include <float.h>
13149
13150 _ACEOF
13151 if { (eval echo "$as_me:13151: \"$ac_cpp conftest.$ac_ext\"") >&5
13152   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13153   ac_status=$?
13154   egrep -v '^ *\+' conftest.er1 >conftest.err
13155   rm -f conftest.er1
13156   cat conftest.err >&5
13157   echo "$as_me:13157: \$? = $ac_status" >&5
13158   (exit $ac_status); } >/dev/null; then
13159   if test -s conftest.err; then
13160     ac_cpp_err=$ac_c_preproc_warn_flag
13161   else
13162     ac_cpp_err=
13163   fi
13164 else
13165   ac_cpp_err=yes
13166 fi
13167 if test -z "$ac_cpp_err"; then
13168   ac_cv_header_stdc=yes
13169 else
13170   echo "$as_me: failed program was:" >&5
13171   cat conftest.$ac_ext >&5
13172   ac_cv_header_stdc=no
13173 fi
13174 rm -f conftest.err conftest.$ac_ext
13175
13176 if test $ac_cv_header_stdc = yes; then
13177   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13178   cat >conftest.$ac_ext <<_ACEOF
13179 #line 13179 "configure"
13180 #include "confdefs.h"
13181 #include <string.h>
13182
13183 _ACEOF
13184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13185   egrep "memchr" >/dev/null 2>&1; then
13186   :
13187 else
13188   ac_cv_header_stdc=no
13189 fi
13190 rm -rf conftest*
13191
13192 fi
13193
13194 if test $ac_cv_header_stdc = yes; then
13195   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13196   cat >conftest.$ac_ext <<_ACEOF
13197 #line 13197 "configure"
13198 #include "confdefs.h"
13199 #include <stdlib.h>
13200
13201 _ACEOF
13202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13203   egrep "free" >/dev/null 2>&1; then
13204   :
13205 else
13206   ac_cv_header_stdc=no
13207 fi
13208 rm -rf conftest*
13209
13210 fi
13211
13212 if test $ac_cv_header_stdc = yes; then
13213   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13214   if test "$cross_compiling" = yes; then
13215   :
13216 else
13217   cat >conftest.$ac_ext <<_ACEOF
13218 #line 13218 "configure"
13219 #include "confdefs.h"
13220 #include <ctype.h>
13221 #if ((' ' & 0x0FF) == 0x020)
13222 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13223 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13224 #else
13225 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13226                      || ('j' <= (c) && (c) <= 'r') \
13227                      || ('s' <= (c) && (c) <= 'z'))
13228 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13229 #endif
13230
13231 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13232 int
13233 main (void)
13234 {
13235   int i;
13236   for (i = 0; i < 256; i++)
13237     if (XOR (islower (i), ISLOWER (i))
13238         || toupper (i) != TOUPPER (i))
13239       $ac_main_return(2);
13240   $ac_main_return (0);
13241 }
13242 _ACEOF
13243 rm -f conftest$ac_exeext
13244 if { (eval echo "$as_me:13244: \"$ac_link\"") >&5
13245   (eval $ac_link) 2>&5
13246   ac_status=$?
13247   echo "$as_me:13247: \$? = $ac_status" >&5
13248   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13249   { (eval echo "$as_me:13249: \"$ac_try\"") >&5
13250   (eval $ac_try) 2>&5
13251   ac_status=$?
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit $ac_status); }; }; then
13254   :
13255 else
13256   echo "$as_me: program exited with status $ac_status" >&5
13257 echo "$as_me: failed program was:" >&5
13258 cat conftest.$ac_ext >&5
13259 ac_cv_header_stdc=no
13260 fi
13261 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13262 fi
13263 fi
13264 fi
13265 echo "$as_me:13265: result: $ac_cv_header_stdc" >&5
13266 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13267 if test $ac_cv_header_stdc = yes; then
13268
13269 cat >>confdefs.h <<\EOF
13270 #define STDC_HEADERS 1
13271 EOF
13272
13273 fi
13274
13275 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13276
13277 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13278                   inttypes.h stdint.h unistd.h
13279 do
13280 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13281 echo "$as_me:13281: checking for $ac_header" >&5
13282 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13283 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13284   echo $ECHO_N "(cached) $ECHO_C" >&6
13285 else
13286   cat >conftest.$ac_ext <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13289 $ac_includes_default
13290 #include <$ac_header>
13291 _ACEOF
13292 rm -f conftest.$ac_objext
13293 if { (eval echo "$as_me:13293: \"$ac_compile\"") >&5
13294   (eval $ac_compile) 2>&5
13295   ac_status=$?
13296   echo "$as_me:13296: \$? = $ac_status" >&5
13297   (exit $ac_status); } &&
13298          { ac_try='test -s conftest.$ac_objext'
13299   { (eval echo "$as_me:13299: \"$ac_try\"") >&5
13300   (eval $ac_try) 2>&5
13301   ac_status=$?
13302   echo "$as_me:13302: \$? = $ac_status" >&5
13303   (exit $ac_status); }; }; then
13304   eval "$as_ac_Header=yes"
13305 else
13306   echo "$as_me: failed program was:" >&5
13307 cat conftest.$ac_ext >&5
13308 eval "$as_ac_Header=no"
13309 fi
13310 rm -f conftest.$ac_objext conftest.$ac_ext
13311 fi
13312 echo "$as_me:13312: result: `eval echo '${'$as_ac_Header'}'`" >&5
13313 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13314 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13315   cat >>confdefs.h <<EOF
13316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13317 EOF
13318
13319 fi
13320 done
13321
13322 echo "$as_me:13322: checking for signed char" >&5
13323 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13324 if test "${ac_cv_type_signed_char+set}" = set; then
13325   echo $ECHO_N "(cached) $ECHO_C" >&6
13326 else
13327   cat >conftest.$ac_ext <<_ACEOF
13328 #line 13328 "configure"
13329 #include "confdefs.h"
13330 $ac_includes_default
13331 int
13332 main (void)
13333 {
13334 if ((signed char *) 0)
13335   return 0;
13336 if (sizeof (signed char))
13337   return 0;
13338   ;
13339   return 0;
13340 }
13341 _ACEOF
13342 rm -f conftest.$ac_objext
13343 if { (eval echo "$as_me:13343: \"$ac_compile\"") >&5
13344   (eval $ac_compile) 2>&5
13345   ac_status=$?
13346   echo "$as_me:13346: \$? = $ac_status" >&5
13347   (exit $ac_status); } &&
13348          { ac_try='test -s conftest.$ac_objext'
13349   { (eval echo "$as_me:13349: \"$ac_try\"") >&5
13350   (eval $ac_try) 2>&5
13351   ac_status=$?
13352   echo "$as_me:13352: \$? = $ac_status" >&5
13353   (exit $ac_status); }; }; then
13354   ac_cv_type_signed_char=yes
13355 else
13356   echo "$as_me: failed program was:" >&5
13357 cat conftest.$ac_ext >&5
13358 ac_cv_type_signed_char=no
13359 fi
13360 rm -f conftest.$ac_objext conftest.$ac_ext
13361 fi
13362 echo "$as_me:13362: result: $ac_cv_type_signed_char" >&5
13363 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13364
13365 echo "$as_me:13365: checking size of signed char" >&5
13366 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13367 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13368   echo $ECHO_N "(cached) $ECHO_C" >&6
13369 else
13370   if test "$ac_cv_type_signed_char" = yes; then
13371   if test "$cross_compiling" = yes; then
13372   # Depending upon the size, compute the lo and hi bounds.
13373 cat >conftest.$ac_ext <<_ACEOF
13374 #line 13374 "configure"
13375 #include "confdefs.h"
13376 $ac_includes_default
13377 int
13378 main (void)
13379 {
13380 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13381   ;
13382   return 0;
13383 }
13384 _ACEOF
13385 rm -f conftest.$ac_objext
13386 if { (eval echo "$as_me:13386: \"$ac_compile\"") >&5
13387   (eval $ac_compile) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit $ac_status); } &&
13391          { ac_try='test -s conftest.$ac_objext'
13392   { (eval echo "$as_me:13392: \"$ac_try\"") >&5
13393   (eval $ac_try) 2>&5
13394   ac_status=$?
13395   echo "$as_me:13395: \$? = $ac_status" >&5
13396   (exit $ac_status); }; }; then
13397   ac_lo=0 ac_mid=0
13398   while :; do
13399     cat >conftest.$ac_ext <<_ACEOF
13400 #line 13400 "configure"
13401 #include "confdefs.h"
13402 $ac_includes_default
13403 int
13404 main (void)
13405 {
13406 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 rm -f conftest.$ac_objext
13412 if { (eval echo "$as_me:13412: \"$ac_compile\"") >&5
13413   (eval $ac_compile) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); } &&
13417          { ac_try='test -s conftest.$ac_objext'
13418   { (eval echo "$as_me:13418: \"$ac_try\"") >&5
13419   (eval $ac_try) 2>&5
13420   ac_status=$?
13421   echo "$as_me:13421: \$? = $ac_status" >&5
13422   (exit $ac_status); }; }; then
13423   ac_hi=$ac_mid; break
13424 else
13425   echo "$as_me: failed program was:" >&5
13426 cat conftest.$ac_ext >&5
13427 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13428 fi
13429 rm -f conftest.$ac_objext conftest.$ac_ext
13430   done
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 cat conftest.$ac_ext >&5
13434 ac_hi=-1 ac_mid=-1
13435   while :; do
13436     cat >conftest.$ac_ext <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439 $ac_includes_default
13440 int
13441 main (void)
13442 {
13443 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13444   ;
13445   return 0;
13446 }
13447 _ACEOF
13448 rm -f conftest.$ac_objext
13449 if { (eval echo "$as_me:13449: \"$ac_compile\"") >&5
13450   (eval $ac_compile) 2>&5
13451   ac_status=$?
13452   echo "$as_me:13452: \$? = $ac_status" >&5
13453   (exit $ac_status); } &&
13454          { ac_try='test -s conftest.$ac_objext'
13455   { (eval echo "$as_me:13455: \"$ac_try\"") >&5
13456   (eval $ac_try) 2>&5
13457   ac_status=$?
13458   echo "$as_me:13458: \$? = $ac_status" >&5
13459   (exit $ac_status); }; }; then
13460   ac_lo=$ac_mid; break
13461 else
13462   echo "$as_me: failed program was:" >&5
13463 cat conftest.$ac_ext >&5
13464 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13465 fi
13466 rm -f conftest.$ac_objext conftest.$ac_ext
13467   done
13468 fi
13469 rm -f conftest.$ac_objext conftest.$ac_ext
13470 # Binary search between lo and hi bounds.
13471 while test "x$ac_lo" != "x$ac_hi"; do
13472   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13473   cat >conftest.$ac_ext <<_ACEOF
13474 #line 13474 "configure"
13475 #include "confdefs.h"
13476 $ac_includes_default
13477 int
13478 main (void)
13479 {
13480 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13481   ;
13482   return 0;
13483 }
13484 _ACEOF
13485 rm -f conftest.$ac_objext
13486 if { (eval echo "$as_me:13486: \"$ac_compile\"") >&5
13487   (eval $ac_compile) 2>&5
13488   ac_status=$?
13489   echo "$as_me:13489: \$? = $ac_status" >&5
13490   (exit $ac_status); } &&
13491          { ac_try='test -s conftest.$ac_objext'
13492   { (eval echo "$as_me:13492: \"$ac_try\"") >&5
13493   (eval $ac_try) 2>&5
13494   ac_status=$?
13495   echo "$as_me:13495: \$? = $ac_status" >&5
13496   (exit $ac_status); }; }; then
13497   ac_hi=$ac_mid
13498 else
13499   echo "$as_me: failed program was:" >&5
13500 cat conftest.$ac_ext >&5
13501 ac_lo=`expr $ac_mid + 1`
13502 fi
13503 rm -f conftest.$ac_objext conftest.$ac_ext
13504 done
13505 ac_cv_sizeof_signed_char=$ac_lo
13506 else
13507   if test "$cross_compiling" = yes; then
13508   { { echo "$as_me:13508: error: cannot run test program while cross compiling" >&5
13509 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13510    { (exit 1); exit 1; }; }
13511 else
13512   cat >conftest.$ac_ext <<_ACEOF
13513 #line 13513 "configure"
13514 #include "confdefs.h"
13515 $ac_includes_default
13516 int
13517 main (void)
13518 {
13519 FILE *f = fopen ("conftest.val", "w");
13520 if (!f)
13521   $ac_main_return (1);
13522 fprintf (f, "%d", (sizeof (signed char)));
13523 fclose (f);
13524   ;
13525   return 0;
13526 }
13527 _ACEOF
13528 rm -f conftest$ac_exeext
13529 if { (eval echo "$as_me:13529: \"$ac_link\"") >&5
13530   (eval $ac_link) 2>&5
13531   ac_status=$?
13532   echo "$as_me:13532: \$? = $ac_status" >&5
13533   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13534   { (eval echo "$as_me:13534: \"$ac_try\"") >&5
13535   (eval $ac_try) 2>&5
13536   ac_status=$?
13537   echo "$as_me:13537: \$? = $ac_status" >&5
13538   (exit $ac_status); }; }; then
13539   ac_cv_sizeof_signed_char=`cat conftest.val`
13540 else
13541   echo "$as_me: program exited with status $ac_status" >&5
13542 echo "$as_me: failed program was:" >&5
13543 cat conftest.$ac_ext >&5
13544 fi
13545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13546 fi
13547 fi
13548 rm -f conftest.val
13549 else
13550   ac_cv_sizeof_signed_char=0
13551 fi
13552 fi
13553 echo "$as_me:13553: result: $ac_cv_sizeof_signed_char" >&5
13554 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13555 cat >>confdefs.h <<EOF
13556 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13557 EOF
13558
13559 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13560         NCURSES_SBOOL="signed char"
13561 else
13562         NCURSES_SBOOL="char"
13563 fi
13564 echo "$as_me:13564: checking if you want to use signed Boolean array in term.h" >&5
13565 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13566
13567 # Check whether --enable-signed-char or --disable-signed-char was given.
13568 if test "${enable_signed_char+set}" = set; then
13569   enableval="$enable_signed_char"
13570   with_signed_char=$enableval
13571 else
13572   with_signed_char=no
13573 fi;
13574 echo "$as_me:13574: result: $with_signed_char" >&5
13575 echo "${ECHO_T}$with_signed_char" >&6
13576 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13577
13578 ###   use option --with-tparm-arg to override tparm's argument type
13579 echo "$as_me:13579: checking for type of tparm args" >&5
13580 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13581
13582 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13583 if test "${with_tparm_arg+set}" = set; then
13584   withval="$with_tparm_arg"
13585   NCURSES_TPARM_ARG="$withval"
13586 else
13587   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13588 fi;
13589 echo "$as_me:13589: result: $NCURSES_TPARM_ARG" >&5
13590 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13591
13592 ### Enable compiling-in rcs id's
13593 echo "$as_me:13593: checking if RCS identifiers should be compiled-in" >&5
13594 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13595
13596 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13597 if test "${with_rcs_ids+set}" = set; then
13598   withval="$with_rcs_ids"
13599   with_rcs_ids=$withval
13600 else
13601   with_rcs_ids=no
13602 fi;
13603 echo "$as_me:13603: result: $with_rcs_ids" >&5
13604 echo "${ECHO_T}$with_rcs_ids" >&6
13605 test "x$with_rcs_ids" = xyes &&
13606 cat >>confdefs.h <<\EOF
13607 #define USE_RCS_IDS 1
13608 EOF
13609
13610 ###############################################################################
13611
13612 echo "$as_me:13612: checking format of man-pages" >&5
13613 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13614
13615 # Check whether --with-manpage-format or --without-manpage-format was given.
13616 if test "${with_manpage_format+set}" = set; then
13617   withval="$with_manpage_format"
13618   MANPAGE_FORMAT=$withval
13619 else
13620   MANPAGE_FORMAT=unknown
13621 fi;
13622
13623 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13624 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13625
13626 cf_unknown=
13627
13628 case $MANPAGE_FORMAT in
13629 (unknown)
13630         if test -z "$MANPATH" ; then
13631                 MANPATH="/usr/man:/usr/share/man"
13632         fi
13633
13634         # look for the 'date' man-page (it's most likely to be installed!)
13635         MANPAGE_FORMAT=
13636         cf_preform=no
13637         cf_catonly=yes
13638         cf_example=date
13639
13640         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13641         for cf_dir in $MANPATH; do
13642                 test -z "$cf_dir" && cf_dir=/usr/man
13643                 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
13644                 do
13645                         cf_test=`echo $cf_name | sed -e 's/*//'`
13646                         if test "x$cf_test" = "x$cf_name" ; then
13647
13648                                 case "$cf_name" in
13649                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13650                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13651                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13652                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13653                                 esac
13654
13655                                 case "$cf_name" in
13656                                 ($cf_dir/man*)
13657                                         cf_catonly=no
13658                                         ;;
13659                                 ($cf_dir/cat*)
13660                                         cf_preform=yes
13661                                         ;;
13662                                 esac
13663                                 break
13664                         fi
13665
13666                         # if we found a match in either man* or cat*, stop looking
13667                         if test -n "$MANPAGE_FORMAT" ; then
13668                                 cf_found=no
13669                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13670                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13671                                 case "$cf_name" in
13672                                 ($cf_dir/cat*)
13673                                         cf_found=yes
13674                                         ;;
13675                                 esac
13676                                 test $cf_found=yes && break
13677                         fi
13678                 done
13679                 # only check the first directory in $MANPATH where we find manpages
13680                 if test -n "$MANPAGE_FORMAT" ; then
13681                         break
13682                 fi
13683         done
13684         # if we did not find the example, just assume it is normal
13685         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13686         IFS="$ac_save_ifs"
13687         ;;
13688 (*)
13689         for cf_option in $MANPAGE_FORMAT; do
13690         case $cf_option in
13691         (gzip|compress|BSDI|normal|formatted|catonly)
13692                 ;;
13693         (*)
13694                 cf_unknown="$cf_unknown $cf_option"
13695                 ;;
13696         esac
13697         done
13698         ;;
13699 esac
13700
13701 echo "$as_me:13701: result: $MANPAGE_FORMAT" >&5
13702 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13703 if test -n "$cf_unknown" ; then
13704         { echo "$as_me:13704: WARNING: Unexpected manpage-format $cf_unknown" >&5
13705 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13706 fi
13707
13708 echo "$as_me:13708: checking for manpage renaming" >&5
13709 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13710
13711 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13712 if test "${with_manpage_renames+set}" = set; then
13713   withval="$with_manpage_renames"
13714   MANPAGE_RENAMES=$withval
13715 else
13716   MANPAGE_RENAMES=yes
13717 fi;
13718
13719 case ".$MANPAGE_RENAMES" in
13720 (.no)
13721         ;;
13722 (.|.yes)
13723         # Debian 'man' program?
13724         if test -f /etc/debian_version ; then
13725                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13726         else
13727                 MANPAGE_RENAMES=no
13728         fi
13729         ;;
13730 esac
13731
13732 if test "$MANPAGE_RENAMES" != no ; then
13733         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13734                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13735         elif test ! -f $MANPAGE_RENAMES ; then
13736                 { { echo "$as_me:13736: error: not a filename: $MANPAGE_RENAMES" >&5
13737 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13738    { (exit 1); exit 1; }; }
13739         fi
13740
13741         test ! -d man && mkdir man
13742
13743         # Construct a sed-script to perform renaming within man-pages
13744         if test -n "$MANPAGE_RENAMES" ; then
13745                 test ! -d man && mkdir man
13746                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13747         fi
13748 fi
13749
13750 echo "$as_me:13750: result: $MANPAGE_RENAMES" >&5
13751 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13752
13753 echo "$as_me:13753: checking if manpage aliases will be installed" >&5
13754 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13755
13756 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13757 if test "${with_manpage_aliases+set}" = set; then
13758   withval="$with_manpage_aliases"
13759   MANPAGE_ALIASES=$withval
13760 else
13761   MANPAGE_ALIASES=yes
13762 fi;
13763
13764 echo "$as_me:13764: result: $MANPAGE_ALIASES" >&5
13765 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13766
13767 case "x$LN_S" in
13768 (xln*)
13769         cf_use_symlinks=yes
13770         ;;
13771 (*)
13772         cf_use_symlinks=no
13773         ;;
13774 esac
13775
13776 MANPAGE_SYMLINKS=no
13777 if test "$MANPAGE_ALIASES" = yes ; then
13778 echo "$as_me:13778: checking if manpage symlinks should be used" >&5
13779 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13780
13781 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13782 if test "${with_manpage_symlinks+set}" = set; then
13783   withval="$with_manpage_symlinks"
13784   MANPAGE_SYMLINKS=$withval
13785 else
13786   MANPAGE_SYMLINKS=$cf_use_symlinks
13787 fi;
13788
13789 if test "$$cf_use_symlinks" = no; then
13790 if test "$MANPAGE_SYMLINKS" = yes ; then
13791         { echo "$as_me:13791: WARNING: cannot make symlinks" >&5
13792 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13793         MANPAGE_SYMLINKS=no
13794 fi
13795 fi
13796
13797 echo "$as_me:13797: result: $MANPAGE_SYMLINKS" >&5
13798 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13799 fi
13800
13801 echo "$as_me:13801: checking for manpage tbl" >&5
13802 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13803
13804 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13805 if test "${with_manpage_tbl+set}" = set; then
13806   withval="$with_manpage_tbl"
13807   MANPAGE_TBL=$withval
13808 else
13809   MANPAGE_TBL=no
13810 fi;
13811
13812 echo "$as_me:13812: result: $MANPAGE_TBL" >&5
13813 echo "${ECHO_T}$MANPAGE_TBL" >&6
13814
13815 if test "$prefix" = "NONE" ; then
13816         cf_prefix="$ac_default_prefix"
13817 else
13818         cf_prefix="$prefix"
13819 fi
13820
13821 case "$MANPAGE_FORMAT" in
13822 (*catonly*)
13823         cf_format=yes
13824         cf_inboth=no
13825         ;;
13826 (*formatted*)
13827         cf_format=yes
13828         cf_inboth=yes
13829         ;;
13830 (*)
13831         cf_format=no
13832         cf_inboth=no
13833         ;;
13834 esac
13835
13836 test ! -d man && mkdir man
13837
13838 cf_so_strip=
13839 cf_compress=
13840 case "$MANPAGE_FORMAT" in
13841 (*compress*)
13842         cf_so_strip="Z"
13843         cf_compress=compress
13844         ;;
13845 (*gzip*)
13846         cf_so_strip="gz"
13847         cf_compress=gzip
13848         ;;
13849 esac
13850
13851 cf_edit_man=./edit_man.sh
13852 cf_man_alias=`pwd`/man_alias.sed
13853
13854 cat >$cf_edit_man <<CF_EOF
13855 #! $SHELL
13856 # this script is generated by the configure-script CF_MAN_PAGES macro.
13857
13858 prefix="$cf_prefix"
13859 datarootdir="$datarootdir"
13860 datadir="$datadir"
13861
13862 NCURSES_MAJOR="$NCURSES_MAJOR"
13863 NCURSES_MINOR="$NCURSES_MINOR"
13864 NCURSES_PATCH="$NCURSES_PATCH"
13865
13866 NCURSES_OSPEED="$NCURSES_OSPEED"
13867 TERMINFO="$TERMINFO"
13868
13869 INSTALL="$INSTALL"
13870 INSTALL_DATA="$INSTALL_DATA"
13871
13872 transform="$program_transform_name"
13873
13874 TMP=\${TMPDIR:=/tmp}/man\$\$
13875 trap "rm -f \$TMP" 0 1 2 3 15
13876
13877 form=\$1
13878 shift || exit 1
13879
13880 verb=\$1
13881 shift || exit 1
13882
13883 mandir=\$1
13884 shift || exit 1
13885
13886 srcdir=\$1
13887 top_srcdir=\$srcdir/..
13888 shift || exit 1
13889
13890 if test "\$form" = normal ; then
13891         if test "$cf_format" = yes ; then
13892         if test "$cf_inboth" = no ; then
13893                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13894                 exit $?
13895         fi
13896         fi
13897         cf_subdir=\$mandir/man
13898         cf_tables=$MANPAGE_TBL
13899 else
13900         cf_subdir=\$mandir/cat
13901         cf_tables=yes
13902 fi
13903
13904 # process the list of source-files
13905 for i in \$* ; do
13906 case \$i in
13907 (*.orig|*.rej) ;;
13908 (*.[0-9]*)
13909         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13910         if test \$verb = installing ; then
13911         if test ! -d \$cf_subdir\${section} ; then
13912                 mkdir -p \$cf_subdir\$section
13913         fi
13914         fi
13915
13916         # replace variables in man page
13917         if test ! -f $cf_man_alias ; then
13918 cat >>$cf_man_alias <<-CF_EOF2
13919                 s,@DATADIR@,\$datadir,g
13920                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13921                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13922                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13923                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13924                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13925                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13926 CF_EOF
13927
13928         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13929         do
13930                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13931                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13932 cat >>$cf_edit_man <<-CF_EOF
13933                 s,@$cf_NAME@,$cf_name,g
13934 CF_EOF
13935         done
13936
13937 cat >>$cf_edit_man <<CF_EOF
13938 CF_EOF2
13939                 echo "...made $cf_man_alias"
13940         fi
13941
13942         aliases=
13943         cf_source=\`basename \$i\`
13944         inalias=\$cf_source
13945         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13946         if test ! -f \$inalias ; then
13947                 echo .. skipped \$cf_source
13948                 continue
13949         fi
13950 CF_EOF
13951
13952 if test "$MANPAGE_ALIASES" != no ; then
13953 cat >>$cf_edit_man <<CF_EOF
13954         nCurses=ignore.3x
13955         test $with_curses_h = yes && nCurses=ncurses.3x
13956         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13957 CF_EOF
13958 fi
13959
13960 if test "$MANPAGE_RENAMES" = no ; then
13961 cat >>$cf_edit_man <<CF_EOF
13962         # perform program transformations for section 1 man pages
13963         if test \$section = 1 ; then
13964                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13965         else
13966                 cf_target=\$cf_subdir\${section}/\$cf_source
13967         fi
13968 CF_EOF
13969 else
13970 cat >>$cf_edit_man <<CF_EOF
13971         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13972         if test -z "\$cf_target" ; then
13973                 echo '? missing rename for '\$cf_source
13974                 cf_target="\$cf_source"
13975         fi
13976         cf_target="\$cf_subdir\${section}/\${cf_target}"
13977
13978 CF_EOF
13979 fi
13980
13981 cat >>$cf_edit_man <<CF_EOF
13982         sed     -f $cf_man_alias \\
13983 CF_EOF
13984
13985 if test -f $MANPAGE_RENAMES ; then
13986 cat >>$cf_edit_man <<CF_EOF
13987                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13988 CF_EOF
13989 else
13990 cat >>$cf_edit_man <<CF_EOF
13991                 < \$i >\$TMP
13992 CF_EOF
13993 fi
13994
13995 cat >>$cf_edit_man <<CF_EOF
13996 if test \$cf_tables = yes ; then
13997         tbl \$TMP >\$TMP.out
13998         mv \$TMP.out \$TMP
13999 fi
14000 CF_EOF
14001
14002 if test $with_overwrite != yes ; then
14003 cat >>$cf_edit_man <<CF_EOF
14004         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14005         mv \$TMP.out \$TMP
14006 CF_EOF
14007 fi
14008
14009 if test $with_curses_h != yes ; then
14010 cat >>$cf_edit_man <<CF_EOF
14011         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14012         mv \$TMP.out \$TMP
14013 CF_EOF
14014 fi
14015
14016 cat >>$cf_edit_man <<CF_EOF
14017         if test \$form = format ; then
14018                 nroff -man \$TMP >\$TMP.out
14019                 mv \$TMP.out \$TMP
14020         fi
14021 CF_EOF
14022
14023 if test -n "$cf_compress" ; then
14024 cat >>$cf_edit_man <<CF_EOF
14025         if test \$verb = installing ; then
14026         if ( $cf_compress -f \$TMP )
14027         then
14028                 mv \$TMP.$cf_so_strip \$TMP
14029         fi
14030         fi
14031         cf_target="\$cf_target.$cf_so_strip"
14032 CF_EOF
14033 fi
14034
14035 case "$MANPAGE_FORMAT" in
14036 (*BSDI*)
14037 cat >>$cf_edit_man <<CF_EOF
14038         if test \$form = format ; then
14039                 # BSDI installs only .0 suffixes in the cat directories
14040                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14041         fi
14042 CF_EOF
14043   ;;
14044 esac
14045
14046 cat >>$cf_edit_man <<CF_EOF
14047         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14048         if test \$verb = installing ; then
14049                 echo \$verb \$cf_target
14050                 \$INSTALL_DATA \$TMP \$cf_target
14051                 test -d \$cf_subdir\${section} &&
14052                 test -n "\$aliases" && (
14053                         cd \$cf_subdir\${section} && (
14054                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14055                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14056                                 cf_target=\`basename \$cf_target\`
14057                                 for cf_alias in \$aliases
14058                                 do
14059                                         if test \$section = 1 ; then
14060                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14061                                         fi
14062
14063                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14064                                                 if test -f \$cf_alias\${suffix} ; then
14065                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14066                                                         then
14067                                                                 continue
14068                                                         fi
14069                                                 fi
14070                                                 echo .. \$verb alias \$cf_alias\${suffix}
14071 CF_EOF
14072 case "x$LN_S" in
14073 (*-f)
14074 cat >>$cf_edit_man <<CF_EOF
14075                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14076 CF_EOF
14077         ;;
14078 (*)
14079 cat >>$cf_edit_man <<CF_EOF
14080                                                 rm -f \$cf_alias\${suffix}
14081                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14082 CF_EOF
14083         ;;
14084 esac
14085 cat >>$cf_edit_man <<CF_EOF
14086                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14087                                                 echo ".so \$cf_source" >\$TMP
14088 CF_EOF
14089 if test -n "$cf_compress" ; then
14090 cat >>$cf_edit_man <<CF_EOF
14091                                                 if test -n "$cf_so_strip" ; then
14092                                                         $cf_compress -f \$TMP
14093                                                         mv \$TMP.$cf_so_strip \$TMP
14094                                                 fi
14095 CF_EOF
14096 fi
14097 cat >>$cf_edit_man <<CF_EOF
14098                                                 echo .. \$verb alias \$cf_alias\${suffix}
14099                                                 rm -f \$cf_alias\${suffix}
14100                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14101                                         fi
14102                                 done
14103                         )
14104                 )
14105         elif test \$verb = removing ; then
14106                 test -f \$cf_target && (
14107                         echo \$verb \$cf_target
14108                         rm -f \$cf_target
14109                 )
14110                 test -d \$cf_subdir\${section} &&
14111                 test -n "\$aliases" && (
14112                         cd \$cf_subdir\${section} && (
14113                                 for cf_alias in \$aliases
14114                                 do
14115                                         if test \$section = 1 ; then
14116                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14117                                         fi
14118
14119                                         echo .. \$verb alias \$cf_alias\${suffix}
14120                                         rm -f \$cf_alias\${suffix}
14121                                 done
14122                         )
14123                 )
14124         else
14125 #               echo ".hy 0"
14126                 cat \$TMP
14127         fi
14128         ;;
14129 esac
14130 done
14131
14132 if test $cf_inboth = yes ; then
14133 if test \$form != format ; then
14134         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14135 fi
14136 fi
14137
14138 exit 0
14139 CF_EOF
14140 chmod 755 $cf_edit_man
14141
14142 ###############################################################################
14143
14144 ### Note that some functions (such as const) are normally disabled anyway.
14145 echo "$as_me:14145: checking if you want to build with function extensions" >&5
14146 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14147
14148 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14149 if test "${enable_ext_funcs+set}" = set; then
14150   enableval="$enable_ext_funcs"
14151   with_ext_funcs=$enableval
14152 else
14153   with_ext_funcs=yes
14154 fi;
14155 echo "$as_me:14155: result: $with_ext_funcs" >&5
14156 echo "${ECHO_T}$with_ext_funcs" >&6
14157 if test "x$with_ext_funcs" = xyes ; then
14158         NCURSES_EXT_FUNCS=1
14159
14160 cat >>confdefs.h <<\EOF
14161 #define NCURSES_EXT_FUNCS 1
14162 EOF
14163
14164 cat >>confdefs.h <<\EOF
14165 #define HAVE_ASSUME_DEFAULT_COLORS 1
14166 EOF
14167
14168 cat >>confdefs.h <<\EOF
14169 #define HAVE_CURSES_VERSION 1
14170 EOF
14171
14172 cat >>confdefs.h <<\EOF
14173 #define HAVE_HAS_KEY 1
14174 EOF
14175
14176 cat >>confdefs.h <<\EOF
14177 #define HAVE_RESIZETERM 1
14178 EOF
14179
14180 cat >>confdefs.h <<\EOF
14181 #define HAVE_RESIZE_TERM 1
14182 EOF
14183
14184 cat >>confdefs.h <<\EOF
14185 #define HAVE_TERM_ENTRY_H 1
14186 EOF
14187
14188 cat >>confdefs.h <<\EOF
14189 #define HAVE_USE_DEFAULT_COLORS 1
14190 EOF
14191
14192 cat >>confdefs.h <<\EOF
14193 #define HAVE_USE_EXTENDED_NAMES 1
14194 EOF
14195
14196 cat >>confdefs.h <<\EOF
14197 #define HAVE_USE_SCREEN 1
14198 EOF
14199
14200 cat >>confdefs.h <<\EOF
14201 #define HAVE_USE_WINDOW 1
14202 EOF
14203
14204 cat >>confdefs.h <<\EOF
14205 #define HAVE_WRESIZE 1
14206 EOF
14207
14208         GENERATED_EXT_FUNCS=generated
14209         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14210 else
14211         NCURSES_EXT_FUNCS=0
14212         GENERATED_EXT_FUNCS=
14213 fi
14214
14215 echo "$as_me:14215: checking if you want to build with SCREEN extensions" >&5
14216 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14217
14218 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14219 if test "${enable_sp_funcs+set}" = set; then
14220   enableval="$enable_sp_funcs"
14221   with_sp_funcs=$enableval
14222 else
14223   with_sp_funcs=$cf_dft_ext_spfuncs
14224 fi;
14225 echo "$as_me:14225: result: $with_sp_funcs" >&5
14226 echo "${ECHO_T}$with_sp_funcs" >&6
14227 if test "x$with_sp_funcs" = xyes ; then
14228         NCURSES_SP_FUNCS=1
14229
14230 cat >>confdefs.h <<\EOF
14231 #define NCURSES_SP_FUNCS 1
14232 EOF
14233
14234 cat >>confdefs.h <<\EOF
14235 #define HAVE_TPUTS_SP 1
14236 EOF
14237
14238         GENERATED_SP_FUNCS=generated
14239 else
14240         NCURSES_SP_FUNCS=0
14241         GENERATED_SP_FUNCS=
14242 fi
14243
14244 echo "$as_me:14244: checking if you want to build with terminal-driver" >&5
14245 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14246
14247 # Check whether --enable-term-driver or --disable-term-driver was given.
14248 if test "${enable_term_driver+set}" = set; then
14249   enableval="$enable_term_driver"
14250   with_term_driver=$enableval
14251 else
14252   with_term_driver=no
14253 fi;
14254 echo "$as_me:14254: result: $with_term_driver" >&5
14255 echo "${ECHO_T}$with_term_driver" >&6
14256 if test "x$with_term_driver" = xyes ; then
14257
14258 cat >>confdefs.h <<\EOF
14259 #define USE_TERM_DRIVER 1
14260 EOF
14261
14262         if test "x$with_termlib" != xno ; then
14263                 { { echo "$as_me:14263: error: The term-driver option conflicts with the termlib option" >&5
14264 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14265    { (exit 1); exit 1; }; }
14266         fi
14267         if test "x$with_sp_funcs" != xyes ; then
14268                 { { echo "$as_me:14268: error: The term-driver option relies upon sp-funcs" >&5
14269 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14270    { (exit 1); exit 1; }; }
14271         fi
14272 fi
14273
14274 ###   use option --enable-const to turn on use of const beyond that in XSI.
14275 echo "$as_me:14275: checking for extended use of const keyword" >&5
14276 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14277
14278 # Check whether --enable-const or --disable-const was given.
14279 if test "${enable_const+set}" = set; then
14280   enableval="$enable_const"
14281   with_ext_const=$enableval
14282 else
14283   with_ext_const=$cf_dft_ext_const
14284 fi;
14285 echo "$as_me:14285: result: $with_ext_const" >&5
14286 echo "${ECHO_T}$with_ext_const" >&6
14287 NCURSES_CONST='/*nothing*/'
14288 if test "x$with_ext_const" = xyes ; then
14289         NCURSES_CONST=const
14290 fi
14291
14292 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14293 echo "$as_me:14293: checking if you want to use extended colors" >&5
14294 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14295
14296 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14297 if test "${enable_ext_colors+set}" = set; then
14298   enableval="$enable_ext_colors"
14299   with_ext_colors=$enableval
14300 else
14301   with_ext_colors=$cf_dft_ext_colors
14302 fi;
14303 echo "$as_me:14303: result: $with_ext_colors" >&5
14304 echo "${ECHO_T}$with_ext_colors" >&6
14305 NCURSES_EXT_COLORS=0
14306 if test "x$with_ext_colors" = xyes ; then
14307         if test "x$with_widec" != xyes ; then
14308                 { echo "$as_me:14308: WARNING: This option applies only to wide-character library" >&5
14309 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14310         else
14311                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14312
14313 if test "${with_abi_version+set}" != set; then
14314         case $cf_cv_rel_version in
14315         (5.*)
14316                 cf_cv_rel_version=6.0
14317                 cf_cv_abi_version=6
14318                 { echo "$as_me:14318: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14319 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14320                 ;;
14321         esac
14322 fi
14323
14324                 NCURSES_EXT_COLORS=1
14325
14326 cat >>confdefs.h <<\EOF
14327 #define NCURSES_EXT_COLORS 1
14328 EOF
14329
14330 cat >>confdefs.h <<\EOF
14331 #define HAVE_ALLOC_PAIR 1
14332 EOF
14333
14334 cat >>confdefs.h <<\EOF
14335 #define HAVE_INIT_EXTENDED_COLOR 1
14336 EOF
14337
14338 cat >>confdefs.h <<\EOF
14339 #define HAVE_RESET_COLOR_PAIRS 1
14340 EOF
14341
14342         fi
14343 fi
14344
14345 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14346 echo "$as_me:14346: checking if you want to use extended mouse encoding" >&5
14347 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14348
14349 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14350 if test "${enable_ext_mouse+set}" = set; then
14351   enableval="$enable_ext_mouse"
14352   with_ext_mouse=$enableval
14353 else
14354   with_ext_mouse=$cf_dft_ext_mouse
14355 fi;
14356 echo "$as_me:14356: result: $with_ext_mouse" >&5
14357 echo "${ECHO_T}$with_ext_mouse" >&6
14358 NCURSES_MOUSE_VERSION=1
14359 if test "x$with_ext_mouse" = xyes ; then
14360         NCURSES_MOUSE_VERSION=2
14361
14362 if test "${with_abi_version+set}" != set; then
14363         case $cf_cv_rel_version in
14364         (5.*)
14365                 cf_cv_rel_version=6.0
14366                 cf_cv_abi_version=6
14367                 { echo "$as_me:14367: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14368 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14369                 ;;
14370         esac
14371 fi
14372
14373 fi
14374
14375 ###   use option --enable-ext-putwin to turn on extended screendumps
14376 echo "$as_me:14376: checking if you want to use extended putwin/screendump" >&5
14377 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14378
14379 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14380 if test "${enable_ext_putwin+set}" = set; then
14381   enableval="$enable_ext_putwin"
14382   with_ext_putwin=$enableval
14383 else
14384   with_ext_putwin=$cf_dft_ext_putwin
14385 fi;
14386 echo "$as_me:14386: result: $with_ext_putwin" >&5
14387 echo "${ECHO_T}$with_ext_putwin" >&6
14388 if test "x$with_ext_putwin" = xyes ; then
14389
14390 cat >>confdefs.h <<\EOF
14391 #define NCURSES_EXT_PUTWIN 1
14392 EOF
14393
14394 fi
14395
14396 echo "$as_me:14396: checking if you want \$NCURSES_NO_PADDING code" >&5
14397 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14398
14399 # Check whether --enable-no-padding or --disable-no-padding was given.
14400 if test "${enable_no_padding+set}" = set; then
14401   enableval="$enable_no_padding"
14402   with_no_padding=$enableval
14403 else
14404   with_no_padding=$with_ext_funcs
14405 fi;
14406 echo "$as_me:14406: result: $with_no_padding" >&5
14407 echo "${ECHO_T}$with_no_padding" >&6
14408 test "x$with_no_padding" = xyes &&
14409 cat >>confdefs.h <<\EOF
14410 #define NCURSES_NO_PADDING 1
14411 EOF
14412
14413 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14414 echo "$as_me:14414: checking if you want SIGWINCH handler" >&5
14415 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14416
14417 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14418 if test "${enable_sigwinch+set}" = set; then
14419   enableval="$enable_sigwinch"
14420   with_sigwinch=$enableval
14421 else
14422   with_sigwinch=$with_ext_funcs
14423 fi;
14424 echo "$as_me:14424: result: $with_sigwinch" >&5
14425 echo "${ECHO_T}$with_sigwinch" >&6
14426 test "x$with_sigwinch" = xyes &&
14427 cat >>confdefs.h <<\EOF
14428 #define USE_SIGWINCH 1
14429 EOF
14430
14431 ###   use option --enable-tcap-names to allow user to define new capabilities
14432 echo "$as_me:14432: checking if you want user-definable terminal capabilities like termcap" >&5
14433 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14434
14435 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14436 if test "${enable_tcap_names+set}" = set; then
14437   enableval="$enable_tcap_names"
14438   with_tcap_names=$enableval
14439 else
14440   with_tcap_names=$with_ext_funcs
14441 fi;
14442 echo "$as_me:14442: result: $with_tcap_names" >&5
14443 echo "${ECHO_T}$with_tcap_names" >&6
14444 NCURSES_XNAMES=0
14445 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14446
14447 ##############################################################################
14448
14449 echo "$as_me:14449: checking if you want to link with the pthread library" >&5
14450 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14451
14452 # Check whether --with-pthread or --without-pthread was given.
14453 if test "${with_pthread+set}" = set; then
14454   withval="$with_pthread"
14455   with_pthread=$withval
14456 else
14457   with_pthread=no
14458 fi;
14459 echo "$as_me:14459: result: $with_pthread" >&5
14460 echo "${ECHO_T}$with_pthread" >&6
14461
14462 if test "$with_pthread" != no ; then
14463         echo "$as_me:14463: checking for pthread.h" >&5
14464 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14465 if test "${ac_cv_header_pthread_h+set}" = set; then
14466   echo $ECHO_N "(cached) $ECHO_C" >&6
14467 else
14468   cat >conftest.$ac_ext <<_ACEOF
14469 #line 14469 "configure"
14470 #include "confdefs.h"
14471 #include <pthread.h>
14472 _ACEOF
14473 if { (eval echo "$as_me:14473: \"$ac_cpp conftest.$ac_ext\"") >&5
14474   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14475   ac_status=$?
14476   egrep -v '^ *\+' conftest.er1 >conftest.err
14477   rm -f conftest.er1
14478   cat conftest.err >&5
14479   echo "$as_me:14479: \$? = $ac_status" >&5
14480   (exit $ac_status); } >/dev/null; then
14481   if test -s conftest.err; then
14482     ac_cpp_err=$ac_c_preproc_warn_flag
14483   else
14484     ac_cpp_err=
14485   fi
14486 else
14487   ac_cpp_err=yes
14488 fi
14489 if test -z "$ac_cpp_err"; then
14490   ac_cv_header_pthread_h=yes
14491 else
14492   echo "$as_me: failed program was:" >&5
14493   cat conftest.$ac_ext >&5
14494   ac_cv_header_pthread_h=no
14495 fi
14496 rm -f conftest.err conftest.$ac_ext
14497 fi
14498 echo "$as_me:14498: result: $ac_cv_header_pthread_h" >&5
14499 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14500 if test $ac_cv_header_pthread_h = yes; then
14501
14502 cat >>confdefs.h <<\EOF
14503 #define HAVE_PTHREADS_H 1
14504 EOF
14505
14506         for cf_lib_pthread in pthread c_r
14507         do
14508             echo "$as_me:14508: checking if we can link with the $cf_lib_pthread library" >&5
14509 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14510             cf_save_LIBS="$LIBS"
14511
14512 cf_add_libs="-l$cf_lib_pthread"
14513 # Filter out duplicates - this happens with badly-designed ".pc" files...
14514 for cf_add_1lib in $LIBS
14515 do
14516         for cf_add_2lib in $cf_add_libs
14517         do
14518                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14519                 then
14520                         cf_add_1lib=
14521                         break
14522                 fi
14523         done
14524         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14525 done
14526 LIBS="$cf_add_libs"
14527
14528             cat >conftest.$ac_ext <<_ACEOF
14529 #line 14529 "configure"
14530 #include "confdefs.h"
14531
14532 #include <pthread.h>
14533
14534 int
14535 main (void)
14536 {
14537
14538                 int rc = pthread_create(0,0,0,0);
14539                 int r2 = pthread_mutexattr_settype(0, 0);
14540
14541   ;
14542   return 0;
14543 }
14544 _ACEOF
14545 rm -f conftest.$ac_objext conftest$ac_exeext
14546 if { (eval echo "$as_me:14546: \"$ac_link\"") >&5
14547   (eval $ac_link) 2>&5
14548   ac_status=$?
14549   echo "$as_me:14549: \$? = $ac_status" >&5
14550   (exit $ac_status); } &&
14551          { ac_try='test -s conftest$ac_exeext'
14552   { (eval echo "$as_me:14552: \"$ac_try\"") >&5
14553   (eval $ac_try) 2>&5
14554   ac_status=$?
14555   echo "$as_me:14555: \$? = $ac_status" >&5
14556   (exit $ac_status); }; }; then
14557   with_pthread=yes
14558 else
14559   echo "$as_me: failed program was:" >&5
14560 cat conftest.$ac_ext >&5
14561 with_pthread=no
14562 fi
14563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14564             LIBS="$cf_save_LIBS"
14565             echo "$as_me:14565: result: $with_pthread" >&5
14566 echo "${ECHO_T}$with_pthread" >&6
14567             test "$with_pthread" = yes && break
14568         done
14569
14570         if test "$with_pthread" = yes ; then
14571
14572 cf_add_libs="-l$cf_lib_pthread"
14573 # Filter out duplicates - this happens with badly-designed ".pc" files...
14574 for cf_add_1lib in $LIBS
14575 do
14576         for cf_add_2lib in $cf_add_libs
14577         do
14578                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14579                 then
14580                         cf_add_1lib=
14581                         break
14582                 fi
14583         done
14584         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14585 done
14586 LIBS="$cf_add_libs"
14587
14588 cat >>confdefs.h <<\EOF
14589 #define HAVE_LIBPTHREADS 1
14590 EOF
14591
14592         else
14593             { { echo "$as_me:14593: error: Cannot link with pthread library" >&5
14594 echo "$as_me: error: Cannot link with pthread library" >&2;}
14595    { (exit 1); exit 1; }; }
14596         fi
14597
14598 fi
14599
14600 fi
14601
14602 if test "x$with_pthread" != xno; then
14603         echo "$as_me:14603: checking for pthread_kill" >&5
14604 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14605 if test "${ac_cv_func_pthread_kill+set}" = set; then
14606   echo $ECHO_N "(cached) $ECHO_C" >&6
14607 else
14608   cat >conftest.$ac_ext <<_ACEOF
14609 #line 14609 "configure"
14610 #include "confdefs.h"
14611 #define pthread_kill autoconf_temporary
14612 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14613 #undef pthread_kill
14614
14615 #ifdef __cplusplus
14616 extern "C"
14617 #endif
14618
14619 /* We use char because int might match the return type of a gcc2
14620    builtin and then its argument prototype would still apply.  */
14621 char pthread_kill (void);
14622
14623 int
14624 main (void)
14625 {
14626
14627 /* The GNU C library defines stubs for functions which it implements
14628     to always fail with ENOSYS.  Some functions are actually named
14629     something starting with __ and the normal name is an alias.  */
14630 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14631 #error found stub for pthread_kill
14632 #endif
14633
14634         return pthread_kill ();
14635   ;
14636   return 0;
14637 }
14638 _ACEOF
14639 rm -f conftest.$ac_objext conftest$ac_exeext
14640 if { (eval echo "$as_me:14640: \"$ac_link\"") >&5
14641   (eval $ac_link) 2>&5
14642   ac_status=$?
14643   echo "$as_me:14643: \$? = $ac_status" >&5
14644   (exit $ac_status); } &&
14645          { ac_try='test -s conftest$ac_exeext'
14646   { (eval echo "$as_me:14646: \"$ac_try\"") >&5
14647   (eval $ac_try) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit $ac_status); }; }; then
14651   ac_cv_func_pthread_kill=yes
14652 else
14653   echo "$as_me: failed program was:" >&5
14654 cat conftest.$ac_ext >&5
14655 ac_cv_func_pthread_kill=no
14656 fi
14657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14658 fi
14659 echo "$as_me:14659: result: $ac_cv_func_pthread_kill" >&5
14660 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14661 if test $ac_cv_func_pthread_kill = yes; then
14662
14663                 echo "$as_me:14663: checking if you want to allow EINTR in wgetch with pthreads" >&5
14664 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14665
14666 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14667 if test "${enable_pthreads_eintr+set}" = set; then
14668   enableval="$enable_pthreads_eintr"
14669   use_pthreads_eintr=$enableval
14670 else
14671   use_pthreads_eintr=no
14672 fi;
14673                 echo "$as_me:14673: result: $use_pthreads_eintr" >&5
14674 echo "${ECHO_T}$use_pthreads_eintr" >&6
14675                 if test "x$use_pthreads_eintr" = xyes ; then
14676
14677 cat >>confdefs.h <<\EOF
14678 #define USE_PTHREADS_EINTR 1
14679 EOF
14680
14681                 fi
14682 fi
14683
14684         echo "$as_me:14684: checking if you want to use weak-symbols for pthreads" >&5
14685 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14686
14687 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14688 if test "${enable_weak_symbols+set}" = set; then
14689   enableval="$enable_weak_symbols"
14690   use_weak_symbols=$enableval
14691 else
14692   use_weak_symbols=no
14693 fi;
14694         echo "$as_me:14694: result: $use_weak_symbols" >&5
14695 echo "${ECHO_T}$use_weak_symbols" >&6
14696         if test "x$use_weak_symbols" = xyes ; then
14697
14698 echo "$as_me:14698: checking if $CC supports weak symbols" >&5
14699 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14700 if test "${cf_cv_weak_symbols+set}" = set; then
14701   echo $ECHO_N "(cached) $ECHO_C" >&6
14702 else
14703
14704 cat >conftest.$ac_ext <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707
14708 #include <stdio.h>
14709 int
14710 main (void)
14711 {
14712
14713 #if defined(__GNUC__)
14714 #  if defined __USE_ISOC99
14715 #    define _cat_pragma(exp)    _Pragma(#exp)
14716 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14717 #  else
14718 #    define _weak_pragma(exp)
14719 #  endif
14720 #  define _declare(name)        __extension__ extern __typeof__(name) name
14721 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14722 #endif
14723
14724 weak_symbol(fopen);
14725
14726   ;
14727   return 0;
14728 }
14729 _ACEOF
14730 rm -f conftest.$ac_objext
14731 if { (eval echo "$as_me:14731: \"$ac_compile\"") >&5
14732   (eval $ac_compile) 2>&5
14733   ac_status=$?
14734   echo "$as_me:14734: \$? = $ac_status" >&5
14735   (exit $ac_status); } &&
14736          { ac_try='test -s conftest.$ac_objext'
14737   { (eval echo "$as_me:14737: \"$ac_try\"") >&5
14738   (eval $ac_try) 2>&5
14739   ac_status=$?
14740   echo "$as_me:14740: \$? = $ac_status" >&5
14741   (exit $ac_status); }; }; then
14742   cf_cv_weak_symbols=yes
14743 else
14744   echo "$as_me: failed program was:" >&5
14745 cat conftest.$ac_ext >&5
14746 cf_cv_weak_symbols=no
14747 fi
14748 rm -f conftest.$ac_objext conftest.$ac_ext
14749
14750 fi
14751 echo "$as_me:14751: result: $cf_cv_weak_symbols" >&5
14752 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14753
14754         else
14755                 cf_cv_weak_symbols=no
14756         fi
14757
14758         if test "x$cf_cv_weak_symbols" = xyes ; then
14759
14760 cat >>confdefs.h <<\EOF
14761 #define USE_WEAK_SYMBOLS 1
14762 EOF
14763
14764         fi
14765 fi
14766
14767 PTHREAD=
14768 if test "x$with_pthread" = "xyes" ; then
14769
14770 cat >>confdefs.h <<\EOF
14771 #define USE_PTHREADS 1
14772 EOF
14773
14774         enable_reentrant=yes
14775         if test "x$cf_cv_weak_symbols" = xyes ; then
14776                 PTHREAD=-lpthread
14777
14778 cf_add_libs="-lpthread"
14779 # Filter out duplicates - this happens with badly-designed ".pc" files...
14780 for cf_add_1lib in $PRIVATE_LIBS
14781 do
14782         for cf_add_2lib in $cf_add_libs
14783         do
14784                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14785                 then
14786                         cf_add_1lib=
14787                         break
14788                 fi
14789         done
14790         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14791 done
14792 PRIVATE_LIBS="$cf_add_libs"
14793
14794         fi
14795 fi
14796
14797 # Reentrant code has to be opaque; there's little advantage to making ncurses
14798 # opaque outside of that, so there is no --enable-opaque option.  We can use
14799 # this option without --with-pthreads, but this will be always set for
14800 # pthreads.
14801 echo "$as_me:14801: checking if you want reentrant code" >&5
14802 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14803
14804 # Check whether --enable-reentrant or --disable-reentrant was given.
14805 if test "${enable_reentrant+set}" = set; then
14806   enableval="$enable_reentrant"
14807   with_reentrant=$enableval
14808 else
14809   with_reentrant=no
14810 fi;
14811 echo "$as_me:14811: result: $with_reentrant" >&5
14812 echo "${ECHO_T}$with_reentrant" >&6
14813 if test "x$with_reentrant" = xyes ; then
14814         cf_cv_enable_reentrant=1
14815         cf_cv_enable_opaque="NCURSES_INTERNALS"
14816         NCURSES_SIZE_T=int
14817         if test "x$cf_cv_weak_symbols" = xyes ; then
14818
14819 # remove pthread library from $LIBS
14820 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14821
14822 cf_add_libs="-lpthread"
14823 # Filter out duplicates - this happens with badly-designed ".pc" files...
14824 for cf_add_1lib in $TEST_LIBS
14825 do
14826         for cf_add_2lib in $cf_add_libs
14827         do
14828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14829                 then
14830                         cf_add_1lib=
14831                         break
14832                 fi
14833         done
14834         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14835 done
14836 TEST_LIBS="$cf_add_libs"
14837
14838 cf_add_libs="-lpthread"
14839 # Filter out duplicates - this happens with badly-designed ".pc" files...
14840 for cf_add_1lib in $TEST_LIBS2
14841 do
14842         for cf_add_2lib in $cf_add_libs
14843         do
14844                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14845                 then
14846                         cf_add_1lib=
14847                         break
14848                 fi
14849         done
14850         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14851 done
14852 TEST_LIBS2="$cf_add_libs"
14853
14854 cf_add_libs="-lpthread"
14855 # Filter out duplicates - this happens with badly-designed ".pc" files...
14856 for cf_add_1lib in $PRIVATE_LIBS
14857 do
14858         for cf_add_2lib in $cf_add_libs
14859         do
14860                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14861                 then
14862                         cf_add_1lib=
14863                         break
14864                 fi
14865         done
14866         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14867 done
14868 PRIVATE_LIBS="$cf_add_libs"
14869
14870         else
14871                 # when not using weak symbols but with_reentrant,
14872                 # add 't' to the library suffix on all platforms
14873                 # except cygwin, where we only do that if ALSO
14874                 # compiling with full thread support.
14875                 case "$host" in
14876                 (*cygwin* | *msys*)
14877                         if test "$with_pthread" = "yes" ; then
14878                                 if test "x$disable_lib_suffixes" = "xno" ; then
14879                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14880                                 fi
14881                         fi ;;
14882                 (*)
14883                         if test "x$disable_lib_suffixes" = "xno" ; then
14884                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14885                         fi
14886                         ;;
14887                 esac
14888         fi
14889
14890 cat >>confdefs.h <<\EOF
14891 #define USE_REENTRANT 1
14892 EOF
14893
14894 if test "${with_abi_version+set}" != set; then
14895         case $cf_cv_rel_version in
14896         (5.*)
14897                 cf_cv_rel_version=6.0
14898                 cf_cv_abi_version=6
14899                 { echo "$as_me:14899: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14900 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14901                 ;;
14902         esac
14903 fi
14904
14905 else
14906         cf_cv_enable_reentrant=0
14907         cf_cv_enable_opaque="NCURSES_OPAQUE"
14908         NCURSES_SIZE_T=short
14909 fi
14910
14911 echo "$as_me:14911: checking if you want opaque curses-library structures" >&5
14912 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14913
14914 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14915 if test "${enable_opaque_curses+set}" = set; then
14916   enableval="$enable_opaque_curses"
14917   test "$enableval" != yes && enableval=no
14918         if test "$enableval" != "no" ; then
14919     enable_opaque_curses=yes
14920         else
14921
14922          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14923          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14924
14925         fi
14926 else
14927   enableval=no
14928
14929          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14930          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14931
14932 fi;
14933 echo "$as_me:14933: result: $enable_opaque_curses" >&5
14934 echo "${ECHO_T}$enable_opaque_curses" >&6
14935
14936 test "$cf_cv_enable_reentrant" = 1 && \
14937 test "$enable_opaque_curses" = no && \
14938 { { echo "$as_me:14938: error: reentrant configuration requires opaque library" >&5
14939 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14940    { (exit 1); exit 1; }; }
14941
14942 echo "$as_me:14942: checking if you want opaque form-library structures" >&5
14943 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14944
14945 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14946 if test "${enable_opaque_form+set}" = set; then
14947   enableval="$enable_opaque_form"
14948   enable_opaque_form=yes
14949 else
14950   enable_opaque_form=no
14951 fi;
14952 echo "$as_me:14952: result: $enable_opaque_form" >&5
14953 echo "${ECHO_T}$enable_opaque_form" >&6
14954
14955 echo "$as_me:14955: checking if you want opaque menu-library structures" >&5
14956 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14957
14958 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14959 if test "${enable_opaque_menu+set}" = set; then
14960   enableval="$enable_opaque_menu"
14961   enable_opaque_menu=yes
14962 else
14963   enable_opaque_menu=no
14964 fi;
14965 echo "$as_me:14965: result: $enable_opaque_menu" >&5
14966 echo "${ECHO_T}$enable_opaque_menu" >&6
14967
14968 echo "$as_me:14968: checking if you want opaque panel-library structures" >&5
14969 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14970
14971 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14972 if test "${enable_opaque_panel+set}" = set; then
14973   enableval="$enable_opaque_panel"
14974   enable_opaque_panel=yes
14975 else
14976   enable_opaque_panel=no
14977 fi;
14978 echo "$as_me:14978: result: $enable_opaque_panel" >&5
14979 echo "${ECHO_T}$enable_opaque_panel" >&6
14980
14981 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14982 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14983 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14984 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14985
14986 ### Allow using a different wrap-prefix
14987 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14988         echo "$as_me:14988: checking for prefix used to wrap public variables" >&5
14989 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14990
14991 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14992 if test "${with_wrap_prefix+set}" = set; then
14993   withval="$with_wrap_prefix"
14994   NCURSES_WRAP_PREFIX=$withval
14995 else
14996   NCURSES_WRAP_PREFIX=_nc_
14997 fi;
14998         echo "$as_me:14998: result: $NCURSES_WRAP_PREFIX" >&5
14999 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15000 else
15001         NCURSES_WRAP_PREFIX=_nc_
15002 fi
15003
15004 cat >>confdefs.h <<EOF
15005 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15006 EOF
15007
15008 ###############################################################################
15009 # These options are relatively safe to experiment with.
15010
15011 echo "$as_me:15011: checking if you want all development code" >&5
15012 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15013
15014 # Check whether --with-develop or --without-develop was given.
15015 if test "${with_develop+set}" = set; then
15016   withval="$with_develop"
15017   with_develop=$withval
15018 else
15019   with_develop=no
15020 fi;
15021 echo "$as_me:15021: result: $with_develop" >&5
15022 echo "${ECHO_T}$with_develop" >&6
15023
15024 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15025 echo "$as_me:15025: checking if you want hard-tabs code" >&5
15026 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15027
15028 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15029 if test "${enable_hard_tabs+set}" = set; then
15030   enableval="$enable_hard_tabs"
15031
15032 else
15033   enable_hard_tabs=$with_develop
15034 fi;
15035 echo "$as_me:15035: result: $enable_hard_tabs" >&5
15036 echo "${ECHO_T}$enable_hard_tabs" >&6
15037 test "x$enable_hard_tabs" = xyes &&
15038 cat >>confdefs.h <<\EOF
15039 #define USE_HARD_TABS 1
15040 EOF
15041
15042 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15043 echo "$as_me:15043: checking if you want limited support for xmc" >&5
15044 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15045
15046 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15047 if test "${enable_xmc_glitch+set}" = set; then
15048   enableval="$enable_xmc_glitch"
15049
15050 else
15051   enable_xmc_glitch=$with_develop
15052 fi;
15053 echo "$as_me:15053: result: $enable_xmc_glitch" >&5
15054 echo "${ECHO_T}$enable_xmc_glitch" >&6
15055 test "x$enable_xmc_glitch" = xyes &&
15056 cat >>confdefs.h <<\EOF
15057 #define USE_XMC_SUPPORT 1
15058 EOF
15059
15060 ###############################################################################
15061 # These are just experimental, probably should not be in a package:
15062
15063 echo "$as_me:15063: checking if you do not want to assume colors are white-on-black" >&5
15064 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15065
15066 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15067 if test "${enable_assumed_color+set}" = set; then
15068   enableval="$enable_assumed_color"
15069   with_assumed_color=$enableval
15070 else
15071   with_assumed_color=yes
15072 fi;
15073 echo "$as_me:15073: result: $with_assumed_color" >&5
15074 echo "${ECHO_T}$with_assumed_color" >&6
15075 test "x$with_assumed_color" = xyes &&
15076 cat >>confdefs.h <<\EOF
15077 #define USE_ASSUMED_COLOR 1
15078 EOF
15079
15080 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15081 echo "$as_me:15081: checking if you want hashmap scrolling-optimization code" >&5
15082 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15083
15084 # Check whether --enable-hashmap or --disable-hashmap was given.
15085 if test "${enable_hashmap+set}" = set; then
15086   enableval="$enable_hashmap"
15087   with_hashmap=$enableval
15088 else
15089   with_hashmap=yes
15090 fi;
15091 echo "$as_me:15091: result: $with_hashmap" >&5
15092 echo "${ECHO_T}$with_hashmap" >&6
15093 test "x$with_hashmap" = xyes &&
15094 cat >>confdefs.h <<\EOF
15095 #define USE_HASHMAP 1
15096 EOF
15097
15098 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15099 echo "$as_me:15099: checking if you want colorfgbg code" >&5
15100 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15101
15102 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15103 if test "${enable_colorfgbg+set}" = set; then
15104   enableval="$enable_colorfgbg"
15105   with_colorfgbg=$enableval
15106 else
15107   with_colorfgbg=no
15108 fi;
15109 echo "$as_me:15109: result: $with_colorfgbg" >&5
15110 echo "${ECHO_T}$with_colorfgbg" >&6
15111 test "x$with_colorfgbg" = xyes &&
15112 cat >>confdefs.h <<\EOF
15113 #define USE_COLORFGBG 1
15114 EOF
15115
15116 ###   use option --enable-interop to turn on use of bindings used for interop
15117 echo "$as_me:15117: checking if you want interop bindings" >&5
15118 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15119
15120 # Check whether --enable-interop or --disable-interop was given.
15121 if test "${enable_interop+set}" = set; then
15122   enableval="$enable_interop"
15123   with_exp_interop=$enableval
15124 else
15125   with_exp_interop=$cf_dft_interop
15126 fi;
15127 echo "$as_me:15127: result: $with_exp_interop" >&5
15128 echo "${ECHO_T}$with_exp_interop" >&6
15129
15130 NCURSES_INTEROP_FUNCS=0
15131 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15132
15133 echo "$as_me:15133: checking if you want experimental safe-sprintf code" >&5
15134 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15135
15136 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15137 if test "${enable_safe_sprintf+set}" = set; then
15138   enableval="$enable_safe_sprintf"
15139   with_safe_sprintf=$enableval
15140 else
15141   with_safe_sprintf=no
15142 fi;
15143 echo "$as_me:15143: result: $with_safe_sprintf" >&5
15144 echo "${ECHO_T}$with_safe_sprintf" >&6
15145
15146 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15147 # when hashmap is used scroll hints are useless
15148 if test "$with_hashmap" = no ; then
15149 echo "$as_me:15149: checking if you want to experiment without scrolling-hints code" >&5
15150 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15151
15152 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15153 if test "${enable_scroll_hints+set}" = set; then
15154   enableval="$enable_scroll_hints"
15155   with_scroll_hints=$enableval
15156 else
15157   with_scroll_hints=yes
15158 fi;
15159 echo "$as_me:15159: result: $with_scroll_hints" >&5
15160 echo "${ECHO_T}$with_scroll_hints" >&6
15161 test "x$with_scroll_hints" = xyes &&
15162 cat >>confdefs.h <<\EOF
15163 #define USE_SCROLL_HINTS 1
15164 EOF
15165
15166 fi
15167
15168 echo "$as_me:15168: checking if you want wgetch-events code" >&5
15169 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15170
15171 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15172 if test "${enable_wgetch_events+set}" = set; then
15173   enableval="$enable_wgetch_events"
15174   with_wgetch_events=$enableval
15175 else
15176   with_wgetch_events=no
15177 fi;
15178 echo "$as_me:15178: result: $with_wgetch_events" >&5
15179 echo "${ECHO_T}$with_wgetch_events" >&6
15180 test "x$with_wgetch_events" = xyes &&
15181 cat >>confdefs.h <<\EOF
15182 #define NCURSES_WGETCH_EVENTS 1
15183 EOF
15184
15185 ###############################################################################
15186
15187 ###     use option --disable-echo to suppress full display compiling commands
15188
15189 echo "$as_me:15189: checking if you want to see long compiling messages" >&5
15190 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15191
15192 # Check whether --enable-echo or --disable-echo was given.
15193 if test "${enable_echo+set}" = set; then
15194   enableval="$enable_echo"
15195   test "$enableval" != no && enableval=yes
15196         if test "$enableval" != "yes" ; then
15197
15198         ECHO_LT='--silent'
15199         ECHO_LD='@echo linking $@;'
15200         RULE_CC='@echo compiling $<'
15201         SHOW_CC='@echo compiling $@'
15202         ECHO_CC='@'
15203
15204         else
15205
15206         ECHO_LT=''
15207         ECHO_LD=''
15208         RULE_CC=''
15209         SHOW_CC=''
15210         ECHO_CC=''
15211
15212         fi
15213 else
15214   enableval=yes
15215
15216         ECHO_LT=''
15217         ECHO_LD=''
15218         RULE_CC=''
15219         SHOW_CC=''
15220         ECHO_CC=''
15221
15222 fi;
15223 echo "$as_me:15223: result: $enableval" >&5
15224 echo "${ECHO_T}$enableval" >&6
15225
15226 if test "x$enable_echo" = xyes; then
15227         ECHO_LINK=
15228 else
15229         ECHO_LINK='@ echo linking $@ ... ;'
15230         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15231         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15232 fi
15233
15234 # --disable-stripping is used for debugging
15235
15236 echo "$as_me:15236: checking if you want to install stripped executables" >&5
15237 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15238
15239 # Check whether --enable-stripping or --disable-stripping was given.
15240 if test "${enable_stripping+set}" = set; then
15241   enableval="$enable_stripping"
15242   test "$enableval" != no && enableval=yes
15243         if test "$enableval" != "yes" ; then
15244     with_stripping=no
15245         else
15246                 with_stripping=yes
15247         fi
15248 else
15249   enableval=yes
15250         with_stripping=yes
15251
15252 fi;
15253 echo "$as_me:15253: result: $with_stripping" >&5
15254 echo "${ECHO_T}$with_stripping" >&6
15255
15256 if test "$with_stripping" = yes
15257 then
15258         INSTALL_OPT_S="-s"
15259 else
15260         INSTALL_OPT_S=
15261 fi
15262
15263 : ${INSTALL:=install}
15264 echo "$as_me:15264: checking if install accepts -p option" >&5
15265 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15266 if test "${cf_cv_install_p+set}" = set; then
15267   echo $ECHO_N "(cached) $ECHO_C" >&6
15268 else
15269
15270         rm -rf conftest*
15271         date >conftest.in
15272         mkdir conftest.out
15273         sleep 3
15274         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15275         then
15276                 if test -f conftest.out/conftest.in
15277                 then
15278                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15279                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15280                         if test -s conftest.err
15281                         then
15282                                 cf_cv_install_p=no
15283                         else
15284                                 cf_cv_install_p=yes
15285                         fi
15286                 else
15287                         cf_cv_install_p=no
15288                 fi
15289         else
15290                 cf_cv_install_p=no
15291         fi
15292         rm -rf conftest*
15293
15294 fi
15295 echo "$as_me:15295: result: $cf_cv_install_p" >&5
15296 echo "${ECHO_T}$cf_cv_install_p" >&6
15297
15298 echo "$as_me:15298: checking if install needs to be told about ownership" >&5
15299 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15300 case `$ac_config_guess` in
15301 (*minix)
15302         with_install_o=yes
15303         ;;
15304 (*)
15305         with_install_o=no
15306         ;;
15307 esac
15308
15309 echo "$as_me:15309: result: $with_install_o" >&5
15310 echo "${ECHO_T}$with_install_o" >&6
15311 if test "x$with_install_o" = xyes
15312 then
15313         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'`
15314 else
15315         INSTALL_OPT_O=
15316 fi
15317
15318 # If we're avoiding relinking of shared libraries during install, that is to
15319 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15320 # the install program has "-p" (for preserving timestamps).
15321 cf_cv_do_reranlib=yes
15322 if test "x$cf_cv_install_p" = xyes
15323 then
15324         if test "x$cf_cv_do_relink" != xyes
15325         then
15326                 cf_cv_do_reranlib=no
15327                 INSTALL_OPT_P="-p"
15328                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15329         fi
15330 fi
15331
15332 ###     use option --enable-warnings to turn on all gcc warnings
15333 echo "$as_me:15333: checking if you want to see compiler warnings" >&5
15334 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15335
15336 # Check whether --enable-warnings or --disable-warnings was given.
15337 if test "${enable_warnings+set}" = set; then
15338   enableval="$enable_warnings"
15339   with_warnings=$enableval
15340 fi;
15341 echo "$as_me:15341: result: $with_warnings" >&5
15342 echo "${ECHO_T}$with_warnings" >&6
15343
15344 if test "x$with_warnings" = "xyes"; then
15345
15346         ADAFLAGS="$ADAFLAGS -gnatg"
15347
15348 INTEL_COMPILER=no
15349
15350 if test "$GCC" = yes ; then
15351         case $host_os in
15352         (linux*|gnu*)
15353                 echo "$as_me:15353: checking if this is really Intel C compiler" >&5
15354 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15355                 cf_save_CFLAGS="$CFLAGS"
15356                 CFLAGS="$CFLAGS -no-gcc"
15357                 cat >conftest.$ac_ext <<_ACEOF
15358 #line 15358 "configure"
15359 #include "confdefs.h"
15360
15361 int
15362 main (void)
15363 {
15364
15365 #ifdef __INTEL_COMPILER
15366 #else
15367 make an error
15368 #endif
15369
15370   ;
15371   return 0;
15372 }
15373 _ACEOF
15374 rm -f conftest.$ac_objext
15375 if { (eval echo "$as_me:15375: \"$ac_compile\"") >&5
15376   (eval $ac_compile) 2>&5
15377   ac_status=$?
15378   echo "$as_me:15378: \$? = $ac_status" >&5
15379   (exit $ac_status); } &&
15380          { ac_try='test -s conftest.$ac_objext'
15381   { (eval echo "$as_me:15381: \"$ac_try\"") >&5
15382   (eval $ac_try) 2>&5
15383   ac_status=$?
15384   echo "$as_me:15384: \$? = $ac_status" >&5
15385   (exit $ac_status); }; }; then
15386   INTEL_COMPILER=yes
15387 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15388
15389 else
15390   echo "$as_me: failed program was:" >&5
15391 cat conftest.$ac_ext >&5
15392 fi
15393 rm -f conftest.$ac_objext conftest.$ac_ext
15394                 CFLAGS="$cf_save_CFLAGS"
15395                 echo "$as_me:15395: result: $INTEL_COMPILER" >&5
15396 echo "${ECHO_T}$INTEL_COMPILER" >&6
15397                 ;;
15398         esac
15399 fi
15400
15401 CLANG_COMPILER=no
15402
15403 if test "$GCC" = yes ; then
15404         echo "$as_me:15404: checking if this is really Clang C compiler" >&5
15405 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
15406         cf_save_CFLAGS="$CFLAGS"
15407         CFLAGS="$CFLAGS -Qunused-arguments"
15408         cat >conftest.$ac_ext <<_ACEOF
15409 #line 15409 "configure"
15410 #include "confdefs.h"
15411
15412 int
15413 main (void)
15414 {
15415
15416 #ifdef __clang__
15417 #else
15418 make an error
15419 #endif
15420
15421   ;
15422   return 0;
15423 }
15424 _ACEOF
15425 rm -f conftest.$ac_objext
15426 if { (eval echo "$as_me:15426: \"$ac_compile\"") >&5
15427   (eval $ac_compile) 2>&5
15428   ac_status=$?
15429   echo "$as_me:15429: \$? = $ac_status" >&5
15430   (exit $ac_status); } &&
15431          { ac_try='test -s conftest.$ac_objext'
15432   { (eval echo "$as_me:15432: \"$ac_try\"") >&5
15433   (eval $ac_try) 2>&5
15434   ac_status=$?
15435   echo "$as_me:15435: \$? = $ac_status" >&5
15436   (exit $ac_status); }; }; then
15437   CLANG_COMPILER=yes
15438 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15439
15440 else
15441   echo "$as_me: failed program was:" >&5
15442 cat conftest.$ac_ext >&5
15443 fi
15444 rm -f conftest.$ac_objext conftest.$ac_ext
15445         CFLAGS="$cf_save_CFLAGS"
15446         echo "$as_me:15446: result: $CLANG_COMPILER" >&5
15447 echo "${ECHO_T}$CLANG_COMPILER" >&6
15448 fi
15449
15450 if test "x$have_x" = xyes; then
15451 cat >conftest.$ac_ext <<_ACEOF
15452 #line 15452 "configure"
15453 #include "confdefs.h"
15454
15455 #include <stdlib.h>
15456 #include <X11/Intrinsic.h>
15457
15458 int
15459 main (void)
15460 {
15461 String foo = malloc(1)
15462   ;
15463   return 0;
15464 }
15465 _ACEOF
15466 rm -f conftest.$ac_objext
15467 if { (eval echo "$as_me:15467: \"$ac_compile\"") >&5
15468   (eval $ac_compile) 2>&5
15469   ac_status=$?
15470   echo "$as_me:15470: \$? = $ac_status" >&5
15471   (exit $ac_status); } &&
15472          { ac_try='test -s conftest.$ac_objext'
15473   { (eval echo "$as_me:15473: \"$ac_try\"") >&5
15474   (eval $ac_try) 2>&5
15475   ac_status=$?
15476   echo "$as_me:15476: \$? = $ac_status" >&5
15477   (exit $ac_status); }; }; then
15478
15479 echo "$as_me:15479: checking for X11/Xt const-feature" >&5
15480 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15481 if test "${cf_cv_const_x_string+set}" = set; then
15482   echo $ECHO_N "(cached) $ECHO_C" >&6
15483 else
15484
15485         cat >conftest.$ac_ext <<_ACEOF
15486 #line 15486 "configure"
15487 #include "confdefs.h"
15488
15489 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15490 #undef  XTSTRINGDEFINES /* X11R5 and later */
15491 #include <stdlib.h>
15492 #include <X11/Intrinsic.h>
15493
15494 int
15495 main (void)
15496 {
15497 String foo = malloc(1); *foo = 0
15498   ;
15499   return 0;
15500 }
15501 _ACEOF
15502 rm -f conftest.$ac_objext
15503 if { (eval echo "$as_me:15503: \"$ac_compile\"") >&5
15504   (eval $ac_compile) 2>&5
15505   ac_status=$?
15506   echo "$as_me:15506: \$? = $ac_status" >&5
15507   (exit $ac_status); } &&
15508          { ac_try='test -s conftest.$ac_objext'
15509   { (eval echo "$as_me:15509: \"$ac_try\"") >&5
15510   (eval $ac_try) 2>&5
15511   ac_status=$?
15512   echo "$as_me:15512: \$? = $ac_status" >&5
15513   (exit $ac_status); }; }; then
15514
15515                         cf_cv_const_x_string=no
15516
15517 else
15518   echo "$as_me: failed program was:" >&5
15519 cat conftest.$ac_ext >&5
15520
15521                         cf_cv_const_x_string=yes
15522
15523 fi
15524 rm -f conftest.$ac_objext conftest.$ac_ext
15525
15526 fi
15527 echo "$as_me:15527: result: $cf_cv_const_x_string" >&5
15528 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15529
15530 case $cf_cv_const_x_string in
15531 (no)
15532
15533         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15534         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15535
15536         ;;
15537 (*)
15538
15539         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15540         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15541
15542         ;;
15543 esac
15544
15545 else
15546   echo "$as_me: failed program was:" >&5
15547 cat conftest.$ac_ext >&5
15548 fi
15549 rm -f conftest.$ac_objext conftest.$ac_ext
15550  fi
15551 cat > conftest.$ac_ext <<EOF
15552 #line 15552 "${as_me:-configure}"
15553 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15554 EOF
15555 if test "$INTEL_COMPILER" = yes
15556 then
15557 # The "-wdXXX" options suppress warnings:
15558 # remark #1419: external declaration in primary source file
15559 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15560 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15561 # remark #193: zero used for undefined preprocessing identifier
15562 # remark #593: variable "curs_sb_left_arrow" was set but never used
15563 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15564 # remark #869: parameter "tw" was never referenced
15565 # remark #981: operands are evaluated in unspecified order
15566 # warning #279: controlling expression is constant
15567
15568         { echo "$as_me:15568: checking for $CC warning options..." >&5
15569 echo "$as_me: checking for $CC warning options..." >&6;}
15570         cf_save_CFLAGS="$CFLAGS"
15571         EXTRA_CFLAGS="-Wall"
15572         for cf_opt in \
15573                 wd1419 \
15574                 wd1683 \
15575                 wd1684 \
15576                 wd193 \
15577                 wd593 \
15578                 wd279 \
15579                 wd810 \
15580                 wd869 \
15581                 wd981
15582         do
15583                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15584                 if { (eval echo "$as_me:15584: \"$ac_compile\"") >&5
15585   (eval $ac_compile) 2>&5
15586   ac_status=$?
15587   echo "$as_me:15587: \$? = $ac_status" >&5
15588   (exit $ac_status); }; then
15589                         test -n "$verbose" && echo "$as_me:15589: result: ... -$cf_opt" >&5
15590 echo "${ECHO_T}... -$cf_opt" >&6
15591                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15592                 fi
15593         done
15594         CFLAGS="$cf_save_CFLAGS"
15595 elif test "$GCC" = yes
15596 then
15597         { echo "$as_me:15597: checking for $CC warning options..." >&5
15598 echo "$as_me: checking for $CC warning options..." >&6;}
15599         cf_save_CFLAGS="$CFLAGS"
15600         EXTRA_CFLAGS=
15601         cf_warn_CONST=""
15602         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15603         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15604         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15605         for cf_opt in W Wall \
15606                 Wbad-function-cast \
15607                 Wcast-align \
15608                 Wcast-qual \
15609                 Wdeclaration-after-statement \
15610                 Wextra \
15611                 Winline \
15612                 Wmissing-declarations \
15613                 Wmissing-prototypes \
15614                 Wnested-externs \
15615                 Wpointer-arith \
15616                 Wshadow \
15617                 Wstrict-prototypes \
15618                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15619         do
15620                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15621                 if { (eval echo "$as_me:15621: \"$ac_compile\"") >&5
15622   (eval $ac_compile) 2>&5
15623   ac_status=$?
15624   echo "$as_me:15624: \$? = $ac_status" >&5
15625   (exit $ac_status); }; then
15626                         test -n "$verbose" && echo "$as_me:15626: result: ... -$cf_opt" >&5
15627 echo "${ECHO_T}... -$cf_opt" >&6
15628                         case $cf_opt in
15629                         (Winline)
15630                                 case $GCC_VERSION in
15631                                 ([34].*)
15632                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15633
15634 echo "${as_me:-configure}:15634: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15635
15636                                         continue;;
15637                                 esac
15638                                 ;;
15639                         (Wpointer-arith)
15640                                 case $GCC_VERSION in
15641                                 ([12].*)
15642                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15643
15644 echo "${as_me:-configure}:15644: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15645
15646                                         continue;;
15647                                 esac
15648                                 ;;
15649                         esac
15650                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15651                 fi
15652         done
15653         CFLAGS="$cf_save_CFLAGS"
15654 fi
15655 rm -rf conftest*
15656
15657         if test "x$cf_with_cxx" = xyes ; then
15658
15659 INTEL_CPLUSPLUS=no
15660
15661 if test "$GCC" = yes ; then
15662         case $host_os in
15663         (linux*|gnu*)
15664                 echo "$as_me:15664: checking if this is really Intel C++ compiler" >&5
15665 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15666                 cf_save_CFLAGS="$CXXFLAGS"
15667                 CXXFLAGS="$CXXFLAGS -no-gcc"
15668                 cat >conftest.$ac_ext <<_ACEOF
15669 #line 15669 "configure"
15670 #include "confdefs.h"
15671
15672 int
15673 main (void)
15674 {
15675
15676 #ifdef __INTEL_COMPILER
15677 #else
15678 make an error
15679 #endif
15680
15681   ;
15682   return 0;
15683 }
15684 _ACEOF
15685 rm -f conftest.$ac_objext
15686 if { (eval echo "$as_me:15686: \"$ac_compile\"") >&5
15687   (eval $ac_compile) 2>&5
15688   ac_status=$?
15689   echo "$as_me:15689: \$? = $ac_status" >&5
15690   (exit $ac_status); } &&
15691          { ac_try='test -s conftest.$ac_objext'
15692   { (eval echo "$as_me:15692: \"$ac_try\"") >&5
15693   (eval $ac_try) 2>&5
15694   ac_status=$?
15695   echo "$as_me:15695: \$? = $ac_status" >&5
15696   (exit $ac_status); }; }; then
15697   INTEL_CPLUSPLUS=yes
15698 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15699
15700 else
15701   echo "$as_me: failed program was:" >&5
15702 cat conftest.$ac_ext >&5
15703 fi
15704 rm -f conftest.$ac_objext conftest.$ac_ext
15705                 CXXFLAGS="$cf_save_CFLAGS"
15706                 echo "$as_me:15706: result: $INTEL_CPLUSPLUS" >&5
15707 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15708                 ;;
15709         esac
15710 fi
15711
15712 CLANG_CPLUSPLUS=no
15713
15714 if test "$GCC" = yes ; then
15715         echo "$as_me:15715: checking if this is really Clang C++ compiler" >&5
15716 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15717         cf_save_CFLAGS="$CXXFLAGS"
15718         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15719         cat >conftest.$ac_ext <<_ACEOF
15720 #line 15720 "configure"
15721 #include "confdefs.h"
15722
15723 int
15724 main (void)
15725 {
15726
15727 #ifdef __clang__
15728 #else
15729 make an error
15730 #endif
15731
15732   ;
15733   return 0;
15734 }
15735 _ACEOF
15736 rm -f conftest.$ac_objext
15737 if { (eval echo "$as_me:15737: \"$ac_compile\"") >&5
15738   (eval $ac_compile) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); } &&
15742          { ac_try='test -s conftest.$ac_objext'
15743   { (eval echo "$as_me:15743: \"$ac_try\"") >&5
15744   (eval $ac_try) 2>&5
15745   ac_status=$?
15746   echo "$as_me:15746: \$? = $ac_status" >&5
15747   (exit $ac_status); }; }; then
15748   CLANG_CPLUSPLUS=yes
15749 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15750
15751 else
15752   echo "$as_me: failed program was:" >&5
15753 cat conftest.$ac_ext >&5
15754 fi
15755 rm -f conftest.$ac_objext conftest.$ac_ext
15756         CXXFLAGS="$cf_save_CFLAGS"
15757         echo "$as_me:15757: result: $CLANG_CPLUSPLUS" >&5
15758 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15759 fi
15760
15761 ac_ext=cc
15762 ac_cpp='$CXXCPP $CPPFLAGS'
15763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15766 ac_main_return=return
15767
15768 cat > conftest.$ac_ext <<EOF
15769 #line 15769 "configure"
15770 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15771 EOF
15772
15773 if test "$INTEL_CPLUSPLUS" = yes
15774 then
15775 # The "-wdXXX" options suppress warnings:
15776 # remark #1419: external declaration in primary source file
15777 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15778 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15779 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15780 # remark #193: zero used for undefined preprocessing identifier
15781 # remark #593: variable "curs_sb_left_arrow" was set but never used
15782 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15783 # remark #869: parameter "tw" was never referenced
15784 # remark #981: operands are evaluated in unspecified order
15785 # warning #269: invalid format string conversion
15786
15787         { echo "$as_me:15787: checking for $CC warning options..." >&5
15788 echo "$as_me: checking for $CC warning options..." >&6;}
15789         cf_save_CXXFLAGS="$CXXFLAGS"
15790         EXTRA_CXXFLAGS="-Wall"
15791         for cf_opt in \
15792                 wd1419 \
15793                 wd1682 \
15794                 wd1683 \
15795                 wd1684 \
15796                 wd193 \
15797                 wd279 \
15798                 wd593 \
15799                 wd810 \
15800                 wd869 \
15801                 wd981
15802         do
15803                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15804                 if { (eval echo "$as_me:15804: \"$ac_compile\"") >&5
15805   (eval $ac_compile) 2>&5
15806   ac_status=$?
15807   echo "$as_me:15807: \$? = $ac_status" >&5
15808   (exit $ac_status); }; then
15809                         test -n "$verbose" && echo "$as_me:15809: result: ... -$cf_opt" >&5
15810 echo "${ECHO_T}... -$cf_opt" >&6
15811                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15812                 fi
15813         done
15814         CXXFLAGS="$cf_save_CXXFLAGS"
15815
15816 elif test "$GXX" = yes
15817 then
15818         { echo "$as_me:15818: checking for $CXX warning options..." >&5
15819 echo "$as_me: checking for $CXX warning options..." >&6;}
15820         cf_save_CXXFLAGS="$CXXFLAGS"
15821         EXTRA_CXXFLAGS="-W -Wall"
15822         cf_gxx_extra_warnings=""
15823         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15824         case "$GCC_VERSION" in
15825         ([1-2].*)
15826                 ;;
15827         (*)
15828                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15829                 ;;
15830         esac
15831         for cf_opt in \
15832                 Wabi \
15833                 fabi-version=0 \
15834                 Wextra \
15835                 Wignored-qualifiers \
15836                 Wlogical-op \
15837                 Woverloaded-virtual \
15838                 Wsign-promo \
15839                 Wsynth \
15840                 Wold-style-cast \
15841                 Wcast-align \
15842                 Wcast-qual \
15843                 Wpointer-arith \
15844                 Wshadow \
15845                 Wundef $cf_gxx_extra_warnings Wno-unused
15846         do
15847                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15848                 if { (eval echo "$as_me:15848: \"$ac_compile\"") >&5
15849   (eval $ac_compile) 2>&5
15850   ac_status=$?
15851   echo "$as_me:15851: \$? = $ac_status" >&5
15852   (exit $ac_status); }; then
15853                         test -n "$verbose" && echo "$as_me:15853: result: ... -$cf_opt" >&5
15854 echo "${ECHO_T}... -$cf_opt" >&6
15855                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15856                 else
15857                         test -n "$verbose" && echo "$as_me:15857: result: ... no -$cf_opt" >&5
15858 echo "${ECHO_T}... no -$cf_opt" >&6
15859                 fi
15860         done
15861         CXXFLAGS="$cf_save_CXXFLAGS"
15862 fi
15863
15864 rm -rf conftest*
15865 ac_ext=c
15866 ac_cpp='$CPP $CPPFLAGS'
15867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15870 ac_main_return=return
15871
15872         fi
15873 fi
15874
15875 if test "$GCC" = yes
15876 then
15877 cat > conftest.i <<EOF
15878 #ifndef GCC_PRINTF
15879 #define GCC_PRINTF 0
15880 #endif
15881 #ifndef GCC_SCANF
15882 #define GCC_SCANF 0
15883 #endif
15884 #ifndef GCC_NORETURN
15885 #define GCC_NORETURN /* nothing */
15886 #endif
15887 #ifndef GCC_UNUSED
15888 #define GCC_UNUSED /* nothing */
15889 #endif
15890 EOF
15891 if test "$GCC" = yes
15892 then
15893         { echo "$as_me:15893: checking for $CC __attribute__ directives..." >&5
15894 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15895 cat > conftest.$ac_ext <<EOF
15896 #line 15896 "${as_me:-configure}"
15897 #include "confdefs.h"
15898 #include "conftest.h"
15899 #include "conftest.i"
15900 #if     GCC_PRINTF
15901 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15902 #else
15903 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15904 #endif
15905 #if     GCC_SCANF
15906 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15907 #else
15908 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15909 #endif
15910 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15911 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15912 extern void foo(void) GCC_NORETURN;
15913 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15914 EOF
15915         cf_printf_attribute=no
15916         cf_scanf_attribute=no
15917         for cf_attribute in scanf printf unused noreturn
15918         do
15919
15920 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15921
15922                 cf_directive="__attribute__(($cf_attribute))"
15923                 echo "checking for $CC $cf_directive" 1>&5
15924
15925                 case $cf_attribute in
15926                 (printf)
15927                         cf_printf_attribute=yes
15928                         cat >conftest.h <<EOF
15929 #define GCC_$cf_ATTRIBUTE 1
15930 EOF
15931                         ;;
15932                 (scanf)
15933                         cf_scanf_attribute=yes
15934                         cat >conftest.h <<EOF
15935 #define GCC_$cf_ATTRIBUTE 1
15936 EOF
15937                         ;;
15938                 (*)
15939                         cat >conftest.h <<EOF
15940 #define GCC_$cf_ATTRIBUTE $cf_directive
15941 EOF
15942                         ;;
15943                 esac
15944
15945                 if { (eval echo "$as_me:15945: \"$ac_compile\"") >&5
15946   (eval $ac_compile) 2>&5
15947   ac_status=$?
15948   echo "$as_me:15948: \$? = $ac_status" >&5
15949   (exit $ac_status); }; then
15950                         test -n "$verbose" && echo "$as_me:15950: result: ... $cf_attribute" >&5
15951 echo "${ECHO_T}... $cf_attribute" >&6
15952                         cat conftest.h >>confdefs.h
15953                         case $cf_attribute in
15954                         (noreturn)
15955
15956 cat >>confdefs.h <<EOF
15957 #define GCC_NORETURN $cf_directive
15958 EOF
15959
15960                                 ;;
15961                         (printf)
15962                                 cf_value='/* nothing */'
15963                                 if test "$cf_printf_attribute" != no ; then
15964                                         cf_value='__attribute__((format(printf,fmt,var)))'
15965
15966 cat >>confdefs.h <<\EOF
15967 #define GCC_PRINTF 1
15968 EOF
15969
15970                                 fi
15971
15972 cat >>confdefs.h <<EOF
15973 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15974 EOF
15975
15976                                 ;;
15977                         (scanf)
15978                                 cf_value='/* nothing */'
15979                                 if test "$cf_scanf_attribute" != no ; then
15980                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15981
15982 cat >>confdefs.h <<\EOF
15983 #define GCC_SCANF 1
15984 EOF
15985
15986                                 fi
15987
15988 cat >>confdefs.h <<EOF
15989 #define GCC_SCANFLIKE(fmt,var) $cf_value
15990 EOF
15991
15992                                 ;;
15993                         (unused)
15994
15995 cat >>confdefs.h <<EOF
15996 #define GCC_UNUSED $cf_directive
15997 EOF
15998
15999                                 ;;
16000                         esac
16001                 fi
16002         done
16003 else
16004         fgrep define conftest.i >>confdefs.h
16005 fi
16006 rm -rf conftest*
16007 fi
16008
16009 echo "$as_me:16009: checking if you want to work around bogus compiler/loader warnings" >&5
16010 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16011
16012 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16013 if test "${enable_string_hacks+set}" = set; then
16014   enableval="$enable_string_hacks"
16015   with_string_hacks=$enableval
16016 else
16017   with_string_hacks=no
16018 fi;
16019 echo "$as_me:16019: result: $with_string_hacks" >&5
16020 echo "${ECHO_T}$with_string_hacks" >&6
16021
16022 if test "x$with_string_hacks" = "xyes"; then
16023
16024 cat >>confdefs.h <<\EOF
16025 #define USE_STRING_HACKS 1
16026 EOF
16027
16028         { echo "$as_me:16028: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16029 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16030         echo "$as_me:16030: checking for strlcat" >&5
16031 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16032 if test "${ac_cv_func_strlcat+set}" = set; then
16033   echo $ECHO_N "(cached) $ECHO_C" >&6
16034 else
16035   cat >conftest.$ac_ext <<_ACEOF
16036 #line 16036 "configure"
16037 #include "confdefs.h"
16038 #define strlcat autoconf_temporary
16039 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16040 #undef strlcat
16041
16042 #ifdef __cplusplus
16043 extern "C"
16044 #endif
16045
16046 /* We use char because int might match the return type of a gcc2
16047    builtin and then its argument prototype would still apply.  */
16048 char strlcat (void);
16049
16050 int
16051 main (void)
16052 {
16053
16054 /* The GNU C library defines stubs for functions which it implements
16055     to always fail with ENOSYS.  Some functions are actually named
16056     something starting with __ and the normal name is an alias.  */
16057 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16058 #error found stub for strlcat
16059 #endif
16060
16061         return strlcat ();
16062   ;
16063   return 0;
16064 }
16065 _ACEOF
16066 rm -f conftest.$ac_objext conftest$ac_exeext
16067 if { (eval echo "$as_me:16067: \"$ac_link\"") >&5
16068   (eval $ac_link) 2>&5
16069   ac_status=$?
16070   echo "$as_me:16070: \$? = $ac_status" >&5
16071   (exit $ac_status); } &&
16072          { ac_try='test -s conftest$ac_exeext'
16073   { (eval echo "$as_me:16073: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:16076: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   ac_cv_func_strlcat=yes
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 cat conftest.$ac_ext >&5
16082 ac_cv_func_strlcat=no
16083 fi
16084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16085 fi
16086 echo "$as_me:16086: result: $ac_cv_func_strlcat" >&5
16087 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16088 if test $ac_cv_func_strlcat = yes; then
16089
16090 cat >>confdefs.h <<\EOF
16091 #define HAVE_STRLCAT 1
16092 EOF
16093
16094 else
16095
16096                 echo "$as_me:16096: checking for strlcat in -lbsd" >&5
16097 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16098 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16099   echo $ECHO_N "(cached) $ECHO_C" >&6
16100 else
16101   ac_check_lib_save_LIBS=$LIBS
16102 LIBS="-lbsd  $LIBS"
16103 cat >conftest.$ac_ext <<_ACEOF
16104 #line 16104 "configure"
16105 #include "confdefs.h"
16106
16107 /* Override any gcc2 internal prototype to avoid an error.  */
16108 #ifdef __cplusplus
16109 extern "C"
16110 #endif
16111 /* We use char because int might match the return type of a gcc2
16112    builtin and then its argument prototype would still apply.  */
16113 char strlcat ();
16114 int
16115 main (void)
16116 {
16117 strlcat ();
16118   ;
16119   return 0;
16120 }
16121 _ACEOF
16122 rm -f conftest.$ac_objext conftest$ac_exeext
16123 if { (eval echo "$as_me:16123: \"$ac_link\"") >&5
16124   (eval $ac_link) 2>&5
16125   ac_status=$?
16126   echo "$as_me:16126: \$? = $ac_status" >&5
16127   (exit $ac_status); } &&
16128          { ac_try='test -s conftest$ac_exeext'
16129   { (eval echo "$as_me:16129: \"$ac_try\"") >&5
16130   (eval $ac_try) 2>&5
16131   ac_status=$?
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit $ac_status); }; }; then
16134   ac_cv_lib_bsd_strlcat=yes
16135 else
16136   echo "$as_me: failed program was:" >&5
16137 cat conftest.$ac_ext >&5
16138 ac_cv_lib_bsd_strlcat=no
16139 fi
16140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16141 LIBS=$ac_check_lib_save_LIBS
16142 fi
16143 echo "$as_me:16143: result: $ac_cv_lib_bsd_strlcat" >&5
16144 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16145 if test $ac_cv_lib_bsd_strlcat = yes; then
16146
16147 cf_add_libs="-lbsd"
16148 # Filter out duplicates - this happens with badly-designed ".pc" files...
16149 for cf_add_1lib in $LIBS
16150 do
16151         for cf_add_2lib in $cf_add_libs
16152         do
16153                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16154                 then
16155                         cf_add_1lib=
16156                         break
16157                 fi
16158         done
16159         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16160 done
16161 LIBS="$cf_add_libs"
16162
16163 for ac_header in bsd/string.h
16164 do
16165 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16166 echo "$as_me:16166: checking for $ac_header" >&5
16167 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16168 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16169   echo $ECHO_N "(cached) $ECHO_C" >&6
16170 else
16171   cat >conftest.$ac_ext <<_ACEOF
16172 #line 16172 "configure"
16173 #include "confdefs.h"
16174 #include <$ac_header>
16175 _ACEOF
16176 if { (eval echo "$as_me:16176: \"$ac_cpp conftest.$ac_ext\"") >&5
16177   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16178   ac_status=$?
16179   egrep -v '^ *\+' conftest.er1 >conftest.err
16180   rm -f conftest.er1
16181   cat conftest.err >&5
16182   echo "$as_me:16182: \$? = $ac_status" >&5
16183   (exit $ac_status); } >/dev/null; then
16184   if test -s conftest.err; then
16185     ac_cpp_err=$ac_c_preproc_warn_flag
16186   else
16187     ac_cpp_err=
16188   fi
16189 else
16190   ac_cpp_err=yes
16191 fi
16192 if test -z "$ac_cpp_err"; then
16193   eval "$as_ac_Header=yes"
16194 else
16195   echo "$as_me: failed program was:" >&5
16196   cat conftest.$ac_ext >&5
16197   eval "$as_ac_Header=no"
16198 fi
16199 rm -f conftest.err conftest.$ac_ext
16200 fi
16201 echo "$as_me:16201: result: `eval echo '${'$as_ac_Header'}'`" >&5
16202 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16203 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16204   cat >>confdefs.h <<EOF
16205 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16206 EOF
16207
16208 fi
16209 done
16210
16211 cat >>confdefs.h <<\EOF
16212 #define HAVE_STRLCAT 1
16213 EOF
16214
16215 fi
16216
16217 fi
16218
16219 for ac_func in strlcpy snprintf
16220 do
16221 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16222 echo "$as_me:16222: checking for $ac_func" >&5
16223 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16224 if eval "test \"\${$as_ac_var+set}\" = set"; then
16225   echo $ECHO_N "(cached) $ECHO_C" >&6
16226 else
16227   cat >conftest.$ac_ext <<_ACEOF
16228 #line 16228 "configure"
16229 #include "confdefs.h"
16230 #define $ac_func autoconf_temporary
16231 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16232 #undef $ac_func
16233
16234 #ifdef __cplusplus
16235 extern "C"
16236 #endif
16237
16238 /* We use char because int might match the return type of a gcc2
16239    builtin and then its argument prototype would still apply.  */
16240 char $ac_func (void);
16241
16242 int
16243 main (void)
16244 {
16245
16246 /* The GNU C library defines stubs for functions which it implements
16247     to always fail with ENOSYS.  Some functions are actually named
16248     something starting with __ and the normal name is an alias.  */
16249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16250 #error found stub for $ac_func
16251 #endif
16252
16253         return $ac_func ();
16254   ;
16255   return 0;
16256 }
16257 _ACEOF
16258 rm -f conftest.$ac_objext conftest$ac_exeext
16259 if { (eval echo "$as_me:16259: \"$ac_link\"") >&5
16260   (eval $ac_link) 2>&5
16261   ac_status=$?
16262   echo "$as_me:16262: \$? = $ac_status" >&5
16263   (exit $ac_status); } &&
16264          { ac_try='test -s conftest$ac_exeext'
16265   { (eval echo "$as_me:16265: \"$ac_try\"") >&5
16266   (eval $ac_try) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); }; }; then
16270   eval "$as_ac_var=yes"
16271 else
16272   echo "$as_me: failed program was:" >&5
16273 cat conftest.$ac_ext >&5
16274 eval "$as_ac_var=no"
16275 fi
16276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16277 fi
16278 echo "$as_me:16278: result: `eval echo '${'$as_ac_var'}'`" >&5
16279 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16280 if test `eval echo '${'$as_ac_var'}'` = yes; then
16281   cat >>confdefs.h <<EOF
16282 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16283 EOF
16284
16285 fi
16286 done
16287
16288 fi
16289
16290 ###     use option --enable-assertions to turn on generation of assertion code
16291 echo "$as_me:16291: checking if you want to enable runtime assertions" >&5
16292 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16293
16294 # Check whether --enable-assertions or --disable-assertions was given.
16295 if test "${enable_assertions+set}" = set; then
16296   enableval="$enable_assertions"
16297   with_assertions=$enableval
16298 else
16299   with_assertions=no
16300 fi;
16301 echo "$as_me:16301: result: $with_assertions" >&5
16302 echo "${ECHO_T}$with_assertions" >&6
16303 if test -n "$GCC"
16304 then
16305         if test "$with_assertions" = no
16306         then
16307                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16308         else
16309
16310         ADAFLAGS="$ADAFLAGS -gnata"
16311
16312         fi
16313 fi
16314
16315 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16316
16317 echo "$as_me:16317: checking if you want to use dmalloc for testing" >&5
16318 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16319
16320 # Check whether --with-dmalloc or --without-dmalloc was given.
16321 if test "${with_dmalloc+set}" = set; then
16322   withval="$with_dmalloc"
16323
16324 cat >>confdefs.h <<EOF
16325 #define USE_DMALLOC 1
16326 EOF
16327
16328         : ${with_cflags:=-g}
16329         : ${with_no_leaks:=yes}
16330          with_dmalloc=yes
16331 else
16332   with_dmalloc=
16333 fi;
16334 echo "$as_me:16334: result: ${with_dmalloc:-no}" >&5
16335 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16336
16337 case .$with_cflags in
16338 (.*-g*)
16339         case .$CFLAGS in
16340         (.*-g*)
16341                 ;;
16342         (*)
16343
16344 cf_fix_cppflags=no
16345 cf_new_cflags=
16346 cf_new_cppflags=
16347 cf_new_extra_cppflags=
16348
16349 for cf_add_cflags in -g
16350 do
16351 case $cf_fix_cppflags in
16352 (no)
16353         case $cf_add_cflags in
16354         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16355                 case $cf_add_cflags in
16356                 (-D*)
16357                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16358
16359                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16360                                 && test -z "${cf_tst_cflags}" \
16361                                 && cf_fix_cppflags=yes
16362
16363                         if test $cf_fix_cppflags = yes ; then
16364
16365         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16366         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16367
16368                                 continue
16369                         elif test "${cf_tst_cflags}" = "\"'" ; then
16370
16371         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16372         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16373
16374                                 continue
16375                         fi
16376                         ;;
16377                 esac
16378                 case "$CPPFLAGS" in
16379                 (*$cf_add_cflags)
16380                         ;;
16381                 (*)
16382                         case $cf_add_cflags in
16383                         (-D*)
16384                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16385
16386 CPPFLAGS=`echo "$CPPFLAGS" | \
16387         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16388                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16389
16390                                 ;;
16391                         esac
16392
16393         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16394         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16395
16396                         ;;
16397                 esac
16398                 ;;
16399         (*)
16400
16401         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16402         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16403
16404                 ;;
16405         esac
16406         ;;
16407 (yes)
16408
16409         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16410         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16411
16412         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16413
16414         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16415                 && test -z "${cf_tst_cflags}" \
16416                 && cf_fix_cppflags=no
16417         ;;
16418 esac
16419 done
16420
16421 if test -n "$cf_new_cflags" ; then
16422
16423         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16424         CFLAGS="${CFLAGS}$cf_new_cflags"
16425
16426 fi
16427
16428 if test -n "$cf_new_cppflags" ; then
16429
16430         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16431         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16432
16433 fi
16434
16435 if test -n "$cf_new_extra_cppflags" ; then
16436
16437         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16438         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16439
16440 fi
16441
16442                 ;;
16443         esac
16444         ;;
16445 esac
16446
16447 if test "$with_dmalloc" = yes ; then
16448         echo "$as_me:16448: checking for dmalloc.h" >&5
16449 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16450 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16451   echo $ECHO_N "(cached) $ECHO_C" >&6
16452 else
16453   cat >conftest.$ac_ext <<_ACEOF
16454 #line 16454 "configure"
16455 #include "confdefs.h"
16456 #include <dmalloc.h>
16457 _ACEOF
16458 if { (eval echo "$as_me:16458: \"$ac_cpp conftest.$ac_ext\"") >&5
16459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16460   ac_status=$?
16461   egrep -v '^ *\+' conftest.er1 >conftest.err
16462   rm -f conftest.er1
16463   cat conftest.err >&5
16464   echo "$as_me:16464: \$? = $ac_status" >&5
16465   (exit $ac_status); } >/dev/null; then
16466   if test -s conftest.err; then
16467     ac_cpp_err=$ac_c_preproc_warn_flag
16468   else
16469     ac_cpp_err=
16470   fi
16471 else
16472   ac_cpp_err=yes
16473 fi
16474 if test -z "$ac_cpp_err"; then
16475   ac_cv_header_dmalloc_h=yes
16476 else
16477   echo "$as_me: failed program was:" >&5
16478   cat conftest.$ac_ext >&5
16479   ac_cv_header_dmalloc_h=no
16480 fi
16481 rm -f conftest.err conftest.$ac_ext
16482 fi
16483 echo "$as_me:16483: result: $ac_cv_header_dmalloc_h" >&5
16484 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16485 if test $ac_cv_header_dmalloc_h = yes; then
16486
16487 echo "$as_me:16487: checking for dmalloc_debug in -ldmalloc" >&5
16488 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16489 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16490   echo $ECHO_N "(cached) $ECHO_C" >&6
16491 else
16492   ac_check_lib_save_LIBS=$LIBS
16493 LIBS="-ldmalloc  $LIBS"
16494 cat >conftest.$ac_ext <<_ACEOF
16495 #line 16495 "configure"
16496 #include "confdefs.h"
16497
16498 /* Override any gcc2 internal prototype to avoid an error.  */
16499 #ifdef __cplusplus
16500 extern "C"
16501 #endif
16502 /* We use char because int might match the return type of a gcc2
16503    builtin and then its argument prototype would still apply.  */
16504 char dmalloc_debug ();
16505 int
16506 main (void)
16507 {
16508 dmalloc_debug ();
16509   ;
16510   return 0;
16511 }
16512 _ACEOF
16513 rm -f conftest.$ac_objext conftest$ac_exeext
16514 if { (eval echo "$as_me:16514: \"$ac_link\"") >&5
16515   (eval $ac_link) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); } &&
16519          { ac_try='test -s conftest$ac_exeext'
16520   { (eval echo "$as_me:16520: \"$ac_try\"") >&5
16521   (eval $ac_try) 2>&5
16522   ac_status=$?
16523   echo "$as_me:16523: \$? = $ac_status" >&5
16524   (exit $ac_status); }; }; then
16525   ac_cv_lib_dmalloc_dmalloc_debug=yes
16526 else
16527   echo "$as_me: failed program was:" >&5
16528 cat conftest.$ac_ext >&5
16529 ac_cv_lib_dmalloc_dmalloc_debug=no
16530 fi
16531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16532 LIBS=$ac_check_lib_save_LIBS
16533 fi
16534 echo "$as_me:16534: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16535 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16536 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16537   cat >>confdefs.h <<EOF
16538 #define HAVE_LIBDMALLOC 1
16539 EOF
16540
16541   LIBS="-ldmalloc $LIBS"
16542
16543 fi
16544
16545 fi
16546
16547 fi
16548
16549 echo "$as_me:16549: checking if you want to use dbmalloc for testing" >&5
16550 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16551
16552 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16553 if test "${with_dbmalloc+set}" = set; then
16554   withval="$with_dbmalloc"
16555
16556 cat >>confdefs.h <<EOF
16557 #define USE_DBMALLOC 1
16558 EOF
16559
16560         : ${with_cflags:=-g}
16561         : ${with_no_leaks:=yes}
16562          with_dbmalloc=yes
16563 else
16564   with_dbmalloc=
16565 fi;
16566 echo "$as_me:16566: result: ${with_dbmalloc:-no}" >&5
16567 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16568
16569 case .$with_cflags in
16570 (.*-g*)
16571         case .$CFLAGS in
16572         (.*-g*)
16573                 ;;
16574         (*)
16575
16576 cf_fix_cppflags=no
16577 cf_new_cflags=
16578 cf_new_cppflags=
16579 cf_new_extra_cppflags=
16580
16581 for cf_add_cflags in -g
16582 do
16583 case $cf_fix_cppflags in
16584 (no)
16585         case $cf_add_cflags in
16586         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16587                 case $cf_add_cflags in
16588                 (-D*)
16589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16590
16591                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16592                                 && test -z "${cf_tst_cflags}" \
16593                                 && cf_fix_cppflags=yes
16594
16595                         if test $cf_fix_cppflags = yes ; then
16596
16597         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16598         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16599
16600                                 continue
16601                         elif test "${cf_tst_cflags}" = "\"'" ; then
16602
16603         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16604         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16605
16606                                 continue
16607                         fi
16608                         ;;
16609                 esac
16610                 case "$CPPFLAGS" in
16611                 (*$cf_add_cflags)
16612                         ;;
16613                 (*)
16614                         case $cf_add_cflags in
16615                         (-D*)
16616                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16617
16618 CPPFLAGS=`echo "$CPPFLAGS" | \
16619         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16620                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16621
16622                                 ;;
16623                         esac
16624
16625         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16626         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16627
16628                         ;;
16629                 esac
16630                 ;;
16631         (*)
16632
16633         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16634         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16635
16636                 ;;
16637         esac
16638         ;;
16639 (yes)
16640
16641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16643
16644         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16645
16646         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16647                 && test -z "${cf_tst_cflags}" \
16648                 && cf_fix_cppflags=no
16649         ;;
16650 esac
16651 done
16652
16653 if test -n "$cf_new_cflags" ; then
16654
16655         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16656         CFLAGS="${CFLAGS}$cf_new_cflags"
16657
16658 fi
16659
16660 if test -n "$cf_new_cppflags" ; then
16661
16662         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16663         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16664
16665 fi
16666
16667 if test -n "$cf_new_extra_cppflags" ; then
16668
16669         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16670         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16671
16672 fi
16673
16674                 ;;
16675         esac
16676         ;;
16677 esac
16678
16679 if test "$with_dbmalloc" = yes ; then
16680         echo "$as_me:16680: checking for dbmalloc.h" >&5
16681 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16682 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16683   echo $ECHO_N "(cached) $ECHO_C" >&6
16684 else
16685   cat >conftest.$ac_ext <<_ACEOF
16686 #line 16686 "configure"
16687 #include "confdefs.h"
16688 #include <dbmalloc.h>
16689 _ACEOF
16690 if { (eval echo "$as_me:16690: \"$ac_cpp conftest.$ac_ext\"") >&5
16691   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16692   ac_status=$?
16693   egrep -v '^ *\+' conftest.er1 >conftest.err
16694   rm -f conftest.er1
16695   cat conftest.err >&5
16696   echo "$as_me:16696: \$? = $ac_status" >&5
16697   (exit $ac_status); } >/dev/null; then
16698   if test -s conftest.err; then
16699     ac_cpp_err=$ac_c_preproc_warn_flag
16700   else
16701     ac_cpp_err=
16702   fi
16703 else
16704   ac_cpp_err=yes
16705 fi
16706 if test -z "$ac_cpp_err"; then
16707   ac_cv_header_dbmalloc_h=yes
16708 else
16709   echo "$as_me: failed program was:" >&5
16710   cat conftest.$ac_ext >&5
16711   ac_cv_header_dbmalloc_h=no
16712 fi
16713 rm -f conftest.err conftest.$ac_ext
16714 fi
16715 echo "$as_me:16715: result: $ac_cv_header_dbmalloc_h" >&5
16716 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16717 if test $ac_cv_header_dbmalloc_h = yes; then
16718
16719 echo "$as_me:16719: checking for debug_malloc in -ldbmalloc" >&5
16720 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16721 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16722   echo $ECHO_N "(cached) $ECHO_C" >&6
16723 else
16724   ac_check_lib_save_LIBS=$LIBS
16725 LIBS="-ldbmalloc  $LIBS"
16726 cat >conftest.$ac_ext <<_ACEOF
16727 #line 16727 "configure"
16728 #include "confdefs.h"
16729
16730 /* Override any gcc2 internal prototype to avoid an error.  */
16731 #ifdef __cplusplus
16732 extern "C"
16733 #endif
16734 /* We use char because int might match the return type of a gcc2
16735    builtin and then its argument prototype would still apply.  */
16736 char debug_malloc ();
16737 int
16738 main (void)
16739 {
16740 debug_malloc ();
16741   ;
16742   return 0;
16743 }
16744 _ACEOF
16745 rm -f conftest.$ac_objext conftest$ac_exeext
16746 if { (eval echo "$as_me:16746: \"$ac_link\"") >&5
16747   (eval $ac_link) 2>&5
16748   ac_status=$?
16749   echo "$as_me:16749: \$? = $ac_status" >&5
16750   (exit $ac_status); } &&
16751          { ac_try='test -s conftest$ac_exeext'
16752   { (eval echo "$as_me:16752: \"$ac_try\"") >&5
16753   (eval $ac_try) 2>&5
16754   ac_status=$?
16755   echo "$as_me:16755: \$? = $ac_status" >&5
16756   (exit $ac_status); }; }; then
16757   ac_cv_lib_dbmalloc_debug_malloc=yes
16758 else
16759   echo "$as_me: failed program was:" >&5
16760 cat conftest.$ac_ext >&5
16761 ac_cv_lib_dbmalloc_debug_malloc=no
16762 fi
16763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16764 LIBS=$ac_check_lib_save_LIBS
16765 fi
16766 echo "$as_me:16766: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16767 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16768 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16769   cat >>confdefs.h <<EOF
16770 #define HAVE_LIBDBMALLOC 1
16771 EOF
16772
16773   LIBS="-ldbmalloc $LIBS"
16774
16775 fi
16776
16777 fi
16778
16779 fi
16780
16781 echo "$as_me:16781: checking if you want to use valgrind for testing" >&5
16782 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16783
16784 # Check whether --with-valgrind or --without-valgrind was given.
16785 if test "${with_valgrind+set}" = set; then
16786   withval="$with_valgrind"
16787
16788 cat >>confdefs.h <<EOF
16789 #define USE_VALGRIND 1
16790 EOF
16791
16792         : ${with_cflags:=-g}
16793         : ${with_no_leaks:=yes}
16794          with_valgrind=yes
16795 else
16796   with_valgrind=
16797 fi;
16798 echo "$as_me:16798: result: ${with_valgrind:-no}" >&5
16799 echo "${ECHO_T}${with_valgrind:-no}" >&6
16800
16801 case .$with_cflags in
16802 (.*-g*)
16803         case .$CFLAGS in
16804         (.*-g*)
16805                 ;;
16806         (*)
16807
16808 cf_fix_cppflags=no
16809 cf_new_cflags=
16810 cf_new_cppflags=
16811 cf_new_extra_cppflags=
16812
16813 for cf_add_cflags in -g
16814 do
16815 case $cf_fix_cppflags in
16816 (no)
16817         case $cf_add_cflags in
16818         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16819                 case $cf_add_cflags in
16820                 (-D*)
16821                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16822
16823                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16824                                 && test -z "${cf_tst_cflags}" \
16825                                 && cf_fix_cppflags=yes
16826
16827                         if test $cf_fix_cppflags = yes ; then
16828
16829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16831
16832                                 continue
16833                         elif test "${cf_tst_cflags}" = "\"'" ; then
16834
16835         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16836         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16837
16838                                 continue
16839                         fi
16840                         ;;
16841                 esac
16842                 case "$CPPFLAGS" in
16843                 (*$cf_add_cflags)
16844                         ;;
16845                 (*)
16846                         case $cf_add_cflags in
16847                         (-D*)
16848                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16849
16850 CPPFLAGS=`echo "$CPPFLAGS" | \
16851         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16852                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16853
16854                                 ;;
16855                         esac
16856
16857         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16858         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16859
16860                         ;;
16861                 esac
16862                 ;;
16863         (*)
16864
16865         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16866         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16867
16868                 ;;
16869         esac
16870         ;;
16871 (yes)
16872
16873         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16874         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16875
16876         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16877
16878         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16879                 && test -z "${cf_tst_cflags}" \
16880                 && cf_fix_cppflags=no
16881         ;;
16882 esac
16883 done
16884
16885 if test -n "$cf_new_cflags" ; then
16886
16887         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16888         CFLAGS="${CFLAGS}$cf_new_cflags"
16889
16890 fi
16891
16892 if test -n "$cf_new_cppflags" ; then
16893
16894         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16895         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16896
16897 fi
16898
16899 if test -n "$cf_new_extra_cppflags" ; then
16900
16901         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16902         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16903
16904 fi
16905
16906                 ;;
16907         esac
16908         ;;
16909 esac
16910
16911 echo "$as_me:16911: checking if you want to perform memory-leak testing" >&5
16912 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16913
16914 # Check whether --enable-leaks or --disable-leaks was given.
16915 if test "${enable_leaks+set}" = set; then
16916   enableval="$enable_leaks"
16917   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16918 else
16919   : ${with_no_leaks:=no}
16920 fi;
16921 echo "$as_me:16921: result: $with_no_leaks" >&5
16922 echo "${ECHO_T}$with_no_leaks" >&6
16923
16924 if test "$with_no_leaks" = yes ; then
16925
16926 cat >>confdefs.h <<\EOF
16927 #define NO_LEAKS 1
16928 EOF
16929
16930 cat >>confdefs.h <<\EOF
16931 #define YY_NO_LEAKS 1
16932 EOF
16933
16934 fi
16935
16936 cat >>confdefs.h <<\EOF
16937 #define HAVE_NC_ALLOC_H 1
16938 EOF
16939
16940 ###     use option --enable-expanded to generate certain macros as functions
16941
16942 # Check whether --enable-expanded or --disable-expanded was given.
16943 if test "${enable_expanded+set}" = set; then
16944   enableval="$enable_expanded"
16945   test "x$enableval" = xyes &&
16946 cat >>confdefs.h <<\EOF
16947 #define NCURSES_EXPANDED 1
16948 EOF
16949
16950 fi;
16951
16952 ###     use option --disable-macros to suppress macros in favor of functions
16953
16954 # Check whether --enable-macros or --disable-macros was given.
16955 if test "${enable_macros+set}" = set; then
16956   enableval="$enable_macros"
16957   test "$enableval" = no &&
16958 cat >>confdefs.h <<\EOF
16959 #define NCURSES_NOMACROS 1
16960 EOF
16961
16962 fi;
16963
16964 # Normally we only add trace() to the debug-library.  Allow this to be
16965 # extended to all models of the ncurses library:
16966 cf_all_traces=no
16967 case "$CFLAGS $CPPFLAGS" in
16968 (*-DTRACE*)
16969         cf_all_traces=yes
16970         ;;
16971 esac
16972
16973 echo "$as_me:16973: checking whether to add trace feature to all models" >&5
16974 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16975
16976 # Check whether --with-trace or --without-trace was given.
16977 if test "${with_trace+set}" = set; then
16978   withval="$with_trace"
16979   cf_with_trace=$withval
16980 else
16981   cf_with_trace=$cf_all_traces
16982 fi;
16983 echo "$as_me:16983: result: $cf_with_trace" >&5
16984 echo "${ECHO_T}$cf_with_trace" >&6
16985
16986 if test "x$cf_with_trace" = xyes ; then
16987         LIB_TRACING=all
16988         ADA_TRACE=TRUE
16989
16990 cf_fix_cppflags=no
16991 cf_new_cflags=
16992 cf_new_cppflags=
16993 cf_new_extra_cppflags=
16994
16995 for cf_add_cflags in -DTRACE
16996 do
16997 case $cf_fix_cppflags in
16998 (no)
16999         case $cf_add_cflags in
17000         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17001                 case $cf_add_cflags in
17002                 (-D*)
17003                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17004
17005                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17006                                 && test -z "${cf_tst_cflags}" \
17007                                 && cf_fix_cppflags=yes
17008
17009                         if test $cf_fix_cppflags = yes ; then
17010
17011         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17012         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17013
17014                                 continue
17015                         elif test "${cf_tst_cflags}" = "\"'" ; then
17016
17017         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17018         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17019
17020                                 continue
17021                         fi
17022                         ;;
17023                 esac
17024                 case "$CPPFLAGS" in
17025                 (*$cf_add_cflags)
17026                         ;;
17027                 (*)
17028                         case $cf_add_cflags in
17029                         (-D*)
17030                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17031
17032 CPPFLAGS=`echo "$CPPFLAGS" | \
17033         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17034                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17035
17036                                 ;;
17037                         esac
17038
17039         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17040         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17041
17042                         ;;
17043                 esac
17044                 ;;
17045         (*)
17046
17047         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17048         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17049
17050                 ;;
17051         esac
17052         ;;
17053 (yes)
17054
17055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17057
17058         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17059
17060         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17061                 && test -z "${cf_tst_cflags}" \
17062                 && cf_fix_cppflags=no
17063         ;;
17064 esac
17065 done
17066
17067 if test -n "$cf_new_cflags" ; then
17068
17069         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17070         CFLAGS="${CFLAGS}$cf_new_cflags"
17071
17072 fi
17073
17074 if test -n "$cf_new_cppflags" ; then
17075
17076         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17077         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17078
17079 fi
17080
17081 if test -n "$cf_new_extra_cppflags" ; then
17082
17083         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17084         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17085
17086 fi
17087
17088 cat >>confdefs.h <<\EOF
17089 #define HAVE__TRACEF 1
17090 EOF
17091
17092 else
17093         LIB_TRACING=DEBUG
17094         ADA_TRACE=FALSE
17095 fi
17096
17097 echo "$as_me:17097: checking if we want to use GNAT projects" >&5
17098 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17099
17100 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17101 if test "${enable_gnat_projects+set}" = set; then
17102   enableval="$enable_gnat_projects"
17103   test "$enableval" != no && enableval=yes
17104         if test "$enableval" != "yes" ; then
17105     enable_gnat_projects=no
17106         else
17107                 enable_gnat_projects=yes
17108         fi
17109 else
17110   enableval=yes
17111         enable_gnat_projects=yes
17112
17113 fi;
17114 echo "$as_me:17114: result: $enable_gnat_projects" >&5
17115 echo "${ECHO_T}$enable_gnat_projects" >&6
17116
17117 ###     Checks for libraries.
17118 case $cf_cv_system_name in
17119 (*mingw32*|*mingw64*)
17120         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17121         LIBS=" -lpsapi $LIBS"
17122         ;;
17123 (*)
17124 echo "$as_me:17124: checking for gettimeofday" >&5
17125 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17126 if test "${ac_cv_func_gettimeofday+set}" = set; then
17127   echo $ECHO_N "(cached) $ECHO_C" >&6
17128 else
17129   cat >conftest.$ac_ext <<_ACEOF
17130 #line 17130 "configure"
17131 #include "confdefs.h"
17132 #define gettimeofday autoconf_temporary
17133 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17134 #undef gettimeofday
17135
17136 #ifdef __cplusplus
17137 extern "C"
17138 #endif
17139
17140 /* We use char because int might match the return type of a gcc2
17141    builtin and then its argument prototype would still apply.  */
17142 char gettimeofday (void);
17143
17144 int
17145 main (void)
17146 {
17147
17148 /* The GNU C library defines stubs for functions which it implements
17149     to always fail with ENOSYS.  Some functions are actually named
17150     something starting with __ and the normal name is an alias.  */
17151 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17152 #error found stub for gettimeofday
17153 #endif
17154
17155         return gettimeofday ();
17156   ;
17157   return 0;
17158 }
17159 _ACEOF
17160 rm -f conftest.$ac_objext conftest$ac_exeext
17161 if { (eval echo "$as_me:17161: \"$ac_link\"") >&5
17162   (eval $ac_link) 2>&5
17163   ac_status=$?
17164   echo "$as_me:17164: \$? = $ac_status" >&5
17165   (exit $ac_status); } &&
17166          { ac_try='test -s conftest$ac_exeext'
17167   { (eval echo "$as_me:17167: \"$ac_try\"") >&5
17168   (eval $ac_try) 2>&5
17169   ac_status=$?
17170   echo "$as_me:17170: \$? = $ac_status" >&5
17171   (exit $ac_status); }; }; then
17172   ac_cv_func_gettimeofday=yes
17173 else
17174   echo "$as_me: failed program was:" >&5
17175 cat conftest.$ac_ext >&5
17176 ac_cv_func_gettimeofday=no
17177 fi
17178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17179 fi
17180 echo "$as_me:17180: result: $ac_cv_func_gettimeofday" >&5
17181 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17182 if test $ac_cv_func_gettimeofday = yes; then
17183
17184 cat >>confdefs.h <<\EOF
17185 #define HAVE_GETTIMEOFDAY 1
17186 EOF
17187
17188 else
17189
17190 echo "$as_me:17190: checking for gettimeofday in -lbsd" >&5
17191 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17192 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17193   echo $ECHO_N "(cached) $ECHO_C" >&6
17194 else
17195   ac_check_lib_save_LIBS=$LIBS
17196 LIBS="-lbsd  $LIBS"
17197 cat >conftest.$ac_ext <<_ACEOF
17198 #line 17198 "configure"
17199 #include "confdefs.h"
17200
17201 /* Override any gcc2 internal prototype to avoid an error.  */
17202 #ifdef __cplusplus
17203 extern "C"
17204 #endif
17205 /* We use char because int might match the return type of a gcc2
17206    builtin and then its argument prototype would still apply.  */
17207 char gettimeofday ();
17208 int
17209 main (void)
17210 {
17211 gettimeofday ();
17212   ;
17213   return 0;
17214 }
17215 _ACEOF
17216 rm -f conftest.$ac_objext conftest$ac_exeext
17217 if { (eval echo "$as_me:17217: \"$ac_link\"") >&5
17218   (eval $ac_link) 2>&5
17219   ac_status=$?
17220   echo "$as_me:17220: \$? = $ac_status" >&5
17221   (exit $ac_status); } &&
17222          { ac_try='test -s conftest$ac_exeext'
17223   { (eval echo "$as_me:17223: \"$ac_try\"") >&5
17224   (eval $ac_try) 2>&5
17225   ac_status=$?
17226   echo "$as_me:17226: \$? = $ac_status" >&5
17227   (exit $ac_status); }; }; then
17228   ac_cv_lib_bsd_gettimeofday=yes
17229 else
17230   echo "$as_me: failed program was:" >&5
17231 cat conftest.$ac_ext >&5
17232 ac_cv_lib_bsd_gettimeofday=no
17233 fi
17234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17235 LIBS=$ac_check_lib_save_LIBS
17236 fi
17237 echo "$as_me:17237: result: $ac_cv_lib_bsd_gettimeofday" >&5
17238 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17239 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17240
17241 cat >>confdefs.h <<\EOF
17242 #define HAVE_GETTIMEOFDAY 1
17243 EOF
17244
17245 cf_add_libs="-lbsd"
17246 # Filter out duplicates - this happens with badly-designed ".pc" files...
17247 for cf_add_1lib in $LIBS
17248 do
17249         for cf_add_2lib in $cf_add_libs
17250         do
17251                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17252                 then
17253                         cf_add_1lib=
17254                         break
17255                 fi
17256         done
17257         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17258 done
17259 LIBS="$cf_add_libs"
17260
17261 fi
17262
17263 fi
17264         ;;
17265 esac
17266
17267 echo "$as_me:17267: checking if -lm needed for math functions" >&5
17268 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17269 if test "${cf_cv_need_libm+set}" = set; then
17270   echo $ECHO_N "(cached) $ECHO_C" >&6
17271 else
17272
17273         cat >conftest.$ac_ext <<_ACEOF
17274 #line 17274 "configure"
17275 #include "confdefs.h"
17276
17277         #include <stdio.h>
17278         #include <stdlib.h>
17279         #include <math.h>
17280
17281 int
17282 main (void)
17283 {
17284 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17285   ;
17286   return 0;
17287 }
17288 _ACEOF
17289 rm -f conftest.$ac_objext conftest$ac_exeext
17290 if { (eval echo "$as_me:17290: \"$ac_link\"") >&5
17291   (eval $ac_link) 2>&5
17292   ac_status=$?
17293   echo "$as_me:17293: \$? = $ac_status" >&5
17294   (exit $ac_status); } &&
17295          { ac_try='test -s conftest$ac_exeext'
17296   { (eval echo "$as_me:17296: \"$ac_try\"") >&5
17297   (eval $ac_try) 2>&5
17298   ac_status=$?
17299   echo "$as_me:17299: \$? = $ac_status" >&5
17300   (exit $ac_status); }; }; then
17301   cf_cv_need_libm=no
17302 else
17303   echo "$as_me: failed program was:" >&5
17304 cat conftest.$ac_ext >&5
17305 cf_cv_need_libm=yes
17306 fi
17307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17308 fi
17309 echo "$as_me:17309: result: $cf_cv_need_libm" >&5
17310 echo "${ECHO_T}$cf_cv_need_libm" >&6
17311 if test "$cf_cv_need_libm" = yes
17312 then
17313 MATH_LIB=-lm
17314 fi
17315
17316 ###     Checks for header files.
17317 echo "$as_me:17317: checking for ANSI C header files" >&5
17318 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17319 if test "${ac_cv_header_stdc+set}" = set; then
17320   echo $ECHO_N "(cached) $ECHO_C" >&6
17321 else
17322   cat >conftest.$ac_ext <<_ACEOF
17323 #line 17323 "configure"
17324 #include "confdefs.h"
17325 #include <stdlib.h>
17326 #include <stdarg.h>
17327 #include <string.h>
17328 #include <float.h>
17329
17330 _ACEOF
17331 if { (eval echo "$as_me:17331: \"$ac_cpp conftest.$ac_ext\"") >&5
17332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17333   ac_status=$?
17334   egrep -v '^ *\+' conftest.er1 >conftest.err
17335   rm -f conftest.er1
17336   cat conftest.err >&5
17337   echo "$as_me:17337: \$? = $ac_status" >&5
17338   (exit $ac_status); } >/dev/null; then
17339   if test -s conftest.err; then
17340     ac_cpp_err=$ac_c_preproc_warn_flag
17341   else
17342     ac_cpp_err=
17343   fi
17344 else
17345   ac_cpp_err=yes
17346 fi
17347 if test -z "$ac_cpp_err"; then
17348   ac_cv_header_stdc=yes
17349 else
17350   echo "$as_me: failed program was:" >&5
17351   cat conftest.$ac_ext >&5
17352   ac_cv_header_stdc=no
17353 fi
17354 rm -f conftest.err conftest.$ac_ext
17355
17356 if test $ac_cv_header_stdc = yes; then
17357   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17358   cat >conftest.$ac_ext <<_ACEOF
17359 #line 17359 "configure"
17360 #include "confdefs.h"
17361 #include <string.h>
17362
17363 _ACEOF
17364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17365   egrep "memchr" >/dev/null 2>&1; then
17366   :
17367 else
17368   ac_cv_header_stdc=no
17369 fi
17370 rm -rf conftest*
17371
17372 fi
17373
17374 if test $ac_cv_header_stdc = yes; then
17375   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17376   cat >conftest.$ac_ext <<_ACEOF
17377 #line 17377 "configure"
17378 #include "confdefs.h"
17379 #include <stdlib.h>
17380
17381 _ACEOF
17382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17383   egrep "free" >/dev/null 2>&1; then
17384   :
17385 else
17386   ac_cv_header_stdc=no
17387 fi
17388 rm -rf conftest*
17389
17390 fi
17391
17392 if test $ac_cv_header_stdc = yes; then
17393   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17394   if test "$cross_compiling" = yes; then
17395   :
17396 else
17397   cat >conftest.$ac_ext <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17400 #include <ctype.h>
17401 #if ((' ' & 0x0FF) == 0x020)
17402 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17403 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17404 #else
17405 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17406                      || ('j' <= (c) && (c) <= 'r') \
17407                      || ('s' <= (c) && (c) <= 'z'))
17408 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17409 #endif
17410
17411 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17412 int
17413 main (void)
17414 {
17415   int i;
17416   for (i = 0; i < 256; i++)
17417     if (XOR (islower (i), ISLOWER (i))
17418         || toupper (i) != TOUPPER (i))
17419       $ac_main_return(2);
17420   $ac_main_return (0);
17421 }
17422 _ACEOF
17423 rm -f conftest$ac_exeext
17424 if { (eval echo "$as_me:17424: \"$ac_link\"") >&5
17425   (eval $ac_link) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17429   { (eval echo "$as_me:17429: \"$ac_try\"") >&5
17430   (eval $ac_try) 2>&5
17431   ac_status=$?
17432   echo "$as_me:17432: \$? = $ac_status" >&5
17433   (exit $ac_status); }; }; then
17434   :
17435 else
17436   echo "$as_me: program exited with status $ac_status" >&5
17437 echo "$as_me: failed program was:" >&5
17438 cat conftest.$ac_ext >&5
17439 ac_cv_header_stdc=no
17440 fi
17441 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17442 fi
17443 fi
17444 fi
17445 echo "$as_me:17445: result: $ac_cv_header_stdc" >&5
17446 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17447 if test $ac_cv_header_stdc = yes; then
17448
17449 cat >>confdefs.h <<\EOF
17450 #define STDC_HEADERS 1
17451 EOF
17452
17453 fi
17454
17455 ac_header_dirent=no
17456 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17457   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17458 echo "$as_me:17458: checking for $ac_hdr that defines DIR" >&5
17459 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17460 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17461   echo $ECHO_N "(cached) $ECHO_C" >&6
17462 else
17463   cat >conftest.$ac_ext <<_ACEOF
17464 #line 17464 "configure"
17465 #include "confdefs.h"
17466 #include <sys/types.h>
17467 #include <$ac_hdr>
17468
17469 int
17470 main (void)
17471 {
17472 if ((DIR *) 0)
17473 return 0;
17474   ;
17475   return 0;
17476 }
17477 _ACEOF
17478 rm -f conftest.$ac_objext
17479 if { (eval echo "$as_me:17479: \"$ac_compile\"") >&5
17480   (eval $ac_compile) 2>&5
17481   ac_status=$?
17482   echo "$as_me:17482: \$? = $ac_status" >&5
17483   (exit $ac_status); } &&
17484          { ac_try='test -s conftest.$ac_objext'
17485   { (eval echo "$as_me:17485: \"$ac_try\"") >&5
17486   (eval $ac_try) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit $ac_status); }; }; then
17490   eval "$as_ac_Header=yes"
17491 else
17492   echo "$as_me: failed program was:" >&5
17493 cat conftest.$ac_ext >&5
17494 eval "$as_ac_Header=no"
17495 fi
17496 rm -f conftest.$ac_objext conftest.$ac_ext
17497 fi
17498 echo "$as_me:17498: result: `eval echo '${'$as_ac_Header'}'`" >&5
17499 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17500 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17501   cat >>confdefs.h <<EOF
17502 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17503 EOF
17504
17505 ac_header_dirent=$ac_hdr; break
17506 fi
17507
17508 done
17509 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17510 if test $ac_header_dirent = dirent.h; then
17511   echo "$as_me:17511: checking for opendir in -ldir" >&5
17512 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17513 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17514   echo $ECHO_N "(cached) $ECHO_C" >&6
17515 else
17516   ac_check_lib_save_LIBS=$LIBS
17517 LIBS="-ldir  $LIBS"
17518 cat >conftest.$ac_ext <<_ACEOF
17519 #line 17519 "configure"
17520 #include "confdefs.h"
17521
17522 /* Override any gcc2 internal prototype to avoid an error.  */
17523 #ifdef __cplusplus
17524 extern "C"
17525 #endif
17526 /* We use char because int might match the return type of a gcc2
17527    builtin and then its argument prototype would still apply.  */
17528 char opendir ();
17529 int
17530 main (void)
17531 {
17532 opendir ();
17533   ;
17534   return 0;
17535 }
17536 _ACEOF
17537 rm -f conftest.$ac_objext conftest$ac_exeext
17538 if { (eval echo "$as_me:17538: \"$ac_link\"") >&5
17539   (eval $ac_link) 2>&5
17540   ac_status=$?
17541   echo "$as_me:17541: \$? = $ac_status" >&5
17542   (exit $ac_status); } &&
17543          { ac_try='test -s conftest$ac_exeext'
17544   { (eval echo "$as_me:17544: \"$ac_try\"") >&5
17545   (eval $ac_try) 2>&5
17546   ac_status=$?
17547   echo "$as_me:17547: \$? = $ac_status" >&5
17548   (exit $ac_status); }; }; then
17549   ac_cv_lib_dir_opendir=yes
17550 else
17551   echo "$as_me: failed program was:" >&5
17552 cat conftest.$ac_ext >&5
17553 ac_cv_lib_dir_opendir=no
17554 fi
17555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17556 LIBS=$ac_check_lib_save_LIBS
17557 fi
17558 echo "$as_me:17558: result: $ac_cv_lib_dir_opendir" >&5
17559 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17560 if test $ac_cv_lib_dir_opendir = yes; then
17561   LIBS="$LIBS -ldir"
17562 fi
17563
17564 else
17565   echo "$as_me:17565: checking for opendir in -lx" >&5
17566 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17567 if test "${ac_cv_lib_x_opendir+set}" = set; then
17568   echo $ECHO_N "(cached) $ECHO_C" >&6
17569 else
17570   ac_check_lib_save_LIBS=$LIBS
17571 LIBS="-lx  $LIBS"
17572 cat >conftest.$ac_ext <<_ACEOF
17573 #line 17573 "configure"
17574 #include "confdefs.h"
17575
17576 /* Override any gcc2 internal prototype to avoid an error.  */
17577 #ifdef __cplusplus
17578 extern "C"
17579 #endif
17580 /* We use char because int might match the return type of a gcc2
17581    builtin and then its argument prototype would still apply.  */
17582 char opendir ();
17583 int
17584 main (void)
17585 {
17586 opendir ();
17587   ;
17588   return 0;
17589 }
17590 _ACEOF
17591 rm -f conftest.$ac_objext conftest$ac_exeext
17592 if { (eval echo "$as_me:17592: \"$ac_link\"") >&5
17593   (eval $ac_link) 2>&5
17594   ac_status=$?
17595   echo "$as_me:17595: \$? = $ac_status" >&5
17596   (exit $ac_status); } &&
17597          { ac_try='test -s conftest$ac_exeext'
17598   { (eval echo "$as_me:17598: \"$ac_try\"") >&5
17599   (eval $ac_try) 2>&5
17600   ac_status=$?
17601   echo "$as_me:17601: \$? = $ac_status" >&5
17602   (exit $ac_status); }; }; then
17603   ac_cv_lib_x_opendir=yes
17604 else
17605   echo "$as_me: failed program was:" >&5
17606 cat conftest.$ac_ext >&5
17607 ac_cv_lib_x_opendir=no
17608 fi
17609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17610 LIBS=$ac_check_lib_save_LIBS
17611 fi
17612 echo "$as_me:17612: result: $ac_cv_lib_x_opendir" >&5
17613 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17614 if test $ac_cv_lib_x_opendir = yes; then
17615   LIBS="$LIBS -lx"
17616 fi
17617
17618 fi
17619
17620 echo "$as_me:17620: checking whether time.h and sys/time.h may both be included" >&5
17621 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17622 if test "${ac_cv_header_time+set}" = set; then
17623   echo $ECHO_N "(cached) $ECHO_C" >&6
17624 else
17625   cat >conftest.$ac_ext <<_ACEOF
17626 #line 17626 "configure"
17627 #include "confdefs.h"
17628 #include <sys/types.h>
17629 #include <sys/time.h>
17630 #include <time.h>
17631
17632 int
17633 main (void)
17634 {
17635 if ((struct tm *) 0)
17636 return 0;
17637   ;
17638   return 0;
17639 }
17640 _ACEOF
17641 rm -f conftest.$ac_objext
17642 if { (eval echo "$as_me:17642: \"$ac_compile\"") >&5
17643   (eval $ac_compile) 2>&5
17644   ac_status=$?
17645   echo "$as_me:17645: \$? = $ac_status" >&5
17646   (exit $ac_status); } &&
17647          { ac_try='test -s conftest.$ac_objext'
17648   { (eval echo "$as_me:17648: \"$ac_try\"") >&5
17649   (eval $ac_try) 2>&5
17650   ac_status=$?
17651   echo "$as_me:17651: \$? = $ac_status" >&5
17652   (exit $ac_status); }; }; then
17653   ac_cv_header_time=yes
17654 else
17655   echo "$as_me: failed program was:" >&5
17656 cat conftest.$ac_ext >&5
17657 ac_cv_header_time=no
17658 fi
17659 rm -f conftest.$ac_objext conftest.$ac_ext
17660 fi
17661 echo "$as_me:17661: result: $ac_cv_header_time" >&5
17662 echo "${ECHO_T}$ac_cv_header_time" >&6
17663 if test $ac_cv_header_time = yes; then
17664
17665 cat >>confdefs.h <<\EOF
17666 #define TIME_WITH_SYS_TIME 1
17667 EOF
17668
17669 fi
17670
17671 cf_regex_func=no
17672
17673 cf_regex_libs="regex re"
17674 case $host_os in
17675 (mingw*)
17676         cf_regex_libs="gnurx $cf_regex_libs"
17677         ;;
17678 esac
17679
17680 echo "$as_me:17680: checking for regcomp" >&5
17681 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17682 if test "${ac_cv_func_regcomp+set}" = set; then
17683   echo $ECHO_N "(cached) $ECHO_C" >&6
17684 else
17685   cat >conftest.$ac_ext <<_ACEOF
17686 #line 17686 "configure"
17687 #include "confdefs.h"
17688 #define regcomp autoconf_temporary
17689 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17690 #undef regcomp
17691
17692 #ifdef __cplusplus
17693 extern "C"
17694 #endif
17695
17696 /* We use char because int might match the return type of a gcc2
17697    builtin and then its argument prototype would still apply.  */
17698 char regcomp (void);
17699
17700 int
17701 main (void)
17702 {
17703
17704 /* The GNU C library defines stubs for functions which it implements
17705     to always fail with ENOSYS.  Some functions are actually named
17706     something starting with __ and the normal name is an alias.  */
17707 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17708 #error found stub for regcomp
17709 #endif
17710
17711         return regcomp ();
17712   ;
17713   return 0;
17714 }
17715 _ACEOF
17716 rm -f conftest.$ac_objext conftest$ac_exeext
17717 if { (eval echo "$as_me:17717: \"$ac_link\"") >&5
17718   (eval $ac_link) 2>&5
17719   ac_status=$?
17720   echo "$as_me:17720: \$? = $ac_status" >&5
17721   (exit $ac_status); } &&
17722          { ac_try='test -s conftest$ac_exeext'
17723   { (eval echo "$as_me:17723: \"$ac_try\"") >&5
17724   (eval $ac_try) 2>&5
17725   ac_status=$?
17726   echo "$as_me:17726: \$? = $ac_status" >&5
17727   (exit $ac_status); }; }; then
17728   ac_cv_func_regcomp=yes
17729 else
17730   echo "$as_me: failed program was:" >&5
17731 cat conftest.$ac_ext >&5
17732 ac_cv_func_regcomp=no
17733 fi
17734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17735 fi
17736 echo "$as_me:17736: result: $ac_cv_func_regcomp" >&5
17737 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17738 if test $ac_cv_func_regcomp = yes; then
17739   cf_regex_func=regcomp
17740 else
17741
17742         for cf_regex_lib in $cf_regex_libs
17743         do
17744                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17745 echo "$as_me:17745: checking for regcomp in -l$cf_regex_lib" >&5
17746 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17747 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17748   echo $ECHO_N "(cached) $ECHO_C" >&6
17749 else
17750   ac_check_lib_save_LIBS=$LIBS
17751 LIBS="-l$cf_regex_lib  $LIBS"
17752 cat >conftest.$ac_ext <<_ACEOF
17753 #line 17753 "configure"
17754 #include "confdefs.h"
17755
17756 /* Override any gcc2 internal prototype to avoid an error.  */
17757 #ifdef __cplusplus
17758 extern "C"
17759 #endif
17760 /* We use char because int might match the return type of a gcc2
17761    builtin and then its argument prototype would still apply.  */
17762 char regcomp ();
17763 int
17764 main (void)
17765 {
17766 regcomp ();
17767   ;
17768   return 0;
17769 }
17770 _ACEOF
17771 rm -f conftest.$ac_objext conftest$ac_exeext
17772 if { (eval echo "$as_me:17772: \"$ac_link\"") >&5
17773   (eval $ac_link) 2>&5
17774   ac_status=$?
17775   echo "$as_me:17775: \$? = $ac_status" >&5
17776   (exit $ac_status); } &&
17777          { ac_try='test -s conftest$ac_exeext'
17778   { (eval echo "$as_me:17778: \"$ac_try\"") >&5
17779   (eval $ac_try) 2>&5
17780   ac_status=$?
17781   echo "$as_me:17781: \$? = $ac_status" >&5
17782   (exit $ac_status); }; }; then
17783   eval "$as_ac_Lib=yes"
17784 else
17785   echo "$as_me: failed program was:" >&5
17786 cat conftest.$ac_ext >&5
17787 eval "$as_ac_Lib=no"
17788 fi
17789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17790 LIBS=$ac_check_lib_save_LIBS
17791 fi
17792 echo "$as_me:17792: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17793 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17794 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17795
17796 cf_add_libs="-l$cf_regex_lib"
17797 # Filter out duplicates - this happens with badly-designed ".pc" files...
17798 for cf_add_1lib in $LIBS
17799 do
17800         for cf_add_2lib in $cf_add_libs
17801         do
17802                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17803                 then
17804                         cf_add_1lib=
17805                         break
17806                 fi
17807         done
17808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17809 done
17810 LIBS="$cf_add_libs"
17811
17812                                 cf_regex_func=regcomp
17813                                 break
17814 fi
17815
17816         done
17817
17818 fi
17819
17820 if test "$cf_regex_func" = no ; then
17821         echo "$as_me:17821: checking for compile" >&5
17822 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17823 if test "${ac_cv_func_compile+set}" = set; then
17824   echo $ECHO_N "(cached) $ECHO_C" >&6
17825 else
17826   cat >conftest.$ac_ext <<_ACEOF
17827 #line 17827 "configure"
17828 #include "confdefs.h"
17829 #define compile autoconf_temporary
17830 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17831 #undef compile
17832
17833 #ifdef __cplusplus
17834 extern "C"
17835 #endif
17836
17837 /* We use char because int might match the return type of a gcc2
17838    builtin and then its argument prototype would still apply.  */
17839 char compile (void);
17840
17841 int
17842 main (void)
17843 {
17844
17845 /* The GNU C library defines stubs for functions which it implements
17846     to always fail with ENOSYS.  Some functions are actually named
17847     something starting with __ and the normal name is an alias.  */
17848 #if defined (__stub_compile) || defined (__stub___compile)
17849 #error found stub for compile
17850 #endif
17851
17852         return compile ();
17853   ;
17854   return 0;
17855 }
17856 _ACEOF
17857 rm -f conftest.$ac_objext conftest$ac_exeext
17858 if { (eval echo "$as_me:17858: \"$ac_link\"") >&5
17859   (eval $ac_link) 2>&5
17860   ac_status=$?
17861   echo "$as_me:17861: \$? = $ac_status" >&5
17862   (exit $ac_status); } &&
17863          { ac_try='test -s conftest$ac_exeext'
17864   { (eval echo "$as_me:17864: \"$ac_try\"") >&5
17865   (eval $ac_try) 2>&5
17866   ac_status=$?
17867   echo "$as_me:17867: \$? = $ac_status" >&5
17868   (exit $ac_status); }; }; then
17869   ac_cv_func_compile=yes
17870 else
17871   echo "$as_me: failed program was:" >&5
17872 cat conftest.$ac_ext >&5
17873 ac_cv_func_compile=no
17874 fi
17875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17876 fi
17877 echo "$as_me:17877: result: $ac_cv_func_compile" >&5
17878 echo "${ECHO_T}$ac_cv_func_compile" >&6
17879 if test $ac_cv_func_compile = yes; then
17880   cf_regex_func=compile
17881 else
17882
17883                 echo "$as_me:17883: checking for compile in -lgen" >&5
17884 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17885 if test "${ac_cv_lib_gen_compile+set}" = set; then
17886   echo $ECHO_N "(cached) $ECHO_C" >&6
17887 else
17888   ac_check_lib_save_LIBS=$LIBS
17889 LIBS="-lgen  $LIBS"
17890 cat >conftest.$ac_ext <<_ACEOF
17891 #line 17891 "configure"
17892 #include "confdefs.h"
17893
17894 /* Override any gcc2 internal prototype to avoid an error.  */
17895 #ifdef __cplusplus
17896 extern "C"
17897 #endif
17898 /* We use char because int might match the return type of a gcc2
17899    builtin and then its argument prototype would still apply.  */
17900 char compile ();
17901 int
17902 main (void)
17903 {
17904 compile ();
17905   ;
17906   return 0;
17907 }
17908 _ACEOF
17909 rm -f conftest.$ac_objext conftest$ac_exeext
17910 if { (eval echo "$as_me:17910: \"$ac_link\"") >&5
17911   (eval $ac_link) 2>&5
17912   ac_status=$?
17913   echo "$as_me:17913: \$? = $ac_status" >&5
17914   (exit $ac_status); } &&
17915          { ac_try='test -s conftest$ac_exeext'
17916   { (eval echo "$as_me:17916: \"$ac_try\"") >&5
17917   (eval $ac_try) 2>&5
17918   ac_status=$?
17919   echo "$as_me:17919: \$? = $ac_status" >&5
17920   (exit $ac_status); }; }; then
17921   ac_cv_lib_gen_compile=yes
17922 else
17923   echo "$as_me: failed program was:" >&5
17924 cat conftest.$ac_ext >&5
17925 ac_cv_lib_gen_compile=no
17926 fi
17927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17928 LIBS=$ac_check_lib_save_LIBS
17929 fi
17930 echo "$as_me:17930: result: $ac_cv_lib_gen_compile" >&5
17931 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17932 if test $ac_cv_lib_gen_compile = yes; then
17933
17934 cf_add_libs="-lgen"
17935 # Filter out duplicates - this happens with badly-designed ".pc" files...
17936 for cf_add_1lib in $LIBS
17937 do
17938         for cf_add_2lib in $cf_add_libs
17939         do
17940                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17941                 then
17942                         cf_add_1lib=
17943                         break
17944                 fi
17945         done
17946         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17947 done
17948 LIBS="$cf_add_libs"
17949
17950                                 cf_regex_func=compile
17951 fi
17952
17953 fi
17954
17955 fi
17956
17957 if test "$cf_regex_func" = no ; then
17958         { echo "$as_me:17958: WARNING: cannot find regular expression library" >&5
17959 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17960 fi
17961
17962 echo "$as_me:17962: checking for regular-expression headers" >&5
17963 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17964 if test "${cf_cv_regex_hdrs+set}" = set; then
17965   echo $ECHO_N "(cached) $ECHO_C" >&6
17966 else
17967
17968 cf_cv_regex_hdrs=no
17969 case $cf_regex_func in
17970 (compile)
17971         for cf_regex_hdr in regexp.h regexpr.h
17972         do
17973                 cat >conftest.$ac_ext <<_ACEOF
17974 #line 17974 "configure"
17975 #include "confdefs.h"
17976 #include <$cf_regex_hdr>
17977 int
17978 main (void)
17979 {
17980
17981                         char *p = compile("", "", "", 0);
17982                         int x = step("", "");
17983
17984   ;
17985   return 0;
17986 }
17987 _ACEOF
17988 rm -f conftest.$ac_objext conftest$ac_exeext
17989 if { (eval echo "$as_me:17989: \"$ac_link\"") >&5
17990   (eval $ac_link) 2>&5
17991   ac_status=$?
17992   echo "$as_me:17992: \$? = $ac_status" >&5
17993   (exit $ac_status); } &&
17994          { ac_try='test -s conftest$ac_exeext'
17995   { (eval echo "$as_me:17995: \"$ac_try\"") >&5
17996   (eval $ac_try) 2>&5
17997   ac_status=$?
17998   echo "$as_me:17998: \$? = $ac_status" >&5
17999   (exit $ac_status); }; }; then
18000
18001                         cf_cv_regex_hdrs=$cf_regex_hdr
18002                         break
18003
18004 else
18005   echo "$as_me: failed program was:" >&5
18006 cat conftest.$ac_ext >&5
18007 fi
18008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18009         done
18010         ;;
18011 (*)
18012         for cf_regex_hdr in regex.h
18013         do
18014                 cat >conftest.$ac_ext <<_ACEOF
18015 #line 18015 "configure"
18016 #include "confdefs.h"
18017 #include <sys/types.h>
18018 #include <$cf_regex_hdr>
18019 int
18020 main (void)
18021 {
18022
18023                         regex_t *p;
18024                         int x = regcomp(p, "", 0);
18025                         int y = regexec(p, "", 0, 0, 0);
18026                         regfree(p);
18027
18028   ;
18029   return 0;
18030 }
18031 _ACEOF
18032 rm -f conftest.$ac_objext conftest$ac_exeext
18033 if { (eval echo "$as_me:18033: \"$ac_link\"") >&5
18034   (eval $ac_link) 2>&5
18035   ac_status=$?
18036   echo "$as_me:18036: \$? = $ac_status" >&5
18037   (exit $ac_status); } &&
18038          { ac_try='test -s conftest$ac_exeext'
18039   { (eval echo "$as_me:18039: \"$ac_try\"") >&5
18040   (eval $ac_try) 2>&5
18041   ac_status=$?
18042   echo "$as_me:18042: \$? = $ac_status" >&5
18043   (exit $ac_status); }; }; then
18044
18045                         cf_cv_regex_hdrs=$cf_regex_hdr
18046                         break
18047
18048 else
18049   echo "$as_me: failed program was:" >&5
18050 cat conftest.$ac_ext >&5
18051 fi
18052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18053         done
18054         ;;
18055 esac
18056
18057 fi
18058 echo "$as_me:18058: result: $cf_cv_regex_hdrs" >&5
18059 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18060
18061 case $cf_cv_regex_hdrs in
18062         (no)            { echo "$as_me:18062: WARNING: no regular expression header found" >&5
18063 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18064         (regex.h)
18065 cat >>confdefs.h <<\EOF
18066 #define HAVE_REGEX_H_FUNCS 1
18067 EOF
18068  ;;
18069         (regexp.h)
18070 cat >>confdefs.h <<\EOF
18071 #define HAVE_REGEXP_H_FUNCS 1
18072 EOF
18073  ;;
18074         (regexpr.h)
18075 cat >>confdefs.h <<\EOF
18076 #define HAVE_REGEXPR_H_FUNCS 1
18077 EOF
18078  ;;
18079 esac
18080
18081 for ac_header in \
18082 fcntl.h \
18083 getopt.h \
18084 limits.h \
18085 locale.h \
18086 math.h \
18087 poll.h \
18088 sys/bsdtypes.h \
18089 sys/ioctl.h \
18090 sys/param.h \
18091 sys/poll.h \
18092 sys/select.h \
18093 sys/time.h \
18094 sys/times.h \
18095 ttyent.h \
18096 unistd.h \
18097 wctype.h \
18098
18099 do
18100 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18101 echo "$as_me:18101: checking for $ac_header" >&5
18102 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18104   echo $ECHO_N "(cached) $ECHO_C" >&6
18105 else
18106   cat >conftest.$ac_ext <<_ACEOF
18107 #line 18107 "configure"
18108 #include "confdefs.h"
18109 #include <$ac_header>
18110 _ACEOF
18111 if { (eval echo "$as_me:18111: \"$ac_cpp conftest.$ac_ext\"") >&5
18112   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18113   ac_status=$?
18114   egrep -v '^ *\+' conftest.er1 >conftest.err
18115   rm -f conftest.er1
18116   cat conftest.err >&5
18117   echo "$as_me:18117: \$? = $ac_status" >&5
18118   (exit $ac_status); } >/dev/null; then
18119   if test -s conftest.err; then
18120     ac_cpp_err=$ac_c_preproc_warn_flag
18121   else
18122     ac_cpp_err=
18123   fi
18124 else
18125   ac_cpp_err=yes
18126 fi
18127 if test -z "$ac_cpp_err"; then
18128   eval "$as_ac_Header=yes"
18129 else
18130   echo "$as_me: failed program was:" >&5
18131   cat conftest.$ac_ext >&5
18132   eval "$as_ac_Header=no"
18133 fi
18134 rm -f conftest.err conftest.$ac_ext
18135 fi
18136 echo "$as_me:18136: result: `eval echo '${'$as_ac_Header'}'`" >&5
18137 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18138 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18139   cat >>confdefs.h <<EOF
18140 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18141 EOF
18142
18143 fi
18144 done
18145
18146 for ac_header in unistd.h getopt.h
18147 do
18148 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18149 echo "$as_me:18149: checking for $ac_header" >&5
18150 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18151 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18152   echo $ECHO_N "(cached) $ECHO_C" >&6
18153 else
18154   cat >conftest.$ac_ext <<_ACEOF
18155 #line 18155 "configure"
18156 #include "confdefs.h"
18157 #include <$ac_header>
18158 _ACEOF
18159 if { (eval echo "$as_me:18159: \"$ac_cpp conftest.$ac_ext\"") >&5
18160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18161   ac_status=$?
18162   egrep -v '^ *\+' conftest.er1 >conftest.err
18163   rm -f conftest.er1
18164   cat conftest.err >&5
18165   echo "$as_me:18165: \$? = $ac_status" >&5
18166   (exit $ac_status); } >/dev/null; then
18167   if test -s conftest.err; then
18168     ac_cpp_err=$ac_c_preproc_warn_flag
18169   else
18170     ac_cpp_err=
18171   fi
18172 else
18173   ac_cpp_err=yes
18174 fi
18175 if test -z "$ac_cpp_err"; then
18176   eval "$as_ac_Header=yes"
18177 else
18178   echo "$as_me: failed program was:" >&5
18179   cat conftest.$ac_ext >&5
18180   eval "$as_ac_Header=no"
18181 fi
18182 rm -f conftest.err conftest.$ac_ext
18183 fi
18184 echo "$as_me:18184: result: `eval echo '${'$as_ac_Header'}'`" >&5
18185 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18186 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18187   cat >>confdefs.h <<EOF
18188 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18189 EOF
18190
18191 fi
18192 done
18193
18194 echo "$as_me:18194: checking for header declaring getopt variables" >&5
18195 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18196 if test "${cf_cv_getopt_header+set}" = set; then
18197   echo $ECHO_N "(cached) $ECHO_C" >&6
18198 else
18199
18200 cf_cv_getopt_header=none
18201 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18202 do
18203 cat >conftest.$ac_ext <<_ACEOF
18204 #line 18204 "configure"
18205 #include "confdefs.h"
18206
18207 #include <$cf_header>
18208 int
18209 main (void)
18210 {
18211 int x = optind; char *y = optarg
18212   ;
18213   return 0;
18214 }
18215 _ACEOF
18216 rm -f conftest.$ac_objext
18217 if { (eval echo "$as_me:18217: \"$ac_compile\"") >&5
18218   (eval $ac_compile) 2>&5
18219   ac_status=$?
18220   echo "$as_me:18220: \$? = $ac_status" >&5
18221   (exit $ac_status); } &&
18222          { ac_try='test -s conftest.$ac_objext'
18223   { (eval echo "$as_me:18223: \"$ac_try\"") >&5
18224   (eval $ac_try) 2>&5
18225   ac_status=$?
18226   echo "$as_me:18226: \$? = $ac_status" >&5
18227   (exit $ac_status); }; }; then
18228   cf_cv_getopt_header=$cf_header
18229  break
18230 else
18231   echo "$as_me: failed program was:" >&5
18232 cat conftest.$ac_ext >&5
18233 fi
18234 rm -f conftest.$ac_objext conftest.$ac_ext
18235 done
18236
18237 fi
18238 echo "$as_me:18238: result: $cf_cv_getopt_header" >&5
18239 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18240 if test $cf_cv_getopt_header != none ; then
18241
18242 cat >>confdefs.h <<\EOF
18243 #define HAVE_GETOPT_HEADER 1
18244 EOF
18245
18246 fi
18247 if test $cf_cv_getopt_header = getopt.h ; then
18248
18249 cat >>confdefs.h <<\EOF
18250 #define NEED_GETOPT_H 1
18251 EOF
18252
18253 fi
18254
18255 echo "$as_me:18255: checking if external environ is declared" >&5
18256 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18257 if test "${cf_cv_dcl_environ+set}" = set; then
18258   echo $ECHO_N "(cached) $ECHO_C" >&6
18259 else
18260
18261     cat >conftest.$ac_ext <<_ACEOF
18262 #line 18262 "configure"
18263 #include "confdefs.h"
18264
18265 #ifdef HAVE_STDLIB_H
18266 #include <stdlib.h>
18267 #endif
18268 #include <unistd.h>
18269 int
18270 main (void)
18271 {
18272 int x = (int) environ
18273   ;
18274   return 0;
18275 }
18276 _ACEOF
18277 rm -f conftest.$ac_objext
18278 if { (eval echo "$as_me:18278: \"$ac_compile\"") >&5
18279   (eval $ac_compile) 2>&5
18280   ac_status=$?
18281   echo "$as_me:18281: \$? = $ac_status" >&5
18282   (exit $ac_status); } &&
18283          { ac_try='test -s conftest.$ac_objext'
18284   { (eval echo "$as_me:18284: \"$ac_try\"") >&5
18285   (eval $ac_try) 2>&5
18286   ac_status=$?
18287   echo "$as_me:18287: \$? = $ac_status" >&5
18288   (exit $ac_status); }; }; then
18289   cf_cv_dcl_environ=yes
18290 else
18291   echo "$as_me: failed program was:" >&5
18292 cat conftest.$ac_ext >&5
18293 cf_cv_dcl_environ=no
18294 fi
18295 rm -f conftest.$ac_objext conftest.$ac_ext
18296
18297 fi
18298 echo "$as_me:18298: result: $cf_cv_dcl_environ" >&5
18299 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18300
18301 if test "$cf_cv_dcl_environ" = no ; then
18302
18303 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18304
18305     cat >>confdefs.h <<EOF
18306 #define $cf_result 1
18307 EOF
18308
18309 fi
18310
18311 # It's possible (for near-UNIX clones) that the data doesn't exist
18312
18313 echo "$as_me:18313: checking if external environ exists" >&5
18314 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18315 if test "${cf_cv_have_environ+set}" = set; then
18316   echo $ECHO_N "(cached) $ECHO_C" >&6
18317 else
18318
18319         cat >conftest.$ac_ext <<_ACEOF
18320 #line 18320 "configure"
18321 #include "confdefs.h"
18322
18323 #undef environ
18324 extern int environ;
18325
18326 int
18327 main (void)
18328 {
18329 environ = 2
18330   ;
18331   return 0;
18332 }
18333 _ACEOF
18334 rm -f conftest.$ac_objext conftest$ac_exeext
18335 if { (eval echo "$as_me:18335: \"$ac_link\"") >&5
18336   (eval $ac_link) 2>&5
18337   ac_status=$?
18338   echo "$as_me:18338: \$? = $ac_status" >&5
18339   (exit $ac_status); } &&
18340          { ac_try='test -s conftest$ac_exeext'
18341   { (eval echo "$as_me:18341: \"$ac_try\"") >&5
18342   (eval $ac_try) 2>&5
18343   ac_status=$?
18344   echo "$as_me:18344: \$? = $ac_status" >&5
18345   (exit $ac_status); }; }; then
18346   cf_cv_have_environ=yes
18347 else
18348   echo "$as_me: failed program was:" >&5
18349 cat conftest.$ac_ext >&5
18350 cf_cv_have_environ=no
18351 fi
18352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18353
18354 fi
18355 echo "$as_me:18355: result: $cf_cv_have_environ" >&5
18356 echo "${ECHO_T}$cf_cv_have_environ" >&6
18357
18358 if test "$cf_cv_have_environ" = yes ; then
18359
18360 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18361
18362         cat >>confdefs.h <<EOF
18363 #define $cf_result 1
18364 EOF
18365
18366 fi
18367
18368 echo "$as_me:18368: checking for getenv" >&5
18369 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18370 if test "${ac_cv_func_getenv+set}" = set; then
18371   echo $ECHO_N "(cached) $ECHO_C" >&6
18372 else
18373   cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18376 #define getenv autoconf_temporary
18377 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18378 #undef getenv
18379
18380 #ifdef __cplusplus
18381 extern "C"
18382 #endif
18383
18384 /* We use char because int might match the return type of a gcc2
18385    builtin and then its argument prototype would still apply.  */
18386 char getenv (void);
18387
18388 int
18389 main (void)
18390 {
18391
18392 /* The GNU C library defines stubs for functions which it implements
18393     to always fail with ENOSYS.  Some functions are actually named
18394     something starting with __ and the normal name is an alias.  */
18395 #if defined (__stub_getenv) || defined (__stub___getenv)
18396 #error found stub for getenv
18397 #endif
18398
18399         return getenv ();
18400   ;
18401   return 0;
18402 }
18403 _ACEOF
18404 rm -f conftest.$ac_objext conftest$ac_exeext
18405 if { (eval echo "$as_me:18405: \"$ac_link\"") >&5
18406   (eval $ac_link) 2>&5
18407   ac_status=$?
18408   echo "$as_me:18408: \$? = $ac_status" >&5
18409   (exit $ac_status); } &&
18410          { ac_try='test -s conftest$ac_exeext'
18411   { (eval echo "$as_me:18411: \"$ac_try\"") >&5
18412   (eval $ac_try) 2>&5
18413   ac_status=$?
18414   echo "$as_me:18414: \$? = $ac_status" >&5
18415   (exit $ac_status); }; }; then
18416   ac_cv_func_getenv=yes
18417 else
18418   echo "$as_me: failed program was:" >&5
18419 cat conftest.$ac_ext >&5
18420 ac_cv_func_getenv=no
18421 fi
18422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18423 fi
18424 echo "$as_me:18424: result: $ac_cv_func_getenv" >&5
18425 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18426
18427 for ac_func in putenv setenv strdup
18428 do
18429 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18430 echo "$as_me:18430: checking for $ac_func" >&5
18431 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18432 if eval "test \"\${$as_ac_var+set}\" = set"; then
18433   echo $ECHO_N "(cached) $ECHO_C" >&6
18434 else
18435   cat >conftest.$ac_ext <<_ACEOF
18436 #line 18436 "configure"
18437 #include "confdefs.h"
18438 #define $ac_func autoconf_temporary
18439 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18440 #undef $ac_func
18441
18442 #ifdef __cplusplus
18443 extern "C"
18444 #endif
18445
18446 /* We use char because int might match the return type of a gcc2
18447    builtin and then its argument prototype would still apply.  */
18448 char $ac_func (void);
18449
18450 int
18451 main (void)
18452 {
18453
18454 /* The GNU C library defines stubs for functions which it implements
18455     to always fail with ENOSYS.  Some functions are actually named
18456     something starting with __ and the normal name is an alias.  */
18457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18458 #error found stub for $ac_func
18459 #endif
18460
18461         return $ac_func ();
18462   ;
18463   return 0;
18464 }
18465 _ACEOF
18466 rm -f conftest.$ac_objext conftest$ac_exeext
18467 if { (eval echo "$as_me:18467: \"$ac_link\"") >&5
18468   (eval $ac_link) 2>&5
18469   ac_status=$?
18470   echo "$as_me:18470: \$? = $ac_status" >&5
18471   (exit $ac_status); } &&
18472          { ac_try='test -s conftest$ac_exeext'
18473   { (eval echo "$as_me:18473: \"$ac_try\"") >&5
18474   (eval $ac_try) 2>&5
18475   ac_status=$?
18476   echo "$as_me:18476: \$? = $ac_status" >&5
18477   (exit $ac_status); }; }; then
18478   eval "$as_ac_var=yes"
18479 else
18480   echo "$as_me: failed program was:" >&5
18481 cat conftest.$ac_ext >&5
18482 eval "$as_ac_var=no"
18483 fi
18484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18485 fi
18486 echo "$as_me:18486: result: `eval echo '${'$as_ac_var'}'`" >&5
18487 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18488 if test `eval echo '${'$as_ac_var'}'` = yes; then
18489   cat >>confdefs.h <<EOF
18490 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18491 EOF
18492
18493 fi
18494 done
18495
18496 echo "$as_me:18496: checking if getenv returns consistent values" >&5
18497 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18498 if test "${cf_cv_consistent_getenv+set}" = set; then
18499   echo $ECHO_N "(cached) $ECHO_C" >&6
18500 else
18501
18502 if test "$cross_compiling" = yes; then
18503   cf_cv_consistent_getenv=unknown
18504 else
18505   cat >conftest.$ac_ext <<_ACEOF
18506 #line 18506 "configure"
18507 #include "confdefs.h"
18508
18509 #include <stdlib.h>
18510 #include <unistd.h>
18511 #include <stdio.h>
18512 #include <string.h>
18513 #include <sys/types.h>
18514
18515 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18516 extern char **environ;  /* POSIX, but some systems are not... */
18517 #endif
18518
18519 #if defined(HAVE_STRDUP)
18520 #define str_alloc(s) strdup(s)
18521 #else
18522 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18523 #endif
18524
18525 static void set_value(const char *name, const char *value)
18526 {
18527 #if defined(HAVE_SETENV)
18528         setenv(name, value, 1);
18529 #elif defined(HAVE_PUTENV)
18530         char buffer[1024];
18531         sprintf(buffer, "%s=%s", name, value);
18532         putenv(str_alloc(buffer));
18533 #else
18534 #error neither putenv/setenv found
18535 #endif
18536 }
18537 int main(void)
18538 {
18539         int pass;
18540         size_t numenv, limit, j;
18541         char **mynames;
18542         char **myvalues;
18543         char **mypointer;
18544         char *equals;
18545         for (numenv = 0; environ[numenv]; ++numenv) ;
18546         limit = numenv + 10;
18547         mynames = (char **) calloc(limit + 1, sizeof(char *));
18548         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18549         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18550 #if defined(HAVE_ENVIRON)
18551         for (j = 0; environ[j]; ++j) {
18552                 mynames[j] = str_alloc(environ[j]);
18553                 equals = strchr(mynames[j], '=');
18554                 if (equals != 0) {
18555                         *equals++ = '\0';
18556                         myvalues[j] = str_alloc(equals);
18557                 } else {
18558                         myvalues[j] = str_alloc("");
18559                 }
18560         }
18561 #endif
18562         for (j = numenv; j < limit; ++j) {
18563                 char name[80];
18564                 char value[80];
18565                 size_t found;
18566                 size_t k = 0;
18567                 do {
18568                         size_t jk;
18569                         found = 0;
18570                         sprintf(name, "TERM%lu", (unsigned long) k);
18571                         for (jk = 0; jk < j; ++jk) {
18572                                 if (!strcmp(name, mynames[jk])) {
18573                                         found = 1;
18574                                         ++k;
18575                                         break;
18576                                 }
18577                         }
18578                 } while (found);
18579                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18580                 set_value(name, value);
18581                 mynames[j] = str_alloc(name);
18582                 myvalues[j] = str_alloc(value);
18583         }
18584         for (pass = 0; pass < 3; ++pass) {
18585                 for (j = 0; j < limit; ++j) {
18586                         char *value = getenv(mynames[j]);
18587                         if (pass) {
18588                                 if (value == 0) {
18589                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18590                                         ${cf_cv_main_return:-return}(1);
18591                                 } else if (value != mypointer[j]) {
18592                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18593                                         ${cf_cv_main_return:-return}(1);
18594                                 } else if (strcmp(value, myvalues[j])) {
18595                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18596                                         ${cf_cv_main_return:-return}(1);
18597                                 }
18598                         } else {
18599                                 size_t k;
18600                                 mypointer[j] = value;
18601                                 for (k = 0; k < j; ++k) {
18602                                         if (mypointer[j] == mypointer[k]) {
18603                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18604                                                 ${cf_cv_main_return:-return}(1);
18605                                         }
18606                                 }
18607                         }
18608                 }
18609         }
18610         ${cf_cv_main_return:-return}(0);
18611 }
18612
18613 _ACEOF
18614 rm -f conftest$ac_exeext
18615 if { (eval echo "$as_me:18615: \"$ac_link\"") >&5
18616   (eval $ac_link) 2>&5
18617   ac_status=$?
18618   echo "$as_me:18618: \$? = $ac_status" >&5
18619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18620   { (eval echo "$as_me:18620: \"$ac_try\"") >&5
18621   (eval $ac_try) 2>&5
18622   ac_status=$?
18623   echo "$as_me:18623: \$? = $ac_status" >&5
18624   (exit $ac_status); }; }; then
18625   cf_cv_consistent_getenv=yes
18626 else
18627   echo "$as_me: program exited with status $ac_status" >&5
18628 echo "$as_me: failed program was:" >&5
18629 cat conftest.$ac_ext >&5
18630 cf_cv_consistent_getenv=no
18631 fi
18632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18633 fi
18634
18635 fi
18636 echo "$as_me:18636: result: $cf_cv_consistent_getenv" >&5
18637 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18638
18639 if test "x$cf_cv_consistent_getenv" = xno
18640 then
18641
18642 cat >>confdefs.h <<\EOF
18643 #define HAVE_CONSISTENT_GETENV 1
18644 EOF
18645
18646 fi
18647
18648 if test "x$cf_cv_consistent_getenv" = xno && \
18649         test "x$cf_with_trace" = xyes
18650 then
18651         { echo "$as_me:18651: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18652 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18653 fi
18654
18655 # check for ISC (this may also define _POSIX_SOURCE)
18656 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18657 if test "x$ISC" = xyes ; then
18658
18659 echo "$as_me:18659: checking for main in -lcposix" >&5
18660 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18661 if test "${ac_cv_lib_cposix_main+set}" = set; then
18662   echo $ECHO_N "(cached) $ECHO_C" >&6
18663 else
18664   ac_check_lib_save_LIBS=$LIBS
18665 LIBS="-lcposix  $LIBS"
18666 cat >conftest.$ac_ext <<_ACEOF
18667 #line 18667 "configure"
18668 #include "confdefs.h"
18669
18670 int
18671 main (void)
18672 {
18673 main ();
18674   ;
18675   return 0;
18676 }
18677 _ACEOF
18678 rm -f conftest.$ac_objext conftest$ac_exeext
18679 if { (eval echo "$as_me:18679: \"$ac_link\"") >&5
18680   (eval $ac_link) 2>&5
18681   ac_status=$?
18682   echo "$as_me:18682: \$? = $ac_status" >&5
18683   (exit $ac_status); } &&
18684          { ac_try='test -s conftest$ac_exeext'
18685   { (eval echo "$as_me:18685: \"$ac_try\"") >&5
18686   (eval $ac_try) 2>&5
18687   ac_status=$?
18688   echo "$as_me:18688: \$? = $ac_status" >&5
18689   (exit $ac_status); }; }; then
18690   ac_cv_lib_cposix_main=yes
18691 else
18692   echo "$as_me: failed program was:" >&5
18693 cat conftest.$ac_ext >&5
18694 ac_cv_lib_cposix_main=no
18695 fi
18696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18697 LIBS=$ac_check_lib_save_LIBS
18698 fi
18699 echo "$as_me:18699: result: $ac_cv_lib_cposix_main" >&5
18700 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18701 if test $ac_cv_lib_cposix_main = yes; then
18702   cat >>confdefs.h <<EOF
18703 #define HAVE_LIBCPOSIX 1
18704 EOF
18705
18706   LIBS="-lcposix $LIBS"
18707
18708 fi
18709
18710         echo "$as_me:18710: checking for bzero in -linet" >&5
18711 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18712 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18713   echo $ECHO_N "(cached) $ECHO_C" >&6
18714 else
18715   ac_check_lib_save_LIBS=$LIBS
18716 LIBS="-linet  $LIBS"
18717 cat >conftest.$ac_ext <<_ACEOF
18718 #line 18718 "configure"
18719 #include "confdefs.h"
18720
18721 /* Override any gcc2 internal prototype to avoid an error.  */
18722 #ifdef __cplusplus
18723 extern "C"
18724 #endif
18725 /* We use char because int might match the return type of a gcc2
18726    builtin and then its argument prototype would still apply.  */
18727 char bzero ();
18728 int
18729 main (void)
18730 {
18731 bzero ();
18732   ;
18733   return 0;
18734 }
18735 _ACEOF
18736 rm -f conftest.$ac_objext conftest$ac_exeext
18737 if { (eval echo "$as_me:18737: \"$ac_link\"") >&5
18738   (eval $ac_link) 2>&5
18739   ac_status=$?
18740   echo "$as_me:18740: \$? = $ac_status" >&5
18741   (exit $ac_status); } &&
18742          { ac_try='test -s conftest$ac_exeext'
18743   { (eval echo "$as_me:18743: \"$ac_try\"") >&5
18744   (eval $ac_try) 2>&5
18745   ac_status=$?
18746   echo "$as_me:18746: \$? = $ac_status" >&5
18747   (exit $ac_status); }; }; then
18748   ac_cv_lib_inet_bzero=yes
18749 else
18750   echo "$as_me: failed program was:" >&5
18751 cat conftest.$ac_ext >&5
18752 ac_cv_lib_inet_bzero=no
18753 fi
18754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18755 LIBS=$ac_check_lib_save_LIBS
18756 fi
18757 echo "$as_me:18757: result: $ac_cv_lib_inet_bzero" >&5
18758 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18759 if test $ac_cv_lib_inet_bzero = yes; then
18760
18761 cf_add_libs="-linet"
18762 # Filter out duplicates - this happens with badly-designed ".pc" files...
18763 for cf_add_1lib in $LIBS
18764 do
18765         for cf_add_2lib in $cf_add_libs
18766         do
18767                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18768                 then
18769                         cf_add_1lib=
18770                         break
18771                 fi
18772         done
18773         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18774 done
18775 LIBS="$cf_add_libs"
18776
18777 fi
18778 fi
18779
18780 echo "$as_me:18780: checking if sys/time.h works with sys/select.h" >&5
18781 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18782 if test "${cf_cv_sys_time_select+set}" = set; then
18783   echo $ECHO_N "(cached) $ECHO_C" >&6
18784 else
18785
18786 cat >conftest.$ac_ext <<_ACEOF
18787 #line 18787 "configure"
18788 #include "confdefs.h"
18789
18790 #include <sys/types.h>
18791 #ifdef HAVE_SYS_TIME_H
18792 #include <sys/time.h>
18793 #endif
18794 #ifdef HAVE_SYS_SELECT_H
18795 #include <sys/select.h>
18796 #endif
18797
18798 int
18799 main (void)
18800 {
18801
18802   ;
18803   return 0;
18804 }
18805 _ACEOF
18806 rm -f conftest.$ac_objext
18807 if { (eval echo "$as_me:18807: \"$ac_compile\"") >&5
18808   (eval $ac_compile) 2>&5
18809   ac_status=$?
18810   echo "$as_me:18810: \$? = $ac_status" >&5
18811   (exit $ac_status); } &&
18812          { ac_try='test -s conftest.$ac_objext'
18813   { (eval echo "$as_me:18813: \"$ac_try\"") >&5
18814   (eval $ac_try) 2>&5
18815   ac_status=$?
18816   echo "$as_me:18816: \$? = $ac_status" >&5
18817   (exit $ac_status); }; }; then
18818   cf_cv_sys_time_select=yes
18819 else
18820   echo "$as_me: failed program was:" >&5
18821 cat conftest.$ac_ext >&5
18822 cf_cv_sys_time_select=no
18823 fi
18824 rm -f conftest.$ac_objext conftest.$ac_ext
18825
18826 fi
18827
18828 echo "$as_me:18828: result: $cf_cv_sys_time_select" >&5
18829 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18830 test "$cf_cv_sys_time_select" = yes &&
18831 cat >>confdefs.h <<\EOF
18832 #define HAVE_SYS_TIME_SELECT 1
18833 EOF
18834
18835 ###     checks for compiler characteristics
18836 ac_ext=c
18837 ac_cpp='$CPP $CPPFLAGS'
18838 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18839 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18840 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18841 ac_main_return=return
18842
18843 echo "$as_me:18843: checking for an ANSI C-conforming const" >&5
18844 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18845 if test "${ac_cv_c_const+set}" = set; then
18846   echo $ECHO_N "(cached) $ECHO_C" >&6
18847 else
18848   cat >conftest.$ac_ext <<_ACEOF
18849 #line 18849 "configure"
18850 #include "confdefs.h"
18851
18852 int
18853 main (void)
18854 {
18855 /* FIXME: Include the comments suggested by Paul. */
18856 #ifndef __cplusplus
18857   /* Ultrix mips cc rejects this.  */
18858   typedef int charset[2];
18859   const charset x;
18860   /* SunOS 4.1.1 cc rejects this.  */
18861   char const *const *ccp;
18862   char **p;
18863   /* NEC SVR4.0.2 mips cc rejects this.  */
18864   struct point {int x, y;};
18865   static struct point const zero = {0,0};
18866   /* AIX XL C 1.02.0.0 rejects this.
18867      It does not let you subtract one const X* pointer from another in
18868      an arm of an if-expression whose if-part is not a constant
18869      expression */
18870   const char *g = "string";
18871   ccp = &g + (g ? g-g : 0);
18872   /* HPUX 7.0 cc rejects these. */
18873   ++ccp;
18874   p = (char**) ccp;
18875   ccp = (char const *const *) p;
18876   { /* SCO 3.2v4 cc rejects this.  */
18877     char *t;
18878     char const *s = 0 ? (char *) 0 : (char const *) 0;
18879
18880     *t++ = 0;
18881   }
18882   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18883     int x[] = {25, 17};
18884     const int *foo = &x[0];
18885     ++foo;
18886   }
18887   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18888     typedef const int *iptr;
18889     iptr p = 0;
18890     ++p;
18891   }
18892   { /* AIX XL C 1.02.0.0 rejects this saying
18893        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18894     struct s { int j; const int *ap[3]; };
18895     struct s *b; b->j = 5;
18896   }
18897   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18898     const int foo = 10;
18899   }
18900 #endif
18901
18902   ;
18903   return 0;
18904 }
18905 _ACEOF
18906 rm -f conftest.$ac_objext
18907 if { (eval echo "$as_me:18907: \"$ac_compile\"") >&5
18908   (eval $ac_compile) 2>&5
18909   ac_status=$?
18910   echo "$as_me:18910: \$? = $ac_status" >&5
18911   (exit $ac_status); } &&
18912          { ac_try='test -s conftest.$ac_objext'
18913   { (eval echo "$as_me:18913: \"$ac_try\"") >&5
18914   (eval $ac_try) 2>&5
18915   ac_status=$?
18916   echo "$as_me:18916: \$? = $ac_status" >&5
18917   (exit $ac_status); }; }; then
18918   ac_cv_c_const=yes
18919 else
18920   echo "$as_me: failed program was:" >&5
18921 cat conftest.$ac_ext >&5
18922 ac_cv_c_const=no
18923 fi
18924 rm -f conftest.$ac_objext conftest.$ac_ext
18925 fi
18926 echo "$as_me:18926: result: $ac_cv_c_const" >&5
18927 echo "${ECHO_T}$ac_cv_c_const" >&6
18928 if test $ac_cv_c_const = no; then
18929
18930 cat >>confdefs.h <<\EOF
18931 #define const
18932 EOF
18933
18934 fi
18935
18936 echo "$as_me:18936: checking for inline" >&5
18937 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18938 if test "${ac_cv_c_inline+set}" = set; then
18939   echo $ECHO_N "(cached) $ECHO_C" >&6
18940 else
18941   ac_cv_c_inline=no
18942 for ac_kw in inline __inline__ __inline; do
18943   cat >conftest.$ac_ext <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946 #ifndef __cplusplus
18947 static $ac_kw int static_foo () {return 0; }
18948 $ac_kw int foo () {return 0; }
18949 #endif
18950
18951 _ACEOF
18952 rm -f conftest.$ac_objext
18953 if { (eval echo "$as_me:18953: \"$ac_compile\"") >&5
18954   (eval $ac_compile) 2>&5
18955   ac_status=$?
18956   echo "$as_me:18956: \$? = $ac_status" >&5
18957   (exit $ac_status); } &&
18958          { ac_try='test -s conftest.$ac_objext'
18959   { (eval echo "$as_me:18959: \"$ac_try\"") >&5
18960   (eval $ac_try) 2>&5
18961   ac_status=$?
18962   echo "$as_me:18962: \$? = $ac_status" >&5
18963   (exit $ac_status); }; }; then
18964   ac_cv_c_inline=$ac_kw; break
18965 else
18966   echo "$as_me: failed program was:" >&5
18967 cat conftest.$ac_ext >&5
18968 fi
18969 rm -f conftest.$ac_objext conftest.$ac_ext
18970 done
18971
18972 fi
18973 echo "$as_me:18973: result: $ac_cv_c_inline" >&5
18974 echo "${ECHO_T}$ac_cv_c_inline" >&6
18975 case $ac_cv_c_inline in
18976   inline | yes) ;;
18977   no)
18978 cat >>confdefs.h <<\EOF
18979 #define inline
18980 EOF
18981  ;;
18982   *)  cat >>confdefs.h <<EOF
18983 #define inline $ac_cv_c_inline
18984 EOF
18985  ;;
18986 esac
18987
18988 NCURSES_INLINE=
18989 if test "$ac_cv_c_inline" != no ; then
18990         NCURSES_INLINE=inline
18991         if test "$INTEL_COMPILER" = yes
18992         then
18993                 :
18994         elif test "$CLANG_COMPILER" = yes
18995         then
18996                 :
18997         elif test "$GCC" = yes
18998         then
18999                 echo "$as_me:18999: checking if $CC supports options to tune inlining" >&5
19000 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19001 if test "${cf_cv_gcc_inline+set}" = set; then
19002   echo $ECHO_N "(cached) $ECHO_C" >&6
19003 else
19004
19005                 cf_save_CFLAGS=$CFLAGS
19006                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19007                 cat >conftest.$ac_ext <<_ACEOF
19008 #line 19008 "configure"
19009 #include "confdefs.h"
19010 inline int foo(void) { return 1; }
19011 int
19012 main (void)
19013 {
19014 ${cf_cv_main_return:-return} foo()
19015   ;
19016   return 0;
19017 }
19018 _ACEOF
19019 rm -f conftest.$ac_objext
19020 if { (eval echo "$as_me:19020: \"$ac_compile\"") >&5
19021   (eval $ac_compile) 2>&5
19022   ac_status=$?
19023   echo "$as_me:19023: \$? = $ac_status" >&5
19024   (exit $ac_status); } &&
19025          { ac_try='test -s conftest.$ac_objext'
19026   { (eval echo "$as_me:19026: \"$ac_try\"") >&5
19027   (eval $ac_try) 2>&5
19028   ac_status=$?
19029   echo "$as_me:19029: \$? = $ac_status" >&5
19030   (exit $ac_status); }; }; then
19031   cf_cv_gcc_inline=yes
19032 else
19033   echo "$as_me: failed program was:" >&5
19034 cat conftest.$ac_ext >&5
19035 cf_cv_gcc_inline=no
19036 fi
19037 rm -f conftest.$ac_objext conftest.$ac_ext
19038                 CFLAGS=$cf_save_CFLAGS
19039
19040 fi
19041 echo "$as_me:19041: result: $cf_cv_gcc_inline" >&5
19042 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19043                 if test "$cf_cv_gcc_inline" = yes ; then
19044
19045 cf_fix_cppflags=no
19046 cf_new_cflags=
19047 cf_new_cppflags=
19048 cf_new_extra_cppflags=
19049
19050 for cf_add_cflags in --param max-inline-insns-single=1200
19051 do
19052 case $cf_fix_cppflags in
19053 (no)
19054         case $cf_add_cflags in
19055         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19056                 case $cf_add_cflags in
19057                 (-D*)
19058                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19059
19060                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19061                                 && test -z "${cf_tst_cflags}" \
19062                                 && cf_fix_cppflags=yes
19063
19064                         if test $cf_fix_cppflags = yes ; then
19065
19066         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19067         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19068
19069                                 continue
19070                         elif test "${cf_tst_cflags}" = "\"'" ; then
19071
19072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19074
19075                                 continue
19076                         fi
19077                         ;;
19078                 esac
19079                 case "$CPPFLAGS" in
19080                 (*$cf_add_cflags)
19081                         ;;
19082                 (*)
19083                         case $cf_add_cflags in
19084                         (-D*)
19085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19086
19087 CPPFLAGS=`echo "$CPPFLAGS" | \
19088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19090
19091                                 ;;
19092                         esac
19093
19094         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19095         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19096
19097                         ;;
19098                 esac
19099                 ;;
19100         (*)
19101
19102         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19103         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19104
19105                 ;;
19106         esac
19107         ;;
19108 (yes)
19109
19110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19112
19113         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19114
19115         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19116                 && test -z "${cf_tst_cflags}" \
19117                 && cf_fix_cppflags=no
19118         ;;
19119 esac
19120 done
19121
19122 if test -n "$cf_new_cflags" ; then
19123
19124         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19125         CFLAGS="${CFLAGS}$cf_new_cflags"
19126
19127 fi
19128
19129 if test -n "$cf_new_cppflags" ; then
19130
19131         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19132         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19133
19134 fi
19135
19136 if test -n "$cf_new_extra_cppflags" ; then
19137
19138         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19139         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19140
19141 fi
19142
19143                 fi
19144         fi
19145 fi
19146
19147 echo "$as_me:19147: checking for signal global datatype" >&5
19148 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19149 if test "${cf_cv_sig_atomic_t+set}" = set; then
19150   echo $ECHO_N "(cached) $ECHO_C" >&6
19151 else
19152
19153         for cf_type in \
19154                 "volatile sig_atomic_t" \
19155                 "sig_atomic_t" \
19156                 "int"
19157         do
19158         cat >conftest.$ac_ext <<_ACEOF
19159 #line 19159 "configure"
19160 #include "confdefs.h"
19161
19162 #include <sys/types.h>
19163 #include <signal.h>
19164 #include <stdio.h>
19165
19166 extern $cf_type x;
19167 $cf_type x;
19168 static void handler(int sig)
19169 {
19170         x = 5;
19171 }
19172 int
19173 main (void)
19174 {
19175 signal(SIGINT, handler);
19176                  x = 1
19177   ;
19178   return 0;
19179 }
19180 _ACEOF
19181 rm -f conftest.$ac_objext
19182 if { (eval echo "$as_me:19182: \"$ac_compile\"") >&5
19183   (eval $ac_compile) 2>&5
19184   ac_status=$?
19185   echo "$as_me:19185: \$? = $ac_status" >&5
19186   (exit $ac_status); } &&
19187          { ac_try='test -s conftest.$ac_objext'
19188   { (eval echo "$as_me:19188: \"$ac_try\"") >&5
19189   (eval $ac_try) 2>&5
19190   ac_status=$?
19191   echo "$as_me:19191: \$? = $ac_status" >&5
19192   (exit $ac_status); }; }; then
19193   cf_cv_sig_atomic_t=$cf_type
19194 else
19195   echo "$as_me: failed program was:" >&5
19196 cat conftest.$ac_ext >&5
19197 cf_cv_sig_atomic_t=no
19198 fi
19199 rm -f conftest.$ac_objext conftest.$ac_ext
19200                 test "$cf_cv_sig_atomic_t" != no && break
19201         done
19202
19203 fi
19204
19205 echo "$as_me:19205: result: $cf_cv_sig_atomic_t" >&5
19206 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19207 test "$cf_cv_sig_atomic_t" != no &&
19208 cat >>confdefs.h <<EOF
19209 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19210 EOF
19211
19212 if test $NCURSES_CHTYPE = auto ; then
19213
19214 echo "$as_me:19214: checking for type of chtype" >&5
19215 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19216 if test "${cf_cv_typeof_chtype+set}" = set; then
19217   echo $ECHO_N "(cached) $ECHO_C" >&6
19218 else
19219
19220                 if test "$cross_compiling" = yes; then
19221   cf_cv_typeof_chtype=long
19222 else
19223   cat >conftest.$ac_ext <<_ACEOF
19224 #line 19224 "configure"
19225 #include "confdefs.h"
19226
19227 #define WANT_BITS 31
19228 #include <stdio.h>
19229 int main(void)
19230 {
19231         FILE *fp = fopen("cf_test.out", "w");
19232         if (fp != 0) {
19233                 char *result = "long";
19234                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19235                         int n;
19236                         unsigned int x, y;
19237                         for (n = 0; n < WANT_BITS; n++) {
19238                                 x = (1 << n);
19239                                 y = (x >> n);
19240                                 if (y != 1 || x == 0) {
19241                                         x = 0;
19242                                         break;
19243                                 }
19244                         }
19245                         /*
19246                          * If x is nonzero, an int is big enough for the bits
19247                          * that we want.
19248                          */
19249                         result = (x != 0) ? "int" : "long";
19250                 }
19251                 fputs(result, fp);
19252                 fclose(fp);
19253         }
19254         ${cf_cv_main_return:-return}(0);
19255 }
19256
19257 _ACEOF
19258 rm -f conftest$ac_exeext
19259 if { (eval echo "$as_me:19259: \"$ac_link\"") >&5
19260   (eval $ac_link) 2>&5
19261   ac_status=$?
19262   echo "$as_me:19262: \$? = $ac_status" >&5
19263   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19264   { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit $ac_status); }; }; then
19269   cf_cv_typeof_chtype=`cat cf_test.out`
19270 else
19271   echo "$as_me: program exited with status $ac_status" >&5
19272 echo "$as_me: failed program was:" >&5
19273 cat conftest.$ac_ext >&5
19274 cf_cv_typeof_chtype=long
19275 fi
19276 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19277 fi
19278                 rm -f cf_test.out
19279
19280 fi
19281
19282 echo "$as_me:19282: result: $cf_cv_typeof_chtype" >&5
19283 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19284
19285 cat >>confdefs.h <<EOF
19286 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19287 EOF
19288
19289 else
19290         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19291 fi
19292 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19293
19294 echo "$as_me:19294: checking if unsigned literals are legal" >&5
19295 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19296 if test "${cf_cv_unsigned_literals+set}" = set; then
19297   echo $ECHO_N "(cached) $ECHO_C" >&6
19298 else
19299
19300         cat >conftest.$ac_ext <<_ACEOF
19301 #line 19301 "configure"
19302 #include "confdefs.h"
19303
19304 int
19305 main (void)
19306 {
19307 long x = 1L + 1UL + 1U + 1
19308   ;
19309   return 0;
19310 }
19311 _ACEOF
19312 rm -f conftest.$ac_objext
19313 if { (eval echo "$as_me:19313: \"$ac_compile\"") >&5
19314   (eval $ac_compile) 2>&5
19315   ac_status=$?
19316   echo "$as_me:19316: \$? = $ac_status" >&5
19317   (exit $ac_status); } &&
19318          { ac_try='test -s conftest.$ac_objext'
19319   { (eval echo "$as_me:19319: \"$ac_try\"") >&5
19320   (eval $ac_try) 2>&5
19321   ac_status=$?
19322   echo "$as_me:19322: \$? = $ac_status" >&5
19323   (exit $ac_status); }; }; then
19324   cf_cv_unsigned_literals=yes
19325 else
19326   echo "$as_me: failed program was:" >&5
19327 cat conftest.$ac_ext >&5
19328 cf_cv_unsigned_literals=no
19329 fi
19330 rm -f conftest.$ac_objext conftest.$ac_ext
19331
19332 fi
19333
19334 echo "$as_me:19334: result: $cf_cv_unsigned_literals" >&5
19335 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19336
19337 cf_cv_1UL="1"
19338 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19339 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19340
19341 if test $NCURSES_MMASK_T = auto ; then
19342         cf_cv_typeof_mmask_t=long
19343 else
19344         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19345 fi
19346 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19347
19348 ###     Checks for external-data
19349
19350 echo "$as_me:19350: checking if external errno is declared" >&5
19351 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19352 if test "${cf_cv_dcl_errno+set}" = set; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 else
19355
19356         cat >conftest.$ac_ext <<_ACEOF
19357 #line 19357 "configure"
19358 #include "confdefs.h"
19359
19360 #ifdef HAVE_STDLIB_H
19361 #include <stdlib.h>
19362 #endif
19363 #include <stdio.h>
19364 #include <sys/types.h>
19365 #include <errno.h>
19366 int
19367 main (void)
19368 {
19369 int x = (int) errno
19370   ;
19371   return 0;
19372 }
19373 _ACEOF
19374 rm -f conftest.$ac_objext
19375 if { (eval echo "$as_me:19375: \"$ac_compile\"") >&5
19376   (eval $ac_compile) 2>&5
19377   ac_status=$?
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit $ac_status); } &&
19380          { ac_try='test -s conftest.$ac_objext'
19381   { (eval echo "$as_me:19381: \"$ac_try\"") >&5
19382   (eval $ac_try) 2>&5
19383   ac_status=$?
19384   echo "$as_me:19384: \$? = $ac_status" >&5
19385   (exit $ac_status); }; }; then
19386   cf_cv_dcl_errno=yes
19387 else
19388   echo "$as_me: failed program was:" >&5
19389 cat conftest.$ac_ext >&5
19390 cf_cv_dcl_errno=no
19391 fi
19392 rm -f conftest.$ac_objext conftest.$ac_ext
19393
19394 fi
19395 echo "$as_me:19395: result: $cf_cv_dcl_errno" >&5
19396 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19397
19398 if test "$cf_cv_dcl_errno" = no ; then
19399
19400 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19401
19402         cat >>confdefs.h <<EOF
19403 #define $cf_result 1
19404 EOF
19405
19406 fi
19407
19408 # It's possible (for near-UNIX clones) that the data doesn't exist
19409
19410 echo "$as_me:19410: checking if external errno exists" >&5
19411 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19412 if test "${cf_cv_have_errno+set}" = set; then
19413   echo $ECHO_N "(cached) $ECHO_C" >&6
19414 else
19415
19416         cat >conftest.$ac_ext <<_ACEOF
19417 #line 19417 "configure"
19418 #include "confdefs.h"
19419
19420 #undef errno
19421 extern int errno;
19422
19423 int
19424 main (void)
19425 {
19426 errno = 2
19427   ;
19428   return 0;
19429 }
19430 _ACEOF
19431 rm -f conftest.$ac_objext conftest$ac_exeext
19432 if { (eval echo "$as_me:19432: \"$ac_link\"") >&5
19433   (eval $ac_link) 2>&5
19434   ac_status=$?
19435   echo "$as_me:19435: \$? = $ac_status" >&5
19436   (exit $ac_status); } &&
19437          { ac_try='test -s conftest$ac_exeext'
19438   { (eval echo "$as_me:19438: \"$ac_try\"") >&5
19439   (eval $ac_try) 2>&5
19440   ac_status=$?
19441   echo "$as_me:19441: \$? = $ac_status" >&5
19442   (exit $ac_status); }; }; then
19443   cf_cv_have_errno=yes
19444 else
19445   echo "$as_me: failed program was:" >&5
19446 cat conftest.$ac_ext >&5
19447 cf_cv_have_errno=no
19448 fi
19449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19450
19451 fi
19452 echo "$as_me:19452: result: $cf_cv_have_errno" >&5
19453 echo "${ECHO_T}$cf_cv_have_errno" >&6
19454
19455 if test "$cf_cv_have_errno" = yes ; then
19456
19457 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19458
19459         cat >>confdefs.h <<EOF
19460 #define $cf_result 1
19461 EOF
19462
19463 fi
19464
19465 echo "$as_me:19465: checking if data-only library module links" >&5
19466 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19467 if test "${cf_cv_link_dataonly+set}" = set; then
19468   echo $ECHO_N "(cached) $ECHO_C" >&6
19469 else
19470
19471         rm -f conftest.a
19472         cat >conftest.$ac_ext <<EOF
19473 #line 19473 "configure"
19474 int     testdata[3] = { 123, 456, 789 };
19475 EOF
19476         if { (eval echo "$as_me:19476: \"$ac_compile\"") >&5
19477   (eval $ac_compile) 2>&5
19478   ac_status=$?
19479   echo "$as_me:19479: \$? = $ac_status" >&5
19480   (exit $ac_status); } ; then
19481                 mv conftest.o data.o && \
19482                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19483         fi
19484         rm -f conftest.$ac_ext data.o
19485         cat >conftest.$ac_ext <<EOF
19486 #line 19486 "configure"
19487 int     testfunc(void)
19488 {
19489 #if defined(NeXT)
19490         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19491 #else
19492         extern int testdata[3];
19493         return testdata[0] == 123
19494            &&  testdata[1] == 456
19495            &&  testdata[2] == 789;
19496 #endif
19497 }
19498 EOF
19499         if { (eval echo "$as_me:19499: \"$ac_compile\"") >&5
19500   (eval $ac_compile) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit $ac_status); }; then
19504                 mv conftest.o func.o && \
19505                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19506         fi
19507         rm -f conftest.$ac_ext func.o
19508         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19509         cf_saveLIBS="$LIBS"
19510         LIBS="conftest.a $LIBS"
19511         if test "$cross_compiling" = yes; then
19512   cf_cv_link_dataonly=unknown
19513 else
19514   cat >conftest.$ac_ext <<_ACEOF
19515 #line 19515 "configure"
19516 #include "confdefs.h"
19517
19518         int main(void)
19519         {
19520                 extern int testfunc();
19521                 ${cf_cv_main_return:-return} (!testfunc());
19522         }
19523
19524 _ACEOF
19525 rm -f conftest$ac_exeext
19526 if { (eval echo "$as_me:19526: \"$ac_link\"") >&5
19527   (eval $ac_link) 2>&5
19528   ac_status=$?
19529   echo "$as_me:19529: \$? = $ac_status" >&5
19530   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19531   { (eval echo "$as_me:19531: \"$ac_try\"") >&5
19532   (eval $ac_try) 2>&5
19533   ac_status=$?
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); }; }; then
19536   cf_cv_link_dataonly=yes
19537 else
19538   echo "$as_me: program exited with status $ac_status" >&5
19539 echo "$as_me: failed program was:" >&5
19540 cat conftest.$ac_ext >&5
19541 cf_cv_link_dataonly=no
19542 fi
19543 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19544 fi
19545         LIBS="$cf_saveLIBS"
19546
19547 fi
19548
19549 echo "$as_me:19549: result: $cf_cv_link_dataonly" >&5
19550 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19551
19552 if test "$cf_cv_link_dataonly" = no ; then
19553
19554 cat >>confdefs.h <<\EOF
19555 #define BROKEN_LINKER 1
19556 EOF
19557
19558         BROKEN_LINKER=1
19559 fi
19560
19561 ###     Checks for library functions.
19562
19563 for ac_func in \
19564 getcwd \
19565 getegid \
19566 geteuid \
19567 getopt \
19568 getttynam \
19569 issetugid \
19570 localeconv \
19571 poll \
19572 putenv \
19573 remove \
19574 select \
19575 setbuf \
19576 setbuffer \
19577 setenv \
19578 setvbuf \
19579 sigaction \
19580 sigvec \
19581 strdup \
19582 strstr \
19583 sysconf \
19584 tcgetpgrp \
19585 times \
19586 tsearch \
19587 vsnprintf \
19588
19589 do
19590 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19591 echo "$as_me:19591: checking for $ac_func" >&5
19592 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19593 if eval "test \"\${$as_ac_var+set}\" = set"; then
19594   echo $ECHO_N "(cached) $ECHO_C" >&6
19595 else
19596   cat >conftest.$ac_ext <<_ACEOF
19597 #line 19597 "configure"
19598 #include "confdefs.h"
19599 #define $ac_func autoconf_temporary
19600 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19601 #undef $ac_func
19602
19603 #ifdef __cplusplus
19604 extern "C"
19605 #endif
19606
19607 /* We use char because int might match the return type of a gcc2
19608    builtin and then its argument prototype would still apply.  */
19609 char $ac_func (void);
19610
19611 int
19612 main (void)
19613 {
19614
19615 /* The GNU C library defines stubs for functions which it implements
19616     to always fail with ENOSYS.  Some functions are actually named
19617     something starting with __ and the normal name is an alias.  */
19618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19619 #error found stub for $ac_func
19620 #endif
19621
19622         return $ac_func ();
19623   ;
19624   return 0;
19625 }
19626 _ACEOF
19627 rm -f conftest.$ac_objext conftest$ac_exeext
19628 if { (eval echo "$as_me:19628: \"$ac_link\"") >&5
19629   (eval $ac_link) 2>&5
19630   ac_status=$?
19631   echo "$as_me:19631: \$? = $ac_status" >&5
19632   (exit $ac_status); } &&
19633          { ac_try='test -s conftest$ac_exeext'
19634   { (eval echo "$as_me:19634: \"$ac_try\"") >&5
19635   (eval $ac_try) 2>&5
19636   ac_status=$?
19637   echo "$as_me:19637: \$? = $ac_status" >&5
19638   (exit $ac_status); }; }; then
19639   eval "$as_ac_var=yes"
19640 else
19641   echo "$as_me: failed program was:" >&5
19642 cat conftest.$ac_ext >&5
19643 eval "$as_ac_var=no"
19644 fi
19645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19646 fi
19647 echo "$as_me:19647: result: `eval echo '${'$as_ac_var'}'`" >&5
19648 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19649 if test `eval echo '${'$as_ac_var'}'` = yes; then
19650   cat >>confdefs.h <<EOF
19651 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19652 EOF
19653
19654 fi
19655 done
19656
19657 if test "x$ac_cv_func_getopt" = xno && \
19658    test "x$cf_with_progs$cf_with_tests" != xnono; then
19659         { { echo "$as_me:19659: error: getopt is required for building programs" >&5
19660 echo "$as_me: error: getopt is required for building programs" >&2;}
19661    { (exit 1); exit 1; }; }
19662 fi
19663
19664 if test "x$with_safe_sprintf" = xyes
19665 then
19666         if test "x$ac_cv_func_vsnprintf" = xyes
19667         then
19668                 { echo "$as_me:19668: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19669 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19670         else
19671
19672 cat >>confdefs.h <<\EOF
19673 #define USE_SAFE_SPRINTF 1
19674 EOF
19675
19676         fi
19677 fi
19678
19679 if test "x$with_getcap" = "xyes" ; then
19680
19681 echo "$as_me:19681: checking for terminal-capability database functions" >&5
19682 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19683 if test "${cf_cv_cgetent+set}" = set; then
19684   echo $ECHO_N "(cached) $ECHO_C" >&6
19685 else
19686
19687 cat >conftest.$ac_ext <<_ACEOF
19688 #line 19688 "configure"
19689 #include "confdefs.h"
19690
19691 #include <stdlib.h>
19692 int
19693 main (void)
19694 {
19695
19696         char temp[128];
19697         char *buf = temp;
19698         char *db_array = temp;
19699         cgetent(&buf, &db_array, "vt100");
19700         cgetcap(buf, "tc", '=');
19701         cgetmatch(buf, "tc");
19702
19703   ;
19704   return 0;
19705 }
19706 _ACEOF
19707 rm -f conftest.$ac_objext conftest$ac_exeext
19708 if { (eval echo "$as_me:19708: \"$ac_link\"") >&5
19709   (eval $ac_link) 2>&5
19710   ac_status=$?
19711   echo "$as_me:19711: \$? = $ac_status" >&5
19712   (exit $ac_status); } &&
19713          { ac_try='test -s conftest$ac_exeext'
19714   { (eval echo "$as_me:19714: \"$ac_try\"") >&5
19715   (eval $ac_try) 2>&5
19716   ac_status=$?
19717   echo "$as_me:19717: \$? = $ac_status" >&5
19718   (exit $ac_status); }; }; then
19719   cf_cv_cgetent=yes
19720 else
19721   echo "$as_me: failed program was:" >&5
19722 cat conftest.$ac_ext >&5
19723 cf_cv_cgetent=no
19724 fi
19725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19726
19727 fi
19728 echo "$as_me:19728: result: $cf_cv_cgetent" >&5
19729 echo "${ECHO_T}$cf_cv_cgetent" >&6
19730
19731 if test "$cf_cv_cgetent" = yes
19732 then
19733
19734 cat >>confdefs.h <<\EOF
19735 #define HAVE_BSD_CGETENT 1
19736 EOF
19737
19738 echo "$as_me:19738: checking if cgetent uses const parameter" >&5
19739 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19740 if test "${cf_cv_cgetent_const+set}" = set; then
19741   echo $ECHO_N "(cached) $ECHO_C" >&6
19742 else
19743
19744 cat >conftest.$ac_ext <<_ACEOF
19745 #line 19745 "configure"
19746 #include "confdefs.h"
19747
19748 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19749 #include <stdlib.h>
19750 int
19751 main (void)
19752 {
19753
19754         char temp[128];
19755         char *buf = temp;
19756 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19757         const char *db_array = temp;
19758         cgetent(&buf, &db_array, "vt100");
19759 #endif
19760         cgetcap(buf, "tc", '=');
19761         cgetmatch(buf, "tc");
19762
19763   ;
19764   return 0;
19765 }
19766 _ACEOF
19767 rm -f conftest.$ac_objext conftest$ac_exeext
19768 if { (eval echo "$as_me:19768: \"$ac_link\"") >&5
19769   (eval $ac_link) 2>&5
19770   ac_status=$?
19771   echo "$as_me:19771: \$? = $ac_status" >&5
19772   (exit $ac_status); } &&
19773          { ac_try='test -s conftest$ac_exeext'
19774   { (eval echo "$as_me:19774: \"$ac_try\"") >&5
19775   (eval $ac_try) 2>&5
19776   ac_status=$?
19777   echo "$as_me:19777: \$? = $ac_status" >&5
19778   (exit $ac_status); }; }; then
19779   cf_cv_cgetent_const=yes
19780 else
19781   echo "$as_me: failed program was:" >&5
19782 cat conftest.$ac_ext >&5
19783 cf_cv_cgetent_const=no
19784 fi
19785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19786
19787 fi
19788 echo "$as_me:19788: result: $cf_cv_cgetent_const" >&5
19789 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19790         if test "$cf_cv_cgetent_const" = yes
19791         then
19792
19793 cat >>confdefs.h <<EOF
19794 #define CGETENT_CONST const
19795 EOF
19796
19797         fi
19798 fi
19799
19800 fi
19801
19802 echo "$as_me:19802: checking for isascii" >&5
19803 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19804 if test "${cf_cv_have_isascii+set}" = set; then
19805   echo $ECHO_N "(cached) $ECHO_C" >&6
19806 else
19807
19808         cat >conftest.$ac_ext <<_ACEOF
19809 #line 19809 "configure"
19810 #include "confdefs.h"
19811 #include <ctype.h>
19812 int
19813 main (void)
19814 {
19815 int x = isascii(' ')
19816   ;
19817   return 0;
19818 }
19819 _ACEOF
19820 rm -f conftest.$ac_objext conftest$ac_exeext
19821 if { (eval echo "$as_me:19821: \"$ac_link\"") >&5
19822   (eval $ac_link) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); } &&
19826          { ac_try='test -s conftest$ac_exeext'
19827   { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit $ac_status); }; }; then
19832   cf_cv_have_isascii=yes
19833 else
19834   echo "$as_me: failed program was:" >&5
19835 cat conftest.$ac_ext >&5
19836 cf_cv_have_isascii=no
19837 fi
19838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19839
19840 fi
19841 echo "$as_me:19841: result: $cf_cv_have_isascii" >&5
19842 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19843 test "$cf_cv_have_isascii" = yes &&
19844 cat >>confdefs.h <<\EOF
19845 #define HAVE_ISASCII 1
19846 EOF
19847
19848 if test "$ac_cv_func_sigaction" = yes; then
19849 echo "$as_me:19849: checking whether sigaction needs _POSIX_SOURCE" >&5
19850 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19851 cat >conftest.$ac_ext <<_ACEOF
19852 #line 19852 "configure"
19853 #include "confdefs.h"
19854
19855 #include <sys/types.h>
19856 #include <signal.h>
19857 int
19858 main (void)
19859 {
19860 struct sigaction act
19861   ;
19862   return 0;
19863 }
19864 _ACEOF
19865 rm -f conftest.$ac_objext
19866 if { (eval echo "$as_me:19866: \"$ac_compile\"") >&5
19867   (eval $ac_compile) 2>&5
19868   ac_status=$?
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit $ac_status); } &&
19871          { ac_try='test -s conftest.$ac_objext'
19872   { (eval echo "$as_me:19872: \"$ac_try\"") >&5
19873   (eval $ac_try) 2>&5
19874   ac_status=$?
19875   echo "$as_me:19875: \$? = $ac_status" >&5
19876   (exit $ac_status); }; }; then
19877   sigact_bad=no
19878 else
19879   echo "$as_me: failed program was:" >&5
19880 cat conftest.$ac_ext >&5
19881
19882 cat >conftest.$ac_ext <<_ACEOF
19883 #line 19883 "configure"
19884 #include "confdefs.h"
19885
19886 #define _POSIX_SOURCE
19887 #include <sys/types.h>
19888 #include <signal.h>
19889 int
19890 main (void)
19891 {
19892 struct sigaction act
19893   ;
19894   return 0;
19895 }
19896 _ACEOF
19897 rm -f conftest.$ac_objext
19898 if { (eval echo "$as_me:19898: \"$ac_compile\"") >&5
19899   (eval $ac_compile) 2>&5
19900   ac_status=$?
19901   echo "$as_me:19901: \$? = $ac_status" >&5
19902   (exit $ac_status); } &&
19903          { ac_try='test -s conftest.$ac_objext'
19904   { (eval echo "$as_me:19904: \"$ac_try\"") >&5
19905   (eval $ac_try) 2>&5
19906   ac_status=$?
19907   echo "$as_me:19907: \$? = $ac_status" >&5
19908   (exit $ac_status); }; }; then
19909   sigact_bad=yes
19910
19911 cat >>confdefs.h <<\EOF
19912 #define _POSIX_SOURCE 1
19913 EOF
19914
19915 else
19916   echo "$as_me: failed program was:" >&5
19917 cat conftest.$ac_ext >&5
19918 sigact_bad=unknown
19919 fi
19920 rm -f conftest.$ac_objext conftest.$ac_ext
19921 fi
19922 rm -f conftest.$ac_objext conftest.$ac_ext
19923 echo "$as_me:19923: result: $sigact_bad" >&5
19924 echo "${ECHO_T}$sigact_bad" >&6
19925 fi
19926
19927 echo "$as_me:19927: checking if nanosleep really works" >&5
19928 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19929 if test "${cf_cv_func_nanosleep+set}" = set; then
19930   echo $ECHO_N "(cached) $ECHO_C" >&6
19931 else
19932
19933 if test "$cross_compiling" = yes; then
19934   cf_cv_func_nanosleep=unknown
19935 else
19936   cat >conftest.$ac_ext <<_ACEOF
19937 #line 19937 "configure"
19938 #include "confdefs.h"
19939
19940 #include <stdio.h>
19941 #include <errno.h>
19942 #include <time.h>
19943
19944 #ifdef HAVE_SYS_TIME_H
19945 #include <sys/time.h>
19946 #endif
19947
19948 int main(void) {
19949         struct timespec ts1, ts2;
19950         int code;
19951         ts1.tv_sec  = 0;
19952         ts1.tv_nsec = 750000000;
19953         ts2.tv_sec  = 0;
19954         ts2.tv_nsec = 0;
19955         errno = 0;
19956         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19957         ${cf_cv_main_return:-return}(code != 0);
19958 }
19959
19960 _ACEOF
19961 rm -f conftest$ac_exeext
19962 if { (eval echo "$as_me:19962: \"$ac_link\"") >&5
19963   (eval $ac_link) 2>&5
19964   ac_status=$?
19965   echo "$as_me:19965: \$? = $ac_status" >&5
19966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19967   { (eval echo "$as_me:19967: \"$ac_try\"") >&5
19968   (eval $ac_try) 2>&5
19969   ac_status=$?
19970   echo "$as_me:19970: \$? = $ac_status" >&5
19971   (exit $ac_status); }; }; then
19972   cf_cv_func_nanosleep=yes
19973 else
19974   echo "$as_me: program exited with status $ac_status" >&5
19975 echo "$as_me: failed program was:" >&5
19976 cat conftest.$ac_ext >&5
19977 cf_cv_func_nanosleep=no
19978 fi
19979 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19980 fi
19981 fi
19982 echo "$as_me:19982: result: $cf_cv_func_nanosleep" >&5
19983 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19984
19985 test "$cf_cv_func_nanosleep" = "yes" &&
19986 cat >>confdefs.h <<\EOF
19987 #define HAVE_NANOSLEEP 1
19988 EOF
19989
19990 for ac_header in \
19991 termio.h \
19992 termios.h \
19993 unistd.h \
19994 sys/ioctl.h \
19995 sys/termio.h \
19996
19997 do
19998 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19999 echo "$as_me:19999: checking for $ac_header" >&5
20000 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20001 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20002   echo $ECHO_N "(cached) $ECHO_C" >&6
20003 else
20004   cat >conftest.$ac_ext <<_ACEOF
20005 #line 20005 "configure"
20006 #include "confdefs.h"
20007 #include <$ac_header>
20008 _ACEOF
20009 if { (eval echo "$as_me:20009: \"$ac_cpp conftest.$ac_ext\"") >&5
20010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20011   ac_status=$?
20012   egrep -v '^ *\+' conftest.er1 >conftest.err
20013   rm -f conftest.er1
20014   cat conftest.err >&5
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit $ac_status); } >/dev/null; then
20017   if test -s conftest.err; then
20018     ac_cpp_err=$ac_c_preproc_warn_flag
20019   else
20020     ac_cpp_err=
20021   fi
20022 else
20023   ac_cpp_err=yes
20024 fi
20025 if test -z "$ac_cpp_err"; then
20026   eval "$as_ac_Header=yes"
20027 else
20028   echo "$as_me: failed program was:" >&5
20029   cat conftest.$ac_ext >&5
20030   eval "$as_ac_Header=no"
20031 fi
20032 rm -f conftest.err conftest.$ac_ext
20033 fi
20034 echo "$as_me:20034: result: `eval echo '${'$as_ac_Header'}'`" >&5
20035 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20036 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20037   cat >>confdefs.h <<EOF
20038 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20039 EOF
20040
20041 fi
20042 done
20043
20044 if test "$ac_cv_header_termios_h" = yes ; then
20045         case "$CFLAGS $CPPFLAGS" in
20046         (*-D_POSIX_SOURCE*)
20047                 termios_bad=dunno ;;
20048         (*)     termios_bad=maybe ;;
20049         esac
20050         if test "$termios_bad" = maybe ; then
20051         echo "$as_me:20051: checking whether termios.h needs _POSIX_SOURCE" >&5
20052 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20053         cat >conftest.$ac_ext <<_ACEOF
20054 #line 20054 "configure"
20055 #include "confdefs.h"
20056 #include <termios.h>
20057 int
20058 main (void)
20059 {
20060 struct termios foo; int x = foo.c_iflag
20061   ;
20062   return 0;
20063 }
20064 _ACEOF
20065 rm -f conftest.$ac_objext
20066 if { (eval echo "$as_me:20066: \"$ac_compile\"") >&5
20067   (eval $ac_compile) 2>&5
20068   ac_status=$?
20069   echo "$as_me:20069: \$? = $ac_status" >&5
20070   (exit $ac_status); } &&
20071          { ac_try='test -s conftest.$ac_objext'
20072   { (eval echo "$as_me:20072: \"$ac_try\"") >&5
20073   (eval $ac_try) 2>&5
20074   ac_status=$?
20075   echo "$as_me:20075: \$? = $ac_status" >&5
20076   (exit $ac_status); }; }; then
20077   termios_bad=no
20078 else
20079   echo "$as_me: failed program was:" >&5
20080 cat conftest.$ac_ext >&5
20081
20082                 cat >conftest.$ac_ext <<_ACEOF
20083 #line 20083 "configure"
20084 #include "confdefs.h"
20085
20086 #define _POSIX_SOURCE
20087 #include <termios.h>
20088 int
20089 main (void)
20090 {
20091 struct termios foo; int x = foo.c_iflag
20092   ;
20093   return 0;
20094 }
20095 _ACEOF
20096 rm -f conftest.$ac_objext
20097 if { (eval echo "$as_me:20097: \"$ac_compile\"") >&5
20098   (eval $ac_compile) 2>&5
20099   ac_status=$?
20100   echo "$as_me:20100: \$? = $ac_status" >&5
20101   (exit $ac_status); } &&
20102          { ac_try='test -s conftest.$ac_objext'
20103   { (eval echo "$as_me:20103: \"$ac_try\"") >&5
20104   (eval $ac_try) 2>&5
20105   ac_status=$?
20106   echo "$as_me:20106: \$? = $ac_status" >&5
20107   (exit $ac_status); }; }; then
20108   termios_bad=unknown
20109 else
20110   echo "$as_me: failed program was:" >&5
20111 cat conftest.$ac_ext >&5
20112 termios_bad=yes
20113 cat >>confdefs.h <<\EOF
20114 #define _POSIX_SOURCE 1
20115 EOF
20116
20117 fi
20118 rm -f conftest.$ac_objext conftest.$ac_ext
20119
20120 fi
20121 rm -f conftest.$ac_objext conftest.$ac_ext
20122         echo "$as_me:20122: result: $termios_bad" >&5
20123 echo "${ECHO_T}$termios_bad" >&6
20124         fi
20125 fi
20126
20127 echo "$as_me:20127: checking for tcgetattr" >&5
20128 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20129 if test "${cf_cv_have_tcgetattr+set}" = set; then
20130   echo $ECHO_N "(cached) $ECHO_C" >&6
20131 else
20132
20133 cat >conftest.$ac_ext <<_ACEOF
20134 #line 20134 "configure"
20135 #include "confdefs.h"
20136
20137 #include <sys/types.h>
20138 #ifdef HAVE_UNISTD_H
20139 #include <unistd.h>
20140 #endif
20141 #ifdef HAVE_TERMIOS_H
20142 #include <termios.h>
20143 #define TTY struct termios
20144 #else
20145 #ifdef HAVE_TERMIO_H
20146 #include <termio.h>
20147 #define TTY struct termio
20148 #endif
20149 #endif
20150
20151 int
20152 main (void)
20153 {
20154
20155 TTY foo;
20156 tcgetattr(1, &foo);
20157   ;
20158   return 0;
20159 }
20160 _ACEOF
20161 rm -f conftest.$ac_objext conftest$ac_exeext
20162 if { (eval echo "$as_me:20162: \"$ac_link\"") >&5
20163   (eval $ac_link) 2>&5
20164   ac_status=$?
20165   echo "$as_me:20165: \$? = $ac_status" >&5
20166   (exit $ac_status); } &&
20167          { ac_try='test -s conftest$ac_exeext'
20168   { (eval echo "$as_me:20168: \"$ac_try\"") >&5
20169   (eval $ac_try) 2>&5
20170   ac_status=$?
20171   echo "$as_me:20171: \$? = $ac_status" >&5
20172   (exit $ac_status); }; }; then
20173   cf_cv_have_tcgetattr=yes
20174 else
20175   echo "$as_me: failed program was:" >&5
20176 cat conftest.$ac_ext >&5
20177 cf_cv_have_tcgetattr=no
20178 fi
20179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20180 fi
20181 echo "$as_me:20181: result: $cf_cv_have_tcgetattr" >&5
20182 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20183 test "$cf_cv_have_tcgetattr" = yes &&
20184 cat >>confdefs.h <<\EOF
20185 #define HAVE_TCGETATTR 1
20186 EOF
20187
20188 echo "$as_me:20188: checking for vsscanf function or workaround" >&5
20189 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20190 if test "${cf_cv_func_vsscanf+set}" = set; then
20191   echo $ECHO_N "(cached) $ECHO_C" >&6
20192 else
20193
20194 cat >conftest.$ac_ext <<_ACEOF
20195 #line 20195 "configure"
20196 #include "confdefs.h"
20197
20198 #include <stdarg.h>
20199 #include <stdio.h>
20200 int
20201 main (void)
20202 {
20203
20204         va_list ap;
20205         vsscanf("from", "%d", ap)
20206   ;
20207   return 0;
20208 }
20209 _ACEOF
20210 rm -f conftest.$ac_objext conftest$ac_exeext
20211 if { (eval echo "$as_me:20211: \"$ac_link\"") >&5
20212   (eval $ac_link) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit $ac_status); } &&
20216          { ac_try='test -s conftest$ac_exeext'
20217   { (eval echo "$as_me:20217: \"$ac_try\"") >&5
20218   (eval $ac_try) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit $ac_status); }; }; then
20222   cf_cv_func_vsscanf=vsscanf
20223 else
20224   echo "$as_me: failed program was:" >&5
20225 cat conftest.$ac_ext >&5
20226
20227 cat >conftest.$ac_ext <<_ACEOF
20228 #line 20228 "configure"
20229 #include "confdefs.h"
20230
20231 #include <stdarg.h>
20232 #include <stdio.h>
20233 int
20234 main (void)
20235 {
20236
20237         FILE strbuf;
20238         char *str = "from";
20239
20240         strbuf._flag = _IOREAD;
20241         strbuf._ptr = strbuf._base = (unsigned char *) str;
20242         strbuf._cnt = strlen(str);
20243         strbuf._file = _NFILE;
20244         return (vfscanf(&strbuf, "%d", ap))
20245   ;
20246   return 0;
20247 }
20248 _ACEOF
20249 rm -f conftest.$ac_objext conftest$ac_exeext
20250 if { (eval echo "$as_me:20250: \"$ac_link\"") >&5
20251   (eval $ac_link) 2>&5
20252   ac_status=$?
20253   echo "$as_me:20253: \$? = $ac_status" >&5
20254   (exit $ac_status); } &&
20255          { ac_try='test -s conftest$ac_exeext'
20256   { (eval echo "$as_me:20256: \"$ac_try\"") >&5
20257   (eval $ac_try) 2>&5
20258   ac_status=$?
20259   echo "$as_me:20259: \$? = $ac_status" >&5
20260   (exit $ac_status); }; }; then
20261   cf_cv_func_vsscanf=vfscanf
20262 else
20263   echo "$as_me: failed program was:" >&5
20264 cat conftest.$ac_ext >&5
20265
20266 cat >conftest.$ac_ext <<_ACEOF
20267 #line 20267 "configure"
20268 #include "confdefs.h"
20269
20270 #include <stdarg.h>
20271 #include <stdio.h>
20272 int
20273 main (void)
20274 {
20275
20276         FILE strbuf;
20277         char *str = "from";
20278
20279         strbuf._flag = _IOREAD;
20280         strbuf._ptr = strbuf._base = (unsigned char *) str;
20281         strbuf._cnt = strlen(str);
20282         strbuf._file = _NFILE;
20283         return (_doscan(&strbuf, "%d", ap))
20284   ;
20285   return 0;
20286 }
20287 _ACEOF
20288 rm -f conftest.$ac_objext conftest$ac_exeext
20289 if { (eval echo "$as_me:20289: \"$ac_link\"") >&5
20290   (eval $ac_link) 2>&5
20291   ac_status=$?
20292   echo "$as_me:20292: \$? = $ac_status" >&5
20293   (exit $ac_status); } &&
20294          { ac_try='test -s conftest$ac_exeext'
20295   { (eval echo "$as_me:20295: \"$ac_try\"") >&5
20296   (eval $ac_try) 2>&5
20297   ac_status=$?
20298   echo "$as_me:20298: \$? = $ac_status" >&5
20299   (exit $ac_status); }; }; then
20300   cf_cv_func_vsscanf=_doscan
20301 else
20302   echo "$as_me: failed program was:" >&5
20303 cat conftest.$ac_ext >&5
20304
20305 cf_cv_func_vsscanf=no
20306 fi
20307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20308 fi
20309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20310 fi
20311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20312 fi
20313 echo "$as_me:20313: result: $cf_cv_func_vsscanf" >&5
20314 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20315
20316 case $cf_cv_func_vsscanf in
20317 (vsscanf)
20318 cat >>confdefs.h <<\EOF
20319 #define HAVE_VSSCANF 1
20320 EOF
20321 ;;
20322 (vfscanf)
20323 cat >>confdefs.h <<\EOF
20324 #define HAVE_VFSCANF 1
20325 EOF
20326 ;;
20327 (_doscan)
20328 cat >>confdefs.h <<\EOF
20329 #define HAVE__DOSCAN 1
20330 EOF
20331 ;;
20332 esac
20333
20334 for ac_header in \
20335 unistd.h \
20336
20337 do
20338 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20339 echo "$as_me:20339: checking for $ac_header" >&5
20340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20342   echo $ECHO_N "(cached) $ECHO_C" >&6
20343 else
20344   cat >conftest.$ac_ext <<_ACEOF
20345 #line 20345 "configure"
20346 #include "confdefs.h"
20347 #include <$ac_header>
20348 _ACEOF
20349 if { (eval echo "$as_me:20349: \"$ac_cpp conftest.$ac_ext\"") >&5
20350   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20351   ac_status=$?
20352   egrep -v '^ *\+' conftest.er1 >conftest.err
20353   rm -f conftest.er1
20354   cat conftest.err >&5
20355   echo "$as_me:20355: \$? = $ac_status" >&5
20356   (exit $ac_status); } >/dev/null; then
20357   if test -s conftest.err; then
20358     ac_cpp_err=$ac_c_preproc_warn_flag
20359   else
20360     ac_cpp_err=
20361   fi
20362 else
20363   ac_cpp_err=yes
20364 fi
20365 if test -z "$ac_cpp_err"; then
20366   eval "$as_ac_Header=yes"
20367 else
20368   echo "$as_me: failed program was:" >&5
20369   cat conftest.$ac_ext >&5
20370   eval "$as_ac_Header=no"
20371 fi
20372 rm -f conftest.err conftest.$ac_ext
20373 fi
20374 echo "$as_me:20374: result: `eval echo '${'$as_ac_Header'}'`" >&5
20375 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20376 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20377   cat >>confdefs.h <<EOF
20378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20379 EOF
20380
20381 fi
20382 done
20383
20384 echo "$as_me:20384: checking for working mkstemp" >&5
20385 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20386 if test "${cf_cv_func_mkstemp+set}" = set; then
20387   echo $ECHO_N "(cached) $ECHO_C" >&6
20388 else
20389
20390 rm -rf conftest*
20391 if test "$cross_compiling" = yes; then
20392   cf_cv_func_mkstemp=maybe
20393 else
20394   cat >conftest.$ac_ext <<_ACEOF
20395 #line 20395 "configure"
20396 #include "confdefs.h"
20397
20398 #include <sys/types.h>
20399 #ifdef HAVE_UNISTD_H
20400 #include <unistd.h>
20401 #endif
20402 #include <stdlib.h>
20403 #include <stdio.h>
20404 #include <string.h>
20405 #include <sys/stat.h>
20406 int main(void)
20407 {
20408         char *tmpl = "conftestXXXXXX";
20409         char name[2][80];
20410         int n;
20411         int result = 0;
20412         int fd;
20413         struct stat sb;
20414
20415         umask(077);
20416         for (n = 0; n < 2; ++n) {
20417                 strcpy(name[n], tmpl);
20418                 if ((fd = mkstemp(name[n])) >= 0) {
20419                         if (!strcmp(name[n], tmpl)
20420                          || stat(name[n], &sb) != 0
20421                          || (sb.st_mode & S_IFMT) != S_IFREG
20422                          || (sb.st_mode & 077) != 0) {
20423                                 result = 1;
20424                         }
20425                         close(fd);
20426                 }
20427         }
20428         if (result == 0
20429          && !strcmp(name[0], name[1]))
20430                 result = 1;
20431         ${cf_cv_main_return:-return}(result);
20432 }
20433
20434 _ACEOF
20435 rm -f conftest$ac_exeext
20436 if { (eval echo "$as_me:20436: \"$ac_link\"") >&5
20437   (eval $ac_link) 2>&5
20438   ac_status=$?
20439   echo "$as_me:20439: \$? = $ac_status" >&5
20440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20441   { (eval echo "$as_me:20441: \"$ac_try\"") >&5
20442   (eval $ac_try) 2>&5
20443   ac_status=$?
20444   echo "$as_me:20444: \$? = $ac_status" >&5
20445   (exit $ac_status); }; }; then
20446   cf_cv_func_mkstemp=yes
20447
20448 else
20449   echo "$as_me: program exited with status $ac_status" >&5
20450 echo "$as_me: failed program was:" >&5
20451 cat conftest.$ac_ext >&5
20452 cf_cv_func_mkstemp=no
20453
20454 fi
20455 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20456 fi
20457
20458 fi
20459 echo "$as_me:20459: result: $cf_cv_func_mkstemp" >&5
20460 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20461 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20462         echo "$as_me:20462: checking for mkstemp" >&5
20463 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20464 if test "${ac_cv_func_mkstemp+set}" = set; then
20465   echo $ECHO_N "(cached) $ECHO_C" >&6
20466 else
20467   cat >conftest.$ac_ext <<_ACEOF
20468 #line 20468 "configure"
20469 #include "confdefs.h"
20470 #define mkstemp autoconf_temporary
20471 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20472 #undef mkstemp
20473
20474 #ifdef __cplusplus
20475 extern "C"
20476 #endif
20477
20478 /* We use char because int might match the return type of a gcc2
20479    builtin and then its argument prototype would still apply.  */
20480 char mkstemp (void);
20481
20482 int
20483 main (void)
20484 {
20485
20486 /* The GNU C library defines stubs for functions which it implements
20487     to always fail with ENOSYS.  Some functions are actually named
20488     something starting with __ and the normal name is an alias.  */
20489 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20490 #error found stub for mkstemp
20491 #endif
20492
20493         return mkstemp ();
20494   ;
20495   return 0;
20496 }
20497 _ACEOF
20498 rm -f conftest.$ac_objext conftest$ac_exeext
20499 if { (eval echo "$as_me:20499: \"$ac_link\"") >&5
20500   (eval $ac_link) 2>&5
20501   ac_status=$?
20502   echo "$as_me:20502: \$? = $ac_status" >&5
20503   (exit $ac_status); } &&
20504          { ac_try='test -s conftest$ac_exeext'
20505   { (eval echo "$as_me:20505: \"$ac_try\"") >&5
20506   (eval $ac_try) 2>&5
20507   ac_status=$?
20508   echo "$as_me:20508: \$? = $ac_status" >&5
20509   (exit $ac_status); }; }; then
20510   ac_cv_func_mkstemp=yes
20511 else
20512   echo "$as_me: failed program was:" >&5
20513 cat conftest.$ac_ext >&5
20514 ac_cv_func_mkstemp=no
20515 fi
20516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20517 fi
20518 echo "$as_me:20518: result: $ac_cv_func_mkstemp" >&5
20519 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20520
20521 fi
20522 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20523
20524 cat >>confdefs.h <<\EOF
20525 #define HAVE_MKSTEMP 1
20526 EOF
20527
20528 fi
20529
20530 # setup for prototype of fallback for vsscanf()
20531
20532 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20533         HAVE_VSSCANF=1
20534 else
20535         HAVE_VSSCANF=0
20536 fi
20537
20538 if test "x$cross_compiling" = xyes ; then
20539         { echo "$as_me:20539: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20540 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20541 else
20542         echo "$as_me:20542: checking whether setvbuf arguments are reversed" >&5
20543 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20544 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20545   echo $ECHO_N "(cached) $ECHO_C" >&6
20546 else
20547   if test "$cross_compiling" = yes; then
20548   { { echo "$as_me:20548: error: cannot run test program while cross compiling" >&5
20549 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20550    { (exit 1); exit 1; }; }
20551 else
20552   cat >conftest.$ac_ext <<_ACEOF
20553 #line 20553 "configure"
20554 #include "confdefs.h"
20555 #include <stdio.h>
20556 /* If setvbuf has the reversed format, exit 0. */
20557 int
20558 main (void)
20559 {
20560   /* This call has the arguments reversed.
20561      A reversed system may check and see that the address of main
20562      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20563   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20564     $ac_main_return(1);
20565   putc('\r', stdout);
20566   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20567 }
20568 _ACEOF
20569 rm -f conftest$ac_exeext
20570 if { (eval echo "$as_me:20570: \"$ac_link\"") >&5
20571   (eval $ac_link) 2>&5
20572   ac_status=$?
20573   echo "$as_me:20573: \$? = $ac_status" >&5
20574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20575   { (eval echo "$as_me:20575: \"$ac_try\"") >&5
20576   (eval $ac_try) 2>&5
20577   ac_status=$?
20578   echo "$as_me:20578: \$? = $ac_status" >&5
20579   (exit $ac_status); }; }; then
20580   ac_cv_func_setvbuf_reversed=yes
20581 else
20582   echo "$as_me: program exited with status $ac_status" >&5
20583 echo "$as_me: failed program was:" >&5
20584 cat conftest.$ac_ext >&5
20585 ac_cv_func_setvbuf_reversed=no
20586 fi
20587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20588 fi
20589 rm -f core core.* *.core
20590 fi
20591 echo "$as_me:20591: result: $ac_cv_func_setvbuf_reversed" >&5
20592 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20593 if test $ac_cv_func_setvbuf_reversed = yes; then
20594
20595 cat >>confdefs.h <<\EOF
20596 #define SETVBUF_REVERSED 1
20597 EOF
20598
20599 fi
20600
20601 fi
20602 echo "$as_me:20602: checking for intptr_t" >&5
20603 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20604 if test "${ac_cv_type_intptr_t+set}" = set; then
20605   echo $ECHO_N "(cached) $ECHO_C" >&6
20606 else
20607   cat >conftest.$ac_ext <<_ACEOF
20608 #line 20608 "configure"
20609 #include "confdefs.h"
20610 $ac_includes_default
20611 int
20612 main (void)
20613 {
20614 if ((intptr_t *) 0)
20615   return 0;
20616 if (sizeof (intptr_t))
20617   return 0;
20618   ;
20619   return 0;
20620 }
20621 _ACEOF
20622 rm -f conftest.$ac_objext
20623 if { (eval echo "$as_me:20623: \"$ac_compile\"") >&5
20624   (eval $ac_compile) 2>&5
20625   ac_status=$?
20626   echo "$as_me:20626: \$? = $ac_status" >&5
20627   (exit $ac_status); } &&
20628          { ac_try='test -s conftest.$ac_objext'
20629   { (eval echo "$as_me:20629: \"$ac_try\"") >&5
20630   (eval $ac_try) 2>&5
20631   ac_status=$?
20632   echo "$as_me:20632: \$? = $ac_status" >&5
20633   (exit $ac_status); }; }; then
20634   ac_cv_type_intptr_t=yes
20635 else
20636   echo "$as_me: failed program was:" >&5
20637 cat conftest.$ac_ext >&5
20638 ac_cv_type_intptr_t=no
20639 fi
20640 rm -f conftest.$ac_objext conftest.$ac_ext
20641 fi
20642 echo "$as_me:20642: result: $ac_cv_type_intptr_t" >&5
20643 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20644 if test $ac_cv_type_intptr_t = yes; then
20645   :
20646 else
20647
20648 cat >>confdefs.h <<EOF
20649 #define intptr_t long
20650 EOF
20651
20652 fi
20653
20654 echo "$as_me:20654: checking for ssize_t" >&5
20655 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20656 if test "${ac_cv_type_ssize_t+set}" = set; then
20657   echo $ECHO_N "(cached) $ECHO_C" >&6
20658 else
20659   cat >conftest.$ac_ext <<_ACEOF
20660 #line 20660 "configure"
20661 #include "confdefs.h"
20662 $ac_includes_default
20663 int
20664 main (void)
20665 {
20666 if ((ssize_t *) 0)
20667   return 0;
20668 if (sizeof (ssize_t))
20669   return 0;
20670   ;
20671   return 0;
20672 }
20673 _ACEOF
20674 rm -f conftest.$ac_objext
20675 if { (eval echo "$as_me:20675: \"$ac_compile\"") >&5
20676   (eval $ac_compile) 2>&5
20677   ac_status=$?
20678   echo "$as_me:20678: \$? = $ac_status" >&5
20679   (exit $ac_status); } &&
20680          { ac_try='test -s conftest.$ac_objext'
20681   { (eval echo "$as_me:20681: \"$ac_try\"") >&5
20682   (eval $ac_try) 2>&5
20683   ac_status=$?
20684   echo "$as_me:20684: \$? = $ac_status" >&5
20685   (exit $ac_status); }; }; then
20686   ac_cv_type_ssize_t=yes
20687 else
20688   echo "$as_me: failed program was:" >&5
20689 cat conftest.$ac_ext >&5
20690 ac_cv_type_ssize_t=no
20691 fi
20692 rm -f conftest.$ac_objext conftest.$ac_ext
20693 fi
20694 echo "$as_me:20694: result: $ac_cv_type_ssize_t" >&5
20695 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20696 if test $ac_cv_type_ssize_t = yes; then
20697   :
20698 else
20699
20700 cat >>confdefs.h <<EOF
20701 #define ssize_t int
20702 EOF
20703
20704 fi
20705
20706 echo "$as_me:20706: checking for type sigaction_t" >&5
20707 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20708 if test "${cf_cv_type_sigaction+set}" = set; then
20709   echo $ECHO_N "(cached) $ECHO_C" >&6
20710 else
20711
20712         cat >conftest.$ac_ext <<_ACEOF
20713 #line 20713 "configure"
20714 #include "confdefs.h"
20715
20716 #include <signal.h>
20717 int
20718 main (void)
20719 {
20720 sigaction_t x
20721   ;
20722   return 0;
20723 }
20724 _ACEOF
20725 rm -f conftest.$ac_objext
20726 if { (eval echo "$as_me:20726: \"$ac_compile\"") >&5
20727   (eval $ac_compile) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit $ac_status); } &&
20731          { ac_try='test -s conftest.$ac_objext'
20732   { (eval echo "$as_me:20732: \"$ac_try\"") >&5
20733   (eval $ac_try) 2>&5
20734   ac_status=$?
20735   echo "$as_me:20735: \$? = $ac_status" >&5
20736   (exit $ac_status); }; }; then
20737   cf_cv_type_sigaction=yes
20738 else
20739   echo "$as_me: failed program was:" >&5
20740 cat conftest.$ac_ext >&5
20741 cf_cv_type_sigaction=no
20742 fi
20743 rm -f conftest.$ac_objext conftest.$ac_ext
20744 fi
20745
20746 echo "$as_me:20746: result: $cf_cv_type_sigaction" >&5
20747 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20748 test "$cf_cv_type_sigaction" = yes &&
20749 cat >>confdefs.h <<\EOF
20750 #define HAVE_TYPE_SIGACTION 1
20751 EOF
20752
20753 echo "$as_me:20753: checking declaration of size-change" >&5
20754 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20755 if test "${cf_cv_sizechange+set}" = set; then
20756   echo $ECHO_N "(cached) $ECHO_C" >&6
20757 else
20758
20759         cf_cv_sizechange=unknown
20760         cf_save_CPPFLAGS="$CPPFLAGS"
20761
20762 for cf_opts in "" "NEED_PTEM_H"
20763 do
20764
20765         CPPFLAGS="$cf_save_CPPFLAGS"
20766         if test -n "$cf_opts"
20767         then
20768
20769         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20770         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20771
20772         fi
20773         cat >conftest.$ac_ext <<_ACEOF
20774 #line 20774 "configure"
20775 #include "confdefs.h"
20776 #include <sys/types.h>
20777 #ifdef HAVE_TERMIOS_H
20778 #include <termios.h>
20779 #else
20780 #ifdef HAVE_TERMIO_H
20781 #include <termio.h>
20782 #endif
20783 #endif
20784
20785 #ifdef NEED_PTEM_H
20786 /* This is a workaround for SCO:  they neglected to define struct winsize in
20787  * termios.h -- it's only in termio.h and ptem.h
20788  */
20789 #include <sys/stream.h>
20790 #include <sys/ptem.h>
20791 #endif
20792
20793 #ifdef HAVE_SYS_IOCTL_H
20794 #include <sys/ioctl.h>
20795 #endif
20796
20797 int
20798 main (void)
20799 {
20800
20801 #ifdef TIOCGSIZE
20802         struct ttysize win;     /* SunOS 3.0... */
20803         int y = win.ts_lines;
20804         int x = win.ts_cols;
20805 #else
20806 #ifdef TIOCGWINSZ
20807         struct winsize win;     /* everything else */
20808         int y = win.ws_row;
20809         int x = win.ws_col;
20810 #else
20811         no TIOCGSIZE or TIOCGWINSZ
20812 #endif /* TIOCGWINSZ */
20813 #endif /* TIOCGSIZE */
20814
20815   ;
20816   return 0;
20817 }
20818 _ACEOF
20819 rm -f conftest.$ac_objext
20820 if { (eval echo "$as_me:20820: \"$ac_compile\"") >&5
20821   (eval $ac_compile) 2>&5
20822   ac_status=$?
20823   echo "$as_me:20823: \$? = $ac_status" >&5
20824   (exit $ac_status); } &&
20825          { ac_try='test -s conftest.$ac_objext'
20826   { (eval echo "$as_me:20826: \"$ac_try\"") >&5
20827   (eval $ac_try) 2>&5
20828   ac_status=$?
20829   echo "$as_me:20829: \$? = $ac_status" >&5
20830   (exit $ac_status); }; }; then
20831   cf_cv_sizechange=yes
20832 else
20833   echo "$as_me: failed program was:" >&5
20834 cat conftest.$ac_ext >&5
20835 cf_cv_sizechange=no
20836 fi
20837 rm -f conftest.$ac_objext conftest.$ac_ext
20838
20839         CPPFLAGS="$cf_save_CPPFLAGS"
20840         if test "$cf_cv_sizechange" = yes ; then
20841                 echo "size-change succeeded ($cf_opts)" >&5
20842                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20843                 break
20844         fi
20845 done
20846
20847 fi
20848 echo "$as_me:20848: result: $cf_cv_sizechange" >&5
20849 echo "${ECHO_T}$cf_cv_sizechange" >&6
20850 if test "$cf_cv_sizechange" != no ; then
20851
20852 cat >>confdefs.h <<\EOF
20853 #define HAVE_SIZECHANGE 1
20854 EOF
20855
20856         case $cf_cv_sizechange in
20857         (NEED*)
20858                 cat >>confdefs.h <<EOF
20859 #define $cf_cv_sizechange  1
20860 EOF
20861
20862                 ;;
20863         esac
20864 fi
20865
20866 echo "$as_me:20866: checking for memmove" >&5
20867 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20868 if test "${ac_cv_func_memmove+set}" = set; then
20869   echo $ECHO_N "(cached) $ECHO_C" >&6
20870 else
20871   cat >conftest.$ac_ext <<_ACEOF
20872 #line 20872 "configure"
20873 #include "confdefs.h"
20874 #define memmove autoconf_temporary
20875 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20876 #undef memmove
20877
20878 #ifdef __cplusplus
20879 extern "C"
20880 #endif
20881
20882 /* We use char because int might match the return type of a gcc2
20883    builtin and then its argument prototype would still apply.  */
20884 char memmove (void);
20885
20886 int
20887 main (void)
20888 {
20889
20890 /* The GNU C library defines stubs for functions which it implements
20891     to always fail with ENOSYS.  Some functions are actually named
20892     something starting with __ and the normal name is an alias.  */
20893 #if defined (__stub_memmove) || defined (__stub___memmove)
20894 #error found stub for memmove
20895 #endif
20896
20897         return memmove ();
20898   ;
20899   return 0;
20900 }
20901 _ACEOF
20902 rm -f conftest.$ac_objext conftest$ac_exeext
20903 if { (eval echo "$as_me:20903: \"$ac_link\"") >&5
20904   (eval $ac_link) 2>&5
20905   ac_status=$?
20906   echo "$as_me:20906: \$? = $ac_status" >&5
20907   (exit $ac_status); } &&
20908          { ac_try='test -s conftest$ac_exeext'
20909   { (eval echo "$as_me:20909: \"$ac_try\"") >&5
20910   (eval $ac_try) 2>&5
20911   ac_status=$?
20912   echo "$as_me:20912: \$? = $ac_status" >&5
20913   (exit $ac_status); }; }; then
20914   ac_cv_func_memmove=yes
20915 else
20916   echo "$as_me: failed program was:" >&5
20917 cat conftest.$ac_ext >&5
20918 ac_cv_func_memmove=no
20919 fi
20920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20921 fi
20922 echo "$as_me:20922: result: $ac_cv_func_memmove" >&5
20923 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20924 if test $ac_cv_func_memmove = yes; then
20925   :
20926 else
20927
20928 echo "$as_me:20928: checking for bcopy" >&5
20929 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20930 if test "${ac_cv_func_bcopy+set}" = set; then
20931   echo $ECHO_N "(cached) $ECHO_C" >&6
20932 else
20933   cat >conftest.$ac_ext <<_ACEOF
20934 #line 20934 "configure"
20935 #include "confdefs.h"
20936 #define bcopy autoconf_temporary
20937 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20938 #undef bcopy
20939
20940 #ifdef __cplusplus
20941 extern "C"
20942 #endif
20943
20944 /* We use char because int might match the return type of a gcc2
20945    builtin and then its argument prototype would still apply.  */
20946 char bcopy (void);
20947
20948 int
20949 main (void)
20950 {
20951
20952 /* The GNU C library defines stubs for functions which it implements
20953     to always fail with ENOSYS.  Some functions are actually named
20954     something starting with __ and the normal name is an alias.  */
20955 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20956 #error found stub for bcopy
20957 #endif
20958
20959         return bcopy ();
20960   ;
20961   return 0;
20962 }
20963 _ACEOF
20964 rm -f conftest.$ac_objext conftest$ac_exeext
20965 if { (eval echo "$as_me:20965: \"$ac_link\"") >&5
20966   (eval $ac_link) 2>&5
20967   ac_status=$?
20968   echo "$as_me:20968: \$? = $ac_status" >&5
20969   (exit $ac_status); } &&
20970          { ac_try='test -s conftest$ac_exeext'
20971   { (eval echo "$as_me:20971: \"$ac_try\"") >&5
20972   (eval $ac_try) 2>&5
20973   ac_status=$?
20974   echo "$as_me:20974: \$? = $ac_status" >&5
20975   (exit $ac_status); }; }; then
20976   ac_cv_func_bcopy=yes
20977 else
20978   echo "$as_me: failed program was:" >&5
20979 cat conftest.$ac_ext >&5
20980 ac_cv_func_bcopy=no
20981 fi
20982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20983 fi
20984 echo "$as_me:20984: result: $ac_cv_func_bcopy" >&5
20985 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20986 if test $ac_cv_func_bcopy = yes; then
20987
20988         echo "$as_me:20988: checking if bcopy does overlapping moves" >&5
20989 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20990 if test "${cf_cv_good_bcopy+set}" = set; then
20991   echo $ECHO_N "(cached) $ECHO_C" >&6
20992 else
20993
20994                 if test "$cross_compiling" = yes; then
20995   cf_cv_good_bcopy=unknown
20996 else
20997   cat >conftest.$ac_ext <<_ACEOF
20998 #line 20998 "configure"
20999 #include "confdefs.h"
21000
21001 int main(void) {
21002         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21003         char temp[40];
21004         bcopy(data, temp, sizeof(data));
21005         bcopy(temp+10, temp, 15);
21006         bcopy(temp+5, temp+15, 10);
21007         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21008 }
21009
21010 _ACEOF
21011 rm -f conftest$ac_exeext
21012 if { (eval echo "$as_me:21012: \"$ac_link\"") >&5
21013   (eval $ac_link) 2>&5
21014   ac_status=$?
21015   echo "$as_me:21015: \$? = $ac_status" >&5
21016   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21017   { (eval echo "$as_me:21017: \"$ac_try\"") >&5
21018   (eval $ac_try) 2>&5
21019   ac_status=$?
21020   echo "$as_me:21020: \$? = $ac_status" >&5
21021   (exit $ac_status); }; }; then
21022   cf_cv_good_bcopy=yes
21023 else
21024   echo "$as_me: program exited with status $ac_status" >&5
21025 echo "$as_me: failed program was:" >&5
21026 cat conftest.$ac_ext >&5
21027 cf_cv_good_bcopy=no
21028 fi
21029 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21030 fi
21031
21032 fi
21033 echo "$as_me:21033: result: $cf_cv_good_bcopy" >&5
21034 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21035
21036 else
21037   cf_cv_good_bcopy=no
21038 fi
21039
21040         if test "$cf_cv_good_bcopy" = yes ; then
21041
21042 cat >>confdefs.h <<\EOF
21043 #define USE_OK_BCOPY 1
21044 EOF
21045
21046         else
21047
21048 cat >>confdefs.h <<\EOF
21049 #define USE_MY_MEMMOVE 1
21050 EOF
21051
21052         fi
21053
21054 fi
21055
21056 tty 2>&1 >/dev/null || {
21057 for ac_func in posix_openpt
21058 do
21059 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21060 echo "$as_me:21060: checking for $ac_func" >&5
21061 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21062 if eval "test \"\${$as_ac_var+set}\" = set"; then
21063   echo $ECHO_N "(cached) $ECHO_C" >&6
21064 else
21065   cat >conftest.$ac_ext <<_ACEOF
21066 #line 21066 "configure"
21067 #include "confdefs.h"
21068 #define $ac_func autoconf_temporary
21069 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21070 #undef $ac_func
21071
21072 #ifdef __cplusplus
21073 extern "C"
21074 #endif
21075
21076 /* We use char because int might match the return type of a gcc2
21077    builtin and then its argument prototype would still apply.  */
21078 char $ac_func (void);
21079
21080 int
21081 main (void)
21082 {
21083
21084 /* The GNU C library defines stubs for functions which it implements
21085     to always fail with ENOSYS.  Some functions are actually named
21086     something starting with __ and the normal name is an alias.  */
21087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21088 #error found stub for $ac_func
21089 #endif
21090
21091         return $ac_func ();
21092   ;
21093   return 0;
21094 }
21095 _ACEOF
21096 rm -f conftest.$ac_objext conftest$ac_exeext
21097 if { (eval echo "$as_me:21097: \"$ac_link\"") >&5
21098   (eval $ac_link) 2>&5
21099   ac_status=$?
21100   echo "$as_me:21100: \$? = $ac_status" >&5
21101   (exit $ac_status); } &&
21102          { ac_try='test -s conftest$ac_exeext'
21103   { (eval echo "$as_me:21103: \"$ac_try\"") >&5
21104   (eval $ac_try) 2>&5
21105   ac_status=$?
21106   echo "$as_me:21106: \$? = $ac_status" >&5
21107   (exit $ac_status); }; }; then
21108   eval "$as_ac_var=yes"
21109 else
21110   echo "$as_me: failed program was:" >&5
21111 cat conftest.$ac_ext >&5
21112 eval "$as_ac_var=no"
21113 fi
21114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21115 fi
21116 echo "$as_me:21116: result: `eval echo '${'$as_ac_var'}'`" >&5
21117 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21118 if test `eval echo '${'$as_ac_var'}'` = yes; then
21119   cat >>confdefs.h <<EOF
21120 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21121 EOF
21122
21123 fi
21124 done
21125  }
21126 echo "$as_me:21126: checking if poll really works" >&5
21127 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21128 if test "${cf_cv_working_poll+set}" = set; then
21129   echo $ECHO_N "(cached) $ECHO_C" >&6
21130 else
21131
21132 if test "$cross_compiling" = yes; then
21133   cf_cv_working_poll=unknown
21134 else
21135   cat >conftest.$ac_ext <<_ACEOF
21136 #line 21136 "configure"
21137 #include "confdefs.h"
21138
21139 #include <stdlib.h>
21140 #include <stdio.h>
21141 #include <unistd.h>
21142 #include <fcntl.h>
21143 #ifdef HAVE_POLL_H
21144 #include <poll.h>
21145 #else
21146 #include <sys/poll.h>
21147 #endif
21148 int main(void) {
21149         struct pollfd myfds;
21150         int ret;
21151
21152         /* check for Darwin bug with respect to "devices" */
21153         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21154         if (myfds.fd < 0)
21155                 myfds.fd = 0;
21156         myfds.events = POLLIN;
21157         myfds.revents = 0;
21158
21159         ret = poll(&myfds, 1, 100);
21160
21161         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21162                 ret = -1;
21163         } else {
21164                 int fd = 0;
21165                 if (!isatty(fd)) {
21166                         fd = open("/dev/tty", 2);       /* O_RDWR */
21167                 }
21168 #ifdef HAVE_POSIX_OPENPT
21169                 if (fd < 0) {
21170                         fd = posix_openpt(O_RDWR);
21171                 }
21172 #endif
21173
21174                 if (fd >= 0) {
21175                         /* also check with standard input */
21176                         myfds.fd = fd;
21177                         myfds.events = POLLIN;
21178                         myfds.revents = 0;
21179                         ret = poll(&myfds, 1, 100);
21180                 } else {
21181                         ret = -1;
21182                 }
21183         }
21184         ${cf_cv_main_return:-return}(ret < 0);
21185 }
21186 _ACEOF
21187 rm -f conftest$ac_exeext
21188 if { (eval echo "$as_me:21188: \"$ac_link\"") >&5
21189   (eval $ac_link) 2>&5
21190   ac_status=$?
21191   echo "$as_me:21191: \$? = $ac_status" >&5
21192   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21193   { (eval echo "$as_me:21193: \"$ac_try\"") >&5
21194   (eval $ac_try) 2>&5
21195   ac_status=$?
21196   echo "$as_me:21196: \$? = $ac_status" >&5
21197   (exit $ac_status); }; }; then
21198   cf_cv_working_poll=yes
21199 else
21200   echo "$as_me: program exited with status $ac_status" >&5
21201 echo "$as_me: failed program was:" >&5
21202 cat conftest.$ac_ext >&5
21203 cf_cv_working_poll=no
21204 fi
21205 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21206 fi
21207 fi
21208 echo "$as_me:21208: result: $cf_cv_working_poll" >&5
21209 echo "${ECHO_T}$cf_cv_working_poll" >&6
21210 test "$cf_cv_working_poll" = "yes" &&
21211 cat >>confdefs.h <<\EOF
21212 #define HAVE_WORKING_POLL 1
21213 EOF
21214
21215 echo "$as_me:21215: checking for va_copy" >&5
21216 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21217 if test "${cf_cv_have_va_copy+set}" = set; then
21218   echo $ECHO_N "(cached) $ECHO_C" >&6
21219 else
21220
21221 cat >conftest.$ac_ext <<_ACEOF
21222 #line 21222 "configure"
21223 #include "confdefs.h"
21224
21225 #include <stdarg.h>
21226
21227 int
21228 main (void)
21229 {
21230
21231         static va_list dst;
21232         static va_list src;
21233         va_copy(dst, src)
21234   ;
21235   return 0;
21236 }
21237 _ACEOF
21238 rm -f conftest.$ac_objext conftest$ac_exeext
21239 if { (eval echo "$as_me:21239: \"$ac_link\"") >&5
21240   (eval $ac_link) 2>&5
21241   ac_status=$?
21242   echo "$as_me:21242: \$? = $ac_status" >&5
21243   (exit $ac_status); } &&
21244          { ac_try='test -s conftest$ac_exeext'
21245   { (eval echo "$as_me:21245: \"$ac_try\"") >&5
21246   (eval $ac_try) 2>&5
21247   ac_status=$?
21248   echo "$as_me:21248: \$? = $ac_status" >&5
21249   (exit $ac_status); }; }; then
21250   cf_cv_have_va_copy=yes
21251 else
21252   echo "$as_me: failed program was:" >&5
21253 cat conftest.$ac_ext >&5
21254 cf_cv_have_va_copy=no
21255 fi
21256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21257 fi
21258 echo "$as_me:21258: result: $cf_cv_have_va_copy" >&5
21259 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21260
21261 if test "$cf_cv_have_va_copy" = yes;
21262 then
21263
21264 cat >>confdefs.h <<\EOF
21265 #define HAVE_VA_COPY 1
21266 EOF
21267
21268 else # !cf_cv_have_va_copy
21269
21270 echo "$as_me:21270: checking for __va_copy" >&5
21271 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21272 if test "${cf_cv_have___va_copy+set}" = set; then
21273   echo $ECHO_N "(cached) $ECHO_C" >&6
21274 else
21275
21276 cat >conftest.$ac_ext <<_ACEOF
21277 #line 21277 "configure"
21278 #include "confdefs.h"
21279
21280 #include <stdarg.h>
21281
21282 int
21283 main (void)
21284 {
21285
21286         static va_list dst;
21287         static va_list src;
21288         __va_copy(dst, src)
21289   ;
21290   return 0;
21291 }
21292 _ACEOF
21293 rm -f conftest.$ac_objext conftest$ac_exeext
21294 if { (eval echo "$as_me:21294: \"$ac_link\"") >&5
21295   (eval $ac_link) 2>&5
21296   ac_status=$?
21297   echo "$as_me:21297: \$? = $ac_status" >&5
21298   (exit $ac_status); } &&
21299          { ac_try='test -s conftest$ac_exeext'
21300   { (eval echo "$as_me:21300: \"$ac_try\"") >&5
21301   (eval $ac_try) 2>&5
21302   ac_status=$?
21303   echo "$as_me:21303: \$? = $ac_status" >&5
21304   (exit $ac_status); }; }; then
21305   cf_cv_have___va_copy=yes
21306 else
21307   echo "$as_me: failed program was:" >&5
21308 cat conftest.$ac_ext >&5
21309 cf_cv_have___va_copy=no
21310 fi
21311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21312 fi
21313 echo "$as_me:21313: result: $cf_cv_have___va_copy" >&5
21314 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21315
21316 if test "$cf_cv_have___va_copy" = yes
21317 then
21318
21319 cat >>confdefs.h <<\EOF
21320 #define HAVE___VA_COPY 1
21321 EOF
21322
21323 else # !cf_cv_have___va_copy
21324
21325 echo "$as_me:21325: checking for __builtin_va_copy" >&5
21326 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21327 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21328   echo $ECHO_N "(cached) $ECHO_C" >&6
21329 else
21330
21331 cat >conftest.$ac_ext <<_ACEOF
21332 #line 21332 "configure"
21333 #include "confdefs.h"
21334
21335 #include <stdarg.h>
21336
21337 int
21338 main (void)
21339 {
21340
21341         static va_list dst;
21342         static va_list src;
21343         __builtin_va_copy(dst, src)
21344   ;
21345   return 0;
21346 }
21347 _ACEOF
21348 rm -f conftest.$ac_objext conftest$ac_exeext
21349 if { (eval echo "$as_me:21349: \"$ac_link\"") >&5
21350   (eval $ac_link) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit $ac_status); } &&
21354          { ac_try='test -s conftest$ac_exeext'
21355   { (eval echo "$as_me:21355: \"$ac_try\"") >&5
21356   (eval $ac_try) 2>&5
21357   ac_status=$?
21358   echo "$as_me:21358: \$? = $ac_status" >&5
21359   (exit $ac_status); }; }; then
21360   cf_cv_have___builtin_va_copy=yes
21361 else
21362   echo "$as_me: failed program was:" >&5
21363 cat conftest.$ac_ext >&5
21364 cf_cv_have___builtin_va_copy=no
21365 fi
21366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21367 fi
21368 echo "$as_me:21368: result: $cf_cv_have___builtin_va_copy" >&5
21369 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21370
21371 test "$cf_cv_have___builtin_va_copy" = yes &&
21372
21373 cat >>confdefs.h <<\EOF
21374 #define HAVE___BUILTIN_VA_COPY 1
21375 EOF
21376
21377 fi # cf_cv_have___va_copy
21378
21379 fi # cf_cv_have_va_copy
21380
21381 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21382 (*yes*)
21383         ;;
21384
21385 (*)
21386         echo "$as_me:21386: checking if we can simply copy va_list" >&5
21387 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21388 if test "${cf_cv_pointer_va_list+set}" = set; then
21389   echo $ECHO_N "(cached) $ECHO_C" >&6
21390 else
21391
21392 cat >conftest.$ac_ext <<_ACEOF
21393 #line 21393 "configure"
21394 #include "confdefs.h"
21395
21396 #include <stdarg.h>
21397
21398 int
21399 main (void)
21400 {
21401
21402         va_list dst;
21403         va_list src;
21404         dst = src
21405   ;
21406   return 0;
21407 }
21408 _ACEOF
21409 rm -f conftest.$ac_objext conftest$ac_exeext
21410 if { (eval echo "$as_me:21410: \"$ac_link\"") >&5
21411   (eval $ac_link) 2>&5
21412   ac_status=$?
21413   echo "$as_me:21413: \$? = $ac_status" >&5
21414   (exit $ac_status); } &&
21415          { ac_try='test -s conftest$ac_exeext'
21416   { (eval echo "$as_me:21416: \"$ac_try\"") >&5
21417   (eval $ac_try) 2>&5
21418   ac_status=$?
21419   echo "$as_me:21419: \$? = $ac_status" >&5
21420   (exit $ac_status); }; }; then
21421   cf_cv_pointer_va_list=yes
21422 else
21423   echo "$as_me: failed program was:" >&5
21424 cat conftest.$ac_ext >&5
21425 cf_cv_pointer_va_list=no
21426 fi
21427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21428 fi
21429 echo "$as_me:21429: result: $cf_cv_pointer_va_list" >&5
21430 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21431
21432         if test "$cf_cv_pointer_va_list" = no
21433         then
21434                 echo "$as_me:21434: checking if we can copy va_list indirectly" >&5
21435 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21436 if test "${cf_cv_array_va_list+set}" = set; then
21437   echo $ECHO_N "(cached) $ECHO_C" >&6
21438 else
21439
21440 cat >conftest.$ac_ext <<_ACEOF
21441 #line 21441 "configure"
21442 #include "confdefs.h"
21443
21444 #include <stdarg.h>
21445
21446 int
21447 main (void)
21448 {
21449
21450         va_list dst;
21451         va_list src;
21452         *dst = *src
21453   ;
21454   return 0;
21455 }
21456 _ACEOF
21457 rm -f conftest.$ac_objext conftest$ac_exeext
21458 if { (eval echo "$as_me:21458: \"$ac_link\"") >&5
21459   (eval $ac_link) 2>&5
21460   ac_status=$?
21461   echo "$as_me:21461: \$? = $ac_status" >&5
21462   (exit $ac_status); } &&
21463          { ac_try='test -s conftest$ac_exeext'
21464   { (eval echo "$as_me:21464: \"$ac_try\"") >&5
21465   (eval $ac_try) 2>&5
21466   ac_status=$?
21467   echo "$as_me:21467: \$? = $ac_status" >&5
21468   (exit $ac_status); }; }; then
21469   cf_cv_array_va_list=yes
21470 else
21471   echo "$as_me: failed program was:" >&5
21472 cat conftest.$ac_ext >&5
21473 cf_cv_array_va_list=no
21474 fi
21475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21476 fi
21477 echo "$as_me:21477: result: $cf_cv_array_va_list" >&5
21478 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21479                 test "$cf_cv_array_va_list" = yes &&
21480 cat >>confdefs.h <<\EOF
21481 #define ARRAY_VA_LIST 1
21482 EOF
21483
21484         fi
21485         ;;
21486 esac
21487
21488 echo "$as_me:21488: checking for pid_t" >&5
21489 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21490 if test "${ac_cv_type_pid_t+set}" = set; then
21491   echo $ECHO_N "(cached) $ECHO_C" >&6
21492 else
21493   cat >conftest.$ac_ext <<_ACEOF
21494 #line 21494 "configure"
21495 #include "confdefs.h"
21496 $ac_includes_default
21497 int
21498 main (void)
21499 {
21500 if ((pid_t *) 0)
21501   return 0;
21502 if (sizeof (pid_t))
21503   return 0;
21504   ;
21505   return 0;
21506 }
21507 _ACEOF
21508 rm -f conftest.$ac_objext
21509 if { (eval echo "$as_me:21509: \"$ac_compile\"") >&5
21510   (eval $ac_compile) 2>&5
21511   ac_status=$?
21512   echo "$as_me:21512: \$? = $ac_status" >&5
21513   (exit $ac_status); } &&
21514          { ac_try='test -s conftest.$ac_objext'
21515   { (eval echo "$as_me:21515: \"$ac_try\"") >&5
21516   (eval $ac_try) 2>&5
21517   ac_status=$?
21518   echo "$as_me:21518: \$? = $ac_status" >&5
21519   (exit $ac_status); }; }; then
21520   ac_cv_type_pid_t=yes
21521 else
21522   echo "$as_me: failed program was:" >&5
21523 cat conftest.$ac_ext >&5
21524 ac_cv_type_pid_t=no
21525 fi
21526 rm -f conftest.$ac_objext conftest.$ac_ext
21527 fi
21528 echo "$as_me:21528: result: $ac_cv_type_pid_t" >&5
21529 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21530 if test $ac_cv_type_pid_t = yes; then
21531   :
21532 else
21533
21534 cat >>confdefs.h <<EOF
21535 #define pid_t int
21536 EOF
21537
21538 fi
21539
21540 for ac_header in unistd.h vfork.h
21541 do
21542 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21543 echo "$as_me:21543: checking for $ac_header" >&5
21544 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21545 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21546   echo $ECHO_N "(cached) $ECHO_C" >&6
21547 else
21548   cat >conftest.$ac_ext <<_ACEOF
21549 #line 21549 "configure"
21550 #include "confdefs.h"
21551 #include <$ac_header>
21552 _ACEOF
21553 if { (eval echo "$as_me:21553: \"$ac_cpp conftest.$ac_ext\"") >&5
21554   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21555   ac_status=$?
21556   egrep -v '^ *\+' conftest.er1 >conftest.err
21557   rm -f conftest.er1
21558   cat conftest.err >&5
21559   echo "$as_me:21559: \$? = $ac_status" >&5
21560   (exit $ac_status); } >/dev/null; then
21561   if test -s conftest.err; then
21562     ac_cpp_err=$ac_c_preproc_warn_flag
21563   else
21564     ac_cpp_err=
21565   fi
21566 else
21567   ac_cpp_err=yes
21568 fi
21569 if test -z "$ac_cpp_err"; then
21570   eval "$as_ac_Header=yes"
21571 else
21572   echo "$as_me: failed program was:" >&5
21573   cat conftest.$ac_ext >&5
21574   eval "$as_ac_Header=no"
21575 fi
21576 rm -f conftest.err conftest.$ac_ext
21577 fi
21578 echo "$as_me:21578: result: `eval echo '${'$as_ac_Header'}'`" >&5
21579 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21580 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21581   cat >>confdefs.h <<EOF
21582 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21583 EOF
21584
21585 fi
21586 done
21587
21588 for ac_func in fork vfork
21589 do
21590 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21591 echo "$as_me:21591: checking for $ac_func" >&5
21592 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21593 if eval "test \"\${$as_ac_var+set}\" = set"; then
21594   echo $ECHO_N "(cached) $ECHO_C" >&6
21595 else
21596   cat >conftest.$ac_ext <<_ACEOF
21597 #line 21597 "configure"
21598 #include "confdefs.h"
21599 #define $ac_func autoconf_temporary
21600 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21601 #undef $ac_func
21602
21603 #ifdef __cplusplus
21604 extern "C"
21605 #endif
21606
21607 /* We use char because int might match the return type of a gcc2
21608    builtin and then its argument prototype would still apply.  */
21609 char $ac_func (void);
21610
21611 int
21612 main (void)
21613 {
21614
21615 /* The GNU C library defines stubs for functions which it implements
21616     to always fail with ENOSYS.  Some functions are actually named
21617     something starting with __ and the normal name is an alias.  */
21618 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21619 #error found stub for $ac_func
21620 #endif
21621
21622         return $ac_func ();
21623   ;
21624   return 0;
21625 }
21626 _ACEOF
21627 rm -f conftest.$ac_objext conftest$ac_exeext
21628 if { (eval echo "$as_me:21628: \"$ac_link\"") >&5
21629   (eval $ac_link) 2>&5
21630   ac_status=$?
21631   echo "$as_me:21631: \$? = $ac_status" >&5
21632   (exit $ac_status); } &&
21633          { ac_try='test -s conftest$ac_exeext'
21634   { (eval echo "$as_me:21634: \"$ac_try\"") >&5
21635   (eval $ac_try) 2>&5
21636   ac_status=$?
21637   echo "$as_me:21637: \$? = $ac_status" >&5
21638   (exit $ac_status); }; }; then
21639   eval "$as_ac_var=yes"
21640 else
21641   echo "$as_me: failed program was:" >&5
21642 cat conftest.$ac_ext >&5
21643 eval "$as_ac_var=no"
21644 fi
21645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21646 fi
21647 echo "$as_me:21647: result: `eval echo '${'$as_ac_var'}'`" >&5
21648 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21649 if test `eval echo '${'$as_ac_var'}'` = yes; then
21650   cat >>confdefs.h <<EOF
21651 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21652 EOF
21653
21654 fi
21655 done
21656
21657 ac_cv_func_fork_works=$ac_cv_func_fork
21658 if test "x$ac_cv_func_fork" = xyes; then
21659   echo "$as_me:21659: checking for working fork" >&5
21660 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21661 if test "${ac_cv_func_fork_works+set}" = set; then
21662   echo $ECHO_N "(cached) $ECHO_C" >&6
21663 else
21664   if test "$cross_compiling" = yes; then
21665   ac_cv_func_fork_works=cross
21666 else
21667   cat >conftest.$ac_ext <<_ACEOF
21668 /* By Rüdiger Kuhlmann. */
21669       #include <sys/types.h>
21670       #if HAVE_UNISTD_H
21671       # include <unistd.h>
21672       #endif
21673       /* Some systems only have a dummy stub for fork() */
21674       int main (void)
21675       {
21676         if (fork() < 0)
21677           $ac_main_return (1);
21678         $ac_main_return (0);
21679       }
21680 _ACEOF
21681 rm -f conftest$ac_exeext
21682 if { (eval echo "$as_me:21682: \"$ac_link\"") >&5
21683   (eval $ac_link) 2>&5
21684   ac_status=$?
21685   echo "$as_me:21685: \$? = $ac_status" >&5
21686   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21687   { (eval echo "$as_me:21687: \"$ac_try\"") >&5
21688   (eval $ac_try) 2>&5
21689   ac_status=$?
21690   echo "$as_me:21690: \$? = $ac_status" >&5
21691   (exit $ac_status); }; }; then
21692   ac_cv_func_fork_works=yes
21693 else
21694   echo "$as_me: program exited with status $ac_status" >&5
21695 echo "$as_me: failed program was:" >&5
21696 cat conftest.$ac_ext >&5
21697 ac_cv_func_fork_works=no
21698 fi
21699 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21700 fi
21701 fi
21702 echo "$as_me:21702: result: $ac_cv_func_fork_works" >&5
21703 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21704
21705 fi
21706 if test "x$ac_cv_func_fork_works" = xcross; then
21707   case $host in
21708     *-*-amigaos* | *-*-msdosdjgpp*)
21709       # Override, as these systems have only a dummy fork() stub
21710       ac_cv_func_fork_works=no
21711       ;;
21712     *)
21713       ac_cv_func_fork_works=yes
21714       ;;
21715   esac
21716   { echo "$as_me:21716: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21717 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21718 fi
21719 ac_cv_func_vfork_works=$ac_cv_func_vfork
21720 if test "x$ac_cv_func_vfork" = xyes; then
21721   echo "$as_me:21721: checking for working vfork" >&5
21722 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21723 if test "${ac_cv_func_vfork_works+set}" = set; then
21724   echo $ECHO_N "(cached) $ECHO_C" >&6
21725 else
21726   if test "$cross_compiling" = yes; then
21727   ac_cv_func_vfork_works=cross
21728 else
21729   cat >conftest.$ac_ext <<_ACEOF
21730 #line 21730 "configure"
21731 #include "confdefs.h"
21732 /* Thanks to Paul Eggert for this test.  */
21733 #include <stdio.h>
21734 #include <sys/types.h>
21735 #include <sys/stat.h>
21736 #if HAVE_UNISTD_H
21737 # include <unistd.h>
21738 #endif
21739 #if HAVE_VFORK_H
21740 # include <vfork.h>
21741 #endif
21742 /* On some sparc systems, changes by the child to local and incoming
21743    argument registers are propagated back to the parent.  The compiler
21744    is told about this with #include <vfork.h>, but some compilers
21745    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21746    static variable whose address is put into a register that is
21747    clobbered by the vfork.  */
21748 static
21749 #ifdef __cplusplus
21750 sparc_address_test (int arg)
21751 # else
21752 sparc_address_test (arg) int arg;
21753 #endif
21754 {
21755   static pid_t child;
21756   if (!child) {
21757     child = vfork ();
21758     if (child < 0) {
21759       perror ("vfork");
21760       _exit(2);
21761     }
21762     if (!child) {
21763       arg = getpid();
21764       write(-1, "", 0);
21765       _exit (arg);
21766     }
21767   }
21768 }
21769
21770 int
21771 main (void)
21772 {
21773   pid_t parent = getpid ();
21774   pid_t child;
21775
21776   sparc_address_test ();
21777
21778   child = vfork ();
21779
21780   if (child == 0) {
21781     /* Here is another test for sparc vfork register problems.  This
21782        test uses lots of local variables, at least as many local
21783        variables as main has allocated so far including compiler
21784        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21785        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21786        reuse the register of parent for one of the local variables,
21787        since it will think that parent can't possibly be used any more
21788        in this routine.  Assigning to the local variable will thus
21789        munge parent in the parent process.  */
21790     pid_t
21791       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21792       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21793     /* Convince the compiler that p..p7 are live; otherwise, it might
21794        use the same hardware register for all 8 local variables.  */
21795     if (p != p1 || p != p2 || p != p3 || p != p4
21796         || p != p5 || p != p6 || p != p7)
21797       _exit(1);
21798
21799     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21800        from child file descriptors.  If the child closes a descriptor
21801        before it execs or exits, this munges the parent's descriptor
21802        as well.  Test for this by closing stdout in the child.  */
21803     _exit(close(fileno(stdout)) != 0);
21804   } else {
21805     int status;
21806     struct stat st;
21807
21808     while (wait(&status) != child)
21809       ;
21810     $ac_main_return(
21811          /* Was there some problem with vforking?  */
21812          child < 0
21813
21814          /* Did the child fail?  (This shouldn't happen.)  */
21815          || status
21816
21817          /* Did the vfork/compiler bug occur?  */
21818          || parent != getpid()
21819
21820          /* Did the file descriptor bug occur?  */
21821          || fstat(fileno(stdout), &st) != 0
21822          );
21823   }
21824 }
21825 _ACEOF
21826 rm -f conftest$ac_exeext
21827 if { (eval echo "$as_me:21827: \"$ac_link\"") >&5
21828   (eval $ac_link) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21832   { (eval echo "$as_me:21832: \"$ac_try\"") >&5
21833   (eval $ac_try) 2>&5
21834   ac_status=$?
21835   echo "$as_me:21835: \$? = $ac_status" >&5
21836   (exit $ac_status); }; }; then
21837   ac_cv_func_vfork_works=yes
21838 else
21839   echo "$as_me: program exited with status $ac_status" >&5
21840 echo "$as_me: failed program was:" >&5
21841 cat conftest.$ac_ext >&5
21842 ac_cv_func_vfork_works=no
21843 fi
21844 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21845 fi
21846 fi
21847 echo "$as_me:21847: result: $ac_cv_func_vfork_works" >&5
21848 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21849
21850 fi;
21851 if test "x$ac_cv_func_fork_works" = xcross; then
21852   ac_cv_func_vfork_works=ac_cv_func_vfork
21853   { echo "$as_me:21853: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21854 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21855 fi
21856
21857 if test "x$ac_cv_func_vfork_works" = xyes; then
21858
21859 cat >>confdefs.h <<\EOF
21860 #define HAVE_WORKING_VFORK 1
21861 EOF
21862
21863 else
21864
21865 cat >>confdefs.h <<\EOF
21866 #define vfork fork
21867 EOF
21868
21869 fi
21870 if test "x$ac_cv_func_fork_works" = xyes; then
21871
21872 cat >>confdefs.h <<\EOF
21873 #define HAVE_WORKING_FORK 1
21874 EOF
21875
21876 fi
21877
21878 echo "$as_me:21878: checking if fopen accepts explicit binary mode" >&5
21879 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21880 if test "${cf_cv_fopen_bin_r+set}" = set; then
21881   echo $ECHO_N "(cached) $ECHO_C" >&6
21882 else
21883
21884         if test "$cross_compiling" = yes; then
21885   cf_cv_fopen_bin_r=unknown
21886 else
21887   cat >conftest.$ac_ext <<_ACEOF
21888 #line 21888 "configure"
21889 #include "confdefs.h"
21890
21891 #include <stdio.h>
21892 int main(void) {
21893         FILE *fp = fopen("conftest.tmp", "wb");
21894         int rc = 0;
21895         if (fp != 0) {
21896                 int p, q;
21897                 for (p = 0; p < 256; ++p) {
21898                         fputc(p, fp);
21899                 }
21900                 fclose(fp);
21901                 fp = fopen("conftest.tmp", "rb");
21902                 if (fp != 0) {
21903                         for (p = 0; p < 256; ++p) {
21904                                 q = fgetc(fp);
21905                                 if (q != p) {
21906                                         rc = 1;
21907                                         break;
21908                                 }
21909                         }
21910                 } else {
21911                         rc = 1;
21912                 }
21913         } else {
21914                 rc = 1;
21915         }
21916         ${cf_cv_main_return:-return} (rc);
21917 }
21918
21919 _ACEOF
21920 rm -f conftest$ac_exeext
21921 if { (eval echo "$as_me:21921: \"$ac_link\"") >&5
21922   (eval $ac_link) 2>&5
21923   ac_status=$?
21924   echo "$as_me:21924: \$? = $ac_status" >&5
21925   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21926   { (eval echo "$as_me:21926: \"$ac_try\"") >&5
21927   (eval $ac_try) 2>&5
21928   ac_status=$?
21929   echo "$as_me:21929: \$? = $ac_status" >&5
21930   (exit $ac_status); }; }; then
21931   cf_cv_fopen_bin_r=yes
21932 else
21933   echo "$as_me: program exited with status $ac_status" >&5
21934 echo "$as_me: failed program was:" >&5
21935 cat conftest.$ac_ext >&5
21936 cf_cv_fopen_bin_r=no
21937 fi
21938 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21939 fi
21940
21941 fi
21942 echo "$as_me:21942: result: $cf_cv_fopen_bin_r" >&5
21943 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21944 test "x$cf_cv_fopen_bin_r" != xno && cat >>confdefs.h <<\EOF
21945 #define USE_FOPEN_BIN_R 1
21946 EOF
21947
21948 # special check for test/ditto.c
21949
21950 echo "$as_me:21950: checking for openpty in -lutil" >&5
21951 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21952 if test "${ac_cv_lib_util_openpty+set}" = set; then
21953   echo $ECHO_N "(cached) $ECHO_C" >&6
21954 else
21955   ac_check_lib_save_LIBS=$LIBS
21956 LIBS="-lutil  $LIBS"
21957 cat >conftest.$ac_ext <<_ACEOF
21958 #line 21958 "configure"
21959 #include "confdefs.h"
21960
21961 /* Override any gcc2 internal prototype to avoid an error.  */
21962 #ifdef __cplusplus
21963 extern "C"
21964 #endif
21965 /* We use char because int might match the return type of a gcc2
21966    builtin and then its argument prototype would still apply.  */
21967 char openpty ();
21968 int
21969 main (void)
21970 {
21971 openpty ();
21972   ;
21973   return 0;
21974 }
21975 _ACEOF
21976 rm -f conftest.$ac_objext conftest$ac_exeext
21977 if { (eval echo "$as_me:21977: \"$ac_link\"") >&5
21978   (eval $ac_link) 2>&5
21979   ac_status=$?
21980   echo "$as_me:21980: \$? = $ac_status" >&5
21981   (exit $ac_status); } &&
21982          { ac_try='test -s conftest$ac_exeext'
21983   { (eval echo "$as_me:21983: \"$ac_try\"") >&5
21984   (eval $ac_try) 2>&5
21985   ac_status=$?
21986   echo "$as_me:21986: \$? = $ac_status" >&5
21987   (exit $ac_status); }; }; then
21988   ac_cv_lib_util_openpty=yes
21989 else
21990   echo "$as_me: failed program was:" >&5
21991 cat conftest.$ac_ext >&5
21992 ac_cv_lib_util_openpty=no
21993 fi
21994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21995 LIBS=$ac_check_lib_save_LIBS
21996 fi
21997 echo "$as_me:21997: result: $ac_cv_lib_util_openpty" >&5
21998 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
21999 if test $ac_cv_lib_util_openpty = yes; then
22000   cf_cv_lib_util=yes
22001 else
22002   cf_cv_lib_util=no
22003 fi
22004
22005 echo "$as_me:22005: checking for openpty header" >&5
22006 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22007 if test "${cf_cv_func_openpty+set}" = set; then
22008   echo $ECHO_N "(cached) $ECHO_C" >&6
22009 else
22010
22011         cf_save_LIBS="$LIBS"
22012         test $cf_cv_lib_util = yes && {
22013 cf_add_libs="-lutil"
22014 # Filter out duplicates - this happens with badly-designed ".pc" files...
22015 for cf_add_1lib in $LIBS
22016 do
22017         for cf_add_2lib in $cf_add_libs
22018         do
22019                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22020                 then
22021                         cf_add_1lib=
22022                         break
22023                 fi
22024         done
22025         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22026 done
22027 LIBS="$cf_add_libs"
22028  }
22029         for cf_header in pty.h libutil.h util.h
22030         do
22031         cat >conftest.$ac_ext <<_ACEOF
22032 #line 22032 "configure"
22033 #include "confdefs.h"
22034
22035 #include <$cf_header>
22036
22037 int
22038 main (void)
22039 {
22040
22041         int x = openpty((int *)0, (int *)0, (char *)0,
22042                                    (struct termios *)0, (struct winsize *)0);
22043
22044   ;
22045   return 0;
22046 }
22047 _ACEOF
22048 rm -f conftest.$ac_objext conftest$ac_exeext
22049 if { (eval echo "$as_me:22049: \"$ac_link\"") >&5
22050   (eval $ac_link) 2>&5
22051   ac_status=$?
22052   echo "$as_me:22052: \$? = $ac_status" >&5
22053   (exit $ac_status); } &&
22054          { ac_try='test -s conftest$ac_exeext'
22055   { (eval echo "$as_me:22055: \"$ac_try\"") >&5
22056   (eval $ac_try) 2>&5
22057   ac_status=$?
22058   echo "$as_me:22058: \$? = $ac_status" >&5
22059   (exit $ac_status); }; }; then
22060
22061                 cf_cv_func_openpty=$cf_header
22062                 break
22063
22064 else
22065   echo "$as_me: failed program was:" >&5
22066 cat conftest.$ac_ext >&5
22067
22068                 cf_cv_func_openpty=no
22069
22070 fi
22071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22072         done
22073         LIBS="$cf_save_LIBS"
22074
22075 fi
22076 echo "$as_me:22076: result: $cf_cv_func_openpty" >&5
22077 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22078
22079 if test "$cf_cv_func_openpty" != no ; then
22080
22081 cat >>confdefs.h <<EOF
22082 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22083 EOF
22084
22085 cat >>confdefs.h <<\EOF
22086 #define USE_XTERM_PTY 1
22087 EOF
22088
22089         if test "x$cf_cv_lib_util" = xyes ; then
22090
22091 cf_add_libs="-lutil"
22092 # Filter out duplicates - this happens with badly-designed ".pc" files...
22093 for cf_add_1lib in $TEST_LIBS
22094 do
22095         for cf_add_2lib in $cf_add_libs
22096         do
22097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22098                 then
22099                         cf_add_1lib=
22100                         break
22101                 fi
22102         done
22103         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22104 done
22105 TEST_LIBS="$cf_add_libs"
22106
22107         fi
22108 fi
22109
22110 if test "$with_hashed_db" != no ; then
22111
22112 cat >>confdefs.h <<\EOF
22113 #define USE_HASHED_DB 1
22114 EOF
22115
22116 case $with_hashed_db in
22117 (yes|*able*)
22118         ;;
22119 (*)
22120         if test -d "$with_hashed_db" ; then
22121
22122 if test -n "$with_hashed_db/include" ; then
22123   for cf_add_incdir in $with_hashed_db/include
22124   do
22125         while test $cf_add_incdir != /usr/include
22126         do
22127           if test -d $cf_add_incdir
22128           then
22129                 cf_have_incdir=no
22130                 if test -n "$CFLAGS$CPPFLAGS" ; then
22131                   # a loop is needed to ensure we can add subdirs of existing dirs
22132                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22133                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22134                           cf_have_incdir=yes; break
22135                         fi
22136                   done
22137                 fi
22138
22139                 if test "$cf_have_incdir" = no ; then
22140                   if test "$cf_add_incdir" = /usr/local/include ; then
22141                         if test "$GCC" = yes
22142                         then
22143                           cf_save_CPPFLAGS=$CPPFLAGS
22144
22145         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22146         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22147
22148                           cat >conftest.$ac_ext <<_ACEOF
22149 #line 22149 "configure"
22150 #include "confdefs.h"
22151 #include <stdio.h>
22152 int
22153 main (void)
22154 {
22155 printf("Hello")
22156   ;
22157   return 0;
22158 }
22159 _ACEOF
22160 rm -f conftest.$ac_objext
22161 if { (eval echo "$as_me:22161: \"$ac_compile\"") >&5
22162   (eval $ac_compile) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit $ac_status); } &&
22166          { ac_try='test -s conftest.$ac_objext'
22167   { (eval echo "$as_me:22167: \"$ac_try\"") >&5
22168   (eval $ac_try) 2>&5
22169   ac_status=$?
22170   echo "$as_me:22170: \$? = $ac_status" >&5
22171   (exit $ac_status); }; }; then
22172   :
22173 else
22174   echo "$as_me: failed program was:" >&5
22175 cat conftest.$ac_ext >&5
22176 cf_have_incdir=yes
22177 fi
22178 rm -f conftest.$ac_objext conftest.$ac_ext
22179                           CPPFLAGS=$cf_save_CPPFLAGS
22180                         fi
22181                   fi
22182                 fi
22183
22184                 if test "$cf_have_incdir" = no ; then
22185                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22186
22187 echo "${as_me:-configure}:22187: testing adding $cf_add_incdir to include-path ..." 1>&5
22188
22189                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22190
22191                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22192                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22193                   cf_add_incdir="$cf_top_incdir"
22194                 else
22195                   break
22196                 fi
22197           else
22198                 break
22199           fi
22200         done
22201   done
22202 fi
22203
22204 if test -n "$with_hashed_db/lib" ; then
22205         for cf_add_libdir in $with_hashed_db/lib
22206         do
22207                 if test $cf_add_libdir = /usr/lib ; then
22208                         :
22209                 elif test -d $cf_add_libdir
22210                 then
22211                         cf_have_libdir=no
22212                         if test -n "$LDFLAGS$LIBS" ; then
22213                                 # a loop is needed to ensure we can add subdirs of existing dirs
22214                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22215                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22216                                                 cf_have_libdir=yes; break
22217                                         fi
22218                                 done
22219                         fi
22220                         if test "$cf_have_libdir" = no ; then
22221                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22222
22223 echo "${as_me:-configure}:22223: testing adding $cf_add_libdir to library-path ..." 1>&5
22224
22225                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22226                         fi
22227                 fi
22228         done
22229 fi
22230
22231         else
22232                 case "$with_hashed_db" in
22233                 (./*|../*|/*)
22234                         { echo "$as_me:22234: WARNING: no such directory $with_hashed_db" >&5
22235 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22236                         ;;
22237                 (*)
22238
22239 cf_search=
22240
22241 test "x$prefix" != "xNONE" && \
22242 test -d "$prefix" && \
22243  {
22244         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22245         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22246         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22247         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22248         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22249         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22250 }
22251
22252 for cf_subdir_prefix in \
22253         /usr \
22254         /usr/local \
22255         /usr/pkg \
22256         /opt \
22257         /opt/local \
22258         $HOME
22259 do
22260
22261 test "x$cf_subdir_prefix" != "x$prefix" && \
22262 test -d "$cf_subdir_prefix" && \
22263 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22264         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22265         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22266         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22267         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22268         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22269         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"
22270 }
22271
22272 done
22273
22274         for cf_item in $cf_search
22275         do
22276                 case $cf_item in
22277                 (*/$with_hashed_db)
22278
22279 if test -n "$cf_item" ; then
22280   for cf_add_incdir in $cf_item
22281   do
22282         while test $cf_add_incdir != /usr/include
22283         do
22284           if test -d $cf_add_incdir
22285           then
22286                 cf_have_incdir=no
22287                 if test -n "$CFLAGS$CPPFLAGS" ; then
22288                   # a loop is needed to ensure we can add subdirs of existing dirs
22289                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22290                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22291                           cf_have_incdir=yes; break
22292                         fi
22293                   done
22294                 fi
22295
22296                 if test "$cf_have_incdir" = no ; then
22297                   if test "$cf_add_incdir" = /usr/local/include ; then
22298                         if test "$GCC" = yes
22299                         then
22300                           cf_save_CPPFLAGS=$CPPFLAGS
22301
22302         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22303         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22304
22305                           cat >conftest.$ac_ext <<_ACEOF
22306 #line 22306 "configure"
22307 #include "confdefs.h"
22308 #include <stdio.h>
22309 int
22310 main (void)
22311 {
22312 printf("Hello")
22313   ;
22314   return 0;
22315 }
22316 _ACEOF
22317 rm -f conftest.$ac_objext
22318 if { (eval echo "$as_me:22318: \"$ac_compile\"") >&5
22319   (eval $ac_compile) 2>&5
22320   ac_status=$?
22321   echo "$as_me:22321: \$? = $ac_status" >&5
22322   (exit $ac_status); } &&
22323          { ac_try='test -s conftest.$ac_objext'
22324   { (eval echo "$as_me:22324: \"$ac_try\"") >&5
22325   (eval $ac_try) 2>&5
22326   ac_status=$?
22327   echo "$as_me:22327: \$? = $ac_status" >&5
22328   (exit $ac_status); }; }; then
22329   :
22330 else
22331   echo "$as_me: failed program was:" >&5
22332 cat conftest.$ac_ext >&5
22333 cf_have_incdir=yes
22334 fi
22335 rm -f conftest.$ac_objext conftest.$ac_ext
22336                           CPPFLAGS=$cf_save_CPPFLAGS
22337                         fi
22338                   fi
22339                 fi
22340
22341                 if test "$cf_have_incdir" = no ; then
22342                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22343
22344 echo "${as_me:-configure}:22344: testing adding $cf_add_incdir to include-path ..." 1>&5
22345
22346                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22347
22348                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22349                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22350                   cf_add_incdir="$cf_top_incdir"
22351                 else
22352                   break
22353                 fi
22354           else
22355                 break
22356           fi
22357         done
22358   done
22359 fi
22360
22361                         ;;
22362                 esac
22363         done
22364
22365 cf_search=
22366
22367 test "x$prefix" != "xNONE" && \
22368 test -d "$prefix" && \
22369  {
22370         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22371         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22372         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22373         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22374         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22375         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22376 }
22377
22378 for cf_subdir_prefix in \
22379         /usr \
22380         /usr/local \
22381         /usr/pkg \
22382         /opt \
22383         /opt/local \
22384         $HOME
22385 do
22386
22387 test "x$cf_subdir_prefix" != "x$prefix" && \
22388 test -d "$cf_subdir_prefix" && \
22389 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22390         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22391         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22392         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22393         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22394         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22395         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"
22396 }
22397
22398 done
22399
22400         for cf_item in $cf_search
22401         do
22402                 case $cf_item in
22403                 (*/$with_hashed_db)
22404
22405 if test -n "$cf_item" ; then
22406         for cf_add_libdir in $cf_item
22407         do
22408                 if test $cf_add_libdir = /usr/lib ; then
22409                         :
22410                 elif test -d $cf_add_libdir
22411                 then
22412                         cf_have_libdir=no
22413                         if test -n "$LDFLAGS$LIBS" ; then
22414                                 # a loop is needed to ensure we can add subdirs of existing dirs
22415                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22416                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22417                                                 cf_have_libdir=yes; break
22418                                         fi
22419                                 done
22420                         fi
22421                         if test "$cf_have_libdir" = no ; then
22422                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22423
22424 echo "${as_me:-configure}:22424: testing adding $cf_add_libdir to library-path ..." 1>&5
22425
22426                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22427                         fi
22428                 fi
22429         done
22430 fi
22431
22432                         ;;
22433                 esac
22434         done
22435
22436                         ;;
22437                 esac
22438         fi
22439 esac
22440
22441 echo "$as_me:22441: checking for db.h" >&5
22442 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22443 if test "${ac_cv_header_db_h+set}" = set; then
22444   echo $ECHO_N "(cached) $ECHO_C" >&6
22445 else
22446   cat >conftest.$ac_ext <<_ACEOF
22447 #line 22447 "configure"
22448 #include "confdefs.h"
22449 #include <db.h>
22450 _ACEOF
22451 if { (eval echo "$as_me:22451: \"$ac_cpp conftest.$ac_ext\"") >&5
22452   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22453   ac_status=$?
22454   egrep -v '^ *\+' conftest.er1 >conftest.err
22455   rm -f conftest.er1
22456   cat conftest.err >&5
22457   echo "$as_me:22457: \$? = $ac_status" >&5
22458   (exit $ac_status); } >/dev/null; then
22459   if test -s conftest.err; then
22460     ac_cpp_err=$ac_c_preproc_warn_flag
22461   else
22462     ac_cpp_err=
22463   fi
22464 else
22465   ac_cpp_err=yes
22466 fi
22467 if test -z "$ac_cpp_err"; then
22468   ac_cv_header_db_h=yes
22469 else
22470   echo "$as_me: failed program was:" >&5
22471   cat conftest.$ac_ext >&5
22472   ac_cv_header_db_h=no
22473 fi
22474 rm -f conftest.err conftest.$ac_ext
22475 fi
22476 echo "$as_me:22476: result: $ac_cv_header_db_h" >&5
22477 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22478 if test $ac_cv_header_db_h = yes; then
22479
22480 echo "$as_me:22480: checking for version of db" >&5
22481 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22482 if test "${cf_cv_hashed_db_version+set}" = set; then
22483   echo $ECHO_N "(cached) $ECHO_C" >&6
22484 else
22485
22486 cf_cv_hashed_db_version=unknown
22487
22488 for cf_db_version in 1 2 3 4 5 6
22489 do
22490
22491 echo "${as_me:-configure}:22491: testing checking for db version $cf_db_version ..." 1>&5
22492
22493         cat >conftest.$ac_ext <<_ACEOF
22494 #line 22494 "configure"
22495 #include "confdefs.h"
22496
22497 $ac_includes_default
22498 #include <db.h>
22499
22500 #ifdef DB_VERSION_MAJOR
22501         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22502 #if $cf_db_version == DB_VERSION_MAJOR
22503         /* ok */
22504 #else
22505         make an error
22506 #endif
22507 #else
22508 #if $cf_db_version == 1
22509         /* ok: assuming this is DB 1.8.5 */
22510 #else
22511         make an error
22512 #endif
22513 #endif
22514
22515 int
22516 main (void)
22517 {
22518 DBT *foo = 0
22519   ;
22520   return 0;
22521 }
22522 _ACEOF
22523 rm -f conftest.$ac_objext
22524 if { (eval echo "$as_me:22524: \"$ac_compile\"") >&5
22525   (eval $ac_compile) 2>&5
22526   ac_status=$?
22527   echo "$as_me:22527: \$? = $ac_status" >&5
22528   (exit $ac_status); } &&
22529          { ac_try='test -s conftest.$ac_objext'
22530   { (eval echo "$as_me:22530: \"$ac_try\"") >&5
22531   (eval $ac_try) 2>&5
22532   ac_status=$?
22533   echo "$as_me:22533: \$? = $ac_status" >&5
22534   (exit $ac_status); }; }; then
22535
22536         cf_cv_hashed_db_version=$cf_db_version
22537         break
22538
22539 else
22540   echo "$as_me: failed program was:" >&5
22541 cat conftest.$ac_ext >&5
22542 fi
22543 rm -f conftest.$ac_objext conftest.$ac_ext
22544 done
22545
22546 fi
22547 echo "$as_me:22547: result: $cf_cv_hashed_db_version" >&5
22548 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22549
22550 if test "$cf_cv_hashed_db_version" = unknown ; then
22551         { { echo "$as_me:22551: error: Cannot determine version of db" >&5
22552 echo "$as_me: error: Cannot determine version of db" >&2;}
22553    { (exit 1); exit 1; }; }
22554 else
22555
22556 echo "$as_me:22556: checking for db libraries" >&5
22557 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22558 if test "${cf_cv_hashed_db_libs+set}" = set; then
22559   echo $ECHO_N "(cached) $ECHO_C" >&6
22560 else
22561
22562 cf_cv_hashed_db_libs=unknown
22563 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22564 do
22565         cf_save_libs="$LIBS"
22566         if test -n "$cf_db_libs"; then
22567
22568 cf_add_libs="-l$cf_db_libs"
22569 # Filter out duplicates - this happens with badly-designed ".pc" files...
22570 for cf_add_1lib in $LIBS
22571 do
22572         for cf_add_2lib in $cf_add_libs
22573         do
22574                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22575                 then
22576                         cf_add_1lib=
22577                         break
22578                 fi
22579         done
22580         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22581 done
22582 LIBS="$cf_add_libs"
22583
22584         fi
22585
22586 echo "${as_me:-configure}:22586: testing checking for library "$cf_db_libs" ..." 1>&5
22587
22588         cat >conftest.$ac_ext <<_ACEOF
22589 #line 22589 "configure"
22590 #include "confdefs.h"
22591
22592 $ac_includes_default
22593 #include <db.h>
22594
22595 int
22596 main (void)
22597 {
22598
22599         char *path = "/tmp/foo";
22600 #ifdef DB_VERSION_MAJOR
22601 #if DB_VERSION_MAJOR >= 4
22602         DB *result = 0;
22603         db_create(&result, NULL, 0);
22604         result->open(result,
22605                 NULL,
22606                 path,
22607                 path,
22608                 DB_HASH,
22609                 DB_CREATE,
22610                 0644);
22611 #elif DB_VERSION_MAJOR >= 3
22612         DB *result = 0;
22613         db_create(&result, NULL, 0);
22614         result->open(result,
22615                 path,
22616                 path,
22617                 DB_HASH,
22618                 DB_CREATE,
22619                 0644);
22620 #elif DB_VERSION_MAJOR >= 2
22621         DB *result = 0;
22622         db_open(path,
22623                 DB_HASH,
22624                 DB_CREATE,
22625                 0644,
22626                 (DB_ENV *) 0,
22627                 (DB_INFO *) 0,
22628                 &result);
22629 #endif /* DB_VERSION_MAJOR */
22630 #else
22631         DB *result = dbopen(path,
22632                      2,
22633                      0644,
22634                      DB_HASH,
22635                      0);
22636 #endif
22637         ${cf_cv_main_return:-return}(result != 0)
22638
22639   ;
22640   return 0;
22641 }
22642 _ACEOF
22643 rm -f conftest.$ac_objext conftest$ac_exeext
22644 if { (eval echo "$as_me:22644: \"$ac_link\"") >&5
22645   (eval $ac_link) 2>&5
22646   ac_status=$?
22647   echo "$as_me:22647: \$? = $ac_status" >&5
22648   (exit $ac_status); } &&
22649          { ac_try='test -s conftest$ac_exeext'
22650   { (eval echo "$as_me:22650: \"$ac_try\"") >&5
22651   (eval $ac_try) 2>&5
22652   ac_status=$?
22653   echo "$as_me:22653: \$? = $ac_status" >&5
22654   (exit $ac_status); }; }; then
22655
22656         if test -n "$cf_db_libs" ; then
22657                 cf_cv_hashed_db_libs=$cf_db_libs
22658         else
22659                 cf_cv_hashed_db_libs=default
22660         fi
22661         LIBS="$cf_save_libs"
22662         break
22663
22664 else
22665   echo "$as_me: failed program was:" >&5
22666 cat conftest.$ac_ext >&5
22667 fi
22668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22669         LIBS="$cf_save_libs"
22670 done
22671
22672 fi
22673 echo "$as_me:22673: result: $cf_cv_hashed_db_libs" >&5
22674 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22675
22676         if test "$cf_cv_hashed_db_libs" = unknown ; then
22677                 { { echo "$as_me:22677: error: Cannot determine library for db" >&5
22678 echo "$as_me: error: Cannot determine library for db" >&2;}
22679    { (exit 1); exit 1; }; }
22680         elif test "$cf_cv_hashed_db_libs" != default ; then
22681
22682 cf_add_libs="-l$cf_cv_hashed_db_libs"
22683 # Filter out duplicates - this happens with badly-designed ".pc" files...
22684 for cf_add_1lib in $LIBS
22685 do
22686         for cf_add_2lib in $cf_add_libs
22687         do
22688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22689                 then
22690                         cf_add_1lib=
22691                         break
22692                 fi
22693         done
22694         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22695 done
22696 LIBS="$cf_add_libs"
22697
22698         fi
22699 fi
22700
22701 else
22702
22703         { { echo "$as_me:22703: error: Cannot find db.h" >&5
22704 echo "$as_me: error: Cannot find db.h" >&2;}
22705    { (exit 1); exit 1; }; }
22706
22707 fi
22708
22709 fi
22710
22711 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22712         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22713         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22714 fi
22715
22716 # Just in case, check if the C compiler has a bool type.
22717
22718 echo "$as_me:22718: checking if we should include stdbool.h" >&5
22719 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22720
22721 if test "${cf_cv_header_stdbool_h+set}" = set; then
22722   echo $ECHO_N "(cached) $ECHO_C" >&6
22723 else
22724
22725         cat >conftest.$ac_ext <<_ACEOF
22726 #line 22726 "configure"
22727 #include "confdefs.h"
22728
22729 int
22730 main (void)
22731 {
22732 bool foo = false
22733   ;
22734   return 0;
22735 }
22736 _ACEOF
22737 rm -f conftest.$ac_objext
22738 if { (eval echo "$as_me:22738: \"$ac_compile\"") >&5
22739   (eval $ac_compile) 2>&5
22740   ac_status=$?
22741   echo "$as_me:22741: \$? = $ac_status" >&5
22742   (exit $ac_status); } &&
22743          { ac_try='test -s conftest.$ac_objext'
22744   { (eval echo "$as_me:22744: \"$ac_try\"") >&5
22745   (eval $ac_try) 2>&5
22746   ac_status=$?
22747   echo "$as_me:22747: \$? = $ac_status" >&5
22748   (exit $ac_status); }; }; then
22749   cf_cv_header_stdbool_h=0
22750 else
22751   echo "$as_me: failed program was:" >&5
22752 cat conftest.$ac_ext >&5
22753 cat >conftest.$ac_ext <<_ACEOF
22754 #line 22754 "configure"
22755 #include "confdefs.h"
22756
22757 #ifndef __BEOS__
22758 #include <stdbool.h>
22759 #endif
22760
22761 int
22762 main (void)
22763 {
22764 bool foo = false
22765   ;
22766   return 0;
22767 }
22768 _ACEOF
22769 rm -f conftest.$ac_objext
22770 if { (eval echo "$as_me:22770: \"$ac_compile\"") >&5
22771   (eval $ac_compile) 2>&5
22772   ac_status=$?
22773   echo "$as_me:22773: \$? = $ac_status" >&5
22774   (exit $ac_status); } &&
22775          { ac_try='test -s conftest.$ac_objext'
22776   { (eval echo "$as_me:22776: \"$ac_try\"") >&5
22777   (eval $ac_try) 2>&5
22778   ac_status=$?
22779   echo "$as_me:22779: \$? = $ac_status" >&5
22780   (exit $ac_status); }; }; then
22781   cf_cv_header_stdbool_h=1
22782 else
22783   echo "$as_me: failed program was:" >&5
22784 cat conftest.$ac_ext >&5
22785 cf_cv_header_stdbool_h=0
22786 fi
22787 rm -f conftest.$ac_objext conftest.$ac_ext
22788 fi
22789 rm -f conftest.$ac_objext conftest.$ac_ext
22790 fi
22791
22792 if test "$cf_cv_header_stdbool_h" = 1
22793 then    echo "$as_me:22793: result: yes" >&5
22794 echo "${ECHO_T}yes" >&6
22795 else    echo "$as_me:22795: result: no" >&5
22796 echo "${ECHO_T}no" >&6
22797 fi
22798
22799 echo "$as_me:22799: checking for builtin bool type" >&5
22800 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22801
22802 if test "${cf_cv_cc_bool_type+set}" = set; then
22803   echo $ECHO_N "(cached) $ECHO_C" >&6
22804 else
22805
22806         cat >conftest.$ac_ext <<_ACEOF
22807 #line 22807 "configure"
22808 #include "confdefs.h"
22809
22810 #include <stdio.h>
22811 #include <sys/types.h>
22812
22813 int
22814 main (void)
22815 {
22816 bool x = false
22817   ;
22818   return 0;
22819 }
22820 _ACEOF
22821 rm -f conftest.$ac_objext
22822 if { (eval echo "$as_me:22822: \"$ac_compile\"") >&5
22823   (eval $ac_compile) 2>&5
22824   ac_status=$?
22825   echo "$as_me:22825: \$? = $ac_status" >&5
22826   (exit $ac_status); } &&
22827          { ac_try='test -s conftest.$ac_objext'
22828   { (eval echo "$as_me:22828: \"$ac_try\"") >&5
22829   (eval $ac_try) 2>&5
22830   ac_status=$?
22831   echo "$as_me:22831: \$? = $ac_status" >&5
22832   (exit $ac_status); }; }; then
22833   cf_cv_cc_bool_type=1
22834 else
22835   echo "$as_me: failed program was:" >&5
22836 cat conftest.$ac_ext >&5
22837 cf_cv_cc_bool_type=0
22838 fi
22839 rm -f conftest.$ac_objext conftest.$ac_ext
22840
22841 fi
22842
22843 if test "$cf_cv_cc_bool_type" = 1
22844 then    echo "$as_me:22844: result: yes" >&5
22845 echo "${ECHO_T}yes" >&6
22846 else    echo "$as_me:22846: result: no" >&5
22847 echo "${ECHO_T}no" >&6
22848 fi
22849
22850 # Check for C++ compiler characteristics (and ensure that it's there!)
22851 if test -n "$CXX" ; then
22852         ac_ext=cc
22853 ac_cpp='$CXXCPP $CPPFLAGS'
22854 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22855 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22856 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22857 ac_main_return=return
22858
22859 if test -n "$GXX" ; then
22860
22861         cf_save="$LIBS"
22862         LIBS="$LIBS $CXXLIBS"
22863         echo "$as_me:22863: checking if we already have C++ library" >&5
22864 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22865         cat >conftest.$ac_ext <<_ACEOF
22866 #line 22866 "configure"
22867 #include "confdefs.h"
22868
22869                         #include <iostream>
22870 int
22871 main (void)
22872 {
22873
22874                         std::cout << "Hello World!" << std::endl;
22875   ;
22876   return 0;
22877 }
22878 _ACEOF
22879 rm -f conftest.$ac_objext conftest$ac_exeext
22880 if { (eval echo "$as_me:22880: \"$ac_link\"") >&5
22881   (eval $ac_link) 2>&5
22882   ac_status=$?
22883   echo "$as_me:22883: \$? = $ac_status" >&5
22884   (exit $ac_status); } &&
22885          { ac_try='test -s conftest$ac_exeext'
22886   { (eval echo "$as_me:22886: \"$ac_try\"") >&5
22887   (eval $ac_try) 2>&5
22888   ac_status=$?
22889   echo "$as_me:22889: \$? = $ac_status" >&5
22890   (exit $ac_status); }; }; then
22891   cf_have_libstdcpp=yes
22892 else
22893   echo "$as_me: failed program was:" >&5
22894 cat conftest.$ac_ext >&5
22895 cf_have_libstdcpp=no
22896 fi
22897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22898         echo "$as_me:22898: result: $cf_have_libstdcpp" >&5
22899 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22900         LIBS="$cf_save"
22901
22902         if test $cf_have_libstdcpp != yes
22903         then
22904                 case $cf_cv_system_name in
22905                 (os2*)
22906                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22907                                 cf_stdcpp_libname=stdcpp
22908                         else
22909                                 cf_stdcpp_libname=stdc++
22910                         fi
22911                         ;;
22912                 (*)
22913                         cf_stdcpp_libname=stdc++
22914                         ;;
22915                 esac
22916
22917                 echo "$as_me:22917: checking for library $cf_stdcpp_libname" >&5
22918 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22919 if test "${cf_cv_libstdcpp+set}" = set; then
22920   echo $ECHO_N "(cached) $ECHO_C" >&6
22921 else
22922
22923                         cf_save="$LIBS"
22924                         LIBS="$LIBS $CXXLIBS"
22925
22926 cf_add_libs="-l$cf_stdcpp_libname"
22927 # Filter out duplicates - this happens with badly-designed ".pc" files...
22928 for cf_add_1lib in $LIBS
22929 do
22930         for cf_add_2lib in $cf_add_libs
22931         do
22932                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22933                 then
22934                         cf_add_1lib=
22935                         break
22936                 fi
22937         done
22938         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22939 done
22940 LIBS="$cf_add_libs"
22941
22942                 cat >conftest.$ac_ext <<_ACEOF
22943 #line 22943 "configure"
22944 #include "confdefs.h"
22945
22946                                 #include <iostream>
22947 int
22948 main (void)
22949 {
22950
22951                                 std::cout << "Hello World!" << std::endl;
22952   ;
22953   return 0;
22954 }
22955 _ACEOF
22956 rm -f conftest.$ac_objext conftest$ac_exeext
22957 if { (eval echo "$as_me:22957: \"$ac_link\"") >&5
22958   (eval $ac_link) 2>&5
22959   ac_status=$?
22960   echo "$as_me:22960: \$? = $ac_status" >&5
22961   (exit $ac_status); } &&
22962          { ac_try='test -s conftest$ac_exeext'
22963   { (eval echo "$as_me:22963: \"$ac_try\"") >&5
22964   (eval $ac_try) 2>&5
22965   ac_status=$?
22966   echo "$as_me:22966: \$? = $ac_status" >&5
22967   (exit $ac_status); }; }; then
22968   cf_cv_libstdcpp=yes
22969 else
22970   echo "$as_me: failed program was:" >&5
22971 cat conftest.$ac_ext >&5
22972 cf_cv_libstdcpp=no
22973 fi
22974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22975                         LIBS="$cf_save"
22976
22977 fi
22978 echo "$as_me:22978: result: $cf_cv_libstdcpp" >&5
22979 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22980                 test "$cf_cv_libstdcpp" = yes && {
22981 cf_add_libs="-l$cf_stdcpp_libname"
22982 # Filter out duplicates - this happens with badly-designed ".pc" files...
22983 for cf_add_1lib in $CXXLIBS
22984 do
22985         for cf_add_2lib in $cf_add_libs
22986         do
22987                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22988                 then
22989                         cf_add_1lib=
22990                         break
22991                 fi
22992         done
22993         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22994 done
22995 CXXLIBS="$cf_add_libs"
22996  }
22997         fi
22998 fi
22999
23000         echo "$as_me:23000: checking whether $CXX understands -c and -o together" >&5
23001 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23002 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23003   echo $ECHO_N "(cached) $ECHO_C" >&6
23004 else
23005
23006 cat > conftest.$ac_ext <<CF_EOF
23007 int main(void)
23008 {
23009         ${cf_cv_main_return:-return}(0);
23010 }
23011 CF_EOF
23012 # We do the test twice because some compilers refuse to overwrite an
23013 # existing .o file with -o, though they will create one.
23014 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23015 if { (eval echo "$as_me:23015: \"$ac_try\"") >&5
23016   (eval $ac_try) 2>&5
23017   ac_status=$?
23018   echo "$as_me:23018: \$? = $ac_status" >&5
23019   (exit $ac_status); } &&
23020   test -f conftest2.$ac_objext && { (eval echo "$as_me:23020: \"$ac_try\"") >&5
23021   (eval $ac_try) 2>&5
23022   ac_status=$?
23023   echo "$as_me:23023: \$? = $ac_status" >&5
23024   (exit $ac_status); };
23025 then
23026   eval cf_cv_prog_CXX_c_o=yes
23027 else
23028   eval cf_cv_prog_CXX_c_o=no
23029 fi
23030 rm -rf conftest*
23031
23032 fi
23033 if test $cf_cv_prog_CXX_c_o = yes; then
23034   echo "$as_me:23034: result: yes" >&5
23035 echo "${ECHO_T}yes" >&6
23036 else
23037   echo "$as_me:23037: result: no" >&5
23038 echo "${ECHO_T}no" >&6
23039 fi
23040
23041         case $GXX_VERSION in
23042         (1*|2.0-6*)
23043                 cf_cxx_library=yes
23044                 ;;
23045         (*-2.7*|2.7*)
23046
23047 cf_cxx_library=unknown
23048 case $cf_cv_system_name in
23049 (os2*)
23050         cf_gpp_libname=gpp
23051         ;;
23052 (*)
23053         cf_gpp_libname=g++
23054         ;;
23055 esac
23056 if test "$GXX" = yes; then
23057         echo "$as_me:23057: checking for lib$cf_gpp_libname" >&5
23058 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23059         cf_save="$LIBS"
23060
23061 cf_add_libs="-l$cf_gpp_libname"
23062 # Filter out duplicates - this happens with badly-designed ".pc" files...
23063 for cf_add_1lib in $LIBS
23064 do
23065         for cf_add_2lib in $cf_add_libs
23066         do
23067                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
23068                 then
23069                         cf_add_1lib=
23070                         break
23071                 fi
23072         done
23073         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
23074 done
23075 LIBS="$cf_add_libs"
23076
23077         cat >conftest.$ac_ext <<_ACEOF
23078 #line 23078 "configure"
23079 #include "confdefs.h"
23080
23081 #include <$cf_gpp_libname/builtin.h>
23082
23083 int
23084 main (void)
23085 {
23086 two_arg_error_handler_t foo2 = lib_error_handler
23087   ;
23088   return 0;
23089 }
23090 _ACEOF
23091 rm -f conftest.$ac_objext conftest$ac_exeext
23092 if { (eval echo "$as_me:23092: \"$ac_link\"") >&5
23093   (eval $ac_link) 2>&5
23094   ac_status=$?
23095   echo "$as_me:23095: \$? = $ac_status" >&5
23096   (exit $ac_status); } &&
23097          { ac_try='test -s conftest$ac_exeext'
23098   { (eval echo "$as_me:23098: \"$ac_try\"") >&5
23099   (eval $ac_try) 2>&5
23100   ac_status=$?
23101   echo "$as_me:23101: \$? = $ac_status" >&5
23102   (exit $ac_status); }; }; then
23103   cf_cxx_library=yes
23104
23105 cf_add_libs="-l$cf_gpp_libname"
23106 # Filter out duplicates - this happens with badly-designed ".pc" files...
23107 for cf_add_1lib in $CXXLIBS
23108 do
23109         for cf_add_2lib in $cf_add_libs
23110         do
23111                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
23112                 then
23113                         cf_add_1lib=
23114                         break
23115                 fi
23116         done
23117         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
23118 done
23119 CXXLIBS="$cf_add_libs"
23120
23121          if test "$cf_gpp_libname" = cpp ; then
23122
23123 cat >>confdefs.h <<\EOF
23124 #define HAVE_GPP_BUILTIN_H 1
23125 EOF
23126
23127          else
23128
23129 cat >>confdefs.h <<\EOF
23130 #define HAVE_GXX_BUILTIN_H 1
23131 EOF
23132
23133          fi
23134 else
23135   echo "$as_me: failed program was:" >&5
23136 cat conftest.$ac_ext >&5
23137 cat >conftest.$ac_ext <<_ACEOF
23138 #line 23138 "configure"
23139 #include "confdefs.h"
23140
23141 #include <builtin.h>
23142
23143 int
23144 main (void)
23145 {
23146 two_arg_error_handler_t foo2 = lib_error_handler
23147   ;
23148   return 0;
23149 }
23150 _ACEOF
23151 rm -f conftest.$ac_objext conftest$ac_exeext
23152 if { (eval echo "$as_me:23152: \"$ac_link\"") >&5
23153   (eval $ac_link) 2>&5
23154   ac_status=$?
23155   echo "$as_me:23155: \$? = $ac_status" >&5
23156   (exit $ac_status); } &&
23157          { ac_try='test -s conftest$ac_exeext'
23158   { (eval echo "$as_me:23158: \"$ac_try\"") >&5
23159   (eval $ac_try) 2>&5
23160   ac_status=$?
23161   echo "$as_me:23161: \$? = $ac_status" >&5
23162   (exit $ac_status); }; }; then
23163   cf_cxx_library=yes
23164
23165 cf_add_libs="-l$cf_gpp_libname"
23166 # Filter out duplicates - this happens with badly-designed ".pc" files...
23167 for cf_add_1lib in $CXXLIBS
23168 do
23169         for cf_add_2lib in $cf_add_libs
23170         do
23171                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
23172                 then
23173                         cf_add_1lib=
23174                         break
23175                 fi
23176         done
23177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
23178 done
23179 CXXLIBS="$cf_add_libs"
23180
23181 cat >>confdefs.h <<\EOF
23182 #define HAVE_BUILTIN_H 1
23183 EOF
23184
23185 else
23186   echo "$as_me: failed program was:" >&5
23187 cat conftest.$ac_ext >&5
23188 cf_cxx_library=no
23189 fi
23190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23191 fi
23192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23193         LIBS="$cf_save"
23194         echo "$as_me:23194: result: $cf_cxx_library" >&5
23195 echo "${ECHO_T}$cf_cxx_library" >&6
23196 fi
23197
23198                 ;;
23199         (*)
23200                 cf_cxx_library=no
23201                 ;;
23202         esac
23203
23204         ac_ext=cc
23205 ac_cpp='$CXXCPP $CPPFLAGS'
23206 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23207 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23208 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23209 ac_main_return=return
23210 echo "$as_me:23210: checking how to run the C++ preprocessor" >&5
23211 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23212 if test -z "$CXXCPP"; then
23213   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23214   echo $ECHO_N "(cached) $ECHO_C" >&6
23215 else
23216       # Double quotes because CXXCPP needs to be expanded
23217     for CXXCPP in "$CXX -E" "/lib/cpp"
23218     do
23219       ac_preproc_ok=false
23220 for ac_cxx_preproc_warn_flag in '' yes
23221 do
23222   # Use a header file that comes with gcc, so configuring glibc
23223   # with a fresh cross-compiler works.
23224   # On the NeXT, cc -E runs the code through the compiler's parser,
23225   # not just through cpp. "Syntax error" is here to catch this case.
23226   cat >conftest.$ac_ext <<_ACEOF
23227 #line 23227 "configure"
23228 #include "confdefs.h"
23229 #include <assert.h>
23230                      Syntax error
23231 _ACEOF
23232 if { (eval echo "$as_me:23232: \"$ac_cpp conftest.$ac_ext\"") >&5
23233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23234   ac_status=$?
23235   egrep -v '^ *\+' conftest.er1 >conftest.err
23236   rm -f conftest.er1
23237   cat conftest.err >&5
23238   echo "$as_me:23238: \$? = $ac_status" >&5
23239   (exit $ac_status); } >/dev/null; then
23240   if test -s conftest.err; then
23241     ac_cpp_err=$ac_cxx_preproc_warn_flag
23242   else
23243     ac_cpp_err=
23244   fi
23245 else
23246   ac_cpp_err=yes
23247 fi
23248 if test -z "$ac_cpp_err"; then
23249   :
23250 else
23251   echo "$as_me: failed program was:" >&5
23252   cat conftest.$ac_ext >&5
23253   # Broken: fails on valid input.
23254 continue
23255 fi
23256 rm -f conftest.err conftest.$ac_ext
23257
23258   # OK, works on sane cases.  Now check whether non-existent headers
23259   # can be detected and how.
23260   cat >conftest.$ac_ext <<_ACEOF
23261 #line 23261 "configure"
23262 #include "confdefs.h"
23263 #include <ac_nonexistent.h>
23264 _ACEOF
23265 if { (eval echo "$as_me:23265: \"$ac_cpp conftest.$ac_ext\"") >&5
23266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23267   ac_status=$?
23268   egrep -v '^ *\+' conftest.er1 >conftest.err
23269   rm -f conftest.er1
23270   cat conftest.err >&5
23271   echo "$as_me:23271: \$? = $ac_status" >&5
23272   (exit $ac_status); } >/dev/null; then
23273   if test -s conftest.err; then
23274     ac_cpp_err=$ac_cxx_preproc_warn_flag
23275   else
23276     ac_cpp_err=
23277   fi
23278 else
23279   ac_cpp_err=yes
23280 fi
23281 if test -z "$ac_cpp_err"; then
23282   # Broken: success on invalid input.
23283 continue
23284 else
23285   echo "$as_me: failed program was:" >&5
23286   cat conftest.$ac_ext >&5
23287   # Passes both tests.
23288 ac_preproc_ok=:
23289 break
23290 fi
23291 rm -f conftest.err conftest.$ac_ext
23292
23293 done
23294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23295 rm -f conftest.err conftest.$ac_ext
23296 if $ac_preproc_ok; then
23297   break
23298 fi
23299
23300     done
23301     ac_cv_prog_CXXCPP=$CXXCPP
23302
23303 fi
23304   CXXCPP=$ac_cv_prog_CXXCPP
23305 else
23306   ac_cv_prog_CXXCPP=$CXXCPP
23307 fi
23308 echo "$as_me:23308: result: $CXXCPP" >&5
23309 echo "${ECHO_T}$CXXCPP" >&6
23310 ac_preproc_ok=false
23311 for ac_cxx_preproc_warn_flag in '' yes
23312 do
23313   # Use a header file that comes with gcc, so configuring glibc
23314   # with a fresh cross-compiler works.
23315   # On the NeXT, cc -E runs the code through the compiler's parser,
23316   # not just through cpp. "Syntax error" is here to catch this case.
23317   cat >conftest.$ac_ext <<_ACEOF
23318 #line 23318 "configure"
23319 #include "confdefs.h"
23320 #include <assert.h>
23321                      Syntax error
23322 _ACEOF
23323 if { (eval echo "$as_me:23323: \"$ac_cpp conftest.$ac_ext\"") >&5
23324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23325   ac_status=$?
23326   egrep -v '^ *\+' conftest.er1 >conftest.err
23327   rm -f conftest.er1
23328   cat conftest.err >&5
23329   echo "$as_me:23329: \$? = $ac_status" >&5
23330   (exit $ac_status); } >/dev/null; then
23331   if test -s conftest.err; then
23332     ac_cpp_err=$ac_cxx_preproc_warn_flag
23333   else
23334     ac_cpp_err=
23335   fi
23336 else
23337   ac_cpp_err=yes
23338 fi
23339 if test -z "$ac_cpp_err"; then
23340   :
23341 else
23342   echo "$as_me: failed program was:" >&5
23343   cat conftest.$ac_ext >&5
23344   # Broken: fails on valid input.
23345 continue
23346 fi
23347 rm -f conftest.err conftest.$ac_ext
23348
23349   # OK, works on sane cases.  Now check whether non-existent headers
23350   # can be detected and how.
23351   cat >conftest.$ac_ext <<_ACEOF
23352 #line 23352 "configure"
23353 #include "confdefs.h"
23354 #include <ac_nonexistent.h>
23355 _ACEOF
23356 if { (eval echo "$as_me:23356: \"$ac_cpp conftest.$ac_ext\"") >&5
23357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23358   ac_status=$?
23359   egrep -v '^ *\+' conftest.er1 >conftest.err
23360   rm -f conftest.er1
23361   cat conftest.err >&5
23362   echo "$as_me:23362: \$? = $ac_status" >&5
23363   (exit $ac_status); } >/dev/null; then
23364   if test -s conftest.err; then
23365     ac_cpp_err=$ac_cxx_preproc_warn_flag
23366   else
23367     ac_cpp_err=
23368   fi
23369 else
23370   ac_cpp_err=yes
23371 fi
23372 if test -z "$ac_cpp_err"; then
23373   # Broken: success on invalid input.
23374 continue
23375 else
23376   echo "$as_me: failed program was:" >&5
23377   cat conftest.$ac_ext >&5
23378   # Passes both tests.
23379 ac_preproc_ok=:
23380 break
23381 fi
23382 rm -f conftest.err conftest.$ac_ext
23383
23384 done
23385 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23386 rm -f conftest.err conftest.$ac_ext
23387 if $ac_preproc_ok; then
23388   :
23389 else
23390   { { echo "$as_me:23390: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23391 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23392    { (exit 1); exit 1; }; }
23393 fi
23394
23395 ac_ext=cc
23396 ac_cpp='$CXXCPP $CPPFLAGS'
23397 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23398 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23399 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23400 ac_main_return=return
23401
23402 for ac_header in typeinfo
23403 do
23404 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23405 echo "$as_me:23405: checking for $ac_header" >&5
23406 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23407 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23408   echo $ECHO_N "(cached) $ECHO_C" >&6
23409 else
23410   cat >conftest.$ac_ext <<_ACEOF
23411 #line 23411 "configure"
23412 #include "confdefs.h"
23413 #include <$ac_header>
23414 _ACEOF
23415 if { (eval echo "$as_me:23415: \"$ac_cpp conftest.$ac_ext\"") >&5
23416   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23417   ac_status=$?
23418   egrep -v '^ *\+' conftest.er1 >conftest.err
23419   rm -f conftest.er1
23420   cat conftest.err >&5
23421   echo "$as_me:23421: \$? = $ac_status" >&5
23422   (exit $ac_status); } >/dev/null; then
23423   if test -s conftest.err; then
23424     ac_cpp_err=$ac_cxx_preproc_warn_flag
23425   else
23426     ac_cpp_err=
23427   fi
23428 else
23429   ac_cpp_err=yes
23430 fi
23431 if test -z "$ac_cpp_err"; then
23432   eval "$as_ac_Header=yes"
23433 else
23434   echo "$as_me: failed program was:" >&5
23435   cat conftest.$ac_ext >&5
23436   eval "$as_ac_Header=no"
23437 fi
23438 rm -f conftest.err conftest.$ac_ext
23439 fi
23440 echo "$as_me:23440: result: `eval echo '${'$as_ac_Header'}'`" >&5
23441 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23442 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23443   cat >>confdefs.h <<EOF
23444 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23445 EOF
23446
23447 fi
23448 done
23449
23450 for ac_header in iostream
23451 do
23452 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23453 echo "$as_me:23453: checking for $ac_header" >&5
23454 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23456   echo $ECHO_N "(cached) $ECHO_C" >&6
23457 else
23458   cat >conftest.$ac_ext <<_ACEOF
23459 #line 23459 "configure"
23460 #include "confdefs.h"
23461 #include <$ac_header>
23462 _ACEOF
23463 if { (eval echo "$as_me:23463: \"$ac_cpp conftest.$ac_ext\"") >&5
23464   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23465   ac_status=$?
23466   egrep -v '^ *\+' conftest.er1 >conftest.err
23467   rm -f conftest.er1
23468   cat conftest.err >&5
23469   echo "$as_me:23469: \$? = $ac_status" >&5
23470   (exit $ac_status); } >/dev/null; then
23471   if test -s conftest.err; then
23472     ac_cpp_err=$ac_cxx_preproc_warn_flag
23473   else
23474     ac_cpp_err=
23475   fi
23476 else
23477   ac_cpp_err=yes
23478 fi
23479 if test -z "$ac_cpp_err"; then
23480   eval "$as_ac_Header=yes"
23481 else
23482   echo "$as_me: failed program was:" >&5
23483   cat conftest.$ac_ext >&5
23484   eval "$as_ac_Header=no"
23485 fi
23486 rm -f conftest.err conftest.$ac_ext
23487 fi
23488 echo "$as_me:23488: result: `eval echo '${'$as_ac_Header'}'`" >&5
23489 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23490 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23491   cat >>confdefs.h <<EOF
23492 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23493 EOF
23494
23495 fi
23496 done
23497
23498 if test x"$ac_cv_header_iostream" = xyes ; then
23499         echo "$as_me:23499: checking if iostream uses std-namespace" >&5
23500 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23501         cat >conftest.$ac_ext <<_ACEOF
23502 #line 23502 "configure"
23503 #include "confdefs.h"
23504
23505 #include <iostream>
23506 using std::endl;
23507 using std::cerr;
23508 int
23509 main (void)
23510 {
23511
23512 cerr << "testing" << endl;
23513
23514   ;
23515   return 0;
23516 }
23517 _ACEOF
23518 rm -f conftest.$ac_objext
23519 if { (eval echo "$as_me:23519: \"$ac_compile\"") >&5
23520   (eval $ac_compile) 2>&5
23521   ac_status=$?
23522   echo "$as_me:23522: \$? = $ac_status" >&5
23523   (exit $ac_status); } &&
23524          { ac_try='test -s conftest.$ac_objext'
23525   { (eval echo "$as_me:23525: \"$ac_try\"") >&5
23526   (eval $ac_try) 2>&5
23527   ac_status=$?
23528   echo "$as_me:23528: \$? = $ac_status" >&5
23529   (exit $ac_status); }; }; then
23530   cf_iostream_namespace=yes
23531 else
23532   echo "$as_me: failed program was:" >&5
23533 cat conftest.$ac_ext >&5
23534 cf_iostream_namespace=no
23535 fi
23536 rm -f conftest.$ac_objext conftest.$ac_ext
23537         echo "$as_me:23537: result: $cf_iostream_namespace" >&5
23538 echo "${ECHO_T}$cf_iostream_namespace" >&6
23539         if test "$cf_iostream_namespace" = yes ; then
23540
23541 cat >>confdefs.h <<\EOF
23542 #define IOSTREAM_NAMESPACE 1
23543 EOF
23544
23545         fi
23546 fi
23547
23548 echo "$as_me:23548: checking if we should include stdbool.h" >&5
23549 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23550
23551 if test "${cf_cv_header_stdbool_h+set}" = set; then
23552   echo $ECHO_N "(cached) $ECHO_C" >&6
23553 else
23554
23555         cat >conftest.$ac_ext <<_ACEOF
23556 #line 23556 "configure"
23557 #include "confdefs.h"
23558
23559 int
23560 main (void)
23561 {
23562 bool foo = false
23563   ;
23564   return 0;
23565 }
23566 _ACEOF
23567 rm -f conftest.$ac_objext
23568 if { (eval echo "$as_me:23568: \"$ac_compile\"") >&5
23569   (eval $ac_compile) 2>&5
23570   ac_status=$?
23571   echo "$as_me:23571: \$? = $ac_status" >&5
23572   (exit $ac_status); } &&
23573          { ac_try='test -s conftest.$ac_objext'
23574   { (eval echo "$as_me:23574: \"$ac_try\"") >&5
23575   (eval $ac_try) 2>&5
23576   ac_status=$?
23577   echo "$as_me:23577: \$? = $ac_status" >&5
23578   (exit $ac_status); }; }; then
23579   cf_cv_header_stdbool_h=0
23580 else
23581   echo "$as_me: failed program was:" >&5
23582 cat conftest.$ac_ext >&5
23583 cat >conftest.$ac_ext <<_ACEOF
23584 #line 23584 "configure"
23585 #include "confdefs.h"
23586
23587 #ifndef __BEOS__
23588 #include <stdbool.h>
23589 #endif
23590
23591 int
23592 main (void)
23593 {
23594 bool foo = false
23595   ;
23596   return 0;
23597 }
23598 _ACEOF
23599 rm -f conftest.$ac_objext
23600 if { (eval echo "$as_me:23600: \"$ac_compile\"") >&5
23601   (eval $ac_compile) 2>&5
23602   ac_status=$?
23603   echo "$as_me:23603: \$? = $ac_status" >&5
23604   (exit $ac_status); } &&
23605          { ac_try='test -s conftest.$ac_objext'
23606   { (eval echo "$as_me:23606: \"$ac_try\"") >&5
23607   (eval $ac_try) 2>&5
23608   ac_status=$?
23609   echo "$as_me:23609: \$? = $ac_status" >&5
23610   (exit $ac_status); }; }; then
23611   cf_cv_header_stdbool_h=1
23612 else
23613   echo "$as_me: failed program was:" >&5
23614 cat conftest.$ac_ext >&5
23615 cf_cv_header_stdbool_h=0
23616 fi
23617 rm -f conftest.$ac_objext conftest.$ac_ext
23618 fi
23619 rm -f conftest.$ac_objext conftest.$ac_ext
23620 fi
23621
23622 if test "$cf_cv_header_stdbool_h" = 1
23623 then    echo "$as_me:23623: result: yes" >&5
23624 echo "${ECHO_T}yes" >&6
23625 else    echo "$as_me:23625: result: no" >&5
23626 echo "${ECHO_T}no" >&6
23627 fi
23628
23629 echo "$as_me:23629: checking for builtin bool type" >&5
23630 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23631
23632 if test "${cf_cv_builtin_bool+set}" = set; then
23633   echo $ECHO_N "(cached) $ECHO_C" >&6
23634 else
23635
23636         cat >conftest.$ac_ext <<_ACEOF
23637 #line 23637 "configure"
23638 #include "confdefs.h"
23639
23640 #include <stdio.h>
23641 #include <sys/types.h>
23642
23643 int
23644 main (void)
23645 {
23646 bool x = false
23647   ;
23648   return 0;
23649 }
23650 _ACEOF
23651 rm -f conftest.$ac_objext
23652 if { (eval echo "$as_me:23652: \"$ac_compile\"") >&5
23653   (eval $ac_compile) 2>&5
23654   ac_status=$?
23655   echo "$as_me:23655: \$? = $ac_status" >&5
23656   (exit $ac_status); } &&
23657          { ac_try='test -s conftest.$ac_objext'
23658   { (eval echo "$as_me:23658: \"$ac_try\"") >&5
23659   (eval $ac_try) 2>&5
23660   ac_status=$?
23661   echo "$as_me:23661: \$? = $ac_status" >&5
23662   (exit $ac_status); }; }; then
23663   cf_cv_builtin_bool=1
23664 else
23665   echo "$as_me: failed program was:" >&5
23666 cat conftest.$ac_ext >&5
23667 cf_cv_builtin_bool=0
23668 fi
23669 rm -f conftest.$ac_objext conftest.$ac_ext
23670
23671 fi
23672
23673 if test "$cf_cv_builtin_bool" = 1
23674 then    echo "$as_me:23674: result: yes" >&5
23675 echo "${ECHO_T}yes" >&6
23676 else    echo "$as_me:23676: result: no" >&5
23677 echo "${ECHO_T}no" >&6
23678 fi
23679
23680 echo "$as_me:23680: checking for size of bool" >&5
23681 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23682 if test "${cf_cv_type_of_bool+set}" = set; then
23683   echo $ECHO_N "(cached) $ECHO_C" >&6
23684 else
23685
23686         rm -f cf_test.out
23687         if test "$cross_compiling" = yes; then
23688   cf_cv_type_of_bool=unknown
23689 else
23690   cat >conftest.$ac_ext <<_ACEOF
23691 #line 23691 "configure"
23692 #include "confdefs.h"
23693
23694 #include <stdlib.h>
23695 #include <stdio.h>
23696
23697 #if defined(__cplusplus)
23698
23699 #ifdef HAVE_GXX_BUILTIN_H
23700 #include <g++/builtin.h>
23701 #elif HAVE_GPP_BUILTIN_H
23702 #include <gpp/builtin.h>
23703 #elif HAVE_BUILTIN_H
23704 #include <builtin.h>
23705 #endif
23706
23707 #else
23708
23709 #if $cf_cv_header_stdbool_h
23710 #include <stdbool.h>
23711 #endif
23712
23713 #endif
23714
23715 int main(void)
23716 {
23717         FILE *fp = fopen("cf_test.out", "w");
23718         if (fp != 0) {
23719                 bool x = true;
23720                 if ((bool)(-x) >= 0)
23721                         fputs("unsigned ", fp);
23722                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23723                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23724                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23725                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23726                 fclose(fp);
23727         }
23728         ${cf_cv_main_return:-return}(0);
23729 }
23730
23731 _ACEOF
23732 rm -f conftest$ac_exeext
23733 if { (eval echo "$as_me:23733: \"$ac_link\"") >&5
23734   (eval $ac_link) 2>&5
23735   ac_status=$?
23736   echo "$as_me:23736: \$? = $ac_status" >&5
23737   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23738   { (eval echo "$as_me:23738: \"$ac_try\"") >&5
23739   (eval $ac_try) 2>&5
23740   ac_status=$?
23741   echo "$as_me:23741: \$? = $ac_status" >&5
23742   (exit $ac_status); }; }; then
23743   cf_cv_type_of_bool=`cat cf_test.out`
23744                  if test -z "$cf_cv_type_of_bool"; then
23745                    cf_cv_type_of_bool=unknown
23746                  fi
23747 else
23748   echo "$as_me: program exited with status $ac_status" >&5
23749 echo "$as_me: failed program was:" >&5
23750 cat conftest.$ac_ext >&5
23751 cf_cv_type_of_bool=unknown
23752 fi
23753 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23754 fi
23755
23756 fi
23757
23758         rm -f cf_test.out
23759 echo "$as_me:23759: result: $cf_cv_type_of_bool" >&5
23760 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23761 if test "$cf_cv_type_of_bool" = unknown ; then
23762         case .$NCURSES_BOOL in
23763         (.auto|.) NCURSES_BOOL=unsigned;;
23764         esac
23765         { echo "$as_me:23765: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23766 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23767         cf_cv_type_of_bool=$NCURSES_BOOL
23768 fi
23769
23770 echo "$as_me:23770: checking for special defines needed for etip.h" >&5
23771 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23772 cf_save_CXXFLAGS="$CXXFLAGS"
23773 cf_result="none"
23774
23775 # etip.h includes ncurses.h which includes ncurses_dll.h
23776 # But ncurses_dll.h is generated - fix here.
23777 test -d include || mkdir include
23778 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
23779
23780 for cf_math in "" MATH_H
23781 do
23782 for cf_excp in "" MATH_EXCEPTION
23783 do
23784         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23785         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23786         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23787 cat >conftest.$ac_ext <<_ACEOF
23788 #line 23788 "configure"
23789 #include "confdefs.h"
23790
23791 #include <etip.h.in>
23792
23793 int
23794 main (void)
23795 {
23796
23797   ;
23798   return 0;
23799 }
23800 _ACEOF
23801 rm -f conftest.$ac_objext
23802 if { (eval echo "$as_me:23802: \"$ac_compile\"") >&5
23803   (eval $ac_compile) 2>&5
23804   ac_status=$?
23805   echo "$as_me:23805: \$? = $ac_status" >&5
23806   (exit $ac_status); } &&
23807          { ac_try='test -s conftest.$ac_objext'
23808   { (eval echo "$as_me:23808: \"$ac_try\"") >&5
23809   (eval $ac_try) 2>&5
23810   ac_status=$?
23811   echo "$as_me:23811: \$? = $ac_status" >&5
23812   (exit $ac_status); }; }; then
23813
23814         test -n "$cf_math" && cat >>confdefs.h <<EOF
23815 #define ETIP_NEEDS_${cf_math} 1
23816 EOF
23817
23818         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23819 #define ETIP_NEEDS_${cf_excp} 1
23820 EOF
23821
23822         cf_result="$cf_math $cf_excp"
23823         break 2
23824
23825 else
23826   echo "$as_me: failed program was:" >&5
23827 cat conftest.$ac_ext >&5
23828 fi
23829 rm -f conftest.$ac_objext conftest.$ac_ext
23830 done
23831 done
23832 echo "$as_me:23832: result: $cf_result" >&5
23833 echo "${ECHO_T}$cf_result" >&6
23834 CXXFLAGS="$cf_save_CXXFLAGS"
23835
23836 if test -n "$CXX"; then
23837 echo "$as_me:23837: checking if $CXX accepts parameter initialization" >&5
23838 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23839 if test "${cf_cv_cpp_param_init+set}" = set; then
23840   echo $ECHO_N "(cached) $ECHO_C" >&6
23841 else
23842
23843         ac_ext=cc
23844 ac_cpp='$CXXCPP $CPPFLAGS'
23845 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23846 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23847 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23848 ac_main_return=return
23849
23850         if test "$cross_compiling" = yes; then
23851   cf_cv_cpp_param_init=unknown
23852 else
23853   cat >conftest.$ac_ext <<_ACEOF
23854 #line 23854 "configure"
23855 #include "confdefs.h"
23856
23857 class TEST {
23858 private:
23859         int value;
23860 public:
23861         TEST(int x = 1);
23862         ~TEST();
23863 };
23864
23865 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23866 {
23867         value = x;
23868 }
23869 int main(void) { }
23870
23871 _ACEOF
23872 rm -f conftest$ac_exeext
23873 if { (eval echo "$as_me:23873: \"$ac_link\"") >&5
23874   (eval $ac_link) 2>&5
23875   ac_status=$?
23876   echo "$as_me:23876: \$? = $ac_status" >&5
23877   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23878   { (eval echo "$as_me:23878: \"$ac_try\"") >&5
23879   (eval $ac_try) 2>&5
23880   ac_status=$?
23881   echo "$as_me:23881: \$? = $ac_status" >&5
23882   (exit $ac_status); }; }; then
23883   cf_cv_cpp_param_init=yes
23884 else
23885   echo "$as_me: program exited with status $ac_status" >&5
23886 echo "$as_me: failed program was:" >&5
23887 cat conftest.$ac_ext >&5
23888 cf_cv_cpp_param_init=no
23889 fi
23890 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23891 fi
23892         ac_ext=cc
23893 ac_cpp='$CXXCPP $CPPFLAGS'
23894 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23895 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23896 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23897 ac_main_return=return
23898
23899 fi
23900 echo "$as_me:23900: result: $cf_cv_cpp_param_init" >&5
23901 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23902 fi
23903 test "$cf_cv_cpp_param_init" = yes &&
23904 cat >>confdefs.h <<\EOF
23905 #define CPP_HAS_PARAM_INIT 1
23906 EOF
23907
23908 if test -n "$CXX"; then
23909
23910 echo "$as_me:23910: checking if $CXX accepts static_cast" >&5
23911 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23912 if test "${cf_cv_cpp_static_cast+set}" = set; then
23913   echo $ECHO_N "(cached) $ECHO_C" >&6
23914 else
23915
23916         ac_ext=cc
23917 ac_cpp='$CXXCPP $CPPFLAGS'
23918 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23919 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23920 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23921 ac_main_return=return
23922
23923         cat >conftest.$ac_ext <<_ACEOF
23924 #line 23924 "configure"
23925 #include "confdefs.h"
23926
23927 class NCursesPanel
23928 {
23929 public:
23930   NCursesPanel(int nlines,
23931                int ncols,
23932                int begin_y = 0,
23933                int begin_x = 0)
23934   {
23935   }
23936   NCursesPanel();
23937   ~NCursesPanel();
23938 };
23939
23940 template<class T> class NCursesUserPanel : public NCursesPanel
23941 {
23942 public:
23943   NCursesUserPanel (int nlines,
23944                     int ncols,
23945                     int begin_y = 0,
23946                     int begin_x = 0,
23947                     const T* p_UserData = static_cast<T*>(0))
23948     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23949   {
23950   };
23951   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23952   {
23953   };
23954
23955   virtual ~NCursesUserPanel() {};
23956 };
23957
23958 int
23959 main (void)
23960 {
23961
23962         const char* p_UserData = static_cast<char*>(0)
23963   ;
23964   return 0;
23965 }
23966 _ACEOF
23967 rm -f conftest.$ac_objext
23968 if { (eval echo "$as_me:23968: \"$ac_compile\"") >&5
23969   (eval $ac_compile) 2>&5
23970   ac_status=$?
23971   echo "$as_me:23971: \$? = $ac_status" >&5
23972   (exit $ac_status); } &&
23973          { ac_try='test -s conftest.$ac_objext'
23974   { (eval echo "$as_me:23974: \"$ac_try\"") >&5
23975   (eval $ac_try) 2>&5
23976   ac_status=$?
23977   echo "$as_me:23977: \$? = $ac_status" >&5
23978   (exit $ac_status); }; }; then
23979   cf_cv_cpp_static_cast=yes
23980 else
23981   echo "$as_me: failed program was:" >&5
23982 cat conftest.$ac_ext >&5
23983 cf_cv_cpp_static_cast=no
23984 fi
23985 rm -f conftest.$ac_objext conftest.$ac_ext
23986
23987         ac_ext=cc
23988 ac_cpp='$CXXCPP $CPPFLAGS'
23989 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23990 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23991 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23992 ac_main_return=return
23993
23994 fi
23995 echo "$as_me:23995: result: $cf_cv_cpp_static_cast" >&5
23996 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
23997
23998 fi
23999
24000 test "$cf_cv_cpp_static_cast" = yes &&
24001 cat >>confdefs.h <<\EOF
24002 #define CPP_HAS_STATIC_CAST 1
24003 EOF
24004
24005         CXX_AR='$(AR)'
24006         CXX_ARFLAGS='$(ARFLAGS)'
24007         case $cf_cv_system_name in
24008         (irix*)
24009             if test "$GXX" != yes ; then
24010                 CXX_AR='$(CXX)'
24011                 CXX_ARFLAGS='-ar -o'
24012             fi
24013             ;;
24014         (sco3.2v5*)
24015             CXXLDFLAGS="-u main"
24016             ;;
24017         (solaris2*)
24018             if test "$GXX" != yes ; then
24019                 CXX_AR='$(CXX)'
24020                 CXX_ARFLAGS='-xar -o'
24021             fi
24022             ;;
24023         esac
24024
24025 else
24026         cf_cxx_library=no
24027         cf_cv_builtin_bool=1
24028
24029         # Just because we are not configuring against C++ right now does not
24030         # mean that a user will not want to use C++.  Some distributors disable
24031         # the C++ portion of this configuration as a shortcut (or just to avoid
24032         # compiling the demo in the c++ directory).  So we need a reasonable
24033         # default for the 'bool' type.
24034         #
24035         # Caveat: since the storage of the bool type is not standardized, it
24036         # may change.
24037
24038         if test "$NCURSES_BOOL" != auto ; then
24039                 cf_cv_type_of_bool=$NCURSES_BOOL
24040                 cf_cv_header_stdbool_h=0
24041         else
24042                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24043
24044 echo "$as_me:24044: checking for size of bool" >&5
24045 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24046 if test "${cf_cv_type_of_bool+set}" = set; then
24047   echo $ECHO_N "(cached) $ECHO_C" >&6
24048 else
24049
24050         rm -f cf_test.out
24051         if test "$cross_compiling" = yes; then
24052   cf_cv_type_of_bool=unknown
24053 else
24054   cat >conftest.$ac_ext <<_ACEOF
24055 #line 24055 "configure"
24056 #include "confdefs.h"
24057
24058 #include <stdlib.h>
24059 #include <stdio.h>
24060
24061 #if defined(__cplusplus)
24062
24063 #ifdef HAVE_GXX_BUILTIN_H
24064 #include <g++/builtin.h>
24065 #elif HAVE_GPP_BUILTIN_H
24066 #include <gpp/builtin.h>
24067 #elif HAVE_BUILTIN_H
24068 #include <builtin.h>
24069 #endif
24070
24071 #else
24072
24073 #if $cf_cv_header_stdbool_h
24074 #include <stdbool.h>
24075 #endif
24076
24077 #endif
24078
24079 int main(void)
24080 {
24081         FILE *fp = fopen("cf_test.out", "w");
24082         if (fp != 0) {
24083                 bool x = true;
24084                 if ((bool)(-x) >= 0)
24085                         fputs("unsigned ", fp);
24086                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24087                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24088                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24089                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24090                 fclose(fp);
24091         }
24092         ${cf_cv_main_return:-return}(0);
24093 }
24094
24095 _ACEOF
24096 rm -f conftest$ac_exeext
24097 if { (eval echo "$as_me:24097: \"$ac_link\"") >&5
24098   (eval $ac_link) 2>&5
24099   ac_status=$?
24100   echo "$as_me:24100: \$? = $ac_status" >&5
24101   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24102   { (eval echo "$as_me:24102: \"$ac_try\"") >&5
24103   (eval $ac_try) 2>&5
24104   ac_status=$?
24105   echo "$as_me:24105: \$? = $ac_status" >&5
24106   (exit $ac_status); }; }; then
24107   cf_cv_type_of_bool=`cat cf_test.out`
24108                  if test -z "$cf_cv_type_of_bool"; then
24109                    cf_cv_type_of_bool=unknown
24110                  fi
24111 else
24112   echo "$as_me: program exited with status $ac_status" >&5
24113 echo "$as_me: failed program was:" >&5
24114 cat conftest.$ac_ext >&5
24115 cf_cv_type_of_bool=unknown
24116 fi
24117 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24118 fi
24119
24120 fi
24121
24122         rm -f cf_test.out
24123 echo "$as_me:24123: result: $cf_cv_type_of_bool" >&5
24124 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24125 if test "$cf_cv_type_of_bool" = unknown ; then
24126         case .$NCURSES_BOOL in
24127         (.auto|.) NCURSES_BOOL=unsigned;;
24128         esac
24129         { echo "$as_me:24129: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24130 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24131         cf_cv_type_of_bool=$NCURSES_BOOL
24132 fi
24133
24134                 else
24135                         echo "$as_me:24135: checking for fallback type of bool" >&5
24136 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24137                         case "$host_cpu" in
24138                         (i?86)  cf_cv_type_of_bool=char ;;
24139                         (*)     cf_cv_type_of_bool=int  ;;
24140                         esac
24141                         echo "$as_me:24141: result: $cf_cv_type_of_bool" >&5
24142 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24143                 fi
24144         fi
24145 fi
24146
24147 # If the C compiler did not declare bool, and we did not determine that the C++
24148 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24149 # ncurses library use the same type as C++ bool.  Note that this allows one to
24150 # specify the type of bool in a configure-script option and postpone
24151 # integration with the C++ compiler provided that the types are compatible.
24152 USE_CXX_BOOL=1
24153 if test $cf_cv_cc_bool_type = 1
24154 then
24155         # oops: C has a bool.  Unlikely, but C++ could differ.
24156         USE_CXX_BOOL=0
24157 elif test $cf_cv_builtin_bool = 0
24158 then
24159         # C++ has no bool
24160         USE_CXX_BOOL=0
24161 else
24162         # this is the normal case
24163         USE_CXX_BOOL='defined(__cplusplus)'
24164 fi
24165
24166 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24167
24168         if test "$cf_with_ada" != "no" ; then
24169                 if test "$with_libtool" != "no"; then
24170                         { echo "$as_me:24170: WARNING: libtool does not support Ada - disabling feature" >&5
24171 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24172                         cf_with_ada=no
24173                 fi
24174         fi
24175
24176         if test "$cf_with_ada" != "no" ; then
24177
24178 cf_ada_make=gnatmake
24179 cf_ada_config="#"
24180 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
24181 set dummy $cf_ada_make; ac_word=$2
24182 echo "$as_me:24182: checking for $ac_word" >&5
24183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24184 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
24185   echo $ECHO_N "(cached) $ECHO_C" >&6
24186 else
24187   if test -n "$gnatmake_exists"; then
24188   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
24189 else
24190   ac_save_IFS=$IFS; IFS=$ac_path_separator
24191 ac_dummy="$PATH"
24192 for ac_dir in $ac_dummy; do
24193   IFS=$ac_save_IFS
24194   test -z "$ac_dir" && ac_dir=.
24195   $as_executable_p "$ac_dir/$ac_word" || continue
24196 ac_cv_prog_gnatmake_exists="yes"
24197 echo "$as_me:24197: found $ac_dir/$ac_word" >&5
24198 break
24199 done
24200
24201   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
24202 fi
24203 fi
24204 gnatmake_exists=$ac_cv_prog_gnatmake_exists
24205 if test -n "$gnatmake_exists"; then
24206   echo "$as_me:24206: result: $gnatmake_exists" >&5
24207 echo "${ECHO_T}$gnatmake_exists" >&6
24208 else
24209   echo "$as_me:24209: result: no" >&5
24210 echo "${ECHO_T}no" >&6
24211 fi
24212
24213 if test "$ac_cv_prog_gnatmake_exists" = no; then
24214         cf_ada_make=
24215         cf_cv_prog_gnat_correct=no
24216 else
24217         # Extract the first word of "gprconfig", so it can be a program name with args.
24218 set dummy gprconfig; ac_word=$2
24219 echo "$as_me:24219: checking for $ac_word" >&5
24220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24221 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
24222   echo $ECHO_N "(cached) $ECHO_C" >&6
24223 else
24224   if test -n "$gprconfig_exists"; then
24225   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
24226 else
24227   ac_save_IFS=$IFS; IFS=$ac_path_separator
24228 ac_dummy="$PATH"
24229 for ac_dir in $ac_dummy; do
24230   IFS=$ac_save_IFS
24231   test -z "$ac_dir" && ac_dir=.
24232   $as_executable_p "$ac_dir/$ac_word" || continue
24233 ac_cv_prog_gprconfig_exists="yes"
24234 echo "$as_me:24234: found $ac_dir/$ac_word" >&5
24235 break
24236 done
24237
24238   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
24239 fi
24240 fi
24241 gprconfig_exists=$ac_cv_prog_gprconfig_exists
24242 if test -n "$gprconfig_exists"; then
24243   echo "$as_me:24243: result: $gprconfig_exists" >&5
24244 echo "${ECHO_T}$gprconfig_exists" >&6
24245 else
24246   echo "$as_me:24246: result: no" >&5
24247 echo "${ECHO_T}no" >&6
24248 fi
24249
24250         if test "$ac_cv_prog_gprconfig_exists" = yes
24251         then
24252                 rm -rf conftest* *~conftest*
24253                 if mkdir conftest.src
24254                 then
24255                         cf_ada_config=""
24256                         cd conftest.src
24257                         for cf_gprconfig in Ada C
24258                         do
24259                                 echo "$as_me:24259: checking for gprconfig name for $cf_gprconfig" >&5
24260 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24261                                 if test $cf_gprconfig = C
24262                                 then
24263                                         for cf_gprconfig_param in \
24264                                                 $cf_gprconfig,,,,GNATGCC \
24265                                                 $cf_gprconfig,,,,GCC \
24266                                                 $cf_gprconfig
24267                                         do
24268                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24269                                                 test -n "$cf_gprconfig_value" && break
24270                                         done
24271                                 else
24272                                         cf_gprconfig_param=$cf_gprconfig
24273                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24274                                 fi
24275                                 if test -n "$cf_gprconfig_value"
24276                                 then
24277                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24278                                         echo "$as_me:24278: result: $cf_gprconfig_value" >&5
24279 echo "${ECHO_T}$cf_gprconfig_value" >&6
24280                                 else
24281                                         echo "$as_me:24281: result: missing" >&5
24282 echo "${ECHO_T}missing" >&6
24283                                         cf_ada_config="#"
24284                                         break
24285                                 fi
24286                         done
24287                         cd ..
24288                         rm -rf conftest* *~conftest*
24289                 fi
24290         else
24291                 # gprconfig is newer than gnatmake; we can continue...
24292                 cf_ada_config="##"
24293         fi
24294         if test "x$cf_ada_config" != "x#"
24295         then
24296
24297 echo "$as_me:24297: checking for gnat version" >&5
24298 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24299 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
24300         grep '[0-9].[0-9][0-9]*' |\
24301         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24302 echo "$as_me:24302: result: $cf_gnat_version" >&5
24303 echo "${ECHO_T}$cf_gnat_version" >&6
24304
24305 case $cf_gnat_version in
24306 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24307         cf_cv_prog_gnat_correct=yes
24308         ;;
24309 (*)
24310         { echo "$as_me:24310: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24311 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24312         cf_cv_prog_gnat_correct=no
24313         ;;
24314 esac
24315
24316                 # Extract the first word of "m4", so it can be a program name with args.
24317 set dummy m4; ac_word=$2
24318 echo "$as_me:24318: checking for $ac_word" >&5
24319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24320 if test "${ac_cv_prog_M4_exists+set}" = set; then
24321   echo $ECHO_N "(cached) $ECHO_C" >&6
24322 else
24323   if test -n "$M4_exists"; then
24324   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24325 else
24326   ac_save_IFS=$IFS; IFS=$ac_path_separator
24327 ac_dummy="$PATH"
24328 for ac_dir in $ac_dummy; do
24329   IFS=$ac_save_IFS
24330   test -z "$ac_dir" && ac_dir=.
24331   $as_executable_p "$ac_dir/$ac_word" || continue
24332 ac_cv_prog_M4_exists="yes"
24333 echo "$as_me:24333: found $ac_dir/$ac_word" >&5
24334 break
24335 done
24336
24337   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24338 fi
24339 fi
24340 M4_exists=$ac_cv_prog_M4_exists
24341 if test -n "$M4_exists"; then
24342   echo "$as_me:24342: result: $M4_exists" >&5
24343 echo "${ECHO_T}$M4_exists" >&6
24344 else
24345   echo "$as_me:24345: result: no" >&5
24346 echo "${ECHO_T}no" >&6
24347 fi
24348
24349                 if test "$ac_cv_prog_M4_exists" = no; then
24350                         cf_cv_prog_gnat_correct=no
24351                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
24352                 fi
24353                 if test "$cf_cv_prog_gnat_correct" = yes; then
24354                         echo "$as_me:24354: checking if GNAT works" >&5
24355 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24356
24357 rm -rf conftest* *~conftest*
24358 cat >>conftest.ads <<CF_EOF
24359 procedure conftest;
24360 CF_EOF
24361 cat >>conftest.adb <<CF_EOF
24362 with Text_IO;
24363 with GNAT.OS_Lib;
24364 procedure conftest is
24365 begin
24366    Text_IO.Put ("Hello World");
24367    Text_IO.New_Line;
24368    GNAT.OS_Lib.OS_Exit (0);
24369 end conftest;
24370 CF_EOF
24371 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24372    if ( ./conftest 1>&5 2>&1 ) ; then
24373       cf_cv_prog_gnat_correct=yes
24374    else
24375       cf_cv_prog_gnat_correct=no
24376    fi
24377 else
24378    cf_cv_prog_gnat_correct=no
24379 fi
24380 rm -rf conftest* *~conftest*
24381
24382                         echo "$as_me:24382: result: $cf_cv_prog_gnat_correct" >&5
24383 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24384                 fi
24385         else
24386                 cf_cv_prog_gnat_correct=no
24387         fi
24388 fi
24389
24390                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24391
24392         ADAFLAGS="$ADAFLAGS -gnatpn"
24393
24394         echo "$as_me:24394: checking optimization options for ADAFLAGS" >&5
24395 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24396         case "$CFLAGS" in
24397         (*-g*)
24398
24399         ADAFLAGS="$ADAFLAGS -g"
24400
24401                 ;;
24402         esac
24403         case "$CFLAGS" in
24404         (*-O*)
24405                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24406
24407         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24408
24409                 ;;
24410         esac
24411         echo "$as_me:24411: result: $ADAFLAGS" >&5
24412 echo "${ECHO_T}$ADAFLAGS" >&6
24413
24414 echo "$as_me:24414: checking if GNATPREP supports -T option" >&5
24415 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24416 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24417   echo $ECHO_N "(cached) $ECHO_C" >&6
24418 else
24419
24420 cf_cv_gnatprep_opt_t=no
24421 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24422
24423 fi
24424 echo "$as_me:24424: result: $cf_cv_gnatprep_opt_t" >&5
24425 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24426 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24427
24428 echo "$as_me:24428: checking if GNAT supports generics" >&5
24429 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24430 case $cf_gnat_version in
24431 (3.[1-9]*|[4-9].*)
24432         cf_gnat_generics=yes
24433         ;;
24434 (*)
24435         cf_gnat_generics=no
24436         ;;
24437 esac
24438 echo "$as_me:24438: result: $cf_gnat_generics" >&5
24439 echo "${ECHO_T}$cf_gnat_generics" >&6
24440
24441 if test "$cf_gnat_generics" = yes
24442 then
24443         cf_compile_generics=generics
24444         cf_generic_objects="\${GENOBJS}"
24445 else
24446         cf_compile_generics=
24447         cf_generic_objects=
24448 fi
24449
24450 echo "$as_me:24450: checking if GNAT supports SIGINT" >&5
24451 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24452 if test "${cf_cv_gnat_sigint+set}" = set; then
24453   echo $ECHO_N "(cached) $ECHO_C" >&6
24454 else
24455
24456 rm -rf conftest* *~conftest*
24457 cat >>conftest.ads <<CF_EOF
24458 with Ada.Interrupts.Names;
24459
24460 package ConfTest is
24461
24462    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24463    pragma Unreserve_All_Interrupts;
24464    pragma Warnings (On);
24465
24466    protected Process is
24467       procedure Stop;
24468       function Continue return Boolean;
24469       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24470    private
24471       Done : Boolean := False;
24472    end Process;
24473
24474 end ConfTest;
24475 CF_EOF
24476 cat >>conftest.adb <<CF_EOF
24477 package body ConfTest is
24478    protected body Process is
24479       procedure Stop is
24480       begin
24481          Done := True;
24482       end Stop;
24483       function Continue return Boolean is
24484       begin
24485          return not Done;
24486       end Continue;
24487    end Process;
24488 end ConfTest;
24489 CF_EOF
24490 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24491       cf_cv_gnat_sigint=yes
24492 else
24493    cf_cv_gnat_sigint=no
24494 fi
24495 rm -rf conftest* *~conftest*
24496
24497 fi
24498 echo "$as_me:24498: result: $cf_cv_gnat_sigint" >&5
24499 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24500
24501 if test $cf_cv_gnat_sigint = yes ; then
24502         USE_GNAT_SIGINT=""
24503 else
24504         USE_GNAT_SIGINT="#"
24505 fi
24506
24507 cf_gnat_libraries=no
24508 cf_gnat_projects=no
24509
24510 if test "$enable_gnat_projects" != no ; then
24511 echo "$as_me:24511: checking if GNAT supports project files" >&5
24512 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24513 case $cf_gnat_version in
24514 (3.[0-9]*)
24515         ;;
24516 (*)
24517         case $cf_cv_system_name in
24518         (cygwin*|msys*)
24519                 ;;
24520         (*)
24521                 rm -rf conftest* *~conftest*
24522                 if mkdir conftest.src conftest.bin conftest.lib
24523                 then
24524                         cd conftest.src
24525                         rm -rf conftest* *~conftest*
24526                         cat >>library.gpr <<CF_EOF
24527 project Library is
24528   Kind := External ("LIB_KIND");
24529   for Library_Name use "ConfTest";
24530   for Object_Dir use ".";
24531   for Library_ALI_Dir use External("LIBRARY_DIR");
24532   for Library_Version use External ("SONAME");
24533   for Library_Kind use Kind;
24534   for Library_Dir use External("BUILD_DIR");
24535   Source_Dir := External ("SOURCE_DIR");
24536   for Source_Dirs use (Source_Dir);
24537 end Library;
24538 CF_EOF
24539                         cat >>confpackage.ads <<CF_EOF
24540 package ConfPackage is
24541    procedure conftest;
24542 end ConfPackage;
24543 CF_EOF
24544                         cat >>confpackage.adb <<CF_EOF
24545 with Text_IO;
24546 package body ConfPackage is
24547    procedure conftest is
24548    begin
24549       Text_IO.Put ("Hello World");
24550       Text_IO.New_Line;
24551    end conftest;
24552 end ConfPackage;
24553 CF_EOF
24554                         if ( $cf_ada_make $ADAFLAGS \
24555                                         -Plibrary.gpr \
24556                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24557                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24558                                         -XSOURCE_DIR=`pwd` \
24559                                         -XSONAME=libConfTest.so.1 \
24560                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24561                                 cf_gnat_projects=yes
24562                         fi
24563                         cd ..
24564                 fi
24565                 if test -f conftest.lib/confpackage.ali
24566                 then
24567                         cf_gnat_libraries=yes
24568                 fi
24569                 rm -rf conftest* *~conftest*
24570                 ;;
24571         esac
24572         ;;
24573 esac
24574 echo "$as_me:24574: result: $cf_gnat_projects" >&5
24575 echo "${ECHO_T}$cf_gnat_projects" >&6
24576 fi # enable_gnat_projects
24577
24578 if test $cf_gnat_projects = yes
24579 then
24580         echo "$as_me:24580: checking if GNAT supports libraries" >&5
24581 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24582         echo "$as_me:24582: result: $cf_gnat_libraries" >&5
24583 echo "${ECHO_T}$cf_gnat_libraries" >&6
24584 fi
24585
24586 if test "$cf_gnat_projects" = yes
24587 then
24588         USE_OLD_MAKERULES="#"
24589         USE_GNAT_PROJECTS=""
24590 else
24591         USE_OLD_MAKERULES=""
24592         USE_GNAT_PROJECTS="#"
24593 fi
24594
24595 if test "$cf_gnat_libraries" = yes
24596 then
24597         USE_GNAT_LIBRARIES=""
24598 else
24599         USE_GNAT_LIBRARIES="#"
24600 fi
24601
24602 echo "$as_me:24602: checking for ada-compiler" >&5
24603 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24604
24605 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24606 if test "${with_ada_compiler+set}" = set; then
24607   withval="$with_ada_compiler"
24608   cf_ada_compiler=$withval
24609 else
24610   cf_ada_compiler=gnatmake
24611 fi;
24612
24613 echo "$as_me:24613: result: $cf_ada_compiler" >&5
24614 echo "${ECHO_T}$cf_ada_compiler" >&6
24615
24616                         cf_ada_package=terminal_interface
24617
24618 echo "$as_me:24618: checking for ada-include" >&5
24619 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24620
24621 # Check whether --with-ada-include or --without-ada-include was given.
24622 if test "${with_ada_include+set}" = set; then
24623   withval="$with_ada_include"
24624
24625 else
24626   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24627 fi; if test -n "$prefix/share/ada/adainclude" ; then
24628
24629 if test "x$prefix" != xNONE; then
24630         cf_path_syntax="$prefix"
24631 else
24632         cf_path_syntax="$ac_default_prefix"
24633 fi
24634
24635 case ".$withval" in
24636 (.\$\(*\)*|.\'*\'*)
24637         ;;
24638 (..|./*|.\\*)
24639         ;;
24640 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24641         ;;
24642 (.\${*prefix}*|.\${*dir}*)
24643         eval withval="$withval"
24644         case ".$withval" in
24645         (.NONE/*)
24646                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24647                 ;;
24648         esac
24649         ;;
24650 (.no|.NONE/*)
24651         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24652         ;;
24653 (*)
24654         { { echo "$as_me:24654: error: expected a pathname, not \"$withval\"" >&5
24655 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24656    { (exit 1); exit 1; }; }
24657         ;;
24658 esac
24659
24660 fi
24661 eval ADA_INCLUDE="$withval"
24662
24663 echo "$as_me:24663: result: $ADA_INCLUDE" >&5
24664 echo "${ECHO_T}$ADA_INCLUDE" >&6
24665
24666 echo "$as_me:24666: checking for ada-objects" >&5
24667 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24668
24669 # Check whether --with-ada-objects or --without-ada-objects was given.
24670 if test "${with_ada_objects+set}" = set; then
24671   withval="$with_ada_objects"
24672
24673 else
24674   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24675 fi; if test -n "$prefix/lib/ada/adalib" ; then
24676
24677 if test "x$prefix" != xNONE; then
24678         cf_path_syntax="$prefix"
24679 else
24680         cf_path_syntax="$ac_default_prefix"
24681 fi
24682
24683 case ".$withval" in
24684 (.\$\(*\)*|.\'*\'*)
24685         ;;
24686 (..|./*|.\\*)
24687         ;;
24688 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24689         ;;
24690 (.\${*prefix}*|.\${*dir}*)
24691         eval withval="$withval"
24692         case ".$withval" in
24693         (.NONE/*)
24694                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24695                 ;;
24696         esac
24697         ;;
24698 (.no|.NONE/*)
24699         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24700         ;;
24701 (*)
24702         { { echo "$as_me:24702: error: expected a pathname, not \"$withval\"" >&5
24703 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24704    { (exit 1); exit 1; }; }
24705         ;;
24706 esac
24707
24708 fi
24709 eval ADA_OBJECTS="$withval"
24710
24711 echo "$as_me:24711: result: $ADA_OBJECTS" >&5
24712 echo "${ECHO_T}$ADA_OBJECTS" >&6
24713
24714 echo "$as_me:24714: checking if an Ada95 shared-library should be built" >&5
24715 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24716
24717 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24718 if test "${with_ada_sharedlib+set}" = set; then
24719   withval="$with_ada_sharedlib"
24720   with_ada_sharedlib=$withval
24721 else
24722   with_ada_sharedlib=no
24723 fi;
24724 echo "$as_me:24724: result: $with_ada_sharedlib" >&5
24725 echo "${ECHO_T}$with_ada_sharedlib" >&6
24726
24727 if test "x$with_ada_sharedlib" != xno
24728 then
24729         if test "x$cf_gnat_projects" != xyes
24730         then
24731                 { echo "$as_me:24731: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24732 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24733                 with_ada_sharedlib=no
24734         fi
24735 fi
24736
24737 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24738 MAKE_ADA_SHAREDLIB="#"
24739
24740 if test "x$with_ada_sharedlib" != xno
24741 then
24742         MAKE_ADA_SHAREDLIB=
24743         if test "x$with_ada_sharedlib" != xyes
24744         then
24745                 ADA_SHAREDLIB="$with_ada_sharedlib"
24746         fi
24747 fi
24748
24749                 fi
24750         fi
24751 else
24752         cf_with_ada=no
24753 fi
24754
24755 # do this "late" to avoid conflict with header-checks
24756 if test "x$with_widec" = xyes ; then
24757         echo "$as_me:24757: checking for wchar_t" >&5
24758 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24759 if test "${ac_cv_type_wchar_t+set}" = set; then
24760   echo $ECHO_N "(cached) $ECHO_C" >&6
24761 else
24762   cat >conftest.$ac_ext <<_ACEOF
24763 #line 24763 "configure"
24764 #include "confdefs.h"
24765 $ac_includes_default
24766 int
24767 main (void)
24768 {
24769 if ((wchar_t *) 0)
24770   return 0;
24771 if (sizeof (wchar_t))
24772   return 0;
24773   ;
24774   return 0;
24775 }
24776 _ACEOF
24777 rm -f conftest.$ac_objext
24778 if { (eval echo "$as_me:24778: \"$ac_compile\"") >&5
24779   (eval $ac_compile) 2>&5
24780   ac_status=$?
24781   echo "$as_me:24781: \$? = $ac_status" >&5
24782   (exit $ac_status); } &&
24783          { ac_try='test -s conftest.$ac_objext'
24784   { (eval echo "$as_me:24784: \"$ac_try\"") >&5
24785   (eval $ac_try) 2>&5
24786   ac_status=$?
24787   echo "$as_me:24787: \$? = $ac_status" >&5
24788   (exit $ac_status); }; }; then
24789   ac_cv_type_wchar_t=yes
24790 else
24791   echo "$as_me: failed program was:" >&5
24792 cat conftest.$ac_ext >&5
24793 ac_cv_type_wchar_t=no
24794 fi
24795 rm -f conftest.$ac_objext conftest.$ac_ext
24796 fi
24797 echo "$as_me:24797: result: $ac_cv_type_wchar_t" >&5
24798 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24799
24800 echo "$as_me:24800: checking size of wchar_t" >&5
24801 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24802 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24803   echo $ECHO_N "(cached) $ECHO_C" >&6
24804 else
24805   if test "$ac_cv_type_wchar_t" = yes; then
24806   if test "$cross_compiling" = yes; then
24807   # Depending upon the size, compute the lo and hi bounds.
24808 cat >conftest.$ac_ext <<_ACEOF
24809 #line 24809 "configure"
24810 #include "confdefs.h"
24811 $ac_includes_default
24812 int
24813 main (void)
24814 {
24815 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24816   ;
24817   return 0;
24818 }
24819 _ACEOF
24820 rm -f conftest.$ac_objext
24821 if { (eval echo "$as_me:24821: \"$ac_compile\"") >&5
24822   (eval $ac_compile) 2>&5
24823   ac_status=$?
24824   echo "$as_me:24824: \$? = $ac_status" >&5
24825   (exit $ac_status); } &&
24826          { ac_try='test -s conftest.$ac_objext'
24827   { (eval echo "$as_me:24827: \"$ac_try\"") >&5
24828   (eval $ac_try) 2>&5
24829   ac_status=$?
24830   echo "$as_me:24830: \$? = $ac_status" >&5
24831   (exit $ac_status); }; }; then
24832   ac_lo=0 ac_mid=0
24833   while :; do
24834     cat >conftest.$ac_ext <<_ACEOF
24835 #line 24835 "configure"
24836 #include "confdefs.h"
24837 $ac_includes_default
24838 int
24839 main (void)
24840 {
24841 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24842   ;
24843   return 0;
24844 }
24845 _ACEOF
24846 rm -f conftest.$ac_objext
24847 if { (eval echo "$as_me:24847: \"$ac_compile\"") >&5
24848   (eval $ac_compile) 2>&5
24849   ac_status=$?
24850   echo "$as_me:24850: \$? = $ac_status" >&5
24851   (exit $ac_status); } &&
24852          { ac_try='test -s conftest.$ac_objext'
24853   { (eval echo "$as_me:24853: \"$ac_try\"") >&5
24854   (eval $ac_try) 2>&5
24855   ac_status=$?
24856   echo "$as_me:24856: \$? = $ac_status" >&5
24857   (exit $ac_status); }; }; then
24858   ac_hi=$ac_mid; break
24859 else
24860   echo "$as_me: failed program was:" >&5
24861 cat conftest.$ac_ext >&5
24862 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24863 fi
24864 rm -f conftest.$ac_objext conftest.$ac_ext
24865   done
24866 else
24867   echo "$as_me: failed program was:" >&5
24868 cat conftest.$ac_ext >&5
24869 ac_hi=-1 ac_mid=-1
24870   while :; do
24871     cat >conftest.$ac_ext <<_ACEOF
24872 #line 24872 "configure"
24873 #include "confdefs.h"
24874 $ac_includes_default
24875 int
24876 main (void)
24877 {
24878 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24879   ;
24880   return 0;
24881 }
24882 _ACEOF
24883 rm -f conftest.$ac_objext
24884 if { (eval echo "$as_me:24884: \"$ac_compile\"") >&5
24885   (eval $ac_compile) 2>&5
24886   ac_status=$?
24887   echo "$as_me:24887: \$? = $ac_status" >&5
24888   (exit $ac_status); } &&
24889          { ac_try='test -s conftest.$ac_objext'
24890   { (eval echo "$as_me:24890: \"$ac_try\"") >&5
24891   (eval $ac_try) 2>&5
24892   ac_status=$?
24893   echo "$as_me:24893: \$? = $ac_status" >&5
24894   (exit $ac_status); }; }; then
24895   ac_lo=$ac_mid; break
24896 else
24897   echo "$as_me: failed program was:" >&5
24898 cat conftest.$ac_ext >&5
24899 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24900 fi
24901 rm -f conftest.$ac_objext conftest.$ac_ext
24902   done
24903 fi
24904 rm -f conftest.$ac_objext conftest.$ac_ext
24905 # Binary search between lo and hi bounds.
24906 while test "x$ac_lo" != "x$ac_hi"; do
24907   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24908   cat >conftest.$ac_ext <<_ACEOF
24909 #line 24909 "configure"
24910 #include "confdefs.h"
24911 $ac_includes_default
24912 int
24913 main (void)
24914 {
24915 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24916   ;
24917   return 0;
24918 }
24919 _ACEOF
24920 rm -f conftest.$ac_objext
24921 if { (eval echo "$as_me:24921: \"$ac_compile\"") >&5
24922   (eval $ac_compile) 2>&5
24923   ac_status=$?
24924   echo "$as_me:24924: \$? = $ac_status" >&5
24925   (exit $ac_status); } &&
24926          { ac_try='test -s conftest.$ac_objext'
24927   { (eval echo "$as_me:24927: \"$ac_try\"") >&5
24928   (eval $ac_try) 2>&5
24929   ac_status=$?
24930   echo "$as_me:24930: \$? = $ac_status" >&5
24931   (exit $ac_status); }; }; then
24932   ac_hi=$ac_mid
24933 else
24934   echo "$as_me: failed program was:" >&5
24935 cat conftest.$ac_ext >&5
24936 ac_lo=`expr $ac_mid + 1`
24937 fi
24938 rm -f conftest.$ac_objext conftest.$ac_ext
24939 done
24940 ac_cv_sizeof_wchar_t=$ac_lo
24941 else
24942   if test "$cross_compiling" = yes; then
24943   { { echo "$as_me:24943: error: cannot run test program while cross compiling" >&5
24944 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
24945    { (exit 1); exit 1; }; }
24946 else
24947   cat >conftest.$ac_ext <<_ACEOF
24948 #line 24948 "configure"
24949 #include "confdefs.h"
24950 $ac_includes_default
24951 int
24952 main (void)
24953 {
24954 FILE *f = fopen ("conftest.val", "w");
24955 if (!f)
24956   $ac_main_return (1);
24957 fprintf (f, "%d", (sizeof (wchar_t)));
24958 fclose (f);
24959   ;
24960   return 0;
24961 }
24962 _ACEOF
24963 rm -f conftest$ac_exeext
24964 if { (eval echo "$as_me:24964: \"$ac_link\"") >&5
24965   (eval $ac_link) 2>&5
24966   ac_status=$?
24967   echo "$as_me:24967: \$? = $ac_status" >&5
24968   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24969   { (eval echo "$as_me:24969: \"$ac_try\"") >&5
24970   (eval $ac_try) 2>&5
24971   ac_status=$?
24972   echo "$as_me:24972: \$? = $ac_status" >&5
24973   (exit $ac_status); }; }; then
24974   ac_cv_sizeof_wchar_t=`cat conftest.val`
24975 else
24976   echo "$as_me: program exited with status $ac_status" >&5
24977 echo "$as_me: failed program was:" >&5
24978 cat conftest.$ac_ext >&5
24979 fi
24980 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24981 fi
24982 fi
24983 rm -f conftest.val
24984 else
24985   ac_cv_sizeof_wchar_t=0
24986 fi
24987 fi
24988 echo "$as_me:24988: result: $ac_cv_sizeof_wchar_t" >&5
24989 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
24990 cat >>confdefs.h <<EOF
24991 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
24992 EOF
24993
24994 fi
24995
24996 ### Construct the ncurses library-subsets, if any, from this set of keywords:
24997 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
24998 ###
24999 ### ticlib modules may be a separate library, otherwise contained in termlib.
25000 ### termlib modules may be a separate library, otherwise contained in ncurses.
25001 ###
25002 ### The of "+" or " " between the tokens controls the way the script
25003 ### chooses to split module lists into libraries.
25004 ###
25005 ### (see CF_LIB_RULES).
25006 echo "$as_me:25006: checking for library subsets" >&5
25007 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25008 LIB_SUBSETS=
25009
25010 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25011         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25012         if test "$with_ticlib" != no ; then
25013                 LIB_SUBSETS="${LIB_SUBSETS} "
25014         else
25015                 LIB_SUBSETS="${LIB_SUBSETS}+"
25016         fi
25017 fi
25018
25019 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25020 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25021
25022 if test "$with_termlib" != no ; then
25023         LIB_SUBSETS="${LIB_SUBSETS} "
25024 else
25025         LIB_SUBSETS="${LIB_SUBSETS}+"
25026 fi
25027
25028 LIB_SUBSETS="${LIB_SUBSETS}base"
25029
25030 # Most term-driver calls are to tinfo, but some like init_pair are to the
25031 # base library (so it resides in base).
25032 if test "$with_term_driver" != no ; then
25033         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25034         case $cf_cv_system_name in
25035         (*mingw32*|*mingw64*)
25036                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25037                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25038                 ;;
25039         (*)
25040                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25041                 ;;
25042         esac
25043 fi
25044
25045 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25046 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25047
25048 echo "$as_me:25048: result: $LIB_SUBSETS" >&5
25049 echo "${ECHO_T}$LIB_SUBSETS" >&6
25050
25051 ### Construct the list of include-directories to be generated
25052
25053 if test "$srcdir" != "."; then
25054         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25055 fi
25056 CPPFLAGS="-I../include $CPPFLAGS"
25057 if test "$srcdir" != "."; then
25058         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25059 fi
25060 CPPFLAGS="-I. $CPPFLAGS"
25061
25062 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25063 if test "$srcdir" != "."; then
25064         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25065 fi
25066 if test "$GCC" != yes; then
25067         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25068 elif test "$includedir" != "/usr/include"; then
25069         if test "$includedir" = '${prefix}/include' ; then
25070                 if test x$prefix != x/usr ; then
25071                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25072                 fi
25073         else
25074                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25075         fi
25076 fi
25077
25078 ### Build up pieces for makefile rules
25079 echo "$as_me:25079: checking default library suffix" >&5
25080 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25081
25082         case $DFT_LWR_MODEL in
25083         (libtool) DFT_ARG_SUFFIX=''   ;;
25084         (normal)  DFT_ARG_SUFFIX=''   ;;
25085         (debug)   DFT_ARG_SUFFIX='_g' ;;
25086         (profile) DFT_ARG_SUFFIX='_p' ;;
25087         (shared)  DFT_ARG_SUFFIX=''   ;;
25088         esac
25089         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25090 echo "$as_me:25090: result: $DFT_ARG_SUFFIX" >&5
25091 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25092
25093 echo "$as_me:25093: checking default library-dependency suffix" >&5
25094 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25095
25096         case X$DFT_LWR_MODEL in
25097         (Xlibtool)
25098                 DFT_LIB_SUFFIX='.la'
25099                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25100                 ;;
25101         (Xdebug)
25102                 DFT_LIB_SUFFIX='_g.a'
25103                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25104                 ;;
25105         (Xprofile)
25106                 DFT_LIB_SUFFIX='_p.a'
25107                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25108                 ;;
25109         (Xshared)
25110                 case $cf_cv_system_name in
25111                 (aix[5-7]*)
25112                         DFT_LIB_SUFFIX='.so'
25113                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25114                         ;;
25115                 (cygwin*|msys*|mingw*)
25116                         DFT_LIB_SUFFIX='.dll'
25117                         DFT_DEP_SUFFIX='.dll.a'
25118                         ;;
25119                 (darwin*)
25120                         DFT_LIB_SUFFIX='.dylib'
25121                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25122                         ;;
25123                 (hpux*)
25124                         case $target in
25125                         (ia64*)
25126                                 DFT_LIB_SUFFIX='.so'
25127                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25128                                 ;;
25129                         (*)
25130                                 DFT_LIB_SUFFIX='.sl'
25131                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25132                                 ;;
25133                         esac
25134                         ;;
25135                 (*)
25136                         DFT_LIB_SUFFIX='.so'
25137                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25138                         ;;
25139                 esac
25140                 ;;
25141         (*)
25142                 DFT_LIB_SUFFIX='.a'
25143                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25144                 ;;
25145         esac
25146         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25147         then
25148                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25149                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25150         fi
25151 echo "$as_me:25151: result: $DFT_DEP_SUFFIX" >&5
25152 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25153
25154 echo "$as_me:25154: checking default object directory" >&5
25155 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25156
25157         case $DFT_LWR_MODEL in
25158         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25159         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25160         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25161         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25162         (shared)
25163                 case $cf_cv_system_name in
25164                 (cygwin|msys)
25165                         DFT_OBJ_SUBDIR='objects' ;;
25166                 (*)
25167                         DFT_OBJ_SUBDIR='obj_s' ;;
25168                 esac
25169         esac
25170 echo "$as_me:25170: result: $DFT_OBJ_SUBDIR" >&5
25171 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25172
25173 if test "x$cf_with_cxx" = xyes ; then
25174 echo "$as_me:25174: checking c++ library-dependency suffix" >&5
25175 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25176 if test "$with_libtool" != "no"; then
25177         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25178         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25179 elif test "$with_shared_cxx" != "no"; then
25180         # also for g++ users...
25181         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25182 else
25183         # we normally make a static library because C/C++ library rules differ
25184
25185         case Xnormal in
25186         (Xlibtool)
25187                 CXX_LIB_SUFFIX='.la'
25188                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25189                 ;;
25190         (Xdebug)
25191                 CXX_LIB_SUFFIX='_g.a'
25192                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25193                 ;;
25194         (Xprofile)
25195                 CXX_LIB_SUFFIX='_p.a'
25196                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25197                 ;;
25198         (Xshared)
25199                 case $cf_cv_system_name in
25200                 (aix[5-7]*)
25201                         CXX_LIB_SUFFIX='.so'
25202                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25203                         ;;
25204                 (cygwin*|msys*|mingw*)
25205                         CXX_LIB_SUFFIX='.dll'
25206                         CXX_DEP_SUFFIX='.dll.a'
25207                         ;;
25208                 (darwin*)
25209                         CXX_LIB_SUFFIX='.dylib'
25210                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25211                         ;;
25212                 (hpux*)
25213                         case $target in
25214                         (ia64*)
25215                                 CXX_LIB_SUFFIX='.so'
25216                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25217                                 ;;
25218                         (*)
25219                                 CXX_LIB_SUFFIX='.sl'
25220                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25221                                 ;;
25222                         esac
25223                         ;;
25224                 (*)
25225                         CXX_LIB_SUFFIX='.so'
25226                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25227                         ;;
25228                 esac
25229                 ;;
25230         (*)
25231                 CXX_LIB_SUFFIX='.a'
25232                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25233                 ;;
25234         esac
25235         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25236         then
25237                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25238                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25239         fi
25240
25241 fi
25242 echo "$as_me:25242: result: $CXX_LIB_SUFFIX" >&5
25243 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25244
25245 fi
25246
25247 # do not want -ldl in build except as needed for -lncurses dependency
25248 if test "x$with_dlsym" = xyes ; then
25249 if test $DFT_LWR_MODEL = shared || \
25250    test $DFT_LWR_MODEL = libtool ; then
25251
25252 # remove dl library from $LIBS
25253 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25254
25255 fi
25256 fi
25257 ### Set up low-level terminfo dependencies for makefiles.
25258
25259 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25260 # do not need libdl
25261 TICS_LIST=
25262 if test "x$with_dlsym" = xyes ; then
25263
25264 # remove dl library from $SHLIB_LIST
25265 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25266
25267 fi
25268
25269 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25270 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25271 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25272 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25273 then
25274         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25275 fi
25276
25277 if test "$with_ticlib" != no ; then
25278
25279         if test "x$with_ticlib" != xyes ; then
25280                 TICS_NAME=$with_ticlib
25281                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25282                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25283                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25284                 TICS_LIB_SUFFIX="${with_ticlib}"
25285         else
25286                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25287                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25288                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25289                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25290         fi
25291         TICS_LDFLAGS="-L${LIB_DIR}"
25292         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25293 else
25294         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25295         TICS_LDFLAGS="-L${LIB_DIR}"
25296         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25297 fi
25298
25299 if test "$with_termlib" != no ; then
25300
25301         if test "x$with_termlib" != xyes ; then
25302                 TINFO_NAME=$with_termlib
25303                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25304                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25305                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25306                 TINFO_LIB_SUFFIX="${with_termlib}"
25307         else
25308                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25309                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25310                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25311                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25312         fi
25313
25314         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25315         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25316         if test "$DFT_LWR_MODEL" = "libtool"; then
25317                 TEST_ARGS="${TEST_DEPS}"
25318                 TEST_ARG2="${TEST_DEP2}"
25319                 TINFO_LDFLAGS="-L${LIB_DIR}"
25320                 TINFO_LIBS="$TEST_ARGS"
25321                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25322                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25323         else
25324                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25325                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25326                 if test "x$with_term_driver" != xno ; then
25327                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25328                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25329                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25330                 else
25331                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25332                         TINFO_LIBS="$TEST_ARGS"
25333                 fi
25334                 TINFO_LDFLAGS="-L${LIB_DIR}"
25335                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25336         fi
25337 else
25338         # the next lines are needed for linking libtic over libncurses
25339         TINFO_NAME=${LIB_NAME}
25340         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25341         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25342         if test "x$with_tic_depends" = xyes ; then
25343                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25344         else
25345                 TICS_LIST="$SHLIB_LIST"
25346         fi
25347
25348         TINFO_LDFLAGS="-L${LIB_DIR}"
25349         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25350 fi
25351
25352 if test "$DFT_LWR_MODEL" = shared ; then
25353         case $cf_cv_system_name in
25354         (cygwin*|msys*)
25355                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25356                 TINFO_SUFFIX=.dll
25357                 ;;
25358         esac
25359 fi
25360
25361 if test "x$with_dlsym" = xyes ; then
25362
25363 # remove dl library from $TICS_LIST
25364 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25365
25366 fi
25367
25368 if test "$DFT_LWR_MODEL" = "libtool"; then
25369         OBJEXT=lo
25370 fi
25371
25372 # needed for Ada95
25373 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25374
25375 case $DFT_LWR_MODEL in
25376 (normal|debug|profile)
25377
25378 if test "$GCC" = yes ; then
25379         case $cf_cv_system_name in
25380         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25381                 LDFLAGS_STATIC=
25382                 LDFLAGS_SHARED=
25383                 ;;
25384         (*)     # normally, except when broken
25385                 LDFLAGS_STATIC=-static
25386                 LDFLAGS_SHARED=-dynamic
25387                 ;;
25388         esac
25389 else
25390         case $cf_cv_system_name in
25391         (aix[4-7]*)     # from ld manpage
25392                 LDFLAGS_STATIC=-bstatic
25393                 LDFLAGS_SHARED=-bdynamic
25394                 ;;
25395         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25396                 # We could also use just "archive" and "shared".
25397                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25398                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25399                 ;;
25400         (irix*)         # from ld manpage IRIX64
25401                 LDFLAGS_STATIC=-Bstatic
25402                 LDFLAGS_SHARED=-Bdynamic
25403                 ;;
25404         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25405                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25406                 LDFLAGS_STATIC=-noso
25407                 LDFLAGS_SHARED=-so_archive
25408                 ;;
25409         (solaris2*)
25410                 LDFLAGS_STATIC=-Bstatic
25411                 LDFLAGS_SHARED=-Bdynamic
25412                 ;;
25413         esac
25414 fi
25415
25416 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25417 then
25418         echo "$as_me:25418: checking if linker supports switching between static/dynamic" >&5
25419 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25420
25421         rm -f libconftest.a
25422         cat >conftest.$ac_ext <<EOF
25423 #line 25423 "configure"
25424 #include <stdio.h>
25425 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25426 EOF
25427         if { (eval echo "$as_me:25427: \"$ac_compile\"") >&5
25428   (eval $ac_compile) 2>&5
25429   ac_status=$?
25430   echo "$as_me:25430: \$? = $ac_status" >&5
25431   (exit $ac_status); } ; then
25432                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25433                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25434         fi
25435         rm -f conftest.*
25436
25437         cf_save_LIBS="$LIBS"
25438
25439         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25440         cat >conftest.$ac_ext <<_ACEOF
25441 #line 25441 "configure"
25442 #include "confdefs.h"
25443
25444 #line 25444 "configure"
25445 #include <stdio.h>
25446 int cf_ldflags_static(FILE *fp);
25447
25448 int
25449 main (void)
25450 {
25451
25452         return cf_ldflags_static(stdin);
25453
25454   ;
25455   return 0;
25456 }
25457 _ACEOF
25458 rm -f conftest.$ac_objext conftest$ac_exeext
25459 if { (eval echo "$as_me:25459: \"$ac_link\"") >&5
25460   (eval $ac_link) 2>&5
25461   ac_status=$?
25462   echo "$as_me:25462: \$? = $ac_status" >&5
25463   (exit $ac_status); } &&
25464          { ac_try='test -s conftest$ac_exeext'
25465   { (eval echo "$as_me:25465: \"$ac_try\"") >&5
25466   (eval $ac_try) 2>&5
25467   ac_status=$?
25468   echo "$as_me:25468: \$? = $ac_status" >&5
25469   (exit $ac_status); }; }; then
25470
25471         # some linkers simply ignore the -dynamic
25472         case x`file conftest$ac_exeext 2>/dev/null` in
25473         (*static*)
25474                 cf_ldflags_static=no
25475                 ;;
25476         (*)
25477                 cf_ldflags_static=yes
25478                 ;;
25479         esac
25480
25481 else
25482   echo "$as_me: failed program was:" >&5
25483 cat conftest.$ac_ext >&5
25484 cf_ldflags_static=no
25485 fi
25486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25487
25488         rm -f libconftest.*
25489         LIBS="$cf_save_LIBS"
25490
25491         echo "$as_me:25491: result: $cf_ldflags_static" >&5
25492 echo "${ECHO_T}$cf_ldflags_static" >&6
25493
25494         if test $cf_ldflags_static != yes
25495         then
25496                 LDFLAGS_STATIC=
25497                 LDFLAGS_SHARED=
25498         fi
25499 else
25500         LDFLAGS_STATIC=
25501         LDFLAGS_SHARED=
25502 fi
25503
25504         ;;
25505 esac
25506
25507 echo "$as_me:25507: checking where we will install curses.h" >&5
25508 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25509
25510 includesubdir=
25511 if test "$with_overwrite" = no && \
25512  ( test "x$includedir" = 'x${prefix}/include' || \
25513    test "x$includedir" = "x${prefix}/include" )
25514 then
25515         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25516 fi
25517 echo "$as_me:25517: result: ${includedir}${includesubdir}" >&5
25518 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25519
25520 ### Resolve a conflict between normal and wide-curses by forcing applications
25521 ### that will need libutf8 to add it to their configure script.
25522 if test "$with_overwrite" != no ; then
25523 if test "$NCURSES_LIBUTF8" = 1 ; then
25524         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25525         { echo "$as_me:25525: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25526 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25527 fi
25528 fi
25529 WITH_OVERWRITE=$with_overwrite
25530
25531 # used to separate tack out of the tree
25532 NCURSES_TREE=
25533
25534 ### predefined stuff for the test programs
25535
25536 cat >>confdefs.h <<\EOF
25537 #define HAVE_SLK_COLOR 1
25538 EOF
25539
25540 ### Construct the list of subdirectories for which we'll customize makefiles
25541 ### with the appropriate compile-rules.
25542
25543 echo "$as_me:25543: checking for src modules" >&5
25544 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25545
25546 # dependencies and linker-arguments for test-programs
25547 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25548 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25549 if test "$DFT_LWR_MODEL" = "libtool"; then
25550         TEST_ARGS="${TEST_DEPS}"
25551         TEST_ARG2="${TEST_DEP2}"
25552 else
25553         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25554         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25555 fi
25556
25557 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25558 cf_cv_src_modules=
25559 for cf_dir in $modules_to_build
25560 do
25561         if test -f $srcdir/$cf_dir/modules; then
25562
25563                 # We may/may not have tack in the distribution, though the
25564                 # makefile is.
25565                 if test $cf_dir = tack ; then
25566                         if test "x$cf_with_tack" != "xyes"; then
25567                                 continue
25568                         fi
25569                 fi
25570
25571                 if test -z "$cf_cv_src_modules"; then
25572                         cf_cv_src_modules=$cf_dir
25573                 else
25574                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25575                 fi
25576
25577                 # Make the ncurses_cfg.h file record the library interface files as
25578                 # well.  These are header files that are the same name as their
25579                 # directory.  Ncurses is the only library that does not follow
25580                 # that pattern.
25581                 if test $cf_dir = tack ; then
25582                         continue
25583                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25584
25585 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25586
25587                         cat >>confdefs.h <<EOF
25588 #define HAVE_${cf_have_include}_H 1
25589 EOF
25590
25591                         cat >>confdefs.h <<EOF
25592 #define HAVE_LIB${cf_have_include} 1
25593 EOF
25594
25595                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25596                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25597                         if test "$DFT_LWR_MODEL" = "libtool"; then
25598                                 TEST_ARGS="${TEST_DEPS}"
25599                                 TEST_ARG2="${TEST_DEP2}"
25600                         else
25601                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25602                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25603                         fi
25604                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25605                 fi
25606         fi
25607 done
25608 echo "$as_me:25608: result: $cf_cv_src_modules" >&5
25609 echo "${ECHO_T}$cf_cv_src_modules" >&6
25610
25611 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25612 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25613
25614 SRC_SUBDIRS=
25615 if test "x$cf_with_manpages" != xno ; then
25616         SRC_SUBDIRS="$SRC_SUBDIRS man"
25617 fi
25618 SRC_SUBDIRS="$SRC_SUBDIRS include"
25619 for cf_dir in $cf_cv_src_modules
25620 do
25621         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25622 done
25623 if test "x$cf_with_tests" != "xno" ; then
25624         SRC_SUBDIRS="$SRC_SUBDIRS test"
25625 fi
25626 # always make this, to install the ncurses-config script
25627 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25628 if test "$cf_with_cxx_binding" != no; then
25629         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25630         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25631 fi
25632
25633 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25634 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25635
25636 ADA_SUBDIRS=
25637 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25638         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25639         ADA_SUBDIRS="gen src"
25640         if test "x$cf_with_tests" != "xno" ; then
25641                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25642         fi
25643 fi
25644
25645 SUB_MAKEFILES=
25646 for cf_dir in $SRC_SUBDIRS
25647 do
25648         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25649 done
25650
25651 if test -n "$ADA_SUBDIRS"; then
25652         for cf_dir in $ADA_SUBDIRS
25653         do
25654                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25655         done
25656
25657 fi
25658
25659 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25660    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25661    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25662 fi
25663
25664 DIRS_TO_MAKE="lib"
25665 for cf_item in $cf_list_models
25666 do
25667
25668         case $cf_item in
25669         (libtool) cf_subdir='obj_lo'  ;;
25670         (normal)  cf_subdir='objects' ;;
25671         (debug)   cf_subdir='obj_g' ;;
25672         (profile) cf_subdir='obj_p' ;;
25673         (shared)
25674                 case $cf_cv_system_name in
25675                 (cygwin|msys)
25676                         cf_subdir='objects' ;;
25677                 (*)
25678                         cf_subdir='obj_s' ;;
25679                 esac
25680         esac
25681
25682         for cf_item2 in $DIRS_TO_MAKE
25683         do
25684                 test $cf_item2 = $cf_subdir && break
25685         done
25686         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25687 done
25688 for cf_dir in $DIRS_TO_MAKE
25689 do
25690         test ! -d $cf_dir && mkdir $cf_dir
25691 done
25692
25693 # symbols that differ when compiling Ada95 by itself.
25694 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25695
25696 # values to use as strings
25697
25698 cat >>confdefs.h <<EOF
25699 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25700 EOF
25701
25702 cat >>confdefs.h <<EOF
25703 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25704 EOF
25705
25706 ### Now that we're done running tests, add the compiler-warnings, if any
25707
25708 cf_fix_cppflags=no
25709 cf_new_cflags=
25710 cf_new_cppflags=
25711 cf_new_extra_cppflags=
25712
25713 for cf_add_cflags in $EXTRA_CFLAGS
25714 do
25715 case $cf_fix_cppflags in
25716 (no)
25717         case $cf_add_cflags in
25718         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25719                 case $cf_add_cflags in
25720                 (-D*)
25721                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25722
25723                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25724                                 && test -z "${cf_tst_cflags}" \
25725                                 && cf_fix_cppflags=yes
25726
25727                         if test $cf_fix_cppflags = yes ; then
25728
25729         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25730         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25731
25732                                 continue
25733                         elif test "${cf_tst_cflags}" = "\"'" ; then
25734
25735         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25736         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25737
25738                                 continue
25739                         fi
25740                         ;;
25741                 esac
25742                 case "$CPPFLAGS" in
25743                 (*$cf_add_cflags)
25744                         ;;
25745                 (*)
25746                         case $cf_add_cflags in
25747                         (-D*)
25748                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25749
25750 CPPFLAGS=`echo "$CPPFLAGS" | \
25751         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25752                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25753
25754                                 ;;
25755                         esac
25756
25757         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25758         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25759
25760                         ;;
25761                 esac
25762                 ;;
25763         (*)
25764
25765         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25766         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25767
25768                 ;;
25769         esac
25770         ;;
25771 (yes)
25772
25773         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25774         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25775
25776         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25777
25778         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25779                 && test -z "${cf_tst_cflags}" \
25780                 && cf_fix_cppflags=no
25781         ;;
25782 esac
25783 done
25784
25785 if test -n "$cf_new_cflags" ; then
25786
25787         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25788         CFLAGS="${CFLAGS}$cf_new_cflags"
25789
25790 fi
25791
25792 if test -n "$cf_new_cppflags" ; then
25793
25794         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25795         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25796
25797 fi
25798
25799 if test -n "$cf_new_extra_cppflags" ; then
25800
25801         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25802         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25803
25804 fi
25805
25806 ### Define substitutions for header files to avoid name-pollution
25807
25808 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25809         HAVE_TCGETATTR=1
25810 else
25811         HAVE_TCGETATTR=0
25812 fi
25813
25814 if test "x$ac_cv_header_stdint_h" = xyes ; then
25815         HAVE_STDINT_H=1
25816 else
25817         HAVE_STDINT_H=0
25818 fi
25819
25820 if test "x$ac_cv_header_termio_h" = xyes ; then
25821         HAVE_TERMIO_H=1
25822 else
25823         HAVE_TERMIO_H=0
25824 fi
25825
25826 if test "x$ac_cv_header_termios_h" = xyes ; then
25827         HAVE_TERMIOS_H=1
25828 else
25829         HAVE_TERMIOS_H=0
25830 fi
25831
25832 ################################################################################
25833 test "x$use_database" = xyes && \
25834 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25835
25836 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25837 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25838
25839 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25840 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25841 fi
25842
25843 if test "x$cf_with_tests" != xno ; then
25844         MAKE_TESTS=
25845 else
25846         MAKE_TESTS="#"
25847 fi
25848
25849 ADAHTML_DIR=../../doc/html/ada
25850
25851 # these could be configurable, but are not currently
25852 PANEL_NAME=panel
25853 MENU_NAME=menu
25854 FORM_NAME=form
25855 CXX_NAME=ncurses++
25856
25857 # workaround for OS/2 (20151017)
25858 case $cf_cv_system_name in
25859 (os2*)
25860         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25861         ;;
25862 (*)
25863         LIBTOOL_OPTS_CXX=
25864         ;;
25865 esac
25866
25867 # workaround for g++ versus Solaris (20131116)
25868 case $cf_cv_system_name in
25869 (solaris2*)
25870         case "x$CPPFLAGS" in
25871         (*-D_XOPEN_SOURCE_EXTENDED*)
25872                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25873
25874 echo "${as_me:-configure}:25874: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25875
25876                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25877                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25878                 ;;
25879         esac
25880         ;;
25881 esac
25882
25883 # Help to automatically enable the extended curses features when using either
25884 # the *-config or the ".pc" files by adding defines.
25885 echo "$as_me:25885: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25886 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25887 PKG_CFLAGS=
25888 for cf_loop1 in $CPPFLAGS_after_XOPEN
25889 do
25890         cf_found=no
25891         for cf_loop2 in $CPPFLAGS_before_XOPEN
25892         do
25893                 if test "x$cf_loop1" = "x$cf_loop2"
25894                 then
25895                         cf_found=yes
25896                         break
25897                 fi
25898         done
25899         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25900 done
25901 echo "$as_me:25901: result: $PKG_CFLAGS" >&5
25902 echo "${ECHO_T}$PKG_CFLAGS" >&6
25903
25904 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25905 case "x$NCURSES_OSPEED" in
25906 (*short*)
25907         cf_compatible=1
25908         ;;
25909 (*)
25910         cf_compatible=0
25911         ;;
25912 esac
25913
25914 cat >>confdefs.h <<EOF
25915 #define NCURSES_OSPEED_COMPAT $cf_compatible
25916 EOF
25917
25918 case "x$cf_cv_typeof_chtype" in
25919 (xshort|xint|xlong)
25920         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25921         ;;
25922 esac
25923
25924 case "x$cf_cv_typeof_mmask_t" in
25925 (xshort|xint|xlong)
25926         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25927         ;;
25928 esac
25929
25930 # substitute into misc/Makefile to suppress
25931 # (un)install.data from the
25932 # (un)install rules.
25933 if test "x$cf_with_db_install" = "xno"; then
25934         MISC_INSTALL_DATA=
25935         MISC_UNINSTALL_DATA=
25936 else
25937         MISC_INSTALL_DATA=install.data
25938         MISC_UNINSTALL_DATA=uninstall.data
25939 fi
25940
25941 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
25942         MAKE_DATABASE="#"
25943 else
25944         MAKE_DATABASE="$MAKE_TERMINFO"
25945 fi
25946
25947 SUB_SCRIPTS=
25948
25949 if test -n "$PACKAGE"
25950 then
25951         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
25952         export PACKAGE
25953         echo "package: $PACKAGE"
25954 fi
25955
25956 UNALTERED_SYMS=
25957 cf_filter_syms=no
25958
25959 if test -n "$RESULTING_SYMS"
25960 then
25961         cf_filter_syms=$cf_dft_filter_syms
25962         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
25963
25964 echo "${as_me:-configure}:25964: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
25965
25966 fi
25967
25968 if test "x$WILDCARD_SYMS" = xno
25969 then
25970         cf_filter_syms=yes
25971 fi
25972
25973 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
25974
25975 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
25976 if test $cf_filter_syms = yes
25977 then
25978         RESULTING_SYMS=resulting.map
25979 fi
25980
25981 if test "x$cross_compiling" = xyes ; then
25982         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
25983         CHECK_BUILD="#"
25984 else
25985         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
25986         CHECK_BUILD=
25987 fi
25988
25989 cat >>confdefs.h <<\EOF
25990 #define HAVE_CURSES_DATA_BOOLNAMES 1
25991 EOF
25992
25993 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_SCRIPTS $SUB_MAKEFILES Makefile"
25994 ac_config_commands="$ac_config_commands default"
25995 cat >confcache <<\_ACEOF
25996 # This file is a shell script that caches the results of configure
25997 # tests run on this system so they can be shared between configure
25998 # scripts and configure runs, see configure's option --config-cache.
25999 # It is not useful on other systems.  If it contains results you don't
26000 # want to keep, you may remove or edit it.
26001 #
26002 # config.status only pays attention to the cache file if you give it
26003 # the --recheck option to rerun configure.
26004 #
26005 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26006 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26007 # following values.
26008
26009 _ACEOF
26010
26011 # The following way of writing the cache mishandles newlines in values,
26012 # but we know of no workaround that is simple, portable, and efficient.
26013 # So, don't put newlines in cache variables' values.
26014 # Ultrix sh set writes to stderr and can't be redirected directly,
26015 # and sets the high bit in the cache file unless we assign to the vars.
26016 {
26017   (set) 2>&1 |
26018     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26019     *ac_space=\ *)
26020       # `set' does not quote correctly, so add quotes (double-quote
26021       # substitution turns \\\\ into \\, and sed turns \\ into \).
26022       sed -n \
26023         "s/'/'\\\\''/g;
26024           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26025       ;;
26026     *)
26027       # `set' quotes correctly as required by POSIX, so do not add quotes.
26028       sed -n \
26029         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26030       ;;
26031     esac;
26032 } |
26033   sed '
26034      t clear
26035      : clear
26036      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26037      t end
26038      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26039      : end' >>confcache
26040 if cmp -s $cache_file confcache; then :; else
26041   if test -w $cache_file; then
26042     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26043     cat confcache >$cache_file
26044   else
26045     echo "not updating unwritable cache $cache_file"
26046   fi
26047 fi
26048 rm -f confcache
26049
26050 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26051 # Let make expand exec_prefix.
26052 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26053
26054 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26055 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26056 # trailing colons and then remove the whole line if VPATH becomes empty
26057 # (actually we leave an empty line to preserve line numbers).
26058 if test "x$srcdir" = x.; then
26059   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26060 s/:*\$(srcdir):*/:/;
26061 s/:*\${srcdir}:*/:/;
26062 s/:*@srcdir@:*/:/;
26063 s/^\([^=]*=[    ]*\):*/\1/;
26064 s/:*$//;
26065 s/^[^=]*=[      ]*$//;
26066 }'
26067 fi
26068
26069 DEFS=-DHAVE_CONFIG_H
26070
26071 : ${CONFIG_STATUS=./config.status}
26072 ac_clean_files_save=$ac_clean_files
26073 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26074 { echo "$as_me:26074: creating $CONFIG_STATUS" >&5
26075 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26076 cat >$CONFIG_STATUS <<_ACEOF
26077 #! $SHELL
26078 # Generated automatically by configure.
26079 # Run this file to recreate the current configuration.
26080 # Compiler output produced by configure, useful for debugging
26081 # configure, is in config.log if it exists.
26082
26083 debug=false
26084 SHELL=\${CONFIG_SHELL-$SHELL}
26085 ac_cs_invocation="\$0 \$@"
26086
26087 _ACEOF
26088
26089 cat >>$CONFIG_STATUS <<\_ACEOF
26090 # Be Bourne compatible
26091 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26092   emulate sh
26093   NULLCMD=:
26094 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26095   set -o posix
26096 fi
26097
26098 # Name of the executable.
26099 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26100
26101 if expr a : '\(a\)' >/dev/null 2>&1; then
26102   as_expr=expr
26103 else
26104   as_expr=false
26105 fi
26106
26107 rm -f conf$$ conf$$.exe conf$$.file
26108 echo >conf$$.file
26109 if ln -s conf$$.file conf$$ 2>/dev/null; then
26110   # We could just check for DJGPP; but this test a) works b) is more generic
26111   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26112   if test -f conf$$.exe; then
26113     # Don't use ln at all; we don't have any links
26114     as_ln_s='cp -p'
26115   else
26116     as_ln_s='ln -s'
26117   fi
26118 elif ln conf$$.file conf$$ 2>/dev/null; then
26119   as_ln_s=ln
26120 else
26121   as_ln_s='cp -p'
26122 fi
26123 rm -f conf$$ conf$$.exe conf$$.file
26124
26125 as_executable_p="test -f"
26126
26127 # Support unset when possible.
26128 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26129   as_unset=unset
26130 else
26131   as_unset=false
26132 fi
26133
26134 # NLS nuisances.
26135 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26136 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26137 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26138 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26139 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26140 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26141 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26142 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26143
26144 # IFS
26145 # We need space, tab and new line, in precisely that order.
26146 as_nl='
26147 '
26148 IFS="   $as_nl"
26149
26150 # CDPATH.
26151 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26152
26153 exec 6>&1
26154
26155 _ACEOF
26156
26157 # Files that config.status was made for.
26158 if test -n "$ac_config_files"; then
26159   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26160 fi
26161
26162 if test -n "$ac_config_headers"; then
26163   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26164 fi
26165
26166 if test -n "$ac_config_links"; then
26167   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26168 fi
26169
26170 if test -n "$ac_config_commands"; then
26171   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26172 fi
26173
26174 cat >>$CONFIG_STATUS <<\EOF
26175
26176 ac_cs_usage="\
26177 \`$as_me' instantiates files from templates according to the
26178 current configuration.
26179
26180 Usage: $0 [OPTIONS] [FILE]...
26181
26182   -h, --help       print this help, then exit
26183   -V, --version    print version number, then exit
26184   -d, --debug      don't remove temporary files
26185       --recheck    update $as_me by reconfiguring in the same conditions
26186   --file=FILE[:TEMPLATE]
26187                    instantiate the configuration file FILE
26188   --header=FILE[:TEMPLATE]
26189                    instantiate the configuration header FILE
26190
26191 Configuration files:
26192 $config_files
26193
26194 Configuration headers:
26195 $config_headers
26196
26197 Configuration commands:
26198 $config_commands
26199
26200 Report bugs to <dickey@invisible-island.net>."
26201 EOF
26202
26203 cat >>$CONFIG_STATUS <<EOF
26204 ac_cs_version="\\
26205 config.status
26206 configured by $0, generated by GNU Autoconf 2.52.20181006,
26207   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26208
26209 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26210 Free Software Foundation, Inc.
26211 This config.status script is free software; the Free Software Foundation
26212 gives unlimited permission to copy, distribute and modify it."
26213 srcdir=$srcdir
26214 INSTALL="$INSTALL"
26215 EOF
26216
26217 cat >>$CONFIG_STATUS <<\EOF
26218 # If no file are specified by the user, then we need to provide default
26219 # value.  By we need to know if files were specified by the user.
26220 ac_need_defaults=:
26221 while test $# != 0
26222 do
26223   case $1 in
26224   --*=*)
26225     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26226     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26227     shift
26228     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26229     shift
26230     ;;
26231   -*);;
26232   *) # This is not an option, so the user has probably given explicit
26233      # arguments.
26234      ac_need_defaults=false;;
26235   esac
26236
26237   case $1 in
26238   # Handling of the options.
26239 EOF
26240 cat >>$CONFIG_STATUS <<EOF
26241   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26242     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26243     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26244 EOF
26245 cat >>$CONFIG_STATUS <<\EOF
26246   --version | --vers* | -V )
26247     echo "$ac_cs_version"; exit 0 ;;
26248   --he | --h)
26249     # Conflict between --help and --header
26250     { { echo "$as_me:26250: error: ambiguous option: $1
26251 Try \`$0 --help' for more information." >&5
26252 echo "$as_me: error: ambiguous option: $1
26253 Try \`$0 --help' for more information." >&2;}
26254    { (exit 1); exit 1; }; };;
26255   --help | --hel | -h )
26256     echo "$ac_cs_usage"; exit 0 ;;
26257   --debug | --d* | -d )
26258     debug=: ;;
26259   --file | --fil | --fi | --f )
26260     shift
26261     CONFIG_FILES="$CONFIG_FILES $1"
26262     ac_need_defaults=false;;
26263   --header | --heade | --head | --hea )
26264     shift
26265     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26266     ac_need_defaults=false;;
26267
26268   # This is an error.
26269   -*) { { echo "$as_me:26269: error: unrecognized option: $1
26270 Try \`$0 --help' for more information." >&5
26271 echo "$as_me: error: unrecognized option: $1
26272 Try \`$0 --help' for more information." >&2;}
26273    { (exit 1); exit 1; }; } ;;
26274
26275   *) ac_config_targets="$ac_config_targets $1" ;;
26276
26277   esac
26278   shift
26279 done
26280
26281 exec 5>>config.log
26282 cat >&5 << _ACEOF
26283
26284 ## ----------------------- ##
26285 ## Running config.status.  ##
26286 ## ----------------------- ##
26287
26288 This file was extended by $as_me 2.52.20181006, executed with
26289   CONFIG_FILES    = $CONFIG_FILES
26290   CONFIG_HEADERS  = $CONFIG_HEADERS
26291   CONFIG_LINKS    = $CONFIG_LINKS
26292   CONFIG_COMMANDS = $CONFIG_COMMANDS
26293   > $ac_cs_invocation
26294 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26295
26296 _ACEOF
26297 EOF
26298
26299 cat >>$CONFIG_STATUS <<EOF
26300 #
26301 # INIT-COMMANDS section.
26302 #
26303
26304 ### Special initialization commands, used to pass information from the
26305 ### configuration-run into config.status
26306
26307 AWK="$AWK"
26308 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26309 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26310 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26311 ECHO_LD="$ECHO_LD"
26312 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26313 LDCONFIG="$LDCONFIG"
26314 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26315 LIB_NAME="$LIB_NAME"
26316 LIB_PREFIX="$LIB_PREFIX"
26317 LIB_SUBSETS="$LIB_SUBSETS"
26318 LIB_SUFFIX="$LIB_SUFFIX"
26319 LIB_TRACING="$LIB_TRACING"
26320 LN_S="$LN_S"
26321 MAKE_TERMINFO="$MAKE_TERMINFO"
26322 NCURSES_MAJOR="$NCURSES_MAJOR"
26323 NCURSES_MINOR="$NCURSES_MINOR"
26324 NCURSES_OSPEED="$NCURSES_OSPEED"
26325 NCURSES_PATCH="$NCURSES_PATCH"
26326 SRC_SUBDIRS="$SRC_SUBDIRS"
26327 TERMINFO="$TERMINFO"
26328 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26329 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26330 TICS_NAME="$TICS_NAME"
26331 TICS_SUFFIX="$TICS_SUFFIX"
26332 TIC_PATH="$TIC_PATH"
26333 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26334 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26335 TINFO_NAME="$TINFO_NAME"
26336 TINFO_SUFFIX="$TINFO_SUFFIX"
26337 UNALTERED_SYMS="$UNALTERED_SYMS"
26338 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26339 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26340 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26341 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26342 WILDCARD_SYMS="$WILDCARD_SYMS"
26343 WITH_CURSES_H="$with_curses_h"
26344 WITH_ECHO="${enable_echo:=yes}"
26345 WITH_OVERWRITE="$with_overwrite"
26346 cf_LIST_MODELS="$cf_list_models"
26347 cf_cv_abi_version="$cf_cv_abi_version"
26348 cf_cv_do_relink="$cf_cv_do_relink"
26349 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26350 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26351 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26352 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26353 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26354 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26355 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26356 cf_cv_rel_version="$cf_cv_rel_version"
26357 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26358 cf_cv_shared_soname='$cf_cv_shared_soname'
26359 cf_cv_shlib_version="$cf_cv_shlib_version"
26360 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26361 cf_cv_system_name="$cf_cv_system_name"
26362 cf_cv_term_driver="$with_term_driver"
26363 cf_with_ada="$cf_with_ada"
26364 cf_with_cxx_binding="$cf_with_cxx_binding"
26365 cf_with_db_install="$cf_with_db_install"
26366 cf_with_manpages="$cf_with_manpages"
26367 cf_with_tests="$cf_with_tests"
26368 host="$host"
26369 target="$target"
26370 with_shared_cxx="$with_shared_cxx"
26371
26372 EOF
26373
26374 cat >>$CONFIG_STATUS <<\EOF
26375 for ac_config_target in $ac_config_targets
26376 do
26377   case "$ac_config_target" in
26378   # Handling of arguments.
26379   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26380   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26381   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26382   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26383   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26384   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
26385   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26386   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26387   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26388   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26389   *) { { echo "$as_me:26389: error: invalid argument: $ac_config_target" >&5
26390 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26391    { (exit 1); exit 1; }; };;
26392   esac
26393 done
26394
26395 # If the user did not use the arguments to specify the items to instantiate,
26396 # then the envvar interface is used.  Set only those that are not.
26397 # We use the long form for the default assignment because of an extremely
26398 # bizarre bug on SunOS 4.1.3.
26399 if $ac_need_defaults; then
26400   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26401   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26402   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26403 fi
26404
26405 # Create a temporary directory, and hook for its removal unless debugging.
26406 $debug ||
26407 {
26408   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26409   trap '{ (exit 1); exit 1; }' 1 2 13 15
26410 }
26411
26412 # Create a (secure) tmp directory for tmp files.
26413 : ${TMPDIR=/tmp}
26414 {
26415   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26416   test -n "$tmp" && test -d "$tmp"
26417 }  ||
26418 {
26419   tmp=$TMPDIR/cs$$-$RANDOM
26420   (umask 077 && mkdir $tmp)
26421 } ||
26422 {
26423    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26424    { (exit 1); exit 1; }
26425 }
26426
26427 EOF
26428
26429 cat >>$CONFIG_STATUS <<EOF
26430
26431 #
26432 # CONFIG_FILES section.
26433 #
26434
26435 # No need to generate the scripts if there are no CONFIG_FILES.
26436 # This happens for instance when ./config.status config.h
26437 if test -n "\$CONFIG_FILES"; then
26438   # Protect against being on the right side of a sed subst in config.status.
26439   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26440    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26441 s,@SHELL@,$SHELL,;t t
26442 s,@exec_prefix@,$exec_prefix,;t t
26443 s,@prefix@,$prefix,;t t
26444 s,@program_transform_name@,$program_transform_name,;t t
26445 s,@bindir@,$bindir,;t t
26446 s,@sbindir@,$sbindir,;t t
26447 s,@libexecdir@,$libexecdir,;t t
26448 s,@datarootdir@,$datarootdir,;t t
26449 s,@datadir@,$datadir,;t t
26450 s,@sysconfdir@,$sysconfdir,;t t
26451 s,@sharedstatedir@,$sharedstatedir,;t t
26452 s,@localstatedir@,$localstatedir,;t t
26453 s,@runstatedir@,$runstatedir,;t t
26454 s,@libdir@,$libdir,;t t
26455 s,@includedir@,$includedir,;t t
26456 s,@oldincludedir@,$oldincludedir,;t t
26457 s,@infodir@,$infodir,;t t
26458 s,@mandir@,$mandir,;t t
26459 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26460 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26461 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26462 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26463 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26464 s,@build_alias@,$build_alias,;t t
26465 s,@host_alias@,$host_alias,;t t
26466 s,@target_alias@,$target_alias,;t t
26467 s,@ECHO_C@,$ECHO_C,;t t
26468 s,@ECHO_N@,$ECHO_N,;t t
26469 s,@ECHO_T@,$ECHO_T,;t t
26470 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26471 s,@DEFS@,$DEFS,;t t
26472 s,@LIBS@,$LIBS,;t t
26473 s,@top_builddir@,$top_builddir,;t t
26474 s,@EGREP@,$EGREP,;t t
26475 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26476 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26477 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26478 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26479 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26480 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26481 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26482 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26483 s,@VERSION@,$VERSION,;t t
26484 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26485 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26486 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26487 s,@PACKAGE@,$PACKAGE,;t t
26488 s,@build@,$build,;t t
26489 s,@build_cpu@,$build_cpu,;t t
26490 s,@build_vendor@,$build_vendor,;t t
26491 s,@build_os@,$build_os,;t t
26492 s,@host@,$host,;t t
26493 s,@host_cpu@,$host_cpu,;t t
26494 s,@host_vendor@,$host_vendor,;t t
26495 s,@host_os@,$host_os,;t t
26496 s,@target@,$target,;t t
26497 s,@target_cpu@,$target_cpu,;t t
26498 s,@target_vendor@,$target_vendor,;t t
26499 s,@target_os@,$target_os,;t t
26500 s,@CC@,$CC,;t t
26501 s,@CFLAGS@,$CFLAGS,;t t
26502 s,@LDFLAGS@,$LDFLAGS,;t t
26503 s,@CPPFLAGS@,$CPPFLAGS,;t t
26504 s,@ac_ct_CC@,$ac_ct_CC,;t t
26505 s,@EXEEXT@,$EXEEXT,;t t
26506 s,@OBJEXT@,$OBJEXT,;t t
26507 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26508 s,@CPP@,$CPP,;t t
26509 s,@LDCONFIG@,$LDCONFIG,;t t
26510 s,@CXX@,$CXX,;t t
26511 s,@CXXFLAGS@,$CXXFLAGS,;t t
26512 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26513 s,@AWK@,$AWK,;t t
26514 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26515 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26516 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26517 s,@LINT@,$LINT,;t t
26518 s,@LINT_OPTS@,$LINT_OPTS,;t t
26519 s,@LN_S@,$LN_S,;t t
26520 s,@cf_config_suffix@,$cf_config_suffix,;t t
26521 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26522 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26523 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26524 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26525 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26526 s,@SET_MAKE@,$SET_MAKE,;t t
26527 s,@CTAGS@,$CTAGS,;t t
26528 s,@ETAGS@,$ETAGS,;t t
26529 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26530 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26531 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26532 s,@RANLIB@,$RANLIB,;t t
26533 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26534 s,@LD@,$LD,;t t
26535 s,@ac_ct_LD@,$ac_ct_LD,;t t
26536 s,@AR@,$AR,;t t
26537 s,@ac_ct_AR@,$ac_ct_AR,;t t
26538 s,@NM@,$NM,;t t
26539 s,@ac_ct_NM@,$ac_ct_NM,;t t
26540 s,@ARFLAGS@,$ARFLAGS,;t t
26541 s,@DESTDIR@,$DESTDIR,;t t
26542 s,@BUILD_CC@,$BUILD_CC,;t t
26543 s,@BUILD_CPP@,$BUILD_CPP,;t t
26544 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26545 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26546 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26547 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26548 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26549 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26550 s,@cf_list_models@,$cf_list_models,;t t
26551 s,@ABI_VERSION@,$ABI_VERSION,;t t
26552 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26553 s,@LIBTOOL@,$LIBTOOL,;t t
26554 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26555 s,@LT_UNDEF@,$LT_UNDEF,;t t
26556 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26557 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26558 s,@LIB_CREATE@,$LIB_CREATE,;t t
26559 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26560 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26561 s,@LIB_PREP@,$LIB_PREP,;t t
26562 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26563 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26564 s,@LIB_LINK@,$LIB_LINK,;t t
26565 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26566 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26567 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26568 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26569 s,@TICS_NAME@,$TICS_NAME,;t t
26570 s,@TINFO_NAME@,$TINFO_NAME,;t t
26571 s,@LIB_NAME@,$LIB_NAME,;t t
26572 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26573 s,@CC_G_OPT@,$CC_G_OPT,;t t
26574 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26575 s,@LD_MODEL@,$LD_MODEL,;t t
26576 s,@shlibdir@,$shlibdir,;t t
26577 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26578 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26579 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26580 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26581 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26582 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26583 s,@LINK_PROGS@,$LINK_PROGS,;t t
26584 s,@LINK_TESTS@,$LINK_TESTS,;t t
26585 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26586 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26587 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26588 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26589 s,@RPATH_LIST@,$RPATH_LIST,;t t
26590 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26591 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26592 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26593 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26594 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26595 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26596 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26597 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26598 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26599 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26600 s,@TIC@,$TIC,;t t
26601 s,@INFOCMP@,$INFOCMP,;t t
26602 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26603 s,@XTERM_KBS@,$XTERM_KBS,;t t
26604 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26605 s,@TERMINFO@,$TERMINFO,;t t
26606 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26607 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26608 s,@TERMPATH@,$TERMPATH,;t t
26609 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26610 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26611 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26612 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26613 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26614 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26615 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26616 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26617 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26618 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26619 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26620 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26621 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26622 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26623 s,@RGB_PATH@,$RGB_PATH,;t t
26624 s,@no_x11_rgb@,$no_x11_rgb,;t t
26625 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26626 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26627 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26628 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26629 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26630 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26631 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26632 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26633 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26634 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26635 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26636 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26637 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26638 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26639 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26640 s,@PTHREAD@,$PTHREAD,;t t
26641 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26642 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26643 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26644 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26645 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26646 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26647 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26648 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26649 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26650 s,@ECHO_LT@,$ECHO_LT,;t t
26651 s,@ECHO_LD@,$ECHO_LD,;t t
26652 s,@RULE_CC@,$RULE_CC,;t t
26653 s,@SHOW_CC@,$SHOW_CC,;t t
26654 s,@ECHO_CC@,$ECHO_CC,;t t
26655 s,@ECHO_LINK@,$ECHO_LINK,;t t
26656 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26657 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26658 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26659 s,@ADAFLAGS@,$ADAFLAGS,;t t
26660 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26661 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26662 s,@ADA_TRACE@,$ADA_TRACE,;t t
26663 s,@MATH_LIB@,$MATH_LIB,;t t
26664 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26665 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26666 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26667 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26668 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26669 s,@TEST_LIBS@,$TEST_LIBS,;t t
26670 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26671 s,@CXXCPP@,$CXXCPP,;t t
26672 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26673 s,@CXX_AR@,$CXX_AR,;t t
26674 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26675 s,@CXXLIBS@,$CXXLIBS,;t t
26676 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26677 s,@gnatmake_exists@,$gnatmake_exists,;t t
26678 s,@gprconfig_exists@,$gprconfig_exists,;t t
26679 s,@M4_exists@,$M4_exists,;t t
26680 s,@cf_ada_make@,$cf_ada_make,;t t
26681 s,@cf_ada_config@,$cf_ada_config,;t t
26682 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26683 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26684 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26685 s,@cf_compile_generics@,$cf_compile_generics,;t t
26686 s,@cf_generic_objects@,$cf_generic_objects,;t t
26687 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26688 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26689 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26690 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26691 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26692 s,@cf_ada_package@,$cf_ada_package,;t t
26693 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26694 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26695 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26696 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26697 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26698 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26699 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26700 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26701 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26702 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26703 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26704 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26705 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26706 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26707 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26708 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26709 s,@TICS_LIBS@,$TICS_LIBS,;t t
26710 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26711 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26712 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26713 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26714 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26715 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26716 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26717 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26718 s,@includesubdir@,$includesubdir,;t t
26719 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26720 s,@TICS_LIST@,$TICS_LIST,;t t
26721 s,@TINFO_LIST@,$TINFO_LIST,;t t
26722 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26723 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26724 s,@TEST_ARGS@,$TEST_ARGS,;t t
26725 s,@TEST_DEPS@,$TEST_DEPS,;t t
26726 s,@TEST_ARG2@,$TEST_ARG2,;t t
26727 s,@TEST_DEP2@,$TEST_DEP2,;t t
26728 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26729 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26730 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26731 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26732 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26733 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26734 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26735 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26736 s,@cross_compiling@,$cross_compiling,;t t
26737 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26738 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26739 s,@PANEL_NAME@,$PANEL_NAME,;t t
26740 s,@MENU_NAME@,$MENU_NAME,;t t
26741 s,@FORM_NAME@,$FORM_NAME,;t t
26742 s,@CXX_NAME@,$CXX_NAME,;t t
26743 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26744 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26745 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26746 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26747 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26748 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26749 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26750 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26751 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26752 CEOF
26753
26754 EOF
26755
26756   cat >>$CONFIG_STATUS <<\EOF
26757   # Split the substitutions into bite-sized pieces for seds with
26758   # small command number limits, like on Digital OSF/1 and HP-UX.
26759   ac_max_sed_lines=48
26760   ac_sed_frag=1 # Number of current file.
26761   ac_beg=1 # First line for current file.
26762   ac_end=$ac_max_sed_lines # Line after last line for current file.
26763   ac_more_lines=:
26764   ac_sed_cmds=
26765   while $ac_more_lines; do
26766     if test $ac_beg -gt 1; then
26767       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26768     else
26769       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26770     fi
26771     if test ! -s $tmp/subs.frag; then
26772       ac_more_lines=false
26773     else
26774       # The purpose of the label and of the branching condition is to
26775       # speed up the sed processing (if there are no `@' at all, there
26776       # is no need to browse any of the substitutions).
26777       # These are the two extra sed commands mentioned above.
26778       (echo ':t
26779   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26780       # It is possible to make a multiline substitution using escaped newlines.
26781       # Ensure that we do not split the substitution between script fragments.
26782       ac_BEG=$ac_end
26783       ac_END=`expr $ac_end + $ac_max_sed_lines`
26784       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26785       if test -s $tmp/subs.next; then
26786         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26787         if test ! -s $tmp/subs.edit; then
26788           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26789           if test ! -s $tmp/subs.edit; then
26790             if test $ac_beg -gt 1; then
26791               ac_end=`expr $ac_end - 1`
26792               continue
26793             fi
26794           fi
26795         fi
26796       fi
26797
26798       if test -z "$ac_sed_cmds"; then
26799         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26800       else
26801         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26802       fi
26803       ac_sed_frag=`expr $ac_sed_frag + 1`
26804       ac_beg=$ac_end
26805       ac_end=`expr $ac_end + $ac_max_sed_lines`
26806     fi
26807   done
26808   if test -z "$ac_sed_cmds"; then
26809     ac_sed_cmds=cat
26810   fi
26811 fi # test -n "$CONFIG_FILES"
26812
26813 EOF
26814 cat >>$CONFIG_STATUS <<\EOF
26815 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26816   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26817   case $ac_file in
26818   - | *:- | *:-:* ) # input from stdin
26819         cat >$tmp/stdin
26820         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26821         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26822   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26823         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26824   * )   ac_file_in=$ac_file.in ;;
26825   esac
26826
26827   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26828   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26829          X"$ac_file" : 'X\(//\)[^/]' \| \
26830          X"$ac_file" : 'X\(//\)$' \| \
26831          X"$ac_file" : 'X\(/\)' \| \
26832          .     : '\(.\)' 2>/dev/null ||
26833 echo X"$ac_file" |
26834     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26835           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26836           /^X\(\/\/\)$/{ s//\1/; q; }
26837           /^X\(\/\).*/{ s//\1/; q; }
26838           s/.*/./; q'`
26839   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26840     { case "$ac_dir" in
26841   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26842   *)                      as_incr_dir=.;;
26843 esac
26844 as_dummy="$ac_dir"
26845 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26846   case $as_mkdir_dir in
26847     # Skip DOS drivespec
26848     ?:) as_incr_dir=$as_mkdir_dir ;;
26849     *)
26850       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26851       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26852     ;;
26853   esac
26854 done; }
26855
26856     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26857     # A "../" for each directory in $ac_dir_suffix.
26858     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26859   else
26860     ac_dir_suffix= ac_dots=
26861   fi
26862
26863   case $srcdir in
26864   .)  ac_srcdir=.
26865       if test -z "$ac_dots"; then
26866          ac_top_srcdir=.
26867       else
26868          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
26869       fi ;;
26870   [\\/]* | ?:[\\/]* )
26871       ac_srcdir=$srcdir$ac_dir_suffix;
26872       ac_top_srcdir=$srcdir ;;
26873   *) # Relative path.
26874     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
26875     ac_top_srcdir=$ac_dots$srcdir ;;
26876   esac
26877
26878   case $INSTALL in
26879   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26880   *) ac_INSTALL=$ac_dots$INSTALL ;;
26881   esac
26882
26883   if test x"$ac_file" != x-; then
26884     { echo "$as_me:26884: creating $ac_file" >&5
26885 echo "$as_me: creating $ac_file" >&6;}
26886     rm -f "$ac_file"
26887   fi
26888   # Let's still pretend it is `configure' which instantiates (i.e., don't
26889   # use $as_me), people would be surprised to read:
26890   #    /* config.h.  Generated automatically by config.status.  */
26891   configure_input="Generated automatically from `echo $ac_file_in |
26892                                                  sed 's,.*/,,'` by configure."
26893
26894   # First look for the input files in the build tree, otherwise in the
26895   # src tree.
26896   ac_file_inputs=`IFS=:
26897     for f in $ac_file_in; do
26898       case $f in
26899       -) echo $tmp/stdin ;;
26900       [\\/$]*)
26901          # Absolute (can't be DOS-style, as IFS=:)
26902          test -f "$f" || { { echo "$as_me:26902: error: cannot find input file: $f" >&5
26903 echo "$as_me: error: cannot find input file: $f" >&2;}
26904    { (exit 1); exit 1; }; }
26905          echo $f;;
26906       *) # Relative
26907          if test -f "$f"; then
26908            # Build tree
26909            echo $f
26910          elif test -f "$srcdir/$f"; then
26911            # Source tree
26912            echo $srcdir/$f
26913          else
26914            # /dev/null tree
26915            { { echo "$as_me:26915: error: cannot find input file: $f" >&5
26916 echo "$as_me: error: cannot find input file: $f" >&2;}
26917    { (exit 1); exit 1; }; }
26918          fi;;
26919       esac
26920     done` || { (exit 1); exit 1; }
26921 EOF
26922 cat >>$CONFIG_STATUS <<\EOF
26923   ac_warn_datarootdir=no
26924   if test x"$ac_file" != x-; then
26925     for ac_item in $ac_file_inputs
26926     do
26927       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
26928       if test -n "$ac_seen"; then
26929         ac_used=`grep '@datarootdir@' $ac_item`
26930         if test -z "$ac_used"; then
26931           { echo "$as_me:26931: WARNING: datarootdir was used implicitly but not set:
26932 $ac_seen" >&5
26933 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26934 $ac_seen" >&2;}
26935           ac_warn_datarootdir=yes
26936         fi
26937       fi
26938       ac_seen=`grep '${datarootdir}' $ac_item`
26939       if test -n "$ac_seen"; then
26940         { echo "$as_me:26940: WARNING: datarootdir was used explicitly but not set:
26941 $ac_seen" >&5
26942 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26943 $ac_seen" >&2;}
26944         ac_warn_datarootdir=yes
26945       fi
26946     done
26947   fi
26948
26949 if test "x$ac_warn_datarootdir" = xyes; then
26950   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26951 fi
26952
26953 EOF
26954 cat >>$CONFIG_STATUS <<EOF
26955   sed "$ac_vpsub
26956 $extrasub
26957 EOF
26958 cat >>$CONFIG_STATUS <<\EOF
26959 :t
26960 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26961 s,@configure_input@,$configure_input,;t t
26962 s,@srcdir@,$ac_srcdir,;t t
26963 s,@top_srcdir@,$ac_top_srcdir,;t t
26964 s,@INSTALL@,$ac_INSTALL,;t t
26965 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
26966   rm -f $tmp/stdin
26967   if test x"$ac_file" != x-; then
26968     cp $tmp/out $ac_file
26969
26970     for ac_name in prefix exec_prefix datarootdir
26971     do
26972         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
26973         if test -n "$ac_seen"; then
26974             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
26975             if test -z "$ac_init"; then
26976               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
26977               { echo "$as_me:26977: WARNING: Variable $ac_name is used but was not set:
26978 $ac_seen" >&5
26979 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
26980 $ac_seen" >&2;}
26981             fi
26982         fi
26983     done
26984     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
26985     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
26986     if test -s $tmp/out; then
26987       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
26988       { echo "$as_me:26988: WARNING: Some variables may not be substituted:
26989 $ac_seen" >&5
26990 echo "$as_me: WARNING: Some variables may not be substituted:
26991 $ac_seen" >&2;}
26992     fi
26993   else
26994     cat $tmp/out
26995   fi
26996   rm -f $tmp/out
26997
26998 done
26999 EOF
27000 cat >>$CONFIG_STATUS <<\EOF
27001
27002 #
27003 # CONFIG_HEADER section.
27004 #
27005
27006 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27007 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27008 #
27009 # ac_d sets the value in "#define NAME VALUE" lines.
27010 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27011 ac_dB='[        ].*$,\1#\2'
27012 ac_dC=' '
27013 ac_dD=',;t'
27014 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27015 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27016 ac_iB='\([      ]\),\1#\2define\3'
27017 ac_iC=' '
27018 ac_iD='\4,;t'
27019 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27020 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27021 ac_uB='$,\1#\2define\3'
27022 ac_uC=' '
27023 ac_uD=',;t'
27024
27025 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27026   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27027   case $ac_file in
27028   - | *:- | *:-:* ) # input from stdin
27029         cat >$tmp/stdin
27030         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27031         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27032   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27033         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27034   * )   ac_file_in=$ac_file.in ;;
27035   esac
27036
27037   test x"$ac_file" != x- && { echo "$as_me:27037: creating $ac_file" >&5
27038 echo "$as_me: creating $ac_file" >&6;}
27039
27040   # First look for the input files in the build tree, otherwise in the
27041   # src tree.
27042   ac_file_inputs=`IFS=:
27043     for f in $ac_file_in; do
27044       case $f in
27045       -) echo $tmp/stdin ;;
27046       [\\/$]*)
27047          # Absolute (can't be DOS-style, as IFS=:)
27048          test -f "$f" || { { echo "$as_me:27048: error: cannot find input file: $f" >&5
27049 echo "$as_me: error: cannot find input file: $f" >&2;}
27050    { (exit 1); exit 1; }; }
27051          echo $f;;
27052       *) # Relative
27053          if test -f "$f"; then
27054            # Build tree
27055            echo $f
27056          elif test -f "$srcdir/$f"; then
27057            # Source tree
27058            echo $srcdir/$f
27059          else
27060            # /dev/null tree
27061            { { echo "$as_me:27061: error: cannot find input file: $f" >&5
27062 echo "$as_me: error: cannot find input file: $f" >&2;}
27063    { (exit 1); exit 1; }; }
27064          fi;;
27065       esac
27066     done` || { (exit 1); exit 1; }
27067   # Remove the trailing spaces.
27068   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27069
27070 EOF
27071
27072 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27073 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27074 # be either 'cat' or 'sort'.
27075 cat confdefs.h | uniq >conftest.vals
27076
27077 # Break up conftest.vals because some shells have a limit on
27078 # the size of here documents, and old seds have small limits too.
27079
27080 rm -f conftest.tail
27081 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27082 while grep . conftest.vals >/dev/null
27083 do
27084   # Write chunks of a limited-size here document to conftest.frag.
27085   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27086   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27087   echo 'CEOF' >> $CONFIG_STATUS
27088   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27089   rm -f conftest.vals
27090   mv conftest.tail conftest.vals
27091 done
27092 rm -f conftest.vals
27093
27094 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27095 # marker @DEFS@.
27096 echo '  cat >> conftest.edit <<CEOF
27097 /@DEFS@/r conftest.frag
27098 /@DEFS@/d
27099 CEOF
27100 sed -f conftest.edit $tmp/in > $tmp/out
27101 rm -f $tmp/in
27102 mv $tmp/out $tmp/in
27103 rm -f conftest.edit conftest.frag
27104 ' >> $CONFIG_STATUS
27105
27106 cat >>$CONFIG_STATUS <<\EOF
27107   # Let's still pretend it is `configure' which instantiates (i.e., don't
27108   # use $as_me), people would be surprised to read:
27109   #    /* config.h.  Generated automatically by config.status.  */
27110   if test x"$ac_file" = x-; then
27111     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27112   else
27113     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27114   fi
27115   cat $tmp/in >>$tmp/config.h
27116   rm -f $tmp/in
27117   if test x"$ac_file" != x-; then
27118     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27119       { echo "$as_me:27119: $ac_file is unchanged" >&5
27120 echo "$as_me: $ac_file is unchanged" >&6;}
27121     else
27122       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27123          X"$ac_file" : 'X\(//\)[^/]' \| \
27124          X"$ac_file" : 'X\(//\)$' \| \
27125          X"$ac_file" : 'X\(/\)' \| \
27126          .     : '\(.\)' 2>/dev/null ||
27127 echo X"$ac_file" |
27128     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27129           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27130           /^X\(\/\/\)$/{ s//\1/; q; }
27131           /^X\(\/\).*/{ s//\1/; q; }
27132           s/.*/./; q'`
27133       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27134         { case "$ac_dir" in
27135   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27136   *)                      as_incr_dir=.;;
27137 esac
27138 as_dummy="$ac_dir"
27139 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27140   case $as_mkdir_dir in
27141     # Skip DOS drivespec
27142     ?:) as_incr_dir=$as_mkdir_dir ;;
27143     *)
27144       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27145       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27146     ;;
27147   esac
27148 done; }
27149
27150       fi
27151       rm -f $ac_file
27152       mv $tmp/config.h $ac_file
27153     fi
27154   else
27155     cat $tmp/config.h
27156     rm -f $tmp/config.h
27157   fi
27158 done
27159 EOF
27160 cat >>$CONFIG_STATUS <<\EOF
27161 #
27162 # CONFIG_COMMANDS section.
27163 #
27164 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27165   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27166   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27167
27168   case $ac_dest in
27169     default )
27170 if test "x$cf_with_tests" != xno ; then
27171
27172 for cf_dir in test
27173 do
27174         if test ! -d $srcdir/$cf_dir; then
27175                 continue
27176         elif test -f $srcdir/$cf_dir/programs; then
27177                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27178         fi
27179 done
27180
27181 fi
27182
27183 cf_prefix=$LIB_PREFIX
27184
27185 case $cf_cv_shlib_version in
27186 (cygdll|msysdll|mingw)
27187         TINFO_NAME=$TINFO_ARG_SUFFIX
27188         TINFO_SUFFIX=.dll
27189         ;;
27190 esac
27191
27192 if test -n "$TINFO_SUFFIX" ; then
27193         case $TINFO_SUFFIX in
27194         (tw*)
27195                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27196                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27197                 ;;
27198         (t*)
27199                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27200                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27201                 ;;
27202         (w*)
27203                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27204                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27205                 ;;
27206         esac
27207 fi
27208
27209 for cf_dir in $SRC_SUBDIRS
27210 do
27211         if test ! -d $srcdir/$cf_dir ; then
27212                 continue
27213         elif test -f $srcdir/$cf_dir/modules; then
27214
27215                 SHARED_LIB=
27216                 Libs_To_Make=
27217                 cf_awk_program=
27218                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27219                 then
27220                         cf_awk_program="$cf_awk_program\
27221 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27222 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27223 "
27224                 fi
27225
27226                 if test "x$WILDCARD_SYMS" = xno
27227                 then
27228                         cf_awk_program="$cf_awk_program\
27229 /[      ]_\\*;/ { skip=1; next; }\
27230 "
27231                 fi
27232
27233                 if test "x$cf_awk_program" != "x"
27234                 then
27235                         cat >>$cf_dir/Makefile <<CF_EOF
27236
27237 # Generated by CF_LIB_RULES
27238 resulting.map: $UNALTERED_SYMS
27239         $AWK 'BEGIN { skip = 1; last=""; } \
27240 $cf_awk_program \
27241 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27242  skip = 0; last = \$\$0; } \
27243 END { print last; }' < $UNALTERED_SYMS >\$@
27244
27245 distclean::
27246         rm -f resulting.map
27247 CF_EOF
27248                 fi
27249
27250                 for cf_item in $cf_LIST_MODELS
27251                 do
27252
27253         case X$cf_item in
27254         (Xlibtool)
27255                 cf_suffix='.la'
27256                 cf_depsuf=$cf_suffix
27257                 ;;
27258         (Xdebug)
27259                 cf_suffix='_g.a'
27260                 cf_depsuf=$cf_suffix
27261                 ;;
27262         (Xprofile)
27263                 cf_suffix='_p.a'
27264                 cf_depsuf=$cf_suffix
27265                 ;;
27266         (Xshared)
27267                 case $cf_cv_system_name in
27268                 (aix[5-7]*)
27269                         cf_suffix='.so'
27270                         cf_depsuf=$cf_suffix
27271                         ;;
27272                 (cygwin*|msys*|mingw*)
27273                         cf_suffix='.dll'
27274                         cf_depsuf='.dll.a'
27275                         ;;
27276                 (darwin*)
27277                         cf_suffix='.dylib'
27278                         cf_depsuf=$cf_suffix
27279                         ;;
27280                 (hpux*)
27281                         case $target in
27282                         (ia64*)
27283                                 cf_suffix='.so'
27284                                 cf_depsuf=$cf_suffix
27285                                 ;;
27286                         (*)
27287                                 cf_suffix='.sl'
27288                                 cf_depsuf=$cf_suffix
27289                                 ;;
27290                         esac
27291                         ;;
27292                 (*)
27293                         cf_suffix='.so'
27294                         cf_depsuf=$cf_suffix
27295                         ;;
27296                 esac
27297                 ;;
27298         (*)
27299                 cf_suffix='.a'
27300                 cf_depsuf=$cf_suffix
27301                 ;;
27302         esac
27303         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27304         then
27305                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27306                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27307         fi
27308
27309                         cf_libname=$cf_dir
27310                         test "$cf_dir" = c++ && cf_libname=ncurses++
27311                         if test $cf_item = shared ; then
27312                                 if test -n "${LIB_SUFFIX}"
27313                                 then
27314                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27315                                 else
27316                                         cf_shared_suffix="$cf_suffix"
27317                                 fi
27318                                 if test "$cf_cv_do_symlinks" = yes ; then
27319                                         cf_version_name=
27320
27321                                         case "$cf_cv_shlib_version" in
27322                                         (rel)
27323                                                 cf_version_name=REL_VERSION
27324                                                 ;;
27325                                         (abi)
27326                                                 cf_version_name=ABI_VERSION
27327                                                 ;;
27328                                         esac
27329
27330                                         if test -n "$cf_version_name"
27331                                         then
27332                                                 case "$cf_cv_system_name" in
27333                                                 (darwin*)
27334                                                         # "w", etc?
27335                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27336                                                         ;;
27337                                                 (*)
27338                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27339                                                         ;;
27340                                                 esac
27341                                         fi
27342                                         if test -n "${USE_LIB_SUFFIX}"
27343                                         then
27344                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27345                                         else
27346                                                 cf_shared_suffix="$cf_suffix"
27347                                         fi
27348                                 fi
27349                                 # cygwin needs import library, and has unique naming convention
27350                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27351                                 # use 'cyg' prefix for shared lib.
27352                                 case $cf_cv_shlib_version in
27353                                 (cygdll)
27354                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27355                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27356                                         ;;
27357                                 (msysdll)
27358                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27359                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27360                                         ;;
27361                                 (mingw)
27362                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27363                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27364                                         ;;
27365                                 (*)
27366                                         cf_add_lib=
27367                                         ;;
27368                                 esac
27369                                 if test -n "$cf_add_lib"
27370                                 then
27371                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27372                                         continue
27373                                 fi
27374                         fi
27375                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27376                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27377                 done
27378
27379                 if test $cf_dir = ncurses ; then
27380                         cf_subsets="$LIB_SUBSETS"
27381                         cf_r_parts="$cf_subsets"
27382                         cf_liblist="$Libs_To_Make"
27383
27384                         while test -n "$cf_r_parts"
27385                         do
27386                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27387                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27388                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27389                                         cf_add_lib=
27390                                         case $cf_l_parts in
27391                                         (*termlib*)
27392                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27393                                                 ;;
27394                                         (*ticlib*)
27395                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27396                                                 ;;
27397                                         (*)
27398                                                 break
27399                                                 ;;
27400                                         esac
27401                                         if test -n "$cf_add_lib"; then
27402                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27403                                         fi
27404                                 else
27405                                         break
27406                                 fi
27407                         done
27408                 else
27409                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27410                 fi
27411
27412                 if test $cf_dir = c++; then
27413                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27414                                 cf_list=
27415                                 for cf_item in $Libs_To_Make
27416                                 do
27417                                         case $cf_item in
27418                                         (*.a)
27419                                                 ;;
27420                                         (*)
27421                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27422                                                 ;;
27423                                         esac
27424                                         for cf_test in $cf_list
27425                                         do
27426                                                 if test "$cf_test" = "$cf_item"
27427                                                 then
27428                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27429                                                         cf_item=
27430                                                         break
27431                                                 fi
27432                                         done
27433                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27434                                 done
27435                                 Libs_To_Make="$cf_list"
27436                         fi
27437                 fi
27438
27439                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27440                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27441                         $cf_dir/Makefile >$cf_dir/Makefile.out
27442                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27443
27444                 $AWK -f $srcdir/mk-0th.awk \
27445                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27446                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27447
27448                 for cf_subset in $cf_subsets
27449                 do
27450                         cf_subdirs=
27451                         for cf_item in $cf_LIST_MODELS
27452                         do
27453
27454                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27455
27456 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27457
27458                         CXX_MODEL=$cf_ITEM
27459                         if test "$CXX_MODEL" = SHARED; then
27460                                 case $cf_cv_shlib_version in
27461                                 (cygdll|msysdll|mingw)
27462                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27463
27464 echo "${as_me:-configure}:27464: testing overriding CXX_MODEL to SHARED ..." 1>&5
27465
27466                                         with_shared_cxx=yes
27467                                         ;;
27468                                 (*)
27469                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27470                                         ;;
27471                                 esac
27472                         fi
27473
27474         case X$cf_item in
27475         (Xlibtool)
27476                 cf_suffix='.la'
27477                 cf_depsuf=$cf_suffix
27478                 ;;
27479         (Xdebug)
27480                 cf_suffix='_g.a'
27481                 cf_depsuf=$cf_suffix
27482                 ;;
27483         (Xprofile)
27484                 cf_suffix='_p.a'
27485                 cf_depsuf=$cf_suffix
27486                 ;;
27487         (Xshared)
27488                 case $cf_cv_system_name in
27489                 (aix[5-7]*)
27490                         cf_suffix='.so'
27491                         cf_depsuf=$cf_suffix
27492                         ;;
27493                 (cygwin*|msys*|mingw*)
27494                         cf_suffix='.dll'
27495                         cf_depsuf='.dll.a'
27496                         ;;
27497                 (darwin*)
27498                         cf_suffix='.dylib'
27499                         cf_depsuf=$cf_suffix
27500                         ;;
27501                 (hpux*)
27502                         case $target in
27503                         (ia64*)
27504                                 cf_suffix='.so'
27505                                 cf_depsuf=$cf_suffix
27506                                 ;;
27507                         (*)
27508                                 cf_suffix='.sl'
27509                                 cf_depsuf=$cf_suffix
27510                                 ;;
27511                         esac
27512                         ;;
27513                 (*)
27514                         cf_suffix='.so'
27515                         cf_depsuf=$cf_suffix
27516                         ;;
27517                 esac
27518                 ;;
27519         (*)
27520                 cf_suffix='.a'
27521                 cf_depsuf=$cf_suffix
27522                 ;;
27523         esac
27524         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27525         then
27526                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27527                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27528         fi
27529
27530         case $cf_item in
27531         (libtool) cf_subdir='obj_lo'  ;;
27532         (normal)  cf_subdir='objects' ;;
27533         (debug)   cf_subdir='obj_g' ;;
27534         (profile) cf_subdir='obj_p' ;;
27535         (shared)
27536                 case $cf_cv_system_name in
27537                 (cygwin|msys)
27538                         cf_subdir='objects' ;;
27539                 (*)
27540                         cf_subdir='obj_s' ;;
27541                 esac
27542         esac
27543
27544                         # Test for case where we build libtinfo with a different name.
27545                         cf_libname=$cf_dir
27546                         if test $cf_dir = ncurses ; then
27547                                 case $cf_subset in
27548                                 (*base*)
27549                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27550                                         ;;
27551                                 (*termlib*)
27552                                         cf_libname=$TINFO_LIB_SUFFIX
27553                                         ;;
27554                                 (ticlib*)
27555                                         cf_libname=$TICS_LIB_SUFFIX
27556                                         ;;
27557                                 esac
27558                         elif test $cf_dir = c++ ; then
27559                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27560                         else
27561                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27562                         fi
27563                         if test -n "${USE_ARG_SUFFIX}" ; then
27564                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27565                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27566                         fi
27567
27568                         # These dependencies really are for development, not
27569                         # builds, but they are useful in porting, too.
27570                         cf_depend="../include/ncurses_cfg.h"
27571                         if test "$srcdir" = "."; then
27572                                 cf_reldir="."
27573                         else
27574                                 cf_reldir="\${srcdir}"
27575                         fi
27576
27577                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27578                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27579                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27580                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27581                         fi
27582
27583                         cf_dir_suffix=
27584                         old_cf_suffix="$cf_suffix"
27585                         if test "$cf_cv_shlib_version_infix" = yes ; then
27586                         if test -n "$USE_LIB_SUFFIX" ; then
27587                                 case $USE_LIB_SUFFIX in
27588                                 (tw*)
27589                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27590                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27591                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27592                                         ;;
27593                                 (t*)
27594                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27595                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27596                                         cf_dir_suffix=t$EXTRA_SUFFIX
27597                                         ;;
27598                                 (w*)
27599                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27600                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27601                                         cf_dir_suffix=w$EXTRA_SUFFIX
27602                                         ;;
27603                                 (*)
27604                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27605                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27606                                         cf_dir_suffix=$EXTRA_SUFFIX
27607                                         ;;
27608                                 esac
27609                         fi
27610                         fi
27611
27612                         $AWK -f $srcdir/mk-1st.awk \
27613                                 name=${cf_libname}${cf_dir_suffix} \
27614                                 traces=$LIB_TRACING \
27615                                 MODEL=$cf_ITEM \
27616                                 CXX_MODEL=$CXX_MODEL \
27617                                 model=$cf_subdir \
27618                                 prefix=$cf_prefix \
27619                                 suffix=$cf_suffix \
27620                                 subset=$cf_subset \
27621                                 driver=$cf_cv_term_driver \
27622                                 SymLink="$LN_S" \
27623                                 TermlibRoot=$TINFO_NAME \
27624                                 TermlibSuffix=$TINFO_SUFFIX \
27625                                 ShlibVer=$cf_cv_shlib_version \
27626                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27627                                 ReLink=${cf_cv_do_relink:-no} \
27628                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27629                                 DoLinks=$cf_cv_do_symlinks \
27630                                 rmSoLocs=$cf_cv_rm_so_locs \
27631                                 ldconfig="$LDCONFIG" \
27632                                 overwrite=$WITH_OVERWRITE \
27633                                 depend="$cf_depend" \
27634                                 host="$host" \
27635                                 libtool_version="$LIBTOOL_VERSION" \
27636                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27637
27638                         cf_suffix="$old_cf_suffix"
27639
27640                         for cf_subdir2 in $cf_subdirs lib
27641                         do
27642                                 test $cf_subdir = $cf_subdir2 && break
27643                         done
27644                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27645                         $AWK -f $srcdir/mk-2nd.awk \
27646                                 name=$cf_dir \
27647                                 traces=$LIB_TRACING \
27648                                 MODEL=$cf_ITEM \
27649                                 model=$cf_subdir \
27650                                 subset=$cf_subset \
27651                                 srcdir=$srcdir \
27652                                 echo=$WITH_ECHO \
27653                                 crenames=$cf_cv_prog_CC_c_o \
27654                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27655                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27656                         cf_subdirs="$cf_subdirs $cf_subdir"
27657                         done
27658                 done
27659         fi
27660
27661         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27662 done
27663
27664 for cf_dir in $SRC_SUBDIRS
27665 do
27666         if test ! -d $srcdir/$cf_dir ; then
27667                 continue
27668         fi
27669
27670         if test -f $cf_dir/Makefile ; then
27671                 case "$cf_dir" in
27672                 (Ada95)
27673                         echo 'libs \' >> Makefile
27674                         echo 'install.libs \' >> Makefile
27675                         echo 'uninstall.libs ::' >> Makefile
27676                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27677                         ;;
27678                 esac
27679         fi
27680
27681         if test -f $srcdir/$cf_dir/modules; then
27682                 echo >> Makefile
27683                 if test -f $srcdir/$cf_dir/headers; then
27684 cat >> Makefile <<CF_EOF
27685 install.includes \\
27686 uninstall.includes \\
27687 CF_EOF
27688                 fi
27689 if test "$cf_dir" != "c++" ; then
27690 echo 'lint \' >> Makefile
27691 fi
27692 cat >> Makefile <<CF_EOF
27693 libs \\
27694 lintlib \\
27695 install.libs \\
27696 uninstall.libs \\
27697 install.$cf_dir \\
27698 uninstall.$cf_dir ::
27699         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27700 CF_EOF
27701         elif test -f $srcdir/$cf_dir/headers; then
27702 cat >> Makefile <<CF_EOF
27703
27704 libs \\
27705 install.libs \\
27706 uninstall.libs \\
27707 install.includes \\
27708 uninstall.includes ::
27709         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27710 CF_EOF
27711 fi
27712 done
27713
27714 if test "x$cf_with_db_install" = xyes; then
27715 cat >> Makefile <<CF_EOF
27716
27717 install.libs uninstall.libs \\
27718 install.data uninstall.data ::
27719 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27720 CF_EOF
27721 else
27722 cat >> Makefile <<CF_EOF
27723
27724 install.libs uninstall.libs ::
27725         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27726 CF_EOF
27727 fi
27728
27729 if test "x$cf_with_manpages" = xyes; then
27730 cat >> Makefile <<CF_EOF
27731
27732 install.man \\
27733 uninstall.man ::
27734         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27735 CF_EOF
27736 fi
27737
27738 cat >> Makefile <<CF_EOF
27739
27740 distclean ::
27741         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27742         rm -f headers.sh headers.sed mk_shared_lib.sh
27743         rm -f edit_man.* man_alias.*
27744         rm -rf \${DIRS_TO_MAKE}
27745 CF_EOF
27746
27747 # Special case: tack's manpage lives in its own directory.
27748 if test "x$cf_with_manpages" = xyes; then
27749 if test "x$cf_with_tack" = "xyes"; then
27750 cat >> Makefile <<CF_EOF
27751
27752 install.man \\
27753 uninstall.man ::
27754         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27755 CF_EOF
27756 fi
27757 fi
27758
27759 rm -f headers.sed headers.sh
27760
27761 echo creating headers.sh
27762 cat >headers.sh <<CF_EOF
27763 #! $SHELL
27764 # This shell script is generated by the 'configure' script.  It is invoked in a
27765 # subdirectory of the build tree.  It generates a sed-script in the parent
27766 # directory that is used to adjust includes for header files that reside in a
27767 # subdirectory of /usr/include, etc.
27768 PRG=""
27769 while test \$# != 3
27770 do
27771 PRG="\$PRG \$1"; shift
27772 done
27773 DST=\$1
27774 REF=\$2
27775 SRC=\$3
27776 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27777 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27778 echo installing \$SRC in \$DST
27779 CF_EOF
27780
27781 if test $WITH_CURSES_H = yes; then
27782         cat >>headers.sh <<CF_EOF
27783 case \$DST in
27784 (/*/include/*)
27785         END=\`basename \$DST\`
27786         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27787         do
27788                 NAME=\`basename \$i\`
27789                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27790         done
27791         ;;
27792 (*)
27793         echo "" >> \$TMPSED
27794         ;;
27795 esac
27796 CF_EOF
27797
27798 else
27799         cat >>headers.sh <<CF_EOF
27800 case \$DST in
27801 (/*/include/*)
27802         END=\`basename \$DST\`
27803         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27804         do
27805                 NAME=\`basename \$i\`
27806                 if test "\$NAME" = "curses.h"
27807                 then
27808                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27809                         NAME=ncurses.h
27810                 fi
27811                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27812         done
27813         ;;
27814 (*)
27815         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27816         ;;
27817 esac
27818 CF_EOF
27819 fi
27820 cat >>headers.sh <<CF_EOF
27821 rm -f \$TMPSRC
27822 sed -f \$TMPSED \$SRC > \$TMPSRC
27823 NAME=\`basename \$SRC\`
27824 CF_EOF
27825 if test $WITH_CURSES_H != yes; then
27826         cat >>headers.sh <<CF_EOF
27827 test "\$NAME" = "curses.h" && NAME=ncurses.h
27828 CF_EOF
27829 fi
27830 cat >>headers.sh <<CF_EOF
27831 # Just in case someone gzip'd manpages, remove the conflicting copy.
27832 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27833
27834 eval \$PRG \$TMPSRC \$DST/\$NAME
27835 rm -f \$TMPSRC \$TMPSED
27836 CF_EOF
27837
27838 chmod 0755 headers.sh
27839
27840 for cf_dir in $SRC_SUBDIRS
27841 do
27842         if test ! -d $srcdir/$cf_dir ; then
27843                 continue
27844         fi
27845
27846         if test -f $srcdir/$cf_dir/headers; then
27847                 $AWK -f $srcdir/mk-hdr.awk \
27848                         subset="$LIB_SUBSETS" \
27849                         compat="$WITH_CURSES_H" \
27850                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
27851         fi
27852
27853         if test -f $srcdir/$cf_dir/modules; then
27854                 if test "$cf_dir" != "c++" ; then
27855                         cat >>$cf_dir/Makefile <<"CF_EOF"
27856 depend : ${AUTO_SRC}
27857         makedepend -- ${CPPFLAGS} -- ${C_SRC}
27858
27859 # DO NOT DELETE THIS LINE -- make depend depends on it.
27860 CF_EOF
27861                 fi
27862         fi
27863 done
27864
27865 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27866 if test -z "$USE_OLD_MAKERULES" ; then
27867         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
27868 fi
27869 fi
27870  ;;
27871   esac
27872 done
27873 EOF
27874
27875 cat >>$CONFIG_STATUS <<\EOF
27876
27877 { (exit 0); exit 0; }
27878 EOF
27879 chmod +x $CONFIG_STATUS
27880 ac_clean_files=$ac_clean_files_save
27881
27882 # configure is writing to config.log, and then calls config.status.
27883 # config.status does its own redirection, appending to config.log.
27884 # Unfortunately, on DOS this fails, as config.log is still kept open
27885 # by configure, so config.status won't be able to write to it; its
27886 # output is simply discarded.  So we exec the FD to /dev/null,
27887 # effectively closing config.log, so it can be properly (re)opened and
27888 # appended to by config.status.  When coming back to configure, we
27889 # need to make the FD available again.
27890 if test "$no_create" != yes; then
27891   ac_cs_success=:
27892   exec 5>/dev/null
27893   $SHELL $CONFIG_STATUS || ac_cs_success=false
27894   exec 5>>config.log
27895   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27896   # would make configure fail if this is the last instruction.
27897   $ac_cs_success || { (exit 1); exit 1; }
27898 fi
27899 ${MAKE:-make} preinstall