]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
77f1197c95233a4a633a5856258c4aeee8ef10f1
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.697 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200111.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --with-tic-path=XXX     specify path of tic for fallbacks
771   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772   --without-xterm-new     specify if xterm terminfo should be old version
773   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776   --disable-big-core      assume machine has little memory
777   --disable-big-strings   assume compiler has only standard-size strings
778   --enable-termcap        compile in termcap fallback support
779   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780   --enable-getcap         fast termcap load, no xrefs to terminfo
781   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783   --disable-root-environ  restrict environment when running as root
784   --enable-symlinks       make tic use symbolic links not hard links
785   --enable-broken_linker  compile with broken-linker support code
786   --enable-bsdpad         recognize BSD-style prefix padding
787   --enable-widec          compile with wide-char/UTF-8 code
788   --disable-lp64          allow chtype to be long (ignore _LP64)
789   --disable-largefile     omit support for large files
790   --disable-tparm-varargs compile tparm() without varargs interface
791   --disable-tic-depends   link tic library without explicit dependency on ncurses library
792   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794   --with-bool=TYPE        override fallback type of bool variable
795   --with-caps=alt         compile with alternate Caps file
796   --with-chtype=TYPE      override type of chtype
797   --with-ospeed=TYPE      override type of ospeed variable
798   --with-mmask-t=TYPE     override type of mmask_t
799   --with-ccharw-max=XXX   override size CCHARW_MAX
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --with-tparm-arg=TYPE   override parameter type of tparm
802   --with-rcs-ids          compile-in RCS identifiers
803 Options to Specify How Manpages are Installed:
804   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                           optionally formatted/catonly, e.g., gzip,formatted
806   --with-manpage-renames  specify manpage-renaming
807   --with-manpage-aliases  specify manpage-aliases using .so
808   --with-manpage-symlinks specify manpage-aliases using symlinks
809   --with-manpage-tbl      specify manpage processing with tbl
810 Extensions:
811   --disable-ext-funcs     disable function-extensions
812   --enable-sp-funcs       enable SCREEN-extensions
813   --enable-term-driver    enable terminal-driver
814   --enable-const          compile with extra/non-standard const
815   --enable-ext-colors     compile for 256-color support
816   --enable-ext-mouse      compile for extended mouse-encoding
817   --enable-ext-putwin     compile with extended putwin/screendump
818   --enable-no-padding     compile with $NCURSES_NO_PADDING code
819   --enable-sigwinch       compile with SIGWINCH handler
820   --enable-tcap-names     compile with user-definable terminal capabilities
821 Reentrant Code:
822   --with-pthread          use POSIX thread library
823   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824   --enable-weak-symbols   enable weak-symbols for pthreads
825   --enable-reentrant      compile with reentrant code
826   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827   --enable-opaque-form    make form-library structures "opaque"
828   --enable-opaque-menu    make menu-library structures "opaque"
829   --enable-opaque-panel   make panel-library structures "opaque"
830   --with-wrap-prefix=XXX  override prefix used for public variables
831 Development Code:
832   --without-develop       disable development options
833   --enable-hard-tabs      compile with hard-tabs code
834   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835 Experimental Code:
836   --disable-assumed-color do not assume anything about default-colors
837   --disable-hashmap       compile without hashmap scrolling-optimization
838   --enable-colorfgbg      compile-in experimental $COLORFGBG code
839   --enable-interop        compile-in interop bindings
840   --enable-safe-sprintf   compile with experimental safe-sprintf code
841   --disable-scroll-hints  compile without scroll-hints code
842   --enable-wgetch-events  compile with wgetch-events code
843 Testing/development Options:
844   --disable-echo          do not display "compiling" commands
845   --disable-stripping     do not strip (debug info) installed executables
846   --enable-warnings       build: turn on GCC compiler warnings
847   --enable-string-hacks   work around bogus compiler/loader warnings
848   --enable-assertions     test: turn on generation of assertion code
849   --with-dmalloc          test: use Gray Watson's dmalloc library
850   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
851   --with-valgrind         test: use valgrind
852   --disable-leaks         test: free permanent memory, analyze leaks
853   --enable-expanded       test: generate functions for certain macros
854   --disable-macros        test: use functions rather than macros
855   --with-trace            test: add trace() function to all models of ncurses
856   --disable-gnat-projects test: disable GNAT projects even if usable
857 Ada Binding Options:
858   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
859   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
860   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
861   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
862   --with-ada-libname=XXX  override default Ada library-name
863
864 Some influential environment variables:
865   CC          C compiler command
866   CFLAGS      C compiler flags
867   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
868               nonstandard directory <lib dir>
869   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
870               headers in a nonstandard directory <include dir>
871   CPP         C preprocessor
872   CXX         C++ compiler command
873   CXXFLAGS    C++ compiler flags
874   CXXCPP      C++ preprocessor
875
876 Use these variables to override the choices made by `configure' or to help
877 it to find libraries and programs with nonstandard names/locations.
878
879 EOF
880 fi
881
882 if test "$ac_init_help" = "recursive"; then
883   # If there are subdirs, report their specific --help.
884   ac_popdir=`pwd`
885   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
886     cd $ac_subdir
887     # A "../" for each directory in /$ac_subdir.
888     ac_dots=`echo $ac_subdir |
889              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
890
891     case $srcdir in
892     .) # No --srcdir option.  We are building in place.
893       ac_sub_srcdir=$srcdir ;;
894     [\\/]* | ?:[\\/]* ) # Absolute path.
895       ac_sub_srcdir=$srcdir/$ac_subdir ;;
896     *) # Relative path.
897       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
898     esac
899
900     # Check for guested configure; otherwise get Cygnus style configure.
901     if test -f $ac_sub_srcdir/configure.gnu; then
902       echo
903       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
904     elif test -f $ac_sub_srcdir/configure; then
905       echo
906       $SHELL $ac_sub_srcdir/configure  --help=recursive
907     elif test -f $ac_sub_srcdir/configure.ac ||
908            test -f $ac_sub_srcdir/configure.in; then
909       echo
910       $ac_configure --help
911     else
912       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
913     fi
914     cd $ac_popdir
915   done
916 fi
917
918 test -n "$ac_init_help" && exit 0
919 if $ac_init_version; then
920   cat <<\EOF
921
922 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
923 Free Software Foundation, Inc.
924 This configure script is free software; the Free Software Foundation
925 gives unlimited permission to copy, distribute and modify it.
926 EOF
927   exit 0
928 fi
929 exec 5>config.log
930 cat >&5 <<EOF
931 This file contains any messages produced by compilers while
932 running configure, to aid debugging if configure makes a mistake.
933
934 It was created by $as_me, which was
935 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
936
937   $ $0 $@
938
939 EOF
940 {
941 cat <<_ASUNAME
942 ## ---------- ##
943 ## Platform.  ##
944 ## ---------- ##
945
946 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
947 uname -m = `(uname -m) 2>/dev/null || echo unknown`
948 uname -r = `(uname -r) 2>/dev/null || echo unknown`
949 uname -s = `(uname -s) 2>/dev/null || echo unknown`
950 uname -v = `(uname -v) 2>/dev/null || echo unknown`
951
952 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
953 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
954
955 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
956 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
957 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
958 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
959 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
960 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
961 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
962
963 PATH = $PATH
964
965 _ASUNAME
966 } >&5
967
968 cat >&5 <<EOF
969 ## ------------ ##
970 ## Core tests.  ##
971 ## ------------ ##
972
973 EOF
974
975 # Keep a trace of the command line.
976 # Strip out --no-create and --no-recursion so they do not pile up.
977 # Also quote any args containing shell meta-characters.
978 ac_configure_args=
979 ac_sep=
980 for ac_arg
981 do
982   case $ac_arg in
983   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
984   | --no-cr | --no-c) ;;
985   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
986   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
987   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
988     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
989     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
990     ac_sep=" " ;;
991   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
992      ac_sep=" " ;;
993   esac
994   # Get rid of the leading space.
995 done
996
997 # When interrupted or exit'd, cleanup temporary files, and complete
998 # config.log.  We remove comments because anyway the quotes in there
999 # would cause problems or look ugly.
1000 trap 'exit_status=$?
1001   # Save into config.log some information that might help in debugging.
1002   echo >&5
1003   echo "## ----------------- ##" >&5
1004   echo "## Cache variables.  ##" >&5
1005   echo "## ----------------- ##" >&5
1006   echo >&5
1007   # The following way of writing the cache mishandles newlines in values,
1008 {
1009   (set) 2>&1 |
1010     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1011     *ac_space=\ *)
1012       sed -n \
1013         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1014           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1015       ;;
1016     *)
1017       sed -n \
1018         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1019       ;;
1020     esac;
1021 } >&5
1022   sed "/^$/d" confdefs.h >conftest.log
1023   if test -s conftest.log; then
1024     echo >&5
1025     echo "## ------------ ##" >&5
1026     echo "## confdefs.h.  ##" >&5
1027     echo "## ------------ ##" >&5
1028     echo >&5
1029     cat conftest.log >&5
1030   fi
1031   (echo; echo) >&5
1032   test "$ac_signal" != 0 &&
1033     echo "$as_me: caught signal $ac_signal" >&5
1034   echo "$as_me: exit $exit_status" >&5
1035   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1036     exit $exit_status
1037      ' 0
1038 for ac_signal in 1 2 13 15; do
1039   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1040 done
1041 ac_signal=0
1042
1043 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1044 rm -rf conftest* confdefs.h
1045 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1046 echo >confdefs.h
1047
1048 # Let the site file select an alternate cache file if it wants to.
1049 # Prefer explicitly selected file to automatically selected ones.
1050 if test -z "$CONFIG_SITE"; then
1051   if test "x$prefix" != xNONE; then
1052     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1053   else
1054     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1055   fi
1056 fi
1057 for ac_site_file in $CONFIG_SITE; do
1058   if test -r "$ac_site_file"; then
1059     { echo "$as_me:1059: loading site script $ac_site_file" >&5
1060 echo "$as_me: loading site script $ac_site_file" >&6;}
1061     cat "$ac_site_file" >&5
1062     . "$ac_site_file"
1063   fi
1064 done
1065
1066 if test -r "$cache_file"; then
1067   # Some versions of bash will fail to source /dev/null (special
1068   # files actually), so we avoid doing that.
1069   if test -f "$cache_file"; then
1070     { echo "$as_me:1070: loading cache $cache_file" >&5
1071 echo "$as_me: loading cache $cache_file" >&6;}
1072     case $cache_file in
1073       [\\/]* | ?:[\\/]* ) . $cache_file;;
1074       *)                      . ./$cache_file;;
1075     esac
1076   fi
1077 else
1078   { echo "$as_me:1078: creating cache $cache_file" >&5
1079 echo "$as_me: creating cache $cache_file" >&6;}
1080   >$cache_file
1081 fi
1082
1083 # Check that the precious variables saved in the cache have kept the same
1084 # value.
1085 ac_cache_corrupted=false
1086 for ac_var in `(set) 2>&1 |
1087                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1088   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1089   eval ac_new_set=\$ac_env_${ac_var}_set
1090   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1091   eval ac_new_val="\$ac_env_${ac_var}_value"
1092   case $ac_old_set,$ac_new_set in
1093     set,)
1094       { echo "$as_me:1094: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1095 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1096       ac_cache_corrupted=: ;;
1097     ,set)
1098       { echo "$as_me:1098: error: \`$ac_var' was not set in the previous run" >&5
1099 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1100       ac_cache_corrupted=: ;;
1101     ,);;
1102     *)
1103       if test "x$ac_old_val" != "x$ac_new_val"; then
1104         { echo "$as_me:1104: error: \`$ac_var' has changed since the previous run:" >&5
1105 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1106         { echo "$as_me:1106:   former value:  $ac_old_val" >&5
1107 echo "$as_me:   former value:  $ac_old_val" >&2;}
1108         { echo "$as_me:1108:   current value: $ac_new_val" >&5
1109 echo "$as_me:   current value: $ac_new_val" >&2;}
1110         ac_cache_corrupted=:
1111       fi;;
1112   esac
1113   # Pass precious variables to config.status.  It doesn't matter if
1114   # we pass some twice (in addition to the command line arguments).
1115   if test "$ac_new_set" = set; then
1116     case $ac_new_val in
1117     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1118       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1119       ac_configure_args="$ac_configure_args '$ac_arg'"
1120       ;;
1121     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1122        ;;
1123     esac
1124   fi
1125 done
1126 if $ac_cache_corrupted; then
1127   { echo "$as_me:1127: error: changes in the environment can compromise the build" >&5
1128 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1129   { { echo "$as_me:1129: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1130 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1131    { (exit 1); exit 1; }; }
1132 fi
1133
1134 ac_ext=c
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140
1141 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1142   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1143                    ECHO_T='     ' ;;
1144   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1145   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1146 esac
1147 echo "#! $SHELL" >conftest.sh
1148 echo  "exit 0"   >>conftest.sh
1149 chmod +x conftest.sh
1150 if { (echo "$as_me:1150: PATH=\".;.\"; conftest.sh") >&5
1151   (PATH=".;."; conftest.sh) 2>&5
1152   ac_status=$?
1153   echo "$as_me:1153: \$? = $ac_status" >&5
1154   (exit $ac_status); }; then
1155   ac_path_separator=';'
1156 else
1157   ac_path_separator=:
1158 fi
1159 PATH_SEPARATOR="$ac_path_separator"
1160 rm -f conftest.sh
1161
1162 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1163
1164 top_builddir=`pwd`
1165
1166 echo "$as_me:1166: checking for egrep" >&5
1167 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1168 if test "${ac_cv_prog_egrep+set}" = set; then
1169   echo $ECHO_N "(cached) $ECHO_C" >&6
1170 else
1171   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1172                 then ac_cv_prog_egrep='grep -E'
1173                 else ac_cv_prog_egrep='egrep'
1174         fi
1175 fi
1176 echo "$as_me:1176: result: $ac_cv_prog_egrep" >&5
1177 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1178         EGREP=$ac_cv_prog_egrep
1179
1180         test -z "$EGREP" && { { echo "$as_me:1180: error: No egrep program found" >&5
1181 echo "$as_me: error: No egrep program found" >&2;}
1182    { (exit 1); exit 1; }; }
1183
1184 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1185 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1186 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1187 cf_cv_abi_version=${NCURSES_MAJOR}
1188 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1189 cf_cv_timestamp=`date`
1190 echo "$as_me:1190: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1191 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1192
1193 if test -f $srcdir/VERSION ; then
1194         echo "$as_me:1194: checking for package version" >&5
1195 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1196
1197         # if there are not enough fields, cut returns the last one...
1198         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1199         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1200         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1201
1202         # this is how CF_BUNDLED_INTL uses $VERSION:
1203         VERSION="$cf_field1"
1204
1205         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1206         test -z "$VERSION_MAJOR" && { { echo "$as_me:1206: error: missing major-version" >&5
1207 echo "$as_me: error: missing major-version" >&2;}
1208    { (exit 1); exit 1; }; }
1209
1210         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1211         test -z "$VERSION_MINOR" && { { echo "$as_me:1211: error: missing minor-version" >&5
1212 echo "$as_me: error: missing minor-version" >&2;}
1213    { (exit 1); exit 1; }; }
1214
1215         echo "$as_me:1215: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1216 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1217
1218         echo "$as_me:1218: checking for package patch date" >&5
1219 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1220         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1221         case .$VERSION_PATCH in
1222         (.)
1223                 { { echo "$as_me:1223: error: missing patch-date $VERSION_PATCH" >&5
1224 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1225    { (exit 1); exit 1; }; }
1226                 ;;
1227         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1228                 ;;
1229         (*)
1230                 { { echo "$as_me:1230: error: illegal patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         esac
1235         echo "$as_me:1235: result: $VERSION_PATCH" >&5
1236 echo "${ECHO_T}$VERSION_PATCH" >&6
1237 else
1238         { { echo "$as_me:1238: error: did not find $srcdir/VERSION" >&5
1239 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1240    { (exit 1); exit 1; }; }
1241 fi
1242
1243 # show the actual data that we have for versions:
1244 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1245
1246 echo "${as_me:-configure}:1246: testing ABI VERSION $VERSION ..." 1>&5
1247
1248 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1249
1250 echo "${as_me:-configure}:1250: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1251
1252 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1253
1254 echo "${as_me:-configure}:1254: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1255
1256 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1257
1258 echo "${as_me:-configure}:1258: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1259
1260         cf_PACKAGE=NCURSES
1261         PACKAGE=ncurses
1262
1263 cat >>confdefs.h <<EOF
1264 #define PACKAGE "$PACKAGE"
1265 EOF
1266
1267 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1268
1269         cat >>confdefs.h <<EOF
1270 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1271 EOF
1272
1273         cat >>confdefs.h <<EOF
1274 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1275 EOF
1276
1277 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1278
1279 # Check whether --with-rel-version or --without-rel-version was given.
1280 if test "${with_rel_version+set}" = set; then
1281   withval="$with_rel_version"
1282   { echo "$as_me:1282: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1283 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1284  cf_cv_rel_version=$withval
1285 fi;
1286
1287  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1288  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1289
1290 if test -n "$NCURSES_MAJOR" ; then
1291   case $NCURSES_MAJOR in
1292   ([0-9]*)
1293         ;;
1294   (*)
1295         { { echo "$as_me:1295: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1296 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1297    { (exit 1); exit 1; }; }
1298         ;;
1299   esac
1300 else
1301   { { echo "$as_me:1301: error: Release major-version value is empty" >&5
1302 echo "$as_me: error: Release major-version value is empty" >&2;}
1303    { (exit 1); exit 1; }; }
1304 fi
1305
1306 if test -n "$NCURSES_MINOR" ; then
1307   case $NCURSES_MINOR in
1308   ([0-9]*)
1309         ;;
1310   (*)
1311         { { echo "$as_me:1311: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1312 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1313    { (exit 1); exit 1; }; }
1314         ;;
1315   esac
1316 else
1317   { { echo "$as_me:1317: error: Release minor-version value is empty" >&5
1318 echo "$as_me: error: Release minor-version value is empty" >&2;}
1319    { (exit 1); exit 1; }; }
1320 fi
1321
1322 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1323
1324 # Check whether --with-abi-version or --without-abi-version was given.
1325 if test "${with_abi_version+set}" = set; then
1326   withval="$with_abi_version"
1327
1328         if test "x$cf_cv_abi_version" != "x$withval"
1329         then
1330                 { echo "$as_me:1330: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1331 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1332                 case $cf_cv_rel_version in
1333                 (5.*)
1334                         cf_cv_rel_version=$withval.0
1335                         ;;
1336                 (6.*)
1337                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1338                         ;;
1339                 esac
1340         fi
1341         cf_cv_abi_version=$withval
1342 fi;
1343
1344 if test -n "$cf_cv_abi_version" ; then
1345   case $cf_cv_abi_version in
1346   ([0-9]*)
1347         ;;
1348   (*)
1349         { { echo "$as_me:1349: error: ABI version is not a number: $cf_cv_abi_version" >&5
1350 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1351    { (exit 1); exit 1; }; }
1352         ;;
1353   esac
1354 else
1355   { { echo "$as_me:1355: error: ABI version value is empty" >&5
1356 echo "$as_me: error: ABI version value is empty" >&2;}
1357    { (exit 1); exit 1; }; }
1358 fi
1359
1360 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1361 then
1362         case $cf_cv_rel_version in
1363         (5.*)
1364                 cf_cv_rel_version=$with_abi_version.0
1365                 ;;
1366         esac
1367 fi
1368
1369 ac_aux_dir=
1370 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1371   if test -f $ac_dir/install-sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install-sh -c"
1374     break
1375   elif test -f $ac_dir/install.sh; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/install.sh -c"
1378     break
1379   elif test -f $ac_dir/shtool; then
1380     ac_aux_dir=$ac_dir
1381     ac_install_sh="$ac_aux_dir/shtool install -c"
1382     break
1383   fi
1384 done
1385 if test -z "$ac_aux_dir"; then
1386   { { echo "$as_me:1386: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1387 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1388    { (exit 1); exit 1; }; }
1389 fi
1390 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1391 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1392 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1393
1394 # Make sure we can run config.sub.
1395 $ac_config_sub sun4 >/dev/null 2>&1 ||
1396   { { echo "$as_me:1396: error: cannot run $ac_config_sub" >&5
1397 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1398    { (exit 1); exit 1; }; }
1399
1400 echo "$as_me:1400: checking build system type" >&5
1401 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1402 if test "${ac_cv_build+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_build_alias=$build_alias
1406 test -z "$ac_cv_build_alias" &&
1407   ac_cv_build_alias=`$ac_config_guess`
1408 test -z "$ac_cv_build_alias" &&
1409   { { echo "$as_me:1409: error: cannot guess build type; you must specify one" >&5
1410 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1411    { (exit 1); exit 1; }; }
1412 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1413   { { echo "$as_me:1413: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1414 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1415    { (exit 1); exit 1; }; }
1416
1417 fi
1418 echo "$as_me:1418: result: $ac_cv_build" >&5
1419 echo "${ECHO_T}$ac_cv_build" >&6
1420 build=$ac_cv_build
1421 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1422 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1423 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1424
1425 echo "$as_me:1425: checking host system type" >&5
1426 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1427 if test "${ac_cv_host+set}" = set; then
1428   echo $ECHO_N "(cached) $ECHO_C" >&6
1429 else
1430   ac_cv_host_alias=$host_alias
1431 test -z "$ac_cv_host_alias" &&
1432   ac_cv_host_alias=$ac_cv_build_alias
1433 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1434   { { echo "$as_me:1434: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1435 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1436    { (exit 1); exit 1; }; }
1437
1438 fi
1439 echo "$as_me:1439: result: $ac_cv_host" >&5
1440 echo "${ECHO_T}$ac_cv_host" >&6
1441 host=$ac_cv_host
1442 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1447         echo "$as_me:1447: checking target system type" >&5
1448 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1449 if test "${ac_cv_target+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   ac_cv_target_alias=$target_alias
1453 test "x$ac_cv_target_alias" = "x" &&
1454   ac_cv_target_alias=$ac_cv_host_alias
1455 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1456   { { echo "$as_me:1456: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1457 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1458    { (exit 1); exit 1; }; }
1459
1460 fi
1461 echo "$as_me:1461: result: $ac_cv_target" >&5
1462 echo "${ECHO_T}$ac_cv_target" >&6
1463 target=$ac_cv_target
1464 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468 # The aliases save the names the user supplied, while $host etc.
1469 # will get canonicalized.
1470 test -n "$target_alias" &&
1471   test "$program_prefix$program_suffix$program_transform_name" = \
1472     NONENONEs,x,x, &&
1473   program_prefix=${target_alias}-
1474         system_name="$host_os"
1475 else
1476         system_name="`(uname -s -r) 2>/dev/null`"
1477         if test -z "$system_name" ; then
1478                 system_name="`(hostname) 2>/dev/null`"
1479         fi
1480 fi
1481 test -n "$system_name" &&
1482 cat >>confdefs.h <<EOF
1483 #define SYSTEM_NAME "$system_name"
1484 EOF
1485
1486 if test "${cf_cv_system_name+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   cf_cv_system_name="$system_name"
1490 fi
1491
1492 test -z "$system_name" && system_name="$cf_cv_system_name"
1493 test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5
1494 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1495
1496 if test ".$system_name" != ".$cf_cv_system_name" ; then
1497         echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1498 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1499         { { echo "$as_me:1499: error: \"Please remove config.cache and try again.\"" >&5
1500 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1501    { (exit 1); exit 1; }; }
1502 fi
1503
1504 # Check whether --with-system-type or --without-system-type was given.
1505 if test "${with_system_type+set}" = set; then
1506   withval="$with_system_type"
1507   { echo "$as_me:1507: WARNING: overriding system type to $withval" >&5
1508 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1509         cf_cv_system_name=$withval
1510         host_os=$withval
1511
1512 fi;
1513
1514 ###     Save the given $CFLAGS to allow user-override.
1515 cf_user_CFLAGS="$CFLAGS"
1516
1517 ###     Default install-location
1518
1519 echo "$as_me:1519: checking for prefix" >&5
1520 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1521 if test "x$prefix" = "xNONE" ; then
1522         case "$cf_cv_system_name" in
1523                 # non-vendor systems don't have a conflict
1524         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1525                 prefix=/usr
1526                 ;;
1527         (*)     prefix=$ac_default_prefix
1528                 ;;
1529         esac
1530 fi
1531 echo "$as_me:1531: result: $prefix" >&5
1532 echo "${ECHO_T}$prefix" >&6
1533
1534 if test "x$prefix" = "xNONE" ; then
1535 echo "$as_me:1535: checking for default include-directory" >&5
1536 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1537 test -n "$verbose" && echo 1>&6
1538 for cf_symbol in \
1539         $includedir \
1540         $includedir/ncurses \
1541         $prefix/include \
1542         $prefix/include/ncurses \
1543         /usr/local/include \
1544         /usr/local/include/ncurses \
1545         /usr/include \
1546         /usr/include/ncurses
1547 do
1548         cf_dir=`eval echo $cf_symbol`
1549         if test -f $cf_dir/curses.h ; then
1550         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1551                 includedir="$cf_symbol"
1552                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1553                 break
1554         fi
1555         fi
1556         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1557 done
1558 echo "$as_me:1558: result: $includedir" >&5
1559 echo "${ECHO_T}$includedir" >&6
1560 fi
1561
1562 ### Defaults for ncurses ABI
1563
1564 case x$cf_cv_abi_version in
1565 (x[6789])
1566         cf_dft_ext_colors=yes
1567         cf_dft_ext_const=yes
1568         cf_dft_ext_mouse=yes
1569         cf_dft_ext_putwin=yes
1570         cf_dft_ext_spfuncs=yes
1571         cf_dft_filter_syms=yes
1572         cf_dft_chtype=uint32_t
1573         cf_dft_mmask_t=uint32_t
1574         cf_dft_interop=yes
1575         cf_dft_tparm_arg=intptr_t
1576         cf_dft_with_lp64=yes
1577         ;;
1578 (*)
1579         cf_dft_ext_colors=no
1580         cf_dft_ext_const=no
1581         cf_dft_ext_mouse=no
1582         cf_dft_ext_putwin=no
1583         cf_dft_ext_spfuncs=no
1584         cf_dft_filter_syms=no
1585         cf_dft_chtype=auto
1586         cf_dft_mmask_t=auto
1587         cf_dft_interop=no
1588         cf_dft_tparm_arg=long
1589         cf_dft_with_lp64=no
1590         ;;
1591 esac
1592
1593 ###     Checks for programs.
1594
1595 # Check whether --with-ada or --without-ada was given.
1596 if test "${with_ada+set}" = set; then
1597   withval="$with_ada"
1598   cf_with_ada=$withval
1599 else
1600   cf_with_ada=yes
1601 fi;
1602
1603 if test "x$cf_with_ada" = xyes
1604 then
1605         cf_prog_cc="gnatgcc gcc cc"
1606 else
1607         cf_prog_cc="gcc cc"
1608 fi
1609
1610 ac_ext=c
1611 ac_cpp='$CPP $CPPFLAGS'
1612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1615 ac_main_return=return
1616 if test -n "$ac_tool_prefix"; then
1617   for ac_prog in $cf_prog_cc
1618   do
1619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1621 echo "$as_me:1621: checking for $ac_word" >&5
1622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1623 if test "${ac_cv_prog_CC+set}" = set; then
1624   echo $ECHO_N "(cached) $ECHO_C" >&6
1625 else
1626   if test -n "$CC"; then
1627   ac_cv_prog_CC="$CC" # Let the user override the test.
1628 else
1629   ac_save_IFS=$IFS; IFS=$ac_path_separator
1630 ac_dummy="$PATH"
1631 for ac_dir in $ac_dummy; do
1632   IFS=$ac_save_IFS
1633   test -z "$ac_dir" && ac_dir=.
1634   $as_executable_p "$ac_dir/$ac_word" || continue
1635 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636 echo "$as_me:1636: found $ac_dir/$ac_word" >&5
1637 break
1638 done
1639
1640 fi
1641 fi
1642 CC=$ac_cv_prog_CC
1643 if test -n "$CC"; then
1644   echo "$as_me:1644: result: $CC" >&5
1645 echo "${ECHO_T}$CC" >&6
1646 else
1647   echo "$as_me:1647: result: no" >&5
1648 echo "${ECHO_T}no" >&6
1649 fi
1650
1651     test -n "$CC" && break
1652   done
1653 fi
1654 if test -z "$CC"; then
1655   ac_ct_CC=$CC
1656   for ac_prog in $cf_prog_cc
1657 do
1658   # Extract the first word of "$ac_prog", so it can be a program name with args.
1659 set dummy $ac_prog; ac_word=$2
1660 echo "$as_me:1660: checking for $ac_word" >&5
1661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1662 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1663   echo $ECHO_N "(cached) $ECHO_C" >&6
1664 else
1665   if test -n "$ac_ct_CC"; then
1666   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1667 else
1668   ac_save_IFS=$IFS; IFS=$ac_path_separator
1669 ac_dummy="$PATH"
1670 for ac_dir in $ac_dummy; do
1671   IFS=$ac_save_IFS
1672   test -z "$ac_dir" && ac_dir=.
1673   $as_executable_p "$ac_dir/$ac_word" || continue
1674 ac_cv_prog_ac_ct_CC="$ac_prog"
1675 echo "$as_me:1675: found $ac_dir/$ac_word" >&5
1676 break
1677 done
1678
1679 fi
1680 fi
1681 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1682 if test -n "$ac_ct_CC"; then
1683   echo "$as_me:1683: result: $ac_ct_CC" >&5
1684 echo "${ECHO_T}$ac_ct_CC" >&6
1685 else
1686   echo "$as_me:1686: result: no" >&5
1687 echo "${ECHO_T}no" >&6
1688 fi
1689
1690   test -n "$ac_ct_CC" && break
1691 done
1692
1693   CC=$ac_ct_CC
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main (void)
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main (void)
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main (void)
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main (void)
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main (void)
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main (void)
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 INTEL_COMPILER=no
2115
2116 if test "$GCC" = yes ; then
2117         case $host_os in
2118         (linux*|gnu*)
2119                 echo "$as_me:2119: checking if this is really Intel C compiler" >&5
2120 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2121                 cf_save_CFLAGS="$CFLAGS"
2122                 CFLAGS="$CFLAGS -no-gcc"
2123                 cat >conftest.$ac_ext <<_ACEOF
2124 #line 2124 "configure"
2125 #include "confdefs.h"
2126
2127 int
2128 main (void)
2129 {
2130
2131 #ifdef __INTEL_COMPILER
2132 #else
2133 make an error
2134 #endif
2135
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 rm -f conftest.$ac_objext
2141 if { (eval echo "$as_me:2141: \"$ac_compile\"") >&5
2142   (eval $ac_compile) 2>&5
2143   ac_status=$?
2144   echo "$as_me:2144: \$? = $ac_status" >&5
2145   (exit $ac_status); } &&
2146          { ac_try='test -s conftest.$ac_objext'
2147   { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148   (eval $ac_try) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); }; }; then
2152   INTEL_COMPILER=yes
2153 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2154
2155 else
2156   echo "$as_me: failed program was:" >&5
2157 cat conftest.$ac_ext >&5
2158 fi
2159 rm -f conftest.$ac_objext conftest.$ac_ext
2160                 CFLAGS="$cf_save_CFLAGS"
2161                 echo "$as_me:2161: result: $INTEL_COMPILER" >&5
2162 echo "${ECHO_T}$INTEL_COMPILER" >&6
2163                 ;;
2164         esac
2165 fi
2166
2167 CLANG_COMPILER=no
2168
2169 if test "$GCC" = yes ; then
2170         echo "$as_me:2170: checking if this is really Clang C compiler" >&5
2171 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2172         cf_save_CFLAGS="$CFLAGS"
2173         CFLAGS="$CFLAGS -Qunused-arguments"
2174         cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177
2178 int
2179 main (void)
2180 {
2181
2182 #ifdef __clang__
2183 #else
2184 make an error
2185 #endif
2186
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:2195: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   CLANG_COMPILER=yes
2204 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2205
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211         CFLAGS="$cf_save_CFLAGS"
2212         echo "$as_me:2212: result: $CLANG_COMPILER" >&5
2213 echo "${ECHO_T}$CLANG_COMPILER" >&6
2214 fi
2215
2216 echo "$as_me:2216: checking for $CC option to accept ANSI C" >&5
2217 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2218 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2219   echo $ECHO_N "(cached) $ECHO_C" >&6
2220 else
2221   ac_cv_prog_cc_stdc=no
2222 ac_save_CC=$CC
2223 cat >conftest.$ac_ext <<_ACEOF
2224 #line 2224 "configure"
2225 #include "confdefs.h"
2226 #include <stdarg.h>
2227 #include <stdio.h>
2228 #include <sys/types.h>
2229 #include <sys/stat.h>
2230 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2231 struct buf { int x; };
2232 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2233 static char *e (p, i)
2234      char **p;
2235      int i;
2236 {
2237   return p[i];
2238 }
2239 static char *f (char * (*g) (char **, int), char **p, ...)
2240 {
2241   char *s;
2242   va_list v;
2243   va_start (v,p);
2244   s = g (p, va_arg (v,int));
2245   va_end (v);
2246   return s;
2247 }
2248 int test (int i, double x);
2249 struct s1 {int (*f) (int a);};
2250 struct s2 {int (*f) (double a);};
2251 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2252 int argc;
2253 char **argv;
2254 int
2255 main (void)
2256 {
2257 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 # Don't try gcc -ansi; that turns off useful extensions and
2263 # breaks some systems' header files.
2264 # AIX                   -qlanglvl=ansi
2265 # Ultrix and OSF/1      -std1
2266 # HP-UX 10.20 and later -Ae
2267 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2268 # SVR4                  -Xc -D__EXTENSIONS__
2269 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2270 do
2271   CC="$ac_save_CC $ac_arg"
2272   rm -f conftest.$ac_objext
2273 if { (eval echo "$as_me:2273: \"$ac_compile\"") >&5
2274   (eval $ac_compile) 2>&5
2275   ac_status=$?
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } &&
2278          { ac_try='test -s conftest.$ac_objext'
2279   { (eval echo "$as_me:2279: \"$ac_try\"") >&5
2280   (eval $ac_try) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); }; }; then
2284   ac_cv_prog_cc_stdc=$ac_arg
2285 break
2286 else
2287   echo "$as_me: failed program was:" >&5
2288 cat conftest.$ac_ext >&5
2289 fi
2290 rm -f conftest.$ac_objext
2291 done
2292 rm -f conftest.$ac_ext conftest.$ac_objext
2293 CC=$ac_save_CC
2294
2295 fi
2296
2297 case "x$ac_cv_prog_cc_stdc" in
2298   x|xno)
2299     echo "$as_me:2299: result: none needed" >&5
2300 echo "${ECHO_T}none needed" >&6 ;;
2301   *)
2302     echo "$as_me:2302: result: $ac_cv_prog_cc_stdc" >&5
2303 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2304     CC="$CC $ac_cv_prog_cc_stdc" ;;
2305 esac
2306
2307 # This should have been defined by AC_PROG_CC
2308 : ${CC:=cc}
2309
2310 echo "$as_me:2310: checking \$CFLAGS variable" >&5
2311 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2312 case "x$CFLAGS" in
2313 (*-[IUD]*)
2314         echo "$as_me:2314: result: broken" >&5
2315 echo "${ECHO_T}broken" >&6
2316         { echo "$as_me:2316: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2317 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2318         cf_flags="$CFLAGS"
2319         CFLAGS=
2320         for cf_arg in $cf_flags
2321         do
2322
2323 cf_fix_cppflags=no
2324 cf_new_cflags=
2325 cf_new_cppflags=
2326 cf_new_extra_cppflags=
2327
2328 for cf_add_cflags in $cf_arg
2329 do
2330 case $cf_fix_cppflags in
2331 (no)
2332         case $cf_add_cflags in
2333         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2334                 case $cf_add_cflags in
2335                 (-D*)
2336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2337
2338                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2339                                 && test -z "${cf_tst_cflags}" \
2340                                 && cf_fix_cppflags=yes
2341
2342                         if test $cf_fix_cppflags = yes ; then
2343
2344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2346
2347                                 continue
2348                         elif test "${cf_tst_cflags}" = "\"'" ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         fi
2355                         ;;
2356                 esac
2357                 case "$CPPFLAGS" in
2358                 (*$cf_add_cflags)
2359                         ;;
2360                 (*)
2361                         case $cf_add_cflags in
2362                         (-D*)
2363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365 CPPFLAGS=`echo "$CPPFLAGS" | \
2366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2368
2369                                 ;;
2370                         esac
2371
2372         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2373         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2374
2375                         ;;
2376                 esac
2377                 ;;
2378         (*)
2379
2380         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2381         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2382
2383                 ;;
2384         esac
2385         ;;
2386 (yes)
2387
2388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2390
2391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2392
2393         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2394                 && test -z "${cf_tst_cflags}" \
2395                 && cf_fix_cppflags=no
2396         ;;
2397 esac
2398 done
2399
2400 if test -n "$cf_new_cflags" ; then
2401
2402         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2403         CFLAGS="${CFLAGS}$cf_new_cflags"
2404
2405 fi
2406
2407 if test -n "$cf_new_cppflags" ; then
2408
2409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2410         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2411
2412 fi
2413
2414 if test -n "$cf_new_extra_cppflags" ; then
2415
2416         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2417         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2418
2419 fi
2420
2421         done
2422         ;;
2423 (*)
2424         echo "$as_me:2424: result: ok" >&5
2425 echo "${ECHO_T}ok" >&6
2426         ;;
2427 esac
2428
2429 echo "$as_me:2429: checking \$CC variable" >&5
2430 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2431 case "$CC" in
2432 (*[\ \  ]-*)
2433         echo "$as_me:2433: result: broken" >&5
2434 echo "${ECHO_T}broken" >&6
2435         { echo "$as_me:2435: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2436 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2437         # humor him...
2438         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2439         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2440         CC="$cf_prog"
2441         for cf_arg in $cf_flags
2442         do
2443                 case "x$cf_arg" in
2444                 (x-[IUDfgOW]*)
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_arg
2452 do
2453 case $cf_fix_cppflags in
2454 (no)
2455         case $cf_add_cflags in
2456         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2457                 case $cf_add_cflags in
2458                 (-D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466
2467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2469
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         fi
2478                         ;;
2479                 esac
2480                 case "$CPPFLAGS" in
2481                 (*$cf_add_cflags)
2482                         ;;
2483                 (*)
2484                         case $cf_add_cflags in
2485                         (-D*)
2486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2487
2488 CPPFLAGS=`echo "$CPPFLAGS" | \
2489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2491
2492                                 ;;
2493                         esac
2494
2495         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2496         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2497
2498                         ;;
2499                 esac
2500                 ;;
2501         (*)
2502
2503         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2504         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2505
2506                 ;;
2507         esac
2508         ;;
2509 (yes)
2510
2511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2513
2514         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2515
2516         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2517                 && test -z "${cf_tst_cflags}" \
2518                 && cf_fix_cppflags=no
2519         ;;
2520 esac
2521 done
2522
2523 if test -n "$cf_new_cflags" ; then
2524
2525         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2526         CFLAGS="${CFLAGS}$cf_new_cflags"
2527
2528 fi
2529
2530 if test -n "$cf_new_cppflags" ; then
2531
2532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2533         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2534
2535 fi
2536
2537 if test -n "$cf_new_extra_cppflags" ; then
2538
2539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2541
2542 fi
2543
2544                         ;;
2545                 (*)
2546                         CC="$CC $cf_arg"
2547                         ;;
2548                 esac
2549         done
2550         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2551
2552 echo "${as_me:-configure}:2552: testing resulting CC: '$CC' ..." 1>&5
2553
2554         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2555
2556 echo "${as_me:-configure}:2556: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2557
2558         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2559
2560 echo "${as_me:-configure}:2560: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2561
2562         ;;
2563 (*)
2564         echo "$as_me:2564: result: ok" >&5
2565 echo "${ECHO_T}ok" >&6
2566         ;;
2567 esac
2568
2569 ac_ext=c
2570 ac_cpp='$CPP $CPPFLAGS'
2571 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2574 ac_main_return=return
2575 echo "$as_me:2575: checking how to run the C preprocessor" >&5
2576 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2577 # On Suns, sometimes $CPP names a directory.
2578 if test -n "$CPP" && test -d "$CPP"; then
2579   CPP=
2580 fi
2581 if test -z "$CPP"; then
2582   if test "${ac_cv_prog_CPP+set}" = set; then
2583   echo $ECHO_N "(cached) $ECHO_C" >&6
2584 else
2585       # Double quotes because CPP needs to be expanded
2586     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2587     do
2588       ac_preproc_ok=false
2589 for ac_c_preproc_warn_flag in '' yes
2590 do
2591   # Use a header file that comes with gcc, so configuring glibc
2592   # with a fresh cross-compiler works.
2593   # On the NeXT, cc -E runs the code through the compiler's parser,
2594   # not just through cpp. "Syntax error" is here to catch this case.
2595   cat >conftest.$ac_ext <<_ACEOF
2596 #line 2596 "configure"
2597 #include "confdefs.h"
2598 #include <assert.h>
2599                      Syntax error
2600 _ACEOF
2601 if { (eval echo "$as_me:2601: \"$ac_cpp conftest.$ac_ext\"") >&5
2602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2603   ac_status=$?
2604   egrep -v '^ *\+' conftest.er1 >conftest.err
2605   rm -f conftest.er1
2606   cat conftest.err >&5
2607   echo "$as_me:2607: \$? = $ac_status" >&5
2608   (exit $ac_status); } >/dev/null; then
2609   if test -s conftest.err; then
2610     ac_cpp_err=$ac_c_preproc_warn_flag
2611   else
2612     ac_cpp_err=
2613   fi
2614 else
2615   ac_cpp_err=yes
2616 fi
2617 if test -z "$ac_cpp_err"; then
2618   :
2619 else
2620   echo "$as_me: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   # Broken: fails on valid input.
2623 continue
2624 fi
2625 rm -f conftest.err conftest.$ac_ext
2626
2627   # OK, works on sane cases.  Now check whether non-existent headers
2628   # can be detected and how.
2629   cat >conftest.$ac_ext <<_ACEOF
2630 #line 2630 "configure"
2631 #include "confdefs.h"
2632 #include <ac_nonexistent.h>
2633 _ACEOF
2634 if { (eval echo "$as_me:2634: \"$ac_cpp conftest.$ac_ext\"") >&5
2635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2636   ac_status=$?
2637   egrep -v '^ *\+' conftest.er1 >conftest.err
2638   rm -f conftest.er1
2639   cat conftest.err >&5
2640   echo "$as_me:2640: \$? = $ac_status" >&5
2641   (exit $ac_status); } >/dev/null; then
2642   if test -s conftest.err; then
2643     ac_cpp_err=$ac_c_preproc_warn_flag
2644   else
2645     ac_cpp_err=
2646   fi
2647 else
2648   ac_cpp_err=yes
2649 fi
2650 if test -z "$ac_cpp_err"; then
2651   # Broken: success on invalid input.
2652 continue
2653 else
2654   echo "$as_me: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   # Passes both tests.
2657 ac_preproc_ok=:
2658 break
2659 fi
2660 rm -f conftest.err conftest.$ac_ext
2661
2662 done
2663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2664 rm -f conftest.err conftest.$ac_ext
2665 if $ac_preproc_ok; then
2666   break
2667 fi
2668
2669     done
2670     ac_cv_prog_CPP=$CPP
2671
2672 fi
2673   CPP=$ac_cv_prog_CPP
2674 else
2675   ac_cv_prog_CPP=$CPP
2676 fi
2677 echo "$as_me:2677: result: $CPP" >&5
2678 echo "${ECHO_T}$CPP" >&6
2679 ac_preproc_ok=false
2680 for ac_c_preproc_warn_flag in '' yes
2681 do
2682   # Use a header file that comes with gcc, so configuring glibc
2683   # with a fresh cross-compiler works.
2684   # On the NeXT, cc -E runs the code through the compiler's parser,
2685   # not just through cpp. "Syntax error" is here to catch this case.
2686   cat >conftest.$ac_ext <<_ACEOF
2687 #line 2687 "configure"
2688 #include "confdefs.h"
2689 #include <assert.h>
2690                      Syntax error
2691 _ACEOF
2692 if { (eval echo "$as_me:2692: \"$ac_cpp conftest.$ac_ext\"") >&5
2693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694   ac_status=$?
2695   egrep -v '^ *\+' conftest.er1 >conftest.err
2696   rm -f conftest.er1
2697   cat conftest.err >&5
2698   echo "$as_me:2698: \$? = $ac_status" >&5
2699   (exit $ac_status); } >/dev/null; then
2700   if test -s conftest.err; then
2701     ac_cpp_err=$ac_c_preproc_warn_flag
2702   else
2703     ac_cpp_err=
2704   fi
2705 else
2706   ac_cpp_err=yes
2707 fi
2708 if test -z "$ac_cpp_err"; then
2709   :
2710 else
2711   echo "$as_me: failed program was:" >&5
2712   cat conftest.$ac_ext >&5
2713   # Broken: fails on valid input.
2714 continue
2715 fi
2716 rm -f conftest.err conftest.$ac_ext
2717
2718   # OK, works on sane cases.  Now check whether non-existent headers
2719   # can be detected and how.
2720   cat >conftest.$ac_ext <<_ACEOF
2721 #line 2721 "configure"
2722 #include "confdefs.h"
2723 #include <ac_nonexistent.h>
2724 _ACEOF
2725 if { (eval echo "$as_me:2725: \"$ac_cpp conftest.$ac_ext\"") >&5
2726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2727   ac_status=$?
2728   egrep -v '^ *\+' conftest.er1 >conftest.err
2729   rm -f conftest.er1
2730   cat conftest.err >&5
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); } >/dev/null; then
2733   if test -s conftest.err; then
2734     ac_cpp_err=$ac_c_preproc_warn_flag
2735   else
2736     ac_cpp_err=
2737   fi
2738 else
2739   ac_cpp_err=yes
2740 fi
2741 if test -z "$ac_cpp_err"; then
2742   # Broken: success on invalid input.
2743 continue
2744 else
2745   echo "$as_me: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   # Passes both tests.
2748 ac_preproc_ok=:
2749 break
2750 fi
2751 rm -f conftest.err conftest.$ac_ext
2752
2753 done
2754 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2755 rm -f conftest.err conftest.$ac_ext
2756 if $ac_preproc_ok; then
2757   :
2758 else
2759   { { echo "$as_me:2759: error: C preprocessor \"$CPP\" fails sanity check" >&5
2760 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2761    { (exit 1); exit 1; }; }
2762 fi
2763
2764 ac_ext=c
2765 ac_cpp='$CPP $CPPFLAGS'
2766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769 ac_main_return=return
2770
2771 if test $ac_cv_c_compiler_gnu = yes; then
2772     echo "$as_me:2772: checking whether $CC needs -traditional" >&5
2773 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2774 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777     ac_pattern="Autoconf.*'x'"
2778   cat >conftest.$ac_ext <<_ACEOF
2779 #line 2779 "configure"
2780 #include "confdefs.h"
2781 #include <sgtty.h>
2782 int Autoconf = TIOCGETP;
2783 _ACEOF
2784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2785   egrep "$ac_pattern" >/dev/null 2>&1; then
2786   ac_cv_prog_gcc_traditional=yes
2787 else
2788   ac_cv_prog_gcc_traditional=no
2789 fi
2790 rm -rf conftest*
2791
2792   if test $ac_cv_prog_gcc_traditional = no; then
2793     cat >conftest.$ac_ext <<_ACEOF
2794 #line 2794 "configure"
2795 #include "confdefs.h"
2796 #include <termio.h>
2797 int Autoconf = TCGETA;
2798 _ACEOF
2799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2800   egrep "$ac_pattern" >/dev/null 2>&1; then
2801   ac_cv_prog_gcc_traditional=yes
2802 fi
2803 rm -rf conftest*
2804
2805   fi
2806 fi
2807 echo "$as_me:2807: result: $ac_cv_prog_gcc_traditional" >&5
2808 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2809   if test $ac_cv_prog_gcc_traditional = yes; then
2810     CC="$CC -traditional"
2811   fi
2812 fi
2813
2814 echo "$as_me:2814: checking whether $CC understands -c and -o together" >&5
2815 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2816 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819
2820 cat > conftest.$ac_ext <<CF_EOF
2821 int main(void)
2822 {
2823         ${cf_cv_main_return:-return}(0);
2824 }
2825 CF_EOF
2826 # We do the test twice because some compilers refuse to overwrite an
2827 # existing .o file with -o, though they will create one.
2828 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2829 if { (eval echo "$as_me:2829: \"$ac_try\"") >&5
2830   (eval $ac_try) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); } &&
2834   test -f conftest2.$ac_objext && { (eval echo "$as_me:2834: \"$ac_try\"") >&5
2835   (eval $ac_try) 2>&5
2836   ac_status=$?
2837   echo "$as_me:2837: \$? = $ac_status" >&5
2838   (exit $ac_status); };
2839 then
2840   eval cf_cv_prog_CC_c_o=yes
2841 else
2842   eval cf_cv_prog_CC_c_o=no
2843 fi
2844 rm -rf conftest*
2845
2846 fi
2847 if test $cf_cv_prog_CC_c_o = yes; then
2848   echo "$as_me:2848: result: yes" >&5
2849 echo "${ECHO_T}yes" >&6
2850 else
2851   echo "$as_me:2851: result: no" >&5
2852 echo "${ECHO_T}no" >&6
2853 fi
2854
2855 if test "$cross_compiling" = yes ; then
2856         LDCONFIG=:
2857 else
2858         case "$cf_cv_system_name" in
2859         (dragonfly*|mirbsd*|freebsd*)
2860                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2861                 ;;
2862         (*) LDPATH=$PATH:/sbin:/usr/sbin
2863                 # Extract the first word of "ldconfig", so it can be a program name with args.
2864 set dummy ldconfig; ac_word=$2
2865 echo "$as_me:2865: checking for $ac_word" >&5
2866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2867 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870   case $LDCONFIG in
2871   [\\/]* | ?:[\\/]*)
2872   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2873   ;;
2874   *)
2875   ac_save_IFS=$IFS; IFS=$ac_path_separator
2876 ac_dummy="$LDPATH"
2877 for ac_dir in $ac_dummy; do
2878   IFS=$ac_save_IFS
2879   test -z "$ac_dir" && ac_dir=.
2880   if $as_executable_p "$ac_dir/$ac_word"; then
2881    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2882    echo "$as_me:2882: found $ac_dir/$ac_word" >&5
2883    break
2884 fi
2885 done
2886
2887   ;;
2888 esac
2889 fi
2890 LDCONFIG=$ac_cv_path_LDCONFIG
2891
2892 if test -n "$LDCONFIG"; then
2893   echo "$as_me:2893: result: $LDCONFIG" >&5
2894 echo "${ECHO_T}$LDCONFIG" >&6
2895 else
2896   echo "$as_me:2896: result: no" >&5
2897 echo "${ECHO_T}no" >&6
2898 fi
2899
2900                 ;;
2901         esac
2902 fi
2903
2904 echo "$as_me:2904: checking if you want to ensure bool is consistent with C++" >&5
2905 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2906
2907 # Check whether --with-cxx or --without-cxx was given.
2908 if test "${with_cxx+set}" = set; then
2909   withval="$with_cxx"
2910   cf_with_cxx=$withval
2911 else
2912   cf_with_cxx=yes
2913 fi;
2914 echo "$as_me:2914: result: $cf_with_cxx" >&5
2915 echo "${ECHO_T}$cf_with_cxx" >&6
2916 if test "X$cf_with_cxx" = Xno ; then
2917         CXX=""
2918         GXX=""
2919 else
2920         # with autoconf 2.13, we can change the error to a warning:
2921                 ac_ext=cc
2922 ac_cpp='$CXXCPP $CPPFLAGS'
2923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2926 ac_main_return=return
2927 if test -n "$ac_tool_prefix"; then
2928   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2929   do
2930     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2931 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2932 echo "$as_me:2932: checking for $ac_word" >&5
2933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2934 if test "${ac_cv_prog_CXX+set}" = set; then
2935   echo $ECHO_N "(cached) $ECHO_C" >&6
2936 else
2937   if test -n "$CXX"; then
2938   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2939 else
2940   ac_save_IFS=$IFS; IFS=$ac_path_separator
2941 ac_dummy="$PATH"
2942 for ac_dir in $ac_dummy; do
2943   IFS=$ac_save_IFS
2944   test -z "$ac_dir" && ac_dir=.
2945   $as_executable_p "$ac_dir/$ac_word" || continue
2946 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2947 echo "$as_me:2947: found $ac_dir/$ac_word" >&5
2948 break
2949 done
2950
2951 fi
2952 fi
2953 CXX=$ac_cv_prog_CXX
2954 if test -n "$CXX"; then
2955   echo "$as_me:2955: result: $CXX" >&5
2956 echo "${ECHO_T}$CXX" >&6
2957 else
2958   echo "$as_me:2958: result: no" >&5
2959 echo "${ECHO_T}no" >&6
2960 fi
2961
2962     test -n "$CXX" && break
2963   done
2964 fi
2965 if test -z "$CXX"; then
2966   ac_ct_CXX=$CXX
2967   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2968 do
2969   # Extract the first word of "$ac_prog", so it can be a program name with args.
2970 set dummy $ac_prog; ac_word=$2
2971 echo "$as_me:2971: checking for $ac_word" >&5
2972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2973 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   if test -n "$ac_ct_CXX"; then
2977   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2978 else
2979   ac_save_IFS=$IFS; IFS=$ac_path_separator
2980 ac_dummy="$PATH"
2981 for ac_dir in $ac_dummy; do
2982   IFS=$ac_save_IFS
2983   test -z "$ac_dir" && ac_dir=.
2984   $as_executable_p "$ac_dir/$ac_word" || continue
2985 ac_cv_prog_ac_ct_CXX="$ac_prog"
2986 echo "$as_me:2986: found $ac_dir/$ac_word" >&5
2987 break
2988 done
2989
2990 fi
2991 fi
2992 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2993 if test -n "$ac_ct_CXX"; then
2994   echo "$as_me:2994: result: $ac_ct_CXX" >&5
2995 echo "${ECHO_T}$ac_ct_CXX" >&6
2996 else
2997   echo "$as_me:2997: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999 fi
3000
3001   test -n "$ac_ct_CXX" && break
3002 done
3003 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3004
3005   CXX=$ac_ct_CXX
3006 fi
3007
3008 # Provide some information about the compiler.
3009 echo "$as_me:3009:" \
3010      "checking for C++ compiler version" >&5
3011 ac_compiler=`set X $ac_compile; echo $2`
3012 { (eval echo "$as_me:3012: \"$ac_compiler --version </dev/null >&5\"") >&5
3013   (eval $ac_compiler --version </dev/null >&5) 2>&5
3014   ac_status=$?
3015   echo "$as_me:3015: \$? = $ac_status" >&5
3016   (exit $ac_status); }
3017 { (eval echo "$as_me:3017: \"$ac_compiler -v </dev/null >&5\"") >&5
3018   (eval $ac_compiler -v </dev/null >&5) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }
3022 { (eval echo "$as_me:3022: \"$ac_compiler -V </dev/null >&5\"") >&5
3023   (eval $ac_compiler -V </dev/null >&5) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); }
3027
3028 echo "$as_me:3028: checking whether we are using the GNU C++ compiler" >&5
3029 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3030 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3031   echo $ECHO_N "(cached) $ECHO_C" >&6
3032 else
3033   cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036
3037 int
3038 main (void)
3039 {
3040 #ifndef __GNUC__
3041        choke me
3042 #endif
3043
3044   ;
3045   return 0;
3046 }
3047 _ACEOF
3048 rm -f conftest.$ac_objext
3049 if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
3050   (eval $ac_compile) 2>&5
3051   ac_status=$?
3052   echo "$as_me:3052: \$? = $ac_status" >&5
3053   (exit $ac_status); } &&
3054          { ac_try='test -s conftest.$ac_objext'
3055   { (eval echo "$as_me:3055: \"$ac_try\"") >&5
3056   (eval $ac_try) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); }; }; then
3060   ac_compiler_gnu=yes
3061 else
3062   echo "$as_me: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 ac_compiler_gnu=no
3065 fi
3066 rm -f conftest.$ac_objext conftest.$ac_ext
3067 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3068
3069 fi
3070 echo "$as_me:3070: result: $ac_cv_cxx_compiler_gnu" >&5
3071 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3072 GXX=`test $ac_compiler_gnu = yes && echo yes`
3073 ac_test_CXXFLAGS=${CXXFLAGS+set}
3074 ac_save_CXXFLAGS=$CXXFLAGS
3075 CXXFLAGS="-g"
3076 echo "$as_me:3076: checking whether $CXX accepts -g" >&5
3077 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3078 if test "${ac_cv_prog_cxx_g+set}" = set; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081   cat >conftest.$ac_ext <<_ACEOF
3082 #line 3082 "configure"
3083 #include "confdefs.h"
3084
3085 int
3086 main (void)
3087 {
3088
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 rm -f conftest.$ac_objext
3094 if { (eval echo "$as_me:3094: \"$ac_compile\"") >&5
3095   (eval $ac_compile) 2>&5
3096   ac_status=$?
3097   echo "$as_me:3097: \$? = $ac_status" >&5
3098   (exit $ac_status); } &&
3099          { ac_try='test -s conftest.$ac_objext'
3100   { (eval echo "$as_me:3100: \"$ac_try\"") >&5
3101   (eval $ac_try) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); }; }; then
3105   ac_cv_prog_cxx_g=yes
3106 else
3107   echo "$as_me: failed program was:" >&5
3108 cat conftest.$ac_ext >&5
3109 ac_cv_prog_cxx_g=no
3110 fi
3111 rm -f conftest.$ac_objext conftest.$ac_ext
3112 fi
3113 echo "$as_me:3113: result: $ac_cv_prog_cxx_g" >&5
3114 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3115 if test "$ac_test_CXXFLAGS" = set; then
3116   CXXFLAGS=$ac_save_CXXFLAGS
3117 elif test $ac_cv_prog_cxx_g = yes; then
3118   if test "$GXX" = yes; then
3119     CXXFLAGS="-g -O2"
3120   else
3121     CXXFLAGS="-g"
3122   fi
3123 else
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-O2"
3126   else
3127     CXXFLAGS=
3128   fi
3129 fi
3130 for ac_declaration in \
3131    ''\
3132    '#include <stdlib.h>' \
3133    'extern "C" void std::exit (int) throw (); using std::exit;' \
3134    'extern "C" void std::exit (int); using std::exit;' \
3135    'extern "C" void exit (int) throw ();' \
3136    'extern "C" void exit (int);' \
3137    'void exit (int);'
3138 do
3139   cat >conftest.$ac_ext <<_ACEOF
3140 #line 3140 "configure"
3141 #include "confdefs.h"
3142 #include <stdlib.h>
3143 $ac_declaration
3144 int
3145 main (void)
3146 {
3147 exit (42);
3148   ;
3149   return 0;
3150 }
3151 _ACEOF
3152 rm -f conftest.$ac_objext
3153 if { (eval echo "$as_me:3153: \"$ac_compile\"") >&5
3154   (eval $ac_compile) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); } &&
3158          { ac_try='test -s conftest.$ac_objext'
3159   { (eval echo "$as_me:3159: \"$ac_try\"") >&5
3160   (eval $ac_try) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); }; }; then
3164   :
3165 else
3166   echo "$as_me: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3168 continue
3169 fi
3170 rm -f conftest.$ac_objext conftest.$ac_ext
3171   cat >conftest.$ac_ext <<_ACEOF
3172 #line 3172 "configure"
3173 #include "confdefs.h"
3174 $ac_declaration
3175 int
3176 main (void)
3177 {
3178 exit (42);
3179   ;
3180   return 0;
3181 }
3182 _ACEOF
3183 rm -f conftest.$ac_objext
3184 if { (eval echo "$as_me:3184: \"$ac_compile\"") >&5
3185   (eval $ac_compile) 2>&5
3186   ac_status=$?
3187   echo "$as_me:3187: \$? = $ac_status" >&5
3188   (exit $ac_status); } &&
3189          { ac_try='test -s conftest.$ac_objext'
3190   { (eval echo "$as_me:3190: \"$ac_try\"") >&5
3191   (eval $ac_try) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); }; }; then
3195   break
3196 else
3197   echo "$as_me: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 fi
3200 rm -f conftest.$ac_objext conftest.$ac_ext
3201 done
3202 rm -rf conftest*
3203 if test -n "$ac_declaration"; then
3204   echo '#ifdef __cplusplus' >>confdefs.h
3205   echo $ac_declaration      >>confdefs.h
3206   echo '#endif'             >>confdefs.h
3207 fi
3208
3209 ac_ext=c
3210 ac_cpp='$CPP $CPPFLAGS'
3211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3214 ac_main_return=return
3215
3216         ac_ext=cc
3217 ac_cpp='$CXXCPP $CPPFLAGS'
3218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3221 ac_main_return=return
3222
3223         if test "x$cf_with_cxx" != xno
3224         then
3225                 # Several of the C++ configurations do not work, particularly when
3226                 # cross-compiling (20140913 -TD)
3227                 echo "$as_me:3227: checking if $CXX works" >&5
3228 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3229
3230                 save_CPPFLAGS="$CPPFLAGS"
3231                 eval cf_includedir=${includedir}
3232                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3233
3234 cat >conftest.$ac_ext <<_ACEOF
3235 #line 3235 "configure"
3236 #include "confdefs.h"
3237
3238 #include <stdlib.h>
3239 #include <stdio.h>
3240
3241 int
3242 main (void)
3243 {
3244
3245                 printf("Hello world!\n")
3246
3247   ;
3248   return 0;
3249 }
3250 _ACEOF
3251 rm -f conftest.$ac_objext
3252 if { (eval echo "$as_me:3252: \"$ac_compile\"") >&5
3253   (eval $ac_compile) 2>&5
3254   ac_status=$?
3255   echo "$as_me:3255: \$? = $ac_status" >&5
3256   (exit $ac_status); } &&
3257          { ac_try='test -s conftest.$ac_objext'
3258   { (eval echo "$as_me:3258: \"$ac_try\"") >&5
3259   (eval $ac_try) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); }; }; then
3263   cf_cxx_works=yes
3264 else
3265   echo "$as_me: failed program was:" >&5
3266 cat conftest.$ac_ext >&5
3267 cf_cxx_works=no
3268 fi
3269 rm -f conftest.$ac_objext conftest.$ac_ext
3270                 CPPFLAGS="$save_CPPFLAGS"
3271
3272                 echo "$as_me:3272: result: $cf_cxx_works" >&5
3273 echo "${ECHO_T}$cf_cxx_works" >&6
3274                 if test "x$cf_cxx_works" = xno
3275                 then
3276                         { echo "$as_me:3276: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3277 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3278                         cf_with_cxx=no; CXX=""; GXX="";
3279                 fi
3280         fi
3281         ac_ext=c
3282 ac_cpp='$CPP $CPPFLAGS'
3283 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3284 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3285 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3286 ac_main_return=return
3287
3288         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3289         if test "$CXX" = "g++" ; then
3290                 # Extract the first word of "g++", so it can be a program name with args.
3291 set dummy g++; ac_word=$2
3292 echo "$as_me:3292: checking for $ac_word" >&5
3293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3294 if test "${ac_cv_path_CXX+set}" = set; then
3295   echo $ECHO_N "(cached) $ECHO_C" >&6
3296 else
3297   case $CXX in
3298   [\\/]* | ?:[\\/]*)
3299   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3300   ;;
3301   *)
3302   ac_save_IFS=$IFS; IFS=$ac_path_separator
3303 ac_dummy="$PATH"
3304 for ac_dir in $ac_dummy; do
3305   IFS=$ac_save_IFS
3306   test -z "$ac_dir" && ac_dir=.
3307   if $as_executable_p "$ac_dir/$ac_word"; then
3308    ac_cv_path_CXX="$ac_dir/$ac_word"
3309    echo "$as_me:3309: found $ac_dir/$ac_word" >&5
3310    break
3311 fi
3312 done
3313
3314   ;;
3315 esac
3316 fi
3317 CXX=$ac_cv_path_CXX
3318
3319 if test -n "$CXX"; then
3320   echo "$as_me:3320: result: $CXX" >&5
3321 echo "${ECHO_T}$CXX" >&6
3322 else
3323   echo "$as_me:3323: result: no" >&5
3324 echo "${ECHO_T}no" >&6
3325 fi
3326
3327         fi
3328         case "x$CXX" in
3329         (x|xg++)
3330                 { echo "$as_me:3330: WARNING: You don't have any C++ compiler, too bad" >&5
3331 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3332                 cf_with_cxx=no; CXX=""; GXX="";
3333                 ;;
3334         esac
3335 fi
3336
3337 GXX_VERSION=none
3338 if test "$GXX" = yes; then
3339         echo "$as_me:3339: checking version of ${CXX:-g++}" >&5
3340 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3341         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3342         if test -z "$GXX_VERSION"
3343         then
3344                 GXX_VERSION=unknown
3345                 GXX=no
3346         fi
3347         echo "$as_me:3347: result: $GXX_VERSION" >&5
3348 echo "${ECHO_T}$GXX_VERSION" >&6
3349 fi
3350
3351 case $GXX_VERSION in
3352 (1*|2.[0-6]*)
3353         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3354         # cf_cxx_library=no
3355         { echo "$as_me:3355: WARNING: templates do not work" >&5
3356 echo "$as_me: WARNING: templates do not work" >&2;}
3357         ;;
3358 esac
3359
3360 echo "$as_me:3360: checking if you want to build C++ binding and demo" >&5
3361 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3362
3363 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3364 if test "${with_cxx_binding+set}" = set; then
3365   withval="$with_cxx_binding"
3366   cf_with_cxx_binding=$withval
3367 else
3368   cf_with_cxx_binding=$cf_with_cxx
3369 fi;
3370 echo "$as_me:3370: result: $cf_with_cxx_binding" >&5
3371 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3372
3373 echo "$as_me:3373: checking if you want to build with Ada" >&5
3374 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3375 echo "$as_me:3375: result: $cf_with_ada" >&5
3376 echo "${ECHO_T}$cf_with_ada" >&6
3377
3378 echo "$as_me:3378: checking if you want to install terminal database" >&5
3379 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3380
3381 # Check whether --enable-db-install or --disable-db-install was given.
3382 if test "${enable_db_install+set}" = set; then
3383   enableval="$enable_db_install"
3384   cf_with_db_install=$enableval
3385 else
3386   cf_with_db_install=yes
3387 fi;
3388 echo "$as_me:3388: result: $cf_with_db_install" >&5
3389 echo "${ECHO_T}$cf_with_db_install" >&6
3390
3391 echo "$as_me:3391: checking if you want to install manpages" >&5
3392 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3393
3394 # Check whether --with-manpages or --without-manpages was given.
3395 if test "${with_manpages+set}" = set; then
3396   withval="$with_manpages"
3397   cf_with_manpages=$withval
3398 else
3399   cf_with_manpages=yes
3400 fi;
3401 echo "$as_me:3401: result: $cf_with_manpages" >&5
3402 echo "${ECHO_T}$cf_with_manpages" >&6
3403
3404 echo "$as_me:3404: checking if you want to build programs such as tic" >&5
3405 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3406
3407 # Check whether --with-progs or --without-progs was given.
3408 if test "${with_progs+set}" = set; then
3409   withval="$with_progs"
3410   cf_with_progs=$withval
3411 else
3412   cf_with_progs=yes
3413 fi;
3414 echo "$as_me:3414: result: $cf_with_progs" >&5
3415 echo "${ECHO_T}$cf_with_progs" >&6
3416
3417 if test -f $srcdir/tack/tack.h; then
3418         if test "x$cross_compiling" = xyes ; then
3419                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3420
3421 echo "${as_me:-configure}:3421: testing ignoring tack because we are cross-compiling ..." 1>&5
3422
3423                 cf_with_tack=no
3424         else
3425                 echo "$as_me:3425: checking if you want to build the tack program" >&5
3426 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3427
3428 # Check whether --with-tack or --without-tack was given.
3429 if test "${with_tack+set}" = set; then
3430   withval="$with_tack"
3431   cf_with_tack=$withval
3432 else
3433   cf_with_tack=$cf_with_progs
3434 fi;
3435                 echo "$as_me:3435: result: $cf_with_tack" >&5
3436 echo "${ECHO_T}$cf_with_tack" >&6
3437         fi
3438 else
3439         cf_with_tack=no
3440 fi
3441
3442 echo "$as_me:3442: checking if you want to build test-programs" >&5
3443 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3444
3445 # Check whether --with-tests or --without-tests was given.
3446 if test "${with_tests+set}" = set; then
3447   withval="$with_tests"
3448   cf_with_tests=$withval
3449 else
3450   cf_with_tests=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_tests" >&5
3453 echo "${ECHO_T}$cf_with_tests" >&6
3454
3455 echo "$as_me:3455: checking if you wish to install curses.h" >&5
3456 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3457
3458 # Check whether --with-curses-h or --without-curses-h was given.
3459 if test "${with_curses_h+set}" = set; then
3460   withval="$with_curses_h"
3461   with_curses_h=$withval
3462 else
3463   with_curses_h=yes
3464 fi;
3465 echo "$as_me:3465: result: $with_curses_h" >&5
3466 echo "${ECHO_T}$with_curses_h" >&6
3467
3468 modules_to_build="ncurses"
3469 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3470 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3471 modules_to_build="$modules_to_build panel menu form"
3472
3473 test "$program_prefix" != NONE &&
3474   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3475 # Use a double $ so make ignores it.
3476 test "$program_suffix" != NONE &&
3477   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3478 # Double any \ or $.  echo might interpret backslashes.
3479 # By default was `s,x,x', remove it if useless.
3480 cat <<\_ACEOF >conftest.sed
3481 s/[\\$]/&&/g;s/;s,x,x,$//
3482 _ACEOF
3483 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3484 rm conftest.sed
3485
3486 for ac_prog in mawk gawk nawk awk
3487 do
3488   # Extract the first word of "$ac_prog", so it can be a program name with args.
3489 set dummy $ac_prog; ac_word=$2
3490 echo "$as_me:3490: checking for $ac_word" >&5
3491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3492 if test "${ac_cv_prog_AWK+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495   if test -n "$AWK"; then
3496   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3497 else
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   $as_executable_p "$ac_dir/$ac_word" || continue
3504 ac_cv_prog_AWK="$ac_prog"
3505 echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506 break
3507 done
3508
3509 fi
3510 fi
3511 AWK=$ac_cv_prog_AWK
3512 if test -n "$AWK"; then
3513   echo "$as_me:3513: result: $AWK" >&5
3514 echo "${ECHO_T}$AWK" >&6
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518 fi
3519
3520   test -n "$AWK" && break
3521 done
3522
3523 test -z "$AWK" && { { echo "$as_me:3523: error: No awk program found" >&5
3524 echo "$as_me: error: No awk program found" >&2;}
3525    { (exit 1); exit 1; }; }
3526
3527 echo "$as_me:3527: checking for egrep" >&5
3528 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3529 if test "${ac_cv_prog_egrep+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3533                 then ac_cv_prog_egrep='grep -E'
3534                 else ac_cv_prog_egrep='egrep'
3535         fi
3536 fi
3537 echo "$as_me:3537: result: $ac_cv_prog_egrep" >&5
3538 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3539         EGREP=$ac_cv_prog_egrep
3540
3541         test -z "$EGREP" && { { echo "$as_me:3541: error: No egrep program found" >&5
3542 echo "$as_me: error: No egrep program found" >&2;}
3543    { (exit 1); exit 1; }; }
3544
3545 # Find a good install program.  We prefer a C program (faster),
3546 # so one script is as good as another.  But avoid the broken or
3547 # incompatible versions:
3548 # SysV /etc/install, /usr/sbin/install
3549 # SunOS /usr/etc/install
3550 # IRIX /sbin/install
3551 # AIX /bin/install
3552 # AmigaOS /C/install, which installs bootblocks on floppy discs
3553 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3554 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3555 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3556 # ./install, which can be erroneously created by make from ./install.sh.
3557 echo "$as_me:3557: checking for a BSD compatible install" >&5
3558 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3559 if test -z "$INSTALL"; then
3560 if test "${ac_cv_path_install+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563     ac_save_IFS=$IFS; IFS=$ac_path_separator
3564   for ac_dir in $PATH; do
3565     IFS=$ac_save_IFS
3566     # Account for people who put trailing slashes in PATH elements.
3567     case $ac_dir/ in
3568     / | ./ | .// | /cC/* \
3569     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3570     | /usr/ucb/* ) ;;
3571     *)
3572       # OSF1 and SCO ODT 3.0 have their own names for install.
3573       # Don't use installbsd from OSF since it installs stuff as root
3574       # by default.
3575       for ac_prog in ginstall scoinst install; do
3576         if $as_executable_p "$ac_dir/$ac_prog"; then
3577           if test $ac_prog = install &&
3578             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3579             # AIX install.  It has an incompatible calling convention.
3580             :
3581           elif test $ac_prog = install &&
3582             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3583             # program-specific install script used by HP pwplus--don't use.
3584             :
3585           else
3586             ac_cv_path_install="$ac_dir/$ac_prog -c"
3587             break 2
3588           fi
3589         fi
3590       done
3591       ;;
3592     esac
3593   done
3594
3595 fi
3596   if test "${ac_cv_path_install+set}" = set; then
3597     INSTALL=$ac_cv_path_install
3598   else
3599     # As a last resort, use the slow shell script.  We don't cache a
3600     # path for INSTALL within a source directory, because that will
3601     # break other packages using the cache if that directory is
3602     # removed, or if the path is relative.
3603     INSTALL=$ac_install_sh
3604   fi
3605 fi
3606 echo "$as_me:3606: result: $INSTALL" >&5
3607 echo "${ECHO_T}$INSTALL" >&6
3608
3609 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3610 # It thinks the first close brace ends the variable substitution.
3611 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3612
3613 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3614
3615 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3616
3617 case $INSTALL in
3618 (/*)
3619         ;;
3620 (*)
3621         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3622         test -z "$cf_dir" && cf_dir=.
3623         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3624         ;;
3625 esac
3626
3627 for ac_prog in lint cppcheck splint
3628 do
3629   # Extract the first word of "$ac_prog", so it can be a program name with args.
3630 set dummy $ac_prog; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_LINT+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$LINT"; then
3637   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_LINT="$ac_prog"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650 fi
3651 fi
3652 LINT=$ac_cv_prog_LINT
3653 if test -n "$LINT"; then
3654   echo "$as_me:3654: result: $LINT" >&5
3655 echo "${ECHO_T}$LINT" >&6
3656 else
3657   echo "$as_me:3657: result: no" >&5
3658 echo "${ECHO_T}no" >&6
3659 fi
3660
3661   test -n "$LINT" && break
3662 done
3663
3664 case "x$LINT" in
3665 (xcppcheck|x*/cppcheck)
3666         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3667         ;;
3668 esac
3669
3670 echo "$as_me:3670: checking whether ln -s works" >&5
3671 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3672 LN_S=$as_ln_s
3673 if test "$LN_S" = "ln -s"; then
3674   echo "$as_me:3674: result: yes" >&5
3675 echo "${ECHO_T}yes" >&6
3676 else
3677   echo "$as_me:3677: result: no, using $LN_S" >&5
3678 echo "${ECHO_T}no, using $LN_S" >&6
3679 fi
3680
3681 echo "$as_me:3681: checking if $LN_S -f options work" >&5
3682 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3683
3684 rm -f conf$$.src conf$$dst
3685 echo >conf$$.dst
3686 echo first >conf$$.src
3687 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3688         cf_prog_ln_sf=yes
3689 else
3690         cf_prog_ln_sf=no
3691 fi
3692 rm -f conf$$.dst conf$$src
3693 echo "$as_me:3693: result: $cf_prog_ln_sf" >&5
3694 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3695
3696 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3697
3698 echo "$as_me:3698: checking for long file names" >&5
3699 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3700 if test "${ac_cv_sys_long_file_names+set}" = set; then
3701   echo $ECHO_N "(cached) $ECHO_C" >&6
3702 else
3703   ac_cv_sys_long_file_names=yes
3704 # Test for long file names in all the places we know might matter:
3705 #      .                the current directory, where building will happen
3706 #      $prefix/lib      where we will be installing things
3707 #      $exec_prefix/lib likewise
3708 # eval it to expand exec_prefix.
3709 #      $TMPDIR          if set, where it might want to write temporary files
3710 # if $TMPDIR is not set:
3711 #      /tmp             where it might want to write temporary files
3712 #      /var/tmp         likewise
3713 #      /usr/tmp         likewise
3714 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3715   ac_tmpdirs=$TMPDIR
3716 else
3717   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3718 fi
3719 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3720   test -d $ac_dir || continue
3721   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3722   ac_xdir=$ac_dir/cf$$
3723   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3724   ac_tf1=$ac_xdir/conftest9012345
3725   ac_tf2=$ac_xdir/conftest9012346
3726   (echo 1 >$ac_tf1) 2>/dev/null
3727   (echo 2 >$ac_tf2) 2>/dev/null
3728   ac_val=`cat $ac_tf1 2>/dev/null`
3729   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3730     ac_cv_sys_long_file_names=no
3731     rm -rf $ac_xdir 2>/dev/null
3732     break
3733   fi
3734   rm -rf $ac_xdir 2>/dev/null
3735 done
3736 fi
3737 echo "$as_me:3737: result: $ac_cv_sys_long_file_names" >&5
3738 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3739 if test $ac_cv_sys_long_file_names = yes; then
3740
3741 cat >>confdefs.h <<\EOF
3742 #define HAVE_LONG_FILE_NAMES 1
3743 EOF
3744
3745 fi
3746
3747 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3748 # of package conflict.
3749 cf_config_suffix=
3750
3751 # Check whether --with-config-suffix or --without-config-suffix was given.
3752 if test "${with_config_suffix+set}" = set; then
3753   withval="$with_config_suffix"
3754   case "x$withval" in
3755         (xyes|xno)
3756                 { echo "$as_me:3756: WARNING: expected a value for config-suffix option" >&5
3757 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3758                 ;;
3759         (*)     cf_config_suffix="$withval"
3760                 ;;
3761         esac
3762 fi;
3763
3764 # If we find pkg-config, check if we should install the ".pc" files.
3765
3766 echo "$as_me:3766: checking if you want to use pkg-config" >&5
3767 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3768
3769 # Check whether --with-pkg-config or --without-pkg-config was given.
3770 if test "${with_pkg_config+set}" = set; then
3771   withval="$with_pkg_config"
3772   cf_pkg_config=$withval
3773 else
3774   cf_pkg_config=yes
3775 fi;
3776 echo "$as_me:3776: result: $cf_pkg_config" >&5
3777 echo "${ECHO_T}$cf_pkg_config" >&6
3778
3779 case $cf_pkg_config in
3780 (no)
3781         PKG_CONFIG=none
3782         ;;
3783 (yes)
3784
3785 if test -n "$ac_tool_prefix"; then
3786   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3787 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3788 echo "$as_me:3788: checking for $ac_word" >&5
3789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   case $PKG_CONFIG in
3794   [\\/]* | ?:[\\/]*)
3795   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3796   ;;
3797   *)
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   if $as_executable_p "$ac_dir/$ac_word"; then
3804    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3805    echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806    break
3807 fi
3808 done
3809
3810   ;;
3811 esac
3812 fi
3813 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3814
3815 if test -n "$PKG_CONFIG"; then
3816   echo "$as_me:3816: result: $PKG_CONFIG" >&5
3817 echo "${ECHO_T}$PKG_CONFIG" >&6
3818 else
3819   echo "$as_me:3819: result: no" >&5
3820 echo "${ECHO_T}no" >&6
3821 fi
3822
3823 fi
3824 if test -z "$ac_cv_path_PKG_CONFIG"; then
3825   ac_pt_PKG_CONFIG=$PKG_CONFIG
3826   # Extract the first word of "pkg-config", so it can be a program name with args.
3827 set dummy pkg-config; ac_word=$2
3828 echo "$as_me:3828: checking for $ac_word" >&5
3829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3830 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833   case $ac_pt_PKG_CONFIG in
3834   [\\/]* | ?:[\\/]*)
3835   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3836   ;;
3837   *)
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   if $as_executable_p "$ac_dir/$ac_word"; then
3844    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3845    echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846    break
3847 fi
3848 done
3849
3850   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3851   ;;
3852 esac
3853 fi
3854 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3855
3856 if test -n "$ac_pt_PKG_CONFIG"; then
3857   echo "$as_me:3857: result: $ac_pt_PKG_CONFIG" >&5
3858 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3859 else
3860   echo "$as_me:3860: result: no" >&5
3861 echo "${ECHO_T}no" >&6
3862 fi
3863
3864   PKG_CONFIG=$ac_pt_PKG_CONFIG
3865 else
3866   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3867 fi
3868
3869         ;;
3870 (*)
3871         PKG_CONFIG=$withval
3872         ;;
3873 esac
3874
3875 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3876 if test "$PKG_CONFIG" != none ; then
3877
3878 if test "x$prefix" != xNONE; then
3879         cf_path_syntax="$prefix"
3880 else
3881         cf_path_syntax="$ac_default_prefix"
3882 fi
3883
3884 case ".$PKG_CONFIG" in
3885 (.\$\(*\)*|.\'*\'*)
3886         ;;
3887 (..|./*|.\\*)
3888         ;;
3889 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3890         ;;
3891 (.\${*prefix}*|.\${*dir}*)
3892         eval PKG_CONFIG="$PKG_CONFIG"
3893         case ".$PKG_CONFIG" in
3894         (.NONE/*)
3895                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3896                 ;;
3897         esac
3898         ;;
3899 (.no|.NONE/*)
3900         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3901         ;;
3902 (*)
3903         { { echo "$as_me:3903: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3904 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3905    { (exit 1); exit 1; }; }
3906         ;;
3907 esac
3908
3909 elif test "x$cf_pkg_config" != xno ; then
3910         { echo "$as_me:3910: WARNING: pkg-config is not installed" >&5
3911 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3912 fi
3913
3914 case $PKG_CONFIG in
3915 (no|none|yes)
3916         echo "$as_me:3916: checking for pkg-config library directory" >&5
3917 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3918         ;;
3919 (*)
3920         echo "$as_me:3920: checking for $PKG_CONFIG library directory" >&5
3921 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3922         ;;
3923 esac
3924
3925 PKG_CONFIG_LIBDIR=no
3926
3927 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3928 if test "${with_pkg_config_libdir+set}" = set; then
3929   withval="$with_pkg_config_libdir"
3930   PKG_CONFIG_LIBDIR=$withval
3931 else
3932   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3933 fi;
3934
3935 case x$PKG_CONFIG_LIBDIR in
3936 (x/*)
3937         ;;
3938 (xyes)
3939         # Look for the library directory using the same prefix as the executable
3940         if test "x$PKG_CONFIG" = xnone
3941         then
3942                 cf_path=$prefix
3943         else
3944                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3945         fi
3946
3947         # If you don't like using the default architecture, you have to specify the
3948         # intended library directory and corresponding compiler/linker options.
3949         #
3950         # This case allows for Debian's 2014-flavor of multiarch, along with the
3951         # most common variations before that point.  Some other variants spell the
3952         # directory differently, e.g., "pkg-config", and put it in unusual places.
3953         # pkg-config has always been poorly standardized, which is ironic...
3954         case x`(arch) 2>/dev/null` in
3955         (*64)
3956                 cf_search_path="\
3957                         $cf_path/lib/*64-linux-gnu \
3958                         $cf_path/share \
3959                         $cf_path/lib64 \
3960                         $cf_path/lib32 \
3961                         $cf_path/lib"
3962                 ;;
3963         (*)
3964                 cf_search_path="\
3965                         $cf_path/lib/*-linux-gnu \
3966                         $cf_path/share \
3967                         $cf_path/lib32 \
3968                         $cf_path/lib \
3969                         $cf_path/libdata"
3970                 ;;
3971         esac
3972
3973         test -n "$verbose" && echo "    list..." 1>&6
3974
3975 echo "${as_me:-configure}:3975: testing list... ..." 1>&5
3976
3977         for cf_config in $cf_search_path
3978         do
3979                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing checking $cf_config/pkgconfig ..." 1>&5
3982
3983                 if test -d $cf_config/pkgconfig
3984                 then
3985                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3986                         echo "$as_me:3986: checking done" >&5
3987 echo $ECHO_N "checking done... $ECHO_C" >&6
3988                         break
3989                 fi
3990         done
3991         ;;
3992 (*)
3993         ;;
3994 esac
3995
3996 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3997         echo "$as_me:3997: result: $PKG_CONFIG_LIBDIR" >&5
3998 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3999 fi
4000
4001 if test "x$PKG_CONFIG" != xnone
4002 then
4003         echo "$as_me:4003: checking if we should install .pc files for $PKG_CONFIG" >&5
4004 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4005 else
4006         echo "$as_me:4006: checking if we should install .pc files" >&5
4007 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4008 fi
4009
4010 # Check whether --enable-pc-files or --disable-pc-files was given.
4011 if test "${enable_pc_files+set}" = set; then
4012   enableval="$enable_pc_files"
4013   enable_pc_files=$enableval
4014 else
4015   enable_pc_files=no
4016 fi;
4017 echo "$as_me:4017: result: $enable_pc_files" >&5
4018 echo "${ECHO_T}$enable_pc_files" >&6
4019
4020 if test "x$enable_pc_files" != xno
4021 then
4022         MAKE_PC_FILES=
4023         case "x$PKG_CONFIG_LIBDIR" in
4024         (xno|xyes)
4025                 { echo "$as_me:4025: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4026 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4027                 ;;
4028         (*)
4029
4030 if test "x$prefix" != xNONE; then
4031         cf_path_syntax="$prefix"
4032 else
4033         cf_path_syntax="$ac_default_prefix"
4034 fi
4035
4036 case ".$PKG_CONFIG_LIBDIR" in
4037 (.\$\(*\)*|.\'*\'*)
4038         ;;
4039 (..|./*|.\\*)
4040         ;;
4041 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4042         ;;
4043 (.\${*prefix}*|.\${*dir}*)
4044         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4045         case ".$PKG_CONFIG_LIBDIR" in
4046         (.NONE/*)
4047                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4048                 ;;
4049         esac
4050         ;;
4051 (.no|.NONE/*)
4052         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4053         ;;
4054 (*)
4055         { { echo "$as_me:4055: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4056 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4057    { (exit 1); exit 1; }; }
4058         ;;
4059 esac
4060
4061                 ;;
4062         esac
4063 else
4064         MAKE_PC_FILES="#"
4065 fi
4066
4067 if test -z "$MAKE_PC_FILES"
4068 then
4069         echo "$as_me:4069: checking for suffix to add to pc-files" >&5
4070 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4071
4072 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4073 if test "${with_pc_suffix+set}" = set; then
4074   withval="$with_pc_suffix"
4075   case "x$withval" in
4076         (xyes|xno)
4077                 PC_MODULE_SUFFIX=
4078                 ;;
4079         (*)     PC_MODULE_SUFFIX="$withval"
4080                 ;;
4081         esac
4082 fi;
4083         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4084         echo "$as_me:4084: result: $PC_MODULE_SUFFIX" >&5
4085 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4086         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4087
4088 fi
4089
4090 echo "$as_me:4090: checking if we should assume mixed-case filenames" >&5
4091 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4092
4093 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4094 if test "${enable_mixed_case+set}" = set; then
4095   enableval="$enable_mixed_case"
4096   enable_mixedcase=$enableval
4097 else
4098   enable_mixedcase=auto
4099 fi;
4100 echo "$as_me:4100: result: $enable_mixedcase" >&5
4101 echo "${ECHO_T}$enable_mixedcase" >&6
4102 if test "$enable_mixedcase" = "auto" ; then
4103
4104 echo "$as_me:4104: checking if filesystem supports mixed-case filenames" >&5
4105 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4106 if test "${cf_cv_mixedcase+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110 if test "$cross_compiling" = yes ; then
4111         case $target_alias in
4112         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4113                 cf_cv_mixedcase=no
4114                 ;;
4115         (*)
4116                 cf_cv_mixedcase=yes
4117                 ;;
4118         esac
4119 else
4120         rm -f conftest CONFTEST
4121         echo test >conftest
4122         if test -f CONFTEST ; then
4123                 cf_cv_mixedcase=no
4124         else
4125                 cf_cv_mixedcase=yes
4126         fi
4127         rm -f conftest CONFTEST
4128 fi
4129
4130 fi
4131 echo "$as_me:4131: result: $cf_cv_mixedcase" >&5
4132 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4133 test "$cf_cv_mixedcase" = yes &&
4134 cat >>confdefs.h <<\EOF
4135 #define MIXEDCASE_FILENAMES 1
4136 EOF
4137
4138 else
4139         cf_cv_mixedcase=$enable_mixedcase
4140         if test "x$enable_mixedcase" = "xyes" ; then
4141
4142 cat >>confdefs.h <<\EOF
4143 #define MIXEDCASE_FILENAMES 1
4144 EOF
4145
4146         fi
4147 fi
4148
4149 # do this after mixed-case option (tags/TAGS is not as important as tic).
4150 echo "$as_me:4150: checking whether ${MAKE-make} sets \${MAKE}" >&5
4151 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4152 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4153 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4154   echo $ECHO_N "(cached) $ECHO_C" >&6
4155 else
4156   cat >conftest.make <<\EOF
4157 all:
4158         @echo 'ac_maketemp="${MAKE}"'
4159 EOF
4160 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4161 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4162 if test -n "$ac_maketemp"; then
4163   eval ac_cv_prog_make_${ac_make}_set=yes
4164 else
4165   eval ac_cv_prog_make_${ac_make}_set=no
4166 fi
4167 rm -f conftest.make
4168 fi
4169 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4170   echo "$as_me:4170: result: yes" >&5
4171 echo "${ECHO_T}yes" >&6
4172   SET_MAKE=
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176   SET_MAKE="MAKE=${MAKE-make}"
4177 fi
4178
4179 for ac_prog in exctags ctags
4180 do
4181   # Extract the first word of "$ac_prog", so it can be a program name with args.
4182 set dummy $ac_prog; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_CTAGS+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$CTAGS"; then
4189   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_CTAGS="$ac_prog"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202 fi
4203 fi
4204 CTAGS=$ac_cv_prog_CTAGS
4205 if test -n "$CTAGS"; then
4206   echo "$as_me:4206: result: $CTAGS" >&5
4207 echo "${ECHO_T}$CTAGS" >&6
4208 else
4209   echo "$as_me:4209: result: no" >&5
4210 echo "${ECHO_T}no" >&6
4211 fi
4212
4213   test -n "$CTAGS" && break
4214 done
4215
4216 for ac_prog in exetags etags
4217 do
4218   # Extract the first word of "$ac_prog", so it can be a program name with args.
4219 set dummy $ac_prog; ac_word=$2
4220 echo "$as_me:4220: checking for $ac_word" >&5
4221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222 if test "${ac_cv_prog_ETAGS+set}" = set; then
4223   echo $ECHO_N "(cached) $ECHO_C" >&6
4224 else
4225   if test -n "$ETAGS"; then
4226   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4227 else
4228   ac_save_IFS=$IFS; IFS=$ac_path_separator
4229 ac_dummy="$PATH"
4230 for ac_dir in $ac_dummy; do
4231   IFS=$ac_save_IFS
4232   test -z "$ac_dir" && ac_dir=.
4233   $as_executable_p "$ac_dir/$ac_word" || continue
4234 ac_cv_prog_ETAGS="$ac_prog"
4235 echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236 break
4237 done
4238
4239 fi
4240 fi
4241 ETAGS=$ac_cv_prog_ETAGS
4242 if test -n "$ETAGS"; then
4243   echo "$as_me:4243: result: $ETAGS" >&5
4244 echo "${ECHO_T}$ETAGS" >&6
4245 else
4246   echo "$as_me:4246: result: no" >&5
4247 echo "${ECHO_T}no" >&6
4248 fi
4249
4250   test -n "$ETAGS" && break
4251 done
4252
4253 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4254 set dummy ${CTAGS:-ctags}; ac_word=$2
4255 echo "$as_me:4255: checking for $ac_word" >&5
4256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4257 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4258   echo $ECHO_N "(cached) $ECHO_C" >&6
4259 else
4260   if test -n "$MAKE_LOWER_TAGS"; then
4261   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4262 else
4263   ac_save_IFS=$IFS; IFS=$ac_path_separator
4264 ac_dummy="$PATH"
4265 for ac_dir in $ac_dummy; do
4266   IFS=$ac_save_IFS
4267   test -z "$ac_dir" && ac_dir=.
4268   $as_executable_p "$ac_dir/$ac_word" || continue
4269 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4270 echo "$as_me:4270: found $ac_dir/$ac_word" >&5
4271 break
4272 done
4273
4274   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4275 fi
4276 fi
4277 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4278 if test -n "$MAKE_LOWER_TAGS"; then
4279   echo "$as_me:4279: result: $MAKE_LOWER_TAGS" >&5
4280 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4281 else
4282   echo "$as_me:4282: result: no" >&5
4283 echo "${ECHO_T}no" >&6
4284 fi
4285
4286 if test "$cf_cv_mixedcase" = yes ; then
4287         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4288 set dummy ${ETAGS:-etags}; ac_word=$2
4289 echo "$as_me:4289: checking for $ac_word" >&5
4290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4291 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4292   echo $ECHO_N "(cached) $ECHO_C" >&6
4293 else
4294   if test -n "$MAKE_UPPER_TAGS"; then
4295   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4296 else
4297   ac_save_IFS=$IFS; IFS=$ac_path_separator
4298 ac_dummy="$PATH"
4299 for ac_dir in $ac_dummy; do
4300   IFS=$ac_save_IFS
4301   test -z "$ac_dir" && ac_dir=.
4302   $as_executable_p "$ac_dir/$ac_word" || continue
4303 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4304 echo "$as_me:4304: found $ac_dir/$ac_word" >&5
4305 break
4306 done
4307
4308   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4309 fi
4310 fi
4311 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4312 if test -n "$MAKE_UPPER_TAGS"; then
4313   echo "$as_me:4313: result: $MAKE_UPPER_TAGS" >&5
4314 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4315 else
4316   echo "$as_me:4316: result: no" >&5
4317 echo "${ECHO_T}no" >&6
4318 fi
4319
4320 else
4321         MAKE_UPPER_TAGS=no
4322 fi
4323
4324 if test "$MAKE_UPPER_TAGS" = yes ; then
4325         MAKE_UPPER_TAGS=
4326 else
4327         MAKE_UPPER_TAGS="#"
4328 fi
4329
4330 if test "$MAKE_LOWER_TAGS" = yes ; then
4331         MAKE_LOWER_TAGS=
4332 else
4333         MAKE_LOWER_TAGS="#"
4334 fi
4335
4336 echo "$as_me:4336: checking for makeflags variable" >&5
4337 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4338 if test "${cf_cv_makeflags+set}" = set; then
4339   echo $ECHO_N "(cached) $ECHO_C" >&6
4340 else
4341
4342         cf_cv_makeflags=''
4343         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4344         do
4345                 cat >cf_makeflags.tmp <<CF_EOF
4346 SHELL = $SHELL
4347 all :
4348         @ echo '.$cf_option'
4349 CF_EOF
4350                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4351                 case "$cf_result" in
4352                 (.*k|.*kw)
4353                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4354                         case "$cf_result" in
4355                         (.*CC=*)        cf_cv_makeflags=
4356                                 ;;
4357                         (*)     cf_cv_makeflags=$cf_option
4358                                 ;;
4359                         esac
4360                         break
4361                         ;;
4362                 (.-)
4363                         ;;
4364                 (*)
4365
4366 echo "${as_me:-configure}:4366: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4367
4368                         ;;
4369                 esac
4370         done
4371         rm -f cf_makeflags.tmp
4372
4373 fi
4374 echo "$as_me:4374: result: $cf_cv_makeflags" >&5
4375 echo "${ECHO_T}$cf_cv_makeflags" >&6
4376
4377 if test -n "$ac_tool_prefix"; then
4378   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4379 set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
4383   echo $ECHO_N "(cached) $ECHO_C" >&6
4384 else
4385   if test -n "$RANLIB"; then
4386   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
4395 echo "$as_me:4395: found $ac_dir/$ac_word" >&5
4396 break
4397 done
4398
4399 fi
4400 fi
4401 RANLIB=$ac_cv_prog_RANLIB
4402 if test -n "$RANLIB"; then
4403   echo "$as_me:4403: result: $RANLIB" >&5
4404 echo "${ECHO_T}$RANLIB" >&6
4405 else
4406   echo "$as_me:4406: result: no" >&5
4407 echo "${ECHO_T}no" >&6
4408 fi
4409
4410 fi
4411 if test -z "$ac_cv_prog_RANLIB"; then
4412   ac_ct_RANLIB=$RANLIB
4413   # Extract the first word of "ranlib", so it can be a program name with args.
4414 set dummy ranlib; ac_word=$2
4415 echo "$as_me:4415: checking for $ac_word" >&5
4416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4417 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4418   echo $ECHO_N "(cached) $ECHO_C" >&6
4419 else
4420   if test -n "$ac_ct_RANLIB"; then
4421   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4422 else
4423   ac_save_IFS=$IFS; IFS=$ac_path_separator
4424 ac_dummy="$PATH"
4425 for ac_dir in $ac_dummy; do
4426   IFS=$ac_save_IFS
4427   test -z "$ac_dir" && ac_dir=.
4428   $as_executable_p "$ac_dir/$ac_word" || continue
4429 ac_cv_prog_ac_ct_RANLIB="ranlib"
4430 echo "$as_me:4430: found $ac_dir/$ac_word" >&5
4431 break
4432 done
4433
4434   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4435 fi
4436 fi
4437 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4438 if test -n "$ac_ct_RANLIB"; then
4439   echo "$as_me:4439: result: $ac_ct_RANLIB" >&5
4440 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4441 else
4442   echo "$as_me:4442: result: no" >&5
4443 echo "${ECHO_T}no" >&6
4444 fi
4445
4446   RANLIB=$ac_ct_RANLIB
4447 else
4448   RANLIB="$ac_cv_prog_RANLIB"
4449 fi
4450
4451 if test -n "$ac_tool_prefix"; then
4452   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4453 set dummy ${ac_tool_prefix}ld; 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_LD+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   if test -n "$LD"; then
4460   ac_cv_prog_LD="$LD" # 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_LD="${ac_tool_prefix}ld"
4469 echo "$as_me:4469: found $ac_dir/$ac_word" >&5
4470 break
4471 done
4472
4473 fi
4474 fi
4475 LD=$ac_cv_prog_LD
4476 if test -n "$LD"; then
4477   echo "$as_me:4477: result: $LD" >&5
4478 echo "${ECHO_T}$LD" >&6
4479 else
4480   echo "$as_me:4480: result: no" >&5
4481 echo "${ECHO_T}no" >&6
4482 fi
4483
4484 fi
4485 if test -z "$ac_cv_prog_LD"; then
4486   ac_ct_LD=$LD
4487   # Extract the first word of "ld", so it can be a program name with args.
4488 set dummy ld; ac_word=$2
4489 echo "$as_me:4489: checking for $ac_word" >&5
4490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4491 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4492   echo $ECHO_N "(cached) $ECHO_C" >&6
4493 else
4494   if test -n "$ac_ct_LD"; then
4495   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4496 else
4497   ac_save_IFS=$IFS; IFS=$ac_path_separator
4498 ac_dummy="$PATH"
4499 for ac_dir in $ac_dummy; do
4500   IFS=$ac_save_IFS
4501   test -z "$ac_dir" && ac_dir=.
4502   $as_executable_p "$ac_dir/$ac_word" || continue
4503 ac_cv_prog_ac_ct_LD="ld"
4504 echo "$as_me:4504: found $ac_dir/$ac_word" >&5
4505 break
4506 done
4507
4508   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4509 fi
4510 fi
4511 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4512 if test -n "$ac_ct_LD"; then
4513   echo "$as_me:4513: result: $ac_ct_LD" >&5
4514 echo "${ECHO_T}$ac_ct_LD" >&6
4515 else
4516   echo "$as_me:4516: result: no" >&5
4517 echo "${ECHO_T}no" >&6
4518 fi
4519
4520   LD=$ac_ct_LD
4521 else
4522   LD="$ac_cv_prog_LD"
4523 fi
4524
4525 if test -n "$ac_tool_prefix"; then
4526   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4527 set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then
4531   echo $ECHO_N "(cached) $ECHO_C" >&6
4532 else
4533   if test -n "$AR"; then
4534   ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
4543 echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544 break
4545 done
4546
4547 fi
4548 fi
4549 AR=$ac_cv_prog_AR
4550 if test -n "$AR"; then
4551   echo "$as_me:4551: result: $AR" >&5
4552 echo "${ECHO_T}$AR" >&6
4553 else
4554   echo "$as_me:4554: result: no" >&5
4555 echo "${ECHO_T}no" >&6
4556 fi
4557
4558 fi
4559 if test -z "$ac_cv_prog_AR"; then
4560   ac_ct_AR=$AR
4561   # Extract the first word of "ar", so it can be a program name with args.
4562 set dummy ar; ac_word=$2
4563 echo "$as_me:4563: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_AR"; then
4569   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4570 else
4571   ac_save_IFS=$IFS; IFS=$ac_path_separator
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574   IFS=$ac_save_IFS
4575   test -z "$ac_dir" && ac_dir=.
4576   $as_executable_p "$ac_dir/$ac_word" || continue
4577 ac_cv_prog_ac_ct_AR="ar"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4583 fi
4584 fi
4585 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4586 if test -n "$ac_ct_AR"; then
4587   echo "$as_me:4587: result: $ac_ct_AR" >&5
4588 echo "${ECHO_T}$ac_ct_AR" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   AR=$ac_ct_AR
4595 else
4596   AR="$ac_cv_prog_AR"
4597 fi
4598
4599 if test -n "$ac_tool_prefix"; then
4600   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4601 set dummy ${ac_tool_prefix}nm; 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_NM+set}" = set; then
4605   echo $ECHO_N "(cached) $ECHO_C" >&6
4606 else
4607   if test -n "$NM"; then
4608   ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm"
4617 echo "$as_me:4617: found $ac_dir/$ac_word" >&5
4618 break
4619 done
4620
4621 fi
4622 fi
4623 NM=$ac_cv_prog_NM
4624 if test -n "$NM"; then
4625   echo "$as_me:4625: result: $NM" >&5
4626 echo "${ECHO_T}$NM" >&6
4627 else
4628   echo "$as_me:4628: result: no" >&5
4629 echo "${ECHO_T}no" >&6
4630 fi
4631
4632 fi
4633 if test -z "$ac_cv_prog_NM"; then
4634   ac_ct_NM=$NM
4635   # Extract the first word of "nm", so it can be a program name with args.
4636 set dummy nm; ac_word=$2
4637 echo "$as_me:4637: checking for $ac_word" >&5
4638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4639 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4640   echo $ECHO_N "(cached) $ECHO_C" >&6
4641 else
4642   if test -n "$ac_ct_NM"; then
4643   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4644 else
4645   ac_save_IFS=$IFS; IFS=$ac_path_separator
4646 ac_dummy="$PATH"
4647 for ac_dir in $ac_dummy; do
4648   IFS=$ac_save_IFS
4649   test -z "$ac_dir" && ac_dir=.
4650   $as_executable_p "$ac_dir/$ac_word" || continue
4651 ac_cv_prog_ac_ct_NM="nm"
4652 echo "$as_me:4652: found $ac_dir/$ac_word" >&5
4653 break
4654 done
4655
4656   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4657 fi
4658 fi
4659 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4660 if test -n "$ac_ct_NM"; then
4661   echo "$as_me:4661: result: $ac_ct_NM" >&5
4662 echo "${ECHO_T}$ac_ct_NM" >&6
4663 else
4664   echo "$as_me:4664: result: no" >&5
4665 echo "${ECHO_T}no" >&6
4666 fi
4667
4668   NM=$ac_ct_NM
4669 else
4670   NM="$ac_cv_prog_NM"
4671 fi
4672
4673 if test -n "$ac_tool_prefix"; then
4674   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4675 set dummy ${ac_tool_prefix}ar; ac_word=$2
4676 echo "$as_me:4676: checking for $ac_word" >&5
4677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4678 if test "${ac_cv_prog_AR+set}" = set; then
4679   echo $ECHO_N "(cached) $ECHO_C" >&6
4680 else
4681   if test -n "$AR"; then
4682   ac_cv_prog_AR="$AR" # Let the user override the test.
4683 else
4684   ac_save_IFS=$IFS; IFS=$ac_path_separator
4685 ac_dummy="$PATH"
4686 for ac_dir in $ac_dummy; do
4687   IFS=$ac_save_IFS
4688   test -z "$ac_dir" && ac_dir=.
4689   $as_executable_p "$ac_dir/$ac_word" || continue
4690 ac_cv_prog_AR="${ac_tool_prefix}ar"
4691 echo "$as_me:4691: found $ac_dir/$ac_word" >&5
4692 break
4693 done
4694
4695 fi
4696 fi
4697 AR=$ac_cv_prog_AR
4698 if test -n "$AR"; then
4699   echo "$as_me:4699: result: $AR" >&5
4700 echo "${ECHO_T}$AR" >&6
4701 else
4702   echo "$as_me:4702: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706 fi
4707 if test -z "$ac_cv_prog_AR"; then
4708   ac_ct_AR=$AR
4709   # Extract the first word of "ar", so it can be a program name with args.
4710 set dummy ar; ac_word=$2
4711 echo "$as_me:4711: checking for $ac_word" >&5
4712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   if test -n "$ac_ct_AR"; then
4717   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4718 else
4719   ac_save_IFS=$IFS; IFS=$ac_path_separator
4720 ac_dummy="$PATH"
4721 for ac_dir in $ac_dummy; do
4722   IFS=$ac_save_IFS
4723   test -z "$ac_dir" && ac_dir=.
4724   $as_executable_p "$ac_dir/$ac_word" || continue
4725 ac_cv_prog_ac_ct_AR="ar"
4726 echo "$as_me:4726: found $ac_dir/$ac_word" >&5
4727 break
4728 done
4729
4730   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4731 fi
4732 fi
4733 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4734 if test -n "$ac_ct_AR"; then
4735   echo "$as_me:4735: result: $ac_ct_AR" >&5
4736 echo "${ECHO_T}$ac_ct_AR" >&6
4737 else
4738   echo "$as_me:4738: result: no" >&5
4739 echo "${ECHO_T}no" >&6
4740 fi
4741
4742   AR=$ac_ct_AR
4743 else
4744   AR="$ac_cv_prog_AR"
4745 fi
4746
4747 echo "$as_me:4747: checking for options to update archives" >&5
4748 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4749 if test "${cf_cv_ar_flags+set}" = set; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752
4753         cf_cv_ar_flags=unknown
4754         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4755         do
4756
4757                 # check if $ARFLAGS already contains this choice
4758                 if test "x$ARFLAGS" != "x" ; then
4759                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4760                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4761                                 cf_cv_ar_flags=
4762                                 break
4763                         fi
4764                 fi
4765
4766                 rm -f conftest.$ac_cv_objext
4767                 rm -f conftest.a
4768
4769                 cat >conftest.$ac_ext <<EOF
4770 #line 4770 "configure"
4771 int     testdata[3] = { 123, 456, 789 };
4772 EOF
4773                 if { (eval echo "$as_me:4773: \"$ac_compile\"") >&5
4774   (eval $ac_compile) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); } ; then
4778                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4779                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4780                         if test -f conftest.a ; then
4781                                 cf_cv_ar_flags=$cf_ar_flags
4782                                 break
4783                         fi
4784                 else
4785                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4786
4787 echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5
4788
4789                         break
4790                 fi
4791         done
4792         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4793
4794 fi
4795 echo "$as_me:4795: result: $cf_cv_ar_flags" >&5
4796 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4797
4798 if test -n "$ARFLAGS" ; then
4799         if test -n "$cf_cv_ar_flags" ; then
4800                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4801         fi
4802 else
4803         ARFLAGS=$cf_cv_ar_flags
4804 fi
4805
4806 echo "$as_me:4806: checking if you have specified an install-prefix" >&5
4807 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4808
4809 # Check whether --with-install-prefix or --without-install-prefix was given.
4810 if test "${with_install_prefix+set}" = set; then
4811   withval="$with_install_prefix"
4812   case "x$withval" in
4813         (xyes|xno)
4814                 ;;
4815         (*)     DESTDIR="$withval"
4816                 ;;
4817         esac
4818 fi;
4819 echo "$as_me:4819: result: $DESTDIR" >&5
4820 echo "${ECHO_T}$DESTDIR" >&6
4821
4822 ###############################################################################
4823
4824 # If we're cross-compiling, allow the user to override the tools and their
4825 # options.  The configure script is oriented toward identifying the host
4826 # compiler, etc., but we need a build compiler to generate parts of the source.
4827
4828 if test "$cross_compiling" = yes ; then
4829
4830         # defaults that we might want to override
4831         : ${BUILD_CFLAGS:=''}
4832         : ${BUILD_CPPFLAGS:=''}
4833         : ${BUILD_LDFLAGS:=''}
4834         : ${BUILD_LIBS:=''}
4835         : ${BUILD_EXEEXT:='$x'}
4836         : ${BUILD_OBJEXT:='o'}
4837
4838 # Check whether --with-build-cc or --without-build-cc was given.
4839 if test "${with_build_cc+set}" = set; then
4840   withval="$with_build_cc"
4841   BUILD_CC="$withval"
4842 else
4843   for ac_prog in gcc clang c99 c89 cc cl
4844 do
4845   # Extract the first word of "$ac_prog", so it can be a program name with args.
4846 set dummy $ac_prog; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$BUILD_CC"; then
4853   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_BUILD_CC="$ac_prog"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866 fi
4867 fi
4868 BUILD_CC=$ac_cv_prog_BUILD_CC
4869 if test -n "$BUILD_CC"; then
4870   echo "$as_me:4870: result: $BUILD_CC" >&5
4871 echo "${ECHO_T}$BUILD_CC" >&6
4872 else
4873   echo "$as_me:4873: result: no" >&5
4874 echo "${ECHO_T}no" >&6
4875 fi
4876
4877   test -n "$BUILD_CC" && break
4878 done
4879 test -n "$BUILD_CC" || BUILD_CC="none"
4880
4881 fi;
4882         echo "$as_me:4882: checking for native build C compiler" >&5
4883 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4884         echo "$as_me:4884: result: $BUILD_CC" >&5
4885 echo "${ECHO_T}$BUILD_CC" >&6
4886
4887         echo "$as_me:4887: checking for native build C preprocessor" >&5
4888 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4889
4890 # Check whether --with-build-cpp or --without-build-cpp was given.
4891 if test "${with_build_cpp+set}" = set; then
4892   withval="$with_build_cpp"
4893   BUILD_CPP="$withval"
4894 else
4895   BUILD_CPP='${BUILD_CC} -E'
4896 fi;
4897         echo "$as_me:4897: result: $BUILD_CPP" >&5
4898 echo "${ECHO_T}$BUILD_CPP" >&6
4899
4900         echo "$as_me:4900: checking for native build C flags" >&5
4901 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4902
4903 # Check whether --with-build-cflags or --without-build-cflags was given.
4904 if test "${with_build_cflags+set}" = set; then
4905   withval="$with_build_cflags"
4906   BUILD_CFLAGS="$withval"
4907 fi;
4908         echo "$as_me:4908: result: $BUILD_CFLAGS" >&5
4909 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4910
4911         echo "$as_me:4911: checking for native build C preprocessor-flags" >&5
4912 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4913
4914 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4915 if test "${with_build_cppflags+set}" = set; then
4916   withval="$with_build_cppflags"
4917   BUILD_CPPFLAGS="$withval"
4918 fi;
4919         echo "$as_me:4919: result: $BUILD_CPPFLAGS" >&5
4920 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4921
4922         echo "$as_me:4922: checking for native build linker-flags" >&5
4923 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4924
4925 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4926 if test "${with_build_ldflags+set}" = set; then
4927   withval="$with_build_ldflags"
4928   BUILD_LDFLAGS="$withval"
4929 fi;
4930         echo "$as_me:4930: result: $BUILD_LDFLAGS" >&5
4931 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4932
4933         echo "$as_me:4933: checking for native build linker-libraries" >&5
4934 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4935
4936 # Check whether --with-build-libs or --without-build-libs was given.
4937 if test "${with_build_libs+set}" = set; then
4938   withval="$with_build_libs"
4939   BUILD_LIBS="$withval"
4940 fi;
4941         echo "$as_me:4941: result: $BUILD_LIBS" >&5
4942 echo "${ECHO_T}$BUILD_LIBS" >&6
4943
4944         # this assumes we're on Unix.
4945         BUILD_EXEEXT=
4946         BUILD_OBJEXT=o
4947
4948         : ${BUILD_CC:='${CC}'}
4949
4950         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4951                 { { echo "$as_me:4951: error: Cross-build requires two compilers.
4952 Use --with-build-cc to specify the native compiler." >&5
4953 echo "$as_me: error: Cross-build requires two compilers.
4954 Use --with-build-cc to specify the native compiler." >&2;}
4955    { (exit 1); exit 1; }; }
4956         fi
4957
4958 else
4959         : ${BUILD_CC:='${CC}'}
4960         : ${BUILD_CPP:='${CPP}'}
4961         : ${BUILD_CFLAGS:='${CFLAGS}'}
4962         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4963         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4964         : ${BUILD_LIBS:='${LIBS}'}
4965         : ${BUILD_EXEEXT:='$x'}
4966         : ${BUILD_OBJEXT:='o'}
4967 fi
4968
4969 ###############################################################################
4970
4971 ### Options to allow the user to specify the set of libraries which are used.
4972 ### Use "--without-normal --with-shared" to allow the default model to be
4973 ### shared, for example.
4974 cf_list_models=""
4975
4976 echo "$as_me:4976: checking if libtool -version-number should be used" >&5
4977 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4978
4979 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4980 if test "${enable_libtool_version+set}" = set; then
4981   enableval="$enable_libtool_version"
4982   test "$enableval" != no && enableval=yes
4983         if test "$enableval" != "yes" ; then
4984     cf_libtool_version=no
4985         else
4986                 cf_libtool_version=yes
4987         fi
4988 else
4989   enableval=yes
4990         cf_libtool_version=yes
4991
4992 fi;
4993 echo "$as_me:4993: result: $cf_libtool_version" >&5
4994 echo "${ECHO_T}$cf_libtool_version" >&6
4995
4996 if test "$cf_libtool_version" = yes ; then
4997         LIBTOOL_VERSION="-version-number"
4998 else
4999         LIBTOOL_VERSION="-version-info"
5000         case "x$VERSION" in
5001         (x)
5002                 { echo "$as_me:5002: WARNING: VERSION was not set" >&5
5003 echo "$as_me: WARNING: VERSION was not set" >&2;}
5004                 ;;
5005         (x*.*.*)
5006                 ABI_VERSION="$VERSION"
5007                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5008
5009 echo "${as_me:-configure}:5009: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5010
5011                 ;;
5012         (x*:*:*)
5013                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5014                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5017
5018                 ;;
5019         (*)
5020                 { echo "$as_me:5020: WARNING: unexpected VERSION value: $VERSION" >&5
5021 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5022                 ;;
5023         esac
5024 fi
5025
5026 LIBTOOL=
5027
5028 # common library maintenance symbols that are convenient for libtool scripts:
5029 LIB_CREATE='${AR} -cr'
5030 LIB_OBJECT='${OBJECTS}'
5031 LIB_SUFFIX=.a
5032 LIB_PREP="$RANLIB"
5033
5034 # symbols used to prop libtool up to enable it to determine what it should be
5035 # doing:
5036 LIB_CLEAN=
5037 LIB_COMPILE=
5038 LIB_LINK='${CC}'
5039 LIB_INSTALL=
5040 LIB_UNINSTALL=
5041
5042 echo "$as_me:5042: checking if you want to build libraries with libtool" >&5
5043 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5044
5045 # Check whether --with-libtool or --without-libtool was given.
5046 if test "${with_libtool+set}" = set; then
5047   withval="$with_libtool"
5048   with_libtool=$withval
5049 else
5050   with_libtool=no
5051 fi;
5052 echo "$as_me:5052: result: $with_libtool" >&5
5053 echo "${ECHO_T}$with_libtool" >&6
5054 if test "$with_libtool" != "no"; then
5055
5056         if test "$with_libtool" != "yes" ; then
5057
5058 if test "x$prefix" != xNONE; then
5059         cf_path_syntax="$prefix"
5060 else
5061         cf_path_syntax="$ac_default_prefix"
5062 fi
5063
5064 case ".$with_libtool" in
5065 (.\$\(*\)*|.\'*\'*)
5066         ;;
5067 (..|./*|.\\*)
5068         ;;
5069 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5070         ;;
5071 (.\${*prefix}*|.\${*dir}*)
5072         eval with_libtool="$with_libtool"
5073         case ".$with_libtool" in
5074         (.NONE/*)
5075                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5076                 ;;
5077         esac
5078         ;;
5079 (.no|.NONE/*)
5080         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5081         ;;
5082 (*)
5083         { { echo "$as_me:5083: error: expected a pathname, not \"$with_libtool\"" >&5
5084 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5085    { (exit 1); exit 1; }; }
5086         ;;
5087 esac
5088
5089                 LIBTOOL=$with_libtool
5090         else
5091                 if test -n "$ac_tool_prefix"; then
5092   for ac_prog in libtool glibtool
5093   do
5094     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5095 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5096 echo "$as_me:5096: checking for $ac_word" >&5
5097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5098 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101   if test -n "$LIBTOOL"; then
5102   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5103 else
5104   ac_save_IFS=$IFS; IFS=$ac_path_separator
5105 ac_dummy="$PATH"
5106 for ac_dir in $ac_dummy; do
5107   IFS=$ac_save_IFS
5108   test -z "$ac_dir" && ac_dir=.
5109   $as_executable_p "$ac_dir/$ac_word" || continue
5110 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5111 echo "$as_me:5111: found $ac_dir/$ac_word" >&5
5112 break
5113 done
5114
5115 fi
5116 fi
5117 LIBTOOL=$ac_cv_prog_LIBTOOL
5118 if test -n "$LIBTOOL"; then
5119   echo "$as_me:5119: result: $LIBTOOL" >&5
5120 echo "${ECHO_T}$LIBTOOL" >&6
5121 else
5122   echo "$as_me:5122: result: no" >&5
5123 echo "${ECHO_T}no" >&6
5124 fi
5125
5126     test -n "$LIBTOOL" && break
5127   done
5128 fi
5129 if test -z "$LIBTOOL"; then
5130   ac_ct_LIBTOOL=$LIBTOOL
5131   for ac_prog in libtool glibtool
5132 do
5133   # Extract the first word of "$ac_prog", so it can be a program name with args.
5134 set dummy $ac_prog; ac_word=$2
5135 echo "$as_me:5135: checking for $ac_word" >&5
5136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5137 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5138   echo $ECHO_N "(cached) $ECHO_C" >&6
5139 else
5140   if test -n "$ac_ct_LIBTOOL"; then
5141   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5142 else
5143   ac_save_IFS=$IFS; IFS=$ac_path_separator
5144 ac_dummy="$PATH"
5145 for ac_dir in $ac_dummy; do
5146   IFS=$ac_save_IFS
5147   test -z "$ac_dir" && ac_dir=.
5148   $as_executable_p "$ac_dir/$ac_word" || continue
5149 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5150 echo "$as_me:5150: found $ac_dir/$ac_word" >&5
5151 break
5152 done
5153
5154 fi
5155 fi
5156 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5157 if test -n "$ac_ct_LIBTOOL"; then
5158   echo "$as_me:5158: result: $ac_ct_LIBTOOL" >&5
5159 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5160 else
5161   echo "$as_me:5161: result: no" >&5
5162 echo "${ECHO_T}no" >&6
5163 fi
5164
5165   test -n "$ac_ct_LIBTOOL" && break
5166 done
5167 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5168
5169   LIBTOOL=$ac_ct_LIBTOOL
5170 fi
5171
5172 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5173 then
5174         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.].*//'`
5175 else
5176         cf_cv_libtool_version=
5177 fi
5178 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5179
5180                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5181                 then
5182
5183 unset ac_cv_prog_ac_ct_LIBTOOL
5184 unset ac_ct_LIBTOOL
5185 unset LIBTOOL
5186
5187                         if test -n "$ac_tool_prefix"; then
5188   for ac_prog in glibtool
5189   do
5190     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5191 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5192 echo "$as_me:5192: checking for $ac_word" >&5
5193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5194 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   if test -n "$LIBTOOL"; then
5198   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5199 else
5200   ac_save_IFS=$IFS; IFS=$ac_path_separator
5201 ac_dummy="$PATH"
5202 for ac_dir in $ac_dummy; do
5203   IFS=$ac_save_IFS
5204   test -z "$ac_dir" && ac_dir=.
5205   $as_executable_p "$ac_dir/$ac_word" || continue
5206 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5207 echo "$as_me:5207: found $ac_dir/$ac_word" >&5
5208 break
5209 done
5210
5211 fi
5212 fi
5213 LIBTOOL=$ac_cv_prog_LIBTOOL
5214 if test -n "$LIBTOOL"; then
5215   echo "$as_me:5215: result: $LIBTOOL" >&5
5216 echo "${ECHO_T}$LIBTOOL" >&6
5217 else
5218   echo "$as_me:5218: result: no" >&5
5219 echo "${ECHO_T}no" >&6
5220 fi
5221
5222     test -n "$LIBTOOL" && break
5223   done
5224 fi
5225 if test -z "$LIBTOOL"; then
5226   ac_ct_LIBTOOL=$LIBTOOL
5227   for ac_prog in glibtool
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 echo "$as_me:5231: checking for $ac_word" >&5
5232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5233 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5234   echo $ECHO_N "(cached) $ECHO_C" >&6
5235 else
5236   if test -n "$ac_ct_LIBTOOL"; then
5237   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5238 else
5239   ac_save_IFS=$IFS; IFS=$ac_path_separator
5240 ac_dummy="$PATH"
5241 for ac_dir in $ac_dummy; do
5242   IFS=$ac_save_IFS
5243   test -z "$ac_dir" && ac_dir=.
5244   $as_executable_p "$ac_dir/$ac_word" || continue
5245 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5246 echo "$as_me:5246: found $ac_dir/$ac_word" >&5
5247 break
5248 done
5249
5250 fi
5251 fi
5252 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5253 if test -n "$ac_ct_LIBTOOL"; then
5254   echo "$as_me:5254: result: $ac_ct_LIBTOOL" >&5
5255 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5256 else
5257   echo "$as_me:5257: result: no" >&5
5258 echo "${ECHO_T}no" >&6
5259 fi
5260
5261   test -n "$ac_ct_LIBTOOL" && break
5262 done
5263 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5264
5265   LIBTOOL=$ac_ct_LIBTOOL
5266 fi
5267
5268 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5269 then
5270         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.].*//'`
5271 else
5272         cf_cv_libtool_version=
5273 fi
5274 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5275
5276                 fi
5277         fi
5278         if test -z "$LIBTOOL" ; then
5279                 { { echo "$as_me:5279: error: Cannot find libtool" >&5
5280 echo "$as_me: error: Cannot find libtool" >&2;}
5281    { (exit 1); exit 1; }; }
5282         fi
5283         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5284         LIB_OBJECT='${OBJECTS:.o=.lo}'
5285         LIB_SUFFIX=.la
5286         LIB_CLEAN='${LIBTOOL} --mode=clean'
5287         LIB_COMPILE='${LIBTOOL} --mode=compile'
5288         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5289         LIB_INSTALL='${LIBTOOL} --mode=install'
5290         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5291         LIB_PREP=:
5292
5293 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5294 then
5295         echo "$as_me:5295: checking version of $LIBTOOL" >&5
5296 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5297
5298 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5299 then
5300         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.].*//'`
5301 else
5302         cf_cv_libtool_version=
5303 fi
5304 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5305
5306         echo "$as_me:5306: result: $cf_cv_libtool_version" >&5
5307 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5308         if test -z "$cf_cv_libtool_version" ; then
5309                 { { echo "$as_me:5309: error: This is not GNU libtool" >&5
5310 echo "$as_me: error: This is not GNU libtool" >&2;}
5311    { (exit 1); exit 1; }; }
5312         fi
5313 else
5314         { { echo "$as_me:5314: error: GNU libtool has not been found" >&5
5315 echo "$as_me: error: GNU libtool has not been found" >&2;}
5316    { (exit 1); exit 1; }; }
5317 fi
5318
5319         # special hack to add -no-undefined (which libtool should do for itself)
5320         LT_UNDEF=
5321         case "$cf_cv_system_name" in
5322         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5323                 LT_UNDEF=-no-undefined
5324                 ;;
5325         esac
5326
5327         # special hack to add --tag option for C++ compiler
5328         case $cf_cv_libtool_version in
5329         (1.[5-9]*|[2-9].[0-9.a-z]*)
5330                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5331                 LIBTOOL="$LIBTOOL --tag=CC"
5332                 ;;
5333         (*)
5334                 LIBTOOL_CXX="$LIBTOOL"
5335                 ;;
5336         esac
5337 else
5338         LIBTOOL=""
5339         LIBTOOL_CXX=""
5340 fi
5341
5342 test -z "$LIBTOOL" && ECHO_LT=
5343
5344 if test "$with_libtool" != "no" ; then
5345
5346 cf_list_models="$cf_list_models libtool"
5347
5348 else
5349
5350 echo "$as_me:5350: checking if you want to build shared libraries" >&5
5351 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5352
5353 # Check whether --with-shared or --without-shared was given.
5354 if test "${with_shared+set}" = set; then
5355   withval="$with_shared"
5356   with_shared=$withval
5357 else
5358   with_shared=no
5359 fi;
5360 echo "$as_me:5360: result: $with_shared" >&5
5361 echo "${ECHO_T}$with_shared" >&6
5362 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5363
5364 echo "$as_me:5364: checking if you want to build static libraries" >&5
5365 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5366
5367 # Check whether --with-normal or --without-normal was given.
5368 if test "${with_normal+set}" = set; then
5369   withval="$with_normal"
5370   with_normal=$withval
5371 else
5372   with_normal=yes
5373 fi;
5374 echo "$as_me:5374: result: $with_normal" >&5
5375 echo "${ECHO_T}$with_normal" >&6
5376 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5377
5378 echo "$as_me:5378: checking if you want to build debug libraries" >&5
5379 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5380
5381 # Check whether --with-debug or --without-debug was given.
5382 if test "${with_debug+set}" = set; then
5383   withval="$with_debug"
5384   with_debug=$withval
5385 else
5386   with_debug=yes
5387 fi;
5388 echo "$as_me:5388: result: $with_debug" >&5
5389 echo "${ECHO_T}$with_debug" >&6
5390 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5391
5392 echo "$as_me:5392: checking if you want to build profiling libraries" >&5
5393 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5394
5395 # Check whether --with-profile or --without-profile was given.
5396 if test "${with_profile+set}" = set; then
5397   withval="$with_profile"
5398   with_profile=$withval
5399 else
5400   with_profile=no
5401 fi;
5402 echo "$as_me:5402: result: $with_profile" >&5
5403 echo "${ECHO_T}$with_profile" >&6
5404 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5405
5406 fi
5407
5408 if test "X$cf_with_cxx_binding" != Xno; then
5409 if test "x$with_shared" = "xyes"; then
5410 echo "$as_me:5410: checking if you want to build C++ shared libraries" >&5
5411 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5412
5413 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5414 if test "${with_cxx_shared+set}" = set; then
5415   withval="$with_cxx_shared"
5416   with_shared_cxx=$withval
5417 else
5418   with_shared_cxx=no
5419 fi;
5420 echo "$as_me:5420: result: $with_shared_cxx" >&5
5421 echo "${ECHO_T}$with_shared_cxx" >&6
5422 fi
5423 fi
5424
5425 ###############################################################################
5426
5427 echo "$as_me:5427: checking for specified models" >&5
5428 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5429 test -z "$cf_list_models" && cf_list_models=normal
5430 test "$with_libtool" != "no" && cf_list_models=libtool
5431 echo "$as_me:5431: result: $cf_list_models" >&5
5432 echo "${ECHO_T}$cf_list_models" >&6
5433
5434 ### Use the first model as the default, and save its suffix for use in building
5435 ### up test-applications.
5436 echo "$as_me:5436: checking for default model" >&5
5437 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5438 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5439 echo "$as_me:5439: result: $DFT_LWR_MODEL" >&5
5440 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5441
5442 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5443
5444 TICS_NAME=tic
5445
5446 TINFO_NAME=tinfo
5447
5448 LIB_NAME=ncurses
5449
5450 LIB_DIR=../lib
5451 LIB_2ND=../../lib
5452
5453 echo "$as_me:5453: checking if you want to have a library-prefix" >&5
5454 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5455
5456 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5457 if test "${with_lib_prefix+set}" = set; then
5458   withval="$with_lib_prefix"
5459   with_lib_prefix=$withval
5460 else
5461   with_lib_prefix=auto
5462 fi;
5463 echo "$as_me:5463: result: $with_lib_prefix" >&5
5464 echo "${ECHO_T}$with_lib_prefix" >&6
5465
5466 if test $with_lib_prefix = auto
5467 then
5468
5469         case $cf_cv_system_name in
5470         (OS/2*|os2*)
5471                 if test "$DFT_LWR_MODEL" = libtool; then
5472                         LIB_PREFIX='lib'
5473                 else
5474                         LIB_PREFIX=''
5475                 fi
5476                 ;;
5477         (*)     LIB_PREFIX='lib'
5478                 ;;
5479         esac
5480 cf_prefix=$LIB_PREFIX
5481
5482 elif test $with_lib_prefix = no
5483 then
5484         LIB_PREFIX=
5485 else
5486         LIB_PREFIX=$with_lib_prefix
5487 fi
5488
5489 LIB_SUFFIX=
5490
5491         echo "$as_me:5491: checking for PATH separator" >&5
5492 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5493         case $cf_cv_system_name in
5494         (os2*)  PATH_SEPARATOR=';'  ;;
5495         (*)     ${PATH_SEPARATOR:=':'}  ;;
5496         esac
5497
5498         echo "$as_me:5498: result: $PATH_SEPARATOR" >&5
5499 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5500
5501 ###############################################################################
5502
5503 echo "$as_me:5503: checking if you want to build a separate terminfo library" >&5
5504 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5505
5506 # Check whether --with-termlib or --without-termlib was given.
5507 if test "${with_termlib+set}" = set; then
5508   withval="$with_termlib"
5509   with_termlib=$withval
5510 else
5511   with_termlib=no
5512 fi;
5513 echo "$as_me:5513: result: $with_termlib" >&5
5514 echo "${ECHO_T}$with_termlib" >&6
5515
5516 echo "$as_me:5516: checking if you want to build a separate tic library" >&5
5517 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5518
5519 # Check whether --with-ticlib or --without-ticlib was given.
5520 if test "${with_ticlib+set}" = set; then
5521   withval="$with_ticlib"
5522   with_ticlib=$withval
5523 else
5524   with_ticlib=no
5525 fi;
5526 echo "$as_me:5526: result: $with_ticlib" >&5
5527 echo "${ECHO_T}$with_ticlib" >&6
5528
5529 if test X"$CC_G_OPT" = X"" ; then
5530         CC_G_OPT='-g'
5531         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5532 fi
5533
5534 if test X"$CXX_G_OPT" = X"" ; then
5535         CXX_G_OPT='-g'
5536         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5537 fi
5538
5539 echo "$as_me:5539: checking for default loader flags" >&5
5540 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5541 case $DFT_LWR_MODEL in
5542 (libtool) LD_MODEL=''   ;;
5543 (normal)  LD_MODEL=''   ;;
5544 (debug)   LD_MODEL=$CC_G_OPT ;;
5545 (profile) LD_MODEL='-pg';;
5546 (shared)  LD_MODEL=''   ;;
5547 esac
5548 echo "$as_me:5548: result: $LD_MODEL" >&5
5549 echo "${ECHO_T}$LD_MODEL" >&6
5550
5551 case $DFT_LWR_MODEL in
5552 (shared)
5553
5554 echo "$as_me:5554: checking if rpath option should be used" >&5
5555 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5556
5557 # Check whether --enable-rpath or --disable-rpath was given.
5558 if test "${enable_rpath+set}" = set; then
5559   enableval="$enable_rpath"
5560   cf_cv_enable_rpath=$enableval
5561 else
5562   cf_cv_enable_rpath=no
5563 fi;
5564 echo "$as_me:5564: result: $cf_cv_enable_rpath" >&5
5565 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5566
5567 echo "$as_me:5567: checking if shared libraries should be relinked during install" >&5
5568 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5569
5570 # Check whether --enable-relink or --disable-relink was given.
5571 if test "${enable_relink+set}" = set; then
5572   enableval="$enable_relink"
5573   cf_cv_do_relink=$enableval
5574 else
5575   cf_cv_do_relink=yes
5576 fi;
5577 echo "$as_me:5577: result: $cf_cv_do_relink" >&5
5578 echo "${ECHO_T}$cf_cv_do_relink" >&6
5579         ;;
5580 esac
5581
5582 # we will build libraries one-level down.
5583 rel_builddir=..
5584
5585 LD_RPATH_OPT=
5586 if test "x$cf_cv_enable_rpath" != xno
5587 then
5588         echo "$as_me:5588: checking for an rpath option" >&5
5589 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5590         case $cf_cv_system_name in
5591         (irix*)
5592                 if test "$GCC" = yes; then
5593                         LD_RPATH_OPT="-Wl,-rpath,"
5594                 else
5595                         LD_RPATH_OPT="-rpath "
5596                 fi
5597                 ;;
5598         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5599                 LD_RPATH_OPT="-Wl,-rpath,"
5600                 ;;
5601         (openbsd[2-9].*|mirbsd*)
5602                 LD_RPATH_OPT="-Wl,-rpath,"
5603                 ;;
5604         (dragonfly*)
5605                 LD_RPATH_OPT="-rpath "
5606                 ;;
5607         (netbsd*)
5608                 LD_RPATH_OPT="-Wl,-rpath,"
5609                 ;;
5610         (osf*|mls+*)
5611                 LD_RPATH_OPT="-rpath "
5612                 ;;
5613         (solaris2*)
5614                 LD_RPATH_OPT="-R"
5615                 ;;
5616         (*)
5617                 ;;
5618         esac
5619         echo "$as_me:5619: result: $LD_RPATH_OPT" >&5
5620 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5621
5622         case "x$LD_RPATH_OPT" in
5623         (x-R*)
5624                 echo "$as_me:5624: checking if we need a space after rpath option" >&5
5625 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5626                 cf_save_LIBS="$LIBS"
5627
5628 cf_add_libs="$LIBS"
5629 # reverse order
5630 cf_add_0lib=
5631 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5632 # filter duplicates
5633 for cf_add_1lib in $cf_add_0lib; do
5634         for cf_add_2lib in $cf_add_libs; do
5635                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5636                         cf_add_1lib=
5637                         break
5638                 fi
5639         done
5640         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5641 done
5642 LIBS="$cf_add_libs"
5643
5644                 cat >conftest.$ac_ext <<_ACEOF
5645 #line 5645 "configure"
5646 #include "confdefs.h"
5647
5648 int
5649 main (void)
5650 {
5651
5652   ;
5653   return 0;
5654 }
5655 _ACEOF
5656 rm -f conftest.$ac_objext conftest$ac_exeext
5657 if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658   (eval $ac_link) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); } &&
5662          { ac_try='test -s conftest$ac_exeext'
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   cf_rpath_space=no
5669 else
5670   echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 cf_rpath_space=yes
5673 fi
5674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675                 LIBS="$cf_save_LIBS"
5676                 echo "$as_me:5676: result: $cf_rpath_space" >&5
5677 echo "${ECHO_T}$cf_rpath_space" >&6
5678                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5679                 ;;
5680         esac
5681 fi
5682
5683         RM_SHARED_OPTS=
5684         LOCAL_LDFLAGS=
5685         LOCAL_LDFLAGS2=
5686         LD_SHARED_OPTS=
5687         INSTALL_LIB="-m 644"
5688         : ${rel_builddir:=.}
5689
5690         shlibdir=$libdir
5691
5692         MAKE_DLLS="#"
5693
5694         cf_cv_do_symlinks=no
5695         cf_ld_rpath_opt=
5696         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5697
5698         echo "$as_me:5698: checking if release/abi version should be used for shared libs" >&5
5699 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5700
5701 # Check whether --with-shlib-version or --without-shlib-version was given.
5702 if test "${with_shlib_version+set}" = set; then
5703   withval="$with_shlib_version"
5704   test -z "$withval" && withval=auto
5705         case $withval in
5706         (yes)
5707                 cf_cv_shlib_version=auto
5708                 ;;
5709         (rel|abi|auto)
5710                 cf_cv_shlib_version=$withval
5711                 ;;
5712         (*)
5713                 echo "$as_me:5713: result: $withval" >&5
5714 echo "${ECHO_T}$withval" >&6
5715                 { { echo "$as_me:5715: error: option value must be one of: rel, abi, or auto" >&5
5716 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5717    { (exit 1); exit 1; }; }
5718                 ;;
5719         esac
5720
5721 else
5722   cf_cv_shlib_version=auto
5723 fi;
5724         echo "$as_me:5724: result: $cf_cv_shlib_version" >&5
5725 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5726
5727         cf_cv_rm_so_locs=no
5728         cf_try_cflags=
5729
5730         # Some less-capable ports of gcc support only -fpic
5731         CC_SHARED_OPTS=
5732
5733         cf_try_fPIC=no
5734         if test "$GCC" = yes
5735         then
5736                 cf_try_fPIC=yes
5737         else
5738                 case $cf_cv_system_name in
5739                 (*linux*)       # e.g., PGI compiler
5740                         cf_try_fPIC=yes
5741                         ;;
5742                 esac
5743         fi
5744
5745         if test "$cf_try_fPIC" = yes
5746         then
5747                 echo "$as_me:5747: checking which $CC option to use" >&5
5748 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5749                 cf_save_CFLAGS="$CFLAGS"
5750                 for CC_SHARED_OPTS in -fPIC -fpic ''
5751                 do
5752                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5753                         cat >conftest.$ac_ext <<_ACEOF
5754 #line 5754 "configure"
5755 #include "confdefs.h"
5756 #include <stdio.h>
5757 int
5758 main (void)
5759 {
5760 int x = 1
5761   ;
5762   return 0;
5763 }
5764 _ACEOF
5765 rm -f conftest.$ac_objext
5766 if { (eval echo "$as_me:5766: \"$ac_compile\"") >&5
5767   (eval $ac_compile) 2>&5
5768   ac_status=$?
5769   echo "$as_me:5769: \$? = $ac_status" >&5
5770   (exit $ac_status); } &&
5771          { ac_try='test -s conftest.$ac_objext'
5772   { (eval echo "$as_me:5772: \"$ac_try\"") >&5
5773   (eval $ac_try) 2>&5
5774   ac_status=$?
5775   echo "$as_me:5775: \$? = $ac_status" >&5
5776   (exit $ac_status); }; }; then
5777   break
5778 else
5779   echo "$as_me: failed program was:" >&5
5780 cat conftest.$ac_ext >&5
5781 fi
5782 rm -f conftest.$ac_objext conftest.$ac_ext
5783                 done
5784                 echo "$as_me:5784: result: $CC_SHARED_OPTS" >&5
5785 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5786                 CFLAGS="$cf_save_CFLAGS"
5787         fi
5788
5789         cf_cv_shlib_version_infix=no
5790
5791         case $cf_cv_system_name in
5792         (aix4.3-9*|aix[5-7]*)
5793                 if test "$GCC" = yes; then
5794                         CC_SHARED_OPTS='-Wl,-brtl'
5795                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5796                 else
5797                         CC_SHARED_OPTS='-brtl'
5798                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5799                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5800                 fi
5801                 ;;
5802         (beos*)
5803                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5804                 ;;
5805         (cygwin*)
5806                 CC_SHARED_OPTS=
5807                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5808                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5809                 cf_cv_shlib_version=cygdll
5810                 cf_cv_shlib_version_infix=cygdll
5811                 shlibdir=$bindir
5812                 MAKE_DLLS=
5813                 cat >mk_shared_lib.sh <<-CF_EOF
5814                 #!$SHELL
5815                 SHARED_LIB=\$1
5816                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5817                 shift
5818                 cat <<-EOF
5819                 Linking shared library
5820                 ** SHARED_LIB \$SHARED_LIB
5821                 ** IMPORT_LIB \$IMPORT_LIB
5822 EOF
5823                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5824 CF_EOF
5825                 chmod +x mk_shared_lib.sh
5826                 ;;
5827         (msys*)
5828                 CC_SHARED_OPTS=
5829                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5830                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5831                 cf_cv_shlib_version=msysdll
5832                 cf_cv_shlib_version_infix=msysdll
5833                 shlibdir=$bindir
5834                 MAKE_DLLS=
5835                 cat >mk_shared_lib.sh <<-CF_EOF
5836                 #!$SHELL
5837                 SHARED_LIB=\$1
5838                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5839                 shift
5840                 cat <<-EOF
5841                 Linking shared library
5842                 ** SHARED_LIB \$SHARED_LIB
5843                 ** IMPORT_LIB \$IMPORT_LIB
5844 EOF
5845                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5846 CF_EOF
5847                 chmod +x mk_shared_lib.sh
5848                 ;;
5849         (darwin*)
5850                 cf_try_cflags="no-cpp-precomp"
5851                 CC_SHARED_OPTS="-dynamic"
5852                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5853                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5854                 cf_cv_shlib_version_infix=yes
5855                 echo "$as_me:5855: checking if ld -search_paths_first works" >&5
5856 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5857 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5858   echo $ECHO_N "(cached) $ECHO_C" >&6
5859 else
5860
5861                         cf_save_LDFLAGS=$LDFLAGS
5862                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5863                         cat >conftest.$ac_ext <<_ACEOF
5864 #line 5864 "configure"
5865 #include "confdefs.h"
5866
5867 int
5868 main (void)
5869 {
5870 int i;
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876 if { (eval echo "$as_me:5876: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest$ac_exeext'
5882   { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:5885: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   cf_cv_ldflags_search_paths_first=yes
5888 else
5889   echo "$as_me: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5891 cf_cv_ldflags_search_paths_first=no
5892 fi
5893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5894                                 LDFLAGS=$cf_save_LDFLAGS
5895 fi
5896 echo "$as_me:5896: result: $cf_cv_ldflags_search_paths_first" >&5
5897 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5898                 if test $cf_cv_ldflags_search_paths_first = yes; then
5899                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5900                 fi
5901                 ;;
5902         (hpux[7-8]*)
5903                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5904                 if test "$GCC" != yes; then
5905                         CC_SHARED_OPTS='+Z'
5906                 fi
5907                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5908                 INSTALL_LIB="-m 555"
5909                 ;;
5910         (hpux*)
5911                 # (tested with gcc 2.7.2 -- I don't have c89)
5912                 if test "$GCC" = yes; then
5913                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5914                 else
5915                         CC_SHARED_OPTS='+Z'
5916                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5917                 fi
5918                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5919                 # HP-UX shared libraries must be executable, and should be
5920                 # readonly to exploit a quirk in the memory manager.
5921                 INSTALL_LIB="-m 555"
5922                 ;;
5923         (interix*)
5924                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5925                 if test "$cf_cv_shlib_version" = rel; then
5926                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5927                 else
5928                         cf_shared_soname='`basename $@`'
5929                 fi
5930                 CC_SHARED_OPTS=
5931                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5932                 ;;
5933         (irix*)
5934                 if test "$cf_cv_enable_rpath" = yes ; then
5935                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5936                 fi
5937                 # tested with IRIX 5.2 and 'cc'.
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5941                 else
5942                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5943                 fi
5944                 cf_cv_rm_so_locs=yes
5945                 ;;
5946         (linux*|gnu*|k*bsd*-gnu)
5947                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5948                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5963                 ;;
5964         (mingw*msvc*)
5965                 cf_cv_shlib_version=mingw
5966                 cf_cv_shlib_version_infix=mingw
5967                 shlibdir=$bindir
5968                 MAKE_DLLS=
5969                 if test "$DFT_LWR_MODEL" = "shared" ; then
5970                         LOCAL_LDFLAGS="-link -dll"
5971                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5972                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
5973                 fi
5974                 CC_SHARED_OPTS=
5975                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh  ${LD} ${CFLAGS}'
5976                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5977                 cat >mk_shared_lib.sh <<-CF_EOF
5978                 #!$SHELL
5979                 SHARED_LIB=\
5980                 IMPORT_LIB=\`echo "\" | sed -e 's/0-9*\.dll$\.dll.a/'\`
5981                 shift
5982                 my_ld=\
5983                 shift
5984                 cat <<-EOF
5985                 Linking shared library
5986                 ** SHARED LIB \$SHARED_LIB
5987                 ** IMPORT_LIB \$IMPORT_LIB
5988 EOF
5989                 args=\$(echo \ | sed -E "s#-l(\w*)#lib\1.a#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
5990                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
5991                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
5992 CF_EOF
5993                 chmod +x mk_shared_lib.sh
5994                 ;;
5995         (mingw*)
5996                 cf_cv_shlib_version=mingw
5997                 cf_cv_shlib_version_infix=mingw
5998                 shlibdir=$bindir
5999                 MAKE_DLLS=
6000                 if test "$DFT_LWR_MODEL" = "shared" ; then
6001                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6002                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6003                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6004                 fi
6005                 CC_SHARED_OPTS=
6006                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6007                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6008                 cat >mk_shared_lib.sh <<-CF_EOF
6009                 #!$SHELL
6010                 SHARED_LIB=\$1
6011                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6012                 shift
6013                 cat <<-EOF
6014                 Linking shared library
6015                 ** SHARED_LIB \$SHARED_LIB
6016                 ** IMPORT_LIB \$IMPORT_LIB
6017 EOF
6018                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6019 CF_EOF
6020                 chmod +x mk_shared_lib.sh
6021                 ;;
6022         (openbsd[2-9].*|mirbsd*)
6023                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6024                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6025                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6026                 fi
6027                 if test "$cf_cv_enable_rpath" = yes ; then
6028                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6029                 fi
6030                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6031
6032         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6033         if test "$cf_cv_shlib_version" = rel; then
6034                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6035         else
6036                 cf_cv_shared_soname='`basename $@`'
6037         fi
6038
6039                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6040                 ;;
6041         (nto-qnx*|openbsd*|freebsd[12].*)
6042                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6043                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6044                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6045                 ;;
6046         (dragonfly*|freebsd*)
6047                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6048                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6049                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6050                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6051                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6052                 fi
6053
6054         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6055         if test "$cf_cv_shlib_version" = rel; then
6056                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6057         else
6058                 cf_cv_shared_soname='`basename $@`'
6059         fi
6060
6061                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6062                 ;;
6063         (netbsd*)
6064                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6065                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6066                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6067                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6068                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6069                         if test "$cf_cv_shlib_version" = auto; then
6070                         if test -f /usr/libexec/ld.elf_so; then
6071                                 cf_cv_shlib_version=abi
6072                         else
6073                                 cf_cv_shlib_version=rel
6074                         fi
6075                         fi
6076
6077         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6078         if test "$cf_cv_shlib_version" = rel; then
6079                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6080         else
6081                 cf_cv_shared_soname='`basename $@`'
6082         fi
6083
6084                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6085                 else
6086                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6087                 fi
6088                 ;;
6089         (osf*|mls+*)
6090                 # tested with OSF/1 V3.2 and 'cc'
6091                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6092                 # link with shared libs).
6093                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6094                 case $host_os in
6095                 (osf4*)
6096                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6097                         ;;
6098                 esac
6099                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6100                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6101                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6102                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6103                 fi
6104                 cf_cv_rm_so_locs=yes
6105                 ;;
6106         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6107                 # tested with osr5.0.5
6108                 if test "$GCC" != yes; then
6109                         CC_SHARED_OPTS='-belf -KPIC'
6110                 fi
6111                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6112                 if test "$cf_cv_enable_rpath" = yes ; then
6113                         # only way is to set LD_RUN_PATH but no switch for it
6114                         RUN_PATH=$libdir
6115                 fi
6116                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6117                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6118                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6119                 ;;
6120         (sunos4*)
6121                 # tested with SunOS 4.1.1 and gcc 2.7.0
6122                 if test "$GCC" != yes; then
6123                         CC_SHARED_OPTS='-KPIC'
6124                 fi
6125                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6126                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6127                 ;;
6128         (solaris2*)
6129                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6130                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6131                 if test "$DFT_LWR_MODEL" = "shared" ; then
6132                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6133                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6134                 fi
6135                 if test "$cf_cv_enable_rpath" = yes ; then
6136                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6137                 fi
6138
6139         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6140         if test "$cf_cv_shlib_version" = rel; then
6141                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6142         else
6143                 cf_cv_shared_soname='`basename $@`'
6144         fi
6145
6146                 if test "$GCC" != yes; then
6147                         cf_save_CFLAGS="$CFLAGS"
6148                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6149                         do
6150                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6151                                 cat >conftest.$ac_ext <<_ACEOF
6152 #line 6152 "configure"
6153 #include "confdefs.h"
6154 #include <stdio.h>
6155 int
6156 main (void)
6157 {
6158 printf("Hello\n");
6159   ;
6160   return 0;
6161 }
6162 _ACEOF
6163 rm -f conftest.$ac_objext
6164 if { (eval echo "$as_me:6164: \"$ac_compile\"") >&5
6165   (eval $ac_compile) 2>&5
6166   ac_status=$?
6167   echo "$as_me:6167: \$? = $ac_status" >&5
6168   (exit $ac_status); } &&
6169          { ac_try='test -s conftest.$ac_objext'
6170   { (eval echo "$as_me:6170: \"$ac_try\"") >&5
6171   (eval $ac_try) 2>&5
6172   ac_status=$?
6173   echo "$as_me:6173: \$? = $ac_status" >&5
6174   (exit $ac_status); }; }; then
6175   break
6176 else
6177   echo "$as_me: failed program was:" >&5
6178 cat conftest.$ac_ext >&5
6179 fi
6180 rm -f conftest.$ac_objext conftest.$ac_ext
6181                         done
6182                         CFLAGS="$cf_save_CFLAGS"
6183                         CC_SHARED_OPTS=$cf_shared_opts
6184                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6185                 else
6186                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6187                 fi
6188                 ;;
6189         (sysv5uw7*|unix_sv*)
6190                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6191                 if test "$GCC" != yes; then
6192                         CC_SHARED_OPTS='-KPIC'
6193                 fi
6194                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6195                 ;;
6196         (*)
6197                 CC_SHARED_OPTS='unknown'
6198                 MK_SHARED_LIB='echo unknown'
6199                 ;;
6200         esac
6201
6202         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6203         case "$cf_cv_shlib_version" in
6204         (rel|abi)
6205                 case "$MK_SHARED_LIB" in
6206                 (*'-o $@')
6207                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6208                         ;;
6209                 (*)
6210                         { echo "$as_me:6210: WARNING: ignored --with-shlib-version" >&5
6211 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6212                         ;;
6213                 esac
6214                 ;;
6215         esac
6216
6217         if test -n "$cf_try_cflags"
6218         then
6219 cat > conftest.$ac_ext <<EOF
6220 #line 6220 "${as_me:-configure}"
6221 #include <stdio.h>
6222 int main(int argc, char *argv[])
6223 {
6224         printf("hello\n");
6225         return (argv[argc-1] == 0) ;
6226 }
6227 EOF
6228                 cf_save_CFLAGS="$CFLAGS"
6229                 for cf_opt in $cf_try_cflags
6230                 do
6231                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6232                         echo "$as_me:6232: checking if CFLAGS option -$cf_opt works" >&5
6233 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6234                         if { (eval echo "$as_me:6234: \"$ac_compile\"") >&5
6235   (eval $ac_compile) 2>&5
6236   ac_status=$?
6237   echo "$as_me:6237: \$? = $ac_status" >&5
6238   (exit $ac_status); }; then
6239                                 echo "$as_me:6239: result: yes" >&5
6240 echo "${ECHO_T}yes" >&6
6241                                 cf_save_CFLAGS="$CFLAGS"
6242                         else
6243                                 echo "$as_me:6243: result: no" >&5
6244 echo "${ECHO_T}no" >&6
6245                         fi
6246                 done
6247                 CFLAGS="$cf_save_CFLAGS"
6248         fi
6249
6250         # RPATH_LIST is a colon-separated list of directories
6251         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6252         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6253
6254         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6255
6256         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6257
6258 echo "${as_me:-configure}:6258: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6259
6260         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6261
6262 echo "${as_me:-configure}:6262: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6263
6264 for model in $cf_list_models; do
6265         case $model in
6266         (libtool)
6267
6268 echo "$as_me:6268: checking for additional libtool options" >&5
6269 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6270
6271 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6272 if test "${with_libtool_opts+set}" = set; then
6273   withval="$with_libtool_opts"
6274   with_libtool_opts=$withval
6275 else
6276   with_libtool_opts=no
6277 fi;
6278 echo "$as_me:6278: result: $with_libtool_opts" >&5
6279 echo "${ECHO_T}$with_libtool_opts" >&6
6280
6281 case .$with_libtool_opts in
6282 (.yes|.no|.)
6283         ;;
6284 (*)
6285         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6286         ;;
6287 esac
6288
6289 echo "$as_me:6289: checking if exported-symbols file should be used" >&5
6290 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6291
6292 # Check whether --with-export-syms or --without-export-syms was given.
6293 if test "${with_export_syms+set}" = set; then
6294   withval="$with_export_syms"
6295   with_export_syms=$withval
6296 else
6297   with_export_syms=no
6298 fi;
6299 if test "x$with_export_syms" = xyes
6300 then
6301         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6302
6303 fi
6304 echo "$as_me:6304: result: $with_export_syms" >&5
6305 echo "${ECHO_T}$with_export_syms" >&6
6306 if test "x$with_export_syms" != xno
6307 then
6308         EXPORT_SYMS="-export-symbols $with_export_syms"
6309
6310 fi
6311
6312                 ;;
6313         (shared)
6314                 if test "$CC_SHARED_OPTS" = "unknown"; then
6315                         { { echo "$as_me:6315: error: Shared libraries are not supported in this version" >&5
6316 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6317    { (exit 1); exit 1; }; }
6318                 fi
6319                 # workaround for inept transition to PIE vs PIC...
6320                 echo "$as_me:6320: checking if current CFLAGS link properly" >&5
6321 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6322                 cat >conftest.$ac_ext <<_ACEOF
6323 #line 6323 "configure"
6324 #include "confdefs.h"
6325 #include <stdio.h>
6326 int
6327 main (void)
6328 {
6329 printf("Hello work\n");
6330   ;
6331   return 0;
6332 }
6333 _ACEOF
6334 rm -f conftest.$ac_objext conftest$ac_exeext
6335 if { (eval echo "$as_me:6335: \"$ac_link\"") >&5
6336   (eval $ac_link) 2>&5
6337   ac_status=$?
6338   echo "$as_me:6338: \$? = $ac_status" >&5
6339   (exit $ac_status); } &&
6340          { ac_try='test -s conftest$ac_exeext'
6341   { (eval echo "$as_me:6341: \"$ac_try\"") >&5
6342   (eval $ac_try) 2>&5
6343   ac_status=$?
6344   echo "$as_me:6344: \$? = $ac_status" >&5
6345   (exit $ac_status); }; }; then
6346   cf_cflags_work=yes
6347 else
6348   echo "$as_me: failed program was:" >&5
6349 cat conftest.$ac_ext >&5
6350 cf_cflags_work=no
6351 fi
6352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6353                 echo "$as_me:6353: result: $cf_cflags_work" >&5
6354 echo "${ECHO_T}$cf_cflags_work" >&6
6355                 if test "$cf_cflags_work" = no
6356                 then
6357                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6358
6359 echo "${as_me:-configure}:6359: testing try to work around by appending shared-options ..." 1>&5
6360
6361                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6362                 fi
6363
6364 echo "$as_me:6364: checking if versioned-symbols file should be used" >&5
6365 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6366
6367 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6368 if test "${with_versioned_syms+set}" = set; then
6369   withval="$with_versioned_syms"
6370   with_versioned_syms=$withval
6371 else
6372   with_versioned_syms=no
6373 fi;
6374 case "x$with_versioned_syms" in
6375 (xyes)
6376         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6377
6378         ;;
6379 (xno)
6380         ;;
6381 (x/*)
6382         test -f "$with_versioned_syms" || { { echo "$as_me:6382: error: expected a filename: $with_versioned_syms" >&5
6383 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6384    { (exit 1); exit 1; }; }
6385         ;;
6386 (*)
6387         test -f "$with_versioned_syms" || { { echo "$as_me:6387: error: expected a filename: $with_versioned_syms" >&5
6388 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6389    { (exit 1); exit 1; }; }
6390         with_versioned_syms=`pwd`/"$with_versioned_syms"
6391         ;;
6392 esac
6393 echo "$as_me:6393: result: $with_versioned_syms" >&5
6394 echo "${ECHO_T}$with_versioned_syms" >&6
6395
6396 RESULTING_SYMS=
6397 VERSIONED_SYMS=
6398 WILDCARD_SYMS=
6399
6400 if test "x$with_versioned_syms" != xno
6401 then
6402         RESULTING_SYMS=$with_versioned_syms
6403         case "x$MK_SHARED_LIB" in
6404         (*-Wl,*)
6405                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6406                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6407                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6408
6409 echo "${as_me:-configure}:6409: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6410
6411                 ;;
6412         (*-dy\ *)
6413                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6414                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6415                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6416
6417 echo "${as_me:-configure}:6417: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6418
6419                 ;;
6420         (*)
6421                 { echo "$as_me:6421: WARNING: this system does not support versioned-symbols" >&5
6422 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6423                 ;;
6424         esac
6425
6426         # Linux ld can selectively override scope, e.g., of symbols beginning with
6427         # "_" by first declaring some as global, and then using a wildcard to
6428         # declare the others as local.  Some other loaders cannot do this.  Check
6429         # by constructing a (very) simple shared library and inspecting its
6430         # symbols.
6431         if test "x$VERSIONED_SYMS" != "x"
6432         then
6433                 echo "$as_me:6433: checking if wildcards can be used to selectively omit symbols" >&5
6434 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6435                 WILDCARD_SYMS=no
6436
6437                 # make sources
6438                 rm -f conftest.*
6439
6440                 cat >conftest.ver <<EOF
6441 module_1.0 {
6442 global:
6443         globalf1;
6444 local:
6445         localf1;
6446 };
6447 module_2.0 {
6448 global:
6449         globalf2;
6450 local:
6451         localf2;
6452         _*;
6453 } module_1.0;
6454 submodule_1.0 {
6455 global:
6456         subglobalf1;
6457         _ismissing;
6458 local:
6459         sublocalf1;
6460 };
6461 submodule_2.0 {
6462 global:
6463         subglobalf2;
6464 local:
6465         sublocalf2;
6466         _*;
6467 } submodule_1.0;
6468 EOF
6469                 cat >conftest.$ac_ext <<EOF
6470 #line 6470 "configure"
6471 int     _ismissing(void) { return 1; }
6472 int     _localf1(void) { return 1; }
6473 int     _localf2(void) { return 2; }
6474 int     globalf1(void) { return 1; }
6475 int     globalf2(void) { return 2; }
6476 int     _sublocalf1(void) { return 1; }
6477 int     _sublocalf2(void) { return 2; }
6478 int     subglobalf1(void) { return 1; }
6479 int     subglobalf2(void) { return 2; }
6480 EOF
6481                 cat >conftest.mk <<EOF
6482 CC=${CC}
6483 CFLAGS=${CFLAGS}
6484 CPPFLAGS=${CPPFLAGS}
6485 LDFLAGS=${LDFLAGS}
6486 LIBS=${LIBS}
6487 VERSIONED_SYMS=${VERSIONED_SYMS}
6488 RESULTING_SYMS=conftest.ver
6489 MK_SHARED_LIB=${MK_SHARED_LIB}
6490 conftest.so: conftest.$ac_cv_objext
6491                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6492 EOF
6493
6494                 # compile source, make library
6495                 if make -f conftest.mk 2>&5 >/dev/null
6496                 then
6497                         # test for missing symbol in either Data or Text section
6498                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6499                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6500                 fi
6501                 echo "$as_me:6501: result: $WILDCARD_SYMS" >&5
6502 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6503                 rm -f conftest.*
6504         fi
6505 fi
6506
6507                 ;;
6508         esac
6509 done
6510
6511 ### Checks for special libraries, must be done up-front.
6512 SHLIB_LIST=""
6513
6514 echo "$as_me:6514: checking if you want to link with the GPM mouse library" >&5
6515 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6516
6517 # Check whether --with-gpm or --without-gpm was given.
6518 if test "${with_gpm+set}" = set; then
6519   withval="$with_gpm"
6520   with_gpm=$withval
6521 else
6522   with_gpm=maybe
6523 fi;
6524 echo "$as_me:6524: result: $with_gpm" >&5
6525 echo "${ECHO_T}$with_gpm" >&6
6526
6527 if test "$with_gpm" != no ; then
6528         echo "$as_me:6528: checking for gpm.h" >&5
6529 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6530 if test "${ac_cv_header_gpm_h+set}" = set; then
6531   echo $ECHO_N "(cached) $ECHO_C" >&6
6532 else
6533   cat >conftest.$ac_ext <<_ACEOF
6534 #line 6534 "configure"
6535 #include "confdefs.h"
6536 #include <gpm.h>
6537 _ACEOF
6538 if { (eval echo "$as_me:6538: \"$ac_cpp conftest.$ac_ext\"") >&5
6539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6540   ac_status=$?
6541   egrep -v '^ *\+' conftest.er1 >conftest.err
6542   rm -f conftest.er1
6543   cat conftest.err >&5
6544   echo "$as_me:6544: \$? = $ac_status" >&5
6545   (exit $ac_status); } >/dev/null; then
6546   if test -s conftest.err; then
6547     ac_cpp_err=$ac_c_preproc_warn_flag
6548   else
6549     ac_cpp_err=
6550   fi
6551 else
6552   ac_cpp_err=yes
6553 fi
6554 if test -z "$ac_cpp_err"; then
6555   ac_cv_header_gpm_h=yes
6556 else
6557   echo "$as_me: failed program was:" >&5
6558   cat conftest.$ac_ext >&5
6559   ac_cv_header_gpm_h=no
6560 fi
6561 rm -f conftest.err conftest.$ac_ext
6562 fi
6563 echo "$as_me:6563: result: $ac_cv_header_gpm_h" >&5
6564 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6565 if test $ac_cv_header_gpm_h = yes; then
6566
6567 cat >>confdefs.h <<\EOF
6568 #define HAVE_GPM_H 1
6569 EOF
6570
6571                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6572                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6573
6574 echo "${as_me:-configure}:6574: testing assuming we really have GPM library ..." 1>&5
6575
6576 cat >>confdefs.h <<\EOF
6577 #define HAVE_LIBGPM 1
6578 EOF
6579
6580                         with_gpm=yes
6581                 else
6582                         echo "$as_me:6582: checking for Gpm_Open in -lgpm" >&5
6583 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6584 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6585   echo $ECHO_N "(cached) $ECHO_C" >&6
6586 else
6587   ac_check_lib_save_LIBS=$LIBS
6588 LIBS="-lgpm  $LIBS"
6589 cat >conftest.$ac_ext <<_ACEOF
6590 #line 6590 "configure"
6591 #include "confdefs.h"
6592
6593 /* Override any gcc2 internal prototype to avoid an error.  */
6594 #ifdef __cplusplus
6595 extern "C"
6596 #endif
6597 /* We use char because int might match the return type of a gcc2
6598    builtin and then its argument prototype would still apply.  */
6599 char Gpm_Open ();
6600 int
6601 main (void)
6602 {
6603 Gpm_Open ();
6604   ;
6605   return 0;
6606 }
6607 _ACEOF
6608 rm -f conftest.$ac_objext conftest$ac_exeext
6609 if { (eval echo "$as_me:6609: \"$ac_link\"") >&5
6610   (eval $ac_link) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit $ac_status); } &&
6614          { ac_try='test -s conftest$ac_exeext'
6615   { (eval echo "$as_me:6615: \"$ac_try\"") >&5
6616   (eval $ac_try) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit $ac_status); }; }; then
6620   ac_cv_lib_gpm_Gpm_Open=yes
6621 else
6622   echo "$as_me: failed program was:" >&5
6623 cat conftest.$ac_ext >&5
6624 ac_cv_lib_gpm_Gpm_Open=no
6625 fi
6626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6627 LIBS=$ac_check_lib_save_LIBS
6628 fi
6629 echo "$as_me:6629: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6630 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6631 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6632   with_gpm=yes
6633 else
6634
6635                                 if test "$with_gpm" = maybe; then
6636                                         { echo "$as_me:6636: WARNING: Cannot link with GPM library" >&5
6637 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6638                                         with_gpm=no
6639                                 else
6640                                         { { echo "$as_me:6640: error: Cannot link with GPM library" >&5
6641 echo "$as_me: error: Cannot link with GPM library" >&2;}
6642    { (exit 1); exit 1; }; }
6643                                 fi
6644
6645 fi
6646
6647                 fi
6648
6649 else
6650
6651                 test "$with_gpm" != maybe && { echo "$as_me:6651: WARNING: Cannot find GPM header" >&5
6652 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6653                 with_gpm=no
6654
6655 fi
6656
6657 fi
6658
6659 if test "$with_gpm" != no ; then
6660         echo "$as_me:6660: checking if you want to load GPM dynamically" >&5
6661 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6662
6663 # Check whether --with-dlsym or --without-dlsym was given.
6664 if test "${with_dlsym+set}" = set; then
6665   withval="$with_dlsym"
6666   with_dlsym=$withval
6667 else
6668   with_dlsym=yes
6669 fi;
6670         echo "$as_me:6670: result: $with_dlsym" >&5
6671 echo "${ECHO_T}$with_dlsym" >&6
6672         if test "x$with_dlsym" = xyes ; then
6673
6674 cf_have_dlsym=no
6675 echo "$as_me:6675: checking for dlsym" >&5
6676 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6677 if test "${ac_cv_func_dlsym+set}" = set; then
6678   echo $ECHO_N "(cached) $ECHO_C" >&6
6679 else
6680   cat >conftest.$ac_ext <<_ACEOF
6681 #line 6681 "configure"
6682 #include "confdefs.h"
6683 #define dlsym autoconf_temporary
6684 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6685 #undef dlsym
6686
6687 #ifdef __cplusplus
6688 extern "C"
6689 #endif
6690
6691 /* We use char because int might match the return type of a gcc2
6692    builtin and then its argument prototype would still apply.  */
6693 char dlsym (void);
6694
6695 int
6696 main (void)
6697 {
6698
6699 /* The GNU C library defines stubs for functions which it implements
6700     to always fail with ENOSYS.  Some functions are actually named
6701     something starting with __ and the normal name is an alias.  */
6702 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6703 #error found stub for dlsym
6704 #endif
6705
6706         return dlsym ();
6707   ;
6708   return 0;
6709 }
6710 _ACEOF
6711 rm -f conftest.$ac_objext conftest$ac_exeext
6712 if { (eval echo "$as_me:6712: \"$ac_link\"") >&5
6713   (eval $ac_link) 2>&5
6714   ac_status=$?
6715   echo "$as_me:6715: \$? = $ac_status" >&5
6716   (exit $ac_status); } &&
6717          { ac_try='test -s conftest$ac_exeext'
6718   { (eval echo "$as_me:6718: \"$ac_try\"") >&5
6719   (eval $ac_try) 2>&5
6720   ac_status=$?
6721   echo "$as_me:6721: \$? = $ac_status" >&5
6722   (exit $ac_status); }; }; then
6723   ac_cv_func_dlsym=yes
6724 else
6725   echo "$as_me: failed program was:" >&5
6726 cat conftest.$ac_ext >&5
6727 ac_cv_func_dlsym=no
6728 fi
6729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6730 fi
6731 echo "$as_me:6731: result: $ac_cv_func_dlsym" >&5
6732 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6733 if test $ac_cv_func_dlsym = yes; then
6734   cf_have_dlsym=yes
6735 else
6736
6737 cf_have_libdl=no
6738 echo "$as_me:6738: checking for dlsym in -ldl" >&5
6739 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6740 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6741   echo $ECHO_N "(cached) $ECHO_C" >&6
6742 else
6743   ac_check_lib_save_LIBS=$LIBS
6744 LIBS="-ldl  $LIBS"
6745 cat >conftest.$ac_ext <<_ACEOF
6746 #line 6746 "configure"
6747 #include "confdefs.h"
6748
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 #ifdef __cplusplus
6751 extern "C"
6752 #endif
6753 /* We use char because int might match the return type of a gcc2
6754    builtin and then its argument prototype would still apply.  */
6755 char dlsym ();
6756 int
6757 main (void)
6758 {
6759 dlsym ();
6760   ;
6761   return 0;
6762 }
6763 _ACEOF
6764 rm -f conftest.$ac_objext conftest$ac_exeext
6765 if { (eval echo "$as_me:6765: \"$ac_link\"") >&5
6766   (eval $ac_link) 2>&5
6767   ac_status=$?
6768   echo "$as_me:6768: \$? = $ac_status" >&5
6769   (exit $ac_status); } &&
6770          { ac_try='test -s conftest$ac_exeext'
6771   { (eval echo "$as_me:6771: \"$ac_try\"") >&5
6772   (eval $ac_try) 2>&5
6773   ac_status=$?
6774   echo "$as_me:6774: \$? = $ac_status" >&5
6775   (exit $ac_status); }; }; then
6776   ac_cv_lib_dl_dlsym=yes
6777 else
6778   echo "$as_me: failed program was:" >&5
6779 cat conftest.$ac_ext >&5
6780 ac_cv_lib_dl_dlsym=no
6781 fi
6782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6783 LIBS=$ac_check_lib_save_LIBS
6784 fi
6785 echo "$as_me:6785: result: $ac_cv_lib_dl_dlsym" >&5
6786 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6787 if test $ac_cv_lib_dl_dlsym = yes; then
6788
6789         cf_have_dlsym=yes
6790         cf_have_libdl=yes
6791 fi
6792
6793 fi
6794
6795 if test "$cf_have_dlsym" = yes ; then
6796         test "$cf_have_libdl" = yes && {
6797 cf_add_libs="$LIBS"
6798 # reverse order
6799 cf_add_0lib=
6800 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6801 # filter duplicates
6802 for cf_add_1lib in $cf_add_0lib; do
6803         for cf_add_2lib in $cf_add_libs; do
6804                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6805                         cf_add_1lib=
6806                         break
6807                 fi
6808         done
6809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6810 done
6811 LIBS="$cf_add_libs"
6812  }
6813
6814         echo "$as_me:6814: checking whether able to link to dl*() functions" >&5
6815 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6816         cat >conftest.$ac_ext <<_ACEOF
6817 #line 6817 "configure"
6818 #include "confdefs.h"
6819 #include <dlfcn.h>
6820 int
6821 main (void)
6822 {
6823
6824                 void *obj;
6825                 if ((obj = dlopen("filename", 0)) != 0) {
6826                         if (dlsym(obj, "symbolname") == 0) {
6827                         dlclose(obj);
6828                         }
6829                 }
6830   ;
6831   return 0;
6832 }
6833 _ACEOF
6834 rm -f conftest.$ac_objext conftest$ac_exeext
6835 if { (eval echo "$as_me:6835: \"$ac_link\"") >&5
6836   (eval $ac_link) 2>&5
6837   ac_status=$?
6838   echo "$as_me:6838: \$? = $ac_status" >&5
6839   (exit $ac_status); } &&
6840          { ac_try='test -s conftest$ac_exeext'
6841   { (eval echo "$as_me:6841: \"$ac_try\"") >&5
6842   (eval $ac_try) 2>&5
6843   ac_status=$?
6844   echo "$as_me:6844: \$? = $ac_status" >&5
6845   (exit $ac_status); }; }; then
6846
6847 cat >>confdefs.h <<\EOF
6848 #define HAVE_LIBDL 1
6849 EOF
6850
6851 else
6852   echo "$as_me: failed program was:" >&5
6853 cat conftest.$ac_ext >&5
6854
6855                 { { echo "$as_me:6855: error: Cannot link test program for libdl" >&5
6856 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6857    { (exit 1); exit 1; }; }
6858 fi
6859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6860         echo "$as_me:6860: result: ok" >&5
6861 echo "${ECHO_T}ok" >&6
6862 else
6863         { { echo "$as_me:6863: error: Cannot find dlsym function" >&5
6864 echo "$as_me: error: Cannot find dlsym function" >&2;}
6865    { (exit 1); exit 1; }; }
6866 fi
6867
6868                 if test "x$with_gpm" != xyes ; then
6869                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6870
6871 echo "${as_me:-configure}:6871: testing assuming soname for gpm is $with_gpm ..." 1>&5
6872
6873                         cf_cv_gpm_soname="$with_gpm"
6874                 else
6875
6876 echo "$as_me:6876: checking for soname of gpm library" >&5
6877 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6878 if test "${cf_cv_gpm_soname+set}" = set; then
6879   echo $ECHO_N "(cached) $ECHO_C" >&6
6880 else
6881
6882 cf_cv_gpm_soname=unknown
6883 if test "$cross_compiling" != yes ; then
6884 cat >conftest.$ac_ext <<CF_EOF
6885 #include <gpm.h>
6886 int main(void)
6887 {
6888 if (Gpm_Open(0,0)) Gpm_Close();
6889         ${cf_cv_main_return:-return}(0);
6890 }
6891 CF_EOF
6892 cf_save_LIBS="$LIBS"
6893
6894 cf_add_libs="$LIBS"
6895 # reverse order
6896 cf_add_0lib=
6897 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6898 # filter duplicates
6899 for cf_add_1lib in $cf_add_0lib; do
6900         for cf_add_2lib in $cf_add_libs; do
6901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6902                         cf_add_1lib=
6903                         break
6904                 fi
6905         done
6906         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6907 done
6908 LIBS="$cf_add_libs"
6909
6910         if { (eval echo "$as_me:6910: \"$ac_compile\"") >&5
6911   (eval $ac_compile) 2>&5
6912   ac_status=$?
6913   echo "$as_me:6913: \$? = $ac_status" >&5
6914   (exit $ac_status); } ; then
6915                 if { (eval echo "$as_me:6915: \"$ac_link\"") >&5
6916   (eval $ac_link) 2>&5
6917   ac_status=$?
6918   echo "$as_me:6918: \$? = $ac_status" >&5
6919   (exit $ac_status); } ; then
6920                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6921                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6922                 fi
6923         fi
6924 rm -rf conftest*
6925 LIBS="$cf_save_LIBS"
6926 fi
6927
6928 fi
6929 echo "$as_me:6929: result: $cf_cv_gpm_soname" >&5
6930 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6931
6932                 fi
6933                 test "$cf_cv_gpm_soname" != "unknown" &&
6934 cat >>confdefs.h <<EOF
6935 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6936 EOF
6937
6938                 SHLIB_LIST="-ldl $SHLIB_LIST"
6939
6940 cf_add_libs="$PRIVATE_LIBS"
6941 # reverse order
6942 cf_add_0lib=
6943 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6944 # filter duplicates
6945 for cf_add_1lib in $cf_add_0lib; do
6946         for cf_add_2lib in $cf_add_libs; do
6947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6948                         cf_add_1lib=
6949                         break
6950                 fi
6951         done
6952         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6953 done
6954 PRIVATE_LIBS="$cf_add_libs"
6955
6956         else
6957                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6958
6959 cf_add_libs="$TEST_LIBS"
6960 # reverse order
6961 cf_add_0lib=
6962 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6963 # filter duplicates
6964 for cf_add_1lib in $cf_add_0lib; do
6965         for cf_add_2lib in $cf_add_libs; do
6966                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6967                         cf_add_1lib=
6968                         break
6969                 fi
6970         done
6971         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6972 done
6973 TEST_LIBS="$cf_add_libs"
6974
6975 cf_add_libs="$PRIVATE_LIBS"
6976 # reverse order
6977 cf_add_0lib=
6978 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6979 # filter duplicates
6980 for cf_add_1lib in $cf_add_0lib; do
6981         for cf_add_2lib in $cf_add_libs; do
6982                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6983                         cf_add_1lib=
6984                         break
6985                 fi
6986         done
6987         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6988 done
6989 PRIVATE_LIBS="$cf_add_libs"
6990
6991         fi
6992
6993 cat >>confdefs.h <<\EOF
6994 #define HAVE_LIBGPM 1
6995 EOF
6996
6997 echo "$as_me:6997: checking for Gpm_Wgetch in -lgpm" >&5
6998 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6999 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7000   echo $ECHO_N "(cached) $ECHO_C" >&6
7001 else
7002   ac_check_lib_save_LIBS=$LIBS
7003 LIBS="-lgpm  $LIBS"
7004 cat >conftest.$ac_ext <<_ACEOF
7005 #line 7005 "configure"
7006 #include "confdefs.h"
7007
7008 /* Override any gcc2 internal prototype to avoid an error.  */
7009 #ifdef __cplusplus
7010 extern "C"
7011 #endif
7012 /* We use char because int might match the return type of a gcc2
7013    builtin and then its argument prototype would still apply.  */
7014 char Gpm_Wgetch ();
7015 int
7016 main (void)
7017 {
7018 Gpm_Wgetch ();
7019   ;
7020   return 0;
7021 }
7022 _ACEOF
7023 rm -f conftest.$ac_objext conftest$ac_exeext
7024 if { (eval echo "$as_me:7024: \"$ac_link\"") >&5
7025   (eval $ac_link) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); } &&
7029          { ac_try='test -s conftest$ac_exeext'
7030   { (eval echo "$as_me:7030: \"$ac_try\"") >&5
7031   (eval $ac_try) 2>&5
7032   ac_status=$?
7033   echo "$as_me:7033: \$? = $ac_status" >&5
7034   (exit $ac_status); }; }; then
7035   ac_cv_lib_gpm_Gpm_Wgetch=yes
7036 else
7037   echo "$as_me: failed program was:" >&5
7038 cat conftest.$ac_ext >&5
7039 ac_cv_lib_gpm_Gpm_Wgetch=no
7040 fi
7041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7042 LIBS=$ac_check_lib_save_LIBS
7043 fi
7044 echo "$as_me:7044: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7045 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7046 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7047
7048 echo "$as_me:7048: checking if GPM is weakly bound to curses library" >&5
7049 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7050 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7051   echo $ECHO_N "(cached) $ECHO_C" >&6
7052 else
7053
7054 cf_cv_check_gpm_wgetch=unknown
7055 if test "$cross_compiling" != yes ; then
7056
7057 cat >conftest.$ac_ext <<CF_EOF
7058 #include <gpm.h>
7059 int main(void)
7060 {
7061         Gpm_Wgetch();
7062         ${cf_cv_main_return:-return}(0);
7063 }
7064 CF_EOF
7065
7066         cf_save_LIBS="$LIBS"
7067         # This only works if we can look at the symbol table.  If a shared
7068         # library is stripped for install, we cannot use that.  So we're forced
7069         # to rely on the static library, noting that some packagers may not
7070         # include it.
7071         LIBS="-static -lgpm -dynamic $LIBS"
7072         if { (eval echo "$as_me:7072: \"$ac_compile\"") >&5
7073   (eval $ac_compile) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); } ; then
7077                 if { (eval echo "$as_me:7077: \"$ac_link\"") >&5
7078   (eval $ac_link) 2>&5
7079   ac_status=$?
7080   echo "$as_me:7080: \$? = $ac_status" >&5
7081   (exit $ac_status); } ; then
7082                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7083                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7084                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7085                 fi
7086         fi
7087         rm -rf conftest*
7088         LIBS="$cf_save_LIBS"
7089 fi
7090
7091 fi
7092 echo "$as_me:7092: result: $cf_cv_check_gpm_wgetch" >&5
7093 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7094
7095 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7096         { echo "$as_me:7096: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7097 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7098 fi
7099
7100 fi
7101
7102 fi
7103
7104 echo "$as_me:7104: checking if you want to use PCRE2 for regular-expressions" >&5
7105 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7106
7107 # Check whether --with-pcre2 or --without-pcre2 was given.
7108 if test "${with_pcre2+set}" = set; then
7109   withval="$with_pcre2"
7110
7111 fi;
7112 test -z "$with_pcre2" && with_pcre2=no
7113 echo "$as_me:7113: result: $with_pcre2" >&5
7114 echo "${ECHO_T}$with_pcre2" >&6
7115
7116 if test "x$with_pcre2" != xno ; then
7117
7118 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7119         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7120
7121 echo "${as_me:-configure}:7121: testing found package libpcre2 ..." 1>&5
7122
7123         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7124         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7125         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7126
7127 echo "${as_me:-configure}:7127: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7128
7129         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7130
7131 echo "${as_me:-configure}:7131: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7132
7133 cf_fix_cppflags=no
7134 cf_new_cflags=
7135 cf_new_cppflags=
7136 cf_new_extra_cppflags=
7137
7138 for cf_add_cflags in $cf_pkgconfig_incs
7139 do
7140 case $cf_fix_cppflags in
7141 (no)
7142         case $cf_add_cflags in
7143         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7144                 case $cf_add_cflags in
7145                 (-D*)
7146                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7147
7148                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7149                                 && test -z "${cf_tst_cflags}" \
7150                                 && cf_fix_cppflags=yes
7151
7152                         if test $cf_fix_cppflags = yes ; 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                         elif test "${cf_tst_cflags}" = "\"'" ; then
7159
7160         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7161         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7162
7163                                 continue
7164                         fi
7165                         ;;
7166                 esac
7167                 case "$CPPFLAGS" in
7168                 (*$cf_add_cflags)
7169                         ;;
7170                 (*)
7171                         case $cf_add_cflags in
7172                         (-D*)
7173                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7174
7175 CPPFLAGS=`echo "$CPPFLAGS" | \
7176         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7177                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7178
7179                                 ;;
7180                         esac
7181
7182         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7183         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7184
7185                         ;;
7186                 esac
7187                 ;;
7188         (*)
7189
7190         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7191         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7192
7193                 ;;
7194         esac
7195         ;;
7196 (yes)
7197
7198         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7199         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7200
7201         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7202
7203         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7204                 && test -z "${cf_tst_cflags}" \
7205                 && cf_fix_cppflags=no
7206         ;;
7207 esac
7208 done
7209
7210 if test -n "$cf_new_cflags" ; then
7211
7212         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7213         CFLAGS="${CFLAGS}$cf_new_cflags"
7214
7215 fi
7216
7217 if test -n "$cf_new_cppflags" ; then
7218
7219         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7220         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7221
7222 fi
7223
7224 if test -n "$cf_new_extra_cppflags" ; then
7225
7226         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7227         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7228
7229 fi
7230
7231 cf_add_libs="$LIBS"
7232 # reverse order
7233 cf_add_0lib=
7234 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7235 # filter duplicates
7236 for cf_add_1lib in $cf_add_0lib; do
7237         for cf_add_2lib in $cf_add_libs; do
7238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7239                         cf_add_1lib=
7240                         break
7241                 fi
7242         done
7243         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7244 done
7245 LIBS="$cf_add_libs"
7246
7247         :
7248 else
7249         cf_pkgconfig_incs=
7250         cf_pkgconfig_libs=
7251
7252 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7253         test -n "$verbose" && echo "    found package libpcre" 1>&6
7254
7255 echo "${as_me:-configure}:7255: testing found package libpcre ..." 1>&5
7256
7257         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7258         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7259         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7260
7261 echo "${as_me:-configure}:7261: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7262
7263         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7264
7265 echo "${as_me:-configure}:7265: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7266
7267 cf_fix_cppflags=no
7268 cf_new_cflags=
7269 cf_new_cppflags=
7270 cf_new_extra_cppflags=
7271
7272 for cf_add_cflags in $cf_pkgconfig_incs
7273 do
7274 case $cf_fix_cppflags in
7275 (no)
7276         case $cf_add_cflags in
7277         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7278                 case $cf_add_cflags in
7279                 (-D*)
7280                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7281
7282                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7283                                 && test -z "${cf_tst_cflags}" \
7284                                 && cf_fix_cppflags=yes
7285
7286                         if test $cf_fix_cppflags = yes ; then
7287
7288         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7289         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7290
7291                                 continue
7292                         elif test "${cf_tst_cflags}" = "\"'" ; then
7293
7294         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7295         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7296
7297                                 continue
7298                         fi
7299                         ;;
7300                 esac
7301                 case "$CPPFLAGS" in
7302                 (*$cf_add_cflags)
7303                         ;;
7304                 (*)
7305                         case $cf_add_cflags in
7306                         (-D*)
7307                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7308
7309 CPPFLAGS=`echo "$CPPFLAGS" | \
7310         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7311                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7312
7313                                 ;;
7314                         esac
7315
7316         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7317         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7318
7319                         ;;
7320                 esac
7321                 ;;
7322         (*)
7323
7324         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7325         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7326
7327                 ;;
7328         esac
7329         ;;
7330 (yes)
7331
7332         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7333         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7334
7335         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7336
7337         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7338                 && test -z "${cf_tst_cflags}" \
7339                 && cf_fix_cppflags=no
7340         ;;
7341 esac
7342 done
7343
7344 if test -n "$cf_new_cflags" ; then
7345
7346         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7347         CFLAGS="${CFLAGS}$cf_new_cflags"
7348
7349 fi
7350
7351 if test -n "$cf_new_cppflags" ; then
7352
7353         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7354         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7355
7356 fi
7357
7358 if test -n "$cf_new_extra_cppflags" ; then
7359
7360         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7361         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7362
7363 fi
7364
7365 cf_add_libs="$LIBS"
7366 # reverse order
7367 cf_add_0lib=
7368 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7369 # filter duplicates
7370 for cf_add_1lib in $cf_add_0lib; do
7371         for cf_add_2lib in $cf_add_libs; do
7372                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7373                         cf_add_1lib=
7374                         break
7375                 fi
7376         done
7377         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7378 done
7379 LIBS="$cf_add_libs"
7380
7381         :
7382 else
7383         cf_pkgconfig_incs=
7384         cf_pkgconfig_libs=
7385
7386                         { { echo "$as_me:7386: error: Cannot find PCRE2 library" >&5
7387 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7388    { (exit 1); exit 1; }; }
7389 fi
7390
7391 fi
7392
7393 cat >>confdefs.h <<\EOF
7394 #define HAVE_LIB_PCRE2 1
7395 EOF
7396
7397         # if pkgconfig gave no results, look for the libraries directly
7398         case $LIBS in
7399         (*pcre2-posix*|*pcreposix*)
7400                 ;;
7401         (*)
7402                 echo "$as_me:7402: checking for regcomp in -lpcre2-posix" >&5
7403 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7404 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7405   echo $ECHO_N "(cached) $ECHO_C" >&6
7406 else
7407   ac_check_lib_save_LIBS=$LIBS
7408 LIBS="-lpcre2-posix  $LIBS"
7409 cat >conftest.$ac_ext <<_ACEOF
7410 #line 7410 "configure"
7411 #include "confdefs.h"
7412
7413 /* Override any gcc2 internal prototype to avoid an error.  */
7414 #ifdef __cplusplus
7415 extern "C"
7416 #endif
7417 /* We use char because int might match the return type of a gcc2
7418    builtin and then its argument prototype would still apply.  */
7419 char regcomp ();
7420 int
7421 main (void)
7422 {
7423 regcomp ();
7424   ;
7425   return 0;
7426 }
7427 _ACEOF
7428 rm -f conftest.$ac_objext conftest$ac_exeext
7429 if { (eval echo "$as_me:7429: \"$ac_link\"") >&5
7430   (eval $ac_link) 2>&5
7431   ac_status=$?
7432   echo "$as_me:7432: \$? = $ac_status" >&5
7433   (exit $ac_status); } &&
7434          { ac_try='test -s conftest$ac_exeext'
7435   { (eval echo "$as_me:7435: \"$ac_try\"") >&5
7436   (eval $ac_try) 2>&5
7437   ac_status=$?
7438   echo "$as_me:7438: \$? = $ac_status" >&5
7439   (exit $ac_status); }; }; then
7440   ac_cv_lib_pcre2_posix_regcomp=yes
7441 else
7442   echo "$as_me: failed program was:" >&5
7443 cat conftest.$ac_ext >&5
7444 ac_cv_lib_pcre2_posix_regcomp=no
7445 fi
7446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7447 LIBS=$ac_check_lib_save_LIBS
7448 fi
7449 echo "$as_me:7449: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7450 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7451 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7452
7453 cf_add_libs="$LIBS"
7454 # reverse order
7455 cf_add_0lib=
7456 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7457 # filter duplicates
7458 for cf_add_1lib in $cf_add_0lib; do
7459         for cf_add_2lib in $cf_add_libs; do
7460                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7461                         cf_add_1lib=
7462                         break
7463                 fi
7464         done
7465         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7466 done
7467 LIBS="$cf_add_libs"
7468
7469 else
7470   echo "$as_me:7470: checking for regcomp in -lpcreposix" >&5
7471 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7472 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7473   echo $ECHO_N "(cached) $ECHO_C" >&6
7474 else
7475   ac_check_lib_save_LIBS=$LIBS
7476 LIBS="-lpcreposix  $LIBS"
7477 cat >conftest.$ac_ext <<_ACEOF
7478 #line 7478 "configure"
7479 #include "confdefs.h"
7480
7481 /* Override any gcc2 internal prototype to avoid an error.  */
7482 #ifdef __cplusplus
7483 extern "C"
7484 #endif
7485 /* We use char because int might match the return type of a gcc2
7486    builtin and then its argument prototype would still apply.  */
7487 char regcomp ();
7488 int
7489 main (void)
7490 {
7491 regcomp ();
7492   ;
7493   return 0;
7494 }
7495 _ACEOF
7496 rm -f conftest.$ac_objext conftest$ac_exeext
7497 if { (eval echo "$as_me:7497: \"$ac_link\"") >&5
7498   (eval $ac_link) 2>&5
7499   ac_status=$?
7500   echo "$as_me:7500: \$? = $ac_status" >&5
7501   (exit $ac_status); } &&
7502          { ac_try='test -s conftest$ac_exeext'
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   ac_cv_lib_pcreposix_regcomp=yes
7509 else
7510   echo "$as_me: failed program was:" >&5
7511 cat conftest.$ac_ext >&5
7512 ac_cv_lib_pcreposix_regcomp=no
7513 fi
7514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7515 LIBS=$ac_check_lib_save_LIBS
7516 fi
7517 echo "$as_me:7517: result: $ac_cv_lib_pcreposix_regcomp" >&5
7518 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7519 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7520
7521 cf_add_libs="$LIBS"
7522 # reverse order
7523 cf_add_0lib=
7524 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7525 # filter duplicates
7526 for cf_add_1lib in $cf_add_0lib; do
7527         for cf_add_2lib in $cf_add_libs; do
7528                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7529                         cf_add_1lib=
7530                         break
7531                 fi
7532         done
7533         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7534 done
7535 LIBS="$cf_add_libs"
7536
7537 else
7538   { { echo "$as_me:7538: error: Cannot find PCRE2 POSIX library" >&5
7539 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7540    { (exit 1); exit 1; }; }
7541 fi
7542
7543 fi
7544
7545                 ;;
7546         esac
7547
7548         # either way, check for the library header files
7549
7550 for ac_header in pcre2posix.h pcreposix.h
7551 do
7552 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7553 echo "$as_me:7553: checking for $ac_header" >&5
7554 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7555 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7556   echo $ECHO_N "(cached) $ECHO_C" >&6
7557 else
7558   cat >conftest.$ac_ext <<_ACEOF
7559 #line 7559 "configure"
7560 #include "confdefs.h"
7561 #include <$ac_header>
7562 _ACEOF
7563 if { (eval echo "$as_me:7563: \"$ac_cpp conftest.$ac_ext\"") >&5
7564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7565   ac_status=$?
7566   egrep -v '^ *\+' conftest.er1 >conftest.err
7567   rm -f conftest.er1
7568   cat conftest.err >&5
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); } >/dev/null; then
7571   if test -s conftest.err; then
7572     ac_cpp_err=$ac_c_preproc_warn_flag
7573   else
7574     ac_cpp_err=
7575   fi
7576 else
7577   ac_cpp_err=yes
7578 fi
7579 if test -z "$ac_cpp_err"; then
7580   eval "$as_ac_Header=yes"
7581 else
7582   echo "$as_me: failed program was:" >&5
7583   cat conftest.$ac_ext >&5
7584   eval "$as_ac_Header=no"
7585 fi
7586 rm -f conftest.err conftest.$ac_ext
7587 fi
7588 echo "$as_me:7588: result: `eval echo '${'$as_ac_Header'}'`" >&5
7589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7591   cat >>confdefs.h <<EOF
7592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7593 EOF
7594
7595 fi
7596 done
7597
7598 fi
7599
7600 # not everyone has "test -c"
7601 if test -c /dev/sysmouse 2>/dev/null ; then
7602 echo "$as_me:7602: checking if you want to use sysmouse" >&5
7603 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7604
7605 # Check whether --with-sysmouse or --without-sysmouse was given.
7606 if test "${with_sysmouse+set}" = set; then
7607   withval="$with_sysmouse"
7608   cf_with_sysmouse=$withval
7609 else
7610   cf_with_sysmouse=maybe
7611 fi;
7612         if test "$cf_with_sysmouse" != no ; then
7613         cat >conftest.$ac_ext <<_ACEOF
7614 #line 7614 "configure"
7615 #include "confdefs.h"
7616
7617 #include <osreldate.h>
7618 #if (__FreeBSD_version >= 400017)
7619 #include <sys/consio.h>
7620 #include <sys/fbio.h>
7621 #else
7622 #include <machine/console.h>
7623 #endif
7624
7625 int
7626 main (void)
7627 {
7628
7629         struct mouse_info the_mouse;
7630         ioctl(0, CONS_MOUSECTL, &the_mouse);
7631
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 rm -f conftest.$ac_objext
7637 if { (eval echo "$as_me:7637: \"$ac_compile\"") >&5
7638   (eval $ac_compile) 2>&5
7639   ac_status=$?
7640   echo "$as_me:7640: \$? = $ac_status" >&5
7641   (exit $ac_status); } &&
7642          { ac_try='test -s conftest.$ac_objext'
7643   { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7644   (eval $ac_try) 2>&5
7645   ac_status=$?
7646   echo "$as_me:7646: \$? = $ac_status" >&5
7647   (exit $ac_status); }; }; then
7648   cf_with_sysmouse=yes
7649 else
7650   echo "$as_me: failed program was:" >&5
7651 cat conftest.$ac_ext >&5
7652 cf_with_sysmouse=no
7653 fi
7654 rm -f conftest.$ac_objext conftest.$ac_ext
7655         fi
7656 echo "$as_me:7656: result: $cf_with_sysmouse" >&5
7657 echo "${ECHO_T}$cf_with_sysmouse" >&6
7658 test "$cf_with_sysmouse" = yes &&
7659 cat >>confdefs.h <<\EOF
7660 #define USE_SYSMOUSE 1
7661 EOF
7662
7663 fi
7664
7665 # pretend that ncurses==ncursesw==ncursest
7666 echo "$as_me:7666: checking if you want to disable library suffixes" >&5
7667 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7668
7669 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7670 if test "${enable_lib_suffixes+set}" = set; then
7671   enableval="$enable_lib_suffixes"
7672   test "$enableval" != no && enableval=yes
7673         if test "$enableval" != "yes" ; then
7674     disable_lib_suffixes=yes
7675         else
7676                 disable_lib_suffixes=no
7677         fi
7678 else
7679   enableval=yes
7680         disable_lib_suffixes=no
7681
7682 fi;
7683 echo "$as_me:7683: result: $disable_lib_suffixes" >&5
7684 echo "${ECHO_T}$disable_lib_suffixes" >&6
7685
7686 ### If we're building with rpath, try to link non-standard libs that way too.
7687 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7688
7689 echo "$as_me:7689: checking if rpath-hack should be disabled" >&5
7690 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7691
7692 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7693 if test "${enable_rpath_hack+set}" = set; then
7694   enableval="$enable_rpath_hack"
7695   test "$enableval" != no && enableval=yes
7696         if test "$enableval" != "yes" ; then
7697     cf_disable_rpath_hack=yes
7698         else
7699                 cf_disable_rpath_hack=no
7700         fi
7701 else
7702   enableval=yes
7703         cf_disable_rpath_hack=no
7704
7705 fi;
7706 echo "$as_me:7706: result: $cf_disable_rpath_hack" >&5
7707 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7708 if test "$cf_disable_rpath_hack" = no ; then
7709
7710 echo "$as_me:7710: checking for updated LDFLAGS" >&5
7711 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7712 if test -n "$LD_RPATH_OPT" ; then
7713         echo "$as_me:7713: result: maybe" >&5
7714 echo "${ECHO_T}maybe" >&6
7715
7716         for ac_prog in ldd
7717 do
7718   # Extract the first word of "$ac_prog", so it can be a program name with args.
7719 set dummy $ac_prog; ac_word=$2
7720 echo "$as_me:7720: checking for $ac_word" >&5
7721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7722 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7723   echo $ECHO_N "(cached) $ECHO_C" >&6
7724 else
7725   if test -n "$cf_ldd_prog"; then
7726   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7727 else
7728   ac_save_IFS=$IFS; IFS=$ac_path_separator
7729 ac_dummy="$PATH"
7730 for ac_dir in $ac_dummy; do
7731   IFS=$ac_save_IFS
7732   test -z "$ac_dir" && ac_dir=.
7733   $as_executable_p "$ac_dir/$ac_word" || continue
7734 ac_cv_prog_cf_ldd_prog="$ac_prog"
7735 echo "$as_me:7735: found $ac_dir/$ac_word" >&5
7736 break
7737 done
7738
7739 fi
7740 fi
7741 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7742 if test -n "$cf_ldd_prog"; then
7743   echo "$as_me:7743: result: $cf_ldd_prog" >&5
7744 echo "${ECHO_T}$cf_ldd_prog" >&6
7745 else
7746   echo "$as_me:7746: result: no" >&5
7747 echo "${ECHO_T}no" >&6
7748 fi
7749
7750   test -n "$cf_ldd_prog" && break
7751 done
7752 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7753
7754         cf_rpath_list="/usr/lib /lib"
7755         if test "$cf_ldd_prog" != no
7756         then
7757                 cf_rpath_oops=
7758
7759 cat >conftest.$ac_ext <<_ACEOF
7760 #line 7760 "configure"
7761 #include "confdefs.h"
7762 #include <stdio.h>
7763 int
7764 main (void)
7765 {
7766 printf("Hello");
7767   ;
7768   return 0;
7769 }
7770 _ACEOF
7771 rm -f conftest.$ac_objext conftest$ac_exeext
7772 if { (eval echo "$as_me:7772: \"$ac_link\"") >&5
7773   (eval $ac_link) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit $ac_status); } &&
7777          { ac_try='test -s conftest$ac_exeext'
7778   { (eval echo "$as_me:7778: \"$ac_try\"") >&5
7779   (eval $ac_try) 2>&5
7780   ac_status=$?
7781   echo "$as_me:7781: \$? = $ac_status" >&5
7782   (exit $ac_status); }; }; then
7783   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7784                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7785 else
7786   echo "$as_me: failed program was:" >&5
7787 cat conftest.$ac_ext >&5
7788 fi
7789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7790
7791                 # If we passed the link-test, but get a "not found" on a given library,
7792                 # this could be due to inept reconfiguration of gcc to make it only
7793                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7794                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7795                 # /usr/local libraries.
7796                 if test -n "$cf_rpath_oops"
7797                 then
7798                         for cf_rpath_src in $cf_rpath_oops
7799                         do
7800                                 for cf_rpath_dir in \
7801                                         /usr/local \
7802                                         /usr/pkg \
7803                                         /opt/sfw
7804                                 do
7805                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7806                                         then
7807                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7808
7809 echo "${as_me:-configure}:7809: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7810
7811                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7812                                                 break
7813                                         fi
7814                                 done
7815                         done
7816                 fi
7817         fi
7818
7819         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7820
7821 echo "${as_me:-configure}:7821: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7822
7823 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7824
7825 echo "${as_me:-configure}:7825: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7826
7827 cf_rpath_dst=
7828 for cf_rpath_src in $LDFLAGS
7829 do
7830         case $cf_rpath_src in
7831         (-L*)
7832
7833                 # check if this refers to a directory which we will ignore
7834                 cf_rpath_skip=no
7835                 if test -n "$cf_rpath_list"
7836                 then
7837                         for cf_rpath_item in $cf_rpath_list
7838                         do
7839                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7840                                 then
7841                                         cf_rpath_skip=yes
7842                                         break
7843                                 fi
7844                         done
7845                 fi
7846
7847                 if test "$cf_rpath_skip" = no
7848                 then
7849                         # transform the option
7850                         if test "$LD_RPATH_OPT" = "-R " ; then
7851                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7852                         else
7853                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7854                         fi
7855
7856                         # if we have not already added this, add it now
7857                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7858                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7859                         then
7860                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7861
7862 echo "${as_me:-configure}:7862: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7863
7864                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7865                         fi
7866                 fi
7867                 ;;
7868         esac
7869         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7870 done
7871 LDFLAGS=$cf_rpath_dst
7872
7873 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7874
7875 echo "${as_me:-configure}:7875: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7876
7877 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7878
7879 echo "${as_me:-configure}:7879: testing ...checking LIBS $LIBS ..." 1>&5
7880
7881 cf_rpath_dst=
7882 for cf_rpath_src in $LIBS
7883 do
7884         case $cf_rpath_src in
7885         (-L*)
7886
7887                 # check if this refers to a directory which we will ignore
7888                 cf_rpath_skip=no
7889                 if test -n "$cf_rpath_list"
7890                 then
7891                         for cf_rpath_item in $cf_rpath_list
7892                         do
7893                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7894                                 then
7895                                         cf_rpath_skip=yes
7896                                         break
7897                                 fi
7898                         done
7899                 fi
7900
7901                 if test "$cf_rpath_skip" = no
7902                 then
7903                         # transform the option
7904                         if test "$LD_RPATH_OPT" = "-R " ; then
7905                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7906                         else
7907                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7908                         fi
7909
7910                         # if we have not already added this, add it now
7911                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7912                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7913                         then
7914                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7915
7916 echo "${as_me:-configure}:7916: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7917
7918                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7919                         fi
7920                 fi
7921                 ;;
7922         esac
7923         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7924 done
7925 LIBS=$cf_rpath_dst
7926
7927 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7928
7929 echo "${as_me:-configure}:7929: testing ...checked LIBS $LIBS ..." 1>&5
7930
7931         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7932
7933 echo "${as_me:-configure}:7933: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7934
7935 else
7936         echo "$as_me:7936: result: no" >&5
7937 echo "${ECHO_T}no" >&6
7938 fi
7939
7940 fi
7941
7942 fi
7943
7944 ###############################################################################
7945
7946 ###     use option --with-extra-suffix to append suffix to headers and libraries
7947 echo "$as_me:7947: checking if you wish to append extra suffix to header/library paths" >&5
7948 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7949 EXTRA_SUFFIX=
7950
7951 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7952 if test "${with_extra_suffix+set}" = set; then
7953   withval="$with_extra_suffix"
7954   case x$withval in
7955         (no)
7956                 ;;
7957         (xyes|x)
7958                 EXTRA_SUFFIX=$cf_cv_abi_version
7959                 ;;
7960         (*)
7961                 EXTRA_SUFFIX=$withval
7962                 ;;
7963         esac
7964
7965 fi;
7966 echo "$as_me:7966: result: $EXTRA_SUFFIX" >&5
7967 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7968
7969 ###     use option --disable-overwrite to leave out the link to -lcurses
7970 echo "$as_me:7970: checking if you wish to install ncurses overwriting curses" >&5
7971 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7972
7973 # Check whether --enable-overwrite or --disable-overwrite was given.
7974 if test "${enable_overwrite+set}" = set; then
7975   enableval="$enable_overwrite"
7976   with_overwrite=$enableval
7977 else
7978   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7979 fi;
7980 echo "$as_me:7980: result: $with_overwrite" >&5
7981 echo "${ECHO_T}$with_overwrite" >&6
7982
7983 echo "$as_me:7983: checking if external terminfo-database is used" >&5
7984 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7985
7986 # Check whether --enable-database or --disable-database was given.
7987 if test "${enable_database+set}" = set; then
7988   enableval="$enable_database"
7989   use_database=$enableval
7990 else
7991   use_database=yes
7992 fi;
7993 echo "$as_me:7993: result: $use_database" >&5
7994 echo "${ECHO_T}$use_database" >&6
7995
7996 case $host_os in
7997 (os2*)
7998         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7999         ;;
8000 (*)
8001         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8002         ;;
8003 esac
8004
8005 NCURSES_USE_DATABASE=0
8006 if test "$use_database" != no ; then
8007         NCURSES_USE_DATABASE=1
8008
8009         echo "$as_me:8009: checking which terminfo source-file will be installed" >&5
8010 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8011
8012 # Check whether --with-database or --without-database was given.
8013 if test "${with_database+set}" = set; then
8014   withval="$with_database"
8015   TERMINFO_SRC=$withval
8016 fi;
8017         echo "$as_me:8017: result: $TERMINFO_SRC" >&5
8018 echo "${ECHO_T}$TERMINFO_SRC" >&6
8019
8020         echo "$as_me:8020: checking whether to use hashed database instead of directory/tree" >&5
8021 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8022
8023 # Check whether --with-hashed-db or --without-hashed-db was given.
8024 if test "${with_hashed_db+set}" = set; then
8025   withval="$with_hashed_db"
8026
8027 else
8028   with_hashed_db=no
8029 fi;
8030         echo "$as_me:8030: result: $with_hashed_db" >&5
8031 echo "${ECHO_T}$with_hashed_db" >&6
8032 else
8033         with_hashed_db=no
8034 fi
8035
8036 echo "$as_me:8036: checking for list of fallback descriptions" >&5
8037 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8038
8039 # Check whether --with-fallbacks or --without-fallbacks was given.
8040 if test "${with_fallbacks+set}" = set; then
8041   withval="$with_fallbacks"
8042   with_fallback=$withval
8043 else
8044   with_fallback=
8045 fi;
8046 echo "$as_me:8046: result: $with_fallback" >&5
8047 echo "${ECHO_T}$with_fallback" >&6
8048
8049 case ".$with_fallback" in
8050 (.|.no)
8051         FALLBACK_LIST=
8052         ;;
8053 (.yes)
8054         { echo "$as_me:8054: WARNING: expected a list of terminal descriptions" >&5
8055 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8056         ;;
8057 (*)
8058         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8059         ;;
8060 esac
8061
8062 USE_FALLBACKS=
8063 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8064
8065 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8066 # tree for generating the terminal descriptions that will be compiled into the
8067 # library.  If your toolchain is old, it may not handle current terminal
8068 # databases.  Use configure-options to point to the tools which will be used,
8069 # rather than the first ones found on the $PATH.
8070 if test -n "$FALLBACK_LIST"
8071 then
8072
8073 # Check whether --with-tic-path or --without-tic-path was given.
8074 if test "${with_tic_path+set}" = set; then
8075   withval="$with_tic_path"
8076   echo "$as_me:8076: checking for tic program for fallbacks" >&5
8077 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8078                 TIC=$withval
8079                 echo "$as_me:8079: result: $TIC" >&5
8080 echo "${ECHO_T}$TIC" >&6
8081
8082 if test "x$prefix" != xNONE; then
8083         cf_path_syntax="$prefix"
8084 else
8085         cf_path_syntax="$ac_default_prefix"
8086 fi
8087
8088 case ".$TIC" in
8089 (.\$\(*\)*|.\'*\'*)
8090         ;;
8091 (..|./*|.\\*)
8092         ;;
8093 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8094         ;;
8095 (.\${*prefix}*|.\${*dir}*)
8096         eval TIC="$TIC"
8097         case ".$TIC" in
8098         (.NONE/*)
8099                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8100                 ;;
8101         esac
8102         ;;
8103 (.no|.NONE/*)
8104         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8105         ;;
8106 (*)
8107         { { echo "$as_me:8107: error: expected a pathname, not \"$TIC\"" >&5
8108 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8109    { (exit 1); exit 1; }; }
8110         ;;
8111 esac
8112
8113 else
8114
8115 test -z "$TIC" && TIC=tic
8116 for ac_prog in $TIC tic
8117 do
8118   # Extract the first word of "$ac_prog", so it can be a program name with args.
8119 set dummy $ac_prog; ac_word=$2
8120 echo "$as_me:8120: checking for $ac_word" >&5
8121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8122 if test "${ac_cv_path_TIC+set}" = set; then
8123   echo $ECHO_N "(cached) $ECHO_C" >&6
8124 else
8125   case $TIC in
8126   [\\/]* | ?:[\\/]*)
8127   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8128   ;;
8129   *)
8130   ac_save_IFS=$IFS; IFS=$ac_path_separator
8131 ac_dummy="$PATH:/usr/local/ncurses/bin"
8132 for ac_dir in $ac_dummy; do
8133   IFS=$ac_save_IFS
8134   test -z "$ac_dir" && ac_dir=.
8135   if $as_executable_p "$ac_dir/$ac_word"; then
8136    ac_cv_path_TIC="$ac_dir/$ac_word"
8137    echo "$as_me:8137: found $ac_dir/$ac_word" >&5
8138    break
8139 fi
8140 done
8141
8142   ;;
8143 esac
8144 fi
8145 TIC=$ac_cv_path_TIC
8146
8147 if test -n "$TIC"; then
8148   echo "$as_me:8148: result: $TIC" >&5
8149 echo "${ECHO_T}$TIC" >&6
8150 else
8151   echo "$as_me:8151: result: no" >&5
8152 echo "${ECHO_T}no" >&6
8153 fi
8154
8155   test -n "$TIC" && break
8156 done
8157 test -n "$TIC" || TIC="$TIC"
8158
8159 cf_path_prog=""
8160 cf_path_args=""
8161 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8162 for cf_temp in $ac_cv_path_TIC
8163 do
8164         if test -z "$cf_path_prog" ; then
8165                 if test "$with_full_paths" = yes ; then
8166
8167 if test "x$prefix" != xNONE; then
8168         cf_path_syntax="$prefix"
8169 else
8170         cf_path_syntax="$ac_default_prefix"
8171 fi
8172
8173 case ".$cf_temp" in
8174 (.\$\(*\)*|.\'*\'*)
8175         ;;
8176 (..|./*|.\\*)
8177         ;;
8178 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8179         ;;
8180 (.\${*prefix}*|.\${*dir}*)
8181         eval cf_temp="$cf_temp"
8182         case ".$cf_temp" in
8183         (.NONE/*)
8184                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8185                 ;;
8186         esac
8187         ;;
8188 (.no|.NONE/*)
8189         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8190         ;;
8191 (*)
8192         break
8193         ;;
8194 esac
8195
8196                         cf_path_prog="$cf_temp"
8197                 else
8198                         cf_path_prog="`basename $cf_temp`"
8199                 fi
8200         elif test -z "$cf_path_args" ; then
8201                 cf_path_args="$cf_temp"
8202         else
8203                 cf_path_args="$cf_path_args $cf_temp"
8204         fi
8205 done
8206 IFS="$cf_save_ifs"
8207
8208 if test -n "$cf_path_prog" ; then
8209
8210 echo "${as_me:-configure}:8210: testing defining path for ${cf_path_prog} ..." 1>&5
8211
8212 cat >>confdefs.h <<EOF
8213 #define TIC_PATH "$cf_path_prog"
8214 EOF
8215
8216         test -n "$cf_path_args" &&
8217 cat >>confdefs.h <<EOF
8218 #define TIC_ARGS "$cf_path_args"
8219 EOF
8220
8221 fi
8222
8223                 if test -z "$TIC"
8224                 then
8225                         { echo "$as_me:8225: WARNING: no tic program found for fallbacks" >&5
8226 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8227                 fi
8228
8229 fi;
8230
8231 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8232 if test "${with_infocmp_path+set}" = set; then
8233   withval="$with_infocmp_path"
8234   echo "$as_me:8234: checking for infocmp program for fallbacks" >&5
8235 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8236                 INFOCMP=$withval
8237                 echo "$as_me:8237: result: $INFOCMP" >&5
8238 echo "${ECHO_T}$INFOCMP" >&6
8239
8240 if test "x$prefix" != xNONE; then
8241         cf_path_syntax="$prefix"
8242 else
8243         cf_path_syntax="$ac_default_prefix"
8244 fi
8245
8246 case ".$INFOCMP" in
8247 (.\$\(*\)*|.\'*\'*)
8248         ;;
8249 (..|./*|.\\*)
8250         ;;
8251 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8252         ;;
8253 (.\${*prefix}*|.\${*dir}*)
8254         eval INFOCMP="$INFOCMP"
8255         case ".$INFOCMP" in
8256         (.NONE/*)
8257                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8258                 ;;
8259         esac
8260         ;;
8261 (.no|.NONE/*)
8262         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8263         ;;
8264 (*)
8265         { { echo "$as_me:8265: error: expected a pathname, not \"$INFOCMP\"" >&5
8266 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8267    { (exit 1); exit 1; }; }
8268         ;;
8269 esac
8270
8271 else
8272
8273 test -z "$INFOCMP" && INFOCMP=infocmp
8274 for ac_prog in $INFOCMP infocmp
8275 do
8276   # Extract the first word of "$ac_prog", so it can be a program name with args.
8277 set dummy $ac_prog; ac_word=$2
8278 echo "$as_me:8278: checking for $ac_word" >&5
8279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8280 if test "${ac_cv_path_INFOCMP+set}" = set; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 else
8283   case $INFOCMP in
8284   [\\/]* | ?:[\\/]*)
8285   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8286   ;;
8287   *)
8288   ac_save_IFS=$IFS; IFS=$ac_path_separator
8289 ac_dummy="$PATH:/usr/local/ncurses/bin"
8290 for ac_dir in $ac_dummy; do
8291   IFS=$ac_save_IFS
8292   test -z "$ac_dir" && ac_dir=.
8293   if $as_executable_p "$ac_dir/$ac_word"; then
8294    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8295    echo "$as_me:8295: found $ac_dir/$ac_word" >&5
8296    break
8297 fi
8298 done
8299
8300   ;;
8301 esac
8302 fi
8303 INFOCMP=$ac_cv_path_INFOCMP
8304
8305 if test -n "$INFOCMP"; then
8306   echo "$as_me:8306: result: $INFOCMP" >&5
8307 echo "${ECHO_T}$INFOCMP" >&6
8308 else
8309   echo "$as_me:8309: result: no" >&5
8310 echo "${ECHO_T}no" >&6
8311 fi
8312
8313   test -n "$INFOCMP" && break
8314 done
8315 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8316
8317 cf_path_prog=""
8318 cf_path_args=""
8319 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8320 for cf_temp in $ac_cv_path_INFOCMP
8321 do
8322         if test -z "$cf_path_prog" ; then
8323                 if test "$with_full_paths" = yes ; then
8324
8325 if test "x$prefix" != xNONE; then
8326         cf_path_syntax="$prefix"
8327 else
8328         cf_path_syntax="$ac_default_prefix"
8329 fi
8330
8331 case ".$cf_temp" in
8332 (.\$\(*\)*|.\'*\'*)
8333         ;;
8334 (..|./*|.\\*)
8335         ;;
8336 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8337         ;;
8338 (.\${*prefix}*|.\${*dir}*)
8339         eval cf_temp="$cf_temp"
8340         case ".$cf_temp" in
8341         (.NONE/*)
8342                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8343                 ;;
8344         esac
8345         ;;
8346 (.no|.NONE/*)
8347         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8348         ;;
8349 (*)
8350         break
8351         ;;
8352 esac
8353
8354                         cf_path_prog="$cf_temp"
8355                 else
8356                         cf_path_prog="`basename $cf_temp`"
8357                 fi
8358         elif test -z "$cf_path_args" ; then
8359                 cf_path_args="$cf_temp"
8360         else
8361                 cf_path_args="$cf_path_args $cf_temp"
8362         fi
8363 done
8364 IFS="$cf_save_ifs"
8365
8366 if test -n "$cf_path_prog" ; then
8367
8368 echo "${as_me:-configure}:8368: testing defining path for ${cf_path_prog} ..." 1>&5
8369
8370 cat >>confdefs.h <<EOF
8371 #define INFOCMP_PATH "$cf_path_prog"
8372 EOF
8373
8374         test -n "$cf_path_args" &&
8375 cat >>confdefs.h <<EOF
8376 #define INFOCMP_ARGS "$cf_path_args"
8377 EOF
8378
8379 fi
8380
8381                 if test -z "$INFOCMP"
8382                 then
8383                         { echo "$as_me:8383: WARNING: no infocmp program found for fallbacks" >&5
8384 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8385                 fi
8386
8387 fi;
8388
8389 else
8390         : ${TIC:=tic}
8391         : ${INFOCMP:=infocmp}
8392 fi
8393
8394 echo "$as_me:8394: checking if you want modern xterm or antique" >&5
8395 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8396
8397 # Check whether --with-xterm-new or --without-xterm-new was given.
8398 if test "${with_xterm_new+set}" = set; then
8399   withval="$with_xterm_new"
8400   with_xterm_new=$withval
8401 else
8402   with_xterm_new=yes
8403 fi;
8404 case $with_xterm_new in
8405 (no) with_xterm_new=xterm-old;;
8406 (*)      with_xterm_new=xterm-new;;
8407 esac
8408 echo "$as_me:8408: result: $with_xterm_new" >&5
8409 echo "${ECHO_T}$with_xterm_new" >&6
8410 WHICH_XTERM=$with_xterm_new
8411
8412 echo "$as_me:8412: checking if xterm backspace sends BS or DEL" >&5
8413 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8414
8415 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8416 if test "${with_xterm_kbs+set}" = set; then
8417   withval="$with_xterm_kbs"
8418   with_xterm_kbs=$withval
8419 else
8420   with_xterm_kbs=BS
8421 fi;
8422 case x$with_xterm_kbs in
8423 (xyes|xno|xBS|xbs|x8)
8424         with_xterm_kbs=BS
8425         ;;
8426 (xDEL|xdel|x127)
8427         with_xterm_kbs=DEL
8428         ;;
8429 (*)
8430         with_xterm_kbs=$withval
8431         ;;
8432 esac
8433 echo "$as_me:8433: result: $with_xterm_kbs" >&5
8434 echo "${ECHO_T}$with_xterm_kbs" >&6
8435 XTERM_KBS=$with_xterm_kbs
8436
8437 MAKE_TERMINFO=
8438 if test "$use_database" = no ; then
8439         TERMINFO="${datadir}/terminfo"
8440         MAKE_TERMINFO="#"
8441 else
8442
8443 echo "$as_me:8443: checking for list of terminfo directories" >&5
8444 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8445
8446 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8447 if test "${with_terminfo_dirs+set}" = set; then
8448   withval="$with_terminfo_dirs"
8449
8450 else
8451   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8452 fi;
8453 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8454 cf_dst_path=
8455 for cf_src_path in $withval
8456 do
8457
8458 if test "x$prefix" != xNONE; then
8459         cf_path_syntax="$prefix"
8460 else
8461         cf_path_syntax="$ac_default_prefix"
8462 fi
8463
8464 case ".$cf_src_path" in
8465 (.\$\(*\)*|.\'*\'*)
8466         ;;
8467 (..|./*|.\\*)
8468         ;;
8469 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8470         ;;
8471 (.\${*prefix}*|.\${*dir}*)
8472         eval cf_src_path="$cf_src_path"
8473         case ".$cf_src_path" in
8474         (.NONE/*)
8475                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8476                 ;;
8477         esac
8478         ;;
8479 (.no|.NONE/*)
8480         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8481         ;;
8482 (*)
8483         { { echo "$as_me:8483: error: expected a pathname, not \"$cf_src_path\"" >&5
8484 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8485    { (exit 1); exit 1; }; }
8486         ;;
8487 esac
8488
8489   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8490   cf_dst_path="${cf_dst_path}${cf_src_path}"
8491 done
8492 IFS="$ac_save_ifs"
8493
8494 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8495 # so we have to check/work around.  We do prefer the result of "eval"...
8496 eval cf_dst_eval="$cf_dst_path"
8497 case "x$cf_dst_eval" in
8498 (xNONE*)
8499         TERMINFO_DIRS=$cf_dst_path
8500         ;;
8501 (*)
8502         TERMINFO_DIRS="$cf_dst_eval"
8503         ;;
8504 esac
8505
8506 echo "$as_me:8506: result: $TERMINFO_DIRS" >&5
8507 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8508 test -n "$TERMINFO_DIRS" &&
8509 cat >>confdefs.h <<EOF
8510 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8511 EOF
8512
8513 case "x$TERMINFO" in
8514 x???:*)
8515         { echo "$as_me:8515: WARNING: ignoring non-directory/file TERMINFO value" >&5
8516 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8517         unset TERMINFO
8518         ;;
8519 esac
8520
8521 echo "$as_me:8521: checking for default terminfo directory" >&5
8522 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8523
8524 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8525 if test "${with_default_terminfo_dir+set}" = set; then
8526   withval="$with_default_terminfo_dir"
8527
8528 else
8529   withval="${TERMINFO:-${datadir}/terminfo}"
8530 fi; if test -n "${datadir}/terminfo" ; then
8531
8532 if test "x$prefix" != xNONE; then
8533         cf_path_syntax="$prefix"
8534 else
8535         cf_path_syntax="$ac_default_prefix"
8536 fi
8537
8538 case ".$withval" in
8539 (.\$\(*\)*|.\'*\'*)
8540         ;;
8541 (..|./*|.\\*)
8542         ;;
8543 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8544         ;;
8545 (.\${*prefix}*|.\${*dir}*)
8546         eval withval="$withval"
8547         case ".$withval" in
8548         (.NONE/*)
8549                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8550                 ;;
8551         esac
8552         ;;
8553 (.no|.NONE/*)
8554         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8555         ;;
8556 (*)
8557         { { echo "$as_me:8557: error: expected a pathname, not \"$withval\"" >&5
8558 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8559    { (exit 1); exit 1; }; }
8560         ;;
8561 esac
8562
8563 fi
8564 eval TERMINFO="$withval"
8565
8566 echo "$as_me:8566: result: $TERMINFO" >&5
8567 echo "${ECHO_T}$TERMINFO" >&6
8568
8569 cat >>confdefs.h <<EOF
8570 #define TERMINFO "$TERMINFO"
8571 EOF
8572
8573 fi
8574
8575 ###     use option --disable-big-core to make tic run on small machines
8576 ###     We need 4Mb, check if we can allocate 50% more than that.
8577 echo "$as_me:8577: checking if big-core option selected" >&5
8578 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8579
8580 # Check whether --enable-big-core or --disable-big-core was given.
8581 if test "${enable_big_core+set}" = set; then
8582   enableval="$enable_big_core"
8583   with_big_core=$enableval
8584 else
8585   if test "$cross_compiling" = yes; then
8586   with_big_core=no
8587 else
8588   cat >conftest.$ac_ext <<_ACEOF
8589 #line 8589 "configure"
8590 #include "confdefs.h"
8591
8592 #include <stdlib.h>
8593 #include <string.h>
8594 int main() {
8595         unsigned long n = 6000000L;
8596         char *s = malloc(n);
8597         if (s != 0)
8598                 s[0] = s[n-1] = 0;
8599         ${cf_cv_main_return:-return}(s == 0);
8600 }
8601 _ACEOF
8602 rm -f conftest$ac_exeext
8603 if { (eval echo "$as_me:8603: \"$ac_link\"") >&5
8604   (eval $ac_link) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8608   { (eval echo "$as_me:8608: \"$ac_try\"") >&5
8609   (eval $ac_try) 2>&5
8610   ac_status=$?
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); }; }; then
8613   with_big_core=yes
8614 else
8615   echo "$as_me: program exited with status $ac_status" >&5
8616 echo "$as_me: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8618 with_big_core=no
8619 fi
8620 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8621 fi
8622 fi;
8623 echo "$as_me:8623: result: $with_big_core" >&5
8624 echo "${ECHO_T}$with_big_core" >&6
8625 test "x$with_big_core" = "xyes" &&
8626 cat >>confdefs.h <<\EOF
8627 #define HAVE_BIG_CORE 1
8628 EOF
8629
8630 ### ISO C only guarantees 512-char strings, we have tables which load faster
8631 ### when constructed using "big" strings.  More than the C compiler, the awk
8632 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8633 echo "$as_me:8633: checking if big-strings option selected" >&5
8634 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8635
8636 # Check whether --enable-big-strings or --disable-big-strings was given.
8637 if test "${enable_big_strings+set}" = set; then
8638   enableval="$enable_big_strings"
8639   with_big_strings=$enableval
8640 else
8641
8642         case x$AWK in
8643         (x)
8644                 eval with_big_strings=no
8645                 ;;
8646         (*)
8647                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8648                         | $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
8649                         eval with_big_strings=yes
8650                 else
8651                         eval with_big_strings=no
8652                 fi
8653                 ;;
8654         esac
8655
8656 fi;
8657 echo "$as_me:8657: result: $with_big_strings" >&5
8658 echo "${ECHO_T}$with_big_strings" >&6
8659
8660 USE_BIG_STRINGS=0
8661 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8662
8663 ###     use option --enable-termcap to compile in the termcap fallback support
8664 echo "$as_me:8664: checking if you want termcap-fallback support" >&5
8665 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8666
8667 # Check whether --enable-termcap or --disable-termcap was given.
8668 if test "${enable_termcap+set}" = set; then
8669   enableval="$enable_termcap"
8670   with_termcap=$enableval
8671 else
8672   with_termcap=no
8673 fi;
8674 echo "$as_me:8674: result: $with_termcap" >&5
8675 echo "${ECHO_T}$with_termcap" >&6
8676
8677 NCURSES_USE_TERMCAP=0
8678 if test "x$with_termcap" != "xyes" ; then
8679         if test "$use_database" = no ; then
8680                 if test -z "$with_fallback" ; then
8681                         { { echo "$as_me:8681: error: You have disabled the database w/o specifying fallbacks" >&5
8682 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8683    { (exit 1); exit 1; }; }
8684                 fi
8685         fi
8686
8687 cat >>confdefs.h <<\EOF
8688 #define PURE_TERMINFO 1
8689 EOF
8690
8691 else
8692
8693         if test "$with_ticlib" != no ; then
8694                 { { echo "$as_me:8694: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8695 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8696    { (exit 1); exit 1; }; }
8697         fi
8698
8699         NCURSES_USE_TERMCAP=1
8700         echo "$as_me:8700: checking for list of termcap files" >&5
8701 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8702
8703 # Check whether --with-termpath or --without-termpath was given.
8704 if test "${with_termpath+set}" = set; then
8705   withval="$with_termpath"
8706
8707 else
8708   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8709 fi;
8710 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8711 cf_dst_path=
8712 for cf_src_path in $withval
8713 do
8714
8715 if test "x$prefix" != xNONE; then
8716         cf_path_syntax="$prefix"
8717 else
8718         cf_path_syntax="$ac_default_prefix"
8719 fi
8720
8721 case ".$cf_src_path" in
8722 (.\$\(*\)*|.\'*\'*)
8723         ;;
8724 (..|./*|.\\*)
8725         ;;
8726 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8727         ;;
8728 (.\${*prefix}*|.\${*dir}*)
8729         eval cf_src_path="$cf_src_path"
8730         case ".$cf_src_path" in
8731         (.NONE/*)
8732                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8733                 ;;
8734         esac
8735         ;;
8736 (.no|.NONE/*)
8737         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8738         ;;
8739 (*)
8740         { { echo "$as_me:8740: error: expected a pathname, not \"$cf_src_path\"" >&5
8741 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8742    { (exit 1); exit 1; }; }
8743         ;;
8744 esac
8745
8746   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8747   cf_dst_path="${cf_dst_path}${cf_src_path}"
8748 done
8749 IFS="$ac_save_ifs"
8750
8751 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8752 # so we have to check/work around.  We do prefer the result of "eval"...
8753 eval cf_dst_eval="$cf_dst_path"
8754 case "x$cf_dst_eval" in
8755 (xNONE*)
8756         TERMPATH=$cf_dst_path
8757         ;;
8758 (*)
8759         TERMPATH="$cf_dst_eval"
8760         ;;
8761 esac
8762
8763         echo "$as_me:8763: result: $TERMPATH" >&5
8764 echo "${ECHO_T}$TERMPATH" >&6
8765         test -n "$TERMPATH" &&
8766 cat >>confdefs.h <<EOF
8767 #define TERMPATH "$TERMPATH"
8768 EOF
8769
8770         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8771         echo "$as_me:8771: checking if fast termcap-loader is needed" >&5
8772 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8773
8774 # Check whether --enable-getcap or --disable-getcap was given.
8775 if test "${enable_getcap+set}" = set; then
8776   enableval="$enable_getcap"
8777   with_getcap=$enableval
8778 else
8779   with_getcap=no
8780 fi;
8781         echo "$as_me:8781: result: $with_getcap" >&5
8782 echo "${ECHO_T}$with_getcap" >&6
8783         test "x$with_getcap" = "xyes" &&
8784 cat >>confdefs.h <<\EOF
8785 #define USE_GETCAP 1
8786 EOF
8787
8788         echo "$as_me:8788: checking if translated termcaps will be cached in ~/.terminfo" >&5
8789 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8790
8791 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8792 if test "${enable_getcap_cache+set}" = set; then
8793   enableval="$enable_getcap_cache"
8794   with_getcap_cache=$enableval
8795 else
8796   with_getcap_cache=no
8797 fi;
8798         echo "$as_me:8798: result: $with_getcap_cache" >&5
8799 echo "${ECHO_T}$with_getcap_cache" >&6
8800         test "x$with_getcap_cache" = "xyes" &&
8801 cat >>confdefs.h <<\EOF
8802 #define USE_GETCAP_CACHE 1
8803 EOF
8804
8805 fi
8806
8807 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8808 echo "$as_me:8808: checking if ~/.terminfo is wanted" >&5
8809 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8810
8811 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8812 if test "${enable_home_terminfo+set}" = set; then
8813   enableval="$enable_home_terminfo"
8814   with_home_terminfo=$enableval
8815 else
8816   with_home_terminfo=yes
8817 fi;
8818 echo "$as_me:8818: result: $with_home_terminfo" >&5
8819 echo "${ECHO_T}$with_home_terminfo" >&6
8820 test "x$with_home_terminfo" = "xyes" &&
8821 cat >>confdefs.h <<\EOF
8822 #define USE_HOME_TERMINFO 1
8823 EOF
8824
8825 echo "$as_me:8825: checking if you want to use restricted environment when running as root" >&5
8826 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8827
8828 # Check whether --enable-root-environ or --disable-root-environ was given.
8829 if test "${enable_root_environ+set}" = set; then
8830   enableval="$enable_root_environ"
8831   with_root_environ=$enableval
8832 else
8833   with_root_environ=yes
8834 fi;
8835 echo "$as_me:8835: result: $with_root_environ" >&5
8836 echo "${ECHO_T}$with_root_environ" >&6
8837 test "x$with_root_environ" = xyes &&
8838 cat >>confdefs.h <<\EOF
8839 #define USE_ROOT_ENVIRON 1
8840 EOF
8841
8842 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8843 ###   to reduce storage requirements for the terminfo database.
8844
8845 for ac_header in \
8846 unistd.h \
8847
8848 do
8849 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8850 echo "$as_me:8850: checking for $ac_header" >&5
8851 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8852 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8853   echo $ECHO_N "(cached) $ECHO_C" >&6
8854 else
8855   cat >conftest.$ac_ext <<_ACEOF
8856 #line 8856 "configure"
8857 #include "confdefs.h"
8858 #include <$ac_header>
8859 _ACEOF
8860 if { (eval echo "$as_me:8860: \"$ac_cpp conftest.$ac_ext\"") >&5
8861   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8862   ac_status=$?
8863   egrep -v '^ *\+' conftest.er1 >conftest.err
8864   rm -f conftest.er1
8865   cat conftest.err >&5
8866   echo "$as_me:8866: \$? = $ac_status" >&5
8867   (exit $ac_status); } >/dev/null; then
8868   if test -s conftest.err; then
8869     ac_cpp_err=$ac_c_preproc_warn_flag
8870   else
8871     ac_cpp_err=
8872   fi
8873 else
8874   ac_cpp_err=yes
8875 fi
8876 if test -z "$ac_cpp_err"; then
8877   eval "$as_ac_Header=yes"
8878 else
8879   echo "$as_me: failed program was:" >&5
8880   cat conftest.$ac_ext >&5
8881   eval "$as_ac_Header=no"
8882 fi
8883 rm -f conftest.err conftest.$ac_ext
8884 fi
8885 echo "$as_me:8885: result: `eval echo '${'$as_ac_Header'}'`" >&5
8886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8887 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8888   cat >>confdefs.h <<EOF
8889 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8890 EOF
8891
8892 fi
8893 done
8894
8895 for ac_func in \
8896         remove \
8897         unlink
8898 do
8899 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8900 echo "$as_me:8900: checking for $ac_func" >&5
8901 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8902 if eval "test \"\${$as_ac_var+set}\" = set"; then
8903   echo $ECHO_N "(cached) $ECHO_C" >&6
8904 else
8905   cat >conftest.$ac_ext <<_ACEOF
8906 #line 8906 "configure"
8907 #include "confdefs.h"
8908 #define $ac_func autoconf_temporary
8909 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8910 #undef $ac_func
8911
8912 #ifdef __cplusplus
8913 extern "C"
8914 #endif
8915
8916 /* We use char because int might match the return type of a gcc2
8917    builtin and then its argument prototype would still apply.  */
8918 char $ac_func (void);
8919
8920 int
8921 main (void)
8922 {
8923
8924 /* The GNU C library defines stubs for functions which it implements
8925     to always fail with ENOSYS.  Some functions are actually named
8926     something starting with __ and the normal name is an alias.  */
8927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8928 #error found stub for $ac_func
8929 #endif
8930
8931         return $ac_func ();
8932   ;
8933   return 0;
8934 }
8935 _ACEOF
8936 rm -f conftest.$ac_objext conftest$ac_exeext
8937 if { (eval echo "$as_me:8937: \"$ac_link\"") >&5
8938   (eval $ac_link) 2>&5
8939   ac_status=$?
8940   echo "$as_me:8940: \$? = $ac_status" >&5
8941   (exit $ac_status); } &&
8942          { ac_try='test -s conftest$ac_exeext'
8943   { (eval echo "$as_me:8943: \"$ac_try\"") >&5
8944   (eval $ac_try) 2>&5
8945   ac_status=$?
8946   echo "$as_me:8946: \$? = $ac_status" >&5
8947   (exit $ac_status); }; }; then
8948   eval "$as_ac_var=yes"
8949 else
8950   echo "$as_me: failed program was:" >&5
8951 cat conftest.$ac_ext >&5
8952 eval "$as_ac_var=no"
8953 fi
8954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8955 fi
8956 echo "$as_me:8956: result: `eval echo '${'$as_ac_var'}'`" >&5
8957 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8958 if test `eval echo '${'$as_ac_var'}'` = yes; then
8959   cat >>confdefs.h <<EOF
8960 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8961 EOF
8962
8963 fi
8964 done
8965
8966 if test "$cross_compiling" = yes ; then
8967
8968 for ac_func in \
8969                 link \
8970                 symlink
8971 do
8972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8973 echo "$as_me:8973: checking for $ac_func" >&5
8974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8975 if eval "test \"\${$as_ac_var+set}\" = set"; then
8976   echo $ECHO_N "(cached) $ECHO_C" >&6
8977 else
8978   cat >conftest.$ac_ext <<_ACEOF
8979 #line 8979 "configure"
8980 #include "confdefs.h"
8981 #define $ac_func autoconf_temporary
8982 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8983 #undef $ac_func
8984
8985 #ifdef __cplusplus
8986 extern "C"
8987 #endif
8988
8989 /* We use char because int might match the return type of a gcc2
8990    builtin and then its argument prototype would still apply.  */
8991 char $ac_func (void);
8992
8993 int
8994 main (void)
8995 {
8996
8997 /* The GNU C library defines stubs for functions which it implements
8998     to always fail with ENOSYS.  Some functions are actually named
8999     something starting with __ and the normal name is an alias.  */
9000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9001 #error found stub for $ac_func
9002 #endif
9003
9004         return $ac_func ();
9005   ;
9006   return 0;
9007 }
9008 _ACEOF
9009 rm -f conftest.$ac_objext conftest$ac_exeext
9010 if { (eval echo "$as_me:9010: \"$ac_link\"") >&5
9011   (eval $ac_link) 2>&5
9012   ac_status=$?
9013   echo "$as_me:9013: \$? = $ac_status" >&5
9014   (exit $ac_status); } &&
9015          { ac_try='test -s conftest$ac_exeext'
9016   { (eval echo "$as_me:9016: \"$ac_try\"") >&5
9017   (eval $ac_try) 2>&5
9018   ac_status=$?
9019   echo "$as_me:9019: \$? = $ac_status" >&5
9020   (exit $ac_status); }; }; then
9021   eval "$as_ac_var=yes"
9022 else
9023   echo "$as_me: failed program was:" >&5
9024 cat conftest.$ac_ext >&5
9025 eval "$as_ac_var=no"
9026 fi
9027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9028 fi
9029 echo "$as_me:9029: result: `eval echo '${'$as_ac_var'}'`" >&5
9030 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9031 if test `eval echo '${'$as_ac_var'}'` = yes; then
9032   cat >>confdefs.h <<EOF
9033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9034 EOF
9035
9036 fi
9037 done
9038
9039 else
9040         echo "$as_me:9040: checking if link/symlink functions work" >&5
9041 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9042 if test "${cf_cv_link_funcs+set}" = set; then
9043   echo $ECHO_N "(cached) $ECHO_C" >&6
9044 else
9045
9046                 cf_cv_link_funcs=
9047                 for cf_func in link symlink ; do
9048                         if test "$cross_compiling" = yes; then
9049
9050                         eval 'ac_cv_func_'$cf_func'=error'
9051 else
9052   cat >conftest.$ac_ext <<_ACEOF
9053 #line 9053 "configure"
9054 #include "confdefs.h"
9055
9056 #include <sys/types.h>
9057 #include <sys/stat.h>
9058 #ifdef HAVE_UNISTD_H
9059 #include <unistd.h>
9060 #endif
9061 int main(void)
9062 {
9063         int fail = 0;
9064         char *src = "config.log";
9065         char *dst = "conftest.chk";
9066         struct stat src_sb;
9067         struct stat dst_sb;
9068
9069         stat(src, &src_sb);
9070         fail = ($cf_func("config.log", "conftest.chk") < 0)
9071             || (stat(dst, &dst_sb) < 0)
9072             || (dst_sb.st_mtime != src_sb.st_mtime);
9073 #ifdef HAVE_UNLINK
9074         unlink(dst);
9075 #else
9076         remove(dst);
9077 #endif
9078         ${cf_cv_main_return:-return} (fail);
9079 }
9080
9081 _ACEOF
9082 rm -f conftest$ac_exeext
9083 if { (eval echo "$as_me:9083: \"$ac_link\"") >&5
9084   (eval $ac_link) 2>&5
9085   ac_status=$?
9086   echo "$as_me:9086: \$? = $ac_status" >&5
9087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9088   { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9089   (eval $ac_try) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); }; }; then
9093
9094                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9095                         eval 'ac_cv_func_'$cf_func'=yes'
9096 else
9097   echo "$as_me: program exited with status $ac_status" >&5
9098 echo "$as_me: failed program was:" >&5
9099 cat conftest.$ac_ext >&5
9100
9101                         eval 'ac_cv_func_'$cf_func'=no'
9102 fi
9103 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9104 fi
9105                 done
9106                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9107
9108 fi
9109 echo "$as_me:9109: result: $cf_cv_link_funcs" >&5
9110 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9111         test "$ac_cv_func_link"    = yes &&
9112 cat >>confdefs.h <<\EOF
9113 #define HAVE_LINK 1
9114 EOF
9115
9116         test "$ac_cv_func_symlink" = yes &&
9117 cat >>confdefs.h <<\EOF
9118 #define HAVE_SYMLINK 1
9119 EOF
9120
9121 fi
9122
9123 with_links=no
9124 with_symlinks=no
9125
9126 # soft links (symbolic links) are useful for some systems where hard links do
9127 # not work, or to make it simpler to copy terminfo trees around.
9128 if test "x$ac_cv_func_symlink" = xyes ; then
9129         echo "$as_me:9129: checking if tic should use symbolic links" >&5
9130 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9131
9132 # Check whether --enable-symlinks or --disable-symlinks was given.
9133 if test "${enable_symlinks+set}" = set; then
9134   enableval="$enable_symlinks"
9135   with_symlinks=$enableval
9136 else
9137   with_symlinks=no
9138 fi;
9139         echo "$as_me:9139: result: $with_symlinks" >&5
9140 echo "${ECHO_T}$with_symlinks" >&6
9141 fi
9142
9143 # If we have hard links and did not choose to use soft links instead, there is
9144 # no reason to make this choice optional - use the hard links.
9145 if test "$with_symlinks" = no ; then
9146         echo "$as_me:9146: checking if tic should use hard links" >&5
9147 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9148         if test "x$ac_cv_func_link" = xyes ; then
9149                 with_links=yes
9150         else
9151                 with_links=no
9152         fi
9153         echo "$as_me:9153: result: $with_links" >&5
9154 echo "${ECHO_T}$with_links" >&6
9155 fi
9156
9157 test "x$with_links" = xyes &&
9158 cat >>confdefs.h <<\EOF
9159 #define USE_LINKS 1
9160 EOF
9161
9162 test "x$with_symlinks" = xyes &&
9163 cat >>confdefs.h <<\EOF
9164 #define USE_SYMLINKS 1
9165 EOF
9166
9167 ###   use option --enable-broken-linker to force on use of broken-linker support
9168
9169 echo "$as_me:9169: checking if you want broken-linker support code" >&5
9170 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9171
9172 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9173 if test "${enable_broken_linker+set}" = set; then
9174   enableval="$enable_broken_linker"
9175   with_broken_linker=$enableval
9176 else
9177   with_broken_linker=no
9178 fi;
9179 echo "$as_me:9179: result: $with_broken_linker" >&5
9180 echo "${ECHO_T}$with_broken_linker" >&6
9181
9182 : ${BROKEN_LINKER:=0}
9183 if test "x$with_broken_linker" = xyes ; then
9184
9185 cat >>confdefs.h <<\EOF
9186 #define BROKEN_LINKER 1
9187 EOF
9188
9189         BROKEN_LINKER=1
9190 fi
9191
9192 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9193 echo "$as_me:9193: checking if tputs should process BSD-style prefix padding" >&5
9194 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9195
9196 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9197 if test "${enable_bsdpad+set}" = set; then
9198   enableval="$enable_bsdpad"
9199   with_bsdpad=$enableval
9200 else
9201   with_bsdpad=no
9202 fi;
9203 echo "$as_me:9203: result: $with_bsdpad" >&5
9204 echo "${ECHO_T}$with_bsdpad" >&6
9205 test "x$with_bsdpad" = xyes &&
9206 cat >>confdefs.h <<\EOF
9207 #define BSD_TPUTS 1
9208 EOF
9209
9210 ###   use option --enable-widec to turn on use of wide-character support
9211 NCURSES_CH_T=chtype
9212 NCURSES_LIBUTF8=0
9213
9214 NEED_WCHAR_H=0
9215 NCURSES_MBSTATE_T=0
9216 NCURSES_WCHAR_T=0
9217 NCURSES_WINT_T=0
9218
9219 # Check to define _XOPEN_SOURCE "automatically"
9220 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9221
9222 echo "$as_me:9222: checking if the POSIX test-macros are already defined" >&5
9223 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9224 if test "${cf_cv_posix_visible+set}" = set; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227
9228 cat >conftest.$ac_ext <<_ACEOF
9229 #line 9229 "configure"
9230 #include "confdefs.h"
9231 #include <stdio.h>
9232 int
9233 main (void)
9234 {
9235
9236 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9237         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9238         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9239         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9240 #error conflicting symbols found
9241 #endif
9242
9243   ;
9244   return 0;
9245 }
9246 _ACEOF
9247 rm -f conftest.$ac_objext
9248 if { (eval echo "$as_me:9248: \"$ac_compile\"") >&5
9249   (eval $ac_compile) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); } &&
9253          { ac_try='test -s conftest.$ac_objext'
9254   { (eval echo "$as_me:9254: \"$ac_try\"") >&5
9255   (eval $ac_try) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); }; }; then
9259   cf_cv_posix_visible=no
9260 else
9261   echo "$as_me: failed program was:" >&5
9262 cat conftest.$ac_ext >&5
9263 cf_cv_posix_visible=yes
9264 fi
9265 rm -f conftest.$ac_objext conftest.$ac_ext
9266
9267 fi
9268 echo "$as_me:9268: result: $cf_cv_posix_visible" >&5
9269 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9270
9271 if test "$cf_cv_posix_visible" = no; then
9272
9273 cf_XOPEN_SOURCE=600
9274 cf_POSIX_C_SOURCE=199506L
9275 cf_xopen_source=
9276
9277 case $host_os in
9278 (aix[4-7]*)
9279         cf_xopen_source="-D_ALL_SOURCE"
9280         ;;
9281 (msys)
9282         cf_XOPEN_SOURCE=600
9283         ;;
9284 (darwin[0-8].*)
9285         cf_xopen_source="-D_APPLE_C_SOURCE"
9286         ;;
9287 (darwin*)
9288         cf_xopen_source="-D_DARWIN_C_SOURCE"
9289         cf_XOPEN_SOURCE=
9290         ;;
9291 (freebsd*|dragonfly*|midnightbsd*)
9292         # 5.x headers associate
9293         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9294         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9295         cf_POSIX_C_SOURCE=200112L
9296         cf_XOPEN_SOURCE=600
9297         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9298         ;;
9299 (hpux11*)
9300         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9301         ;;
9302 (hpux*)
9303         cf_xopen_source="-D_HPUX_SOURCE"
9304         ;;
9305 (irix[56].*)
9306         cf_xopen_source="-D_SGI_SOURCE"
9307         cf_XOPEN_SOURCE=
9308         ;;
9309 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9310
9311 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9312
9313 echo "$as_me:9313: checking if this is the GNU C library" >&5
9314 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9315 if test "${cf_cv_gnu_library+set}" = set; then
9316   echo $ECHO_N "(cached) $ECHO_C" >&6
9317 else
9318
9319 cat >conftest.$ac_ext <<_ACEOF
9320 #line 9320 "configure"
9321 #include "confdefs.h"
9322 #include <sys/types.h>
9323 int
9324 main (void)
9325 {
9326
9327         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9328                 return 0;
9329         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9330                 return 0;
9331         #else
9332         #       error not GNU C library
9333         #endif
9334   ;
9335   return 0;
9336 }
9337 _ACEOF
9338 rm -f conftest.$ac_objext
9339 if { (eval echo "$as_me:9339: \"$ac_compile\"") >&5
9340   (eval $ac_compile) 2>&5
9341   ac_status=$?
9342   echo "$as_me:9342: \$? = $ac_status" >&5
9343   (exit $ac_status); } &&
9344          { ac_try='test -s conftest.$ac_objext'
9345   { (eval echo "$as_me:9345: \"$ac_try\"") >&5
9346   (eval $ac_try) 2>&5
9347   ac_status=$?
9348   echo "$as_me:9348: \$? = $ac_status" >&5
9349   (exit $ac_status); }; }; then
9350   cf_cv_gnu_library=yes
9351 else
9352   echo "$as_me: failed program was:" >&5
9353 cat conftest.$ac_ext >&5
9354 cf_cv_gnu_library=no
9355 fi
9356 rm -f conftest.$ac_objext conftest.$ac_ext
9357
9358 fi
9359 echo "$as_me:9359: result: $cf_cv_gnu_library" >&5
9360 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9361
9362 if test x$cf_cv_gnu_library = xyes; then
9363
9364         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9365         # was changed to help a little.  newlib incorporated the change about 4
9366         # years later.
9367         echo "$as_me:9367: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9368 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9369 if test "${cf_cv_gnu_library_219+set}" = set; then
9370   echo $ECHO_N "(cached) $ECHO_C" >&6
9371 else
9372
9373                 cf_save="$CPPFLAGS"
9374
9375         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9376         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9377
9378                 cat >conftest.$ac_ext <<_ACEOF
9379 #line 9379 "configure"
9380 #include "confdefs.h"
9381 #include <sys/types.h>
9382 int
9383 main (void)
9384 {
9385
9386                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9387                                 return 0;
9388                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9389                                 return 0;
9390                         #else
9391                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9392                         #endif
9393   ;
9394   return 0;
9395 }
9396 _ACEOF
9397 rm -f conftest.$ac_objext
9398 if { (eval echo "$as_me:9398: \"$ac_compile\"") >&5
9399   (eval $ac_compile) 2>&5
9400   ac_status=$?
9401   echo "$as_me:9401: \$? = $ac_status" >&5
9402   (exit $ac_status); } &&
9403          { ac_try='test -s conftest.$ac_objext'
9404   { (eval echo "$as_me:9404: \"$ac_try\"") >&5
9405   (eval $ac_try) 2>&5
9406   ac_status=$?
9407   echo "$as_me:9407: \$? = $ac_status" >&5
9408   (exit $ac_status); }; }; then
9409   cf_cv_gnu_library_219=yes
9410 else
9411   echo "$as_me: failed program was:" >&5
9412 cat conftest.$ac_ext >&5
9413 cf_cv_gnu_library_219=no
9414 fi
9415 rm -f conftest.$ac_objext conftest.$ac_ext
9416                 CPPFLAGS="$cf_save"
9417
9418 fi
9419 echo "$as_me:9419: result: $cf_cv_gnu_library_219" >&5
9420 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9421
9422         if test "x$cf_cv_gnu_library_219" = xyes; then
9423                 cf_save="$CPPFLAGS"
9424                 echo "$as_me:9424: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9425 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9426 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9427   echo $ECHO_N "(cached) $ECHO_C" >&6
9428 else
9429
9430 cf_fix_cppflags=no
9431 cf_new_cflags=
9432 cf_new_cppflags=
9433 cf_new_extra_cppflags=
9434
9435 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9436 do
9437 case $cf_fix_cppflags in
9438 (no)
9439         case $cf_add_cflags in
9440         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9441                 case $cf_add_cflags in
9442                 (-D*)
9443                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9444
9445                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9446                                 && test -z "${cf_tst_cflags}" \
9447                                 && cf_fix_cppflags=yes
9448
9449                         if test $cf_fix_cppflags = yes ; then
9450
9451         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9452         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9453
9454                                 continue
9455                         elif test "${cf_tst_cflags}" = "\"'" ; then
9456
9457         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9458         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9459
9460                                 continue
9461                         fi
9462                         ;;
9463                 esac
9464                 case "$CPPFLAGS" in
9465                 (*$cf_add_cflags)
9466                         ;;
9467                 (*)
9468                         case $cf_add_cflags in
9469                         (-D*)
9470                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9471
9472 CPPFLAGS=`echo "$CPPFLAGS" | \
9473         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9474                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9475
9476                                 ;;
9477                         esac
9478
9479         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9480         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9481
9482                         ;;
9483                 esac
9484                 ;;
9485         (*)
9486
9487         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9488         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9489
9490                 ;;
9491         esac
9492         ;;
9493 (yes)
9494
9495         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9496         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9497
9498         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9499
9500         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9501                 && test -z "${cf_tst_cflags}" \
9502                 && cf_fix_cppflags=no
9503         ;;
9504 esac
9505 done
9506
9507 if test -n "$cf_new_cflags" ; then
9508
9509         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9510         CFLAGS="${CFLAGS}$cf_new_cflags"
9511
9512 fi
9513
9514 if test -n "$cf_new_cppflags" ; then
9515
9516         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9517         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9518
9519 fi
9520
9521 if test -n "$cf_new_extra_cppflags" ; then
9522
9523         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9524         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9525
9526 fi
9527
9528                         cat >conftest.$ac_ext <<_ACEOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9531
9532                                 #include <limits.h>
9533                                 #include <sys/types.h>
9534
9535 int
9536 main (void)
9537 {
9538
9539                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9540                                         return 0;
9541                                 #else
9542                                 #       error GNU C library is too old
9543                                 #endif
9544   ;
9545   return 0;
9546 }
9547 _ACEOF
9548 rm -f conftest.$ac_objext
9549 if { (eval echo "$as_me:9549: \"$ac_compile\"") >&5
9550   (eval $ac_compile) 2>&5
9551   ac_status=$?
9552   echo "$as_me:9552: \$? = $ac_status" >&5
9553   (exit $ac_status); } &&
9554          { ac_try='test -s conftest.$ac_objext'
9555   { (eval echo "$as_me:9555: \"$ac_try\"") >&5
9556   (eval $ac_try) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); }; }; then
9560   cf_cv_gnu_dftsrc_219=yes
9561 else
9562   echo "$as_me: failed program was:" >&5
9563 cat conftest.$ac_ext >&5
9564 cf_cv_gnu_dftsrc_219=no
9565 fi
9566 rm -f conftest.$ac_objext conftest.$ac_ext
9567
9568 fi
9569 echo "$as_me:9569: result: $cf_cv_gnu_dftsrc_219" >&5
9570 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9571                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9572         else
9573                 cf_cv_gnu_dftsrc_219=maybe
9574         fi
9575
9576         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9577
9578                 echo "$as_me:9578: checking if we must define _GNU_SOURCE" >&5
9579 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9580 if test "${cf_cv_gnu_source+set}" = set; then
9581   echo $ECHO_N "(cached) $ECHO_C" >&6
9582 else
9583
9584                 cat >conftest.$ac_ext <<_ACEOF
9585 #line 9585 "configure"
9586 #include "confdefs.h"
9587 #include <sys/types.h>
9588 int
9589 main (void)
9590 {
9591
9592                         #ifndef _XOPEN_SOURCE
9593                         #error  expected _XOPEN_SOURCE to be defined
9594                         #endif
9595   ;
9596   return 0;
9597 }
9598 _ACEOF
9599 rm -f conftest.$ac_objext
9600 if { (eval echo "$as_me:9600: \"$ac_compile\"") >&5
9601   (eval $ac_compile) 2>&5
9602   ac_status=$?
9603   echo "$as_me:9603: \$? = $ac_status" >&5
9604   (exit $ac_status); } &&
9605          { ac_try='test -s conftest.$ac_objext'
9606   { (eval echo "$as_me:9606: \"$ac_try\"") >&5
9607   (eval $ac_try) 2>&5
9608   ac_status=$?
9609   echo "$as_me:9609: \$? = $ac_status" >&5
9610   (exit $ac_status); }; }; then
9611   cf_cv_gnu_source=no
9612 else
9613   echo "$as_me: failed program was:" >&5
9614 cat conftest.$ac_ext >&5
9615 cf_save="$CPPFLAGS"
9616
9617 cf_fix_cppflags=no
9618 cf_new_cflags=
9619 cf_new_cppflags=
9620 cf_new_extra_cppflags=
9621
9622 for cf_add_cflags in -D_GNU_SOURCE
9623 do
9624 case $cf_fix_cppflags in
9625 (no)
9626         case $cf_add_cflags in
9627         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9628                 case $cf_add_cflags in
9629                 (-D*)
9630                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9631
9632                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9633                                 && test -z "${cf_tst_cflags}" \
9634                                 && cf_fix_cppflags=yes
9635
9636                         if test $cf_fix_cppflags = yes ; then
9637
9638         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9639         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9640
9641                                 continue
9642                         elif test "${cf_tst_cflags}" = "\"'" ; then
9643
9644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9646
9647                                 continue
9648                         fi
9649                         ;;
9650                 esac
9651                 case "$CPPFLAGS" in
9652                 (*$cf_add_cflags)
9653                         ;;
9654                 (*)
9655                         case $cf_add_cflags in
9656                         (-D*)
9657                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9658
9659 CPPFLAGS=`echo "$CPPFLAGS" | \
9660         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9661                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9662
9663                                 ;;
9664                         esac
9665
9666         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9667         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9668
9669                         ;;
9670                 esac
9671                 ;;
9672         (*)
9673
9674         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9675         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9676
9677                 ;;
9678         esac
9679         ;;
9680 (yes)
9681
9682         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9683         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9684
9685         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9686
9687         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9688                 && test -z "${cf_tst_cflags}" \
9689                 && cf_fix_cppflags=no
9690         ;;
9691 esac
9692 done
9693
9694 if test -n "$cf_new_cflags" ; then
9695
9696         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9697         CFLAGS="${CFLAGS}$cf_new_cflags"
9698
9699 fi
9700
9701 if test -n "$cf_new_cppflags" ; then
9702
9703         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9704         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9705
9706 fi
9707
9708 if test -n "$cf_new_extra_cppflags" ; then
9709
9710         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9711         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9712
9713 fi
9714
9715                          cat >conftest.$ac_ext <<_ACEOF
9716 #line 9716 "configure"
9717 #include "confdefs.h"
9718 #include <sys/types.h>
9719 int
9720 main (void)
9721 {
9722
9723                                 #ifdef _XOPEN_SOURCE
9724                                 #error  expected _XOPEN_SOURCE to be undefined
9725                                 #endif
9726   ;
9727   return 0;
9728 }
9729 _ACEOF
9730 rm -f conftest.$ac_objext
9731 if { (eval echo "$as_me:9731: \"$ac_compile\"") >&5
9732   (eval $ac_compile) 2>&5
9733   ac_status=$?
9734   echo "$as_me:9734: \$? = $ac_status" >&5
9735   (exit $ac_status); } &&
9736          { ac_try='test -s conftest.$ac_objext'
9737   { (eval echo "$as_me:9737: \"$ac_try\"") >&5
9738   (eval $ac_try) 2>&5
9739   ac_status=$?
9740   echo "$as_me:9740: \$? = $ac_status" >&5
9741   (exit $ac_status); }; }; then
9742   cf_cv_gnu_source=no
9743 else
9744   echo "$as_me: failed program was:" >&5
9745 cat conftest.$ac_ext >&5
9746 cf_cv_gnu_source=yes
9747 fi
9748 rm -f conftest.$ac_objext conftest.$ac_ext
9749                         CPPFLAGS="$cf_save"
9750
9751 fi
9752 rm -f conftest.$ac_objext conftest.$ac_ext
9753
9754 fi
9755 echo "$as_me:9755: result: $cf_cv_gnu_source" >&5
9756 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9757
9758                 if test "$cf_cv_gnu_source" = yes
9759                 then
9760                 echo "$as_me:9760: checking if we should also define _DEFAULT_SOURCE" >&5
9761 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9762 if test "${cf_cv_default_source+set}" = set; then
9763   echo $ECHO_N "(cached) $ECHO_C" >&6
9764 else
9765
9766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9767         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9768
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 _DEFAULT_SOURCE
9778                                 #error  expected _DEFAULT_SOURCE to be undefined
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   cf_cv_default_source=no
9797 else
9798   echo "$as_me: failed program was:" >&5
9799 cat conftest.$ac_ext >&5
9800 cf_cv_default_source=yes
9801 fi
9802 rm -f conftest.$ac_objext conftest.$ac_ext
9803
9804 fi
9805 echo "$as_me:9805: result: $cf_cv_default_source" >&5
9806 echo "${ECHO_T}$cf_cv_default_source" >&6
9807                         if test "$cf_cv_default_source" = yes
9808                         then
9809
9810         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9811         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9812
9813                         fi
9814                 fi
9815         fi
9816
9817 fi
9818
9819         ;;
9820 (minix*)
9821         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9822         ;;
9823 (mirbsd*)
9824         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9825         cf_XOPEN_SOURCE=
9826
9827 if test "$cf_cv_posix_visible" = no; then
9828
9829 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9830
9831 cf_save_CFLAGS="$CFLAGS"
9832 cf_save_CPPFLAGS="$CPPFLAGS"
9833
9834 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9835         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9836                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9837
9838 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9839         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9840                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9841
9842 echo "$as_me:9842: checking if we should define _POSIX_C_SOURCE" >&5
9843 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9844 if test "${cf_cv_posix_c_source+set}" = set; then
9845   echo $ECHO_N "(cached) $ECHO_C" >&6
9846 else
9847
9848 echo "${as_me:-configure}:9848: testing if the symbol is already defined go no further ..." 1>&5
9849
9850         cat >conftest.$ac_ext <<_ACEOF
9851 #line 9851 "configure"
9852 #include "confdefs.h"
9853 #include <sys/types.h>
9854 int
9855 main (void)
9856 {
9857
9858 #ifndef _POSIX_C_SOURCE
9859 make an error
9860 #endif
9861   ;
9862   return 0;
9863 }
9864 _ACEOF
9865 rm -f conftest.$ac_objext
9866 if { (eval echo "$as_me:9866: \"$ac_compile\"") >&5
9867   (eval $ac_compile) 2>&5
9868   ac_status=$?
9869   echo "$as_me:9869: \$? = $ac_status" >&5
9870   (exit $ac_status); } &&
9871          { ac_try='test -s conftest.$ac_objext'
9872   { (eval echo "$as_me:9872: \"$ac_try\"") >&5
9873   (eval $ac_try) 2>&5
9874   ac_status=$?
9875   echo "$as_me:9875: \$? = $ac_status" >&5
9876   (exit $ac_status); }; }; then
9877   cf_cv_posix_c_source=no
9878 else
9879   echo "$as_me: failed program was:" >&5
9880 cat conftest.$ac_ext >&5
9881 cf_want_posix_source=no
9882          case .$cf_POSIX_C_SOURCE in
9883          (.[12]??*)
9884                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9885                 ;;
9886          (.2)
9887                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9888                 cf_want_posix_source=yes
9889                 ;;
9890          (.*)
9891                 cf_want_posix_source=yes
9892                 ;;
9893          esac
9894          if test "$cf_want_posix_source" = yes ; then
9895                 cat >conftest.$ac_ext <<_ACEOF
9896 #line 9896 "configure"
9897 #include "confdefs.h"
9898 #include <sys/types.h>
9899 int
9900 main (void)
9901 {
9902
9903 #ifdef _POSIX_SOURCE
9904 make an error
9905 #endif
9906   ;
9907   return 0;
9908 }
9909 _ACEOF
9910 rm -f conftest.$ac_objext
9911 if { (eval echo "$as_me:9911: \"$ac_compile\"") >&5
9912   (eval $ac_compile) 2>&5
9913   ac_status=$?
9914   echo "$as_me:9914: \$? = $ac_status" >&5
9915   (exit $ac_status); } &&
9916          { ac_try='test -s conftest.$ac_objext'
9917   { (eval echo "$as_me:9917: \"$ac_try\"") >&5
9918   (eval $ac_try) 2>&5
9919   ac_status=$?
9920   echo "$as_me:9920: \$? = $ac_status" >&5
9921   (exit $ac_status); }; }; then
9922   :
9923 else
9924   echo "$as_me: failed program was:" >&5
9925 cat conftest.$ac_ext >&5
9926 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9927 fi
9928 rm -f conftest.$ac_objext conftest.$ac_ext
9929          fi
9930
9931 echo "${as_me:-configure}:9931: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9932
9933          CFLAGS="$cf_trim_CFLAGS"
9934          CPPFLAGS="$cf_trim_CPPFLAGS"
9935
9936         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9937         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9938
9939 echo "${as_me:-configure}:9939: testing if the second compile does not leave our definition intact error ..." 1>&5
9940
9941          cat >conftest.$ac_ext <<_ACEOF
9942 #line 9942 "configure"
9943 #include "confdefs.h"
9944 #include <sys/types.h>
9945 int
9946 main (void)
9947 {
9948
9949 #ifndef _POSIX_C_SOURCE
9950 make an error
9951 #endif
9952   ;
9953   return 0;
9954 }
9955 _ACEOF
9956 rm -f conftest.$ac_objext
9957 if { (eval echo "$as_me:9957: \"$ac_compile\"") >&5
9958   (eval $ac_compile) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit $ac_status); } &&
9962          { ac_try='test -s conftest.$ac_objext'
9963   { (eval echo "$as_me:9963: \"$ac_try\"") >&5
9964   (eval $ac_try) 2>&5
9965   ac_status=$?
9966   echo "$as_me:9966: \$? = $ac_status" >&5
9967   (exit $ac_status); }; }; then
9968   :
9969 else
9970   echo "$as_me: failed program was:" >&5
9971 cat conftest.$ac_ext >&5
9972 cf_cv_posix_c_source=no
9973 fi
9974 rm -f conftest.$ac_objext conftest.$ac_ext
9975          CFLAGS="$cf_save_CFLAGS"
9976          CPPFLAGS="$cf_save_CPPFLAGS"
9977
9978 fi
9979 rm -f conftest.$ac_objext conftest.$ac_ext
9980
9981 fi
9982 echo "$as_me:9982: result: $cf_cv_posix_c_source" >&5
9983 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9984
9985 if test "$cf_cv_posix_c_source" != no ; then
9986         CFLAGS="$cf_trim_CFLAGS"
9987         CPPFLAGS="$cf_trim_CPPFLAGS"
9988
9989 cf_fix_cppflags=no
9990 cf_new_cflags=
9991 cf_new_cppflags=
9992 cf_new_extra_cppflags=
9993
9994 for cf_add_cflags in $cf_cv_posix_c_source
9995 do
9996 case $cf_fix_cppflags in
9997 (no)
9998         case $cf_add_cflags in
9999         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10000                 case $cf_add_cflags in
10001                 (-D*)
10002                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10003
10004                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10005                                 && test -z "${cf_tst_cflags}" \
10006                                 && cf_fix_cppflags=yes
10007
10008                         if test $cf_fix_cppflags = yes ; then
10009
10010         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10011         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10012
10013                                 continue
10014                         elif test "${cf_tst_cflags}" = "\"'" ; then
10015
10016         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10017         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10018
10019                                 continue
10020                         fi
10021                         ;;
10022                 esac
10023                 case "$CPPFLAGS" in
10024                 (*$cf_add_cflags)
10025                         ;;
10026                 (*)
10027                         case $cf_add_cflags in
10028                         (-D*)
10029                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10030
10031 CPPFLAGS=`echo "$CPPFLAGS" | \
10032         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10033                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10034
10035                                 ;;
10036                         esac
10037
10038         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10039         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10040
10041                         ;;
10042                 esac
10043                 ;;
10044         (*)
10045
10046         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10047         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10048
10049                 ;;
10050         esac
10051         ;;
10052 (yes)
10053
10054         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10055         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056
10057         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10058
10059         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10060                 && test -z "${cf_tst_cflags}" \
10061                 && cf_fix_cppflags=no
10062         ;;
10063 esac
10064 done
10065
10066 if test -n "$cf_new_cflags" ; then
10067
10068         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10069         CFLAGS="${CFLAGS}$cf_new_cflags"
10070
10071 fi
10072
10073 if test -n "$cf_new_cppflags" ; then
10074
10075         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10076         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10077
10078 fi
10079
10080 if test -n "$cf_new_extra_cppflags" ; then
10081
10082         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10083         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10084
10085 fi
10086
10087 fi
10088
10089 fi # cf_cv_posix_visible
10090
10091         ;;
10092 (netbsd*)
10093         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10094         ;;
10095 (openbsd[4-9]*)
10096         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10097         cf_xopen_source="-D_BSD_SOURCE"
10098         cf_XOPEN_SOURCE=600
10099         ;;
10100 (openbsd*)
10101         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10102         ;;
10103 (osf[45]*)
10104         cf_xopen_source="-D_OSF_SOURCE"
10105         ;;
10106 (nto-qnx*)
10107         cf_xopen_source="-D_QNX_SOURCE"
10108         ;;
10109 (sco*)
10110         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10111         ;;
10112 (solaris2.*)
10113         cf_xopen_source="-D__EXTENSIONS__"
10114         cf_cv_xopen_source=broken
10115         ;;
10116 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10117         cf_XOPEN_SOURCE=
10118         cf_POSIX_C_SOURCE=
10119         ;;
10120 (*)
10121
10122 echo "$as_me:10122: checking if we should define _XOPEN_SOURCE" >&5
10123 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10124 if test "${cf_cv_xopen_source+set}" = set; then
10125   echo $ECHO_N "(cached) $ECHO_C" >&6
10126 else
10127
10128         cat >conftest.$ac_ext <<_ACEOF
10129 #line 10129 "configure"
10130 #include "confdefs.h"
10131
10132 #include <stdlib.h>
10133 #include <string.h>
10134 #include <sys/types.h>
10135
10136 int
10137 main (void)
10138 {
10139
10140 #ifndef _XOPEN_SOURCE
10141 make an error
10142 #endif
10143   ;
10144   return 0;
10145 }
10146 _ACEOF
10147 rm -f conftest.$ac_objext
10148 if { (eval echo "$as_me:10148: \"$ac_compile\"") >&5
10149   (eval $ac_compile) 2>&5
10150   ac_status=$?
10151   echo "$as_me:10151: \$? = $ac_status" >&5
10152   (exit $ac_status); } &&
10153          { ac_try='test -s conftest.$ac_objext'
10154   { (eval echo "$as_me:10154: \"$ac_try\"") >&5
10155   (eval $ac_try) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit $ac_status); }; }; then
10159   cf_cv_xopen_source=no
10160 else
10161   echo "$as_me: failed program was:" >&5
10162 cat conftest.$ac_ext >&5
10163 cf_save="$CPPFLAGS"
10164
10165         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10166         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10167
10168          cat >conftest.$ac_ext <<_ACEOF
10169 #line 10169 "configure"
10170 #include "confdefs.h"
10171
10172 #include <stdlib.h>
10173 #include <string.h>
10174 #include <sys/types.h>
10175
10176 int
10177 main (void)
10178 {
10179
10180 #ifdef _XOPEN_SOURCE
10181 make an error
10182 #endif
10183   ;
10184   return 0;
10185 }
10186 _ACEOF
10187 rm -f conftest.$ac_objext
10188 if { (eval echo "$as_me:10188: \"$ac_compile\"") >&5
10189   (eval $ac_compile) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); } &&
10193          { ac_try='test -s conftest.$ac_objext'
10194   { (eval echo "$as_me:10194: \"$ac_try\"") >&5
10195   (eval $ac_try) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit $ac_status); }; }; then
10199   cf_cv_xopen_source=no
10200 else
10201   echo "$as_me: failed program was:" >&5
10202 cat conftest.$ac_ext >&5
10203 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10204 fi
10205 rm -f conftest.$ac_objext conftest.$ac_ext
10206         CPPFLAGS="$cf_save"
10207
10208 fi
10209 rm -f conftest.$ac_objext conftest.$ac_ext
10210
10211 fi
10212 echo "$as_me:10212: result: $cf_cv_xopen_source" >&5
10213 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10214
10215 if test "$cf_cv_xopen_source" != no ; then
10216
10217 CFLAGS=`echo "$CFLAGS" | \
10218         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10219                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10220
10221 CPPFLAGS=`echo "$CPPFLAGS" | \
10222         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10223                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10224
10225         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10226
10227 cf_fix_cppflags=no
10228 cf_new_cflags=
10229 cf_new_cppflags=
10230 cf_new_extra_cppflags=
10231
10232 for cf_add_cflags in $cf_temp_xopen_source
10233 do
10234 case $cf_fix_cppflags in
10235 (no)
10236         case $cf_add_cflags in
10237         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10238                 case $cf_add_cflags in
10239                 (-D*)
10240                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10241
10242                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10243                                 && test -z "${cf_tst_cflags}" \
10244                                 && cf_fix_cppflags=yes
10245
10246                         if test $cf_fix_cppflags = yes ; then
10247
10248         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10249         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10250
10251                                 continue
10252                         elif test "${cf_tst_cflags}" = "\"'" ; then
10253
10254         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10255         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10256
10257                                 continue
10258                         fi
10259                         ;;
10260                 esac
10261                 case "$CPPFLAGS" in
10262                 (*$cf_add_cflags)
10263                         ;;
10264                 (*)
10265                         case $cf_add_cflags in
10266                         (-D*)
10267                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10268
10269 CPPFLAGS=`echo "$CPPFLAGS" | \
10270         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10271                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10272
10273                                 ;;
10274                         esac
10275
10276         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10277         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10278
10279                         ;;
10280                 esac
10281                 ;;
10282         (*)
10283
10284         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10285         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10286
10287                 ;;
10288         esac
10289         ;;
10290 (yes)
10291
10292         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10293         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10294
10295         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10296
10297         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10298                 && test -z "${cf_tst_cflags}" \
10299                 && cf_fix_cppflags=no
10300         ;;
10301 esac
10302 done
10303
10304 if test -n "$cf_new_cflags" ; then
10305
10306         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10307         CFLAGS="${CFLAGS}$cf_new_cflags"
10308
10309 fi
10310
10311 if test -n "$cf_new_cppflags" ; then
10312
10313         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10314         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10315
10316 fi
10317
10318 if test -n "$cf_new_extra_cppflags" ; then
10319
10320         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10321         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10322
10323 fi
10324
10325 fi
10326
10327 if test "$cf_cv_posix_visible" = no; then
10328
10329 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10330
10331 cf_save_CFLAGS="$CFLAGS"
10332 cf_save_CPPFLAGS="$CPPFLAGS"
10333
10334 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10335         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10336                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10337
10338 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10339         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10340                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10341
10342 echo "$as_me:10342: checking if we should define _POSIX_C_SOURCE" >&5
10343 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10344 if test "${cf_cv_posix_c_source+set}" = set; then
10345   echo $ECHO_N "(cached) $ECHO_C" >&6
10346 else
10347
10348 echo "${as_me:-configure}:10348: testing if the symbol is already defined go no further ..." 1>&5
10349
10350         cat >conftest.$ac_ext <<_ACEOF
10351 #line 10351 "configure"
10352 #include "confdefs.h"
10353 #include <sys/types.h>
10354 int
10355 main (void)
10356 {
10357
10358 #ifndef _POSIX_C_SOURCE
10359 make an error
10360 #endif
10361   ;
10362   return 0;
10363 }
10364 _ACEOF
10365 rm -f conftest.$ac_objext
10366 if { (eval echo "$as_me:10366: \"$ac_compile\"") >&5
10367   (eval $ac_compile) 2>&5
10368   ac_status=$?
10369   echo "$as_me:10369: \$? = $ac_status" >&5
10370   (exit $ac_status); } &&
10371          { ac_try='test -s conftest.$ac_objext'
10372   { (eval echo "$as_me:10372: \"$ac_try\"") >&5
10373   (eval $ac_try) 2>&5
10374   ac_status=$?
10375   echo "$as_me:10375: \$? = $ac_status" >&5
10376   (exit $ac_status); }; }; then
10377   cf_cv_posix_c_source=no
10378 else
10379   echo "$as_me: failed program was:" >&5
10380 cat conftest.$ac_ext >&5
10381 cf_want_posix_source=no
10382          case .$cf_POSIX_C_SOURCE in
10383          (.[12]??*)
10384                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10385                 ;;
10386          (.2)
10387                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10388                 cf_want_posix_source=yes
10389                 ;;
10390          (.*)
10391                 cf_want_posix_source=yes
10392                 ;;
10393          esac
10394          if test "$cf_want_posix_source" = yes ; then
10395                 cat >conftest.$ac_ext <<_ACEOF
10396 #line 10396 "configure"
10397 #include "confdefs.h"
10398 #include <sys/types.h>
10399 int
10400 main (void)
10401 {
10402
10403 #ifdef _POSIX_SOURCE
10404 make an error
10405 #endif
10406   ;
10407   return 0;
10408 }
10409 _ACEOF
10410 rm -f conftest.$ac_objext
10411 if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
10412   (eval $ac_compile) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); } &&
10416          { ac_try='test -s conftest.$ac_objext'
10417   { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:10420: \$? = $ac_status" >&5
10421   (exit $ac_status); }; }; then
10422   :
10423 else
10424   echo "$as_me: failed program was:" >&5
10425 cat conftest.$ac_ext >&5
10426 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10427 fi
10428 rm -f conftest.$ac_objext conftest.$ac_ext
10429          fi
10430
10431 echo "${as_me:-configure}:10431: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10432
10433          CFLAGS="$cf_trim_CFLAGS"
10434          CPPFLAGS="$cf_trim_CPPFLAGS"
10435
10436         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10437         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10438
10439 echo "${as_me:-configure}:10439: testing if the second compile does not leave our definition intact error ..." 1>&5
10440
10441          cat >conftest.$ac_ext <<_ACEOF
10442 #line 10442 "configure"
10443 #include "confdefs.h"
10444 #include <sys/types.h>
10445 int
10446 main (void)
10447 {
10448
10449 #ifndef _POSIX_C_SOURCE
10450 make an error
10451 #endif
10452   ;
10453   return 0;
10454 }
10455 _ACEOF
10456 rm -f conftest.$ac_objext
10457 if { (eval echo "$as_me:10457: \"$ac_compile\"") >&5
10458   (eval $ac_compile) 2>&5
10459   ac_status=$?
10460   echo "$as_me:10460: \$? = $ac_status" >&5
10461   (exit $ac_status); } &&
10462          { ac_try='test -s conftest.$ac_objext'
10463   { (eval echo "$as_me:10463: \"$ac_try\"") >&5
10464   (eval $ac_try) 2>&5
10465   ac_status=$?
10466   echo "$as_me:10466: \$? = $ac_status" >&5
10467   (exit $ac_status); }; }; then
10468   :
10469 else
10470   echo "$as_me: failed program was:" >&5
10471 cat conftest.$ac_ext >&5
10472 cf_cv_posix_c_source=no
10473 fi
10474 rm -f conftest.$ac_objext conftest.$ac_ext
10475          CFLAGS="$cf_save_CFLAGS"
10476          CPPFLAGS="$cf_save_CPPFLAGS"
10477
10478 fi
10479 rm -f conftest.$ac_objext conftest.$ac_ext
10480
10481 fi
10482 echo "$as_me:10482: result: $cf_cv_posix_c_source" >&5
10483 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10484
10485 if test "$cf_cv_posix_c_source" != no ; then
10486         CFLAGS="$cf_trim_CFLAGS"
10487         CPPFLAGS="$cf_trim_CPPFLAGS"
10488
10489 cf_fix_cppflags=no
10490 cf_new_cflags=
10491 cf_new_cppflags=
10492 cf_new_extra_cppflags=
10493
10494 for cf_add_cflags in $cf_cv_posix_c_source
10495 do
10496 case $cf_fix_cppflags in
10497 (no)
10498         case $cf_add_cflags in
10499         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10500                 case $cf_add_cflags in
10501                 (-D*)
10502                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10503
10504                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10505                                 && test -z "${cf_tst_cflags}" \
10506                                 && cf_fix_cppflags=yes
10507
10508                         if test $cf_fix_cppflags = yes ; then
10509
10510         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10511         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10512
10513                                 continue
10514                         elif test "${cf_tst_cflags}" = "\"'" ; then
10515
10516         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10517         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10518
10519                                 continue
10520                         fi
10521                         ;;
10522                 esac
10523                 case "$CPPFLAGS" in
10524                 (*$cf_add_cflags)
10525                         ;;
10526                 (*)
10527                         case $cf_add_cflags in
10528                         (-D*)
10529                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10530
10531 CPPFLAGS=`echo "$CPPFLAGS" | \
10532         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10533                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10534
10535                                 ;;
10536                         esac
10537
10538         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10539         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10540
10541                         ;;
10542                 esac
10543                 ;;
10544         (*)
10545
10546         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10547         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10548
10549                 ;;
10550         esac
10551         ;;
10552 (yes)
10553
10554         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10555         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10556
10557         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10558
10559         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10560                 && test -z "${cf_tst_cflags}" \
10561                 && cf_fix_cppflags=no
10562         ;;
10563 esac
10564 done
10565
10566 if test -n "$cf_new_cflags" ; then
10567
10568         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10569         CFLAGS="${CFLAGS}$cf_new_cflags"
10570
10571 fi
10572
10573 if test -n "$cf_new_cppflags" ; then
10574
10575         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10576         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10577
10578 fi
10579
10580 if test -n "$cf_new_extra_cppflags" ; then
10581
10582         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10583         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10584
10585 fi
10586
10587 fi
10588
10589 fi # cf_cv_posix_visible
10590
10591         ;;
10592 esac
10593
10594 if test -n "$cf_xopen_source" ; then
10595
10596 cf_fix_cppflags=no
10597 cf_new_cflags=
10598 cf_new_cppflags=
10599 cf_new_extra_cppflags=
10600
10601 for cf_add_cflags in $cf_xopen_source
10602 do
10603 case $cf_fix_cppflags in
10604 (no)
10605         case $cf_add_cflags in
10606         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10607                 case $cf_add_cflags in
10608                 (-D*)
10609                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10610
10611                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10612                                 && test -z "${cf_tst_cflags}" \
10613                                 && cf_fix_cppflags=yes
10614
10615                         if test $cf_fix_cppflags = yes ; then
10616
10617         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10618         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10619
10620                                 continue
10621                         elif test "${cf_tst_cflags}" = "\"'" ; then
10622
10623         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10624         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10625
10626                                 continue
10627                         fi
10628                         ;;
10629                 esac
10630                 case "$CPPFLAGS" in
10631                 (*$cf_add_cflags)
10632                         ;;
10633                 (*)
10634                         case $cf_add_cflags in
10635                         (-D*)
10636                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10637
10638 CPPFLAGS=`echo "$CPPFLAGS" | \
10639         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10640                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10641
10642                                 ;;
10643                         esac
10644
10645         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10646         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10647
10648                         ;;
10649                 esac
10650                 ;;
10651         (*)
10652
10653         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10654         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10655
10656                 ;;
10657         esac
10658         ;;
10659 (yes)
10660
10661         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10662         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10663
10664         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10665
10666         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10667                 && test -z "${cf_tst_cflags}" \
10668                 && cf_fix_cppflags=no
10669         ;;
10670 esac
10671 done
10672
10673 if test -n "$cf_new_cflags" ; then
10674         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10675
10676 echo "${as_me:-configure}:10676: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10677
10678         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10679         CFLAGS="${CFLAGS}$cf_new_cflags"
10680
10681 fi
10682
10683 if test -n "$cf_new_cppflags" ; then
10684         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10685
10686 echo "${as_me:-configure}:10686: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10687
10688         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10689         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10690
10691 fi
10692
10693 if test -n "$cf_new_extra_cppflags" ; then
10694         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10695
10696 echo "${as_me:-configure}:10696: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10697
10698         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10699         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10700
10701 fi
10702
10703 fi
10704
10705 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10706         echo "$as_me:10706: checking if _XOPEN_SOURCE really is set" >&5
10707 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10708         cat >conftest.$ac_ext <<_ACEOF
10709 #line 10709 "configure"
10710 #include "confdefs.h"
10711 #include <stdlib.h>
10712 int
10713 main (void)
10714 {
10715
10716 #ifndef _XOPEN_SOURCE
10717 make an error
10718 #endif
10719   ;
10720   return 0;
10721 }
10722 _ACEOF
10723 rm -f conftest.$ac_objext
10724 if { (eval echo "$as_me:10724: \"$ac_compile\"") >&5
10725   (eval $ac_compile) 2>&5
10726   ac_status=$?
10727   echo "$as_me:10727: \$? = $ac_status" >&5
10728   (exit $ac_status); } &&
10729          { ac_try='test -s conftest.$ac_objext'
10730   { (eval echo "$as_me:10730: \"$ac_try\"") >&5
10731   (eval $ac_try) 2>&5
10732   ac_status=$?
10733   echo "$as_me:10733: \$? = $ac_status" >&5
10734   (exit $ac_status); }; }; then
10735   cf_XOPEN_SOURCE_set=yes
10736 else
10737   echo "$as_me: failed program was:" >&5
10738 cat conftest.$ac_ext >&5
10739 cf_XOPEN_SOURCE_set=no
10740 fi
10741 rm -f conftest.$ac_objext conftest.$ac_ext
10742         echo "$as_me:10742: result: $cf_XOPEN_SOURCE_set" >&5
10743 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10744         if test $cf_XOPEN_SOURCE_set = yes
10745         then
10746                 cat >conftest.$ac_ext <<_ACEOF
10747 #line 10747 "configure"
10748 #include "confdefs.h"
10749 #include <stdlib.h>
10750 int
10751 main (void)
10752 {
10753
10754 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10755 make an error
10756 #endif
10757   ;
10758   return 0;
10759 }
10760 _ACEOF
10761 rm -f conftest.$ac_objext
10762 if { (eval echo "$as_me:10762: \"$ac_compile\"") >&5
10763   (eval $ac_compile) 2>&5
10764   ac_status=$?
10765   echo "$as_me:10765: \$? = $ac_status" >&5
10766   (exit $ac_status); } &&
10767          { ac_try='test -s conftest.$ac_objext'
10768   { (eval echo "$as_me:10768: \"$ac_try\"") >&5
10769   (eval $ac_try) 2>&5
10770   ac_status=$?
10771   echo "$as_me:10771: \$? = $ac_status" >&5
10772   (exit $ac_status); }; }; then
10773   cf_XOPEN_SOURCE_set_ok=yes
10774 else
10775   echo "$as_me: failed program was:" >&5
10776 cat conftest.$ac_ext >&5
10777 cf_XOPEN_SOURCE_set_ok=no
10778 fi
10779 rm -f conftest.$ac_objext conftest.$ac_ext
10780                 if test $cf_XOPEN_SOURCE_set_ok = no
10781                 then
10782                         { echo "$as_me:10782: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10783 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10784                 fi
10785         else
10786
10787 echo "$as_me:10787: checking if we should define _XOPEN_SOURCE" >&5
10788 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10789 if test "${cf_cv_xopen_source+set}" = set; then
10790   echo $ECHO_N "(cached) $ECHO_C" >&6
10791 else
10792
10793         cat >conftest.$ac_ext <<_ACEOF
10794 #line 10794 "configure"
10795 #include "confdefs.h"
10796
10797 #include <stdlib.h>
10798 #include <string.h>
10799 #include <sys/types.h>
10800
10801 int
10802 main (void)
10803 {
10804
10805 #ifndef _XOPEN_SOURCE
10806 make an error
10807 #endif
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f conftest.$ac_objext
10813 if { (eval echo "$as_me:10813: \"$ac_compile\"") >&5
10814   (eval $ac_compile) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit $ac_status); } &&
10818          { ac_try='test -s conftest.$ac_objext'
10819   { (eval echo "$as_me:10819: \"$ac_try\"") >&5
10820   (eval $ac_try) 2>&5
10821   ac_status=$?
10822   echo "$as_me:10822: \$? = $ac_status" >&5
10823   (exit $ac_status); }; }; then
10824   cf_cv_xopen_source=no
10825 else
10826   echo "$as_me: failed program was:" >&5
10827 cat conftest.$ac_ext >&5
10828 cf_save="$CPPFLAGS"
10829
10830         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10831         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10832
10833          cat >conftest.$ac_ext <<_ACEOF
10834 #line 10834 "configure"
10835 #include "confdefs.h"
10836
10837 #include <stdlib.h>
10838 #include <string.h>
10839 #include <sys/types.h>
10840
10841 int
10842 main (void)
10843 {
10844
10845 #ifdef _XOPEN_SOURCE
10846 make an error
10847 #endif
10848   ;
10849   return 0;
10850 }
10851 _ACEOF
10852 rm -f conftest.$ac_objext
10853 if { (eval echo "$as_me:10853: \"$ac_compile\"") >&5
10854   (eval $ac_compile) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); } &&
10858          { ac_try='test -s conftest.$ac_objext'
10859   { (eval echo "$as_me:10859: \"$ac_try\"") >&5
10860   (eval $ac_try) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit $ac_status); }; }; then
10864   cf_cv_xopen_source=no
10865 else
10866   echo "$as_me: failed program was:" >&5
10867 cat conftest.$ac_ext >&5
10868 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10869 fi
10870 rm -f conftest.$ac_objext conftest.$ac_ext
10871         CPPFLAGS="$cf_save"
10872
10873 fi
10874 rm -f conftest.$ac_objext conftest.$ac_ext
10875
10876 fi
10877 echo "$as_me:10877: result: $cf_cv_xopen_source" >&5
10878 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10879
10880 if test "$cf_cv_xopen_source" != no ; then
10881
10882 CFLAGS=`echo "$CFLAGS" | \
10883         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10884                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10885
10886 CPPFLAGS=`echo "$CPPFLAGS" | \
10887         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10888                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10889
10890         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10891
10892 cf_fix_cppflags=no
10893 cf_new_cflags=
10894 cf_new_cppflags=
10895 cf_new_extra_cppflags=
10896
10897 for cf_add_cflags in $cf_temp_xopen_source
10898 do
10899 case $cf_fix_cppflags in
10900 (no)
10901         case $cf_add_cflags in
10902         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10903                 case $cf_add_cflags in
10904                 (-D*)
10905                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10906
10907                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10908                                 && test -z "${cf_tst_cflags}" \
10909                                 && cf_fix_cppflags=yes
10910
10911                         if test $cf_fix_cppflags = yes ; then
10912
10913         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10914         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10915
10916                                 continue
10917                         elif test "${cf_tst_cflags}" = "\"'" ; then
10918
10919         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10920         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10921
10922                                 continue
10923                         fi
10924                         ;;
10925                 esac
10926                 case "$CPPFLAGS" in
10927                 (*$cf_add_cflags)
10928                         ;;
10929                 (*)
10930                         case $cf_add_cflags in
10931                         (-D*)
10932                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10933
10934 CPPFLAGS=`echo "$CPPFLAGS" | \
10935         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10936                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10937
10938                                 ;;
10939                         esac
10940
10941         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10942         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10943
10944                         ;;
10945                 esac
10946                 ;;
10947         (*)
10948
10949         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10950         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10951
10952                 ;;
10953         esac
10954         ;;
10955 (yes)
10956
10957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10959
10960         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10961
10962         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10963                 && test -z "${cf_tst_cflags}" \
10964                 && cf_fix_cppflags=no
10965         ;;
10966 esac
10967 done
10968
10969 if test -n "$cf_new_cflags" ; then
10970
10971         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10972         CFLAGS="${CFLAGS}$cf_new_cflags"
10973
10974 fi
10975
10976 if test -n "$cf_new_cppflags" ; then
10977
10978         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10979         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10980
10981 fi
10982
10983 if test -n "$cf_new_extra_cppflags" ; then
10984
10985         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10986         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10987
10988 fi
10989
10990 fi
10991
10992         fi
10993 fi
10994 fi # cf_cv_posix_visible
10995
10996 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10997
10998 # Work around breakage on OS X
10999
11000 echo "$as_me:11000: checking if SIGWINCH is defined" >&5
11001 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11002 if test "${cf_cv_define_sigwinch+set}" = set; then
11003   echo $ECHO_N "(cached) $ECHO_C" >&6
11004 else
11005
11006         cat >conftest.$ac_ext <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009
11010 #include <sys/types.h>
11011 #include <sys/signal.h>
11012
11013 int
11014 main (void)
11015 {
11016 int x = SIGWINCH
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f conftest.$ac_objext
11022 if { (eval echo "$as_me:11022: \"$ac_compile\"") >&5
11023   (eval $ac_compile) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit $ac_status); } &&
11027          { ac_try='test -s conftest.$ac_objext'
11028   { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit $ac_status); }; }; then
11033   cf_cv_define_sigwinch=yes
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 cat conftest.$ac_ext >&5
11037 cat >conftest.$ac_ext <<_ACEOF
11038 #line 11038 "configure"
11039 #include "confdefs.h"
11040
11041 #undef _XOPEN_SOURCE
11042 #undef _POSIX_SOURCE
11043 #undef _POSIX_C_SOURCE
11044 #include <sys/types.h>
11045 #include <sys/signal.h>
11046
11047 int
11048 main (void)
11049 {
11050 int x = SIGWINCH
11051   ;
11052   return 0;
11053 }
11054 _ACEOF
11055 rm -f conftest.$ac_objext
11056 if { (eval echo "$as_me:11056: \"$ac_compile\"") >&5
11057   (eval $ac_compile) 2>&5
11058   ac_status=$?
11059   echo "$as_me:11059: \$? = $ac_status" >&5
11060   (exit $ac_status); } &&
11061          { ac_try='test -s conftest.$ac_objext'
11062   { (eval echo "$as_me:11062: \"$ac_try\"") >&5
11063   (eval $ac_try) 2>&5
11064   ac_status=$?
11065   echo "$as_me:11065: \$? = $ac_status" >&5
11066   (exit $ac_status); }; }; then
11067   cf_cv_define_sigwinch=maybe
11068 else
11069   echo "$as_me: failed program was:" >&5
11070 cat conftest.$ac_ext >&5
11071 cf_cv_define_sigwinch=no
11072 fi
11073 rm -f conftest.$ac_objext conftest.$ac_ext
11074
11075 fi
11076 rm -f conftest.$ac_objext conftest.$ac_ext
11077
11078 fi
11079 echo "$as_me:11079: result: $cf_cv_define_sigwinch" >&5
11080 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11081
11082 if test "$cf_cv_define_sigwinch" = maybe ; then
11083 echo "$as_me:11083: checking for actual SIGWINCH definition" >&5
11084 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11085 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11086   echo $ECHO_N "(cached) $ECHO_C" >&6
11087 else
11088
11089 cf_cv_fixup_sigwinch=unknown
11090 cf_sigwinch=32
11091 while test $cf_sigwinch != 1
11092 do
11093         cat >conftest.$ac_ext <<_ACEOF
11094 #line 11094 "configure"
11095 #include "confdefs.h"
11096
11097 #undef _XOPEN_SOURCE
11098 #undef _POSIX_SOURCE
11099 #undef _POSIX_C_SOURCE
11100 #include <sys/types.h>
11101 #include <sys/signal.h>
11102
11103 int
11104 main (void)
11105 {
11106
11107 #if SIGWINCH != $cf_sigwinch
11108 make an error
11109 #endif
11110 int x = SIGWINCH
11111   ;
11112   return 0;
11113 }
11114 _ACEOF
11115 rm -f conftest.$ac_objext
11116 if { (eval echo "$as_me:11116: \"$ac_compile\"") >&5
11117   (eval $ac_compile) 2>&5
11118   ac_status=$?
11119   echo "$as_me:11119: \$? = $ac_status" >&5
11120   (exit $ac_status); } &&
11121          { ac_try='test -s conftest.$ac_objext'
11122   { (eval echo "$as_me:11122: \"$ac_try\"") >&5
11123   (eval $ac_try) 2>&5
11124   ac_status=$?
11125   echo "$as_me:11125: \$? = $ac_status" >&5
11126   (exit $ac_status); }; }; then
11127   cf_cv_fixup_sigwinch=$cf_sigwinch
11128          break
11129 else
11130   echo "$as_me: failed program was:" >&5
11131 cat conftest.$ac_ext >&5
11132 fi
11133 rm -f conftest.$ac_objext conftest.$ac_ext
11134
11135 cf_sigwinch=`expr $cf_sigwinch - 1`
11136 done
11137
11138 fi
11139 echo "$as_me:11139: result: $cf_cv_fixup_sigwinch" >&5
11140 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11141
11142         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11143                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11144         fi
11145 fi
11146
11147 # Checks for CODESET support.
11148
11149 echo "$as_me:11149: checking for nl_langinfo and CODESET" >&5
11150 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11151 if test "${am_cv_langinfo_codeset+set}" = set; then
11152   echo $ECHO_N "(cached) $ECHO_C" >&6
11153 else
11154   cat >conftest.$ac_ext <<_ACEOF
11155 #line 11155 "configure"
11156 #include "confdefs.h"
11157 #include <langinfo.h>
11158 int
11159 main (void)
11160 {
11161 char* cs = nl_langinfo(CODESET);
11162   ;
11163   return 0;
11164 }
11165 _ACEOF
11166 rm -f conftest.$ac_objext conftest$ac_exeext
11167 if { (eval echo "$as_me:11167: \"$ac_link\"") >&5
11168   (eval $ac_link) 2>&5
11169   ac_status=$?
11170   echo "$as_me:11170: \$? = $ac_status" >&5
11171   (exit $ac_status); } &&
11172          { ac_try='test -s conftest$ac_exeext'
11173   { (eval echo "$as_me:11173: \"$ac_try\"") >&5
11174   (eval $ac_try) 2>&5
11175   ac_status=$?
11176   echo "$as_me:11176: \$? = $ac_status" >&5
11177   (exit $ac_status); }; }; then
11178   am_cv_langinfo_codeset=yes
11179 else
11180   echo "$as_me: failed program was:" >&5
11181 cat conftest.$ac_ext >&5
11182 am_cv_langinfo_codeset=no
11183 fi
11184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11185
11186 fi
11187 echo "$as_me:11187: result: $am_cv_langinfo_codeset" >&5
11188 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11189         if test $am_cv_langinfo_codeset = yes; then
11190
11191 cat >>confdefs.h <<\EOF
11192 #define HAVE_LANGINFO_CODESET 1
11193 EOF
11194
11195         fi
11196
11197 # use these variables to work around a defect in gcc's fixincludes.
11198 NCURSES_OK_WCHAR_T=
11199 NCURSES_OK_WINT_T=
11200
11201 echo "$as_me:11201: checking if you want wide-character code" >&5
11202 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11203
11204 # Check whether --enable-widec or --disable-widec was given.
11205 if test "${enable_widec+set}" = set; then
11206   enableval="$enable_widec"
11207   with_widec=$enableval
11208 else
11209   with_widec=no
11210 fi;
11211 echo "$as_me:11211: result: $with_widec" >&5
11212 echo "${ECHO_T}$with_widec" >&6
11213
11214 NCURSES_WCWIDTH_GRAPHICS=1
11215
11216 if test "x$with_widec" = xyes ; then
11217         if test "x$disable_lib_suffixes" = xno ; then
11218                 LIB_SUFFIX="w${LIB_SUFFIX}"
11219         fi
11220
11221 cat >>confdefs.h <<\EOF
11222 #define USE_WIDEC_SUPPORT 1
11223 EOF
11224
11225 cat >>confdefs.h <<\EOF
11226 #define NCURSES_WIDECHAR 1
11227 EOF
11228
11229 for ac_header in \
11230 wchar.h \
11231 wctype.h \
11232
11233 do
11234 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11235 echo "$as_me:11235: checking for $ac_header" >&5
11236 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11237 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11238   echo $ECHO_N "(cached) $ECHO_C" >&6
11239 else
11240   cat >conftest.$ac_ext <<_ACEOF
11241 #line 11241 "configure"
11242 #include "confdefs.h"
11243 #include <$ac_header>
11244 _ACEOF
11245 if { (eval echo "$as_me:11245: \"$ac_cpp conftest.$ac_ext\"") >&5
11246   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11247   ac_status=$?
11248   egrep -v '^ *\+' conftest.er1 >conftest.err
11249   rm -f conftest.er1
11250   cat conftest.err >&5
11251   echo "$as_me:11251: \$? = $ac_status" >&5
11252   (exit $ac_status); } >/dev/null; then
11253   if test -s conftest.err; then
11254     ac_cpp_err=$ac_c_preproc_warn_flag
11255   else
11256     ac_cpp_err=
11257   fi
11258 else
11259   ac_cpp_err=yes
11260 fi
11261 if test -z "$ac_cpp_err"; then
11262   eval "$as_ac_Header=yes"
11263 else
11264   echo "$as_me: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   eval "$as_ac_Header=no"
11267 fi
11268 rm -f conftest.err conftest.$ac_ext
11269 fi
11270 echo "$as_me:11270: result: `eval echo '${'$as_ac_Header'}'`" >&5
11271 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11272 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11273   cat >>confdefs.h <<EOF
11274 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11275 EOF
11276
11277 fi
11278 done
11279
11280 echo "$as_me:11280: checking if wchar.h can be used as is" >&5
11281 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11282 if test "${cf_cv_wchar_h_okay+set}" = set; then
11283   echo $ECHO_N "(cached) $ECHO_C" >&6
11284 else
11285
11286 cat >conftest.$ac_ext <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11289
11290 #include <stdlib.h>
11291 #ifdef HAVE_WCHAR_H
11292 #include <wchar.h>
11293 #endif
11294 #ifdef HAVE_WCTYPE_H
11295 #include <wctype.h>
11296 #endif
11297
11298 int
11299 main (void)
11300 {
11301
11302         wint_t foo = 0;
11303         int bar = iswpunct(foo)
11304   ;
11305   return 0;
11306 }
11307 _ACEOF
11308 rm -f conftest.$ac_objext
11309 if { (eval echo "$as_me:11309: \"$ac_compile\"") >&5
11310   (eval $ac_compile) 2>&5
11311   ac_status=$?
11312   echo "$as_me:11312: \$? = $ac_status" >&5
11313   (exit $ac_status); } &&
11314          { ac_try='test -s conftest.$ac_objext'
11315   { (eval echo "$as_me:11315: \"$ac_try\"") >&5
11316   (eval $ac_try) 2>&5
11317   ac_status=$?
11318   echo "$as_me:11318: \$? = $ac_status" >&5
11319   (exit $ac_status); }; }; then
11320   cf_cv_wchar_h_okay=yes
11321 else
11322   echo "$as_me: failed program was:" >&5
11323 cat conftest.$ac_ext >&5
11324 cf_cv_wchar_h_okay=no
11325 fi
11326 rm -f conftest.$ac_objext conftest.$ac_ext
11327 fi
11328 echo "$as_me:11328: result: $cf_cv_wchar_h_okay" >&5
11329 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11330
11331 if test $cf_cv_wchar_h_okay = no
11332 then
11333
11334 echo "$as_me:11334: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11335 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11336 cat >conftest.$ac_ext <<_ACEOF
11337 #line 11337 "configure"
11338 #include "confdefs.h"
11339 #include <sys/types.h>
11340
11341 int
11342 main (void)
11343 {
11344
11345 #ifndef _XOPEN_SOURCE_EXTENDED
11346 make an error
11347 #endif
11348   ;
11349   return 0;
11350 }
11351 _ACEOF
11352 rm -f conftest.$ac_objext
11353 if { (eval echo "$as_me:11353: \"$ac_compile\"") >&5
11354   (eval $ac_compile) 2>&5
11355   ac_status=$?
11356   echo "$as_me:11356: \$? = $ac_status" >&5
11357   (exit $ac_status); } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:11359: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:11362: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364   cf_result=no
11365 else
11366   echo "$as_me: failed program was:" >&5
11367 cat conftest.$ac_ext >&5
11368 cf_result=yes
11369 fi
11370 rm -f conftest.$ac_objext conftest.$ac_ext
11371 echo "$as_me:11371: result: $cf_result" >&5
11372 echo "${ECHO_T}$cf_result" >&6
11373
11374 if test "$cf_result" = yes ; then
11375         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11376 elif test "x" != "x" ; then
11377         echo "$as_me:11377: checking checking for compatible value versus " >&5
11378 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11379         cat >conftest.$ac_ext <<_ACEOF
11380 #line 11380 "configure"
11381 #include "confdefs.h"
11382 #include <sys/types.h>
11383
11384 int
11385 main (void)
11386 {
11387
11388 #if _XOPEN_SOURCE_EXTENDED- < 0
11389 make an error
11390 #endif
11391   ;
11392   return 0;
11393 }
11394 _ACEOF
11395 rm -f conftest.$ac_objext
11396 if { (eval echo "$as_me:11396: \"$ac_compile\"") >&5
11397   (eval $ac_compile) 2>&5
11398   ac_status=$?
11399   echo "$as_me:11399: \$? = $ac_status" >&5
11400   (exit $ac_status); } &&
11401          { ac_try='test -s conftest.$ac_objext'
11402   { (eval echo "$as_me:11402: \"$ac_try\"") >&5
11403   (eval $ac_try) 2>&5
11404   ac_status=$?
11405   echo "$as_me:11405: \$? = $ac_status" >&5
11406   (exit $ac_status); }; }; then
11407   cf_result=yes
11408 else
11409   echo "$as_me: failed program was:" >&5
11410 cat conftest.$ac_ext >&5
11411 cf_result=no
11412 fi
11413 rm -f conftest.$ac_objext conftest.$ac_ext
11414         echo "$as_me:11414: result: $cf_result" >&5
11415 echo "${ECHO_T}$cf_result" >&6
11416         if test "$cf_result" = no ; then
11417                 # perhaps we can override it - try...
11418                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11419         fi
11420 fi
11421
11422 fi
11423
11424 echo "$as_me:11424: checking if wcwidth agrees graphics are single-width" >&5
11425 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11426 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11427   echo $ECHO_N "(cached) $ECHO_C" >&6
11428 else
11429
11430 cat >conftest.in <<CF_EOF
11431 -       VT100 symbols
11432 0x250c  upper left corner
11433 0x2514  lower left corner
11434 0x2510  upper right corner
11435 0x2518  lower right corner
11436 0x251c  tee pointing left
11437 0x2524  tee pointing right
11438 0x2534  tee pointing up
11439 0x252c  tee pointing down
11440 0x2500  horizontal line
11441 0x2502  vertical line
11442 0x253c  large plus or crossover
11443 0x23ba  scan line 1
11444 0x23bd  scan line 9
11445 0x25c6  diamond
11446 0x2592  checker board (stipple)
11447 0x00b0  degree symbol
11448 0x00b1  plus/minus
11449 0x00b7  bullet
11450 -       Teletype 5410v1 symbols
11451 0x2190  arrow pointing left
11452 0x2192  arrow pointing right
11453 0x2193  arrow pointing down
11454 0x2191  arrow pointing up
11455 0x2592  board of squares
11456 0x2603  lantern symbol
11457 0x25ae  solid square block
11458 -       these defaults were invented for ncurses
11459 0x23bb  scan line 3
11460 0x23bc  scan line 7
11461 0x2264  less-than-or-equal-to
11462 0x2265  greater-than-or-equal-to
11463 0x03c0  greek pi
11464 0x2260  not-equal
11465 0x00a3  pound-sterling symbol
11466 -       thick-line-drawing
11467 0x250f  upper left corner
11468 0x2517  lower left corner
11469 0x2513  upper right corner
11470 0x251b  lower right corner
11471 0x2523  tee pointing left
11472 0x252b  tee pointing right
11473 0x253b  tee pointing up
11474 0x2533  tee pointing down
11475 0x2501  horizontal line
11476 0x2503  vertical line
11477 0x254b  large plus or crossover
11478 -       double-line-drawing
11479 0x2554  upper left corner
11480 0x255a  lower left corner
11481 0x2557  upper right corner
11482 0x255d  lower right corner
11483 0x2563  tee pointing left
11484 0x2560  tee pointing right
11485 0x2569  tee pointing up
11486 0x2566  tee pointing down
11487 0x2550  horizontal line
11488 0x2551  vertical line
11489 0x256c  large plus or crossover
11490 CF_EOF
11491 if test "$cross_compiling" = yes; then
11492   cf_cv_wcwidth_graphics=unknown
11493 else
11494   cat >conftest.$ac_ext <<_ACEOF
11495 #line 11495 "configure"
11496 #include "confdefs.h"
11497
11498 #include <locale.h>
11499 #include <stdio.h>
11500 #include <wchar.h>
11501
11502 #define MY_LEN 80
11503
11504 int
11505 main(void)
11506 {
11507         FILE *fp;
11508         int value;
11509         char buffer[MY_LEN + 1];
11510         char notes[MY_LEN + 1];
11511         int totals = 0;
11512         int passed = 0;
11513
11514         if (setlocale(LC_ALL, "en_US.UTF8") ||
11515                 setlocale(LC_ALL, "en_US.UTF-8") ||
11516                 setlocale(LC_ALL, "en_US.utf8") ||
11517                 setlocale(LC_ALL, "en_US.utf-8")) {
11518                 if ((fp = fopen("conftest.in", "r")) != 0) {
11519                         while (fgets(buffer, MY_LEN, fp) != 0) {
11520                                 if (*buffer == '-') {
11521                                         fprintf(stderr, "\t%s", buffer);
11522                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11523                                         ++totals;
11524                                         if (wcwidth(value) == 1)
11525                                                 ++passed;
11526                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11527                                 } else {
11528                                         fprintf(stderr, "?\t%s", buffer);
11529                                 }
11530                         }
11531                 }
11532         }
11533         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11534         return (totals == passed) ? 0 : 1;
11535 }
11536
11537 _ACEOF
11538 rm -f conftest$ac_exeext
11539 if { (eval echo "$as_me:11539: \"$ac_link\"") >&5
11540   (eval $ac_link) 2>&5
11541   ac_status=$?
11542   echo "$as_me:11542: \$? = $ac_status" >&5
11543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11544   { (eval echo "$as_me:11544: \"$ac_try\"") >&5
11545   (eval $ac_try) 2>&5
11546   ac_status=$?
11547   echo "$as_me:11547: \$? = $ac_status" >&5
11548   (exit $ac_status); }; }; then
11549   cf_cv_wcwidth_graphics=yes
11550 else
11551   echo "$as_me: program exited with status $ac_status" >&5
11552 echo "$as_me: failed program was:" >&5
11553 cat conftest.$ac_ext >&5
11554 cf_cv_wcwidth_graphics=no
11555 fi
11556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11557 fi
11558
11559 fi
11560 echo "$as_me:11560: result: $cf_cv_wcwidth_graphics" >&5
11561 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11562
11563         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11564
11565         # with_overwrite=no
11566         NCURSES_CH_T=cchar_t
11567
11568 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11569 do
11570 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11571 echo "$as_me:11571: checking for $ac_func" >&5
11572 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11573 if eval "test \"\${$as_ac_var+set}\" = set"; then
11574   echo $ECHO_N "(cached) $ECHO_C" >&6
11575 else
11576   cat >conftest.$ac_ext <<_ACEOF
11577 #line 11577 "configure"
11578 #include "confdefs.h"
11579 #define $ac_func autoconf_temporary
11580 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11581 #undef $ac_func
11582
11583 #ifdef __cplusplus
11584 extern "C"
11585 #endif
11586
11587 /* We use char because int might match the return type of a gcc2
11588    builtin and then its argument prototype would still apply.  */
11589 char $ac_func (void);
11590
11591 int
11592 main (void)
11593 {
11594
11595 /* The GNU C library defines stubs for functions which it implements
11596     to always fail with ENOSYS.  Some functions are actually named
11597     something starting with __ and the normal name is an alias.  */
11598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11599 #error found stub for $ac_func
11600 #endif
11601
11602         return $ac_func ();
11603   ;
11604   return 0;
11605 }
11606 _ACEOF
11607 rm -f conftest.$ac_objext conftest$ac_exeext
11608 if { (eval echo "$as_me:11608: \"$ac_link\"") >&5
11609   (eval $ac_link) 2>&5
11610   ac_status=$?
11611   echo "$as_me:11611: \$? = $ac_status" >&5
11612   (exit $ac_status); } &&
11613          { ac_try='test -s conftest$ac_exeext'
11614   { (eval echo "$as_me:11614: \"$ac_try\"") >&5
11615   (eval $ac_try) 2>&5
11616   ac_status=$?
11617   echo "$as_me:11617: \$? = $ac_status" >&5
11618   (exit $ac_status); }; }; then
11619   eval "$as_ac_var=yes"
11620 else
11621   echo "$as_me: failed program was:" >&5
11622 cat conftest.$ac_ext >&5
11623 eval "$as_ac_var=no"
11624 fi
11625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11626 fi
11627 echo "$as_me:11627: result: `eval echo '${'$as_ac_var'}'`" >&5
11628 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11629 if test `eval echo '${'$as_ac_var'}'` = yes; then
11630   cat >>confdefs.h <<EOF
11631 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11632 EOF
11633
11634 fi
11635 done
11636
11637         if test "x$ac_cv_func_putwc" != xyes ; then
11638
11639 echo "$as_me:11639: checking for multibyte character support" >&5
11640 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11641 if test "${cf_cv_utf8_lib+set}" = set; then
11642   echo $ECHO_N "(cached) $ECHO_C" >&6
11643 else
11644
11645         cf_save_LIBS="$LIBS"
11646         cat >conftest.$ac_ext <<_ACEOF
11647 #line 11647 "configure"
11648 #include "confdefs.h"
11649
11650 #include <stdlib.h>
11651 int
11652 main (void)
11653 {
11654 putwc(0,0);
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 rm -f conftest.$ac_objext conftest$ac_exeext
11660 if { (eval echo "$as_me:11660: \"$ac_link\"") >&5
11661   (eval $ac_link) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit $ac_status); } &&
11665          { ac_try='test -s conftest$ac_exeext'
11666   { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); }; }; then
11671   cf_cv_utf8_lib=yes
11672 else
11673   echo "$as_me: failed program was:" >&5
11674 cat conftest.$ac_ext >&5
11675
11676 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11677 # will be set on completion of the AC_TRY_LINK below.
11678 cf_cv_header_path_utf8=
11679 cf_cv_library_path_utf8=
11680
11681 echo "${as_me:-configure}:11681: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11682
11683 cf_save_LIBS="$LIBS"
11684
11685 cat >conftest.$ac_ext <<_ACEOF
11686 #line 11686 "configure"
11687 #include "confdefs.h"
11688
11689 #include <libutf8.h>
11690 int
11691 main (void)
11692 {
11693 putwc(0,0);
11694   ;
11695   return 0;
11696 }
11697 _ACEOF
11698 rm -f conftest.$ac_objext conftest$ac_exeext
11699 if { (eval echo "$as_me:11699: \"$ac_link\"") >&5
11700   (eval $ac_link) 2>&5
11701   ac_status=$?
11702   echo "$as_me:11702: \$? = $ac_status" >&5
11703   (exit $ac_status); } &&
11704          { ac_try='test -s conftest$ac_exeext'
11705   { (eval echo "$as_me:11705: \"$ac_try\"") >&5
11706   (eval $ac_try) 2>&5
11707   ac_status=$?
11708   echo "$as_me:11708: \$? = $ac_status" >&5
11709   (exit $ac_status); }; }; then
11710
11711         cf_cv_find_linkage_utf8=yes
11712         cf_cv_header_path_utf8=/usr/include
11713         cf_cv_library_path_utf8=/usr/lib
11714
11715 else
11716   echo "$as_me: failed program was:" >&5
11717 cat conftest.$ac_ext >&5
11718
11719 LIBS="-lutf8  $cf_save_LIBS"
11720
11721 cat >conftest.$ac_ext <<_ACEOF
11722 #line 11722 "configure"
11723 #include "confdefs.h"
11724
11725 #include <libutf8.h>
11726 int
11727 main (void)
11728 {
11729 putwc(0,0);
11730   ;
11731   return 0;
11732 }
11733 _ACEOF
11734 rm -f conftest.$ac_objext conftest$ac_exeext
11735 if { (eval echo "$as_me:11735: \"$ac_link\"") >&5
11736   (eval $ac_link) 2>&5
11737   ac_status=$?
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit $ac_status); } &&
11740          { ac_try='test -s conftest$ac_exeext'
11741   { (eval echo "$as_me:11741: \"$ac_try\"") >&5
11742   (eval $ac_try) 2>&5
11743   ac_status=$?
11744   echo "$as_me:11744: \$? = $ac_status" >&5
11745   (exit $ac_status); }; }; then
11746
11747         cf_cv_find_linkage_utf8=yes
11748         cf_cv_header_path_utf8=/usr/include
11749         cf_cv_library_path_utf8=/usr/lib
11750         cf_cv_library_file_utf8="-lutf8"
11751
11752 else
11753   echo "$as_me: failed program was:" >&5
11754 cat conftest.$ac_ext >&5
11755
11756         cf_cv_find_linkage_utf8=no
11757         LIBS="$cf_save_LIBS"
11758
11759         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11760
11761 echo "${as_me:-configure}:11761: testing find linkage for utf8 library ..." 1>&5
11762
11763 echo "${as_me:-configure}:11763: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11764
11765         cf_save_CPPFLAGS="$CPPFLAGS"
11766         cf_test_CPPFLAGS="$CPPFLAGS"
11767
11768 cf_search=
11769
11770 # collect the current set of include-directories from compiler flags
11771 cf_header_path_list=""
11772 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11773         for cf_header_path in $CPPFLAGS $CFLAGS
11774         do
11775                 case $cf_header_path in
11776                 (-I*)
11777                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11778
11779 test "x$cf_header_path" != "xNONE" && \
11780 test -d "$cf_header_path" && \
11781  {
11782         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11783         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11784         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11785         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11786         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11787         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11788 }
11789
11790                         cf_header_path_list="$cf_header_path_list $cf_search"
11791                         ;;
11792                 esac
11793         done
11794 fi
11795
11796 # add the variations for the package we are looking for
11797
11798 cf_search=
11799
11800 test "x$prefix" != "xNONE" && \
11801 test -d "$prefix" && \
11802  {
11803         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11804         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11805         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11806         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11807         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11808         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11809 }
11810
11811 for cf_subdir_prefix in \
11812         /usr \
11813         /usr/local \
11814         /usr/pkg \
11815         /opt \
11816         /opt/local \
11817         $HOME
11818 do
11819
11820 test "x$cf_subdir_prefix" != "x$prefix" && \
11821 test -d "$cf_subdir_prefix" && \
11822 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11823         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11824         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11825         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11826         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11827         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11828         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11829 }
11830
11831 done
11832
11833 test "$includedir" != NONE && \
11834 test "$includedir" != "/usr/include" && \
11835 test -d "$includedir" && {
11836         test -d $includedir &&    cf_search="$cf_search $includedir"
11837         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11838 }
11839
11840 test "$oldincludedir" != NONE && \
11841 test "$oldincludedir" != "/usr/include" && \
11842 test -d "$oldincludedir" && {
11843         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11844         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11845 }
11846
11847 cf_search="$cf_search $cf_header_path_list"
11848
11849         for cf_cv_header_path_utf8 in $cf_search
11850         do
11851                 if test -d $cf_cv_header_path_utf8 ; then
11852                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11853
11854 echo "${as_me:-configure}:11854: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11855
11856                         CPPFLAGS="$cf_save_CPPFLAGS"
11857
11858         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11859         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11860
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
11875 if { (eval echo "$as_me:11875: \"$ac_compile\"") >&5
11876   (eval $ac_compile) 2>&5
11877   ac_status=$?
11878   echo "$as_me:11878: \$? = $ac_status" >&5
11879   (exit $ac_status); } &&
11880          { ac_try='test -s conftest.$ac_objext'
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 headers in $cf_cv_header_path_utf8" 1>&6
11888
11889 echo "${as_me:-configure}:11889: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11890
11891                                 cf_cv_find_linkage_utf8=maybe
11892                                 cf_test_CPPFLAGS="$CPPFLAGS"
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
11900 fi
11901 rm -f conftest.$ac_objext conftest.$ac_ext
11902                 fi
11903         done
11904
11905         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11906
11907 echo "${as_me:-configure}:11907: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11908
11909                 cf_save_LIBS="$LIBS"
11910                 cf_save_LDFLAGS="$LDFLAGS"
11911
11912                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11913
11914 cf_search=
11915 cf_library_path_list=""
11916 if test -n "${LDFLAGS}${LIBS}" ; then
11917         for cf_library_path in $LDFLAGS $LIBS
11918         do
11919                 case $cf_library_path in
11920                 (-L*)
11921                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11922
11923 test "x$cf_library_path" != "xNONE" && \
11924 test -d "$cf_library_path" && \
11925  {
11926         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11927         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11928         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11929         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11930         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11931         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11932 }
11933
11934                         cf_library_path_list="$cf_library_path_list $cf_search"
11935                         ;;
11936                 esac
11937         done
11938 fi
11939
11940 cf_search=
11941
11942 test "x$prefix" != "xNONE" && \
11943 test -d "$prefix" && \
11944  {
11945         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11946         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11947         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11948         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11949         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11950         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11951 }
11952
11953 for cf_subdir_prefix in \
11954         /usr \
11955         /usr/local \
11956         /usr/pkg \
11957         /opt \
11958         /opt/local \
11959         $HOME
11960 do
11961
11962 test "x$cf_subdir_prefix" != "x$prefix" && \
11963 test -d "$cf_subdir_prefix" && \
11964 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11965         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11966         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11967         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11968         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11969         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11970         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11971 }
11972
11973 done
11974
11975 cf_search="$cf_library_path_list $cf_search"
11976
11977                         for cf_cv_library_path_utf8 in $cf_search
11978                         do
11979                                 if test -d $cf_cv_library_path_utf8 ; then
11980                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11981
11982 echo "${as_me:-configure}:11982: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11983
11984                                         CPPFLAGS="$cf_test_CPPFLAGS"
11985                                         LIBS="-lutf8  $cf_save_LIBS"
11986                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11987                                         cat >conftest.$ac_ext <<_ACEOF
11988 #line 11988 "configure"
11989 #include "confdefs.h"
11990
11991 #include <libutf8.h>
11992 int
11993 main (void)
11994 {
11995 putwc(0,0);
11996   ;
11997   return 0;
11998 }
11999 _ACEOF
12000 rm -f conftest.$ac_objext conftest$ac_exeext
12001 if { (eval echo "$as_me:12001: \"$ac_link\"") >&5
12002   (eval $ac_link) 2>&5
12003   ac_status=$?
12004   echo "$as_me:12004: \$? = $ac_status" >&5
12005   (exit $ac_status); } &&
12006          { ac_try='test -s conftest$ac_exeext'
12007   { (eval echo "$as_me:12007: \"$ac_try\"") >&5
12008   (eval $ac_try) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit $ac_status); }; }; then
12012
12013                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12014
12015 echo "${as_me:-configure}:12015: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12016
12017                                         cf_cv_find_linkage_utf8=yes
12018                                         cf_cv_library_file_utf8="-lutf8"
12019                                         break
12020 else
12021   echo "$as_me: failed program was:" >&5
12022 cat conftest.$ac_ext >&5
12023
12024                                         CPPFLAGS="$cf_save_CPPFLAGS"
12025                                         LIBS="$cf_save_LIBS"
12026                                         LDFLAGS="$cf_save_LDFLAGS"
12027
12028 fi
12029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12030                                 fi
12031                         done
12032                         CPPFLAGS="$cf_save_CPPFLAGS"
12033                         LDFLAGS="$cf_save_LDFLAGS"
12034                 fi
12035
12036         else
12037                 cf_cv_find_linkage_utf8=no
12038         fi
12039
12040 fi
12041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12042
12043 fi
12044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12045
12046 LIBS="$cf_save_LIBS"
12047
12048 if test "$cf_cv_find_linkage_utf8" = yes ; then
12049 cf_cv_utf8_lib=add-on
12050 else
12051 cf_cv_utf8_lib=no
12052 fi
12053
12054 fi
12055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12056 fi
12057 echo "$as_me:12057: result: $cf_cv_utf8_lib" >&5
12058 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12059
12060 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12061 # ncurses/ncursesw:
12062 if test "$cf_cv_utf8_lib" = "add-on" ; then
12063
12064 cat >>confdefs.h <<\EOF
12065 #define HAVE_LIBUTF8_H 1
12066 EOF
12067
12068 if test -n "$cf_cv_header_path_utf8" ; then
12069   for cf_add_incdir in $cf_cv_header_path_utf8
12070   do
12071         while test $cf_add_incdir != /usr/include
12072         do
12073           if test -d $cf_add_incdir
12074           then
12075                 cf_have_incdir=no
12076                 if test -n "$CFLAGS$CPPFLAGS" ; then
12077                   # a loop is needed to ensure we can add subdirs of existing dirs
12078                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12079                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12080                           cf_have_incdir=yes; break
12081                         fi
12082                   done
12083                 fi
12084
12085                 if test "$cf_have_incdir" = no ; then
12086                   if test "$cf_add_incdir" = /usr/local/include ; then
12087                         if test "$GCC" = yes
12088                         then
12089                           cf_save_CPPFLAGS=$CPPFLAGS
12090
12091         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12092         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12093
12094                           cat >conftest.$ac_ext <<_ACEOF
12095 #line 12095 "configure"
12096 #include "confdefs.h"
12097 #include <stdio.h>
12098 int
12099 main (void)
12100 {
12101 printf("Hello")
12102   ;
12103   return 0;
12104 }
12105 _ACEOF
12106 rm -f conftest.$ac_objext
12107 if { (eval echo "$as_me:12107: \"$ac_compile\"") >&5
12108   (eval $ac_compile) 2>&5
12109   ac_status=$?
12110   echo "$as_me:12110: \$? = $ac_status" >&5
12111   (exit $ac_status); } &&
12112          { ac_try='test -s conftest.$ac_objext'
12113   { (eval echo "$as_me:12113: \"$ac_try\"") >&5
12114   (eval $ac_try) 2>&5
12115   ac_status=$?
12116   echo "$as_me:12116: \$? = $ac_status" >&5
12117   (exit $ac_status); }; }; then
12118   :
12119 else
12120   echo "$as_me: failed program was:" >&5
12121 cat conftest.$ac_ext >&5
12122 cf_have_incdir=yes
12123 fi
12124 rm -f conftest.$ac_objext conftest.$ac_ext
12125                           CPPFLAGS=$cf_save_CPPFLAGS
12126                         fi
12127                   fi
12128                 fi
12129
12130                 if test "$cf_have_incdir" = no ; then
12131                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12132
12133 echo "${as_me:-configure}:12133: testing adding $cf_add_incdir to include-path ..." 1>&5
12134
12135                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12136
12137                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12138                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12139                   cf_add_incdir="$cf_top_incdir"
12140                 else
12141                   break
12142                 fi
12143           else
12144                 break
12145           fi
12146         done
12147   done
12148 fi
12149
12150 if test -n "$cf_cv_library_path_utf8" ; then
12151         for cf_add_libdir in $cf_cv_library_path_utf8
12152         do
12153                 if test $cf_add_libdir = /usr/lib ; then
12154                         :
12155                 elif test -d $cf_add_libdir
12156                 then
12157                         cf_have_libdir=no
12158                         if test -n "$LDFLAGS$LIBS" ; then
12159                                 # a loop is needed to ensure we can add subdirs of existing dirs
12160                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12161                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12162                                                 cf_have_libdir=yes; break
12163                                         fi
12164                                 done
12165                         fi
12166                         if test "$cf_have_libdir" = no ; then
12167                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12168
12169 echo "${as_me:-configure}:12169: testing adding $cf_add_libdir to library-path ..." 1>&5
12170
12171                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12172                         fi
12173                 fi
12174         done
12175 fi
12176
12177 cf_add_libs="$LIBS"
12178 # reverse order
12179 cf_add_0lib=
12180 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12181 # filter duplicates
12182 for cf_add_1lib in $cf_add_0lib; do
12183         for cf_add_2lib in $cf_add_libs; do
12184                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12185                         cf_add_1lib=
12186                         break
12187                 fi
12188         done
12189         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12190 done
12191 LIBS="$cf_add_libs"
12192
12193 fi
12194
12195                 if test "$cf_cv_utf8_lib" != no ; then
12196                         NCURSES_LIBUTF8=1
12197                 fi
12198         fi
12199
12200 # This is needed on Tru64 5.0 to declare mbstate_t
12201 echo "$as_me:12201: checking if we must include wchar.h to declare mbstate_t" >&5
12202 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12203 if test "${cf_cv_mbstate_t+set}" = set; then
12204   echo $ECHO_N "(cached) $ECHO_C" >&6
12205 else
12206
12207 cat >conftest.$ac_ext <<_ACEOF
12208 #line 12208 "configure"
12209 #include "confdefs.h"
12210
12211 #include <stdlib.h>
12212 #include <stdarg.h>
12213 #include <stdio.h>
12214 #ifdef HAVE_LIBUTF8_H
12215 #include <libutf8.h>
12216 #endif
12217 int
12218 main (void)
12219 {
12220 mbstate_t state
12221   ;
12222   return 0;
12223 }
12224 _ACEOF
12225 rm -f conftest.$ac_objext
12226 if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
12227   (eval $ac_compile) 2>&5
12228   ac_status=$?
12229   echo "$as_me:12229: \$? = $ac_status" >&5
12230   (exit $ac_status); } &&
12231          { ac_try='test -s conftest.$ac_objext'
12232   { (eval echo "$as_me:12232: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:12235: \$? = $ac_status" >&5
12236   (exit $ac_status); }; }; then
12237   cf_cv_mbstate_t=no
12238 else
12239   echo "$as_me: failed program was:" >&5
12240 cat conftest.$ac_ext >&5
12241 cat >conftest.$ac_ext <<_ACEOF
12242 #line 12242 "configure"
12243 #include "confdefs.h"
12244
12245 #include <stdlib.h>
12246 #include <stdarg.h>
12247 #include <stdio.h>
12248 #include <wchar.h>
12249 #ifdef HAVE_LIBUTF8_H
12250 #include <libutf8.h>
12251 #endif
12252 int
12253 main (void)
12254 {
12255 mbstate_t value
12256   ;
12257   return 0;
12258 }
12259 _ACEOF
12260 rm -f conftest.$ac_objext
12261 if { (eval echo "$as_me:12261: \"$ac_compile\"") >&5
12262   (eval $ac_compile) 2>&5
12263   ac_status=$?
12264   echo "$as_me:12264: \$? = $ac_status" >&5
12265   (exit $ac_status); } &&
12266          { ac_try='test -s conftest.$ac_objext'
12267   { (eval echo "$as_me:12267: \"$ac_try\"") >&5
12268   (eval $ac_try) 2>&5
12269   ac_status=$?
12270   echo "$as_me:12270: \$? = $ac_status" >&5
12271   (exit $ac_status); }; }; then
12272   cf_cv_mbstate_t=yes
12273 else
12274   echo "$as_me: failed program was:" >&5
12275 cat conftest.$ac_ext >&5
12276 cf_cv_mbstate_t=unknown
12277 fi
12278 rm -f conftest.$ac_objext conftest.$ac_ext
12279 fi
12280 rm -f conftest.$ac_objext conftest.$ac_ext
12281 fi
12282 echo "$as_me:12282: result: $cf_cv_mbstate_t" >&5
12283 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12284
12285 if test "$cf_cv_mbstate_t" = yes ; then
12286
12287 cat >>confdefs.h <<\EOF
12288 #define NEED_WCHAR_H 1
12289 EOF
12290
12291         NEED_WCHAR_H=1
12292 fi
12293
12294 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12295 if test "$cf_cv_mbstate_t" = unknown ; then
12296         NCURSES_MBSTATE_T=1
12297 fi
12298
12299 # This is needed on Tru64 5.0 to declare wchar_t
12300 echo "$as_me:12300: checking if we must include wchar.h to declare wchar_t" >&5
12301 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12302 if test "${cf_cv_wchar_t+set}" = set; then
12303   echo $ECHO_N "(cached) $ECHO_C" >&6
12304 else
12305
12306 cat >conftest.$ac_ext <<_ACEOF
12307 #line 12307 "configure"
12308 #include "confdefs.h"
12309
12310 #include <stdlib.h>
12311 #include <stdarg.h>
12312 #include <stdio.h>
12313 #ifdef HAVE_LIBUTF8_H
12314 #include <libutf8.h>
12315 #endif
12316 int
12317 main (void)
12318 {
12319 wchar_t state
12320   ;
12321   return 0;
12322 }
12323 _ACEOF
12324 rm -f conftest.$ac_objext
12325 if { (eval echo "$as_me:12325: \"$ac_compile\"") >&5
12326   (eval $ac_compile) 2>&5
12327   ac_status=$?
12328   echo "$as_me:12328: \$? = $ac_status" >&5
12329   (exit $ac_status); } &&
12330          { ac_try='test -s conftest.$ac_objext'
12331   { (eval echo "$as_me:12331: \"$ac_try\"") >&5
12332   (eval $ac_try) 2>&5
12333   ac_status=$?
12334   echo "$as_me:12334: \$? = $ac_status" >&5
12335   (exit $ac_status); }; }; then
12336   cf_cv_wchar_t=no
12337 else
12338   echo "$as_me: failed program was:" >&5
12339 cat conftest.$ac_ext >&5
12340 cat >conftest.$ac_ext <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343
12344 #include <stdlib.h>
12345 #include <stdarg.h>
12346 #include <stdio.h>
12347 #include <wchar.h>
12348 #ifdef HAVE_LIBUTF8_H
12349 #include <libutf8.h>
12350 #endif
12351 int
12352 main (void)
12353 {
12354 wchar_t value
12355   ;
12356   return 0;
12357 }
12358 _ACEOF
12359 rm -f conftest.$ac_objext
12360 if { (eval echo "$as_me:12360: \"$ac_compile\"") >&5
12361   (eval $ac_compile) 2>&5
12362   ac_status=$?
12363   echo "$as_me:12363: \$? = $ac_status" >&5
12364   (exit $ac_status); } &&
12365          { ac_try='test -s conftest.$ac_objext'
12366   { (eval echo "$as_me:12366: \"$ac_try\"") >&5
12367   (eval $ac_try) 2>&5
12368   ac_status=$?
12369   echo "$as_me:12369: \$? = $ac_status" >&5
12370   (exit $ac_status); }; }; then
12371   cf_cv_wchar_t=yes
12372 else
12373   echo "$as_me: failed program was:" >&5
12374 cat conftest.$ac_ext >&5
12375 cf_cv_wchar_t=unknown
12376 fi
12377 rm -f conftest.$ac_objext conftest.$ac_ext
12378 fi
12379 rm -f conftest.$ac_objext conftest.$ac_ext
12380 fi
12381 echo "$as_me:12381: result: $cf_cv_wchar_t" >&5
12382 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12383
12384 if test "$cf_cv_wchar_t" = yes ; then
12385
12386 cat >>confdefs.h <<\EOF
12387 #define NEED_WCHAR_H 1
12388 EOF
12389
12390         NEED_WCHAR_H=1
12391 fi
12392
12393 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12394 if test "$cf_cv_wchar_t" = unknown ; then
12395         NCURSES_WCHAR_T=1
12396 fi
12397
12398 # if we find wchar_t in either place, use substitution to provide a fallback.
12399 if test "$cf_cv_wchar_t" != unknown ; then
12400         NCURSES_OK_WCHAR_T=1
12401 fi
12402
12403 # This is needed on Tru64 5.0 to declare wint_t
12404 echo "$as_me:12404: checking if we must include wchar.h to declare wint_t" >&5
12405 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12406 if test "${cf_cv_wint_t+set}" = set; then
12407   echo $ECHO_N "(cached) $ECHO_C" >&6
12408 else
12409
12410 cat >conftest.$ac_ext <<_ACEOF
12411 #line 12411 "configure"
12412 #include "confdefs.h"
12413
12414 #include <stdlib.h>
12415 #include <stdarg.h>
12416 #include <stdio.h>
12417 #ifdef HAVE_LIBUTF8_H
12418 #include <libutf8.h>
12419 #endif
12420 int
12421 main (void)
12422 {
12423 wint_t state
12424   ;
12425   return 0;
12426 }
12427 _ACEOF
12428 rm -f conftest.$ac_objext
12429 if { (eval echo "$as_me:12429: \"$ac_compile\"") >&5
12430   (eval $ac_compile) 2>&5
12431   ac_status=$?
12432   echo "$as_me:12432: \$? = $ac_status" >&5
12433   (exit $ac_status); } &&
12434          { ac_try='test -s conftest.$ac_objext'
12435   { (eval echo "$as_me:12435: \"$ac_try\"") >&5
12436   (eval $ac_try) 2>&5
12437   ac_status=$?
12438   echo "$as_me:12438: \$? = $ac_status" >&5
12439   (exit $ac_status); }; }; then
12440   cf_cv_wint_t=no
12441 else
12442   echo "$as_me: failed program was:" >&5
12443 cat conftest.$ac_ext >&5
12444 cat >conftest.$ac_ext <<_ACEOF
12445 #line 12445 "configure"
12446 #include "confdefs.h"
12447
12448 #include <stdlib.h>
12449 #include <stdarg.h>
12450 #include <stdio.h>
12451 #include <wchar.h>
12452 #ifdef HAVE_LIBUTF8_H
12453 #include <libutf8.h>
12454 #endif
12455 int
12456 main (void)
12457 {
12458 wint_t value
12459   ;
12460   return 0;
12461 }
12462 _ACEOF
12463 rm -f conftest.$ac_objext
12464 if { (eval echo "$as_me:12464: \"$ac_compile\"") >&5
12465   (eval $ac_compile) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); } &&
12469          { ac_try='test -s conftest.$ac_objext'
12470   { (eval echo "$as_me:12470: \"$ac_try\"") >&5
12471   (eval $ac_try) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit $ac_status); }; }; then
12475   cf_cv_wint_t=yes
12476 else
12477   echo "$as_me: failed program was:" >&5
12478 cat conftest.$ac_ext >&5
12479 cf_cv_wint_t=unknown
12480 fi
12481 rm -f conftest.$ac_objext conftest.$ac_ext
12482 fi
12483 rm -f conftest.$ac_objext conftest.$ac_ext
12484 fi
12485 echo "$as_me:12485: result: $cf_cv_wint_t" >&5
12486 echo "${ECHO_T}$cf_cv_wint_t" >&6
12487
12488 if test "$cf_cv_wint_t" = yes ; then
12489
12490 cat >>confdefs.h <<\EOF
12491 #define NEED_WCHAR_H 1
12492 EOF
12493
12494         NEED_WCHAR_H=1
12495 fi
12496
12497 # if we do not find wint_t in either place, use substitution to provide a fallback.
12498 if test "$cf_cv_wint_t" = unknown ; then
12499         NCURSES_WINT_T=1
12500 fi
12501
12502 # if we find wint_t in either place, use substitution to provide a fallback.
12503 if test "$cf_cv_wint_t" != unknown ; then
12504         NCURSES_OK_WINT_T=1
12505 fi
12506
12507         if test "$NCURSES_MBSTATE_T" != 0; then
12508
12509 cat >>confdefs.h <<\EOF
12510 #define NEED_MBSTATE_T_DEF 1
12511 EOF
12512
12513         fi
12514 fi
12515
12516 ###   use option --disable-lp64 to allow long chtype
12517 echo "$as_me:12517: checking whether to enable _LP64 definition in curses.h" >&5
12518 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12519
12520 # Check whether --enable-lp64 or --disable-lp64 was given.
12521 if test "${enable_lp64+set}" = set; then
12522   enableval="$enable_lp64"
12523   with_lp64=$enableval
12524 else
12525   with_lp64=$cf_dft_with_lp64
12526 fi;
12527 echo "$as_me:12527: result: $with_lp64" >&5
12528 echo "${ECHO_T}$with_lp64" >&6
12529
12530 if test "x$with_lp64" = xyes ; then
12531         cf_cv_enable_lp64=1
12532 else
12533         cf_cv_enable_lp64=0
12534 fi
12535
12536 # Check whether --enable-largefile or --disable-largefile was given.
12537 if test "${enable_largefile+set}" = set; then
12538   enableval="$enable_largefile"
12539
12540 fi;
12541 if test "$enable_largefile" != no; then
12542
12543   echo "$as_me:12543: checking for special C compiler options needed for large files" >&5
12544 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12545 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12546   echo $ECHO_N "(cached) $ECHO_C" >&6
12547 else
12548   ac_cv_sys_largefile_CC=no
12549      if test "$GCC" != yes; then
12550        ac_save_CC=$CC
12551        while :; do
12552          # IRIX 6.2 and later do not support large files by default,
12553          # so use the C compiler's -n32 option if that helps.
12554          cat >conftest.$ac_ext <<_ACEOF
12555 #line 12555 "configure"
12556 #include "confdefs.h"
12557 #include <sys/types.h>
12558  /* Check that off_t can represent 2**63 - 1 correctly.
12559     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12560     since some C++ compilers masquerading as C compilers
12561     incorrectly reject 9223372036854775807.  */
12562 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12563   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12564                        && LARGE_OFF_T % 2147483647 == 1)
12565                       ? 1 : -1];
12566 int
12567 main (void)
12568 {
12569
12570   ;
12571   return 0;
12572 }
12573 _ACEOF
12574          rm -f conftest.$ac_objext
12575 if { (eval echo "$as_me:12575: \"$ac_compile\"") >&5
12576   (eval $ac_compile) 2>&5
12577   ac_status=$?
12578   echo "$as_me:12578: \$? = $ac_status" >&5
12579   (exit $ac_status); } &&
12580          { ac_try='test -s conftest.$ac_objext'
12581   { (eval echo "$as_me:12581: \"$ac_try\"") >&5
12582   (eval $ac_try) 2>&5
12583   ac_status=$?
12584   echo "$as_me:12584: \$? = $ac_status" >&5
12585   (exit $ac_status); }; }; then
12586   break
12587 else
12588   echo "$as_me: failed program was:" >&5
12589 cat conftest.$ac_ext >&5
12590 fi
12591 rm -f conftest.$ac_objext
12592          CC="$CC -n32"
12593          rm -f conftest.$ac_objext
12594 if { (eval echo "$as_me:12594: \"$ac_compile\"") >&5
12595   (eval $ac_compile) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); } &&
12599          { ac_try='test -s conftest.$ac_objext'
12600   { (eval echo "$as_me:12600: \"$ac_try\"") >&5
12601   (eval $ac_try) 2>&5
12602   ac_status=$?
12603   echo "$as_me:12603: \$? = $ac_status" >&5
12604   (exit $ac_status); }; }; then
12605   ac_cv_sys_largefile_CC=' -n32'; break
12606 else
12607   echo "$as_me: failed program was:" >&5
12608 cat conftest.$ac_ext >&5
12609 fi
12610 rm -f conftest.$ac_objext
12611          break
12612        done
12613        CC=$ac_save_CC
12614        rm -f conftest.$ac_ext
12615     fi
12616 fi
12617 echo "$as_me:12617: result: $ac_cv_sys_largefile_CC" >&5
12618 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12619   if test "$ac_cv_sys_largefile_CC" != no; then
12620     CC=$CC$ac_cv_sys_largefile_CC
12621   fi
12622
12623   echo "$as_me:12623: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12624 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12625 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628   while :; do
12629   ac_cv_sys_file_offset_bits=no
12630   cat >conftest.$ac_ext <<_ACEOF
12631 #line 12631 "configure"
12632 #include "confdefs.h"
12633 #include <sys/types.h>
12634  /* Check that off_t can represent 2**63 - 1 correctly.
12635     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12636     since some C++ compilers masquerading as C compilers
12637     incorrectly reject 9223372036854775807.  */
12638 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12639   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12640                        && LARGE_OFF_T % 2147483647 == 1)
12641                       ? 1 : -1];
12642 int
12643 main (void)
12644 {
12645
12646   ;
12647   return 0;
12648 }
12649 _ACEOF
12650 rm -f conftest.$ac_objext
12651 if { (eval echo "$as_me:12651: \"$ac_compile\"") >&5
12652   (eval $ac_compile) 2>&5
12653   ac_status=$?
12654   echo "$as_me:12654: \$? = $ac_status" >&5
12655   (exit $ac_status); } &&
12656          { ac_try='test -s conftest.$ac_objext'
12657   { (eval echo "$as_me:12657: \"$ac_try\"") >&5
12658   (eval $ac_try) 2>&5
12659   ac_status=$?
12660   echo "$as_me:12660: \$? = $ac_status" >&5
12661   (exit $ac_status); }; }; then
12662   break
12663 else
12664   echo "$as_me: failed program was:" >&5
12665 cat conftest.$ac_ext >&5
12666 fi
12667 rm -f conftest.$ac_objext conftest.$ac_ext
12668   cat >conftest.$ac_ext <<_ACEOF
12669 #line 12669 "configure"
12670 #include "confdefs.h"
12671 #define _FILE_OFFSET_BITS 64
12672 #include <sys/types.h>
12673  /* Check that off_t can represent 2**63 - 1 correctly.
12674     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12675     since some C++ compilers masquerading as C compilers
12676     incorrectly reject 9223372036854775807.  */
12677 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12678   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12679                        && LARGE_OFF_T % 2147483647 == 1)
12680                       ? 1 : -1];
12681 int
12682 main (void)
12683 {
12684
12685   ;
12686   return 0;
12687 }
12688 _ACEOF
12689 rm -f conftest.$ac_objext
12690 if { (eval echo "$as_me:12690: \"$ac_compile\"") >&5
12691   (eval $ac_compile) 2>&5
12692   ac_status=$?
12693   echo "$as_me:12693: \$? = $ac_status" >&5
12694   (exit $ac_status); } &&
12695          { ac_try='test -s conftest.$ac_objext'
12696   { (eval echo "$as_me:12696: \"$ac_try\"") >&5
12697   (eval $ac_try) 2>&5
12698   ac_status=$?
12699   echo "$as_me:12699: \$? = $ac_status" >&5
12700   (exit $ac_status); }; }; then
12701   ac_cv_sys_file_offset_bits=64; break
12702 else
12703   echo "$as_me: failed program was:" >&5
12704 cat conftest.$ac_ext >&5
12705 fi
12706 rm -f conftest.$ac_objext conftest.$ac_ext
12707   break
12708 done
12709 fi
12710 echo "$as_me:12710: result: $ac_cv_sys_file_offset_bits" >&5
12711 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12712 if test "$ac_cv_sys_file_offset_bits" != no; then
12713
12714 cat >>confdefs.h <<EOF
12715 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12716 EOF
12717
12718 fi
12719 rm -rf conftest*
12720   echo "$as_me:12720: checking for _LARGE_FILES value needed for large files" >&5
12721 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12722 if test "${ac_cv_sys_large_files+set}" = set; then
12723   echo $ECHO_N "(cached) $ECHO_C" >&6
12724 else
12725   while :; do
12726   ac_cv_sys_large_files=no
12727   cat >conftest.$ac_ext <<_ACEOF
12728 #line 12728 "configure"
12729 #include "confdefs.h"
12730 #include <sys/types.h>
12731  /* Check that off_t can represent 2**63 - 1 correctly.
12732     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12733     since some C++ compilers masquerading as C compilers
12734     incorrectly reject 9223372036854775807.  */
12735 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12736   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12737                        && LARGE_OFF_T % 2147483647 == 1)
12738                       ? 1 : -1];
12739 int
12740 main (void)
12741 {
12742
12743   ;
12744   return 0;
12745 }
12746 _ACEOF
12747 rm -f conftest.$ac_objext
12748 if { (eval echo "$as_me:12748: \"$ac_compile\"") >&5
12749   (eval $ac_compile) 2>&5
12750   ac_status=$?
12751   echo "$as_me:12751: \$? = $ac_status" >&5
12752   (exit $ac_status); } &&
12753          { ac_try='test -s conftest.$ac_objext'
12754   { (eval echo "$as_me:12754: \"$ac_try\"") >&5
12755   (eval $ac_try) 2>&5
12756   ac_status=$?
12757   echo "$as_me:12757: \$? = $ac_status" >&5
12758   (exit $ac_status); }; }; then
12759   break
12760 else
12761   echo "$as_me: failed program was:" >&5
12762 cat conftest.$ac_ext >&5
12763 fi
12764 rm -f conftest.$ac_objext conftest.$ac_ext
12765   cat >conftest.$ac_ext <<_ACEOF
12766 #line 12766 "configure"
12767 #include "confdefs.h"
12768 #define _LARGE_FILES 1
12769 #include <sys/types.h>
12770  /* Check that off_t can represent 2**63 - 1 correctly.
12771     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12772     since some C++ compilers masquerading as C compilers
12773     incorrectly reject 9223372036854775807.  */
12774 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12775   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12776                        && LARGE_OFF_T % 2147483647 == 1)
12777                       ? 1 : -1];
12778 int
12779 main (void)
12780 {
12781
12782   ;
12783   return 0;
12784 }
12785 _ACEOF
12786 rm -f conftest.$ac_objext
12787 if { (eval echo "$as_me:12787: \"$ac_compile\"") >&5
12788   (eval $ac_compile) 2>&5
12789   ac_status=$?
12790   echo "$as_me:12790: \$? = $ac_status" >&5
12791   (exit $ac_status); } &&
12792          { ac_try='test -s conftest.$ac_objext'
12793   { (eval echo "$as_me:12793: \"$ac_try\"") >&5
12794   (eval $ac_try) 2>&5
12795   ac_status=$?
12796   echo "$as_me:12796: \$? = $ac_status" >&5
12797   (exit $ac_status); }; }; then
12798   ac_cv_sys_large_files=1; break
12799 else
12800   echo "$as_me: failed program was:" >&5
12801 cat conftest.$ac_ext >&5
12802 fi
12803 rm -f conftest.$ac_objext conftest.$ac_ext
12804   break
12805 done
12806 fi
12807 echo "$as_me:12807: result: $ac_cv_sys_large_files" >&5
12808 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12809 if test "$ac_cv_sys_large_files" != no; then
12810
12811 cat >>confdefs.h <<EOF
12812 #define _LARGE_FILES $ac_cv_sys_large_files
12813 EOF
12814
12815 fi
12816 rm -rf conftest*
12817 fi
12818
12819         if test "$enable_largefile" != no ; then
12820         echo "$as_me:12820: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12821 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12822 if test "${ac_cv_sys_largefile_source+set}" = set; then
12823   echo $ECHO_N "(cached) $ECHO_C" >&6
12824 else
12825   while :; do
12826   ac_cv_sys_largefile_source=no
12827   cat >conftest.$ac_ext <<_ACEOF
12828 #line 12828 "configure"
12829 #include "confdefs.h"
12830 #include <stdio.h>
12831 int
12832 main (void)
12833 {
12834 return !fseeko;
12835   ;
12836   return 0;
12837 }
12838 _ACEOF
12839 rm -f conftest.$ac_objext
12840 if { (eval echo "$as_me:12840: \"$ac_compile\"") >&5
12841   (eval $ac_compile) 2>&5
12842   ac_status=$?
12843   echo "$as_me:12843: \$? = $ac_status" >&5
12844   (exit $ac_status); } &&
12845          { ac_try='test -s conftest.$ac_objext'
12846   { (eval echo "$as_me:12846: \"$ac_try\"") >&5
12847   (eval $ac_try) 2>&5
12848   ac_status=$?
12849   echo "$as_me:12849: \$? = $ac_status" >&5
12850   (exit $ac_status); }; }; then
12851   break
12852 else
12853   echo "$as_me: failed program was:" >&5
12854 cat conftest.$ac_ext >&5
12855 fi
12856 rm -f conftest.$ac_objext conftest.$ac_ext
12857   cat >conftest.$ac_ext <<_ACEOF
12858 #line 12858 "configure"
12859 #include "confdefs.h"
12860 #define _LARGEFILE_SOURCE 1
12861 #include <stdio.h>
12862 int
12863 main (void)
12864 {
12865 return !fseeko;
12866   ;
12867   return 0;
12868 }
12869 _ACEOF
12870 rm -f conftest.$ac_objext
12871 if { (eval echo "$as_me:12871: \"$ac_compile\"") >&5
12872   (eval $ac_compile) 2>&5
12873   ac_status=$?
12874   echo "$as_me:12874: \$? = $ac_status" >&5
12875   (exit $ac_status); } &&
12876          { ac_try='test -s conftest.$ac_objext'
12877   { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878   (eval $ac_try) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit $ac_status); }; }; then
12882   ac_cv_sys_largefile_source=1; break
12883 else
12884   echo "$as_me: failed program was:" >&5
12885 cat conftest.$ac_ext >&5
12886 fi
12887 rm -f conftest.$ac_objext conftest.$ac_ext
12888   break
12889 done
12890 fi
12891 echo "$as_me:12891: result: $ac_cv_sys_largefile_source" >&5
12892 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12893 if test "$ac_cv_sys_largefile_source" != no; then
12894
12895 cat >>confdefs.h <<EOF
12896 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12897 EOF
12898
12899 fi
12900 rm -rf conftest*
12901
12902 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12903 # in glibc 2.1.3, but that breaks too many other things.
12904 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12905 echo "$as_me:12905: checking for fseeko" >&5
12906 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12907 if test "${ac_cv_func_fseeko+set}" = set; then
12908   echo $ECHO_N "(cached) $ECHO_C" >&6
12909 else
12910   cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913 #include <stdio.h>
12914 int
12915 main (void)
12916 {
12917 return fseeko && fseeko (stdin, 0, 0);
12918   ;
12919   return 0;
12920 }
12921 _ACEOF
12922 rm -f conftest.$ac_objext conftest$ac_exeext
12923 if { (eval echo "$as_me:12923: \"$ac_link\"") >&5
12924   (eval $ac_link) 2>&5
12925   ac_status=$?
12926   echo "$as_me:12926: \$? = $ac_status" >&5
12927   (exit $ac_status); } &&
12928          { ac_try='test -s conftest$ac_exeext'
12929   { (eval echo "$as_me:12929: \"$ac_try\"") >&5
12930   (eval $ac_try) 2>&5
12931   ac_status=$?
12932   echo "$as_me:12932: \$? = $ac_status" >&5
12933   (exit $ac_status); }; }; then
12934   ac_cv_func_fseeko=yes
12935 else
12936   echo "$as_me: failed program was:" >&5
12937 cat conftest.$ac_ext >&5
12938 ac_cv_func_fseeko=no
12939 fi
12940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12941 fi
12942 echo "$as_me:12942: result: $ac_cv_func_fseeko" >&5
12943 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12944 if test $ac_cv_func_fseeko = yes; then
12945
12946 cat >>confdefs.h <<\EOF
12947 #define HAVE_FSEEKO 1
12948 EOF
12949
12950 fi
12951
12952         # Normally we would collect these definitions in the config.h,
12953         # but (like _XOPEN_SOURCE), some environments rely on having these
12954         # defined before any of the system headers are included.  Another
12955         # case comes up with C++, e.g., on AIX the compiler compiles the
12956         # header files by themselves before looking at the body files it is
12957         # told to compile.  For ncurses, those header files do not include
12958         # the config.h
12959         if test "$ac_cv_sys_large_files" != no
12960         then
12961
12962         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12963         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12964
12965         fi
12966         if test "$ac_cv_sys_largefile_source" != no
12967         then
12968
12969         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12970         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12971
12972         fi
12973         if test "$ac_cv_sys_file_offset_bits" != no
12974         then
12975
12976         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12977         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12978
12979         fi
12980
12981         echo "$as_me:12981: checking whether to use struct dirent64" >&5
12982 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12983 if test "${cf_cv_struct_dirent64+set}" = set; then
12984   echo $ECHO_N "(cached) $ECHO_C" >&6
12985 else
12986
12987                 cat >conftest.$ac_ext <<_ACEOF
12988 #line 12988 "configure"
12989 #include "confdefs.h"
12990
12991 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12992 #include <sys/types.h>
12993 #include <dirent.h>
12994
12995 int
12996 main (void)
12997 {
12998
12999                 /* if transitional largefile support is setup, this is true */
13000                 extern struct dirent64 * readdir(DIR *);
13001                 struct dirent64 *x = readdir((DIR *)0);
13002                 struct dirent *y = readdir((DIR *)0);
13003                 int z = x - y;
13004
13005   ;
13006   return 0;
13007 }
13008 _ACEOF
13009 rm -f conftest.$ac_objext
13010 if { (eval echo "$as_me:13010: \"$ac_compile\"") >&5
13011   (eval $ac_compile) 2>&5
13012   ac_status=$?
13013   echo "$as_me:13013: \$? = $ac_status" >&5
13014   (exit $ac_status); } &&
13015          { ac_try='test -s conftest.$ac_objext'
13016   { (eval echo "$as_me:13016: \"$ac_try\"") >&5
13017   (eval $ac_try) 2>&5
13018   ac_status=$?
13019   echo "$as_me:13019: \$? = $ac_status" >&5
13020   (exit $ac_status); }; }; then
13021   cf_cv_struct_dirent64=yes
13022 else
13023   echo "$as_me: failed program was:" >&5
13024 cat conftest.$ac_ext >&5
13025 cf_cv_struct_dirent64=no
13026 fi
13027 rm -f conftest.$ac_objext conftest.$ac_ext
13028
13029 fi
13030 echo "$as_me:13030: result: $cf_cv_struct_dirent64" >&5
13031 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13032         test "$cf_cv_struct_dirent64" = yes &&
13033 cat >>confdefs.h <<\EOF
13034 #define HAVE_STRUCT_DIRENT64 1
13035 EOF
13036
13037         fi
13038
13039 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13040 echo "$as_me:13040: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13041 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13042
13043 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13044 if test "${enable_tparm_varargs+set}" = set; then
13045   enableval="$enable_tparm_varargs"
13046   with_tparm_varargs=$enableval
13047 else
13048   with_tparm_varargs=yes
13049 fi;
13050 echo "$as_me:13050: result: $with_tparm_varargs" >&5
13051 echo "${ECHO_T}$with_tparm_varargs" >&6
13052 NCURSES_TPARM_VARARGS=0
13053 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13054
13055 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13056 if test "$with_ticlib" != no ; then
13057 echo "$as_me:13057: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13058 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13059
13060 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13061 if test "${enable_tic_depends+set}" = set; then
13062   enableval="$enable_tic_depends"
13063   with_tic_depends=$enableval
13064 else
13065   with_tic_depends=yes
13066 fi;
13067 echo "$as_me:13067: result: $with_tic_depends" >&5
13068 echo "${ECHO_T}$with_tic_depends" >&6
13069 else
13070         with_tic_depends=no
13071 fi
13072
13073 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13074 echo "$as_me:13074: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13075 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13076
13077 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13078 if test "${enable_wattr_macros+set}" = set; then
13079   enableval="$enable_wattr_macros"
13080   with_wattr_macros=$enableval
13081 else
13082   with_wattr_macros=yes
13083 fi;
13084 if [ "x$with_wattr_macros" != xyes ]; then
13085         NCURSES_WATTR_MACROS=0
13086         echo "$as_me:13086: result: yes" >&5
13087 echo "${ECHO_T}yes" >&6
13088 else
13089         NCURSES_WATTR_MACROS=1
13090         echo "$as_me:13090: result: no" >&5
13091 echo "${ECHO_T}no" >&6
13092 fi
13093
13094 echo "$as_me:13094: checking for X11 rgb file" >&5
13095 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13096
13097 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13098 if test "${with_x11_rgb+set}" = set; then
13099   withval="$with_x11_rgb"
13100   RGB_PATH=$withval
13101 else
13102   RGB_PATH=auto
13103 fi;
13104
13105 if test "x$RGB_PATH" = xauto
13106 then
13107         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13108         for cf_path in \
13109                 /opt/local/share/X11/rgb.txt \
13110                 /opt/X11/share/X11/rgb.txt \
13111                 /usr/share/X11/rgb.txt \
13112                 /usr/X11/share/X11/rgb.txt \
13113                 /usr/X11/lib/X11/rgb.txt \
13114                 /usr/lib/X11/rgb.txt \
13115                 /etc/X11/rgb.txt \
13116                 /usr/pkg/lib/X11/rgb.txt \
13117                 /usr/X11R7/lib/X11/rgb.txt \
13118                 /usr/X11R6/lib/X11/rgb.txt \
13119                 /usr/X11R5/lib/X11/rgb.txt \
13120                 /usr/X11R4/lib/X11/rgb.txt \
13121                 /usr/local/lib/X11/rgb.txt \
13122                 /usr/local/share/X11/rgb.txt \
13123                 /usr/lib64/X11/rgb.txt
13124         do
13125                 if test -f "$cf_path" ; then
13126                         RGB_PATH="$cf_path"
13127                         break
13128                 fi
13129         done
13130 else
13131         cf_path=$RGB_PATH
13132
13133 if test "x$prefix" != xNONE; then
13134         cf_path_syntax="$prefix"
13135 else
13136         cf_path_syntax="$ac_default_prefix"
13137 fi
13138
13139 case ".$cf_path" in
13140 (.\$\(*\)*|.\'*\'*)
13141         ;;
13142 (..|./*|.\\*)
13143         ;;
13144 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13145         ;;
13146 (.\${*prefix}*|.\${*dir}*)
13147         eval cf_path="$cf_path"
13148         case ".$cf_path" in
13149         (.NONE/*)
13150                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13151                 ;;
13152         esac
13153         ;;
13154 (.no|.NONE/*)
13155         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13156         ;;
13157 (*)
13158         { { echo "$as_me:13158: error: expected a pathname, not \"$cf_path\"" >&5
13159 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13160    { (exit 1); exit 1; }; }
13161         ;;
13162 esac
13163
13164 fi
13165
13166 echo "$as_me:13166: result: $RGB_PATH" >&5
13167 echo "${ECHO_T}$RGB_PATH" >&6
13168
13169 cat >>confdefs.h <<EOF
13170 #define RGB_PATH "$cf_path"
13171 EOF
13172
13173 no_x11_rgb=
13174 if test "$RGB_PATH" = no
13175 then
13176         no_x11_rgb="#"
13177 fi
13178
13179 ###   use option --with-bool to override bool's type
13180 echo "$as_me:13180: checking for type of bool" >&5
13181 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13182
13183 # Check whether --with-bool or --without-bool was given.
13184 if test "${with_bool+set}" = set; then
13185   withval="$with_bool"
13186   NCURSES_BOOL="$withval"
13187 else
13188   NCURSES_BOOL=auto
13189 fi;
13190 echo "$as_me:13190: result: $NCURSES_BOOL" >&5
13191 echo "${ECHO_T}$NCURSES_BOOL" >&6
13192
13193 echo "$as_me:13193: checking for alternate terminal capabilities file" >&5
13194 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13195
13196 # Check whether --with-caps or --without-caps was given.
13197 if test "${with_caps+set}" = set; then
13198   withval="$with_caps"
13199   TERMINFO_CAPS=Caps.$withval
13200 else
13201   TERMINFO_CAPS=Caps
13202 fi;
13203 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13204 echo "$as_me:13204: result: $TERMINFO_CAPS" >&5
13205 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13206
13207 ###   use option --with-chtype to override chtype's type
13208 echo "$as_me:13208: checking for type of chtype" >&5
13209 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13210
13211 # Check whether --with-chtype or --without-chtype was given.
13212 if test "${with_chtype+set}" = set; then
13213   withval="$with_chtype"
13214   NCURSES_CHTYPE="$withval"
13215 else
13216   NCURSES_CHTYPE=$cf_dft_chtype
13217 fi;
13218 echo "$as_me:13218: result: $NCURSES_CHTYPE" >&5
13219 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13220
13221 ###   use option --with-ospeed to override ospeed's type
13222 echo "$as_me:13222: checking for type of ospeed" >&5
13223 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13224
13225 # Check whether --with-ospeed or --without-ospeed was given.
13226 if test "${with_ospeed+set}" = set; then
13227   withval="$with_ospeed"
13228   NCURSES_OSPEED="$withval"
13229 else
13230   NCURSES_OSPEED=short
13231 fi;
13232 echo "$as_me:13232: result: $NCURSES_OSPEED" >&5
13233 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13234
13235 ###   use option --with-mmask-t to override mmask_t's type
13236 echo "$as_me:13236: checking for type of mmask_t" >&5
13237 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13238
13239 # Check whether --with-mmask-t or --without-mmask-t was given.
13240 if test "${with_mmask_t+set}" = set; then
13241   withval="$with_mmask_t"
13242   NCURSES_MMASK_T="$withval"
13243 else
13244   NCURSES_MMASK_T=$cf_dft_mmask_t
13245 fi;
13246 echo "$as_me:13246: result: $NCURSES_MMASK_T" >&5
13247 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13248
13249 ###   use option --with-ccharw-max to override CCHARW_MAX size
13250 echo "$as_me:13250: checking for size CCHARW_MAX" >&5
13251 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13252
13253 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13254 if test "${with_ccharw_max+set}" = set; then
13255   withval="$with_ccharw_max"
13256   NCURSES_CCHARW_MAX="$withval"
13257 else
13258   NCURSES_CCHARW_MAX=5
13259 fi;
13260 echo "$as_me:13260: result: $NCURSES_CCHARW_MAX" >&5
13261 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13262
13263 echo "$as_me:13263: checking for ANSI C header files" >&5
13264 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13265 if test "${ac_cv_header_stdc+set}" = set; then
13266   echo $ECHO_N "(cached) $ECHO_C" >&6
13267 else
13268   cat >conftest.$ac_ext <<_ACEOF
13269 #line 13269 "configure"
13270 #include "confdefs.h"
13271 #include <stdlib.h>
13272 #include <stdarg.h>
13273 #include <string.h>
13274 #include <float.h>
13275
13276 _ACEOF
13277 if { (eval echo "$as_me:13277: \"$ac_cpp conftest.$ac_ext\"") >&5
13278   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13279   ac_status=$?
13280   egrep -v '^ *\+' conftest.er1 >conftest.err
13281   rm -f conftest.er1
13282   cat conftest.err >&5
13283   echo "$as_me:13283: \$? = $ac_status" >&5
13284   (exit $ac_status); } >/dev/null; then
13285   if test -s conftest.err; then
13286     ac_cpp_err=$ac_c_preproc_warn_flag
13287   else
13288     ac_cpp_err=
13289   fi
13290 else
13291   ac_cpp_err=yes
13292 fi
13293 if test -z "$ac_cpp_err"; then
13294   ac_cv_header_stdc=yes
13295 else
13296   echo "$as_me: failed program was:" >&5
13297   cat conftest.$ac_ext >&5
13298   ac_cv_header_stdc=no
13299 fi
13300 rm -f conftest.err conftest.$ac_ext
13301
13302 if test $ac_cv_header_stdc = yes; then
13303   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13304   cat >conftest.$ac_ext <<_ACEOF
13305 #line 13305 "configure"
13306 #include "confdefs.h"
13307 #include <string.h>
13308
13309 _ACEOF
13310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13311   egrep "memchr" >/dev/null 2>&1; then
13312   :
13313 else
13314   ac_cv_header_stdc=no
13315 fi
13316 rm -rf conftest*
13317
13318 fi
13319
13320 if test $ac_cv_header_stdc = yes; then
13321   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13322   cat >conftest.$ac_ext <<_ACEOF
13323 #line 13323 "configure"
13324 #include "confdefs.h"
13325 #include <stdlib.h>
13326
13327 _ACEOF
13328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13329   egrep "free" >/dev/null 2>&1; then
13330   :
13331 else
13332   ac_cv_header_stdc=no
13333 fi
13334 rm -rf conftest*
13335
13336 fi
13337
13338 if test $ac_cv_header_stdc = yes; then
13339   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13340   if test "$cross_compiling" = yes; then
13341   :
13342 else
13343   cat >conftest.$ac_ext <<_ACEOF
13344 #line 13344 "configure"
13345 #include "confdefs.h"
13346 #include <ctype.h>
13347 #if ((' ' & 0x0FF) == 0x020)
13348 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13349 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13350 #else
13351 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13352                      || ('j' <= (c) && (c) <= 'r') \
13353                      || ('s' <= (c) && (c) <= 'z'))
13354 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13355 #endif
13356
13357 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13358 int
13359 main (void)
13360 {
13361   int i;
13362   for (i = 0; i < 256; i++)
13363     if (XOR (islower (i), ISLOWER (i))
13364         || toupper (i) != TOUPPER (i))
13365       $ac_main_return(2);
13366   $ac_main_return (0);
13367 }
13368 _ACEOF
13369 rm -f conftest$ac_exeext
13370 if { (eval echo "$as_me:13370: \"$ac_link\"") >&5
13371   (eval $ac_link) 2>&5
13372   ac_status=$?
13373   echo "$as_me:13373: \$? = $ac_status" >&5
13374   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13375   { (eval echo "$as_me:13375: \"$ac_try\"") >&5
13376   (eval $ac_try) 2>&5
13377   ac_status=$?
13378   echo "$as_me:13378: \$? = $ac_status" >&5
13379   (exit $ac_status); }; }; then
13380   :
13381 else
13382   echo "$as_me: program exited with status $ac_status" >&5
13383 echo "$as_me: failed program was:" >&5
13384 cat conftest.$ac_ext >&5
13385 ac_cv_header_stdc=no
13386 fi
13387 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13388 fi
13389 fi
13390 fi
13391 echo "$as_me:13391: result: $ac_cv_header_stdc" >&5
13392 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13393 if test $ac_cv_header_stdc = yes; then
13394
13395 cat >>confdefs.h <<\EOF
13396 #define STDC_HEADERS 1
13397 EOF
13398
13399 fi
13400
13401 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13402
13403 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13404                   inttypes.h stdint.h unistd.h
13405 do
13406 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13407 echo "$as_me:13407: checking for $ac_header" >&5
13408 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13409 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13410   echo $ECHO_N "(cached) $ECHO_C" >&6
13411 else
13412   cat >conftest.$ac_ext <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13415 $ac_includes_default
13416 #include <$ac_header>
13417 _ACEOF
13418 rm -f conftest.$ac_objext
13419 if { (eval echo "$as_me:13419: \"$ac_compile\"") >&5
13420   (eval $ac_compile) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit $ac_status); } &&
13424          { ac_try='test -s conftest.$ac_objext'
13425   { (eval echo "$as_me:13425: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit $ac_status); }; }; then
13430   eval "$as_ac_Header=yes"
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 cat conftest.$ac_ext >&5
13434 eval "$as_ac_Header=no"
13435 fi
13436 rm -f conftest.$ac_objext conftest.$ac_ext
13437 fi
13438 echo "$as_me:13438: result: `eval echo '${'$as_ac_Header'}'`" >&5
13439 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13440 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13441   cat >>confdefs.h <<EOF
13442 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13443 EOF
13444
13445 fi
13446 done
13447
13448 echo "$as_me:13448: checking for signed char" >&5
13449 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13450 if test "${ac_cv_type_signed_char+set}" = set; then
13451   echo $ECHO_N "(cached) $ECHO_C" >&6
13452 else
13453   cat >conftest.$ac_ext <<_ACEOF
13454 #line 13454 "configure"
13455 #include "confdefs.h"
13456 $ac_includes_default
13457 int
13458 main (void)
13459 {
13460 if ((signed char *) 0)
13461   return 0;
13462 if (sizeof (signed char))
13463   return 0;
13464   ;
13465   return 0;
13466 }
13467 _ACEOF
13468 rm -f conftest.$ac_objext
13469 if { (eval echo "$as_me:13469: \"$ac_compile\"") >&5
13470   (eval $ac_compile) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); } &&
13474          { ac_try='test -s conftest.$ac_objext'
13475   { (eval echo "$as_me:13475: \"$ac_try\"") >&5
13476   (eval $ac_try) 2>&5
13477   ac_status=$?
13478   echo "$as_me:13478: \$? = $ac_status" >&5
13479   (exit $ac_status); }; }; then
13480   ac_cv_type_signed_char=yes
13481 else
13482   echo "$as_me: failed program was:" >&5
13483 cat conftest.$ac_ext >&5
13484 ac_cv_type_signed_char=no
13485 fi
13486 rm -f conftest.$ac_objext conftest.$ac_ext
13487 fi
13488 echo "$as_me:13488: result: $ac_cv_type_signed_char" >&5
13489 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13490
13491 echo "$as_me:13491: checking size of signed char" >&5
13492 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13493 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13494   echo $ECHO_N "(cached) $ECHO_C" >&6
13495 else
13496   if test "$ac_cv_type_signed_char" = yes; then
13497   if test "$cross_compiling" = yes; then
13498   # Depending upon the size, compute the lo and hi bounds.
13499 cat >conftest.$ac_ext <<_ACEOF
13500 #line 13500 "configure"
13501 #include "confdefs.h"
13502 $ac_includes_default
13503 int
13504 main (void)
13505 {
13506 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13507   ;
13508   return 0;
13509 }
13510 _ACEOF
13511 rm -f conftest.$ac_objext
13512 if { (eval echo "$as_me:13512: \"$ac_compile\"") >&5
13513   (eval $ac_compile) 2>&5
13514   ac_status=$?
13515   echo "$as_me:13515: \$? = $ac_status" >&5
13516   (exit $ac_status); } &&
13517          { ac_try='test -s conftest.$ac_objext'
13518   { (eval echo "$as_me:13518: \"$ac_try\"") >&5
13519   (eval $ac_try) 2>&5
13520   ac_status=$?
13521   echo "$as_me:13521: \$? = $ac_status" >&5
13522   (exit $ac_status); }; }; then
13523   ac_lo=0 ac_mid=0
13524   while :; do
13525     cat >conftest.$ac_ext <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528 $ac_includes_default
13529 int
13530 main (void)
13531 {
13532 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 rm -f conftest.$ac_objext
13538 if { (eval echo "$as_me:13538: \"$ac_compile\"") >&5
13539   (eval $ac_compile) 2>&5
13540   ac_status=$?
13541   echo "$as_me:13541: \$? = $ac_status" >&5
13542   (exit $ac_status); } &&
13543          { ac_try='test -s conftest.$ac_objext'
13544   { (eval echo "$as_me:13544: \"$ac_try\"") >&5
13545   (eval $ac_try) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); }; }; then
13549   ac_hi=$ac_mid; break
13550 else
13551   echo "$as_me: failed program was:" >&5
13552 cat conftest.$ac_ext >&5
13553 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13554 fi
13555 rm -f conftest.$ac_objext conftest.$ac_ext
13556   done
13557 else
13558   echo "$as_me: failed program was:" >&5
13559 cat conftest.$ac_ext >&5
13560 ac_hi=-1 ac_mid=-1
13561   while :; do
13562     cat >conftest.$ac_ext <<_ACEOF
13563 #line 13563 "configure"
13564 #include "confdefs.h"
13565 $ac_includes_default
13566 int
13567 main (void)
13568 {
13569 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f conftest.$ac_objext
13575 if { (eval echo "$as_me:13575: \"$ac_compile\"") >&5
13576   (eval $ac_compile) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit $ac_status); } &&
13580          { ac_try='test -s conftest.$ac_objext'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   ac_lo=$ac_mid; break
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13591 fi
13592 rm -f conftest.$ac_objext conftest.$ac_ext
13593   done
13594 fi
13595 rm -f conftest.$ac_objext conftest.$ac_ext
13596 # Binary search between lo and hi bounds.
13597 while test "x$ac_lo" != "x$ac_hi"; do
13598   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13599   cat >conftest.$ac_ext <<_ACEOF
13600 #line 13600 "configure"
13601 #include "confdefs.h"
13602 $ac_includes_default
13603 int
13604 main (void)
13605 {
13606 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13607   ;
13608   return 0;
13609 }
13610 _ACEOF
13611 rm -f conftest.$ac_objext
13612 if { (eval echo "$as_me:13612: \"$ac_compile\"") >&5
13613   (eval $ac_compile) 2>&5
13614   ac_status=$?
13615   echo "$as_me:13615: \$? = $ac_status" >&5
13616   (exit $ac_status); } &&
13617          { ac_try='test -s conftest.$ac_objext'
13618   { (eval echo "$as_me:13618: \"$ac_try\"") >&5
13619   (eval $ac_try) 2>&5
13620   ac_status=$?
13621   echo "$as_me:13621: \$? = $ac_status" >&5
13622   (exit $ac_status); }; }; then
13623   ac_hi=$ac_mid
13624 else
13625   echo "$as_me: failed program was:" >&5
13626 cat conftest.$ac_ext >&5
13627 ac_lo=`expr $ac_mid + 1`
13628 fi
13629 rm -f conftest.$ac_objext conftest.$ac_ext
13630 done
13631 ac_cv_sizeof_signed_char=$ac_lo
13632 else
13633   if test "$cross_compiling" = yes; then
13634   { { echo "$as_me:13634: error: cannot run test program while cross compiling" >&5
13635 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13636    { (exit 1); exit 1; }; }
13637 else
13638   cat >conftest.$ac_ext <<_ACEOF
13639 #line 13639 "configure"
13640 #include "confdefs.h"
13641 $ac_includes_default
13642 int
13643 main (void)
13644 {
13645 FILE *f = fopen ("conftest.val", "w");
13646 if (!f)
13647   $ac_main_return (1);
13648 fprintf (f, "%d", (sizeof (signed char)));
13649 fclose (f);
13650   ;
13651   return 0;
13652 }
13653 _ACEOF
13654 rm -f conftest$ac_exeext
13655 if { (eval echo "$as_me:13655: \"$ac_link\"") >&5
13656   (eval $ac_link) 2>&5
13657   ac_status=$?
13658   echo "$as_me:13658: \$? = $ac_status" >&5
13659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13660   { (eval echo "$as_me:13660: \"$ac_try\"") >&5
13661   (eval $ac_try) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit $ac_status); }; }; then
13665   ac_cv_sizeof_signed_char=`cat conftest.val`
13666 else
13667   echo "$as_me: program exited with status $ac_status" >&5
13668 echo "$as_me: failed program was:" >&5
13669 cat conftest.$ac_ext >&5
13670 fi
13671 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13672 fi
13673 fi
13674 rm -f conftest.val
13675 else
13676   ac_cv_sizeof_signed_char=0
13677 fi
13678 fi
13679 echo "$as_me:13679: result: $ac_cv_sizeof_signed_char" >&5
13680 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13681 cat >>confdefs.h <<EOF
13682 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13683 EOF
13684
13685 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13686         NCURSES_SBOOL="signed char"
13687 else
13688         NCURSES_SBOOL="char"
13689 fi
13690 echo "$as_me:13690: checking if you want to use signed Boolean array in term.h" >&5
13691 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13692
13693 # Check whether --enable-signed-char or --disable-signed-char was given.
13694 if test "${enable_signed_char+set}" = set; then
13695   enableval="$enable_signed_char"
13696   with_signed_char=$enableval
13697 else
13698   with_signed_char=no
13699 fi;
13700 echo "$as_me:13700: result: $with_signed_char" >&5
13701 echo "${ECHO_T}$with_signed_char" >&6
13702 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13703
13704 ###   use option --with-tparm-arg to override tparm's argument type
13705 echo "$as_me:13705: checking for type of tparm args" >&5
13706 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13707
13708 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13709 if test "${with_tparm_arg+set}" = set; then
13710   withval="$with_tparm_arg"
13711   NCURSES_TPARM_ARG="$withval"
13712 else
13713   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13714 fi;
13715 echo "$as_me:13715: result: $NCURSES_TPARM_ARG" >&5
13716 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13717
13718 ### Enable compiling-in rcs id's
13719 echo "$as_me:13719: checking if RCS identifiers should be compiled-in" >&5
13720 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13721
13722 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13723 if test "${with_rcs_ids+set}" = set; then
13724   withval="$with_rcs_ids"
13725   with_rcs_ids=$withval
13726 else
13727   with_rcs_ids=no
13728 fi;
13729 echo "$as_me:13729: result: $with_rcs_ids" >&5
13730 echo "${ECHO_T}$with_rcs_ids" >&6
13731 test "x$with_rcs_ids" = xyes &&
13732 cat >>confdefs.h <<\EOF
13733 #define USE_RCS_IDS 1
13734 EOF
13735
13736 ###############################################################################
13737
13738 echo "$as_me:13738: checking format of man-pages" >&5
13739 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13740
13741 # Check whether --with-manpage-format or --without-manpage-format was given.
13742 if test "${with_manpage_format+set}" = set; then
13743   withval="$with_manpage_format"
13744   MANPAGE_FORMAT=$withval
13745 else
13746   MANPAGE_FORMAT=unknown
13747 fi;
13748
13749 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13750 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13751
13752 cf_unknown=
13753
13754 case $MANPAGE_FORMAT in
13755 (unknown)
13756         if test -z "$MANPATH" ; then
13757                 MANPATH="/usr/man:/usr/share/man"
13758         fi
13759
13760         # look for the 'date' man-page (it's most likely to be installed!)
13761         MANPAGE_FORMAT=
13762         cf_preform=no
13763         cf_catonly=yes
13764         cf_example=date
13765
13766         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13767         for cf_dir in $MANPATH; do
13768                 test -z "$cf_dir" && cf_dir=/usr/man
13769                 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
13770                 do
13771                         cf_test=`echo $cf_name | sed -e 's/*//'`
13772                         if test "x$cf_test" = "x$cf_name" ; then
13773
13774                                 case "$cf_name" in
13775                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13776                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13777                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13778                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13779                                 esac
13780
13781                                 case "$cf_name" in
13782                                 ($cf_dir/man*)
13783                                         cf_catonly=no
13784                                         ;;
13785                                 ($cf_dir/cat*)
13786                                         cf_preform=yes
13787                                         ;;
13788                                 esac
13789                                 break
13790                         fi
13791
13792                         # if we found a match in either man* or cat*, stop looking
13793                         if test -n "$MANPAGE_FORMAT" ; then
13794                                 cf_found=no
13795                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13796                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13797                                 case "$cf_name" in
13798                                 ($cf_dir/cat*)
13799                                         cf_found=yes
13800                                         ;;
13801                                 esac
13802                                 test $cf_found=yes && break
13803                         fi
13804                 done
13805                 # only check the first directory in $MANPATH where we find manpages
13806                 if test -n "$MANPAGE_FORMAT" ; then
13807                         break
13808                 fi
13809         done
13810         # if we did not find the example, just assume it is normal
13811         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13812         IFS="$ac_save_ifs"
13813         ;;
13814 (*)
13815         for cf_option in $MANPAGE_FORMAT; do
13816         case $cf_option in
13817         (gzip|compress|BSDI|normal|formatted|catonly)
13818                 ;;
13819         (*)
13820                 cf_unknown="$cf_unknown $cf_option"
13821                 ;;
13822         esac
13823         done
13824         ;;
13825 esac
13826
13827 echo "$as_me:13827: result: $MANPAGE_FORMAT" >&5
13828 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13829 if test -n "$cf_unknown" ; then
13830         { echo "$as_me:13830: WARNING: Unexpected manpage-format $cf_unknown" >&5
13831 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13832 fi
13833
13834 echo "$as_me:13834: checking for manpage renaming" >&5
13835 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13836
13837 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13838 if test "${with_manpage_renames+set}" = set; then
13839   withval="$with_manpage_renames"
13840   MANPAGE_RENAMES=$withval
13841 else
13842   MANPAGE_RENAMES=yes
13843 fi;
13844
13845 case ".$MANPAGE_RENAMES" in
13846 (.no)
13847         ;;
13848 (.|.yes)
13849         # Debian 'man' program?
13850         if test -f /etc/debian_version ; then
13851                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13852         else
13853                 MANPAGE_RENAMES=no
13854         fi
13855         ;;
13856 esac
13857
13858 if test "$MANPAGE_RENAMES" != no ; then
13859         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13860                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13861         elif test ! -f $MANPAGE_RENAMES ; then
13862                 { { echo "$as_me:13862: error: not a filename: $MANPAGE_RENAMES" >&5
13863 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13864    { (exit 1); exit 1; }; }
13865         fi
13866
13867         test ! -d man && mkdir man
13868
13869         # Construct a sed-script to perform renaming within man-pages
13870         if test -n "$MANPAGE_RENAMES" ; then
13871                 test ! -d man && mkdir man
13872                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13873         fi
13874 fi
13875
13876 echo "$as_me:13876: result: $MANPAGE_RENAMES" >&5
13877 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13878
13879 echo "$as_me:13879: checking if manpage aliases will be installed" >&5
13880 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13881
13882 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13883 if test "${with_manpage_aliases+set}" = set; then
13884   withval="$with_manpage_aliases"
13885   MANPAGE_ALIASES=$withval
13886 else
13887   MANPAGE_ALIASES=yes
13888 fi;
13889
13890 echo "$as_me:13890: result: $MANPAGE_ALIASES" >&5
13891 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13892
13893 case "x$LN_S" in
13894 (xln*)
13895         cf_use_symlinks=yes
13896         ;;
13897 (*)
13898         cf_use_symlinks=no
13899         ;;
13900 esac
13901
13902 MANPAGE_SYMLINKS=no
13903 if test "$MANPAGE_ALIASES" = yes ; then
13904 echo "$as_me:13904: checking if manpage symlinks should be used" >&5
13905 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13906
13907 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13908 if test "${with_manpage_symlinks+set}" = set; then
13909   withval="$with_manpage_symlinks"
13910   MANPAGE_SYMLINKS=$withval
13911 else
13912   MANPAGE_SYMLINKS=$cf_use_symlinks
13913 fi;
13914
13915 if test "$$cf_use_symlinks" = no; then
13916 if test "$MANPAGE_SYMLINKS" = yes ; then
13917         { echo "$as_me:13917: WARNING: cannot make symlinks" >&5
13918 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13919         MANPAGE_SYMLINKS=no
13920 fi
13921 fi
13922
13923 echo "$as_me:13923: result: $MANPAGE_SYMLINKS" >&5
13924 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13925 fi
13926
13927 echo "$as_me:13927: checking for manpage tbl" >&5
13928 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13929
13930 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13931 if test "${with_manpage_tbl+set}" = set; then
13932   withval="$with_manpage_tbl"
13933   MANPAGE_TBL=$withval
13934 else
13935   MANPAGE_TBL=no
13936 fi;
13937
13938 echo "$as_me:13938: result: $MANPAGE_TBL" >&5
13939 echo "${ECHO_T}$MANPAGE_TBL" >&6
13940
13941 if test "$prefix" = "NONE" ; then
13942         cf_prefix="$ac_default_prefix"
13943 else
13944         cf_prefix="$prefix"
13945 fi
13946
13947 case "$MANPAGE_FORMAT" in
13948 (*catonly*)
13949         cf_format=yes
13950         cf_inboth=no
13951         ;;
13952 (*formatted*)
13953         cf_format=yes
13954         cf_inboth=yes
13955         ;;
13956 (*)
13957         cf_format=no
13958         cf_inboth=no
13959         ;;
13960 esac
13961
13962 test ! -d man && mkdir man
13963
13964 cf_so_strip=
13965 cf_compress=
13966 case "$MANPAGE_FORMAT" in
13967 (*compress*)
13968         cf_so_strip="Z"
13969         cf_compress=compress
13970         ;;
13971 (*gzip*)
13972         cf_so_strip="gz"
13973         cf_compress=gzip
13974         ;;
13975 esac
13976
13977 cf_edit_man=./edit_man.sh
13978 cf_man_alias=`pwd`/man_alias.sed
13979
13980 cat >$cf_edit_man <<CF_EOF
13981 #! $SHELL
13982 # this script is generated by the configure-script CF_MAN_PAGES macro.
13983
13984 prefix="$cf_prefix"
13985 datarootdir="$datarootdir"
13986 datadir="$datadir"
13987
13988 NCURSES_MAJOR="$NCURSES_MAJOR"
13989 NCURSES_MINOR="$NCURSES_MINOR"
13990 NCURSES_PATCH="$NCURSES_PATCH"
13991
13992 NCURSES_OSPEED="$NCURSES_OSPEED"
13993 TERMINFO="$TERMINFO"
13994
13995 INSTALL="$INSTALL"
13996 INSTALL_DATA="$INSTALL_DATA"
13997
13998 transform="$program_transform_name"
13999
14000 TMP=\${TMPDIR:=/tmp}/man\$\$
14001 trap "rm -f \$TMP" 0 1 2 3 15
14002
14003 form=\$1
14004 shift || exit 1
14005
14006 verb=\$1
14007 shift || exit 1
14008
14009 mandir=\$1
14010 shift || exit 1
14011
14012 srcdir=\$1
14013 top_srcdir=\$srcdir/..
14014 shift || exit 1
14015
14016 if test "\$form" = normal ; then
14017         if test "$cf_format" = yes ; then
14018         if test "$cf_inboth" = no ; then
14019                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14020                 exit $?
14021         fi
14022         fi
14023         cf_subdir=\$mandir/man
14024         cf_tables=$MANPAGE_TBL
14025 else
14026         cf_subdir=\$mandir/cat
14027         cf_tables=yes
14028 fi
14029
14030 # process the list of source-files
14031 for i in \$* ; do
14032 case \$i in
14033 (*.orig|*.rej) ;;
14034 (*.[0-9]*)
14035         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14036         if test \$verb = installing ; then
14037         if test ! -d \$cf_subdir\${section} ; then
14038                 mkdir -p \$cf_subdir\$section
14039         fi
14040         fi
14041
14042         # replace variables in man page
14043         if test ! -f $cf_man_alias ; then
14044 cat >>$cf_man_alias <<-CF_EOF2
14045                 s,@DATADIR@,\$datadir,g
14046                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14047                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14048                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14049                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14050                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14051                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14052 CF_EOF
14053
14054         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14055         do
14056                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14057                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14058 cat >>$cf_edit_man <<-CF_EOF
14059                 s,@$cf_NAME@,$cf_name,g
14060 CF_EOF
14061         done
14062
14063 cat >>$cf_edit_man <<CF_EOF
14064 CF_EOF2
14065                 echo "...made $cf_man_alias"
14066         fi
14067
14068         aliases=
14069         cf_source=\`basename \$i\`
14070         inalias=\$cf_source
14071         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14072         if test ! -f \$inalias ; then
14073                 echo .. skipped \$cf_source
14074                 continue
14075         fi
14076 CF_EOF
14077
14078 if test "$MANPAGE_ALIASES" != no ; then
14079 cat >>$cf_edit_man <<CF_EOF
14080         nCurses=ignore.3x
14081         test $with_curses_h = yes && nCurses=ncurses.3x
14082         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14083 CF_EOF
14084 fi
14085
14086 if test "$MANPAGE_RENAMES" = no ; then
14087 cat >>$cf_edit_man <<CF_EOF
14088         # perform program transformations for section 1 man pages
14089         if test \$section = 1 ; then
14090                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14091         else
14092                 cf_target=\$cf_subdir\${section}/\$cf_source
14093         fi
14094 CF_EOF
14095 else
14096 cat >>$cf_edit_man <<CF_EOF
14097         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14098         if test -z "\$cf_target" ; then
14099                 echo '? missing rename for '\$cf_source
14100                 cf_target="\$cf_source"
14101         fi
14102         cf_target="\$cf_subdir\${section}/\${cf_target}"
14103
14104 CF_EOF
14105 fi
14106
14107 cat >>$cf_edit_man <<CF_EOF
14108         sed     -f $cf_man_alias \\
14109 CF_EOF
14110
14111 if test -f $MANPAGE_RENAMES ; then
14112 cat >>$cf_edit_man <<CF_EOF
14113                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14114 CF_EOF
14115 else
14116 cat >>$cf_edit_man <<CF_EOF
14117                 < \$i >\$TMP
14118 CF_EOF
14119 fi
14120
14121 cat >>$cf_edit_man <<CF_EOF
14122 if test \$cf_tables = yes ; then
14123         tbl \$TMP >\$TMP.out
14124         mv \$TMP.out \$TMP
14125 fi
14126 CF_EOF
14127
14128 if test $with_overwrite != yes ; then
14129 cat >>$cf_edit_man <<CF_EOF
14130         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14131         mv \$TMP.out \$TMP
14132 CF_EOF
14133 fi
14134
14135 if test $with_curses_h != yes ; then
14136 cat >>$cf_edit_man <<CF_EOF
14137         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14138         mv \$TMP.out \$TMP
14139 CF_EOF
14140 fi
14141
14142 cat >>$cf_edit_man <<CF_EOF
14143         if test \$form = format ; then
14144                 nroff -man \$TMP >\$TMP.out
14145                 mv \$TMP.out \$TMP
14146         fi
14147 CF_EOF
14148
14149 if test -n "$cf_compress" ; then
14150 cat >>$cf_edit_man <<CF_EOF
14151         if test \$verb = installing ; then
14152         if ( $cf_compress -f \$TMP )
14153         then
14154                 mv \$TMP.$cf_so_strip \$TMP
14155         fi
14156         fi
14157         cf_target="\$cf_target.$cf_so_strip"
14158 CF_EOF
14159 fi
14160
14161 case "$MANPAGE_FORMAT" in
14162 (*BSDI*)
14163 cat >>$cf_edit_man <<CF_EOF
14164         if test \$form = format ; then
14165                 # BSDI installs only .0 suffixes in the cat directories
14166                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14167         fi
14168 CF_EOF
14169   ;;
14170 esac
14171
14172 cat >>$cf_edit_man <<CF_EOF
14173         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14174         if test \$verb = installing ; then
14175                 echo \$verb \$cf_target
14176                 \$INSTALL_DATA \$TMP \$cf_target
14177                 test -d \$cf_subdir\${section} &&
14178                 test -n "\$aliases" && (
14179                         cd \$cf_subdir\${section} && (
14180                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14181                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14182                                 cf_target=\`basename \$cf_target\`
14183                                 for cf_alias in \$aliases
14184                                 do
14185                                         if test \$section = 1 ; then
14186                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14187                                         fi
14188
14189                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14190                                                 if test -f \$cf_alias\${suffix} ; then
14191                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14192                                                         then
14193                                                                 continue
14194                                                         fi
14195                                                 fi
14196                                                 echo .. \$verb alias \$cf_alias\${suffix}
14197 CF_EOF
14198 case "x$LN_S" in
14199 (*-f)
14200 cat >>$cf_edit_man <<CF_EOF
14201                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14202 CF_EOF
14203         ;;
14204 (*)
14205 cat >>$cf_edit_man <<CF_EOF
14206                                                 rm -f \$cf_alias\${suffix}
14207                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14208 CF_EOF
14209         ;;
14210 esac
14211 cat >>$cf_edit_man <<CF_EOF
14212                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14213                                                 echo ".so \$cf_source" >\$TMP
14214 CF_EOF
14215 if test -n "$cf_compress" ; then
14216 cat >>$cf_edit_man <<CF_EOF
14217                                                 if test -n "$cf_so_strip" ; then
14218                                                         $cf_compress -f \$TMP
14219                                                         mv \$TMP.$cf_so_strip \$TMP
14220                                                 fi
14221 CF_EOF
14222 fi
14223 cat >>$cf_edit_man <<CF_EOF
14224                                                 echo .. \$verb alias \$cf_alias\${suffix}
14225                                                 rm -f \$cf_alias\${suffix}
14226                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14227                                         fi
14228                                 done
14229                         )
14230                 )
14231         elif test \$verb = removing ; then
14232                 test -f \$cf_target && (
14233                         echo \$verb \$cf_target
14234                         rm -f \$cf_target
14235                 )
14236                 test -d \$cf_subdir\${section} &&
14237                 test -n "\$aliases" && (
14238                         cd \$cf_subdir\${section} && (
14239                                 for cf_alias in \$aliases
14240                                 do
14241                                         if test \$section = 1 ; then
14242                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14243                                         fi
14244
14245                                         echo .. \$verb alias \$cf_alias\${suffix}
14246                                         rm -f \$cf_alias\${suffix}
14247                                 done
14248                         )
14249                 )
14250         else
14251 #               echo ".hy 0"
14252                 cat \$TMP
14253         fi
14254         ;;
14255 esac
14256 done
14257
14258 if test $cf_inboth = yes ; then
14259 if test \$form != format ; then
14260         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14261 fi
14262 fi
14263
14264 exit 0
14265 CF_EOF
14266 chmod 755 $cf_edit_man
14267
14268 ###############################################################################
14269
14270 ### Note that some functions (such as const) are normally disabled anyway.
14271 echo "$as_me:14271: checking if you want to build with function extensions" >&5
14272 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14273
14274 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14275 if test "${enable_ext_funcs+set}" = set; then
14276   enableval="$enable_ext_funcs"
14277   with_ext_funcs=$enableval
14278 else
14279   with_ext_funcs=yes
14280 fi;
14281 echo "$as_me:14281: result: $with_ext_funcs" >&5
14282 echo "${ECHO_T}$with_ext_funcs" >&6
14283 if test "x$with_ext_funcs" = xyes ; then
14284         NCURSES_EXT_FUNCS=1
14285
14286 cat >>confdefs.h <<\EOF
14287 #define NCURSES_EXT_FUNCS 1
14288 EOF
14289
14290 cat >>confdefs.h <<\EOF
14291 #define HAVE_ASSUME_DEFAULT_COLORS 1
14292 EOF
14293
14294 cat >>confdefs.h <<\EOF
14295 #define HAVE_CURSES_VERSION 1
14296 EOF
14297
14298 cat >>confdefs.h <<\EOF
14299 #define HAVE_HAS_KEY 1
14300 EOF
14301
14302 cat >>confdefs.h <<\EOF
14303 #define HAVE_RESIZETERM 1
14304 EOF
14305
14306 cat >>confdefs.h <<\EOF
14307 #define HAVE_RESIZE_TERM 1
14308 EOF
14309
14310 cat >>confdefs.h <<\EOF
14311 #define HAVE_TERM_ENTRY_H 1
14312 EOF
14313
14314 cat >>confdefs.h <<\EOF
14315 #define HAVE_USE_DEFAULT_COLORS 1
14316 EOF
14317
14318 cat >>confdefs.h <<\EOF
14319 #define HAVE_USE_EXTENDED_NAMES 1
14320 EOF
14321
14322 cat >>confdefs.h <<\EOF
14323 #define HAVE_USE_SCREEN 1
14324 EOF
14325
14326 cat >>confdefs.h <<\EOF
14327 #define HAVE_USE_WINDOW 1
14328 EOF
14329
14330 cat >>confdefs.h <<\EOF
14331 #define HAVE_WRESIZE 1
14332 EOF
14333
14334         GENERATED_EXT_FUNCS=generated
14335         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14336 else
14337         NCURSES_EXT_FUNCS=0
14338         GENERATED_EXT_FUNCS=
14339 fi
14340
14341 echo "$as_me:14341: checking if you want to build with SCREEN extensions" >&5
14342 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14343
14344 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14345 if test "${enable_sp_funcs+set}" = set; then
14346   enableval="$enable_sp_funcs"
14347   with_sp_funcs=$enableval
14348 else
14349   with_sp_funcs=$cf_dft_ext_spfuncs
14350 fi;
14351 echo "$as_me:14351: result: $with_sp_funcs" >&5
14352 echo "${ECHO_T}$with_sp_funcs" >&6
14353 if test "x$with_sp_funcs" = xyes ; then
14354         NCURSES_SP_FUNCS=1
14355
14356 cat >>confdefs.h <<\EOF
14357 #define NCURSES_SP_FUNCS 1
14358 EOF
14359
14360 cat >>confdefs.h <<\EOF
14361 #define HAVE_TPUTS_SP 1
14362 EOF
14363
14364         GENERATED_SP_FUNCS=generated
14365 else
14366         NCURSES_SP_FUNCS=0
14367         GENERATED_SP_FUNCS=
14368 fi
14369
14370 echo "$as_me:14370: checking if you want to build with terminal-driver" >&5
14371 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14372
14373 # Check whether --enable-term-driver or --disable-term-driver was given.
14374 if test "${enable_term_driver+set}" = set; then
14375   enableval="$enable_term_driver"
14376   with_term_driver=$enableval
14377 else
14378   with_term_driver=no
14379 fi;
14380 echo "$as_me:14380: result: $with_term_driver" >&5
14381 echo "${ECHO_T}$with_term_driver" >&6
14382 if test "x$with_term_driver" = xyes ; then
14383
14384 cat >>confdefs.h <<\EOF
14385 #define USE_TERM_DRIVER 1
14386 EOF
14387
14388         if test "x$with_termlib" != xno ; then
14389                 { { echo "$as_me:14389: error: The term-driver option conflicts with the termlib option" >&5
14390 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14391    { (exit 1); exit 1; }; }
14392         fi
14393         if test "x$with_sp_funcs" != xyes ; then
14394                 { { echo "$as_me:14394: error: The term-driver option relies upon sp-funcs" >&5
14395 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14396    { (exit 1); exit 1; }; }
14397         fi
14398 fi
14399
14400 ###   use option --enable-const to turn on use of const beyond that in XSI.
14401 echo "$as_me:14401: checking for extended use of const keyword" >&5
14402 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14403
14404 # Check whether --enable-const or --disable-const was given.
14405 if test "${enable_const+set}" = set; then
14406   enableval="$enable_const"
14407   with_ext_const=$enableval
14408 else
14409   with_ext_const=$cf_dft_ext_const
14410 fi;
14411 echo "$as_me:14411: result: $with_ext_const" >&5
14412 echo "${ECHO_T}$with_ext_const" >&6
14413 NCURSES_CONST='/*nothing*/'
14414 if test "x$with_ext_const" = xyes ; then
14415         NCURSES_CONST=const
14416 fi
14417
14418 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14419 echo "$as_me:14419: checking if you want to use extended colors" >&5
14420 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14421
14422 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14423 if test "${enable_ext_colors+set}" = set; then
14424   enableval="$enable_ext_colors"
14425   with_ext_colors=$enableval
14426 else
14427   with_ext_colors=$cf_dft_ext_colors
14428 fi;
14429 echo "$as_me:14429: result: $with_ext_colors" >&5
14430 echo "${ECHO_T}$with_ext_colors" >&6
14431 NCURSES_EXT_COLORS=0
14432 if test "x$with_ext_colors" = xyes ; then
14433         if test "x$with_widec" != xyes ; then
14434                 { echo "$as_me:14434: WARNING: This option applies only to wide-character library" >&5
14435 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14436         else
14437                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14438
14439 if test "${with_abi_version+set}" != set; then
14440         case $cf_cv_rel_version in
14441         (5.*)
14442                 cf_cv_rel_version=6.0
14443                 cf_cv_abi_version=6
14444                 { echo "$as_me:14444: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14445 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14446                 ;;
14447         esac
14448 fi
14449
14450                 NCURSES_EXT_COLORS=1
14451
14452 cat >>confdefs.h <<\EOF
14453 #define NCURSES_EXT_COLORS 1
14454 EOF
14455
14456 cat >>confdefs.h <<\EOF
14457 #define HAVE_ALLOC_PAIR 1
14458 EOF
14459
14460 cat >>confdefs.h <<\EOF
14461 #define HAVE_INIT_EXTENDED_COLOR 1
14462 EOF
14463
14464 cat >>confdefs.h <<\EOF
14465 #define HAVE_RESET_COLOR_PAIRS 1
14466 EOF
14467
14468         fi
14469 fi
14470
14471 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14472 echo "$as_me:14472: checking if you want to use extended mouse encoding" >&5
14473 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14474
14475 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14476 if test "${enable_ext_mouse+set}" = set; then
14477   enableval="$enable_ext_mouse"
14478   with_ext_mouse=$enableval
14479 else
14480   with_ext_mouse=$cf_dft_ext_mouse
14481 fi;
14482 echo "$as_me:14482: result: $with_ext_mouse" >&5
14483 echo "${ECHO_T}$with_ext_mouse" >&6
14484 NCURSES_MOUSE_VERSION=1
14485 if test "x$with_ext_mouse" = xyes ; then
14486         NCURSES_MOUSE_VERSION=2
14487
14488 if test "${with_abi_version+set}" != set; then
14489         case $cf_cv_rel_version in
14490         (5.*)
14491                 cf_cv_rel_version=6.0
14492                 cf_cv_abi_version=6
14493                 { echo "$as_me:14493: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14494 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14495                 ;;
14496         esac
14497 fi
14498
14499 fi
14500
14501 ###   use option --enable-ext-putwin to turn on extended screendumps
14502 echo "$as_me:14502: checking if you want to use extended putwin/screendump" >&5
14503 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14504
14505 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14506 if test "${enable_ext_putwin+set}" = set; then
14507   enableval="$enable_ext_putwin"
14508   with_ext_putwin=$enableval
14509 else
14510   with_ext_putwin=$cf_dft_ext_putwin
14511 fi;
14512 echo "$as_me:14512: result: $with_ext_putwin" >&5
14513 echo "${ECHO_T}$with_ext_putwin" >&6
14514 if test "x$with_ext_putwin" = xyes ; then
14515
14516 cat >>confdefs.h <<\EOF
14517 #define NCURSES_EXT_PUTWIN 1
14518 EOF
14519
14520 fi
14521
14522 echo "$as_me:14522: checking if you want \$NCURSES_NO_PADDING code" >&5
14523 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14524
14525 # Check whether --enable-no-padding or --disable-no-padding was given.
14526 if test "${enable_no_padding+set}" = set; then
14527   enableval="$enable_no_padding"
14528   with_no_padding=$enableval
14529 else
14530   with_no_padding=$with_ext_funcs
14531 fi;
14532 echo "$as_me:14532: result: $with_no_padding" >&5
14533 echo "${ECHO_T}$with_no_padding" >&6
14534 test "x$with_no_padding" = xyes &&
14535 cat >>confdefs.h <<\EOF
14536 #define NCURSES_NO_PADDING 1
14537 EOF
14538
14539 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14540 echo "$as_me:14540: checking if you want SIGWINCH handler" >&5
14541 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14542
14543 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14544 if test "${enable_sigwinch+set}" = set; then
14545   enableval="$enable_sigwinch"
14546   with_sigwinch=$enableval
14547 else
14548   with_sigwinch=$with_ext_funcs
14549 fi;
14550 echo "$as_me:14550: result: $with_sigwinch" >&5
14551 echo "${ECHO_T}$with_sigwinch" >&6
14552 test "x$with_sigwinch" = xyes &&
14553 cat >>confdefs.h <<\EOF
14554 #define USE_SIGWINCH 1
14555 EOF
14556
14557 ###   use option --enable-tcap-names to allow user to define new capabilities
14558 echo "$as_me:14558: checking if you want user-definable terminal capabilities like termcap" >&5
14559 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14560
14561 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14562 if test "${enable_tcap_names+set}" = set; then
14563   enableval="$enable_tcap_names"
14564   with_tcap_names=$enableval
14565 else
14566   with_tcap_names=$with_ext_funcs
14567 fi;
14568 echo "$as_me:14568: result: $with_tcap_names" >&5
14569 echo "${ECHO_T}$with_tcap_names" >&6
14570 NCURSES_XNAMES=0
14571 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14572
14573 ##############################################################################
14574
14575 echo "$as_me:14575: checking if you want to link with the pthread library" >&5
14576 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14577
14578 # Check whether --with-pthread or --without-pthread was given.
14579 if test "${with_pthread+set}" = set; then
14580   withval="$with_pthread"
14581   with_pthread=$withval
14582 else
14583   with_pthread=no
14584 fi;
14585 echo "$as_me:14585: result: $with_pthread" >&5
14586 echo "${ECHO_T}$with_pthread" >&6
14587
14588 if test "$with_pthread" != no ; then
14589         echo "$as_me:14589: checking for pthread.h" >&5
14590 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14591 if test "${ac_cv_header_pthread_h+set}" = set; then
14592   echo $ECHO_N "(cached) $ECHO_C" >&6
14593 else
14594   cat >conftest.$ac_ext <<_ACEOF
14595 #line 14595 "configure"
14596 #include "confdefs.h"
14597 #include <pthread.h>
14598 _ACEOF
14599 if { (eval echo "$as_me:14599: \"$ac_cpp conftest.$ac_ext\"") >&5
14600   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14601   ac_status=$?
14602   egrep -v '^ *\+' conftest.er1 >conftest.err
14603   rm -f conftest.er1
14604   cat conftest.err >&5
14605   echo "$as_me:14605: \$? = $ac_status" >&5
14606   (exit $ac_status); } >/dev/null; then
14607   if test -s conftest.err; then
14608     ac_cpp_err=$ac_c_preproc_warn_flag
14609   else
14610     ac_cpp_err=
14611   fi
14612 else
14613   ac_cpp_err=yes
14614 fi
14615 if test -z "$ac_cpp_err"; then
14616   ac_cv_header_pthread_h=yes
14617 else
14618   echo "$as_me: failed program was:" >&5
14619   cat conftest.$ac_ext >&5
14620   ac_cv_header_pthread_h=no
14621 fi
14622 rm -f conftest.err conftest.$ac_ext
14623 fi
14624 echo "$as_me:14624: result: $ac_cv_header_pthread_h" >&5
14625 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14626 if test $ac_cv_header_pthread_h = yes; then
14627
14628 cat >>confdefs.h <<\EOF
14629 #define HAVE_PTHREADS_H 1
14630 EOF
14631
14632         for cf_lib_pthread in pthread c_r
14633         do
14634             echo "$as_me:14634: checking if we can link with the $cf_lib_pthread library" >&5
14635 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14636             cf_save_LIBS="$LIBS"
14637
14638 cf_add_libs="$LIBS"
14639 # reverse order
14640 cf_add_0lib=
14641 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14642 # filter duplicates
14643 for cf_add_1lib in $cf_add_0lib; do
14644         for cf_add_2lib in $cf_add_libs; do
14645                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14646                         cf_add_1lib=
14647                         break
14648                 fi
14649         done
14650         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14651 done
14652 LIBS="$cf_add_libs"
14653
14654             cat >conftest.$ac_ext <<_ACEOF
14655 #line 14655 "configure"
14656 #include "confdefs.h"
14657
14658 #include <pthread.h>
14659
14660 int
14661 main (void)
14662 {
14663
14664                 int rc = pthread_create(0,0,0,0);
14665                 int r2 = pthread_mutexattr_settype(0, 0);
14666
14667   ;
14668   return 0;
14669 }
14670 _ACEOF
14671 rm -f conftest.$ac_objext conftest$ac_exeext
14672 if { (eval echo "$as_me:14672: \"$ac_link\"") >&5
14673   (eval $ac_link) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit $ac_status); } &&
14677          { ac_try='test -s conftest$ac_exeext'
14678   { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679   (eval $ac_try) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit $ac_status); }; }; then
14683   with_pthread=yes
14684 else
14685   echo "$as_me: failed program was:" >&5
14686 cat conftest.$ac_ext >&5
14687 with_pthread=no
14688 fi
14689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14690             LIBS="$cf_save_LIBS"
14691             echo "$as_me:14691: result: $with_pthread" >&5
14692 echo "${ECHO_T}$with_pthread" >&6
14693             test "$with_pthread" = yes && break
14694         done
14695
14696         if test "$with_pthread" = yes ; then
14697
14698 cf_add_libs="$LIBS"
14699 # reverse order
14700 cf_add_0lib=
14701 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14702 # filter duplicates
14703 for cf_add_1lib in $cf_add_0lib; do
14704         for cf_add_2lib in $cf_add_libs; do
14705                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14706                         cf_add_1lib=
14707                         break
14708                 fi
14709         done
14710         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14711 done
14712 LIBS="$cf_add_libs"
14713
14714 cat >>confdefs.h <<\EOF
14715 #define HAVE_LIBPTHREADS 1
14716 EOF
14717
14718         else
14719             { { echo "$as_me:14719: error: Cannot link with pthread library" >&5
14720 echo "$as_me: error: Cannot link with pthread library" >&2;}
14721    { (exit 1); exit 1; }; }
14722         fi
14723
14724 fi
14725
14726 fi
14727
14728 if test "x$with_pthread" != xno; then
14729         echo "$as_me:14729: checking for pthread_kill" >&5
14730 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14731 if test "${ac_cv_func_pthread_kill+set}" = set; then
14732   echo $ECHO_N "(cached) $ECHO_C" >&6
14733 else
14734   cat >conftest.$ac_ext <<_ACEOF
14735 #line 14735 "configure"
14736 #include "confdefs.h"
14737 #define pthread_kill autoconf_temporary
14738 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14739 #undef pthread_kill
14740
14741 #ifdef __cplusplus
14742 extern "C"
14743 #endif
14744
14745 /* We use char because int might match the return type of a gcc2
14746    builtin and then its argument prototype would still apply.  */
14747 char pthread_kill (void);
14748
14749 int
14750 main (void)
14751 {
14752
14753 /* The GNU C library defines stubs for functions which it implements
14754     to always fail with ENOSYS.  Some functions are actually named
14755     something starting with __ and the normal name is an alias.  */
14756 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14757 #error found stub for pthread_kill
14758 #endif
14759
14760         return pthread_kill ();
14761   ;
14762   return 0;
14763 }
14764 _ACEOF
14765 rm -f conftest.$ac_objext conftest$ac_exeext
14766 if { (eval echo "$as_me:14766: \"$ac_link\"") >&5
14767   (eval $ac_link) 2>&5
14768   ac_status=$?
14769   echo "$as_me:14769: \$? = $ac_status" >&5
14770   (exit $ac_status); } &&
14771          { ac_try='test -s conftest$ac_exeext'
14772   { (eval echo "$as_me:14772: \"$ac_try\"") >&5
14773   (eval $ac_try) 2>&5
14774   ac_status=$?
14775   echo "$as_me:14775: \$? = $ac_status" >&5
14776   (exit $ac_status); }; }; then
14777   ac_cv_func_pthread_kill=yes
14778 else
14779   echo "$as_me: failed program was:" >&5
14780 cat conftest.$ac_ext >&5
14781 ac_cv_func_pthread_kill=no
14782 fi
14783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14784 fi
14785 echo "$as_me:14785: result: $ac_cv_func_pthread_kill" >&5
14786 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14787 if test $ac_cv_func_pthread_kill = yes; then
14788
14789                 echo "$as_me:14789: checking if you want to allow EINTR in wgetch with pthreads" >&5
14790 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14791
14792 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14793 if test "${enable_pthreads_eintr+set}" = set; then
14794   enableval="$enable_pthreads_eintr"
14795   use_pthreads_eintr=$enableval
14796 else
14797   use_pthreads_eintr=no
14798 fi;
14799                 echo "$as_me:14799: result: $use_pthreads_eintr" >&5
14800 echo "${ECHO_T}$use_pthreads_eintr" >&6
14801                 if test "x$use_pthreads_eintr" = xyes ; then
14802
14803 cat >>confdefs.h <<\EOF
14804 #define USE_PTHREADS_EINTR 1
14805 EOF
14806
14807                 fi
14808 fi
14809
14810         echo "$as_me:14810: checking if you want to use weak-symbols for pthreads" >&5
14811 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14812
14813 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14814 if test "${enable_weak_symbols+set}" = set; then
14815   enableval="$enable_weak_symbols"
14816   use_weak_symbols=$enableval
14817 else
14818   use_weak_symbols=no
14819 fi;
14820         echo "$as_me:14820: result: $use_weak_symbols" >&5
14821 echo "${ECHO_T}$use_weak_symbols" >&6
14822         if test "x$use_weak_symbols" = xyes ; then
14823
14824 echo "$as_me:14824: checking if $CC supports weak symbols" >&5
14825 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14826 if test "${cf_cv_weak_symbols+set}" = set; then
14827   echo $ECHO_N "(cached) $ECHO_C" >&6
14828 else
14829
14830 cat >conftest.$ac_ext <<_ACEOF
14831 #line 14831 "configure"
14832 #include "confdefs.h"
14833
14834 #include <stdio.h>
14835 int
14836 main (void)
14837 {
14838
14839 #if defined(__GNUC__)
14840 #  if defined __USE_ISOC99
14841 #    define _cat_pragma(exp)    _Pragma(#exp)
14842 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14843 #  else
14844 #    define _weak_pragma(exp)
14845 #  endif
14846 #  define _declare(name)        __extension__ extern __typeof__(name) name
14847 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14848 #endif
14849
14850 weak_symbol(fopen);
14851
14852   ;
14853   return 0;
14854 }
14855 _ACEOF
14856 rm -f conftest.$ac_objext
14857 if { (eval echo "$as_me:14857: \"$ac_compile\"") >&5
14858   (eval $ac_compile) 2>&5
14859   ac_status=$?
14860   echo "$as_me:14860: \$? = $ac_status" >&5
14861   (exit $ac_status); } &&
14862          { ac_try='test -s conftest.$ac_objext'
14863   { (eval echo "$as_me:14863: \"$ac_try\"") >&5
14864   (eval $ac_try) 2>&5
14865   ac_status=$?
14866   echo "$as_me:14866: \$? = $ac_status" >&5
14867   (exit $ac_status); }; }; then
14868   cf_cv_weak_symbols=yes
14869 else
14870   echo "$as_me: failed program was:" >&5
14871 cat conftest.$ac_ext >&5
14872 cf_cv_weak_symbols=no
14873 fi
14874 rm -f conftest.$ac_objext conftest.$ac_ext
14875
14876 fi
14877 echo "$as_me:14877: result: $cf_cv_weak_symbols" >&5
14878 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14879
14880         else
14881                 cf_cv_weak_symbols=no
14882         fi
14883
14884         if test "x$cf_cv_weak_symbols" = xyes ; then
14885
14886 cat >>confdefs.h <<\EOF
14887 #define USE_WEAK_SYMBOLS 1
14888 EOF
14889
14890         fi
14891 fi
14892
14893 PTHREAD=
14894 if test "x$with_pthread" = "xyes" ; then
14895
14896 cat >>confdefs.h <<\EOF
14897 #define USE_PTHREADS 1
14898 EOF
14899
14900         enable_reentrant=yes
14901         if test "x$cf_cv_weak_symbols" = xyes ; then
14902                 PTHREAD=-lpthread
14903
14904 cf_add_libs="$PRIVATE_LIBS"
14905 # reverse order
14906 cf_add_0lib=
14907 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14908 # filter duplicates
14909 for cf_add_1lib in $cf_add_0lib; do
14910         for cf_add_2lib in $cf_add_libs; do
14911                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14912                         cf_add_1lib=
14913                         break
14914                 fi
14915         done
14916         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14917 done
14918 PRIVATE_LIBS="$cf_add_libs"
14919
14920         fi
14921 fi
14922
14923 # Reentrant code has to be opaque; there's little advantage to making ncurses
14924 # opaque outside of that, so there is no --enable-opaque option.  We can use
14925 # this option without --with-pthreads, but this will be always set for
14926 # pthreads.
14927 echo "$as_me:14927: checking if you want reentrant code" >&5
14928 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14929
14930 # Check whether --enable-reentrant or --disable-reentrant was given.
14931 if test "${enable_reentrant+set}" = set; then
14932   enableval="$enable_reentrant"
14933   with_reentrant=$enableval
14934 else
14935   with_reentrant=no
14936 fi;
14937 echo "$as_me:14937: result: $with_reentrant" >&5
14938 echo "${ECHO_T}$with_reentrant" >&6
14939 if test "x$with_reentrant" = xyes ; then
14940         cf_cv_enable_reentrant=1
14941         cf_cv_enable_opaque="NCURSES_INTERNALS"
14942         NCURSES_SIZE_T=int
14943         if test "x$cf_cv_weak_symbols" = xyes ; then
14944
14945 # remove pthread library from $LIBS
14946 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14947
14948 cf_add_libs="$TEST_LIBS"
14949 # reverse order
14950 cf_add_0lib=
14951 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14952 # filter duplicates
14953 for cf_add_1lib in $cf_add_0lib; do
14954         for cf_add_2lib in $cf_add_libs; do
14955                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14956                         cf_add_1lib=
14957                         break
14958                 fi
14959         done
14960         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14961 done
14962 TEST_LIBS="$cf_add_libs"
14963
14964 cf_add_libs="$TEST_LIBS2"
14965 # reverse order
14966 cf_add_0lib=
14967 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14968 # filter duplicates
14969 for cf_add_1lib in $cf_add_0lib; do
14970         for cf_add_2lib in $cf_add_libs; do
14971                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14972                         cf_add_1lib=
14973                         break
14974                 fi
14975         done
14976         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14977 done
14978 TEST_LIBS2="$cf_add_libs"
14979
14980 cf_add_libs="$PRIVATE_LIBS"
14981 # reverse order
14982 cf_add_0lib=
14983 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14984 # filter duplicates
14985 for cf_add_1lib in $cf_add_0lib; do
14986         for cf_add_2lib in $cf_add_libs; do
14987                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14988                         cf_add_1lib=
14989                         break
14990                 fi
14991         done
14992         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14993 done
14994 PRIVATE_LIBS="$cf_add_libs"
14995
14996         else
14997                 # when not using weak symbols but with_reentrant,
14998                 # add 't' to the library suffix on all platforms
14999                 # except cygwin, where we only do that if ALSO
15000                 # compiling with full thread support.
15001                 case "$host" in
15002                 (*cygwin* | *msys*)
15003                         if test "$with_pthread" = "yes" ; then
15004                                 if test "x$disable_lib_suffixes" = "xno" ; then
15005                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15006                                 fi
15007                         fi ;;
15008                 (*)
15009                         if test "x$disable_lib_suffixes" = "xno" ; then
15010                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15011                         fi
15012                         ;;
15013                 esac
15014         fi
15015
15016 cat >>confdefs.h <<\EOF
15017 #define USE_REENTRANT 1
15018 EOF
15019
15020 if test "${with_abi_version+set}" != set; then
15021         case $cf_cv_rel_version in
15022         (5.*)
15023                 cf_cv_rel_version=6.0
15024                 cf_cv_abi_version=6
15025                 { echo "$as_me:15025: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15026 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15027                 ;;
15028         esac
15029 fi
15030
15031 else
15032         cf_cv_enable_reentrant=0
15033         cf_cv_enable_opaque="NCURSES_OPAQUE"
15034         NCURSES_SIZE_T=short
15035 fi
15036
15037 echo "$as_me:15037: checking if you want opaque curses-library structures" >&5
15038 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15039
15040 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15041 if test "${enable_opaque_curses+set}" = set; then
15042   enableval="$enable_opaque_curses"
15043   test "$enableval" != yes && enableval=no
15044         if test "$enableval" != "no" ; then
15045     enable_opaque_curses=yes
15046         else
15047
15048          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15049          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15050
15051         fi
15052 else
15053   enableval=no
15054
15055          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15056          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15057
15058 fi;
15059 echo "$as_me:15059: result: $enable_opaque_curses" >&5
15060 echo "${ECHO_T}$enable_opaque_curses" >&6
15061
15062 test "$cf_cv_enable_reentrant" = 1 && \
15063 test "$enable_opaque_curses" = no && \
15064 { { echo "$as_me:15064: error: reentrant configuration requires opaque library" >&5
15065 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15066    { (exit 1); exit 1; }; }
15067
15068 echo "$as_me:15068: checking if you want opaque form-library structures" >&5
15069 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15070
15071 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15072 if test "${enable_opaque_form+set}" = set; then
15073   enableval="$enable_opaque_form"
15074   enable_opaque_form=yes
15075 else
15076   enable_opaque_form=no
15077 fi;
15078 echo "$as_me:15078: result: $enable_opaque_form" >&5
15079 echo "${ECHO_T}$enable_opaque_form" >&6
15080
15081 echo "$as_me:15081: checking if you want opaque menu-library structures" >&5
15082 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15083
15084 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15085 if test "${enable_opaque_menu+set}" = set; then
15086   enableval="$enable_opaque_menu"
15087   enable_opaque_menu=yes
15088 else
15089   enable_opaque_menu=no
15090 fi;
15091 echo "$as_me:15091: result: $enable_opaque_menu" >&5
15092 echo "${ECHO_T}$enable_opaque_menu" >&6
15093
15094 echo "$as_me:15094: checking if you want opaque panel-library structures" >&5
15095 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15096
15097 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15098 if test "${enable_opaque_panel+set}" = set; then
15099   enableval="$enable_opaque_panel"
15100   enable_opaque_panel=yes
15101 else
15102   enable_opaque_panel=no
15103 fi;
15104 echo "$as_me:15104: result: $enable_opaque_panel" >&5
15105 echo "${ECHO_T}$enable_opaque_panel" >&6
15106
15107 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15108 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15109 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15110 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15111
15112 ### Allow using a different wrap-prefix
15113 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15114         echo "$as_me:15114: checking for prefix used to wrap public variables" >&5
15115 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15116
15117 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15118 if test "${with_wrap_prefix+set}" = set; then
15119   withval="$with_wrap_prefix"
15120   NCURSES_WRAP_PREFIX=$withval
15121 else
15122   NCURSES_WRAP_PREFIX=_nc_
15123 fi;
15124         echo "$as_me:15124: result: $NCURSES_WRAP_PREFIX" >&5
15125 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15126 else
15127         NCURSES_WRAP_PREFIX=_nc_
15128 fi
15129
15130 cat >>confdefs.h <<EOF
15131 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15132 EOF
15133
15134 ###############################################################################
15135 # These options are relatively safe to experiment with.
15136
15137 echo "$as_me:15137: checking if you want all development code" >&5
15138 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15139
15140 # Check whether --with-develop or --without-develop was given.
15141 if test "${with_develop+set}" = set; then
15142   withval="$with_develop"
15143   with_develop=$withval
15144 else
15145   with_develop=no
15146 fi;
15147 echo "$as_me:15147: result: $with_develop" >&5
15148 echo "${ECHO_T}$with_develop" >&6
15149
15150 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15151 echo "$as_me:15151: checking if you want hard-tabs code" >&5
15152 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15153
15154 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15155 if test "${enable_hard_tabs+set}" = set; then
15156   enableval="$enable_hard_tabs"
15157
15158 else
15159   enable_hard_tabs=$with_develop
15160 fi;
15161 echo "$as_me:15161: result: $enable_hard_tabs" >&5
15162 echo "${ECHO_T}$enable_hard_tabs" >&6
15163 test "x$enable_hard_tabs" = xyes &&
15164 cat >>confdefs.h <<\EOF
15165 #define USE_HARD_TABS 1
15166 EOF
15167
15168 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15169 echo "$as_me:15169: checking if you want limited support for xmc" >&5
15170 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15171
15172 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15173 if test "${enable_xmc_glitch+set}" = set; then
15174   enableval="$enable_xmc_glitch"
15175
15176 else
15177   enable_xmc_glitch=$with_develop
15178 fi;
15179 echo "$as_me:15179: result: $enable_xmc_glitch" >&5
15180 echo "${ECHO_T}$enable_xmc_glitch" >&6
15181 test "x$enable_xmc_glitch" = xyes &&
15182 cat >>confdefs.h <<\EOF
15183 #define USE_XMC_SUPPORT 1
15184 EOF
15185
15186 ###############################################################################
15187 # These are just experimental, probably should not be in a package:
15188
15189 echo "$as_me:15189: checking if you do not want to assume colors are white-on-black" >&5
15190 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15191
15192 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15193 if test "${enable_assumed_color+set}" = set; then
15194   enableval="$enable_assumed_color"
15195   with_assumed_color=$enableval
15196 else
15197   with_assumed_color=yes
15198 fi;
15199 echo "$as_me:15199: result: $with_assumed_color" >&5
15200 echo "${ECHO_T}$with_assumed_color" >&6
15201 test "x$with_assumed_color" = xyes &&
15202 cat >>confdefs.h <<\EOF
15203 #define USE_ASSUMED_COLOR 1
15204 EOF
15205
15206 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15207 echo "$as_me:15207: checking if you want hashmap scrolling-optimization code" >&5
15208 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15209
15210 # Check whether --enable-hashmap or --disable-hashmap was given.
15211 if test "${enable_hashmap+set}" = set; then
15212   enableval="$enable_hashmap"
15213   with_hashmap=$enableval
15214 else
15215   with_hashmap=yes
15216 fi;
15217 echo "$as_me:15217: result: $with_hashmap" >&5
15218 echo "${ECHO_T}$with_hashmap" >&6
15219 test "x$with_hashmap" = xyes &&
15220 cat >>confdefs.h <<\EOF
15221 #define USE_HASHMAP 1
15222 EOF
15223
15224 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15225 echo "$as_me:15225: checking if you want colorfgbg code" >&5
15226 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15227
15228 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15229 if test "${enable_colorfgbg+set}" = set; then
15230   enableval="$enable_colorfgbg"
15231   with_colorfgbg=$enableval
15232 else
15233   with_colorfgbg=no
15234 fi;
15235 echo "$as_me:15235: result: $with_colorfgbg" >&5
15236 echo "${ECHO_T}$with_colorfgbg" >&6
15237 test "x$with_colorfgbg" = xyes &&
15238 cat >>confdefs.h <<\EOF
15239 #define USE_COLORFGBG 1
15240 EOF
15241
15242 ###   use option --enable-interop to turn on use of bindings used for interop
15243 echo "$as_me:15243: checking if you want interop bindings" >&5
15244 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15245
15246 # Check whether --enable-interop or --disable-interop was given.
15247 if test "${enable_interop+set}" = set; then
15248   enableval="$enable_interop"
15249   with_exp_interop=$enableval
15250 else
15251   with_exp_interop=$cf_dft_interop
15252 fi;
15253 echo "$as_me:15253: result: $with_exp_interop" >&5
15254 echo "${ECHO_T}$with_exp_interop" >&6
15255
15256 NCURSES_INTEROP_FUNCS=0
15257 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15258
15259 echo "$as_me:15259: checking if you want experimental safe-sprintf code" >&5
15260 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15261
15262 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15263 if test "${enable_safe_sprintf+set}" = set; then
15264   enableval="$enable_safe_sprintf"
15265   with_safe_sprintf=$enableval
15266 else
15267   with_safe_sprintf=no
15268 fi;
15269 echo "$as_me:15269: result: $with_safe_sprintf" >&5
15270 echo "${ECHO_T}$with_safe_sprintf" >&6
15271
15272 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15273 # when hashmap is used scroll hints are useless
15274 if test "$with_hashmap" = no ; then
15275 echo "$as_me:15275: checking if you want to experiment without scrolling-hints code" >&5
15276 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15277
15278 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15279 if test "${enable_scroll_hints+set}" = set; then
15280   enableval="$enable_scroll_hints"
15281   with_scroll_hints=$enableval
15282 else
15283   with_scroll_hints=yes
15284 fi;
15285 echo "$as_me:15285: result: $with_scroll_hints" >&5
15286 echo "${ECHO_T}$with_scroll_hints" >&6
15287 test "x$with_scroll_hints" = xyes &&
15288 cat >>confdefs.h <<\EOF
15289 #define USE_SCROLL_HINTS 1
15290 EOF
15291
15292 fi
15293
15294 echo "$as_me:15294: checking if you want wgetch-events code" >&5
15295 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15296
15297 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15298 if test "${enable_wgetch_events+set}" = set; then
15299   enableval="$enable_wgetch_events"
15300   with_wgetch_events=$enableval
15301 else
15302   with_wgetch_events=no
15303 fi;
15304 echo "$as_me:15304: result: $with_wgetch_events" >&5
15305 echo "${ECHO_T}$with_wgetch_events" >&6
15306 test "x$with_wgetch_events" = xyes &&
15307 cat >>confdefs.h <<\EOF
15308 #define NCURSES_WGETCH_EVENTS 1
15309 EOF
15310
15311 ###############################################################################
15312
15313 ###     use option --disable-echo to suppress full display compiling commands
15314
15315 echo "$as_me:15315: checking if you want to see long compiling messages" >&5
15316 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15317
15318 # Check whether --enable-echo or --disable-echo was given.
15319 if test "${enable_echo+set}" = set; then
15320   enableval="$enable_echo"
15321   test "$enableval" != no && enableval=yes
15322         if test "$enableval" != "yes" ; then
15323
15324         ECHO_LT='--silent'
15325         ECHO_LD='@echo linking $@;'
15326         RULE_CC='@echo compiling $<'
15327         SHOW_CC='@echo compiling $@'
15328         ECHO_CC='@'
15329
15330         else
15331
15332         ECHO_LT=''
15333         ECHO_LD=''
15334         RULE_CC=''
15335         SHOW_CC=''
15336         ECHO_CC=''
15337
15338         fi
15339 else
15340   enableval=yes
15341
15342         ECHO_LT=''
15343         ECHO_LD=''
15344         RULE_CC=''
15345         SHOW_CC=''
15346         ECHO_CC=''
15347
15348 fi;
15349 echo "$as_me:15349: result: $enableval" >&5
15350 echo "${ECHO_T}$enableval" >&6
15351
15352 if test "x$enable_echo" = xyes; then
15353         ECHO_LINK=
15354 else
15355         ECHO_LINK='@ echo linking $@ ... ;'
15356         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15357         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15358 fi
15359
15360 # --disable-stripping is used for debugging
15361
15362 echo "$as_me:15362: checking if you want to install stripped executables" >&5
15363 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15364
15365 # Check whether --enable-stripping or --disable-stripping was given.
15366 if test "${enable_stripping+set}" = set; then
15367   enableval="$enable_stripping"
15368   test "$enableval" != no && enableval=yes
15369         if test "$enableval" != "yes" ; then
15370     with_stripping=no
15371         else
15372                 with_stripping=yes
15373         fi
15374 else
15375   enableval=yes
15376         with_stripping=yes
15377
15378 fi;
15379 echo "$as_me:15379: result: $with_stripping" >&5
15380 echo "${ECHO_T}$with_stripping" >&6
15381
15382 if test "$with_stripping" = yes
15383 then
15384         INSTALL_OPT_S="-s"
15385 else
15386         INSTALL_OPT_S=
15387 fi
15388
15389 : ${INSTALL:=install}
15390 echo "$as_me:15390: checking if install accepts -p option" >&5
15391 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15392 if test "${cf_cv_install_p+set}" = set; then
15393   echo $ECHO_N "(cached) $ECHO_C" >&6
15394 else
15395
15396         rm -rf conftest*
15397         date >conftest.in
15398         mkdir conftest.out
15399         sleep 3
15400         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15401         then
15402                 if test -f conftest.out/conftest.in
15403                 then
15404                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15405                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15406                         if test -s conftest.err
15407                         then
15408                                 cf_cv_install_p=no
15409                         else
15410                                 cf_cv_install_p=yes
15411                         fi
15412                 else
15413                         cf_cv_install_p=no
15414                 fi
15415         else
15416                 cf_cv_install_p=no
15417         fi
15418         rm -rf conftest*
15419
15420 fi
15421 echo "$as_me:15421: result: $cf_cv_install_p" >&5
15422 echo "${ECHO_T}$cf_cv_install_p" >&6
15423
15424 echo "$as_me:15424: checking if install needs to be told about ownership" >&5
15425 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15426 case `$ac_config_guess` in
15427 (*minix)
15428         with_install_o=yes
15429         ;;
15430 (*)
15431         with_install_o=no
15432         ;;
15433 esac
15434
15435 echo "$as_me:15435: result: $with_install_o" >&5
15436 echo "${ECHO_T}$with_install_o" >&6
15437 if test "x$with_install_o" = xyes
15438 then
15439         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'`
15440 else
15441         INSTALL_OPT_O=
15442 fi
15443
15444 # If we're avoiding relinking of shared libraries during install, that is to
15445 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15446 # the install program has "-p" (for preserving timestamps).
15447 cf_cv_do_reranlib=yes
15448 if test "x$cf_cv_install_p" = xyes
15449 then
15450         if test "x$cf_cv_do_relink" != xyes
15451         then
15452                 cf_cv_do_reranlib=no
15453                 INSTALL_OPT_P="-p"
15454                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15455         fi
15456 fi
15457
15458 ###     use option --enable-warnings to turn on all gcc warnings
15459 echo "$as_me:15459: checking if you want to see compiler warnings" >&5
15460 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15461
15462 # Check whether --enable-warnings or --disable-warnings was given.
15463 if test "${enable_warnings+set}" = set; then
15464   enableval="$enable_warnings"
15465   with_warnings=$enableval
15466 fi;
15467 echo "$as_me:15467: result: $with_warnings" >&5
15468 echo "${ECHO_T}$with_warnings" >&6
15469
15470 if test "x$with_warnings" = "xyes"; then
15471
15472         ADAFLAGS="$ADAFLAGS -gnatg"
15473
15474 if test "x$have_x" = xyes; then
15475
15476 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15477 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15478 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15479 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15480 for cf_X_CFLAGS in $X_CFLAGS
15481 do
15482         case "x$cf_X_CFLAGS" in
15483         x-[IUD]*)
15484                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15485                 ;;
15486         *)
15487                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15488                 ;;
15489         esac
15490 done
15491
15492 cat >conftest.$ac_ext <<_ACEOF
15493 #line 15493 "configure"
15494 #include "confdefs.h"
15495
15496 #include <stdlib.h>
15497 #include <X11/Intrinsic.h>
15498
15499 int
15500 main (void)
15501 {
15502 String foo = malloc(1)
15503   ;
15504   return 0;
15505 }
15506 _ACEOF
15507 rm -f conftest.$ac_objext
15508 if { (eval echo "$as_me:15508: \"$ac_compile\"") >&5
15509   (eval $ac_compile) 2>&5
15510   ac_status=$?
15511   echo "$as_me:15511: \$? = $ac_status" >&5
15512   (exit $ac_status); } &&
15513          { ac_try='test -s conftest.$ac_objext'
15514   { (eval echo "$as_me:15514: \"$ac_try\"") >&5
15515   (eval $ac_try) 2>&5
15516   ac_status=$?
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); }; }; then
15519
15520 echo "$as_me:15520: checking for X11/Xt const-feature" >&5
15521 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15522 if test "${cf_cv_const_x_string+set}" = set; then
15523   echo $ECHO_N "(cached) $ECHO_C" >&6
15524 else
15525
15526         cat >conftest.$ac_ext <<_ACEOF
15527 #line 15527 "configure"
15528 #include "confdefs.h"
15529
15530 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15531 #undef  XTSTRINGDEFINES /* X11R5 and later */
15532 #include <stdlib.h>
15533 #include <X11/Intrinsic.h>
15534
15535 int
15536 main (void)
15537 {
15538 String foo = malloc(1); *foo = 0
15539   ;
15540   return 0;
15541 }
15542 _ACEOF
15543 rm -f conftest.$ac_objext
15544 if { (eval echo "$as_me:15544: \"$ac_compile\"") >&5
15545   (eval $ac_compile) 2>&5
15546   ac_status=$?
15547   echo "$as_me:15547: \$? = $ac_status" >&5
15548   (exit $ac_status); } &&
15549          { ac_try='test -s conftest.$ac_objext'
15550   { (eval echo "$as_me:15550: \"$ac_try\"") >&5
15551   (eval $ac_try) 2>&5
15552   ac_status=$?
15553   echo "$as_me:15553: \$? = $ac_status" >&5
15554   (exit $ac_status); }; }; then
15555
15556                         cf_cv_const_x_string=no
15557
15558 else
15559   echo "$as_me: failed program was:" >&5
15560 cat conftest.$ac_ext >&5
15561
15562                         cf_cv_const_x_string=yes
15563
15564 fi
15565 rm -f conftest.$ac_objext conftest.$ac_ext
15566
15567 fi
15568 echo "$as_me:15568: result: $cf_cv_const_x_string" >&5
15569 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15570
15571 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15572 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15573 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15574
15575 case $cf_cv_const_x_string in
15576 (no)
15577
15578         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15579         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15580
15581         ;;
15582 (*)
15583
15584         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15585         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15586
15587         ;;
15588 esac
15589
15590 else
15591   echo "$as_me: failed program was:" >&5
15592 cat conftest.$ac_ext >&5
15593 fi
15594 rm -f conftest.$ac_objext conftest.$ac_ext
15595  fi
15596 cat > conftest.$ac_ext <<EOF
15597 #line 15597 "${as_me:-configure}"
15598 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15599 EOF
15600 if test "$INTEL_COMPILER" = yes
15601 then
15602 # The "-wdXXX" options suppress warnings:
15603 # remark #1419: external declaration in primary source file
15604 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15605 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15606 # remark #193: zero used for undefined preprocessing identifier
15607 # remark #593: variable "curs_sb_left_arrow" was set but never used
15608 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15609 # remark #869: parameter "tw" was never referenced
15610 # remark #981: operands are evaluated in unspecified order
15611 # warning #279: controlling expression is constant
15612
15613         { echo "$as_me:15613: checking for $CC warning options..." >&5
15614 echo "$as_me: checking for $CC warning options..." >&6;}
15615         cf_save_CFLAGS="$CFLAGS"
15616         EXTRA_CFLAGS="-Wall"
15617         for cf_opt in \
15618                 wd1419 \
15619                 wd1683 \
15620                 wd1684 \
15621                 wd193 \
15622                 wd593 \
15623                 wd279 \
15624                 wd810 \
15625                 wd869 \
15626                 wd981
15627         do
15628                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15629                 if { (eval echo "$as_me:15629: \"$ac_compile\"") >&5
15630   (eval $ac_compile) 2>&5
15631   ac_status=$?
15632   echo "$as_me:15632: \$? = $ac_status" >&5
15633   (exit $ac_status); }; then
15634                         test -n "$verbose" && echo "$as_me:15634: result: ... -$cf_opt" >&5
15635 echo "${ECHO_T}... -$cf_opt" >&6
15636                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15637                 fi
15638         done
15639         CFLAGS="$cf_save_CFLAGS"
15640 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15641 then
15642         { echo "$as_me:15642: checking for $CC warning options..." >&5
15643 echo "$as_me: checking for $CC warning options..." >&6;}
15644         cf_save_CFLAGS="$CFLAGS"
15645         EXTRA_CFLAGS=
15646         cf_warn_CONST=""
15647         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15648         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15649         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15650         for cf_opt in W Wall \
15651                 Wbad-function-cast \
15652                 Wcast-align \
15653                 Wcast-qual \
15654                 Wdeclaration-after-statement \
15655                 Wextra \
15656                 Winline \
15657                 Wmissing-declarations \
15658                 Wmissing-prototypes \
15659                 Wnested-externs \
15660                 Wpointer-arith \
15661                 Wshadow \
15662                 Wstrict-prototypes \
15663                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15664         do
15665                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15666                 if { (eval echo "$as_me:15666: \"$ac_compile\"") >&5
15667   (eval $ac_compile) 2>&5
15668   ac_status=$?
15669   echo "$as_me:15669: \$? = $ac_status" >&5
15670   (exit $ac_status); }; then
15671                         test -n "$verbose" && echo "$as_me:15671: result: ... -$cf_opt" >&5
15672 echo "${ECHO_T}... -$cf_opt" >&6
15673                         case $cf_opt in
15674                         (Winline)
15675                                 case $GCC_VERSION in
15676                                 ([34].*)
15677                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15678
15679 echo "${as_me:-configure}:15679: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15680
15681                                         continue;;
15682                                 esac
15683                                 ;;
15684                         (Wpointer-arith)
15685                                 case $GCC_VERSION in
15686                                 ([12].*)
15687                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15688
15689 echo "${as_me:-configure}:15689: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15690
15691                                         continue;;
15692                                 esac
15693                                 ;;
15694                         esac
15695                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15696                 fi
15697         done
15698         CFLAGS="$cf_save_CFLAGS"
15699 fi
15700 rm -rf conftest*
15701
15702         if test "x$cf_with_cxx" = xyes ; then
15703
15704 INTEL_CPLUSPLUS=no
15705
15706 if test "$GCC" = yes ; then
15707         case $host_os in
15708         (linux*|gnu*)
15709                 echo "$as_me:15709: checking if this is really Intel C++ compiler" >&5
15710 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15711                 cf_save_CFLAGS="$CXXFLAGS"
15712                 CXXFLAGS="$CXXFLAGS -no-gcc"
15713                 cat >conftest.$ac_ext <<_ACEOF
15714 #line 15714 "configure"
15715 #include "confdefs.h"
15716
15717 int
15718 main (void)
15719 {
15720
15721 #ifdef __INTEL_COMPILER
15722 #else
15723 make an error
15724 #endif
15725
15726   ;
15727   return 0;
15728 }
15729 _ACEOF
15730 rm -f conftest.$ac_objext
15731 if { (eval echo "$as_me:15731: \"$ac_compile\"") >&5
15732   (eval $ac_compile) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); } &&
15736          { ac_try='test -s conftest.$ac_objext'
15737   { (eval echo "$as_me:15737: \"$ac_try\"") >&5
15738   (eval $ac_try) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); }; }; then
15742   INTEL_CPLUSPLUS=yes
15743 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15744
15745 else
15746   echo "$as_me: failed program was:" >&5
15747 cat conftest.$ac_ext >&5
15748 fi
15749 rm -f conftest.$ac_objext conftest.$ac_ext
15750                 CXXFLAGS="$cf_save_CFLAGS"
15751                 echo "$as_me:15751: result: $INTEL_CPLUSPLUS" >&5
15752 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15753                 ;;
15754         esac
15755 fi
15756
15757 CLANG_CPLUSPLUS=no
15758
15759 if test "$GCC" = yes ; then
15760         echo "$as_me:15760: checking if this is really Clang C++ compiler" >&5
15761 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15762         cf_save_CFLAGS="$CXXFLAGS"
15763         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15764         cat >conftest.$ac_ext <<_ACEOF
15765 #line 15765 "configure"
15766 #include "confdefs.h"
15767
15768 int
15769 main (void)
15770 {
15771
15772 #ifdef __clang__
15773 #else
15774 make an error
15775 #endif
15776
15777   ;
15778   return 0;
15779 }
15780 _ACEOF
15781 rm -f conftest.$ac_objext
15782 if { (eval echo "$as_me:15782: \"$ac_compile\"") >&5
15783   (eval $ac_compile) 2>&5
15784   ac_status=$?
15785   echo "$as_me:15785: \$? = $ac_status" >&5
15786   (exit $ac_status); } &&
15787          { ac_try='test -s conftest.$ac_objext'
15788   { (eval echo "$as_me:15788: \"$ac_try\"") >&5
15789   (eval $ac_try) 2>&5
15790   ac_status=$?
15791   echo "$as_me:15791: \$? = $ac_status" >&5
15792   (exit $ac_status); }; }; then
15793   CLANG_CPLUSPLUS=yes
15794 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15795
15796 else
15797   echo "$as_me: failed program was:" >&5
15798 cat conftest.$ac_ext >&5
15799 fi
15800 rm -f conftest.$ac_objext conftest.$ac_ext
15801         CXXFLAGS="$cf_save_CFLAGS"
15802         echo "$as_me:15802: result: $CLANG_CPLUSPLUS" >&5
15803 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15804 fi
15805
15806 ac_ext=cc
15807 ac_cpp='$CXXCPP $CPPFLAGS'
15808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15811 ac_main_return=return
15812
15813 cat > conftest.$ac_ext <<EOF
15814 #line 15814 "configure"
15815 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15816 EOF
15817
15818 if test "$INTEL_CPLUSPLUS" = yes
15819 then
15820 # The "-wdXXX" options suppress warnings:
15821 # remark #1419: external declaration in primary source file
15822 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15823 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15824 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15825 # remark #193: zero used for undefined preprocessing identifier
15826 # remark #593: variable "curs_sb_left_arrow" was set but never used
15827 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15828 # remark #869: parameter "tw" was never referenced
15829 # remark #981: operands are evaluated in unspecified order
15830 # warning #269: invalid format string conversion
15831
15832         { echo "$as_me:15832: checking for $CC warning options..." >&5
15833 echo "$as_me: checking for $CC warning options..." >&6;}
15834         cf_save_CXXFLAGS="$CXXFLAGS"
15835         EXTRA_CXXFLAGS="-Wall"
15836         for cf_opt in \
15837                 wd1419 \
15838                 wd1682 \
15839                 wd1683 \
15840                 wd1684 \
15841                 wd193 \
15842                 wd279 \
15843                 wd593 \
15844                 wd810 \
15845                 wd869 \
15846                 wd981
15847         do
15848                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15849                 if { (eval echo "$as_me:15849: \"$ac_compile\"") >&5
15850   (eval $ac_compile) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit $ac_status); }; then
15854                         test -n "$verbose" && echo "$as_me:15854: result: ... -$cf_opt" >&5
15855 echo "${ECHO_T}... -$cf_opt" >&6
15856                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15857                 fi
15858         done
15859         CXXFLAGS="$cf_save_CXXFLAGS"
15860
15861 elif test "$GXX" = yes
15862 then
15863         { echo "$as_me:15863: checking for $CXX warning options..." >&5
15864 echo "$as_me: checking for $CXX warning options..." >&6;}
15865         cf_save_CXXFLAGS="$CXXFLAGS"
15866         EXTRA_CXXFLAGS="-W -Wall"
15867         cf_gxx_extra_warnings=""
15868         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15869         case "$GCC_VERSION" in
15870         ([1-2].*)
15871                 ;;
15872         (*)
15873                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15874                 ;;
15875         esac
15876         for cf_opt in \
15877                 Wabi \
15878                 fabi-version=0 \
15879                 Wextra \
15880                 Wignored-qualifiers \
15881                 Wlogical-op \
15882                 Woverloaded-virtual \
15883                 Wsign-promo \
15884                 Wsynth \
15885                 Wold-style-cast \
15886                 Wcast-align \
15887                 Wcast-qual \
15888                 Wpointer-arith \
15889                 Wshadow \
15890                 Wundef $cf_gxx_extra_warnings Wno-unused
15891         do
15892                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15893                 if { (eval echo "$as_me:15893: \"$ac_compile\"") >&5
15894   (eval $ac_compile) 2>&5
15895   ac_status=$?
15896   echo "$as_me:15896: \$? = $ac_status" >&5
15897   (exit $ac_status); }; then
15898                         test -n "$verbose" && echo "$as_me:15898: result: ... -$cf_opt" >&5
15899 echo "${ECHO_T}... -$cf_opt" >&6
15900                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15901                 else
15902                         test -n "$verbose" && echo "$as_me:15902: result: ... no -$cf_opt" >&5
15903 echo "${ECHO_T}... no -$cf_opt" >&6
15904                 fi
15905         done
15906         CXXFLAGS="$cf_save_CXXFLAGS"
15907 fi
15908
15909 rm -rf conftest*
15910 ac_ext=c
15911 ac_cpp='$CPP $CPPFLAGS'
15912 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15913 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15914 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15915 ac_main_return=return
15916
15917         fi
15918 fi
15919
15920 if test "$GCC" = yes
15921 then
15922 cat > conftest.i <<EOF
15923 #ifndef GCC_PRINTF
15924 #define GCC_PRINTF 0
15925 #endif
15926 #ifndef GCC_SCANF
15927 #define GCC_SCANF 0
15928 #endif
15929 #ifndef GCC_NORETURN
15930 #define GCC_NORETURN /* nothing */
15931 #endif
15932 #ifndef GCC_UNUSED
15933 #define GCC_UNUSED /* nothing */
15934 #endif
15935 EOF
15936 if test "$GCC" = yes
15937 then
15938         { echo "$as_me:15938: checking for $CC __attribute__ directives..." >&5
15939 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15940 cat > conftest.$ac_ext <<EOF
15941 #line 15941 "${as_me:-configure}"
15942 #include "confdefs.h"
15943 #include "conftest.h"
15944 #include "conftest.i"
15945 #if     GCC_PRINTF
15946 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15947 #else
15948 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15949 #endif
15950 #if     GCC_SCANF
15951 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15952 #else
15953 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15954 #endif
15955 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15956 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15957 extern void foo(void) GCC_NORETURN;
15958 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15959 EOF
15960         cf_printf_attribute=no
15961         cf_scanf_attribute=no
15962         for cf_attribute in scanf printf unused noreturn
15963         do
15964
15965 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15966
15967                 cf_directive="__attribute__(($cf_attribute))"
15968                 echo "checking for $CC $cf_directive" 1>&5
15969
15970                 case $cf_attribute in
15971                 (printf)
15972                         cf_printf_attribute=yes
15973                         cat >conftest.h <<EOF
15974 #define GCC_$cf_ATTRIBUTE 1
15975 EOF
15976                         ;;
15977                 (scanf)
15978                         cf_scanf_attribute=yes
15979                         cat >conftest.h <<EOF
15980 #define GCC_$cf_ATTRIBUTE 1
15981 EOF
15982                         ;;
15983                 (*)
15984                         cat >conftest.h <<EOF
15985 #define GCC_$cf_ATTRIBUTE $cf_directive
15986 EOF
15987                         ;;
15988                 esac
15989
15990                 if { (eval echo "$as_me:15990: \"$ac_compile\"") >&5
15991   (eval $ac_compile) 2>&5
15992   ac_status=$?
15993   echo "$as_me:15993: \$? = $ac_status" >&5
15994   (exit $ac_status); }; then
15995                         test -n "$verbose" && echo "$as_me:15995: result: ... $cf_attribute" >&5
15996 echo "${ECHO_T}... $cf_attribute" >&6
15997                         cat conftest.h >>confdefs.h
15998                         case $cf_attribute in
15999                         (noreturn)
16000
16001 cat >>confdefs.h <<EOF
16002 #define GCC_NORETURN $cf_directive
16003 EOF
16004
16005                                 ;;
16006                         (printf)
16007                                 cf_value='/* nothing */'
16008                                 if test "$cf_printf_attribute" != no ; then
16009                                         cf_value='__attribute__((format(printf,fmt,var)))'
16010
16011 cat >>confdefs.h <<\EOF
16012 #define GCC_PRINTF 1
16013 EOF
16014
16015                                 fi
16016
16017 cat >>confdefs.h <<EOF
16018 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16019 EOF
16020
16021                                 ;;
16022                         (scanf)
16023                                 cf_value='/* nothing */'
16024                                 if test "$cf_scanf_attribute" != no ; then
16025                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16026
16027 cat >>confdefs.h <<\EOF
16028 #define GCC_SCANF 1
16029 EOF
16030
16031                                 fi
16032
16033 cat >>confdefs.h <<EOF
16034 #define GCC_SCANFLIKE(fmt,var) $cf_value
16035 EOF
16036
16037                                 ;;
16038                         (unused)
16039
16040 cat >>confdefs.h <<EOF
16041 #define GCC_UNUSED $cf_directive
16042 EOF
16043
16044                                 ;;
16045                         esac
16046                 fi
16047         done
16048 else
16049         fgrep define conftest.i >>confdefs.h
16050 fi
16051 rm -rf conftest*
16052 fi
16053
16054 echo "$as_me:16054: checking if you want to work around bogus compiler/loader warnings" >&5
16055 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16056
16057 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16058 if test "${enable_string_hacks+set}" = set; then
16059   enableval="$enable_string_hacks"
16060   with_string_hacks=$enableval
16061 else
16062   with_string_hacks=no
16063 fi;
16064 echo "$as_me:16064: result: $with_string_hacks" >&5
16065 echo "${ECHO_T}$with_string_hacks" >&6
16066
16067 if test "x$with_string_hacks" = "xyes"; then
16068
16069 cat >>confdefs.h <<\EOF
16070 #define USE_STRING_HACKS 1
16071 EOF
16072
16073         { echo "$as_me:16073: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16074 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16075         echo "$as_me:16075: checking for strlcat" >&5
16076 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16077 if test "${ac_cv_func_strlcat+set}" = set; then
16078   echo $ECHO_N "(cached) $ECHO_C" >&6
16079 else
16080   cat >conftest.$ac_ext <<_ACEOF
16081 #line 16081 "configure"
16082 #include "confdefs.h"
16083 #define strlcat autoconf_temporary
16084 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16085 #undef strlcat
16086
16087 #ifdef __cplusplus
16088 extern "C"
16089 #endif
16090
16091 /* We use char because int might match the return type of a gcc2
16092    builtin and then its argument prototype would still apply.  */
16093 char strlcat (void);
16094
16095 int
16096 main (void)
16097 {
16098
16099 /* The GNU C library defines stubs for functions which it implements
16100     to always fail with ENOSYS.  Some functions are actually named
16101     something starting with __ and the normal name is an alias.  */
16102 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16103 #error found stub for strlcat
16104 #endif
16105
16106         return strlcat ();
16107   ;
16108   return 0;
16109 }
16110 _ACEOF
16111 rm -f conftest.$ac_objext conftest$ac_exeext
16112 if { (eval echo "$as_me:16112: \"$ac_link\"") >&5
16113   (eval $ac_link) 2>&5
16114   ac_status=$?
16115   echo "$as_me:16115: \$? = $ac_status" >&5
16116   (exit $ac_status); } &&
16117          { ac_try='test -s conftest$ac_exeext'
16118   { (eval echo "$as_me:16118: \"$ac_try\"") >&5
16119   (eval $ac_try) 2>&5
16120   ac_status=$?
16121   echo "$as_me:16121: \$? = $ac_status" >&5
16122   (exit $ac_status); }; }; then
16123   ac_cv_func_strlcat=yes
16124 else
16125   echo "$as_me: failed program was:" >&5
16126 cat conftest.$ac_ext >&5
16127 ac_cv_func_strlcat=no
16128 fi
16129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16130 fi
16131 echo "$as_me:16131: result: $ac_cv_func_strlcat" >&5
16132 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16133 if test $ac_cv_func_strlcat = yes; then
16134
16135 cat >>confdefs.h <<\EOF
16136 #define HAVE_STRLCAT 1
16137 EOF
16138
16139 else
16140
16141                 echo "$as_me:16141: checking for strlcat in -lbsd" >&5
16142 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16143 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16144   echo $ECHO_N "(cached) $ECHO_C" >&6
16145 else
16146   ac_check_lib_save_LIBS=$LIBS
16147 LIBS="-lbsd  $LIBS"
16148 cat >conftest.$ac_ext <<_ACEOF
16149 #line 16149 "configure"
16150 #include "confdefs.h"
16151
16152 /* Override any gcc2 internal prototype to avoid an error.  */
16153 #ifdef __cplusplus
16154 extern "C"
16155 #endif
16156 /* We use char because int might match the return type of a gcc2
16157    builtin and then its argument prototype would still apply.  */
16158 char strlcat ();
16159 int
16160 main (void)
16161 {
16162 strlcat ();
16163   ;
16164   return 0;
16165 }
16166 _ACEOF
16167 rm -f conftest.$ac_objext conftest$ac_exeext
16168 if { (eval echo "$as_me:16168: \"$ac_link\"") >&5
16169   (eval $ac_link) 2>&5
16170   ac_status=$?
16171   echo "$as_me:16171: \$? = $ac_status" >&5
16172   (exit $ac_status); } &&
16173          { ac_try='test -s conftest$ac_exeext'
16174   { (eval echo "$as_me:16174: \"$ac_try\"") >&5
16175   (eval $ac_try) 2>&5
16176   ac_status=$?
16177   echo "$as_me:16177: \$? = $ac_status" >&5
16178   (exit $ac_status); }; }; then
16179   ac_cv_lib_bsd_strlcat=yes
16180 else
16181   echo "$as_me: failed program was:" >&5
16182 cat conftest.$ac_ext >&5
16183 ac_cv_lib_bsd_strlcat=no
16184 fi
16185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16186 LIBS=$ac_check_lib_save_LIBS
16187 fi
16188 echo "$as_me:16188: result: $ac_cv_lib_bsd_strlcat" >&5
16189 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16190 if test $ac_cv_lib_bsd_strlcat = yes; then
16191
16192 cf_add_libs="$LIBS"
16193 # reverse order
16194 cf_add_0lib=
16195 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16196 # filter duplicates
16197 for cf_add_1lib in $cf_add_0lib; do
16198         for cf_add_2lib in $cf_add_libs; do
16199                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16200                         cf_add_1lib=
16201                         break
16202                 fi
16203         done
16204         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16205 done
16206 LIBS="$cf_add_libs"
16207
16208 for ac_header in bsd/string.h
16209 do
16210 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16211 echo "$as_me:16211: checking for $ac_header" >&5
16212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16214   echo $ECHO_N "(cached) $ECHO_C" >&6
16215 else
16216   cat >conftest.$ac_ext <<_ACEOF
16217 #line 16217 "configure"
16218 #include "confdefs.h"
16219 #include <$ac_header>
16220 _ACEOF
16221 if { (eval echo "$as_me:16221: \"$ac_cpp conftest.$ac_ext\"") >&5
16222   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16223   ac_status=$?
16224   egrep -v '^ *\+' conftest.er1 >conftest.err
16225   rm -f conftest.er1
16226   cat conftest.err >&5
16227   echo "$as_me:16227: \$? = $ac_status" >&5
16228   (exit $ac_status); } >/dev/null; then
16229   if test -s conftest.err; then
16230     ac_cpp_err=$ac_c_preproc_warn_flag
16231   else
16232     ac_cpp_err=
16233   fi
16234 else
16235   ac_cpp_err=yes
16236 fi
16237 if test -z "$ac_cpp_err"; then
16238   eval "$as_ac_Header=yes"
16239 else
16240   echo "$as_me: failed program was:" >&5
16241   cat conftest.$ac_ext >&5
16242   eval "$as_ac_Header=no"
16243 fi
16244 rm -f conftest.err conftest.$ac_ext
16245 fi
16246 echo "$as_me:16246: result: `eval echo '${'$as_ac_Header'}'`" >&5
16247 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16248 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16249   cat >>confdefs.h <<EOF
16250 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16251 EOF
16252
16253 fi
16254 done
16255
16256 cat >>confdefs.h <<\EOF
16257 #define HAVE_STRLCAT 1
16258 EOF
16259
16260 fi
16261
16262 fi
16263
16264 for ac_func in strlcpy snprintf
16265 do
16266 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16267 echo "$as_me:16267: checking for $ac_func" >&5
16268 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16269 if eval "test \"\${$as_ac_var+set}\" = set"; then
16270   echo $ECHO_N "(cached) $ECHO_C" >&6
16271 else
16272   cat >conftest.$ac_ext <<_ACEOF
16273 #line 16273 "configure"
16274 #include "confdefs.h"
16275 #define $ac_func autoconf_temporary
16276 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16277 #undef $ac_func
16278
16279 #ifdef __cplusplus
16280 extern "C"
16281 #endif
16282
16283 /* We use char because int might match the return type of a gcc2
16284    builtin and then its argument prototype would still apply.  */
16285 char $ac_func (void);
16286
16287 int
16288 main (void)
16289 {
16290
16291 /* The GNU C library defines stubs for functions which it implements
16292     to always fail with ENOSYS.  Some functions are actually named
16293     something starting with __ and the normal name is an alias.  */
16294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16295 #error found stub for $ac_func
16296 #endif
16297
16298         return $ac_func ();
16299   ;
16300   return 0;
16301 }
16302 _ACEOF
16303 rm -f conftest.$ac_objext conftest$ac_exeext
16304 if { (eval echo "$as_me:16304: \"$ac_link\"") >&5
16305   (eval $ac_link) 2>&5
16306   ac_status=$?
16307   echo "$as_me:16307: \$? = $ac_status" >&5
16308   (exit $ac_status); } &&
16309          { ac_try='test -s conftest$ac_exeext'
16310   { (eval echo "$as_me:16310: \"$ac_try\"") >&5
16311   (eval $ac_try) 2>&5
16312   ac_status=$?
16313   echo "$as_me:16313: \$? = $ac_status" >&5
16314   (exit $ac_status); }; }; then
16315   eval "$as_ac_var=yes"
16316 else
16317   echo "$as_me: failed program was:" >&5
16318 cat conftest.$ac_ext >&5
16319 eval "$as_ac_var=no"
16320 fi
16321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16322 fi
16323 echo "$as_me:16323: result: `eval echo '${'$as_ac_var'}'`" >&5
16324 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16325 if test `eval echo '${'$as_ac_var'}'` = yes; then
16326   cat >>confdefs.h <<EOF
16327 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16328 EOF
16329
16330 fi
16331 done
16332
16333 fi
16334
16335 ###     use option --enable-assertions to turn on generation of assertion code
16336 echo "$as_me:16336: checking if you want to enable runtime assertions" >&5
16337 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16338
16339 # Check whether --enable-assertions or --disable-assertions was given.
16340 if test "${enable_assertions+set}" = set; then
16341   enableval="$enable_assertions"
16342   with_assertions=$enableval
16343 else
16344   with_assertions=no
16345 fi;
16346 echo "$as_me:16346: result: $with_assertions" >&5
16347 echo "${ECHO_T}$with_assertions" >&6
16348 if test -n "$GCC"
16349 then
16350         if test "$with_assertions" = no
16351         then
16352                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16353         else
16354
16355         ADAFLAGS="$ADAFLAGS -gnata"
16356
16357         fi
16358 fi
16359
16360 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16361
16362 echo "$as_me:16362: checking if you want to use dmalloc for testing" >&5
16363 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16364
16365 # Check whether --with-dmalloc or --without-dmalloc was given.
16366 if test "${with_dmalloc+set}" = set; then
16367   withval="$with_dmalloc"
16368
16369 cat >>confdefs.h <<EOF
16370 #define USE_DMALLOC 1
16371 EOF
16372
16373         : ${with_cflags:=-g}
16374         : ${with_no_leaks:=yes}
16375          with_dmalloc=yes
16376 else
16377   with_dmalloc=
16378 fi;
16379 echo "$as_me:16379: result: ${with_dmalloc:-no}" >&5
16380 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16381
16382 case .$with_cflags in
16383 (.*-g*)
16384         case .$CFLAGS in
16385         (.*-g*)
16386                 ;;
16387         (*)
16388
16389 cf_fix_cppflags=no
16390 cf_new_cflags=
16391 cf_new_cppflags=
16392 cf_new_extra_cppflags=
16393
16394 for cf_add_cflags in -g
16395 do
16396 case $cf_fix_cppflags in
16397 (no)
16398         case $cf_add_cflags in
16399         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16400                 case $cf_add_cflags in
16401                 (-D*)
16402                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16403
16404                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16405                                 && test -z "${cf_tst_cflags}" \
16406                                 && cf_fix_cppflags=yes
16407
16408                         if test $cf_fix_cppflags = yes ; then
16409
16410         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16411         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16412
16413                                 continue
16414                         elif test "${cf_tst_cflags}" = "\"'" ; then
16415
16416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16418
16419                                 continue
16420                         fi
16421                         ;;
16422                 esac
16423                 case "$CPPFLAGS" in
16424                 (*$cf_add_cflags)
16425                         ;;
16426                 (*)
16427                         case $cf_add_cflags in
16428                         (-D*)
16429                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16430
16431 CPPFLAGS=`echo "$CPPFLAGS" | \
16432         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16433                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16434
16435                                 ;;
16436                         esac
16437
16438         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16439         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16440
16441                         ;;
16442                 esac
16443                 ;;
16444         (*)
16445
16446         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16447         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16448
16449                 ;;
16450         esac
16451         ;;
16452 (yes)
16453
16454         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16455         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16456
16457         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16458
16459         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16460                 && test -z "${cf_tst_cflags}" \
16461                 && cf_fix_cppflags=no
16462         ;;
16463 esac
16464 done
16465
16466 if test -n "$cf_new_cflags" ; then
16467
16468         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16469         CFLAGS="${CFLAGS}$cf_new_cflags"
16470
16471 fi
16472
16473 if test -n "$cf_new_cppflags" ; then
16474
16475         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16476         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16477
16478 fi
16479
16480 if test -n "$cf_new_extra_cppflags" ; then
16481
16482         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16483         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16484
16485 fi
16486
16487                 ;;
16488         esac
16489         ;;
16490 esac
16491
16492 if test "$with_dmalloc" = yes ; then
16493         echo "$as_me:16493: checking for dmalloc.h" >&5
16494 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16495 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16496   echo $ECHO_N "(cached) $ECHO_C" >&6
16497 else
16498   cat >conftest.$ac_ext <<_ACEOF
16499 #line 16499 "configure"
16500 #include "confdefs.h"
16501 #include <dmalloc.h>
16502 _ACEOF
16503 if { (eval echo "$as_me:16503: \"$ac_cpp conftest.$ac_ext\"") >&5
16504   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16505   ac_status=$?
16506   egrep -v '^ *\+' conftest.er1 >conftest.err
16507   rm -f conftest.er1
16508   cat conftest.err >&5
16509   echo "$as_me:16509: \$? = $ac_status" >&5
16510   (exit $ac_status); } >/dev/null; then
16511   if test -s conftest.err; then
16512     ac_cpp_err=$ac_c_preproc_warn_flag
16513   else
16514     ac_cpp_err=
16515   fi
16516 else
16517   ac_cpp_err=yes
16518 fi
16519 if test -z "$ac_cpp_err"; then
16520   ac_cv_header_dmalloc_h=yes
16521 else
16522   echo "$as_me: failed program was:" >&5
16523   cat conftest.$ac_ext >&5
16524   ac_cv_header_dmalloc_h=no
16525 fi
16526 rm -f conftest.err conftest.$ac_ext
16527 fi
16528 echo "$as_me:16528: result: $ac_cv_header_dmalloc_h" >&5
16529 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16530 if test $ac_cv_header_dmalloc_h = yes; then
16531
16532 echo "$as_me:16532: checking for dmalloc_debug in -ldmalloc" >&5
16533 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16534 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16535   echo $ECHO_N "(cached) $ECHO_C" >&6
16536 else
16537   ac_check_lib_save_LIBS=$LIBS
16538 LIBS="-ldmalloc  $LIBS"
16539 cat >conftest.$ac_ext <<_ACEOF
16540 #line 16540 "configure"
16541 #include "confdefs.h"
16542
16543 /* Override any gcc2 internal prototype to avoid an error.  */
16544 #ifdef __cplusplus
16545 extern "C"
16546 #endif
16547 /* We use char because int might match the return type of a gcc2
16548    builtin and then its argument prototype would still apply.  */
16549 char dmalloc_debug ();
16550 int
16551 main (void)
16552 {
16553 dmalloc_debug ();
16554   ;
16555   return 0;
16556 }
16557 _ACEOF
16558 rm -f conftest.$ac_objext conftest$ac_exeext
16559 if { (eval echo "$as_me:16559: \"$ac_link\"") >&5
16560   (eval $ac_link) 2>&5
16561   ac_status=$?
16562   echo "$as_me:16562: \$? = $ac_status" >&5
16563   (exit $ac_status); } &&
16564          { ac_try='test -s conftest$ac_exeext'
16565   { (eval echo "$as_me:16565: \"$ac_try\"") >&5
16566   (eval $ac_try) 2>&5
16567   ac_status=$?
16568   echo "$as_me:16568: \$? = $ac_status" >&5
16569   (exit $ac_status); }; }; then
16570   ac_cv_lib_dmalloc_dmalloc_debug=yes
16571 else
16572   echo "$as_me: failed program was:" >&5
16573 cat conftest.$ac_ext >&5
16574 ac_cv_lib_dmalloc_dmalloc_debug=no
16575 fi
16576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16577 LIBS=$ac_check_lib_save_LIBS
16578 fi
16579 echo "$as_me:16579: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16580 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16581 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16582   cat >>confdefs.h <<EOF
16583 #define HAVE_LIBDMALLOC 1
16584 EOF
16585
16586   LIBS="-ldmalloc $LIBS"
16587
16588 fi
16589
16590 fi
16591
16592 fi
16593
16594 echo "$as_me:16594: checking if you want to use dbmalloc for testing" >&5
16595 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16596
16597 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16598 if test "${with_dbmalloc+set}" = set; then
16599   withval="$with_dbmalloc"
16600
16601 cat >>confdefs.h <<EOF
16602 #define USE_DBMALLOC 1
16603 EOF
16604
16605         : ${with_cflags:=-g}
16606         : ${with_no_leaks:=yes}
16607          with_dbmalloc=yes
16608 else
16609   with_dbmalloc=
16610 fi;
16611 echo "$as_me:16611: result: ${with_dbmalloc:-no}" >&5
16612 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16613
16614 case .$with_cflags in
16615 (.*-g*)
16616         case .$CFLAGS in
16617         (.*-g*)
16618                 ;;
16619         (*)
16620
16621 cf_fix_cppflags=no
16622 cf_new_cflags=
16623 cf_new_cppflags=
16624 cf_new_extra_cppflags=
16625
16626 for cf_add_cflags in -g
16627 do
16628 case $cf_fix_cppflags in
16629 (no)
16630         case $cf_add_cflags in
16631         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16632                 case $cf_add_cflags in
16633                 (-D*)
16634                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16635
16636                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16637                                 && test -z "${cf_tst_cflags}" \
16638                                 && cf_fix_cppflags=yes
16639
16640                         if test $cf_fix_cppflags = yes ; then
16641
16642         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16643         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16644
16645                                 continue
16646                         elif test "${cf_tst_cflags}" = "\"'" ; then
16647
16648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16650
16651                                 continue
16652                         fi
16653                         ;;
16654                 esac
16655                 case "$CPPFLAGS" in
16656                 (*$cf_add_cflags)
16657                         ;;
16658                 (*)
16659                         case $cf_add_cflags in
16660                         (-D*)
16661                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16662
16663 CPPFLAGS=`echo "$CPPFLAGS" | \
16664         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16665                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16666
16667                                 ;;
16668                         esac
16669
16670         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16671         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16672
16673                         ;;
16674                 esac
16675                 ;;
16676         (*)
16677
16678         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16679         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16680
16681                 ;;
16682         esac
16683         ;;
16684 (yes)
16685
16686         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16687         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16688
16689         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16690
16691         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16692                 && test -z "${cf_tst_cflags}" \
16693                 && cf_fix_cppflags=no
16694         ;;
16695 esac
16696 done
16697
16698 if test -n "$cf_new_cflags" ; then
16699
16700         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16701         CFLAGS="${CFLAGS}$cf_new_cflags"
16702
16703 fi
16704
16705 if test -n "$cf_new_cppflags" ; then
16706
16707         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16708         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16709
16710 fi
16711
16712 if test -n "$cf_new_extra_cppflags" ; then
16713
16714         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16715         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16716
16717 fi
16718
16719                 ;;
16720         esac
16721         ;;
16722 esac
16723
16724 if test "$with_dbmalloc" = yes ; then
16725         echo "$as_me:16725: checking for dbmalloc.h" >&5
16726 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16727 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730   cat >conftest.$ac_ext <<_ACEOF
16731 #line 16731 "configure"
16732 #include "confdefs.h"
16733 #include <dbmalloc.h>
16734 _ACEOF
16735 if { (eval echo "$as_me:16735: \"$ac_cpp conftest.$ac_ext\"") >&5
16736   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16737   ac_status=$?
16738   egrep -v '^ *\+' conftest.er1 >conftest.err
16739   rm -f conftest.er1
16740   cat conftest.err >&5
16741   echo "$as_me:16741: \$? = $ac_status" >&5
16742   (exit $ac_status); } >/dev/null; then
16743   if test -s conftest.err; then
16744     ac_cpp_err=$ac_c_preproc_warn_flag
16745   else
16746     ac_cpp_err=
16747   fi
16748 else
16749   ac_cpp_err=yes
16750 fi
16751 if test -z "$ac_cpp_err"; then
16752   ac_cv_header_dbmalloc_h=yes
16753 else
16754   echo "$as_me: failed program was:" >&5
16755   cat conftest.$ac_ext >&5
16756   ac_cv_header_dbmalloc_h=no
16757 fi
16758 rm -f conftest.err conftest.$ac_ext
16759 fi
16760 echo "$as_me:16760: result: $ac_cv_header_dbmalloc_h" >&5
16761 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16762 if test $ac_cv_header_dbmalloc_h = yes; then
16763
16764 echo "$as_me:16764: checking for debug_malloc in -ldbmalloc" >&5
16765 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16766 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16767   echo $ECHO_N "(cached) $ECHO_C" >&6
16768 else
16769   ac_check_lib_save_LIBS=$LIBS
16770 LIBS="-ldbmalloc  $LIBS"
16771 cat >conftest.$ac_ext <<_ACEOF
16772 #line 16772 "configure"
16773 #include "confdefs.h"
16774
16775 /* Override any gcc2 internal prototype to avoid an error.  */
16776 #ifdef __cplusplus
16777 extern "C"
16778 #endif
16779 /* We use char because int might match the return type of a gcc2
16780    builtin and then its argument prototype would still apply.  */
16781 char debug_malloc ();
16782 int
16783 main (void)
16784 {
16785 debug_malloc ();
16786   ;
16787   return 0;
16788 }
16789 _ACEOF
16790 rm -f conftest.$ac_objext conftest$ac_exeext
16791 if { (eval echo "$as_me:16791: \"$ac_link\"") >&5
16792   (eval $ac_link) 2>&5
16793   ac_status=$?
16794   echo "$as_me:16794: \$? = $ac_status" >&5
16795   (exit $ac_status); } &&
16796          { ac_try='test -s conftest$ac_exeext'
16797   { (eval echo "$as_me:16797: \"$ac_try\"") >&5
16798   (eval $ac_try) 2>&5
16799   ac_status=$?
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); }; }; then
16802   ac_cv_lib_dbmalloc_debug_malloc=yes
16803 else
16804   echo "$as_me: failed program was:" >&5
16805 cat conftest.$ac_ext >&5
16806 ac_cv_lib_dbmalloc_debug_malloc=no
16807 fi
16808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16809 LIBS=$ac_check_lib_save_LIBS
16810 fi
16811 echo "$as_me:16811: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16812 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16813 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16814   cat >>confdefs.h <<EOF
16815 #define HAVE_LIBDBMALLOC 1
16816 EOF
16817
16818   LIBS="-ldbmalloc $LIBS"
16819
16820 fi
16821
16822 fi
16823
16824 fi
16825
16826 echo "$as_me:16826: checking if you want to use valgrind for testing" >&5
16827 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16828
16829 # Check whether --with-valgrind or --without-valgrind was given.
16830 if test "${with_valgrind+set}" = set; then
16831   withval="$with_valgrind"
16832
16833 cat >>confdefs.h <<EOF
16834 #define USE_VALGRIND 1
16835 EOF
16836
16837         : ${with_cflags:=-g}
16838         : ${with_no_leaks:=yes}
16839          with_valgrind=yes
16840 else
16841   with_valgrind=
16842 fi;
16843 echo "$as_me:16843: result: ${with_valgrind:-no}" >&5
16844 echo "${ECHO_T}${with_valgrind:-no}" >&6
16845
16846 case .$with_cflags in
16847 (.*-g*)
16848         case .$CFLAGS in
16849         (.*-g*)
16850                 ;;
16851         (*)
16852
16853 cf_fix_cppflags=no
16854 cf_new_cflags=
16855 cf_new_cppflags=
16856 cf_new_extra_cppflags=
16857
16858 for cf_add_cflags in -g
16859 do
16860 case $cf_fix_cppflags in
16861 (no)
16862         case $cf_add_cflags in
16863         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16864                 case $cf_add_cflags in
16865                 (-D*)
16866                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16867
16868                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16869                                 && test -z "${cf_tst_cflags}" \
16870                                 && cf_fix_cppflags=yes
16871
16872                         if test $cf_fix_cppflags = yes ; then
16873
16874         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16875         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16876
16877                                 continue
16878                         elif test "${cf_tst_cflags}" = "\"'" ; then
16879
16880         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16881         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16882
16883                                 continue
16884                         fi
16885                         ;;
16886                 esac
16887                 case "$CPPFLAGS" in
16888                 (*$cf_add_cflags)
16889                         ;;
16890                 (*)
16891                         case $cf_add_cflags in
16892                         (-D*)
16893                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16894
16895 CPPFLAGS=`echo "$CPPFLAGS" | \
16896         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16897                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16898
16899                                 ;;
16900                         esac
16901
16902         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16903         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16904
16905                         ;;
16906                 esac
16907                 ;;
16908         (*)
16909
16910         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16911         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16912
16913                 ;;
16914         esac
16915         ;;
16916 (yes)
16917
16918         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16919         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16920
16921         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16922
16923         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16924                 && test -z "${cf_tst_cflags}" \
16925                 && cf_fix_cppflags=no
16926         ;;
16927 esac
16928 done
16929
16930 if test -n "$cf_new_cflags" ; then
16931
16932         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16933         CFLAGS="${CFLAGS}$cf_new_cflags"
16934
16935 fi
16936
16937 if test -n "$cf_new_cppflags" ; then
16938
16939         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16940         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16941
16942 fi
16943
16944 if test -n "$cf_new_extra_cppflags" ; then
16945
16946         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16947         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16948
16949 fi
16950
16951                 ;;
16952         esac
16953         ;;
16954 esac
16955
16956 echo "$as_me:16956: checking if you want to perform memory-leak testing" >&5
16957 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16958
16959 # Check whether --enable-leaks or --disable-leaks was given.
16960 if test "${enable_leaks+set}" = set; then
16961   enableval="$enable_leaks"
16962   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16963 else
16964   : ${with_no_leaks:=no}
16965 fi;
16966 echo "$as_me:16966: result: $with_no_leaks" >&5
16967 echo "${ECHO_T}$with_no_leaks" >&6
16968
16969 if test "$with_no_leaks" = yes ; then
16970
16971 cat >>confdefs.h <<\EOF
16972 #define NO_LEAKS 1
16973 EOF
16974
16975 cat >>confdefs.h <<\EOF
16976 #define YY_NO_LEAKS 1
16977 EOF
16978
16979 fi
16980
16981 cat >>confdefs.h <<\EOF
16982 #define HAVE_NC_ALLOC_H 1
16983 EOF
16984
16985 ###     use option --enable-expanded to generate certain macros as functions
16986
16987 # Check whether --enable-expanded or --disable-expanded was given.
16988 if test "${enable_expanded+set}" = set; then
16989   enableval="$enable_expanded"
16990   test "x$enableval" = xyes &&
16991 cat >>confdefs.h <<\EOF
16992 #define NCURSES_EXPANDED 1
16993 EOF
16994
16995 fi;
16996
16997 ###     use option --disable-macros to suppress macros in favor of functions
16998
16999 # Check whether --enable-macros or --disable-macros was given.
17000 if test "${enable_macros+set}" = set; then
17001   enableval="$enable_macros"
17002   test "$enableval" = no &&
17003 cat >>confdefs.h <<\EOF
17004 #define NCURSES_NOMACROS 1
17005 EOF
17006
17007 fi;
17008
17009 # Normally we only add trace() to the debug-library.  Allow this to be
17010 # extended to all models of the ncurses library:
17011 cf_all_traces=no
17012 case "$CFLAGS $CPPFLAGS" in
17013 (*-DTRACE*)
17014         cf_all_traces=yes
17015         ;;
17016 esac
17017
17018 echo "$as_me:17018: checking whether to add trace feature to all models" >&5
17019 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17020
17021 # Check whether --with-trace or --without-trace was given.
17022 if test "${with_trace+set}" = set; then
17023   withval="$with_trace"
17024   cf_with_trace=$withval
17025 else
17026   cf_with_trace=$cf_all_traces
17027 fi;
17028 echo "$as_me:17028: result: $cf_with_trace" >&5
17029 echo "${ECHO_T}$cf_with_trace" >&6
17030
17031 if test "x$cf_with_trace" = xyes ; then
17032         LIB_TRACING=all
17033         ADA_TRACE=TRUE
17034
17035 cf_fix_cppflags=no
17036 cf_new_cflags=
17037 cf_new_cppflags=
17038 cf_new_extra_cppflags=
17039
17040 for cf_add_cflags in -DTRACE
17041 do
17042 case $cf_fix_cppflags in
17043 (no)
17044         case $cf_add_cflags in
17045         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17046                 case $cf_add_cflags in
17047                 (-D*)
17048                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17049
17050                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17051                                 && test -z "${cf_tst_cflags}" \
17052                                 && cf_fix_cppflags=yes
17053
17054                         if test $cf_fix_cppflags = yes ; then
17055
17056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17058
17059                                 continue
17060                         elif test "${cf_tst_cflags}" = "\"'" ; then
17061
17062         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17063         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17064
17065                                 continue
17066                         fi
17067                         ;;
17068                 esac
17069                 case "$CPPFLAGS" in
17070                 (*$cf_add_cflags)
17071                         ;;
17072                 (*)
17073                         case $cf_add_cflags in
17074                         (-D*)
17075                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17076
17077 CPPFLAGS=`echo "$CPPFLAGS" | \
17078         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17079                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17080
17081                                 ;;
17082                         esac
17083
17084         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17085         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17086
17087                         ;;
17088                 esac
17089                 ;;
17090         (*)
17091
17092         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17093         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17094
17095                 ;;
17096         esac
17097         ;;
17098 (yes)
17099
17100         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17101         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17102
17103         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17104
17105         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17106                 && test -z "${cf_tst_cflags}" \
17107                 && cf_fix_cppflags=no
17108         ;;
17109 esac
17110 done
17111
17112 if test -n "$cf_new_cflags" ; then
17113
17114         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17115         CFLAGS="${CFLAGS}$cf_new_cflags"
17116
17117 fi
17118
17119 if test -n "$cf_new_cppflags" ; then
17120
17121         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17122         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17123
17124 fi
17125
17126 if test -n "$cf_new_extra_cppflags" ; then
17127
17128         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17129         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17130
17131 fi
17132
17133 cat >>confdefs.h <<\EOF
17134 #define HAVE__TRACEF 1
17135 EOF
17136
17137 else
17138         LIB_TRACING=DEBUG
17139         ADA_TRACE=FALSE
17140 fi
17141
17142 echo "$as_me:17142: checking if we want to use GNAT projects" >&5
17143 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17144
17145 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17146 if test "${enable_gnat_projects+set}" = set; then
17147   enableval="$enable_gnat_projects"
17148   test "$enableval" != no && enableval=yes
17149         if test "$enableval" != "yes" ; then
17150     enable_gnat_projects=no
17151         else
17152                 enable_gnat_projects=yes
17153         fi
17154 else
17155   enableval=yes
17156         enable_gnat_projects=yes
17157
17158 fi;
17159 echo "$as_me:17159: result: $enable_gnat_projects" >&5
17160 echo "${ECHO_T}$enable_gnat_projects" >&6
17161
17162 ###     Checks for libraries.
17163 case $cf_cv_system_name in
17164 (*mingw32*|*mingw64*)
17165         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17166         # Note: WINVER may be a problem with Windows 10
17167         ;;
17168 (*)
17169 echo "$as_me:17169: checking for gettimeofday" >&5
17170 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17171 if test "${ac_cv_func_gettimeofday+set}" = set; then
17172   echo $ECHO_N "(cached) $ECHO_C" >&6
17173 else
17174   cat >conftest.$ac_ext <<_ACEOF
17175 #line 17175 "configure"
17176 #include "confdefs.h"
17177 #define gettimeofday autoconf_temporary
17178 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17179 #undef gettimeofday
17180
17181 #ifdef __cplusplus
17182 extern "C"
17183 #endif
17184
17185 /* We use char because int might match the return type of a gcc2
17186    builtin and then its argument prototype would still apply.  */
17187 char gettimeofday (void);
17188
17189 int
17190 main (void)
17191 {
17192
17193 /* The GNU C library defines stubs for functions which it implements
17194     to always fail with ENOSYS.  Some functions are actually named
17195     something starting with __ and the normal name is an alias.  */
17196 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17197 #error found stub for gettimeofday
17198 #endif
17199
17200         return gettimeofday ();
17201   ;
17202   return 0;
17203 }
17204 _ACEOF
17205 rm -f conftest.$ac_objext conftest$ac_exeext
17206 if { (eval echo "$as_me:17206: \"$ac_link\"") >&5
17207   (eval $ac_link) 2>&5
17208   ac_status=$?
17209   echo "$as_me:17209: \$? = $ac_status" >&5
17210   (exit $ac_status); } &&
17211          { ac_try='test -s conftest$ac_exeext'
17212   { (eval echo "$as_me:17212: \"$ac_try\"") >&5
17213   (eval $ac_try) 2>&5
17214   ac_status=$?
17215   echo "$as_me:17215: \$? = $ac_status" >&5
17216   (exit $ac_status); }; }; then
17217   ac_cv_func_gettimeofday=yes
17218 else
17219   echo "$as_me: failed program was:" >&5
17220 cat conftest.$ac_ext >&5
17221 ac_cv_func_gettimeofday=no
17222 fi
17223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17224 fi
17225 echo "$as_me:17225: result: $ac_cv_func_gettimeofday" >&5
17226 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17227 if test $ac_cv_func_gettimeofday = yes; then
17228
17229 cat >>confdefs.h <<\EOF
17230 #define HAVE_GETTIMEOFDAY 1
17231 EOF
17232
17233 else
17234
17235 echo "$as_me:17235: checking for gettimeofday in -lbsd" >&5
17236 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17237 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17238   echo $ECHO_N "(cached) $ECHO_C" >&6
17239 else
17240   ac_check_lib_save_LIBS=$LIBS
17241 LIBS="-lbsd  $LIBS"
17242 cat >conftest.$ac_ext <<_ACEOF
17243 #line 17243 "configure"
17244 #include "confdefs.h"
17245
17246 /* Override any gcc2 internal prototype to avoid an error.  */
17247 #ifdef __cplusplus
17248 extern "C"
17249 #endif
17250 /* We use char because int might match the return type of a gcc2
17251    builtin and then its argument prototype would still apply.  */
17252 char gettimeofday ();
17253 int
17254 main (void)
17255 {
17256 gettimeofday ();
17257   ;
17258   return 0;
17259 }
17260 _ACEOF
17261 rm -f conftest.$ac_objext conftest$ac_exeext
17262 if { (eval echo "$as_me:17262: \"$ac_link\"") >&5
17263   (eval $ac_link) 2>&5
17264   ac_status=$?
17265   echo "$as_me:17265: \$? = $ac_status" >&5
17266   (exit $ac_status); } &&
17267          { ac_try='test -s conftest$ac_exeext'
17268   { (eval echo "$as_me:17268: \"$ac_try\"") >&5
17269   (eval $ac_try) 2>&5
17270   ac_status=$?
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); }; }; then
17273   ac_cv_lib_bsd_gettimeofday=yes
17274 else
17275   echo "$as_me: failed program was:" >&5
17276 cat conftest.$ac_ext >&5
17277 ac_cv_lib_bsd_gettimeofday=no
17278 fi
17279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17280 LIBS=$ac_check_lib_save_LIBS
17281 fi
17282 echo "$as_me:17282: result: $ac_cv_lib_bsd_gettimeofday" >&5
17283 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17284 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17285
17286 cat >>confdefs.h <<\EOF
17287 #define HAVE_GETTIMEOFDAY 1
17288 EOF
17289
17290 cf_add_libs="$LIBS"
17291 # reverse order
17292 cf_add_0lib=
17293 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17294 # filter duplicates
17295 for cf_add_1lib in $cf_add_0lib; do
17296         for cf_add_2lib in $cf_add_libs; do
17297                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17298                         cf_add_1lib=
17299                         break
17300                 fi
17301         done
17302         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17303 done
17304 LIBS="$cf_add_libs"
17305
17306 fi
17307
17308 fi
17309         ;;
17310 esac
17311
17312 echo "$as_me:17312: checking if -lm needed for math functions" >&5
17313 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17314 if test "${cf_cv_need_libm+set}" = set; then
17315   echo $ECHO_N "(cached) $ECHO_C" >&6
17316 else
17317
17318         cat >conftest.$ac_ext <<_ACEOF
17319 #line 17319 "configure"
17320 #include "confdefs.h"
17321
17322         #include <stdio.h>
17323         #include <stdlib.h>
17324         #include <math.h>
17325
17326 int
17327 main (void)
17328 {
17329 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17330   ;
17331   return 0;
17332 }
17333 _ACEOF
17334 rm -f conftest.$ac_objext conftest$ac_exeext
17335 if { (eval echo "$as_me:17335: \"$ac_link\"") >&5
17336   (eval $ac_link) 2>&5
17337   ac_status=$?
17338   echo "$as_me:17338: \$? = $ac_status" >&5
17339   (exit $ac_status); } &&
17340          { ac_try='test -s conftest$ac_exeext'
17341   { (eval echo "$as_me:17341: \"$ac_try\"") >&5
17342   (eval $ac_try) 2>&5
17343   ac_status=$?
17344   echo "$as_me:17344: \$? = $ac_status" >&5
17345   (exit $ac_status); }; }; then
17346   cf_cv_need_libm=no
17347 else
17348   echo "$as_me: failed program was:" >&5
17349 cat conftest.$ac_ext >&5
17350 cf_cv_need_libm=yes
17351 fi
17352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17353 fi
17354 echo "$as_me:17354: result: $cf_cv_need_libm" >&5
17355 echo "${ECHO_T}$cf_cv_need_libm" >&6
17356 if test "$cf_cv_need_libm" = yes
17357 then
17358 MATH_LIB=-lm
17359 fi
17360
17361 ###     Checks for header files.
17362 echo "$as_me:17362: checking for ANSI C header files" >&5
17363 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17364 if test "${ac_cv_header_stdc+set}" = set; then
17365   echo $ECHO_N "(cached) $ECHO_C" >&6
17366 else
17367   cat >conftest.$ac_ext <<_ACEOF
17368 #line 17368 "configure"
17369 #include "confdefs.h"
17370 #include <stdlib.h>
17371 #include <stdarg.h>
17372 #include <string.h>
17373 #include <float.h>
17374
17375 _ACEOF
17376 if { (eval echo "$as_me:17376: \"$ac_cpp conftest.$ac_ext\"") >&5
17377   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17378   ac_status=$?
17379   egrep -v '^ *\+' conftest.er1 >conftest.err
17380   rm -f conftest.er1
17381   cat conftest.err >&5
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); } >/dev/null; then
17384   if test -s conftest.err; then
17385     ac_cpp_err=$ac_c_preproc_warn_flag
17386   else
17387     ac_cpp_err=
17388   fi
17389 else
17390   ac_cpp_err=yes
17391 fi
17392 if test -z "$ac_cpp_err"; then
17393   ac_cv_header_stdc=yes
17394 else
17395   echo "$as_me: failed program was:" >&5
17396   cat conftest.$ac_ext >&5
17397   ac_cv_header_stdc=no
17398 fi
17399 rm -f conftest.err conftest.$ac_ext
17400
17401 if test $ac_cv_header_stdc = yes; then
17402   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17403   cat >conftest.$ac_ext <<_ACEOF
17404 #line 17404 "configure"
17405 #include "confdefs.h"
17406 #include <string.h>
17407
17408 _ACEOF
17409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17410   egrep "memchr" >/dev/null 2>&1; then
17411   :
17412 else
17413   ac_cv_header_stdc=no
17414 fi
17415 rm -rf conftest*
17416
17417 fi
17418
17419 if test $ac_cv_header_stdc = yes; then
17420   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17421   cat >conftest.$ac_ext <<_ACEOF
17422 #line 17422 "configure"
17423 #include "confdefs.h"
17424 #include <stdlib.h>
17425
17426 _ACEOF
17427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17428   egrep "free" >/dev/null 2>&1; then
17429   :
17430 else
17431   ac_cv_header_stdc=no
17432 fi
17433 rm -rf conftest*
17434
17435 fi
17436
17437 if test $ac_cv_header_stdc = yes; then
17438   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17439   if test "$cross_compiling" = yes; then
17440   :
17441 else
17442   cat >conftest.$ac_ext <<_ACEOF
17443 #line 17443 "configure"
17444 #include "confdefs.h"
17445 #include <ctype.h>
17446 #if ((' ' & 0x0FF) == 0x020)
17447 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17448 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17449 #else
17450 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17451                      || ('j' <= (c) && (c) <= 'r') \
17452                      || ('s' <= (c) && (c) <= 'z'))
17453 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17454 #endif
17455
17456 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17457 int
17458 main (void)
17459 {
17460   int i;
17461   for (i = 0; i < 256; i++)
17462     if (XOR (islower (i), ISLOWER (i))
17463         || toupper (i) != TOUPPER (i))
17464       $ac_main_return(2);
17465   $ac_main_return (0);
17466 }
17467 _ACEOF
17468 rm -f conftest$ac_exeext
17469 if { (eval echo "$as_me:17469: \"$ac_link\"") >&5
17470   (eval $ac_link) 2>&5
17471   ac_status=$?
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17474   { (eval echo "$as_me:17474: \"$ac_try\"") >&5
17475   (eval $ac_try) 2>&5
17476   ac_status=$?
17477   echo "$as_me:17477: \$? = $ac_status" >&5
17478   (exit $ac_status); }; }; then
17479   :
17480 else
17481   echo "$as_me: program exited with status $ac_status" >&5
17482 echo "$as_me: failed program was:" >&5
17483 cat conftest.$ac_ext >&5
17484 ac_cv_header_stdc=no
17485 fi
17486 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17487 fi
17488 fi
17489 fi
17490 echo "$as_me:17490: result: $ac_cv_header_stdc" >&5
17491 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17492 if test $ac_cv_header_stdc = yes; then
17493
17494 cat >>confdefs.h <<\EOF
17495 #define STDC_HEADERS 1
17496 EOF
17497
17498 fi
17499
17500 ac_header_dirent=no
17501 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17502   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17503 echo "$as_me:17503: checking for $ac_hdr that defines DIR" >&5
17504 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17506   echo $ECHO_N "(cached) $ECHO_C" >&6
17507 else
17508   cat >conftest.$ac_ext <<_ACEOF
17509 #line 17509 "configure"
17510 #include "confdefs.h"
17511 #include <sys/types.h>
17512 #include <$ac_hdr>
17513
17514 int
17515 main (void)
17516 {
17517 if ((DIR *) 0)
17518 return 0;
17519   ;
17520   return 0;
17521 }
17522 _ACEOF
17523 rm -f conftest.$ac_objext
17524 if { (eval echo "$as_me:17524: \"$ac_compile\"") >&5
17525   (eval $ac_compile) 2>&5
17526   ac_status=$?
17527   echo "$as_me:17527: \$? = $ac_status" >&5
17528   (exit $ac_status); } &&
17529          { ac_try='test -s conftest.$ac_objext'
17530   { (eval echo "$as_me:17530: \"$ac_try\"") >&5
17531   (eval $ac_try) 2>&5
17532   ac_status=$?
17533   echo "$as_me:17533: \$? = $ac_status" >&5
17534   (exit $ac_status); }; }; then
17535   eval "$as_ac_Header=yes"
17536 else
17537   echo "$as_me: failed program was:" >&5
17538 cat conftest.$ac_ext >&5
17539 eval "$as_ac_Header=no"
17540 fi
17541 rm -f conftest.$ac_objext conftest.$ac_ext
17542 fi
17543 echo "$as_me:17543: result: `eval echo '${'$as_ac_Header'}'`" >&5
17544 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17545 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17546   cat >>confdefs.h <<EOF
17547 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17548 EOF
17549
17550 ac_header_dirent=$ac_hdr; break
17551 fi
17552
17553 done
17554 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17555 if test $ac_header_dirent = dirent.h; then
17556   echo "$as_me:17556: checking for opendir in -ldir" >&5
17557 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17558 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17559   echo $ECHO_N "(cached) $ECHO_C" >&6
17560 else
17561   ac_check_lib_save_LIBS=$LIBS
17562 LIBS="-ldir  $LIBS"
17563 cat >conftest.$ac_ext <<_ACEOF
17564 #line 17564 "configure"
17565 #include "confdefs.h"
17566
17567 /* Override any gcc2 internal prototype to avoid an error.  */
17568 #ifdef __cplusplus
17569 extern "C"
17570 #endif
17571 /* We use char because int might match the return type of a gcc2
17572    builtin and then its argument prototype would still apply.  */
17573 char opendir ();
17574 int
17575 main (void)
17576 {
17577 opendir ();
17578   ;
17579   return 0;
17580 }
17581 _ACEOF
17582 rm -f conftest.$ac_objext conftest$ac_exeext
17583 if { (eval echo "$as_me:17583: \"$ac_link\"") >&5
17584   (eval $ac_link) 2>&5
17585   ac_status=$?
17586   echo "$as_me:17586: \$? = $ac_status" >&5
17587   (exit $ac_status); } &&
17588          { ac_try='test -s conftest$ac_exeext'
17589   { (eval echo "$as_me:17589: \"$ac_try\"") >&5
17590   (eval $ac_try) 2>&5
17591   ac_status=$?
17592   echo "$as_me:17592: \$? = $ac_status" >&5
17593   (exit $ac_status); }; }; then
17594   ac_cv_lib_dir_opendir=yes
17595 else
17596   echo "$as_me: failed program was:" >&5
17597 cat conftest.$ac_ext >&5
17598 ac_cv_lib_dir_opendir=no
17599 fi
17600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17601 LIBS=$ac_check_lib_save_LIBS
17602 fi
17603 echo "$as_me:17603: result: $ac_cv_lib_dir_opendir" >&5
17604 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17605 if test $ac_cv_lib_dir_opendir = yes; then
17606   LIBS="$LIBS -ldir"
17607 fi
17608
17609 else
17610   echo "$as_me:17610: checking for opendir in -lx" >&5
17611 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17612 if test "${ac_cv_lib_x_opendir+set}" = set; then
17613   echo $ECHO_N "(cached) $ECHO_C" >&6
17614 else
17615   ac_check_lib_save_LIBS=$LIBS
17616 LIBS="-lx  $LIBS"
17617 cat >conftest.$ac_ext <<_ACEOF
17618 #line 17618 "configure"
17619 #include "confdefs.h"
17620
17621 /* Override any gcc2 internal prototype to avoid an error.  */
17622 #ifdef __cplusplus
17623 extern "C"
17624 #endif
17625 /* We use char because int might match the return type of a gcc2
17626    builtin and then its argument prototype would still apply.  */
17627 char opendir ();
17628 int
17629 main (void)
17630 {
17631 opendir ();
17632   ;
17633   return 0;
17634 }
17635 _ACEOF
17636 rm -f conftest.$ac_objext conftest$ac_exeext
17637 if { (eval echo "$as_me:17637: \"$ac_link\"") >&5
17638   (eval $ac_link) 2>&5
17639   ac_status=$?
17640   echo "$as_me:17640: \$? = $ac_status" >&5
17641   (exit $ac_status); } &&
17642          { ac_try='test -s conftest$ac_exeext'
17643   { (eval echo "$as_me:17643: \"$ac_try\"") >&5
17644   (eval $ac_try) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); }; }; then
17648   ac_cv_lib_x_opendir=yes
17649 else
17650   echo "$as_me: failed program was:" >&5
17651 cat conftest.$ac_ext >&5
17652 ac_cv_lib_x_opendir=no
17653 fi
17654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17655 LIBS=$ac_check_lib_save_LIBS
17656 fi
17657 echo "$as_me:17657: result: $ac_cv_lib_x_opendir" >&5
17658 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17659 if test $ac_cv_lib_x_opendir = yes; then
17660   LIBS="$LIBS -lx"
17661 fi
17662
17663 fi
17664
17665 echo "$as_me:17665: checking whether time.h and sys/time.h may both be included" >&5
17666 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17667 if test "${ac_cv_header_time+set}" = set; then
17668   echo $ECHO_N "(cached) $ECHO_C" >&6
17669 else
17670   cat >conftest.$ac_ext <<_ACEOF
17671 #line 17671 "configure"
17672 #include "confdefs.h"
17673 #include <sys/types.h>
17674 #include <sys/time.h>
17675 #include <time.h>
17676
17677 int
17678 main (void)
17679 {
17680 if ((struct tm *) 0)
17681 return 0;
17682   ;
17683   return 0;
17684 }
17685 _ACEOF
17686 rm -f conftest.$ac_objext
17687 if { (eval echo "$as_me:17687: \"$ac_compile\"") >&5
17688   (eval $ac_compile) 2>&5
17689   ac_status=$?
17690   echo "$as_me:17690: \$? = $ac_status" >&5
17691   (exit $ac_status); } &&
17692          { ac_try='test -s conftest.$ac_objext'
17693   { (eval echo "$as_me:17693: \"$ac_try\"") >&5
17694   (eval $ac_try) 2>&5
17695   ac_status=$?
17696   echo "$as_me:17696: \$? = $ac_status" >&5
17697   (exit $ac_status); }; }; then
17698   ac_cv_header_time=yes
17699 else
17700   echo "$as_me: failed program was:" >&5
17701 cat conftest.$ac_ext >&5
17702 ac_cv_header_time=no
17703 fi
17704 rm -f conftest.$ac_objext conftest.$ac_ext
17705 fi
17706 echo "$as_me:17706: result: $ac_cv_header_time" >&5
17707 echo "${ECHO_T}$ac_cv_header_time" >&6
17708 if test $ac_cv_header_time = yes; then
17709
17710 cat >>confdefs.h <<\EOF
17711 #define TIME_WITH_SYS_TIME 1
17712 EOF
17713
17714 fi
17715
17716 cf_regex_func=no
17717
17718 cf_regex_libs="regex re"
17719 case $host_os in
17720 (mingw*)
17721         cf_regex_libs="gnurx $cf_regex_libs"
17722         ;;
17723 esac
17724
17725 echo "$as_me:17725: checking for regcomp" >&5
17726 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17727 if test "${ac_cv_func_regcomp+set}" = set; then
17728   echo $ECHO_N "(cached) $ECHO_C" >&6
17729 else
17730   cat >conftest.$ac_ext <<_ACEOF
17731 #line 17731 "configure"
17732 #include "confdefs.h"
17733 #define regcomp autoconf_temporary
17734 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17735 #undef regcomp
17736
17737 #ifdef __cplusplus
17738 extern "C"
17739 #endif
17740
17741 /* We use char because int might match the return type of a gcc2
17742    builtin and then its argument prototype would still apply.  */
17743 char regcomp (void);
17744
17745 int
17746 main (void)
17747 {
17748
17749 /* The GNU C library defines stubs for functions which it implements
17750     to always fail with ENOSYS.  Some functions are actually named
17751     something starting with __ and the normal name is an alias.  */
17752 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17753 #error found stub for regcomp
17754 #endif
17755
17756         return regcomp ();
17757   ;
17758   return 0;
17759 }
17760 _ACEOF
17761 rm -f conftest.$ac_objext conftest$ac_exeext
17762 if { (eval echo "$as_me:17762: \"$ac_link\"") >&5
17763   (eval $ac_link) 2>&5
17764   ac_status=$?
17765   echo "$as_me:17765: \$? = $ac_status" >&5
17766   (exit $ac_status); } &&
17767          { ac_try='test -s conftest$ac_exeext'
17768   { (eval echo "$as_me:17768: \"$ac_try\"") >&5
17769   (eval $ac_try) 2>&5
17770   ac_status=$?
17771   echo "$as_me:17771: \$? = $ac_status" >&5
17772   (exit $ac_status); }; }; then
17773   ac_cv_func_regcomp=yes
17774 else
17775   echo "$as_me: failed program was:" >&5
17776 cat conftest.$ac_ext >&5
17777 ac_cv_func_regcomp=no
17778 fi
17779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17780 fi
17781 echo "$as_me:17781: result: $ac_cv_func_regcomp" >&5
17782 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17783 if test $ac_cv_func_regcomp = yes; then
17784   cf_regex_func=regcomp
17785 else
17786
17787         for cf_regex_lib in $cf_regex_libs
17788         do
17789                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17790 echo "$as_me:17790: checking for regcomp in -l$cf_regex_lib" >&5
17791 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17792 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17793   echo $ECHO_N "(cached) $ECHO_C" >&6
17794 else
17795   ac_check_lib_save_LIBS=$LIBS
17796 LIBS="-l$cf_regex_lib  $LIBS"
17797 cat >conftest.$ac_ext <<_ACEOF
17798 #line 17798 "configure"
17799 #include "confdefs.h"
17800
17801 /* Override any gcc2 internal prototype to avoid an error.  */
17802 #ifdef __cplusplus
17803 extern "C"
17804 #endif
17805 /* We use char because int might match the return type of a gcc2
17806    builtin and then its argument prototype would still apply.  */
17807 char regcomp ();
17808 int
17809 main (void)
17810 {
17811 regcomp ();
17812   ;
17813   return 0;
17814 }
17815 _ACEOF
17816 rm -f conftest.$ac_objext conftest$ac_exeext
17817 if { (eval echo "$as_me:17817: \"$ac_link\"") >&5
17818   (eval $ac_link) 2>&5
17819   ac_status=$?
17820   echo "$as_me:17820: \$? = $ac_status" >&5
17821   (exit $ac_status); } &&
17822          { ac_try='test -s conftest$ac_exeext'
17823   { (eval echo "$as_me:17823: \"$ac_try\"") >&5
17824   (eval $ac_try) 2>&5
17825   ac_status=$?
17826   echo "$as_me:17826: \$? = $ac_status" >&5
17827   (exit $ac_status); }; }; then
17828   eval "$as_ac_Lib=yes"
17829 else
17830   echo "$as_me: failed program was:" >&5
17831 cat conftest.$ac_ext >&5
17832 eval "$as_ac_Lib=no"
17833 fi
17834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17835 LIBS=$ac_check_lib_save_LIBS
17836 fi
17837 echo "$as_me:17837: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17838 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17839 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17840
17841 cf_add_libs="$LIBS"
17842 # reverse order
17843 cf_add_0lib=
17844 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17845 # filter duplicates
17846 for cf_add_1lib in $cf_add_0lib; do
17847         for cf_add_2lib in $cf_add_libs; do
17848                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17849                         cf_add_1lib=
17850                         break
17851                 fi
17852         done
17853         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17854 done
17855 LIBS="$cf_add_libs"
17856
17857                                 cf_regex_func=regcomp
17858                                 break
17859 fi
17860
17861         done
17862
17863 fi
17864
17865 if test "$cf_regex_func" = no ; then
17866         echo "$as_me:17866: checking for compile" >&5
17867 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17868 if test "${ac_cv_func_compile+set}" = set; then
17869   echo $ECHO_N "(cached) $ECHO_C" >&6
17870 else
17871   cat >conftest.$ac_ext <<_ACEOF
17872 #line 17872 "configure"
17873 #include "confdefs.h"
17874 #define compile autoconf_temporary
17875 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17876 #undef compile
17877
17878 #ifdef __cplusplus
17879 extern "C"
17880 #endif
17881
17882 /* We use char because int might match the return type of a gcc2
17883    builtin and then its argument prototype would still apply.  */
17884 char compile (void);
17885
17886 int
17887 main (void)
17888 {
17889
17890 /* The GNU C library defines stubs for functions which it implements
17891     to always fail with ENOSYS.  Some functions are actually named
17892     something starting with __ and the normal name is an alias.  */
17893 #if defined (__stub_compile) || defined (__stub___compile)
17894 #error found stub for compile
17895 #endif
17896
17897         return compile ();
17898   ;
17899   return 0;
17900 }
17901 _ACEOF
17902 rm -f conftest.$ac_objext conftest$ac_exeext
17903 if { (eval echo "$as_me:17903: \"$ac_link\"") >&5
17904   (eval $ac_link) 2>&5
17905   ac_status=$?
17906   echo "$as_me:17906: \$? = $ac_status" >&5
17907   (exit $ac_status); } &&
17908          { ac_try='test -s conftest$ac_exeext'
17909   { (eval echo "$as_me:17909: \"$ac_try\"") >&5
17910   (eval $ac_try) 2>&5
17911   ac_status=$?
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit $ac_status); }; }; then
17914   ac_cv_func_compile=yes
17915 else
17916   echo "$as_me: failed program was:" >&5
17917 cat conftest.$ac_ext >&5
17918 ac_cv_func_compile=no
17919 fi
17920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17921 fi
17922 echo "$as_me:17922: result: $ac_cv_func_compile" >&5
17923 echo "${ECHO_T}$ac_cv_func_compile" >&6
17924 if test $ac_cv_func_compile = yes; then
17925   cf_regex_func=compile
17926 else
17927
17928                 echo "$as_me:17928: checking for compile in -lgen" >&5
17929 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17930 if test "${ac_cv_lib_gen_compile+set}" = set; then
17931   echo $ECHO_N "(cached) $ECHO_C" >&6
17932 else
17933   ac_check_lib_save_LIBS=$LIBS
17934 LIBS="-lgen  $LIBS"
17935 cat >conftest.$ac_ext <<_ACEOF
17936 #line 17936 "configure"
17937 #include "confdefs.h"
17938
17939 /* Override any gcc2 internal prototype to avoid an error.  */
17940 #ifdef __cplusplus
17941 extern "C"
17942 #endif
17943 /* We use char because int might match the return type of a gcc2
17944    builtin and then its argument prototype would still apply.  */
17945 char compile ();
17946 int
17947 main (void)
17948 {
17949 compile ();
17950   ;
17951   return 0;
17952 }
17953 _ACEOF
17954 rm -f conftest.$ac_objext conftest$ac_exeext
17955 if { (eval echo "$as_me:17955: \"$ac_link\"") >&5
17956   (eval $ac_link) 2>&5
17957   ac_status=$?
17958   echo "$as_me:17958: \$? = $ac_status" >&5
17959   (exit $ac_status); } &&
17960          { ac_try='test -s conftest$ac_exeext'
17961   { (eval echo "$as_me:17961: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   ac_cv_lib_gen_compile=yes
17967 else
17968   echo "$as_me: failed program was:" >&5
17969 cat conftest.$ac_ext >&5
17970 ac_cv_lib_gen_compile=no
17971 fi
17972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17973 LIBS=$ac_check_lib_save_LIBS
17974 fi
17975 echo "$as_me:17975: result: $ac_cv_lib_gen_compile" >&5
17976 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17977 if test $ac_cv_lib_gen_compile = yes; then
17978
17979 cf_add_libs="$LIBS"
17980 # reverse order
17981 cf_add_0lib=
17982 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17983 # filter duplicates
17984 for cf_add_1lib in $cf_add_0lib; do
17985         for cf_add_2lib in $cf_add_libs; do
17986                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17987                         cf_add_1lib=
17988                         break
17989                 fi
17990         done
17991         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17992 done
17993 LIBS="$cf_add_libs"
17994
17995                                 cf_regex_func=compile
17996 fi
17997
17998 fi
17999
18000 fi
18001
18002 if test "$cf_regex_func" = no ; then
18003         { echo "$as_me:18003: WARNING: cannot find regular expression library" >&5
18004 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18005 fi
18006
18007 echo "$as_me:18007: checking for regular-expression headers" >&5
18008 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18009 if test "${cf_cv_regex_hdrs+set}" = set; then
18010   echo $ECHO_N "(cached) $ECHO_C" >&6
18011 else
18012
18013 cf_cv_regex_hdrs=no
18014 case $cf_regex_func in
18015 (compile)
18016         for cf_regex_hdr in regexp.h regexpr.h
18017         do
18018                 cat >conftest.$ac_ext <<_ACEOF
18019 #line 18019 "configure"
18020 #include "confdefs.h"
18021 #include <$cf_regex_hdr>
18022 int
18023 main (void)
18024 {
18025
18026                         char *p = compile("", "", "", 0);
18027                         int x = step("", "");
18028
18029   ;
18030   return 0;
18031 }
18032 _ACEOF
18033 rm -f conftest.$ac_objext conftest$ac_exeext
18034 if { (eval echo "$as_me:18034: \"$ac_link\"") >&5
18035   (eval $ac_link) 2>&5
18036   ac_status=$?
18037   echo "$as_me:18037: \$? = $ac_status" >&5
18038   (exit $ac_status); } &&
18039          { ac_try='test -s conftest$ac_exeext'
18040   { (eval echo "$as_me:18040: \"$ac_try\"") >&5
18041   (eval $ac_try) 2>&5
18042   ac_status=$?
18043   echo "$as_me:18043: \$? = $ac_status" >&5
18044   (exit $ac_status); }; }; then
18045
18046                         cf_cv_regex_hdrs=$cf_regex_hdr
18047                         break
18048
18049 else
18050   echo "$as_me: failed program was:" >&5
18051 cat conftest.$ac_ext >&5
18052 fi
18053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18054         done
18055         ;;
18056 (*)
18057         for cf_regex_hdr in regex.h
18058         do
18059                 cat >conftest.$ac_ext <<_ACEOF
18060 #line 18060 "configure"
18061 #include "confdefs.h"
18062 #include <sys/types.h>
18063 #include <$cf_regex_hdr>
18064 int
18065 main (void)
18066 {
18067
18068                         regex_t *p;
18069                         int x = regcomp(p, "", 0);
18070                         int y = regexec(p, "", 0, 0, 0);
18071                         regfree(p);
18072
18073   ;
18074   return 0;
18075 }
18076 _ACEOF
18077 rm -f conftest.$ac_objext conftest$ac_exeext
18078 if { (eval echo "$as_me:18078: \"$ac_link\"") >&5
18079   (eval $ac_link) 2>&5
18080   ac_status=$?
18081   echo "$as_me:18081: \$? = $ac_status" >&5
18082   (exit $ac_status); } &&
18083          { ac_try='test -s conftest$ac_exeext'
18084   { (eval echo "$as_me:18084: \"$ac_try\"") >&5
18085   (eval $ac_try) 2>&5
18086   ac_status=$?
18087   echo "$as_me:18087: \$? = $ac_status" >&5
18088   (exit $ac_status); }; }; then
18089
18090                         cf_cv_regex_hdrs=$cf_regex_hdr
18091                         break
18092
18093 else
18094   echo "$as_me: failed program was:" >&5
18095 cat conftest.$ac_ext >&5
18096 fi
18097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18098         done
18099         ;;
18100 esac
18101
18102 fi
18103 echo "$as_me:18103: result: $cf_cv_regex_hdrs" >&5
18104 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18105
18106 case $cf_cv_regex_hdrs in
18107         (no)            { echo "$as_me:18107: WARNING: no regular expression header found" >&5
18108 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18109         (regex.h)
18110 cat >>confdefs.h <<\EOF
18111 #define HAVE_REGEX_H_FUNCS 1
18112 EOF
18113  ;;
18114         (regexp.h)
18115 cat >>confdefs.h <<\EOF
18116 #define HAVE_REGEXP_H_FUNCS 1
18117 EOF
18118  ;;
18119         (regexpr.h)
18120 cat >>confdefs.h <<\EOF
18121 #define HAVE_REGEXPR_H_FUNCS 1
18122 EOF
18123  ;;
18124 esac
18125
18126 for ac_header in \
18127 fcntl.h \
18128 getopt.h \
18129 limits.h \
18130 locale.h \
18131 math.h \
18132 poll.h \
18133 sys/bsdtypes.h \
18134 sys/ioctl.h \
18135 sys/param.h \
18136 sys/poll.h \
18137 sys/select.h \
18138 sys/time.h \
18139 sys/times.h \
18140 ttyent.h \
18141 unistd.h \
18142 wctype.h \
18143
18144 do
18145 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18146 echo "$as_me:18146: checking for $ac_header" >&5
18147 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18149   echo $ECHO_N "(cached) $ECHO_C" >&6
18150 else
18151   cat >conftest.$ac_ext <<_ACEOF
18152 #line 18152 "configure"
18153 #include "confdefs.h"
18154 #include <$ac_header>
18155 _ACEOF
18156 if { (eval echo "$as_me:18156: \"$ac_cpp conftest.$ac_ext\"") >&5
18157   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18158   ac_status=$?
18159   egrep -v '^ *\+' conftest.er1 >conftest.err
18160   rm -f conftest.er1
18161   cat conftest.err >&5
18162   echo "$as_me:18162: \$? = $ac_status" >&5
18163   (exit $ac_status); } >/dev/null; then
18164   if test -s conftest.err; then
18165     ac_cpp_err=$ac_c_preproc_warn_flag
18166   else
18167     ac_cpp_err=
18168   fi
18169 else
18170   ac_cpp_err=yes
18171 fi
18172 if test -z "$ac_cpp_err"; then
18173   eval "$as_ac_Header=yes"
18174 else
18175   echo "$as_me: failed program was:" >&5
18176   cat conftest.$ac_ext >&5
18177   eval "$as_ac_Header=no"
18178 fi
18179 rm -f conftest.err conftest.$ac_ext
18180 fi
18181 echo "$as_me:18181: result: `eval echo '${'$as_ac_Header'}'`" >&5
18182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18183 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18184   cat >>confdefs.h <<EOF
18185 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18186 EOF
18187
18188 fi
18189 done
18190
18191 for ac_header in unistd.h getopt.h
18192 do
18193 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18194 echo "$as_me:18194: checking for $ac_header" >&5
18195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18197   echo $ECHO_N "(cached) $ECHO_C" >&6
18198 else
18199   cat >conftest.$ac_ext <<_ACEOF
18200 #line 18200 "configure"
18201 #include "confdefs.h"
18202 #include <$ac_header>
18203 _ACEOF
18204 if { (eval echo "$as_me:18204: \"$ac_cpp conftest.$ac_ext\"") >&5
18205   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18206   ac_status=$?
18207   egrep -v '^ *\+' conftest.er1 >conftest.err
18208   rm -f conftest.er1
18209   cat conftest.err >&5
18210   echo "$as_me:18210: \$? = $ac_status" >&5
18211   (exit $ac_status); } >/dev/null; then
18212   if test -s conftest.err; then
18213     ac_cpp_err=$ac_c_preproc_warn_flag
18214   else
18215     ac_cpp_err=
18216   fi
18217 else
18218   ac_cpp_err=yes
18219 fi
18220 if test -z "$ac_cpp_err"; then
18221   eval "$as_ac_Header=yes"
18222 else
18223   echo "$as_me: failed program was:" >&5
18224   cat conftest.$ac_ext >&5
18225   eval "$as_ac_Header=no"
18226 fi
18227 rm -f conftest.err conftest.$ac_ext
18228 fi
18229 echo "$as_me:18229: result: `eval echo '${'$as_ac_Header'}'`" >&5
18230 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18231 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18232   cat >>confdefs.h <<EOF
18233 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18234 EOF
18235
18236 fi
18237 done
18238
18239 echo "$as_me:18239: checking for header declaring getopt variables" >&5
18240 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18241 if test "${cf_cv_getopt_header+set}" = set; then
18242   echo $ECHO_N "(cached) $ECHO_C" >&6
18243 else
18244
18245 cf_cv_getopt_header=none
18246 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18247 do
18248 cat >conftest.$ac_ext <<_ACEOF
18249 #line 18249 "configure"
18250 #include "confdefs.h"
18251
18252 #include <$cf_header>
18253 int
18254 main (void)
18255 {
18256 int x = optind; char *y = optarg
18257   ;
18258   return 0;
18259 }
18260 _ACEOF
18261 rm -f conftest.$ac_objext
18262 if { (eval echo "$as_me:18262: \"$ac_compile\"") >&5
18263   (eval $ac_compile) 2>&5
18264   ac_status=$?
18265   echo "$as_me:18265: \$? = $ac_status" >&5
18266   (exit $ac_status); } &&
18267          { ac_try='test -s conftest.$ac_objext'
18268   { (eval echo "$as_me:18268: \"$ac_try\"") >&5
18269   (eval $ac_try) 2>&5
18270   ac_status=$?
18271   echo "$as_me:18271: \$? = $ac_status" >&5
18272   (exit $ac_status); }; }; then
18273   cf_cv_getopt_header=$cf_header
18274  break
18275 else
18276   echo "$as_me: failed program was:" >&5
18277 cat conftest.$ac_ext >&5
18278 fi
18279 rm -f conftest.$ac_objext conftest.$ac_ext
18280 done
18281
18282 fi
18283 echo "$as_me:18283: result: $cf_cv_getopt_header" >&5
18284 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18285 if test $cf_cv_getopt_header != none ; then
18286
18287 cat >>confdefs.h <<\EOF
18288 #define HAVE_GETOPT_HEADER 1
18289 EOF
18290
18291 fi
18292 if test $cf_cv_getopt_header = getopt.h ; then
18293
18294 cat >>confdefs.h <<\EOF
18295 #define NEED_GETOPT_H 1
18296 EOF
18297
18298 fi
18299
18300 echo "$as_me:18300: checking if external environ is declared" >&5
18301 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18302 if test "${cf_cv_dcl_environ+set}" = set; then
18303   echo $ECHO_N "(cached) $ECHO_C" >&6
18304 else
18305
18306     cat >conftest.$ac_ext <<_ACEOF
18307 #line 18307 "configure"
18308 #include "confdefs.h"
18309
18310 #ifdef HAVE_STDLIB_H
18311 #include <stdlib.h>
18312 #endif
18313 #include <unistd.h>
18314 int
18315 main (void)
18316 {
18317 int x = (int) environ
18318   ;
18319   return 0;
18320 }
18321 _ACEOF
18322 rm -f conftest.$ac_objext
18323 if { (eval echo "$as_me:18323: \"$ac_compile\"") >&5
18324   (eval $ac_compile) 2>&5
18325   ac_status=$?
18326   echo "$as_me:18326: \$? = $ac_status" >&5
18327   (exit $ac_status); } &&
18328          { ac_try='test -s conftest.$ac_objext'
18329   { (eval echo "$as_me:18329: \"$ac_try\"") >&5
18330   (eval $ac_try) 2>&5
18331   ac_status=$?
18332   echo "$as_me:18332: \$? = $ac_status" >&5
18333   (exit $ac_status); }; }; then
18334   cf_cv_dcl_environ=yes
18335 else
18336   echo "$as_me: failed program was:" >&5
18337 cat conftest.$ac_ext >&5
18338 cf_cv_dcl_environ=no
18339 fi
18340 rm -f conftest.$ac_objext conftest.$ac_ext
18341
18342 fi
18343 echo "$as_me:18343: result: $cf_cv_dcl_environ" >&5
18344 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18345
18346 if test "$cf_cv_dcl_environ" = no ; then
18347
18348 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18349
18350     cat >>confdefs.h <<EOF
18351 #define $cf_result 1
18352 EOF
18353
18354 fi
18355
18356 # It's possible (for near-UNIX clones) that the data doesn't exist
18357
18358 echo "$as_me:18358: checking if external environ exists" >&5
18359 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18360 if test "${cf_cv_have_environ+set}" = set; then
18361   echo $ECHO_N "(cached) $ECHO_C" >&6
18362 else
18363
18364         cat >conftest.$ac_ext <<_ACEOF
18365 #line 18365 "configure"
18366 #include "confdefs.h"
18367
18368 #undef environ
18369 extern int environ;
18370
18371 int
18372 main (void)
18373 {
18374 environ = 2
18375   ;
18376   return 0;
18377 }
18378 _ACEOF
18379 rm -f conftest.$ac_objext conftest$ac_exeext
18380 if { (eval echo "$as_me:18380: \"$ac_link\"") >&5
18381   (eval $ac_link) 2>&5
18382   ac_status=$?
18383   echo "$as_me:18383: \$? = $ac_status" >&5
18384   (exit $ac_status); } &&
18385          { ac_try='test -s conftest$ac_exeext'
18386   { (eval echo "$as_me:18386: \"$ac_try\"") >&5
18387   (eval $ac_try) 2>&5
18388   ac_status=$?
18389   echo "$as_me:18389: \$? = $ac_status" >&5
18390   (exit $ac_status); }; }; then
18391   cf_cv_have_environ=yes
18392 else
18393   echo "$as_me: failed program was:" >&5
18394 cat conftest.$ac_ext >&5
18395 cf_cv_have_environ=no
18396 fi
18397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18398
18399 fi
18400 echo "$as_me:18400: result: $cf_cv_have_environ" >&5
18401 echo "${ECHO_T}$cf_cv_have_environ" >&6
18402
18403 if test "$cf_cv_have_environ" = yes ; then
18404
18405 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18406
18407         cat >>confdefs.h <<EOF
18408 #define $cf_result 1
18409 EOF
18410
18411 fi
18412
18413 echo "$as_me:18413: checking for getenv" >&5
18414 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18415 if test "${ac_cv_func_getenv+set}" = set; then
18416   echo $ECHO_N "(cached) $ECHO_C" >&6
18417 else
18418   cat >conftest.$ac_ext <<_ACEOF
18419 #line 18419 "configure"
18420 #include "confdefs.h"
18421 #define getenv autoconf_temporary
18422 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18423 #undef getenv
18424
18425 #ifdef __cplusplus
18426 extern "C"
18427 #endif
18428
18429 /* We use char because int might match the return type of a gcc2
18430    builtin and then its argument prototype would still apply.  */
18431 char getenv (void);
18432
18433 int
18434 main (void)
18435 {
18436
18437 /* The GNU C library defines stubs for functions which it implements
18438     to always fail with ENOSYS.  Some functions are actually named
18439     something starting with __ and the normal name is an alias.  */
18440 #if defined (__stub_getenv) || defined (__stub___getenv)
18441 #error found stub for getenv
18442 #endif
18443
18444         return getenv ();
18445   ;
18446   return 0;
18447 }
18448 _ACEOF
18449 rm -f conftest.$ac_objext conftest$ac_exeext
18450 if { (eval echo "$as_me:18450: \"$ac_link\"") >&5
18451   (eval $ac_link) 2>&5
18452   ac_status=$?
18453   echo "$as_me:18453: \$? = $ac_status" >&5
18454   (exit $ac_status); } &&
18455          { ac_try='test -s conftest$ac_exeext'
18456   { (eval echo "$as_me:18456: \"$ac_try\"") >&5
18457   (eval $ac_try) 2>&5
18458   ac_status=$?
18459   echo "$as_me:18459: \$? = $ac_status" >&5
18460   (exit $ac_status); }; }; then
18461   ac_cv_func_getenv=yes
18462 else
18463   echo "$as_me: failed program was:" >&5
18464 cat conftest.$ac_ext >&5
18465 ac_cv_func_getenv=no
18466 fi
18467 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18468 fi
18469 echo "$as_me:18469: result: $ac_cv_func_getenv" >&5
18470 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18471
18472 for ac_func in putenv setenv strdup
18473 do
18474 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18475 echo "$as_me:18475: checking for $ac_func" >&5
18476 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18477 if eval "test \"\${$as_ac_var+set}\" = set"; then
18478   echo $ECHO_N "(cached) $ECHO_C" >&6
18479 else
18480   cat >conftest.$ac_ext <<_ACEOF
18481 #line 18481 "configure"
18482 #include "confdefs.h"
18483 #define $ac_func autoconf_temporary
18484 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18485 #undef $ac_func
18486
18487 #ifdef __cplusplus
18488 extern "C"
18489 #endif
18490
18491 /* We use char because int might match the return type of a gcc2
18492    builtin and then its argument prototype would still apply.  */
18493 char $ac_func (void);
18494
18495 int
18496 main (void)
18497 {
18498
18499 /* The GNU C library defines stubs for functions which it implements
18500     to always fail with ENOSYS.  Some functions are actually named
18501     something starting with __ and the normal name is an alias.  */
18502 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18503 #error found stub for $ac_func
18504 #endif
18505
18506         return $ac_func ();
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 rm -f conftest.$ac_objext conftest$ac_exeext
18512 if { (eval echo "$as_me:18512: \"$ac_link\"") >&5
18513   (eval $ac_link) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); } &&
18517          { ac_try='test -s conftest$ac_exeext'
18518   { (eval echo "$as_me:18518: \"$ac_try\"") >&5
18519   (eval $ac_try) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); }; }; then
18523   eval "$as_ac_var=yes"
18524 else
18525   echo "$as_me: failed program was:" >&5
18526 cat conftest.$ac_ext >&5
18527 eval "$as_ac_var=no"
18528 fi
18529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18530 fi
18531 echo "$as_me:18531: result: `eval echo '${'$as_ac_var'}'`" >&5
18532 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18533 if test `eval echo '${'$as_ac_var'}'` = yes; then
18534   cat >>confdefs.h <<EOF
18535 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18536 EOF
18537
18538 fi
18539 done
18540
18541 echo "$as_me:18541: checking if getenv returns consistent values" >&5
18542 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18543 if test "${cf_cv_consistent_getenv+set}" = set; then
18544   echo $ECHO_N "(cached) $ECHO_C" >&6
18545 else
18546
18547 if test "$cross_compiling" = yes; then
18548   cf_cv_consistent_getenv=unknown
18549 else
18550   cat >conftest.$ac_ext <<_ACEOF
18551 #line 18551 "configure"
18552 #include "confdefs.h"
18553
18554 #include <stdlib.h>
18555 #include <unistd.h>
18556 #include <stdio.h>
18557 #include <string.h>
18558 #include <sys/types.h>
18559
18560 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18561 extern char **environ;  /* POSIX, but some systems are not... */
18562 #endif
18563
18564 #if defined(HAVE_STRDUP)
18565 #define str_alloc(s) strdup(s)
18566 #else
18567 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18568 #endif
18569
18570 static void set_value(const char *name, const char *value)
18571 {
18572 #if defined(HAVE_SETENV)
18573         setenv(name, value, 1);
18574 #elif defined(HAVE_PUTENV)
18575         char buffer[1024];
18576         sprintf(buffer, "%s=%s", name, value);
18577         putenv(str_alloc(buffer));
18578 #else
18579 #error neither putenv/setenv found
18580 #endif
18581 }
18582 int main(void)
18583 {
18584         int pass;
18585         size_t numenv, limit, j;
18586         char **mynames;
18587         char **myvalues;
18588         char **mypointer;
18589         char *equals;
18590         for (numenv = 0; environ[numenv]; ++numenv) ;
18591         limit = numenv + 10;
18592         mynames = (char **) calloc(limit + 1, sizeof(char *));
18593         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18594         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18595 #if defined(HAVE_ENVIRON)
18596         for (j = 0; environ[j]; ++j) {
18597                 mynames[j] = str_alloc(environ[j]);
18598                 equals = strchr(mynames[j], '=');
18599                 if (equals != 0) {
18600                         *equals++ = '\0';
18601                         myvalues[j] = str_alloc(equals);
18602                 } else {
18603                         myvalues[j] = str_alloc("");
18604                 }
18605         }
18606 #endif
18607         for (j = numenv; j < limit; ++j) {
18608                 char name[80];
18609                 char value[80];
18610                 size_t found;
18611                 size_t k = 0;
18612                 do {
18613                         size_t jk;
18614                         found = 0;
18615                         sprintf(name, "TERM%lu", (unsigned long) k);
18616                         for (jk = 0; jk < j; ++jk) {
18617                                 if (!strcmp(name, mynames[jk])) {
18618                                         found = 1;
18619                                         ++k;
18620                                         break;
18621                                 }
18622                         }
18623                 } while (found);
18624                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18625                 set_value(name, value);
18626                 mynames[j] = str_alloc(name);
18627                 myvalues[j] = str_alloc(value);
18628         }
18629         for (pass = 0; pass < 3; ++pass) {
18630                 for (j = 0; j < limit; ++j) {
18631                         char *value = getenv(mynames[j]);
18632                         if (pass) {
18633                                 if (value == 0) {
18634                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18635                                         ${cf_cv_main_return:-return}(1);
18636                                 } else if (value != mypointer[j]) {
18637                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18638                                         ${cf_cv_main_return:-return}(1);
18639                                 } else if (strcmp(value, myvalues[j])) {
18640                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18641                                         ${cf_cv_main_return:-return}(1);
18642                                 }
18643                         } else {
18644                                 size_t k;
18645                                 mypointer[j] = value;
18646                                 for (k = 0; k < j; ++k) {
18647                                         if (mypointer[j] == mypointer[k]) {
18648                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18649                                                 ${cf_cv_main_return:-return}(1);
18650                                         }
18651                                 }
18652                         }
18653                 }
18654         }
18655         ${cf_cv_main_return:-return}(0);
18656 }
18657
18658 _ACEOF
18659 rm -f conftest$ac_exeext
18660 if { (eval echo "$as_me:18660: \"$ac_link\"") >&5
18661   (eval $ac_link) 2>&5
18662   ac_status=$?
18663   echo "$as_me:18663: \$? = $ac_status" >&5
18664   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18665   { (eval echo "$as_me:18665: \"$ac_try\"") >&5
18666   (eval $ac_try) 2>&5
18667   ac_status=$?
18668   echo "$as_me:18668: \$? = $ac_status" >&5
18669   (exit $ac_status); }; }; then
18670   cf_cv_consistent_getenv=yes
18671 else
18672   echo "$as_me: program exited with status $ac_status" >&5
18673 echo "$as_me: failed program was:" >&5
18674 cat conftest.$ac_ext >&5
18675 cf_cv_consistent_getenv=no
18676 fi
18677 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18678 fi
18679
18680 fi
18681 echo "$as_me:18681: result: $cf_cv_consistent_getenv" >&5
18682 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18683
18684 if test "x$cf_cv_consistent_getenv" = xno
18685 then
18686
18687 cat >>confdefs.h <<\EOF
18688 #define HAVE_CONSISTENT_GETENV 1
18689 EOF
18690
18691 fi
18692
18693 if test "x$cf_cv_consistent_getenv" = xno && \
18694         test "x$cf_with_trace" = xyes
18695 then
18696         { echo "$as_me:18696: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18697 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18698 fi
18699
18700 # check for ISC (this may also define _POSIX_SOURCE)
18701 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18702 if test "x$ISC" = xyes ; then
18703
18704 echo "$as_me:18704: checking for main in -lcposix" >&5
18705 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18706 if test "${ac_cv_lib_cposix_main+set}" = set; then
18707   echo $ECHO_N "(cached) $ECHO_C" >&6
18708 else
18709   ac_check_lib_save_LIBS=$LIBS
18710 LIBS="-lcposix  $LIBS"
18711 cat >conftest.$ac_ext <<_ACEOF
18712 #line 18712 "configure"
18713 #include "confdefs.h"
18714
18715 int
18716 main (void)
18717 {
18718 main ();
18719   ;
18720   return 0;
18721 }
18722 _ACEOF
18723 rm -f conftest.$ac_objext conftest$ac_exeext
18724 if { (eval echo "$as_me:18724: \"$ac_link\"") >&5
18725   (eval $ac_link) 2>&5
18726   ac_status=$?
18727   echo "$as_me:18727: \$? = $ac_status" >&5
18728   (exit $ac_status); } &&
18729          { ac_try='test -s conftest$ac_exeext'
18730   { (eval echo "$as_me:18730: \"$ac_try\"") >&5
18731   (eval $ac_try) 2>&5
18732   ac_status=$?
18733   echo "$as_me:18733: \$? = $ac_status" >&5
18734   (exit $ac_status); }; }; then
18735   ac_cv_lib_cposix_main=yes
18736 else
18737   echo "$as_me: failed program was:" >&5
18738 cat conftest.$ac_ext >&5
18739 ac_cv_lib_cposix_main=no
18740 fi
18741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18742 LIBS=$ac_check_lib_save_LIBS
18743 fi
18744 echo "$as_me:18744: result: $ac_cv_lib_cposix_main" >&5
18745 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18746 if test $ac_cv_lib_cposix_main = yes; then
18747   cat >>confdefs.h <<EOF
18748 #define HAVE_LIBCPOSIX 1
18749 EOF
18750
18751   LIBS="-lcposix $LIBS"
18752
18753 fi
18754
18755         echo "$as_me:18755: checking for bzero in -linet" >&5
18756 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18757 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18758   echo $ECHO_N "(cached) $ECHO_C" >&6
18759 else
18760   ac_check_lib_save_LIBS=$LIBS
18761 LIBS="-linet  $LIBS"
18762 cat >conftest.$ac_ext <<_ACEOF
18763 #line 18763 "configure"
18764 #include "confdefs.h"
18765
18766 /* Override any gcc2 internal prototype to avoid an error.  */
18767 #ifdef __cplusplus
18768 extern "C"
18769 #endif
18770 /* We use char because int might match the return type of a gcc2
18771    builtin and then its argument prototype would still apply.  */
18772 char bzero ();
18773 int
18774 main (void)
18775 {
18776 bzero ();
18777   ;
18778   return 0;
18779 }
18780 _ACEOF
18781 rm -f conftest.$ac_objext conftest$ac_exeext
18782 if { (eval echo "$as_me:18782: \"$ac_link\"") >&5
18783   (eval $ac_link) 2>&5
18784   ac_status=$?
18785   echo "$as_me:18785: \$? = $ac_status" >&5
18786   (exit $ac_status); } &&
18787          { ac_try='test -s conftest$ac_exeext'
18788   { (eval echo "$as_me:18788: \"$ac_try\"") >&5
18789   (eval $ac_try) 2>&5
18790   ac_status=$?
18791   echo "$as_me:18791: \$? = $ac_status" >&5
18792   (exit $ac_status); }; }; then
18793   ac_cv_lib_inet_bzero=yes
18794 else
18795   echo "$as_me: failed program was:" >&5
18796 cat conftest.$ac_ext >&5
18797 ac_cv_lib_inet_bzero=no
18798 fi
18799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18800 LIBS=$ac_check_lib_save_LIBS
18801 fi
18802 echo "$as_me:18802: result: $ac_cv_lib_inet_bzero" >&5
18803 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18804 if test $ac_cv_lib_inet_bzero = yes; then
18805
18806 cf_add_libs="$LIBS"
18807 # reverse order
18808 cf_add_0lib=
18809 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18810 # filter duplicates
18811 for cf_add_1lib in $cf_add_0lib; do
18812         for cf_add_2lib in $cf_add_libs; do
18813                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18814                         cf_add_1lib=
18815                         break
18816                 fi
18817         done
18818         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18819 done
18820 LIBS="$cf_add_libs"
18821
18822 fi
18823 fi
18824
18825 echo "$as_me:18825: checking if sys/time.h works with sys/select.h" >&5
18826 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18827 if test "${cf_cv_sys_time_select+set}" = set; then
18828   echo $ECHO_N "(cached) $ECHO_C" >&6
18829 else
18830
18831 cat >conftest.$ac_ext <<_ACEOF
18832 #line 18832 "configure"
18833 #include "confdefs.h"
18834
18835 #include <sys/types.h>
18836 #ifdef HAVE_SYS_TIME_H
18837 #include <sys/time.h>
18838 #endif
18839 #ifdef HAVE_SYS_SELECT_H
18840 #include <sys/select.h>
18841 #endif
18842
18843 int
18844 main (void)
18845 {
18846
18847   ;
18848   return 0;
18849 }
18850 _ACEOF
18851 rm -f conftest.$ac_objext
18852 if { (eval echo "$as_me:18852: \"$ac_compile\"") >&5
18853   (eval $ac_compile) 2>&5
18854   ac_status=$?
18855   echo "$as_me:18855: \$? = $ac_status" >&5
18856   (exit $ac_status); } &&
18857          { ac_try='test -s conftest.$ac_objext'
18858   { (eval echo "$as_me:18858: \"$ac_try\"") >&5
18859   (eval $ac_try) 2>&5
18860   ac_status=$?
18861   echo "$as_me:18861: \$? = $ac_status" >&5
18862   (exit $ac_status); }; }; then
18863   cf_cv_sys_time_select=yes
18864 else
18865   echo "$as_me: failed program was:" >&5
18866 cat conftest.$ac_ext >&5
18867 cf_cv_sys_time_select=no
18868 fi
18869 rm -f conftest.$ac_objext conftest.$ac_ext
18870
18871 fi
18872
18873 echo "$as_me:18873: result: $cf_cv_sys_time_select" >&5
18874 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18875 test "$cf_cv_sys_time_select" = yes &&
18876 cat >>confdefs.h <<\EOF
18877 #define HAVE_SYS_TIME_SELECT 1
18878 EOF
18879
18880 ###     checks for compiler characteristics
18881 ac_ext=c
18882 ac_cpp='$CPP $CPPFLAGS'
18883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18886 ac_main_return=return
18887
18888 echo "$as_me:18888: checking for an ANSI C-conforming const" >&5
18889 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18890 if test "${ac_cv_c_const+set}" = set; then
18891   echo $ECHO_N "(cached) $ECHO_C" >&6
18892 else
18893   cat >conftest.$ac_ext <<_ACEOF
18894 #line 18894 "configure"
18895 #include "confdefs.h"
18896
18897 int
18898 main (void)
18899 {
18900 /* FIXME: Include the comments suggested by Paul. */
18901 #ifndef __cplusplus
18902   /* Ultrix mips cc rejects this.  */
18903   typedef int charset[2];
18904   const charset x;
18905   /* SunOS 4.1.1 cc rejects this.  */
18906   char const *const *ccp;
18907   char **p;
18908   /* NEC SVR4.0.2 mips cc rejects this.  */
18909   struct point {int x, y;};
18910   static struct point const zero = {0,0};
18911   /* AIX XL C 1.02.0.0 rejects this.
18912      It does not let you subtract one const X* pointer from another in
18913      an arm of an if-expression whose if-part is not a constant
18914      expression */
18915   const char *g = "string";
18916   ccp = &g + (g ? g-g : 0);
18917   /* HPUX 7.0 cc rejects these. */
18918   ++ccp;
18919   p = (char**) ccp;
18920   ccp = (char const *const *) p;
18921   { /* SCO 3.2v4 cc rejects this.  */
18922     char *t;
18923     char const *s = 0 ? (char *) 0 : (char const *) 0;
18924
18925     *t++ = 0;
18926   }
18927   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18928     int x[] = {25, 17};
18929     const int *foo = &x[0];
18930     ++foo;
18931   }
18932   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18933     typedef const int *iptr;
18934     iptr p = 0;
18935     ++p;
18936   }
18937   { /* AIX XL C 1.02.0.0 rejects this saying
18938        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18939     struct s { int j; const int *ap[3]; };
18940     struct s *b; b->j = 5;
18941   }
18942   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18943     const int foo = 10;
18944   }
18945 #endif
18946
18947   ;
18948   return 0;
18949 }
18950 _ACEOF
18951 rm -f conftest.$ac_objext
18952 if { (eval echo "$as_me:18952: \"$ac_compile\"") >&5
18953   (eval $ac_compile) 2>&5
18954   ac_status=$?
18955   echo "$as_me:18955: \$? = $ac_status" >&5
18956   (exit $ac_status); } &&
18957          { ac_try='test -s conftest.$ac_objext'
18958   { (eval echo "$as_me:18958: \"$ac_try\"") >&5
18959   (eval $ac_try) 2>&5
18960   ac_status=$?
18961   echo "$as_me:18961: \$? = $ac_status" >&5
18962   (exit $ac_status); }; }; then
18963   ac_cv_c_const=yes
18964 else
18965   echo "$as_me: failed program was:" >&5
18966 cat conftest.$ac_ext >&5
18967 ac_cv_c_const=no
18968 fi
18969 rm -f conftest.$ac_objext conftest.$ac_ext
18970 fi
18971 echo "$as_me:18971: result: $ac_cv_c_const" >&5
18972 echo "${ECHO_T}$ac_cv_c_const" >&6
18973 if test $ac_cv_c_const = no; then
18974
18975 cat >>confdefs.h <<\EOF
18976 #define const
18977 EOF
18978
18979 fi
18980
18981 echo "$as_me:18981: checking for inline" >&5
18982 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18983 if test "${ac_cv_c_inline+set}" = set; then
18984   echo $ECHO_N "(cached) $ECHO_C" >&6
18985 else
18986   ac_cv_c_inline=no
18987 for ac_kw in inline __inline__ __inline; do
18988   cat >conftest.$ac_ext <<_ACEOF
18989 #line 18989 "configure"
18990 #include "confdefs.h"
18991 #ifndef __cplusplus
18992 static $ac_kw int static_foo () {return 0; }
18993 $ac_kw int foo () {return 0; }
18994 #endif
18995
18996 _ACEOF
18997 rm -f conftest.$ac_objext
18998 if { (eval echo "$as_me:18998: \"$ac_compile\"") >&5
18999   (eval $ac_compile) 2>&5
19000   ac_status=$?
19001   echo "$as_me:19001: \$? = $ac_status" >&5
19002   (exit $ac_status); } &&
19003          { ac_try='test -s conftest.$ac_objext'
19004   { (eval echo "$as_me:19004: \"$ac_try\"") >&5
19005   (eval $ac_try) 2>&5
19006   ac_status=$?
19007   echo "$as_me:19007: \$? = $ac_status" >&5
19008   (exit $ac_status); }; }; then
19009   ac_cv_c_inline=$ac_kw; break
19010 else
19011   echo "$as_me: failed program was:" >&5
19012 cat conftest.$ac_ext >&5
19013 fi
19014 rm -f conftest.$ac_objext conftest.$ac_ext
19015 done
19016
19017 fi
19018 echo "$as_me:19018: result: $ac_cv_c_inline" >&5
19019 echo "${ECHO_T}$ac_cv_c_inline" >&6
19020 case $ac_cv_c_inline in
19021   inline | yes) ;;
19022   no)
19023 cat >>confdefs.h <<\EOF
19024 #define inline
19025 EOF
19026  ;;
19027   *)  cat >>confdefs.h <<EOF
19028 #define inline $ac_cv_c_inline
19029 EOF
19030  ;;
19031 esac
19032
19033 NCURSES_INLINE=
19034 if test "$ac_cv_c_inline" != no ; then
19035         NCURSES_INLINE=inline
19036         if test "$INTEL_COMPILER" = yes
19037         then
19038                 :
19039         elif test "$CLANG_COMPILER" = yes
19040         then
19041                 :
19042         elif test "$GCC" = yes
19043         then
19044                 echo "$as_me:19044: checking if $CC supports options to tune inlining" >&5
19045 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19046 if test "${cf_cv_gcc_inline+set}" = set; then
19047   echo $ECHO_N "(cached) $ECHO_C" >&6
19048 else
19049
19050                 cf_save_CFLAGS=$CFLAGS
19051                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19052                 cat >conftest.$ac_ext <<_ACEOF
19053 #line 19053 "configure"
19054 #include "confdefs.h"
19055 inline int foo(void) { return 1; }
19056 int
19057 main (void)
19058 {
19059 ${cf_cv_main_return:-return} foo()
19060   ;
19061   return 0;
19062 }
19063 _ACEOF
19064 rm -f conftest.$ac_objext
19065 if { (eval echo "$as_me:19065: \"$ac_compile\"") >&5
19066   (eval $ac_compile) 2>&5
19067   ac_status=$?
19068   echo "$as_me:19068: \$? = $ac_status" >&5
19069   (exit $ac_status); } &&
19070          { ac_try='test -s conftest.$ac_objext'
19071   { (eval echo "$as_me:19071: \"$ac_try\"") >&5
19072   (eval $ac_try) 2>&5
19073   ac_status=$?
19074   echo "$as_me:19074: \$? = $ac_status" >&5
19075   (exit $ac_status); }; }; then
19076   cf_cv_gcc_inline=yes
19077 else
19078   echo "$as_me: failed program was:" >&5
19079 cat conftest.$ac_ext >&5
19080 cf_cv_gcc_inline=no
19081 fi
19082 rm -f conftest.$ac_objext conftest.$ac_ext
19083                 CFLAGS=$cf_save_CFLAGS
19084
19085 fi
19086 echo "$as_me:19086: result: $cf_cv_gcc_inline" >&5
19087 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19088                 if test "$cf_cv_gcc_inline" = yes ; then
19089
19090 cf_fix_cppflags=no
19091 cf_new_cflags=
19092 cf_new_cppflags=
19093 cf_new_extra_cppflags=
19094
19095 for cf_add_cflags in --param max-inline-insns-single=1200
19096 do
19097 case $cf_fix_cppflags in
19098 (no)
19099         case $cf_add_cflags in
19100         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19101                 case $cf_add_cflags in
19102                 (-D*)
19103                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19104
19105                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19106                                 && test -z "${cf_tst_cflags}" \
19107                                 && cf_fix_cppflags=yes
19108
19109                         if test $cf_fix_cppflags = yes ; then
19110
19111         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19112         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19113
19114                                 continue
19115                         elif test "${cf_tst_cflags}" = "\"'" ; then
19116
19117         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19118         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19119
19120                                 continue
19121                         fi
19122                         ;;
19123                 esac
19124                 case "$CPPFLAGS" in
19125                 (*$cf_add_cflags)
19126                         ;;
19127                 (*)
19128                         case $cf_add_cflags in
19129                         (-D*)
19130                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19131
19132 CPPFLAGS=`echo "$CPPFLAGS" | \
19133         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19134                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19135
19136                                 ;;
19137                         esac
19138
19139         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19140         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19141
19142                         ;;
19143                 esac
19144                 ;;
19145         (*)
19146
19147         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19148         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19149
19150                 ;;
19151         esac
19152         ;;
19153 (yes)
19154
19155         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19156         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19157
19158         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19159
19160         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19161                 && test -z "${cf_tst_cflags}" \
19162                 && cf_fix_cppflags=no
19163         ;;
19164 esac
19165 done
19166
19167 if test -n "$cf_new_cflags" ; then
19168
19169         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19170         CFLAGS="${CFLAGS}$cf_new_cflags"
19171
19172 fi
19173
19174 if test -n "$cf_new_cppflags" ; then
19175
19176         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19177         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19178
19179 fi
19180
19181 if test -n "$cf_new_extra_cppflags" ; then
19182
19183         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19184         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19185
19186 fi
19187
19188                 fi
19189         fi
19190 fi
19191
19192 echo "$as_me:19192: checking for signal global datatype" >&5
19193 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19194 if test "${cf_cv_sig_atomic_t+set}" = set; then
19195   echo $ECHO_N "(cached) $ECHO_C" >&6
19196 else
19197
19198         for cf_type in \
19199                 "volatile sig_atomic_t" \
19200                 "sig_atomic_t" \
19201                 "int"
19202         do
19203         cat >conftest.$ac_ext <<_ACEOF
19204 #line 19204 "configure"
19205 #include "confdefs.h"
19206
19207 #include <sys/types.h>
19208 #include <signal.h>
19209 #include <stdio.h>
19210
19211 extern $cf_type x;
19212 $cf_type x;
19213 static void handler(int sig)
19214 {
19215         x = 5;
19216 }
19217 int
19218 main (void)
19219 {
19220 signal(SIGINT, handler);
19221                  x = 1
19222   ;
19223   return 0;
19224 }
19225 _ACEOF
19226 rm -f conftest.$ac_objext
19227 if { (eval echo "$as_me:19227: \"$ac_compile\"") >&5
19228   (eval $ac_compile) 2>&5
19229   ac_status=$?
19230   echo "$as_me:19230: \$? = $ac_status" >&5
19231   (exit $ac_status); } &&
19232          { ac_try='test -s conftest.$ac_objext'
19233   { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234   (eval $ac_try) 2>&5
19235   ac_status=$?
19236   echo "$as_me:19236: \$? = $ac_status" >&5
19237   (exit $ac_status); }; }; then
19238   cf_cv_sig_atomic_t=$cf_type
19239 else
19240   echo "$as_me: failed program was:" >&5
19241 cat conftest.$ac_ext >&5
19242 cf_cv_sig_atomic_t=no
19243 fi
19244 rm -f conftest.$ac_objext conftest.$ac_ext
19245                 test "$cf_cv_sig_atomic_t" != no && break
19246         done
19247
19248 fi
19249
19250 echo "$as_me:19250: result: $cf_cv_sig_atomic_t" >&5
19251 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19252 test "$cf_cv_sig_atomic_t" != no &&
19253 cat >>confdefs.h <<EOF
19254 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19255 EOF
19256
19257 if test $NCURSES_CHTYPE = auto ; then
19258
19259 echo "$as_me:19259: checking for type of chtype" >&5
19260 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19261 if test "${cf_cv_typeof_chtype+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 else
19264
19265                 if test "$cross_compiling" = yes; then
19266   cf_cv_typeof_chtype=long
19267 else
19268   cat >conftest.$ac_ext <<_ACEOF
19269 #line 19269 "configure"
19270 #include "confdefs.h"
19271
19272 #define WANT_BITS 31
19273 #include <stdio.h>
19274 int main(void)
19275 {
19276         FILE *fp = fopen("cf_test.out", "w");
19277         if (fp != 0) {
19278                 char *result = "long";
19279                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19280                         int n;
19281                         unsigned int x, y;
19282                         for (n = 0; n < WANT_BITS; n++) {
19283                                 x = (1 << n);
19284                                 y = (x >> n);
19285                                 if (y != 1 || x == 0) {
19286                                         x = 0;
19287                                         break;
19288                                 }
19289                         }
19290                         /*
19291                          * If x is nonzero, an int is big enough for the bits
19292                          * that we want.
19293                          */
19294                         result = (x != 0) ? "int" : "long";
19295                 }
19296                 fputs(result, fp);
19297                 fclose(fp);
19298         }
19299         ${cf_cv_main_return:-return}(0);
19300 }
19301
19302 _ACEOF
19303 rm -f conftest$ac_exeext
19304 if { (eval echo "$as_me:19304: \"$ac_link\"") >&5
19305   (eval $ac_link) 2>&5
19306   ac_status=$?
19307   echo "$as_me:19307: \$? = $ac_status" >&5
19308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19309   { (eval echo "$as_me:19309: \"$ac_try\"") >&5
19310   (eval $ac_try) 2>&5
19311   ac_status=$?
19312   echo "$as_me:19312: \$? = $ac_status" >&5
19313   (exit $ac_status); }; }; then
19314   cf_cv_typeof_chtype=`cat cf_test.out`
19315 else
19316   echo "$as_me: program exited with status $ac_status" >&5
19317 echo "$as_me: failed program was:" >&5
19318 cat conftest.$ac_ext >&5
19319 cf_cv_typeof_chtype=long
19320 fi
19321 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19322 fi
19323                 rm -f cf_test.out
19324
19325 fi
19326
19327 echo "$as_me:19327: result: $cf_cv_typeof_chtype" >&5
19328 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19329
19330 cat >>confdefs.h <<EOF
19331 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19332 EOF
19333
19334 else
19335         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19336 fi
19337 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19338
19339 echo "$as_me:19339: checking if unsigned literals are legal" >&5
19340 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19341 if test "${cf_cv_unsigned_literals+set}" = set; then
19342   echo $ECHO_N "(cached) $ECHO_C" >&6
19343 else
19344
19345         cat >conftest.$ac_ext <<_ACEOF
19346 #line 19346 "configure"
19347 #include "confdefs.h"
19348
19349 int
19350 main (void)
19351 {
19352 long x = 1L + 1UL + 1U + 1
19353   ;
19354   return 0;
19355 }
19356 _ACEOF
19357 rm -f conftest.$ac_objext
19358 if { (eval echo "$as_me:19358: \"$ac_compile\"") >&5
19359   (eval $ac_compile) 2>&5
19360   ac_status=$?
19361   echo "$as_me:19361: \$? = $ac_status" >&5
19362   (exit $ac_status); } &&
19363          { ac_try='test -s conftest.$ac_objext'
19364   { (eval echo "$as_me:19364: \"$ac_try\"") >&5
19365   (eval $ac_try) 2>&5
19366   ac_status=$?
19367   echo "$as_me:19367: \$? = $ac_status" >&5
19368   (exit $ac_status); }; }; then
19369   cf_cv_unsigned_literals=yes
19370 else
19371   echo "$as_me: failed program was:" >&5
19372 cat conftest.$ac_ext >&5
19373 cf_cv_unsigned_literals=no
19374 fi
19375 rm -f conftest.$ac_objext conftest.$ac_ext
19376
19377 fi
19378
19379 echo "$as_me:19379: result: $cf_cv_unsigned_literals" >&5
19380 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19381
19382 cf_cv_1UL="1"
19383 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19384 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19385
19386 if test $NCURSES_MMASK_T = auto ; then
19387         cf_cv_typeof_mmask_t=long
19388 else
19389         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19390 fi
19391 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19392
19393 ###     Checks for external-data
19394
19395 echo "$as_me:19395: checking if external errno is declared" >&5
19396 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19397 if test "${cf_cv_dcl_errno+set}" = set; then
19398   echo $ECHO_N "(cached) $ECHO_C" >&6
19399 else
19400
19401         cat >conftest.$ac_ext <<_ACEOF
19402 #line 19402 "configure"
19403 #include "confdefs.h"
19404
19405 #ifdef HAVE_STDLIB_H
19406 #include <stdlib.h>
19407 #endif
19408 #include <stdio.h>
19409 #include <sys/types.h>
19410 #include <errno.h>
19411 int
19412 main (void)
19413 {
19414 int x = (int) errno
19415   ;
19416   return 0;
19417 }
19418 _ACEOF
19419 rm -f conftest.$ac_objext
19420 if { (eval echo "$as_me:19420: \"$ac_compile\"") >&5
19421   (eval $ac_compile) 2>&5
19422   ac_status=$?
19423   echo "$as_me:19423: \$? = $ac_status" >&5
19424   (exit $ac_status); } &&
19425          { ac_try='test -s conftest.$ac_objext'
19426   { (eval echo "$as_me:19426: \"$ac_try\"") >&5
19427   (eval $ac_try) 2>&5
19428   ac_status=$?
19429   echo "$as_me:19429: \$? = $ac_status" >&5
19430   (exit $ac_status); }; }; then
19431   cf_cv_dcl_errno=yes
19432 else
19433   echo "$as_me: failed program was:" >&5
19434 cat conftest.$ac_ext >&5
19435 cf_cv_dcl_errno=no
19436 fi
19437 rm -f conftest.$ac_objext conftest.$ac_ext
19438
19439 fi
19440 echo "$as_me:19440: result: $cf_cv_dcl_errno" >&5
19441 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19442
19443 if test "$cf_cv_dcl_errno" = no ; then
19444
19445 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19446
19447         cat >>confdefs.h <<EOF
19448 #define $cf_result 1
19449 EOF
19450
19451 fi
19452
19453 # It's possible (for near-UNIX clones) that the data doesn't exist
19454
19455 echo "$as_me:19455: checking if external errno exists" >&5
19456 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19457 if test "${cf_cv_have_errno+set}" = set; then
19458   echo $ECHO_N "(cached) $ECHO_C" >&6
19459 else
19460
19461         cat >conftest.$ac_ext <<_ACEOF
19462 #line 19462 "configure"
19463 #include "confdefs.h"
19464
19465 #undef errno
19466 extern int errno;
19467
19468 int
19469 main (void)
19470 {
19471 errno = 2
19472   ;
19473   return 0;
19474 }
19475 _ACEOF
19476 rm -f conftest.$ac_objext conftest$ac_exeext
19477 if { (eval echo "$as_me:19477: \"$ac_link\"") >&5
19478   (eval $ac_link) 2>&5
19479   ac_status=$?
19480   echo "$as_me:19480: \$? = $ac_status" >&5
19481   (exit $ac_status); } &&
19482          { ac_try='test -s conftest$ac_exeext'
19483   { (eval echo "$as_me:19483: \"$ac_try\"") >&5
19484   (eval $ac_try) 2>&5
19485   ac_status=$?
19486   echo "$as_me:19486: \$? = $ac_status" >&5
19487   (exit $ac_status); }; }; then
19488   cf_cv_have_errno=yes
19489 else
19490   echo "$as_me: failed program was:" >&5
19491 cat conftest.$ac_ext >&5
19492 cf_cv_have_errno=no
19493 fi
19494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19495
19496 fi
19497 echo "$as_me:19497: result: $cf_cv_have_errno" >&5
19498 echo "${ECHO_T}$cf_cv_have_errno" >&6
19499
19500 if test "$cf_cv_have_errno" = yes ; then
19501
19502 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19503
19504         cat >>confdefs.h <<EOF
19505 #define $cf_result 1
19506 EOF
19507
19508 fi
19509
19510 echo "$as_me:19510: checking if data-only library module links" >&5
19511 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19512 if test "${cf_cv_link_dataonly+set}" = set; then
19513   echo $ECHO_N "(cached) $ECHO_C" >&6
19514 else
19515
19516         rm -f conftest.a
19517         cat >conftest.$ac_ext <<EOF
19518 #line 19518 "configure"
19519 int     testdata[3] = { 123, 456, 789 };
19520 EOF
19521         if { (eval echo "$as_me:19521: \"$ac_compile\"") >&5
19522   (eval $ac_compile) 2>&5
19523   ac_status=$?
19524   echo "$as_me:19524: \$? = $ac_status" >&5
19525   (exit $ac_status); } ; then
19526                 mv conftest.o data.o && \
19527                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19528         fi
19529         rm -f conftest.$ac_ext data.o
19530         cat >conftest.$ac_ext <<EOF
19531 #line 19531 "configure"
19532 int     testfunc(void)
19533 {
19534 #if defined(NeXT)
19535         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19536 #else
19537         extern int testdata[3];
19538         return testdata[0] == 123
19539            &&  testdata[1] == 456
19540            &&  testdata[2] == 789;
19541 #endif
19542 }
19543 EOF
19544         if { (eval echo "$as_me:19544: \"$ac_compile\"") >&5
19545   (eval $ac_compile) 2>&5
19546   ac_status=$?
19547   echo "$as_me:19547: \$? = $ac_status" >&5
19548   (exit $ac_status); }; then
19549                 mv conftest.o func.o && \
19550                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19551         fi
19552         rm -f conftest.$ac_ext func.o
19553         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19554         cf_saveLIBS="$LIBS"
19555         LIBS="conftest.a $LIBS"
19556         if test "$cross_compiling" = yes; then
19557   cf_cv_link_dataonly=unknown
19558 else
19559   cat >conftest.$ac_ext <<_ACEOF
19560 #line 19560 "configure"
19561 #include "confdefs.h"
19562
19563         int main(void)
19564         {
19565                 extern int testfunc();
19566                 ${cf_cv_main_return:-return} (!testfunc());
19567         }
19568
19569 _ACEOF
19570 rm -f conftest$ac_exeext
19571 if { (eval echo "$as_me:19571: \"$ac_link\"") >&5
19572   (eval $ac_link) 2>&5
19573   ac_status=$?
19574   echo "$as_me:19574: \$? = $ac_status" >&5
19575   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19576   { (eval echo "$as_me:19576: \"$ac_try\"") >&5
19577   (eval $ac_try) 2>&5
19578   ac_status=$?
19579   echo "$as_me:19579: \$? = $ac_status" >&5
19580   (exit $ac_status); }; }; then
19581   cf_cv_link_dataonly=yes
19582 else
19583   echo "$as_me: program exited with status $ac_status" >&5
19584 echo "$as_me: failed program was:" >&5
19585 cat conftest.$ac_ext >&5
19586 cf_cv_link_dataonly=no
19587 fi
19588 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19589 fi
19590         LIBS="$cf_saveLIBS"
19591
19592 fi
19593
19594 echo "$as_me:19594: result: $cf_cv_link_dataonly" >&5
19595 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19596
19597 if test "$cf_cv_link_dataonly" = no ; then
19598
19599 cat >>confdefs.h <<\EOF
19600 #define BROKEN_LINKER 1
19601 EOF
19602
19603         BROKEN_LINKER=1
19604 fi
19605
19606 ###     Checks for library functions.
19607
19608 for ac_func in \
19609 getcwd \
19610 getegid \
19611 geteuid \
19612 getopt \
19613 getttynam \
19614 issetugid \
19615 localeconv \
19616 poll \
19617 putenv \
19618 remove \
19619 select \
19620 setbuf \
19621 setbuffer \
19622 setenv \
19623 setvbuf \
19624 sigaction \
19625 sigvec \
19626 strdup \
19627 strstr \
19628 sysconf \
19629 tcgetpgrp \
19630 times \
19631 tsearch \
19632 vsnprintf \
19633
19634 do
19635 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19636 echo "$as_me:19636: checking for $ac_func" >&5
19637 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19638 if eval "test \"\${$as_ac_var+set}\" = set"; then
19639   echo $ECHO_N "(cached) $ECHO_C" >&6
19640 else
19641   cat >conftest.$ac_ext <<_ACEOF
19642 #line 19642 "configure"
19643 #include "confdefs.h"
19644 #define $ac_func autoconf_temporary
19645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19646 #undef $ac_func
19647
19648 #ifdef __cplusplus
19649 extern "C"
19650 #endif
19651
19652 /* We use char because int might match the return type of a gcc2
19653    builtin and then its argument prototype would still apply.  */
19654 char $ac_func (void);
19655
19656 int
19657 main (void)
19658 {
19659
19660 /* The GNU C library defines stubs for functions which it implements
19661     to always fail with ENOSYS.  Some functions are actually named
19662     something starting with __ and the normal name is an alias.  */
19663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19664 #error found stub for $ac_func
19665 #endif
19666
19667         return $ac_func ();
19668   ;
19669   return 0;
19670 }
19671 _ACEOF
19672 rm -f conftest.$ac_objext conftest$ac_exeext
19673 if { (eval echo "$as_me:19673: \"$ac_link\"") >&5
19674   (eval $ac_link) 2>&5
19675   ac_status=$?
19676   echo "$as_me:19676: \$? = $ac_status" >&5
19677   (exit $ac_status); } &&
19678          { ac_try='test -s conftest$ac_exeext'
19679   { (eval echo "$as_me:19679: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:19682: \$? = $ac_status" >&5
19683   (exit $ac_status); }; }; then
19684   eval "$as_ac_var=yes"
19685 else
19686   echo "$as_me: failed program was:" >&5
19687 cat conftest.$ac_ext >&5
19688 eval "$as_ac_var=no"
19689 fi
19690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19691 fi
19692 echo "$as_me:19692: result: `eval echo '${'$as_ac_var'}'`" >&5
19693 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19694 if test `eval echo '${'$as_ac_var'}'` = yes; then
19695   cat >>confdefs.h <<EOF
19696 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19697 EOF
19698
19699 fi
19700 done
19701
19702 if test "x$ac_cv_func_getopt" = xno && \
19703    test "x$cf_with_progs$cf_with_tests" != xnono; then
19704         { { echo "$as_me:19704: error: getopt is required for building programs" >&5
19705 echo "$as_me: error: getopt is required for building programs" >&2;}
19706    { (exit 1); exit 1; }; }
19707 fi
19708
19709 if test "x$with_safe_sprintf" = xyes
19710 then
19711         if test "x$ac_cv_func_vsnprintf" = xyes
19712         then
19713                 { echo "$as_me:19713: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19714 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19715         else
19716
19717 cat >>confdefs.h <<\EOF
19718 #define USE_SAFE_SPRINTF 1
19719 EOF
19720
19721         fi
19722 fi
19723
19724 if test "x$with_getcap" = "xyes" ; then
19725
19726 echo "$as_me:19726: checking for terminal-capability database functions" >&5
19727 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19728 if test "${cf_cv_cgetent+set}" = set; then
19729   echo $ECHO_N "(cached) $ECHO_C" >&6
19730 else
19731
19732 cat >conftest.$ac_ext <<_ACEOF
19733 #line 19733 "configure"
19734 #include "confdefs.h"
19735
19736 #include <stdlib.h>
19737 int
19738 main (void)
19739 {
19740
19741         char temp[128];
19742         char *buf = temp;
19743         char *db_array = temp;
19744         cgetent(&buf, &db_array, "vt100");
19745         cgetcap(buf, "tc", '=');
19746         cgetmatch(buf, "tc");
19747
19748   ;
19749   return 0;
19750 }
19751 _ACEOF
19752 rm -f conftest.$ac_objext conftest$ac_exeext
19753 if { (eval echo "$as_me:19753: \"$ac_link\"") >&5
19754   (eval $ac_link) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit $ac_status); } &&
19758          { ac_try='test -s conftest$ac_exeext'
19759   { (eval echo "$as_me:19759: \"$ac_try\"") >&5
19760   (eval $ac_try) 2>&5
19761   ac_status=$?
19762   echo "$as_me:19762: \$? = $ac_status" >&5
19763   (exit $ac_status); }; }; then
19764   cf_cv_cgetent=yes
19765 else
19766   echo "$as_me: failed program was:" >&5
19767 cat conftest.$ac_ext >&5
19768 cf_cv_cgetent=no
19769 fi
19770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19771
19772 fi
19773 echo "$as_me:19773: result: $cf_cv_cgetent" >&5
19774 echo "${ECHO_T}$cf_cv_cgetent" >&6
19775
19776 if test "$cf_cv_cgetent" = yes
19777 then
19778
19779 cat >>confdefs.h <<\EOF
19780 #define HAVE_BSD_CGETENT 1
19781 EOF
19782
19783 echo "$as_me:19783: checking if cgetent uses const parameter" >&5
19784 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19785 if test "${cf_cv_cgetent_const+set}" = set; then
19786   echo $ECHO_N "(cached) $ECHO_C" >&6
19787 else
19788
19789 cat >conftest.$ac_ext <<_ACEOF
19790 #line 19790 "configure"
19791 #include "confdefs.h"
19792
19793 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19794 #include <stdlib.h>
19795 int
19796 main (void)
19797 {
19798
19799         char temp[128];
19800         char *buf = temp;
19801 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19802         const char *db_array = temp;
19803         cgetent(&buf, &db_array, "vt100");
19804 #endif
19805         cgetcap(buf, "tc", '=');
19806         cgetmatch(buf, "tc");
19807
19808   ;
19809   return 0;
19810 }
19811 _ACEOF
19812 rm -f conftest.$ac_objext conftest$ac_exeext
19813 if { (eval echo "$as_me:19813: \"$ac_link\"") >&5
19814   (eval $ac_link) 2>&5
19815   ac_status=$?
19816   echo "$as_me:19816: \$? = $ac_status" >&5
19817   (exit $ac_status); } &&
19818          { ac_try='test -s conftest$ac_exeext'
19819   { (eval echo "$as_me:19819: \"$ac_try\"") >&5
19820   (eval $ac_try) 2>&5
19821   ac_status=$?
19822   echo "$as_me:19822: \$? = $ac_status" >&5
19823   (exit $ac_status); }; }; then
19824   cf_cv_cgetent_const=yes
19825 else
19826   echo "$as_me: failed program was:" >&5
19827 cat conftest.$ac_ext >&5
19828 cf_cv_cgetent_const=no
19829 fi
19830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19831
19832 fi
19833 echo "$as_me:19833: result: $cf_cv_cgetent_const" >&5
19834 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19835         if test "$cf_cv_cgetent_const" = yes
19836         then
19837
19838 cat >>confdefs.h <<EOF
19839 #define CGETENT_CONST const
19840 EOF
19841
19842         fi
19843 fi
19844
19845 fi
19846
19847 echo "$as_me:19847: checking for isascii" >&5
19848 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19849 if test "${cf_cv_have_isascii+set}" = set; then
19850   echo $ECHO_N "(cached) $ECHO_C" >&6
19851 else
19852
19853         cat >conftest.$ac_ext <<_ACEOF
19854 #line 19854 "configure"
19855 #include "confdefs.h"
19856 #include <ctype.h>
19857 int
19858 main (void)
19859 {
19860 int x = isascii(' ')
19861   ;
19862   return 0;
19863 }
19864 _ACEOF
19865 rm -f conftest.$ac_objext conftest$ac_exeext
19866 if { (eval echo "$as_me:19866: \"$ac_link\"") >&5
19867   (eval $ac_link) 2>&5
19868   ac_status=$?
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit $ac_status); } &&
19871          { ac_try='test -s conftest$ac_exeext'
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   cf_cv_have_isascii=yes
19878 else
19879   echo "$as_me: failed program was:" >&5
19880 cat conftest.$ac_ext >&5
19881 cf_cv_have_isascii=no
19882 fi
19883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19884
19885 fi
19886 echo "$as_me:19886: result: $cf_cv_have_isascii" >&5
19887 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19888 test "$cf_cv_have_isascii" = yes &&
19889 cat >>confdefs.h <<\EOF
19890 #define HAVE_ISASCII 1
19891 EOF
19892
19893 if test "$ac_cv_func_sigaction" = yes; then
19894 echo "$as_me:19894: checking whether sigaction needs _POSIX_SOURCE" >&5
19895 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19896 cat >conftest.$ac_ext <<_ACEOF
19897 #line 19897 "configure"
19898 #include "confdefs.h"
19899
19900 #include <sys/types.h>
19901 #include <signal.h>
19902 int
19903 main (void)
19904 {
19905 struct sigaction act
19906   ;
19907   return 0;
19908 }
19909 _ACEOF
19910 rm -f conftest.$ac_objext
19911 if { (eval echo "$as_me:19911: \"$ac_compile\"") >&5
19912   (eval $ac_compile) 2>&5
19913   ac_status=$?
19914   echo "$as_me:19914: \$? = $ac_status" >&5
19915   (exit $ac_status); } &&
19916          { ac_try='test -s conftest.$ac_objext'
19917   { (eval echo "$as_me:19917: \"$ac_try\"") >&5
19918   (eval $ac_try) 2>&5
19919   ac_status=$?
19920   echo "$as_me:19920: \$? = $ac_status" >&5
19921   (exit $ac_status); }; }; then
19922   sigact_bad=no
19923 else
19924   echo "$as_me: failed program was:" >&5
19925 cat conftest.$ac_ext >&5
19926
19927 cat >conftest.$ac_ext <<_ACEOF
19928 #line 19928 "configure"
19929 #include "confdefs.h"
19930
19931 #define _POSIX_SOURCE
19932 #include <sys/types.h>
19933 #include <signal.h>
19934 int
19935 main (void)
19936 {
19937 struct sigaction act
19938   ;
19939   return 0;
19940 }
19941 _ACEOF
19942 rm -f conftest.$ac_objext
19943 if { (eval echo "$as_me:19943: \"$ac_compile\"") >&5
19944   (eval $ac_compile) 2>&5
19945   ac_status=$?
19946   echo "$as_me:19946: \$? = $ac_status" >&5
19947   (exit $ac_status); } &&
19948          { ac_try='test -s conftest.$ac_objext'
19949   { (eval echo "$as_me:19949: \"$ac_try\"") >&5
19950   (eval $ac_try) 2>&5
19951   ac_status=$?
19952   echo "$as_me:19952: \$? = $ac_status" >&5
19953   (exit $ac_status); }; }; then
19954   sigact_bad=yes
19955
19956 cat >>confdefs.h <<\EOF
19957 #define _POSIX_SOURCE 1
19958 EOF
19959
19960 else
19961   echo "$as_me: failed program was:" >&5
19962 cat conftest.$ac_ext >&5
19963 sigact_bad=unknown
19964 fi
19965 rm -f conftest.$ac_objext conftest.$ac_ext
19966 fi
19967 rm -f conftest.$ac_objext conftest.$ac_ext
19968 echo "$as_me:19968: result: $sigact_bad" >&5
19969 echo "${ECHO_T}$sigact_bad" >&6
19970 fi
19971
19972 echo "$as_me:19972: checking if nanosleep really works" >&5
19973 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19974 if test "${cf_cv_func_nanosleep+set}" = set; then
19975   echo $ECHO_N "(cached) $ECHO_C" >&6
19976 else
19977
19978 if test "$cross_compiling" = yes; then
19979   cf_cv_func_nanosleep=unknown
19980 else
19981   cat >conftest.$ac_ext <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19984
19985 #include <stdio.h>
19986 #include <errno.h>
19987 #include <time.h>
19988
19989 #ifdef HAVE_SYS_TIME_H
19990 #include <sys/time.h>
19991 #endif
19992
19993 int main(void) {
19994         struct timespec ts1, ts2;
19995         int code;
19996         ts1.tv_sec  = 0;
19997         ts1.tv_nsec = 750000000;
19998         ts2.tv_sec  = 0;
19999         ts2.tv_nsec = 0;
20000         errno = 0;
20001         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20002         ${cf_cv_main_return:-return}(code != 0);
20003 }
20004
20005 _ACEOF
20006 rm -f conftest$ac_exeext
20007 if { (eval echo "$as_me:20007: \"$ac_link\"") >&5
20008   (eval $ac_link) 2>&5
20009   ac_status=$?
20010   echo "$as_me:20010: \$? = $ac_status" >&5
20011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20012   { (eval echo "$as_me:20012: \"$ac_try\"") >&5
20013   (eval $ac_try) 2>&5
20014   ac_status=$?
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit $ac_status); }; }; then
20017   cf_cv_func_nanosleep=yes
20018 else
20019   echo "$as_me: program exited with status $ac_status" >&5
20020 echo "$as_me: failed program was:" >&5
20021 cat conftest.$ac_ext >&5
20022 cf_cv_func_nanosleep=no
20023 fi
20024 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20025 fi
20026 fi
20027 echo "$as_me:20027: result: $cf_cv_func_nanosleep" >&5
20028 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20029
20030 test "$cf_cv_func_nanosleep" = "yes" &&
20031 cat >>confdefs.h <<\EOF
20032 #define HAVE_NANOSLEEP 1
20033 EOF
20034
20035 for ac_header in \
20036 termio.h \
20037 termios.h \
20038 unistd.h \
20039 sys/ioctl.h \
20040 sys/termio.h \
20041
20042 do
20043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20044 echo "$as_me:20044: checking for $ac_header" >&5
20045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20047   echo $ECHO_N "(cached) $ECHO_C" >&6
20048 else
20049   cat >conftest.$ac_ext <<_ACEOF
20050 #line 20050 "configure"
20051 #include "confdefs.h"
20052 #include <$ac_header>
20053 _ACEOF
20054 if { (eval echo "$as_me:20054: \"$ac_cpp conftest.$ac_ext\"") >&5
20055   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20056   ac_status=$?
20057   egrep -v '^ *\+' conftest.er1 >conftest.err
20058   rm -f conftest.er1
20059   cat conftest.err >&5
20060   echo "$as_me:20060: \$? = $ac_status" >&5
20061   (exit $ac_status); } >/dev/null; then
20062   if test -s conftest.err; then
20063     ac_cpp_err=$ac_c_preproc_warn_flag
20064   else
20065     ac_cpp_err=
20066   fi
20067 else
20068   ac_cpp_err=yes
20069 fi
20070 if test -z "$ac_cpp_err"; then
20071   eval "$as_ac_Header=yes"
20072 else
20073   echo "$as_me: failed program was:" >&5
20074   cat conftest.$ac_ext >&5
20075   eval "$as_ac_Header=no"
20076 fi
20077 rm -f conftest.err conftest.$ac_ext
20078 fi
20079 echo "$as_me:20079: result: `eval echo '${'$as_ac_Header'}'`" >&5
20080 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20082   cat >>confdefs.h <<EOF
20083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20084 EOF
20085
20086 fi
20087 done
20088
20089 if test "$ac_cv_header_termios_h" = yes ; then
20090         case "$CFLAGS $CPPFLAGS" in
20091         (*-D_POSIX_SOURCE*)
20092                 termios_bad=dunno ;;
20093         (*)     termios_bad=maybe ;;
20094         esac
20095         if test "$termios_bad" = maybe ; then
20096         echo "$as_me:20096: checking whether termios.h needs _POSIX_SOURCE" >&5
20097 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20098         cat >conftest.$ac_ext <<_ACEOF
20099 #line 20099 "configure"
20100 #include "confdefs.h"
20101 #include <termios.h>
20102 int
20103 main (void)
20104 {
20105 struct termios foo; int x = foo.c_iflag
20106   ;
20107   return 0;
20108 }
20109 _ACEOF
20110 rm -f conftest.$ac_objext
20111 if { (eval echo "$as_me:20111: \"$ac_compile\"") >&5
20112   (eval $ac_compile) 2>&5
20113   ac_status=$?
20114   echo "$as_me:20114: \$? = $ac_status" >&5
20115   (exit $ac_status); } &&
20116          { ac_try='test -s conftest.$ac_objext'
20117   { (eval echo "$as_me:20117: \"$ac_try\"") >&5
20118   (eval $ac_try) 2>&5
20119   ac_status=$?
20120   echo "$as_me:20120: \$? = $ac_status" >&5
20121   (exit $ac_status); }; }; then
20122   termios_bad=no
20123 else
20124   echo "$as_me: failed program was:" >&5
20125 cat conftest.$ac_ext >&5
20126
20127                 cat >conftest.$ac_ext <<_ACEOF
20128 #line 20128 "configure"
20129 #include "confdefs.h"
20130
20131 #define _POSIX_SOURCE
20132 #include <termios.h>
20133 int
20134 main (void)
20135 {
20136 struct termios foo; int x = foo.c_iflag
20137   ;
20138   return 0;
20139 }
20140 _ACEOF
20141 rm -f conftest.$ac_objext
20142 if { (eval echo "$as_me:20142: \"$ac_compile\"") >&5
20143   (eval $ac_compile) 2>&5
20144   ac_status=$?
20145   echo "$as_me:20145: \$? = $ac_status" >&5
20146   (exit $ac_status); } &&
20147          { ac_try='test -s conftest.$ac_objext'
20148   { (eval echo "$as_me:20148: \"$ac_try\"") >&5
20149   (eval $ac_try) 2>&5
20150   ac_status=$?
20151   echo "$as_me:20151: \$? = $ac_status" >&5
20152   (exit $ac_status); }; }; then
20153   termios_bad=unknown
20154 else
20155   echo "$as_me: failed program was:" >&5
20156 cat conftest.$ac_ext >&5
20157 termios_bad=yes
20158 cat >>confdefs.h <<\EOF
20159 #define _POSIX_SOURCE 1
20160 EOF
20161
20162 fi
20163 rm -f conftest.$ac_objext conftest.$ac_ext
20164
20165 fi
20166 rm -f conftest.$ac_objext conftest.$ac_ext
20167         echo "$as_me:20167: result: $termios_bad" >&5
20168 echo "${ECHO_T}$termios_bad" >&6
20169         fi
20170 fi
20171
20172 echo "$as_me:20172: checking for tcgetattr" >&5
20173 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20174 if test "${cf_cv_have_tcgetattr+set}" = set; then
20175   echo $ECHO_N "(cached) $ECHO_C" >&6
20176 else
20177
20178 cat >conftest.$ac_ext <<_ACEOF
20179 #line 20179 "configure"
20180 #include "confdefs.h"
20181
20182 #include <sys/types.h>
20183 #ifdef HAVE_UNISTD_H
20184 #include <unistd.h>
20185 #endif
20186 #ifdef HAVE_TERMIOS_H
20187 #include <termios.h>
20188 #define TTY struct termios
20189 #else
20190 #ifdef HAVE_TERMIO_H
20191 #include <termio.h>
20192 #define TTY struct termio
20193 #endif
20194 #endif
20195
20196 int
20197 main (void)
20198 {
20199
20200 TTY foo;
20201 tcgetattr(1, &foo);
20202   ;
20203   return 0;
20204 }
20205 _ACEOF
20206 rm -f conftest.$ac_objext conftest$ac_exeext
20207 if { (eval echo "$as_me:20207: \"$ac_link\"") >&5
20208   (eval $ac_link) 2>&5
20209   ac_status=$?
20210   echo "$as_me:20210: \$? = $ac_status" >&5
20211   (exit $ac_status); } &&
20212          { ac_try='test -s conftest$ac_exeext'
20213   { (eval echo "$as_me:20213: \"$ac_try\"") >&5
20214   (eval $ac_try) 2>&5
20215   ac_status=$?
20216   echo "$as_me:20216: \$? = $ac_status" >&5
20217   (exit $ac_status); }; }; then
20218   cf_cv_have_tcgetattr=yes
20219 else
20220   echo "$as_me: failed program was:" >&5
20221 cat conftest.$ac_ext >&5
20222 cf_cv_have_tcgetattr=no
20223 fi
20224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20225 fi
20226 echo "$as_me:20226: result: $cf_cv_have_tcgetattr" >&5
20227 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20228 test "$cf_cv_have_tcgetattr" = yes &&
20229 cat >>confdefs.h <<\EOF
20230 #define HAVE_TCGETATTR 1
20231 EOF
20232
20233 echo "$as_me:20233: checking for vsscanf function or workaround" >&5
20234 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20235 if test "${cf_cv_func_vsscanf+set}" = set; then
20236   echo $ECHO_N "(cached) $ECHO_C" >&6
20237 else
20238
20239 cat >conftest.$ac_ext <<_ACEOF
20240 #line 20240 "configure"
20241 #include "confdefs.h"
20242
20243 #include <stdarg.h>
20244 #include <stdio.h>
20245 int
20246 main (void)
20247 {
20248
20249         va_list ap;
20250         vsscanf("from", "%d", ap)
20251   ;
20252   return 0;
20253 }
20254 _ACEOF
20255 rm -f conftest.$ac_objext conftest$ac_exeext
20256 if { (eval echo "$as_me:20256: \"$ac_link\"") >&5
20257   (eval $ac_link) 2>&5
20258   ac_status=$?
20259   echo "$as_me:20259: \$? = $ac_status" >&5
20260   (exit $ac_status); } &&
20261          { ac_try='test -s conftest$ac_exeext'
20262   { (eval echo "$as_me:20262: \"$ac_try\"") >&5
20263   (eval $ac_try) 2>&5
20264   ac_status=$?
20265   echo "$as_me:20265: \$? = $ac_status" >&5
20266   (exit $ac_status); }; }; then
20267   cf_cv_func_vsscanf=vsscanf
20268 else
20269   echo "$as_me: failed program was:" >&5
20270 cat conftest.$ac_ext >&5
20271
20272 cat >conftest.$ac_ext <<_ACEOF
20273 #line 20273 "configure"
20274 #include "confdefs.h"
20275
20276 #include <stdarg.h>
20277 #include <stdio.h>
20278 int
20279 main (void)
20280 {
20281
20282         FILE strbuf;
20283         char *str = "from";
20284
20285         strbuf._flag = _IOREAD;
20286         strbuf._ptr = strbuf._base = (unsigned char *) str;
20287         strbuf._cnt = strlen(str);
20288         strbuf._file = _NFILE;
20289         return (vfscanf(&strbuf, "%d", ap))
20290   ;
20291   return 0;
20292 }
20293 _ACEOF
20294 rm -f conftest.$ac_objext conftest$ac_exeext
20295 if { (eval echo "$as_me:20295: \"$ac_link\"") >&5
20296   (eval $ac_link) 2>&5
20297   ac_status=$?
20298   echo "$as_me:20298: \$? = $ac_status" >&5
20299   (exit $ac_status); } &&
20300          { ac_try='test -s conftest$ac_exeext'
20301   { (eval echo "$as_me:20301: \"$ac_try\"") >&5
20302   (eval $ac_try) 2>&5
20303   ac_status=$?
20304   echo "$as_me:20304: \$? = $ac_status" >&5
20305   (exit $ac_status); }; }; then
20306   cf_cv_func_vsscanf=vfscanf
20307 else
20308   echo "$as_me: failed program was:" >&5
20309 cat conftest.$ac_ext >&5
20310
20311 cat >conftest.$ac_ext <<_ACEOF
20312 #line 20312 "configure"
20313 #include "confdefs.h"
20314
20315 #include <stdarg.h>
20316 #include <stdio.h>
20317 int
20318 main (void)
20319 {
20320
20321         FILE strbuf;
20322         char *str = "from";
20323
20324         strbuf._flag = _IOREAD;
20325         strbuf._ptr = strbuf._base = (unsigned char *) str;
20326         strbuf._cnt = strlen(str);
20327         strbuf._file = _NFILE;
20328         return (_doscan(&strbuf, "%d", ap))
20329   ;
20330   return 0;
20331 }
20332 _ACEOF
20333 rm -f conftest.$ac_objext conftest$ac_exeext
20334 if { (eval echo "$as_me:20334: \"$ac_link\"") >&5
20335   (eval $ac_link) 2>&5
20336   ac_status=$?
20337   echo "$as_me:20337: \$? = $ac_status" >&5
20338   (exit $ac_status); } &&
20339          { ac_try='test -s conftest$ac_exeext'
20340   { (eval echo "$as_me:20340: \"$ac_try\"") >&5
20341   (eval $ac_try) 2>&5
20342   ac_status=$?
20343   echo "$as_me:20343: \$? = $ac_status" >&5
20344   (exit $ac_status); }; }; then
20345   cf_cv_func_vsscanf=_doscan
20346 else
20347   echo "$as_me: failed program was:" >&5
20348 cat conftest.$ac_ext >&5
20349
20350 cf_cv_func_vsscanf=no
20351 fi
20352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20353 fi
20354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20355 fi
20356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20357 fi
20358 echo "$as_me:20358: result: $cf_cv_func_vsscanf" >&5
20359 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20360
20361 case $cf_cv_func_vsscanf in
20362 (vsscanf)
20363 cat >>confdefs.h <<\EOF
20364 #define HAVE_VSSCANF 1
20365 EOF
20366 ;;
20367 (vfscanf)
20368 cat >>confdefs.h <<\EOF
20369 #define HAVE_VFSCANF 1
20370 EOF
20371 ;;
20372 (_doscan)
20373 cat >>confdefs.h <<\EOF
20374 #define HAVE__DOSCAN 1
20375 EOF
20376 ;;
20377 esac
20378
20379 for ac_header in \
20380 unistd.h \
20381
20382 do
20383 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20384 echo "$as_me:20384: checking for $ac_header" >&5
20385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20387   echo $ECHO_N "(cached) $ECHO_C" >&6
20388 else
20389   cat >conftest.$ac_ext <<_ACEOF
20390 #line 20390 "configure"
20391 #include "confdefs.h"
20392 #include <$ac_header>
20393 _ACEOF
20394 if { (eval echo "$as_me:20394: \"$ac_cpp conftest.$ac_ext\"") >&5
20395   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20396   ac_status=$?
20397   egrep -v '^ *\+' conftest.er1 >conftest.err
20398   rm -f conftest.er1
20399   cat conftest.err >&5
20400   echo "$as_me:20400: \$? = $ac_status" >&5
20401   (exit $ac_status); } >/dev/null; then
20402   if test -s conftest.err; then
20403     ac_cpp_err=$ac_c_preproc_warn_flag
20404   else
20405     ac_cpp_err=
20406   fi
20407 else
20408   ac_cpp_err=yes
20409 fi
20410 if test -z "$ac_cpp_err"; then
20411   eval "$as_ac_Header=yes"
20412 else
20413   echo "$as_me: failed program was:" >&5
20414   cat conftest.$ac_ext >&5
20415   eval "$as_ac_Header=no"
20416 fi
20417 rm -f conftest.err conftest.$ac_ext
20418 fi
20419 echo "$as_me:20419: result: `eval echo '${'$as_ac_Header'}'`" >&5
20420 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20421 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20422   cat >>confdefs.h <<EOF
20423 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20424 EOF
20425
20426 fi
20427 done
20428
20429 echo "$as_me:20429: checking for working mkstemp" >&5
20430 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20431 if test "${cf_cv_func_mkstemp+set}" = set; then
20432   echo $ECHO_N "(cached) $ECHO_C" >&6
20433 else
20434
20435 rm -rf conftest*
20436 if test "$cross_compiling" = yes; then
20437   cf_cv_func_mkstemp=maybe
20438 else
20439   cat >conftest.$ac_ext <<_ACEOF
20440 #line 20440 "configure"
20441 #include "confdefs.h"
20442
20443 #include <sys/types.h>
20444 #ifdef HAVE_UNISTD_H
20445 #include <unistd.h>
20446 #endif
20447 #include <stdlib.h>
20448 #include <stdio.h>
20449 #include <string.h>
20450 #include <sys/stat.h>
20451 int main(void)
20452 {
20453         char *tmpl = "conftestXXXXXX";
20454         char name[2][80];
20455         int n;
20456         int result = 0;
20457         int fd;
20458         struct stat sb;
20459
20460         umask(077);
20461         for (n = 0; n < 2; ++n) {
20462                 strcpy(name[n], tmpl);
20463                 if ((fd = mkstemp(name[n])) >= 0) {
20464                         if (!strcmp(name[n], tmpl)
20465                          || stat(name[n], &sb) != 0
20466                          || (sb.st_mode & S_IFMT) != S_IFREG
20467                          || (sb.st_mode & 077) != 0) {
20468                                 result = 1;
20469                         }
20470                         close(fd);
20471                 }
20472         }
20473         if (result == 0
20474          && !strcmp(name[0], name[1]))
20475                 result = 1;
20476         ${cf_cv_main_return:-return}(result);
20477 }
20478
20479 _ACEOF
20480 rm -f conftest$ac_exeext
20481 if { (eval echo "$as_me:20481: \"$ac_link\"") >&5
20482   (eval $ac_link) 2>&5
20483   ac_status=$?
20484   echo "$as_me:20484: \$? = $ac_status" >&5
20485   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20486   { (eval echo "$as_me:20486: \"$ac_try\"") >&5
20487   (eval $ac_try) 2>&5
20488   ac_status=$?
20489   echo "$as_me:20489: \$? = $ac_status" >&5
20490   (exit $ac_status); }; }; then
20491   cf_cv_func_mkstemp=yes
20492
20493 else
20494   echo "$as_me: program exited with status $ac_status" >&5
20495 echo "$as_me: failed program was:" >&5
20496 cat conftest.$ac_ext >&5
20497 cf_cv_func_mkstemp=no
20498
20499 fi
20500 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20501 fi
20502
20503 fi
20504 echo "$as_me:20504: result: $cf_cv_func_mkstemp" >&5
20505 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20506 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20507         echo "$as_me:20507: checking for mkstemp" >&5
20508 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20509 if test "${ac_cv_func_mkstemp+set}" = set; then
20510   echo $ECHO_N "(cached) $ECHO_C" >&6
20511 else
20512   cat >conftest.$ac_ext <<_ACEOF
20513 #line 20513 "configure"
20514 #include "confdefs.h"
20515 #define mkstemp autoconf_temporary
20516 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20517 #undef mkstemp
20518
20519 #ifdef __cplusplus
20520 extern "C"
20521 #endif
20522
20523 /* We use char because int might match the return type of a gcc2
20524    builtin and then its argument prototype would still apply.  */
20525 char mkstemp (void);
20526
20527 int
20528 main (void)
20529 {
20530
20531 /* The GNU C library defines stubs for functions which it implements
20532     to always fail with ENOSYS.  Some functions are actually named
20533     something starting with __ and the normal name is an alias.  */
20534 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20535 #error found stub for mkstemp
20536 #endif
20537
20538         return mkstemp ();
20539   ;
20540   return 0;
20541 }
20542 _ACEOF
20543 rm -f conftest.$ac_objext conftest$ac_exeext
20544 if { (eval echo "$as_me:20544: \"$ac_link\"") >&5
20545   (eval $ac_link) 2>&5
20546   ac_status=$?
20547   echo "$as_me:20547: \$? = $ac_status" >&5
20548   (exit $ac_status); } &&
20549          { ac_try='test -s conftest$ac_exeext'
20550   { (eval echo "$as_me:20550: \"$ac_try\"") >&5
20551   (eval $ac_try) 2>&5
20552   ac_status=$?
20553   echo "$as_me:20553: \$? = $ac_status" >&5
20554   (exit $ac_status); }; }; then
20555   ac_cv_func_mkstemp=yes
20556 else
20557   echo "$as_me: failed program was:" >&5
20558 cat conftest.$ac_ext >&5
20559 ac_cv_func_mkstemp=no
20560 fi
20561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20562 fi
20563 echo "$as_me:20563: result: $ac_cv_func_mkstemp" >&5
20564 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20565
20566 fi
20567 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20568
20569 cat >>confdefs.h <<\EOF
20570 #define HAVE_MKSTEMP 1
20571 EOF
20572
20573 fi
20574
20575 # setup for prototype of fallback for vsscanf()
20576
20577 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20578         HAVE_VSSCANF=1
20579 else
20580         HAVE_VSSCANF=0
20581 fi
20582
20583 if test "x$cross_compiling" = xyes ; then
20584         { echo "$as_me:20584: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20585 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20586 else
20587         echo "$as_me:20587: checking whether setvbuf arguments are reversed" >&5
20588 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20589 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20590   echo $ECHO_N "(cached) $ECHO_C" >&6
20591 else
20592   if test "$cross_compiling" = yes; then
20593   { { echo "$as_me:20593: error: cannot run test program while cross compiling" >&5
20594 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20595    { (exit 1); exit 1; }; }
20596 else
20597   cat >conftest.$ac_ext <<_ACEOF
20598 #line 20598 "configure"
20599 #include "confdefs.h"
20600 #include <stdio.h>
20601 /* If setvbuf has the reversed format, exit 0. */
20602 int
20603 main (void)
20604 {
20605   /* This call has the arguments reversed.
20606      A reversed system may check and see that the address of main
20607      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20608   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20609     $ac_main_return(1);
20610   putc('\r', stdout);
20611   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20612 }
20613 _ACEOF
20614 rm -f conftest$ac_exeext
20615 if { (eval echo "$as_me:20615: \"$ac_link\"") >&5
20616   (eval $ac_link) 2>&5
20617   ac_status=$?
20618   echo "$as_me:20618: \$? = $ac_status" >&5
20619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20620   { (eval echo "$as_me:20620: \"$ac_try\"") >&5
20621   (eval $ac_try) 2>&5
20622   ac_status=$?
20623   echo "$as_me:20623: \$? = $ac_status" >&5
20624   (exit $ac_status); }; }; then
20625   ac_cv_func_setvbuf_reversed=yes
20626 else
20627   echo "$as_me: program exited with status $ac_status" >&5
20628 echo "$as_me: failed program was:" >&5
20629 cat conftest.$ac_ext >&5
20630 ac_cv_func_setvbuf_reversed=no
20631 fi
20632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20633 fi
20634 rm -f core core.* *.core
20635 fi
20636 echo "$as_me:20636: result: $ac_cv_func_setvbuf_reversed" >&5
20637 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20638 if test $ac_cv_func_setvbuf_reversed = yes; then
20639
20640 cat >>confdefs.h <<\EOF
20641 #define SETVBUF_REVERSED 1
20642 EOF
20643
20644 fi
20645
20646 fi
20647 echo "$as_me:20647: checking for intptr_t" >&5
20648 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20649 if test "${ac_cv_type_intptr_t+set}" = set; then
20650   echo $ECHO_N "(cached) $ECHO_C" >&6
20651 else
20652   cat >conftest.$ac_ext <<_ACEOF
20653 #line 20653 "configure"
20654 #include "confdefs.h"
20655 $ac_includes_default
20656 int
20657 main (void)
20658 {
20659 if ((intptr_t *) 0)
20660   return 0;
20661 if (sizeof (intptr_t))
20662   return 0;
20663   ;
20664   return 0;
20665 }
20666 _ACEOF
20667 rm -f conftest.$ac_objext
20668 if { (eval echo "$as_me:20668: \"$ac_compile\"") >&5
20669   (eval $ac_compile) 2>&5
20670   ac_status=$?
20671   echo "$as_me:20671: \$? = $ac_status" >&5
20672   (exit $ac_status); } &&
20673          { ac_try='test -s conftest.$ac_objext'
20674   { (eval echo "$as_me:20674: \"$ac_try\"") >&5
20675   (eval $ac_try) 2>&5
20676   ac_status=$?
20677   echo "$as_me:20677: \$? = $ac_status" >&5
20678   (exit $ac_status); }; }; then
20679   ac_cv_type_intptr_t=yes
20680 else
20681   echo "$as_me: failed program was:" >&5
20682 cat conftest.$ac_ext >&5
20683 ac_cv_type_intptr_t=no
20684 fi
20685 rm -f conftest.$ac_objext conftest.$ac_ext
20686 fi
20687 echo "$as_me:20687: result: $ac_cv_type_intptr_t" >&5
20688 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20689 if test $ac_cv_type_intptr_t = yes; then
20690   :
20691 else
20692
20693 cat >>confdefs.h <<EOF
20694 #define intptr_t long
20695 EOF
20696
20697 fi
20698
20699 echo "$as_me:20699: checking for ssize_t" >&5
20700 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20701 if test "${ac_cv_type_ssize_t+set}" = set; then
20702   echo $ECHO_N "(cached) $ECHO_C" >&6
20703 else
20704   cat >conftest.$ac_ext <<_ACEOF
20705 #line 20705 "configure"
20706 #include "confdefs.h"
20707 $ac_includes_default
20708 int
20709 main (void)
20710 {
20711 if ((ssize_t *) 0)
20712   return 0;
20713 if (sizeof (ssize_t))
20714   return 0;
20715   ;
20716   return 0;
20717 }
20718 _ACEOF
20719 rm -f conftest.$ac_objext
20720 if { (eval echo "$as_me:20720: \"$ac_compile\"") >&5
20721   (eval $ac_compile) 2>&5
20722   ac_status=$?
20723   echo "$as_me:20723: \$? = $ac_status" >&5
20724   (exit $ac_status); } &&
20725          { ac_try='test -s conftest.$ac_objext'
20726   { (eval echo "$as_me:20726: \"$ac_try\"") >&5
20727   (eval $ac_try) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit $ac_status); }; }; then
20731   ac_cv_type_ssize_t=yes
20732 else
20733   echo "$as_me: failed program was:" >&5
20734 cat conftest.$ac_ext >&5
20735 ac_cv_type_ssize_t=no
20736 fi
20737 rm -f conftest.$ac_objext conftest.$ac_ext
20738 fi
20739 echo "$as_me:20739: result: $ac_cv_type_ssize_t" >&5
20740 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20741 if test $ac_cv_type_ssize_t = yes; then
20742   :
20743 else
20744
20745 cat >>confdefs.h <<EOF
20746 #define ssize_t int
20747 EOF
20748
20749 fi
20750
20751 echo "$as_me:20751: checking for type sigaction_t" >&5
20752 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20753 if test "${cf_cv_type_sigaction+set}" = set; then
20754   echo $ECHO_N "(cached) $ECHO_C" >&6
20755 else
20756
20757         cat >conftest.$ac_ext <<_ACEOF
20758 #line 20758 "configure"
20759 #include "confdefs.h"
20760
20761 #include <signal.h>
20762 int
20763 main (void)
20764 {
20765 sigaction_t x
20766   ;
20767   return 0;
20768 }
20769 _ACEOF
20770 rm -f conftest.$ac_objext
20771 if { (eval echo "$as_me:20771: \"$ac_compile\"") >&5
20772   (eval $ac_compile) 2>&5
20773   ac_status=$?
20774   echo "$as_me:20774: \$? = $ac_status" >&5
20775   (exit $ac_status); } &&
20776          { ac_try='test -s conftest.$ac_objext'
20777   { (eval echo "$as_me:20777: \"$ac_try\"") >&5
20778   (eval $ac_try) 2>&5
20779   ac_status=$?
20780   echo "$as_me:20780: \$? = $ac_status" >&5
20781   (exit $ac_status); }; }; then
20782   cf_cv_type_sigaction=yes
20783 else
20784   echo "$as_me: failed program was:" >&5
20785 cat conftest.$ac_ext >&5
20786 cf_cv_type_sigaction=no
20787 fi
20788 rm -f conftest.$ac_objext conftest.$ac_ext
20789 fi
20790
20791 echo "$as_me:20791: result: $cf_cv_type_sigaction" >&5
20792 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20793 test "$cf_cv_type_sigaction" = yes &&
20794 cat >>confdefs.h <<\EOF
20795 #define HAVE_TYPE_SIGACTION 1
20796 EOF
20797
20798 echo "$as_me:20798: checking declaration of size-change" >&5
20799 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20800 if test "${cf_cv_sizechange+set}" = set; then
20801   echo $ECHO_N "(cached) $ECHO_C" >&6
20802 else
20803
20804         cf_cv_sizechange=unknown
20805         cf_save_CPPFLAGS="$CPPFLAGS"
20806
20807 for cf_opts in "" "NEED_PTEM_H"
20808 do
20809
20810         CPPFLAGS="$cf_save_CPPFLAGS"
20811         if test -n "$cf_opts"
20812         then
20813
20814         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20815         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20816
20817         fi
20818         cat >conftest.$ac_ext <<_ACEOF
20819 #line 20819 "configure"
20820 #include "confdefs.h"
20821 #include <sys/types.h>
20822 #ifdef HAVE_TERMIOS_H
20823 #include <termios.h>
20824 #else
20825 #ifdef HAVE_TERMIO_H
20826 #include <termio.h>
20827 #endif
20828 #endif
20829
20830 #ifdef NEED_PTEM_H
20831 /* This is a workaround for SCO:  they neglected to define struct winsize in
20832  * termios.h -- it's only in termio.h and ptem.h
20833  */
20834 #include <sys/stream.h>
20835 #include <sys/ptem.h>
20836 #endif
20837
20838 #ifdef HAVE_SYS_IOCTL_H
20839 #include <sys/ioctl.h>
20840 #endif
20841
20842 int
20843 main (void)
20844 {
20845
20846 #ifdef TIOCGSIZE
20847         struct ttysize win;     /* SunOS 3.0... */
20848         int y = win.ts_lines;
20849         int x = win.ts_cols;
20850 #else
20851 #ifdef TIOCGWINSZ
20852         struct winsize win;     /* everything else */
20853         int y = win.ws_row;
20854         int x = win.ws_col;
20855 #else
20856         no TIOCGSIZE or TIOCGWINSZ
20857 #endif /* TIOCGWINSZ */
20858 #endif /* TIOCGSIZE */
20859
20860   ;
20861   return 0;
20862 }
20863 _ACEOF
20864 rm -f conftest.$ac_objext
20865 if { (eval echo "$as_me:20865: \"$ac_compile\"") >&5
20866   (eval $ac_compile) 2>&5
20867   ac_status=$?
20868   echo "$as_me:20868: \$? = $ac_status" >&5
20869   (exit $ac_status); } &&
20870          { ac_try='test -s conftest.$ac_objext'
20871   { (eval echo "$as_me:20871: \"$ac_try\"") >&5
20872   (eval $ac_try) 2>&5
20873   ac_status=$?
20874   echo "$as_me:20874: \$? = $ac_status" >&5
20875   (exit $ac_status); }; }; then
20876   cf_cv_sizechange=yes
20877 else
20878   echo "$as_me: failed program was:" >&5
20879 cat conftest.$ac_ext >&5
20880 cf_cv_sizechange=no
20881 fi
20882 rm -f conftest.$ac_objext conftest.$ac_ext
20883
20884         CPPFLAGS="$cf_save_CPPFLAGS"
20885         if test "$cf_cv_sizechange" = yes ; then
20886                 echo "size-change succeeded ($cf_opts)" >&5
20887                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20888                 break
20889         fi
20890 done
20891
20892 fi
20893 echo "$as_me:20893: result: $cf_cv_sizechange" >&5
20894 echo "${ECHO_T}$cf_cv_sizechange" >&6
20895 if test "$cf_cv_sizechange" != no ; then
20896
20897 cat >>confdefs.h <<\EOF
20898 #define HAVE_SIZECHANGE 1
20899 EOF
20900
20901         case $cf_cv_sizechange in
20902         (NEED*)
20903                 cat >>confdefs.h <<EOF
20904 #define $cf_cv_sizechange  1
20905 EOF
20906
20907                 ;;
20908         esac
20909 fi
20910
20911 echo "$as_me:20911: checking for memmove" >&5
20912 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20913 if test "${ac_cv_func_memmove+set}" = set; then
20914   echo $ECHO_N "(cached) $ECHO_C" >&6
20915 else
20916   cat >conftest.$ac_ext <<_ACEOF
20917 #line 20917 "configure"
20918 #include "confdefs.h"
20919 #define memmove autoconf_temporary
20920 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20921 #undef memmove
20922
20923 #ifdef __cplusplus
20924 extern "C"
20925 #endif
20926
20927 /* We use char because int might match the return type of a gcc2
20928    builtin and then its argument prototype would still apply.  */
20929 char memmove (void);
20930
20931 int
20932 main (void)
20933 {
20934
20935 /* The GNU C library defines stubs for functions which it implements
20936     to always fail with ENOSYS.  Some functions are actually named
20937     something starting with __ and the normal name is an alias.  */
20938 #if defined (__stub_memmove) || defined (__stub___memmove)
20939 #error found stub for memmove
20940 #endif
20941
20942         return memmove ();
20943   ;
20944   return 0;
20945 }
20946 _ACEOF
20947 rm -f conftest.$ac_objext conftest$ac_exeext
20948 if { (eval echo "$as_me:20948: \"$ac_link\"") >&5
20949   (eval $ac_link) 2>&5
20950   ac_status=$?
20951   echo "$as_me:20951: \$? = $ac_status" >&5
20952   (exit $ac_status); } &&
20953          { ac_try='test -s conftest$ac_exeext'
20954   { (eval echo "$as_me:20954: \"$ac_try\"") >&5
20955   (eval $ac_try) 2>&5
20956   ac_status=$?
20957   echo "$as_me:20957: \$? = $ac_status" >&5
20958   (exit $ac_status); }; }; then
20959   ac_cv_func_memmove=yes
20960 else
20961   echo "$as_me: failed program was:" >&5
20962 cat conftest.$ac_ext >&5
20963 ac_cv_func_memmove=no
20964 fi
20965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20966 fi
20967 echo "$as_me:20967: result: $ac_cv_func_memmove" >&5
20968 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20969 if test $ac_cv_func_memmove = yes; then
20970   :
20971 else
20972
20973 echo "$as_me:20973: checking for bcopy" >&5
20974 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20975 if test "${ac_cv_func_bcopy+set}" = set; then
20976   echo $ECHO_N "(cached) $ECHO_C" >&6
20977 else
20978   cat >conftest.$ac_ext <<_ACEOF
20979 #line 20979 "configure"
20980 #include "confdefs.h"
20981 #define bcopy autoconf_temporary
20982 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20983 #undef bcopy
20984
20985 #ifdef __cplusplus
20986 extern "C"
20987 #endif
20988
20989 /* We use char because int might match the return type of a gcc2
20990    builtin and then its argument prototype would still apply.  */
20991 char bcopy (void);
20992
20993 int
20994 main (void)
20995 {
20996
20997 /* The GNU C library defines stubs for functions which it implements
20998     to always fail with ENOSYS.  Some functions are actually named
20999     something starting with __ and the normal name is an alias.  */
21000 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21001 #error found stub for bcopy
21002 #endif
21003
21004         return bcopy ();
21005   ;
21006   return 0;
21007 }
21008 _ACEOF
21009 rm -f conftest.$ac_objext conftest$ac_exeext
21010 if { (eval echo "$as_me:21010: \"$ac_link\"") >&5
21011   (eval $ac_link) 2>&5
21012   ac_status=$?
21013   echo "$as_me:21013: \$? = $ac_status" >&5
21014   (exit $ac_status); } &&
21015          { ac_try='test -s conftest$ac_exeext'
21016   { (eval echo "$as_me:21016: \"$ac_try\"") >&5
21017   (eval $ac_try) 2>&5
21018   ac_status=$?
21019   echo "$as_me:21019: \$? = $ac_status" >&5
21020   (exit $ac_status); }; }; then
21021   ac_cv_func_bcopy=yes
21022 else
21023   echo "$as_me: failed program was:" >&5
21024 cat conftest.$ac_ext >&5
21025 ac_cv_func_bcopy=no
21026 fi
21027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21028 fi
21029 echo "$as_me:21029: result: $ac_cv_func_bcopy" >&5
21030 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21031 if test $ac_cv_func_bcopy = yes; then
21032
21033         echo "$as_me:21033: checking if bcopy does overlapping moves" >&5
21034 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21035 if test "${cf_cv_good_bcopy+set}" = set; then
21036   echo $ECHO_N "(cached) $ECHO_C" >&6
21037 else
21038
21039                 if test "$cross_compiling" = yes; then
21040   cf_cv_good_bcopy=unknown
21041 else
21042   cat >conftest.$ac_ext <<_ACEOF
21043 #line 21043 "configure"
21044 #include "confdefs.h"
21045
21046 int main(void) {
21047         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21048         char temp[40];
21049         bcopy(data, temp, sizeof(data));
21050         bcopy(temp+10, temp, 15);
21051         bcopy(temp+5, temp+15, 10);
21052         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21053 }
21054
21055 _ACEOF
21056 rm -f conftest$ac_exeext
21057 if { (eval echo "$as_me:21057: \"$ac_link\"") >&5
21058   (eval $ac_link) 2>&5
21059   ac_status=$?
21060   echo "$as_me:21060: \$? = $ac_status" >&5
21061   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21062   { (eval echo "$as_me:21062: \"$ac_try\"") >&5
21063   (eval $ac_try) 2>&5
21064   ac_status=$?
21065   echo "$as_me:21065: \$? = $ac_status" >&5
21066   (exit $ac_status); }; }; then
21067   cf_cv_good_bcopy=yes
21068 else
21069   echo "$as_me: program exited with status $ac_status" >&5
21070 echo "$as_me: failed program was:" >&5
21071 cat conftest.$ac_ext >&5
21072 cf_cv_good_bcopy=no
21073 fi
21074 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21075 fi
21076
21077 fi
21078 echo "$as_me:21078: result: $cf_cv_good_bcopy" >&5
21079 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21080
21081 else
21082   cf_cv_good_bcopy=no
21083 fi
21084
21085         if test "$cf_cv_good_bcopy" = yes ; then
21086
21087 cat >>confdefs.h <<\EOF
21088 #define USE_OK_BCOPY 1
21089 EOF
21090
21091         else
21092
21093 cat >>confdefs.h <<\EOF
21094 #define USE_MY_MEMMOVE 1
21095 EOF
21096
21097         fi
21098
21099 fi
21100
21101 tty 2>&1 >/dev/null || {
21102 for ac_func in posix_openpt
21103 do
21104 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21105 echo "$as_me:21105: checking for $ac_func" >&5
21106 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21107 if eval "test \"\${$as_ac_var+set}\" = set"; then
21108   echo $ECHO_N "(cached) $ECHO_C" >&6
21109 else
21110   cat >conftest.$ac_ext <<_ACEOF
21111 #line 21111 "configure"
21112 #include "confdefs.h"
21113 #define $ac_func autoconf_temporary
21114 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21115 #undef $ac_func
21116
21117 #ifdef __cplusplus
21118 extern "C"
21119 #endif
21120
21121 /* We use char because int might match the return type of a gcc2
21122    builtin and then its argument prototype would still apply.  */
21123 char $ac_func (void);
21124
21125 int
21126 main (void)
21127 {
21128
21129 /* The GNU C library defines stubs for functions which it implements
21130     to always fail with ENOSYS.  Some functions are actually named
21131     something starting with __ and the normal name is an alias.  */
21132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21133 #error found stub for $ac_func
21134 #endif
21135
21136         return $ac_func ();
21137   ;
21138   return 0;
21139 }
21140 _ACEOF
21141 rm -f conftest.$ac_objext conftest$ac_exeext
21142 if { (eval echo "$as_me:21142: \"$ac_link\"") >&5
21143   (eval $ac_link) 2>&5
21144   ac_status=$?
21145   echo "$as_me:21145: \$? = $ac_status" >&5
21146   (exit $ac_status); } &&
21147          { ac_try='test -s conftest$ac_exeext'
21148   { (eval echo "$as_me:21148: \"$ac_try\"") >&5
21149   (eval $ac_try) 2>&5
21150   ac_status=$?
21151   echo "$as_me:21151: \$? = $ac_status" >&5
21152   (exit $ac_status); }; }; then
21153   eval "$as_ac_var=yes"
21154 else
21155   echo "$as_me: failed program was:" >&5
21156 cat conftest.$ac_ext >&5
21157 eval "$as_ac_var=no"
21158 fi
21159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21160 fi
21161 echo "$as_me:21161: result: `eval echo '${'$as_ac_var'}'`" >&5
21162 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21163 if test `eval echo '${'$as_ac_var'}'` = yes; then
21164   cat >>confdefs.h <<EOF
21165 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21166 EOF
21167
21168 fi
21169 done
21170  }
21171 echo "$as_me:21171: checking if poll really works" >&5
21172 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21173 if test "${cf_cv_working_poll+set}" = set; then
21174   echo $ECHO_N "(cached) $ECHO_C" >&6
21175 else
21176
21177 if test "$cross_compiling" = yes; then
21178   cf_cv_working_poll=unknown
21179 else
21180   cat >conftest.$ac_ext <<_ACEOF
21181 #line 21181 "configure"
21182 #include "confdefs.h"
21183
21184 #include <stdlib.h>
21185 #include <stdio.h>
21186 #include <unistd.h>
21187 #include <fcntl.h>
21188 #ifdef HAVE_POLL_H
21189 #include <poll.h>
21190 #else
21191 #include <sys/poll.h>
21192 #endif
21193 int main(void) {
21194         struct pollfd myfds;
21195         int ret;
21196
21197         /* check for Darwin bug with respect to "devices" */
21198         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21199         if (myfds.fd < 0)
21200                 myfds.fd = 0;
21201         myfds.events = POLLIN;
21202         myfds.revents = 0;
21203
21204         ret = poll(&myfds, 1, 100);
21205
21206         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21207                 ret = -1;
21208         } else {
21209                 int fd = 0;
21210                 if (!isatty(fd)) {
21211                         fd = open("/dev/tty", 2);       /* O_RDWR */
21212                 }
21213 #ifdef HAVE_POSIX_OPENPT
21214                 if (fd < 0) {
21215                         fd = posix_openpt(O_RDWR);
21216                 }
21217 #endif
21218
21219                 if (fd >= 0) {
21220                         /* also check with standard input */
21221                         myfds.fd = fd;
21222                         myfds.events = POLLIN;
21223                         myfds.revents = 0;
21224                         ret = poll(&myfds, 1, 100);
21225                 } else {
21226                         ret = -1;
21227                 }
21228         }
21229         ${cf_cv_main_return:-return}(ret < 0);
21230 }
21231 _ACEOF
21232 rm -f conftest$ac_exeext
21233 if { (eval echo "$as_me:21233: \"$ac_link\"") >&5
21234   (eval $ac_link) 2>&5
21235   ac_status=$?
21236   echo "$as_me:21236: \$? = $ac_status" >&5
21237   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21238   { (eval echo "$as_me:21238: \"$ac_try\"") >&5
21239   (eval $ac_try) 2>&5
21240   ac_status=$?
21241   echo "$as_me:21241: \$? = $ac_status" >&5
21242   (exit $ac_status); }; }; then
21243   cf_cv_working_poll=yes
21244 else
21245   echo "$as_me: program exited with status $ac_status" >&5
21246 echo "$as_me: failed program was:" >&5
21247 cat conftest.$ac_ext >&5
21248 cf_cv_working_poll=no
21249 fi
21250 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21251 fi
21252 fi
21253 echo "$as_me:21253: result: $cf_cv_working_poll" >&5
21254 echo "${ECHO_T}$cf_cv_working_poll" >&6
21255 test "$cf_cv_working_poll" = "yes" &&
21256 cat >>confdefs.h <<\EOF
21257 #define HAVE_WORKING_POLL 1
21258 EOF
21259
21260 echo "$as_me:21260: checking for va_copy" >&5
21261 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21262 if test "${cf_cv_have_va_copy+set}" = set; then
21263   echo $ECHO_N "(cached) $ECHO_C" >&6
21264 else
21265
21266 cat >conftest.$ac_ext <<_ACEOF
21267 #line 21267 "configure"
21268 #include "confdefs.h"
21269
21270 #include <stdarg.h>
21271
21272 int
21273 main (void)
21274 {
21275
21276         static va_list dst;
21277         static va_list src;
21278         va_copy(dst, src)
21279   ;
21280   return 0;
21281 }
21282 _ACEOF
21283 rm -f conftest.$ac_objext conftest$ac_exeext
21284 if { (eval echo "$as_me:21284: \"$ac_link\"") >&5
21285   (eval $ac_link) 2>&5
21286   ac_status=$?
21287   echo "$as_me:21287: \$? = $ac_status" >&5
21288   (exit $ac_status); } &&
21289          { ac_try='test -s conftest$ac_exeext'
21290   { (eval echo "$as_me:21290: \"$ac_try\"") >&5
21291   (eval $ac_try) 2>&5
21292   ac_status=$?
21293   echo "$as_me:21293: \$? = $ac_status" >&5
21294   (exit $ac_status); }; }; then
21295   cf_cv_have_va_copy=yes
21296 else
21297   echo "$as_me: failed program was:" >&5
21298 cat conftest.$ac_ext >&5
21299 cf_cv_have_va_copy=no
21300 fi
21301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21302 fi
21303 echo "$as_me:21303: result: $cf_cv_have_va_copy" >&5
21304 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21305
21306 if test "$cf_cv_have_va_copy" = yes;
21307 then
21308
21309 cat >>confdefs.h <<\EOF
21310 #define HAVE_VA_COPY 1
21311 EOF
21312
21313 else # !cf_cv_have_va_copy
21314
21315 echo "$as_me:21315: checking for __va_copy" >&5
21316 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21317 if test "${cf_cv_have___va_copy+set}" = set; then
21318   echo $ECHO_N "(cached) $ECHO_C" >&6
21319 else
21320
21321 cat >conftest.$ac_ext <<_ACEOF
21322 #line 21322 "configure"
21323 #include "confdefs.h"
21324
21325 #include <stdarg.h>
21326
21327 int
21328 main (void)
21329 {
21330
21331         static va_list dst;
21332         static va_list src;
21333         __va_copy(dst, src)
21334   ;
21335   return 0;
21336 }
21337 _ACEOF
21338 rm -f conftest.$ac_objext conftest$ac_exeext
21339 if { (eval echo "$as_me:21339: \"$ac_link\"") >&5
21340   (eval $ac_link) 2>&5
21341   ac_status=$?
21342   echo "$as_me:21342: \$? = $ac_status" >&5
21343   (exit $ac_status); } &&
21344          { ac_try='test -s conftest$ac_exeext'
21345   { (eval echo "$as_me:21345: \"$ac_try\"") >&5
21346   (eval $ac_try) 2>&5
21347   ac_status=$?
21348   echo "$as_me:21348: \$? = $ac_status" >&5
21349   (exit $ac_status); }; }; then
21350   cf_cv_have___va_copy=yes
21351 else
21352   echo "$as_me: failed program was:" >&5
21353 cat conftest.$ac_ext >&5
21354 cf_cv_have___va_copy=no
21355 fi
21356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21357 fi
21358 echo "$as_me:21358: result: $cf_cv_have___va_copy" >&5
21359 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21360
21361 if test "$cf_cv_have___va_copy" = yes
21362 then
21363
21364 cat >>confdefs.h <<\EOF
21365 #define HAVE___VA_COPY 1
21366 EOF
21367
21368 else # !cf_cv_have___va_copy
21369
21370 echo "$as_me:21370: checking for __builtin_va_copy" >&5
21371 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21372 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21373   echo $ECHO_N "(cached) $ECHO_C" >&6
21374 else
21375
21376 cat >conftest.$ac_ext <<_ACEOF
21377 #line 21377 "configure"
21378 #include "confdefs.h"
21379
21380 #include <stdarg.h>
21381
21382 int
21383 main (void)
21384 {
21385
21386         static va_list dst;
21387         static va_list src;
21388         __builtin_va_copy(dst, src)
21389   ;
21390   return 0;
21391 }
21392 _ACEOF
21393 rm -f conftest.$ac_objext conftest$ac_exeext
21394 if { (eval echo "$as_me:21394: \"$ac_link\"") >&5
21395   (eval $ac_link) 2>&5
21396   ac_status=$?
21397   echo "$as_me:21397: \$? = $ac_status" >&5
21398   (exit $ac_status); } &&
21399          { ac_try='test -s conftest$ac_exeext'
21400   { (eval echo "$as_me:21400: \"$ac_try\"") >&5
21401   (eval $ac_try) 2>&5
21402   ac_status=$?
21403   echo "$as_me:21403: \$? = $ac_status" >&5
21404   (exit $ac_status); }; }; then
21405   cf_cv_have___builtin_va_copy=yes
21406 else
21407   echo "$as_me: failed program was:" >&5
21408 cat conftest.$ac_ext >&5
21409 cf_cv_have___builtin_va_copy=no
21410 fi
21411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21412 fi
21413 echo "$as_me:21413: result: $cf_cv_have___builtin_va_copy" >&5
21414 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21415
21416 test "$cf_cv_have___builtin_va_copy" = yes &&
21417
21418 cat >>confdefs.h <<\EOF
21419 #define HAVE___BUILTIN_VA_COPY 1
21420 EOF
21421
21422 fi # cf_cv_have___va_copy
21423
21424 fi # cf_cv_have_va_copy
21425
21426 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21427 (*yes*)
21428         ;;
21429
21430 (*)
21431         echo "$as_me:21431: checking if we can simply copy va_list" >&5
21432 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21433 if test "${cf_cv_pointer_va_list+set}" = set; then
21434   echo $ECHO_N "(cached) $ECHO_C" >&6
21435 else
21436
21437 cat >conftest.$ac_ext <<_ACEOF
21438 #line 21438 "configure"
21439 #include "confdefs.h"
21440
21441 #include <stdarg.h>
21442
21443 int
21444 main (void)
21445 {
21446
21447         va_list dst;
21448         va_list src;
21449         dst = src
21450   ;
21451   return 0;
21452 }
21453 _ACEOF
21454 rm -f conftest.$ac_objext conftest$ac_exeext
21455 if { (eval echo "$as_me:21455: \"$ac_link\"") >&5
21456   (eval $ac_link) 2>&5
21457   ac_status=$?
21458   echo "$as_me:21458: \$? = $ac_status" >&5
21459   (exit $ac_status); } &&
21460          { ac_try='test -s conftest$ac_exeext'
21461   { (eval echo "$as_me:21461: \"$ac_try\"") >&5
21462   (eval $ac_try) 2>&5
21463   ac_status=$?
21464   echo "$as_me:21464: \$? = $ac_status" >&5
21465   (exit $ac_status); }; }; then
21466   cf_cv_pointer_va_list=yes
21467 else
21468   echo "$as_me: failed program was:" >&5
21469 cat conftest.$ac_ext >&5
21470 cf_cv_pointer_va_list=no
21471 fi
21472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21473 fi
21474 echo "$as_me:21474: result: $cf_cv_pointer_va_list" >&5
21475 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21476
21477         if test "$cf_cv_pointer_va_list" = no
21478         then
21479                 echo "$as_me:21479: checking if we can copy va_list indirectly" >&5
21480 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21481 if test "${cf_cv_array_va_list+set}" = set; then
21482   echo $ECHO_N "(cached) $ECHO_C" >&6
21483 else
21484
21485 cat >conftest.$ac_ext <<_ACEOF
21486 #line 21486 "configure"
21487 #include "confdefs.h"
21488
21489 #include <stdarg.h>
21490
21491 int
21492 main (void)
21493 {
21494
21495         va_list dst;
21496         va_list src;
21497         *dst = *src
21498   ;
21499   return 0;
21500 }
21501 _ACEOF
21502 rm -f conftest.$ac_objext conftest$ac_exeext
21503 if { (eval echo "$as_me:21503: \"$ac_link\"") >&5
21504   (eval $ac_link) 2>&5
21505   ac_status=$?
21506   echo "$as_me:21506: \$? = $ac_status" >&5
21507   (exit $ac_status); } &&
21508          { ac_try='test -s conftest$ac_exeext'
21509   { (eval echo "$as_me:21509: \"$ac_try\"") >&5
21510   (eval $ac_try) 2>&5
21511   ac_status=$?
21512   echo "$as_me:21512: \$? = $ac_status" >&5
21513   (exit $ac_status); }; }; then
21514   cf_cv_array_va_list=yes
21515 else
21516   echo "$as_me: failed program was:" >&5
21517 cat conftest.$ac_ext >&5
21518 cf_cv_array_va_list=no
21519 fi
21520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21521 fi
21522 echo "$as_me:21522: result: $cf_cv_array_va_list" >&5
21523 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21524                 test "$cf_cv_array_va_list" = yes &&
21525 cat >>confdefs.h <<\EOF
21526 #define ARRAY_VA_LIST 1
21527 EOF
21528
21529         fi
21530         ;;
21531 esac
21532
21533 echo "$as_me:21533: checking for pid_t" >&5
21534 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21535 if test "${ac_cv_type_pid_t+set}" = set; then
21536   echo $ECHO_N "(cached) $ECHO_C" >&6
21537 else
21538   cat >conftest.$ac_ext <<_ACEOF
21539 #line 21539 "configure"
21540 #include "confdefs.h"
21541 $ac_includes_default
21542 int
21543 main (void)
21544 {
21545 if ((pid_t *) 0)
21546   return 0;
21547 if (sizeof (pid_t))
21548   return 0;
21549   ;
21550   return 0;
21551 }
21552 _ACEOF
21553 rm -f conftest.$ac_objext
21554 if { (eval echo "$as_me:21554: \"$ac_compile\"") >&5
21555   (eval $ac_compile) 2>&5
21556   ac_status=$?
21557   echo "$as_me:21557: \$? = $ac_status" >&5
21558   (exit $ac_status); } &&
21559          { ac_try='test -s conftest.$ac_objext'
21560   { (eval echo "$as_me:21560: \"$ac_try\"") >&5
21561   (eval $ac_try) 2>&5
21562   ac_status=$?
21563   echo "$as_me:21563: \$? = $ac_status" >&5
21564   (exit $ac_status); }; }; then
21565   ac_cv_type_pid_t=yes
21566 else
21567   echo "$as_me: failed program was:" >&5
21568 cat conftest.$ac_ext >&5
21569 ac_cv_type_pid_t=no
21570 fi
21571 rm -f conftest.$ac_objext conftest.$ac_ext
21572 fi
21573 echo "$as_me:21573: result: $ac_cv_type_pid_t" >&5
21574 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21575 if test $ac_cv_type_pid_t = yes; then
21576   :
21577 else
21578
21579 cat >>confdefs.h <<EOF
21580 #define pid_t int
21581 EOF
21582
21583 fi
21584
21585 for ac_header in unistd.h vfork.h
21586 do
21587 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21588 echo "$as_me:21588: checking for $ac_header" >&5
21589 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21590 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21591   echo $ECHO_N "(cached) $ECHO_C" >&6
21592 else
21593   cat >conftest.$ac_ext <<_ACEOF
21594 #line 21594 "configure"
21595 #include "confdefs.h"
21596 #include <$ac_header>
21597 _ACEOF
21598 if { (eval echo "$as_me:21598: \"$ac_cpp conftest.$ac_ext\"") >&5
21599   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21600   ac_status=$?
21601   egrep -v '^ *\+' conftest.er1 >conftest.err
21602   rm -f conftest.er1
21603   cat conftest.err >&5
21604   echo "$as_me:21604: \$? = $ac_status" >&5
21605   (exit $ac_status); } >/dev/null; then
21606   if test -s conftest.err; then
21607     ac_cpp_err=$ac_c_preproc_warn_flag
21608   else
21609     ac_cpp_err=
21610   fi
21611 else
21612   ac_cpp_err=yes
21613 fi
21614 if test -z "$ac_cpp_err"; then
21615   eval "$as_ac_Header=yes"
21616 else
21617   echo "$as_me: failed program was:" >&5
21618   cat conftest.$ac_ext >&5
21619   eval "$as_ac_Header=no"
21620 fi
21621 rm -f conftest.err conftest.$ac_ext
21622 fi
21623 echo "$as_me:21623: result: `eval echo '${'$as_ac_Header'}'`" >&5
21624 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21625 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21626   cat >>confdefs.h <<EOF
21627 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21628 EOF
21629
21630 fi
21631 done
21632
21633 for ac_func in fork vfork
21634 do
21635 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21636 echo "$as_me:21636: checking for $ac_func" >&5
21637 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21638 if eval "test \"\${$as_ac_var+set}\" = set"; then
21639   echo $ECHO_N "(cached) $ECHO_C" >&6
21640 else
21641   cat >conftest.$ac_ext <<_ACEOF
21642 #line 21642 "configure"
21643 #include "confdefs.h"
21644 #define $ac_func autoconf_temporary
21645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21646 #undef $ac_func
21647
21648 #ifdef __cplusplus
21649 extern "C"
21650 #endif
21651
21652 /* We use char because int might match the return type of a gcc2
21653    builtin and then its argument prototype would still apply.  */
21654 char $ac_func (void);
21655
21656 int
21657 main (void)
21658 {
21659
21660 /* The GNU C library defines stubs for functions which it implements
21661     to always fail with ENOSYS.  Some functions are actually named
21662     something starting with __ and the normal name is an alias.  */
21663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21664 #error found stub for $ac_func
21665 #endif
21666
21667         return $ac_func ();
21668   ;
21669   return 0;
21670 }
21671 _ACEOF
21672 rm -f conftest.$ac_objext conftest$ac_exeext
21673 if { (eval echo "$as_me:21673: \"$ac_link\"") >&5
21674   (eval $ac_link) 2>&5
21675   ac_status=$?
21676   echo "$as_me:21676: \$? = $ac_status" >&5
21677   (exit $ac_status); } &&
21678          { ac_try='test -s conftest$ac_exeext'
21679   { (eval echo "$as_me:21679: \"$ac_try\"") >&5
21680   (eval $ac_try) 2>&5
21681   ac_status=$?
21682   echo "$as_me:21682: \$? = $ac_status" >&5
21683   (exit $ac_status); }; }; then
21684   eval "$as_ac_var=yes"
21685 else
21686   echo "$as_me: failed program was:" >&5
21687 cat conftest.$ac_ext >&5
21688 eval "$as_ac_var=no"
21689 fi
21690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21691 fi
21692 echo "$as_me:21692: result: `eval echo '${'$as_ac_var'}'`" >&5
21693 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21694 if test `eval echo '${'$as_ac_var'}'` = yes; then
21695   cat >>confdefs.h <<EOF
21696 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21697 EOF
21698
21699 fi
21700 done
21701
21702 ac_cv_func_fork_works=$ac_cv_func_fork
21703 if test "x$ac_cv_func_fork" = xyes; then
21704   echo "$as_me:21704: checking for working fork" >&5
21705 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21706 if test "${ac_cv_func_fork_works+set}" = set; then
21707   echo $ECHO_N "(cached) $ECHO_C" >&6
21708 else
21709   if test "$cross_compiling" = yes; then
21710   ac_cv_func_fork_works=cross
21711 else
21712   cat >conftest.$ac_ext <<_ACEOF
21713 /* By Rüdiger Kuhlmann. */
21714       #include <sys/types.h>
21715       #if HAVE_UNISTD_H
21716       # include <unistd.h>
21717       #endif
21718       /* Some systems only have a dummy stub for fork() */
21719       int main (void)
21720       {
21721         if (fork() < 0)
21722           $ac_main_return (1);
21723         $ac_main_return (0);
21724       }
21725 _ACEOF
21726 rm -f conftest$ac_exeext
21727 if { (eval echo "$as_me:21727: \"$ac_link\"") >&5
21728   (eval $ac_link) 2>&5
21729   ac_status=$?
21730   echo "$as_me:21730: \$? = $ac_status" >&5
21731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21732   { (eval echo "$as_me:21732: \"$ac_try\"") >&5
21733   (eval $ac_try) 2>&5
21734   ac_status=$?
21735   echo "$as_me:21735: \$? = $ac_status" >&5
21736   (exit $ac_status); }; }; then
21737   ac_cv_func_fork_works=yes
21738 else
21739   echo "$as_me: program exited with status $ac_status" >&5
21740 echo "$as_me: failed program was:" >&5
21741 cat conftest.$ac_ext >&5
21742 ac_cv_func_fork_works=no
21743 fi
21744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21745 fi
21746 fi
21747 echo "$as_me:21747: result: $ac_cv_func_fork_works" >&5
21748 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21749
21750 fi
21751 if test "x$ac_cv_func_fork_works" = xcross; then
21752   case $host in
21753     *-*-amigaos* | *-*-msdosdjgpp*)
21754       # Override, as these systems have only a dummy fork() stub
21755       ac_cv_func_fork_works=no
21756       ;;
21757     *)
21758       ac_cv_func_fork_works=yes
21759       ;;
21760   esac
21761   { echo "$as_me:21761: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21762 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21763 fi
21764 ac_cv_func_vfork_works=$ac_cv_func_vfork
21765 if test "x$ac_cv_func_vfork" = xyes; then
21766   echo "$as_me:21766: checking for working vfork" >&5
21767 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21768 if test "${ac_cv_func_vfork_works+set}" = set; then
21769   echo $ECHO_N "(cached) $ECHO_C" >&6
21770 else
21771   if test "$cross_compiling" = yes; then
21772   ac_cv_func_vfork_works=cross
21773 else
21774   cat >conftest.$ac_ext <<_ACEOF
21775 #line 21775 "configure"
21776 #include "confdefs.h"
21777 /* Thanks to Paul Eggert for this test.  */
21778 #include <stdio.h>
21779 #include <sys/types.h>
21780 #include <sys/stat.h>
21781 #if HAVE_UNISTD_H
21782 # include <unistd.h>
21783 #endif
21784 #if HAVE_VFORK_H
21785 # include <vfork.h>
21786 #endif
21787 /* On some sparc systems, changes by the child to local and incoming
21788    argument registers are propagated back to the parent.  The compiler
21789    is told about this with #include <vfork.h>, but some compilers
21790    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21791    static variable whose address is put into a register that is
21792    clobbered by the vfork.  */
21793 static
21794 #ifdef __cplusplus
21795 sparc_address_test (int arg)
21796 # else
21797 sparc_address_test (arg) int arg;
21798 #endif
21799 {
21800   static pid_t child;
21801   if (!child) {
21802     child = vfork ();
21803     if (child < 0) {
21804       perror ("vfork");
21805       _exit(2);
21806     }
21807     if (!child) {
21808       arg = getpid();
21809       write(-1, "", 0);
21810       _exit (arg);
21811     }
21812   }
21813 }
21814
21815 int
21816 main (void)
21817 {
21818   pid_t parent = getpid ();
21819   pid_t child;
21820
21821   sparc_address_test ();
21822
21823   child = vfork ();
21824
21825   if (child == 0) {
21826     /* Here is another test for sparc vfork register problems.  This
21827        test uses lots of local variables, at least as many local
21828        variables as main has allocated so far including compiler
21829        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21830        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21831        reuse the register of parent for one of the local variables,
21832        since it will think that parent can't possibly be used any more
21833        in this routine.  Assigning to the local variable will thus
21834        munge parent in the parent process.  */
21835     pid_t
21836       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21837       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21838     /* Convince the compiler that p..p7 are live; otherwise, it might
21839        use the same hardware register for all 8 local variables.  */
21840     if (p != p1 || p != p2 || p != p3 || p != p4
21841         || p != p5 || p != p6 || p != p7)
21842       _exit(1);
21843
21844     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21845        from child file descriptors.  If the child closes a descriptor
21846        before it execs or exits, this munges the parent's descriptor
21847        as well.  Test for this by closing stdout in the child.  */
21848     _exit(close(fileno(stdout)) != 0);
21849   } else {
21850     int status;
21851     struct stat st;
21852
21853     while (wait(&status) != child)
21854       ;
21855     $ac_main_return(
21856          /* Was there some problem with vforking?  */
21857          child < 0
21858
21859          /* Did the child fail?  (This shouldn't happen.)  */
21860          || status
21861
21862          /* Did the vfork/compiler bug occur?  */
21863          || parent != getpid()
21864
21865          /* Did the file descriptor bug occur?  */
21866          || fstat(fileno(stdout), &st) != 0
21867          );
21868   }
21869 }
21870 _ACEOF
21871 rm -f conftest$ac_exeext
21872 if { (eval echo "$as_me:21872: \"$ac_link\"") >&5
21873   (eval $ac_link) 2>&5
21874   ac_status=$?
21875   echo "$as_me:21875: \$? = $ac_status" >&5
21876   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21877   { (eval echo "$as_me:21877: \"$ac_try\"") >&5
21878   (eval $ac_try) 2>&5
21879   ac_status=$?
21880   echo "$as_me:21880: \$? = $ac_status" >&5
21881   (exit $ac_status); }; }; then
21882   ac_cv_func_vfork_works=yes
21883 else
21884   echo "$as_me: program exited with status $ac_status" >&5
21885 echo "$as_me: failed program was:" >&5
21886 cat conftest.$ac_ext >&5
21887 ac_cv_func_vfork_works=no
21888 fi
21889 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21890 fi
21891 fi
21892 echo "$as_me:21892: result: $ac_cv_func_vfork_works" >&5
21893 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21894
21895 fi;
21896 if test "x$ac_cv_func_fork_works" = xcross; then
21897   ac_cv_func_vfork_works=ac_cv_func_vfork
21898   { echo "$as_me:21898: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21899 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21900 fi
21901
21902 if test "x$ac_cv_func_vfork_works" = xyes; then
21903
21904 cat >>confdefs.h <<\EOF
21905 #define HAVE_WORKING_VFORK 1
21906 EOF
21907
21908 else
21909
21910 cat >>confdefs.h <<\EOF
21911 #define vfork fork
21912 EOF
21913
21914 fi
21915 if test "x$ac_cv_func_fork_works" = xyes; then
21916
21917 cat >>confdefs.h <<\EOF
21918 #define HAVE_WORKING_FORK 1
21919 EOF
21920
21921 fi
21922
21923 echo "$as_me:21923: checking if fopen accepts explicit binary mode" >&5
21924 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21925 if test "${cf_cv_fopen_bin_r+set}" = set; then
21926   echo $ECHO_N "(cached) $ECHO_C" >&6
21927 else
21928
21929         if test "$cross_compiling" = yes; then
21930   cf_cv_fopen_bin_r=unknown
21931 else
21932   cat >conftest.$ac_ext <<_ACEOF
21933 #line 21933 "configure"
21934 #include "confdefs.h"
21935
21936 #include <stdio.h>
21937 int main(void) {
21938         FILE *fp = fopen("conftest.tmp", "wb");
21939         int rc = 0;
21940         if (fp != 0) {
21941                 int p, q;
21942                 for (p = 0; p < 256; ++p) {
21943                         fputc(p, fp);
21944                 }
21945                 fclose(fp);
21946                 fp = fopen("conftest.tmp", "rb");
21947                 if (fp != 0) {
21948                         for (p = 0; p < 256; ++p) {
21949                                 q = fgetc(fp);
21950                                 if (q != p) {
21951                                         rc = 1;
21952                                         break;
21953                                 }
21954                         }
21955                 } else {
21956                         rc = 1;
21957                 }
21958         } else {
21959                 rc = 1;
21960         }
21961         ${cf_cv_main_return:-return} (rc);
21962 }
21963
21964 _ACEOF
21965 rm -f conftest$ac_exeext
21966 if { (eval echo "$as_me:21966: \"$ac_link\"") >&5
21967   (eval $ac_link) 2>&5
21968   ac_status=$?
21969   echo "$as_me:21969: \$? = $ac_status" >&5
21970   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21971   { (eval echo "$as_me:21971: \"$ac_try\"") >&5
21972   (eval $ac_try) 2>&5
21973   ac_status=$?
21974   echo "$as_me:21974: \$? = $ac_status" >&5
21975   (exit $ac_status); }; }; then
21976   cf_cv_fopen_bin_r=yes
21977 else
21978   echo "$as_me: program exited with status $ac_status" >&5
21979 echo "$as_me: failed program was:" >&5
21980 cat conftest.$ac_ext >&5
21981 cf_cv_fopen_bin_r=no
21982 fi
21983 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21984 fi
21985
21986 fi
21987 echo "$as_me:21987: result: $cf_cv_fopen_bin_r" >&5
21988 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21989 test "x$cf_cv_fopen_bin_r" != xno &&
21990 cat >>confdefs.h <<\EOF
21991 #define USE_FOPEN_BIN_R 1
21992 EOF
21993
21994 # special check for test/ditto.c
21995
21996 echo "$as_me:21996: checking for openpty in -lutil" >&5
21997 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21998 if test "${ac_cv_lib_util_openpty+set}" = set; then
21999   echo $ECHO_N "(cached) $ECHO_C" >&6
22000 else
22001   ac_check_lib_save_LIBS=$LIBS
22002 LIBS="-lutil  $LIBS"
22003 cat >conftest.$ac_ext <<_ACEOF
22004 #line 22004 "configure"
22005 #include "confdefs.h"
22006
22007 /* Override any gcc2 internal prototype to avoid an error.  */
22008 #ifdef __cplusplus
22009 extern "C"
22010 #endif
22011 /* We use char because int might match the return type of a gcc2
22012    builtin and then its argument prototype would still apply.  */
22013 char openpty ();
22014 int
22015 main (void)
22016 {
22017 openpty ();
22018   ;
22019   return 0;
22020 }
22021 _ACEOF
22022 rm -f conftest.$ac_objext conftest$ac_exeext
22023 if { (eval echo "$as_me:22023: \"$ac_link\"") >&5
22024   (eval $ac_link) 2>&5
22025   ac_status=$?
22026   echo "$as_me:22026: \$? = $ac_status" >&5
22027   (exit $ac_status); } &&
22028          { ac_try='test -s conftest$ac_exeext'
22029   { (eval echo "$as_me:22029: \"$ac_try\"") >&5
22030   (eval $ac_try) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit $ac_status); }; }; then
22034   ac_cv_lib_util_openpty=yes
22035 else
22036   echo "$as_me: failed program was:" >&5
22037 cat conftest.$ac_ext >&5
22038 ac_cv_lib_util_openpty=no
22039 fi
22040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22041 LIBS=$ac_check_lib_save_LIBS
22042 fi
22043 echo "$as_me:22043: result: $ac_cv_lib_util_openpty" >&5
22044 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22045 if test $ac_cv_lib_util_openpty = yes; then
22046   cf_cv_lib_util=yes
22047 else
22048   cf_cv_lib_util=no
22049 fi
22050
22051 echo "$as_me:22051: checking for openpty header" >&5
22052 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22053 if test "${cf_cv_func_openpty+set}" = set; then
22054   echo $ECHO_N "(cached) $ECHO_C" >&6
22055 else
22056
22057         cf_save_LIBS="$LIBS"
22058         test $cf_cv_lib_util = yes && {
22059 cf_add_libs="$LIBS"
22060 # reverse order
22061 cf_add_0lib=
22062 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22063 # filter duplicates
22064 for cf_add_1lib in $cf_add_0lib; do
22065         for cf_add_2lib in $cf_add_libs; do
22066                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22067                         cf_add_1lib=
22068                         break
22069                 fi
22070         done
22071         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22072 done
22073 LIBS="$cf_add_libs"
22074  }
22075         for cf_header in pty.h libutil.h util.h
22076         do
22077         cat >conftest.$ac_ext <<_ACEOF
22078 #line 22078 "configure"
22079 #include "confdefs.h"
22080
22081 #include <$cf_header>
22082
22083 int
22084 main (void)
22085 {
22086
22087         int x = openpty((int *)0, (int *)0, (char *)0,
22088                                    (struct termios *)0, (struct winsize *)0);
22089
22090   ;
22091   return 0;
22092 }
22093 _ACEOF
22094 rm -f conftest.$ac_objext conftest$ac_exeext
22095 if { (eval echo "$as_me:22095: \"$ac_link\"") >&5
22096   (eval $ac_link) 2>&5
22097   ac_status=$?
22098   echo "$as_me:22098: \$? = $ac_status" >&5
22099   (exit $ac_status); } &&
22100          { ac_try='test -s conftest$ac_exeext'
22101   { (eval echo "$as_me:22101: \"$ac_try\"") >&5
22102   (eval $ac_try) 2>&5
22103   ac_status=$?
22104   echo "$as_me:22104: \$? = $ac_status" >&5
22105   (exit $ac_status); }; }; then
22106
22107                 cf_cv_func_openpty=$cf_header
22108                 break
22109
22110 else
22111   echo "$as_me: failed program was:" >&5
22112 cat conftest.$ac_ext >&5
22113
22114                 cf_cv_func_openpty=no
22115
22116 fi
22117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22118         done
22119         LIBS="$cf_save_LIBS"
22120
22121 fi
22122 echo "$as_me:22122: result: $cf_cv_func_openpty" >&5
22123 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22124
22125 if test "$cf_cv_func_openpty" != no ; then
22126
22127 cat >>confdefs.h <<EOF
22128 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22129 EOF
22130
22131 cat >>confdefs.h <<\EOF
22132 #define USE_XTERM_PTY 1
22133 EOF
22134
22135         if test "x$cf_cv_lib_util" = xyes ; then
22136
22137 cf_add_libs="$TEST_LIBS"
22138 # reverse order
22139 cf_add_0lib=
22140 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22141 # filter duplicates
22142 for cf_add_1lib in $cf_add_0lib; do
22143         for cf_add_2lib in $cf_add_libs; do
22144                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22145                         cf_add_1lib=
22146                         break
22147                 fi
22148         done
22149         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22150 done
22151 TEST_LIBS="$cf_add_libs"
22152
22153         fi
22154 fi
22155
22156 if test "$with_hashed_db" != no ; then
22157
22158 cat >>confdefs.h <<\EOF
22159 #define USE_HASHED_DB 1
22160 EOF
22161
22162 case $with_hashed_db in
22163 (yes|*able*)
22164         ;;
22165 (*)
22166         if test -d "$with_hashed_db" ; then
22167
22168 if test -n "$with_hashed_db/include" ; then
22169   for cf_add_incdir in $with_hashed_db/include
22170   do
22171         while test $cf_add_incdir != /usr/include
22172         do
22173           if test -d $cf_add_incdir
22174           then
22175                 cf_have_incdir=no
22176                 if test -n "$CFLAGS$CPPFLAGS" ; then
22177                   # a loop is needed to ensure we can add subdirs of existing dirs
22178                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22179                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22180                           cf_have_incdir=yes; break
22181                         fi
22182                   done
22183                 fi
22184
22185                 if test "$cf_have_incdir" = no ; then
22186                   if test "$cf_add_incdir" = /usr/local/include ; then
22187                         if test "$GCC" = yes
22188                         then
22189                           cf_save_CPPFLAGS=$CPPFLAGS
22190
22191         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22192         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22193
22194                           cat >conftest.$ac_ext <<_ACEOF
22195 #line 22195 "configure"
22196 #include "confdefs.h"
22197 #include <stdio.h>
22198 int
22199 main (void)
22200 {
22201 printf("Hello")
22202   ;
22203   return 0;
22204 }
22205 _ACEOF
22206 rm -f conftest.$ac_objext
22207 if { (eval echo "$as_me:22207: \"$ac_compile\"") >&5
22208   (eval $ac_compile) 2>&5
22209   ac_status=$?
22210   echo "$as_me:22210: \$? = $ac_status" >&5
22211   (exit $ac_status); } &&
22212          { ac_try='test -s conftest.$ac_objext'
22213   { (eval echo "$as_me:22213: \"$ac_try\"") >&5
22214   (eval $ac_try) 2>&5
22215   ac_status=$?
22216   echo "$as_me:22216: \$? = $ac_status" >&5
22217   (exit $ac_status); }; }; then
22218   :
22219 else
22220   echo "$as_me: failed program was:" >&5
22221 cat conftest.$ac_ext >&5
22222 cf_have_incdir=yes
22223 fi
22224 rm -f conftest.$ac_objext conftest.$ac_ext
22225                           CPPFLAGS=$cf_save_CPPFLAGS
22226                         fi
22227                   fi
22228                 fi
22229
22230                 if test "$cf_have_incdir" = no ; then
22231                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22232
22233 echo "${as_me:-configure}:22233: testing adding $cf_add_incdir to include-path ..." 1>&5
22234
22235                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22236
22237                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22238                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22239                   cf_add_incdir="$cf_top_incdir"
22240                 else
22241                   break
22242                 fi
22243           else
22244                 break
22245           fi
22246         done
22247   done
22248 fi
22249
22250 if test -n "$with_hashed_db/lib" ; then
22251         for cf_add_libdir in $with_hashed_db/lib
22252         do
22253                 if test $cf_add_libdir = /usr/lib ; then
22254                         :
22255                 elif test -d $cf_add_libdir
22256                 then
22257                         cf_have_libdir=no
22258                         if test -n "$LDFLAGS$LIBS" ; then
22259                                 # a loop is needed to ensure we can add subdirs of existing dirs
22260                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22261                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22262                                                 cf_have_libdir=yes; break
22263                                         fi
22264                                 done
22265                         fi
22266                         if test "$cf_have_libdir" = no ; then
22267                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22268
22269 echo "${as_me:-configure}:22269: testing adding $cf_add_libdir to library-path ..." 1>&5
22270
22271                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22272                         fi
22273                 fi
22274         done
22275 fi
22276
22277         else
22278                 case "$with_hashed_db" in
22279                 (./*|../*|/*)
22280                         { echo "$as_me:22280: WARNING: no such directory $with_hashed_db" >&5
22281 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22282                         ;;
22283                 (*)
22284
22285 cf_search=
22286
22287 test "x$prefix" != "xNONE" && \
22288 test -d "$prefix" && \
22289  {
22290         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22291         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22292         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22293         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22294         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22295         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22296 }
22297
22298 for cf_subdir_prefix in \
22299         /usr \
22300         /usr/local \
22301         /usr/pkg \
22302         /opt \
22303         /opt/local \
22304         $HOME
22305 do
22306
22307 test "x$cf_subdir_prefix" != "x$prefix" && \
22308 test -d "$cf_subdir_prefix" && \
22309 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22310         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22311         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22312         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22313         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22314         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22315         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"
22316 }
22317
22318 done
22319
22320         for cf_item in $cf_search
22321         do
22322                 case $cf_item in
22323                 (*/$with_hashed_db)
22324
22325 if test -n "$cf_item" ; then
22326   for cf_add_incdir in $cf_item
22327   do
22328         while test $cf_add_incdir != /usr/include
22329         do
22330           if test -d $cf_add_incdir
22331           then
22332                 cf_have_incdir=no
22333                 if test -n "$CFLAGS$CPPFLAGS" ; then
22334                   # a loop is needed to ensure we can add subdirs of existing dirs
22335                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22336                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22337                           cf_have_incdir=yes; break
22338                         fi
22339                   done
22340                 fi
22341
22342                 if test "$cf_have_incdir" = no ; then
22343                   if test "$cf_add_incdir" = /usr/local/include ; then
22344                         if test "$GCC" = yes
22345                         then
22346                           cf_save_CPPFLAGS=$CPPFLAGS
22347
22348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22349         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22350
22351                           cat >conftest.$ac_ext <<_ACEOF
22352 #line 22352 "configure"
22353 #include "confdefs.h"
22354 #include <stdio.h>
22355 int
22356 main (void)
22357 {
22358 printf("Hello")
22359   ;
22360   return 0;
22361 }
22362 _ACEOF
22363 rm -f conftest.$ac_objext
22364 if { (eval echo "$as_me:22364: \"$ac_compile\"") >&5
22365   (eval $ac_compile) 2>&5
22366   ac_status=$?
22367   echo "$as_me:22367: \$? = $ac_status" >&5
22368   (exit $ac_status); } &&
22369          { ac_try='test -s conftest.$ac_objext'
22370   { (eval echo "$as_me:22370: \"$ac_try\"") >&5
22371   (eval $ac_try) 2>&5
22372   ac_status=$?
22373   echo "$as_me:22373: \$? = $ac_status" >&5
22374   (exit $ac_status); }; }; then
22375   :
22376 else
22377   echo "$as_me: failed program was:" >&5
22378 cat conftest.$ac_ext >&5
22379 cf_have_incdir=yes
22380 fi
22381 rm -f conftest.$ac_objext conftest.$ac_ext
22382                           CPPFLAGS=$cf_save_CPPFLAGS
22383                         fi
22384                   fi
22385                 fi
22386
22387                 if test "$cf_have_incdir" = no ; then
22388                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22389
22390 echo "${as_me:-configure}:22390: testing adding $cf_add_incdir to include-path ..." 1>&5
22391
22392                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22393
22394                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22395                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22396                   cf_add_incdir="$cf_top_incdir"
22397                 else
22398                   break
22399                 fi
22400           else
22401                 break
22402           fi
22403         done
22404   done
22405 fi
22406
22407                         ;;
22408                 esac
22409         done
22410
22411 cf_search=
22412
22413 test "x$prefix" != "xNONE" && \
22414 test -d "$prefix" && \
22415  {
22416         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22417         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22418         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22419         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22420         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22421         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22422 }
22423
22424 for cf_subdir_prefix in \
22425         /usr \
22426         /usr/local \
22427         /usr/pkg \
22428         /opt \
22429         /opt/local \
22430         $HOME
22431 do
22432
22433 test "x$cf_subdir_prefix" != "x$prefix" && \
22434 test -d "$cf_subdir_prefix" && \
22435 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22436         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22437         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22438         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22439         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22440         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22441         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"
22442 }
22443
22444 done
22445
22446         for cf_item in $cf_search
22447         do
22448                 case $cf_item in
22449                 (*/$with_hashed_db)
22450
22451 if test -n "$cf_item" ; then
22452         for cf_add_libdir in $cf_item
22453         do
22454                 if test $cf_add_libdir = /usr/lib ; then
22455                         :
22456                 elif test -d $cf_add_libdir
22457                 then
22458                         cf_have_libdir=no
22459                         if test -n "$LDFLAGS$LIBS" ; then
22460                                 # a loop is needed to ensure we can add subdirs of existing dirs
22461                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22462                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22463                                                 cf_have_libdir=yes; break
22464                                         fi
22465                                 done
22466                         fi
22467                         if test "$cf_have_libdir" = no ; then
22468                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22469
22470 echo "${as_me:-configure}:22470: testing adding $cf_add_libdir to library-path ..." 1>&5
22471
22472                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22473                         fi
22474                 fi
22475         done
22476 fi
22477
22478                         ;;
22479                 esac
22480         done
22481
22482                         ;;
22483                 esac
22484         fi
22485 esac
22486
22487 echo "$as_me:22487: checking for db.h" >&5
22488 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22489 if test "${ac_cv_header_db_h+set}" = set; then
22490   echo $ECHO_N "(cached) $ECHO_C" >&6
22491 else
22492   cat >conftest.$ac_ext <<_ACEOF
22493 #line 22493 "configure"
22494 #include "confdefs.h"
22495 #include <db.h>
22496 _ACEOF
22497 if { (eval echo "$as_me:22497: \"$ac_cpp conftest.$ac_ext\"") >&5
22498   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22499   ac_status=$?
22500   egrep -v '^ *\+' conftest.er1 >conftest.err
22501   rm -f conftest.er1
22502   cat conftest.err >&5
22503   echo "$as_me:22503: \$? = $ac_status" >&5
22504   (exit $ac_status); } >/dev/null; then
22505   if test -s conftest.err; then
22506     ac_cpp_err=$ac_c_preproc_warn_flag
22507   else
22508     ac_cpp_err=
22509   fi
22510 else
22511   ac_cpp_err=yes
22512 fi
22513 if test -z "$ac_cpp_err"; then
22514   ac_cv_header_db_h=yes
22515 else
22516   echo "$as_me: failed program was:" >&5
22517   cat conftest.$ac_ext >&5
22518   ac_cv_header_db_h=no
22519 fi
22520 rm -f conftest.err conftest.$ac_ext
22521 fi
22522 echo "$as_me:22522: result: $ac_cv_header_db_h" >&5
22523 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22524 if test $ac_cv_header_db_h = yes; then
22525
22526 echo "$as_me:22526: checking for version of db" >&5
22527 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22528 if test "${cf_cv_hashed_db_version+set}" = set; then
22529   echo $ECHO_N "(cached) $ECHO_C" >&6
22530 else
22531
22532 cf_cv_hashed_db_version=unknown
22533
22534 for cf_db_version in 1 2 3 4 5 6
22535 do
22536
22537 echo "${as_me:-configure}:22537: testing checking for db version $cf_db_version ..." 1>&5
22538
22539         cat >conftest.$ac_ext <<_ACEOF
22540 #line 22540 "configure"
22541 #include "confdefs.h"
22542
22543 $ac_includes_default
22544 #include <db.h>
22545
22546 #ifdef DB_VERSION_MAJOR
22547         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22548 #if $cf_db_version == DB_VERSION_MAJOR
22549         /* ok */
22550 #else
22551         make an error
22552 #endif
22553 #else
22554 #if $cf_db_version == 1
22555         /* ok: assuming this is DB 1.8.5 */
22556 #else
22557         make an error
22558 #endif
22559 #endif
22560
22561 int
22562 main (void)
22563 {
22564 DBT *foo = 0
22565   ;
22566   return 0;
22567 }
22568 _ACEOF
22569 rm -f conftest.$ac_objext
22570 if { (eval echo "$as_me:22570: \"$ac_compile\"") >&5
22571   (eval $ac_compile) 2>&5
22572   ac_status=$?
22573   echo "$as_me:22573: \$? = $ac_status" >&5
22574   (exit $ac_status); } &&
22575          { ac_try='test -s conftest.$ac_objext'
22576   { (eval echo "$as_me:22576: \"$ac_try\"") >&5
22577   (eval $ac_try) 2>&5
22578   ac_status=$?
22579   echo "$as_me:22579: \$? = $ac_status" >&5
22580   (exit $ac_status); }; }; then
22581
22582         cf_cv_hashed_db_version=$cf_db_version
22583         break
22584
22585 else
22586   echo "$as_me: failed program was:" >&5
22587 cat conftest.$ac_ext >&5
22588 fi
22589 rm -f conftest.$ac_objext conftest.$ac_ext
22590 done
22591
22592 fi
22593 echo "$as_me:22593: result: $cf_cv_hashed_db_version" >&5
22594 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22595
22596 if test "$cf_cv_hashed_db_version" = unknown ; then
22597         { { echo "$as_me:22597: error: Cannot determine version of db" >&5
22598 echo "$as_me: error: Cannot determine version of db" >&2;}
22599    { (exit 1); exit 1; }; }
22600 else
22601
22602 echo "$as_me:22602: checking for db libraries" >&5
22603 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22604 if test "${cf_cv_hashed_db_libs+set}" = set; then
22605   echo $ECHO_N "(cached) $ECHO_C" >&6
22606 else
22607
22608 cf_cv_hashed_db_libs=unknown
22609 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22610 do
22611         cf_save_libs="$LIBS"
22612         if test -n "$cf_db_libs"; then
22613
22614 cf_add_libs="$LIBS"
22615 # reverse order
22616 cf_add_0lib=
22617 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22618 # filter duplicates
22619 for cf_add_1lib in $cf_add_0lib; do
22620         for cf_add_2lib in $cf_add_libs; do
22621                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22622                         cf_add_1lib=
22623                         break
22624                 fi
22625         done
22626         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22627 done
22628 LIBS="$cf_add_libs"
22629
22630         fi
22631
22632 echo "${as_me:-configure}:22632: testing checking for library "$cf_db_libs" ..." 1>&5
22633
22634         cat >conftest.$ac_ext <<_ACEOF
22635 #line 22635 "configure"
22636 #include "confdefs.h"
22637
22638 $ac_includes_default
22639 #include <db.h>
22640
22641 int
22642 main (void)
22643 {
22644
22645         char *path = "/tmp/foo";
22646 #ifdef DB_VERSION_MAJOR
22647 #if DB_VERSION_MAJOR >= 4
22648         DB *result = 0;
22649         db_create(&result, NULL, 0);
22650         result->open(result,
22651                 NULL,
22652                 path,
22653                 path,
22654                 DB_HASH,
22655                 DB_CREATE,
22656                 0644);
22657 #elif DB_VERSION_MAJOR >= 3
22658         DB *result = 0;
22659         db_create(&result, NULL, 0);
22660         result->open(result,
22661                 path,
22662                 path,
22663                 DB_HASH,
22664                 DB_CREATE,
22665                 0644);
22666 #elif DB_VERSION_MAJOR >= 2
22667         DB *result = 0;
22668         db_open(path,
22669                 DB_HASH,
22670                 DB_CREATE,
22671                 0644,
22672                 (DB_ENV *) 0,
22673                 (DB_INFO *) 0,
22674                 &result);
22675 #endif /* DB_VERSION_MAJOR */
22676 #else
22677         DB *result = dbopen(path,
22678                      2,
22679                      0644,
22680                      DB_HASH,
22681                      0);
22682 #endif
22683         ${cf_cv_main_return:-return}(result != 0)
22684
22685   ;
22686   return 0;
22687 }
22688 _ACEOF
22689 rm -f conftest.$ac_objext conftest$ac_exeext
22690 if { (eval echo "$as_me:22690: \"$ac_link\"") >&5
22691   (eval $ac_link) 2>&5
22692   ac_status=$?
22693   echo "$as_me:22693: \$? = $ac_status" >&5
22694   (exit $ac_status); } &&
22695          { ac_try='test -s conftest$ac_exeext'
22696   { (eval echo "$as_me:22696: \"$ac_try\"") >&5
22697   (eval $ac_try) 2>&5
22698   ac_status=$?
22699   echo "$as_me:22699: \$? = $ac_status" >&5
22700   (exit $ac_status); }; }; then
22701
22702         if test -n "$cf_db_libs" ; then
22703                 cf_cv_hashed_db_libs=$cf_db_libs
22704         else
22705                 cf_cv_hashed_db_libs=default
22706         fi
22707         LIBS="$cf_save_libs"
22708         break
22709
22710 else
22711   echo "$as_me: failed program was:" >&5
22712 cat conftest.$ac_ext >&5
22713 fi
22714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22715         LIBS="$cf_save_libs"
22716 done
22717
22718 fi
22719 echo "$as_me:22719: result: $cf_cv_hashed_db_libs" >&5
22720 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22721
22722         if test "$cf_cv_hashed_db_libs" = unknown ; then
22723                 { { echo "$as_me:22723: error: Cannot determine library for db" >&5
22724 echo "$as_me: error: Cannot determine library for db" >&2;}
22725    { (exit 1); exit 1; }; }
22726         elif test "$cf_cv_hashed_db_libs" != default ; then
22727
22728 cf_add_libs="$LIBS"
22729 # reverse order
22730 cf_add_0lib=
22731 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22732 # filter duplicates
22733 for cf_add_1lib in $cf_add_0lib; do
22734         for cf_add_2lib in $cf_add_libs; do
22735                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22736                         cf_add_1lib=
22737                         break
22738                 fi
22739         done
22740         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22741 done
22742 LIBS="$cf_add_libs"
22743
22744         fi
22745 fi
22746
22747 else
22748
22749         { { echo "$as_me:22749: error: Cannot find db.h" >&5
22750 echo "$as_me: error: Cannot find db.h" >&2;}
22751    { (exit 1); exit 1; }; }
22752
22753 fi
22754
22755 fi
22756
22757 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22758         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22759         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22760 fi
22761
22762 # Just in case, check if the C compiler has a bool type.
22763
22764 echo "$as_me:22764: checking if we should include stdbool.h" >&5
22765 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22766
22767 if test "${cf_cv_header_stdbool_h+set}" = set; then
22768   echo $ECHO_N "(cached) $ECHO_C" >&6
22769 else
22770
22771         cat >conftest.$ac_ext <<_ACEOF
22772 #line 22772 "configure"
22773 #include "confdefs.h"
22774
22775 int
22776 main (void)
22777 {
22778 bool foo = false
22779   ;
22780   return 0;
22781 }
22782 _ACEOF
22783 rm -f conftest.$ac_objext
22784 if { (eval echo "$as_me:22784: \"$ac_compile\"") >&5
22785   (eval $ac_compile) 2>&5
22786   ac_status=$?
22787   echo "$as_me:22787: \$? = $ac_status" >&5
22788   (exit $ac_status); } &&
22789          { ac_try='test -s conftest.$ac_objext'
22790   { (eval echo "$as_me:22790: \"$ac_try\"") >&5
22791   (eval $ac_try) 2>&5
22792   ac_status=$?
22793   echo "$as_me:22793: \$? = $ac_status" >&5
22794   (exit $ac_status); }; }; then
22795   cf_cv_header_stdbool_h=0
22796 else
22797   echo "$as_me: failed program was:" >&5
22798 cat conftest.$ac_ext >&5
22799 cat >conftest.$ac_ext <<_ACEOF
22800 #line 22800 "configure"
22801 #include "confdefs.h"
22802
22803 #ifndef __BEOS__
22804 #include <stdbool.h>
22805 #endif
22806
22807 int
22808 main (void)
22809 {
22810 bool foo = false
22811   ;
22812   return 0;
22813 }
22814 _ACEOF
22815 rm -f conftest.$ac_objext
22816 if { (eval echo "$as_me:22816: \"$ac_compile\"") >&5
22817   (eval $ac_compile) 2>&5
22818   ac_status=$?
22819   echo "$as_me:22819: \$? = $ac_status" >&5
22820   (exit $ac_status); } &&
22821          { ac_try='test -s conftest.$ac_objext'
22822   { (eval echo "$as_me:22822: \"$ac_try\"") >&5
22823   (eval $ac_try) 2>&5
22824   ac_status=$?
22825   echo "$as_me:22825: \$? = $ac_status" >&5
22826   (exit $ac_status); }; }; then
22827   cf_cv_header_stdbool_h=1
22828 else
22829   echo "$as_me: failed program was:" >&5
22830 cat conftest.$ac_ext >&5
22831 cf_cv_header_stdbool_h=0
22832 fi
22833 rm -f conftest.$ac_objext conftest.$ac_ext
22834 fi
22835 rm -f conftest.$ac_objext conftest.$ac_ext
22836 fi
22837
22838 if test "$cf_cv_header_stdbool_h" = 1
22839 then    echo "$as_me:22839: result: yes" >&5
22840 echo "${ECHO_T}yes" >&6
22841 else    echo "$as_me:22841: result: no" >&5
22842 echo "${ECHO_T}no" >&6
22843 fi
22844
22845 echo "$as_me:22845: checking for builtin bool type" >&5
22846 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22847
22848 if test "${cf_cv_cc_bool_type+set}" = set; then
22849   echo $ECHO_N "(cached) $ECHO_C" >&6
22850 else
22851
22852         cat >conftest.$ac_ext <<_ACEOF
22853 #line 22853 "configure"
22854 #include "confdefs.h"
22855
22856 #include <stdio.h>
22857 #include <sys/types.h>
22858
22859 int
22860 main (void)
22861 {
22862 bool x = false
22863   ;
22864   return 0;
22865 }
22866 _ACEOF
22867 rm -f conftest.$ac_objext
22868 if { (eval echo "$as_me:22868: \"$ac_compile\"") >&5
22869   (eval $ac_compile) 2>&5
22870   ac_status=$?
22871   echo "$as_me:22871: \$? = $ac_status" >&5
22872   (exit $ac_status); } &&
22873          { ac_try='test -s conftest.$ac_objext'
22874   { (eval echo "$as_me:22874: \"$ac_try\"") >&5
22875   (eval $ac_try) 2>&5
22876   ac_status=$?
22877   echo "$as_me:22877: \$? = $ac_status" >&5
22878   (exit $ac_status); }; }; then
22879   cf_cv_cc_bool_type=1
22880 else
22881   echo "$as_me: failed program was:" >&5
22882 cat conftest.$ac_ext >&5
22883 cf_cv_cc_bool_type=0
22884 fi
22885 rm -f conftest.$ac_objext conftest.$ac_ext
22886
22887 fi
22888
22889 if test "$cf_cv_cc_bool_type" = 1
22890 then    echo "$as_me:22890: result: yes" >&5
22891 echo "${ECHO_T}yes" >&6
22892 else    echo "$as_me:22892: result: no" >&5
22893 echo "${ECHO_T}no" >&6
22894 fi
22895
22896 # Check for C++ compiler characteristics (and ensure that it's there!)
22897 if test -n "$CXX" ; then
22898         ac_ext=cc
22899 ac_cpp='$CXXCPP $CPPFLAGS'
22900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22903 ac_main_return=return
22904
22905 if test -n "$GXX" ; then
22906
22907         cf_save="$LIBS"
22908         LIBS="$LIBS $CXXLIBS"
22909         echo "$as_me:22909: checking if we already have C++ library" >&5
22910 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22911         cat >conftest.$ac_ext <<_ACEOF
22912 #line 22912 "configure"
22913 #include "confdefs.h"
22914
22915                         #include <iostream>
22916 int
22917 main (void)
22918 {
22919
22920                         std::cout << "Hello World!" << std::endl;
22921   ;
22922   return 0;
22923 }
22924 _ACEOF
22925 rm -f conftest.$ac_objext conftest$ac_exeext
22926 if { (eval echo "$as_me:22926: \"$ac_link\"") >&5
22927   (eval $ac_link) 2>&5
22928   ac_status=$?
22929   echo "$as_me:22929: \$? = $ac_status" >&5
22930   (exit $ac_status); } &&
22931          { ac_try='test -s conftest$ac_exeext'
22932   { (eval echo "$as_me:22932: \"$ac_try\"") >&5
22933   (eval $ac_try) 2>&5
22934   ac_status=$?
22935   echo "$as_me:22935: \$? = $ac_status" >&5
22936   (exit $ac_status); }; }; then
22937   cf_have_libstdcpp=yes
22938 else
22939   echo "$as_me: failed program was:" >&5
22940 cat conftest.$ac_ext >&5
22941 cf_have_libstdcpp=no
22942 fi
22943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22944         echo "$as_me:22944: result: $cf_have_libstdcpp" >&5
22945 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22946         LIBS="$cf_save"
22947
22948         if test $cf_have_libstdcpp != yes
22949         then
22950                 case $cf_cv_system_name in
22951                 (os2*)
22952                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22953                                 cf_stdcpp_libname=stdcpp
22954                         else
22955                                 cf_stdcpp_libname=stdc++
22956                         fi
22957                         ;;
22958                 (*)
22959                         cf_stdcpp_libname=stdc++
22960                         ;;
22961                 esac
22962
22963                 echo "$as_me:22963: checking for library $cf_stdcpp_libname" >&5
22964 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22965 if test "${cf_cv_libstdcpp+set}" = set; then
22966   echo $ECHO_N "(cached) $ECHO_C" >&6
22967 else
22968
22969                         cf_save="$LIBS"
22970                         LIBS="$LIBS $CXXLIBS"
22971
22972 cf_add_libs="$LIBS"
22973 # reverse order
22974 cf_add_0lib=
22975 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22976 # filter duplicates
22977 for cf_add_1lib in $cf_add_0lib; do
22978         for cf_add_2lib in $cf_add_libs; do
22979                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22980                         cf_add_1lib=
22981                         break
22982                 fi
22983         done
22984         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22985 done
22986 LIBS="$cf_add_libs"
22987
22988                 cat >conftest.$ac_ext <<_ACEOF
22989 #line 22989 "configure"
22990 #include "confdefs.h"
22991
22992                                 #include <iostream>
22993 int
22994 main (void)
22995 {
22996
22997                                 std::cout << "Hello World!" << std::endl;
22998   ;
22999   return 0;
23000 }
23001 _ACEOF
23002 rm -f conftest.$ac_objext conftest$ac_exeext
23003 if { (eval echo "$as_me:23003: \"$ac_link\"") >&5
23004   (eval $ac_link) 2>&5
23005   ac_status=$?
23006   echo "$as_me:23006: \$? = $ac_status" >&5
23007   (exit $ac_status); } &&
23008          { ac_try='test -s conftest$ac_exeext'
23009   { (eval echo "$as_me:23009: \"$ac_try\"") >&5
23010   (eval $ac_try) 2>&5
23011   ac_status=$?
23012   echo "$as_me:23012: \$? = $ac_status" >&5
23013   (exit $ac_status); }; }; then
23014   cf_cv_libstdcpp=yes
23015 else
23016   echo "$as_me: failed program was:" >&5
23017 cat conftest.$ac_ext >&5
23018 cf_cv_libstdcpp=no
23019 fi
23020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23021                         LIBS="$cf_save"
23022
23023 fi
23024 echo "$as_me:23024: result: $cf_cv_libstdcpp" >&5
23025 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23026                 test "$cf_cv_libstdcpp" = yes && {
23027 cf_add_libs="$CXXLIBS"
23028 # reverse order
23029 cf_add_0lib=
23030 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23031 # filter duplicates
23032 for cf_add_1lib in $cf_add_0lib; do
23033         for cf_add_2lib in $cf_add_libs; do
23034                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23035                         cf_add_1lib=
23036                         break
23037                 fi
23038         done
23039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23040 done
23041 CXXLIBS="$cf_add_libs"
23042  }
23043         fi
23044 fi
23045
23046         echo "$as_me:23046: checking whether $CXX understands -c and -o together" >&5
23047 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23048 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23049   echo $ECHO_N "(cached) $ECHO_C" >&6
23050 else
23051
23052 cat > conftest.$ac_ext <<CF_EOF
23053 int main(void)
23054 {
23055         ${cf_cv_main_return:-return}(0);
23056 }
23057 CF_EOF
23058 # We do the test twice because some compilers refuse to overwrite an
23059 # existing .o file with -o, though they will create one.
23060 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23061 if { (eval echo "$as_me:23061: \"$ac_try\"") >&5
23062   (eval $ac_try) 2>&5
23063   ac_status=$?
23064   echo "$as_me:23064: \$? = $ac_status" >&5
23065   (exit $ac_status); } &&
23066   test -f conftest2.$ac_objext && { (eval echo "$as_me:23066: \"$ac_try\"") >&5
23067   (eval $ac_try) 2>&5
23068   ac_status=$?
23069   echo "$as_me:23069: \$? = $ac_status" >&5
23070   (exit $ac_status); };
23071 then
23072   eval cf_cv_prog_CXX_c_o=yes
23073 else
23074   eval cf_cv_prog_CXX_c_o=no
23075 fi
23076 rm -rf conftest*
23077
23078 fi
23079 if test $cf_cv_prog_CXX_c_o = yes; then
23080   echo "$as_me:23080: result: yes" >&5
23081 echo "${ECHO_T}yes" >&6
23082 else
23083   echo "$as_me:23083: result: no" >&5
23084 echo "${ECHO_T}no" >&6
23085 fi
23086
23087         case $GXX_VERSION in
23088         (1*|2.0-6*)
23089                 cf_cxx_library=yes
23090                 ;;
23091         (*-2.7*|2.7*)
23092
23093 cf_cxx_library=unknown
23094 case $cf_cv_system_name in
23095 (os2*)
23096         cf_gpp_libname=gpp
23097         ;;
23098 (*)
23099         cf_gpp_libname=g++
23100         ;;
23101 esac
23102 if test "$GXX" = yes; then
23103         echo "$as_me:23103: checking for lib$cf_gpp_libname" >&5
23104 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23105         cf_save="$LIBS"
23106
23107 cf_add_libs="$LIBS"
23108 # reverse order
23109 cf_add_0lib=
23110 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23111 # filter duplicates
23112 for cf_add_1lib in $cf_add_0lib; do
23113         for cf_add_2lib in $cf_add_libs; do
23114                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23115                         cf_add_1lib=
23116                         break
23117                 fi
23118         done
23119         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23120 done
23121 LIBS="$cf_add_libs"
23122
23123         cat >conftest.$ac_ext <<_ACEOF
23124 #line 23124 "configure"
23125 #include "confdefs.h"
23126
23127 #include <$cf_gpp_libname/builtin.h>
23128
23129 int
23130 main (void)
23131 {
23132 two_arg_error_handler_t foo2 = lib_error_handler
23133   ;
23134   return 0;
23135 }
23136 _ACEOF
23137 rm -f conftest.$ac_objext conftest$ac_exeext
23138 if { (eval echo "$as_me:23138: \"$ac_link\"") >&5
23139   (eval $ac_link) 2>&5
23140   ac_status=$?
23141   echo "$as_me:23141: \$? = $ac_status" >&5
23142   (exit $ac_status); } &&
23143          { ac_try='test -s conftest$ac_exeext'
23144   { (eval echo "$as_me:23144: \"$ac_try\"") >&5
23145   (eval $ac_try) 2>&5
23146   ac_status=$?
23147   echo "$as_me:23147: \$? = $ac_status" >&5
23148   (exit $ac_status); }; }; then
23149   cf_cxx_library=yes
23150
23151 cf_add_libs="$CXXLIBS"
23152 # reverse order
23153 cf_add_0lib=
23154 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23155 # filter duplicates
23156 for cf_add_1lib in $cf_add_0lib; do
23157         for cf_add_2lib in $cf_add_libs; do
23158                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23159                         cf_add_1lib=
23160                         break
23161                 fi
23162         done
23163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23164 done
23165 CXXLIBS="$cf_add_libs"
23166
23167          if test "$cf_gpp_libname" = cpp ; then
23168
23169 cat >>confdefs.h <<\EOF
23170 #define HAVE_GPP_BUILTIN_H 1
23171 EOF
23172
23173          else
23174
23175 cat >>confdefs.h <<\EOF
23176 #define HAVE_GXX_BUILTIN_H 1
23177 EOF
23178
23179          fi
23180 else
23181   echo "$as_me: failed program was:" >&5
23182 cat conftest.$ac_ext >&5
23183 cat >conftest.$ac_ext <<_ACEOF
23184 #line 23184 "configure"
23185 #include "confdefs.h"
23186
23187 #include <builtin.h>
23188
23189 int
23190 main (void)
23191 {
23192 two_arg_error_handler_t foo2 = lib_error_handler
23193   ;
23194   return 0;
23195 }
23196 _ACEOF
23197 rm -f conftest.$ac_objext conftest$ac_exeext
23198 if { (eval echo "$as_me:23198: \"$ac_link\"") >&5
23199   (eval $ac_link) 2>&5
23200   ac_status=$?
23201   echo "$as_me:23201: \$? = $ac_status" >&5
23202   (exit $ac_status); } &&
23203          { ac_try='test -s conftest$ac_exeext'
23204   { (eval echo "$as_me:23204: \"$ac_try\"") >&5
23205   (eval $ac_try) 2>&5
23206   ac_status=$?
23207   echo "$as_me:23207: \$? = $ac_status" >&5
23208   (exit $ac_status); }; }; then
23209   cf_cxx_library=yes
23210
23211 cf_add_libs="$CXXLIBS"
23212 # reverse order
23213 cf_add_0lib=
23214 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23215 # filter duplicates
23216 for cf_add_1lib in $cf_add_0lib; do
23217         for cf_add_2lib in $cf_add_libs; do
23218                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23219                         cf_add_1lib=
23220                         break
23221                 fi
23222         done
23223         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23224 done
23225 CXXLIBS="$cf_add_libs"
23226
23227 cat >>confdefs.h <<\EOF
23228 #define HAVE_BUILTIN_H 1
23229 EOF
23230
23231 else
23232   echo "$as_me: failed program was:" >&5
23233 cat conftest.$ac_ext >&5
23234 cf_cxx_library=no
23235 fi
23236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23237 fi
23238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23239         LIBS="$cf_save"
23240         echo "$as_me:23240: result: $cf_cxx_library" >&5
23241 echo "${ECHO_T}$cf_cxx_library" >&6
23242 fi
23243
23244                 ;;
23245         (*)
23246                 cf_cxx_library=no
23247                 ;;
23248         esac
23249
23250         ac_ext=cc
23251 ac_cpp='$CXXCPP $CPPFLAGS'
23252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23255 ac_main_return=return
23256 echo "$as_me:23256: checking how to run the C++ preprocessor" >&5
23257 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23258 if test -z "$CXXCPP"; then
23259   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23260   echo $ECHO_N "(cached) $ECHO_C" >&6
23261 else
23262       # Double quotes because CXXCPP needs to be expanded
23263     for CXXCPP in "$CXX -E" "/lib/cpp"
23264     do
23265       ac_preproc_ok=false
23266 for ac_cxx_preproc_warn_flag in '' yes
23267 do
23268   # Use a header file that comes with gcc, so configuring glibc
23269   # with a fresh cross-compiler works.
23270   # On the NeXT, cc -E runs the code through the compiler's parser,
23271   # not just through cpp. "Syntax error" is here to catch this case.
23272   cat >conftest.$ac_ext <<_ACEOF
23273 #line 23273 "configure"
23274 #include "confdefs.h"
23275 #include <assert.h>
23276                      Syntax error
23277 _ACEOF
23278 if { (eval echo "$as_me:23278: \"$ac_cpp conftest.$ac_ext\"") >&5
23279   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23280   ac_status=$?
23281   egrep -v '^ *\+' conftest.er1 >conftest.err
23282   rm -f conftest.er1
23283   cat conftest.err >&5
23284   echo "$as_me:23284: \$? = $ac_status" >&5
23285   (exit $ac_status); } >/dev/null; then
23286   if test -s conftest.err; then
23287     ac_cpp_err=$ac_cxx_preproc_warn_flag
23288   else
23289     ac_cpp_err=
23290   fi
23291 else
23292   ac_cpp_err=yes
23293 fi
23294 if test -z "$ac_cpp_err"; then
23295   :
23296 else
23297   echo "$as_me: failed program was:" >&5
23298   cat conftest.$ac_ext >&5
23299   # Broken: fails on valid input.
23300 continue
23301 fi
23302 rm -f conftest.err conftest.$ac_ext
23303
23304   # OK, works on sane cases.  Now check whether non-existent headers
23305   # can be detected and how.
23306   cat >conftest.$ac_ext <<_ACEOF
23307 #line 23307 "configure"
23308 #include "confdefs.h"
23309 #include <ac_nonexistent.h>
23310 _ACEOF
23311 if { (eval echo "$as_me:23311: \"$ac_cpp conftest.$ac_ext\"") >&5
23312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23313   ac_status=$?
23314   egrep -v '^ *\+' conftest.er1 >conftest.err
23315   rm -f conftest.er1
23316   cat conftest.err >&5
23317   echo "$as_me:23317: \$? = $ac_status" >&5
23318   (exit $ac_status); } >/dev/null; then
23319   if test -s conftest.err; then
23320     ac_cpp_err=$ac_cxx_preproc_warn_flag
23321   else
23322     ac_cpp_err=
23323   fi
23324 else
23325   ac_cpp_err=yes
23326 fi
23327 if test -z "$ac_cpp_err"; then
23328   # Broken: success on invalid input.
23329 continue
23330 else
23331   echo "$as_me: failed program was:" >&5
23332   cat conftest.$ac_ext >&5
23333   # Passes both tests.
23334 ac_preproc_ok=:
23335 break
23336 fi
23337 rm -f conftest.err conftest.$ac_ext
23338
23339 done
23340 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23341 rm -f conftest.err conftest.$ac_ext
23342 if $ac_preproc_ok; then
23343   break
23344 fi
23345
23346     done
23347     ac_cv_prog_CXXCPP=$CXXCPP
23348
23349 fi
23350   CXXCPP=$ac_cv_prog_CXXCPP
23351 else
23352   ac_cv_prog_CXXCPP=$CXXCPP
23353 fi
23354 echo "$as_me:23354: result: $CXXCPP" >&5
23355 echo "${ECHO_T}$CXXCPP" >&6
23356 ac_preproc_ok=false
23357 for ac_cxx_preproc_warn_flag in '' yes
23358 do
23359   # Use a header file that comes with gcc, so configuring glibc
23360   # with a fresh cross-compiler works.
23361   # On the NeXT, cc -E runs the code through the compiler's parser,
23362   # not just through cpp. "Syntax error" is here to catch this case.
23363   cat >conftest.$ac_ext <<_ACEOF
23364 #line 23364 "configure"
23365 #include "confdefs.h"
23366 #include <assert.h>
23367                      Syntax error
23368 _ACEOF
23369 if { (eval echo "$as_me:23369: \"$ac_cpp conftest.$ac_ext\"") >&5
23370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23371   ac_status=$?
23372   egrep -v '^ *\+' conftest.er1 >conftest.err
23373   rm -f conftest.er1
23374   cat conftest.err >&5
23375   echo "$as_me:23375: \$? = $ac_status" >&5
23376   (exit $ac_status); } >/dev/null; then
23377   if test -s conftest.err; then
23378     ac_cpp_err=$ac_cxx_preproc_warn_flag
23379   else
23380     ac_cpp_err=
23381   fi
23382 else
23383   ac_cpp_err=yes
23384 fi
23385 if test -z "$ac_cpp_err"; then
23386   :
23387 else
23388   echo "$as_me: failed program was:" >&5
23389   cat conftest.$ac_ext >&5
23390   # Broken: fails on valid input.
23391 continue
23392 fi
23393 rm -f conftest.err conftest.$ac_ext
23394
23395   # OK, works on sane cases.  Now check whether non-existent headers
23396   # can be detected and how.
23397   cat >conftest.$ac_ext <<_ACEOF
23398 #line 23398 "configure"
23399 #include "confdefs.h"
23400 #include <ac_nonexistent.h>
23401 _ACEOF
23402 if { (eval echo "$as_me:23402: \"$ac_cpp conftest.$ac_ext\"") >&5
23403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23404   ac_status=$?
23405   egrep -v '^ *\+' conftest.er1 >conftest.err
23406   rm -f conftest.er1
23407   cat conftest.err >&5
23408   echo "$as_me:23408: \$? = $ac_status" >&5
23409   (exit $ac_status); } >/dev/null; then
23410   if test -s conftest.err; then
23411     ac_cpp_err=$ac_cxx_preproc_warn_flag
23412   else
23413     ac_cpp_err=
23414   fi
23415 else
23416   ac_cpp_err=yes
23417 fi
23418 if test -z "$ac_cpp_err"; then
23419   # Broken: success on invalid input.
23420 continue
23421 else
23422   echo "$as_me: failed program was:" >&5
23423   cat conftest.$ac_ext >&5
23424   # Passes both tests.
23425 ac_preproc_ok=:
23426 break
23427 fi
23428 rm -f conftest.err conftest.$ac_ext
23429
23430 done
23431 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23432 rm -f conftest.err conftest.$ac_ext
23433 if $ac_preproc_ok; then
23434   :
23435 else
23436   { { echo "$as_me:23436: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23437 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23438    { (exit 1); exit 1; }; }
23439 fi
23440
23441 ac_ext=cc
23442 ac_cpp='$CXXCPP $CPPFLAGS'
23443 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23444 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23445 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23446 ac_main_return=return
23447
23448 for ac_header in typeinfo
23449 do
23450 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23451 echo "$as_me:23451: checking for $ac_header" >&5
23452 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23453 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23454   echo $ECHO_N "(cached) $ECHO_C" >&6
23455 else
23456   cat >conftest.$ac_ext <<_ACEOF
23457 #line 23457 "configure"
23458 #include "confdefs.h"
23459 #include <$ac_header>
23460 _ACEOF
23461 if { (eval echo "$as_me:23461: \"$ac_cpp conftest.$ac_ext\"") >&5
23462   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23463   ac_status=$?
23464   egrep -v '^ *\+' conftest.er1 >conftest.err
23465   rm -f conftest.er1
23466   cat conftest.err >&5
23467   echo "$as_me:23467: \$? = $ac_status" >&5
23468   (exit $ac_status); } >/dev/null; then
23469   if test -s conftest.err; then
23470     ac_cpp_err=$ac_cxx_preproc_warn_flag
23471   else
23472     ac_cpp_err=
23473   fi
23474 else
23475   ac_cpp_err=yes
23476 fi
23477 if test -z "$ac_cpp_err"; then
23478   eval "$as_ac_Header=yes"
23479 else
23480   echo "$as_me: failed program was:" >&5
23481   cat conftest.$ac_ext >&5
23482   eval "$as_ac_Header=no"
23483 fi
23484 rm -f conftest.err conftest.$ac_ext
23485 fi
23486 echo "$as_me:23486: result: `eval echo '${'$as_ac_Header'}'`" >&5
23487 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23488 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23489   cat >>confdefs.h <<EOF
23490 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23491 EOF
23492
23493 fi
23494 done
23495
23496 for ac_header in iostream
23497 do
23498 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23499 echo "$as_me:23499: checking for $ac_header" >&5
23500 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23501 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23502   echo $ECHO_N "(cached) $ECHO_C" >&6
23503 else
23504   cat >conftest.$ac_ext <<_ACEOF
23505 #line 23505 "configure"
23506 #include "confdefs.h"
23507 #include <$ac_header>
23508 _ACEOF
23509 if { (eval echo "$as_me:23509: \"$ac_cpp conftest.$ac_ext\"") >&5
23510   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23511   ac_status=$?
23512   egrep -v '^ *\+' conftest.er1 >conftest.err
23513   rm -f conftest.er1
23514   cat conftest.err >&5
23515   echo "$as_me:23515: \$? = $ac_status" >&5
23516   (exit $ac_status); } >/dev/null; then
23517   if test -s conftest.err; then
23518     ac_cpp_err=$ac_cxx_preproc_warn_flag
23519   else
23520     ac_cpp_err=
23521   fi
23522 else
23523   ac_cpp_err=yes
23524 fi
23525 if test -z "$ac_cpp_err"; then
23526   eval "$as_ac_Header=yes"
23527 else
23528   echo "$as_me: failed program was:" >&5
23529   cat conftest.$ac_ext >&5
23530   eval "$as_ac_Header=no"
23531 fi
23532 rm -f conftest.err conftest.$ac_ext
23533 fi
23534 echo "$as_me:23534: result: `eval echo '${'$as_ac_Header'}'`" >&5
23535 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23536 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23537   cat >>confdefs.h <<EOF
23538 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23539 EOF
23540
23541 fi
23542 done
23543
23544 if test x"$ac_cv_header_iostream" = xyes ; then
23545         echo "$as_me:23545: checking if iostream uses std-namespace" >&5
23546 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23547         cat >conftest.$ac_ext <<_ACEOF
23548 #line 23548 "configure"
23549 #include "confdefs.h"
23550
23551 #include <iostream>
23552 using std::endl;
23553 using std::cerr;
23554 int
23555 main (void)
23556 {
23557
23558 cerr << "testing" << endl;
23559
23560   ;
23561   return 0;
23562 }
23563 _ACEOF
23564 rm -f conftest.$ac_objext
23565 if { (eval echo "$as_me:23565: \"$ac_compile\"") >&5
23566   (eval $ac_compile) 2>&5
23567   ac_status=$?
23568   echo "$as_me:23568: \$? = $ac_status" >&5
23569   (exit $ac_status); } &&
23570          { ac_try='test -s conftest.$ac_objext'
23571   { (eval echo "$as_me:23571: \"$ac_try\"") >&5
23572   (eval $ac_try) 2>&5
23573   ac_status=$?
23574   echo "$as_me:23574: \$? = $ac_status" >&5
23575   (exit $ac_status); }; }; then
23576   cf_iostream_namespace=yes
23577 else
23578   echo "$as_me: failed program was:" >&5
23579 cat conftest.$ac_ext >&5
23580 cf_iostream_namespace=no
23581 fi
23582 rm -f conftest.$ac_objext conftest.$ac_ext
23583         echo "$as_me:23583: result: $cf_iostream_namespace" >&5
23584 echo "${ECHO_T}$cf_iostream_namespace" >&6
23585         if test "$cf_iostream_namespace" = yes ; then
23586
23587 cat >>confdefs.h <<\EOF
23588 #define IOSTREAM_NAMESPACE 1
23589 EOF
23590
23591         fi
23592 fi
23593
23594 echo "$as_me:23594: checking if we should include stdbool.h" >&5
23595 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23596
23597 if test "${cf_cv_header_stdbool_h+set}" = set; then
23598   echo $ECHO_N "(cached) $ECHO_C" >&6
23599 else
23600
23601         cat >conftest.$ac_ext <<_ACEOF
23602 #line 23602 "configure"
23603 #include "confdefs.h"
23604
23605 int
23606 main (void)
23607 {
23608 bool foo = false
23609   ;
23610   return 0;
23611 }
23612 _ACEOF
23613 rm -f conftest.$ac_objext
23614 if { (eval echo "$as_me:23614: \"$ac_compile\"") >&5
23615   (eval $ac_compile) 2>&5
23616   ac_status=$?
23617   echo "$as_me:23617: \$? = $ac_status" >&5
23618   (exit $ac_status); } &&
23619          { ac_try='test -s conftest.$ac_objext'
23620   { (eval echo "$as_me:23620: \"$ac_try\"") >&5
23621   (eval $ac_try) 2>&5
23622   ac_status=$?
23623   echo "$as_me:23623: \$? = $ac_status" >&5
23624   (exit $ac_status); }; }; then
23625   cf_cv_header_stdbool_h=0
23626 else
23627   echo "$as_me: failed program was:" >&5
23628 cat conftest.$ac_ext >&5
23629 cat >conftest.$ac_ext <<_ACEOF
23630 #line 23630 "configure"
23631 #include "confdefs.h"
23632
23633 #ifndef __BEOS__
23634 #include <stdbool.h>
23635 #endif
23636
23637 int
23638 main (void)
23639 {
23640 bool foo = false
23641   ;
23642   return 0;
23643 }
23644 _ACEOF
23645 rm -f conftest.$ac_objext
23646 if { (eval echo "$as_me:23646: \"$ac_compile\"") >&5
23647   (eval $ac_compile) 2>&5
23648   ac_status=$?
23649   echo "$as_me:23649: \$? = $ac_status" >&5
23650   (exit $ac_status); } &&
23651          { ac_try='test -s conftest.$ac_objext'
23652   { (eval echo "$as_me:23652: \"$ac_try\"") >&5
23653   (eval $ac_try) 2>&5
23654   ac_status=$?
23655   echo "$as_me:23655: \$? = $ac_status" >&5
23656   (exit $ac_status); }; }; then
23657   cf_cv_header_stdbool_h=1
23658 else
23659   echo "$as_me: failed program was:" >&5
23660 cat conftest.$ac_ext >&5
23661 cf_cv_header_stdbool_h=0
23662 fi
23663 rm -f conftest.$ac_objext conftest.$ac_ext
23664 fi
23665 rm -f conftest.$ac_objext conftest.$ac_ext
23666 fi
23667
23668 if test "$cf_cv_header_stdbool_h" = 1
23669 then    echo "$as_me:23669: result: yes" >&5
23670 echo "${ECHO_T}yes" >&6
23671 else    echo "$as_me:23671: result: no" >&5
23672 echo "${ECHO_T}no" >&6
23673 fi
23674
23675 echo "$as_me:23675: checking for builtin bool type" >&5
23676 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23677
23678 if test "${cf_cv_builtin_bool+set}" = set; then
23679   echo $ECHO_N "(cached) $ECHO_C" >&6
23680 else
23681
23682         cat >conftest.$ac_ext <<_ACEOF
23683 #line 23683 "configure"
23684 #include "confdefs.h"
23685
23686 #include <stdio.h>
23687 #include <sys/types.h>
23688
23689 int
23690 main (void)
23691 {
23692 bool x = false
23693   ;
23694   return 0;
23695 }
23696 _ACEOF
23697 rm -f conftest.$ac_objext
23698 if { (eval echo "$as_me:23698: \"$ac_compile\"") >&5
23699   (eval $ac_compile) 2>&5
23700   ac_status=$?
23701   echo "$as_me:23701: \$? = $ac_status" >&5
23702   (exit $ac_status); } &&
23703          { ac_try='test -s conftest.$ac_objext'
23704   { (eval echo "$as_me:23704: \"$ac_try\"") >&5
23705   (eval $ac_try) 2>&5
23706   ac_status=$?
23707   echo "$as_me:23707: \$? = $ac_status" >&5
23708   (exit $ac_status); }; }; then
23709   cf_cv_builtin_bool=1
23710 else
23711   echo "$as_me: failed program was:" >&5
23712 cat conftest.$ac_ext >&5
23713 cf_cv_builtin_bool=0
23714 fi
23715 rm -f conftest.$ac_objext conftest.$ac_ext
23716
23717 fi
23718
23719 if test "$cf_cv_builtin_bool" = 1
23720 then    echo "$as_me:23720: result: yes" >&5
23721 echo "${ECHO_T}yes" >&6
23722 else    echo "$as_me:23722: result: no" >&5
23723 echo "${ECHO_T}no" >&6
23724 fi
23725
23726 echo "$as_me:23726: checking for size of bool" >&5
23727 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23728 if test "${cf_cv_type_of_bool+set}" = set; then
23729   echo $ECHO_N "(cached) $ECHO_C" >&6
23730 else
23731
23732         rm -f cf_test.out
23733         if test "$cross_compiling" = yes; then
23734   cf_cv_type_of_bool=unknown
23735 else
23736   cat >conftest.$ac_ext <<_ACEOF
23737 #line 23737 "configure"
23738 #include "confdefs.h"
23739
23740 #include <stdlib.h>
23741 #include <stdio.h>
23742
23743 #if defined(__cplusplus)
23744
23745 #ifdef HAVE_GXX_BUILTIN_H
23746 #include <g++/builtin.h>
23747 #elif HAVE_GPP_BUILTIN_H
23748 #include <gpp/builtin.h>
23749 #elif HAVE_BUILTIN_H
23750 #include <builtin.h>
23751 #endif
23752
23753 #else
23754
23755 #if $cf_cv_header_stdbool_h
23756 #include <stdbool.h>
23757 #endif
23758
23759 #endif
23760
23761 int main(void)
23762 {
23763         FILE *fp = fopen("cf_test.out", "w");
23764         if (fp != 0) {
23765                 bool x = true;
23766                 if ((bool)(-x) >= 0)
23767                         fputs("unsigned ", fp);
23768                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23769                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23770                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23771                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23772                 fclose(fp);
23773         }
23774         ${cf_cv_main_return:-return}(0);
23775 }
23776
23777 _ACEOF
23778 rm -f conftest$ac_exeext
23779 if { (eval echo "$as_me:23779: \"$ac_link\"") >&5
23780   (eval $ac_link) 2>&5
23781   ac_status=$?
23782   echo "$as_me:23782: \$? = $ac_status" >&5
23783   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23784   { (eval echo "$as_me:23784: \"$ac_try\"") >&5
23785   (eval $ac_try) 2>&5
23786   ac_status=$?
23787   echo "$as_me:23787: \$? = $ac_status" >&5
23788   (exit $ac_status); }; }; then
23789   cf_cv_type_of_bool=`cat cf_test.out`
23790                  if test -z "$cf_cv_type_of_bool"; then
23791                    cf_cv_type_of_bool=unknown
23792                  fi
23793 else
23794   echo "$as_me: program exited with status $ac_status" >&5
23795 echo "$as_me: failed program was:" >&5
23796 cat conftest.$ac_ext >&5
23797 cf_cv_type_of_bool=unknown
23798 fi
23799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23800 fi
23801
23802 fi
23803
23804         rm -f cf_test.out
23805 echo "$as_me:23805: result: $cf_cv_type_of_bool" >&5
23806 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23807 if test "$cf_cv_type_of_bool" = unknown ; then
23808         case .$NCURSES_BOOL in
23809         (.auto|.) NCURSES_BOOL=unsigned;;
23810         esac
23811         { echo "$as_me:23811: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23812 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23813         cf_cv_type_of_bool=$NCURSES_BOOL
23814 fi
23815
23816 echo "$as_me:23816: checking for special defines needed for etip.h" >&5
23817 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23818 cf_save_CXXFLAGS="$CXXFLAGS"
23819 cf_result="none"
23820
23821 # etip.h includes ncurses.h which includes ncurses_dll.h
23822 # But ncurses_dll.h is generated - fix here.
23823 test -d include || mkdir include
23824 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
23825
23826 for cf_math in "" MATH_H
23827 do
23828 for cf_excp in "" MATH_EXCEPTION
23829 do
23830         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23831         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23832         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23833 cat >conftest.$ac_ext <<_ACEOF
23834 #line 23834 "configure"
23835 #include "confdefs.h"
23836
23837 #include <etip.h.in>
23838
23839 int
23840 main (void)
23841 {
23842
23843   ;
23844   return 0;
23845 }
23846 _ACEOF
23847 rm -f conftest.$ac_objext
23848 if { (eval echo "$as_me:23848: \"$ac_compile\"") >&5
23849   (eval $ac_compile) 2>&5
23850   ac_status=$?
23851   echo "$as_me:23851: \$? = $ac_status" >&5
23852   (exit $ac_status); } &&
23853          { ac_try='test -s conftest.$ac_objext'
23854   { (eval echo "$as_me:23854: \"$ac_try\"") >&5
23855   (eval $ac_try) 2>&5
23856   ac_status=$?
23857   echo "$as_me:23857: \$? = $ac_status" >&5
23858   (exit $ac_status); }; }; then
23859
23860         test -n "$cf_math" && cat >>confdefs.h <<EOF
23861 #define ETIP_NEEDS_${cf_math} 1
23862 EOF
23863
23864         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23865 #define ETIP_NEEDS_${cf_excp} 1
23866 EOF
23867
23868         cf_result="$cf_math $cf_excp"
23869         break 2
23870
23871 else
23872   echo "$as_me: failed program was:" >&5
23873 cat conftest.$ac_ext >&5
23874 fi
23875 rm -f conftest.$ac_objext conftest.$ac_ext
23876 done
23877 done
23878 echo "$as_me:23878: result: $cf_result" >&5
23879 echo "${ECHO_T}$cf_result" >&6
23880 CXXFLAGS="$cf_save_CXXFLAGS"
23881
23882 if test -n "$CXX"; then
23883 echo "$as_me:23883: checking if $CXX accepts parameter initialization" >&5
23884 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23885 if test "${cf_cv_cpp_param_init+set}" = set; then
23886   echo $ECHO_N "(cached) $ECHO_C" >&6
23887 else
23888
23889         ac_ext=cc
23890 ac_cpp='$CXXCPP $CPPFLAGS'
23891 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23892 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23893 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23894 ac_main_return=return
23895
23896         if test "$cross_compiling" = yes; then
23897   cf_cv_cpp_param_init=unknown
23898 else
23899   cat >conftest.$ac_ext <<_ACEOF
23900 #line 23900 "configure"
23901 #include "confdefs.h"
23902
23903 class TEST {
23904 private:
23905         int value;
23906 public:
23907         TEST(int x = 1);
23908         ~TEST();
23909 };
23910
23911 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23912 {
23913         value = x;
23914 }
23915 int main(void) { }
23916
23917 _ACEOF
23918 rm -f conftest$ac_exeext
23919 if { (eval echo "$as_me:23919: \"$ac_link\"") >&5
23920   (eval $ac_link) 2>&5
23921   ac_status=$?
23922   echo "$as_me:23922: \$? = $ac_status" >&5
23923   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23924   { (eval echo "$as_me:23924: \"$ac_try\"") >&5
23925   (eval $ac_try) 2>&5
23926   ac_status=$?
23927   echo "$as_me:23927: \$? = $ac_status" >&5
23928   (exit $ac_status); }; }; then
23929   cf_cv_cpp_param_init=yes
23930 else
23931   echo "$as_me: program exited with status $ac_status" >&5
23932 echo "$as_me: failed program was:" >&5
23933 cat conftest.$ac_ext >&5
23934 cf_cv_cpp_param_init=no
23935 fi
23936 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23937 fi
23938         ac_ext=cc
23939 ac_cpp='$CXXCPP $CPPFLAGS'
23940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23943 ac_main_return=return
23944
23945 fi
23946 echo "$as_me:23946: result: $cf_cv_cpp_param_init" >&5
23947 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23948 fi
23949 test "$cf_cv_cpp_param_init" = yes &&
23950 cat >>confdefs.h <<\EOF
23951 #define CPP_HAS_PARAM_INIT 1
23952 EOF
23953
23954 if test -n "$CXX"; then
23955
23956 echo "$as_me:23956: checking if $CXX accepts static_cast" >&5
23957 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23958 if test "${cf_cv_cpp_static_cast+set}" = set; then
23959   echo $ECHO_N "(cached) $ECHO_C" >&6
23960 else
23961
23962         ac_ext=cc
23963 ac_cpp='$CXXCPP $CPPFLAGS'
23964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23965 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23967 ac_main_return=return
23968
23969         cat >conftest.$ac_ext <<_ACEOF
23970 #line 23970 "configure"
23971 #include "confdefs.h"
23972
23973 class NCursesPanel
23974 {
23975 public:
23976   NCursesPanel(int nlines,
23977                int ncols,
23978                int begin_y = 0,
23979                int begin_x = 0)
23980   {
23981   }
23982   NCursesPanel();
23983   ~NCursesPanel();
23984 };
23985
23986 template<class T> class NCursesUserPanel : public NCursesPanel
23987 {
23988 public:
23989   NCursesUserPanel (int nlines,
23990                     int ncols,
23991                     int begin_y = 0,
23992                     int begin_x = 0,
23993                     const T* p_UserData = static_cast<T*>(0))
23994     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23995   {
23996   };
23997   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23998   {
23999   };
24000
24001   virtual ~NCursesUserPanel() {};
24002 };
24003
24004 int
24005 main (void)
24006 {
24007
24008         const char* p_UserData = static_cast<char*>(0)
24009   ;
24010   return 0;
24011 }
24012 _ACEOF
24013 rm -f conftest.$ac_objext
24014 if { (eval echo "$as_me:24014: \"$ac_compile\"") >&5
24015   (eval $ac_compile) 2>&5
24016   ac_status=$?
24017   echo "$as_me:24017: \$? = $ac_status" >&5
24018   (exit $ac_status); } &&
24019          { ac_try='test -s conftest.$ac_objext'
24020   { (eval echo "$as_me:24020: \"$ac_try\"") >&5
24021   (eval $ac_try) 2>&5
24022   ac_status=$?
24023   echo "$as_me:24023: \$? = $ac_status" >&5
24024   (exit $ac_status); }; }; then
24025   cf_cv_cpp_static_cast=yes
24026 else
24027   echo "$as_me: failed program was:" >&5
24028 cat conftest.$ac_ext >&5
24029 cf_cv_cpp_static_cast=no
24030 fi
24031 rm -f conftest.$ac_objext conftest.$ac_ext
24032
24033         ac_ext=cc
24034 ac_cpp='$CXXCPP $CPPFLAGS'
24035 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24036 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24037 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24038 ac_main_return=return
24039
24040 fi
24041 echo "$as_me:24041: result: $cf_cv_cpp_static_cast" >&5
24042 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24043
24044 fi
24045
24046 test "$cf_cv_cpp_static_cast" = yes &&
24047 cat >>confdefs.h <<\EOF
24048 #define CPP_HAS_STATIC_CAST 1
24049 EOF
24050
24051         CXX_AR='$(AR)'
24052         CXX_ARFLAGS='$(ARFLAGS)'
24053         case $cf_cv_system_name in
24054         (irix*)
24055             if test "$GXX" != yes ; then
24056                 CXX_AR='$(CXX)'
24057                 CXX_ARFLAGS='-ar -o'
24058             fi
24059             ;;
24060         (sco3.2v5*)
24061             CXXLDFLAGS="-u main"
24062             ;;
24063         (solaris2*)
24064             if test "$GXX" != yes ; then
24065                 CXX_AR='$(CXX)'
24066                 CXX_ARFLAGS='-xar -o'
24067             fi
24068             ;;
24069         esac
24070
24071 else
24072         cf_cxx_library=no
24073         cf_cv_builtin_bool=1
24074
24075         # Just because we are not configuring against C++ right now does not
24076         # mean that a user will not want to use C++.  Some distributors disable
24077         # the C++ portion of this configuration as a shortcut (or just to avoid
24078         # compiling the demo in the c++ directory).  So we need a reasonable
24079         # default for the 'bool' type.
24080         #
24081         # Caveat: since the storage of the bool type is not standardized, it
24082         # may change.
24083
24084         if test "$NCURSES_BOOL" != auto ; then
24085                 cf_cv_type_of_bool=$NCURSES_BOOL
24086                 cf_cv_header_stdbool_h=0
24087         else
24088                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24089
24090 echo "$as_me:24090: checking for size of bool" >&5
24091 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24092 if test "${cf_cv_type_of_bool+set}" = set; then
24093   echo $ECHO_N "(cached) $ECHO_C" >&6
24094 else
24095
24096         rm -f cf_test.out
24097         if test "$cross_compiling" = yes; then
24098   cf_cv_type_of_bool=unknown
24099 else
24100   cat >conftest.$ac_ext <<_ACEOF
24101 #line 24101 "configure"
24102 #include "confdefs.h"
24103
24104 #include <stdlib.h>
24105 #include <stdio.h>
24106
24107 #if defined(__cplusplus)
24108
24109 #ifdef HAVE_GXX_BUILTIN_H
24110 #include <g++/builtin.h>
24111 #elif HAVE_GPP_BUILTIN_H
24112 #include <gpp/builtin.h>
24113 #elif HAVE_BUILTIN_H
24114 #include <builtin.h>
24115 #endif
24116
24117 #else
24118
24119 #if $cf_cv_header_stdbool_h
24120 #include <stdbool.h>
24121 #endif
24122
24123 #endif
24124
24125 int main(void)
24126 {
24127         FILE *fp = fopen("cf_test.out", "w");
24128         if (fp != 0) {
24129                 bool x = true;
24130                 if ((bool)(-x) >= 0)
24131                         fputs("unsigned ", fp);
24132                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24133                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24134                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24135                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24136                 fclose(fp);
24137         }
24138         ${cf_cv_main_return:-return}(0);
24139 }
24140
24141 _ACEOF
24142 rm -f conftest$ac_exeext
24143 if { (eval echo "$as_me:24143: \"$ac_link\"") >&5
24144   (eval $ac_link) 2>&5
24145   ac_status=$?
24146   echo "$as_me:24146: \$? = $ac_status" >&5
24147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24148   { (eval echo "$as_me:24148: \"$ac_try\"") >&5
24149   (eval $ac_try) 2>&5
24150   ac_status=$?
24151   echo "$as_me:24151: \$? = $ac_status" >&5
24152   (exit $ac_status); }; }; then
24153   cf_cv_type_of_bool=`cat cf_test.out`
24154                  if test -z "$cf_cv_type_of_bool"; then
24155                    cf_cv_type_of_bool=unknown
24156                  fi
24157 else
24158   echo "$as_me: program exited with status $ac_status" >&5
24159 echo "$as_me: failed program was:" >&5
24160 cat conftest.$ac_ext >&5
24161 cf_cv_type_of_bool=unknown
24162 fi
24163 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24164 fi
24165
24166 fi
24167
24168         rm -f cf_test.out
24169 echo "$as_me:24169: result: $cf_cv_type_of_bool" >&5
24170 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24171 if test "$cf_cv_type_of_bool" = unknown ; then
24172         case .$NCURSES_BOOL in
24173         (.auto|.) NCURSES_BOOL=unsigned;;
24174         esac
24175         { echo "$as_me:24175: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24176 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24177         cf_cv_type_of_bool=$NCURSES_BOOL
24178 fi
24179
24180                 else
24181                         echo "$as_me:24181: checking for fallback type of bool" >&5
24182 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24183                         case "$host_cpu" in
24184                         (i?86)  cf_cv_type_of_bool=char ;;
24185                         (*)     cf_cv_type_of_bool=int  ;;
24186                         esac
24187                         echo "$as_me:24187: result: $cf_cv_type_of_bool" >&5
24188 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24189                 fi
24190         fi
24191 fi
24192
24193 # If the C compiler did not declare bool, and we did not determine that the C++
24194 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24195 # ncurses library use the same type as C++ bool.  Note that this allows one to
24196 # specify the type of bool in a configure-script option and postpone
24197 # integration with the C++ compiler provided that the types are compatible.
24198 USE_CXX_BOOL=1
24199 if test $cf_cv_cc_bool_type = 1
24200 then
24201         # oops: C has a bool.  Unlikely, but C++ could differ.
24202         USE_CXX_BOOL=0
24203 elif test $cf_cv_builtin_bool = 0
24204 then
24205         # C++ has no bool
24206         USE_CXX_BOOL=0
24207 else
24208         # this is the normal case
24209         USE_CXX_BOOL='defined(__cplusplus)'
24210 fi
24211
24212 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24213
24214         if test "$cf_with_ada" != "no" ; then
24215                 if test "$with_libtool" != "no"; then
24216                         { echo "$as_me:24216: WARNING: libtool does not support Ada - disabling feature" >&5
24217 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24218                         cf_with_ada=no
24219                 fi
24220         fi
24221
24222         if test "$cf_with_ada" != "no" ; then
24223
24224 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24225 do
24226
24227 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24228
24229         unset ac_cv_path_cf_TEMP_gnat
24230         unset cf_TEMP_gnat
24231         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24232 set dummy $cf_prog_gnat; ac_word=$2
24233 echo "$as_me:24233: checking for $ac_word" >&5
24234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24235 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24236   echo $ECHO_N "(cached) $ECHO_C" >&6
24237 else
24238   case $cf_TEMP_gnat in
24239   [\\/]* | ?:[\\/]*)
24240   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24241   ;;
24242   *)
24243   ac_save_IFS=$IFS; IFS=$ac_path_separator
24244 ac_dummy="$PATH"
24245 for ac_dir in $ac_dummy; do
24246   IFS=$ac_save_IFS
24247   test -z "$ac_dir" && ac_dir=.
24248   if $as_executable_p "$ac_dir/$ac_word"; then
24249    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24250    echo "$as_me:24250: found $ac_dir/$ac_word" >&5
24251    break
24252 fi
24253 done
24254
24255   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24256   ;;
24257 esac
24258 fi
24259 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24260
24261 if test -n "$cf_TEMP_gnat"; then
24262   echo "$as_me:24262: result: $cf_TEMP_gnat" >&5
24263 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24264 else
24265   echo "$as_me:24265: result: no" >&5
24266 echo "${ECHO_T}no" >&6
24267 fi
24268
24269         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24270
24271         if test "x$cf_TEMP_gnat" != xno; then
24272                 unset cf_cv_gnat_version
24273                 unset cf_TEMP_gnat
24274
24275 echo "$as_me:24275: checking for $cf_prog_gnat version" >&5
24276 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24277 if test "${cf_cv_gnat_version+set}" = set; then
24278   echo $ECHO_N "(cached) $ECHO_C" >&6
24279 else
24280
24281 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24282         grep '[0-9].[0-9][0-9]*' |\
24283         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24284
24285 fi
24286 echo "$as_me:24286: result: $cf_cv_gnat_version" >&5
24287 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24288 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24289 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24290
24291         fi
24292         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24293
24294         unset cf_TEMP_gnat
24295         unset cf_cv_gnat_version
24296         unset ac_cv_path_cf_TEMP_gnat
24297 done
24298
24299 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24300         cf_ada_make=
24301         cf_cv_prog_gnat_correct=no
24302 else
24303         cf_ada_make=gnatmake
24304         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24305                 # gprconfig is newer than gnatmake; we can continue...
24306                 cf_ada_config="##"
24307         else
24308                 rm -rf conftest* *~conftest*
24309                 if mkdir conftest.src
24310                 then
24311                         cf_ada_config=""
24312                         cd conftest.src
24313                         for cf_gprconfig in Ada C
24314                         do
24315                                 echo "$as_me:24315: checking for gprconfig name for $cf_gprconfig" >&5
24316 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24317                                 if test $cf_gprconfig = C
24318                                 then
24319                                         for cf_gprconfig_param in \
24320                                                 $cf_gprconfig,,,,GNATGCC \
24321                                                 $cf_gprconfig,,,,GCC \
24322                                                 $cf_gprconfig
24323                                         do
24324                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24325                                                 test -n "$cf_gprconfig_value" && break
24326                                         done
24327                                 else
24328                                         cf_gprconfig_param=$cf_gprconfig
24329                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24330                                 fi
24331                                 if test -n "$cf_gprconfig_value"
24332                                 then
24333                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24334                                         echo "$as_me:24334: result: $cf_gprconfig_value" >&5
24335 echo "${ECHO_T}$cf_gprconfig_value" >&6
24336                                 else
24337                                         echo "$as_me:24337: result: missing" >&5
24338 echo "${ECHO_T}missing" >&6
24339                                         cf_ada_config="#"
24340                                         break
24341                                 fi
24342                         done
24343                         cd ..
24344                         rm -rf conftest* *~conftest*
24345                 fi
24346         fi
24347         if test "x$cf_ada_config" != "x#"
24348         then
24349
24350 echo "$as_me:24350: checking for gnat version" >&5
24351 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24352 if test "${cf_cv_gnat_version+set}" = set; then
24353   echo $ECHO_N "(cached) $ECHO_C" >&6
24354 else
24355
24356 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24357         grep '[0-9].[0-9][0-9]*' |\
24358         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24359
24360 fi
24361 echo "$as_me:24361: result: $cf_cv_gnat_version" >&5
24362 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24363 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24364
24365 case $cf_cv_gnat_version in
24366 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24367         cf_cv_prog_gnat_correct=yes
24368         ;;
24369 (*)
24370         { echo "$as_me:24370: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24371 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24372         cf_cv_prog_gnat_correct=no
24373         ;;
24374 esac
24375
24376                 # Extract the first word of "m4", so it can be a program name with args.
24377 set dummy m4; ac_word=$2
24378 echo "$as_me:24378: checking for $ac_word" >&5
24379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24380 if test "${ac_cv_prog_M4_exists+set}" = set; then
24381   echo $ECHO_N "(cached) $ECHO_C" >&6
24382 else
24383   if test -n "$M4_exists"; then
24384   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24385 else
24386   ac_save_IFS=$IFS; IFS=$ac_path_separator
24387 ac_dummy="$PATH"
24388 for ac_dir in $ac_dummy; do
24389   IFS=$ac_save_IFS
24390   test -z "$ac_dir" && ac_dir=.
24391   $as_executable_p "$ac_dir/$ac_word" || continue
24392 ac_cv_prog_M4_exists="yes"
24393 echo "$as_me:24393: found $ac_dir/$ac_word" >&5
24394 break
24395 done
24396
24397   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24398 fi
24399 fi
24400 M4_exists=$ac_cv_prog_M4_exists
24401 if test -n "$M4_exists"; then
24402   echo "$as_me:24402: result: $M4_exists" >&5
24403 echo "${ECHO_T}$M4_exists" >&6
24404 else
24405   echo "$as_me:24405: result: no" >&5
24406 echo "${ECHO_T}no" >&6
24407 fi
24408
24409                 if test "$ac_cv_prog_M4_exists" = no; then
24410                         cf_cv_prog_gnat_correct=no
24411                         { echo "$as_me:24411: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24412 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24413                 fi
24414                 if test "$cf_cv_prog_gnat_correct" = yes; then
24415                         echo "$as_me:24415: checking if GNAT works" >&5
24416 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24417
24418 rm -rf conftest* *~conftest*
24419 cat >>conftest.ads <<CF_EOF
24420 procedure conftest;
24421 CF_EOF
24422 cat >>conftest.adb <<CF_EOF
24423 with Text_IO;
24424 with GNAT.OS_Lib;
24425 procedure conftest is
24426 begin
24427    Text_IO.Put ("Hello World");
24428    Text_IO.New_Line;
24429    GNAT.OS_Lib.OS_Exit (0);
24430 end conftest;
24431 CF_EOF
24432 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24433    if ( ./conftest 1>&5 2>&1 ) ; then
24434       cf_cv_prog_gnat_correct=yes
24435    else
24436       cf_cv_prog_gnat_correct=no
24437    fi
24438 else
24439    cf_cv_prog_gnat_correct=no
24440 fi
24441 rm -rf conftest* *~conftest*
24442
24443                         echo "$as_me:24443: result: $cf_cv_prog_gnat_correct" >&5
24444 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24445                 fi
24446         else
24447                 cf_cv_prog_gnat_correct=no
24448         fi
24449 fi
24450
24451                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24452
24453         ADAFLAGS="$ADAFLAGS -gnatpn"
24454
24455         echo "$as_me:24455: checking optimization options for ADAFLAGS" >&5
24456 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24457         case "$CFLAGS" in
24458         (*-g*)
24459
24460         ADAFLAGS="$ADAFLAGS -g"
24461
24462                 ;;
24463         esac
24464         case "$CFLAGS" in
24465         (*-O*)
24466                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24467
24468         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24469
24470                 ;;
24471         esac
24472         echo "$as_me:24472: result: $ADAFLAGS" >&5
24473 echo "${ECHO_T}$ADAFLAGS" >&6
24474
24475 echo "$as_me:24475: checking if GNATPREP supports -T option" >&5
24476 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24477 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24478   echo $ECHO_N "(cached) $ECHO_C" >&6
24479 else
24480
24481 cf_cv_gnatprep_opt_t=no
24482 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24483
24484 fi
24485 echo "$as_me:24485: result: $cf_cv_gnatprep_opt_t" >&5
24486 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24487 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24488
24489 echo "$as_me:24489: checking if GNAT supports generics" >&5
24490 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24491 case $cf_cv_gnat_version in
24492 (3.[1-9]*|[4-9].*)
24493         cf_gnat_generics=yes
24494         ;;
24495 (*)
24496         cf_gnat_generics=no
24497         ;;
24498 esac
24499 echo "$as_me:24499: result: $cf_gnat_generics" >&5
24500 echo "${ECHO_T}$cf_gnat_generics" >&6
24501
24502 if test "$cf_gnat_generics" = yes
24503 then
24504         cf_compile_generics=generics
24505         cf_generic_objects="\${GENOBJS}"
24506 else
24507         cf_compile_generics=
24508         cf_generic_objects=
24509 fi
24510
24511 echo "$as_me:24511: checking if GNAT supports SIGINT" >&5
24512 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24513 if test "${cf_cv_gnat_sigint+set}" = set; then
24514   echo $ECHO_N "(cached) $ECHO_C" >&6
24515 else
24516
24517 rm -rf conftest* *~conftest*
24518 cat >>conftest.ads <<CF_EOF
24519 with Ada.Interrupts.Names;
24520
24521 package ConfTest is
24522
24523    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24524    pragma Unreserve_All_Interrupts;
24525    pragma Warnings (On);
24526
24527    protected Process is
24528       procedure Stop;
24529       function Continue return Boolean;
24530       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24531    private
24532       Done : Boolean := False;
24533    end Process;
24534
24535 end ConfTest;
24536 CF_EOF
24537 cat >>conftest.adb <<CF_EOF
24538 package body ConfTest is
24539    protected body Process is
24540       procedure Stop is
24541       begin
24542          Done := True;
24543       end Stop;
24544       function Continue return Boolean is
24545       begin
24546          return not Done;
24547       end Continue;
24548    end Process;
24549 end ConfTest;
24550 CF_EOF
24551 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24552       cf_cv_gnat_sigint=yes
24553 else
24554    cf_cv_gnat_sigint=no
24555 fi
24556 rm -rf conftest* *~conftest*
24557
24558 fi
24559 echo "$as_me:24559: result: $cf_cv_gnat_sigint" >&5
24560 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24561
24562 if test $cf_cv_gnat_sigint = yes ; then
24563         USE_GNAT_SIGINT=""
24564 else
24565         USE_GNAT_SIGINT="#"
24566 fi
24567
24568 cf_gnat_libraries=no
24569 cf_gnat_projects=no
24570
24571 if test "$enable_gnat_projects" != no ; then
24572 echo "$as_me:24572: checking if GNAT supports project files" >&5
24573 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24574 case $cf_cv_gnat_version in
24575 (3.[0-9]*)
24576         ;;
24577 (*)
24578         case $cf_cv_system_name in
24579         (cygwin*|msys*)
24580                 ;;
24581         (*)
24582                 rm -rf conftest* *~conftest*
24583                 if mkdir conftest.src conftest.bin conftest.lib
24584                 then
24585                         cd conftest.src
24586                         rm -rf conftest* *~conftest*
24587                         cat >>library.gpr <<CF_EOF
24588 project Library is
24589   Kind := External ("LIB_KIND");
24590   for Library_Name use "ConfTest";
24591   for Object_Dir use ".";
24592   for Library_ALI_Dir use External("LIBRARY_DIR");
24593   for Library_Version use External ("SONAME");
24594   for Library_Kind use Kind;
24595   for Library_Dir use External("BUILD_DIR");
24596   Source_Dir := External ("SOURCE_DIR");
24597   for Source_Dirs use (Source_Dir);
24598 end Library;
24599 CF_EOF
24600                         cat >>confpackage.ads <<CF_EOF
24601 package ConfPackage is
24602    procedure conftest;
24603 end ConfPackage;
24604 CF_EOF
24605                         cat >>confpackage.adb <<CF_EOF
24606 with Text_IO;
24607 package body ConfPackage is
24608    procedure conftest is
24609    begin
24610       Text_IO.Put ("Hello World");
24611       Text_IO.New_Line;
24612    end conftest;
24613 end ConfPackage;
24614 CF_EOF
24615                         if ( $cf_ada_make $ADAFLAGS \
24616                                         -Plibrary.gpr \
24617                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24618                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24619                                         -XSOURCE_DIR=`pwd` \
24620                                         -XSONAME=libConfTest.so.1 \
24621                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24622                                 cf_gnat_projects=yes
24623                         fi
24624                         cd ..
24625                 fi
24626                 if test -f conftest.lib/confpackage.ali
24627                 then
24628                         cf_gnat_libraries=yes
24629                 fi
24630                 rm -rf conftest* *~conftest*
24631                 ;;
24632         esac
24633         ;;
24634 esac
24635 echo "$as_me:24635: result: $cf_gnat_projects" >&5
24636 echo "${ECHO_T}$cf_gnat_projects" >&6
24637 fi # enable_gnat_projects
24638
24639 if test $cf_gnat_projects = yes
24640 then
24641         echo "$as_me:24641: checking if GNAT supports libraries" >&5
24642 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24643         echo "$as_me:24643: result: $cf_gnat_libraries" >&5
24644 echo "${ECHO_T}$cf_gnat_libraries" >&6
24645 fi
24646
24647 if test "$cf_gnat_projects" = yes
24648 then
24649         USE_OLD_MAKERULES="#"
24650         USE_GNAT_PROJECTS=""
24651 else
24652         USE_OLD_MAKERULES=""
24653         USE_GNAT_PROJECTS="#"
24654 fi
24655
24656 if test "$cf_gnat_libraries" = yes
24657 then
24658         USE_GNAT_LIBRARIES=""
24659 else
24660         USE_GNAT_LIBRARIES="#"
24661 fi
24662
24663 echo "$as_me:24663: checking for ada-compiler" >&5
24664 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24665
24666 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24667 if test "${with_ada_compiler+set}" = set; then
24668   withval="$with_ada_compiler"
24669   cf_ada_compiler=$withval
24670 else
24671   cf_ada_compiler=gnatmake
24672 fi;
24673
24674 echo "$as_me:24674: result: $cf_ada_compiler" >&5
24675 echo "${ECHO_T}$cf_ada_compiler" >&6
24676
24677                         cf_ada_package=terminal_interface
24678
24679 echo "$as_me:24679: checking for ada-include" >&5
24680 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24681
24682 # Check whether --with-ada-include or --without-ada-include was given.
24683 if test "${with_ada_include+set}" = set; then
24684   withval="$with_ada_include"
24685
24686 else
24687   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24688 fi; if test -n "$prefix/share/ada/adainclude" ; then
24689
24690 if test "x$prefix" != xNONE; then
24691         cf_path_syntax="$prefix"
24692 else
24693         cf_path_syntax="$ac_default_prefix"
24694 fi
24695
24696 case ".$withval" in
24697 (.\$\(*\)*|.\'*\'*)
24698         ;;
24699 (..|./*|.\\*)
24700         ;;
24701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24702         ;;
24703 (.\${*prefix}*|.\${*dir}*)
24704         eval withval="$withval"
24705         case ".$withval" in
24706         (.NONE/*)
24707                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24708                 ;;
24709         esac
24710         ;;
24711 (.no|.NONE/*)
24712         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24713         ;;
24714 (*)
24715         { { echo "$as_me:24715: error: expected a pathname, not \"$withval\"" >&5
24716 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24717    { (exit 1); exit 1; }; }
24718         ;;
24719 esac
24720
24721 fi
24722 eval ADA_INCLUDE="$withval"
24723
24724 echo "$as_me:24724: result: $ADA_INCLUDE" >&5
24725 echo "${ECHO_T}$ADA_INCLUDE" >&6
24726
24727 echo "$as_me:24727: checking for ada-objects" >&5
24728 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24729
24730 # Check whether --with-ada-objects or --without-ada-objects was given.
24731 if test "${with_ada_objects+set}" = set; then
24732   withval="$with_ada_objects"
24733
24734 else
24735   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24736 fi; if test -n "$prefix/lib/ada/adalib" ; then
24737
24738 if test "x$prefix" != xNONE; then
24739         cf_path_syntax="$prefix"
24740 else
24741         cf_path_syntax="$ac_default_prefix"
24742 fi
24743
24744 case ".$withval" in
24745 (.\$\(*\)*|.\'*\'*)
24746         ;;
24747 (..|./*|.\\*)
24748         ;;
24749 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24750         ;;
24751 (.\${*prefix}*|.\${*dir}*)
24752         eval withval="$withval"
24753         case ".$withval" in
24754         (.NONE/*)
24755                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24756                 ;;
24757         esac
24758         ;;
24759 (.no|.NONE/*)
24760         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24761         ;;
24762 (*)
24763         { { echo "$as_me:24763: error: expected a pathname, not \"$withval\"" >&5
24764 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24765    { (exit 1); exit 1; }; }
24766         ;;
24767 esac
24768
24769 fi
24770 eval ADA_OBJECTS="$withval"
24771
24772 echo "$as_me:24772: result: $ADA_OBJECTS" >&5
24773 echo "${ECHO_T}$ADA_OBJECTS" >&6
24774
24775 echo "$as_me:24775: checking if an Ada95 shared-library should be built" >&5
24776 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24777
24778 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24779 if test "${with_ada_sharedlib+set}" = set; then
24780   withval="$with_ada_sharedlib"
24781   with_ada_sharedlib=$withval
24782 else
24783   with_ada_sharedlib=no
24784 fi;
24785 echo "$as_me:24785: result: $with_ada_sharedlib" >&5
24786 echo "${ECHO_T}$with_ada_sharedlib" >&6
24787
24788 if test "x$with_ada_sharedlib" != xno
24789 then
24790         if test "x$cf_gnat_projects" != xyes
24791         then
24792                 { echo "$as_me:24792: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24793 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24794                 with_ada_sharedlib=no
24795         fi
24796 fi
24797
24798 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24799 MAKE_ADA_SHAREDLIB="#"
24800
24801 if test "x$with_ada_sharedlib" != xno
24802 then
24803         MAKE_ADA_SHAREDLIB=
24804         if test "x$with_ada_sharedlib" != xyes
24805         then
24806                 ADA_SHAREDLIB="$with_ada_sharedlib"
24807         fi
24808 fi
24809
24810                         # allow the Ada binding to be renamed
24811
24812 echo "$as_me:24812: checking for ada-libname" >&5
24813 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24814
24815 # Check whether --with-ada-libname or --without-ada-libname was given.
24816 if test "${with_ada_libname+set}" = set; then
24817   withval="$with_ada_libname"
24818   ADA_LIBNAME=$withval
24819 else
24820   ADA_LIBNAME=AdaCurses
24821 fi;
24822 case "x$ADA_LIBNAME" in
24823 (x|xyes|xno)
24824         ADA_LIBNAME=AdaCurses
24825         ;;
24826 esac
24827
24828 echo "$as_me:24828: result: $ADA_LIBNAME" >&5
24829 echo "${ECHO_T}$ADA_LIBNAME" >&6
24830
24831                 fi
24832         fi
24833 else
24834         cf_with_ada=no
24835 fi
24836
24837 # do this "late" to avoid conflict with header-checks
24838 if test "x$with_widec" = xyes ; then
24839         echo "$as_me:24839: checking for wchar_t" >&5
24840 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24841 if test "${ac_cv_type_wchar_t+set}" = set; then
24842   echo $ECHO_N "(cached) $ECHO_C" >&6
24843 else
24844   cat >conftest.$ac_ext <<_ACEOF
24845 #line 24845 "configure"
24846 #include "confdefs.h"
24847 $ac_includes_default
24848 int
24849 main (void)
24850 {
24851 if ((wchar_t *) 0)
24852   return 0;
24853 if (sizeof (wchar_t))
24854   return 0;
24855   ;
24856   return 0;
24857 }
24858 _ACEOF
24859 rm -f conftest.$ac_objext
24860 if { (eval echo "$as_me:24860: \"$ac_compile\"") >&5
24861   (eval $ac_compile) 2>&5
24862   ac_status=$?
24863   echo "$as_me:24863: \$? = $ac_status" >&5
24864   (exit $ac_status); } &&
24865          { ac_try='test -s conftest.$ac_objext'
24866   { (eval echo "$as_me:24866: \"$ac_try\"") >&5
24867   (eval $ac_try) 2>&5
24868   ac_status=$?
24869   echo "$as_me:24869: \$? = $ac_status" >&5
24870   (exit $ac_status); }; }; then
24871   ac_cv_type_wchar_t=yes
24872 else
24873   echo "$as_me: failed program was:" >&5
24874 cat conftest.$ac_ext >&5
24875 ac_cv_type_wchar_t=no
24876 fi
24877 rm -f conftest.$ac_objext conftest.$ac_ext
24878 fi
24879 echo "$as_me:24879: result: $ac_cv_type_wchar_t" >&5
24880 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24881
24882 echo "$as_me:24882: checking size of wchar_t" >&5
24883 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24884 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24885   echo $ECHO_N "(cached) $ECHO_C" >&6
24886 else
24887   if test "$ac_cv_type_wchar_t" = yes; then
24888   if test "$cross_compiling" = yes; then
24889   # Depending upon the size, compute the lo and hi bounds.
24890 cat >conftest.$ac_ext <<_ACEOF
24891 #line 24891 "configure"
24892 #include "confdefs.h"
24893 $ac_includes_default
24894 int
24895 main (void)
24896 {
24897 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24898   ;
24899   return 0;
24900 }
24901 _ACEOF
24902 rm -f conftest.$ac_objext
24903 if { (eval echo "$as_me:24903: \"$ac_compile\"") >&5
24904   (eval $ac_compile) 2>&5
24905   ac_status=$?
24906   echo "$as_me:24906: \$? = $ac_status" >&5
24907   (exit $ac_status); } &&
24908          { ac_try='test -s conftest.$ac_objext'
24909   { (eval echo "$as_me:24909: \"$ac_try\"") >&5
24910   (eval $ac_try) 2>&5
24911   ac_status=$?
24912   echo "$as_me:24912: \$? = $ac_status" >&5
24913   (exit $ac_status); }; }; then
24914   ac_lo=0 ac_mid=0
24915   while :; do
24916     cat >conftest.$ac_ext <<_ACEOF
24917 #line 24917 "configure"
24918 #include "confdefs.h"
24919 $ac_includes_default
24920 int
24921 main (void)
24922 {
24923 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24924   ;
24925   return 0;
24926 }
24927 _ACEOF
24928 rm -f conftest.$ac_objext
24929 if { (eval echo "$as_me:24929: \"$ac_compile\"") >&5
24930   (eval $ac_compile) 2>&5
24931   ac_status=$?
24932   echo "$as_me:24932: \$? = $ac_status" >&5
24933   (exit $ac_status); } &&
24934          { ac_try='test -s conftest.$ac_objext'
24935   { (eval echo "$as_me:24935: \"$ac_try\"") >&5
24936   (eval $ac_try) 2>&5
24937   ac_status=$?
24938   echo "$as_me:24938: \$? = $ac_status" >&5
24939   (exit $ac_status); }; }; then
24940   ac_hi=$ac_mid; break
24941 else
24942   echo "$as_me: failed program was:" >&5
24943 cat conftest.$ac_ext >&5
24944 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24945 fi
24946 rm -f conftest.$ac_objext conftest.$ac_ext
24947   done
24948 else
24949   echo "$as_me: failed program was:" >&5
24950 cat conftest.$ac_ext >&5
24951 ac_hi=-1 ac_mid=-1
24952   while :; do
24953     cat >conftest.$ac_ext <<_ACEOF
24954 #line 24954 "configure"
24955 #include "confdefs.h"
24956 $ac_includes_default
24957 int
24958 main (void)
24959 {
24960 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24961   ;
24962   return 0;
24963 }
24964 _ACEOF
24965 rm -f conftest.$ac_objext
24966 if { (eval echo "$as_me:24966: \"$ac_compile\"") >&5
24967   (eval $ac_compile) 2>&5
24968   ac_status=$?
24969   echo "$as_me:24969: \$? = $ac_status" >&5
24970   (exit $ac_status); } &&
24971          { ac_try='test -s conftest.$ac_objext'
24972   { (eval echo "$as_me:24972: \"$ac_try\"") >&5
24973   (eval $ac_try) 2>&5
24974   ac_status=$?
24975   echo "$as_me:24975: \$? = $ac_status" >&5
24976   (exit $ac_status); }; }; then
24977   ac_lo=$ac_mid; break
24978 else
24979   echo "$as_me: failed program was:" >&5
24980 cat conftest.$ac_ext >&5
24981 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24982 fi
24983 rm -f conftest.$ac_objext conftest.$ac_ext
24984   done
24985 fi
24986 rm -f conftest.$ac_objext conftest.$ac_ext
24987 # Binary search between lo and hi bounds.
24988 while test "x$ac_lo" != "x$ac_hi"; do
24989   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24990   cat >conftest.$ac_ext <<_ACEOF
24991 #line 24991 "configure"
24992 #include "confdefs.h"
24993 $ac_includes_default
24994 int
24995 main (void)
24996 {
24997 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24998   ;
24999   return 0;
25000 }
25001 _ACEOF
25002 rm -f conftest.$ac_objext
25003 if { (eval echo "$as_me:25003: \"$ac_compile\"") >&5
25004   (eval $ac_compile) 2>&5
25005   ac_status=$?
25006   echo "$as_me:25006: \$? = $ac_status" >&5
25007   (exit $ac_status); } &&
25008          { ac_try='test -s conftest.$ac_objext'
25009   { (eval echo "$as_me:25009: \"$ac_try\"") >&5
25010   (eval $ac_try) 2>&5
25011   ac_status=$?
25012   echo "$as_me:25012: \$? = $ac_status" >&5
25013   (exit $ac_status); }; }; then
25014   ac_hi=$ac_mid
25015 else
25016   echo "$as_me: failed program was:" >&5
25017 cat conftest.$ac_ext >&5
25018 ac_lo=`expr $ac_mid + 1`
25019 fi
25020 rm -f conftest.$ac_objext conftest.$ac_ext
25021 done
25022 ac_cv_sizeof_wchar_t=$ac_lo
25023 else
25024   if test "$cross_compiling" = yes; then
25025   { { echo "$as_me:25025: error: cannot run test program while cross compiling" >&5
25026 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25027    { (exit 1); exit 1; }; }
25028 else
25029   cat >conftest.$ac_ext <<_ACEOF
25030 #line 25030 "configure"
25031 #include "confdefs.h"
25032 $ac_includes_default
25033 int
25034 main (void)
25035 {
25036 FILE *f = fopen ("conftest.val", "w");
25037 if (!f)
25038   $ac_main_return (1);
25039 fprintf (f, "%d", (sizeof (wchar_t)));
25040 fclose (f);
25041   ;
25042   return 0;
25043 }
25044 _ACEOF
25045 rm -f conftest$ac_exeext
25046 if { (eval echo "$as_me:25046: \"$ac_link\"") >&5
25047   (eval $ac_link) 2>&5
25048   ac_status=$?
25049   echo "$as_me:25049: \$? = $ac_status" >&5
25050   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25051   { (eval echo "$as_me:25051: \"$ac_try\"") >&5
25052   (eval $ac_try) 2>&5
25053   ac_status=$?
25054   echo "$as_me:25054: \$? = $ac_status" >&5
25055   (exit $ac_status); }; }; then
25056   ac_cv_sizeof_wchar_t=`cat conftest.val`
25057 else
25058   echo "$as_me: program exited with status $ac_status" >&5
25059 echo "$as_me: failed program was:" >&5
25060 cat conftest.$ac_ext >&5
25061 fi
25062 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25063 fi
25064 fi
25065 rm -f conftest.val
25066 else
25067   ac_cv_sizeof_wchar_t=0
25068 fi
25069 fi
25070 echo "$as_me:25070: result: $ac_cv_sizeof_wchar_t" >&5
25071 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25072 cat >>confdefs.h <<EOF
25073 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25074 EOF
25075
25076         # cross-compiling to mingw can run into the problem that attempting to
25077         # link with the regex library fails, causing the test to not set this to
25078         # a number.  "recent" autoconf does not address this problem either -TD
25079         if test -z "$ac_cv_sizeof_wchar_t"
25080         then
25081                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25082
25083 echo "${as_me:-configure}:25083: testing test failed (assume 2) ..." 1>&5
25084
25085                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25086                 mv confdefs.tmp confdefs.h
25087                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25088         fi
25089 fi
25090
25091 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25092 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25093 ###
25094 ### ticlib modules may be a separate library, otherwise contained in termlib.
25095 ### termlib modules may be a separate library, otherwise contained in ncurses.
25096 ###
25097 ### The of "+" or " " between the tokens controls the way the script
25098 ### chooses to split module lists into libraries.
25099 ###
25100 ### (see CF_LIB_RULES).
25101 echo "$as_me:25101: checking for library subsets" >&5
25102 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25103 LIB_SUBSETS=
25104
25105 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25106         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25107         if test "$with_ticlib" != no ; then
25108                 LIB_SUBSETS="${LIB_SUBSETS} "
25109         else
25110                 LIB_SUBSETS="${LIB_SUBSETS}+"
25111         fi
25112 fi
25113
25114 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25115 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25116
25117 if test "$with_termlib" != no ; then
25118         LIB_SUBSETS="${LIB_SUBSETS} "
25119 else
25120         LIB_SUBSETS="${LIB_SUBSETS}+"
25121 fi
25122
25123 LIB_SUBSETS="${LIB_SUBSETS}base"
25124
25125 # Most term-driver calls are to tinfo, but some like init_pair are to the
25126 # base library (so it resides in base).
25127 if test "$with_term_driver" != no ; then
25128         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25129         case $cf_cv_system_name in
25130         (*mingw32*|*mingw64*)
25131                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25132                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25133                 ;;
25134         (*)
25135                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25136                 ;;
25137         esac
25138 fi
25139
25140 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25141 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25142
25143 echo "$as_me:25143: result: $LIB_SUBSETS" >&5
25144 echo "${ECHO_T}$LIB_SUBSETS" >&6
25145
25146 ### Construct the list of include-directories to be generated
25147
25148 if test "$srcdir" != "."; then
25149         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25150 fi
25151 CPPFLAGS="-I../include $CPPFLAGS"
25152 if test "$srcdir" != "."; then
25153         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25154 fi
25155 CPPFLAGS="-I. $CPPFLAGS"
25156
25157 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25158 if test "$srcdir" != "."; then
25159         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25160 fi
25161 if test "$GCC" != yes; then
25162         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25163 elif test "$includedir" != "/usr/include"; then
25164         if test "$includedir" = '${prefix}/include' ; then
25165                 if test x$prefix != x/usr ; then
25166                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25167                 fi
25168         else
25169                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25170         fi
25171 fi
25172
25173 ### Build up pieces for makefile rules
25174 echo "$as_me:25174: checking default library suffix" >&5
25175 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25176
25177         case $DFT_LWR_MODEL in
25178         (libtool) DFT_ARG_SUFFIX=''   ;;
25179         (normal)  DFT_ARG_SUFFIX=''   ;;
25180         (debug)   DFT_ARG_SUFFIX='_g' ;;
25181         (profile) DFT_ARG_SUFFIX='_p' ;;
25182         (shared)  DFT_ARG_SUFFIX=''   ;;
25183         esac
25184         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25185 echo "$as_me:25185: result: $DFT_ARG_SUFFIX" >&5
25186 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25187
25188 echo "$as_me:25188: checking default library-dependency suffix" >&5
25189 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25190
25191         case X$DFT_LWR_MODEL in
25192         (Xlibtool)
25193                 DFT_LIB_SUFFIX='.la'
25194                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25195                 ;;
25196         (Xdebug)
25197                 DFT_LIB_SUFFIX='_g.a'
25198                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25199                 ;;
25200         (Xprofile)
25201                 DFT_LIB_SUFFIX='_p.a'
25202                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25203                 ;;
25204         (Xshared)
25205                 case $cf_cv_system_name in
25206                 (aix[5-7]*)
25207                         DFT_LIB_SUFFIX='.so'
25208                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25209                         ;;
25210                 (cygwin*|msys*|mingw*)
25211                         DFT_LIB_SUFFIX='.dll'
25212                         DFT_DEP_SUFFIX='.dll.a'
25213                         ;;
25214                 (darwin*)
25215                         DFT_LIB_SUFFIX='.dylib'
25216                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25217                         ;;
25218                 (hpux*)
25219                         case $target in
25220                         (ia64*)
25221                                 DFT_LIB_SUFFIX='.so'
25222                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25223                                 ;;
25224                         (*)
25225                                 DFT_LIB_SUFFIX='.sl'
25226                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25227                                 ;;
25228                         esac
25229                         ;;
25230                 (*)
25231                         DFT_LIB_SUFFIX='.so'
25232                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25233                         ;;
25234                 esac
25235                 ;;
25236         (*)
25237                 DFT_LIB_SUFFIX='.a'
25238                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25239                 ;;
25240         esac
25241         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25242         then
25243                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25244                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25245         fi
25246 echo "$as_me:25246: result: $DFT_DEP_SUFFIX" >&5
25247 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25248
25249 echo "$as_me:25249: checking default object directory" >&5
25250 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25251
25252         case $DFT_LWR_MODEL in
25253         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25254         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25255         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25256         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25257         (shared)
25258                 case $cf_cv_system_name in
25259                 (cygwin|msys)
25260                         DFT_OBJ_SUBDIR='objects' ;;
25261                 (*)
25262                         DFT_OBJ_SUBDIR='obj_s' ;;
25263                 esac
25264         esac
25265 echo "$as_me:25265: result: $DFT_OBJ_SUBDIR" >&5
25266 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25267
25268 if test "x$cf_with_cxx" = xyes ; then
25269 echo "$as_me:25269: checking c++ library-dependency suffix" >&5
25270 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25271 if test "$with_libtool" != "no"; then
25272         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25273         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25274 elif test "$with_shared_cxx" != "no"; then
25275         # also for g++ users...
25276         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25277 else
25278         # we normally make a static library because C/C++ library rules differ
25279
25280         case Xnormal in
25281         (Xlibtool)
25282                 CXX_LIB_SUFFIX='.la'
25283                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25284                 ;;
25285         (Xdebug)
25286                 CXX_LIB_SUFFIX='_g.a'
25287                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25288                 ;;
25289         (Xprofile)
25290                 CXX_LIB_SUFFIX='_p.a'
25291                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25292                 ;;
25293         (Xshared)
25294                 case $cf_cv_system_name in
25295                 (aix[5-7]*)
25296                         CXX_LIB_SUFFIX='.so'
25297                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25298                         ;;
25299                 (cygwin*|msys*|mingw*)
25300                         CXX_LIB_SUFFIX='.dll'
25301                         CXX_DEP_SUFFIX='.dll.a'
25302                         ;;
25303                 (darwin*)
25304                         CXX_LIB_SUFFIX='.dylib'
25305                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25306                         ;;
25307                 (hpux*)
25308                         case $target in
25309                         (ia64*)
25310                                 CXX_LIB_SUFFIX='.so'
25311                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25312                                 ;;
25313                         (*)
25314                                 CXX_LIB_SUFFIX='.sl'
25315                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25316                                 ;;
25317                         esac
25318                         ;;
25319                 (*)
25320                         CXX_LIB_SUFFIX='.so'
25321                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25322                         ;;
25323                 esac
25324                 ;;
25325         (*)
25326                 CXX_LIB_SUFFIX='.a'
25327                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25328                 ;;
25329         esac
25330         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25331         then
25332                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25333                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25334         fi
25335
25336 fi
25337 echo "$as_me:25337: result: $CXX_LIB_SUFFIX" >&5
25338 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25339
25340 fi
25341
25342 # do not want -ldl in build except as needed for -lncurses dependency
25343 if test "x$with_dlsym" = xyes ; then
25344 if test $DFT_LWR_MODEL = shared || \
25345    test $DFT_LWR_MODEL = libtool ; then
25346
25347 # remove dl library from $LIBS
25348 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25349
25350 fi
25351 fi
25352 ### Set up low-level terminfo dependencies for makefiles.
25353
25354 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25355 # do not need libdl
25356 TICS_LIST=
25357 if test "x$with_dlsym" = xyes ; then
25358
25359 # remove dl library from $SHLIB_LIST
25360 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25361
25362 fi
25363
25364 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25365 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25366 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25367 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25368 then
25369         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25370 fi
25371
25372 if test "$with_ticlib" != no ; then
25373
25374         if test "x$with_ticlib" != xyes ; then
25375                 TICS_NAME=$with_ticlib
25376                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25377                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25378                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25379                 TICS_LIB_SUFFIX="${with_ticlib}"
25380         else
25381                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25382                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25383                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25384                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25385         fi
25386         TICS_LDFLAGS="-L${LIB_DIR}"
25387         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25388 else
25389         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25390         TICS_LDFLAGS="-L${LIB_DIR}"
25391         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25392 fi
25393
25394 if test "$with_termlib" != no ; then
25395
25396         if test "x$with_termlib" != xyes ; then
25397                 TINFO_NAME=$with_termlib
25398                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25399                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25400                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25401                 TINFO_LIB_SUFFIX="${with_termlib}"
25402         else
25403                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25404                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25405                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25406                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25407         fi
25408
25409         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25410         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25411         if test "$DFT_LWR_MODEL" = "libtool"; then
25412                 TEST_ARGS="${TEST_DEPS}"
25413                 TEST_ARG2="${TEST_DEP2}"
25414                 TINFO_LDFLAGS="-L${LIB_DIR}"
25415                 TINFO_LIBS="$TEST_ARGS"
25416                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25417                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25418         else
25419                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25420                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25421                 if test "x$with_term_driver" != xno ; then
25422                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25423                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25424                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25425                 else
25426                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25427                         TINFO_LIBS="$TEST_ARGS"
25428                 fi
25429                 TINFO_LDFLAGS="-L${LIB_DIR}"
25430                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25431         fi
25432 else
25433         # the next lines are needed for linking libtic over libncurses
25434         TINFO_NAME=${LIB_NAME}
25435         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25436         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25437         if test "x$with_tic_depends" = xyes ; then
25438                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25439         else
25440                 TICS_LIST="$SHLIB_LIST"
25441         fi
25442
25443         TINFO_LDFLAGS="-L${LIB_DIR}"
25444         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25445 fi
25446
25447 if test "$DFT_LWR_MODEL" = shared ; then
25448         case $cf_cv_system_name in
25449         (cygwin*|msys*)
25450                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25451                 TINFO_SUFFIX=.dll
25452                 ;;
25453         esac
25454 fi
25455
25456 if test "x$with_dlsym" = xyes ; then
25457
25458 # remove dl library from $TICS_LIST
25459 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25460
25461 fi
25462
25463 if test "$DFT_LWR_MODEL" = "libtool"; then
25464         OBJEXT=lo
25465 fi
25466
25467 # needed for Ada95
25468 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25469
25470 case $DFT_LWR_MODEL in
25471 (normal|debug|profile)
25472
25473 if test "$GCC" = yes ; then
25474         case $cf_cv_system_name in
25475         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25476                 LDFLAGS_STATIC=
25477                 LDFLAGS_SHARED=
25478                 ;;
25479         (*)     # normally, except when broken
25480                 LDFLAGS_STATIC=-static
25481                 LDFLAGS_SHARED=-dynamic
25482                 ;;
25483         esac
25484 else
25485         case $cf_cv_system_name in
25486         (aix[4-7]*)     # from ld manpage
25487                 LDFLAGS_STATIC=-bstatic
25488                 LDFLAGS_SHARED=-bdynamic
25489                 ;;
25490         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25491                 # We could also use just "archive" and "shared".
25492                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25493                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25494                 ;;
25495         (irix*)         # from ld manpage IRIX64
25496                 LDFLAGS_STATIC=-Bstatic
25497                 LDFLAGS_SHARED=-Bdynamic
25498                 ;;
25499         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25500                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25501                 LDFLAGS_STATIC=-noso
25502                 LDFLAGS_SHARED=-so_archive
25503                 ;;
25504         (solaris2*)
25505                 LDFLAGS_STATIC=-Bstatic
25506                 LDFLAGS_SHARED=-Bdynamic
25507                 ;;
25508         esac
25509 fi
25510
25511 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25512 then
25513         echo "$as_me:25513: checking if linker supports switching between static/dynamic" >&5
25514 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25515
25516         rm -f libconftest.a
25517         cat >conftest.$ac_ext <<EOF
25518 #line 25518 "configure"
25519 #include <stdio.h>
25520 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25521 EOF
25522         if { (eval echo "$as_me:25522: \"$ac_compile\"") >&5
25523   (eval $ac_compile) 2>&5
25524   ac_status=$?
25525   echo "$as_me:25525: \$? = $ac_status" >&5
25526   (exit $ac_status); } ; then
25527                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25528                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25529         fi
25530         rm -f conftest.*
25531
25532         cf_save_LIBS="$LIBS"
25533
25534         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25535         cat >conftest.$ac_ext <<_ACEOF
25536 #line 25536 "configure"
25537 #include "confdefs.h"
25538
25539 #line 25539 "configure"
25540 #include <stdio.h>
25541 int cf_ldflags_static(FILE *fp);
25542
25543 int
25544 main (void)
25545 {
25546
25547         return cf_ldflags_static(stdin);
25548
25549   ;
25550   return 0;
25551 }
25552 _ACEOF
25553 rm -f conftest.$ac_objext conftest$ac_exeext
25554 if { (eval echo "$as_me:25554: \"$ac_link\"") >&5
25555   (eval $ac_link) 2>&5
25556   ac_status=$?
25557   echo "$as_me:25557: \$? = $ac_status" >&5
25558   (exit $ac_status); } &&
25559          { ac_try='test -s conftest$ac_exeext'
25560   { (eval echo "$as_me:25560: \"$ac_try\"") >&5
25561   (eval $ac_try) 2>&5
25562   ac_status=$?
25563   echo "$as_me:25563: \$? = $ac_status" >&5
25564   (exit $ac_status); }; }; then
25565
25566         # some linkers simply ignore the -dynamic
25567         case x`file conftest$ac_exeext 2>/dev/null` in
25568         (*static*)
25569                 cf_ldflags_static=no
25570                 ;;
25571         (*)
25572                 cf_ldflags_static=yes
25573                 ;;
25574         esac
25575
25576 else
25577   echo "$as_me: failed program was:" >&5
25578 cat conftest.$ac_ext >&5
25579 cf_ldflags_static=no
25580 fi
25581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25582
25583         rm -f libconftest.*
25584         LIBS="$cf_save_LIBS"
25585
25586         echo "$as_me:25586: result: $cf_ldflags_static" >&5
25587 echo "${ECHO_T}$cf_ldflags_static" >&6
25588
25589         if test $cf_ldflags_static != yes
25590         then
25591                 LDFLAGS_STATIC=
25592                 LDFLAGS_SHARED=
25593         fi
25594 else
25595         LDFLAGS_STATIC=
25596         LDFLAGS_SHARED=
25597 fi
25598
25599         ;;
25600 esac
25601
25602 echo "$as_me:25602: checking where we will install curses.h" >&5
25603 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25604
25605 includesubdir=
25606 if test "$with_overwrite" = no && \
25607  ( test "x$includedir" = 'x${prefix}/include' || \
25608    test "x$includedir" = "x${prefix}/include" )
25609 then
25610         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25611 fi
25612 echo "$as_me:25612: result: ${includedir}${includesubdir}" >&5
25613 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25614
25615 ### Resolve a conflict between normal and wide-curses by forcing applications
25616 ### that will need libutf8 to add it to their configure script.
25617 if test "$with_overwrite" != no ; then
25618 if test "$NCURSES_LIBUTF8" = 1 ; then
25619         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25620         { echo "$as_me:25620: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25621 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25622 fi
25623 fi
25624 WITH_OVERWRITE=$with_overwrite
25625
25626 # used to separate tack out of the tree
25627 NCURSES_TREE=
25628
25629 ### predefined stuff for the test programs
25630
25631 cat >>confdefs.h <<\EOF
25632 #define HAVE_SLK_COLOR 1
25633 EOF
25634
25635 ### Construct the list of subdirectories for which we'll customize makefiles
25636 ### with the appropriate compile-rules.
25637
25638 echo "$as_me:25638: checking for src modules" >&5
25639 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25640
25641 # dependencies and linker-arguments for test-programs
25642 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25643 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25644 if test "$DFT_LWR_MODEL" = "libtool"; then
25645         TEST_ARGS="${TEST_DEPS}"
25646         TEST_ARG2="${TEST_DEP2}"
25647 else
25648         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25649         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25650 fi
25651
25652 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25653 cf_cv_src_modules=
25654 for cf_dir in $modules_to_build
25655 do
25656         if test -f $srcdir/$cf_dir/modules; then
25657
25658                 # We may/may not have tack in the distribution, though the
25659                 # makefile is.
25660                 if test $cf_dir = tack ; then
25661                         if test "x$cf_with_tack" != "xyes"; then
25662                                 continue
25663                         fi
25664                 fi
25665
25666                 if test -z "$cf_cv_src_modules"; then
25667                         cf_cv_src_modules=$cf_dir
25668                 else
25669                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25670                 fi
25671
25672                 # Make the ncurses_cfg.h file record the library interface files as
25673                 # well.  These are header files that are the same name as their
25674                 # directory.  Ncurses is the only library that does not follow
25675                 # that pattern.
25676                 if test $cf_dir = tack ; then
25677                         continue
25678                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25679
25680 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25681
25682                         cat >>confdefs.h <<EOF
25683 #define HAVE_${cf_have_include}_H 1
25684 EOF
25685
25686                         cat >>confdefs.h <<EOF
25687 #define HAVE_LIB${cf_have_include} 1
25688 EOF
25689
25690                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25691                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25692                         if test "$DFT_LWR_MODEL" = "libtool"; then
25693                                 TEST_ARGS="${TEST_DEPS}"
25694                                 TEST_ARG2="${TEST_DEP2}"
25695                         else
25696                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25697                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25698                         fi
25699                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25700                 fi
25701         fi
25702 done
25703 echo "$as_me:25703: result: $cf_cv_src_modules" >&5
25704 echo "${ECHO_T}$cf_cv_src_modules" >&6
25705
25706 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25707 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25708
25709 SRC_SUBDIRS=
25710 if test "x$cf_with_manpages" != xno ; then
25711         SRC_SUBDIRS="$SRC_SUBDIRS man"
25712 fi
25713 SRC_SUBDIRS="$SRC_SUBDIRS include"
25714 for cf_dir in $cf_cv_src_modules
25715 do
25716         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25717 done
25718 if test "x$cf_with_tests" != "xno" ; then
25719         SRC_SUBDIRS="$SRC_SUBDIRS test"
25720 fi
25721 # always make this, to install the ncurses-config script
25722 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25723 if test "$cf_with_cxx_binding" != no; then
25724         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25725         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25726 fi
25727
25728 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25729 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25730
25731 ADA_SUBDIRS=
25732 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25733         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25734         ADA_SUBDIRS="gen src"
25735         if test "x$cf_with_tests" != "xno" ; then
25736                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25737         fi
25738 fi
25739
25740 SUB_MAKEFILES=
25741 for cf_dir in $SRC_SUBDIRS
25742 do
25743         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25744 done
25745
25746 if test -n "$ADA_SUBDIRS"; then
25747         for cf_dir in $ADA_SUBDIRS
25748         do
25749                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25750         done
25751
25752 fi
25753
25754 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25755    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25756    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25757    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25758 fi
25759
25760 DIRS_TO_MAKE="lib"
25761 for cf_item in $cf_list_models
25762 do
25763
25764         case $cf_item in
25765         (libtool) cf_subdir='obj_lo'  ;;
25766         (normal)  cf_subdir='objects' ;;
25767         (debug)   cf_subdir='obj_g' ;;
25768         (profile) cf_subdir='obj_p' ;;
25769         (shared)
25770                 case $cf_cv_system_name in
25771                 (cygwin|msys)
25772                         cf_subdir='objects' ;;
25773                 (*)
25774                         cf_subdir='obj_s' ;;
25775                 esac
25776         esac
25777
25778         for cf_item2 in $DIRS_TO_MAKE
25779         do
25780                 test $cf_item2 = $cf_subdir && break
25781         done
25782         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25783 done
25784 for cf_dir in $DIRS_TO_MAKE
25785 do
25786         test ! -d $cf_dir && mkdir $cf_dir
25787 done
25788
25789 # symbols that differ when compiling Ada95 by itself.
25790 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25791
25792 # values to use as strings
25793
25794 cat >>confdefs.h <<EOF
25795 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25796 EOF
25797
25798 cat >>confdefs.h <<EOF
25799 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25800 EOF
25801
25802 ### Now that we're done running tests, add the compiler-warnings, if any
25803
25804 cf_fix_cppflags=no
25805 cf_new_cflags=
25806 cf_new_cppflags=
25807 cf_new_extra_cppflags=
25808
25809 for cf_add_cflags in $EXTRA_CFLAGS
25810 do
25811 case $cf_fix_cppflags in
25812 (no)
25813         case $cf_add_cflags in
25814         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25815                 case $cf_add_cflags in
25816                 (-D*)
25817                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25818
25819                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25820                                 && test -z "${cf_tst_cflags}" \
25821                                 && cf_fix_cppflags=yes
25822
25823                         if test $cf_fix_cppflags = yes ; then
25824
25825         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25826         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25827
25828                                 continue
25829                         elif test "${cf_tst_cflags}" = "\"'" ; then
25830
25831         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25832         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25833
25834                                 continue
25835                         fi
25836                         ;;
25837                 esac
25838                 case "$CPPFLAGS" in
25839                 (*$cf_add_cflags)
25840                         ;;
25841                 (*)
25842                         case $cf_add_cflags in
25843                         (-D*)
25844                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25845
25846 CPPFLAGS=`echo "$CPPFLAGS" | \
25847         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25848                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25849
25850                                 ;;
25851                         esac
25852
25853         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25854         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25855
25856                         ;;
25857                 esac
25858                 ;;
25859         (*)
25860
25861         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25862         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25863
25864                 ;;
25865         esac
25866         ;;
25867 (yes)
25868
25869         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25870         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25871
25872         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25873
25874         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25875                 && test -z "${cf_tst_cflags}" \
25876                 && cf_fix_cppflags=no
25877         ;;
25878 esac
25879 done
25880
25881 if test -n "$cf_new_cflags" ; then
25882
25883         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25884         CFLAGS="${CFLAGS}$cf_new_cflags"
25885
25886 fi
25887
25888 if test -n "$cf_new_cppflags" ; then
25889
25890         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25891         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25892
25893 fi
25894
25895 if test -n "$cf_new_extra_cppflags" ; then
25896
25897         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25898         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25899
25900 fi
25901
25902 ### Define substitutions for header files to avoid name-pollution
25903
25904 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25905         HAVE_TCGETATTR=1
25906 else
25907         HAVE_TCGETATTR=0
25908 fi
25909
25910 if test "x$ac_cv_header_stdint_h" = xyes ; then
25911         HAVE_STDINT_H=1
25912 else
25913         HAVE_STDINT_H=0
25914 fi
25915
25916 if test "x$ac_cv_header_termio_h" = xyes ; then
25917         HAVE_TERMIO_H=1
25918 else
25919         HAVE_TERMIO_H=0
25920 fi
25921
25922 if test "x$ac_cv_header_termios_h" = xyes ; then
25923         HAVE_TERMIOS_H=1
25924 else
25925         HAVE_TERMIOS_H=0
25926 fi
25927
25928 ################################################################################
25929 test "x$use_database" = xyes && \
25930 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25931
25932 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25933 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25934
25935 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25936 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25937 fi
25938
25939 if test "x$cf_with_tests" != xno ; then
25940         MAKE_TESTS=
25941 else
25942         MAKE_TESTS="#"
25943 fi
25944
25945 ADAHTML_DIR=../../doc/html/ada
25946
25947 # these could be configurable, but are not currently
25948 PANEL_NAME=panel
25949 MENU_NAME=menu
25950 FORM_NAME=form
25951 CXX_NAME=ncurses++
25952
25953 # workaround for OS/2 (20151017)
25954 case $cf_cv_system_name in
25955 (os2*)
25956         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25957         ;;
25958 (*)
25959         LIBTOOL_OPTS_CXX=
25960         ;;
25961 esac
25962
25963 # workaround for g++ versus Solaris (20131116)
25964 case $cf_cv_system_name in
25965 (solaris2*)
25966         case "x$CPPFLAGS" in
25967         (*-D_XOPEN_SOURCE_EXTENDED*)
25968                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25969
25970 echo "${as_me:-configure}:25970: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25971
25972                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25973                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25974                 ;;
25975         esac
25976         ;;
25977 esac
25978
25979 # Help to automatically enable the extended curses features when using either
25980 # the *-config or the ".pc" files by adding defines.
25981 echo "$as_me:25981: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25982 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25983 PKG_CFLAGS=
25984 for cf_loop1 in $CPPFLAGS_after_XOPEN
25985 do
25986         cf_found=no
25987         for cf_loop2 in $CPPFLAGS_before_XOPEN
25988         do
25989                 if test "x$cf_loop1" = "x$cf_loop2"
25990                 then
25991                         cf_found=yes
25992                         break
25993                 fi
25994         done
25995         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25996 done
25997 echo "$as_me:25997: result: $PKG_CFLAGS" >&5
25998 echo "${ECHO_T}$PKG_CFLAGS" >&6
25999
26000 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26001 case "x$NCURSES_OSPEED" in
26002 (*short*)
26003         cf_compatible=1
26004         ;;
26005 (*)
26006         cf_compatible=0
26007         ;;
26008 esac
26009
26010 cat >>confdefs.h <<EOF
26011 #define NCURSES_OSPEED_COMPAT $cf_compatible
26012 EOF
26013
26014 case "x$cf_cv_typeof_chtype" in
26015 (xshort|xint|xlong)
26016         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26017         ;;
26018 esac
26019
26020 case "x$cf_cv_typeof_mmask_t" in
26021 (xshort|xint|xlong)
26022         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26023         ;;
26024 esac
26025
26026 # substitute into misc/Makefile to suppress
26027 # (un)install.data from the
26028 # (un)install rules.
26029 if test "x$cf_with_db_install" = "xno"; then
26030         MISC_INSTALL_DATA=
26031         MISC_UNINSTALL_DATA=
26032 else
26033         MISC_INSTALL_DATA=install.data
26034         MISC_UNINSTALL_DATA=uninstall.data
26035 fi
26036
26037 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26038         MAKE_DATABASE="#"
26039 else
26040         MAKE_DATABASE="$MAKE_TERMINFO"
26041 fi
26042
26043 if test -n "$PACKAGE"
26044 then
26045         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26046         export PACKAGE
26047         echo "package: $PACKAGE"
26048 fi
26049
26050 UNALTERED_SYMS=
26051 cf_filter_syms=no
26052
26053 if test -n "$RESULTING_SYMS"
26054 then
26055         cf_filter_syms=$cf_dft_filter_syms
26056         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26057
26058 echo "${as_me:-configure}:26058: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26059
26060 fi
26061
26062 if test "x$WILDCARD_SYMS" = xno
26063 then
26064         cf_filter_syms=yes
26065 fi
26066
26067 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26068
26069 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26070 if test $cf_filter_syms = yes
26071 then
26072         RESULTING_SYMS=resulting.map
26073 fi
26074
26075 if test "x$cross_compiling" = xyes ; then
26076         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26077         CHECK_BUILD="#"
26078 else
26079         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26080         CHECK_BUILD=
26081 fi
26082
26083 # This is used for the *-config script and *.pc data files.
26084
26085 echo "$as_me:26085: checking for linker search path" >&5
26086 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26087 if test "${cf_cv_ld_searchpath+set}" = set; then
26088   echo $ECHO_N "(cached) $ECHO_C" >&6
26089 else
26090
26091 if test "$cross_compiling" != yes ; then
26092
26093 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26094 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26095
26096 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26097 # update the cache, which makes it run faster.
26098 test -z "$cf_pathlist" && \
26099         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26100
26101 test -z "$cf_pathlist" &&
26102         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26103
26104 # This works with OpenBSD 6.5, which lists only filenames
26105 test -z "$cf_pathlist" &&
26106         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26107
26108 if test -z "$cf_pathlist"
26109 then
26110         # dyld default path with MacOS
26111         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26112         then
26113                 # do this to bypass check
26114                 cf_cv_ld_searchpath='$HOME/lib'
26115                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26116         fi
26117 fi
26118
26119 if test -z "$cf_pathlist"
26120 then
26121         # Solaris is hardcoded
26122         if test -d /opt/SUNWspro/lib
26123         then
26124                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26125         elif test -d /usr/ccs/lib
26126         then
26127                 cf_pathlist="/usr/ccs/lib /usr/lib"
26128         fi
26129 fi
26130
26131 fi
26132
26133 # If nothing else, assume it is conventional
26134 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26135
26136 # Finally, check that this is only directories
26137 for cf_path in $0 $cf_pathlist
26138 do
26139         if test -d "$cf_path"; then
26140                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26141                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26142         fi
26143 done
26144
26145 # Ensure that it is nonempty
26146 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26147
26148 fi
26149 echo "$as_me:26149: result: $cf_cv_ld_searchpath" >&5
26150 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26151
26152 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26153
26154 cat >>confdefs.h <<\EOF
26155 #define HAVE_CURSES_DATA_BOOLNAMES 1
26156 EOF
26157
26158 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
26159 ac_config_commands="$ac_config_commands default"
26160 cat >confcache <<\_ACEOF
26161 # This file is a shell script that caches the results of configure
26162 # tests run on this system so they can be shared between configure
26163 # scripts and configure runs, see configure's option --config-cache.
26164 # It is not useful on other systems.  If it contains results you don't
26165 # want to keep, you may remove or edit it.
26166 #
26167 # config.status only pays attention to the cache file if you give it
26168 # the --recheck option to rerun configure.
26169 #
26170 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26171 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26172 # following values.
26173
26174 _ACEOF
26175
26176 # The following way of writing the cache mishandles newlines in values,
26177 # but we know of no workaround that is simple, portable, and efficient.
26178 # So, don't put newlines in cache variables' values.
26179 # Ultrix sh set writes to stderr and can't be redirected directly,
26180 # and sets the high bit in the cache file unless we assign to the vars.
26181 {
26182   (set) 2>&1 |
26183     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26184     *ac_space=\ *)
26185       # `set' does not quote correctly, so add quotes (double-quote
26186       # substitution turns \\\\ into \\, and sed turns \\ into \).
26187       sed -n \
26188         "s/'/'\\\\''/g;
26189           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26190       ;;
26191     *)
26192       # `set' quotes correctly as required by POSIX, so do not add quotes.
26193       sed -n \
26194         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26195       ;;
26196     esac;
26197 } |
26198   sed '
26199      t clear
26200      : clear
26201      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26202      t end
26203      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26204      : end' >>confcache
26205 if cmp -s $cache_file confcache; then :; else
26206   if test -w $cache_file; then
26207     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26208     cat confcache >$cache_file
26209   else
26210     echo "not updating unwritable cache $cache_file"
26211   fi
26212 fi
26213 rm -f confcache
26214
26215 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26216 # Let make expand exec_prefix.
26217 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26218
26219 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26220 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26221 # trailing colons and then remove the whole line if VPATH becomes empty
26222 # (actually we leave an empty line to preserve line numbers).
26223 if test "x$srcdir" = x.; then
26224   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26225 s/:*\$(srcdir):*/:/;
26226 s/:*\${srcdir}:*/:/;
26227 s/:*@srcdir@:*/:/;
26228 s/^\([^=]*=[    ]*\):*/\1/;
26229 s/:*$//;
26230 s/^[^=]*=[      ]*$//;
26231 }'
26232 fi
26233
26234 DEFS=-DHAVE_CONFIG_H
26235
26236 : ${CONFIG_STATUS=./config.status}
26237 ac_clean_files_save=$ac_clean_files
26238 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26239 { echo "$as_me:26239: creating $CONFIG_STATUS" >&5
26240 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26241 cat >$CONFIG_STATUS <<_ACEOF
26242 #! $SHELL
26243 # Generated automatically by configure.
26244 # Run this file to recreate the current configuration.
26245 # Compiler output produced by configure, useful for debugging
26246 # configure, is in config.log if it exists.
26247
26248 debug=false
26249 SHELL=\${CONFIG_SHELL-$SHELL}
26250 ac_cs_invocation="\$0 \$@"
26251
26252 _ACEOF
26253
26254 cat >>$CONFIG_STATUS <<\_ACEOF
26255 # Be Bourne compatible
26256 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26257   emulate sh
26258   NULLCMD=:
26259 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26260   set -o posix
26261 fi
26262
26263 # Name of the executable.
26264 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26265
26266 if expr a : '\(a\)' >/dev/null 2>&1; then
26267   as_expr=expr
26268 else
26269   as_expr=false
26270 fi
26271
26272 rm -f conf$$ conf$$.exe conf$$.file
26273 echo >conf$$.file
26274 if ln -s conf$$.file conf$$ 2>/dev/null; then
26275   # We could just check for DJGPP; but this test a) works b) is more generic
26276   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26277   if test -f conf$$.exe; then
26278     # Don't use ln at all; we don't have any links
26279     as_ln_s='cp -p'
26280   else
26281     as_ln_s='ln -s'
26282   fi
26283 elif ln conf$$.file conf$$ 2>/dev/null; then
26284   as_ln_s=ln
26285 else
26286   as_ln_s='cp -p'
26287 fi
26288 rm -f conf$$ conf$$.exe conf$$.file
26289
26290 as_executable_p="test -f"
26291
26292 # Support unset when possible.
26293 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26294   as_unset=unset
26295 else
26296   as_unset=false
26297 fi
26298
26299 # NLS nuisances.
26300 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26301 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26302 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26303 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26304 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26305 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26306 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26307 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26308
26309 # IFS
26310 # We need space, tab and new line, in precisely that order.
26311 as_nl='
26312 '
26313 IFS="   $as_nl"
26314
26315 # CDPATH.
26316 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26317
26318 exec 6>&1
26319
26320 _ACEOF
26321
26322 # Files that config.status was made for.
26323 if test -n "$ac_config_files"; then
26324   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26325 fi
26326
26327 if test -n "$ac_config_headers"; then
26328   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26329 fi
26330
26331 if test -n "$ac_config_links"; then
26332   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26333 fi
26334
26335 if test -n "$ac_config_commands"; then
26336   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26337 fi
26338
26339 cat >>$CONFIG_STATUS <<\EOF
26340
26341 ac_cs_usage="\
26342 \`$as_me' instantiates files from templates according to the
26343 current configuration.
26344
26345 Usage: $0 [OPTIONS] [FILE]...
26346
26347   -h, --help       print this help, then exit
26348   -V, --version    print version number, then exit
26349   -d, --debug      don't remove temporary files
26350       --recheck    update $as_me by reconfiguring in the same conditions
26351   --file=FILE[:TEMPLATE]
26352                    instantiate the configuration file FILE
26353   --header=FILE[:TEMPLATE]
26354                    instantiate the configuration header FILE
26355
26356 Configuration files:
26357 $config_files
26358
26359 Configuration headers:
26360 $config_headers
26361
26362 Configuration commands:
26363 $config_commands
26364
26365 Report bugs to <dickey@invisible-island.net>."
26366 EOF
26367
26368 cat >>$CONFIG_STATUS <<EOF
26369 ac_cs_version="\\
26370 config.status
26371 configured by $0, generated by GNU Autoconf 2.52.20200111,
26372   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26373
26374 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26375 Free Software Foundation, Inc.
26376 This config.status script is free software; the Free Software Foundation
26377 gives unlimited permission to copy, distribute and modify it."
26378 srcdir=$srcdir
26379 INSTALL="$INSTALL"
26380 EOF
26381
26382 cat >>$CONFIG_STATUS <<\EOF
26383 # If no file are specified by the user, then we need to provide default
26384 # value.  By we need to know if files were specified by the user.
26385 ac_need_defaults=:
26386 while test $# != 0
26387 do
26388   case $1 in
26389   --*=*)
26390     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26391     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26392     shift
26393     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26394     shift
26395     ;;
26396   -*);;
26397   *) # This is not an option, so the user has probably given explicit
26398      # arguments.
26399      ac_need_defaults=false;;
26400   esac
26401
26402   case $1 in
26403   # Handling of the options.
26404 EOF
26405 cat >>$CONFIG_STATUS <<EOF
26406   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26407     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26408     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26409 EOF
26410 cat >>$CONFIG_STATUS <<\EOF
26411   --version | --vers* | -V )
26412     echo "$ac_cs_version"; exit 0 ;;
26413   --he | --h)
26414     # Conflict between --help and --header
26415     { { echo "$as_me:26415: error: ambiguous option: $1
26416 Try \`$0 --help' for more information." >&5
26417 echo "$as_me: error: ambiguous option: $1
26418 Try \`$0 --help' for more information." >&2;}
26419    { (exit 1); exit 1; }; };;
26420   --help | --hel | -h )
26421     echo "$ac_cs_usage"; exit 0 ;;
26422   --debug | --d* | -d )
26423     debug=: ;;
26424   --file | --fil | --fi | --f )
26425     shift
26426     CONFIG_FILES="$CONFIG_FILES $1"
26427     ac_need_defaults=false;;
26428   --header | --heade | --head | --hea )
26429     shift
26430     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26431     ac_need_defaults=false;;
26432
26433   # This is an error.
26434   -*) { { echo "$as_me:26434: error: unrecognized option: $1
26435 Try \`$0 --help' for more information." >&5
26436 echo "$as_me: error: unrecognized option: $1
26437 Try \`$0 --help' for more information." >&2;}
26438    { (exit 1); exit 1; }; } ;;
26439
26440   *) ac_config_targets="$ac_config_targets $1" ;;
26441
26442   esac
26443   shift
26444 done
26445
26446 exec 5>>config.log
26447 cat >&5 << _ACEOF
26448
26449 ## ----------------------- ##
26450 ## Running config.status.  ##
26451 ## ----------------------- ##
26452
26453 This file was extended by $as_me 2.52.20200111, executed with
26454   CONFIG_FILES    = $CONFIG_FILES
26455   CONFIG_HEADERS  = $CONFIG_HEADERS
26456   CONFIG_LINKS    = $CONFIG_LINKS
26457   CONFIG_COMMANDS = $CONFIG_COMMANDS
26458   > $ac_cs_invocation
26459 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26460
26461 _ACEOF
26462 EOF
26463
26464 cat >>$CONFIG_STATUS <<EOF
26465 #
26466 # INIT-COMMANDS section.
26467 #
26468
26469 ### Special initialization commands, used to pass information from the
26470 ### configuration-run into config.status
26471
26472 AWK="$AWK"
26473 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26474 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26475 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26476 ECHO_LD="$ECHO_LD"
26477 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26478 LDCONFIG="$LDCONFIG"
26479 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26480 LIB_NAME="$LIB_NAME"
26481 LIB_PREFIX="$LIB_PREFIX"
26482 LIB_SUBSETS="$LIB_SUBSETS"
26483 LIB_SUFFIX="$LIB_SUFFIX"
26484 LIB_TRACING="$LIB_TRACING"
26485 LN_S="$LN_S"
26486 MAKE_TERMINFO="$MAKE_TERMINFO"
26487 NCURSES_MAJOR="$NCURSES_MAJOR"
26488 NCURSES_MINOR="$NCURSES_MINOR"
26489 NCURSES_OSPEED="$NCURSES_OSPEED"
26490 NCURSES_PATCH="$NCURSES_PATCH"
26491 SRC_SUBDIRS="$SRC_SUBDIRS"
26492 TERMINFO="$TERMINFO"
26493 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26494 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26495 TICS_NAME="$TICS_NAME"
26496 TICS_SUFFIX="$TICS_SUFFIX"
26497 TIC_PATH="$TIC_PATH"
26498 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26499 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26500 TINFO_NAME="$TINFO_NAME"
26501 TINFO_SUFFIX="$TINFO_SUFFIX"
26502 UNALTERED_SYMS="$UNALTERED_SYMS"
26503 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26504 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26505 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26506 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26507 WILDCARD_SYMS="$WILDCARD_SYMS"
26508 WITH_CURSES_H="$with_curses_h"
26509 WITH_ECHO="${enable_echo:=yes}"
26510 WITH_OVERWRITE="$with_overwrite"
26511 cf_LIST_MODELS="$cf_list_models"
26512 cf_cv_abi_version="$cf_cv_abi_version"
26513 cf_cv_do_relink="$cf_cv_do_relink"
26514 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26515 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26516 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26517 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26518 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26519 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26520 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26521 cf_cv_rel_version="$cf_cv_rel_version"
26522 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26523 cf_cv_shared_soname='$cf_cv_shared_soname'
26524 cf_cv_shlib_version="$cf_cv_shlib_version"
26525 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26526 cf_cv_system_name="$cf_cv_system_name"
26527 cf_cv_term_driver="$with_term_driver"
26528 cf_with_ada="$cf_with_ada"
26529 cf_with_cxx_binding="$cf_with_cxx_binding"
26530 cf_with_db_install="$cf_with_db_install"
26531 cf_with_manpages="$cf_with_manpages"
26532 cf_with_tests="$cf_with_tests"
26533 host="$host"
26534 target="$target"
26535 with_shared_cxx="$with_shared_cxx"
26536
26537 EOF
26538
26539 cat >>$CONFIG_STATUS <<\EOF
26540 for ac_config_target in $ac_config_targets
26541 do
26542   case "$ac_config_target" in
26543   # Handling of arguments.
26544   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26545   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26546   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26547   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26548   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26549   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26550   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26551   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26552   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26553   *) { { echo "$as_me:26553: error: invalid argument: $ac_config_target" >&5
26554 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26555    { (exit 1); exit 1; }; };;
26556   esac
26557 done
26558
26559 # If the user did not use the arguments to specify the items to instantiate,
26560 # then the envvar interface is used.  Set only those that are not.
26561 # We use the long form for the default assignment because of an extremely
26562 # bizarre bug on SunOS 4.1.3.
26563 if $ac_need_defaults; then
26564   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26565   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26566   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26567 fi
26568
26569 # Create a temporary directory, and hook for its removal unless debugging.
26570 $debug ||
26571 {
26572   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26573   trap '{ (exit 1); exit 1; }' 1 2 13 15
26574 }
26575
26576 # Create a (secure) tmp directory for tmp files.
26577 : ${TMPDIR=/tmp}
26578 {
26579   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26580   test -n "$tmp" && test -d "$tmp"
26581 }  ||
26582 {
26583   tmp=$TMPDIR/cs$$-$RANDOM
26584   (umask 077 && mkdir $tmp)
26585 } ||
26586 {
26587    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26588    { (exit 1); exit 1; }
26589 }
26590
26591 EOF
26592
26593 cat >>$CONFIG_STATUS <<EOF
26594
26595 #
26596 # CONFIG_FILES section.
26597 #
26598
26599 # No need to generate the scripts if there are no CONFIG_FILES.
26600 # This happens for instance when ./config.status config.h
26601 if test -n "\$CONFIG_FILES"; then
26602   # Protect against being on the right side of a sed subst in config.status.
26603   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26604    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26605 s,@SHELL@,$SHELL,;t t
26606 s,@exec_prefix@,$exec_prefix,;t t
26607 s,@prefix@,$prefix,;t t
26608 s,@program_transform_name@,$program_transform_name,;t t
26609 s,@bindir@,$bindir,;t t
26610 s,@sbindir@,$sbindir,;t t
26611 s,@libexecdir@,$libexecdir,;t t
26612 s,@datarootdir@,$datarootdir,;t t
26613 s,@datadir@,$datadir,;t t
26614 s,@sysconfdir@,$sysconfdir,;t t
26615 s,@sharedstatedir@,$sharedstatedir,;t t
26616 s,@localstatedir@,$localstatedir,;t t
26617 s,@runstatedir@,$runstatedir,;t t
26618 s,@libdir@,$libdir,;t t
26619 s,@includedir@,$includedir,;t t
26620 s,@oldincludedir@,$oldincludedir,;t t
26621 s,@infodir@,$infodir,;t t
26622 s,@mandir@,$mandir,;t t
26623 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26624 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26625 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26626 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26627 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26628 s,@build_alias@,$build_alias,;t t
26629 s,@host_alias@,$host_alias,;t t
26630 s,@target_alias@,$target_alias,;t t
26631 s,@ECHO_C@,$ECHO_C,;t t
26632 s,@ECHO_N@,$ECHO_N,;t t
26633 s,@ECHO_T@,$ECHO_T,;t t
26634 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26635 s,@DEFS@,$DEFS,;t t
26636 s,@LIBS@,$LIBS,;t t
26637 s,@top_builddir@,$top_builddir,;t t
26638 s,@EGREP@,$EGREP,;t t
26639 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26640 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26641 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26642 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26643 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26644 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26645 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26646 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26647 s,@VERSION@,$VERSION,;t t
26648 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26649 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26650 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26651 s,@PACKAGE@,$PACKAGE,;t t
26652 s,@build@,$build,;t t
26653 s,@build_cpu@,$build_cpu,;t t
26654 s,@build_vendor@,$build_vendor,;t t
26655 s,@build_os@,$build_os,;t t
26656 s,@host@,$host,;t t
26657 s,@host_cpu@,$host_cpu,;t t
26658 s,@host_vendor@,$host_vendor,;t t
26659 s,@host_os@,$host_os,;t t
26660 s,@target@,$target,;t t
26661 s,@target_cpu@,$target_cpu,;t t
26662 s,@target_vendor@,$target_vendor,;t t
26663 s,@target_os@,$target_os,;t t
26664 s,@CC@,$CC,;t t
26665 s,@CFLAGS@,$CFLAGS,;t t
26666 s,@LDFLAGS@,$LDFLAGS,;t t
26667 s,@CPPFLAGS@,$CPPFLAGS,;t t
26668 s,@ac_ct_CC@,$ac_ct_CC,;t t
26669 s,@EXEEXT@,$EXEEXT,;t t
26670 s,@OBJEXT@,$OBJEXT,;t t
26671 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26672 s,@CPP@,$CPP,;t t
26673 s,@LDCONFIG@,$LDCONFIG,;t t
26674 s,@CXX@,$CXX,;t t
26675 s,@CXXFLAGS@,$CXXFLAGS,;t t
26676 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26677 s,@AWK@,$AWK,;t t
26678 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26679 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26680 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26681 s,@LINT@,$LINT,;t t
26682 s,@LINT_OPTS@,$LINT_OPTS,;t t
26683 s,@LN_S@,$LN_S,;t t
26684 s,@cf_config_suffix@,$cf_config_suffix,;t t
26685 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26686 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26687 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26688 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26689 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26690 s,@SET_MAKE@,$SET_MAKE,;t t
26691 s,@CTAGS@,$CTAGS,;t t
26692 s,@ETAGS@,$ETAGS,;t t
26693 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26694 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26695 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26696 s,@RANLIB@,$RANLIB,;t t
26697 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26698 s,@LD@,$LD,;t t
26699 s,@ac_ct_LD@,$ac_ct_LD,;t t
26700 s,@AR@,$AR,;t t
26701 s,@ac_ct_AR@,$ac_ct_AR,;t t
26702 s,@NM@,$NM,;t t
26703 s,@ac_ct_NM@,$ac_ct_NM,;t t
26704 s,@ARFLAGS@,$ARFLAGS,;t t
26705 s,@DESTDIR@,$DESTDIR,;t t
26706 s,@BUILD_CC@,$BUILD_CC,;t t
26707 s,@BUILD_CPP@,$BUILD_CPP,;t t
26708 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26709 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26710 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26711 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26712 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26713 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26714 s,@cf_list_models@,$cf_list_models,;t t
26715 s,@ABI_VERSION@,$ABI_VERSION,;t t
26716 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26717 s,@LIBTOOL@,$LIBTOOL,;t t
26718 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26719 s,@LT_UNDEF@,$LT_UNDEF,;t t
26720 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26721 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26722 s,@LIB_CREATE@,$LIB_CREATE,;t t
26723 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26724 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26725 s,@LIB_PREP@,$LIB_PREP,;t t
26726 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26727 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26728 s,@LIB_LINK@,$LIB_LINK,;t t
26729 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26730 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26731 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26732 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26733 s,@TICS_NAME@,$TICS_NAME,;t t
26734 s,@TINFO_NAME@,$TINFO_NAME,;t t
26735 s,@LIB_NAME@,$LIB_NAME,;t t
26736 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26737 s,@CC_G_OPT@,$CC_G_OPT,;t t
26738 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26739 s,@LD_MODEL@,$LD_MODEL,;t t
26740 s,@shlibdir@,$shlibdir,;t t
26741 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26742 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26743 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26744 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26745 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26746 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26747 s,@LINK_PROGS@,$LINK_PROGS,;t t
26748 s,@LINK_TESTS@,$LINK_TESTS,;t t
26749 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26750 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26751 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26752 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26753 s,@RPATH_LIST@,$RPATH_LIST,;t t
26754 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26755 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26756 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26757 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26758 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26759 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26760 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26761 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26762 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26763 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26764 s,@TIC@,$TIC,;t t
26765 s,@INFOCMP@,$INFOCMP,;t t
26766 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26767 s,@XTERM_KBS@,$XTERM_KBS,;t t
26768 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26769 s,@TERMINFO@,$TERMINFO,;t t
26770 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26771 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26772 s,@TERMPATH@,$TERMPATH,;t t
26773 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26774 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26775 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26776 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26777 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26778 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26779 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26780 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26781 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26782 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26783 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26784 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26785 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26786 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26787 s,@RGB_PATH@,$RGB_PATH,;t t
26788 s,@no_x11_rgb@,$no_x11_rgb,;t t
26789 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26790 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26791 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26792 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26793 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26794 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26795 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26796 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26797 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26798 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26799 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26800 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26801 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26802 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26803 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26804 s,@PTHREAD@,$PTHREAD,;t t
26805 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26806 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26807 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26808 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26809 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26810 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26811 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26812 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26813 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26814 s,@ECHO_LT@,$ECHO_LT,;t t
26815 s,@ECHO_LD@,$ECHO_LD,;t t
26816 s,@RULE_CC@,$RULE_CC,;t t
26817 s,@SHOW_CC@,$SHOW_CC,;t t
26818 s,@ECHO_CC@,$ECHO_CC,;t t
26819 s,@ECHO_LINK@,$ECHO_LINK,;t t
26820 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26821 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26822 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26823 s,@ADAFLAGS@,$ADAFLAGS,;t t
26824 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26825 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26826 s,@ADA_TRACE@,$ADA_TRACE,;t t
26827 s,@MATH_LIB@,$MATH_LIB,;t t
26828 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26829 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26830 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26831 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26832 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26833 s,@TEST_LIBS@,$TEST_LIBS,;t t
26834 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26835 s,@CXXCPP@,$CXXCPP,;t t
26836 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26837 s,@CXX_AR@,$CXX_AR,;t t
26838 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26839 s,@CXXLIBS@,$CXXLIBS,;t t
26840 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26841 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26842 s,@M4_exists@,$M4_exists,;t t
26843 s,@cf_ada_make@,$cf_ada_make,;t t
26844 s,@cf_ada_config@,$cf_ada_config,;t t
26845 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26846 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26847 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26848 s,@cf_compile_generics@,$cf_compile_generics,;t t
26849 s,@cf_generic_objects@,$cf_generic_objects,;t t
26850 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26851 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26852 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26853 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26854 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26855 s,@cf_ada_package@,$cf_ada_package,;t t
26856 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26857 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26858 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26859 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26860 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26861 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26862 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26863 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26864 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26865 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26866 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26867 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26868 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26869 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26870 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26871 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26872 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26873 s,@TICS_LIBS@,$TICS_LIBS,;t t
26874 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26875 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26876 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26877 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26878 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26879 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26880 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26881 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26882 s,@includesubdir@,$includesubdir,;t t
26883 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26884 s,@TICS_LIST@,$TICS_LIST,;t t
26885 s,@TINFO_LIST@,$TINFO_LIST,;t t
26886 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26887 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26888 s,@TEST_ARGS@,$TEST_ARGS,;t t
26889 s,@TEST_DEPS@,$TEST_DEPS,;t t
26890 s,@TEST_ARG2@,$TEST_ARG2,;t t
26891 s,@TEST_DEP2@,$TEST_DEP2,;t t
26892 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26893 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26894 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26895 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26896 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26897 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26898 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26899 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26900 s,@cross_compiling@,$cross_compiling,;t t
26901 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26902 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26903 s,@PANEL_NAME@,$PANEL_NAME,;t t
26904 s,@MENU_NAME@,$MENU_NAME,;t t
26905 s,@FORM_NAME@,$FORM_NAME,;t t
26906 s,@CXX_NAME@,$CXX_NAME,;t t
26907 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26908 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26909 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26910 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26911 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26912 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26913 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26914 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26915 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26916 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26917 CEOF
26918
26919 EOF
26920
26921   cat >>$CONFIG_STATUS <<\EOF
26922   # Split the substitutions into bite-sized pieces for seds with
26923   # small command number limits, like on Digital OSF/1 and HP-UX.
26924   ac_max_sed_lines=48
26925   ac_sed_frag=1 # Number of current file.
26926   ac_beg=1 # First line for current file.
26927   ac_end=$ac_max_sed_lines # Line after last line for current file.
26928   ac_more_lines=:
26929   ac_sed_cmds=
26930   while $ac_more_lines; do
26931     if test $ac_beg -gt 1; then
26932       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26933     else
26934       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26935     fi
26936     if test ! -s $tmp/subs.frag; then
26937       ac_more_lines=false
26938     else
26939       # The purpose of the label and of the branching condition is to
26940       # speed up the sed processing (if there are no `@' at all, there
26941       # is no need to browse any of the substitutions).
26942       # These are the two extra sed commands mentioned above.
26943       (echo ':t
26944   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26945       # It is possible to make a multiline substitution using escaped newlines.
26946       # Ensure that we do not split the substitution between script fragments.
26947       ac_BEG=$ac_end
26948       ac_END=`expr $ac_end + $ac_max_sed_lines`
26949       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26950       if test -s $tmp/subs.next; then
26951         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26952         if test ! -s $tmp/subs.edit; then
26953           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26954           if test ! -s $tmp/subs.edit; then
26955             if test $ac_beg -gt 1; then
26956               ac_end=`expr $ac_end - 1`
26957               continue
26958             fi
26959           fi
26960         fi
26961       fi
26962
26963       if test -z "$ac_sed_cmds"; then
26964         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26965       else
26966         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26967       fi
26968       ac_sed_frag=`expr $ac_sed_frag + 1`
26969       ac_beg=$ac_end
26970       ac_end=`expr $ac_end + $ac_max_sed_lines`
26971     fi
26972   done
26973   if test -z "$ac_sed_cmds"; then
26974     ac_sed_cmds=cat
26975   fi
26976 fi # test -n "$CONFIG_FILES"
26977
26978 EOF
26979 cat >>$CONFIG_STATUS <<\EOF
26980 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26981   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26982   case $ac_file in
26983   - | *:- | *:-:* ) # input from stdin
26984         cat >$tmp/stdin
26985         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26986         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26987   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26988         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26989   * )   ac_file_in=$ac_file.in ;;
26990   esac
26991
26992   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26993   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26994          X"$ac_file" : 'X\(//\)[^/]' \| \
26995          X"$ac_file" : 'X\(//\)$' \| \
26996          X"$ac_file" : 'X\(/\)' \| \
26997          .     : '\(.\)' 2>/dev/null ||
26998 echo X"$ac_file" |
26999     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27000           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27001           /^X\(\/\/\)$/{ s//\1/; q; }
27002           /^X\(\/\).*/{ s//\1/; q; }
27003           s/.*/./; q'`
27004   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27005     { case "$ac_dir" in
27006   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27007   *)                      as_incr_dir=.;;
27008 esac
27009 as_dummy="$ac_dir"
27010 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27011   case $as_mkdir_dir in
27012     # Skip DOS drivespec
27013     ?:) as_incr_dir=$as_mkdir_dir ;;
27014     *)
27015       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27016       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27017     ;;
27018   esac
27019 done; }
27020
27021     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27022     # A "../" for each directory in $ac_dir_suffix.
27023     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27024   else
27025     ac_dir_suffix= ac_dots=
27026   fi
27027
27028   case $srcdir in
27029   .)  ac_srcdir=.
27030       if test -z "$ac_dots"; then
27031          ac_top_srcdir=.
27032       else
27033          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27034       fi ;;
27035   [\\/]* | ?:[\\/]* )
27036       ac_srcdir=$srcdir$ac_dir_suffix;
27037       ac_top_srcdir=$srcdir ;;
27038   *) # Relative path.
27039     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27040     ac_top_srcdir=$ac_dots$srcdir ;;
27041   esac
27042
27043   case $INSTALL in
27044   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27045   *) ac_INSTALL=$ac_dots$INSTALL ;;
27046   esac
27047
27048   if test x"$ac_file" != x-; then
27049     { echo "$as_me:27049: creating $ac_file" >&5
27050 echo "$as_me: creating $ac_file" >&6;}
27051     rm -f "$ac_file"
27052   fi
27053   # Let's still pretend it is `configure' which instantiates (i.e., don't
27054   # use $as_me), people would be surprised to read:
27055   #    /* config.h.  Generated automatically by config.status.  */
27056   configure_input="Generated automatically from `echo $ac_file_in |
27057                                                  sed 's,.*/,,'` by configure."
27058
27059   # First look for the input files in the build tree, otherwise in the
27060   # src tree.
27061   ac_file_inputs=`IFS=:
27062     for f in $ac_file_in; do
27063       case $f in
27064       -) echo $tmp/stdin ;;
27065       [\\/$]*)
27066          # Absolute (can't be DOS-style, as IFS=:)
27067          test -f "$f" || { { echo "$as_me:27067: error: cannot find input file: $f" >&5
27068 echo "$as_me: error: cannot find input file: $f" >&2;}
27069    { (exit 1); exit 1; }; }
27070          echo $f;;
27071       *) # Relative
27072          if test -f "$f"; then
27073            # Build tree
27074            echo $f
27075          elif test -f "$srcdir/$f"; then
27076            # Source tree
27077            echo $srcdir/$f
27078          else
27079            # /dev/null tree
27080            { { echo "$as_me:27080: error: cannot find input file: $f" >&5
27081 echo "$as_me: error: cannot find input file: $f" >&2;}
27082    { (exit 1); exit 1; }; }
27083          fi;;
27084       esac
27085     done` || { (exit 1); exit 1; }
27086 EOF
27087 cat >>$CONFIG_STATUS <<\EOF
27088   ac_warn_datarootdir=no
27089   if test x"$ac_file" != x-; then
27090     for ac_item in $ac_file_inputs
27091     do
27092       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27093       if test -n "$ac_seen"; then
27094         ac_used=`grep '@datarootdir@' $ac_item`
27095         if test -z "$ac_used"; then
27096           { echo "$as_me:27096: WARNING: datarootdir was used implicitly but not set:
27097 $ac_seen" >&5
27098 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27099 $ac_seen" >&2;}
27100           ac_warn_datarootdir=yes
27101         fi
27102       fi
27103       ac_seen=`grep '${datarootdir}' $ac_item`
27104       if test -n "$ac_seen"; then
27105         { echo "$as_me:27105: WARNING: datarootdir was used explicitly but not set:
27106 $ac_seen" >&5
27107 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27108 $ac_seen" >&2;}
27109         ac_warn_datarootdir=yes
27110       fi
27111     done
27112   fi
27113
27114 if test "x$ac_warn_datarootdir" = xyes; then
27115   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27116 fi
27117
27118 EOF
27119 cat >>$CONFIG_STATUS <<EOF
27120   sed "$ac_vpsub
27121 $extrasub
27122 EOF
27123 cat >>$CONFIG_STATUS <<\EOF
27124 :t
27125 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27126 s,@configure_input@,$configure_input,;t t
27127 s,@srcdir@,$ac_srcdir,;t t
27128 s,@top_srcdir@,$ac_top_srcdir,;t t
27129 s,@INSTALL@,$ac_INSTALL,;t t
27130 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27131   rm -f $tmp/stdin
27132   if test x"$ac_file" != x-; then
27133     cp $tmp/out $ac_file
27134
27135     for ac_name in prefix exec_prefix datarootdir
27136     do
27137         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27138         if test -n "$ac_seen"; then
27139             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27140             if test -z "$ac_init"; then
27141               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27142               { echo "$as_me:27142: WARNING: Variable $ac_name is used but was not set:
27143 $ac_seen" >&5
27144 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27145 $ac_seen" >&2;}
27146             fi
27147         fi
27148     done
27149     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27150     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27151     if test -s $tmp/out; then
27152       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27153       { echo "$as_me:27153: WARNING: Some variables may not be substituted:
27154 $ac_seen" >&5
27155 echo "$as_me: WARNING: Some variables may not be substituted:
27156 $ac_seen" >&2;}
27157     fi
27158   else
27159     cat $tmp/out
27160   fi
27161   rm -f $tmp/out
27162
27163 done
27164 EOF
27165 cat >>$CONFIG_STATUS <<\EOF
27166
27167 #
27168 # CONFIG_HEADER section.
27169 #
27170
27171 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27172 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27173 #
27174 # ac_d sets the value in "#define NAME VALUE" lines.
27175 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27176 ac_dB='[        ].*$,\1#\2'
27177 ac_dC=' '
27178 ac_dD=',;t'
27179 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27180 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27181 ac_iB='\([      ]\),\1#\2define\3'
27182 ac_iC=' '
27183 ac_iD='\4,;t'
27184 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27185 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27186 ac_uB='$,\1#\2define\3'
27187 ac_uC=' '
27188 ac_uD=',;t'
27189
27190 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27191   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27192   case $ac_file in
27193   - | *:- | *:-:* ) # input from stdin
27194         cat >$tmp/stdin
27195         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27196         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27197   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27198         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27199   * )   ac_file_in=$ac_file.in ;;
27200   esac
27201
27202   test x"$ac_file" != x- && { echo "$as_me:27202: creating $ac_file" >&5
27203 echo "$as_me: creating $ac_file" >&6;}
27204
27205   # First look for the input files in the build tree, otherwise in the
27206   # src tree.
27207   ac_file_inputs=`IFS=:
27208     for f in $ac_file_in; do
27209       case $f in
27210       -) echo $tmp/stdin ;;
27211       [\\/$]*)
27212          # Absolute (can't be DOS-style, as IFS=:)
27213          test -f "$f" || { { echo "$as_me:27213: error: cannot find input file: $f" >&5
27214 echo "$as_me: error: cannot find input file: $f" >&2;}
27215    { (exit 1); exit 1; }; }
27216          echo $f;;
27217       *) # Relative
27218          if test -f "$f"; then
27219            # Build tree
27220            echo $f
27221          elif test -f "$srcdir/$f"; then
27222            # Source tree
27223            echo $srcdir/$f
27224          else
27225            # /dev/null tree
27226            { { echo "$as_me:27226: error: cannot find input file: $f" >&5
27227 echo "$as_me: error: cannot find input file: $f" >&2;}
27228    { (exit 1); exit 1; }; }
27229          fi;;
27230       esac
27231     done` || { (exit 1); exit 1; }
27232   # Remove the trailing spaces.
27233   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27234
27235 EOF
27236
27237 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27238 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27239 # be either 'cat' or 'sort'.
27240 cat confdefs.h | uniq >conftest.vals
27241
27242 # Break up conftest.vals because some shells have a limit on
27243 # the size of here documents, and old seds have small limits too.
27244
27245 rm -f conftest.tail
27246 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27247 while grep . conftest.vals >/dev/null
27248 do
27249   # Write chunks of a limited-size here document to conftest.frag.
27250   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27251   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27252   echo 'CEOF' >> $CONFIG_STATUS
27253   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27254   rm -f conftest.vals
27255   mv conftest.tail conftest.vals
27256 done
27257 rm -f conftest.vals
27258
27259 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27260 # marker @DEFS@.
27261 echo '  cat >> conftest.edit <<CEOF
27262 /@DEFS@/r conftest.frag
27263 /@DEFS@/d
27264 CEOF
27265 sed -f conftest.edit $tmp/in > $tmp/out
27266 rm -f $tmp/in
27267 mv $tmp/out $tmp/in
27268 rm -f conftest.edit conftest.frag
27269 ' >> $CONFIG_STATUS
27270
27271 cat >>$CONFIG_STATUS <<\EOF
27272   # Let's still pretend it is `configure' which instantiates (i.e., don't
27273   # use $as_me), people would be surprised to read:
27274   #    /* config.h.  Generated automatically by config.status.  */
27275   if test x"$ac_file" = x-; then
27276     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27277   else
27278     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27279   fi
27280   cat $tmp/in >>$tmp/config.h
27281   rm -f $tmp/in
27282   if test x"$ac_file" != x-; then
27283     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27284       { echo "$as_me:27284: $ac_file is unchanged" >&5
27285 echo "$as_me: $ac_file is unchanged" >&6;}
27286     else
27287       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27288          X"$ac_file" : 'X\(//\)[^/]' \| \
27289          X"$ac_file" : 'X\(//\)$' \| \
27290          X"$ac_file" : 'X\(/\)' \| \
27291          .     : '\(.\)' 2>/dev/null ||
27292 echo X"$ac_file" |
27293     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27294           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27295           /^X\(\/\/\)$/{ s//\1/; q; }
27296           /^X\(\/\).*/{ s//\1/; q; }
27297           s/.*/./; q'`
27298       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27299         { case "$ac_dir" in
27300   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27301   *)                      as_incr_dir=.;;
27302 esac
27303 as_dummy="$ac_dir"
27304 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27305   case $as_mkdir_dir in
27306     # Skip DOS drivespec
27307     ?:) as_incr_dir=$as_mkdir_dir ;;
27308     *)
27309       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27310       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27311     ;;
27312   esac
27313 done; }
27314
27315       fi
27316       rm -f $ac_file
27317       mv $tmp/config.h $ac_file
27318     fi
27319   else
27320     cat $tmp/config.h
27321     rm -f $tmp/config.h
27322   fi
27323 done
27324 EOF
27325 cat >>$CONFIG_STATUS <<\EOF
27326 #
27327 # CONFIG_COMMANDS section.
27328 #
27329 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27330   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27331   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27332
27333   case $ac_dest in
27334     default )
27335 if test "x$cf_with_tests" != xno ; then
27336
27337 for cf_dir in test
27338 do
27339         if test ! -d $srcdir/$cf_dir; then
27340                 continue
27341         elif test -f $srcdir/$cf_dir/programs; then
27342                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27343         fi
27344 done
27345
27346 fi
27347
27348 cf_prefix=$LIB_PREFIX
27349
27350 case $cf_cv_shlib_version in
27351 (cygdll|msysdll|mingw)
27352         TINFO_NAME=$TINFO_ARG_SUFFIX
27353         TINFO_SUFFIX=.dll
27354         ;;
27355 esac
27356
27357 if test -n "$TINFO_SUFFIX" ; then
27358         case $TINFO_SUFFIX in
27359         (tw*)
27360                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27361                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27362                 ;;
27363         (t*)
27364                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27365                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27366                 ;;
27367         (w*)
27368                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27369                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27370                 ;;
27371         esac
27372 fi
27373
27374 for cf_dir in $SRC_SUBDIRS
27375 do
27376         if test ! -d $srcdir/$cf_dir ; then
27377                 continue
27378         elif test -f $srcdir/$cf_dir/modules; then
27379
27380                 SHARED_LIB=
27381                 Libs_To_Make=
27382                 cf_awk_program=
27383                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27384                 then
27385                         cf_awk_program="$cf_awk_program\
27386 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27387 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27388 "
27389                 fi
27390
27391                 if test "x$WILDCARD_SYMS" = xno
27392                 then
27393                         cf_awk_program="$cf_awk_program\
27394 /[      ]_\\*;/ { skip=1; next; }\
27395 "
27396                 fi
27397
27398                 if test "x$cf_awk_program" != "x"
27399                 then
27400                         cat >>$cf_dir/Makefile <<CF_EOF
27401
27402 # Generated by CF_LIB_RULES
27403 resulting.map: $UNALTERED_SYMS
27404         $AWK 'BEGIN { skip = 1; last=""; } \
27405 $cf_awk_program \
27406 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27407  skip = 0; last = \$\$0; } \
27408 END { print last; }' < $UNALTERED_SYMS >\$@
27409
27410 distclean::
27411         rm -f resulting.map
27412 CF_EOF
27413                 fi
27414
27415                 for cf_item in $cf_LIST_MODELS
27416                 do
27417
27418         case X$cf_item in
27419         (Xlibtool)
27420                 cf_suffix='.la'
27421                 cf_depsuf=$cf_suffix
27422                 ;;
27423         (Xdebug)
27424                 cf_suffix='_g.a'
27425                 cf_depsuf=$cf_suffix
27426                 ;;
27427         (Xprofile)
27428                 cf_suffix='_p.a'
27429                 cf_depsuf=$cf_suffix
27430                 ;;
27431         (Xshared)
27432                 case $cf_cv_system_name in
27433                 (aix[5-7]*)
27434                         cf_suffix='.so'
27435                         cf_depsuf=$cf_suffix
27436                         ;;
27437                 (cygwin*|msys*|mingw*)
27438                         cf_suffix='.dll'
27439                         cf_depsuf='.dll.a'
27440                         ;;
27441                 (darwin*)
27442                         cf_suffix='.dylib'
27443                         cf_depsuf=$cf_suffix
27444                         ;;
27445                 (hpux*)
27446                         case $target in
27447                         (ia64*)
27448                                 cf_suffix='.so'
27449                                 cf_depsuf=$cf_suffix
27450                                 ;;
27451                         (*)
27452                                 cf_suffix='.sl'
27453                                 cf_depsuf=$cf_suffix
27454                                 ;;
27455                         esac
27456                         ;;
27457                 (*)
27458                         cf_suffix='.so'
27459                         cf_depsuf=$cf_suffix
27460                         ;;
27461                 esac
27462                 ;;
27463         (*)
27464                 cf_suffix='.a'
27465                 cf_depsuf=$cf_suffix
27466                 ;;
27467         esac
27468         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27469         then
27470                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27471                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27472         fi
27473
27474                         cf_libname=$cf_dir
27475                         test "$cf_dir" = c++ && cf_libname=ncurses++
27476                         if test $cf_item = shared ; then
27477                                 if test -n "${LIB_SUFFIX}"
27478                                 then
27479                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27480                                 else
27481                                         cf_shared_suffix="$cf_suffix"
27482                                 fi
27483                                 if test "$cf_cv_do_symlinks" = yes ; then
27484                                         cf_version_name=
27485
27486                                         case "$cf_cv_shlib_version" in
27487                                         (rel)
27488                                                 cf_version_name=REL_VERSION
27489                                                 ;;
27490                                         (abi)
27491                                                 cf_version_name=ABI_VERSION
27492                                                 ;;
27493                                         esac
27494
27495                                         if test -n "$cf_version_name"
27496                                         then
27497                                                 case "$cf_cv_system_name" in
27498                                                 (darwin*)
27499                                                         # "w", etc?
27500                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27501                                                         ;;
27502                                                 (*)
27503                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27504                                                         ;;
27505                                                 esac
27506                                         fi
27507                                         if test -n "${USE_LIB_SUFFIX}"
27508                                         then
27509                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27510                                         else
27511                                                 cf_shared_suffix="$cf_suffix"
27512                                         fi
27513                                 fi
27514                                 # cygwin needs import library, and has unique naming convention
27515                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27516                                 # use 'cyg' prefix for shared lib.
27517                                 case $cf_cv_shlib_version in
27518                                 (cygdll)
27519                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27520                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27521                                         ;;
27522                                 (msysdll)
27523                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27524                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27525                                         ;;
27526                                 (mingw)
27527                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27528                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27529                                         ;;
27530                                 (*)
27531                                         cf_add_lib=
27532                                         ;;
27533                                 esac
27534                                 if test -n "$cf_add_lib"
27535                                 then
27536                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27537                                         continue
27538                                 fi
27539                         fi
27540                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27541                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27542                 done
27543
27544                 if test $cf_dir = ncurses ; then
27545                         cf_subsets="$LIB_SUBSETS"
27546                         cf_r_parts="$cf_subsets"
27547                         cf_liblist="$Libs_To_Make"
27548
27549                         while test -n "$cf_r_parts"
27550                         do
27551                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27552                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27553                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27554                                         cf_add_lib=
27555                                         case $cf_l_parts in
27556                                         (*termlib*)
27557                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27558                                                 ;;
27559                                         (*ticlib*)
27560                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27561                                                 ;;
27562                                         (*)
27563                                                 break
27564                                                 ;;
27565                                         esac
27566                                         if test -n "$cf_add_lib"; then
27567                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27568                                         fi
27569                                 else
27570                                         break
27571                                 fi
27572                         done
27573                 else
27574                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27575                 fi
27576
27577                 if test $cf_dir = c++; then
27578                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27579                                 cf_list=
27580                                 for cf_item in $Libs_To_Make
27581                                 do
27582                                         case $cf_item in
27583                                         (*.a)
27584                                                 ;;
27585                                         (*)
27586                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27587                                                 ;;
27588                                         esac
27589                                         for cf_test in $cf_list
27590                                         do
27591                                                 if test "$cf_test" = "$cf_item"
27592                                                 then
27593                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27594                                                         cf_item=
27595                                                         break
27596                                                 fi
27597                                         done
27598                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27599                                 done
27600                                 Libs_To_Make="$cf_list"
27601                         fi
27602                 fi
27603
27604                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27605                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27606                         $cf_dir/Makefile >$cf_dir/Makefile.out
27607                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27608
27609                 $AWK -f $srcdir/mk-0th.awk \
27610                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27611                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27612
27613                 for cf_subset in $cf_subsets
27614                 do
27615                         cf_subdirs=
27616                         for cf_item in $cf_LIST_MODELS
27617                         do
27618
27619                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27620
27621 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27622
27623                         CXX_MODEL=$cf_ITEM
27624                         if test "$CXX_MODEL" = SHARED; then
27625                                 case $cf_cv_shlib_version in
27626                                 (cygdll|msysdll|mingw)
27627                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27628
27629 echo "${as_me:-configure}:27629: testing overriding CXX_MODEL to SHARED ..." 1>&5
27630
27631                                         with_shared_cxx=yes
27632                                         ;;
27633                                 (*)
27634                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27635                                         ;;
27636                                 esac
27637                         fi
27638
27639         case X$cf_item in
27640         (Xlibtool)
27641                 cf_suffix='.la'
27642                 cf_depsuf=$cf_suffix
27643                 ;;
27644         (Xdebug)
27645                 cf_suffix='_g.a'
27646                 cf_depsuf=$cf_suffix
27647                 ;;
27648         (Xprofile)
27649                 cf_suffix='_p.a'
27650                 cf_depsuf=$cf_suffix
27651                 ;;
27652         (Xshared)
27653                 case $cf_cv_system_name in
27654                 (aix[5-7]*)
27655                         cf_suffix='.so'
27656                         cf_depsuf=$cf_suffix
27657                         ;;
27658                 (cygwin*|msys*|mingw*)
27659                         cf_suffix='.dll'
27660                         cf_depsuf='.dll.a'
27661                         ;;
27662                 (darwin*)
27663                         cf_suffix='.dylib'
27664                         cf_depsuf=$cf_suffix
27665                         ;;
27666                 (hpux*)
27667                         case $target in
27668                         (ia64*)
27669                                 cf_suffix='.so'
27670                                 cf_depsuf=$cf_suffix
27671                                 ;;
27672                         (*)
27673                                 cf_suffix='.sl'
27674                                 cf_depsuf=$cf_suffix
27675                                 ;;
27676                         esac
27677                         ;;
27678                 (*)
27679                         cf_suffix='.so'
27680                         cf_depsuf=$cf_suffix
27681                         ;;
27682                 esac
27683                 ;;
27684         (*)
27685                 cf_suffix='.a'
27686                 cf_depsuf=$cf_suffix
27687                 ;;
27688         esac
27689         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27690         then
27691                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27692                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27693         fi
27694
27695         case $cf_item in
27696         (libtool) cf_subdir='obj_lo'  ;;
27697         (normal)  cf_subdir='objects' ;;
27698         (debug)   cf_subdir='obj_g' ;;
27699         (profile) cf_subdir='obj_p' ;;
27700         (shared)
27701                 case $cf_cv_system_name in
27702                 (cygwin|msys)
27703                         cf_subdir='objects' ;;
27704                 (*)
27705                         cf_subdir='obj_s' ;;
27706                 esac
27707         esac
27708
27709                         # Test for case where we build libtinfo with a different name.
27710                         cf_libname=$cf_dir
27711                         if test $cf_dir = ncurses ; then
27712                                 case $cf_subset in
27713                                 (*base*)
27714                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27715                                         ;;
27716                                 (*termlib*)
27717                                         cf_libname=$TINFO_LIB_SUFFIX
27718                                         ;;
27719                                 (ticlib*)
27720                                         cf_libname=$TICS_LIB_SUFFIX
27721                                         ;;
27722                                 esac
27723                         elif test $cf_dir = c++ ; then
27724                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27725                         else
27726                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27727                         fi
27728                         if test -n "${USE_ARG_SUFFIX}" ; then
27729                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27730                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27731                         fi
27732
27733                         # These dependencies really are for development, not
27734                         # builds, but they are useful in porting, too.
27735                         cf_depend="../include/ncurses_cfg.h"
27736                         if test "$srcdir" = "."; then
27737                                 cf_reldir="."
27738                         else
27739                                 cf_reldir="\${srcdir}"
27740                         fi
27741
27742                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27743                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27744                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27745                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27746                         fi
27747
27748                         cf_dir_suffix=
27749                         old_cf_suffix="$cf_suffix"
27750                         if test "$cf_cv_shlib_version_infix" = yes ; then
27751                         if test -n "$USE_LIB_SUFFIX" ; then
27752                                 case $USE_LIB_SUFFIX in
27753                                 (tw*)
27754                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27755                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27756                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27757                                         ;;
27758                                 (t*)
27759                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27760                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27761                                         cf_dir_suffix=t$EXTRA_SUFFIX
27762                                         ;;
27763                                 (w*)
27764                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27765                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27766                                         cf_dir_suffix=w$EXTRA_SUFFIX
27767                                         ;;
27768                                 (*)
27769                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27770                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27771                                         cf_dir_suffix=$EXTRA_SUFFIX
27772                                         ;;
27773                                 esac
27774                         fi
27775                         fi
27776
27777                         $AWK -f $srcdir/mk-1st.awk \
27778                                 name=${cf_libname}${cf_dir_suffix} \
27779                                 traces=$LIB_TRACING \
27780                                 MODEL=$cf_ITEM \
27781                                 CXX_MODEL=$CXX_MODEL \
27782                                 model=$cf_subdir \
27783                                 prefix=$cf_prefix \
27784                                 suffix=$cf_suffix \
27785                                 subset=$cf_subset \
27786                                 driver=$cf_cv_term_driver \
27787                                 SymLink="$LN_S" \
27788                                 TermlibRoot=$TINFO_NAME \
27789                                 TermlibSuffix=$TINFO_SUFFIX \
27790                                 ShlibVer=$cf_cv_shlib_version \
27791                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27792                                 ReLink=${cf_cv_do_relink:-no} \
27793                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27794                                 DoLinks=$cf_cv_do_symlinks \
27795                                 rmSoLocs=$cf_cv_rm_so_locs \
27796                                 ldconfig="$LDCONFIG" \
27797                                 overwrite=$WITH_OVERWRITE \
27798                                 depend="$cf_depend" \
27799                                 host="$host" \
27800                                 libtool_version="$LIBTOOL_VERSION" \
27801                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27802
27803                         cf_suffix="$old_cf_suffix"
27804
27805                         for cf_subdir2 in $cf_subdirs lib
27806                         do
27807                                 test $cf_subdir = $cf_subdir2 && break
27808                         done
27809                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27810                         $AWK -f $srcdir/mk-2nd.awk \
27811                                 name=$cf_dir \
27812                                 traces=$LIB_TRACING \
27813                                 MODEL=$cf_ITEM \
27814                                 model=$cf_subdir \
27815                                 subset=$cf_subset \
27816                                 srcdir=$srcdir \
27817                                 echo=$WITH_ECHO \
27818                                 crenames=$cf_cv_prog_CC_c_o \
27819                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27820                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27821                         cf_subdirs="$cf_subdirs $cf_subdir"
27822                         done
27823                 done
27824         fi
27825
27826         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27827 done
27828
27829 for cf_dir in $SRC_SUBDIRS
27830 do
27831         if test ! -d $srcdir/$cf_dir ; then
27832                 continue
27833         fi
27834
27835         if test -f $cf_dir/Makefile ; then
27836                 case "$cf_dir" in
27837                 (Ada95)
27838                         echo 'libs \' >> Makefile
27839                         echo 'install.libs \' >> Makefile
27840                         echo 'uninstall.libs ::' >> Makefile
27841                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27842                         ;;
27843                 esac
27844         fi
27845
27846         if test -f $srcdir/$cf_dir/modules; then
27847                 echo >> Makefile
27848                 if test -f $srcdir/$cf_dir/headers; then
27849 cat >> Makefile <<CF_EOF
27850 install.includes \\
27851 uninstall.includes \\
27852 CF_EOF
27853                 fi
27854 if test "$cf_dir" != "c++" ; then
27855 echo 'lint \' >> Makefile
27856 fi
27857 cat >> Makefile <<CF_EOF
27858 libs \\
27859 lintlib \\
27860 install.libs \\
27861 uninstall.libs \\
27862 install.$cf_dir \\
27863 uninstall.$cf_dir ::
27864         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27865 CF_EOF
27866         elif test -f $srcdir/$cf_dir/headers; then
27867 cat >> Makefile <<CF_EOF
27868
27869 libs \\
27870 install.libs \\
27871 uninstall.libs \\
27872 install.includes \\
27873 uninstall.includes ::
27874         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27875 CF_EOF
27876 fi
27877 done
27878
27879 if test "x$cf_with_db_install" = xyes; then
27880 cat >> Makefile <<CF_EOF
27881
27882 install.libs uninstall.libs \\
27883 install.data uninstall.data ::
27884 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27885 CF_EOF
27886 else
27887 cat >> Makefile <<CF_EOF
27888
27889 install.libs uninstall.libs ::
27890         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27891 CF_EOF
27892 fi
27893
27894 if test "x$cf_with_manpages" = xyes; then
27895 cat >> Makefile <<CF_EOF
27896
27897 install.man \\
27898 uninstall.man ::
27899         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27900 CF_EOF
27901 fi
27902
27903 cat >> Makefile <<CF_EOF
27904
27905 distclean ::
27906         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27907         rm -f headers.sh headers.sed mk_shared_lib.sh
27908         rm -f edit_man.* man_alias.*
27909         rm -rf \${DIRS_TO_MAKE}
27910 CF_EOF
27911
27912 # Special case: tack's manpage lives in its own directory.
27913 if test "x$cf_with_manpages" = xyes; then
27914 if test "x$cf_with_tack" = "xyes"; then
27915 cat >> Makefile <<CF_EOF
27916
27917 install.man \\
27918 uninstall.man ::
27919         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27920 CF_EOF
27921 fi
27922 fi
27923
27924 rm -f headers.sed headers.sh
27925
27926 echo creating headers.sh
27927 cat >headers.sh <<CF_EOF
27928 #! $SHELL
27929 # This shell script is generated by the 'configure' script.  It is invoked in a
27930 # subdirectory of the build tree.  It generates a sed-script in the parent
27931 # directory that is used to adjust includes for header files that reside in a
27932 # subdirectory of /usr/include, etc.
27933 PRG=""
27934 while test \$# != 3
27935 do
27936 PRG="\$PRG \$1"; shift
27937 done
27938 DST=\$1
27939 REF=\$2
27940 SRC=\$3
27941 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27942 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27943 echo installing \$SRC in \$DST
27944 CF_EOF
27945
27946 if test $WITH_CURSES_H = yes; then
27947         cat >>headers.sh <<CF_EOF
27948 case \$DST in
27949 (/*/include/*)
27950         END=\`basename \$DST\`
27951         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27952         do
27953                 NAME=\`basename \$i\`
27954                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27955         done
27956         ;;
27957 (*)
27958         echo "" >> \$TMPSED
27959         ;;
27960 esac
27961 CF_EOF
27962
27963 else
27964         cat >>headers.sh <<CF_EOF
27965 case \$DST in
27966 (/*/include/*)
27967         END=\`basename \$DST\`
27968         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27969         do
27970                 NAME=\`basename \$i\`
27971                 if test "\$NAME" = "curses.h"
27972                 then
27973                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27974                         NAME=ncurses.h
27975                 fi
27976                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27977         done
27978         ;;
27979 (*)
27980         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27981         ;;
27982 esac
27983 CF_EOF
27984 fi
27985 cat >>headers.sh <<CF_EOF
27986 rm -f \$TMPSRC
27987 sed -f \$TMPSED \$SRC > \$TMPSRC
27988 NAME=\`basename \$SRC\`
27989 CF_EOF
27990 if test $WITH_CURSES_H != yes; then
27991         cat >>headers.sh <<CF_EOF
27992 test "\$NAME" = "curses.h" && NAME=ncurses.h
27993 CF_EOF
27994 fi
27995 cat >>headers.sh <<CF_EOF
27996 # Just in case someone gzip'd manpages, remove the conflicting copy.
27997 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27998
27999 eval \$PRG \$TMPSRC \$DST/\$NAME
28000 rm -f \$TMPSRC \$TMPSED
28001 CF_EOF
28002
28003 chmod 0755 headers.sh
28004
28005 for cf_dir in $SRC_SUBDIRS
28006 do
28007         if test ! -d $srcdir/$cf_dir ; then
28008                 continue
28009         fi
28010
28011         if test -f $srcdir/$cf_dir/headers; then
28012                 $AWK -f $srcdir/mk-hdr.awk \
28013                         subset="$LIB_SUBSETS" \
28014                         compat="$WITH_CURSES_H" \
28015                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28016         fi
28017
28018         if test -f $srcdir/$cf_dir/modules; then
28019                 if test "$cf_dir" != "c++" ; then
28020                         cat >>$cf_dir/Makefile <<"CF_EOF"
28021 depend : ${AUTO_SRC}
28022         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28023
28024 # DO NOT DELETE THIS LINE -- make depend depends on it.
28025 CF_EOF
28026                 fi
28027         fi
28028 done
28029
28030 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28031 if test -z "$USE_OLD_MAKERULES" ; then
28032         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28033 fi
28034 fi
28035  ;;
28036   esac
28037 done
28038 EOF
28039
28040 cat >>$CONFIG_STATUS <<\EOF
28041
28042 { (exit 0); exit 0; }
28043 EOF
28044 chmod +x $CONFIG_STATUS
28045 ac_clean_files=$ac_clean_files_save
28046
28047 # configure is writing to config.log, and then calls config.status.
28048 # config.status does its own redirection, appending to config.log.
28049 # Unfortunately, on DOS this fails, as config.log is still kept open
28050 # by configure, so config.status won't be able to write to it; its
28051 # output is simply discarded.  So we exec the FD to /dev/null,
28052 # effectively closing config.log, so it can be properly (re)opened and
28053 # appended to by config.status.  When coming back to configure, we
28054 # need to make the FD available again.
28055 if test "$no_create" != yes; then
28056   ac_cs_success=:
28057   exec 5>/dev/null
28058   $SHELL $CONFIG_STATUS || ac_cs_success=false
28059   exec 5>>config.log
28060   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28061   # would make configure fail if this is the last instruction.
28062   $ac_cs_success || { (exit 1); exit 1; }
28063 fi
28064 ${MAKE:-make} preinstall