]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20200111
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.693 .
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*)
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="-Wl,--enable-auto-import"
5971                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5972                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5973                 fi
5974                 CC_SHARED_OPTS=
5975                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${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=\$1
5980                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5981                 shift
5982                 cat <<-EOF
5983                 Linking shared library
5984                 ** SHARED_LIB \$SHARED_LIB
5985                 ** IMPORT_LIB \$IMPORT_LIB
5986 EOF
5987                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5988 CF_EOF
5989                 chmod +x mk_shared_lib.sh
5990                 ;;
5991         (openbsd[2-9].*|mirbsd*)
5992                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5993                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5994                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5995                 fi
5996                 if test "$cf_cv_enable_rpath" = yes ; then
5997                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5998                 fi
5999                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6000
6001         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6002         if test "$cf_cv_shlib_version" = rel; then
6003                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6004         else
6005                 cf_cv_shared_soname='`basename $@`'
6006         fi
6007
6008                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6009                 ;;
6010         (nto-qnx*|openbsd*|freebsd[12].*)
6011                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6012                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6013                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6014                 ;;
6015         (dragonfly*|freebsd*)
6016                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6017                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6018                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6019                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6020                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6021                 fi
6022
6023         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6024         if test "$cf_cv_shlib_version" = rel; then
6025                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6026         else
6027                 cf_cv_shared_soname='`basename $@`'
6028         fi
6029
6030                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6031                 ;;
6032         (netbsd*)
6033                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6034                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6035                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6036                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6037                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6038                         if test "$cf_cv_shlib_version" = auto; then
6039                         if test -f /usr/libexec/ld.elf_so; then
6040                                 cf_cv_shlib_version=abi
6041                         else
6042                                 cf_cv_shlib_version=rel
6043                         fi
6044                         fi
6045
6046         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6047         if test "$cf_cv_shlib_version" = rel; then
6048                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6049         else
6050                 cf_cv_shared_soname='`basename $@`'
6051         fi
6052
6053                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6054                 else
6055                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6056                 fi
6057                 ;;
6058         (osf*|mls+*)
6059                 # tested with OSF/1 V3.2 and 'cc'
6060                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6061                 # link with shared libs).
6062                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6063                 case $host_os in
6064                 (osf4*)
6065                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6066                         ;;
6067                 esac
6068                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6069                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6070                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6071                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6072                 fi
6073                 cf_cv_rm_so_locs=yes
6074                 ;;
6075         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6076                 # tested with osr5.0.5
6077                 if test "$GCC" != yes; then
6078                         CC_SHARED_OPTS='-belf -KPIC'
6079                 fi
6080                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6081                 if test "$cf_cv_enable_rpath" = yes ; then
6082                         # only way is to set LD_RUN_PATH but no switch for it
6083                         RUN_PATH=$libdir
6084                 fi
6085                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6086                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6087                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6088                 ;;
6089         (sunos4*)
6090                 # tested with SunOS 4.1.1 and gcc 2.7.0
6091                 if test "$GCC" != yes; then
6092                         CC_SHARED_OPTS='-KPIC'
6093                 fi
6094                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6095                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6096                 ;;
6097         (solaris2*)
6098                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6099                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6100                 if test "$DFT_LWR_MODEL" = "shared" ; then
6101                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6102                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6103                 fi
6104                 if test "$cf_cv_enable_rpath" = yes ; then
6105                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6106                 fi
6107
6108         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6109         if test "$cf_cv_shlib_version" = rel; then
6110                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6111         else
6112                 cf_cv_shared_soname='`basename $@`'
6113         fi
6114
6115                 if test "$GCC" != yes; then
6116                         cf_save_CFLAGS="$CFLAGS"
6117                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6118                         do
6119                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6120                                 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main (void)
6126 {
6127 printf("Hello\n");
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext
6133 if { (eval echo "$as_me:6133: \"$ac_compile\"") >&5
6134   (eval $ac_compile) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest.$ac_objext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   break
6145 else
6146   echo "$as_me: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6148 fi
6149 rm -f conftest.$ac_objext conftest.$ac_ext
6150                         done
6151                         CFLAGS="$cf_save_CFLAGS"
6152                         CC_SHARED_OPTS=$cf_shared_opts
6153                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6154                 else
6155                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6156                 fi
6157                 ;;
6158         (sysv5uw7*|unix_sv*)
6159                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6160                 if test "$GCC" != yes; then
6161                         CC_SHARED_OPTS='-KPIC'
6162                 fi
6163                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6164                 ;;
6165         (*)
6166                 CC_SHARED_OPTS='unknown'
6167                 MK_SHARED_LIB='echo unknown'
6168                 ;;
6169         esac
6170
6171         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6172         case "$cf_cv_shlib_version" in
6173         (rel|abi)
6174                 case "$MK_SHARED_LIB" in
6175                 (*'-o $@')
6176                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6177                         ;;
6178                 (*)
6179                         { echo "$as_me:6179: WARNING: ignored --with-shlib-version" >&5
6180 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6181                         ;;
6182                 esac
6183                 ;;
6184         esac
6185
6186         if test -n "$cf_try_cflags"
6187         then
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6189 "${as_me:-configure}"
6190 #include <stdio.h>
6191 int main(int argc, char *argv[])
6192 {
6193         printf("hello\n");
6194         return (argv[argc-1] == 0) ;
6195 }
6196 EOF
6197                 cf_save_CFLAGS="$CFLAGS"
6198                 for cf_opt in $cf_try_cflags
6199                 do
6200                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6201                         echo "$as_me:6201: checking if CFLAGS option -$cf_opt works" >&5
6202 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6203                         if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204   (eval $ac_compile) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit $ac_status); }; then
6208                                 echo "$as_me:6208: result: yes" >&5
6209 echo "${ECHO_T}yes" >&6
6210                                 cf_save_CFLAGS="$CFLAGS"
6211                         else
6212                                 echo "$as_me:6212: result: no" >&5
6213 echo "${ECHO_T}no" >&6
6214                         fi
6215                 done
6216                 CFLAGS="$cf_save_CFLAGS"
6217         fi
6218
6219         # RPATH_LIST is a colon-separated list of directories
6220         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6221         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6222
6223         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6224
6225         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6226
6227 echo "${as_me:-configure}:6227: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6228
6229         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6230
6231 echo "${as_me:-configure}:6231: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6232
6233 for model in $cf_list_models; do
6234         case $model in
6235         (libtool)
6236
6237 echo "$as_me:6237: checking for additional libtool options" >&5
6238 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6239
6240 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6241 if test "${with_libtool_opts+set}" = set; then
6242   withval="$with_libtool_opts"
6243   with_libtool_opts=$withval
6244 else
6245   with_libtool_opts=no
6246 fi;
6247 echo "$as_me:6247: result: $with_libtool_opts" >&5
6248 echo "${ECHO_T}$with_libtool_opts" >&6
6249
6250 case .$with_libtool_opts in
6251 (.yes|.no|.)
6252         ;;
6253 (*)
6254         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6255         ;;
6256 esac
6257
6258 echo "$as_me:6258: checking if exported-symbols file should be used" >&5
6259 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6260
6261 # Check whether --with-export-syms or --without-export-syms was given.
6262 if test "${with_export_syms+set}" = set; then
6263   withval="$with_export_syms"
6264   with_export_syms=$withval
6265 else
6266   with_export_syms=no
6267 fi;
6268 if test "x$with_export_syms" = xyes
6269 then
6270         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6271
6272 fi
6273 echo "$as_me:6273: result: $with_export_syms" >&5
6274 echo "${ECHO_T}$with_export_syms" >&6
6275 if test "x$with_export_syms" != xno
6276 then
6277         EXPORT_SYMS="-export-symbols $with_export_syms"
6278
6279 fi
6280
6281                 ;;
6282         (shared)
6283                 if test "$CC_SHARED_OPTS" = "unknown"; then
6284                         { { echo "$as_me:6284: error: Shared libraries are not supported in this version" >&5
6285 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6286    { (exit 1); exit 1; }; }
6287                 fi
6288                 # workaround for inept transition to PIE vs PIC...
6289                 echo "$as_me:6289: checking if current CFLAGS link properly" >&5
6290 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6291                 cat >conftest.$ac_ext <<_ACEOF
6292 #line 6292 "configure"
6293 #include "confdefs.h"
6294 #include <stdio.h>
6295 int
6296 main (void)
6297 {
6298 printf("Hello work\n");
6299   ;
6300   return 0;
6301 }
6302 _ACEOF
6303 rm -f conftest.$ac_objext conftest$ac_exeext
6304 if { (eval echo "$as_me:6304: \"$ac_link\"") >&5
6305   (eval $ac_link) 2>&5
6306   ac_status=$?
6307   echo "$as_me:6307: \$? = $ac_status" >&5
6308   (exit $ac_status); } &&
6309          { ac_try='test -s conftest$ac_exeext'
6310   { (eval echo "$as_me:6310: \"$ac_try\"") >&5
6311   (eval $ac_try) 2>&5
6312   ac_status=$?
6313   echo "$as_me:6313: \$? = $ac_status" >&5
6314   (exit $ac_status); }; }; then
6315   cf_cflags_work=yes
6316 else
6317   echo "$as_me: failed program was:" >&5
6318 cat conftest.$ac_ext >&5
6319 cf_cflags_work=no
6320 fi
6321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6322                 echo "$as_me:6322: result: $cf_cflags_work" >&5
6323 echo "${ECHO_T}$cf_cflags_work" >&6
6324                 if test "$cf_cflags_work" = no
6325                 then
6326                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6327
6328 echo "${as_me:-configure}:6328: testing try to work around by appending shared-options ..." 1>&5
6329
6330                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6331                 fi
6332
6333 echo "$as_me:6333: checking if versioned-symbols file should be used" >&5
6334 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6335
6336 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6337 if test "${with_versioned_syms+set}" = set; then
6338   withval="$with_versioned_syms"
6339   with_versioned_syms=$withval
6340 else
6341   with_versioned_syms=no
6342 fi;
6343 case "x$with_versioned_syms" in
6344 (xyes)
6345         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6346
6347         ;;
6348 (xno)
6349         ;;
6350 (x/*)
6351         test -f "$with_versioned_syms" || { { echo "$as_me:6351: error: expected a filename: $with_versioned_syms" >&5
6352 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6353    { (exit 1); exit 1; }; }
6354         ;;
6355 (*)
6356         test -f "$with_versioned_syms" || { { echo "$as_me:6356: error: expected a filename: $with_versioned_syms" >&5
6357 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6358    { (exit 1); exit 1; }; }
6359         with_versioned_syms=`pwd`/"$with_versioned_syms"
6360         ;;
6361 esac
6362 echo "$as_me:6362: result: $with_versioned_syms" >&5
6363 echo "${ECHO_T}$with_versioned_syms" >&6
6364
6365 RESULTING_SYMS=
6366 VERSIONED_SYMS=
6367 WILDCARD_SYMS=
6368
6369 if test "x$with_versioned_syms" != xno
6370 then
6371         RESULTING_SYMS=$with_versioned_syms
6372         case "x$MK_SHARED_LIB" in
6373         (*-Wl,*)
6374                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6375                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6376                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6377
6378 echo "${as_me:-configure}:6378: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6379
6380                 ;;
6381         (*-dy\ *)
6382                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6383                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6384                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6385
6386 echo "${as_me:-configure}:6386: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6387
6388                 ;;
6389         (*)
6390                 { echo "$as_me:6390: WARNING: this system does not support versioned-symbols" >&5
6391 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6392                 ;;
6393         esac
6394
6395         # Linux ld can selectively override scope, e.g., of symbols beginning with
6396         # "_" by first declaring some as global, and then using a wildcard to
6397         # declare the others as local.  Some other loaders cannot do this.  Check
6398         # by constructing a (very) simple shared library and inspecting its
6399         # symbols.
6400         if test "x$VERSIONED_SYMS" != "x"
6401         then
6402                 echo "$as_me:6402: checking if wildcards can be used to selectively omit symbols" >&5
6403 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6404                 WILDCARD_SYMS=no
6405
6406                 # make sources
6407                 rm -f conftest.*
6408
6409                 cat >conftest.ver <<EOF
6410 module_1.0 {
6411 global:
6412         globalf1;
6413 local:
6414         localf1;
6415 };
6416 module_2.0 {
6417 global:
6418         globalf2;
6419 local:
6420         localf2;
6421         _*;
6422 } module_1.0;
6423 submodule_1.0 {
6424 global:
6425         subglobalf1;
6426         _ismissing;
6427 local:
6428         sublocalf1;
6429 };
6430 submodule_2.0 {
6431 global:
6432         subglobalf2;
6433 local:
6434         sublocalf2;
6435         _*;
6436 } submodule_1.0;
6437 EOF
6438                 cat >conftest.$ac_ext <<EOF
6439 #line 6439 "configure"
6440 int     _ismissing(void) { return 1; }
6441 int     _localf1(void) { return 1; }
6442 int     _localf2(void) { return 2; }
6443 int     globalf1(void) { return 1; }
6444 int     globalf2(void) { return 2; }
6445 int     _sublocalf1(void) { return 1; }
6446 int     _sublocalf2(void) { return 2; }
6447 int     subglobalf1(void) { return 1; }
6448 int     subglobalf2(void) { return 2; }
6449 EOF
6450                 cat >conftest.mk <<EOF
6451 CC=${CC}
6452 CFLAGS=${CFLAGS}
6453 CPPFLAGS=${CPPFLAGS}
6454 LDFLAGS=${LDFLAGS}
6455 LIBS=${LIBS}
6456 VERSIONED_SYMS=${VERSIONED_SYMS}
6457 RESULTING_SYMS=conftest.ver
6458 MK_SHARED_LIB=${MK_SHARED_LIB}
6459 conftest.so: conftest.$ac_cv_objext
6460                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6461 EOF
6462
6463                 # compile source, make library
6464                 if make -f conftest.mk 2>&5 >/dev/null
6465                 then
6466                         # test for missing symbol in either Data or Text section
6467                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6468                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6469                 fi
6470                 echo "$as_me:6470: result: $WILDCARD_SYMS" >&5
6471 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6472                 rm -f conftest.*
6473         fi
6474 fi
6475
6476                 ;;
6477         esac
6478 done
6479
6480 ### Checks for special libraries, must be done up-front.
6481 SHLIB_LIST=""
6482
6483 echo "$as_me:6483: checking if you want to link with the GPM mouse library" >&5
6484 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6485
6486 # Check whether --with-gpm or --without-gpm was given.
6487 if test "${with_gpm+set}" = set; then
6488   withval="$with_gpm"
6489   with_gpm=$withval
6490 else
6491   with_gpm=maybe
6492 fi;
6493 echo "$as_me:6493: result: $with_gpm" >&5
6494 echo "${ECHO_T}$with_gpm" >&6
6495
6496 if test "$with_gpm" != no ; then
6497         echo "$as_me:6497: checking for gpm.h" >&5
6498 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6499 if test "${ac_cv_header_gpm_h+set}" = set; then
6500   echo $ECHO_N "(cached) $ECHO_C" >&6
6501 else
6502   cat >conftest.$ac_ext <<_ACEOF
6503 #line 6503 "configure"
6504 #include "confdefs.h"
6505 #include <gpm.h>
6506 _ACEOF
6507 if { (eval echo "$as_me:6507: \"$ac_cpp conftest.$ac_ext\"") >&5
6508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6509   ac_status=$?
6510   egrep -v '^ *\+' conftest.er1 >conftest.err
6511   rm -f conftest.er1
6512   cat conftest.err >&5
6513   echo "$as_me:6513: \$? = $ac_status" >&5
6514   (exit $ac_status); } >/dev/null; then
6515   if test -s conftest.err; then
6516     ac_cpp_err=$ac_c_preproc_warn_flag
6517   else
6518     ac_cpp_err=
6519   fi
6520 else
6521   ac_cpp_err=yes
6522 fi
6523 if test -z "$ac_cpp_err"; then
6524   ac_cv_header_gpm_h=yes
6525 else
6526   echo "$as_me: failed program was:" >&5
6527   cat conftest.$ac_ext >&5
6528   ac_cv_header_gpm_h=no
6529 fi
6530 rm -f conftest.err conftest.$ac_ext
6531 fi
6532 echo "$as_me:6532: result: $ac_cv_header_gpm_h" >&5
6533 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6534 if test $ac_cv_header_gpm_h = yes; then
6535
6536 cat >>confdefs.h <<\EOF
6537 #define HAVE_GPM_H 1
6538 EOF
6539
6540                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6541                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6542
6543 echo "${as_me:-configure}:6543: testing assuming we really have GPM library ..." 1>&5
6544
6545 cat >>confdefs.h <<\EOF
6546 #define HAVE_LIBGPM 1
6547 EOF
6548
6549                         with_gpm=yes
6550                 else
6551                         echo "$as_me:6551: checking for Gpm_Open in -lgpm" >&5
6552 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6553 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6554   echo $ECHO_N "(cached) $ECHO_C" >&6
6555 else
6556   ac_check_lib_save_LIBS=$LIBS
6557 LIBS="-lgpm  $LIBS"
6558 cat >conftest.$ac_ext <<_ACEOF
6559 #line 6559 "configure"
6560 #include "confdefs.h"
6561
6562 /* Override any gcc2 internal prototype to avoid an error.  */
6563 #ifdef __cplusplus
6564 extern "C"
6565 #endif
6566 /* We use char because int might match the return type of a gcc2
6567    builtin and then its argument prototype would still apply.  */
6568 char Gpm_Open ();
6569 int
6570 main (void)
6571 {
6572 Gpm_Open ();
6573   ;
6574   return 0;
6575 }
6576 _ACEOF
6577 rm -f conftest.$ac_objext conftest$ac_exeext
6578 if { (eval echo "$as_me:6578: \"$ac_link\"") >&5
6579   (eval $ac_link) 2>&5
6580   ac_status=$?
6581   echo "$as_me:6581: \$? = $ac_status" >&5
6582   (exit $ac_status); } &&
6583          { ac_try='test -s conftest$ac_exeext'
6584   { (eval echo "$as_me:6584: \"$ac_try\"") >&5
6585   (eval $ac_try) 2>&5
6586   ac_status=$?
6587   echo "$as_me:6587: \$? = $ac_status" >&5
6588   (exit $ac_status); }; }; then
6589   ac_cv_lib_gpm_Gpm_Open=yes
6590 else
6591   echo "$as_me: failed program was:" >&5
6592 cat conftest.$ac_ext >&5
6593 ac_cv_lib_gpm_Gpm_Open=no
6594 fi
6595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6596 LIBS=$ac_check_lib_save_LIBS
6597 fi
6598 echo "$as_me:6598: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6599 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6600 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6601   with_gpm=yes
6602 else
6603
6604                                 if test "$with_gpm" = maybe; then
6605                                         { echo "$as_me:6605: WARNING: Cannot link with GPM library" >&5
6606 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6607                                         with_gpm=no
6608                                 else
6609                                         { { echo "$as_me:6609: error: Cannot link with GPM library" >&5
6610 echo "$as_me: error: Cannot link with GPM library" >&2;}
6611    { (exit 1); exit 1; }; }
6612                                 fi
6613
6614 fi
6615
6616                 fi
6617
6618 else
6619
6620                 test "$with_gpm" != maybe && { echo "$as_me:6620: WARNING: Cannot find GPM header" >&5
6621 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6622                 with_gpm=no
6623
6624 fi
6625
6626 fi
6627
6628 if test "$with_gpm" != no ; then
6629         echo "$as_me:6629: checking if you want to load GPM dynamically" >&5
6630 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6631
6632 # Check whether --with-dlsym or --without-dlsym was given.
6633 if test "${with_dlsym+set}" = set; then
6634   withval="$with_dlsym"
6635   with_dlsym=$withval
6636 else
6637   with_dlsym=yes
6638 fi;
6639         echo "$as_me:6639: result: $with_dlsym" >&5
6640 echo "${ECHO_T}$with_dlsym" >&6
6641         if test "x$with_dlsym" = xyes ; then
6642
6643 cf_have_dlsym=no
6644 echo "$as_me:6644: checking for dlsym" >&5
6645 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6646 if test "${ac_cv_func_dlsym+set}" = set; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649   cat >conftest.$ac_ext <<_ACEOF
6650 #line 6650 "configure"
6651 #include "confdefs.h"
6652 #define dlsym autoconf_temporary
6653 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6654 #undef dlsym
6655
6656 #ifdef __cplusplus
6657 extern "C"
6658 #endif
6659
6660 /* We use char because int might match the return type of a gcc2
6661    builtin and then its argument prototype would still apply.  */
6662 char dlsym (void);
6663
6664 int
6665 main (void)
6666 {
6667
6668 /* The GNU C library defines stubs for functions which it implements
6669     to always fail with ENOSYS.  Some functions are actually named
6670     something starting with __ and the normal name is an alias.  */
6671 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6672 #error found stub for dlsym
6673 #endif
6674
6675         return dlsym ();
6676   ;
6677   return 0;
6678 }
6679 _ACEOF
6680 rm -f conftest.$ac_objext conftest$ac_exeext
6681 if { (eval echo "$as_me:6681: \"$ac_link\"") >&5
6682   (eval $ac_link) 2>&5
6683   ac_status=$?
6684   echo "$as_me:6684: \$? = $ac_status" >&5
6685   (exit $ac_status); } &&
6686          { ac_try='test -s conftest$ac_exeext'
6687   { (eval echo "$as_me:6687: \"$ac_try\"") >&5
6688   (eval $ac_try) 2>&5
6689   ac_status=$?
6690   echo "$as_me:6690: \$? = $ac_status" >&5
6691   (exit $ac_status); }; }; then
6692   ac_cv_func_dlsym=yes
6693 else
6694   echo "$as_me: failed program was:" >&5
6695 cat conftest.$ac_ext >&5
6696 ac_cv_func_dlsym=no
6697 fi
6698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6699 fi
6700 echo "$as_me:6700: result: $ac_cv_func_dlsym" >&5
6701 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6702 if test $ac_cv_func_dlsym = yes; then
6703   cf_have_dlsym=yes
6704 else
6705
6706 cf_have_libdl=no
6707 echo "$as_me:6707: checking for dlsym in -ldl" >&5
6708 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6709 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6710   echo $ECHO_N "(cached) $ECHO_C" >&6
6711 else
6712   ac_check_lib_save_LIBS=$LIBS
6713 LIBS="-ldl  $LIBS"
6714 cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6717
6718 /* Override any gcc2 internal prototype to avoid an error.  */
6719 #ifdef __cplusplus
6720 extern "C"
6721 #endif
6722 /* We use char because int might match the return type of a gcc2
6723    builtin and then its argument prototype would still apply.  */
6724 char dlsym ();
6725 int
6726 main (void)
6727 {
6728 dlsym ();
6729   ;
6730   return 0;
6731 }
6732 _ACEOF
6733 rm -f conftest.$ac_objext conftest$ac_exeext
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735   (eval $ac_link) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit $ac_status); } &&
6739          { ac_try='test -s conftest$ac_exeext'
6740   { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); }; }; then
6745   ac_cv_lib_dl_dlsym=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6749 ac_cv_lib_dl_dlsym=no
6750 fi
6751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6752 LIBS=$ac_check_lib_save_LIBS
6753 fi
6754 echo "$as_me:6754: result: $ac_cv_lib_dl_dlsym" >&5
6755 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6756 if test $ac_cv_lib_dl_dlsym = yes; then
6757
6758         cf_have_dlsym=yes
6759         cf_have_libdl=yes
6760 fi
6761
6762 fi
6763
6764 if test "$cf_have_dlsym" = yes ; then
6765         test "$cf_have_libdl" = yes && {
6766 cf_add_libs="$LIBS"
6767 # reverse order
6768 cf_add_0lib=
6769 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6770 # filter duplicates
6771 for cf_add_1lib in $cf_add_0lib; do
6772         for cf_add_2lib in $cf_add_libs; do
6773                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6774                         cf_add_1lib=
6775                         break
6776                 fi
6777         done
6778         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6779 done
6780 LIBS="$cf_add_libs"
6781  }
6782
6783         echo "$as_me:6783: checking whether able to link to dl*() functions" >&5
6784 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6785         cat >conftest.$ac_ext <<_ACEOF
6786 #line 6786 "configure"
6787 #include "confdefs.h"
6788 #include <dlfcn.h>
6789 int
6790 main (void)
6791 {
6792
6793                 void *obj;
6794                 if ((obj = dlopen("filename", 0)) != 0) {
6795                         if (dlsym(obj, "symbolname") == 0) {
6796                         dlclose(obj);
6797                         }
6798                 }
6799   ;
6800   return 0;
6801 }
6802 _ACEOF
6803 rm -f conftest.$ac_objext conftest$ac_exeext
6804 if { (eval echo "$as_me:6804: \"$ac_link\"") >&5
6805   (eval $ac_link) 2>&5
6806   ac_status=$?
6807   echo "$as_me:6807: \$? = $ac_status" >&5
6808   (exit $ac_status); } &&
6809          { ac_try='test -s conftest$ac_exeext'
6810   { (eval echo "$as_me:6810: \"$ac_try\"") >&5
6811   (eval $ac_try) 2>&5
6812   ac_status=$?
6813   echo "$as_me:6813: \$? = $ac_status" >&5
6814   (exit $ac_status); }; }; then
6815
6816 cat >>confdefs.h <<\EOF
6817 #define HAVE_LIBDL 1
6818 EOF
6819
6820 else
6821   echo "$as_me: failed program was:" >&5
6822 cat conftest.$ac_ext >&5
6823
6824                 { { echo "$as_me:6824: error: Cannot link test program for libdl" >&5
6825 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6826    { (exit 1); exit 1; }; }
6827 fi
6828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6829         echo "$as_me:6829: result: ok" >&5
6830 echo "${ECHO_T}ok" >&6
6831 else
6832         { { echo "$as_me:6832: error: Cannot find dlsym function" >&5
6833 echo "$as_me: error: Cannot find dlsym function" >&2;}
6834    { (exit 1); exit 1; }; }
6835 fi
6836
6837                 if test "x$with_gpm" != xyes ; then
6838                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6839
6840 echo "${as_me:-configure}:6840: testing assuming soname for gpm is $with_gpm ..." 1>&5
6841
6842                         cf_cv_gpm_soname="$with_gpm"
6843                 else
6844
6845 echo "$as_me:6845: checking for soname of gpm library" >&5
6846 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6847 if test "${cf_cv_gpm_soname+set}" = set; then
6848   echo $ECHO_N "(cached) $ECHO_C" >&6
6849 else
6850
6851 cf_cv_gpm_soname=unknown
6852 if test "$cross_compiling" != yes ; then
6853 cat >conftest.$ac_ext <<CF_EOF
6854 #include <gpm.h>
6855 int main(void)
6856 {
6857 if (Gpm_Open(0,0)) Gpm_Close();
6858         ${cf_cv_main_return:-return}(0);
6859 }
6860 CF_EOF
6861 cf_save_LIBS="$LIBS"
6862
6863 cf_add_libs="$LIBS"
6864 # reverse order
6865 cf_add_0lib=
6866 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6867 # filter duplicates
6868 for cf_add_1lib in $cf_add_0lib; do
6869         for cf_add_2lib in $cf_add_libs; do
6870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6871                         cf_add_1lib=
6872                         break
6873                 fi
6874         done
6875         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6876 done
6877 LIBS="$cf_add_libs"
6878
6879         if { (eval echo "$as_me:6879: \"$ac_compile\"") >&5
6880   (eval $ac_compile) 2>&5
6881   ac_status=$?
6882   echo "$as_me:6882: \$? = $ac_status" >&5
6883   (exit $ac_status); } ; then
6884                 if { (eval echo "$as_me:6884: \"$ac_link\"") >&5
6885   (eval $ac_link) 2>&5
6886   ac_status=$?
6887   echo "$as_me:6887: \$? = $ac_status" >&5
6888   (exit $ac_status); } ; then
6889                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6890                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6891                 fi
6892         fi
6893 rm -rf conftest*
6894 LIBS="$cf_save_LIBS"
6895 fi
6896
6897 fi
6898 echo "$as_me:6898: result: $cf_cv_gpm_soname" >&5
6899 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6900
6901                 fi
6902                 test "$cf_cv_gpm_soname" != "unknown" &&
6903 cat >>confdefs.h <<EOF
6904 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6905 EOF
6906
6907                 SHLIB_LIST="-ldl $SHLIB_LIST"
6908
6909 cf_add_libs="$PRIVATE_LIBS"
6910 # reverse order
6911 cf_add_0lib=
6912 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6913 # filter duplicates
6914 for cf_add_1lib in $cf_add_0lib; do
6915         for cf_add_2lib in $cf_add_libs; do
6916                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6917                         cf_add_1lib=
6918                         break
6919                 fi
6920         done
6921         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6922 done
6923 PRIVATE_LIBS="$cf_add_libs"
6924
6925         else
6926                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6927
6928 cf_add_libs="$TEST_LIBS"
6929 # reverse order
6930 cf_add_0lib=
6931 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6932 # filter duplicates
6933 for cf_add_1lib in $cf_add_0lib; do
6934         for cf_add_2lib in $cf_add_libs; do
6935                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6936                         cf_add_1lib=
6937                         break
6938                 fi
6939         done
6940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6941 done
6942 TEST_LIBS="$cf_add_libs"
6943
6944 cf_add_libs="$PRIVATE_LIBS"
6945 # reverse order
6946 cf_add_0lib=
6947 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6948 # filter duplicates
6949 for cf_add_1lib in $cf_add_0lib; do
6950         for cf_add_2lib in $cf_add_libs; do
6951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6952                         cf_add_1lib=
6953                         break
6954                 fi
6955         done
6956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6957 done
6958 PRIVATE_LIBS="$cf_add_libs"
6959
6960         fi
6961
6962 cat >>confdefs.h <<\EOF
6963 #define HAVE_LIBGPM 1
6964 EOF
6965
6966 echo "$as_me:6966: checking for Gpm_Wgetch in -lgpm" >&5
6967 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6968 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6969   echo $ECHO_N "(cached) $ECHO_C" >&6
6970 else
6971   ac_check_lib_save_LIBS=$LIBS
6972 LIBS="-lgpm  $LIBS"
6973 cat >conftest.$ac_ext <<_ACEOF
6974 #line 6974 "configure"
6975 #include "confdefs.h"
6976
6977 /* Override any gcc2 internal prototype to avoid an error.  */
6978 #ifdef __cplusplus
6979 extern "C"
6980 #endif
6981 /* We use char because int might match the return type of a gcc2
6982    builtin and then its argument prototype would still apply.  */
6983 char Gpm_Wgetch ();
6984 int
6985 main (void)
6986 {
6987 Gpm_Wgetch ();
6988   ;
6989   return 0;
6990 }
6991 _ACEOF
6992 rm -f conftest.$ac_objext conftest$ac_exeext
6993 if { (eval echo "$as_me:6993: \"$ac_link\"") >&5
6994   (eval $ac_link) 2>&5
6995   ac_status=$?
6996   echo "$as_me:6996: \$? = $ac_status" >&5
6997   (exit $ac_status); } &&
6998          { ac_try='test -s conftest$ac_exeext'
6999   { (eval echo "$as_me:6999: \"$ac_try\"") >&5
7000   (eval $ac_try) 2>&5
7001   ac_status=$?
7002   echo "$as_me:7002: \$? = $ac_status" >&5
7003   (exit $ac_status); }; }; then
7004   ac_cv_lib_gpm_Gpm_Wgetch=yes
7005 else
7006   echo "$as_me: failed program was:" >&5
7007 cat conftest.$ac_ext >&5
7008 ac_cv_lib_gpm_Gpm_Wgetch=no
7009 fi
7010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7011 LIBS=$ac_check_lib_save_LIBS
7012 fi
7013 echo "$as_me:7013: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7014 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7015 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7016
7017 echo "$as_me:7017: checking if GPM is weakly bound to curses library" >&5
7018 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7019 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7020   echo $ECHO_N "(cached) $ECHO_C" >&6
7021 else
7022
7023 cf_cv_check_gpm_wgetch=unknown
7024 if test "$cross_compiling" != yes ; then
7025
7026 cat >conftest.$ac_ext <<CF_EOF
7027 #include <gpm.h>
7028 int main(void)
7029 {
7030         Gpm_Wgetch();
7031         ${cf_cv_main_return:-return}(0);
7032 }
7033 CF_EOF
7034
7035         cf_save_LIBS="$LIBS"
7036         # This only works if we can look at the symbol table.  If a shared
7037         # library is stripped for install, we cannot use that.  So we're forced
7038         # to rely on the static library, noting that some packagers may not
7039         # include it.
7040         LIBS="-static -lgpm -dynamic $LIBS"
7041         if { (eval echo "$as_me:7041: \"$ac_compile\"") >&5
7042   (eval $ac_compile) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); } ; then
7046                 if { (eval echo "$as_me:7046: \"$ac_link\"") >&5
7047   (eval $ac_link) 2>&5
7048   ac_status=$?
7049   echo "$as_me:7049: \$? = $ac_status" >&5
7050   (exit $ac_status); } ; then
7051                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7052                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7053                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7054                 fi
7055         fi
7056         rm -rf conftest*
7057         LIBS="$cf_save_LIBS"
7058 fi
7059
7060 fi
7061 echo "$as_me:7061: result: $cf_cv_check_gpm_wgetch" >&5
7062 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7063
7064 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7065         { echo "$as_me:7065: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7066 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7067 fi
7068
7069 fi
7070
7071 fi
7072
7073 echo "$as_me:7073: checking if you want to use PCRE2 for regular-expressions" >&5
7074 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7075
7076 # Check whether --with-pcre2 or --without-pcre2 was given.
7077 if test "${with_pcre2+set}" = set; then
7078   withval="$with_pcre2"
7079
7080 fi;
7081 test -z "$with_pcre2" && with_pcre2=no
7082 echo "$as_me:7082: result: $with_pcre2" >&5
7083 echo "${ECHO_T}$with_pcre2" >&6
7084
7085 if test "x$with_pcre2" != xno ; then
7086
7087 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7088         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7089
7090 echo "${as_me:-configure}:7090: testing found package libpcre2 ..." 1>&5
7091
7092         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7093         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7094         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7095
7096 echo "${as_me:-configure}:7096: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7097
7098         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7099
7100 echo "${as_me:-configure}:7100: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7101
7102 cf_fix_cppflags=no
7103 cf_new_cflags=
7104 cf_new_cppflags=
7105 cf_new_extra_cppflags=
7106
7107 for cf_add_cflags in $cf_pkgconfig_incs
7108 do
7109 case $cf_fix_cppflags in
7110 (no)
7111         case $cf_add_cflags in
7112         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7113                 case $cf_add_cflags in
7114                 (-D*)
7115                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7116
7117                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7118                                 && test -z "${cf_tst_cflags}" \
7119                                 && cf_fix_cppflags=yes
7120
7121                         if test $cf_fix_cppflags = yes ; then
7122
7123         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7124         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7125
7126                                 continue
7127                         elif test "${cf_tst_cflags}" = "\"'" ; then
7128
7129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7131
7132                                 continue
7133                         fi
7134                         ;;
7135                 esac
7136                 case "$CPPFLAGS" in
7137                 (*$cf_add_cflags)
7138                         ;;
7139                 (*)
7140                         case $cf_add_cflags in
7141                         (-D*)
7142                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7143
7144 CPPFLAGS=`echo "$CPPFLAGS" | \
7145         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7146                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7147
7148                                 ;;
7149                         esac
7150
7151         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7152         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7153
7154                         ;;
7155                 esac
7156                 ;;
7157         (*)
7158
7159         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7160         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7161
7162                 ;;
7163         esac
7164         ;;
7165 (yes)
7166
7167         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7168         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7169
7170         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7171
7172         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7173                 && test -z "${cf_tst_cflags}" \
7174                 && cf_fix_cppflags=no
7175         ;;
7176 esac
7177 done
7178
7179 if test -n "$cf_new_cflags" ; then
7180
7181         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7182         CFLAGS="${CFLAGS}$cf_new_cflags"
7183
7184 fi
7185
7186 if test -n "$cf_new_cppflags" ; then
7187
7188         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7189         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7190
7191 fi
7192
7193 if test -n "$cf_new_extra_cppflags" ; then
7194
7195         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7196         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7197
7198 fi
7199
7200 cf_add_libs="$LIBS"
7201 # reverse order
7202 cf_add_0lib=
7203 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7204 # filter duplicates
7205 for cf_add_1lib in $cf_add_0lib; do
7206         for cf_add_2lib in $cf_add_libs; do
7207                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7208                         cf_add_1lib=
7209                         break
7210                 fi
7211         done
7212         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7213 done
7214 LIBS="$cf_add_libs"
7215
7216         :
7217 else
7218         cf_pkgconfig_incs=
7219         cf_pkgconfig_libs=
7220
7221 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7222         test -n "$verbose" && echo "    found package libpcre" 1>&6
7223
7224 echo "${as_me:-configure}:7224: testing found package libpcre ..." 1>&5
7225
7226         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7227         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7228         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7229
7230 echo "${as_me:-configure}:7230: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7231
7232         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7233
7234 echo "${as_me:-configure}:7234: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7235
7236 cf_fix_cppflags=no
7237 cf_new_cflags=
7238 cf_new_cppflags=
7239 cf_new_extra_cppflags=
7240
7241 for cf_add_cflags in $cf_pkgconfig_incs
7242 do
7243 case $cf_fix_cppflags in
7244 (no)
7245         case $cf_add_cflags in
7246         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7247                 case $cf_add_cflags in
7248                 (-D*)
7249                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7250
7251                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7252                                 && test -z "${cf_tst_cflags}" \
7253                                 && cf_fix_cppflags=yes
7254
7255                         if test $cf_fix_cppflags = yes ; then
7256
7257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7259
7260                                 continue
7261                         elif test "${cf_tst_cflags}" = "\"'" ; then
7262
7263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7265
7266                                 continue
7267                         fi
7268                         ;;
7269                 esac
7270                 case "$CPPFLAGS" in
7271                 (*$cf_add_cflags)
7272                         ;;
7273                 (*)
7274                         case $cf_add_cflags in
7275                         (-D*)
7276                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7277
7278 CPPFLAGS=`echo "$CPPFLAGS" | \
7279         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7280                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7281
7282                                 ;;
7283                         esac
7284
7285         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7286         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7287
7288                         ;;
7289                 esac
7290                 ;;
7291         (*)
7292
7293         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7294         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7295
7296                 ;;
7297         esac
7298         ;;
7299 (yes)
7300
7301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7303
7304         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7305
7306         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7307                 && test -z "${cf_tst_cflags}" \
7308                 && cf_fix_cppflags=no
7309         ;;
7310 esac
7311 done
7312
7313 if test -n "$cf_new_cflags" ; then
7314
7315         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7316         CFLAGS="${CFLAGS}$cf_new_cflags"
7317
7318 fi
7319
7320 if test -n "$cf_new_cppflags" ; then
7321
7322         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7323         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7324
7325 fi
7326
7327 if test -n "$cf_new_extra_cppflags" ; then
7328
7329         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7330         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7331
7332 fi
7333
7334 cf_add_libs="$LIBS"
7335 # reverse order
7336 cf_add_0lib=
7337 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7338 # filter duplicates
7339 for cf_add_1lib in $cf_add_0lib; do
7340         for cf_add_2lib in $cf_add_libs; do
7341                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7342                         cf_add_1lib=
7343                         break
7344                 fi
7345         done
7346         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7347 done
7348 LIBS="$cf_add_libs"
7349
7350         :
7351 else
7352         cf_pkgconfig_incs=
7353         cf_pkgconfig_libs=
7354
7355                         { { echo "$as_me:7355: error: Cannot find PCRE2 library" >&5
7356 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7357    { (exit 1); exit 1; }; }
7358 fi
7359
7360 fi
7361
7362 cat >>confdefs.h <<\EOF
7363 #define HAVE_LIB_PCRE2 1
7364 EOF
7365
7366         # if pkgconfig gave no results, look for the libraries directly
7367         case $LIBS in
7368         (*pcre2-posix*|*pcreposix*)
7369                 ;;
7370         (*)
7371                 echo "$as_me:7371: checking for regcomp in -lpcre2-posix" >&5
7372 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7373 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7374   echo $ECHO_N "(cached) $ECHO_C" >&6
7375 else
7376   ac_check_lib_save_LIBS=$LIBS
7377 LIBS="-lpcre2-posix  $LIBS"
7378 cat >conftest.$ac_ext <<_ACEOF
7379 #line 7379 "configure"
7380 #include "confdefs.h"
7381
7382 /* Override any gcc2 internal prototype to avoid an error.  */
7383 #ifdef __cplusplus
7384 extern "C"
7385 #endif
7386 /* We use char because int might match the return type of a gcc2
7387    builtin and then its argument prototype would still apply.  */
7388 char regcomp ();
7389 int
7390 main (void)
7391 {
7392 regcomp ();
7393   ;
7394   return 0;
7395 }
7396 _ACEOF
7397 rm -f conftest.$ac_objext conftest$ac_exeext
7398 if { (eval echo "$as_me:7398: \"$ac_link\"") >&5
7399   (eval $ac_link) 2>&5
7400   ac_status=$?
7401   echo "$as_me:7401: \$? = $ac_status" >&5
7402   (exit $ac_status); } &&
7403          { ac_try='test -s conftest$ac_exeext'
7404   { (eval echo "$as_me:7404: \"$ac_try\"") >&5
7405   (eval $ac_try) 2>&5
7406   ac_status=$?
7407   echo "$as_me:7407: \$? = $ac_status" >&5
7408   (exit $ac_status); }; }; then
7409   ac_cv_lib_pcre2_posix_regcomp=yes
7410 else
7411   echo "$as_me: failed program was:" >&5
7412 cat conftest.$ac_ext >&5
7413 ac_cv_lib_pcre2_posix_regcomp=no
7414 fi
7415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7416 LIBS=$ac_check_lib_save_LIBS
7417 fi
7418 echo "$as_me:7418: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7419 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7420 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7421
7422 cf_add_libs="$LIBS"
7423 # reverse order
7424 cf_add_0lib=
7425 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7426 # filter duplicates
7427 for cf_add_1lib in $cf_add_0lib; do
7428         for cf_add_2lib in $cf_add_libs; do
7429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7430                         cf_add_1lib=
7431                         break
7432                 fi
7433         done
7434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7435 done
7436 LIBS="$cf_add_libs"
7437
7438 else
7439   echo "$as_me:7439: checking for regcomp in -lpcreposix" >&5
7440 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7441 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7442   echo $ECHO_N "(cached) $ECHO_C" >&6
7443 else
7444   ac_check_lib_save_LIBS=$LIBS
7445 LIBS="-lpcreposix  $LIBS"
7446 cat >conftest.$ac_ext <<_ACEOF
7447 #line 7447 "configure"
7448 #include "confdefs.h"
7449
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 #ifdef __cplusplus
7452 extern "C"
7453 #endif
7454 /* We use char because int might match the return type of a gcc2
7455    builtin and then its argument prototype would still apply.  */
7456 char regcomp ();
7457 int
7458 main (void)
7459 {
7460 regcomp ();
7461   ;
7462   return 0;
7463 }
7464 _ACEOF
7465 rm -f conftest.$ac_objext conftest$ac_exeext
7466 if { (eval echo "$as_me:7466: \"$ac_link\"") >&5
7467   (eval $ac_link) 2>&5
7468   ac_status=$?
7469   echo "$as_me:7469: \$? = $ac_status" >&5
7470   (exit $ac_status); } &&
7471          { ac_try='test -s conftest$ac_exeext'
7472   { (eval echo "$as_me:7472: \"$ac_try\"") >&5
7473   (eval $ac_try) 2>&5
7474   ac_status=$?
7475   echo "$as_me:7475: \$? = $ac_status" >&5
7476   (exit $ac_status); }; }; then
7477   ac_cv_lib_pcreposix_regcomp=yes
7478 else
7479   echo "$as_me: failed program was:" >&5
7480 cat conftest.$ac_ext >&5
7481 ac_cv_lib_pcreposix_regcomp=no
7482 fi
7483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7484 LIBS=$ac_check_lib_save_LIBS
7485 fi
7486 echo "$as_me:7486: result: $ac_cv_lib_pcreposix_regcomp" >&5
7487 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7488 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7489
7490 cf_add_libs="$LIBS"
7491 # reverse order
7492 cf_add_0lib=
7493 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7494 # filter duplicates
7495 for cf_add_1lib in $cf_add_0lib; do
7496         for cf_add_2lib in $cf_add_libs; do
7497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7498                         cf_add_1lib=
7499                         break
7500                 fi
7501         done
7502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7503 done
7504 LIBS="$cf_add_libs"
7505
7506 else
7507   { { echo "$as_me:7507: error: Cannot find PCRE2 POSIX library" >&5
7508 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7509    { (exit 1); exit 1; }; }
7510 fi
7511
7512 fi
7513
7514                 ;;
7515         esac
7516
7517         # either way, check for the library header files
7518
7519 for ac_header in pcre2-posix.h pcreposix.h
7520 do
7521 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7522 echo "$as_me:7522: checking for $ac_header" >&5
7523 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7524 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7525   echo $ECHO_N "(cached) $ECHO_C" >&6
7526 else
7527   cat >conftest.$ac_ext <<_ACEOF
7528 #line 7528 "configure"
7529 #include "confdefs.h"
7530 #include <$ac_header>
7531 _ACEOF
7532 if { (eval echo "$as_me:7532: \"$ac_cpp conftest.$ac_ext\"") >&5
7533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7534   ac_status=$?
7535   egrep -v '^ *\+' conftest.er1 >conftest.err
7536   rm -f conftest.er1
7537   cat conftest.err >&5
7538   echo "$as_me:7538: \$? = $ac_status" >&5
7539   (exit $ac_status); } >/dev/null; then
7540   if test -s conftest.err; then
7541     ac_cpp_err=$ac_c_preproc_warn_flag
7542   else
7543     ac_cpp_err=
7544   fi
7545 else
7546   ac_cpp_err=yes
7547 fi
7548 if test -z "$ac_cpp_err"; then
7549   eval "$as_ac_Header=yes"
7550 else
7551   echo "$as_me: failed program was:" >&5
7552   cat conftest.$ac_ext >&5
7553   eval "$as_ac_Header=no"
7554 fi
7555 rm -f conftest.err conftest.$ac_ext
7556 fi
7557 echo "$as_me:7557: result: `eval echo '${'$as_ac_Header'}'`" >&5
7558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7560   cat >>confdefs.h <<EOF
7561 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7562 EOF
7563
7564 fi
7565 done
7566
7567 fi
7568
7569 # not everyone has "test -c"
7570 if test -c /dev/sysmouse 2>/dev/null ; then
7571 echo "$as_me:7571: checking if you want to use sysmouse" >&5
7572 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7573
7574 # Check whether --with-sysmouse or --without-sysmouse was given.
7575 if test "${with_sysmouse+set}" = set; then
7576   withval="$with_sysmouse"
7577   cf_with_sysmouse=$withval
7578 else
7579   cf_with_sysmouse=maybe
7580 fi;
7581         if test "$cf_with_sysmouse" != no ; then
7582         cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585
7586 #include <osreldate.h>
7587 #if (__FreeBSD_version >= 400017)
7588 #include <sys/consio.h>
7589 #include <sys/fbio.h>
7590 #else
7591 #include <machine/console.h>
7592 #endif
7593
7594 int
7595 main (void)
7596 {
7597
7598         struct mouse_info the_mouse;
7599         ioctl(0, CONS_MOUSECTL, &the_mouse);
7600
7601   ;
7602   return 0;
7603 }
7604 _ACEOF
7605 rm -f conftest.$ac_objext
7606 if { (eval echo "$as_me:7606: \"$ac_compile\"") >&5
7607   (eval $ac_compile) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); } &&
7611          { ac_try='test -s conftest.$ac_objext'
7612   { (eval echo "$as_me:7612: \"$ac_try\"") >&5
7613   (eval $ac_try) 2>&5
7614   ac_status=$?
7615   echo "$as_me:7615: \$? = $ac_status" >&5
7616   (exit $ac_status); }; }; then
7617   cf_with_sysmouse=yes
7618 else
7619   echo "$as_me: failed program was:" >&5
7620 cat conftest.$ac_ext >&5
7621 cf_with_sysmouse=no
7622 fi
7623 rm -f conftest.$ac_objext conftest.$ac_ext
7624         fi
7625 echo "$as_me:7625: result: $cf_with_sysmouse" >&5
7626 echo "${ECHO_T}$cf_with_sysmouse" >&6
7627 test "$cf_with_sysmouse" = yes &&
7628 cat >>confdefs.h <<\EOF
7629 #define USE_SYSMOUSE 1
7630 EOF
7631
7632 fi
7633
7634 # pretend that ncurses==ncursesw==ncursest
7635 echo "$as_me:7635: checking if you want to disable library suffixes" >&5
7636 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7637
7638 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7639 if test "${enable_lib_suffixes+set}" = set; then
7640   enableval="$enable_lib_suffixes"
7641   test "$enableval" != no && enableval=yes
7642         if test "$enableval" != "yes" ; then
7643     disable_lib_suffixes=yes
7644         else
7645                 disable_lib_suffixes=no
7646         fi
7647 else
7648   enableval=yes
7649         disable_lib_suffixes=no
7650
7651 fi;
7652 echo "$as_me:7652: result: $disable_lib_suffixes" >&5
7653 echo "${ECHO_T}$disable_lib_suffixes" >&6
7654
7655 ### If we're building with rpath, try to link non-standard libs that way too.
7656 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7657
7658 echo "$as_me:7658: checking if rpath-hack should be disabled" >&5
7659 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7660
7661 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7662 if test "${enable_rpath_hack+set}" = set; then
7663   enableval="$enable_rpath_hack"
7664   test "$enableval" != no && enableval=yes
7665         if test "$enableval" != "yes" ; then
7666     cf_disable_rpath_hack=yes
7667         else
7668                 cf_disable_rpath_hack=no
7669         fi
7670 else
7671   enableval=yes
7672         cf_disable_rpath_hack=no
7673
7674 fi;
7675 echo "$as_me:7675: result: $cf_disable_rpath_hack" >&5
7676 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7677 if test "$cf_disable_rpath_hack" = no ; then
7678
7679 echo "$as_me:7679: checking for updated LDFLAGS" >&5
7680 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7681 if test -n "$LD_RPATH_OPT" ; then
7682         echo "$as_me:7682: result: maybe" >&5
7683 echo "${ECHO_T}maybe" >&6
7684
7685         for ac_prog in ldd
7686 do
7687   # Extract the first word of "$ac_prog", so it can be a program name with args.
7688 set dummy $ac_prog; ac_word=$2
7689 echo "$as_me:7689: checking for $ac_word" >&5
7690 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7691 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7692   echo $ECHO_N "(cached) $ECHO_C" >&6
7693 else
7694   if test -n "$cf_ldd_prog"; then
7695   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7696 else
7697   ac_save_IFS=$IFS; IFS=$ac_path_separator
7698 ac_dummy="$PATH"
7699 for ac_dir in $ac_dummy; do
7700   IFS=$ac_save_IFS
7701   test -z "$ac_dir" && ac_dir=.
7702   $as_executable_p "$ac_dir/$ac_word" || continue
7703 ac_cv_prog_cf_ldd_prog="$ac_prog"
7704 echo "$as_me:7704: found $ac_dir/$ac_word" >&5
7705 break
7706 done
7707
7708 fi
7709 fi
7710 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7711 if test -n "$cf_ldd_prog"; then
7712   echo "$as_me:7712: result: $cf_ldd_prog" >&5
7713 echo "${ECHO_T}$cf_ldd_prog" >&6
7714 else
7715   echo "$as_me:7715: result: no" >&5
7716 echo "${ECHO_T}no" >&6
7717 fi
7718
7719   test -n "$cf_ldd_prog" && break
7720 done
7721 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7722
7723         cf_rpath_list="/usr/lib /lib"
7724         if test "$cf_ldd_prog" != no
7725         then
7726                 cf_rpath_oops=
7727
7728 cat >conftest.$ac_ext <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731 #include <stdio.h>
7732 int
7733 main (void)
7734 {
7735 printf("Hello");
7736   ;
7737   return 0;
7738 }
7739 _ACEOF
7740 rm -f conftest.$ac_objext conftest$ac_exeext
7741 if { (eval echo "$as_me:7741: \"$ac_link\"") >&5
7742   (eval $ac_link) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); } &&
7746          { ac_try='test -s conftest$ac_exeext'
7747   { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7748   (eval $ac_try) 2>&5
7749   ac_status=$?
7750   echo "$as_me:7750: \$? = $ac_status" >&5
7751   (exit $ac_status); }; }; then
7752   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7753                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7754 else
7755   echo "$as_me: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 fi
7758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7759
7760                 # If we passed the link-test, but get a "not found" on a given library,
7761                 # this could be due to inept reconfiguration of gcc to make it only
7762                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7763                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7764                 # /usr/local libraries.
7765                 if test -n "$cf_rpath_oops"
7766                 then
7767                         for cf_rpath_src in $cf_rpath_oops
7768                         do
7769                                 for cf_rpath_dir in \
7770                                         /usr/local \
7771                                         /usr/pkg \
7772                                         /opt/sfw
7773                                 do
7774                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7775                                         then
7776                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7777
7778 echo "${as_me:-configure}:7778: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7779
7780                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7781                                                 break
7782                                         fi
7783                                 done
7784                         done
7785                 fi
7786         fi
7787
7788         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7789
7790 echo "${as_me:-configure}:7790: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7791
7792 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7793
7794 echo "${as_me:-configure}:7794: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7795
7796 cf_rpath_dst=
7797 for cf_rpath_src in $LDFLAGS
7798 do
7799         case $cf_rpath_src in
7800         (-L*)
7801
7802                 # check if this refers to a directory which we will ignore
7803                 cf_rpath_skip=no
7804                 if test -n "$cf_rpath_list"
7805                 then
7806                         for cf_rpath_item in $cf_rpath_list
7807                         do
7808                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7809                                 then
7810                                         cf_rpath_skip=yes
7811                                         break
7812                                 fi
7813                         done
7814                 fi
7815
7816                 if test "$cf_rpath_skip" = no
7817                 then
7818                         # transform the option
7819                         if test "$LD_RPATH_OPT" = "-R " ; then
7820                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7821                         else
7822                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7823                         fi
7824
7825                         # if we have not already added this, add it now
7826                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7827                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7828                         then
7829                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7830
7831 echo "${as_me:-configure}:7831: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7832
7833                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7834                         fi
7835                 fi
7836                 ;;
7837         esac
7838         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7839 done
7840 LDFLAGS=$cf_rpath_dst
7841
7842 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7843
7844 echo "${as_me:-configure}:7844: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7845
7846 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7847
7848 echo "${as_me:-configure}:7848: testing ...checking LIBS $LIBS ..." 1>&5
7849
7850 cf_rpath_dst=
7851 for cf_rpath_src in $LIBS
7852 do
7853         case $cf_rpath_src in
7854         (-L*)
7855
7856                 # check if this refers to a directory which we will ignore
7857                 cf_rpath_skip=no
7858                 if test -n "$cf_rpath_list"
7859                 then
7860                         for cf_rpath_item in $cf_rpath_list
7861                         do
7862                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7863                                 then
7864                                         cf_rpath_skip=yes
7865                                         break
7866                                 fi
7867                         done
7868                 fi
7869
7870                 if test "$cf_rpath_skip" = no
7871                 then
7872                         # transform the option
7873                         if test "$LD_RPATH_OPT" = "-R " ; then
7874                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7875                         else
7876                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7877                         fi
7878
7879                         # if we have not already added this, add it now
7880                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7881                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7882                         then
7883                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7884
7885 echo "${as_me:-configure}:7885: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7886
7887                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7888                         fi
7889                 fi
7890                 ;;
7891         esac
7892         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7893 done
7894 LIBS=$cf_rpath_dst
7895
7896 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7897
7898 echo "${as_me:-configure}:7898: testing ...checked LIBS $LIBS ..." 1>&5
7899
7900         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7901
7902 echo "${as_me:-configure}:7902: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7903
7904 else
7905         echo "$as_me:7905: result: no" >&5
7906 echo "${ECHO_T}no" >&6
7907 fi
7908
7909 fi
7910
7911 fi
7912
7913 ###############################################################################
7914
7915 ###     use option --with-extra-suffix to append suffix to headers and libraries
7916 echo "$as_me:7916: checking if you wish to append extra suffix to header/library paths" >&5
7917 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7918 EXTRA_SUFFIX=
7919
7920 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7921 if test "${with_extra_suffix+set}" = set; then
7922   withval="$with_extra_suffix"
7923   case x$withval in
7924         (no)
7925                 ;;
7926         (xyes|x)
7927                 EXTRA_SUFFIX=$cf_cv_abi_version
7928                 ;;
7929         (*)
7930                 EXTRA_SUFFIX=$withval
7931                 ;;
7932         esac
7933
7934 fi;
7935 echo "$as_me:7935: result: $EXTRA_SUFFIX" >&5
7936 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7937
7938 ###     use option --disable-overwrite to leave out the link to -lcurses
7939 echo "$as_me:7939: checking if you wish to install ncurses overwriting curses" >&5
7940 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7941
7942 # Check whether --enable-overwrite or --disable-overwrite was given.
7943 if test "${enable_overwrite+set}" = set; then
7944   enableval="$enable_overwrite"
7945   with_overwrite=$enableval
7946 else
7947   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7948 fi;
7949 echo "$as_me:7949: result: $with_overwrite" >&5
7950 echo "${ECHO_T}$with_overwrite" >&6
7951
7952 echo "$as_me:7952: checking if external terminfo-database is used" >&5
7953 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7954
7955 # Check whether --enable-database or --disable-database was given.
7956 if test "${enable_database+set}" = set; then
7957   enableval="$enable_database"
7958   use_database=$enableval
7959 else
7960   use_database=yes
7961 fi;
7962 echo "$as_me:7962: result: $use_database" >&5
7963 echo "${ECHO_T}$use_database" >&6
7964
7965 case $host_os in
7966 (os2*)
7967         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7968         ;;
7969 (*)
7970         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7971         ;;
7972 esac
7973
7974 NCURSES_USE_DATABASE=0
7975 if test "$use_database" != no ; then
7976         NCURSES_USE_DATABASE=1
7977
7978         echo "$as_me:7978: checking which terminfo source-file will be installed" >&5
7979 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7980
7981 # Check whether --with-database or --without-database was given.
7982 if test "${with_database+set}" = set; then
7983   withval="$with_database"
7984   TERMINFO_SRC=$withval
7985 fi;
7986         echo "$as_me:7986: result: $TERMINFO_SRC" >&5
7987 echo "${ECHO_T}$TERMINFO_SRC" >&6
7988
7989         echo "$as_me:7989: checking whether to use hashed database instead of directory/tree" >&5
7990 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7991
7992 # Check whether --with-hashed-db or --without-hashed-db was given.
7993 if test "${with_hashed_db+set}" = set; then
7994   withval="$with_hashed_db"
7995
7996 else
7997   with_hashed_db=no
7998 fi;
7999         echo "$as_me:7999: result: $with_hashed_db" >&5
8000 echo "${ECHO_T}$with_hashed_db" >&6
8001 else
8002         with_hashed_db=no
8003 fi
8004
8005 echo "$as_me:8005: checking for list of fallback descriptions" >&5
8006 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8007
8008 # Check whether --with-fallbacks or --without-fallbacks was given.
8009 if test "${with_fallbacks+set}" = set; then
8010   withval="$with_fallbacks"
8011   with_fallback=$withval
8012 else
8013   with_fallback=
8014 fi;
8015 echo "$as_me:8015: result: $with_fallback" >&5
8016 echo "${ECHO_T}$with_fallback" >&6
8017
8018 case ".$with_fallback" in
8019 (.|.no)
8020         FALLBACK_LIST=
8021         ;;
8022 (.yes)
8023         { echo "$as_me:8023: WARNING: expected a list of terminal descriptions" >&5
8024 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8025         ;;
8026 (*)
8027         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8028         ;;
8029 esac
8030
8031 USE_FALLBACKS=
8032 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8033
8034 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8035 # tree for generating the terminal descriptions that will be compiled into the
8036 # library.  If your toolchain is old, it may not handle current terminal
8037 # databases.  Use configure-options to point to the tools which will be used,
8038 # rather than the first ones found on the $PATH.
8039 if test -n "$FALLBACK_LIST"
8040 then
8041
8042 # Check whether --with-tic-path or --without-tic-path was given.
8043 if test "${with_tic_path+set}" = set; then
8044   withval="$with_tic_path"
8045   echo "$as_me:8045: checking for tic program for fallbacks" >&5
8046 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8047                 TIC=$withval
8048                 echo "$as_me:8048: result: $TIC" >&5
8049 echo "${ECHO_T}$TIC" >&6
8050
8051 if test "x$prefix" != xNONE; then
8052         cf_path_syntax="$prefix"
8053 else
8054         cf_path_syntax="$ac_default_prefix"
8055 fi
8056
8057 case ".$TIC" in
8058 (.\$\(*\)*|.\'*\'*)
8059         ;;
8060 (..|./*|.\\*)
8061         ;;
8062 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8063         ;;
8064 (.\${*prefix}*|.\${*dir}*)
8065         eval TIC="$TIC"
8066         case ".$TIC" in
8067         (.NONE/*)
8068                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8069                 ;;
8070         esac
8071         ;;
8072 (.no|.NONE/*)
8073         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8074         ;;
8075 (*)
8076         { { echo "$as_me:8076: error: expected a pathname, not \"$TIC\"" >&5
8077 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8078    { (exit 1); exit 1; }; }
8079         ;;
8080 esac
8081
8082 else
8083
8084 test -z "$TIC" && TIC=tic
8085 for ac_prog in $TIC tic
8086 do
8087   # Extract the first word of "$ac_prog", so it can be a program name with args.
8088 set dummy $ac_prog; ac_word=$2
8089 echo "$as_me:8089: checking for $ac_word" >&5
8090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8091 if test "${ac_cv_path_TIC+set}" = set; then
8092   echo $ECHO_N "(cached) $ECHO_C" >&6
8093 else
8094   case $TIC in
8095   [\\/]* | ?:[\\/]*)
8096   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8097   ;;
8098   *)
8099   ac_save_IFS=$IFS; IFS=$ac_path_separator
8100 ac_dummy="$PATH:/usr/local/ncurses/bin"
8101 for ac_dir in $ac_dummy; do
8102   IFS=$ac_save_IFS
8103   test -z "$ac_dir" && ac_dir=.
8104   if $as_executable_p "$ac_dir/$ac_word"; then
8105    ac_cv_path_TIC="$ac_dir/$ac_word"
8106    echo "$as_me:8106: found $ac_dir/$ac_word" >&5
8107    break
8108 fi
8109 done
8110
8111   ;;
8112 esac
8113 fi
8114 TIC=$ac_cv_path_TIC
8115
8116 if test -n "$TIC"; then
8117   echo "$as_me:8117: result: $TIC" >&5
8118 echo "${ECHO_T}$TIC" >&6
8119 else
8120   echo "$as_me:8120: result: no" >&5
8121 echo "${ECHO_T}no" >&6
8122 fi
8123
8124   test -n "$TIC" && break
8125 done
8126 test -n "$TIC" || TIC="$TIC"
8127
8128 cf_path_prog=""
8129 cf_path_args=""
8130 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8131 for cf_temp in $ac_cv_path_TIC
8132 do
8133         if test -z "$cf_path_prog" ; then
8134                 if test "$with_full_paths" = yes ; then
8135
8136 if test "x$prefix" != xNONE; then
8137         cf_path_syntax="$prefix"
8138 else
8139         cf_path_syntax="$ac_default_prefix"
8140 fi
8141
8142 case ".$cf_temp" in
8143 (.\$\(*\)*|.\'*\'*)
8144         ;;
8145 (..|./*|.\\*)
8146         ;;
8147 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8148         ;;
8149 (.\${*prefix}*|.\${*dir}*)
8150         eval cf_temp="$cf_temp"
8151         case ".$cf_temp" in
8152         (.NONE/*)
8153                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8154                 ;;
8155         esac
8156         ;;
8157 (.no|.NONE/*)
8158         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8159         ;;
8160 (*)
8161         break
8162         ;;
8163 esac
8164
8165                         cf_path_prog="$cf_temp"
8166                 else
8167                         cf_path_prog="`basename $cf_temp`"
8168                 fi
8169         elif test -z "$cf_path_args" ; then
8170                 cf_path_args="$cf_temp"
8171         else
8172                 cf_path_args="$cf_path_args $cf_temp"
8173         fi
8174 done
8175 IFS="$cf_save_ifs"
8176
8177 if test -n "$cf_path_prog" ; then
8178
8179 echo "${as_me:-configure}:8179: testing defining path for ${cf_path_prog} ..." 1>&5
8180
8181 cat >>confdefs.h <<EOF
8182 #define TIC_PATH "$cf_path_prog"
8183 EOF
8184
8185         test -n "$cf_path_args" &&
8186 cat >>confdefs.h <<EOF
8187 #define TIC_ARGS "$cf_path_args"
8188 EOF
8189
8190 fi
8191
8192                 if test -z "$TIC"
8193                 then
8194                         { echo "$as_me:8194: WARNING: no tic program found for fallbacks" >&5
8195 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8196                 fi
8197
8198 fi;
8199
8200 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8201 if test "${with_infocmp_path+set}" = set; then
8202   withval="$with_infocmp_path"
8203   echo "$as_me:8203: checking for infocmp program for fallbacks" >&5
8204 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8205                 INFOCMP=$withval
8206                 echo "$as_me:8206: result: $INFOCMP" >&5
8207 echo "${ECHO_T}$INFOCMP" >&6
8208
8209 if test "x$prefix" != xNONE; then
8210         cf_path_syntax="$prefix"
8211 else
8212         cf_path_syntax="$ac_default_prefix"
8213 fi
8214
8215 case ".$INFOCMP" in
8216 (.\$\(*\)*|.\'*\'*)
8217         ;;
8218 (..|./*|.\\*)
8219         ;;
8220 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8221         ;;
8222 (.\${*prefix}*|.\${*dir}*)
8223         eval INFOCMP="$INFOCMP"
8224         case ".$INFOCMP" in
8225         (.NONE/*)
8226                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8227                 ;;
8228         esac
8229         ;;
8230 (.no|.NONE/*)
8231         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8232         ;;
8233 (*)
8234         { { echo "$as_me:8234: error: expected a pathname, not \"$INFOCMP\"" >&5
8235 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8236    { (exit 1); exit 1; }; }
8237         ;;
8238 esac
8239
8240 else
8241
8242 test -z "$INFOCMP" && INFOCMP=infocmp
8243 for ac_prog in $INFOCMP infocmp
8244 do
8245   # Extract the first word of "$ac_prog", so it can be a program name with args.
8246 set dummy $ac_prog; ac_word=$2
8247 echo "$as_me:8247: checking for $ac_word" >&5
8248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8249 if test "${ac_cv_path_INFOCMP+set}" = set; then
8250   echo $ECHO_N "(cached) $ECHO_C" >&6
8251 else
8252   case $INFOCMP in
8253   [\\/]* | ?:[\\/]*)
8254   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8255   ;;
8256   *)
8257   ac_save_IFS=$IFS; IFS=$ac_path_separator
8258 ac_dummy="$PATH:/usr/local/ncurses/bin"
8259 for ac_dir in $ac_dummy; do
8260   IFS=$ac_save_IFS
8261   test -z "$ac_dir" && ac_dir=.
8262   if $as_executable_p "$ac_dir/$ac_word"; then
8263    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8264    echo "$as_me:8264: found $ac_dir/$ac_word" >&5
8265    break
8266 fi
8267 done
8268
8269   ;;
8270 esac
8271 fi
8272 INFOCMP=$ac_cv_path_INFOCMP
8273
8274 if test -n "$INFOCMP"; then
8275   echo "$as_me:8275: result: $INFOCMP" >&5
8276 echo "${ECHO_T}$INFOCMP" >&6
8277 else
8278   echo "$as_me:8278: result: no" >&5
8279 echo "${ECHO_T}no" >&6
8280 fi
8281
8282   test -n "$INFOCMP" && break
8283 done
8284 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8285
8286 cf_path_prog=""
8287 cf_path_args=""
8288 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8289 for cf_temp in $ac_cv_path_INFOCMP
8290 do
8291         if test -z "$cf_path_prog" ; then
8292                 if test "$with_full_paths" = yes ; then
8293
8294 if test "x$prefix" != xNONE; then
8295         cf_path_syntax="$prefix"
8296 else
8297         cf_path_syntax="$ac_default_prefix"
8298 fi
8299
8300 case ".$cf_temp" in
8301 (.\$\(*\)*|.\'*\'*)
8302         ;;
8303 (..|./*|.\\*)
8304         ;;
8305 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8306         ;;
8307 (.\${*prefix}*|.\${*dir}*)
8308         eval cf_temp="$cf_temp"
8309         case ".$cf_temp" in
8310         (.NONE/*)
8311                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8312                 ;;
8313         esac
8314         ;;
8315 (.no|.NONE/*)
8316         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8317         ;;
8318 (*)
8319         break
8320         ;;
8321 esac
8322
8323                         cf_path_prog="$cf_temp"
8324                 else
8325                         cf_path_prog="`basename $cf_temp`"
8326                 fi
8327         elif test -z "$cf_path_args" ; then
8328                 cf_path_args="$cf_temp"
8329         else
8330                 cf_path_args="$cf_path_args $cf_temp"
8331         fi
8332 done
8333 IFS="$cf_save_ifs"
8334
8335 if test -n "$cf_path_prog" ; then
8336
8337 echo "${as_me:-configure}:8337: testing defining path for ${cf_path_prog} ..." 1>&5
8338
8339 cat >>confdefs.h <<EOF
8340 #define INFOCMP_PATH "$cf_path_prog"
8341 EOF
8342
8343         test -n "$cf_path_args" &&
8344 cat >>confdefs.h <<EOF
8345 #define INFOCMP_ARGS "$cf_path_args"
8346 EOF
8347
8348 fi
8349
8350                 if test -z "$INFOCMP"
8351                 then
8352                         { echo "$as_me:8352: WARNING: no infocmp program found for fallbacks" >&5
8353 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8354                 fi
8355
8356 fi;
8357
8358 else
8359         : ${TIC:=tic}
8360         : ${INFOCMP:=infocmp}
8361 fi
8362
8363 echo "$as_me:8363: checking if you want modern xterm or antique" >&5
8364 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8365
8366 # Check whether --with-xterm-new or --without-xterm-new was given.
8367 if test "${with_xterm_new+set}" = set; then
8368   withval="$with_xterm_new"
8369   with_xterm_new=$withval
8370 else
8371   with_xterm_new=yes
8372 fi;
8373 case $with_xterm_new in
8374 (no) with_xterm_new=xterm-old;;
8375 (*)      with_xterm_new=xterm-new;;
8376 esac
8377 echo "$as_me:8377: result: $with_xterm_new" >&5
8378 echo "${ECHO_T}$with_xterm_new" >&6
8379 WHICH_XTERM=$with_xterm_new
8380
8381 echo "$as_me:8381: checking if xterm backspace sends BS or DEL" >&5
8382 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8383
8384 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8385 if test "${with_xterm_kbs+set}" = set; then
8386   withval="$with_xterm_kbs"
8387   with_xterm_kbs=$withval
8388 else
8389   with_xterm_kbs=BS
8390 fi;
8391 case x$with_xterm_kbs in
8392 (xyes|xno|xBS|xbs|x8)
8393         with_xterm_kbs=BS
8394         ;;
8395 (xDEL|xdel|x127)
8396         with_xterm_kbs=DEL
8397         ;;
8398 (*)
8399         with_xterm_kbs=$withval
8400         ;;
8401 esac
8402 echo "$as_me:8402: result: $with_xterm_kbs" >&5
8403 echo "${ECHO_T}$with_xterm_kbs" >&6
8404 XTERM_KBS=$with_xterm_kbs
8405
8406 MAKE_TERMINFO=
8407 if test "$use_database" = no ; then
8408         TERMINFO="${datadir}/terminfo"
8409         MAKE_TERMINFO="#"
8410 else
8411
8412 echo "$as_me:8412: checking for list of terminfo directories" >&5
8413 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8414
8415 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8416 if test "${with_terminfo_dirs+set}" = set; then
8417   withval="$with_terminfo_dirs"
8418
8419 else
8420   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8421 fi;
8422 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8423 cf_dst_path=
8424 for cf_src_path in $withval
8425 do
8426
8427 if test "x$prefix" != xNONE; then
8428         cf_path_syntax="$prefix"
8429 else
8430         cf_path_syntax="$ac_default_prefix"
8431 fi
8432
8433 case ".$cf_src_path" in
8434 (.\$\(*\)*|.\'*\'*)
8435         ;;
8436 (..|./*|.\\*)
8437         ;;
8438 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8439         ;;
8440 (.\${*prefix}*|.\${*dir}*)
8441         eval cf_src_path="$cf_src_path"
8442         case ".$cf_src_path" in
8443         (.NONE/*)
8444                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8445                 ;;
8446         esac
8447         ;;
8448 (.no|.NONE/*)
8449         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8450         ;;
8451 (*)
8452         { { echo "$as_me:8452: error: expected a pathname, not \"$cf_src_path\"" >&5
8453 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8454    { (exit 1); exit 1; }; }
8455         ;;
8456 esac
8457
8458   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8459   cf_dst_path="${cf_dst_path}${cf_src_path}"
8460 done
8461 IFS="$ac_save_ifs"
8462
8463 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8464 # so we have to check/work around.  We do prefer the result of "eval"...
8465 eval cf_dst_eval="$cf_dst_path"
8466 case "x$cf_dst_eval" in
8467 (xNONE*)
8468         TERMINFO_DIRS=$cf_dst_path
8469         ;;
8470 (*)
8471         TERMINFO_DIRS="$cf_dst_eval"
8472         ;;
8473 esac
8474
8475 echo "$as_me:8475: result: $TERMINFO_DIRS" >&5
8476 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8477 test -n "$TERMINFO_DIRS" &&
8478 cat >>confdefs.h <<EOF
8479 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8480 EOF
8481
8482 case "x$TERMINFO" in
8483 x???:*)
8484         { echo "$as_me:8484: WARNING: ignoring non-directory/file TERMINFO value" >&5
8485 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8486         unset TERMINFO
8487         ;;
8488 esac
8489
8490 echo "$as_me:8490: checking for default terminfo directory" >&5
8491 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8492
8493 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8494 if test "${with_default_terminfo_dir+set}" = set; then
8495   withval="$with_default_terminfo_dir"
8496
8497 else
8498   withval="${TERMINFO:-${datadir}/terminfo}"
8499 fi; if test -n "${datadir}/terminfo" ; then
8500
8501 if test "x$prefix" != xNONE; then
8502         cf_path_syntax="$prefix"
8503 else
8504         cf_path_syntax="$ac_default_prefix"
8505 fi
8506
8507 case ".$withval" in
8508 (.\$\(*\)*|.\'*\'*)
8509         ;;
8510 (..|./*|.\\*)
8511         ;;
8512 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8513         ;;
8514 (.\${*prefix}*|.\${*dir}*)
8515         eval withval="$withval"
8516         case ".$withval" in
8517         (.NONE/*)
8518                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8519                 ;;
8520         esac
8521         ;;
8522 (.no|.NONE/*)
8523         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8524         ;;
8525 (*)
8526         { { echo "$as_me:8526: error: expected a pathname, not \"$withval\"" >&5
8527 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8528    { (exit 1); exit 1; }; }
8529         ;;
8530 esac
8531
8532 fi
8533 eval TERMINFO="$withval"
8534
8535 echo "$as_me:8535: result: $TERMINFO" >&5
8536 echo "${ECHO_T}$TERMINFO" >&6
8537
8538 cat >>confdefs.h <<EOF
8539 #define TERMINFO "$TERMINFO"
8540 EOF
8541
8542 fi
8543
8544 ###     use option --disable-big-core to make tic run on small machines
8545 ###     We need 4Mb, check if we can allocate 50% more than that.
8546 echo "$as_me:8546: checking if big-core option selected" >&5
8547 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8548
8549 # Check whether --enable-big-core or --disable-big-core was given.
8550 if test "${enable_big_core+set}" = set; then
8551   enableval="$enable_big_core"
8552   with_big_core=$enableval
8553 else
8554   if test "$cross_compiling" = yes; then
8555   with_big_core=no
8556 else
8557   cat >conftest.$ac_ext <<_ACEOF
8558 #line 8558 "configure"
8559 #include "confdefs.h"
8560
8561 #include <stdlib.h>
8562 #include <string.h>
8563 int main() {
8564         unsigned long n = 6000000L;
8565         char *s = malloc(n);
8566         if (s != 0)
8567                 s[0] = s[n-1] = 0;
8568         ${cf_cv_main_return:-return}(s == 0);
8569 }
8570 _ACEOF
8571 rm -f conftest$ac_exeext
8572 if { (eval echo "$as_me:8572: \"$ac_link\"") >&5
8573   (eval $ac_link) 2>&5
8574   ac_status=$?
8575   echo "$as_me:8575: \$? = $ac_status" >&5
8576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8577   { (eval echo "$as_me:8577: \"$ac_try\"") >&5
8578   (eval $ac_try) 2>&5
8579   ac_status=$?
8580   echo "$as_me:8580: \$? = $ac_status" >&5
8581   (exit $ac_status); }; }; then
8582   with_big_core=yes
8583 else
8584   echo "$as_me: program exited with status $ac_status" >&5
8585 echo "$as_me: failed program was:" >&5
8586 cat conftest.$ac_ext >&5
8587 with_big_core=no
8588 fi
8589 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8590 fi
8591 fi;
8592 echo "$as_me:8592: result: $with_big_core" >&5
8593 echo "${ECHO_T}$with_big_core" >&6
8594 test "x$with_big_core" = "xyes" &&
8595 cat >>confdefs.h <<\EOF
8596 #define HAVE_BIG_CORE 1
8597 EOF
8598
8599 ### ISO C only guarantees 512-char strings, we have tables which load faster
8600 ### when constructed using "big" strings.  More than the C compiler, the awk
8601 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8602 echo "$as_me:8602: checking if big-strings option selected" >&5
8603 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8604
8605 # Check whether --enable-big-strings or --disable-big-strings was given.
8606 if test "${enable_big_strings+set}" = set; then
8607   enableval="$enable_big_strings"
8608   with_big_strings=$enableval
8609 else
8610
8611         case x$AWK in
8612         (x)
8613                 eval with_big_strings=no
8614                 ;;
8615         (*)
8616                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8617                         | $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
8618                         eval with_big_strings=yes
8619                 else
8620                         eval with_big_strings=no
8621                 fi
8622                 ;;
8623         esac
8624
8625 fi;
8626 echo "$as_me:8626: result: $with_big_strings" >&5
8627 echo "${ECHO_T}$with_big_strings" >&6
8628
8629 USE_BIG_STRINGS=0
8630 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8631
8632 ###     use option --enable-termcap to compile in the termcap fallback support
8633 echo "$as_me:8633: checking if you want termcap-fallback support" >&5
8634 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8635
8636 # Check whether --enable-termcap or --disable-termcap was given.
8637 if test "${enable_termcap+set}" = set; then
8638   enableval="$enable_termcap"
8639   with_termcap=$enableval
8640 else
8641   with_termcap=no
8642 fi;
8643 echo "$as_me:8643: result: $with_termcap" >&5
8644 echo "${ECHO_T}$with_termcap" >&6
8645
8646 NCURSES_USE_TERMCAP=0
8647 if test "x$with_termcap" != "xyes" ; then
8648         if test "$use_database" = no ; then
8649                 if test -z "$with_fallback" ; then
8650                         { { echo "$as_me:8650: error: You have disabled the database w/o specifying fallbacks" >&5
8651 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8652    { (exit 1); exit 1; }; }
8653                 fi
8654         fi
8655
8656 cat >>confdefs.h <<\EOF
8657 #define PURE_TERMINFO 1
8658 EOF
8659
8660 else
8661
8662         if test "$with_ticlib" != no ; then
8663                 { { echo "$as_me:8663: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8664 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8665    { (exit 1); exit 1; }; }
8666         fi
8667
8668         NCURSES_USE_TERMCAP=1
8669         echo "$as_me:8669: checking for list of termcap files" >&5
8670 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8671
8672 # Check whether --with-termpath or --without-termpath was given.
8673 if test "${with_termpath+set}" = set; then
8674   withval="$with_termpath"
8675
8676 else
8677   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8678 fi;
8679 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8680 cf_dst_path=
8681 for cf_src_path in $withval
8682 do
8683
8684 if test "x$prefix" != xNONE; then
8685         cf_path_syntax="$prefix"
8686 else
8687         cf_path_syntax="$ac_default_prefix"
8688 fi
8689
8690 case ".$cf_src_path" in
8691 (.\$\(*\)*|.\'*\'*)
8692         ;;
8693 (..|./*|.\\*)
8694         ;;
8695 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8696         ;;
8697 (.\${*prefix}*|.\${*dir}*)
8698         eval cf_src_path="$cf_src_path"
8699         case ".$cf_src_path" in
8700         (.NONE/*)
8701                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8702                 ;;
8703         esac
8704         ;;
8705 (.no|.NONE/*)
8706         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8707         ;;
8708 (*)
8709         { { echo "$as_me:8709: error: expected a pathname, not \"$cf_src_path\"" >&5
8710 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8711    { (exit 1); exit 1; }; }
8712         ;;
8713 esac
8714
8715   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8716   cf_dst_path="${cf_dst_path}${cf_src_path}"
8717 done
8718 IFS="$ac_save_ifs"
8719
8720 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8721 # so we have to check/work around.  We do prefer the result of "eval"...
8722 eval cf_dst_eval="$cf_dst_path"
8723 case "x$cf_dst_eval" in
8724 (xNONE*)
8725         TERMPATH=$cf_dst_path
8726         ;;
8727 (*)
8728         TERMPATH="$cf_dst_eval"
8729         ;;
8730 esac
8731
8732         echo "$as_me:8732: result: $TERMPATH" >&5
8733 echo "${ECHO_T}$TERMPATH" >&6
8734         test -n "$TERMPATH" &&
8735 cat >>confdefs.h <<EOF
8736 #define TERMPATH "$TERMPATH"
8737 EOF
8738
8739         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8740         echo "$as_me:8740: checking if fast termcap-loader is needed" >&5
8741 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8742
8743 # Check whether --enable-getcap or --disable-getcap was given.
8744 if test "${enable_getcap+set}" = set; then
8745   enableval="$enable_getcap"
8746   with_getcap=$enableval
8747 else
8748   with_getcap=no
8749 fi;
8750         echo "$as_me:8750: result: $with_getcap" >&5
8751 echo "${ECHO_T}$with_getcap" >&6
8752         test "x$with_getcap" = "xyes" &&
8753 cat >>confdefs.h <<\EOF
8754 #define USE_GETCAP 1
8755 EOF
8756
8757         echo "$as_me:8757: checking if translated termcaps will be cached in ~/.terminfo" >&5
8758 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8759
8760 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8761 if test "${enable_getcap_cache+set}" = set; then
8762   enableval="$enable_getcap_cache"
8763   with_getcap_cache=$enableval
8764 else
8765   with_getcap_cache=no
8766 fi;
8767         echo "$as_me:8767: result: $with_getcap_cache" >&5
8768 echo "${ECHO_T}$with_getcap_cache" >&6
8769         test "x$with_getcap_cache" = "xyes" &&
8770 cat >>confdefs.h <<\EOF
8771 #define USE_GETCAP_CACHE 1
8772 EOF
8773
8774 fi
8775
8776 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8777 echo "$as_me:8777: checking if ~/.terminfo is wanted" >&5
8778 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8779
8780 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8781 if test "${enable_home_terminfo+set}" = set; then
8782   enableval="$enable_home_terminfo"
8783   with_home_terminfo=$enableval
8784 else
8785   with_home_terminfo=yes
8786 fi;
8787 echo "$as_me:8787: result: $with_home_terminfo" >&5
8788 echo "${ECHO_T}$with_home_terminfo" >&6
8789 test "x$with_home_terminfo" = "xyes" &&
8790 cat >>confdefs.h <<\EOF
8791 #define USE_HOME_TERMINFO 1
8792 EOF
8793
8794 echo "$as_me:8794: checking if you want to use restricted environment when running as root" >&5
8795 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8796
8797 # Check whether --enable-root-environ or --disable-root-environ was given.
8798 if test "${enable_root_environ+set}" = set; then
8799   enableval="$enable_root_environ"
8800   with_root_environ=$enableval
8801 else
8802   with_root_environ=yes
8803 fi;
8804 echo "$as_me:8804: result: $with_root_environ" >&5
8805 echo "${ECHO_T}$with_root_environ" >&6
8806 test "x$with_root_environ" = xyes &&
8807 cat >>confdefs.h <<\EOF
8808 #define USE_ROOT_ENVIRON 1
8809 EOF
8810
8811 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8812 ###   to reduce storage requirements for the terminfo database.
8813
8814 for ac_header in \
8815 unistd.h \
8816
8817 do
8818 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8819 echo "$as_me:8819: checking for $ac_header" >&5
8820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8822   echo $ECHO_N "(cached) $ECHO_C" >&6
8823 else
8824   cat >conftest.$ac_ext <<_ACEOF
8825 #line 8825 "configure"
8826 #include "confdefs.h"
8827 #include <$ac_header>
8828 _ACEOF
8829 if { (eval echo "$as_me:8829: \"$ac_cpp conftest.$ac_ext\"") >&5
8830   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8831   ac_status=$?
8832   egrep -v '^ *\+' conftest.er1 >conftest.err
8833   rm -f conftest.er1
8834   cat conftest.err >&5
8835   echo "$as_me:8835: \$? = $ac_status" >&5
8836   (exit $ac_status); } >/dev/null; then
8837   if test -s conftest.err; then
8838     ac_cpp_err=$ac_c_preproc_warn_flag
8839   else
8840     ac_cpp_err=
8841   fi
8842 else
8843   ac_cpp_err=yes
8844 fi
8845 if test -z "$ac_cpp_err"; then
8846   eval "$as_ac_Header=yes"
8847 else
8848   echo "$as_me: failed program was:" >&5
8849   cat conftest.$ac_ext >&5
8850   eval "$as_ac_Header=no"
8851 fi
8852 rm -f conftest.err conftest.$ac_ext
8853 fi
8854 echo "$as_me:8854: result: `eval echo '${'$as_ac_Header'}'`" >&5
8855 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8856 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8857   cat >>confdefs.h <<EOF
8858 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8859 EOF
8860
8861 fi
8862 done
8863
8864 for ac_func in \
8865         remove \
8866         unlink
8867 do
8868 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8869 echo "$as_me:8869: checking for $ac_func" >&5
8870 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8871 if eval "test \"\${$as_ac_var+set}\" = set"; then
8872   echo $ECHO_N "(cached) $ECHO_C" >&6
8873 else
8874   cat >conftest.$ac_ext <<_ACEOF
8875 #line 8875 "configure"
8876 #include "confdefs.h"
8877 #define $ac_func autoconf_temporary
8878 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8879 #undef $ac_func
8880
8881 #ifdef __cplusplus
8882 extern "C"
8883 #endif
8884
8885 /* We use char because int might match the return type of a gcc2
8886    builtin and then its argument prototype would still apply.  */
8887 char $ac_func (void);
8888
8889 int
8890 main (void)
8891 {
8892
8893 /* The GNU C library defines stubs for functions which it implements
8894     to always fail with ENOSYS.  Some functions are actually named
8895     something starting with __ and the normal name is an alias.  */
8896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8897 #error found stub for $ac_func
8898 #endif
8899
8900         return $ac_func ();
8901   ;
8902   return 0;
8903 }
8904 _ACEOF
8905 rm -f conftest.$ac_objext conftest$ac_exeext
8906 if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
8907   (eval $ac_link) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); } &&
8911          { ac_try='test -s conftest$ac_exeext'
8912   { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913   (eval $ac_try) 2>&5
8914   ac_status=$?
8915   echo "$as_me:8915: \$? = $ac_status" >&5
8916   (exit $ac_status); }; }; then
8917   eval "$as_ac_var=yes"
8918 else
8919   echo "$as_me: failed program was:" >&5
8920 cat conftest.$ac_ext >&5
8921 eval "$as_ac_var=no"
8922 fi
8923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924 fi
8925 echo "$as_me:8925: result: `eval echo '${'$as_ac_var'}'`" >&5
8926 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8927 if test `eval echo '${'$as_ac_var'}'` = yes; then
8928   cat >>confdefs.h <<EOF
8929 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8930 EOF
8931
8932 fi
8933 done
8934
8935 if test "$cross_compiling" = yes ; then
8936
8937 for ac_func in \
8938                 link \
8939                 symlink
8940 do
8941 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8942 echo "$as_me:8942: checking for $ac_func" >&5
8943 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8944 if eval "test \"\${$as_ac_var+set}\" = set"; then
8945   echo $ECHO_N "(cached) $ECHO_C" >&6
8946 else
8947   cat >conftest.$ac_ext <<_ACEOF
8948 #line 8948 "configure"
8949 #include "confdefs.h"
8950 #define $ac_func autoconf_temporary
8951 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8952 #undef $ac_func
8953
8954 #ifdef __cplusplus
8955 extern "C"
8956 #endif
8957
8958 /* We use char because int might match the return type of a gcc2
8959    builtin and then its argument prototype would still apply.  */
8960 char $ac_func (void);
8961
8962 int
8963 main (void)
8964 {
8965
8966 /* The GNU C library defines stubs for functions which it implements
8967     to always fail with ENOSYS.  Some functions are actually named
8968     something starting with __ and the normal name is an alias.  */
8969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8970 #error found stub for $ac_func
8971 #endif
8972
8973         return $ac_func ();
8974   ;
8975   return 0;
8976 }
8977 _ACEOF
8978 rm -f conftest.$ac_objext conftest$ac_exeext
8979 if { (eval echo "$as_me:8979: \"$ac_link\"") >&5
8980   (eval $ac_link) 2>&5
8981   ac_status=$?
8982   echo "$as_me:8982: \$? = $ac_status" >&5
8983   (exit $ac_status); } &&
8984          { ac_try='test -s conftest$ac_exeext'
8985   { (eval echo "$as_me:8985: \"$ac_try\"") >&5
8986   (eval $ac_try) 2>&5
8987   ac_status=$?
8988   echo "$as_me:8988: \$? = $ac_status" >&5
8989   (exit $ac_status); }; }; then
8990   eval "$as_ac_var=yes"
8991 else
8992   echo "$as_me: failed program was:" >&5
8993 cat conftest.$ac_ext >&5
8994 eval "$as_ac_var=no"
8995 fi
8996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997 fi
8998 echo "$as_me:8998: result: `eval echo '${'$as_ac_var'}'`" >&5
8999 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9000 if test `eval echo '${'$as_ac_var'}'` = yes; then
9001   cat >>confdefs.h <<EOF
9002 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9003 EOF
9004
9005 fi
9006 done
9007
9008 else
9009         echo "$as_me:9009: checking if link/symlink functions work" >&5
9010 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9011 if test "${cf_cv_link_funcs+set}" = set; then
9012   echo $ECHO_N "(cached) $ECHO_C" >&6
9013 else
9014
9015                 cf_cv_link_funcs=
9016                 for cf_func in link symlink ; do
9017                         if test "$cross_compiling" = yes; then
9018
9019                         eval 'ac_cv_func_'$cf_func'=error'
9020 else
9021   cat >conftest.$ac_ext <<_ACEOF
9022 #line 9022 "configure"
9023 #include "confdefs.h"
9024
9025 #include <sys/types.h>
9026 #include <sys/stat.h>
9027 #ifdef HAVE_UNISTD_H
9028 #include <unistd.h>
9029 #endif
9030 int main(void)
9031 {
9032         int fail = 0;
9033         char *src = "config.log";
9034         char *dst = "conftest.chk";
9035         struct stat src_sb;
9036         struct stat dst_sb;
9037
9038         stat(src, &src_sb);
9039         fail = ($cf_func("config.log", "conftest.chk") < 0)
9040             || (stat(dst, &dst_sb) < 0)
9041             || (dst_sb.st_mtime != src_sb.st_mtime);
9042 #ifdef HAVE_UNLINK
9043         unlink(dst);
9044 #else
9045         remove(dst);
9046 #endif
9047         ${cf_cv_main_return:-return} (fail);
9048 }
9049
9050 _ACEOF
9051 rm -f conftest$ac_exeext
9052 if { (eval echo "$as_me:9052: \"$ac_link\"") >&5
9053   (eval $ac_link) 2>&5
9054   ac_status=$?
9055   echo "$as_me:9055: \$? = $ac_status" >&5
9056   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9057   { (eval echo "$as_me:9057: \"$ac_try\"") >&5
9058   (eval $ac_try) 2>&5
9059   ac_status=$?
9060   echo "$as_me:9060: \$? = $ac_status" >&5
9061   (exit $ac_status); }; }; then
9062
9063                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9064                         eval 'ac_cv_func_'$cf_func'=yes'
9065 else
9066   echo "$as_me: program exited with status $ac_status" >&5
9067 echo "$as_me: failed program was:" >&5
9068 cat conftest.$ac_ext >&5
9069
9070                         eval 'ac_cv_func_'$cf_func'=no'
9071 fi
9072 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9073 fi
9074                 done
9075                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9076
9077 fi
9078 echo "$as_me:9078: result: $cf_cv_link_funcs" >&5
9079 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9080         test "$ac_cv_func_link"    = yes &&
9081 cat >>confdefs.h <<\EOF
9082 #define HAVE_LINK 1
9083 EOF
9084
9085         test "$ac_cv_func_symlink" = yes &&
9086 cat >>confdefs.h <<\EOF
9087 #define HAVE_SYMLINK 1
9088 EOF
9089
9090 fi
9091
9092 with_links=no
9093 with_symlinks=no
9094
9095 # soft links (symbolic links) are useful for some systems where hard links do
9096 # not work, or to make it simpler to copy terminfo trees around.
9097 if test "x$ac_cv_func_symlink" = xyes ; then
9098         echo "$as_me:9098: checking if tic should use symbolic links" >&5
9099 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9100
9101 # Check whether --enable-symlinks or --disable-symlinks was given.
9102 if test "${enable_symlinks+set}" = set; then
9103   enableval="$enable_symlinks"
9104   with_symlinks=$enableval
9105 else
9106   with_symlinks=no
9107 fi;
9108         echo "$as_me:9108: result: $with_symlinks" >&5
9109 echo "${ECHO_T}$with_symlinks" >&6
9110 fi
9111
9112 # If we have hard links and did not choose to use soft links instead, there is
9113 # no reason to make this choice optional - use the hard links.
9114 if test "$with_symlinks" = no ; then
9115         echo "$as_me:9115: checking if tic should use hard links" >&5
9116 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9117         if test "x$ac_cv_func_link" = xyes ; then
9118                 with_links=yes
9119         else
9120                 with_links=no
9121         fi
9122         echo "$as_me:9122: result: $with_links" >&5
9123 echo "${ECHO_T}$with_links" >&6
9124 fi
9125
9126 test "x$with_links" = xyes &&
9127 cat >>confdefs.h <<\EOF
9128 #define USE_LINKS 1
9129 EOF
9130
9131 test "x$with_symlinks" = xyes &&
9132 cat >>confdefs.h <<\EOF
9133 #define USE_SYMLINKS 1
9134 EOF
9135
9136 ###   use option --enable-broken-linker to force on use of broken-linker support
9137 echo "$as_me:9137: checking if you want broken-linker support code" >&5
9138 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9139
9140 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9141 if test "${enable_broken_linker+set}" = set; then
9142   enableval="$enable_broken_linker"
9143   with_broken_linker=$enableval
9144 else
9145   with_broken_linker=${BROKEN_LINKER:-no}
9146 fi;
9147 echo "$as_me:9147: result: $with_broken_linker" >&5
9148 echo "${ECHO_T}$with_broken_linker" >&6
9149
9150 BROKEN_LINKER=0
9151 if test "x$with_broken_linker" = xyes ; then
9152
9153 cat >>confdefs.h <<\EOF
9154 #define BROKEN_LINKER 1
9155 EOF
9156
9157         BROKEN_LINKER=1
9158 elif test "$DFT_LWR_MODEL" = shared ; then
9159         case $cf_cv_system_name in
9160         (cygwin*)
9161
9162 cat >>confdefs.h <<\EOF
9163 #define BROKEN_LINKER 1
9164 EOF
9165
9166                 BROKEN_LINKER=1
9167                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
9168
9169 echo "${as_me:-configure}:9169: testing cygwin linker is broken anyway ..." 1>&5
9170
9171                 ;;
9172         esac
9173 fi
9174
9175 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9176 echo "$as_me:9176: checking if tputs should process BSD-style prefix padding" >&5
9177 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9178
9179 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9180 if test "${enable_bsdpad+set}" = set; then
9181   enableval="$enable_bsdpad"
9182   with_bsdpad=$enableval
9183 else
9184   with_bsdpad=no
9185 fi;
9186 echo "$as_me:9186: result: $with_bsdpad" >&5
9187 echo "${ECHO_T}$with_bsdpad" >&6
9188 test "x$with_bsdpad" = xyes &&
9189 cat >>confdefs.h <<\EOF
9190 #define BSD_TPUTS 1
9191 EOF
9192
9193 ###   use option --enable-widec to turn on use of wide-character support
9194 NCURSES_CH_T=chtype
9195 NCURSES_LIBUTF8=0
9196
9197 NEED_WCHAR_H=0
9198 NCURSES_MBSTATE_T=0
9199 NCURSES_WCHAR_T=0
9200 NCURSES_WINT_T=0
9201
9202 # Check to define _XOPEN_SOURCE "automatically"
9203 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9204
9205 echo "$as_me:9205: checking if the POSIX test-macros are already defined" >&5
9206 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9207 if test "${cf_cv_posix_visible+set}" = set; then
9208   echo $ECHO_N "(cached) $ECHO_C" >&6
9209 else
9210
9211 cat >conftest.$ac_ext <<_ACEOF
9212 #line 9212 "configure"
9213 #include "confdefs.h"
9214 #include <stdio.h>
9215 int
9216 main (void)
9217 {
9218
9219 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9220         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9221         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9222         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9223 #error conflicting symbols found
9224 #endif
9225
9226   ;
9227   return 0;
9228 }
9229 _ACEOF
9230 rm -f conftest.$ac_objext
9231 if { (eval echo "$as_me:9231: \"$ac_compile\"") >&5
9232   (eval $ac_compile) 2>&5
9233   ac_status=$?
9234   echo "$as_me:9234: \$? = $ac_status" >&5
9235   (exit $ac_status); } &&
9236          { ac_try='test -s conftest.$ac_objext'
9237   { (eval echo "$as_me:9237: \"$ac_try\"") >&5
9238   (eval $ac_try) 2>&5
9239   ac_status=$?
9240   echo "$as_me:9240: \$? = $ac_status" >&5
9241   (exit $ac_status); }; }; then
9242   cf_cv_posix_visible=no
9243 else
9244   echo "$as_me: failed program was:" >&5
9245 cat conftest.$ac_ext >&5
9246 cf_cv_posix_visible=yes
9247 fi
9248 rm -f conftest.$ac_objext conftest.$ac_ext
9249
9250 fi
9251 echo "$as_me:9251: result: $cf_cv_posix_visible" >&5
9252 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9253
9254 if test "$cf_cv_posix_visible" = no; then
9255
9256 cf_XOPEN_SOURCE=600
9257 cf_POSIX_C_SOURCE=199506L
9258 cf_xopen_source=
9259
9260 case $host_os in
9261 (aix[4-7]*)
9262         cf_xopen_source="-D_ALL_SOURCE"
9263         ;;
9264 (msys)
9265         cf_XOPEN_SOURCE=600
9266         ;;
9267 (darwin[0-8].*)
9268         cf_xopen_source="-D_APPLE_C_SOURCE"
9269         ;;
9270 (darwin*)
9271         cf_xopen_source="-D_DARWIN_C_SOURCE"
9272         cf_XOPEN_SOURCE=
9273         ;;
9274 (freebsd*|dragonfly*|midnightbsd*)
9275         # 5.x headers associate
9276         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9277         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9278         cf_POSIX_C_SOURCE=200112L
9279         cf_XOPEN_SOURCE=600
9280         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9281         ;;
9282 (hpux11*)
9283         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9284         ;;
9285 (hpux*)
9286         cf_xopen_source="-D_HPUX_SOURCE"
9287         ;;
9288 (irix[56].*)
9289         cf_xopen_source="-D_SGI_SOURCE"
9290         cf_XOPEN_SOURCE=
9291         ;;
9292 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9293
9294 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9295
9296 echo "$as_me:9296: checking if this is the GNU C library" >&5
9297 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9298 if test "${cf_cv_gnu_library+set}" = set; then
9299   echo $ECHO_N "(cached) $ECHO_C" >&6
9300 else
9301
9302 cat >conftest.$ac_ext <<_ACEOF
9303 #line 9303 "configure"
9304 #include "confdefs.h"
9305 #include <sys/types.h>
9306 int
9307 main (void)
9308 {
9309
9310         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9311                 return 0;
9312         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9313                 return 0;
9314         #else
9315         #       error not GNU C library
9316         #endif
9317   ;
9318   return 0;
9319 }
9320 _ACEOF
9321 rm -f conftest.$ac_objext
9322 if { (eval echo "$as_me:9322: \"$ac_compile\"") >&5
9323   (eval $ac_compile) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit $ac_status); } &&
9327          { ac_try='test -s conftest.$ac_objext'
9328   { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9329   (eval $ac_try) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit $ac_status); }; }; then
9333   cf_cv_gnu_library=yes
9334 else
9335   echo "$as_me: failed program was:" >&5
9336 cat conftest.$ac_ext >&5
9337 cf_cv_gnu_library=no
9338 fi
9339 rm -f conftest.$ac_objext conftest.$ac_ext
9340
9341 fi
9342 echo "$as_me:9342: result: $cf_cv_gnu_library" >&5
9343 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9344
9345 if test x$cf_cv_gnu_library = xyes; then
9346
9347         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9348         # was changed to help a little.  newlib incorporated the change about 4
9349         # years later.
9350         echo "$as_me:9350: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9351 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9352 if test "${cf_cv_gnu_library_219+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355
9356                 cf_save="$CPPFLAGS"
9357
9358         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9359         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9360
9361                 cat >conftest.$ac_ext <<_ACEOF
9362 #line 9362 "configure"
9363 #include "confdefs.h"
9364 #include <sys/types.h>
9365 int
9366 main (void)
9367 {
9368
9369                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9370                                 return 0;
9371                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9372                                 return 0;
9373                         #else
9374                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9375                         #endif
9376   ;
9377   return 0;
9378 }
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:9381: \"$ac_compile\"") >&5
9382   (eval $ac_compile) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); } &&
9386          { ac_try='test -s conftest.$ac_objext'
9387   { (eval echo "$as_me:9387: \"$ac_try\"") >&5
9388   (eval $ac_try) 2>&5
9389   ac_status=$?
9390   echo "$as_me:9390: \$? = $ac_status" >&5
9391   (exit $ac_status); }; }; then
9392   cf_cv_gnu_library_219=yes
9393 else
9394   echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 cf_cv_gnu_library_219=no
9397 fi
9398 rm -f conftest.$ac_objext conftest.$ac_ext
9399                 CPPFLAGS="$cf_save"
9400
9401 fi
9402 echo "$as_me:9402: result: $cf_cv_gnu_library_219" >&5
9403 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9404
9405         if test "x$cf_cv_gnu_library_219" = xyes; then
9406                 cf_save="$CPPFLAGS"
9407                 echo "$as_me:9407: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9408 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9409 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9410   echo $ECHO_N "(cached) $ECHO_C" >&6
9411 else
9412
9413 cf_fix_cppflags=no
9414 cf_new_cflags=
9415 cf_new_cppflags=
9416 cf_new_extra_cppflags=
9417
9418 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9419 do
9420 case $cf_fix_cppflags in
9421 (no)
9422         case $cf_add_cflags in
9423         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9424                 case $cf_add_cflags in
9425                 (-D*)
9426                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9427
9428                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9429                                 && test -z "${cf_tst_cflags}" \
9430                                 && cf_fix_cppflags=yes
9431
9432                         if test $cf_fix_cppflags = yes ; then
9433
9434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9436
9437                                 continue
9438                         elif test "${cf_tst_cflags}" = "\"'" ; then
9439
9440         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9441         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9442
9443                                 continue
9444                         fi
9445                         ;;
9446                 esac
9447                 case "$CPPFLAGS" in
9448                 (*$cf_add_cflags)
9449                         ;;
9450                 (*)
9451                         case $cf_add_cflags in
9452                         (-D*)
9453                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9454
9455 CPPFLAGS=`echo "$CPPFLAGS" | \
9456         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9457                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9458
9459                                 ;;
9460                         esac
9461
9462         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9463         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9464
9465                         ;;
9466                 esac
9467                 ;;
9468         (*)
9469
9470         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9471         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9472
9473                 ;;
9474         esac
9475         ;;
9476 (yes)
9477
9478         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9479         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9480
9481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9482
9483         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9484                 && test -z "${cf_tst_cflags}" \
9485                 && cf_fix_cppflags=no
9486         ;;
9487 esac
9488 done
9489
9490 if test -n "$cf_new_cflags" ; then
9491
9492         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9493         CFLAGS="${CFLAGS}$cf_new_cflags"
9494
9495 fi
9496
9497 if test -n "$cf_new_cppflags" ; then
9498
9499         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9500         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9501
9502 fi
9503
9504 if test -n "$cf_new_extra_cppflags" ; then
9505
9506         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9507         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9508
9509 fi
9510
9511                         cat >conftest.$ac_ext <<_ACEOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514
9515                                 #include <limits.h>
9516                                 #include <sys/types.h>
9517
9518 int
9519 main (void)
9520 {
9521
9522                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9523                                         return 0;
9524                                 #else
9525                                 #       error GNU C library is too old
9526                                 #endif
9527   ;
9528   return 0;
9529 }
9530 _ACEOF
9531 rm -f conftest.$ac_objext
9532 if { (eval echo "$as_me:9532: \"$ac_compile\"") >&5
9533   (eval $ac_compile) 2>&5
9534   ac_status=$?
9535   echo "$as_me:9535: \$? = $ac_status" >&5
9536   (exit $ac_status); } &&
9537          { ac_try='test -s conftest.$ac_objext'
9538   { (eval echo "$as_me:9538: \"$ac_try\"") >&5
9539   (eval $ac_try) 2>&5
9540   ac_status=$?
9541   echo "$as_me:9541: \$? = $ac_status" >&5
9542   (exit $ac_status); }; }; then
9543   cf_cv_gnu_dftsrc_219=yes
9544 else
9545   echo "$as_me: failed program was:" >&5
9546 cat conftest.$ac_ext >&5
9547 cf_cv_gnu_dftsrc_219=no
9548 fi
9549 rm -f conftest.$ac_objext conftest.$ac_ext
9550
9551 fi
9552 echo "$as_me:9552: result: $cf_cv_gnu_dftsrc_219" >&5
9553 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9554                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9555         else
9556                 cf_cv_gnu_dftsrc_219=maybe
9557         fi
9558
9559         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9560
9561                 echo "$as_me:9561: checking if we must define _GNU_SOURCE" >&5
9562 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9563 if test "${cf_cv_gnu_source+set}" = set; then
9564   echo $ECHO_N "(cached) $ECHO_C" >&6
9565 else
9566
9567                 cat >conftest.$ac_ext <<_ACEOF
9568 #line 9568 "configure"
9569 #include "confdefs.h"
9570 #include <sys/types.h>
9571 int
9572 main (void)
9573 {
9574
9575                         #ifndef _XOPEN_SOURCE
9576                         #error  expected _XOPEN_SOURCE to be defined
9577                         #endif
9578   ;
9579   return 0;
9580 }
9581 _ACEOF
9582 rm -f conftest.$ac_objext
9583 if { (eval echo "$as_me:9583: \"$ac_compile\"") >&5
9584   (eval $ac_compile) 2>&5
9585   ac_status=$?
9586   echo "$as_me:9586: \$? = $ac_status" >&5
9587   (exit $ac_status); } &&
9588          { ac_try='test -s conftest.$ac_objext'
9589   { (eval echo "$as_me:9589: \"$ac_try\"") >&5
9590   (eval $ac_try) 2>&5
9591   ac_status=$?
9592   echo "$as_me:9592: \$? = $ac_status" >&5
9593   (exit $ac_status); }; }; then
9594   cf_cv_gnu_source=no
9595 else
9596   echo "$as_me: failed program was:" >&5
9597 cat conftest.$ac_ext >&5
9598 cf_save="$CPPFLAGS"
9599
9600 cf_fix_cppflags=no
9601 cf_new_cflags=
9602 cf_new_cppflags=
9603 cf_new_extra_cppflags=
9604
9605 for cf_add_cflags in -D_GNU_SOURCE
9606 do
9607 case $cf_fix_cppflags in
9608 (no)
9609         case $cf_add_cflags in
9610         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9611                 case $cf_add_cflags in
9612                 (-D*)
9613                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9614
9615                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9616                                 && test -z "${cf_tst_cflags}" \
9617                                 && cf_fix_cppflags=yes
9618
9619                         if test $cf_fix_cppflags = yes ; then
9620
9621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9623
9624                                 continue
9625                         elif test "${cf_tst_cflags}" = "\"'" ; then
9626
9627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9629
9630                                 continue
9631                         fi
9632                         ;;
9633                 esac
9634                 case "$CPPFLAGS" in
9635                 (*$cf_add_cflags)
9636                         ;;
9637                 (*)
9638                         case $cf_add_cflags in
9639                         (-D*)
9640                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9641
9642 CPPFLAGS=`echo "$CPPFLAGS" | \
9643         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9644                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9645
9646                                 ;;
9647                         esac
9648
9649         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9650         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9651
9652                         ;;
9653                 esac
9654                 ;;
9655         (*)
9656
9657         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9658         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9659
9660                 ;;
9661         esac
9662         ;;
9663 (yes)
9664
9665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9667
9668         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9669
9670         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9671                 && test -z "${cf_tst_cflags}" \
9672                 && cf_fix_cppflags=no
9673         ;;
9674 esac
9675 done
9676
9677 if test -n "$cf_new_cflags" ; then
9678
9679         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9680         CFLAGS="${CFLAGS}$cf_new_cflags"
9681
9682 fi
9683
9684 if test -n "$cf_new_cppflags" ; then
9685
9686         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9687         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9688
9689 fi
9690
9691 if test -n "$cf_new_extra_cppflags" ; then
9692
9693         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9694         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9695
9696 fi
9697
9698                          cat >conftest.$ac_ext <<_ACEOF
9699 #line 9699 "configure"
9700 #include "confdefs.h"
9701 #include <sys/types.h>
9702 int
9703 main (void)
9704 {
9705
9706                                 #ifdef _XOPEN_SOURCE
9707                                 #error  expected _XOPEN_SOURCE to be undefined
9708                                 #endif
9709   ;
9710   return 0;
9711 }
9712 _ACEOF
9713 rm -f conftest.$ac_objext
9714 if { (eval echo "$as_me:9714: \"$ac_compile\"") >&5
9715   (eval $ac_compile) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); } &&
9719          { ac_try='test -s conftest.$ac_objext'
9720   { (eval echo "$as_me:9720: \"$ac_try\"") >&5
9721   (eval $ac_try) 2>&5
9722   ac_status=$?
9723   echo "$as_me:9723: \$? = $ac_status" >&5
9724   (exit $ac_status); }; }; then
9725   cf_cv_gnu_source=no
9726 else
9727   echo "$as_me: failed program was:" >&5
9728 cat conftest.$ac_ext >&5
9729 cf_cv_gnu_source=yes
9730 fi
9731 rm -f conftest.$ac_objext conftest.$ac_ext
9732                         CPPFLAGS="$cf_save"
9733
9734 fi
9735 rm -f conftest.$ac_objext conftest.$ac_ext
9736
9737 fi
9738 echo "$as_me:9738: result: $cf_cv_gnu_source" >&5
9739 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9740
9741                 if test "$cf_cv_gnu_source" = yes
9742                 then
9743                 echo "$as_me:9743: checking if we should also define _DEFAULT_SOURCE" >&5
9744 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9745 if test "${cf_cv_default_source+set}" = set; then
9746   echo $ECHO_N "(cached) $ECHO_C" >&6
9747 else
9748
9749         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9750         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9751
9752                         cat >conftest.$ac_ext <<_ACEOF
9753 #line 9753 "configure"
9754 #include "confdefs.h"
9755 #include <sys/types.h>
9756 int
9757 main (void)
9758 {
9759
9760                                 #ifdef _DEFAULT_SOURCE
9761                                 #error  expected _DEFAULT_SOURCE to be undefined
9762                                 #endif
9763   ;
9764   return 0;
9765 }
9766 _ACEOF
9767 rm -f conftest.$ac_objext
9768 if { (eval echo "$as_me:9768: \"$ac_compile\"") >&5
9769   (eval $ac_compile) 2>&5
9770   ac_status=$?
9771   echo "$as_me:9771: \$? = $ac_status" >&5
9772   (exit $ac_status); } &&
9773          { ac_try='test -s conftest.$ac_objext'
9774   { (eval echo "$as_me:9774: \"$ac_try\"") >&5
9775   (eval $ac_try) 2>&5
9776   ac_status=$?
9777   echo "$as_me:9777: \$? = $ac_status" >&5
9778   (exit $ac_status); }; }; then
9779   cf_cv_default_source=no
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 cf_cv_default_source=yes
9784 fi
9785 rm -f conftest.$ac_objext conftest.$ac_ext
9786
9787 fi
9788 echo "$as_me:9788: result: $cf_cv_default_source" >&5
9789 echo "${ECHO_T}$cf_cv_default_source" >&6
9790                         if test "$cf_cv_default_source" = yes
9791                         then
9792
9793         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9794         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9795
9796                         fi
9797                 fi
9798         fi
9799
9800 fi
9801
9802         ;;
9803 (minix*)
9804         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9805         ;;
9806 (mirbsd*)
9807         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9808         cf_XOPEN_SOURCE=
9809
9810 if test "$cf_cv_posix_visible" = no; then
9811
9812 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9813
9814 cf_save_CFLAGS="$CFLAGS"
9815 cf_save_CPPFLAGS="$CPPFLAGS"
9816
9817 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9818         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9819                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9820
9821 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9822         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9823                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9824
9825 echo "$as_me:9825: checking if we should define _POSIX_C_SOURCE" >&5
9826 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9827 if test "${cf_cv_posix_c_source+set}" = set; then
9828   echo $ECHO_N "(cached) $ECHO_C" >&6
9829 else
9830
9831 echo "${as_me:-configure}:9831: testing if the symbol is already defined go no further ..." 1>&5
9832
9833         cat >conftest.$ac_ext <<_ACEOF
9834 #line 9834 "configure"
9835 #include "confdefs.h"
9836 #include <sys/types.h>
9837 int
9838 main (void)
9839 {
9840
9841 #ifndef _POSIX_C_SOURCE
9842 make an error
9843 #endif
9844   ;
9845   return 0;
9846 }
9847 _ACEOF
9848 rm -f conftest.$ac_objext
9849 if { (eval echo "$as_me:9849: \"$ac_compile\"") >&5
9850   (eval $ac_compile) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); } &&
9854          { ac_try='test -s conftest.$ac_objext'
9855   { (eval echo "$as_me:9855: \"$ac_try\"") >&5
9856   (eval $ac_try) 2>&5
9857   ac_status=$?
9858   echo "$as_me:9858: \$? = $ac_status" >&5
9859   (exit $ac_status); }; }; then
9860   cf_cv_posix_c_source=no
9861 else
9862   echo "$as_me: failed program was:" >&5
9863 cat conftest.$ac_ext >&5
9864 cf_want_posix_source=no
9865          case .$cf_POSIX_C_SOURCE in
9866          (.[12]??*)
9867                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9868                 ;;
9869          (.2)
9870                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9871                 cf_want_posix_source=yes
9872                 ;;
9873          (.*)
9874                 cf_want_posix_source=yes
9875                 ;;
9876          esac
9877          if test "$cf_want_posix_source" = yes ; then
9878                 cat >conftest.$ac_ext <<_ACEOF
9879 #line 9879 "configure"
9880 #include "confdefs.h"
9881 #include <sys/types.h>
9882 int
9883 main (void)
9884 {
9885
9886 #ifdef _POSIX_SOURCE
9887 make an error
9888 #endif
9889   ;
9890   return 0;
9891 }
9892 _ACEOF
9893 rm -f conftest.$ac_objext
9894 if { (eval echo "$as_me:9894: \"$ac_compile\"") >&5
9895   (eval $ac_compile) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); } &&
9899          { ac_try='test -s conftest.$ac_objext'
9900   { (eval echo "$as_me:9900: \"$ac_try\"") >&5
9901   (eval $ac_try) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); }; }; then
9905   :
9906 else
9907   echo "$as_me: failed program was:" >&5
9908 cat conftest.$ac_ext >&5
9909 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9910 fi
9911 rm -f conftest.$ac_objext conftest.$ac_ext
9912          fi
9913
9914 echo "${as_me:-configure}:9914: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9915
9916          CFLAGS="$cf_trim_CFLAGS"
9917          CPPFLAGS="$cf_trim_CPPFLAGS"
9918
9919         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9920         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9921
9922 echo "${as_me:-configure}:9922: testing if the second compile does not leave our definition intact error ..." 1>&5
9923
9924          cat >conftest.$ac_ext <<_ACEOF
9925 #line 9925 "configure"
9926 #include "confdefs.h"
9927 #include <sys/types.h>
9928 int
9929 main (void)
9930 {
9931
9932 #ifndef _POSIX_C_SOURCE
9933 make an error
9934 #endif
9935   ;
9936   return 0;
9937 }
9938 _ACEOF
9939 rm -f conftest.$ac_objext
9940 if { (eval echo "$as_me:9940: \"$ac_compile\"") >&5
9941   (eval $ac_compile) 2>&5
9942   ac_status=$?
9943   echo "$as_me:9943: \$? = $ac_status" >&5
9944   (exit $ac_status); } &&
9945          { ac_try='test -s conftest.$ac_objext'
9946   { (eval echo "$as_me:9946: \"$ac_try\"") >&5
9947   (eval $ac_try) 2>&5
9948   ac_status=$?
9949   echo "$as_me:9949: \$? = $ac_status" >&5
9950   (exit $ac_status); }; }; then
9951   :
9952 else
9953   echo "$as_me: failed program was:" >&5
9954 cat conftest.$ac_ext >&5
9955 cf_cv_posix_c_source=no
9956 fi
9957 rm -f conftest.$ac_objext conftest.$ac_ext
9958          CFLAGS="$cf_save_CFLAGS"
9959          CPPFLAGS="$cf_save_CPPFLAGS"
9960
9961 fi
9962 rm -f conftest.$ac_objext conftest.$ac_ext
9963
9964 fi
9965 echo "$as_me:9965: result: $cf_cv_posix_c_source" >&5
9966 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9967
9968 if test "$cf_cv_posix_c_source" != no ; then
9969         CFLAGS="$cf_trim_CFLAGS"
9970         CPPFLAGS="$cf_trim_CPPFLAGS"
9971
9972 cf_fix_cppflags=no
9973 cf_new_cflags=
9974 cf_new_cppflags=
9975 cf_new_extra_cppflags=
9976
9977 for cf_add_cflags in $cf_cv_posix_c_source
9978 do
9979 case $cf_fix_cppflags in
9980 (no)
9981         case $cf_add_cflags in
9982         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9983                 case $cf_add_cflags in
9984                 (-D*)
9985                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9986
9987                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9988                                 && test -z "${cf_tst_cflags}" \
9989                                 && cf_fix_cppflags=yes
9990
9991                         if test $cf_fix_cppflags = yes ; then
9992
9993         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9994         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9995
9996                                 continue
9997                         elif test "${cf_tst_cflags}" = "\"'" ; then
9998
9999         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10000         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10001
10002                                 continue
10003                         fi
10004                         ;;
10005                 esac
10006                 case "$CPPFLAGS" in
10007                 (*$cf_add_cflags)
10008                         ;;
10009                 (*)
10010                         case $cf_add_cflags in
10011                         (-D*)
10012                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10013
10014 CPPFLAGS=`echo "$CPPFLAGS" | \
10015         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10016                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10017
10018                                 ;;
10019                         esac
10020
10021         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10022         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10023
10024                         ;;
10025                 esac
10026                 ;;
10027         (*)
10028
10029         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10030         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10031
10032                 ;;
10033         esac
10034         ;;
10035 (yes)
10036
10037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039
10040         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10041
10042         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10043                 && test -z "${cf_tst_cflags}" \
10044                 && cf_fix_cppflags=no
10045         ;;
10046 esac
10047 done
10048
10049 if test -n "$cf_new_cflags" ; then
10050
10051         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10052         CFLAGS="${CFLAGS}$cf_new_cflags"
10053
10054 fi
10055
10056 if test -n "$cf_new_cppflags" ; then
10057
10058         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10059         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10060
10061 fi
10062
10063 if test -n "$cf_new_extra_cppflags" ; then
10064
10065         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10066         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10067
10068 fi
10069
10070 fi
10071
10072 fi # cf_cv_posix_visible
10073
10074         ;;
10075 (netbsd*)
10076         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10077         ;;
10078 (openbsd[4-9]*)
10079         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10080         cf_xopen_source="-D_BSD_SOURCE"
10081         cf_XOPEN_SOURCE=600
10082         ;;
10083 (openbsd*)
10084         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10085         ;;
10086 (osf[45]*)
10087         cf_xopen_source="-D_OSF_SOURCE"
10088         ;;
10089 (nto-qnx*)
10090         cf_xopen_source="-D_QNX_SOURCE"
10091         ;;
10092 (sco*)
10093         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10094         ;;
10095 (solaris2.*)
10096         cf_xopen_source="-D__EXTENSIONS__"
10097         cf_cv_xopen_source=broken
10098         ;;
10099 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10100         cf_XOPEN_SOURCE=
10101         cf_POSIX_C_SOURCE=
10102         ;;
10103 (*)
10104
10105 echo "$as_me:10105: checking if we should define _XOPEN_SOURCE" >&5
10106 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10107 if test "${cf_cv_xopen_source+set}" = set; then
10108   echo $ECHO_N "(cached) $ECHO_C" >&6
10109 else
10110
10111         cat >conftest.$ac_ext <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114
10115 #include <stdlib.h>
10116 #include <string.h>
10117 #include <sys/types.h>
10118
10119 int
10120 main (void)
10121 {
10122
10123 #ifndef _XOPEN_SOURCE
10124 make an error
10125 #endif
10126   ;
10127   return 0;
10128 }
10129 _ACEOF
10130 rm -f conftest.$ac_objext
10131 if { (eval echo "$as_me:10131: \"$ac_compile\"") >&5
10132   (eval $ac_compile) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); } &&
10136          { ac_try='test -s conftest.$ac_objext'
10137   { (eval echo "$as_me:10137: \"$ac_try\"") >&5
10138   (eval $ac_try) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit $ac_status); }; }; then
10142   cf_cv_xopen_source=no
10143 else
10144   echo "$as_me: failed program was:" >&5
10145 cat conftest.$ac_ext >&5
10146 cf_save="$CPPFLAGS"
10147
10148         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10149         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10150
10151          cat >conftest.$ac_ext <<_ACEOF
10152 #line 10152 "configure"
10153 #include "confdefs.h"
10154
10155 #include <stdlib.h>
10156 #include <string.h>
10157 #include <sys/types.h>
10158
10159 int
10160 main (void)
10161 {
10162
10163 #ifdef _XOPEN_SOURCE
10164 make an error
10165 #endif
10166   ;
10167   return 0;
10168 }
10169 _ACEOF
10170 rm -f conftest.$ac_objext
10171 if { (eval echo "$as_me:10171: \"$ac_compile\"") >&5
10172   (eval $ac_compile) 2>&5
10173   ac_status=$?
10174   echo "$as_me:10174: \$? = $ac_status" >&5
10175   (exit $ac_status); } &&
10176          { ac_try='test -s conftest.$ac_objext'
10177   { (eval echo "$as_me:10177: \"$ac_try\"") >&5
10178   (eval $ac_try) 2>&5
10179   ac_status=$?
10180   echo "$as_me:10180: \$? = $ac_status" >&5
10181   (exit $ac_status); }; }; then
10182   cf_cv_xopen_source=no
10183 else
10184   echo "$as_me: failed program was:" >&5
10185 cat conftest.$ac_ext >&5
10186 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10187 fi
10188 rm -f conftest.$ac_objext conftest.$ac_ext
10189         CPPFLAGS="$cf_save"
10190
10191 fi
10192 rm -f conftest.$ac_objext conftest.$ac_ext
10193
10194 fi
10195 echo "$as_me:10195: result: $cf_cv_xopen_source" >&5
10196 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10197
10198 if test "$cf_cv_xopen_source" != no ; then
10199
10200 CFLAGS=`echo "$CFLAGS" | \
10201         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10202                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10203
10204 CPPFLAGS=`echo "$CPPFLAGS" | \
10205         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10206                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10207
10208         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10209
10210 cf_fix_cppflags=no
10211 cf_new_cflags=
10212 cf_new_cppflags=
10213 cf_new_extra_cppflags=
10214
10215 for cf_add_cflags in $cf_temp_xopen_source
10216 do
10217 case $cf_fix_cppflags in
10218 (no)
10219         case $cf_add_cflags in
10220         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10221                 case $cf_add_cflags in
10222                 (-D*)
10223                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10224
10225                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10226                                 && test -z "${cf_tst_cflags}" \
10227                                 && cf_fix_cppflags=yes
10228
10229                         if test $cf_fix_cppflags = yes ; then
10230
10231         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10232         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10233
10234                                 continue
10235                         elif test "${cf_tst_cflags}" = "\"'" ; then
10236
10237         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10238         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10239
10240                                 continue
10241                         fi
10242                         ;;
10243                 esac
10244                 case "$CPPFLAGS" in
10245                 (*$cf_add_cflags)
10246                         ;;
10247                 (*)
10248                         case $cf_add_cflags in
10249                         (-D*)
10250                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10251
10252 CPPFLAGS=`echo "$CPPFLAGS" | \
10253         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10254                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10255
10256                                 ;;
10257                         esac
10258
10259         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10260         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10261
10262                         ;;
10263                 esac
10264                 ;;
10265         (*)
10266
10267         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10268         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10269
10270                 ;;
10271         esac
10272         ;;
10273 (yes)
10274
10275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10277
10278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10279
10280         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10281                 && test -z "${cf_tst_cflags}" \
10282                 && cf_fix_cppflags=no
10283         ;;
10284 esac
10285 done
10286
10287 if test -n "$cf_new_cflags" ; then
10288
10289         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10290         CFLAGS="${CFLAGS}$cf_new_cflags"
10291
10292 fi
10293
10294 if test -n "$cf_new_cppflags" ; then
10295
10296         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10297         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10298
10299 fi
10300
10301 if test -n "$cf_new_extra_cppflags" ; then
10302
10303         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10304         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10305
10306 fi
10307
10308 fi
10309
10310 if test "$cf_cv_posix_visible" = no; then
10311
10312 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10313
10314 cf_save_CFLAGS="$CFLAGS"
10315 cf_save_CPPFLAGS="$CPPFLAGS"
10316
10317 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10318         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10319                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10320
10321 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10322         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10323                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10324
10325 echo "$as_me:10325: checking if we should define _POSIX_C_SOURCE" >&5
10326 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10327 if test "${cf_cv_posix_c_source+set}" = set; then
10328   echo $ECHO_N "(cached) $ECHO_C" >&6
10329 else
10330
10331 echo "${as_me:-configure}:10331: testing if the symbol is already defined go no further ..." 1>&5
10332
10333         cat >conftest.$ac_ext <<_ACEOF
10334 #line 10334 "configure"
10335 #include "confdefs.h"
10336 #include <sys/types.h>
10337 int
10338 main (void)
10339 {
10340
10341 #ifndef _POSIX_C_SOURCE
10342 make an error
10343 #endif
10344   ;
10345   return 0;
10346 }
10347 _ACEOF
10348 rm -f conftest.$ac_objext
10349 if { (eval echo "$as_me:10349: \"$ac_compile\"") >&5
10350   (eval $ac_compile) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); } &&
10354          { ac_try='test -s conftest.$ac_objext'
10355   { (eval echo "$as_me:10355: \"$ac_try\"") >&5
10356   (eval $ac_try) 2>&5
10357   ac_status=$?
10358   echo "$as_me:10358: \$? = $ac_status" >&5
10359   (exit $ac_status); }; }; then
10360   cf_cv_posix_c_source=no
10361 else
10362   echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cf_want_posix_source=no
10365          case .$cf_POSIX_C_SOURCE in
10366          (.[12]??*)
10367                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10368                 ;;
10369          (.2)
10370                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10371                 cf_want_posix_source=yes
10372                 ;;
10373          (.*)
10374                 cf_want_posix_source=yes
10375                 ;;
10376          esac
10377          if test "$cf_want_posix_source" = yes ; then
10378                 cat >conftest.$ac_ext <<_ACEOF
10379 #line 10379 "configure"
10380 #include "confdefs.h"
10381 #include <sys/types.h>
10382 int
10383 main (void)
10384 {
10385
10386 #ifdef _POSIX_SOURCE
10387 make an error
10388 #endif
10389   ;
10390   return 0;
10391 }
10392 _ACEOF
10393 rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395   (eval $ac_compile) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); } &&
10399          { ac_try='test -s conftest.$ac_objext'
10400   { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401   (eval $ac_try) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); }; }; then
10405   :
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10409 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10410 fi
10411 rm -f conftest.$ac_objext conftest.$ac_ext
10412          fi
10413
10414 echo "${as_me:-configure}:10414: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10415
10416          CFLAGS="$cf_trim_CFLAGS"
10417          CPPFLAGS="$cf_trim_CPPFLAGS"
10418
10419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10420         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10421
10422 echo "${as_me:-configure}:10422: testing if the second compile does not leave our definition intact error ..." 1>&5
10423
10424          cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427 #include <sys/types.h>
10428 int
10429 main (void)
10430 {
10431
10432 #ifndef _POSIX_C_SOURCE
10433 make an error
10434 #endif
10435   ;
10436   return 0;
10437 }
10438 _ACEOF
10439 rm -f conftest.$ac_objext
10440 if { (eval echo "$as_me:10440: \"$ac_compile\"") >&5
10441   (eval $ac_compile) 2>&5
10442   ac_status=$?
10443   echo "$as_me:10443: \$? = $ac_status" >&5
10444   (exit $ac_status); } &&
10445          { ac_try='test -s conftest.$ac_objext'
10446   { (eval echo "$as_me:10446: \"$ac_try\"") >&5
10447   (eval $ac_try) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit $ac_status); }; }; then
10451   :
10452 else
10453   echo "$as_me: failed program was:" >&5
10454 cat conftest.$ac_ext >&5
10455 cf_cv_posix_c_source=no
10456 fi
10457 rm -f conftest.$ac_objext conftest.$ac_ext
10458          CFLAGS="$cf_save_CFLAGS"
10459          CPPFLAGS="$cf_save_CPPFLAGS"
10460
10461 fi
10462 rm -f conftest.$ac_objext conftest.$ac_ext
10463
10464 fi
10465 echo "$as_me:10465: result: $cf_cv_posix_c_source" >&5
10466 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10467
10468 if test "$cf_cv_posix_c_source" != no ; then
10469         CFLAGS="$cf_trim_CFLAGS"
10470         CPPFLAGS="$cf_trim_CPPFLAGS"
10471
10472 cf_fix_cppflags=no
10473 cf_new_cflags=
10474 cf_new_cppflags=
10475 cf_new_extra_cppflags=
10476
10477 for cf_add_cflags in $cf_cv_posix_c_source
10478 do
10479 case $cf_fix_cppflags in
10480 (no)
10481         case $cf_add_cflags in
10482         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10483                 case $cf_add_cflags in
10484                 (-D*)
10485                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10486
10487                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10488                                 && test -z "${cf_tst_cflags}" \
10489                                 && cf_fix_cppflags=yes
10490
10491                         if test $cf_fix_cppflags = yes ; then
10492
10493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10495
10496                                 continue
10497                         elif test "${cf_tst_cflags}" = "\"'" ; then
10498
10499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10501
10502                                 continue
10503                         fi
10504                         ;;
10505                 esac
10506                 case "$CPPFLAGS" in
10507                 (*$cf_add_cflags)
10508                         ;;
10509                 (*)
10510                         case $cf_add_cflags in
10511                         (-D*)
10512                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10513
10514 CPPFLAGS=`echo "$CPPFLAGS" | \
10515         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10516                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10517
10518                                 ;;
10519                         esac
10520
10521         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10522         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10523
10524                         ;;
10525                 esac
10526                 ;;
10527         (*)
10528
10529         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10530         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10531
10532                 ;;
10533         esac
10534         ;;
10535 (yes)
10536
10537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10539
10540         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10541
10542         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10543                 && test -z "${cf_tst_cflags}" \
10544                 && cf_fix_cppflags=no
10545         ;;
10546 esac
10547 done
10548
10549 if test -n "$cf_new_cflags" ; then
10550
10551         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10552         CFLAGS="${CFLAGS}$cf_new_cflags"
10553
10554 fi
10555
10556 if test -n "$cf_new_cppflags" ; then
10557
10558         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10559         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10560
10561 fi
10562
10563 if test -n "$cf_new_extra_cppflags" ; then
10564
10565         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10566         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10567
10568 fi
10569
10570 fi
10571
10572 fi # cf_cv_posix_visible
10573
10574         ;;
10575 esac
10576
10577 if test -n "$cf_xopen_source" ; then
10578
10579 cf_fix_cppflags=no
10580 cf_new_cflags=
10581 cf_new_cppflags=
10582 cf_new_extra_cppflags=
10583
10584 for cf_add_cflags in $cf_xopen_source
10585 do
10586 case $cf_fix_cppflags in
10587 (no)
10588         case $cf_add_cflags in
10589         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10590                 case $cf_add_cflags in
10591                 (-D*)
10592                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10593
10594                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10595                                 && test -z "${cf_tst_cflags}" \
10596                                 && cf_fix_cppflags=yes
10597
10598                         if test $cf_fix_cppflags = yes ; then
10599
10600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602
10603                                 continue
10604                         elif test "${cf_tst_cflags}" = "\"'" ; then
10605
10606         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10607         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10608
10609                                 continue
10610                         fi
10611                         ;;
10612                 esac
10613                 case "$CPPFLAGS" in
10614                 (*$cf_add_cflags)
10615                         ;;
10616                 (*)
10617                         case $cf_add_cflags in
10618                         (-D*)
10619                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10620
10621 CPPFLAGS=`echo "$CPPFLAGS" | \
10622         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10623                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10624
10625                                 ;;
10626                         esac
10627
10628         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10629         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10630
10631                         ;;
10632                 esac
10633                 ;;
10634         (*)
10635
10636         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10637         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10638
10639                 ;;
10640         esac
10641         ;;
10642 (yes)
10643
10644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10646
10647         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10648
10649         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10650                 && test -z "${cf_tst_cflags}" \
10651                 && cf_fix_cppflags=no
10652         ;;
10653 esac
10654 done
10655
10656 if test -n "$cf_new_cflags" ; then
10657         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10658
10659 echo "${as_me:-configure}:10659: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10660
10661         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10662         CFLAGS="${CFLAGS}$cf_new_cflags"
10663
10664 fi
10665
10666 if test -n "$cf_new_cppflags" ; then
10667         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10668
10669 echo "${as_me:-configure}:10669: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10670
10671         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10672         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10673
10674 fi
10675
10676 if test -n "$cf_new_extra_cppflags" ; then
10677         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10678
10679 echo "${as_me:-configure}:10679: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10680
10681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10683
10684 fi
10685
10686 fi
10687
10688 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10689         echo "$as_me:10689: checking if _XOPEN_SOURCE really is set" >&5
10690 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10691         cat >conftest.$ac_ext <<_ACEOF
10692 #line 10692 "configure"
10693 #include "confdefs.h"
10694 #include <stdlib.h>
10695 int
10696 main (void)
10697 {
10698
10699 #ifndef _XOPEN_SOURCE
10700 make an error
10701 #endif
10702   ;
10703   return 0;
10704 }
10705 _ACEOF
10706 rm -f conftest.$ac_objext
10707 if { (eval echo "$as_me:10707: \"$ac_compile\"") >&5
10708   (eval $ac_compile) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); } &&
10712          { ac_try='test -s conftest.$ac_objext'
10713   { (eval echo "$as_me:10713: \"$ac_try\"") >&5
10714   (eval $ac_try) 2>&5
10715   ac_status=$?
10716   echo "$as_me:10716: \$? = $ac_status" >&5
10717   (exit $ac_status); }; }; then
10718   cf_XOPEN_SOURCE_set=yes
10719 else
10720   echo "$as_me: failed program was:" >&5
10721 cat conftest.$ac_ext >&5
10722 cf_XOPEN_SOURCE_set=no
10723 fi
10724 rm -f conftest.$ac_objext conftest.$ac_ext
10725         echo "$as_me:10725: result: $cf_XOPEN_SOURCE_set" >&5
10726 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10727         if test $cf_XOPEN_SOURCE_set = yes
10728         then
10729                 cat >conftest.$ac_ext <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10732 #include <stdlib.h>
10733 int
10734 main (void)
10735 {
10736
10737 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10738 make an error
10739 #endif
10740   ;
10741   return 0;
10742 }
10743 _ACEOF
10744 rm -f conftest.$ac_objext
10745 if { (eval echo "$as_me:10745: \"$ac_compile\"") >&5
10746   (eval $ac_compile) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit $ac_status); } &&
10750          { ac_try='test -s conftest.$ac_objext'
10751   { (eval echo "$as_me:10751: \"$ac_try\"") >&5
10752   (eval $ac_try) 2>&5
10753   ac_status=$?
10754   echo "$as_me:10754: \$? = $ac_status" >&5
10755   (exit $ac_status); }; }; then
10756   cf_XOPEN_SOURCE_set_ok=yes
10757 else
10758   echo "$as_me: failed program was:" >&5
10759 cat conftest.$ac_ext >&5
10760 cf_XOPEN_SOURCE_set_ok=no
10761 fi
10762 rm -f conftest.$ac_objext conftest.$ac_ext
10763                 if test $cf_XOPEN_SOURCE_set_ok = no
10764                 then
10765                         { echo "$as_me:10765: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10766 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10767                 fi
10768         else
10769
10770 echo "$as_me:10770: checking if we should define _XOPEN_SOURCE" >&5
10771 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10772 if test "${cf_cv_xopen_source+set}" = set; then
10773   echo $ECHO_N "(cached) $ECHO_C" >&6
10774 else
10775
10776         cat >conftest.$ac_ext <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10779
10780 #include <stdlib.h>
10781 #include <string.h>
10782 #include <sys/types.h>
10783
10784 int
10785 main (void)
10786 {
10787
10788 #ifndef _XOPEN_SOURCE
10789 make an error
10790 #endif
10791   ;
10792   return 0;
10793 }
10794 _ACEOF
10795 rm -f conftest.$ac_objext
10796 if { (eval echo "$as_me:10796: \"$ac_compile\"") >&5
10797   (eval $ac_compile) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); } &&
10801          { ac_try='test -s conftest.$ac_objext'
10802   { (eval echo "$as_me:10802: \"$ac_try\"") >&5
10803   (eval $ac_try) 2>&5
10804   ac_status=$?
10805   echo "$as_me:10805: \$? = $ac_status" >&5
10806   (exit $ac_status); }; }; then
10807   cf_cv_xopen_source=no
10808 else
10809   echo "$as_me: failed program was:" >&5
10810 cat conftest.$ac_ext >&5
10811 cf_save="$CPPFLAGS"
10812
10813         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10814         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10815
10816          cat >conftest.$ac_ext <<_ACEOF
10817 #line 10817 "configure"
10818 #include "confdefs.h"
10819
10820 #include <stdlib.h>
10821 #include <string.h>
10822 #include <sys/types.h>
10823
10824 int
10825 main (void)
10826 {
10827
10828 #ifdef _XOPEN_SOURCE
10829 make an error
10830 #endif
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:10836: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit $ac_status); } &&
10841          { ac_try='test -s conftest.$ac_objext'
10842   { (eval echo "$as_me:10842: \"$ac_try\"") >&5
10843   (eval $ac_try) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit $ac_status); }; }; then
10847   cf_cv_xopen_source=no
10848 else
10849   echo "$as_me: failed program was:" >&5
10850 cat conftest.$ac_ext >&5
10851 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10852 fi
10853 rm -f conftest.$ac_objext conftest.$ac_ext
10854         CPPFLAGS="$cf_save"
10855
10856 fi
10857 rm -f conftest.$ac_objext conftest.$ac_ext
10858
10859 fi
10860 echo "$as_me:10860: result: $cf_cv_xopen_source" >&5
10861 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10862
10863 if test "$cf_cv_xopen_source" != no ; then
10864
10865 CFLAGS=`echo "$CFLAGS" | \
10866         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10867                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10868
10869 CPPFLAGS=`echo "$CPPFLAGS" | \
10870         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10871                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10872
10873         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10874
10875 cf_fix_cppflags=no
10876 cf_new_cflags=
10877 cf_new_cppflags=
10878 cf_new_extra_cppflags=
10879
10880 for cf_add_cflags in $cf_temp_xopen_source
10881 do
10882 case $cf_fix_cppflags in
10883 (no)
10884         case $cf_add_cflags in
10885         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10886                 case $cf_add_cflags in
10887                 (-D*)
10888                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10889
10890                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10891                                 && test -z "${cf_tst_cflags}" \
10892                                 && cf_fix_cppflags=yes
10893
10894                         if test $cf_fix_cppflags = yes ; then
10895
10896         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10897         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10898
10899                                 continue
10900                         elif test "${cf_tst_cflags}" = "\"'" ; then
10901
10902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10904
10905                                 continue
10906                         fi
10907                         ;;
10908                 esac
10909                 case "$CPPFLAGS" in
10910                 (*$cf_add_cflags)
10911                         ;;
10912                 (*)
10913                         case $cf_add_cflags in
10914                         (-D*)
10915                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10916
10917 CPPFLAGS=`echo "$CPPFLAGS" | \
10918         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10919                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10920
10921                                 ;;
10922                         esac
10923
10924         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10925         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10926
10927                         ;;
10928                 esac
10929                 ;;
10930         (*)
10931
10932         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10933         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10934
10935                 ;;
10936         esac
10937         ;;
10938 (yes)
10939
10940         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10941         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10942
10943         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10944
10945         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10946                 && test -z "${cf_tst_cflags}" \
10947                 && cf_fix_cppflags=no
10948         ;;
10949 esac
10950 done
10951
10952 if test -n "$cf_new_cflags" ; then
10953
10954         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10955         CFLAGS="${CFLAGS}$cf_new_cflags"
10956
10957 fi
10958
10959 if test -n "$cf_new_cppflags" ; then
10960
10961         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10962         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10963
10964 fi
10965
10966 if test -n "$cf_new_extra_cppflags" ; then
10967
10968         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10969         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10970
10971 fi
10972
10973 fi
10974
10975         fi
10976 fi
10977 fi # cf_cv_posix_visible
10978
10979 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10980
10981 # Work around breakage on OS X
10982
10983 echo "$as_me:10983: checking if SIGWINCH is defined" >&5
10984 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10985 if test "${cf_cv_define_sigwinch+set}" = set; then
10986   echo $ECHO_N "(cached) $ECHO_C" >&6
10987 else
10988
10989         cat >conftest.$ac_ext <<_ACEOF
10990 #line 10990 "configure"
10991 #include "confdefs.h"
10992
10993 #include <sys/types.h>
10994 #include <sys/signal.h>
10995
10996 int
10997 main (void)
10998 {
10999 int x = SIGWINCH
11000   ;
11001   return 0;
11002 }
11003 _ACEOF
11004 rm -f conftest.$ac_objext
11005 if { (eval echo "$as_me:11005: \"$ac_compile\"") >&5
11006   (eval $ac_compile) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); } &&
11010          { ac_try='test -s conftest.$ac_objext'
11011   { (eval echo "$as_me:11011: \"$ac_try\"") >&5
11012   (eval $ac_try) 2>&5
11013   ac_status=$?
11014   echo "$as_me:11014: \$? = $ac_status" >&5
11015   (exit $ac_status); }; }; then
11016   cf_cv_define_sigwinch=yes
11017 else
11018   echo "$as_me: failed program was:" >&5
11019 cat conftest.$ac_ext >&5
11020 cat >conftest.$ac_ext <<_ACEOF
11021 #line 11021 "configure"
11022 #include "confdefs.h"
11023
11024 #undef _XOPEN_SOURCE
11025 #undef _POSIX_SOURCE
11026 #undef _POSIX_C_SOURCE
11027 #include <sys/types.h>
11028 #include <sys/signal.h>
11029
11030 int
11031 main (void)
11032 {
11033 int x = SIGWINCH
11034   ;
11035   return 0;
11036 }
11037 _ACEOF
11038 rm -f conftest.$ac_objext
11039 if { (eval echo "$as_me:11039: \"$ac_compile\"") >&5
11040   (eval $ac_compile) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); } &&
11044          { ac_try='test -s conftest.$ac_objext'
11045   { (eval echo "$as_me:11045: \"$ac_try\"") >&5
11046   (eval $ac_try) 2>&5
11047   ac_status=$?
11048   echo "$as_me:11048: \$? = $ac_status" >&5
11049   (exit $ac_status); }; }; then
11050   cf_cv_define_sigwinch=maybe
11051 else
11052   echo "$as_me: failed program was:" >&5
11053 cat conftest.$ac_ext >&5
11054 cf_cv_define_sigwinch=no
11055 fi
11056 rm -f conftest.$ac_objext conftest.$ac_ext
11057
11058 fi
11059 rm -f conftest.$ac_objext conftest.$ac_ext
11060
11061 fi
11062 echo "$as_me:11062: result: $cf_cv_define_sigwinch" >&5
11063 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11064
11065 if test "$cf_cv_define_sigwinch" = maybe ; then
11066 echo "$as_me:11066: checking for actual SIGWINCH definition" >&5
11067 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11068 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11069   echo $ECHO_N "(cached) $ECHO_C" >&6
11070 else
11071
11072 cf_cv_fixup_sigwinch=unknown
11073 cf_sigwinch=32
11074 while test $cf_sigwinch != 1
11075 do
11076         cat >conftest.$ac_ext <<_ACEOF
11077 #line 11077 "configure"
11078 #include "confdefs.h"
11079
11080 #undef _XOPEN_SOURCE
11081 #undef _POSIX_SOURCE
11082 #undef _POSIX_C_SOURCE
11083 #include <sys/types.h>
11084 #include <sys/signal.h>
11085
11086 int
11087 main (void)
11088 {
11089
11090 #if SIGWINCH != $cf_sigwinch
11091 make an error
11092 #endif
11093 int x = SIGWINCH
11094   ;
11095   return 0;
11096 }
11097 _ACEOF
11098 rm -f conftest.$ac_objext
11099 if { (eval echo "$as_me:11099: \"$ac_compile\"") >&5
11100   (eval $ac_compile) 2>&5
11101   ac_status=$?
11102   echo "$as_me:11102: \$? = $ac_status" >&5
11103   (exit $ac_status); } &&
11104          { ac_try='test -s conftest.$ac_objext'
11105   { (eval echo "$as_me:11105: \"$ac_try\"") >&5
11106   (eval $ac_try) 2>&5
11107   ac_status=$?
11108   echo "$as_me:11108: \$? = $ac_status" >&5
11109   (exit $ac_status); }; }; then
11110   cf_cv_fixup_sigwinch=$cf_sigwinch
11111          break
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 cat conftest.$ac_ext >&5
11115 fi
11116 rm -f conftest.$ac_objext conftest.$ac_ext
11117
11118 cf_sigwinch=`expr $cf_sigwinch - 1`
11119 done
11120
11121 fi
11122 echo "$as_me:11122: result: $cf_cv_fixup_sigwinch" >&5
11123 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11124
11125         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11126                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11127         fi
11128 fi
11129
11130 # Checks for CODESET support.
11131
11132 echo "$as_me:11132: checking for nl_langinfo and CODESET" >&5
11133 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11134 if test "${am_cv_langinfo_codeset+set}" = set; then
11135   echo $ECHO_N "(cached) $ECHO_C" >&6
11136 else
11137   cat >conftest.$ac_ext <<_ACEOF
11138 #line 11138 "configure"
11139 #include "confdefs.h"
11140 #include <langinfo.h>
11141 int
11142 main (void)
11143 {
11144 char* cs = nl_langinfo(CODESET);
11145   ;
11146   return 0;
11147 }
11148 _ACEOF
11149 rm -f conftest.$ac_objext conftest$ac_exeext
11150 if { (eval echo "$as_me:11150: \"$ac_link\"") >&5
11151   (eval $ac_link) 2>&5
11152   ac_status=$?
11153   echo "$as_me:11153: \$? = $ac_status" >&5
11154   (exit $ac_status); } &&
11155          { ac_try='test -s conftest$ac_exeext'
11156   { (eval echo "$as_me:11156: \"$ac_try\"") >&5
11157   (eval $ac_try) 2>&5
11158   ac_status=$?
11159   echo "$as_me:11159: \$? = $ac_status" >&5
11160   (exit $ac_status); }; }; then
11161   am_cv_langinfo_codeset=yes
11162 else
11163   echo "$as_me: failed program was:" >&5
11164 cat conftest.$ac_ext >&5
11165 am_cv_langinfo_codeset=no
11166 fi
11167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11168
11169 fi
11170 echo "$as_me:11170: result: $am_cv_langinfo_codeset" >&5
11171 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11172         if test $am_cv_langinfo_codeset = yes; then
11173
11174 cat >>confdefs.h <<\EOF
11175 #define HAVE_LANGINFO_CODESET 1
11176 EOF
11177
11178         fi
11179
11180 # use these variables to work around a defect in gcc's fixincludes.
11181 NCURSES_OK_WCHAR_T=
11182 NCURSES_OK_WINT_T=
11183
11184 echo "$as_me:11184: checking if you want wide-character code" >&5
11185 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11186
11187 # Check whether --enable-widec or --disable-widec was given.
11188 if test "${enable_widec+set}" = set; then
11189   enableval="$enable_widec"
11190   with_widec=$enableval
11191 else
11192   with_widec=no
11193 fi;
11194 echo "$as_me:11194: result: $with_widec" >&5
11195 echo "${ECHO_T}$with_widec" >&6
11196
11197 NCURSES_WCWIDTH_GRAPHICS=1
11198
11199 if test "x$with_widec" = xyes ; then
11200         if test "x$disable_lib_suffixes" = xno ; then
11201                 LIB_SUFFIX="w${LIB_SUFFIX}"
11202         fi
11203
11204 cat >>confdefs.h <<\EOF
11205 #define USE_WIDEC_SUPPORT 1
11206 EOF
11207
11208 cat >>confdefs.h <<\EOF
11209 #define NCURSES_WIDECHAR 1
11210 EOF
11211
11212 for ac_header in \
11213 wchar.h \
11214 wctype.h \
11215
11216 do
11217 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11218 echo "$as_me:11218: checking for $ac_header" >&5
11219 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11220 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11221   echo $ECHO_N "(cached) $ECHO_C" >&6
11222 else
11223   cat >conftest.$ac_ext <<_ACEOF
11224 #line 11224 "configure"
11225 #include "confdefs.h"
11226 #include <$ac_header>
11227 _ACEOF
11228 if { (eval echo "$as_me:11228: \"$ac_cpp conftest.$ac_ext\"") >&5
11229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11230   ac_status=$?
11231   egrep -v '^ *\+' conftest.er1 >conftest.err
11232   rm -f conftest.er1
11233   cat conftest.err >&5
11234   echo "$as_me:11234: \$? = $ac_status" >&5
11235   (exit $ac_status); } >/dev/null; then
11236   if test -s conftest.err; then
11237     ac_cpp_err=$ac_c_preproc_warn_flag
11238   else
11239     ac_cpp_err=
11240   fi
11241 else
11242   ac_cpp_err=yes
11243 fi
11244 if test -z "$ac_cpp_err"; then
11245   eval "$as_ac_Header=yes"
11246 else
11247   echo "$as_me: failed program was:" >&5
11248   cat conftest.$ac_ext >&5
11249   eval "$as_ac_Header=no"
11250 fi
11251 rm -f conftest.err conftest.$ac_ext
11252 fi
11253 echo "$as_me:11253: result: `eval echo '${'$as_ac_Header'}'`" >&5
11254 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11255 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11256   cat >>confdefs.h <<EOF
11257 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11258 EOF
11259
11260 fi
11261 done
11262
11263 echo "$as_me:11263: checking if wchar.h can be used as is" >&5
11264 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11265 if test "${cf_cv_wchar_h_okay+set}" = set; then
11266   echo $ECHO_N "(cached) $ECHO_C" >&6
11267 else
11268
11269 cat >conftest.$ac_ext <<_ACEOF
11270 #line 11270 "configure"
11271 #include "confdefs.h"
11272
11273 #include <stdlib.h>
11274 #ifdef HAVE_WCHAR_H
11275 #include <wchar.h>
11276 #endif
11277 #ifdef HAVE_WCTYPE_H
11278 #include <wctype.h>
11279 #endif
11280
11281 int
11282 main (void)
11283 {
11284
11285         wint_t foo = 0;
11286         int bar = iswpunct(foo)
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f conftest.$ac_objext
11292 if { (eval echo "$as_me:11292: \"$ac_compile\"") >&5
11293   (eval $ac_compile) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); } &&
11297          { ac_try='test -s conftest.$ac_objext'
11298   { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299   (eval $ac_try) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit $ac_status); }; }; then
11303   cf_cv_wchar_h_okay=yes
11304 else
11305   echo "$as_me: failed program was:" >&5
11306 cat conftest.$ac_ext >&5
11307 cf_cv_wchar_h_okay=no
11308 fi
11309 rm -f conftest.$ac_objext conftest.$ac_ext
11310 fi
11311 echo "$as_me:11311: result: $cf_cv_wchar_h_okay" >&5
11312 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11313
11314 if test $cf_cv_wchar_h_okay = no
11315 then
11316
11317 echo "$as_me:11317: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11318 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11319 cat >conftest.$ac_ext <<_ACEOF
11320 #line 11320 "configure"
11321 #include "confdefs.h"
11322 #include <sys/types.h>
11323
11324 int
11325 main (void)
11326 {
11327
11328 #ifndef _XOPEN_SOURCE_EXTENDED
11329 make an error
11330 #endif
11331   ;
11332   return 0;
11333 }
11334 _ACEOF
11335 rm -f conftest.$ac_objext
11336 if { (eval echo "$as_me:11336: \"$ac_compile\"") >&5
11337   (eval $ac_compile) 2>&5
11338   ac_status=$?
11339   echo "$as_me:11339: \$? = $ac_status" >&5
11340   (exit $ac_status); } &&
11341          { ac_try='test -s conftest.$ac_objext'
11342   { (eval echo "$as_me:11342: \"$ac_try\"") >&5
11343   (eval $ac_try) 2>&5
11344   ac_status=$?
11345   echo "$as_me:11345: \$? = $ac_status" >&5
11346   (exit $ac_status); }; }; then
11347   cf_result=no
11348 else
11349   echo "$as_me: failed program was:" >&5
11350 cat conftest.$ac_ext >&5
11351 cf_result=yes
11352 fi
11353 rm -f conftest.$ac_objext conftest.$ac_ext
11354 echo "$as_me:11354: result: $cf_result" >&5
11355 echo "${ECHO_T}$cf_result" >&6
11356
11357 if test "$cf_result" = yes ; then
11358         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11359 elif test "x" != "x" ; then
11360         echo "$as_me:11360: checking checking for compatible value versus " >&5
11361 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11362         cat >conftest.$ac_ext <<_ACEOF
11363 #line 11363 "configure"
11364 #include "confdefs.h"
11365 #include <sys/types.h>
11366
11367 int
11368 main (void)
11369 {
11370
11371 #if _XOPEN_SOURCE_EXTENDED- < 0
11372 make an error
11373 #endif
11374   ;
11375   return 0;
11376 }
11377 _ACEOF
11378 rm -f conftest.$ac_objext
11379 if { (eval echo "$as_me:11379: \"$ac_compile\"") >&5
11380   (eval $ac_compile) 2>&5
11381   ac_status=$?
11382   echo "$as_me:11382: \$? = $ac_status" >&5
11383   (exit $ac_status); } &&
11384          { ac_try='test -s conftest.$ac_objext'
11385   { (eval echo "$as_me:11385: \"$ac_try\"") >&5
11386   (eval $ac_try) 2>&5
11387   ac_status=$?
11388   echo "$as_me:11388: \$? = $ac_status" >&5
11389   (exit $ac_status); }; }; then
11390   cf_result=yes
11391 else
11392   echo "$as_me: failed program was:" >&5
11393 cat conftest.$ac_ext >&5
11394 cf_result=no
11395 fi
11396 rm -f conftest.$ac_objext conftest.$ac_ext
11397         echo "$as_me:11397: result: $cf_result" >&5
11398 echo "${ECHO_T}$cf_result" >&6
11399         if test "$cf_result" = no ; then
11400                 # perhaps we can override it - try...
11401                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11402         fi
11403 fi
11404
11405 fi
11406
11407 echo "$as_me:11407: checking if wcwidth agrees graphics are single-width" >&5
11408 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11409 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11410   echo $ECHO_N "(cached) $ECHO_C" >&6
11411 else
11412
11413 cat >conftest.in <<CF_EOF
11414 -       VT100 symbols
11415 0x250c  upper left corner
11416 0x2514  lower left corner
11417 0x2510  upper right corner
11418 0x2518  lower right corner
11419 0x251c  tee pointing left
11420 0x2524  tee pointing right
11421 0x2534  tee pointing up
11422 0x252c  tee pointing down
11423 0x2500  horizontal line
11424 0x2502  vertical line
11425 0x253c  large plus or crossover
11426 0x23ba  scan line 1
11427 0x23bd  scan line 9
11428 0x25c6  diamond
11429 0x2592  checker board (stipple)
11430 0x00b0  degree symbol
11431 0x00b1  plus/minus
11432 0x00b7  bullet
11433 -       Teletype 5410v1 symbols
11434 0x2190  arrow pointing left
11435 0x2192  arrow pointing right
11436 0x2193  arrow pointing down
11437 0x2191  arrow pointing up
11438 0x2592  board of squares
11439 0x2603  lantern symbol
11440 0x25ae  solid square block
11441 -       these defaults were invented for ncurses
11442 0x23bb  scan line 3
11443 0x23bc  scan line 7
11444 0x2264  less-than-or-equal-to
11445 0x2265  greater-than-or-equal-to
11446 0x03c0  greek pi
11447 0x2260  not-equal
11448 0x00a3  pound-sterling symbol
11449 -       thick-line-drawing
11450 0x250f  upper left corner
11451 0x2517  lower left corner
11452 0x2513  upper right corner
11453 0x251b  lower right corner
11454 0x2523  tee pointing left
11455 0x252b  tee pointing right
11456 0x253b  tee pointing up
11457 0x2533  tee pointing down
11458 0x2501  horizontal line
11459 0x2503  vertical line
11460 0x254b  large plus or crossover
11461 -       double-line-drawing
11462 0x2554  upper left corner
11463 0x255a  lower left corner
11464 0x2557  upper right corner
11465 0x255d  lower right corner
11466 0x2563  tee pointing left
11467 0x2560  tee pointing right
11468 0x2569  tee pointing up
11469 0x2566  tee pointing down
11470 0x2550  horizontal line
11471 0x2551  vertical line
11472 0x256c  large plus or crossover
11473 CF_EOF
11474 if test "$cross_compiling" = yes; then
11475   cf_cv_wcwidth_graphics=unknown
11476 else
11477   cat >conftest.$ac_ext <<_ACEOF
11478 #line 11478 "configure"
11479 #include "confdefs.h"
11480
11481 #include <locale.h>
11482 #include <stdio.h>
11483 #include <wchar.h>
11484
11485 #define MY_LEN 80
11486
11487 int
11488 main(void)
11489 {
11490         FILE *fp;
11491         int value;
11492         char buffer[MY_LEN + 1];
11493         char notes[MY_LEN + 1];
11494         int totals = 0;
11495         int passed = 0;
11496
11497         if (setlocale(LC_ALL, "en_US.UTF8") ||
11498                 setlocale(LC_ALL, "en_US.UTF-8") ||
11499                 setlocale(LC_ALL, "en_US.utf8") ||
11500                 setlocale(LC_ALL, "en_US.utf-8")) {
11501                 if ((fp = fopen("conftest.in", "r")) != 0) {
11502                         while (fgets(buffer, MY_LEN, fp) != 0) {
11503                                 if (*buffer == '-') {
11504                                         fprintf(stderr, "\t%s", buffer);
11505                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11506                                         ++totals;
11507                                         if (wcwidth(value) == 1)
11508                                                 ++passed;
11509                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11510                                 } else {
11511                                         fprintf(stderr, "?\t%s", buffer);
11512                                 }
11513                         }
11514                 }
11515         }
11516         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11517         return (totals == passed) ? 0 : 1;
11518 }
11519
11520 _ACEOF
11521 rm -f conftest$ac_exeext
11522 if { (eval echo "$as_me:11522: \"$ac_link\"") >&5
11523   (eval $ac_link) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11527   { (eval echo "$as_me:11527: \"$ac_try\"") >&5
11528   (eval $ac_try) 2>&5
11529   ac_status=$?
11530   echo "$as_me:11530: \$? = $ac_status" >&5
11531   (exit $ac_status); }; }; then
11532   cf_cv_wcwidth_graphics=yes
11533 else
11534   echo "$as_me: program exited with status $ac_status" >&5
11535 echo "$as_me: failed program was:" >&5
11536 cat conftest.$ac_ext >&5
11537 cf_cv_wcwidth_graphics=no
11538 fi
11539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11540 fi
11541
11542 fi
11543 echo "$as_me:11543: result: $cf_cv_wcwidth_graphics" >&5
11544 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11545
11546         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11547
11548         # with_overwrite=no
11549         NCURSES_CH_T=cchar_t
11550
11551 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11552 do
11553 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11554 echo "$as_me:11554: checking for $ac_func" >&5
11555 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11556 if eval "test \"\${$as_ac_var+set}\" = set"; then
11557   echo $ECHO_N "(cached) $ECHO_C" >&6
11558 else
11559   cat >conftest.$ac_ext <<_ACEOF
11560 #line 11560 "configure"
11561 #include "confdefs.h"
11562 #define $ac_func autoconf_temporary
11563 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11564 #undef $ac_func
11565
11566 #ifdef __cplusplus
11567 extern "C"
11568 #endif
11569
11570 /* We use char because int might match the return type of a gcc2
11571    builtin and then its argument prototype would still apply.  */
11572 char $ac_func (void);
11573
11574 int
11575 main (void)
11576 {
11577
11578 /* The GNU C library defines stubs for functions which it implements
11579     to always fail with ENOSYS.  Some functions are actually named
11580     something starting with __ and the normal name is an alias.  */
11581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11582 #error found stub for $ac_func
11583 #endif
11584
11585         return $ac_func ();
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 rm -f conftest.$ac_objext conftest$ac_exeext
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592   (eval $ac_link) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); } &&
11596          { ac_try='test -s conftest$ac_exeext'
11597   { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598   (eval $ac_try) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); }; }; then
11602   eval "$as_ac_var=yes"
11603 else
11604   echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 eval "$as_ac_var=no"
11607 fi
11608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11609 fi
11610 echo "$as_me:11610: result: `eval echo '${'$as_ac_var'}'`" >&5
11611 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11612 if test `eval echo '${'$as_ac_var'}'` = yes; then
11613   cat >>confdefs.h <<EOF
11614 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11615 EOF
11616
11617 fi
11618 done
11619
11620         if test "x$ac_cv_func_putwc" != xyes ; then
11621
11622 echo "$as_me:11622: checking for multibyte character support" >&5
11623 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11624 if test "${cf_cv_utf8_lib+set}" = set; then
11625   echo $ECHO_N "(cached) $ECHO_C" >&6
11626 else
11627
11628         cf_save_LIBS="$LIBS"
11629         cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632
11633 #include <stdlib.h>
11634 int
11635 main (void)
11636 {
11637 putwc(0,0);
11638   ;
11639   return 0;
11640 }
11641 _ACEOF
11642 rm -f conftest.$ac_objext conftest$ac_exeext
11643 if { (eval echo "$as_me:11643: \"$ac_link\"") >&5
11644   (eval $ac_link) 2>&5
11645   ac_status=$?
11646   echo "$as_me:11646: \$? = $ac_status" >&5
11647   (exit $ac_status); } &&
11648          { ac_try='test -s conftest$ac_exeext'
11649   { (eval echo "$as_me:11649: \"$ac_try\"") >&5
11650   (eval $ac_try) 2>&5
11651   ac_status=$?
11652   echo "$as_me:11652: \$? = $ac_status" >&5
11653   (exit $ac_status); }; }; then
11654   cf_cv_utf8_lib=yes
11655 else
11656   echo "$as_me: failed program was:" >&5
11657 cat conftest.$ac_ext >&5
11658
11659 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11660 # will be set on completion of the AC_TRY_LINK below.
11661 cf_cv_header_path_utf8=
11662 cf_cv_library_path_utf8=
11663
11664 echo "${as_me:-configure}:11664: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11665
11666 cf_save_LIBS="$LIBS"
11667
11668 cat >conftest.$ac_ext <<_ACEOF
11669 #line 11669 "configure"
11670 #include "confdefs.h"
11671
11672 #include <libutf8.h>
11673 int
11674 main (void)
11675 {
11676 putwc(0,0);
11677   ;
11678   return 0;
11679 }
11680 _ACEOF
11681 rm -f conftest.$ac_objext conftest$ac_exeext
11682 if { (eval echo "$as_me:11682: \"$ac_link\"") >&5
11683   (eval $ac_link) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); } &&
11687          { ac_try='test -s conftest$ac_exeext'
11688   { (eval echo "$as_me:11688: \"$ac_try\"") >&5
11689   (eval $ac_try) 2>&5
11690   ac_status=$?
11691   echo "$as_me:11691: \$? = $ac_status" >&5
11692   (exit $ac_status); }; }; then
11693
11694         cf_cv_find_linkage_utf8=yes
11695         cf_cv_header_path_utf8=/usr/include
11696         cf_cv_library_path_utf8=/usr/lib
11697
11698 else
11699   echo "$as_me: failed program was:" >&5
11700 cat conftest.$ac_ext >&5
11701
11702 LIBS="-lutf8  $cf_save_LIBS"
11703
11704 cat >conftest.$ac_ext <<_ACEOF
11705 #line 11705 "configure"
11706 #include "confdefs.h"
11707
11708 #include <libutf8.h>
11709 int
11710 main (void)
11711 {
11712 putwc(0,0);
11713   ;
11714   return 0;
11715 }
11716 _ACEOF
11717 rm -f conftest.$ac_objext conftest$ac_exeext
11718 if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
11719   (eval $ac_link) 2>&5
11720   ac_status=$?
11721   echo "$as_me:11721: \$? = $ac_status" >&5
11722   (exit $ac_status); } &&
11723          { ac_try='test -s conftest$ac_exeext'
11724   { (eval echo "$as_me:11724: \"$ac_try\"") >&5
11725   (eval $ac_try) 2>&5
11726   ac_status=$?
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); }; }; then
11729
11730         cf_cv_find_linkage_utf8=yes
11731         cf_cv_header_path_utf8=/usr/include
11732         cf_cv_library_path_utf8=/usr/lib
11733         cf_cv_library_file_utf8="-lutf8"
11734
11735 else
11736   echo "$as_me: failed program was:" >&5
11737 cat conftest.$ac_ext >&5
11738
11739         cf_cv_find_linkage_utf8=no
11740         LIBS="$cf_save_LIBS"
11741
11742         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11743
11744 echo "${as_me:-configure}:11744: testing find linkage for utf8 library ..." 1>&5
11745
11746 echo "${as_me:-configure}:11746: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11747
11748         cf_save_CPPFLAGS="$CPPFLAGS"
11749         cf_test_CPPFLAGS="$CPPFLAGS"
11750
11751 cf_search=
11752
11753 # collect the current set of include-directories from compiler flags
11754 cf_header_path_list=""
11755 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11756         for cf_header_path in $CPPFLAGS $CFLAGS
11757         do
11758                 case $cf_header_path in
11759                 (-I*)
11760                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11761
11762 test "x$cf_header_path" != "xNONE" && \
11763 test -d "$cf_header_path" && \
11764  {
11765         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11766         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11767         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11768         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11769         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11770         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11771 }
11772
11773                         cf_header_path_list="$cf_header_path_list $cf_search"
11774                         ;;
11775                 esac
11776         done
11777 fi
11778
11779 # add the variations for the package we are looking for
11780
11781 cf_search=
11782
11783 test "x$prefix" != "xNONE" && \
11784 test -d "$prefix" && \
11785  {
11786         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11787         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11788         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11789         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11790         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11791         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11792 }
11793
11794 for cf_subdir_prefix in \
11795         /usr \
11796         /usr/local \
11797         /usr/pkg \
11798         /opt \
11799         /opt/local \
11800         $HOME
11801 do
11802
11803 test "x$cf_subdir_prefix" != "x$prefix" && \
11804 test -d "$cf_subdir_prefix" && \
11805 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11806         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11807         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11808         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11809         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11810         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11811         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11812 }
11813
11814 done
11815
11816 test "$includedir" != NONE && \
11817 test "$includedir" != "/usr/include" && \
11818 test -d "$includedir" && {
11819         test -d $includedir &&    cf_search="$cf_search $includedir"
11820         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11821 }
11822
11823 test "$oldincludedir" != NONE && \
11824 test "$oldincludedir" != "/usr/include" && \
11825 test -d "$oldincludedir" && {
11826         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11827         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11828 }
11829
11830 cf_search="$cf_search $cf_header_path_list"
11831
11832         for cf_cv_header_path_utf8 in $cf_search
11833         do
11834                 if test -d $cf_cv_header_path_utf8 ; then
11835                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11836
11837 echo "${as_me:-configure}:11837: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11838
11839                         CPPFLAGS="$cf_save_CPPFLAGS"
11840
11841         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11842         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11843
11844                         cat >conftest.$ac_ext <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11847
11848 #include <libutf8.h>
11849 int
11850 main (void)
11851 {
11852 putwc(0,0);
11853   ;
11854   return 0;
11855 }
11856 _ACEOF
11857 rm -f conftest.$ac_objext
11858 if { (eval echo "$as_me:11858: \"$ac_compile\"") >&5
11859   (eval $ac_compile) 2>&5
11860   ac_status=$?
11861   echo "$as_me:11861: \$? = $ac_status" >&5
11862   (exit $ac_status); } &&
11863          { ac_try='test -s conftest.$ac_objext'
11864   { (eval echo "$as_me:11864: \"$ac_try\"") >&5
11865   (eval $ac_try) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); }; }; then
11869
11870                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11871
11872 echo "${as_me:-configure}:11872: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11873
11874                                 cf_cv_find_linkage_utf8=maybe
11875                                 cf_test_CPPFLAGS="$CPPFLAGS"
11876                                 break
11877 else
11878   echo "$as_me: failed program was:" >&5
11879 cat conftest.$ac_ext >&5
11880
11881                                 CPPFLAGS="$cf_save_CPPFLAGS"
11882
11883 fi
11884 rm -f conftest.$ac_objext conftest.$ac_ext
11885                 fi
11886         done
11887
11888         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11889
11890 echo "${as_me:-configure}:11890: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11891
11892                 cf_save_LIBS="$LIBS"
11893                 cf_save_LDFLAGS="$LDFLAGS"
11894
11895                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11896
11897 cf_search=
11898 cf_library_path_list=""
11899 if test -n "${LDFLAGS}${LIBS}" ; then
11900         for cf_library_path in $LDFLAGS $LIBS
11901         do
11902                 case $cf_library_path in
11903                 (-L*)
11904                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11905
11906 test "x$cf_library_path" != "xNONE" && \
11907 test -d "$cf_library_path" && \
11908  {
11909         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11910         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11911         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11912         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11913         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11914         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11915 }
11916
11917                         cf_library_path_list="$cf_library_path_list $cf_search"
11918                         ;;
11919                 esac
11920         done
11921 fi
11922
11923 cf_search=
11924
11925 test "x$prefix" != "xNONE" && \
11926 test -d "$prefix" && \
11927  {
11928         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11929         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11930         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11931         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11932         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11933         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11934 }
11935
11936 for cf_subdir_prefix in \
11937         /usr \
11938         /usr/local \
11939         /usr/pkg \
11940         /opt \
11941         /opt/local \
11942         $HOME
11943 do
11944
11945 test "x$cf_subdir_prefix" != "x$prefix" && \
11946 test -d "$cf_subdir_prefix" && \
11947 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11948         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11949         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11950         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11951         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11952         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11953         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11954 }
11955
11956 done
11957
11958 cf_search="$cf_library_path_list $cf_search"
11959
11960                         for cf_cv_library_path_utf8 in $cf_search
11961                         do
11962                                 if test -d $cf_cv_library_path_utf8 ; then
11963                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11964
11965 echo "${as_me:-configure}:11965: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11966
11967                                         CPPFLAGS="$cf_test_CPPFLAGS"
11968                                         LIBS="-lutf8  $cf_save_LIBS"
11969                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11970                                         cat >conftest.$ac_ext <<_ACEOF
11971 #line 11971 "configure"
11972 #include "confdefs.h"
11973
11974 #include <libutf8.h>
11975 int
11976 main (void)
11977 {
11978 putwc(0,0);
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext conftest$ac_exeext
11984 if { (eval echo "$as_me:11984: \"$ac_link\"") >&5
11985   (eval $ac_link) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -s conftest$ac_exeext'
11990   { (eval echo "$as_me:11990: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); }; }; then
11995
11996                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11997
11998 echo "${as_me:-configure}:11998: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11999
12000                                         cf_cv_find_linkage_utf8=yes
12001                                         cf_cv_library_file_utf8="-lutf8"
12002                                         break
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 cat conftest.$ac_ext >&5
12006
12007                                         CPPFLAGS="$cf_save_CPPFLAGS"
12008                                         LIBS="$cf_save_LIBS"
12009                                         LDFLAGS="$cf_save_LDFLAGS"
12010
12011 fi
12012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12013                                 fi
12014                         done
12015                         CPPFLAGS="$cf_save_CPPFLAGS"
12016                         LDFLAGS="$cf_save_LDFLAGS"
12017                 fi
12018
12019         else
12020                 cf_cv_find_linkage_utf8=no
12021         fi
12022
12023 fi
12024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12025
12026 fi
12027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12028
12029 LIBS="$cf_save_LIBS"
12030
12031 if test "$cf_cv_find_linkage_utf8" = yes ; then
12032 cf_cv_utf8_lib=add-on
12033 else
12034 cf_cv_utf8_lib=no
12035 fi
12036
12037 fi
12038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12039 fi
12040 echo "$as_me:12040: result: $cf_cv_utf8_lib" >&5
12041 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12042
12043 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12044 # ncurses/ncursesw:
12045 if test "$cf_cv_utf8_lib" = "add-on" ; then
12046
12047 cat >>confdefs.h <<\EOF
12048 #define HAVE_LIBUTF8_H 1
12049 EOF
12050
12051 if test -n "$cf_cv_header_path_utf8" ; then
12052   for cf_add_incdir in $cf_cv_header_path_utf8
12053   do
12054         while test $cf_add_incdir != /usr/include
12055         do
12056           if test -d $cf_add_incdir
12057           then
12058                 cf_have_incdir=no
12059                 if test -n "$CFLAGS$CPPFLAGS" ; then
12060                   # a loop is needed to ensure we can add subdirs of existing dirs
12061                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12062                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12063                           cf_have_incdir=yes; break
12064                         fi
12065                   done
12066                 fi
12067
12068                 if test "$cf_have_incdir" = no ; then
12069                   if test "$cf_add_incdir" = /usr/local/include ; then
12070                         if test "$GCC" = yes
12071                         then
12072                           cf_save_CPPFLAGS=$CPPFLAGS
12073
12074         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12075         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12076
12077                           cat >conftest.$ac_ext <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 #include <stdio.h>
12081 int
12082 main (void)
12083 {
12084 printf("Hello")
12085   ;
12086   return 0;
12087 }
12088 _ACEOF
12089 rm -f conftest.$ac_objext
12090 if { (eval echo "$as_me:12090: \"$ac_compile\"") >&5
12091   (eval $ac_compile) 2>&5
12092   ac_status=$?
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit $ac_status); } &&
12095          { ac_try='test -s conftest.$ac_objext'
12096   { (eval echo "$as_me:12096: \"$ac_try\"") >&5
12097   (eval $ac_try) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit $ac_status); }; }; then
12101   :
12102 else
12103   echo "$as_me: failed program was:" >&5
12104 cat conftest.$ac_ext >&5
12105 cf_have_incdir=yes
12106 fi
12107 rm -f conftest.$ac_objext conftest.$ac_ext
12108                           CPPFLAGS=$cf_save_CPPFLAGS
12109                         fi
12110                   fi
12111                 fi
12112
12113                 if test "$cf_have_incdir" = no ; then
12114                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12115
12116 echo "${as_me:-configure}:12116: testing adding $cf_add_incdir to include-path ..." 1>&5
12117
12118                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12119
12120                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12121                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12122                   cf_add_incdir="$cf_top_incdir"
12123                 else
12124                   break
12125                 fi
12126           else
12127                 break
12128           fi
12129         done
12130   done
12131 fi
12132
12133 if test -n "$cf_cv_library_path_utf8" ; then
12134         for cf_add_libdir in $cf_cv_library_path_utf8
12135         do
12136                 if test $cf_add_libdir = /usr/lib ; then
12137                         :
12138                 elif test -d $cf_add_libdir
12139                 then
12140                         cf_have_libdir=no
12141                         if test -n "$LDFLAGS$LIBS" ; then
12142                                 # a loop is needed to ensure we can add subdirs of existing dirs
12143                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12144                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12145                                                 cf_have_libdir=yes; break
12146                                         fi
12147                                 done
12148                         fi
12149                         if test "$cf_have_libdir" = no ; then
12150                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12151
12152 echo "${as_me:-configure}:12152: testing adding $cf_add_libdir to library-path ..." 1>&5
12153
12154                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12155                         fi
12156                 fi
12157         done
12158 fi
12159
12160 cf_add_libs="$LIBS"
12161 # reverse order
12162 cf_add_0lib=
12163 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12164 # filter duplicates
12165 for cf_add_1lib in $cf_add_0lib; do
12166         for cf_add_2lib in $cf_add_libs; do
12167                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12168                         cf_add_1lib=
12169                         break
12170                 fi
12171         done
12172         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12173 done
12174 LIBS="$cf_add_libs"
12175
12176 fi
12177
12178                 if test "$cf_cv_utf8_lib" != no ; then
12179                         NCURSES_LIBUTF8=1
12180                 fi
12181         fi
12182
12183 # This is needed on Tru64 5.0 to declare mbstate_t
12184 echo "$as_me:12184: checking if we must include wchar.h to declare mbstate_t" >&5
12185 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12186 if test "${cf_cv_mbstate_t+set}" = set; then
12187   echo $ECHO_N "(cached) $ECHO_C" >&6
12188 else
12189
12190 cat >conftest.$ac_ext <<_ACEOF
12191 #line 12191 "configure"
12192 #include "confdefs.h"
12193
12194 #include <stdlib.h>
12195 #include <stdarg.h>
12196 #include <stdio.h>
12197 #ifdef HAVE_LIBUTF8_H
12198 #include <libutf8.h>
12199 #endif
12200 int
12201 main (void)
12202 {
12203 mbstate_t state
12204   ;
12205   return 0;
12206 }
12207 _ACEOF
12208 rm -f conftest.$ac_objext
12209 if { (eval echo "$as_me:12209: \"$ac_compile\"") >&5
12210   (eval $ac_compile) 2>&5
12211   ac_status=$?
12212   echo "$as_me:12212: \$? = $ac_status" >&5
12213   (exit $ac_status); } &&
12214          { ac_try='test -s conftest.$ac_objext'
12215   { (eval echo "$as_me:12215: \"$ac_try\"") >&5
12216   (eval $ac_try) 2>&5
12217   ac_status=$?
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit $ac_status); }; }; then
12220   cf_cv_mbstate_t=no
12221 else
12222   echo "$as_me: failed program was:" >&5
12223 cat conftest.$ac_ext >&5
12224 cat >conftest.$ac_ext <<_ACEOF
12225 #line 12225 "configure"
12226 #include "confdefs.h"
12227
12228 #include <stdlib.h>
12229 #include <stdarg.h>
12230 #include <stdio.h>
12231 #include <wchar.h>
12232 #ifdef HAVE_LIBUTF8_H
12233 #include <libutf8.h>
12234 #endif
12235 int
12236 main (void)
12237 {
12238 mbstate_t value
12239   ;
12240   return 0;
12241 }
12242 _ACEOF
12243 rm -f conftest.$ac_objext
12244 if { (eval echo "$as_me:12244: \"$ac_compile\"") >&5
12245   (eval $ac_compile) 2>&5
12246   ac_status=$?
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit $ac_status); } &&
12249          { ac_try='test -s conftest.$ac_objext'
12250   { (eval echo "$as_me:12250: \"$ac_try\"") >&5
12251   (eval $ac_try) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); }; }; then
12255   cf_cv_mbstate_t=yes
12256 else
12257   echo "$as_me: failed program was:" >&5
12258 cat conftest.$ac_ext >&5
12259 cf_cv_mbstate_t=unknown
12260 fi
12261 rm -f conftest.$ac_objext conftest.$ac_ext
12262 fi
12263 rm -f conftest.$ac_objext conftest.$ac_ext
12264 fi
12265 echo "$as_me:12265: result: $cf_cv_mbstate_t" >&5
12266 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12267
12268 if test "$cf_cv_mbstate_t" = yes ; then
12269
12270 cat >>confdefs.h <<\EOF
12271 #define NEED_WCHAR_H 1
12272 EOF
12273
12274         NEED_WCHAR_H=1
12275 fi
12276
12277 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12278 if test "$cf_cv_mbstate_t" = unknown ; then
12279         NCURSES_MBSTATE_T=1
12280 fi
12281
12282 # This is needed on Tru64 5.0 to declare wchar_t
12283 echo "$as_me:12283: checking if we must include wchar.h to declare wchar_t" >&5
12284 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12285 if test "${cf_cv_wchar_t+set}" = set; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288
12289 cat >conftest.$ac_ext <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292
12293 #include <stdlib.h>
12294 #include <stdarg.h>
12295 #include <stdio.h>
12296 #ifdef HAVE_LIBUTF8_H
12297 #include <libutf8.h>
12298 #endif
12299 int
12300 main (void)
12301 {
12302 wchar_t state
12303   ;
12304   return 0;
12305 }
12306 _ACEOF
12307 rm -f conftest.$ac_objext
12308 if { (eval echo "$as_me:12308: \"$ac_compile\"") >&5
12309   (eval $ac_compile) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); } &&
12313          { ac_try='test -s conftest.$ac_objext'
12314   { (eval echo "$as_me:12314: \"$ac_try\"") >&5
12315   (eval $ac_try) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit $ac_status); }; }; then
12319   cf_cv_wchar_t=no
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 cat conftest.$ac_ext >&5
12323 cat >conftest.$ac_ext <<_ACEOF
12324 #line 12324 "configure"
12325 #include "confdefs.h"
12326
12327 #include <stdlib.h>
12328 #include <stdarg.h>
12329 #include <stdio.h>
12330 #include <wchar.h>
12331 #ifdef HAVE_LIBUTF8_H
12332 #include <libutf8.h>
12333 #endif
12334 int
12335 main (void)
12336 {
12337 wchar_t value
12338   ;
12339   return 0;
12340 }
12341 _ACEOF
12342 rm -f conftest.$ac_objext
12343 if { (eval echo "$as_me:12343: \"$ac_compile\"") >&5
12344   (eval $ac_compile) 2>&5
12345   ac_status=$?
12346   echo "$as_me:12346: \$? = $ac_status" >&5
12347   (exit $ac_status); } &&
12348          { ac_try='test -s conftest.$ac_objext'
12349   { (eval echo "$as_me:12349: \"$ac_try\"") >&5
12350   (eval $ac_try) 2>&5
12351   ac_status=$?
12352   echo "$as_me:12352: \$? = $ac_status" >&5
12353   (exit $ac_status); }; }; then
12354   cf_cv_wchar_t=yes
12355 else
12356   echo "$as_me: failed program was:" >&5
12357 cat conftest.$ac_ext >&5
12358 cf_cv_wchar_t=unknown
12359 fi
12360 rm -f conftest.$ac_objext conftest.$ac_ext
12361 fi
12362 rm -f conftest.$ac_objext conftest.$ac_ext
12363 fi
12364 echo "$as_me:12364: result: $cf_cv_wchar_t" >&5
12365 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12366
12367 if test "$cf_cv_wchar_t" = yes ; then
12368
12369 cat >>confdefs.h <<\EOF
12370 #define NEED_WCHAR_H 1
12371 EOF
12372
12373         NEED_WCHAR_H=1
12374 fi
12375
12376 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12377 if test "$cf_cv_wchar_t" = unknown ; then
12378         NCURSES_WCHAR_T=1
12379 fi
12380
12381 # if we find wchar_t in either place, use substitution to provide a fallback.
12382 if test "$cf_cv_wchar_t" != unknown ; then
12383         NCURSES_OK_WCHAR_T=1
12384 fi
12385
12386 # This is needed on Tru64 5.0 to declare wint_t
12387 echo "$as_me:12387: checking if we must include wchar.h to declare wint_t" >&5
12388 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12389 if test "${cf_cv_wint_t+set}" = set; then
12390   echo $ECHO_N "(cached) $ECHO_C" >&6
12391 else
12392
12393 cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396
12397 #include <stdlib.h>
12398 #include <stdarg.h>
12399 #include <stdio.h>
12400 #ifdef HAVE_LIBUTF8_H
12401 #include <libutf8.h>
12402 #endif
12403 int
12404 main (void)
12405 {
12406 wint_t state
12407   ;
12408   return 0;
12409 }
12410 _ACEOF
12411 rm -f conftest.$ac_objext
12412 if { (eval echo "$as_me:12412: \"$ac_compile\"") >&5
12413   (eval $ac_compile) 2>&5
12414   ac_status=$?
12415   echo "$as_me:12415: \$? = $ac_status" >&5
12416   (exit $ac_status); } &&
12417          { ac_try='test -s conftest.$ac_objext'
12418   { (eval echo "$as_me:12418: \"$ac_try\"") >&5
12419   (eval $ac_try) 2>&5
12420   ac_status=$?
12421   echo "$as_me:12421: \$? = $ac_status" >&5
12422   (exit $ac_status); }; }; then
12423   cf_cv_wint_t=no
12424 else
12425   echo "$as_me: failed program was:" >&5
12426 cat conftest.$ac_ext >&5
12427 cat >conftest.$ac_ext <<_ACEOF
12428 #line 12428 "configure"
12429 #include "confdefs.h"
12430
12431 #include <stdlib.h>
12432 #include <stdarg.h>
12433 #include <stdio.h>
12434 #include <wchar.h>
12435 #ifdef HAVE_LIBUTF8_H
12436 #include <libutf8.h>
12437 #endif
12438 int
12439 main (void)
12440 {
12441 wint_t value
12442   ;
12443   return 0;
12444 }
12445 _ACEOF
12446 rm -f conftest.$ac_objext
12447 if { (eval echo "$as_me:12447: \"$ac_compile\"") >&5
12448   (eval $ac_compile) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); } &&
12452          { ac_try='test -s conftest.$ac_objext'
12453   { (eval echo "$as_me:12453: \"$ac_try\"") >&5
12454   (eval $ac_try) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; }; then
12458   cf_cv_wint_t=yes
12459 else
12460   echo "$as_me: failed program was:" >&5
12461 cat conftest.$ac_ext >&5
12462 cf_cv_wint_t=unknown
12463 fi
12464 rm -f conftest.$ac_objext conftest.$ac_ext
12465 fi
12466 rm -f conftest.$ac_objext conftest.$ac_ext
12467 fi
12468 echo "$as_me:12468: result: $cf_cv_wint_t" >&5
12469 echo "${ECHO_T}$cf_cv_wint_t" >&6
12470
12471 if test "$cf_cv_wint_t" = yes ; then
12472
12473 cat >>confdefs.h <<\EOF
12474 #define NEED_WCHAR_H 1
12475 EOF
12476
12477         NEED_WCHAR_H=1
12478 fi
12479
12480 # if we do not find wint_t in either place, use substitution to provide a fallback.
12481 if test "$cf_cv_wint_t" = unknown ; then
12482         NCURSES_WINT_T=1
12483 fi
12484
12485 # if we find wint_t in either place, use substitution to provide a fallback.
12486 if test "$cf_cv_wint_t" != unknown ; then
12487         NCURSES_OK_WINT_T=1
12488 fi
12489
12490         if test "$NCURSES_MBSTATE_T" != 0; then
12491
12492 cat >>confdefs.h <<\EOF
12493 #define NEED_MBSTATE_T_DEF 1
12494 EOF
12495
12496         fi
12497 fi
12498
12499 ###   use option --disable-lp64 to allow long chtype
12500 echo "$as_me:12500: checking whether to enable _LP64 definition in curses.h" >&5
12501 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12502
12503 # Check whether --enable-lp64 or --disable-lp64 was given.
12504 if test "${enable_lp64+set}" = set; then
12505   enableval="$enable_lp64"
12506   with_lp64=$enableval
12507 else
12508   with_lp64=$cf_dft_with_lp64
12509 fi;
12510 echo "$as_me:12510: result: $with_lp64" >&5
12511 echo "${ECHO_T}$with_lp64" >&6
12512
12513 if test "x$with_lp64" = xyes ; then
12514         cf_cv_enable_lp64=1
12515 else
12516         cf_cv_enable_lp64=0
12517 fi
12518
12519 # Check whether --enable-largefile or --disable-largefile was given.
12520 if test "${enable_largefile+set}" = set; then
12521   enableval="$enable_largefile"
12522
12523 fi;
12524 if test "$enable_largefile" != no; then
12525
12526   echo "$as_me:12526: checking for special C compiler options needed for large files" >&5
12527 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12528 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12529   echo $ECHO_N "(cached) $ECHO_C" >&6
12530 else
12531   ac_cv_sys_largefile_CC=no
12532      if test "$GCC" != yes; then
12533        ac_save_CC=$CC
12534        while :; do
12535          # IRIX 6.2 and later do not support large files by default,
12536          # so use the C compiler's -n32 option if that helps.
12537          cat >conftest.$ac_ext <<_ACEOF
12538 #line 12538 "configure"
12539 #include "confdefs.h"
12540 #include <sys/types.h>
12541  /* Check that off_t can represent 2**63 - 1 correctly.
12542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12543     since some C++ compilers masquerading as C compilers
12544     incorrectly reject 9223372036854775807.  */
12545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12547                        && LARGE_OFF_T % 2147483647 == 1)
12548                       ? 1 : -1];
12549 int
12550 main (void)
12551 {
12552
12553   ;
12554   return 0;
12555 }
12556 _ACEOF
12557          rm -f conftest.$ac_objext
12558 if { (eval echo "$as_me:12558: \"$ac_compile\"") >&5
12559   (eval $ac_compile) 2>&5
12560   ac_status=$?
12561   echo "$as_me:12561: \$? = $ac_status" >&5
12562   (exit $ac_status); } &&
12563          { ac_try='test -s conftest.$ac_objext'
12564   { (eval echo "$as_me:12564: \"$ac_try\"") >&5
12565   (eval $ac_try) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); }; }; then
12569   break
12570 else
12571   echo "$as_me: failed program was:" >&5
12572 cat conftest.$ac_ext >&5
12573 fi
12574 rm -f conftest.$ac_objext
12575          CC="$CC -n32"
12576          rm -f conftest.$ac_objext
12577 if { (eval echo "$as_me:12577: \"$ac_compile\"") >&5
12578   (eval $ac_compile) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); } &&
12582          { ac_try='test -s conftest.$ac_objext'
12583   { (eval echo "$as_me:12583: \"$ac_try\"") >&5
12584   (eval $ac_try) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); }; }; then
12588   ac_cv_sys_largefile_CC=' -n32'; break
12589 else
12590   echo "$as_me: failed program was:" >&5
12591 cat conftest.$ac_ext >&5
12592 fi
12593 rm -f conftest.$ac_objext
12594          break
12595        done
12596        CC=$ac_save_CC
12597        rm -f conftest.$ac_ext
12598     fi
12599 fi
12600 echo "$as_me:12600: result: $ac_cv_sys_largefile_CC" >&5
12601 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12602   if test "$ac_cv_sys_largefile_CC" != no; then
12603     CC=$CC$ac_cv_sys_largefile_CC
12604   fi
12605
12606   echo "$as_me:12606: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12607 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12608 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12609   echo $ECHO_N "(cached) $ECHO_C" >&6
12610 else
12611   while :; do
12612   ac_cv_sys_file_offset_bits=no
12613   cat >conftest.$ac_ext <<_ACEOF
12614 #line 12614 "configure"
12615 #include "confdefs.h"
12616 #include <sys/types.h>
12617  /* Check that off_t can represent 2**63 - 1 correctly.
12618     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12619     since some C++ compilers masquerading as C compilers
12620     incorrectly reject 9223372036854775807.  */
12621 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12622   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12623                        && LARGE_OFF_T % 2147483647 == 1)
12624                       ? 1 : -1];
12625 int
12626 main (void)
12627 {
12628
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 rm -f conftest.$ac_objext
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635   (eval $ac_compile) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit $ac_status); } &&
12639          { ac_try='test -s conftest.$ac_objext'
12640   { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641   (eval $ac_try) 2>&5
12642   ac_status=$?
12643   echo "$as_me:12643: \$? = $ac_status" >&5
12644   (exit $ac_status); }; }; then
12645   break
12646 else
12647   echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 fi
12650 rm -f conftest.$ac_objext conftest.$ac_ext
12651   cat >conftest.$ac_ext <<_ACEOF
12652 #line 12652 "configure"
12653 #include "confdefs.h"
12654 #define _FILE_OFFSET_BITS 64
12655 #include <sys/types.h>
12656  /* Check that off_t can represent 2**63 - 1 correctly.
12657     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12658     since some C++ compilers masquerading as C compilers
12659     incorrectly reject 9223372036854775807.  */
12660 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12661   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12662                        && LARGE_OFF_T % 2147483647 == 1)
12663                       ? 1 : -1];
12664 int
12665 main (void)
12666 {
12667
12668   ;
12669   return 0;
12670 }
12671 _ACEOF
12672 rm -f conftest.$ac_objext
12673 if { (eval echo "$as_me:12673: \"$ac_compile\"") >&5
12674   (eval $ac_compile) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); } &&
12678          { ac_try='test -s conftest.$ac_objext'
12679   { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680   (eval $ac_try) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); }; }; then
12684   ac_cv_sys_file_offset_bits=64; break
12685 else
12686   echo "$as_me: failed program was:" >&5
12687 cat conftest.$ac_ext >&5
12688 fi
12689 rm -f conftest.$ac_objext conftest.$ac_ext
12690   break
12691 done
12692 fi
12693 echo "$as_me:12693: result: $ac_cv_sys_file_offset_bits" >&5
12694 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12695 if test "$ac_cv_sys_file_offset_bits" != no; then
12696
12697 cat >>confdefs.h <<EOF
12698 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12699 EOF
12700
12701 fi
12702 rm -rf conftest*
12703   echo "$as_me:12703: checking for _LARGE_FILES value needed for large files" >&5
12704 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12705 if test "${ac_cv_sys_large_files+set}" = set; then
12706   echo $ECHO_N "(cached) $ECHO_C" >&6
12707 else
12708   while :; do
12709   ac_cv_sys_large_files=no
12710   cat >conftest.$ac_ext <<_ACEOF
12711 #line 12711 "configure"
12712 #include "confdefs.h"
12713 #include <sys/types.h>
12714  /* Check that off_t can represent 2**63 - 1 correctly.
12715     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12716     since some C++ compilers masquerading as C compilers
12717     incorrectly reject 9223372036854775807.  */
12718 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12719   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12720                        && LARGE_OFF_T % 2147483647 == 1)
12721                       ? 1 : -1];
12722 int
12723 main (void)
12724 {
12725
12726   ;
12727   return 0;
12728 }
12729 _ACEOF
12730 rm -f conftest.$ac_objext
12731 if { (eval echo "$as_me:12731: \"$ac_compile\"") >&5
12732   (eval $ac_compile) 2>&5
12733   ac_status=$?
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit $ac_status); } &&
12736          { ac_try='test -s conftest.$ac_objext'
12737   { (eval echo "$as_me:12737: \"$ac_try\"") >&5
12738   (eval $ac_try) 2>&5
12739   ac_status=$?
12740   echo "$as_me:12740: \$? = $ac_status" >&5
12741   (exit $ac_status); }; }; then
12742   break
12743 else
12744   echo "$as_me: failed program was:" >&5
12745 cat conftest.$ac_ext >&5
12746 fi
12747 rm -f conftest.$ac_objext conftest.$ac_ext
12748   cat >conftest.$ac_ext <<_ACEOF
12749 #line 12749 "configure"
12750 #include "confdefs.h"
12751 #define _LARGE_FILES 1
12752 #include <sys/types.h>
12753  /* Check that off_t can represent 2**63 - 1 correctly.
12754     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12755     since some C++ compilers masquerading as C compilers
12756     incorrectly reject 9223372036854775807.  */
12757 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12758   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12759                        && LARGE_OFF_T % 2147483647 == 1)
12760                       ? 1 : -1];
12761 int
12762 main (void)
12763 {
12764
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext
12770 if { (eval echo "$as_me:12770: \"$ac_compile\"") >&5
12771   (eval $ac_compile) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit $ac_status); } &&
12775          { ac_try='test -s conftest.$ac_objext'
12776   { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777   (eval $ac_try) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); }; }; then
12781   ac_cv_sys_large_files=1; break
12782 else
12783   echo "$as_me: failed program was:" >&5
12784 cat conftest.$ac_ext >&5
12785 fi
12786 rm -f conftest.$ac_objext conftest.$ac_ext
12787   break
12788 done
12789 fi
12790 echo "$as_me:12790: result: $ac_cv_sys_large_files" >&5
12791 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12792 if test "$ac_cv_sys_large_files" != no; then
12793
12794 cat >>confdefs.h <<EOF
12795 #define _LARGE_FILES $ac_cv_sys_large_files
12796 EOF
12797
12798 fi
12799 rm -rf conftest*
12800 fi
12801
12802         if test "$enable_largefile" != no ; then
12803         echo "$as_me:12803: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12804 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12805 if test "${ac_cv_sys_largefile_source+set}" = set; then
12806   echo $ECHO_N "(cached) $ECHO_C" >&6
12807 else
12808   while :; do
12809   ac_cv_sys_largefile_source=no
12810   cat >conftest.$ac_ext <<_ACEOF
12811 #line 12811 "configure"
12812 #include "confdefs.h"
12813 #include <stdio.h>
12814 int
12815 main (void)
12816 {
12817 return !fseeko;
12818   ;
12819   return 0;
12820 }
12821 _ACEOF
12822 rm -f conftest.$ac_objext
12823 if { (eval echo "$as_me:12823: \"$ac_compile\"") >&5
12824   (eval $ac_compile) 2>&5
12825   ac_status=$?
12826   echo "$as_me:12826: \$? = $ac_status" >&5
12827   (exit $ac_status); } &&
12828          { ac_try='test -s conftest.$ac_objext'
12829   { (eval echo "$as_me:12829: \"$ac_try\"") >&5
12830   (eval $ac_try) 2>&5
12831   ac_status=$?
12832   echo "$as_me:12832: \$? = $ac_status" >&5
12833   (exit $ac_status); }; }; then
12834   break
12835 else
12836   echo "$as_me: failed program was:" >&5
12837 cat conftest.$ac_ext >&5
12838 fi
12839 rm -f conftest.$ac_objext conftest.$ac_ext
12840   cat >conftest.$ac_ext <<_ACEOF
12841 #line 12841 "configure"
12842 #include "confdefs.h"
12843 #define _LARGEFILE_SOURCE 1
12844 #include <stdio.h>
12845 int
12846 main (void)
12847 {
12848 return !fseeko;
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 rm -f conftest.$ac_objext
12854 if { (eval echo "$as_me:12854: \"$ac_compile\"") >&5
12855   (eval $ac_compile) 2>&5
12856   ac_status=$?
12857   echo "$as_me:12857: \$? = $ac_status" >&5
12858   (exit $ac_status); } &&
12859          { ac_try='test -s conftest.$ac_objext'
12860   { (eval echo "$as_me:12860: \"$ac_try\"") >&5
12861   (eval $ac_try) 2>&5
12862   ac_status=$?
12863   echo "$as_me:12863: \$? = $ac_status" >&5
12864   (exit $ac_status); }; }; then
12865   ac_cv_sys_largefile_source=1; break
12866 else
12867   echo "$as_me: failed program was:" >&5
12868 cat conftest.$ac_ext >&5
12869 fi
12870 rm -f conftest.$ac_objext conftest.$ac_ext
12871   break
12872 done
12873 fi
12874 echo "$as_me:12874: result: $ac_cv_sys_largefile_source" >&5
12875 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12876 if test "$ac_cv_sys_largefile_source" != no; then
12877
12878 cat >>confdefs.h <<EOF
12879 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12880 EOF
12881
12882 fi
12883 rm -rf conftest*
12884
12885 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12886 # in glibc 2.1.3, but that breaks too many other things.
12887 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12888 echo "$as_me:12888: checking for fseeko" >&5
12889 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12890 if test "${ac_cv_func_fseeko+set}" = set; then
12891   echo $ECHO_N "(cached) $ECHO_C" >&6
12892 else
12893   cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896 #include <stdio.h>
12897 int
12898 main (void)
12899 {
12900 return fseeko && fseeko (stdin, 0, 0);
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f conftest.$ac_objext conftest$ac_exeext
12906 if { (eval echo "$as_me:12906: \"$ac_link\"") >&5
12907   (eval $ac_link) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -s conftest$ac_exeext'
12912   { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); }; }; then
12917   ac_cv_func_fseeko=yes
12918 else
12919   echo "$as_me: failed program was:" >&5
12920 cat conftest.$ac_ext >&5
12921 ac_cv_func_fseeko=no
12922 fi
12923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12924 fi
12925 echo "$as_me:12925: result: $ac_cv_func_fseeko" >&5
12926 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12927 if test $ac_cv_func_fseeko = yes; then
12928
12929 cat >>confdefs.h <<\EOF
12930 #define HAVE_FSEEKO 1
12931 EOF
12932
12933 fi
12934
12935         # Normally we would collect these definitions in the config.h,
12936         # but (like _XOPEN_SOURCE), some environments rely on having these
12937         # defined before any of the system headers are included.  Another
12938         # case comes up with C++, e.g., on AIX the compiler compiles the
12939         # header files by themselves before looking at the body files it is
12940         # told to compile.  For ncurses, those header files do not include
12941         # the config.h
12942         if test "$ac_cv_sys_large_files" != no
12943         then
12944
12945         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12946         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12947
12948         fi
12949         if test "$ac_cv_sys_largefile_source" != no
12950         then
12951
12952         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12953         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12954
12955         fi
12956         if test "$ac_cv_sys_file_offset_bits" != no
12957         then
12958
12959         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12960         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12961
12962         fi
12963
12964         echo "$as_me:12964: checking whether to use struct dirent64" >&5
12965 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12966 if test "${cf_cv_struct_dirent64+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969
12970                 cat >conftest.$ac_ext <<_ACEOF
12971 #line 12971 "configure"
12972 #include "confdefs.h"
12973
12974 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12975 #include <sys/types.h>
12976 #include <dirent.h>
12977
12978 int
12979 main (void)
12980 {
12981
12982                 /* if transitional largefile support is setup, this is true */
12983                 extern struct dirent64 * readdir(DIR *);
12984                 struct dirent64 *x = readdir((DIR *)0);
12985                 struct dirent *y = readdir((DIR *)0);
12986                 int z = x - y;
12987
12988   ;
12989   return 0;
12990 }
12991 _ACEOF
12992 rm -f conftest.$ac_objext
12993 if { (eval echo "$as_me:12993: \"$ac_compile\"") >&5
12994   (eval $ac_compile) 2>&5
12995   ac_status=$?
12996   echo "$as_me:12996: \$? = $ac_status" >&5
12997   (exit $ac_status); } &&
12998          { ac_try='test -s conftest.$ac_objext'
12999   { (eval echo "$as_me:12999: \"$ac_try\"") >&5
13000   (eval $ac_try) 2>&5
13001   ac_status=$?
13002   echo "$as_me:13002: \$? = $ac_status" >&5
13003   (exit $ac_status); }; }; then
13004   cf_cv_struct_dirent64=yes
13005 else
13006   echo "$as_me: failed program was:" >&5
13007 cat conftest.$ac_ext >&5
13008 cf_cv_struct_dirent64=no
13009 fi
13010 rm -f conftest.$ac_objext conftest.$ac_ext
13011
13012 fi
13013 echo "$as_me:13013: result: $cf_cv_struct_dirent64" >&5
13014 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13015         test "$cf_cv_struct_dirent64" = yes &&
13016 cat >>confdefs.h <<\EOF
13017 #define HAVE_STRUCT_DIRENT64 1
13018 EOF
13019
13020         fi
13021
13022 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13023 echo "$as_me:13023: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13024 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13025
13026 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13027 if test "${enable_tparm_varargs+set}" = set; then
13028   enableval="$enable_tparm_varargs"
13029   with_tparm_varargs=$enableval
13030 else
13031   with_tparm_varargs=yes
13032 fi;
13033 echo "$as_me:13033: result: $with_tparm_varargs" >&5
13034 echo "${ECHO_T}$with_tparm_varargs" >&6
13035 NCURSES_TPARM_VARARGS=0
13036 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13037
13038 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13039 if test "$with_ticlib" != no ; then
13040 echo "$as_me:13040: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13041 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13042
13043 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13044 if test "${enable_tic_depends+set}" = set; then
13045   enableval="$enable_tic_depends"
13046   with_tic_depends=$enableval
13047 else
13048   with_tic_depends=yes
13049 fi;
13050 echo "$as_me:13050: result: $with_tic_depends" >&5
13051 echo "${ECHO_T}$with_tic_depends" >&6
13052 else
13053         with_tic_depends=no
13054 fi
13055
13056 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13057 echo "$as_me:13057: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13058 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13059
13060 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13061 if test "${enable_wattr_macros+set}" = set; then
13062   enableval="$enable_wattr_macros"
13063   with_wattr_macros=$enableval
13064 else
13065   with_wattr_macros=yes
13066 fi;
13067 if [ "x$with_wattr_macros" != xyes ]; then
13068         NCURSES_WATTR_MACROS=0
13069         echo "$as_me:13069: result: yes" >&5
13070 echo "${ECHO_T}yes" >&6
13071 else
13072         NCURSES_WATTR_MACROS=1
13073         echo "$as_me:13073: result: no" >&5
13074 echo "${ECHO_T}no" >&6
13075 fi
13076
13077 echo "$as_me:13077: checking for X11 rgb file" >&5
13078 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13079
13080 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13081 if test "${with_x11_rgb+set}" = set; then
13082   withval="$with_x11_rgb"
13083   RGB_PATH=$withval
13084 else
13085   RGB_PATH=auto
13086 fi;
13087
13088 if test "x$RGB_PATH" = xauto
13089 then
13090         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13091         for cf_path in \
13092                 /opt/local/share/X11/rgb.txt \
13093                 /opt/X11/share/X11/rgb.txt \
13094                 /usr/share/X11/rgb.txt \
13095                 /usr/X11/share/X11/rgb.txt \
13096                 /usr/X11/lib/X11/rgb.txt \
13097                 /usr/lib/X11/rgb.txt \
13098                 /etc/X11/rgb.txt \
13099                 /usr/pkg/lib/X11/rgb.txt \
13100                 /usr/X11R7/lib/X11/rgb.txt \
13101                 /usr/X11R6/lib/X11/rgb.txt \
13102                 /usr/X11R5/lib/X11/rgb.txt \
13103                 /usr/X11R4/lib/X11/rgb.txt \
13104                 /usr/local/lib/X11/rgb.txt \
13105                 /usr/local/share/X11/rgb.txt \
13106                 /usr/lib64/X11/rgb.txt
13107         do
13108                 if test -f "$cf_path" ; then
13109                         RGB_PATH="$cf_path"
13110                         break
13111                 fi
13112         done
13113 else
13114         cf_path=$RGB_PATH
13115
13116 if test "x$prefix" != xNONE; then
13117         cf_path_syntax="$prefix"
13118 else
13119         cf_path_syntax="$ac_default_prefix"
13120 fi
13121
13122 case ".$cf_path" in
13123 (.\$\(*\)*|.\'*\'*)
13124         ;;
13125 (..|./*|.\\*)
13126         ;;
13127 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13128         ;;
13129 (.\${*prefix}*|.\${*dir}*)
13130         eval cf_path="$cf_path"
13131         case ".$cf_path" in
13132         (.NONE/*)
13133                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13134                 ;;
13135         esac
13136         ;;
13137 (.no|.NONE/*)
13138         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13139         ;;
13140 (*)
13141         { { echo "$as_me:13141: error: expected a pathname, not \"$cf_path\"" >&5
13142 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13143    { (exit 1); exit 1; }; }
13144         ;;
13145 esac
13146
13147 fi
13148
13149 echo "$as_me:13149: result: $RGB_PATH" >&5
13150 echo "${ECHO_T}$RGB_PATH" >&6
13151
13152 cat >>confdefs.h <<EOF
13153 #define RGB_PATH "$cf_path"
13154 EOF
13155
13156 no_x11_rgb=
13157 if test "$RGB_PATH" = no
13158 then
13159         no_x11_rgb="#"
13160 fi
13161
13162 ###   use option --with-bool to override bool's type
13163 echo "$as_me:13163: checking for type of bool" >&5
13164 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13165
13166 # Check whether --with-bool or --without-bool was given.
13167 if test "${with_bool+set}" = set; then
13168   withval="$with_bool"
13169   NCURSES_BOOL="$withval"
13170 else
13171   NCURSES_BOOL=auto
13172 fi;
13173 echo "$as_me:13173: result: $NCURSES_BOOL" >&5
13174 echo "${ECHO_T}$NCURSES_BOOL" >&6
13175
13176 echo "$as_me:13176: checking for alternate terminal capabilities file" >&5
13177 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13178
13179 # Check whether --with-caps or --without-caps was given.
13180 if test "${with_caps+set}" = set; then
13181   withval="$with_caps"
13182   TERMINFO_CAPS=Caps.$withval
13183 else
13184   TERMINFO_CAPS=Caps
13185 fi;
13186 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13187 echo "$as_me:13187: result: $TERMINFO_CAPS" >&5
13188 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13189
13190 ###   use option --with-chtype to override chtype's type
13191 echo "$as_me:13191: checking for type of chtype" >&5
13192 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13193
13194 # Check whether --with-chtype or --without-chtype was given.
13195 if test "${with_chtype+set}" = set; then
13196   withval="$with_chtype"
13197   NCURSES_CHTYPE="$withval"
13198 else
13199   NCURSES_CHTYPE=$cf_dft_chtype
13200 fi;
13201 echo "$as_me:13201: result: $NCURSES_CHTYPE" >&5
13202 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13203
13204 ###   use option --with-ospeed to override ospeed's type
13205 echo "$as_me:13205: checking for type of ospeed" >&5
13206 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13207
13208 # Check whether --with-ospeed or --without-ospeed was given.
13209 if test "${with_ospeed+set}" = set; then
13210   withval="$with_ospeed"
13211   NCURSES_OSPEED="$withval"
13212 else
13213   NCURSES_OSPEED=short
13214 fi;
13215 echo "$as_me:13215: result: $NCURSES_OSPEED" >&5
13216 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13217
13218 ###   use option --with-mmask-t to override mmask_t's type
13219 echo "$as_me:13219: checking for type of mmask_t" >&5
13220 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13221
13222 # Check whether --with-mmask-t or --without-mmask-t was given.
13223 if test "${with_mmask_t+set}" = set; then
13224   withval="$with_mmask_t"
13225   NCURSES_MMASK_T="$withval"
13226 else
13227   NCURSES_MMASK_T=$cf_dft_mmask_t
13228 fi;
13229 echo "$as_me:13229: result: $NCURSES_MMASK_T" >&5
13230 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13231
13232 ###   use option --with-ccharw-max to override CCHARW_MAX size
13233 echo "$as_me:13233: checking for size CCHARW_MAX" >&5
13234 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13235
13236 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13237 if test "${with_ccharw_max+set}" = set; then
13238   withval="$with_ccharw_max"
13239   NCURSES_CCHARW_MAX="$withval"
13240 else
13241   NCURSES_CCHARW_MAX=5
13242 fi;
13243 echo "$as_me:13243: result: $NCURSES_CCHARW_MAX" >&5
13244 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13245
13246 echo "$as_me:13246: checking for ANSI C header files" >&5
13247 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13248 if test "${ac_cv_header_stdc+set}" = set; then
13249   echo $ECHO_N "(cached) $ECHO_C" >&6
13250 else
13251   cat >conftest.$ac_ext <<_ACEOF
13252 #line 13252 "configure"
13253 #include "confdefs.h"
13254 #include <stdlib.h>
13255 #include <stdarg.h>
13256 #include <string.h>
13257 #include <float.h>
13258
13259 _ACEOF
13260 if { (eval echo "$as_me:13260: \"$ac_cpp conftest.$ac_ext\"") >&5
13261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13262   ac_status=$?
13263   egrep -v '^ *\+' conftest.er1 >conftest.err
13264   rm -f conftest.er1
13265   cat conftest.err >&5
13266   echo "$as_me:13266: \$? = $ac_status" >&5
13267   (exit $ac_status); } >/dev/null; then
13268   if test -s conftest.err; then
13269     ac_cpp_err=$ac_c_preproc_warn_flag
13270   else
13271     ac_cpp_err=
13272   fi
13273 else
13274   ac_cpp_err=yes
13275 fi
13276 if test -z "$ac_cpp_err"; then
13277   ac_cv_header_stdc=yes
13278 else
13279   echo "$as_me: failed program was:" >&5
13280   cat conftest.$ac_ext >&5
13281   ac_cv_header_stdc=no
13282 fi
13283 rm -f conftest.err conftest.$ac_ext
13284
13285 if test $ac_cv_header_stdc = yes; then
13286   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13287   cat >conftest.$ac_ext <<_ACEOF
13288 #line 13288 "configure"
13289 #include "confdefs.h"
13290 #include <string.h>
13291
13292 _ACEOF
13293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13294   egrep "memchr" >/dev/null 2>&1; then
13295   :
13296 else
13297   ac_cv_header_stdc=no
13298 fi
13299 rm -rf conftest*
13300
13301 fi
13302
13303 if test $ac_cv_header_stdc = yes; then
13304   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13305   cat >conftest.$ac_ext <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308 #include <stdlib.h>
13309
13310 _ACEOF
13311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13312   egrep "free" >/dev/null 2>&1; then
13313   :
13314 else
13315   ac_cv_header_stdc=no
13316 fi
13317 rm -rf conftest*
13318
13319 fi
13320
13321 if test $ac_cv_header_stdc = yes; then
13322   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13323   if test "$cross_compiling" = yes; then
13324   :
13325 else
13326   cat >conftest.$ac_ext <<_ACEOF
13327 #line 13327 "configure"
13328 #include "confdefs.h"
13329 #include <ctype.h>
13330 #if ((' ' & 0x0FF) == 0x020)
13331 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13332 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13333 #else
13334 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13335                      || ('j' <= (c) && (c) <= 'r') \
13336                      || ('s' <= (c) && (c) <= 'z'))
13337 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13338 #endif
13339
13340 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13341 int
13342 main (void)
13343 {
13344   int i;
13345   for (i = 0; i < 256; i++)
13346     if (XOR (islower (i), ISLOWER (i))
13347         || toupper (i) != TOUPPER (i))
13348       $ac_main_return(2);
13349   $ac_main_return (0);
13350 }
13351 _ACEOF
13352 rm -f conftest$ac_exeext
13353 if { (eval echo "$as_me:13353: \"$ac_link\"") >&5
13354   (eval $ac_link) 2>&5
13355   ac_status=$?
13356   echo "$as_me:13356: \$? = $ac_status" >&5
13357   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13358   { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359   (eval $ac_try) 2>&5
13360   ac_status=$?
13361   echo "$as_me:13361: \$? = $ac_status" >&5
13362   (exit $ac_status); }; }; then
13363   :
13364 else
13365   echo "$as_me: program exited with status $ac_status" >&5
13366 echo "$as_me: failed program was:" >&5
13367 cat conftest.$ac_ext >&5
13368 ac_cv_header_stdc=no
13369 fi
13370 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13371 fi
13372 fi
13373 fi
13374 echo "$as_me:13374: result: $ac_cv_header_stdc" >&5
13375 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13376 if test $ac_cv_header_stdc = yes; then
13377
13378 cat >>confdefs.h <<\EOF
13379 #define STDC_HEADERS 1
13380 EOF
13381
13382 fi
13383
13384 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13385
13386 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13387                   inttypes.h stdint.h unistd.h
13388 do
13389 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13390 echo "$as_me:13390: checking for $ac_header" >&5
13391 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13392 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13393   echo $ECHO_N "(cached) $ECHO_C" >&6
13394 else
13395   cat >conftest.$ac_ext <<_ACEOF
13396 #line 13396 "configure"
13397 #include "confdefs.h"
13398 $ac_includes_default
13399 #include <$ac_header>
13400 _ACEOF
13401 rm -f conftest.$ac_objext
13402 if { (eval echo "$as_me:13402: \"$ac_compile\"") >&5
13403   (eval $ac_compile) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); } &&
13407          { ac_try='test -s conftest.$ac_objext'
13408   { (eval echo "$as_me:13408: \"$ac_try\"") >&5
13409   (eval $ac_try) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); }; }; then
13413   eval "$as_ac_Header=yes"
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat conftest.$ac_ext >&5
13417 eval "$as_ac_Header=no"
13418 fi
13419 rm -f conftest.$ac_objext conftest.$ac_ext
13420 fi
13421 echo "$as_me:13421: result: `eval echo '${'$as_ac_Header'}'`" >&5
13422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13424   cat >>confdefs.h <<EOF
13425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13426 EOF
13427
13428 fi
13429 done
13430
13431 echo "$as_me:13431: checking for signed char" >&5
13432 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13433 if test "${ac_cv_type_signed_char+set}" = set; then
13434   echo $ECHO_N "(cached) $ECHO_C" >&6
13435 else
13436   cat >conftest.$ac_ext <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439 $ac_includes_default
13440 int
13441 main (void)
13442 {
13443 if ((signed char *) 0)
13444   return 0;
13445 if (sizeof (signed char))
13446   return 0;
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 rm -f conftest.$ac_objext
13452 if { (eval echo "$as_me:13452: \"$ac_compile\"") >&5
13453   (eval $ac_compile) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } &&
13457          { ac_try='test -s conftest.$ac_objext'
13458   { (eval echo "$as_me:13458: \"$ac_try\"") >&5
13459   (eval $ac_try) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit $ac_status); }; }; then
13463   ac_cv_type_signed_char=yes
13464 else
13465   echo "$as_me: failed program was:" >&5
13466 cat conftest.$ac_ext >&5
13467 ac_cv_type_signed_char=no
13468 fi
13469 rm -f conftest.$ac_objext conftest.$ac_ext
13470 fi
13471 echo "$as_me:13471: result: $ac_cv_type_signed_char" >&5
13472 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13473
13474 echo "$as_me:13474: checking size of signed char" >&5
13475 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13476 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13477   echo $ECHO_N "(cached) $ECHO_C" >&6
13478 else
13479   if test "$ac_cv_type_signed_char" = yes; then
13480   if test "$cross_compiling" = yes; then
13481   # Depending upon the size, compute the lo and hi bounds.
13482 cat >conftest.$ac_ext <<_ACEOF
13483 #line 13483 "configure"
13484 #include "confdefs.h"
13485 $ac_includes_default
13486 int
13487 main (void)
13488 {
13489 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f conftest.$ac_objext
13495 if { (eval echo "$as_me:13495: \"$ac_compile\"") >&5
13496   (eval $ac_compile) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); } &&
13500          { ac_try='test -s conftest.$ac_objext'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   ac_lo=0 ac_mid=0
13507   while :; do
13508     cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13511 $ac_includes_default
13512 int
13513 main (void)
13514 {
13515 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f conftest.$ac_objext
13521 if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5
13522   (eval $ac_compile) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -s conftest.$ac_objext'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit $ac_status); }; }; then
13532   ac_hi=$ac_mid; break
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13537 fi
13538 rm -f conftest.$ac_objext conftest.$ac_ext
13539   done
13540 else
13541   echo "$as_me: failed program was:" >&5
13542 cat conftest.$ac_ext >&5
13543 ac_hi=-1 ac_mid=-1
13544   while :; do
13545     cat >conftest.$ac_ext <<_ACEOF
13546 #line 13546 "configure"
13547 #include "confdefs.h"
13548 $ac_includes_default
13549 int
13550 main (void)
13551 {
13552 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f conftest.$ac_objext
13558 if { (eval echo "$as_me:13558: \"$ac_compile\"") >&5
13559   (eval $ac_compile) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit $ac_status); } &&
13563          { ac_try='test -s conftest.$ac_objext'
13564   { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit $ac_status); }; }; then
13569   ac_lo=$ac_mid; break
13570 else
13571   echo "$as_me: failed program was:" >&5
13572 cat conftest.$ac_ext >&5
13573 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13574 fi
13575 rm -f conftest.$ac_objext conftest.$ac_ext
13576   done
13577 fi
13578 rm -f conftest.$ac_objext conftest.$ac_ext
13579 # Binary search between lo and hi bounds.
13580 while test "x$ac_lo" != "x$ac_hi"; do
13581   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13582   cat >conftest.$ac_ext <<_ACEOF
13583 #line 13583 "configure"
13584 #include "confdefs.h"
13585 $ac_includes_default
13586 int
13587 main (void)
13588 {
13589 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext
13595 if { (eval echo "$as_me:13595: \"$ac_compile\"") >&5
13596   (eval $ac_compile) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); } &&
13600          { ac_try='test -s conftest.$ac_objext'
13601   { (eval echo "$as_me:13601: \"$ac_try\"") >&5
13602   (eval $ac_try) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); }; }; then
13606   ac_hi=$ac_mid
13607 else
13608   echo "$as_me: failed program was:" >&5
13609 cat conftest.$ac_ext >&5
13610 ac_lo=`expr $ac_mid + 1`
13611 fi
13612 rm -f conftest.$ac_objext conftest.$ac_ext
13613 done
13614 ac_cv_sizeof_signed_char=$ac_lo
13615 else
13616   if test "$cross_compiling" = yes; then
13617   { { echo "$as_me:13617: error: cannot run test program while cross compiling" >&5
13618 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13619    { (exit 1); exit 1; }; }
13620 else
13621   cat >conftest.$ac_ext <<_ACEOF
13622 #line 13622 "configure"
13623 #include "confdefs.h"
13624 $ac_includes_default
13625 int
13626 main (void)
13627 {
13628 FILE *f = fopen ("conftest.val", "w");
13629 if (!f)
13630   $ac_main_return (1);
13631 fprintf (f, "%d", (sizeof (signed char)));
13632 fclose (f);
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f conftest$ac_exeext
13638 if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
13639   (eval $ac_link) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   ac_cv_sizeof_signed_char=`cat conftest.val`
13649 else
13650   echo "$as_me: program exited with status $ac_status" >&5
13651 echo "$as_me: failed program was:" >&5
13652 cat conftest.$ac_ext >&5
13653 fi
13654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13655 fi
13656 fi
13657 rm -f conftest.val
13658 else
13659   ac_cv_sizeof_signed_char=0
13660 fi
13661 fi
13662 echo "$as_me:13662: result: $ac_cv_sizeof_signed_char" >&5
13663 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13664 cat >>confdefs.h <<EOF
13665 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13666 EOF
13667
13668 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13669         NCURSES_SBOOL="signed char"
13670 else
13671         NCURSES_SBOOL="char"
13672 fi
13673 echo "$as_me:13673: checking if you want to use signed Boolean array in term.h" >&5
13674 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13675
13676 # Check whether --enable-signed-char or --disable-signed-char was given.
13677 if test "${enable_signed_char+set}" = set; then
13678   enableval="$enable_signed_char"
13679   with_signed_char=$enableval
13680 else
13681   with_signed_char=no
13682 fi;
13683 echo "$as_me:13683: result: $with_signed_char" >&5
13684 echo "${ECHO_T}$with_signed_char" >&6
13685 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13686
13687 ###   use option --with-tparm-arg to override tparm's argument type
13688 echo "$as_me:13688: checking for type of tparm args" >&5
13689 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13690
13691 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13692 if test "${with_tparm_arg+set}" = set; then
13693   withval="$with_tparm_arg"
13694   NCURSES_TPARM_ARG="$withval"
13695 else
13696   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13697 fi;
13698 echo "$as_me:13698: result: $NCURSES_TPARM_ARG" >&5
13699 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13700
13701 ### Enable compiling-in rcs id's
13702 echo "$as_me:13702: checking if RCS identifiers should be compiled-in" >&5
13703 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13704
13705 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13706 if test "${with_rcs_ids+set}" = set; then
13707   withval="$with_rcs_ids"
13708   with_rcs_ids=$withval
13709 else
13710   with_rcs_ids=no
13711 fi;
13712 echo "$as_me:13712: result: $with_rcs_ids" >&5
13713 echo "${ECHO_T}$with_rcs_ids" >&6
13714 test "x$with_rcs_ids" = xyes &&
13715 cat >>confdefs.h <<\EOF
13716 #define USE_RCS_IDS 1
13717 EOF
13718
13719 ###############################################################################
13720
13721 echo "$as_me:13721: checking format of man-pages" >&5
13722 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13723
13724 # Check whether --with-manpage-format or --without-manpage-format was given.
13725 if test "${with_manpage_format+set}" = set; then
13726   withval="$with_manpage_format"
13727   MANPAGE_FORMAT=$withval
13728 else
13729   MANPAGE_FORMAT=unknown
13730 fi;
13731
13732 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13733 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13734
13735 cf_unknown=
13736
13737 case $MANPAGE_FORMAT in
13738 (unknown)
13739         if test -z "$MANPATH" ; then
13740                 MANPATH="/usr/man:/usr/share/man"
13741         fi
13742
13743         # look for the 'date' man-page (it's most likely to be installed!)
13744         MANPAGE_FORMAT=
13745         cf_preform=no
13746         cf_catonly=yes
13747         cf_example=date
13748
13749         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13750         for cf_dir in $MANPATH; do
13751                 test -z "$cf_dir" && cf_dir=/usr/man
13752                 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
13753                 do
13754                         cf_test=`echo $cf_name | sed -e 's/*//'`
13755                         if test "x$cf_test" = "x$cf_name" ; then
13756
13757                                 case "$cf_name" in
13758                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13759                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13760                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13761                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13762                                 esac
13763
13764                                 case "$cf_name" in
13765                                 ($cf_dir/man*)
13766                                         cf_catonly=no
13767                                         ;;
13768                                 ($cf_dir/cat*)
13769                                         cf_preform=yes
13770                                         ;;
13771                                 esac
13772                                 break
13773                         fi
13774
13775                         # if we found a match in either man* or cat*, stop looking
13776                         if test -n "$MANPAGE_FORMAT" ; then
13777                                 cf_found=no
13778                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13779                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13780                                 case "$cf_name" in
13781                                 ($cf_dir/cat*)
13782                                         cf_found=yes
13783                                         ;;
13784                                 esac
13785                                 test $cf_found=yes && break
13786                         fi
13787                 done
13788                 # only check the first directory in $MANPATH where we find manpages
13789                 if test -n "$MANPAGE_FORMAT" ; then
13790                         break
13791                 fi
13792         done
13793         # if we did not find the example, just assume it is normal
13794         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13795         IFS="$ac_save_ifs"
13796         ;;
13797 (*)
13798         for cf_option in $MANPAGE_FORMAT; do
13799         case $cf_option in
13800         (gzip|compress|BSDI|normal|formatted|catonly)
13801                 ;;
13802         (*)
13803                 cf_unknown="$cf_unknown $cf_option"
13804                 ;;
13805         esac
13806         done
13807         ;;
13808 esac
13809
13810 echo "$as_me:13810: result: $MANPAGE_FORMAT" >&5
13811 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13812 if test -n "$cf_unknown" ; then
13813         { echo "$as_me:13813: WARNING: Unexpected manpage-format $cf_unknown" >&5
13814 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13815 fi
13816
13817 echo "$as_me:13817: checking for manpage renaming" >&5
13818 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13819
13820 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13821 if test "${with_manpage_renames+set}" = set; then
13822   withval="$with_manpage_renames"
13823   MANPAGE_RENAMES=$withval
13824 else
13825   MANPAGE_RENAMES=yes
13826 fi;
13827
13828 case ".$MANPAGE_RENAMES" in
13829 (.no)
13830         ;;
13831 (.|.yes)
13832         # Debian 'man' program?
13833         if test -f /etc/debian_version ; then
13834                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13835         else
13836                 MANPAGE_RENAMES=no
13837         fi
13838         ;;
13839 esac
13840
13841 if test "$MANPAGE_RENAMES" != no ; then
13842         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13843                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13844         elif test ! -f $MANPAGE_RENAMES ; then
13845                 { { echo "$as_me:13845: error: not a filename: $MANPAGE_RENAMES" >&5
13846 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13847    { (exit 1); exit 1; }; }
13848         fi
13849
13850         test ! -d man && mkdir man
13851
13852         # Construct a sed-script to perform renaming within man-pages
13853         if test -n "$MANPAGE_RENAMES" ; then
13854                 test ! -d man && mkdir man
13855                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13856         fi
13857 fi
13858
13859 echo "$as_me:13859: result: $MANPAGE_RENAMES" >&5
13860 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13861
13862 echo "$as_me:13862: checking if manpage aliases will be installed" >&5
13863 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13864
13865 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13866 if test "${with_manpage_aliases+set}" = set; then
13867   withval="$with_manpage_aliases"
13868   MANPAGE_ALIASES=$withval
13869 else
13870   MANPAGE_ALIASES=yes
13871 fi;
13872
13873 echo "$as_me:13873: result: $MANPAGE_ALIASES" >&5
13874 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13875
13876 case "x$LN_S" in
13877 (xln*)
13878         cf_use_symlinks=yes
13879         ;;
13880 (*)
13881         cf_use_symlinks=no
13882         ;;
13883 esac
13884
13885 MANPAGE_SYMLINKS=no
13886 if test "$MANPAGE_ALIASES" = yes ; then
13887 echo "$as_me:13887: checking if manpage symlinks should be used" >&5
13888 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13889
13890 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13891 if test "${with_manpage_symlinks+set}" = set; then
13892   withval="$with_manpage_symlinks"
13893   MANPAGE_SYMLINKS=$withval
13894 else
13895   MANPAGE_SYMLINKS=$cf_use_symlinks
13896 fi;
13897
13898 if test "$$cf_use_symlinks" = no; then
13899 if test "$MANPAGE_SYMLINKS" = yes ; then
13900         { echo "$as_me:13900: WARNING: cannot make symlinks" >&5
13901 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13902         MANPAGE_SYMLINKS=no
13903 fi
13904 fi
13905
13906 echo "$as_me:13906: result: $MANPAGE_SYMLINKS" >&5
13907 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13908 fi
13909
13910 echo "$as_me:13910: checking for manpage tbl" >&5
13911 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13912
13913 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13914 if test "${with_manpage_tbl+set}" = set; then
13915   withval="$with_manpage_tbl"
13916   MANPAGE_TBL=$withval
13917 else
13918   MANPAGE_TBL=no
13919 fi;
13920
13921 echo "$as_me:13921: result: $MANPAGE_TBL" >&5
13922 echo "${ECHO_T}$MANPAGE_TBL" >&6
13923
13924 if test "$prefix" = "NONE" ; then
13925         cf_prefix="$ac_default_prefix"
13926 else
13927         cf_prefix="$prefix"
13928 fi
13929
13930 case "$MANPAGE_FORMAT" in
13931 (*catonly*)
13932         cf_format=yes
13933         cf_inboth=no
13934         ;;
13935 (*formatted*)
13936         cf_format=yes
13937         cf_inboth=yes
13938         ;;
13939 (*)
13940         cf_format=no
13941         cf_inboth=no
13942         ;;
13943 esac
13944
13945 test ! -d man && mkdir man
13946
13947 cf_so_strip=
13948 cf_compress=
13949 case "$MANPAGE_FORMAT" in
13950 (*compress*)
13951         cf_so_strip="Z"
13952         cf_compress=compress
13953         ;;
13954 (*gzip*)
13955         cf_so_strip="gz"
13956         cf_compress=gzip
13957         ;;
13958 esac
13959
13960 cf_edit_man=./edit_man.sh
13961 cf_man_alias=`pwd`/man_alias.sed
13962
13963 cat >$cf_edit_man <<CF_EOF
13964 #! $SHELL
13965 # this script is generated by the configure-script CF_MAN_PAGES macro.
13966
13967 prefix="$cf_prefix"
13968 datarootdir="$datarootdir"
13969 datadir="$datadir"
13970
13971 NCURSES_MAJOR="$NCURSES_MAJOR"
13972 NCURSES_MINOR="$NCURSES_MINOR"
13973 NCURSES_PATCH="$NCURSES_PATCH"
13974
13975 NCURSES_OSPEED="$NCURSES_OSPEED"
13976 TERMINFO="$TERMINFO"
13977
13978 INSTALL="$INSTALL"
13979 INSTALL_DATA="$INSTALL_DATA"
13980
13981 transform="$program_transform_name"
13982
13983 TMP=\${TMPDIR:=/tmp}/man\$\$
13984 trap "rm -f \$TMP" 0 1 2 3 15
13985
13986 form=\$1
13987 shift || exit 1
13988
13989 verb=\$1
13990 shift || exit 1
13991
13992 mandir=\$1
13993 shift || exit 1
13994
13995 srcdir=\$1
13996 top_srcdir=\$srcdir/..
13997 shift || exit 1
13998
13999 if test "\$form" = normal ; then
14000         if test "$cf_format" = yes ; then
14001         if test "$cf_inboth" = no ; then
14002                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14003                 exit $?
14004         fi
14005         fi
14006         cf_subdir=\$mandir/man
14007         cf_tables=$MANPAGE_TBL
14008 else
14009         cf_subdir=\$mandir/cat
14010         cf_tables=yes
14011 fi
14012
14013 # process the list of source-files
14014 for i in \$* ; do
14015 case \$i in
14016 (*.orig|*.rej) ;;
14017 (*.[0-9]*)
14018         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14019         if test \$verb = installing ; then
14020         if test ! -d \$cf_subdir\${section} ; then
14021                 mkdir -p \$cf_subdir\$section
14022         fi
14023         fi
14024
14025         # replace variables in man page
14026         if test ! -f $cf_man_alias ; then
14027 cat >>$cf_man_alias <<-CF_EOF2
14028                 s,@DATADIR@,\$datadir,g
14029                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14030                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14031                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14032                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14033                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14034                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14035 CF_EOF
14036
14037         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14038         do
14039                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14040                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14041 cat >>$cf_edit_man <<-CF_EOF
14042                 s,@$cf_NAME@,$cf_name,g
14043 CF_EOF
14044         done
14045
14046 cat >>$cf_edit_man <<CF_EOF
14047 CF_EOF2
14048                 echo "...made $cf_man_alias"
14049         fi
14050
14051         aliases=
14052         cf_source=\`basename \$i\`
14053         inalias=\$cf_source
14054         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14055         if test ! -f \$inalias ; then
14056                 echo .. skipped \$cf_source
14057                 continue
14058         fi
14059 CF_EOF
14060
14061 if test "$MANPAGE_ALIASES" != no ; then
14062 cat >>$cf_edit_man <<CF_EOF
14063         nCurses=ignore.3x
14064         test $with_curses_h = yes && nCurses=ncurses.3x
14065         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14066 CF_EOF
14067 fi
14068
14069 if test "$MANPAGE_RENAMES" = no ; then
14070 cat >>$cf_edit_man <<CF_EOF
14071         # perform program transformations for section 1 man pages
14072         if test \$section = 1 ; then
14073                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14074         else
14075                 cf_target=\$cf_subdir\${section}/\$cf_source
14076         fi
14077 CF_EOF
14078 else
14079 cat >>$cf_edit_man <<CF_EOF
14080         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14081         if test -z "\$cf_target" ; then
14082                 echo '? missing rename for '\$cf_source
14083                 cf_target="\$cf_source"
14084         fi
14085         cf_target="\$cf_subdir\${section}/\${cf_target}"
14086
14087 CF_EOF
14088 fi
14089
14090 cat >>$cf_edit_man <<CF_EOF
14091         sed     -f $cf_man_alias \\
14092 CF_EOF
14093
14094 if test -f $MANPAGE_RENAMES ; then
14095 cat >>$cf_edit_man <<CF_EOF
14096                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14097 CF_EOF
14098 else
14099 cat >>$cf_edit_man <<CF_EOF
14100                 < \$i >\$TMP
14101 CF_EOF
14102 fi
14103
14104 cat >>$cf_edit_man <<CF_EOF
14105 if test \$cf_tables = yes ; then
14106         tbl \$TMP >\$TMP.out
14107         mv \$TMP.out \$TMP
14108 fi
14109 CF_EOF
14110
14111 if test $with_overwrite != yes ; then
14112 cat >>$cf_edit_man <<CF_EOF
14113         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14114         mv \$TMP.out \$TMP
14115 CF_EOF
14116 fi
14117
14118 if test $with_curses_h != yes ; then
14119 cat >>$cf_edit_man <<CF_EOF
14120         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14121         mv \$TMP.out \$TMP
14122 CF_EOF
14123 fi
14124
14125 cat >>$cf_edit_man <<CF_EOF
14126         if test \$form = format ; then
14127                 nroff -man \$TMP >\$TMP.out
14128                 mv \$TMP.out \$TMP
14129         fi
14130 CF_EOF
14131
14132 if test -n "$cf_compress" ; then
14133 cat >>$cf_edit_man <<CF_EOF
14134         if test \$verb = installing ; then
14135         if ( $cf_compress -f \$TMP )
14136         then
14137                 mv \$TMP.$cf_so_strip \$TMP
14138         fi
14139         fi
14140         cf_target="\$cf_target.$cf_so_strip"
14141 CF_EOF
14142 fi
14143
14144 case "$MANPAGE_FORMAT" in
14145 (*BSDI*)
14146 cat >>$cf_edit_man <<CF_EOF
14147         if test \$form = format ; then
14148                 # BSDI installs only .0 suffixes in the cat directories
14149                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14150         fi
14151 CF_EOF
14152   ;;
14153 esac
14154
14155 cat >>$cf_edit_man <<CF_EOF
14156         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14157         if test \$verb = installing ; then
14158                 echo \$verb \$cf_target
14159                 \$INSTALL_DATA \$TMP \$cf_target
14160                 test -d \$cf_subdir\${section} &&
14161                 test -n "\$aliases" && (
14162                         cd \$cf_subdir\${section} && (
14163                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14164                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14165                                 cf_target=\`basename \$cf_target\`
14166                                 for cf_alias in \$aliases
14167                                 do
14168                                         if test \$section = 1 ; then
14169                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14170                                         fi
14171
14172                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14173                                                 if test -f \$cf_alias\${suffix} ; then
14174                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14175                                                         then
14176                                                                 continue
14177                                                         fi
14178                                                 fi
14179                                                 echo .. \$verb alias \$cf_alias\${suffix}
14180 CF_EOF
14181 case "x$LN_S" in
14182 (*-f)
14183 cat >>$cf_edit_man <<CF_EOF
14184                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14185 CF_EOF
14186         ;;
14187 (*)
14188 cat >>$cf_edit_man <<CF_EOF
14189                                                 rm -f \$cf_alias\${suffix}
14190                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14191 CF_EOF
14192         ;;
14193 esac
14194 cat >>$cf_edit_man <<CF_EOF
14195                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14196                                                 echo ".so \$cf_source" >\$TMP
14197 CF_EOF
14198 if test -n "$cf_compress" ; then
14199 cat >>$cf_edit_man <<CF_EOF
14200                                                 if test -n "$cf_so_strip" ; then
14201                                                         $cf_compress -f \$TMP
14202                                                         mv \$TMP.$cf_so_strip \$TMP
14203                                                 fi
14204 CF_EOF
14205 fi
14206 cat >>$cf_edit_man <<CF_EOF
14207                                                 echo .. \$verb alias \$cf_alias\${suffix}
14208                                                 rm -f \$cf_alias\${suffix}
14209                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14210                                         fi
14211                                 done
14212                         )
14213                 )
14214         elif test \$verb = removing ; then
14215                 test -f \$cf_target && (
14216                         echo \$verb \$cf_target
14217                         rm -f \$cf_target
14218                 )
14219                 test -d \$cf_subdir\${section} &&
14220                 test -n "\$aliases" && (
14221                         cd \$cf_subdir\${section} && (
14222                                 for cf_alias in \$aliases
14223                                 do
14224                                         if test \$section = 1 ; then
14225                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14226                                         fi
14227
14228                                         echo .. \$verb alias \$cf_alias\${suffix}
14229                                         rm -f \$cf_alias\${suffix}
14230                                 done
14231                         )
14232                 )
14233         else
14234 #               echo ".hy 0"
14235                 cat \$TMP
14236         fi
14237         ;;
14238 esac
14239 done
14240
14241 if test $cf_inboth = yes ; then
14242 if test \$form != format ; then
14243         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14244 fi
14245 fi
14246
14247 exit 0
14248 CF_EOF
14249 chmod 755 $cf_edit_man
14250
14251 ###############################################################################
14252
14253 ### Note that some functions (such as const) are normally disabled anyway.
14254 echo "$as_me:14254: checking if you want to build with function extensions" >&5
14255 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14256
14257 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14258 if test "${enable_ext_funcs+set}" = set; then
14259   enableval="$enable_ext_funcs"
14260   with_ext_funcs=$enableval
14261 else
14262   with_ext_funcs=yes
14263 fi;
14264 echo "$as_me:14264: result: $with_ext_funcs" >&5
14265 echo "${ECHO_T}$with_ext_funcs" >&6
14266 if test "x$with_ext_funcs" = xyes ; then
14267         NCURSES_EXT_FUNCS=1
14268
14269 cat >>confdefs.h <<\EOF
14270 #define NCURSES_EXT_FUNCS 1
14271 EOF
14272
14273 cat >>confdefs.h <<\EOF
14274 #define HAVE_ASSUME_DEFAULT_COLORS 1
14275 EOF
14276
14277 cat >>confdefs.h <<\EOF
14278 #define HAVE_CURSES_VERSION 1
14279 EOF
14280
14281 cat >>confdefs.h <<\EOF
14282 #define HAVE_HAS_KEY 1
14283 EOF
14284
14285 cat >>confdefs.h <<\EOF
14286 #define HAVE_RESIZETERM 1
14287 EOF
14288
14289 cat >>confdefs.h <<\EOF
14290 #define HAVE_RESIZE_TERM 1
14291 EOF
14292
14293 cat >>confdefs.h <<\EOF
14294 #define HAVE_TERM_ENTRY_H 1
14295 EOF
14296
14297 cat >>confdefs.h <<\EOF
14298 #define HAVE_USE_DEFAULT_COLORS 1
14299 EOF
14300
14301 cat >>confdefs.h <<\EOF
14302 #define HAVE_USE_EXTENDED_NAMES 1
14303 EOF
14304
14305 cat >>confdefs.h <<\EOF
14306 #define HAVE_USE_SCREEN 1
14307 EOF
14308
14309 cat >>confdefs.h <<\EOF
14310 #define HAVE_USE_WINDOW 1
14311 EOF
14312
14313 cat >>confdefs.h <<\EOF
14314 #define HAVE_WRESIZE 1
14315 EOF
14316
14317         GENERATED_EXT_FUNCS=generated
14318         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14319 else
14320         NCURSES_EXT_FUNCS=0
14321         GENERATED_EXT_FUNCS=
14322 fi
14323
14324 echo "$as_me:14324: checking if you want to build with SCREEN extensions" >&5
14325 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14326
14327 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14328 if test "${enable_sp_funcs+set}" = set; then
14329   enableval="$enable_sp_funcs"
14330   with_sp_funcs=$enableval
14331 else
14332   with_sp_funcs=$cf_dft_ext_spfuncs
14333 fi;
14334 echo "$as_me:14334: result: $with_sp_funcs" >&5
14335 echo "${ECHO_T}$with_sp_funcs" >&6
14336 if test "x$with_sp_funcs" = xyes ; then
14337         NCURSES_SP_FUNCS=1
14338
14339 cat >>confdefs.h <<\EOF
14340 #define NCURSES_SP_FUNCS 1
14341 EOF
14342
14343 cat >>confdefs.h <<\EOF
14344 #define HAVE_TPUTS_SP 1
14345 EOF
14346
14347         GENERATED_SP_FUNCS=generated
14348 else
14349         NCURSES_SP_FUNCS=0
14350         GENERATED_SP_FUNCS=
14351 fi
14352
14353 echo "$as_me:14353: checking if you want to build with terminal-driver" >&5
14354 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14355
14356 # Check whether --enable-term-driver or --disable-term-driver was given.
14357 if test "${enable_term_driver+set}" = set; then
14358   enableval="$enable_term_driver"
14359   with_term_driver=$enableval
14360 else
14361   with_term_driver=no
14362 fi;
14363 echo "$as_me:14363: result: $with_term_driver" >&5
14364 echo "${ECHO_T}$with_term_driver" >&6
14365 if test "x$with_term_driver" = xyes ; then
14366
14367 cat >>confdefs.h <<\EOF
14368 #define USE_TERM_DRIVER 1
14369 EOF
14370
14371         if test "x$with_termlib" != xno ; then
14372                 { { echo "$as_me:14372: error: The term-driver option conflicts with the termlib option" >&5
14373 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14374    { (exit 1); exit 1; }; }
14375         fi
14376         if test "x$with_sp_funcs" != xyes ; then
14377                 { { echo "$as_me:14377: error: The term-driver option relies upon sp-funcs" >&5
14378 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14379    { (exit 1); exit 1; }; }
14380         fi
14381 fi
14382
14383 ###   use option --enable-const to turn on use of const beyond that in XSI.
14384 echo "$as_me:14384: checking for extended use of const keyword" >&5
14385 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14386
14387 # Check whether --enable-const or --disable-const was given.
14388 if test "${enable_const+set}" = set; then
14389   enableval="$enable_const"
14390   with_ext_const=$enableval
14391 else
14392   with_ext_const=$cf_dft_ext_const
14393 fi;
14394 echo "$as_me:14394: result: $with_ext_const" >&5
14395 echo "${ECHO_T}$with_ext_const" >&6
14396 NCURSES_CONST='/*nothing*/'
14397 if test "x$with_ext_const" = xyes ; then
14398         NCURSES_CONST=const
14399 fi
14400
14401 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14402 echo "$as_me:14402: checking if you want to use extended colors" >&5
14403 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14404
14405 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14406 if test "${enable_ext_colors+set}" = set; then
14407   enableval="$enable_ext_colors"
14408   with_ext_colors=$enableval
14409 else
14410   with_ext_colors=$cf_dft_ext_colors
14411 fi;
14412 echo "$as_me:14412: result: $with_ext_colors" >&5
14413 echo "${ECHO_T}$with_ext_colors" >&6
14414 NCURSES_EXT_COLORS=0
14415 if test "x$with_ext_colors" = xyes ; then
14416         if test "x$with_widec" != xyes ; then
14417                 { echo "$as_me:14417: WARNING: This option applies only to wide-character library" >&5
14418 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14419         else
14420                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14421
14422 if test "${with_abi_version+set}" != set; then
14423         case $cf_cv_rel_version in
14424         (5.*)
14425                 cf_cv_rel_version=6.0
14426                 cf_cv_abi_version=6
14427                 { echo "$as_me:14427: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14428 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14429                 ;;
14430         esac
14431 fi
14432
14433                 NCURSES_EXT_COLORS=1
14434
14435 cat >>confdefs.h <<\EOF
14436 #define NCURSES_EXT_COLORS 1
14437 EOF
14438
14439 cat >>confdefs.h <<\EOF
14440 #define HAVE_ALLOC_PAIR 1
14441 EOF
14442
14443 cat >>confdefs.h <<\EOF
14444 #define HAVE_INIT_EXTENDED_COLOR 1
14445 EOF
14446
14447 cat >>confdefs.h <<\EOF
14448 #define HAVE_RESET_COLOR_PAIRS 1
14449 EOF
14450
14451         fi
14452 fi
14453
14454 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14455 echo "$as_me:14455: checking if you want to use extended mouse encoding" >&5
14456 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14457
14458 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14459 if test "${enable_ext_mouse+set}" = set; then
14460   enableval="$enable_ext_mouse"
14461   with_ext_mouse=$enableval
14462 else
14463   with_ext_mouse=$cf_dft_ext_mouse
14464 fi;
14465 echo "$as_me:14465: result: $with_ext_mouse" >&5
14466 echo "${ECHO_T}$with_ext_mouse" >&6
14467 NCURSES_MOUSE_VERSION=1
14468 if test "x$with_ext_mouse" = xyes ; then
14469         NCURSES_MOUSE_VERSION=2
14470
14471 if test "${with_abi_version+set}" != set; then
14472         case $cf_cv_rel_version in
14473         (5.*)
14474                 cf_cv_rel_version=6.0
14475                 cf_cv_abi_version=6
14476                 { echo "$as_me:14476: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14477 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14478                 ;;
14479         esac
14480 fi
14481
14482 fi
14483
14484 ###   use option --enable-ext-putwin to turn on extended screendumps
14485 echo "$as_me:14485: checking if you want to use extended putwin/screendump" >&5
14486 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14487
14488 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14489 if test "${enable_ext_putwin+set}" = set; then
14490   enableval="$enable_ext_putwin"
14491   with_ext_putwin=$enableval
14492 else
14493   with_ext_putwin=$cf_dft_ext_putwin
14494 fi;
14495 echo "$as_me:14495: result: $with_ext_putwin" >&5
14496 echo "${ECHO_T}$with_ext_putwin" >&6
14497 if test "x$with_ext_putwin" = xyes ; then
14498
14499 cat >>confdefs.h <<\EOF
14500 #define NCURSES_EXT_PUTWIN 1
14501 EOF
14502
14503 fi
14504
14505 echo "$as_me:14505: checking if you want \$NCURSES_NO_PADDING code" >&5
14506 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14507
14508 # Check whether --enable-no-padding or --disable-no-padding was given.
14509 if test "${enable_no_padding+set}" = set; then
14510   enableval="$enable_no_padding"
14511   with_no_padding=$enableval
14512 else
14513   with_no_padding=$with_ext_funcs
14514 fi;
14515 echo "$as_me:14515: result: $with_no_padding" >&5
14516 echo "${ECHO_T}$with_no_padding" >&6
14517 test "x$with_no_padding" = xyes &&
14518 cat >>confdefs.h <<\EOF
14519 #define NCURSES_NO_PADDING 1
14520 EOF
14521
14522 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14523 echo "$as_me:14523: checking if you want SIGWINCH handler" >&5
14524 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14525
14526 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14527 if test "${enable_sigwinch+set}" = set; then
14528   enableval="$enable_sigwinch"
14529   with_sigwinch=$enableval
14530 else
14531   with_sigwinch=$with_ext_funcs
14532 fi;
14533 echo "$as_me:14533: result: $with_sigwinch" >&5
14534 echo "${ECHO_T}$with_sigwinch" >&6
14535 test "x$with_sigwinch" = xyes &&
14536 cat >>confdefs.h <<\EOF
14537 #define USE_SIGWINCH 1
14538 EOF
14539
14540 ###   use option --enable-tcap-names to allow user to define new capabilities
14541 echo "$as_me:14541: checking if you want user-definable terminal capabilities like termcap" >&5
14542 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14543
14544 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14545 if test "${enable_tcap_names+set}" = set; then
14546   enableval="$enable_tcap_names"
14547   with_tcap_names=$enableval
14548 else
14549   with_tcap_names=$with_ext_funcs
14550 fi;
14551 echo "$as_me:14551: result: $with_tcap_names" >&5
14552 echo "${ECHO_T}$with_tcap_names" >&6
14553 NCURSES_XNAMES=0
14554 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14555
14556 ##############################################################################
14557
14558 echo "$as_me:14558: checking if you want to link with the pthread library" >&5
14559 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14560
14561 # Check whether --with-pthread or --without-pthread was given.
14562 if test "${with_pthread+set}" = set; then
14563   withval="$with_pthread"
14564   with_pthread=$withval
14565 else
14566   with_pthread=no
14567 fi;
14568 echo "$as_me:14568: result: $with_pthread" >&5
14569 echo "${ECHO_T}$with_pthread" >&6
14570
14571 if test "$with_pthread" != no ; then
14572         echo "$as_me:14572: checking for pthread.h" >&5
14573 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14574 if test "${ac_cv_header_pthread_h+set}" = set; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 #include <pthread.h>
14581 _ACEOF
14582 if { (eval echo "$as_me:14582: \"$ac_cpp conftest.$ac_ext\"") >&5
14583   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14584   ac_status=$?
14585   egrep -v '^ *\+' conftest.er1 >conftest.err
14586   rm -f conftest.er1
14587   cat conftest.err >&5
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); } >/dev/null; then
14590   if test -s conftest.err; then
14591     ac_cpp_err=$ac_c_preproc_warn_flag
14592   else
14593     ac_cpp_err=
14594   fi
14595 else
14596   ac_cpp_err=yes
14597 fi
14598 if test -z "$ac_cpp_err"; then
14599   ac_cv_header_pthread_h=yes
14600 else
14601   echo "$as_me: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   ac_cv_header_pthread_h=no
14604 fi
14605 rm -f conftest.err conftest.$ac_ext
14606 fi
14607 echo "$as_me:14607: result: $ac_cv_header_pthread_h" >&5
14608 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14609 if test $ac_cv_header_pthread_h = yes; then
14610
14611 cat >>confdefs.h <<\EOF
14612 #define HAVE_PTHREADS_H 1
14613 EOF
14614
14615         for cf_lib_pthread in pthread c_r
14616         do
14617             echo "$as_me:14617: checking if we can link with the $cf_lib_pthread library" >&5
14618 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14619             cf_save_LIBS="$LIBS"
14620
14621 cf_add_libs="$LIBS"
14622 # reverse order
14623 cf_add_0lib=
14624 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14625 # filter duplicates
14626 for cf_add_1lib in $cf_add_0lib; do
14627         for cf_add_2lib in $cf_add_libs; do
14628                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14629                         cf_add_1lib=
14630                         break
14631                 fi
14632         done
14633         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14634 done
14635 LIBS="$cf_add_libs"
14636
14637             cat >conftest.$ac_ext <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14640
14641 #include <pthread.h>
14642
14643 int
14644 main (void)
14645 {
14646
14647                 int rc = pthread_create(0,0,0,0);
14648                 int r2 = pthread_mutexattr_settype(0, 0);
14649
14650   ;
14651   return 0;
14652 }
14653 _ACEOF
14654 rm -f conftest.$ac_objext conftest$ac_exeext
14655 if { (eval echo "$as_me:14655: \"$ac_link\"") >&5
14656   (eval $ac_link) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); } &&
14660          { ac_try='test -s conftest$ac_exeext'
14661   { (eval echo "$as_me:14661: \"$ac_try\"") >&5
14662   (eval $ac_try) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); }; }; then
14666   with_pthread=yes
14667 else
14668   echo "$as_me: failed program was:" >&5
14669 cat conftest.$ac_ext >&5
14670 with_pthread=no
14671 fi
14672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14673             LIBS="$cf_save_LIBS"
14674             echo "$as_me:14674: result: $with_pthread" >&5
14675 echo "${ECHO_T}$with_pthread" >&6
14676             test "$with_pthread" = yes && break
14677         done
14678
14679         if test "$with_pthread" = yes ; then
14680
14681 cf_add_libs="$LIBS"
14682 # reverse order
14683 cf_add_0lib=
14684 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14685 # filter duplicates
14686 for cf_add_1lib in $cf_add_0lib; do
14687         for cf_add_2lib in $cf_add_libs; do
14688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14689                         cf_add_1lib=
14690                         break
14691                 fi
14692         done
14693         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14694 done
14695 LIBS="$cf_add_libs"
14696
14697 cat >>confdefs.h <<\EOF
14698 #define HAVE_LIBPTHREADS 1
14699 EOF
14700
14701         else
14702             { { echo "$as_me:14702: error: Cannot link with pthread library" >&5
14703 echo "$as_me: error: Cannot link with pthread library" >&2;}
14704    { (exit 1); exit 1; }; }
14705         fi
14706
14707 fi
14708
14709 fi
14710
14711 if test "x$with_pthread" != xno; then
14712         echo "$as_me:14712: checking for pthread_kill" >&5
14713 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14714 if test "${ac_cv_func_pthread_kill+set}" = set; then
14715   echo $ECHO_N "(cached) $ECHO_C" >&6
14716 else
14717   cat >conftest.$ac_ext <<_ACEOF
14718 #line 14718 "configure"
14719 #include "confdefs.h"
14720 #define pthread_kill autoconf_temporary
14721 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14722 #undef pthread_kill
14723
14724 #ifdef __cplusplus
14725 extern "C"
14726 #endif
14727
14728 /* We use char because int might match the return type of a gcc2
14729    builtin and then its argument prototype would still apply.  */
14730 char pthread_kill (void);
14731
14732 int
14733 main (void)
14734 {
14735
14736 /* The GNU C library defines stubs for functions which it implements
14737     to always fail with ENOSYS.  Some functions are actually named
14738     something starting with __ and the normal name is an alias.  */
14739 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14740 #error found stub for pthread_kill
14741 #endif
14742
14743         return pthread_kill ();
14744   ;
14745   return 0;
14746 }
14747 _ACEOF
14748 rm -f conftest.$ac_objext conftest$ac_exeext
14749 if { (eval echo "$as_me:14749: \"$ac_link\"") >&5
14750   (eval $ac_link) 2>&5
14751   ac_status=$?
14752   echo "$as_me:14752: \$? = $ac_status" >&5
14753   (exit $ac_status); } &&
14754          { ac_try='test -s conftest$ac_exeext'
14755   { (eval echo "$as_me:14755: \"$ac_try\"") >&5
14756   (eval $ac_try) 2>&5
14757   ac_status=$?
14758   echo "$as_me:14758: \$? = $ac_status" >&5
14759   (exit $ac_status); }; }; then
14760   ac_cv_func_pthread_kill=yes
14761 else
14762   echo "$as_me: failed program was:" >&5
14763 cat conftest.$ac_ext >&5
14764 ac_cv_func_pthread_kill=no
14765 fi
14766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14767 fi
14768 echo "$as_me:14768: result: $ac_cv_func_pthread_kill" >&5
14769 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14770 if test $ac_cv_func_pthread_kill = yes; then
14771
14772                 echo "$as_me:14772: checking if you want to allow EINTR in wgetch with pthreads" >&5
14773 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14774
14775 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14776 if test "${enable_pthreads_eintr+set}" = set; then
14777   enableval="$enable_pthreads_eintr"
14778   use_pthreads_eintr=$enableval
14779 else
14780   use_pthreads_eintr=no
14781 fi;
14782                 echo "$as_me:14782: result: $use_pthreads_eintr" >&5
14783 echo "${ECHO_T}$use_pthreads_eintr" >&6
14784                 if test "x$use_pthreads_eintr" = xyes ; then
14785
14786 cat >>confdefs.h <<\EOF
14787 #define USE_PTHREADS_EINTR 1
14788 EOF
14789
14790                 fi
14791 fi
14792
14793         echo "$as_me:14793: checking if you want to use weak-symbols for pthreads" >&5
14794 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14795
14796 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14797 if test "${enable_weak_symbols+set}" = set; then
14798   enableval="$enable_weak_symbols"
14799   use_weak_symbols=$enableval
14800 else
14801   use_weak_symbols=no
14802 fi;
14803         echo "$as_me:14803: result: $use_weak_symbols" >&5
14804 echo "${ECHO_T}$use_weak_symbols" >&6
14805         if test "x$use_weak_symbols" = xyes ; then
14806
14807 echo "$as_me:14807: checking if $CC supports weak symbols" >&5
14808 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14809 if test "${cf_cv_weak_symbols+set}" = set; then
14810   echo $ECHO_N "(cached) $ECHO_C" >&6
14811 else
14812
14813 cat >conftest.$ac_ext <<_ACEOF
14814 #line 14814 "configure"
14815 #include "confdefs.h"
14816
14817 #include <stdio.h>
14818 int
14819 main (void)
14820 {
14821
14822 #if defined(__GNUC__)
14823 #  if defined __USE_ISOC99
14824 #    define _cat_pragma(exp)    _Pragma(#exp)
14825 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14826 #  else
14827 #    define _weak_pragma(exp)
14828 #  endif
14829 #  define _declare(name)        __extension__ extern __typeof__(name) name
14830 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14831 #endif
14832
14833 weak_symbol(fopen);
14834
14835   ;
14836   return 0;
14837 }
14838 _ACEOF
14839 rm -f conftest.$ac_objext
14840 if { (eval echo "$as_me:14840: \"$ac_compile\"") >&5
14841   (eval $ac_compile) 2>&5
14842   ac_status=$?
14843   echo "$as_me:14843: \$? = $ac_status" >&5
14844   (exit $ac_status); } &&
14845          { ac_try='test -s conftest.$ac_objext'
14846   { (eval echo "$as_me:14846: \"$ac_try\"") >&5
14847   (eval $ac_try) 2>&5
14848   ac_status=$?
14849   echo "$as_me:14849: \$? = $ac_status" >&5
14850   (exit $ac_status); }; }; then
14851   cf_cv_weak_symbols=yes
14852 else
14853   echo "$as_me: failed program was:" >&5
14854 cat conftest.$ac_ext >&5
14855 cf_cv_weak_symbols=no
14856 fi
14857 rm -f conftest.$ac_objext conftest.$ac_ext
14858
14859 fi
14860 echo "$as_me:14860: result: $cf_cv_weak_symbols" >&5
14861 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14862
14863         else
14864                 cf_cv_weak_symbols=no
14865         fi
14866
14867         if test "x$cf_cv_weak_symbols" = xyes ; then
14868
14869 cat >>confdefs.h <<\EOF
14870 #define USE_WEAK_SYMBOLS 1
14871 EOF
14872
14873         fi
14874 fi
14875
14876 PTHREAD=
14877 if test "x$with_pthread" = "xyes" ; then
14878
14879 cat >>confdefs.h <<\EOF
14880 #define USE_PTHREADS 1
14881 EOF
14882
14883         enable_reentrant=yes
14884         if test "x$cf_cv_weak_symbols" = xyes ; then
14885                 PTHREAD=-lpthread
14886
14887 cf_add_libs="$PRIVATE_LIBS"
14888 # reverse order
14889 cf_add_0lib=
14890 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14891 # filter duplicates
14892 for cf_add_1lib in $cf_add_0lib; do
14893         for cf_add_2lib in $cf_add_libs; do
14894                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14895                         cf_add_1lib=
14896                         break
14897                 fi
14898         done
14899         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14900 done
14901 PRIVATE_LIBS="$cf_add_libs"
14902
14903         fi
14904 fi
14905
14906 # Reentrant code has to be opaque; there's little advantage to making ncurses
14907 # opaque outside of that, so there is no --enable-opaque option.  We can use
14908 # this option without --with-pthreads, but this will be always set for
14909 # pthreads.
14910 echo "$as_me:14910: checking if you want reentrant code" >&5
14911 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14912
14913 # Check whether --enable-reentrant or --disable-reentrant was given.
14914 if test "${enable_reentrant+set}" = set; then
14915   enableval="$enable_reentrant"
14916   with_reentrant=$enableval
14917 else
14918   with_reentrant=no
14919 fi;
14920 echo "$as_me:14920: result: $with_reentrant" >&5
14921 echo "${ECHO_T}$with_reentrant" >&6
14922 if test "x$with_reentrant" = xyes ; then
14923         cf_cv_enable_reentrant=1
14924         cf_cv_enable_opaque="NCURSES_INTERNALS"
14925         NCURSES_SIZE_T=int
14926         if test "x$cf_cv_weak_symbols" = xyes ; then
14927
14928 # remove pthread library from $LIBS
14929 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14930
14931 cf_add_libs="$TEST_LIBS"
14932 # reverse order
14933 cf_add_0lib=
14934 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14935 # filter duplicates
14936 for cf_add_1lib in $cf_add_0lib; do
14937         for cf_add_2lib in $cf_add_libs; do
14938                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14939                         cf_add_1lib=
14940                         break
14941                 fi
14942         done
14943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14944 done
14945 TEST_LIBS="$cf_add_libs"
14946
14947 cf_add_libs="$TEST_LIBS2"
14948 # reverse order
14949 cf_add_0lib=
14950 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14951 # filter duplicates
14952 for cf_add_1lib in $cf_add_0lib; do
14953         for cf_add_2lib in $cf_add_libs; do
14954                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14955                         cf_add_1lib=
14956                         break
14957                 fi
14958         done
14959         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14960 done
14961 TEST_LIBS2="$cf_add_libs"
14962
14963 cf_add_libs="$PRIVATE_LIBS"
14964 # reverse order
14965 cf_add_0lib=
14966 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14967 # filter duplicates
14968 for cf_add_1lib in $cf_add_0lib; do
14969         for cf_add_2lib in $cf_add_libs; do
14970                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14971                         cf_add_1lib=
14972                         break
14973                 fi
14974         done
14975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14976 done
14977 PRIVATE_LIBS="$cf_add_libs"
14978
14979         else
14980                 # when not using weak symbols but with_reentrant,
14981                 # add 't' to the library suffix on all platforms
14982                 # except cygwin, where we only do that if ALSO
14983                 # compiling with full thread support.
14984                 case "$host" in
14985                 (*cygwin* | *msys*)
14986                         if test "$with_pthread" = "yes" ; then
14987                                 if test "x$disable_lib_suffixes" = "xno" ; then
14988                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14989                                 fi
14990                         fi ;;
14991                 (*)
14992                         if test "x$disable_lib_suffixes" = "xno" ; then
14993                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14994                         fi
14995                         ;;
14996                 esac
14997         fi
14998
14999 cat >>confdefs.h <<\EOF
15000 #define USE_REENTRANT 1
15001 EOF
15002
15003 if test "${with_abi_version+set}" != set; then
15004         case $cf_cv_rel_version in
15005         (5.*)
15006                 cf_cv_rel_version=6.0
15007                 cf_cv_abi_version=6
15008                 { echo "$as_me:15008: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15009 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15010                 ;;
15011         esac
15012 fi
15013
15014 else
15015         cf_cv_enable_reentrant=0
15016         cf_cv_enable_opaque="NCURSES_OPAQUE"
15017         NCURSES_SIZE_T=short
15018 fi
15019
15020 echo "$as_me:15020: checking if you want opaque curses-library structures" >&5
15021 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15022
15023 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15024 if test "${enable_opaque_curses+set}" = set; then
15025   enableval="$enable_opaque_curses"
15026   test "$enableval" != yes && enableval=no
15027         if test "$enableval" != "no" ; then
15028     enable_opaque_curses=yes
15029         else
15030
15031          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15032          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15033
15034         fi
15035 else
15036   enableval=no
15037
15038          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15039          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15040
15041 fi;
15042 echo "$as_me:15042: result: $enable_opaque_curses" >&5
15043 echo "${ECHO_T}$enable_opaque_curses" >&6
15044
15045 test "$cf_cv_enable_reentrant" = 1 && \
15046 test "$enable_opaque_curses" = no && \
15047 { { echo "$as_me:15047: error: reentrant configuration requires opaque library" >&5
15048 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15049    { (exit 1); exit 1; }; }
15050
15051 echo "$as_me:15051: checking if you want opaque form-library structures" >&5
15052 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15053
15054 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15055 if test "${enable_opaque_form+set}" = set; then
15056   enableval="$enable_opaque_form"
15057   enable_opaque_form=yes
15058 else
15059   enable_opaque_form=no
15060 fi;
15061 echo "$as_me:15061: result: $enable_opaque_form" >&5
15062 echo "${ECHO_T}$enable_opaque_form" >&6
15063
15064 echo "$as_me:15064: checking if you want opaque menu-library structures" >&5
15065 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15066
15067 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15068 if test "${enable_opaque_menu+set}" = set; then
15069   enableval="$enable_opaque_menu"
15070   enable_opaque_menu=yes
15071 else
15072   enable_opaque_menu=no
15073 fi;
15074 echo "$as_me:15074: result: $enable_opaque_menu" >&5
15075 echo "${ECHO_T}$enable_opaque_menu" >&6
15076
15077 echo "$as_me:15077: checking if you want opaque panel-library structures" >&5
15078 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15079
15080 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15081 if test "${enable_opaque_panel+set}" = set; then
15082   enableval="$enable_opaque_panel"
15083   enable_opaque_panel=yes
15084 else
15085   enable_opaque_panel=no
15086 fi;
15087 echo "$as_me:15087: result: $enable_opaque_panel" >&5
15088 echo "${ECHO_T}$enable_opaque_panel" >&6
15089
15090 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15091 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15092 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15093 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15094
15095 ### Allow using a different wrap-prefix
15096 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15097         echo "$as_me:15097: checking for prefix used to wrap public variables" >&5
15098 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15099
15100 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15101 if test "${with_wrap_prefix+set}" = set; then
15102   withval="$with_wrap_prefix"
15103   NCURSES_WRAP_PREFIX=$withval
15104 else
15105   NCURSES_WRAP_PREFIX=_nc_
15106 fi;
15107         echo "$as_me:15107: result: $NCURSES_WRAP_PREFIX" >&5
15108 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15109 else
15110         NCURSES_WRAP_PREFIX=_nc_
15111 fi
15112
15113 cat >>confdefs.h <<EOF
15114 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15115 EOF
15116
15117 ###############################################################################
15118 # These options are relatively safe to experiment with.
15119
15120 echo "$as_me:15120: checking if you want all development code" >&5
15121 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15122
15123 # Check whether --with-develop or --without-develop was given.
15124 if test "${with_develop+set}" = set; then
15125   withval="$with_develop"
15126   with_develop=$withval
15127 else
15128   with_develop=no
15129 fi;
15130 echo "$as_me:15130: result: $with_develop" >&5
15131 echo "${ECHO_T}$with_develop" >&6
15132
15133 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15134 echo "$as_me:15134: checking if you want hard-tabs code" >&5
15135 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15136
15137 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15138 if test "${enable_hard_tabs+set}" = set; then
15139   enableval="$enable_hard_tabs"
15140
15141 else
15142   enable_hard_tabs=$with_develop
15143 fi;
15144 echo "$as_me:15144: result: $enable_hard_tabs" >&5
15145 echo "${ECHO_T}$enable_hard_tabs" >&6
15146 test "x$enable_hard_tabs" = xyes &&
15147 cat >>confdefs.h <<\EOF
15148 #define USE_HARD_TABS 1
15149 EOF
15150
15151 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15152 echo "$as_me:15152: checking if you want limited support for xmc" >&5
15153 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15154
15155 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15156 if test "${enable_xmc_glitch+set}" = set; then
15157   enableval="$enable_xmc_glitch"
15158
15159 else
15160   enable_xmc_glitch=$with_develop
15161 fi;
15162 echo "$as_me:15162: result: $enable_xmc_glitch" >&5
15163 echo "${ECHO_T}$enable_xmc_glitch" >&6
15164 test "x$enable_xmc_glitch" = xyes &&
15165 cat >>confdefs.h <<\EOF
15166 #define USE_XMC_SUPPORT 1
15167 EOF
15168
15169 ###############################################################################
15170 # These are just experimental, probably should not be in a package:
15171
15172 echo "$as_me:15172: checking if you do not want to assume colors are white-on-black" >&5
15173 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15174
15175 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15176 if test "${enable_assumed_color+set}" = set; then
15177   enableval="$enable_assumed_color"
15178   with_assumed_color=$enableval
15179 else
15180   with_assumed_color=yes
15181 fi;
15182 echo "$as_me:15182: result: $with_assumed_color" >&5
15183 echo "${ECHO_T}$with_assumed_color" >&6
15184 test "x$with_assumed_color" = xyes &&
15185 cat >>confdefs.h <<\EOF
15186 #define USE_ASSUMED_COLOR 1
15187 EOF
15188
15189 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15190 echo "$as_me:15190: checking if you want hashmap scrolling-optimization code" >&5
15191 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15192
15193 # Check whether --enable-hashmap or --disable-hashmap was given.
15194 if test "${enable_hashmap+set}" = set; then
15195   enableval="$enable_hashmap"
15196   with_hashmap=$enableval
15197 else
15198   with_hashmap=yes
15199 fi;
15200 echo "$as_me:15200: result: $with_hashmap" >&5
15201 echo "${ECHO_T}$with_hashmap" >&6
15202 test "x$with_hashmap" = xyes &&
15203 cat >>confdefs.h <<\EOF
15204 #define USE_HASHMAP 1
15205 EOF
15206
15207 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15208 echo "$as_me:15208: checking if you want colorfgbg code" >&5
15209 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15210
15211 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15212 if test "${enable_colorfgbg+set}" = set; then
15213   enableval="$enable_colorfgbg"
15214   with_colorfgbg=$enableval
15215 else
15216   with_colorfgbg=no
15217 fi;
15218 echo "$as_me:15218: result: $with_colorfgbg" >&5
15219 echo "${ECHO_T}$with_colorfgbg" >&6
15220 test "x$with_colorfgbg" = xyes &&
15221 cat >>confdefs.h <<\EOF
15222 #define USE_COLORFGBG 1
15223 EOF
15224
15225 ###   use option --enable-interop to turn on use of bindings used for interop
15226 echo "$as_me:15226: checking if you want interop bindings" >&5
15227 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15228
15229 # Check whether --enable-interop or --disable-interop was given.
15230 if test "${enable_interop+set}" = set; then
15231   enableval="$enable_interop"
15232   with_exp_interop=$enableval
15233 else
15234   with_exp_interop=$cf_dft_interop
15235 fi;
15236 echo "$as_me:15236: result: $with_exp_interop" >&5
15237 echo "${ECHO_T}$with_exp_interop" >&6
15238
15239 NCURSES_INTEROP_FUNCS=0
15240 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15241
15242 echo "$as_me:15242: checking if you want experimental safe-sprintf code" >&5
15243 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15244
15245 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15246 if test "${enable_safe_sprintf+set}" = set; then
15247   enableval="$enable_safe_sprintf"
15248   with_safe_sprintf=$enableval
15249 else
15250   with_safe_sprintf=no
15251 fi;
15252 echo "$as_me:15252: result: $with_safe_sprintf" >&5
15253 echo "${ECHO_T}$with_safe_sprintf" >&6
15254
15255 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15256 # when hashmap is used scroll hints are useless
15257 if test "$with_hashmap" = no ; then
15258 echo "$as_me:15258: checking if you want to experiment without scrolling-hints code" >&5
15259 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15260
15261 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15262 if test "${enable_scroll_hints+set}" = set; then
15263   enableval="$enable_scroll_hints"
15264   with_scroll_hints=$enableval
15265 else
15266   with_scroll_hints=yes
15267 fi;
15268 echo "$as_me:15268: result: $with_scroll_hints" >&5
15269 echo "${ECHO_T}$with_scroll_hints" >&6
15270 test "x$with_scroll_hints" = xyes &&
15271 cat >>confdefs.h <<\EOF
15272 #define USE_SCROLL_HINTS 1
15273 EOF
15274
15275 fi
15276
15277 echo "$as_me:15277: checking if you want wgetch-events code" >&5
15278 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15279
15280 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15281 if test "${enable_wgetch_events+set}" = set; then
15282   enableval="$enable_wgetch_events"
15283   with_wgetch_events=$enableval
15284 else
15285   with_wgetch_events=no
15286 fi;
15287 echo "$as_me:15287: result: $with_wgetch_events" >&5
15288 echo "${ECHO_T}$with_wgetch_events" >&6
15289 test "x$with_wgetch_events" = xyes &&
15290 cat >>confdefs.h <<\EOF
15291 #define NCURSES_WGETCH_EVENTS 1
15292 EOF
15293
15294 ###############################################################################
15295
15296 ###     use option --disable-echo to suppress full display compiling commands
15297
15298 echo "$as_me:15298: checking if you want to see long compiling messages" >&5
15299 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15300
15301 # Check whether --enable-echo or --disable-echo was given.
15302 if test "${enable_echo+set}" = set; then
15303   enableval="$enable_echo"
15304   test "$enableval" != no && enableval=yes
15305         if test "$enableval" != "yes" ; then
15306
15307         ECHO_LT='--silent'
15308         ECHO_LD='@echo linking $@;'
15309         RULE_CC='@echo compiling $<'
15310         SHOW_CC='@echo compiling $@'
15311         ECHO_CC='@'
15312
15313         else
15314
15315         ECHO_LT=''
15316         ECHO_LD=''
15317         RULE_CC=''
15318         SHOW_CC=''
15319         ECHO_CC=''
15320
15321         fi
15322 else
15323   enableval=yes
15324
15325         ECHO_LT=''
15326         ECHO_LD=''
15327         RULE_CC=''
15328         SHOW_CC=''
15329         ECHO_CC=''
15330
15331 fi;
15332 echo "$as_me:15332: result: $enableval" >&5
15333 echo "${ECHO_T}$enableval" >&6
15334
15335 if test "x$enable_echo" = xyes; then
15336         ECHO_LINK=
15337 else
15338         ECHO_LINK='@ echo linking $@ ... ;'
15339         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15340         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15341 fi
15342
15343 # --disable-stripping is used for debugging
15344
15345 echo "$as_me:15345: checking if you want to install stripped executables" >&5
15346 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15347
15348 # Check whether --enable-stripping or --disable-stripping was given.
15349 if test "${enable_stripping+set}" = set; then
15350   enableval="$enable_stripping"
15351   test "$enableval" != no && enableval=yes
15352         if test "$enableval" != "yes" ; then
15353     with_stripping=no
15354         else
15355                 with_stripping=yes
15356         fi
15357 else
15358   enableval=yes
15359         with_stripping=yes
15360
15361 fi;
15362 echo "$as_me:15362: result: $with_stripping" >&5
15363 echo "${ECHO_T}$with_stripping" >&6
15364
15365 if test "$with_stripping" = yes
15366 then
15367         INSTALL_OPT_S="-s"
15368 else
15369         INSTALL_OPT_S=
15370 fi
15371
15372 : ${INSTALL:=install}
15373 echo "$as_me:15373: checking if install accepts -p option" >&5
15374 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15375 if test "${cf_cv_install_p+set}" = set; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378
15379         rm -rf conftest*
15380         date >conftest.in
15381         mkdir conftest.out
15382         sleep 3
15383         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15384         then
15385                 if test -f conftest.out/conftest.in
15386                 then
15387                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15388                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15389                         if test -s conftest.err
15390                         then
15391                                 cf_cv_install_p=no
15392                         else
15393                                 cf_cv_install_p=yes
15394                         fi
15395                 else
15396                         cf_cv_install_p=no
15397                 fi
15398         else
15399                 cf_cv_install_p=no
15400         fi
15401         rm -rf conftest*
15402
15403 fi
15404 echo "$as_me:15404: result: $cf_cv_install_p" >&5
15405 echo "${ECHO_T}$cf_cv_install_p" >&6
15406
15407 echo "$as_me:15407: checking if install needs to be told about ownership" >&5
15408 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15409 case `$ac_config_guess` in
15410 (*minix)
15411         with_install_o=yes
15412         ;;
15413 (*)
15414         with_install_o=no
15415         ;;
15416 esac
15417
15418 echo "$as_me:15418: result: $with_install_o" >&5
15419 echo "${ECHO_T}$with_install_o" >&6
15420 if test "x$with_install_o" = xyes
15421 then
15422         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'`
15423 else
15424         INSTALL_OPT_O=
15425 fi
15426
15427 # If we're avoiding relinking of shared libraries during install, that is to
15428 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15429 # the install program has "-p" (for preserving timestamps).
15430 cf_cv_do_reranlib=yes
15431 if test "x$cf_cv_install_p" = xyes
15432 then
15433         if test "x$cf_cv_do_relink" != xyes
15434         then
15435                 cf_cv_do_reranlib=no
15436                 INSTALL_OPT_P="-p"
15437                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15438         fi
15439 fi
15440
15441 ###     use option --enable-warnings to turn on all gcc warnings
15442 echo "$as_me:15442: checking if you want to see compiler warnings" >&5
15443 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15444
15445 # Check whether --enable-warnings or --disable-warnings was given.
15446 if test "${enable_warnings+set}" = set; then
15447   enableval="$enable_warnings"
15448   with_warnings=$enableval
15449 fi;
15450 echo "$as_me:15450: result: $with_warnings" >&5
15451 echo "${ECHO_T}$with_warnings" >&6
15452
15453 if test "x$with_warnings" = "xyes"; then
15454
15455         ADAFLAGS="$ADAFLAGS -gnatg"
15456
15457 if test "x$have_x" = xyes; then
15458
15459 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15460 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15461 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15462 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15463 for cf_X_CFLAGS in $X_CFLAGS
15464 do
15465         case "x$cf_X_CFLAGS" in
15466         x-[IUD]*)
15467                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15468                 ;;
15469         *)
15470                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15471                 ;;
15472         esac
15473 done
15474
15475 cat >conftest.$ac_ext <<_ACEOF
15476 #line 15476 "configure"
15477 #include "confdefs.h"
15478
15479 #include <stdlib.h>
15480 #include <X11/Intrinsic.h>
15481
15482 int
15483 main (void)
15484 {
15485 String foo = malloc(1)
15486   ;
15487   return 0;
15488 }
15489 _ACEOF
15490 rm -f conftest.$ac_objext
15491 if { (eval echo "$as_me:15491: \"$ac_compile\"") >&5
15492   (eval $ac_compile) 2>&5
15493   ac_status=$?
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); } &&
15496          { ac_try='test -s conftest.$ac_objext'
15497   { (eval echo "$as_me:15497: \"$ac_try\"") >&5
15498   (eval $ac_try) 2>&5
15499   ac_status=$?
15500   echo "$as_me:15500: \$? = $ac_status" >&5
15501   (exit $ac_status); }; }; then
15502
15503 echo "$as_me:15503: checking for X11/Xt const-feature" >&5
15504 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15505 if test "${cf_cv_const_x_string+set}" = set; then
15506   echo $ECHO_N "(cached) $ECHO_C" >&6
15507 else
15508
15509         cat >conftest.$ac_ext <<_ACEOF
15510 #line 15510 "configure"
15511 #include "confdefs.h"
15512
15513 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15514 #undef  XTSTRINGDEFINES /* X11R5 and later */
15515 #include <stdlib.h>
15516 #include <X11/Intrinsic.h>
15517
15518 int
15519 main (void)
15520 {
15521 String foo = malloc(1); *foo = 0
15522   ;
15523   return 0;
15524 }
15525 _ACEOF
15526 rm -f conftest.$ac_objext
15527 if { (eval echo "$as_me:15527: \"$ac_compile\"") >&5
15528   (eval $ac_compile) 2>&5
15529   ac_status=$?
15530   echo "$as_me:15530: \$? = $ac_status" >&5
15531   (exit $ac_status); } &&
15532          { ac_try='test -s conftest.$ac_objext'
15533   { (eval echo "$as_me:15533: \"$ac_try\"") >&5
15534   (eval $ac_try) 2>&5
15535   ac_status=$?
15536   echo "$as_me:15536: \$? = $ac_status" >&5
15537   (exit $ac_status); }; }; then
15538
15539                         cf_cv_const_x_string=no
15540
15541 else
15542   echo "$as_me: failed program was:" >&5
15543 cat conftest.$ac_ext >&5
15544
15545                         cf_cv_const_x_string=yes
15546
15547 fi
15548 rm -f conftest.$ac_objext conftest.$ac_ext
15549
15550 fi
15551 echo "$as_me:15551: result: $cf_cv_const_x_string" >&5
15552 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15553
15554 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15555 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15556 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15557
15558 case $cf_cv_const_x_string in
15559 (no)
15560
15561         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15562         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15563
15564         ;;
15565 (*)
15566
15567         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15568         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15569
15570         ;;
15571 esac
15572
15573 else
15574   echo "$as_me: failed program was:" >&5
15575 cat conftest.$ac_ext >&5
15576 fi
15577 rm -f conftest.$ac_objext conftest.$ac_ext
15578  fi
15579 cat > conftest.$ac_ext <<EOF
15580 #line 15580 "${as_me:-configure}"
15581 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15582 EOF
15583 if test "$INTEL_COMPILER" = yes
15584 then
15585 # The "-wdXXX" options suppress warnings:
15586 # remark #1419: external declaration in primary source file
15587 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15588 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15589 # remark #193: zero used for undefined preprocessing identifier
15590 # remark #593: variable "curs_sb_left_arrow" was set but never used
15591 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15592 # remark #869: parameter "tw" was never referenced
15593 # remark #981: operands are evaluated in unspecified order
15594 # warning #279: controlling expression is constant
15595
15596         { echo "$as_me:15596: checking for $CC warning options..." >&5
15597 echo "$as_me: checking for $CC warning options..." >&6;}
15598         cf_save_CFLAGS="$CFLAGS"
15599         EXTRA_CFLAGS="-Wall"
15600         for cf_opt in \
15601                 wd1419 \
15602                 wd1683 \
15603                 wd1684 \
15604                 wd193 \
15605                 wd593 \
15606                 wd279 \
15607                 wd810 \
15608                 wd869 \
15609                 wd981
15610         do
15611                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15612                 if { (eval echo "$as_me:15612: \"$ac_compile\"") >&5
15613   (eval $ac_compile) 2>&5
15614   ac_status=$?
15615   echo "$as_me:15615: \$? = $ac_status" >&5
15616   (exit $ac_status); }; then
15617                         test -n "$verbose" && echo "$as_me:15617: result: ... -$cf_opt" >&5
15618 echo "${ECHO_T}... -$cf_opt" >&6
15619                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15620                 fi
15621         done
15622         CFLAGS="$cf_save_CFLAGS"
15623 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15624 then
15625         { echo "$as_me:15625: checking for $CC warning options..." >&5
15626 echo "$as_me: checking for $CC warning options..." >&6;}
15627         cf_save_CFLAGS="$CFLAGS"
15628         EXTRA_CFLAGS=
15629         cf_warn_CONST=""
15630         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15631         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15632         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15633         for cf_opt in W Wall \
15634                 Wbad-function-cast \
15635                 Wcast-align \
15636                 Wcast-qual \
15637                 Wdeclaration-after-statement \
15638                 Wextra \
15639                 Winline \
15640                 Wmissing-declarations \
15641                 Wmissing-prototypes \
15642                 Wnested-externs \
15643                 Wpointer-arith \
15644                 Wshadow \
15645                 Wstrict-prototypes \
15646                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15647         do
15648                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15649                 if { (eval echo "$as_me:15649: \"$ac_compile\"") >&5
15650   (eval $ac_compile) 2>&5
15651   ac_status=$?
15652   echo "$as_me:15652: \$? = $ac_status" >&5
15653   (exit $ac_status); }; then
15654                         test -n "$verbose" && echo "$as_me:15654: result: ... -$cf_opt" >&5
15655 echo "${ECHO_T}... -$cf_opt" >&6
15656                         case $cf_opt in
15657                         (Winline)
15658                                 case $GCC_VERSION in
15659                                 ([34].*)
15660                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15661
15662 echo "${as_me:-configure}:15662: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15663
15664                                         continue;;
15665                                 esac
15666                                 ;;
15667                         (Wpointer-arith)
15668                                 case $GCC_VERSION in
15669                                 ([12].*)
15670                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15671
15672 echo "${as_me:-configure}:15672: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15673
15674                                         continue;;
15675                                 esac
15676                                 ;;
15677                         esac
15678                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15679                 fi
15680         done
15681         CFLAGS="$cf_save_CFLAGS"
15682 fi
15683 rm -rf conftest*
15684
15685         if test "x$cf_with_cxx" = xyes ; then
15686
15687 INTEL_CPLUSPLUS=no
15688
15689 if test "$GCC" = yes ; then
15690         case $host_os in
15691         (linux*|gnu*)
15692                 echo "$as_me:15692: checking if this is really Intel C++ compiler" >&5
15693 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15694                 cf_save_CFLAGS="$CXXFLAGS"
15695                 CXXFLAGS="$CXXFLAGS -no-gcc"
15696                 cat >conftest.$ac_ext <<_ACEOF
15697 #line 15697 "configure"
15698 #include "confdefs.h"
15699
15700 int
15701 main (void)
15702 {
15703
15704 #ifdef __INTEL_COMPILER
15705 #else
15706 make an error
15707 #endif
15708
15709   ;
15710   return 0;
15711 }
15712 _ACEOF
15713 rm -f conftest.$ac_objext
15714 if { (eval echo "$as_me:15714: \"$ac_compile\"") >&5
15715   (eval $ac_compile) 2>&5
15716   ac_status=$?
15717   echo "$as_me:15717: \$? = $ac_status" >&5
15718   (exit $ac_status); } &&
15719          { ac_try='test -s conftest.$ac_objext'
15720   { (eval echo "$as_me:15720: \"$ac_try\"") >&5
15721   (eval $ac_try) 2>&5
15722   ac_status=$?
15723   echo "$as_me:15723: \$? = $ac_status" >&5
15724   (exit $ac_status); }; }; then
15725   INTEL_CPLUSPLUS=yes
15726 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15727
15728 else
15729   echo "$as_me: failed program was:" >&5
15730 cat conftest.$ac_ext >&5
15731 fi
15732 rm -f conftest.$ac_objext conftest.$ac_ext
15733                 CXXFLAGS="$cf_save_CFLAGS"
15734                 echo "$as_me:15734: result: $INTEL_CPLUSPLUS" >&5
15735 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15736                 ;;
15737         esac
15738 fi
15739
15740 CLANG_CPLUSPLUS=no
15741
15742 if test "$GCC" = yes ; then
15743         echo "$as_me:15743: checking if this is really Clang C++ compiler" >&5
15744 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15745         cf_save_CFLAGS="$CXXFLAGS"
15746         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15747         cat >conftest.$ac_ext <<_ACEOF
15748 #line 15748 "configure"
15749 #include "confdefs.h"
15750
15751 int
15752 main (void)
15753 {
15754
15755 #ifdef __clang__
15756 #else
15757 make an error
15758 #endif
15759
15760   ;
15761   return 0;
15762 }
15763 _ACEOF
15764 rm -f conftest.$ac_objext
15765 if { (eval echo "$as_me:15765: \"$ac_compile\"") >&5
15766   (eval $ac_compile) 2>&5
15767   ac_status=$?
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit $ac_status); } &&
15770          { ac_try='test -s conftest.$ac_objext'
15771   { (eval echo "$as_me:15771: \"$ac_try\"") >&5
15772   (eval $ac_try) 2>&5
15773   ac_status=$?
15774   echo "$as_me:15774: \$? = $ac_status" >&5
15775   (exit $ac_status); }; }; then
15776   CLANG_CPLUSPLUS=yes
15777 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15778
15779 else
15780   echo "$as_me: failed program was:" >&5
15781 cat conftest.$ac_ext >&5
15782 fi
15783 rm -f conftest.$ac_objext conftest.$ac_ext
15784         CXXFLAGS="$cf_save_CFLAGS"
15785         echo "$as_me:15785: result: $CLANG_CPLUSPLUS" >&5
15786 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15787 fi
15788
15789 ac_ext=cc
15790 ac_cpp='$CXXCPP $CPPFLAGS'
15791 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15792 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15793 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15794 ac_main_return=return
15795
15796 cat > conftest.$ac_ext <<EOF
15797 #line 15797 "configure"
15798 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15799 EOF
15800
15801 if test "$INTEL_CPLUSPLUS" = yes
15802 then
15803 # The "-wdXXX" options suppress warnings:
15804 # remark #1419: external declaration in primary source file
15805 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15806 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15807 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15808 # remark #193: zero used for undefined preprocessing identifier
15809 # remark #593: variable "curs_sb_left_arrow" was set but never used
15810 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15811 # remark #869: parameter "tw" was never referenced
15812 # remark #981: operands are evaluated in unspecified order
15813 # warning #269: invalid format string conversion
15814
15815         { echo "$as_me:15815: checking for $CC warning options..." >&5
15816 echo "$as_me: checking for $CC warning options..." >&6;}
15817         cf_save_CXXFLAGS="$CXXFLAGS"
15818         EXTRA_CXXFLAGS="-Wall"
15819         for cf_opt in \
15820                 wd1419 \
15821                 wd1682 \
15822                 wd1683 \
15823                 wd1684 \
15824                 wd193 \
15825                 wd279 \
15826                 wd593 \
15827                 wd810 \
15828                 wd869 \
15829                 wd981
15830         do
15831                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15832                 if { (eval echo "$as_me:15832: \"$ac_compile\"") >&5
15833   (eval $ac_compile) 2>&5
15834   ac_status=$?
15835   echo "$as_me:15835: \$? = $ac_status" >&5
15836   (exit $ac_status); }; then
15837                         test -n "$verbose" && echo "$as_me:15837: result: ... -$cf_opt" >&5
15838 echo "${ECHO_T}... -$cf_opt" >&6
15839                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15840                 fi
15841         done
15842         CXXFLAGS="$cf_save_CXXFLAGS"
15843
15844 elif test "$GXX" = yes
15845 then
15846         { echo "$as_me:15846: checking for $CXX warning options..." >&5
15847 echo "$as_me: checking for $CXX warning options..." >&6;}
15848         cf_save_CXXFLAGS="$CXXFLAGS"
15849         EXTRA_CXXFLAGS="-W -Wall"
15850         cf_gxx_extra_warnings=""
15851         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15852         case "$GCC_VERSION" in
15853         ([1-2].*)
15854                 ;;
15855         (*)
15856                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15857                 ;;
15858         esac
15859         for cf_opt in \
15860                 Wabi \
15861                 fabi-version=0 \
15862                 Wextra \
15863                 Wignored-qualifiers \
15864                 Wlogical-op \
15865                 Woverloaded-virtual \
15866                 Wsign-promo \
15867                 Wsynth \
15868                 Wold-style-cast \
15869                 Wcast-align \
15870                 Wcast-qual \
15871                 Wpointer-arith \
15872                 Wshadow \
15873                 Wundef $cf_gxx_extra_warnings Wno-unused
15874         do
15875                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15876                 if { (eval echo "$as_me:15876: \"$ac_compile\"") >&5
15877   (eval $ac_compile) 2>&5
15878   ac_status=$?
15879   echo "$as_me:15879: \$? = $ac_status" >&5
15880   (exit $ac_status); }; then
15881                         test -n "$verbose" && echo "$as_me:15881: result: ... -$cf_opt" >&5
15882 echo "${ECHO_T}... -$cf_opt" >&6
15883                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15884                 else
15885                         test -n "$verbose" && echo "$as_me:15885: result: ... no -$cf_opt" >&5
15886 echo "${ECHO_T}... no -$cf_opt" >&6
15887                 fi
15888         done
15889         CXXFLAGS="$cf_save_CXXFLAGS"
15890 fi
15891
15892 rm -rf conftest*
15893 ac_ext=c
15894 ac_cpp='$CPP $CPPFLAGS'
15895 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15896 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15898 ac_main_return=return
15899
15900         fi
15901 fi
15902
15903 if test "$GCC" = yes
15904 then
15905 cat > conftest.i <<EOF
15906 #ifndef GCC_PRINTF
15907 #define GCC_PRINTF 0
15908 #endif
15909 #ifndef GCC_SCANF
15910 #define GCC_SCANF 0
15911 #endif
15912 #ifndef GCC_NORETURN
15913 #define GCC_NORETURN /* nothing */
15914 #endif
15915 #ifndef GCC_UNUSED
15916 #define GCC_UNUSED /* nothing */
15917 #endif
15918 EOF
15919 if test "$GCC" = yes
15920 then
15921         { echo "$as_me:15921: checking for $CC __attribute__ directives..." >&5
15922 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15923 cat > conftest.$ac_ext <<EOF
15924 #line 15924 "${as_me:-configure}"
15925 #include "confdefs.h"
15926 #include "conftest.h"
15927 #include "conftest.i"
15928 #if     GCC_PRINTF
15929 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15930 #else
15931 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15932 #endif
15933 #if     GCC_SCANF
15934 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15935 #else
15936 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15937 #endif
15938 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15939 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15940 extern void foo(void) GCC_NORETURN;
15941 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15942 EOF
15943         cf_printf_attribute=no
15944         cf_scanf_attribute=no
15945         for cf_attribute in scanf printf unused noreturn
15946         do
15947
15948 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15949
15950                 cf_directive="__attribute__(($cf_attribute))"
15951                 echo "checking for $CC $cf_directive" 1>&5
15952
15953                 case $cf_attribute in
15954                 (printf)
15955                         cf_printf_attribute=yes
15956                         cat >conftest.h <<EOF
15957 #define GCC_$cf_ATTRIBUTE 1
15958 EOF
15959                         ;;
15960                 (scanf)
15961                         cf_scanf_attribute=yes
15962                         cat >conftest.h <<EOF
15963 #define GCC_$cf_ATTRIBUTE 1
15964 EOF
15965                         ;;
15966                 (*)
15967                         cat >conftest.h <<EOF
15968 #define GCC_$cf_ATTRIBUTE $cf_directive
15969 EOF
15970                         ;;
15971                 esac
15972
15973                 if { (eval echo "$as_me:15973: \"$ac_compile\"") >&5
15974   (eval $ac_compile) 2>&5
15975   ac_status=$?
15976   echo "$as_me:15976: \$? = $ac_status" >&5
15977   (exit $ac_status); }; then
15978                         test -n "$verbose" && echo "$as_me:15978: result: ... $cf_attribute" >&5
15979 echo "${ECHO_T}... $cf_attribute" >&6
15980                         cat conftest.h >>confdefs.h
15981                         case $cf_attribute in
15982                         (noreturn)
15983
15984 cat >>confdefs.h <<EOF
15985 #define GCC_NORETURN $cf_directive
15986 EOF
15987
15988                                 ;;
15989                         (printf)
15990                                 cf_value='/* nothing */'
15991                                 if test "$cf_printf_attribute" != no ; then
15992                                         cf_value='__attribute__((format(printf,fmt,var)))'
15993
15994 cat >>confdefs.h <<\EOF
15995 #define GCC_PRINTF 1
15996 EOF
15997
15998                                 fi
15999
16000 cat >>confdefs.h <<EOF
16001 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16002 EOF
16003
16004                                 ;;
16005                         (scanf)
16006                                 cf_value='/* nothing */'
16007                                 if test "$cf_scanf_attribute" != no ; then
16008                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16009
16010 cat >>confdefs.h <<\EOF
16011 #define GCC_SCANF 1
16012 EOF
16013
16014                                 fi
16015
16016 cat >>confdefs.h <<EOF
16017 #define GCC_SCANFLIKE(fmt,var) $cf_value
16018 EOF
16019
16020                                 ;;
16021                         (unused)
16022
16023 cat >>confdefs.h <<EOF
16024 #define GCC_UNUSED $cf_directive
16025 EOF
16026
16027                                 ;;
16028                         esac
16029                 fi
16030         done
16031 else
16032         fgrep define conftest.i >>confdefs.h
16033 fi
16034 rm -rf conftest*
16035 fi
16036
16037 echo "$as_me:16037: checking if you want to work around bogus compiler/loader warnings" >&5
16038 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16039
16040 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16041 if test "${enable_string_hacks+set}" = set; then
16042   enableval="$enable_string_hacks"
16043   with_string_hacks=$enableval
16044 else
16045   with_string_hacks=no
16046 fi;
16047 echo "$as_me:16047: result: $with_string_hacks" >&5
16048 echo "${ECHO_T}$with_string_hacks" >&6
16049
16050 if test "x$with_string_hacks" = "xyes"; then
16051
16052 cat >>confdefs.h <<\EOF
16053 #define USE_STRING_HACKS 1
16054 EOF
16055
16056         { echo "$as_me:16056: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16057 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16058         echo "$as_me:16058: checking for strlcat" >&5
16059 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16060 if test "${ac_cv_func_strlcat+set}" = set; then
16061   echo $ECHO_N "(cached) $ECHO_C" >&6
16062 else
16063   cat >conftest.$ac_ext <<_ACEOF
16064 #line 16064 "configure"
16065 #include "confdefs.h"
16066 #define strlcat autoconf_temporary
16067 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16068 #undef strlcat
16069
16070 #ifdef __cplusplus
16071 extern "C"
16072 #endif
16073
16074 /* We use char because int might match the return type of a gcc2
16075    builtin and then its argument prototype would still apply.  */
16076 char strlcat (void);
16077
16078 int
16079 main (void)
16080 {
16081
16082 /* The GNU C library defines stubs for functions which it implements
16083     to always fail with ENOSYS.  Some functions are actually named
16084     something starting with __ and the normal name is an alias.  */
16085 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16086 #error found stub for strlcat
16087 #endif
16088
16089         return strlcat ();
16090   ;
16091   return 0;
16092 }
16093 _ACEOF
16094 rm -f conftest.$ac_objext conftest$ac_exeext
16095 if { (eval echo "$as_me:16095: \"$ac_link\"") >&5
16096   (eval $ac_link) 2>&5
16097   ac_status=$?
16098   echo "$as_me:16098: \$? = $ac_status" >&5
16099   (exit $ac_status); } &&
16100          { ac_try='test -s conftest$ac_exeext'
16101   { (eval echo "$as_me:16101: \"$ac_try\"") >&5
16102   (eval $ac_try) 2>&5
16103   ac_status=$?
16104   echo "$as_me:16104: \$? = $ac_status" >&5
16105   (exit $ac_status); }; }; then
16106   ac_cv_func_strlcat=yes
16107 else
16108   echo "$as_me: failed program was:" >&5
16109 cat conftest.$ac_ext >&5
16110 ac_cv_func_strlcat=no
16111 fi
16112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16113 fi
16114 echo "$as_me:16114: result: $ac_cv_func_strlcat" >&5
16115 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16116 if test $ac_cv_func_strlcat = yes; then
16117
16118 cat >>confdefs.h <<\EOF
16119 #define HAVE_STRLCAT 1
16120 EOF
16121
16122 else
16123
16124                 echo "$as_me:16124: checking for strlcat in -lbsd" >&5
16125 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16126 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16127   echo $ECHO_N "(cached) $ECHO_C" >&6
16128 else
16129   ac_check_lib_save_LIBS=$LIBS
16130 LIBS="-lbsd  $LIBS"
16131 cat >conftest.$ac_ext <<_ACEOF
16132 #line 16132 "configure"
16133 #include "confdefs.h"
16134
16135 /* Override any gcc2 internal prototype to avoid an error.  */
16136 #ifdef __cplusplus
16137 extern "C"
16138 #endif
16139 /* We use char because int might match the return type of a gcc2
16140    builtin and then its argument prototype would still apply.  */
16141 char strlcat ();
16142 int
16143 main (void)
16144 {
16145 strlcat ();
16146   ;
16147   return 0;
16148 }
16149 _ACEOF
16150 rm -f conftest.$ac_objext conftest$ac_exeext
16151 if { (eval echo "$as_me:16151: \"$ac_link\"") >&5
16152   (eval $ac_link) 2>&5
16153   ac_status=$?
16154   echo "$as_me:16154: \$? = $ac_status" >&5
16155   (exit $ac_status); } &&
16156          { ac_try='test -s conftest$ac_exeext'
16157   { (eval echo "$as_me:16157: \"$ac_try\"") >&5
16158   (eval $ac_try) 2>&5
16159   ac_status=$?
16160   echo "$as_me:16160: \$? = $ac_status" >&5
16161   (exit $ac_status); }; }; then
16162   ac_cv_lib_bsd_strlcat=yes
16163 else
16164   echo "$as_me: failed program was:" >&5
16165 cat conftest.$ac_ext >&5
16166 ac_cv_lib_bsd_strlcat=no
16167 fi
16168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16169 LIBS=$ac_check_lib_save_LIBS
16170 fi
16171 echo "$as_me:16171: result: $ac_cv_lib_bsd_strlcat" >&5
16172 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16173 if test $ac_cv_lib_bsd_strlcat = yes; then
16174
16175 cf_add_libs="$LIBS"
16176 # reverse order
16177 cf_add_0lib=
16178 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16179 # filter duplicates
16180 for cf_add_1lib in $cf_add_0lib; do
16181         for cf_add_2lib in $cf_add_libs; do
16182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16183                         cf_add_1lib=
16184                         break
16185                 fi
16186         done
16187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16188 done
16189 LIBS="$cf_add_libs"
16190
16191 for ac_header in bsd/string.h
16192 do
16193 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16194 echo "$as_me:16194: checking for $ac_header" >&5
16195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16197   echo $ECHO_N "(cached) $ECHO_C" >&6
16198 else
16199   cat >conftest.$ac_ext <<_ACEOF
16200 #line 16200 "configure"
16201 #include "confdefs.h"
16202 #include <$ac_header>
16203 _ACEOF
16204 if { (eval echo "$as_me:16204: \"$ac_cpp conftest.$ac_ext\"") >&5
16205   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16206   ac_status=$?
16207   egrep -v '^ *\+' conftest.er1 >conftest.err
16208   rm -f conftest.er1
16209   cat conftest.err >&5
16210   echo "$as_me:16210: \$? = $ac_status" >&5
16211   (exit $ac_status); } >/dev/null; then
16212   if test -s conftest.err; then
16213     ac_cpp_err=$ac_c_preproc_warn_flag
16214   else
16215     ac_cpp_err=
16216   fi
16217 else
16218   ac_cpp_err=yes
16219 fi
16220 if test -z "$ac_cpp_err"; then
16221   eval "$as_ac_Header=yes"
16222 else
16223   echo "$as_me: failed program was:" >&5
16224   cat conftest.$ac_ext >&5
16225   eval "$as_ac_Header=no"
16226 fi
16227 rm -f conftest.err conftest.$ac_ext
16228 fi
16229 echo "$as_me:16229: result: `eval echo '${'$as_ac_Header'}'`" >&5
16230 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16231 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16232   cat >>confdefs.h <<EOF
16233 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16234 EOF
16235
16236 fi
16237 done
16238
16239 cat >>confdefs.h <<\EOF
16240 #define HAVE_STRLCAT 1
16241 EOF
16242
16243 fi
16244
16245 fi
16246
16247 for ac_func in strlcpy snprintf
16248 do
16249 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16250 echo "$as_me:16250: checking for $ac_func" >&5
16251 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16252 if eval "test \"\${$as_ac_var+set}\" = set"; then
16253   echo $ECHO_N "(cached) $ECHO_C" >&6
16254 else
16255   cat >conftest.$ac_ext <<_ACEOF
16256 #line 16256 "configure"
16257 #include "confdefs.h"
16258 #define $ac_func autoconf_temporary
16259 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16260 #undef $ac_func
16261
16262 #ifdef __cplusplus
16263 extern "C"
16264 #endif
16265
16266 /* We use char because int might match the return type of a gcc2
16267    builtin and then its argument prototype would still apply.  */
16268 char $ac_func (void);
16269
16270 int
16271 main (void)
16272 {
16273
16274 /* The GNU C library defines stubs for functions which it implements
16275     to always fail with ENOSYS.  Some functions are actually named
16276     something starting with __ and the normal name is an alias.  */
16277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16278 #error found stub for $ac_func
16279 #endif
16280
16281         return $ac_func ();
16282   ;
16283   return 0;
16284 }
16285 _ACEOF
16286 rm -f conftest.$ac_objext conftest$ac_exeext
16287 if { (eval echo "$as_me:16287: \"$ac_link\"") >&5
16288   (eval $ac_link) 2>&5
16289   ac_status=$?
16290   echo "$as_me:16290: \$? = $ac_status" >&5
16291   (exit $ac_status); } &&
16292          { ac_try='test -s conftest$ac_exeext'
16293   { (eval echo "$as_me:16293: \"$ac_try\"") >&5
16294   (eval $ac_try) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit $ac_status); }; }; then
16298   eval "$as_ac_var=yes"
16299 else
16300   echo "$as_me: failed program was:" >&5
16301 cat conftest.$ac_ext >&5
16302 eval "$as_ac_var=no"
16303 fi
16304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16305 fi
16306 echo "$as_me:16306: result: `eval echo '${'$as_ac_var'}'`" >&5
16307 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16308 if test `eval echo '${'$as_ac_var'}'` = yes; then
16309   cat >>confdefs.h <<EOF
16310 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16311 EOF
16312
16313 fi
16314 done
16315
16316 fi
16317
16318 ###     use option --enable-assertions to turn on generation of assertion code
16319 echo "$as_me:16319: checking if you want to enable runtime assertions" >&5
16320 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16321
16322 # Check whether --enable-assertions or --disable-assertions was given.
16323 if test "${enable_assertions+set}" = set; then
16324   enableval="$enable_assertions"
16325   with_assertions=$enableval
16326 else
16327   with_assertions=no
16328 fi;
16329 echo "$as_me:16329: result: $with_assertions" >&5
16330 echo "${ECHO_T}$with_assertions" >&6
16331 if test -n "$GCC"
16332 then
16333         if test "$with_assertions" = no
16334         then
16335                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16336         else
16337
16338         ADAFLAGS="$ADAFLAGS -gnata"
16339
16340         fi
16341 fi
16342
16343 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16344
16345 echo "$as_me:16345: checking if you want to use dmalloc for testing" >&5
16346 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16347
16348 # Check whether --with-dmalloc or --without-dmalloc was given.
16349 if test "${with_dmalloc+set}" = set; then
16350   withval="$with_dmalloc"
16351
16352 cat >>confdefs.h <<EOF
16353 #define USE_DMALLOC 1
16354 EOF
16355
16356         : ${with_cflags:=-g}
16357         : ${with_no_leaks:=yes}
16358          with_dmalloc=yes
16359 else
16360   with_dmalloc=
16361 fi;
16362 echo "$as_me:16362: result: ${with_dmalloc:-no}" >&5
16363 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16364
16365 case .$with_cflags in
16366 (.*-g*)
16367         case .$CFLAGS in
16368         (.*-g*)
16369                 ;;
16370         (*)
16371
16372 cf_fix_cppflags=no
16373 cf_new_cflags=
16374 cf_new_cppflags=
16375 cf_new_extra_cppflags=
16376
16377 for cf_add_cflags in -g
16378 do
16379 case $cf_fix_cppflags in
16380 (no)
16381         case $cf_add_cflags in
16382         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16383                 case $cf_add_cflags in
16384                 (-D*)
16385                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16386
16387                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16388                                 && test -z "${cf_tst_cflags}" \
16389                                 && cf_fix_cppflags=yes
16390
16391                         if test $cf_fix_cppflags = yes ; then
16392
16393         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16394         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16395
16396                                 continue
16397                         elif test "${cf_tst_cflags}" = "\"'" ; then
16398
16399         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16400         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16401
16402                                 continue
16403                         fi
16404                         ;;
16405                 esac
16406                 case "$CPPFLAGS" in
16407                 (*$cf_add_cflags)
16408                         ;;
16409                 (*)
16410                         case $cf_add_cflags in
16411                         (-D*)
16412                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16413
16414 CPPFLAGS=`echo "$CPPFLAGS" | \
16415         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16416                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16417
16418                                 ;;
16419                         esac
16420
16421         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16422         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16423
16424                         ;;
16425                 esac
16426                 ;;
16427         (*)
16428
16429         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16430         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16431
16432                 ;;
16433         esac
16434         ;;
16435 (yes)
16436
16437         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16438         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16439
16440         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16441
16442         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16443                 && test -z "${cf_tst_cflags}" \
16444                 && cf_fix_cppflags=no
16445         ;;
16446 esac
16447 done
16448
16449 if test -n "$cf_new_cflags" ; then
16450
16451         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16452         CFLAGS="${CFLAGS}$cf_new_cflags"
16453
16454 fi
16455
16456 if test -n "$cf_new_cppflags" ; then
16457
16458         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16459         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16460
16461 fi
16462
16463 if test -n "$cf_new_extra_cppflags" ; then
16464
16465         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16466         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16467
16468 fi
16469
16470                 ;;
16471         esac
16472         ;;
16473 esac
16474
16475 if test "$with_dmalloc" = yes ; then
16476         echo "$as_me:16476: checking for dmalloc.h" >&5
16477 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16478 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16479   echo $ECHO_N "(cached) $ECHO_C" >&6
16480 else
16481   cat >conftest.$ac_ext <<_ACEOF
16482 #line 16482 "configure"
16483 #include "confdefs.h"
16484 #include <dmalloc.h>
16485 _ACEOF
16486 if { (eval echo "$as_me:16486: \"$ac_cpp conftest.$ac_ext\"") >&5
16487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16488   ac_status=$?
16489   egrep -v '^ *\+' conftest.er1 >conftest.err
16490   rm -f conftest.er1
16491   cat conftest.err >&5
16492   echo "$as_me:16492: \$? = $ac_status" >&5
16493   (exit $ac_status); } >/dev/null; then
16494   if test -s conftest.err; then
16495     ac_cpp_err=$ac_c_preproc_warn_flag
16496   else
16497     ac_cpp_err=
16498   fi
16499 else
16500   ac_cpp_err=yes
16501 fi
16502 if test -z "$ac_cpp_err"; then
16503   ac_cv_header_dmalloc_h=yes
16504 else
16505   echo "$as_me: failed program was:" >&5
16506   cat conftest.$ac_ext >&5
16507   ac_cv_header_dmalloc_h=no
16508 fi
16509 rm -f conftest.err conftest.$ac_ext
16510 fi
16511 echo "$as_me:16511: result: $ac_cv_header_dmalloc_h" >&5
16512 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16513 if test $ac_cv_header_dmalloc_h = yes; then
16514
16515 echo "$as_me:16515: checking for dmalloc_debug in -ldmalloc" >&5
16516 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16517 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16518   echo $ECHO_N "(cached) $ECHO_C" >&6
16519 else
16520   ac_check_lib_save_LIBS=$LIBS
16521 LIBS="-ldmalloc  $LIBS"
16522 cat >conftest.$ac_ext <<_ACEOF
16523 #line 16523 "configure"
16524 #include "confdefs.h"
16525
16526 /* Override any gcc2 internal prototype to avoid an error.  */
16527 #ifdef __cplusplus
16528 extern "C"
16529 #endif
16530 /* We use char because int might match the return type of a gcc2
16531    builtin and then its argument prototype would still apply.  */
16532 char dmalloc_debug ();
16533 int
16534 main (void)
16535 {
16536 dmalloc_debug ();
16537   ;
16538   return 0;
16539 }
16540 _ACEOF
16541 rm -f conftest.$ac_objext conftest$ac_exeext
16542 if { (eval echo "$as_me:16542: \"$ac_link\"") >&5
16543   (eval $ac_link) 2>&5
16544   ac_status=$?
16545   echo "$as_me:16545: \$? = $ac_status" >&5
16546   (exit $ac_status); } &&
16547          { ac_try='test -s conftest$ac_exeext'
16548   { (eval echo "$as_me:16548: \"$ac_try\"") >&5
16549   (eval $ac_try) 2>&5
16550   ac_status=$?
16551   echo "$as_me:16551: \$? = $ac_status" >&5
16552   (exit $ac_status); }; }; then
16553   ac_cv_lib_dmalloc_dmalloc_debug=yes
16554 else
16555   echo "$as_me: failed program was:" >&5
16556 cat conftest.$ac_ext >&5
16557 ac_cv_lib_dmalloc_dmalloc_debug=no
16558 fi
16559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16560 LIBS=$ac_check_lib_save_LIBS
16561 fi
16562 echo "$as_me:16562: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16563 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16564 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16565   cat >>confdefs.h <<EOF
16566 #define HAVE_LIBDMALLOC 1
16567 EOF
16568
16569   LIBS="-ldmalloc $LIBS"
16570
16571 fi
16572
16573 fi
16574
16575 fi
16576
16577 echo "$as_me:16577: checking if you want to use dbmalloc for testing" >&5
16578 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16579
16580 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16581 if test "${with_dbmalloc+set}" = set; then
16582   withval="$with_dbmalloc"
16583
16584 cat >>confdefs.h <<EOF
16585 #define USE_DBMALLOC 1
16586 EOF
16587
16588         : ${with_cflags:=-g}
16589         : ${with_no_leaks:=yes}
16590          with_dbmalloc=yes
16591 else
16592   with_dbmalloc=
16593 fi;
16594 echo "$as_me:16594: result: ${with_dbmalloc:-no}" >&5
16595 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16596
16597 case .$with_cflags in
16598 (.*-g*)
16599         case .$CFLAGS in
16600         (.*-g*)
16601                 ;;
16602         (*)
16603
16604 cf_fix_cppflags=no
16605 cf_new_cflags=
16606 cf_new_cppflags=
16607 cf_new_extra_cppflags=
16608
16609 for cf_add_cflags in -g
16610 do
16611 case $cf_fix_cppflags in
16612 (no)
16613         case $cf_add_cflags in
16614         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16615                 case $cf_add_cflags in
16616                 (-D*)
16617                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16618
16619                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16620                                 && test -z "${cf_tst_cflags}" \
16621                                 && cf_fix_cppflags=yes
16622
16623                         if test $cf_fix_cppflags = yes ; then
16624
16625         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16626         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16627
16628                                 continue
16629                         elif test "${cf_tst_cflags}" = "\"'" ; then
16630
16631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16633
16634                                 continue
16635                         fi
16636                         ;;
16637                 esac
16638                 case "$CPPFLAGS" in
16639                 (*$cf_add_cflags)
16640                         ;;
16641                 (*)
16642                         case $cf_add_cflags in
16643                         (-D*)
16644                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16645
16646 CPPFLAGS=`echo "$CPPFLAGS" | \
16647         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16648                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16649
16650                                 ;;
16651                         esac
16652
16653         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16654         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16655
16656                         ;;
16657                 esac
16658                 ;;
16659         (*)
16660
16661         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16662         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16663
16664                 ;;
16665         esac
16666         ;;
16667 (yes)
16668
16669         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16670         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16671
16672         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16673
16674         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16675                 && test -z "${cf_tst_cflags}" \
16676                 && cf_fix_cppflags=no
16677         ;;
16678 esac
16679 done
16680
16681 if test -n "$cf_new_cflags" ; then
16682
16683         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16684         CFLAGS="${CFLAGS}$cf_new_cflags"
16685
16686 fi
16687
16688 if test -n "$cf_new_cppflags" ; then
16689
16690         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16691         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16692
16693 fi
16694
16695 if test -n "$cf_new_extra_cppflags" ; then
16696
16697         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16698         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16699
16700 fi
16701
16702                 ;;
16703         esac
16704         ;;
16705 esac
16706
16707 if test "$with_dbmalloc" = yes ; then
16708         echo "$as_me:16708: checking for dbmalloc.h" >&5
16709 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16710 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16711   echo $ECHO_N "(cached) $ECHO_C" >&6
16712 else
16713   cat >conftest.$ac_ext <<_ACEOF
16714 #line 16714 "configure"
16715 #include "confdefs.h"
16716 #include <dbmalloc.h>
16717 _ACEOF
16718 if { (eval echo "$as_me:16718: \"$ac_cpp conftest.$ac_ext\"") >&5
16719   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16720   ac_status=$?
16721   egrep -v '^ *\+' conftest.er1 >conftest.err
16722   rm -f conftest.er1
16723   cat conftest.err >&5
16724   echo "$as_me:16724: \$? = $ac_status" >&5
16725   (exit $ac_status); } >/dev/null; then
16726   if test -s conftest.err; then
16727     ac_cpp_err=$ac_c_preproc_warn_flag
16728   else
16729     ac_cpp_err=
16730   fi
16731 else
16732   ac_cpp_err=yes
16733 fi
16734 if test -z "$ac_cpp_err"; then
16735   ac_cv_header_dbmalloc_h=yes
16736 else
16737   echo "$as_me: failed program was:" >&5
16738   cat conftest.$ac_ext >&5
16739   ac_cv_header_dbmalloc_h=no
16740 fi
16741 rm -f conftest.err conftest.$ac_ext
16742 fi
16743 echo "$as_me:16743: result: $ac_cv_header_dbmalloc_h" >&5
16744 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16745 if test $ac_cv_header_dbmalloc_h = yes; then
16746
16747 echo "$as_me:16747: checking for debug_malloc in -ldbmalloc" >&5
16748 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16749 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16750   echo $ECHO_N "(cached) $ECHO_C" >&6
16751 else
16752   ac_check_lib_save_LIBS=$LIBS
16753 LIBS="-ldbmalloc  $LIBS"
16754 cat >conftest.$ac_ext <<_ACEOF
16755 #line 16755 "configure"
16756 #include "confdefs.h"
16757
16758 /* Override any gcc2 internal prototype to avoid an error.  */
16759 #ifdef __cplusplus
16760 extern "C"
16761 #endif
16762 /* We use char because int might match the return type of a gcc2
16763    builtin and then its argument prototype would still apply.  */
16764 char debug_malloc ();
16765 int
16766 main (void)
16767 {
16768 debug_malloc ();
16769   ;
16770   return 0;
16771 }
16772 _ACEOF
16773 rm -f conftest.$ac_objext conftest$ac_exeext
16774 if { (eval echo "$as_me:16774: \"$ac_link\"") >&5
16775   (eval $ac_link) 2>&5
16776   ac_status=$?
16777   echo "$as_me:16777: \$? = $ac_status" >&5
16778   (exit $ac_status); } &&
16779          { ac_try='test -s conftest$ac_exeext'
16780   { (eval echo "$as_me:16780: \"$ac_try\"") >&5
16781   (eval $ac_try) 2>&5
16782   ac_status=$?
16783   echo "$as_me:16783: \$? = $ac_status" >&5
16784   (exit $ac_status); }; }; then
16785   ac_cv_lib_dbmalloc_debug_malloc=yes
16786 else
16787   echo "$as_me: failed program was:" >&5
16788 cat conftest.$ac_ext >&5
16789 ac_cv_lib_dbmalloc_debug_malloc=no
16790 fi
16791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16792 LIBS=$ac_check_lib_save_LIBS
16793 fi
16794 echo "$as_me:16794: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16795 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16796 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16797   cat >>confdefs.h <<EOF
16798 #define HAVE_LIBDBMALLOC 1
16799 EOF
16800
16801   LIBS="-ldbmalloc $LIBS"
16802
16803 fi
16804
16805 fi
16806
16807 fi
16808
16809 echo "$as_me:16809: checking if you want to use valgrind for testing" >&5
16810 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16811
16812 # Check whether --with-valgrind or --without-valgrind was given.
16813 if test "${with_valgrind+set}" = set; then
16814   withval="$with_valgrind"
16815
16816 cat >>confdefs.h <<EOF
16817 #define USE_VALGRIND 1
16818 EOF
16819
16820         : ${with_cflags:=-g}
16821         : ${with_no_leaks:=yes}
16822          with_valgrind=yes
16823 else
16824   with_valgrind=
16825 fi;
16826 echo "$as_me:16826: result: ${with_valgrind:-no}" >&5
16827 echo "${ECHO_T}${with_valgrind:-no}" >&6
16828
16829 case .$with_cflags in
16830 (.*-g*)
16831         case .$CFLAGS in
16832         (.*-g*)
16833                 ;;
16834         (*)
16835
16836 cf_fix_cppflags=no
16837 cf_new_cflags=
16838 cf_new_cppflags=
16839 cf_new_extra_cppflags=
16840
16841 for cf_add_cflags in -g
16842 do
16843 case $cf_fix_cppflags in
16844 (no)
16845         case $cf_add_cflags in
16846         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16847                 case $cf_add_cflags in
16848                 (-D*)
16849                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16850
16851                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16852                                 && test -z "${cf_tst_cflags}" \
16853                                 && cf_fix_cppflags=yes
16854
16855                         if test $cf_fix_cppflags = yes ; then
16856
16857         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16858         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16859
16860                                 continue
16861                         elif test "${cf_tst_cflags}" = "\"'" ; then
16862
16863         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16864         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16865
16866                                 continue
16867                         fi
16868                         ;;
16869                 esac
16870                 case "$CPPFLAGS" in
16871                 (*$cf_add_cflags)
16872                         ;;
16873                 (*)
16874                         case $cf_add_cflags in
16875                         (-D*)
16876                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16877
16878 CPPFLAGS=`echo "$CPPFLAGS" | \
16879         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16880                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16881
16882                                 ;;
16883                         esac
16884
16885         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16886         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16887
16888                         ;;
16889                 esac
16890                 ;;
16891         (*)
16892
16893         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16894         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16895
16896                 ;;
16897         esac
16898         ;;
16899 (yes)
16900
16901         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16902         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16903
16904         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16905
16906         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16907                 && test -z "${cf_tst_cflags}" \
16908                 && cf_fix_cppflags=no
16909         ;;
16910 esac
16911 done
16912
16913 if test -n "$cf_new_cflags" ; then
16914
16915         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16916         CFLAGS="${CFLAGS}$cf_new_cflags"
16917
16918 fi
16919
16920 if test -n "$cf_new_cppflags" ; then
16921
16922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16923         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16924
16925 fi
16926
16927 if test -n "$cf_new_extra_cppflags" ; then
16928
16929         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16930         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16931
16932 fi
16933
16934                 ;;
16935         esac
16936         ;;
16937 esac
16938
16939 echo "$as_me:16939: checking if you want to perform memory-leak testing" >&5
16940 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16941
16942 # Check whether --enable-leaks or --disable-leaks was given.
16943 if test "${enable_leaks+set}" = set; then
16944   enableval="$enable_leaks"
16945   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16946 else
16947   : ${with_no_leaks:=no}
16948 fi;
16949 echo "$as_me:16949: result: $with_no_leaks" >&5
16950 echo "${ECHO_T}$with_no_leaks" >&6
16951
16952 if test "$with_no_leaks" = yes ; then
16953
16954 cat >>confdefs.h <<\EOF
16955 #define NO_LEAKS 1
16956 EOF
16957
16958 cat >>confdefs.h <<\EOF
16959 #define YY_NO_LEAKS 1
16960 EOF
16961
16962 fi
16963
16964 cat >>confdefs.h <<\EOF
16965 #define HAVE_NC_ALLOC_H 1
16966 EOF
16967
16968 ###     use option --enable-expanded to generate certain macros as functions
16969
16970 # Check whether --enable-expanded or --disable-expanded was given.
16971 if test "${enable_expanded+set}" = set; then
16972   enableval="$enable_expanded"
16973   test "x$enableval" = xyes &&
16974 cat >>confdefs.h <<\EOF
16975 #define NCURSES_EXPANDED 1
16976 EOF
16977
16978 fi;
16979
16980 ###     use option --disable-macros to suppress macros in favor of functions
16981
16982 # Check whether --enable-macros or --disable-macros was given.
16983 if test "${enable_macros+set}" = set; then
16984   enableval="$enable_macros"
16985   test "$enableval" = no &&
16986 cat >>confdefs.h <<\EOF
16987 #define NCURSES_NOMACROS 1
16988 EOF
16989
16990 fi;
16991
16992 # Normally we only add trace() to the debug-library.  Allow this to be
16993 # extended to all models of the ncurses library:
16994 cf_all_traces=no
16995 case "$CFLAGS $CPPFLAGS" in
16996 (*-DTRACE*)
16997         cf_all_traces=yes
16998         ;;
16999 esac
17000
17001 echo "$as_me:17001: checking whether to add trace feature to all models" >&5
17002 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17003
17004 # Check whether --with-trace or --without-trace was given.
17005 if test "${with_trace+set}" = set; then
17006   withval="$with_trace"
17007   cf_with_trace=$withval
17008 else
17009   cf_with_trace=$cf_all_traces
17010 fi;
17011 echo "$as_me:17011: result: $cf_with_trace" >&5
17012 echo "${ECHO_T}$cf_with_trace" >&6
17013
17014 if test "x$cf_with_trace" = xyes ; then
17015         LIB_TRACING=all
17016         ADA_TRACE=TRUE
17017
17018 cf_fix_cppflags=no
17019 cf_new_cflags=
17020 cf_new_cppflags=
17021 cf_new_extra_cppflags=
17022
17023 for cf_add_cflags in -DTRACE
17024 do
17025 case $cf_fix_cppflags in
17026 (no)
17027         case $cf_add_cflags in
17028         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17029                 case $cf_add_cflags in
17030                 (-D*)
17031                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17032
17033                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17034                                 && test -z "${cf_tst_cflags}" \
17035                                 && cf_fix_cppflags=yes
17036
17037                         if test $cf_fix_cppflags = yes ; then
17038
17039         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17040         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17041
17042                                 continue
17043                         elif test "${cf_tst_cflags}" = "\"'" ; then
17044
17045         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17046         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17047
17048                                 continue
17049                         fi
17050                         ;;
17051                 esac
17052                 case "$CPPFLAGS" in
17053                 (*$cf_add_cflags)
17054                         ;;
17055                 (*)
17056                         case $cf_add_cflags in
17057                         (-D*)
17058                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17059
17060 CPPFLAGS=`echo "$CPPFLAGS" | \
17061         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17062                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17063
17064                                 ;;
17065                         esac
17066
17067         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17068         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17069
17070                         ;;
17071                 esac
17072                 ;;
17073         (*)
17074
17075         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17076         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17077
17078                 ;;
17079         esac
17080         ;;
17081 (yes)
17082
17083         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17084         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17085
17086         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17087
17088         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17089                 && test -z "${cf_tst_cflags}" \
17090                 && cf_fix_cppflags=no
17091         ;;
17092 esac
17093 done
17094
17095 if test -n "$cf_new_cflags" ; then
17096
17097         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17098         CFLAGS="${CFLAGS}$cf_new_cflags"
17099
17100 fi
17101
17102 if test -n "$cf_new_cppflags" ; then
17103
17104         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17105         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17106
17107 fi
17108
17109 if test -n "$cf_new_extra_cppflags" ; then
17110
17111         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17112         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17113
17114 fi
17115
17116 cat >>confdefs.h <<\EOF
17117 #define HAVE__TRACEF 1
17118 EOF
17119
17120 else
17121         LIB_TRACING=DEBUG
17122         ADA_TRACE=FALSE
17123 fi
17124
17125 echo "$as_me:17125: checking if we want to use GNAT projects" >&5
17126 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17127
17128 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17129 if test "${enable_gnat_projects+set}" = set; then
17130   enableval="$enable_gnat_projects"
17131   test "$enableval" != no && enableval=yes
17132         if test "$enableval" != "yes" ; then
17133     enable_gnat_projects=no
17134         else
17135                 enable_gnat_projects=yes
17136         fi
17137 else
17138   enableval=yes
17139         enable_gnat_projects=yes
17140
17141 fi;
17142 echo "$as_me:17142: result: $enable_gnat_projects" >&5
17143 echo "${ECHO_T}$enable_gnat_projects" >&6
17144
17145 ###     Checks for libraries.
17146 case $cf_cv_system_name in
17147 (*mingw32*|*mingw64*)
17148         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17149         # Note: WINVER may be a problem with Windows 10
17150         ;;
17151 (*)
17152 echo "$as_me:17152: checking for gettimeofday" >&5
17153 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17154 if test "${ac_cv_func_gettimeofday+set}" = set; then
17155   echo $ECHO_N "(cached) $ECHO_C" >&6
17156 else
17157   cat >conftest.$ac_ext <<_ACEOF
17158 #line 17158 "configure"
17159 #include "confdefs.h"
17160 #define gettimeofday autoconf_temporary
17161 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17162 #undef gettimeofday
17163
17164 #ifdef __cplusplus
17165 extern "C"
17166 #endif
17167
17168 /* We use char because int might match the return type of a gcc2
17169    builtin and then its argument prototype would still apply.  */
17170 char gettimeofday (void);
17171
17172 int
17173 main (void)
17174 {
17175
17176 /* The GNU C library defines stubs for functions which it implements
17177     to always fail with ENOSYS.  Some functions are actually named
17178     something starting with __ and the normal name is an alias.  */
17179 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17180 #error found stub for gettimeofday
17181 #endif
17182
17183         return gettimeofday ();
17184   ;
17185   return 0;
17186 }
17187 _ACEOF
17188 rm -f conftest.$ac_objext conftest$ac_exeext
17189 if { (eval echo "$as_me:17189: \"$ac_link\"") >&5
17190   (eval $ac_link) 2>&5
17191   ac_status=$?
17192   echo "$as_me:17192: \$? = $ac_status" >&5
17193   (exit $ac_status); } &&
17194          { ac_try='test -s conftest$ac_exeext'
17195   { (eval echo "$as_me:17195: \"$ac_try\"") >&5
17196   (eval $ac_try) 2>&5
17197   ac_status=$?
17198   echo "$as_me:17198: \$? = $ac_status" >&5
17199   (exit $ac_status); }; }; then
17200   ac_cv_func_gettimeofday=yes
17201 else
17202   echo "$as_me: failed program was:" >&5
17203 cat conftest.$ac_ext >&5
17204 ac_cv_func_gettimeofday=no
17205 fi
17206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17207 fi
17208 echo "$as_me:17208: result: $ac_cv_func_gettimeofday" >&5
17209 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17210 if test $ac_cv_func_gettimeofday = yes; then
17211
17212 cat >>confdefs.h <<\EOF
17213 #define HAVE_GETTIMEOFDAY 1
17214 EOF
17215
17216 else
17217
17218 echo "$as_me:17218: checking for gettimeofday in -lbsd" >&5
17219 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17220 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17221   echo $ECHO_N "(cached) $ECHO_C" >&6
17222 else
17223   ac_check_lib_save_LIBS=$LIBS
17224 LIBS="-lbsd  $LIBS"
17225 cat >conftest.$ac_ext <<_ACEOF
17226 #line 17226 "configure"
17227 #include "confdefs.h"
17228
17229 /* Override any gcc2 internal prototype to avoid an error.  */
17230 #ifdef __cplusplus
17231 extern "C"
17232 #endif
17233 /* We use char because int might match the return type of a gcc2
17234    builtin and then its argument prototype would still apply.  */
17235 char gettimeofday ();
17236 int
17237 main (void)
17238 {
17239 gettimeofday ();
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 rm -f conftest.$ac_objext conftest$ac_exeext
17245 if { (eval echo "$as_me:17245: \"$ac_link\"") >&5
17246   (eval $ac_link) 2>&5
17247   ac_status=$?
17248   echo "$as_me:17248: \$? = $ac_status" >&5
17249   (exit $ac_status); } &&
17250          { ac_try='test -s conftest$ac_exeext'
17251   { (eval echo "$as_me:17251: \"$ac_try\"") >&5
17252   (eval $ac_try) 2>&5
17253   ac_status=$?
17254   echo "$as_me:17254: \$? = $ac_status" >&5
17255   (exit $ac_status); }; }; then
17256   ac_cv_lib_bsd_gettimeofday=yes
17257 else
17258   echo "$as_me: failed program was:" >&5
17259 cat conftest.$ac_ext >&5
17260 ac_cv_lib_bsd_gettimeofday=no
17261 fi
17262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17263 LIBS=$ac_check_lib_save_LIBS
17264 fi
17265 echo "$as_me:17265: result: $ac_cv_lib_bsd_gettimeofday" >&5
17266 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17267 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17268
17269 cat >>confdefs.h <<\EOF
17270 #define HAVE_GETTIMEOFDAY 1
17271 EOF
17272
17273 cf_add_libs="$LIBS"
17274 # reverse order
17275 cf_add_0lib=
17276 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17277 # filter duplicates
17278 for cf_add_1lib in $cf_add_0lib; do
17279         for cf_add_2lib in $cf_add_libs; do
17280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17281                         cf_add_1lib=
17282                         break
17283                 fi
17284         done
17285         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17286 done
17287 LIBS="$cf_add_libs"
17288
17289 fi
17290
17291 fi
17292         ;;
17293 esac
17294
17295 echo "$as_me:17295: checking if -lm needed for math functions" >&5
17296 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17297 if test "${cf_cv_need_libm+set}" = set; then
17298   echo $ECHO_N "(cached) $ECHO_C" >&6
17299 else
17300
17301         cat >conftest.$ac_ext <<_ACEOF
17302 #line 17302 "configure"
17303 #include "confdefs.h"
17304
17305         #include <stdio.h>
17306         #include <stdlib.h>
17307         #include <math.h>
17308
17309 int
17310 main (void)
17311 {
17312 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17313   ;
17314   return 0;
17315 }
17316 _ACEOF
17317 rm -f conftest.$ac_objext conftest$ac_exeext
17318 if { (eval echo "$as_me:17318: \"$ac_link\"") >&5
17319   (eval $ac_link) 2>&5
17320   ac_status=$?
17321   echo "$as_me:17321: \$? = $ac_status" >&5
17322   (exit $ac_status); } &&
17323          { ac_try='test -s conftest$ac_exeext'
17324   { (eval echo "$as_me:17324: \"$ac_try\"") >&5
17325   (eval $ac_try) 2>&5
17326   ac_status=$?
17327   echo "$as_me:17327: \$? = $ac_status" >&5
17328   (exit $ac_status); }; }; then
17329   cf_cv_need_libm=no
17330 else
17331   echo "$as_me: failed program was:" >&5
17332 cat conftest.$ac_ext >&5
17333 cf_cv_need_libm=yes
17334 fi
17335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17336 fi
17337 echo "$as_me:17337: result: $cf_cv_need_libm" >&5
17338 echo "${ECHO_T}$cf_cv_need_libm" >&6
17339 if test "$cf_cv_need_libm" = yes
17340 then
17341 MATH_LIB=-lm
17342 fi
17343
17344 ###     Checks for header files.
17345 echo "$as_me:17345: checking for ANSI C header files" >&5
17346 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17347 if test "${ac_cv_header_stdc+set}" = set; then
17348   echo $ECHO_N "(cached) $ECHO_C" >&6
17349 else
17350   cat >conftest.$ac_ext <<_ACEOF
17351 #line 17351 "configure"
17352 #include "confdefs.h"
17353 #include <stdlib.h>
17354 #include <stdarg.h>
17355 #include <string.h>
17356 #include <float.h>
17357
17358 _ACEOF
17359 if { (eval echo "$as_me:17359: \"$ac_cpp conftest.$ac_ext\"") >&5
17360   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17361   ac_status=$?
17362   egrep -v '^ *\+' conftest.er1 >conftest.err
17363   rm -f conftest.er1
17364   cat conftest.err >&5
17365   echo "$as_me:17365: \$? = $ac_status" >&5
17366   (exit $ac_status); } >/dev/null; then
17367   if test -s conftest.err; then
17368     ac_cpp_err=$ac_c_preproc_warn_flag
17369   else
17370     ac_cpp_err=
17371   fi
17372 else
17373   ac_cpp_err=yes
17374 fi
17375 if test -z "$ac_cpp_err"; then
17376   ac_cv_header_stdc=yes
17377 else
17378   echo "$as_me: failed program was:" >&5
17379   cat conftest.$ac_ext >&5
17380   ac_cv_header_stdc=no
17381 fi
17382 rm -f conftest.err conftest.$ac_ext
17383
17384 if test $ac_cv_header_stdc = yes; then
17385   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17386   cat >conftest.$ac_ext <<_ACEOF
17387 #line 17387 "configure"
17388 #include "confdefs.h"
17389 #include <string.h>
17390
17391 _ACEOF
17392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17393   egrep "memchr" >/dev/null 2>&1; then
17394   :
17395 else
17396   ac_cv_header_stdc=no
17397 fi
17398 rm -rf conftest*
17399
17400 fi
17401
17402 if test $ac_cv_header_stdc = yes; then
17403   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17404   cat >conftest.$ac_ext <<_ACEOF
17405 #line 17405 "configure"
17406 #include "confdefs.h"
17407 #include <stdlib.h>
17408
17409 _ACEOF
17410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17411   egrep "free" >/dev/null 2>&1; then
17412   :
17413 else
17414   ac_cv_header_stdc=no
17415 fi
17416 rm -rf conftest*
17417
17418 fi
17419
17420 if test $ac_cv_header_stdc = yes; then
17421   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17422   if test "$cross_compiling" = yes; then
17423   :
17424 else
17425   cat >conftest.$ac_ext <<_ACEOF
17426 #line 17426 "configure"
17427 #include "confdefs.h"
17428 #include <ctype.h>
17429 #if ((' ' & 0x0FF) == 0x020)
17430 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17431 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17432 #else
17433 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17434                      || ('j' <= (c) && (c) <= 'r') \
17435                      || ('s' <= (c) && (c) <= 'z'))
17436 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17437 #endif
17438
17439 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17440 int
17441 main (void)
17442 {
17443   int i;
17444   for (i = 0; i < 256; i++)
17445     if (XOR (islower (i), ISLOWER (i))
17446         || toupper (i) != TOUPPER (i))
17447       $ac_main_return(2);
17448   $ac_main_return (0);
17449 }
17450 _ACEOF
17451 rm -f conftest$ac_exeext
17452 if { (eval echo "$as_me:17452: \"$ac_link\"") >&5
17453   (eval $ac_link) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17457   { (eval echo "$as_me:17457: \"$ac_try\"") >&5
17458   (eval $ac_try) 2>&5
17459   ac_status=$?
17460   echo "$as_me:17460: \$? = $ac_status" >&5
17461   (exit $ac_status); }; }; then
17462   :
17463 else
17464   echo "$as_me: program exited with status $ac_status" >&5
17465 echo "$as_me: failed program was:" >&5
17466 cat conftest.$ac_ext >&5
17467 ac_cv_header_stdc=no
17468 fi
17469 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17470 fi
17471 fi
17472 fi
17473 echo "$as_me:17473: result: $ac_cv_header_stdc" >&5
17474 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17475 if test $ac_cv_header_stdc = yes; then
17476
17477 cat >>confdefs.h <<\EOF
17478 #define STDC_HEADERS 1
17479 EOF
17480
17481 fi
17482
17483 ac_header_dirent=no
17484 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17485   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17486 echo "$as_me:17486: checking for $ac_hdr that defines DIR" >&5
17487 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17488 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17489   echo $ECHO_N "(cached) $ECHO_C" >&6
17490 else
17491   cat >conftest.$ac_ext <<_ACEOF
17492 #line 17492 "configure"
17493 #include "confdefs.h"
17494 #include <sys/types.h>
17495 #include <$ac_hdr>
17496
17497 int
17498 main (void)
17499 {
17500 if ((DIR *) 0)
17501 return 0;
17502   ;
17503   return 0;
17504 }
17505 _ACEOF
17506 rm -f conftest.$ac_objext
17507 if { (eval echo "$as_me:17507: \"$ac_compile\"") >&5
17508   (eval $ac_compile) 2>&5
17509   ac_status=$?
17510   echo "$as_me:17510: \$? = $ac_status" >&5
17511   (exit $ac_status); } &&
17512          { ac_try='test -s conftest.$ac_objext'
17513   { (eval echo "$as_me:17513: \"$ac_try\"") >&5
17514   (eval $ac_try) 2>&5
17515   ac_status=$?
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); }; }; then
17518   eval "$as_ac_Header=yes"
17519 else
17520   echo "$as_me: failed program was:" >&5
17521 cat conftest.$ac_ext >&5
17522 eval "$as_ac_Header=no"
17523 fi
17524 rm -f conftest.$ac_objext conftest.$ac_ext
17525 fi
17526 echo "$as_me:17526: result: `eval echo '${'$as_ac_Header'}'`" >&5
17527 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17528 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17529   cat >>confdefs.h <<EOF
17530 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17531 EOF
17532
17533 ac_header_dirent=$ac_hdr; break
17534 fi
17535
17536 done
17537 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17538 if test $ac_header_dirent = dirent.h; then
17539   echo "$as_me:17539: checking for opendir in -ldir" >&5
17540 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17541 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17542   echo $ECHO_N "(cached) $ECHO_C" >&6
17543 else
17544   ac_check_lib_save_LIBS=$LIBS
17545 LIBS="-ldir  $LIBS"
17546 cat >conftest.$ac_ext <<_ACEOF
17547 #line 17547 "configure"
17548 #include "confdefs.h"
17549
17550 /* Override any gcc2 internal prototype to avoid an error.  */
17551 #ifdef __cplusplus
17552 extern "C"
17553 #endif
17554 /* We use char because int might match the return type of a gcc2
17555    builtin and then its argument prototype would still apply.  */
17556 char opendir ();
17557 int
17558 main (void)
17559 {
17560 opendir ();
17561   ;
17562   return 0;
17563 }
17564 _ACEOF
17565 rm -f conftest.$ac_objext conftest$ac_exeext
17566 if { (eval echo "$as_me:17566: \"$ac_link\"") >&5
17567   (eval $ac_link) 2>&5
17568   ac_status=$?
17569   echo "$as_me:17569: \$? = $ac_status" >&5
17570   (exit $ac_status); } &&
17571          { ac_try='test -s conftest$ac_exeext'
17572   { (eval echo "$as_me:17572: \"$ac_try\"") >&5
17573   (eval $ac_try) 2>&5
17574   ac_status=$?
17575   echo "$as_me:17575: \$? = $ac_status" >&5
17576   (exit $ac_status); }; }; then
17577   ac_cv_lib_dir_opendir=yes
17578 else
17579   echo "$as_me: failed program was:" >&5
17580 cat conftest.$ac_ext >&5
17581 ac_cv_lib_dir_opendir=no
17582 fi
17583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17584 LIBS=$ac_check_lib_save_LIBS
17585 fi
17586 echo "$as_me:17586: result: $ac_cv_lib_dir_opendir" >&5
17587 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17588 if test $ac_cv_lib_dir_opendir = yes; then
17589   LIBS="$LIBS -ldir"
17590 fi
17591
17592 else
17593   echo "$as_me:17593: checking for opendir in -lx" >&5
17594 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17595 if test "${ac_cv_lib_x_opendir+set}" = set; then
17596   echo $ECHO_N "(cached) $ECHO_C" >&6
17597 else
17598   ac_check_lib_save_LIBS=$LIBS
17599 LIBS="-lx  $LIBS"
17600 cat >conftest.$ac_ext <<_ACEOF
17601 #line 17601 "configure"
17602 #include "confdefs.h"
17603
17604 /* Override any gcc2 internal prototype to avoid an error.  */
17605 #ifdef __cplusplus
17606 extern "C"
17607 #endif
17608 /* We use char because int might match the return type of a gcc2
17609    builtin and then its argument prototype would still apply.  */
17610 char opendir ();
17611 int
17612 main (void)
17613 {
17614 opendir ();
17615   ;
17616   return 0;
17617 }
17618 _ACEOF
17619 rm -f conftest.$ac_objext conftest$ac_exeext
17620 if { (eval echo "$as_me:17620: \"$ac_link\"") >&5
17621   (eval $ac_link) 2>&5
17622   ac_status=$?
17623   echo "$as_me:17623: \$? = $ac_status" >&5
17624   (exit $ac_status); } &&
17625          { ac_try='test -s conftest$ac_exeext'
17626   { (eval echo "$as_me:17626: \"$ac_try\"") >&5
17627   (eval $ac_try) 2>&5
17628   ac_status=$?
17629   echo "$as_me:17629: \$? = $ac_status" >&5
17630   (exit $ac_status); }; }; then
17631   ac_cv_lib_x_opendir=yes
17632 else
17633   echo "$as_me: failed program was:" >&5
17634 cat conftest.$ac_ext >&5
17635 ac_cv_lib_x_opendir=no
17636 fi
17637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17638 LIBS=$ac_check_lib_save_LIBS
17639 fi
17640 echo "$as_me:17640: result: $ac_cv_lib_x_opendir" >&5
17641 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17642 if test $ac_cv_lib_x_opendir = yes; then
17643   LIBS="$LIBS -lx"
17644 fi
17645
17646 fi
17647
17648 echo "$as_me:17648: checking whether time.h and sys/time.h may both be included" >&5
17649 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17650 if test "${ac_cv_header_time+set}" = set; then
17651   echo $ECHO_N "(cached) $ECHO_C" >&6
17652 else
17653   cat >conftest.$ac_ext <<_ACEOF
17654 #line 17654 "configure"
17655 #include "confdefs.h"
17656 #include <sys/types.h>
17657 #include <sys/time.h>
17658 #include <time.h>
17659
17660 int
17661 main (void)
17662 {
17663 if ((struct tm *) 0)
17664 return 0;
17665   ;
17666   return 0;
17667 }
17668 _ACEOF
17669 rm -f conftest.$ac_objext
17670 if { (eval echo "$as_me:17670: \"$ac_compile\"") >&5
17671   (eval $ac_compile) 2>&5
17672   ac_status=$?
17673   echo "$as_me:17673: \$? = $ac_status" >&5
17674   (exit $ac_status); } &&
17675          { ac_try='test -s conftest.$ac_objext'
17676   { (eval echo "$as_me:17676: \"$ac_try\"") >&5
17677   (eval $ac_try) 2>&5
17678   ac_status=$?
17679   echo "$as_me:17679: \$? = $ac_status" >&5
17680   (exit $ac_status); }; }; then
17681   ac_cv_header_time=yes
17682 else
17683   echo "$as_me: failed program was:" >&5
17684 cat conftest.$ac_ext >&5
17685 ac_cv_header_time=no
17686 fi
17687 rm -f conftest.$ac_objext conftest.$ac_ext
17688 fi
17689 echo "$as_me:17689: result: $ac_cv_header_time" >&5
17690 echo "${ECHO_T}$ac_cv_header_time" >&6
17691 if test $ac_cv_header_time = yes; then
17692
17693 cat >>confdefs.h <<\EOF
17694 #define TIME_WITH_SYS_TIME 1
17695 EOF
17696
17697 fi
17698
17699 cf_regex_func=no
17700
17701 cf_regex_libs="regex re"
17702 case $host_os in
17703 (mingw*)
17704         cf_regex_libs="gnurx $cf_regex_libs"
17705         ;;
17706 esac
17707
17708 echo "$as_me:17708: checking for regcomp" >&5
17709 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17710 if test "${ac_cv_func_regcomp+set}" = set; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713   cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716 #define regcomp autoconf_temporary
17717 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17718 #undef regcomp
17719
17720 #ifdef __cplusplus
17721 extern "C"
17722 #endif
17723
17724 /* We use char because int might match the return type of a gcc2
17725    builtin and then its argument prototype would still apply.  */
17726 char regcomp (void);
17727
17728 int
17729 main (void)
17730 {
17731
17732 /* The GNU C library defines stubs for functions which it implements
17733     to always fail with ENOSYS.  Some functions are actually named
17734     something starting with __ and the normal name is an alias.  */
17735 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17736 #error found stub for regcomp
17737 #endif
17738
17739         return regcomp ();
17740   ;
17741   return 0;
17742 }
17743 _ACEOF
17744 rm -f conftest.$ac_objext conftest$ac_exeext
17745 if { (eval echo "$as_me:17745: \"$ac_link\"") >&5
17746   (eval $ac_link) 2>&5
17747   ac_status=$?
17748   echo "$as_me:17748: \$? = $ac_status" >&5
17749   (exit $ac_status); } &&
17750          { ac_try='test -s conftest$ac_exeext'
17751   { (eval echo "$as_me:17751: \"$ac_try\"") >&5
17752   (eval $ac_try) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); }; }; then
17756   ac_cv_func_regcomp=yes
17757 else
17758   echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 ac_cv_func_regcomp=no
17761 fi
17762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17763 fi
17764 echo "$as_me:17764: result: $ac_cv_func_regcomp" >&5
17765 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17766 if test $ac_cv_func_regcomp = yes; then
17767   cf_regex_func=regcomp
17768 else
17769
17770         for cf_regex_lib in $cf_regex_libs
17771         do
17772                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17773 echo "$as_me:17773: checking for regcomp in -l$cf_regex_lib" >&5
17774 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17775 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17776   echo $ECHO_N "(cached) $ECHO_C" >&6
17777 else
17778   ac_check_lib_save_LIBS=$LIBS
17779 LIBS="-l$cf_regex_lib  $LIBS"
17780 cat >conftest.$ac_ext <<_ACEOF
17781 #line 17781 "configure"
17782 #include "confdefs.h"
17783
17784 /* Override any gcc2 internal prototype to avoid an error.  */
17785 #ifdef __cplusplus
17786 extern "C"
17787 #endif
17788 /* We use char because int might match the return type of a gcc2
17789    builtin and then its argument prototype would still apply.  */
17790 char regcomp ();
17791 int
17792 main (void)
17793 {
17794 regcomp ();
17795   ;
17796   return 0;
17797 }
17798 _ACEOF
17799 rm -f conftest.$ac_objext conftest$ac_exeext
17800 if { (eval echo "$as_me:17800: \"$ac_link\"") >&5
17801   (eval $ac_link) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit $ac_status); } &&
17805          { ac_try='test -s conftest$ac_exeext'
17806   { (eval echo "$as_me:17806: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:17809: \$? = $ac_status" >&5
17810   (exit $ac_status); }; }; then
17811   eval "$as_ac_Lib=yes"
17812 else
17813   echo "$as_me: failed program was:" >&5
17814 cat conftest.$ac_ext >&5
17815 eval "$as_ac_Lib=no"
17816 fi
17817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17818 LIBS=$ac_check_lib_save_LIBS
17819 fi
17820 echo "$as_me:17820: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17821 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17822 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17823
17824 cf_add_libs="$LIBS"
17825 # reverse order
17826 cf_add_0lib=
17827 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17828 # filter duplicates
17829 for cf_add_1lib in $cf_add_0lib; do
17830         for cf_add_2lib in $cf_add_libs; do
17831                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17832                         cf_add_1lib=
17833                         break
17834                 fi
17835         done
17836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17837 done
17838 LIBS="$cf_add_libs"
17839
17840                                 cf_regex_func=regcomp
17841                                 break
17842 fi
17843
17844         done
17845
17846 fi
17847
17848 if test "$cf_regex_func" = no ; then
17849         echo "$as_me:17849: checking for compile" >&5
17850 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17851 if test "${ac_cv_func_compile+set}" = set; then
17852   echo $ECHO_N "(cached) $ECHO_C" >&6
17853 else
17854   cat >conftest.$ac_ext <<_ACEOF
17855 #line 17855 "configure"
17856 #include "confdefs.h"
17857 #define compile autoconf_temporary
17858 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17859 #undef compile
17860
17861 #ifdef __cplusplus
17862 extern "C"
17863 #endif
17864
17865 /* We use char because int might match the return type of a gcc2
17866    builtin and then its argument prototype would still apply.  */
17867 char compile (void);
17868
17869 int
17870 main (void)
17871 {
17872
17873 /* The GNU C library defines stubs for functions which it implements
17874     to always fail with ENOSYS.  Some functions are actually named
17875     something starting with __ and the normal name is an alias.  */
17876 #if defined (__stub_compile) || defined (__stub___compile)
17877 #error found stub for compile
17878 #endif
17879
17880         return compile ();
17881   ;
17882   return 0;
17883 }
17884 _ACEOF
17885 rm -f conftest.$ac_objext conftest$ac_exeext
17886 if { (eval echo "$as_me:17886: \"$ac_link\"") >&5
17887   (eval $ac_link) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit $ac_status); } &&
17891          { ac_try='test -s conftest$ac_exeext'
17892   { (eval echo "$as_me:17892: \"$ac_try\"") >&5
17893   (eval $ac_try) 2>&5
17894   ac_status=$?
17895   echo "$as_me:17895: \$? = $ac_status" >&5
17896   (exit $ac_status); }; }; then
17897   ac_cv_func_compile=yes
17898 else
17899   echo "$as_me: failed program was:" >&5
17900 cat conftest.$ac_ext >&5
17901 ac_cv_func_compile=no
17902 fi
17903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17904 fi
17905 echo "$as_me:17905: result: $ac_cv_func_compile" >&5
17906 echo "${ECHO_T}$ac_cv_func_compile" >&6
17907 if test $ac_cv_func_compile = yes; then
17908   cf_regex_func=compile
17909 else
17910
17911                 echo "$as_me:17911: checking for compile in -lgen" >&5
17912 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17913 if test "${ac_cv_lib_gen_compile+set}" = set; then
17914   echo $ECHO_N "(cached) $ECHO_C" >&6
17915 else
17916   ac_check_lib_save_LIBS=$LIBS
17917 LIBS="-lgen  $LIBS"
17918 cat >conftest.$ac_ext <<_ACEOF
17919 #line 17919 "configure"
17920 #include "confdefs.h"
17921
17922 /* Override any gcc2 internal prototype to avoid an error.  */
17923 #ifdef __cplusplus
17924 extern "C"
17925 #endif
17926 /* We use char because int might match the return type of a gcc2
17927    builtin and then its argument prototype would still apply.  */
17928 char compile ();
17929 int
17930 main (void)
17931 {
17932 compile ();
17933   ;
17934   return 0;
17935 }
17936 _ACEOF
17937 rm -f conftest.$ac_objext conftest$ac_exeext
17938 if { (eval echo "$as_me:17938: \"$ac_link\"") >&5
17939   (eval $ac_link) 2>&5
17940   ac_status=$?
17941   echo "$as_me:17941: \$? = $ac_status" >&5
17942   (exit $ac_status); } &&
17943          { ac_try='test -s conftest$ac_exeext'
17944   { (eval echo "$as_me:17944: \"$ac_try\"") >&5
17945   (eval $ac_try) 2>&5
17946   ac_status=$?
17947   echo "$as_me:17947: \$? = $ac_status" >&5
17948   (exit $ac_status); }; }; then
17949   ac_cv_lib_gen_compile=yes
17950 else
17951   echo "$as_me: failed program was:" >&5
17952 cat conftest.$ac_ext >&5
17953 ac_cv_lib_gen_compile=no
17954 fi
17955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17956 LIBS=$ac_check_lib_save_LIBS
17957 fi
17958 echo "$as_me:17958: result: $ac_cv_lib_gen_compile" >&5
17959 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17960 if test $ac_cv_lib_gen_compile = yes; then
17961
17962 cf_add_libs="$LIBS"
17963 # reverse order
17964 cf_add_0lib=
17965 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17966 # filter duplicates
17967 for cf_add_1lib in $cf_add_0lib; do
17968         for cf_add_2lib in $cf_add_libs; do
17969                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17970                         cf_add_1lib=
17971                         break
17972                 fi
17973         done
17974         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17975 done
17976 LIBS="$cf_add_libs"
17977
17978                                 cf_regex_func=compile
17979 fi
17980
17981 fi
17982
17983 fi
17984
17985 if test "$cf_regex_func" = no ; then
17986         { echo "$as_me:17986: WARNING: cannot find regular expression library" >&5
17987 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17988 fi
17989
17990 echo "$as_me:17990: checking for regular-expression headers" >&5
17991 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17992 if test "${cf_cv_regex_hdrs+set}" = set; then
17993   echo $ECHO_N "(cached) $ECHO_C" >&6
17994 else
17995
17996 cf_cv_regex_hdrs=no
17997 case $cf_regex_func in
17998 (compile)
17999         for cf_regex_hdr in regexp.h regexpr.h
18000         do
18001                 cat >conftest.$ac_ext <<_ACEOF
18002 #line 18002 "configure"
18003 #include "confdefs.h"
18004 #include <$cf_regex_hdr>
18005 int
18006 main (void)
18007 {
18008
18009                         char *p = compile("", "", "", 0);
18010                         int x = step("", "");
18011
18012   ;
18013   return 0;
18014 }
18015 _ACEOF
18016 rm -f conftest.$ac_objext conftest$ac_exeext
18017 if { (eval echo "$as_me:18017: \"$ac_link\"") >&5
18018   (eval $ac_link) 2>&5
18019   ac_status=$?
18020   echo "$as_me:18020: \$? = $ac_status" >&5
18021   (exit $ac_status); } &&
18022          { ac_try='test -s conftest$ac_exeext'
18023   { (eval echo "$as_me:18023: \"$ac_try\"") >&5
18024   (eval $ac_try) 2>&5
18025   ac_status=$?
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit $ac_status); }; }; then
18028
18029                         cf_cv_regex_hdrs=$cf_regex_hdr
18030                         break
18031
18032 else
18033   echo "$as_me: failed program was:" >&5
18034 cat conftest.$ac_ext >&5
18035 fi
18036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18037         done
18038         ;;
18039 (*)
18040         for cf_regex_hdr in regex.h
18041         do
18042                 cat >conftest.$ac_ext <<_ACEOF
18043 #line 18043 "configure"
18044 #include "confdefs.h"
18045 #include <sys/types.h>
18046 #include <$cf_regex_hdr>
18047 int
18048 main (void)
18049 {
18050
18051                         regex_t *p;
18052                         int x = regcomp(p, "", 0);
18053                         int y = regexec(p, "", 0, 0, 0);
18054                         regfree(p);
18055
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 rm -f conftest.$ac_objext conftest$ac_exeext
18061 if { (eval echo "$as_me:18061: \"$ac_link\"") >&5
18062   (eval $ac_link) 2>&5
18063   ac_status=$?
18064   echo "$as_me:18064: \$? = $ac_status" >&5
18065   (exit $ac_status); } &&
18066          { ac_try='test -s conftest$ac_exeext'
18067   { (eval echo "$as_me:18067: \"$ac_try\"") >&5
18068   (eval $ac_try) 2>&5
18069   ac_status=$?
18070   echo "$as_me:18070: \$? = $ac_status" >&5
18071   (exit $ac_status); }; }; then
18072
18073                         cf_cv_regex_hdrs=$cf_regex_hdr
18074                         break
18075
18076 else
18077   echo "$as_me: failed program was:" >&5
18078 cat conftest.$ac_ext >&5
18079 fi
18080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18081         done
18082         ;;
18083 esac
18084
18085 fi
18086 echo "$as_me:18086: result: $cf_cv_regex_hdrs" >&5
18087 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18088
18089 case $cf_cv_regex_hdrs in
18090         (no)            { echo "$as_me:18090: WARNING: no regular expression header found" >&5
18091 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18092         (regex.h)
18093 cat >>confdefs.h <<\EOF
18094 #define HAVE_REGEX_H_FUNCS 1
18095 EOF
18096  ;;
18097         (regexp.h)
18098 cat >>confdefs.h <<\EOF
18099 #define HAVE_REGEXP_H_FUNCS 1
18100 EOF
18101  ;;
18102         (regexpr.h)
18103 cat >>confdefs.h <<\EOF
18104 #define HAVE_REGEXPR_H_FUNCS 1
18105 EOF
18106  ;;
18107 esac
18108
18109 for ac_header in \
18110 fcntl.h \
18111 getopt.h \
18112 limits.h \
18113 locale.h \
18114 math.h \
18115 poll.h \
18116 sys/bsdtypes.h \
18117 sys/ioctl.h \
18118 sys/param.h \
18119 sys/poll.h \
18120 sys/select.h \
18121 sys/time.h \
18122 sys/times.h \
18123 ttyent.h \
18124 unistd.h \
18125 wctype.h \
18126
18127 do
18128 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18129 echo "$as_me:18129: checking for $ac_header" >&5
18130 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18131 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18132   echo $ECHO_N "(cached) $ECHO_C" >&6
18133 else
18134   cat >conftest.$ac_ext <<_ACEOF
18135 #line 18135 "configure"
18136 #include "confdefs.h"
18137 #include <$ac_header>
18138 _ACEOF
18139 if { (eval echo "$as_me:18139: \"$ac_cpp conftest.$ac_ext\"") >&5
18140   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18141   ac_status=$?
18142   egrep -v '^ *\+' conftest.er1 >conftest.err
18143   rm -f conftest.er1
18144   cat conftest.err >&5
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); } >/dev/null; then
18147   if test -s conftest.err; then
18148     ac_cpp_err=$ac_c_preproc_warn_flag
18149   else
18150     ac_cpp_err=
18151   fi
18152 else
18153   ac_cpp_err=yes
18154 fi
18155 if test -z "$ac_cpp_err"; then
18156   eval "$as_ac_Header=yes"
18157 else
18158   echo "$as_me: failed program was:" >&5
18159   cat conftest.$ac_ext >&5
18160   eval "$as_ac_Header=no"
18161 fi
18162 rm -f conftest.err conftest.$ac_ext
18163 fi
18164 echo "$as_me:18164: result: `eval echo '${'$as_ac_Header'}'`" >&5
18165 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18166 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18167   cat >>confdefs.h <<EOF
18168 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18169 EOF
18170
18171 fi
18172 done
18173
18174 for ac_header in unistd.h getopt.h
18175 do
18176 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18177 echo "$as_me:18177: checking for $ac_header" >&5
18178 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18179 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18180   echo $ECHO_N "(cached) $ECHO_C" >&6
18181 else
18182   cat >conftest.$ac_ext <<_ACEOF
18183 #line 18183 "configure"
18184 #include "confdefs.h"
18185 #include <$ac_header>
18186 _ACEOF
18187 if { (eval echo "$as_me:18187: \"$ac_cpp conftest.$ac_ext\"") >&5
18188   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18189   ac_status=$?
18190   egrep -v '^ *\+' conftest.er1 >conftest.err
18191   rm -f conftest.er1
18192   cat conftest.err >&5
18193   echo "$as_me:18193: \$? = $ac_status" >&5
18194   (exit $ac_status); } >/dev/null; then
18195   if test -s conftest.err; then
18196     ac_cpp_err=$ac_c_preproc_warn_flag
18197   else
18198     ac_cpp_err=
18199   fi
18200 else
18201   ac_cpp_err=yes
18202 fi
18203 if test -z "$ac_cpp_err"; then
18204   eval "$as_ac_Header=yes"
18205 else
18206   echo "$as_me: failed program was:" >&5
18207   cat conftest.$ac_ext >&5
18208   eval "$as_ac_Header=no"
18209 fi
18210 rm -f conftest.err conftest.$ac_ext
18211 fi
18212 echo "$as_me:18212: result: `eval echo '${'$as_ac_Header'}'`" >&5
18213 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18214 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18215   cat >>confdefs.h <<EOF
18216 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18217 EOF
18218
18219 fi
18220 done
18221
18222 echo "$as_me:18222: checking for header declaring getopt variables" >&5
18223 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18224 if test "${cf_cv_getopt_header+set}" = set; then
18225   echo $ECHO_N "(cached) $ECHO_C" >&6
18226 else
18227
18228 cf_cv_getopt_header=none
18229 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18230 do
18231 cat >conftest.$ac_ext <<_ACEOF
18232 #line 18232 "configure"
18233 #include "confdefs.h"
18234
18235 #include <$cf_header>
18236 int
18237 main (void)
18238 {
18239 int x = optind; char *y = optarg
18240   ;
18241   return 0;
18242 }
18243 _ACEOF
18244 rm -f conftest.$ac_objext
18245 if { (eval echo "$as_me:18245: \"$ac_compile\"") >&5
18246   (eval $ac_compile) 2>&5
18247   ac_status=$?
18248   echo "$as_me:18248: \$? = $ac_status" >&5
18249   (exit $ac_status); } &&
18250          { ac_try='test -s conftest.$ac_objext'
18251   { (eval echo "$as_me:18251: \"$ac_try\"") >&5
18252   (eval $ac_try) 2>&5
18253   ac_status=$?
18254   echo "$as_me:18254: \$? = $ac_status" >&5
18255   (exit $ac_status); }; }; then
18256   cf_cv_getopt_header=$cf_header
18257  break
18258 else
18259   echo "$as_me: failed program was:" >&5
18260 cat conftest.$ac_ext >&5
18261 fi
18262 rm -f conftest.$ac_objext conftest.$ac_ext
18263 done
18264
18265 fi
18266 echo "$as_me:18266: result: $cf_cv_getopt_header" >&5
18267 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18268 if test $cf_cv_getopt_header != none ; then
18269
18270 cat >>confdefs.h <<\EOF
18271 #define HAVE_GETOPT_HEADER 1
18272 EOF
18273
18274 fi
18275 if test $cf_cv_getopt_header = getopt.h ; then
18276
18277 cat >>confdefs.h <<\EOF
18278 #define NEED_GETOPT_H 1
18279 EOF
18280
18281 fi
18282
18283 echo "$as_me:18283: checking if external environ is declared" >&5
18284 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18285 if test "${cf_cv_dcl_environ+set}" = set; then
18286   echo $ECHO_N "(cached) $ECHO_C" >&6
18287 else
18288
18289     cat >conftest.$ac_ext <<_ACEOF
18290 #line 18290 "configure"
18291 #include "confdefs.h"
18292
18293 #ifdef HAVE_STDLIB_H
18294 #include <stdlib.h>
18295 #endif
18296 #include <unistd.h>
18297 int
18298 main (void)
18299 {
18300 int x = (int) environ
18301   ;
18302   return 0;
18303 }
18304 _ACEOF
18305 rm -f conftest.$ac_objext
18306 if { (eval echo "$as_me:18306: \"$ac_compile\"") >&5
18307   (eval $ac_compile) 2>&5
18308   ac_status=$?
18309   echo "$as_me:18309: \$? = $ac_status" >&5
18310   (exit $ac_status); } &&
18311          { ac_try='test -s conftest.$ac_objext'
18312   { (eval echo "$as_me:18312: \"$ac_try\"") >&5
18313   (eval $ac_try) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit $ac_status); }; }; then
18317   cf_cv_dcl_environ=yes
18318 else
18319   echo "$as_me: failed program was:" >&5
18320 cat conftest.$ac_ext >&5
18321 cf_cv_dcl_environ=no
18322 fi
18323 rm -f conftest.$ac_objext conftest.$ac_ext
18324
18325 fi
18326 echo "$as_me:18326: result: $cf_cv_dcl_environ" >&5
18327 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18328
18329 if test "$cf_cv_dcl_environ" = no ; then
18330
18331 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18332
18333     cat >>confdefs.h <<EOF
18334 #define $cf_result 1
18335 EOF
18336
18337 fi
18338
18339 # It's possible (for near-UNIX clones) that the data doesn't exist
18340
18341 echo "$as_me:18341: checking if external environ exists" >&5
18342 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18343 if test "${cf_cv_have_environ+set}" = set; then
18344   echo $ECHO_N "(cached) $ECHO_C" >&6
18345 else
18346
18347         cat >conftest.$ac_ext <<_ACEOF
18348 #line 18348 "configure"
18349 #include "confdefs.h"
18350
18351 #undef environ
18352 extern int environ;
18353
18354 int
18355 main (void)
18356 {
18357 environ = 2
18358   ;
18359   return 0;
18360 }
18361 _ACEOF
18362 rm -f conftest.$ac_objext conftest$ac_exeext
18363 if { (eval echo "$as_me:18363: \"$ac_link\"") >&5
18364   (eval $ac_link) 2>&5
18365   ac_status=$?
18366   echo "$as_me:18366: \$? = $ac_status" >&5
18367   (exit $ac_status); } &&
18368          { ac_try='test -s conftest$ac_exeext'
18369   { (eval echo "$as_me:18369: \"$ac_try\"") >&5
18370   (eval $ac_try) 2>&5
18371   ac_status=$?
18372   echo "$as_me:18372: \$? = $ac_status" >&5
18373   (exit $ac_status); }; }; then
18374   cf_cv_have_environ=yes
18375 else
18376   echo "$as_me: failed program was:" >&5
18377 cat conftest.$ac_ext >&5
18378 cf_cv_have_environ=no
18379 fi
18380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18381
18382 fi
18383 echo "$as_me:18383: result: $cf_cv_have_environ" >&5
18384 echo "${ECHO_T}$cf_cv_have_environ" >&6
18385
18386 if test "$cf_cv_have_environ" = yes ; then
18387
18388 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18389
18390         cat >>confdefs.h <<EOF
18391 #define $cf_result 1
18392 EOF
18393
18394 fi
18395
18396 echo "$as_me:18396: checking for getenv" >&5
18397 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18398 if test "${ac_cv_func_getenv+set}" = set; then
18399   echo $ECHO_N "(cached) $ECHO_C" >&6
18400 else
18401   cat >conftest.$ac_ext <<_ACEOF
18402 #line 18402 "configure"
18403 #include "confdefs.h"
18404 #define getenv autoconf_temporary
18405 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18406 #undef getenv
18407
18408 #ifdef __cplusplus
18409 extern "C"
18410 #endif
18411
18412 /* We use char because int might match the return type of a gcc2
18413    builtin and then its argument prototype would still apply.  */
18414 char getenv (void);
18415
18416 int
18417 main (void)
18418 {
18419
18420 /* The GNU C library defines stubs for functions which it implements
18421     to always fail with ENOSYS.  Some functions are actually named
18422     something starting with __ and the normal name is an alias.  */
18423 #if defined (__stub_getenv) || defined (__stub___getenv)
18424 #error found stub for getenv
18425 #endif
18426
18427         return getenv ();
18428   ;
18429   return 0;
18430 }
18431 _ACEOF
18432 rm -f conftest.$ac_objext conftest$ac_exeext
18433 if { (eval echo "$as_me:18433: \"$ac_link\"") >&5
18434   (eval $ac_link) 2>&5
18435   ac_status=$?
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); } &&
18438          { ac_try='test -s conftest$ac_exeext'
18439   { (eval echo "$as_me:18439: \"$ac_try\"") >&5
18440   (eval $ac_try) 2>&5
18441   ac_status=$?
18442   echo "$as_me:18442: \$? = $ac_status" >&5
18443   (exit $ac_status); }; }; then
18444   ac_cv_func_getenv=yes
18445 else
18446   echo "$as_me: failed program was:" >&5
18447 cat conftest.$ac_ext >&5
18448 ac_cv_func_getenv=no
18449 fi
18450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18451 fi
18452 echo "$as_me:18452: result: $ac_cv_func_getenv" >&5
18453 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18454
18455 for ac_func in putenv setenv strdup
18456 do
18457 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18458 echo "$as_me:18458: checking for $ac_func" >&5
18459 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18460 if eval "test \"\${$as_ac_var+set}\" = set"; then
18461   echo $ECHO_N "(cached) $ECHO_C" >&6
18462 else
18463   cat >conftest.$ac_ext <<_ACEOF
18464 #line 18464 "configure"
18465 #include "confdefs.h"
18466 #define $ac_func autoconf_temporary
18467 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18468 #undef $ac_func
18469
18470 #ifdef __cplusplus
18471 extern "C"
18472 #endif
18473
18474 /* We use char because int might match the return type of a gcc2
18475    builtin and then its argument prototype would still apply.  */
18476 char $ac_func (void);
18477
18478 int
18479 main (void)
18480 {
18481
18482 /* The GNU C library defines stubs for functions which it implements
18483     to always fail with ENOSYS.  Some functions are actually named
18484     something starting with __ and the normal name is an alias.  */
18485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18486 #error found stub for $ac_func
18487 #endif
18488
18489         return $ac_func ();
18490   ;
18491   return 0;
18492 }
18493 _ACEOF
18494 rm -f conftest.$ac_objext conftest$ac_exeext
18495 if { (eval echo "$as_me:18495: \"$ac_link\"") >&5
18496   (eval $ac_link) 2>&5
18497   ac_status=$?
18498   echo "$as_me:18498: \$? = $ac_status" >&5
18499   (exit $ac_status); } &&
18500          { ac_try='test -s conftest$ac_exeext'
18501   { (eval echo "$as_me:18501: \"$ac_try\"") >&5
18502   (eval $ac_try) 2>&5
18503   ac_status=$?
18504   echo "$as_me:18504: \$? = $ac_status" >&5
18505   (exit $ac_status); }; }; then
18506   eval "$as_ac_var=yes"
18507 else
18508   echo "$as_me: failed program was:" >&5
18509 cat conftest.$ac_ext >&5
18510 eval "$as_ac_var=no"
18511 fi
18512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18513 fi
18514 echo "$as_me:18514: result: `eval echo '${'$as_ac_var'}'`" >&5
18515 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18516 if test `eval echo '${'$as_ac_var'}'` = yes; then
18517   cat >>confdefs.h <<EOF
18518 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18519 EOF
18520
18521 fi
18522 done
18523
18524 echo "$as_me:18524: checking if getenv returns consistent values" >&5
18525 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18526 if test "${cf_cv_consistent_getenv+set}" = set; then
18527   echo $ECHO_N "(cached) $ECHO_C" >&6
18528 else
18529
18530 if test "$cross_compiling" = yes; then
18531   cf_cv_consistent_getenv=unknown
18532 else
18533   cat >conftest.$ac_ext <<_ACEOF
18534 #line 18534 "configure"
18535 #include "confdefs.h"
18536
18537 #include <stdlib.h>
18538 #include <unistd.h>
18539 #include <stdio.h>
18540 #include <string.h>
18541 #include <sys/types.h>
18542
18543 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18544 extern char **environ;  /* POSIX, but some systems are not... */
18545 #endif
18546
18547 #if defined(HAVE_STRDUP)
18548 #define str_alloc(s) strdup(s)
18549 #else
18550 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18551 #endif
18552
18553 static void set_value(const char *name, const char *value)
18554 {
18555 #if defined(HAVE_SETENV)
18556         setenv(name, value, 1);
18557 #elif defined(HAVE_PUTENV)
18558         char buffer[1024];
18559         sprintf(buffer, "%s=%s", name, value);
18560         putenv(str_alloc(buffer));
18561 #else
18562 #error neither putenv/setenv found
18563 #endif
18564 }
18565 int main(void)
18566 {
18567         int pass;
18568         size_t numenv, limit, j;
18569         char **mynames;
18570         char **myvalues;
18571         char **mypointer;
18572         char *equals;
18573         for (numenv = 0; environ[numenv]; ++numenv) ;
18574         limit = numenv + 10;
18575         mynames = (char **) calloc(limit + 1, sizeof(char *));
18576         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18577         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18578 #if defined(HAVE_ENVIRON)
18579         for (j = 0; environ[j]; ++j) {
18580                 mynames[j] = str_alloc(environ[j]);
18581                 equals = strchr(mynames[j], '=');
18582                 if (equals != 0) {
18583                         *equals++ = '\0';
18584                         myvalues[j] = str_alloc(equals);
18585                 } else {
18586                         myvalues[j] = str_alloc("");
18587                 }
18588         }
18589 #endif
18590         for (j = numenv; j < limit; ++j) {
18591                 char name[80];
18592                 char value[80];
18593                 size_t found;
18594                 size_t k = 0;
18595                 do {
18596                         size_t jk;
18597                         found = 0;
18598                         sprintf(name, "TERM%lu", (unsigned long) k);
18599                         for (jk = 0; jk < j; ++jk) {
18600                                 if (!strcmp(name, mynames[jk])) {
18601                                         found = 1;
18602                                         ++k;
18603                                         break;
18604                                 }
18605                         }
18606                 } while (found);
18607                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18608                 set_value(name, value);
18609                 mynames[j] = str_alloc(name);
18610                 myvalues[j] = str_alloc(value);
18611         }
18612         for (pass = 0; pass < 3; ++pass) {
18613                 for (j = 0; j < limit; ++j) {
18614                         char *value = getenv(mynames[j]);
18615                         if (pass) {
18616                                 if (value == 0) {
18617                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18618                                         ${cf_cv_main_return:-return}(1);
18619                                 } else if (value != mypointer[j]) {
18620                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18621                                         ${cf_cv_main_return:-return}(1);
18622                                 } else if (strcmp(value, myvalues[j])) {
18623                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18624                                         ${cf_cv_main_return:-return}(1);
18625                                 }
18626                         } else {
18627                                 size_t k;
18628                                 mypointer[j] = value;
18629                                 for (k = 0; k < j; ++k) {
18630                                         if (mypointer[j] == mypointer[k]) {
18631                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18632                                                 ${cf_cv_main_return:-return}(1);
18633                                         }
18634                                 }
18635                         }
18636                 }
18637         }
18638         ${cf_cv_main_return:-return}(0);
18639 }
18640
18641 _ACEOF
18642 rm -f conftest$ac_exeext
18643 if { (eval echo "$as_me:18643: \"$ac_link\"") >&5
18644   (eval $ac_link) 2>&5
18645   ac_status=$?
18646   echo "$as_me:18646: \$? = $ac_status" >&5
18647   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18648   { (eval echo "$as_me:18648: \"$ac_try\"") >&5
18649   (eval $ac_try) 2>&5
18650   ac_status=$?
18651   echo "$as_me:18651: \$? = $ac_status" >&5
18652   (exit $ac_status); }; }; then
18653   cf_cv_consistent_getenv=yes
18654 else
18655   echo "$as_me: program exited with status $ac_status" >&5
18656 echo "$as_me: failed program was:" >&5
18657 cat conftest.$ac_ext >&5
18658 cf_cv_consistent_getenv=no
18659 fi
18660 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18661 fi
18662
18663 fi
18664 echo "$as_me:18664: result: $cf_cv_consistent_getenv" >&5
18665 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18666
18667 if test "x$cf_cv_consistent_getenv" = xno
18668 then
18669
18670 cat >>confdefs.h <<\EOF
18671 #define HAVE_CONSISTENT_GETENV 1
18672 EOF
18673
18674 fi
18675
18676 if test "x$cf_cv_consistent_getenv" = xno && \
18677         test "x$cf_with_trace" = xyes
18678 then
18679         { echo "$as_me:18679: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18680 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18681 fi
18682
18683 # check for ISC (this may also define _POSIX_SOURCE)
18684 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18685 if test "x$ISC" = xyes ; then
18686
18687 echo "$as_me:18687: checking for main in -lcposix" >&5
18688 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18689 if test "${ac_cv_lib_cposix_main+set}" = set; then
18690   echo $ECHO_N "(cached) $ECHO_C" >&6
18691 else
18692   ac_check_lib_save_LIBS=$LIBS
18693 LIBS="-lcposix  $LIBS"
18694 cat >conftest.$ac_ext <<_ACEOF
18695 #line 18695 "configure"
18696 #include "confdefs.h"
18697
18698 int
18699 main (void)
18700 {
18701 main ();
18702   ;
18703   return 0;
18704 }
18705 _ACEOF
18706 rm -f conftest.$ac_objext conftest$ac_exeext
18707 if { (eval echo "$as_me:18707: \"$ac_link\"") >&5
18708   (eval $ac_link) 2>&5
18709   ac_status=$?
18710   echo "$as_me:18710: \$? = $ac_status" >&5
18711   (exit $ac_status); } &&
18712          { ac_try='test -s conftest$ac_exeext'
18713   { (eval echo "$as_me:18713: \"$ac_try\"") >&5
18714   (eval $ac_try) 2>&5
18715   ac_status=$?
18716   echo "$as_me:18716: \$? = $ac_status" >&5
18717   (exit $ac_status); }; }; then
18718   ac_cv_lib_cposix_main=yes
18719 else
18720   echo "$as_me: failed program was:" >&5
18721 cat conftest.$ac_ext >&5
18722 ac_cv_lib_cposix_main=no
18723 fi
18724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18725 LIBS=$ac_check_lib_save_LIBS
18726 fi
18727 echo "$as_me:18727: result: $ac_cv_lib_cposix_main" >&5
18728 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18729 if test $ac_cv_lib_cposix_main = yes; then
18730   cat >>confdefs.h <<EOF
18731 #define HAVE_LIBCPOSIX 1
18732 EOF
18733
18734   LIBS="-lcposix $LIBS"
18735
18736 fi
18737
18738         echo "$as_me:18738: checking for bzero in -linet" >&5
18739 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18740 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18741   echo $ECHO_N "(cached) $ECHO_C" >&6
18742 else
18743   ac_check_lib_save_LIBS=$LIBS
18744 LIBS="-linet  $LIBS"
18745 cat >conftest.$ac_ext <<_ACEOF
18746 #line 18746 "configure"
18747 #include "confdefs.h"
18748
18749 /* Override any gcc2 internal prototype to avoid an error.  */
18750 #ifdef __cplusplus
18751 extern "C"
18752 #endif
18753 /* We use char because int might match the return type of a gcc2
18754    builtin and then its argument prototype would still apply.  */
18755 char bzero ();
18756 int
18757 main (void)
18758 {
18759 bzero ();
18760   ;
18761   return 0;
18762 }
18763 _ACEOF
18764 rm -f conftest.$ac_objext conftest$ac_exeext
18765 if { (eval echo "$as_me:18765: \"$ac_link\"") >&5
18766   (eval $ac_link) 2>&5
18767   ac_status=$?
18768   echo "$as_me:18768: \$? = $ac_status" >&5
18769   (exit $ac_status); } &&
18770          { ac_try='test -s conftest$ac_exeext'
18771   { (eval echo "$as_me:18771: \"$ac_try\"") >&5
18772   (eval $ac_try) 2>&5
18773   ac_status=$?
18774   echo "$as_me:18774: \$? = $ac_status" >&5
18775   (exit $ac_status); }; }; then
18776   ac_cv_lib_inet_bzero=yes
18777 else
18778   echo "$as_me: failed program was:" >&5
18779 cat conftest.$ac_ext >&5
18780 ac_cv_lib_inet_bzero=no
18781 fi
18782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18783 LIBS=$ac_check_lib_save_LIBS
18784 fi
18785 echo "$as_me:18785: result: $ac_cv_lib_inet_bzero" >&5
18786 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18787 if test $ac_cv_lib_inet_bzero = yes; then
18788
18789 cf_add_libs="$LIBS"
18790 # reverse order
18791 cf_add_0lib=
18792 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18793 # filter duplicates
18794 for cf_add_1lib in $cf_add_0lib; do
18795         for cf_add_2lib in $cf_add_libs; do
18796                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18797                         cf_add_1lib=
18798                         break
18799                 fi
18800         done
18801         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18802 done
18803 LIBS="$cf_add_libs"
18804
18805 fi
18806 fi
18807
18808 echo "$as_me:18808: checking if sys/time.h works with sys/select.h" >&5
18809 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18810 if test "${cf_cv_sys_time_select+set}" = set; then
18811   echo $ECHO_N "(cached) $ECHO_C" >&6
18812 else
18813
18814 cat >conftest.$ac_ext <<_ACEOF
18815 #line 18815 "configure"
18816 #include "confdefs.h"
18817
18818 #include <sys/types.h>
18819 #ifdef HAVE_SYS_TIME_H
18820 #include <sys/time.h>
18821 #endif
18822 #ifdef HAVE_SYS_SELECT_H
18823 #include <sys/select.h>
18824 #endif
18825
18826 int
18827 main (void)
18828 {
18829
18830   ;
18831   return 0;
18832 }
18833 _ACEOF
18834 rm -f conftest.$ac_objext
18835 if { (eval echo "$as_me:18835: \"$ac_compile\"") >&5
18836   (eval $ac_compile) 2>&5
18837   ac_status=$?
18838   echo "$as_me:18838: \$? = $ac_status" >&5
18839   (exit $ac_status); } &&
18840          { ac_try='test -s conftest.$ac_objext'
18841   { (eval echo "$as_me:18841: \"$ac_try\"") >&5
18842   (eval $ac_try) 2>&5
18843   ac_status=$?
18844   echo "$as_me:18844: \$? = $ac_status" >&5
18845   (exit $ac_status); }; }; then
18846   cf_cv_sys_time_select=yes
18847 else
18848   echo "$as_me: failed program was:" >&5
18849 cat conftest.$ac_ext >&5
18850 cf_cv_sys_time_select=no
18851 fi
18852 rm -f conftest.$ac_objext conftest.$ac_ext
18853
18854 fi
18855
18856 echo "$as_me:18856: result: $cf_cv_sys_time_select" >&5
18857 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18858 test "$cf_cv_sys_time_select" = yes &&
18859 cat >>confdefs.h <<\EOF
18860 #define HAVE_SYS_TIME_SELECT 1
18861 EOF
18862
18863 ###     checks for compiler characteristics
18864 ac_ext=c
18865 ac_cpp='$CPP $CPPFLAGS'
18866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18869 ac_main_return=return
18870
18871 echo "$as_me:18871: checking for an ANSI C-conforming const" >&5
18872 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18873 if test "${ac_cv_c_const+set}" = set; then
18874   echo $ECHO_N "(cached) $ECHO_C" >&6
18875 else
18876   cat >conftest.$ac_ext <<_ACEOF
18877 #line 18877 "configure"
18878 #include "confdefs.h"
18879
18880 int
18881 main (void)
18882 {
18883 /* FIXME: Include the comments suggested by Paul. */
18884 #ifndef __cplusplus
18885   /* Ultrix mips cc rejects this.  */
18886   typedef int charset[2];
18887   const charset x;
18888   /* SunOS 4.1.1 cc rejects this.  */
18889   char const *const *ccp;
18890   char **p;
18891   /* NEC SVR4.0.2 mips cc rejects this.  */
18892   struct point {int x, y;};
18893   static struct point const zero = {0,0};
18894   /* AIX XL C 1.02.0.0 rejects this.
18895      It does not let you subtract one const X* pointer from another in
18896      an arm of an if-expression whose if-part is not a constant
18897      expression */
18898   const char *g = "string";
18899   ccp = &g + (g ? g-g : 0);
18900   /* HPUX 7.0 cc rejects these. */
18901   ++ccp;
18902   p = (char**) ccp;
18903   ccp = (char const *const *) p;
18904   { /* SCO 3.2v4 cc rejects this.  */
18905     char *t;
18906     char const *s = 0 ? (char *) 0 : (char const *) 0;
18907
18908     *t++ = 0;
18909   }
18910   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18911     int x[] = {25, 17};
18912     const int *foo = &x[0];
18913     ++foo;
18914   }
18915   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18916     typedef const int *iptr;
18917     iptr p = 0;
18918     ++p;
18919   }
18920   { /* AIX XL C 1.02.0.0 rejects this saying
18921        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18922     struct s { int j; const int *ap[3]; };
18923     struct s *b; b->j = 5;
18924   }
18925   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18926     const int foo = 10;
18927   }
18928 #endif
18929
18930   ;
18931   return 0;
18932 }
18933 _ACEOF
18934 rm -f conftest.$ac_objext
18935 if { (eval echo "$as_me:18935: \"$ac_compile\"") >&5
18936   (eval $ac_compile) 2>&5
18937   ac_status=$?
18938   echo "$as_me:18938: \$? = $ac_status" >&5
18939   (exit $ac_status); } &&
18940          { ac_try='test -s conftest.$ac_objext'
18941   { (eval echo "$as_me:18941: \"$ac_try\"") >&5
18942   (eval $ac_try) 2>&5
18943   ac_status=$?
18944   echo "$as_me:18944: \$? = $ac_status" >&5
18945   (exit $ac_status); }; }; then
18946   ac_cv_c_const=yes
18947 else
18948   echo "$as_me: failed program was:" >&5
18949 cat conftest.$ac_ext >&5
18950 ac_cv_c_const=no
18951 fi
18952 rm -f conftest.$ac_objext conftest.$ac_ext
18953 fi
18954 echo "$as_me:18954: result: $ac_cv_c_const" >&5
18955 echo "${ECHO_T}$ac_cv_c_const" >&6
18956 if test $ac_cv_c_const = no; then
18957
18958 cat >>confdefs.h <<\EOF
18959 #define const
18960 EOF
18961
18962 fi
18963
18964 echo "$as_me:18964: checking for inline" >&5
18965 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18966 if test "${ac_cv_c_inline+set}" = set; then
18967   echo $ECHO_N "(cached) $ECHO_C" >&6
18968 else
18969   ac_cv_c_inline=no
18970 for ac_kw in inline __inline__ __inline; do
18971   cat >conftest.$ac_ext <<_ACEOF
18972 #line 18972 "configure"
18973 #include "confdefs.h"
18974 #ifndef __cplusplus
18975 static $ac_kw int static_foo () {return 0; }
18976 $ac_kw int foo () {return 0; }
18977 #endif
18978
18979 _ACEOF
18980 rm -f conftest.$ac_objext
18981 if { (eval echo "$as_me:18981: \"$ac_compile\"") >&5
18982   (eval $ac_compile) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit $ac_status); } &&
18986          { ac_try='test -s conftest.$ac_objext'
18987   { (eval echo "$as_me:18987: \"$ac_try\"") >&5
18988   (eval $ac_try) 2>&5
18989   ac_status=$?
18990   echo "$as_me:18990: \$? = $ac_status" >&5
18991   (exit $ac_status); }; }; then
18992   ac_cv_c_inline=$ac_kw; break
18993 else
18994   echo "$as_me: failed program was:" >&5
18995 cat conftest.$ac_ext >&5
18996 fi
18997 rm -f conftest.$ac_objext conftest.$ac_ext
18998 done
18999
19000 fi
19001 echo "$as_me:19001: result: $ac_cv_c_inline" >&5
19002 echo "${ECHO_T}$ac_cv_c_inline" >&6
19003 case $ac_cv_c_inline in
19004   inline | yes) ;;
19005   no)
19006 cat >>confdefs.h <<\EOF
19007 #define inline
19008 EOF
19009  ;;
19010   *)  cat >>confdefs.h <<EOF
19011 #define inline $ac_cv_c_inline
19012 EOF
19013  ;;
19014 esac
19015
19016 NCURSES_INLINE=
19017 if test "$ac_cv_c_inline" != no ; then
19018         NCURSES_INLINE=inline
19019         if test "$INTEL_COMPILER" = yes
19020         then
19021                 :
19022         elif test "$CLANG_COMPILER" = yes
19023         then
19024                 :
19025         elif test "$GCC" = yes
19026         then
19027                 echo "$as_me:19027: checking if $CC supports options to tune inlining" >&5
19028 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19029 if test "${cf_cv_gcc_inline+set}" = set; then
19030   echo $ECHO_N "(cached) $ECHO_C" >&6
19031 else
19032
19033                 cf_save_CFLAGS=$CFLAGS
19034                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19035                 cat >conftest.$ac_ext <<_ACEOF
19036 #line 19036 "configure"
19037 #include "confdefs.h"
19038 inline int foo(void) { return 1; }
19039 int
19040 main (void)
19041 {
19042 ${cf_cv_main_return:-return} foo()
19043   ;
19044   return 0;
19045 }
19046 _ACEOF
19047 rm -f conftest.$ac_objext
19048 if { (eval echo "$as_me:19048: \"$ac_compile\"") >&5
19049   (eval $ac_compile) 2>&5
19050   ac_status=$?
19051   echo "$as_me:19051: \$? = $ac_status" >&5
19052   (exit $ac_status); } &&
19053          { ac_try='test -s conftest.$ac_objext'
19054   { (eval echo "$as_me:19054: \"$ac_try\"") >&5
19055   (eval $ac_try) 2>&5
19056   ac_status=$?
19057   echo "$as_me:19057: \$? = $ac_status" >&5
19058   (exit $ac_status); }; }; then
19059   cf_cv_gcc_inline=yes
19060 else
19061   echo "$as_me: failed program was:" >&5
19062 cat conftest.$ac_ext >&5
19063 cf_cv_gcc_inline=no
19064 fi
19065 rm -f conftest.$ac_objext conftest.$ac_ext
19066                 CFLAGS=$cf_save_CFLAGS
19067
19068 fi
19069 echo "$as_me:19069: result: $cf_cv_gcc_inline" >&5
19070 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19071                 if test "$cf_cv_gcc_inline" = yes ; then
19072
19073 cf_fix_cppflags=no
19074 cf_new_cflags=
19075 cf_new_cppflags=
19076 cf_new_extra_cppflags=
19077
19078 for cf_add_cflags in --param max-inline-insns-single=1200
19079 do
19080 case $cf_fix_cppflags in
19081 (no)
19082         case $cf_add_cflags in
19083         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19084                 case $cf_add_cflags in
19085                 (-D*)
19086                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19087
19088                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19089                                 && test -z "${cf_tst_cflags}" \
19090                                 && cf_fix_cppflags=yes
19091
19092                         if test $cf_fix_cppflags = yes ; then
19093
19094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19096
19097                                 continue
19098                         elif test "${cf_tst_cflags}" = "\"'" ; then
19099
19100         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19101         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19102
19103                                 continue
19104                         fi
19105                         ;;
19106                 esac
19107                 case "$CPPFLAGS" in
19108                 (*$cf_add_cflags)
19109                         ;;
19110                 (*)
19111                         case $cf_add_cflags in
19112                         (-D*)
19113                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19114
19115 CPPFLAGS=`echo "$CPPFLAGS" | \
19116         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19117                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19118
19119                                 ;;
19120                         esac
19121
19122         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19123         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19124
19125                         ;;
19126                 esac
19127                 ;;
19128         (*)
19129
19130         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19131         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19132
19133                 ;;
19134         esac
19135         ;;
19136 (yes)
19137
19138         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19139         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19140
19141         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19142
19143         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19144                 && test -z "${cf_tst_cflags}" \
19145                 && cf_fix_cppflags=no
19146         ;;
19147 esac
19148 done
19149
19150 if test -n "$cf_new_cflags" ; then
19151
19152         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19153         CFLAGS="${CFLAGS}$cf_new_cflags"
19154
19155 fi
19156
19157 if test -n "$cf_new_cppflags" ; then
19158
19159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19160         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19161
19162 fi
19163
19164 if test -n "$cf_new_extra_cppflags" ; then
19165
19166         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19167         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19168
19169 fi
19170
19171                 fi
19172         fi
19173 fi
19174
19175 echo "$as_me:19175: checking for signal global datatype" >&5
19176 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19177 if test "${cf_cv_sig_atomic_t+set}" = set; then
19178   echo $ECHO_N "(cached) $ECHO_C" >&6
19179 else
19180
19181         for cf_type in \
19182                 "volatile sig_atomic_t" \
19183                 "sig_atomic_t" \
19184                 "int"
19185         do
19186         cat >conftest.$ac_ext <<_ACEOF
19187 #line 19187 "configure"
19188 #include "confdefs.h"
19189
19190 #include <sys/types.h>
19191 #include <signal.h>
19192 #include <stdio.h>
19193
19194 extern $cf_type x;
19195 $cf_type x;
19196 static void handler(int sig)
19197 {
19198         x = 5;
19199 }
19200 int
19201 main (void)
19202 {
19203 signal(SIGINT, handler);
19204                  x = 1
19205   ;
19206   return 0;
19207 }
19208 _ACEOF
19209 rm -f conftest.$ac_objext
19210 if { (eval echo "$as_me:19210: \"$ac_compile\"") >&5
19211   (eval $ac_compile) 2>&5
19212   ac_status=$?
19213   echo "$as_me:19213: \$? = $ac_status" >&5
19214   (exit $ac_status); } &&
19215          { ac_try='test -s conftest.$ac_objext'
19216   { (eval echo "$as_me:19216: \"$ac_try\"") >&5
19217   (eval $ac_try) 2>&5
19218   ac_status=$?
19219   echo "$as_me:19219: \$? = $ac_status" >&5
19220   (exit $ac_status); }; }; then
19221   cf_cv_sig_atomic_t=$cf_type
19222 else
19223   echo "$as_me: failed program was:" >&5
19224 cat conftest.$ac_ext >&5
19225 cf_cv_sig_atomic_t=no
19226 fi
19227 rm -f conftest.$ac_objext conftest.$ac_ext
19228                 test "$cf_cv_sig_atomic_t" != no && break
19229         done
19230
19231 fi
19232
19233 echo "$as_me:19233: result: $cf_cv_sig_atomic_t" >&5
19234 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19235 test "$cf_cv_sig_atomic_t" != no &&
19236 cat >>confdefs.h <<EOF
19237 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19238 EOF
19239
19240 if test $NCURSES_CHTYPE = auto ; then
19241
19242 echo "$as_me:19242: checking for type of chtype" >&5
19243 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19244 if test "${cf_cv_typeof_chtype+set}" = set; then
19245   echo $ECHO_N "(cached) $ECHO_C" >&6
19246 else
19247
19248                 if test "$cross_compiling" = yes; then
19249   cf_cv_typeof_chtype=long
19250 else
19251   cat >conftest.$ac_ext <<_ACEOF
19252 #line 19252 "configure"
19253 #include "confdefs.h"
19254
19255 #define WANT_BITS 31
19256 #include <stdio.h>
19257 int main(void)
19258 {
19259         FILE *fp = fopen("cf_test.out", "w");
19260         if (fp != 0) {
19261                 char *result = "long";
19262                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19263                         int n;
19264                         unsigned int x, y;
19265                         for (n = 0; n < WANT_BITS; n++) {
19266                                 x = (1 << n);
19267                                 y = (x >> n);
19268                                 if (y != 1 || x == 0) {
19269                                         x = 0;
19270                                         break;
19271                                 }
19272                         }
19273                         /*
19274                          * If x is nonzero, an int is big enough for the bits
19275                          * that we want.
19276                          */
19277                         result = (x != 0) ? "int" : "long";
19278                 }
19279                 fputs(result, fp);
19280                 fclose(fp);
19281         }
19282         ${cf_cv_main_return:-return}(0);
19283 }
19284
19285 _ACEOF
19286 rm -f conftest$ac_exeext
19287 if { (eval echo "$as_me:19287: \"$ac_link\"") >&5
19288   (eval $ac_link) 2>&5
19289   ac_status=$?
19290   echo "$as_me:19290: \$? = $ac_status" >&5
19291   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19292   { (eval echo "$as_me:19292: \"$ac_try\"") >&5
19293   (eval $ac_try) 2>&5
19294   ac_status=$?
19295   echo "$as_me:19295: \$? = $ac_status" >&5
19296   (exit $ac_status); }; }; then
19297   cf_cv_typeof_chtype=`cat cf_test.out`
19298 else
19299   echo "$as_me: program exited with status $ac_status" >&5
19300 echo "$as_me: failed program was:" >&5
19301 cat conftest.$ac_ext >&5
19302 cf_cv_typeof_chtype=long
19303 fi
19304 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19305 fi
19306                 rm -f cf_test.out
19307
19308 fi
19309
19310 echo "$as_me:19310: result: $cf_cv_typeof_chtype" >&5
19311 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19312
19313 cat >>confdefs.h <<EOF
19314 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19315 EOF
19316
19317 else
19318         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19319 fi
19320 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19321
19322 echo "$as_me:19322: checking if unsigned literals are legal" >&5
19323 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19324 if test "${cf_cv_unsigned_literals+set}" = set; then
19325   echo $ECHO_N "(cached) $ECHO_C" >&6
19326 else
19327
19328         cat >conftest.$ac_ext <<_ACEOF
19329 #line 19329 "configure"
19330 #include "confdefs.h"
19331
19332 int
19333 main (void)
19334 {
19335 long x = 1L + 1UL + 1U + 1
19336   ;
19337   return 0;
19338 }
19339 _ACEOF
19340 rm -f conftest.$ac_objext
19341 if { (eval echo "$as_me:19341: \"$ac_compile\"") >&5
19342   (eval $ac_compile) 2>&5
19343   ac_status=$?
19344   echo "$as_me:19344: \$? = $ac_status" >&5
19345   (exit $ac_status); } &&
19346          { ac_try='test -s conftest.$ac_objext'
19347   { (eval echo "$as_me:19347: \"$ac_try\"") >&5
19348   (eval $ac_try) 2>&5
19349   ac_status=$?
19350   echo "$as_me:19350: \$? = $ac_status" >&5
19351   (exit $ac_status); }; }; then
19352   cf_cv_unsigned_literals=yes
19353 else
19354   echo "$as_me: failed program was:" >&5
19355 cat conftest.$ac_ext >&5
19356 cf_cv_unsigned_literals=no
19357 fi
19358 rm -f conftest.$ac_objext conftest.$ac_ext
19359
19360 fi
19361
19362 echo "$as_me:19362: result: $cf_cv_unsigned_literals" >&5
19363 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19364
19365 cf_cv_1UL="1"
19366 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19367 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19368
19369 if test $NCURSES_MMASK_T = auto ; then
19370         cf_cv_typeof_mmask_t=long
19371 else
19372         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19373 fi
19374 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19375
19376 ###     Checks for external-data
19377
19378 echo "$as_me:19378: checking if external errno is declared" >&5
19379 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19380 if test "${cf_cv_dcl_errno+set}" = set; then
19381   echo $ECHO_N "(cached) $ECHO_C" >&6
19382 else
19383
19384         cat >conftest.$ac_ext <<_ACEOF
19385 #line 19385 "configure"
19386 #include "confdefs.h"
19387
19388 #ifdef HAVE_STDLIB_H
19389 #include <stdlib.h>
19390 #endif
19391 #include <stdio.h>
19392 #include <sys/types.h>
19393 #include <errno.h>
19394 int
19395 main (void)
19396 {
19397 int x = (int) errno
19398   ;
19399   return 0;
19400 }
19401 _ACEOF
19402 rm -f conftest.$ac_objext
19403 if { (eval echo "$as_me:19403: \"$ac_compile\"") >&5
19404   (eval $ac_compile) 2>&5
19405   ac_status=$?
19406   echo "$as_me:19406: \$? = $ac_status" >&5
19407   (exit $ac_status); } &&
19408          { ac_try='test -s conftest.$ac_objext'
19409   { (eval echo "$as_me:19409: \"$ac_try\"") >&5
19410   (eval $ac_try) 2>&5
19411   ac_status=$?
19412   echo "$as_me:19412: \$? = $ac_status" >&5
19413   (exit $ac_status); }; }; then
19414   cf_cv_dcl_errno=yes
19415 else
19416   echo "$as_me: failed program was:" >&5
19417 cat conftest.$ac_ext >&5
19418 cf_cv_dcl_errno=no
19419 fi
19420 rm -f conftest.$ac_objext conftest.$ac_ext
19421
19422 fi
19423 echo "$as_me:19423: result: $cf_cv_dcl_errno" >&5
19424 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19425
19426 if test "$cf_cv_dcl_errno" = no ; then
19427
19428 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19429
19430         cat >>confdefs.h <<EOF
19431 #define $cf_result 1
19432 EOF
19433
19434 fi
19435
19436 # It's possible (for near-UNIX clones) that the data doesn't exist
19437
19438 echo "$as_me:19438: checking if external errno exists" >&5
19439 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19440 if test "${cf_cv_have_errno+set}" = set; then
19441   echo $ECHO_N "(cached) $ECHO_C" >&6
19442 else
19443
19444         cat >conftest.$ac_ext <<_ACEOF
19445 #line 19445 "configure"
19446 #include "confdefs.h"
19447
19448 #undef errno
19449 extern int errno;
19450
19451 int
19452 main (void)
19453 {
19454 errno = 2
19455   ;
19456   return 0;
19457 }
19458 _ACEOF
19459 rm -f conftest.$ac_objext conftest$ac_exeext
19460 if { (eval echo "$as_me:19460: \"$ac_link\"") >&5
19461   (eval $ac_link) 2>&5
19462   ac_status=$?
19463   echo "$as_me:19463: \$? = $ac_status" >&5
19464   (exit $ac_status); } &&
19465          { ac_try='test -s conftest$ac_exeext'
19466   { (eval echo "$as_me:19466: \"$ac_try\"") >&5
19467   (eval $ac_try) 2>&5
19468   ac_status=$?
19469   echo "$as_me:19469: \$? = $ac_status" >&5
19470   (exit $ac_status); }; }; then
19471   cf_cv_have_errno=yes
19472 else
19473   echo "$as_me: failed program was:" >&5
19474 cat conftest.$ac_ext >&5
19475 cf_cv_have_errno=no
19476 fi
19477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19478
19479 fi
19480 echo "$as_me:19480: result: $cf_cv_have_errno" >&5
19481 echo "${ECHO_T}$cf_cv_have_errno" >&6
19482
19483 if test "$cf_cv_have_errno" = yes ; then
19484
19485 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19486
19487         cat >>confdefs.h <<EOF
19488 #define $cf_result 1
19489 EOF
19490
19491 fi
19492
19493 echo "$as_me:19493: checking if data-only library module links" >&5
19494 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19495 if test "${cf_cv_link_dataonly+set}" = set; then
19496   echo $ECHO_N "(cached) $ECHO_C" >&6
19497 else
19498
19499         rm -f conftest.a
19500         cat >conftest.$ac_ext <<EOF
19501 #line 19501 "configure"
19502 int     testdata[3] = { 123, 456, 789 };
19503 EOF
19504         if { (eval echo "$as_me:19504: \"$ac_compile\"") >&5
19505   (eval $ac_compile) 2>&5
19506   ac_status=$?
19507   echo "$as_me:19507: \$? = $ac_status" >&5
19508   (exit $ac_status); } ; then
19509                 mv conftest.o data.o && \
19510                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19511         fi
19512         rm -f conftest.$ac_ext data.o
19513         cat >conftest.$ac_ext <<EOF
19514 #line 19514 "configure"
19515 int     testfunc(void)
19516 {
19517 #if defined(NeXT)
19518         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19519 #else
19520         extern int testdata[3];
19521         return testdata[0] == 123
19522            &&  testdata[1] == 456
19523            &&  testdata[2] == 789;
19524 #endif
19525 }
19526 EOF
19527         if { (eval echo "$as_me:19527: \"$ac_compile\"") >&5
19528   (eval $ac_compile) 2>&5
19529   ac_status=$?
19530   echo "$as_me:19530: \$? = $ac_status" >&5
19531   (exit $ac_status); }; then
19532                 mv conftest.o func.o && \
19533                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19534         fi
19535         rm -f conftest.$ac_ext func.o
19536         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19537         cf_saveLIBS="$LIBS"
19538         LIBS="conftest.a $LIBS"
19539         if test "$cross_compiling" = yes; then
19540   cf_cv_link_dataonly=unknown
19541 else
19542   cat >conftest.$ac_ext <<_ACEOF
19543 #line 19543 "configure"
19544 #include "confdefs.h"
19545
19546         int main(void)
19547         {
19548                 extern int testfunc();
19549                 ${cf_cv_main_return:-return} (!testfunc());
19550         }
19551
19552 _ACEOF
19553 rm -f conftest$ac_exeext
19554 if { (eval echo "$as_me:19554: \"$ac_link\"") >&5
19555   (eval $ac_link) 2>&5
19556   ac_status=$?
19557   echo "$as_me:19557: \$? = $ac_status" >&5
19558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19559   { (eval echo "$as_me:19559: \"$ac_try\"") >&5
19560   (eval $ac_try) 2>&5
19561   ac_status=$?
19562   echo "$as_me:19562: \$? = $ac_status" >&5
19563   (exit $ac_status); }; }; then
19564   cf_cv_link_dataonly=yes
19565 else
19566   echo "$as_me: program exited with status $ac_status" >&5
19567 echo "$as_me: failed program was:" >&5
19568 cat conftest.$ac_ext >&5
19569 cf_cv_link_dataonly=no
19570 fi
19571 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19572 fi
19573         LIBS="$cf_saveLIBS"
19574
19575 fi
19576
19577 echo "$as_me:19577: result: $cf_cv_link_dataonly" >&5
19578 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19579
19580 if test "$cf_cv_link_dataonly" = no ; then
19581
19582 cat >>confdefs.h <<\EOF
19583 #define BROKEN_LINKER 1
19584 EOF
19585
19586         BROKEN_LINKER=1
19587 fi
19588
19589 ###     Checks for library functions.
19590
19591 for ac_func in \
19592 getcwd \
19593 getegid \
19594 geteuid \
19595 getopt \
19596 getttynam \
19597 issetugid \
19598 localeconv \
19599 poll \
19600 putenv \
19601 remove \
19602 select \
19603 setbuf \
19604 setbuffer \
19605 setenv \
19606 setvbuf \
19607 sigaction \
19608 sigvec \
19609 strdup \
19610 strstr \
19611 sysconf \
19612 tcgetpgrp \
19613 times \
19614 tsearch \
19615 vsnprintf \
19616
19617 do
19618 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19619 echo "$as_me:19619: checking for $ac_func" >&5
19620 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19621 if eval "test \"\${$as_ac_var+set}\" = set"; then
19622   echo $ECHO_N "(cached) $ECHO_C" >&6
19623 else
19624   cat >conftest.$ac_ext <<_ACEOF
19625 #line 19625 "configure"
19626 #include "confdefs.h"
19627 #define $ac_func autoconf_temporary
19628 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19629 #undef $ac_func
19630
19631 #ifdef __cplusplus
19632 extern "C"
19633 #endif
19634
19635 /* We use char because int might match the return type of a gcc2
19636    builtin and then its argument prototype would still apply.  */
19637 char $ac_func (void);
19638
19639 int
19640 main (void)
19641 {
19642
19643 /* The GNU C library defines stubs for functions which it implements
19644     to always fail with ENOSYS.  Some functions are actually named
19645     something starting with __ and the normal name is an alias.  */
19646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19647 #error found stub for $ac_func
19648 #endif
19649
19650         return $ac_func ();
19651   ;
19652   return 0;
19653 }
19654 _ACEOF
19655 rm -f conftest.$ac_objext conftest$ac_exeext
19656 if { (eval echo "$as_me:19656: \"$ac_link\"") >&5
19657   (eval $ac_link) 2>&5
19658   ac_status=$?
19659   echo "$as_me:19659: \$? = $ac_status" >&5
19660   (exit $ac_status); } &&
19661          { ac_try='test -s conftest$ac_exeext'
19662   { (eval echo "$as_me:19662: \"$ac_try\"") >&5
19663   (eval $ac_try) 2>&5
19664   ac_status=$?
19665   echo "$as_me:19665: \$? = $ac_status" >&5
19666   (exit $ac_status); }; }; then
19667   eval "$as_ac_var=yes"
19668 else
19669   echo "$as_me: failed program was:" >&5
19670 cat conftest.$ac_ext >&5
19671 eval "$as_ac_var=no"
19672 fi
19673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19674 fi
19675 echo "$as_me:19675: result: `eval echo '${'$as_ac_var'}'`" >&5
19676 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19677 if test `eval echo '${'$as_ac_var'}'` = yes; then
19678   cat >>confdefs.h <<EOF
19679 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19680 EOF
19681
19682 fi
19683 done
19684
19685 if test "x$ac_cv_func_getopt" = xno && \
19686    test "x$cf_with_progs$cf_with_tests" != xnono; then
19687         { { echo "$as_me:19687: error: getopt is required for building programs" >&5
19688 echo "$as_me: error: getopt is required for building programs" >&2;}
19689    { (exit 1); exit 1; }; }
19690 fi
19691
19692 if test "x$with_safe_sprintf" = xyes
19693 then
19694         if test "x$ac_cv_func_vsnprintf" = xyes
19695         then
19696                 { echo "$as_me:19696: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19697 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19698         else
19699
19700 cat >>confdefs.h <<\EOF
19701 #define USE_SAFE_SPRINTF 1
19702 EOF
19703
19704         fi
19705 fi
19706
19707 if test "x$with_getcap" = "xyes" ; then
19708
19709 echo "$as_me:19709: checking for terminal-capability database functions" >&5
19710 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19711 if test "${cf_cv_cgetent+set}" = set; then
19712   echo $ECHO_N "(cached) $ECHO_C" >&6
19713 else
19714
19715 cat >conftest.$ac_ext <<_ACEOF
19716 #line 19716 "configure"
19717 #include "confdefs.h"
19718
19719 #include <stdlib.h>
19720 int
19721 main (void)
19722 {
19723
19724         char temp[128];
19725         char *buf = temp;
19726         char *db_array = temp;
19727         cgetent(&buf, &db_array, "vt100");
19728         cgetcap(buf, "tc", '=');
19729         cgetmatch(buf, "tc");
19730
19731   ;
19732   return 0;
19733 }
19734 _ACEOF
19735 rm -f conftest.$ac_objext conftest$ac_exeext
19736 if { (eval echo "$as_me:19736: \"$ac_link\"") >&5
19737   (eval $ac_link) 2>&5
19738   ac_status=$?
19739   echo "$as_me:19739: \$? = $ac_status" >&5
19740   (exit $ac_status); } &&
19741          { ac_try='test -s conftest$ac_exeext'
19742   { (eval echo "$as_me:19742: \"$ac_try\"") >&5
19743   (eval $ac_try) 2>&5
19744   ac_status=$?
19745   echo "$as_me:19745: \$? = $ac_status" >&5
19746   (exit $ac_status); }; }; then
19747   cf_cv_cgetent=yes
19748 else
19749   echo "$as_me: failed program was:" >&5
19750 cat conftest.$ac_ext >&5
19751 cf_cv_cgetent=no
19752 fi
19753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19754
19755 fi
19756 echo "$as_me:19756: result: $cf_cv_cgetent" >&5
19757 echo "${ECHO_T}$cf_cv_cgetent" >&6
19758
19759 if test "$cf_cv_cgetent" = yes
19760 then
19761
19762 cat >>confdefs.h <<\EOF
19763 #define HAVE_BSD_CGETENT 1
19764 EOF
19765
19766 echo "$as_me:19766: checking if cgetent uses const parameter" >&5
19767 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19768 if test "${cf_cv_cgetent_const+set}" = set; then
19769   echo $ECHO_N "(cached) $ECHO_C" >&6
19770 else
19771
19772 cat >conftest.$ac_ext <<_ACEOF
19773 #line 19773 "configure"
19774 #include "confdefs.h"
19775
19776 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19777 #include <stdlib.h>
19778 int
19779 main (void)
19780 {
19781
19782         char temp[128];
19783         char *buf = temp;
19784 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19785         const char *db_array = temp;
19786         cgetent(&buf, &db_array, "vt100");
19787 #endif
19788         cgetcap(buf, "tc", '=');
19789         cgetmatch(buf, "tc");
19790
19791   ;
19792   return 0;
19793 }
19794 _ACEOF
19795 rm -f conftest.$ac_objext conftest$ac_exeext
19796 if { (eval echo "$as_me:19796: \"$ac_link\"") >&5
19797   (eval $ac_link) 2>&5
19798   ac_status=$?
19799   echo "$as_me:19799: \$? = $ac_status" >&5
19800   (exit $ac_status); } &&
19801          { ac_try='test -s conftest$ac_exeext'
19802   { (eval echo "$as_me:19802: \"$ac_try\"") >&5
19803   (eval $ac_try) 2>&5
19804   ac_status=$?
19805   echo "$as_me:19805: \$? = $ac_status" >&5
19806   (exit $ac_status); }; }; then
19807   cf_cv_cgetent_const=yes
19808 else
19809   echo "$as_me: failed program was:" >&5
19810 cat conftest.$ac_ext >&5
19811 cf_cv_cgetent_const=no
19812 fi
19813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19814
19815 fi
19816 echo "$as_me:19816: result: $cf_cv_cgetent_const" >&5
19817 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19818         if test "$cf_cv_cgetent_const" = yes
19819         then
19820
19821 cat >>confdefs.h <<EOF
19822 #define CGETENT_CONST const
19823 EOF
19824
19825         fi
19826 fi
19827
19828 fi
19829
19830 echo "$as_me:19830: checking for isascii" >&5
19831 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19832 if test "${cf_cv_have_isascii+set}" = set; then
19833   echo $ECHO_N "(cached) $ECHO_C" >&6
19834 else
19835
19836         cat >conftest.$ac_ext <<_ACEOF
19837 #line 19837 "configure"
19838 #include "confdefs.h"
19839 #include <ctype.h>
19840 int
19841 main (void)
19842 {
19843 int x = isascii(' ')
19844   ;
19845   return 0;
19846 }
19847 _ACEOF
19848 rm -f conftest.$ac_objext conftest$ac_exeext
19849 if { (eval echo "$as_me:19849: \"$ac_link\"") >&5
19850   (eval $ac_link) 2>&5
19851   ac_status=$?
19852   echo "$as_me:19852: \$? = $ac_status" >&5
19853   (exit $ac_status); } &&
19854          { ac_try='test -s conftest$ac_exeext'
19855   { (eval echo "$as_me:19855: \"$ac_try\"") >&5
19856   (eval $ac_try) 2>&5
19857   ac_status=$?
19858   echo "$as_me:19858: \$? = $ac_status" >&5
19859   (exit $ac_status); }; }; then
19860   cf_cv_have_isascii=yes
19861 else
19862   echo "$as_me: failed program was:" >&5
19863 cat conftest.$ac_ext >&5
19864 cf_cv_have_isascii=no
19865 fi
19866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19867
19868 fi
19869 echo "$as_me:19869: result: $cf_cv_have_isascii" >&5
19870 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19871 test "$cf_cv_have_isascii" = yes &&
19872 cat >>confdefs.h <<\EOF
19873 #define HAVE_ISASCII 1
19874 EOF
19875
19876 if test "$ac_cv_func_sigaction" = yes; then
19877 echo "$as_me:19877: checking whether sigaction needs _POSIX_SOURCE" >&5
19878 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19879 cat >conftest.$ac_ext <<_ACEOF
19880 #line 19880 "configure"
19881 #include "confdefs.h"
19882
19883 #include <sys/types.h>
19884 #include <signal.h>
19885 int
19886 main (void)
19887 {
19888 struct sigaction act
19889   ;
19890   return 0;
19891 }
19892 _ACEOF
19893 rm -f conftest.$ac_objext
19894 if { (eval echo "$as_me:19894: \"$ac_compile\"") >&5
19895   (eval $ac_compile) 2>&5
19896   ac_status=$?
19897   echo "$as_me:19897: \$? = $ac_status" >&5
19898   (exit $ac_status); } &&
19899          { ac_try='test -s conftest.$ac_objext'
19900   { (eval echo "$as_me:19900: \"$ac_try\"") >&5
19901   (eval $ac_try) 2>&5
19902   ac_status=$?
19903   echo "$as_me:19903: \$? = $ac_status" >&5
19904   (exit $ac_status); }; }; then
19905   sigact_bad=no
19906 else
19907   echo "$as_me: failed program was:" >&5
19908 cat conftest.$ac_ext >&5
19909
19910 cat >conftest.$ac_ext <<_ACEOF
19911 #line 19911 "configure"
19912 #include "confdefs.h"
19913
19914 #define _POSIX_SOURCE
19915 #include <sys/types.h>
19916 #include <signal.h>
19917 int
19918 main (void)
19919 {
19920 struct sigaction act
19921   ;
19922   return 0;
19923 }
19924 _ACEOF
19925 rm -f conftest.$ac_objext
19926 if { (eval echo "$as_me:19926: \"$ac_compile\"") >&5
19927   (eval $ac_compile) 2>&5
19928   ac_status=$?
19929   echo "$as_me:19929: \$? = $ac_status" >&5
19930   (exit $ac_status); } &&
19931          { ac_try='test -s conftest.$ac_objext'
19932   { (eval echo "$as_me:19932: \"$ac_try\"") >&5
19933   (eval $ac_try) 2>&5
19934   ac_status=$?
19935   echo "$as_me:19935: \$? = $ac_status" >&5
19936   (exit $ac_status); }; }; then
19937   sigact_bad=yes
19938
19939 cat >>confdefs.h <<\EOF
19940 #define _POSIX_SOURCE 1
19941 EOF
19942
19943 else
19944   echo "$as_me: failed program was:" >&5
19945 cat conftest.$ac_ext >&5
19946 sigact_bad=unknown
19947 fi
19948 rm -f conftest.$ac_objext conftest.$ac_ext
19949 fi
19950 rm -f conftest.$ac_objext conftest.$ac_ext
19951 echo "$as_me:19951: result: $sigact_bad" >&5
19952 echo "${ECHO_T}$sigact_bad" >&6
19953 fi
19954
19955 echo "$as_me:19955: checking if nanosleep really works" >&5
19956 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19957 if test "${cf_cv_func_nanosleep+set}" = set; then
19958   echo $ECHO_N "(cached) $ECHO_C" >&6
19959 else
19960
19961 if test "$cross_compiling" = yes; then
19962   cf_cv_func_nanosleep=unknown
19963 else
19964   cat >conftest.$ac_ext <<_ACEOF
19965 #line 19965 "configure"
19966 #include "confdefs.h"
19967
19968 #include <stdio.h>
19969 #include <errno.h>
19970 #include <time.h>
19971
19972 #ifdef HAVE_SYS_TIME_H
19973 #include <sys/time.h>
19974 #endif
19975
19976 int main(void) {
19977         struct timespec ts1, ts2;
19978         int code;
19979         ts1.tv_sec  = 0;
19980         ts1.tv_nsec = 750000000;
19981         ts2.tv_sec  = 0;
19982         ts2.tv_nsec = 0;
19983         errno = 0;
19984         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19985         ${cf_cv_main_return:-return}(code != 0);
19986 }
19987
19988 _ACEOF
19989 rm -f conftest$ac_exeext
19990 if { (eval echo "$as_me:19990: \"$ac_link\"") >&5
19991   (eval $ac_link) 2>&5
19992   ac_status=$?
19993   echo "$as_me:19993: \$? = $ac_status" >&5
19994   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19995   { (eval echo "$as_me:19995: \"$ac_try\"") >&5
19996   (eval $ac_try) 2>&5
19997   ac_status=$?
19998   echo "$as_me:19998: \$? = $ac_status" >&5
19999   (exit $ac_status); }; }; then
20000   cf_cv_func_nanosleep=yes
20001 else
20002   echo "$as_me: program exited with status $ac_status" >&5
20003 echo "$as_me: failed program was:" >&5
20004 cat conftest.$ac_ext >&5
20005 cf_cv_func_nanosleep=no
20006 fi
20007 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20008 fi
20009 fi
20010 echo "$as_me:20010: result: $cf_cv_func_nanosleep" >&5
20011 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20012
20013 test "$cf_cv_func_nanosleep" = "yes" &&
20014 cat >>confdefs.h <<\EOF
20015 #define HAVE_NANOSLEEP 1
20016 EOF
20017
20018 for ac_header in \
20019 termio.h \
20020 termios.h \
20021 unistd.h \
20022 sys/ioctl.h \
20023 sys/termio.h \
20024
20025 do
20026 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20027 echo "$as_me:20027: checking for $ac_header" >&5
20028 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20029 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20030   echo $ECHO_N "(cached) $ECHO_C" >&6
20031 else
20032   cat >conftest.$ac_ext <<_ACEOF
20033 #line 20033 "configure"
20034 #include "confdefs.h"
20035 #include <$ac_header>
20036 _ACEOF
20037 if { (eval echo "$as_me:20037: \"$ac_cpp conftest.$ac_ext\"") >&5
20038   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20039   ac_status=$?
20040   egrep -v '^ *\+' conftest.er1 >conftest.err
20041   rm -f conftest.er1
20042   cat conftest.err >&5
20043   echo "$as_me:20043: \$? = $ac_status" >&5
20044   (exit $ac_status); } >/dev/null; then
20045   if test -s conftest.err; then
20046     ac_cpp_err=$ac_c_preproc_warn_flag
20047   else
20048     ac_cpp_err=
20049   fi
20050 else
20051   ac_cpp_err=yes
20052 fi
20053 if test -z "$ac_cpp_err"; then
20054   eval "$as_ac_Header=yes"
20055 else
20056   echo "$as_me: failed program was:" >&5
20057   cat conftest.$ac_ext >&5
20058   eval "$as_ac_Header=no"
20059 fi
20060 rm -f conftest.err conftest.$ac_ext
20061 fi
20062 echo "$as_me:20062: result: `eval echo '${'$as_ac_Header'}'`" >&5
20063 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20064 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20065   cat >>confdefs.h <<EOF
20066 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20067 EOF
20068
20069 fi
20070 done
20071
20072 if test "$ac_cv_header_termios_h" = yes ; then
20073         case "$CFLAGS $CPPFLAGS" in
20074         (*-D_POSIX_SOURCE*)
20075                 termios_bad=dunno ;;
20076         (*)     termios_bad=maybe ;;
20077         esac
20078         if test "$termios_bad" = maybe ; then
20079         echo "$as_me:20079: checking whether termios.h needs _POSIX_SOURCE" >&5
20080 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20081         cat >conftest.$ac_ext <<_ACEOF
20082 #line 20082 "configure"
20083 #include "confdefs.h"
20084 #include <termios.h>
20085 int
20086 main (void)
20087 {
20088 struct termios foo; int x = foo.c_iflag
20089   ;
20090   return 0;
20091 }
20092 _ACEOF
20093 rm -f conftest.$ac_objext
20094 if { (eval echo "$as_me:20094: \"$ac_compile\"") >&5
20095   (eval $ac_compile) 2>&5
20096   ac_status=$?
20097   echo "$as_me:20097: \$? = $ac_status" >&5
20098   (exit $ac_status); } &&
20099          { ac_try='test -s conftest.$ac_objext'
20100   { (eval echo "$as_me:20100: \"$ac_try\"") >&5
20101   (eval $ac_try) 2>&5
20102   ac_status=$?
20103   echo "$as_me:20103: \$? = $ac_status" >&5
20104   (exit $ac_status); }; }; then
20105   termios_bad=no
20106 else
20107   echo "$as_me: failed program was:" >&5
20108 cat conftest.$ac_ext >&5
20109
20110                 cat >conftest.$ac_ext <<_ACEOF
20111 #line 20111 "configure"
20112 #include "confdefs.h"
20113
20114 #define _POSIX_SOURCE
20115 #include <termios.h>
20116 int
20117 main (void)
20118 {
20119 struct termios foo; int x = foo.c_iflag
20120   ;
20121   return 0;
20122 }
20123 _ACEOF
20124 rm -f conftest.$ac_objext
20125 if { (eval echo "$as_me:20125: \"$ac_compile\"") >&5
20126   (eval $ac_compile) 2>&5
20127   ac_status=$?
20128   echo "$as_me:20128: \$? = $ac_status" >&5
20129   (exit $ac_status); } &&
20130          { ac_try='test -s conftest.$ac_objext'
20131   { (eval echo "$as_me:20131: \"$ac_try\"") >&5
20132   (eval $ac_try) 2>&5
20133   ac_status=$?
20134   echo "$as_me:20134: \$? = $ac_status" >&5
20135   (exit $ac_status); }; }; then
20136   termios_bad=unknown
20137 else
20138   echo "$as_me: failed program was:" >&5
20139 cat conftest.$ac_ext >&5
20140 termios_bad=yes
20141 cat >>confdefs.h <<\EOF
20142 #define _POSIX_SOURCE 1
20143 EOF
20144
20145 fi
20146 rm -f conftest.$ac_objext conftest.$ac_ext
20147
20148 fi
20149 rm -f conftest.$ac_objext conftest.$ac_ext
20150         echo "$as_me:20150: result: $termios_bad" >&5
20151 echo "${ECHO_T}$termios_bad" >&6
20152         fi
20153 fi
20154
20155 echo "$as_me:20155: checking for tcgetattr" >&5
20156 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20157 if test "${cf_cv_have_tcgetattr+set}" = set; then
20158   echo $ECHO_N "(cached) $ECHO_C" >&6
20159 else
20160
20161 cat >conftest.$ac_ext <<_ACEOF
20162 #line 20162 "configure"
20163 #include "confdefs.h"
20164
20165 #include <sys/types.h>
20166 #ifdef HAVE_UNISTD_H
20167 #include <unistd.h>
20168 #endif
20169 #ifdef HAVE_TERMIOS_H
20170 #include <termios.h>
20171 #define TTY struct termios
20172 #else
20173 #ifdef HAVE_TERMIO_H
20174 #include <termio.h>
20175 #define TTY struct termio
20176 #endif
20177 #endif
20178
20179 int
20180 main (void)
20181 {
20182
20183 TTY foo;
20184 tcgetattr(1, &foo);
20185   ;
20186   return 0;
20187 }
20188 _ACEOF
20189 rm -f conftest.$ac_objext conftest$ac_exeext
20190 if { (eval echo "$as_me:20190: \"$ac_link\"") >&5
20191   (eval $ac_link) 2>&5
20192   ac_status=$?
20193   echo "$as_me:20193: \$? = $ac_status" >&5
20194   (exit $ac_status); } &&
20195          { ac_try='test -s conftest$ac_exeext'
20196   { (eval echo "$as_me:20196: \"$ac_try\"") >&5
20197   (eval $ac_try) 2>&5
20198   ac_status=$?
20199   echo "$as_me:20199: \$? = $ac_status" >&5
20200   (exit $ac_status); }; }; then
20201   cf_cv_have_tcgetattr=yes
20202 else
20203   echo "$as_me: failed program was:" >&5
20204 cat conftest.$ac_ext >&5
20205 cf_cv_have_tcgetattr=no
20206 fi
20207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20208 fi
20209 echo "$as_me:20209: result: $cf_cv_have_tcgetattr" >&5
20210 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20211 test "$cf_cv_have_tcgetattr" = yes &&
20212 cat >>confdefs.h <<\EOF
20213 #define HAVE_TCGETATTR 1
20214 EOF
20215
20216 echo "$as_me:20216: checking for vsscanf function or workaround" >&5
20217 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20218 if test "${cf_cv_func_vsscanf+set}" = set; then
20219   echo $ECHO_N "(cached) $ECHO_C" >&6
20220 else
20221
20222 cat >conftest.$ac_ext <<_ACEOF
20223 #line 20223 "configure"
20224 #include "confdefs.h"
20225
20226 #include <stdarg.h>
20227 #include <stdio.h>
20228 int
20229 main (void)
20230 {
20231
20232         va_list ap;
20233         vsscanf("from", "%d", ap)
20234   ;
20235   return 0;
20236 }
20237 _ACEOF
20238 rm -f conftest.$ac_objext conftest$ac_exeext
20239 if { (eval echo "$as_me:20239: \"$ac_link\"") >&5
20240   (eval $ac_link) 2>&5
20241   ac_status=$?
20242   echo "$as_me:20242: \$? = $ac_status" >&5
20243   (exit $ac_status); } &&
20244          { ac_try='test -s conftest$ac_exeext'
20245   { (eval echo "$as_me:20245: \"$ac_try\"") >&5
20246   (eval $ac_try) 2>&5
20247   ac_status=$?
20248   echo "$as_me:20248: \$? = $ac_status" >&5
20249   (exit $ac_status); }; }; then
20250   cf_cv_func_vsscanf=vsscanf
20251 else
20252   echo "$as_me: failed program was:" >&5
20253 cat conftest.$ac_ext >&5
20254
20255 cat >conftest.$ac_ext <<_ACEOF
20256 #line 20256 "configure"
20257 #include "confdefs.h"
20258
20259 #include <stdarg.h>
20260 #include <stdio.h>
20261 int
20262 main (void)
20263 {
20264
20265         FILE strbuf;
20266         char *str = "from";
20267
20268         strbuf._flag = _IOREAD;
20269         strbuf._ptr = strbuf._base = (unsigned char *) str;
20270         strbuf._cnt = strlen(str);
20271         strbuf._file = _NFILE;
20272         return (vfscanf(&strbuf, "%d", ap))
20273   ;
20274   return 0;
20275 }
20276 _ACEOF
20277 rm -f conftest.$ac_objext conftest$ac_exeext
20278 if { (eval echo "$as_me:20278: \"$ac_link\"") >&5
20279   (eval $ac_link) 2>&5
20280   ac_status=$?
20281   echo "$as_me:20281: \$? = $ac_status" >&5
20282   (exit $ac_status); } &&
20283          { ac_try='test -s conftest$ac_exeext'
20284   { (eval echo "$as_me:20284: \"$ac_try\"") >&5
20285   (eval $ac_try) 2>&5
20286   ac_status=$?
20287   echo "$as_me:20287: \$? = $ac_status" >&5
20288   (exit $ac_status); }; }; then
20289   cf_cv_func_vsscanf=vfscanf
20290 else
20291   echo "$as_me: failed program was:" >&5
20292 cat conftest.$ac_ext >&5
20293
20294 cat >conftest.$ac_ext <<_ACEOF
20295 #line 20295 "configure"
20296 #include "confdefs.h"
20297
20298 #include <stdarg.h>
20299 #include <stdio.h>
20300 int
20301 main (void)
20302 {
20303
20304         FILE strbuf;
20305         char *str = "from";
20306
20307         strbuf._flag = _IOREAD;
20308         strbuf._ptr = strbuf._base = (unsigned char *) str;
20309         strbuf._cnt = strlen(str);
20310         strbuf._file = _NFILE;
20311         return (_doscan(&strbuf, "%d", ap))
20312   ;
20313   return 0;
20314 }
20315 _ACEOF
20316 rm -f conftest.$ac_objext conftest$ac_exeext
20317 if { (eval echo "$as_me:20317: \"$ac_link\"") >&5
20318   (eval $ac_link) 2>&5
20319   ac_status=$?
20320   echo "$as_me:20320: \$? = $ac_status" >&5
20321   (exit $ac_status); } &&
20322          { ac_try='test -s conftest$ac_exeext'
20323   { (eval echo "$as_me:20323: \"$ac_try\"") >&5
20324   (eval $ac_try) 2>&5
20325   ac_status=$?
20326   echo "$as_me:20326: \$? = $ac_status" >&5
20327   (exit $ac_status); }; }; then
20328   cf_cv_func_vsscanf=_doscan
20329 else
20330   echo "$as_me: failed program was:" >&5
20331 cat conftest.$ac_ext >&5
20332
20333 cf_cv_func_vsscanf=no
20334 fi
20335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20336 fi
20337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20338 fi
20339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20340 fi
20341 echo "$as_me:20341: result: $cf_cv_func_vsscanf" >&5
20342 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20343
20344 case $cf_cv_func_vsscanf in
20345 (vsscanf)
20346 cat >>confdefs.h <<\EOF
20347 #define HAVE_VSSCANF 1
20348 EOF
20349 ;;
20350 (vfscanf)
20351 cat >>confdefs.h <<\EOF
20352 #define HAVE_VFSCANF 1
20353 EOF
20354 ;;
20355 (_doscan)
20356 cat >>confdefs.h <<\EOF
20357 #define HAVE__DOSCAN 1
20358 EOF
20359 ;;
20360 esac
20361
20362 for ac_header in \
20363 unistd.h \
20364
20365 do
20366 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20367 echo "$as_me:20367: checking for $ac_header" >&5
20368 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20369 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20370   echo $ECHO_N "(cached) $ECHO_C" >&6
20371 else
20372   cat >conftest.$ac_ext <<_ACEOF
20373 #line 20373 "configure"
20374 #include "confdefs.h"
20375 #include <$ac_header>
20376 _ACEOF
20377 if { (eval echo "$as_me:20377: \"$ac_cpp conftest.$ac_ext\"") >&5
20378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20379   ac_status=$?
20380   egrep -v '^ *\+' conftest.er1 >conftest.err
20381   rm -f conftest.er1
20382   cat conftest.err >&5
20383   echo "$as_me:20383: \$? = $ac_status" >&5
20384   (exit $ac_status); } >/dev/null; then
20385   if test -s conftest.err; then
20386     ac_cpp_err=$ac_c_preproc_warn_flag
20387   else
20388     ac_cpp_err=
20389   fi
20390 else
20391   ac_cpp_err=yes
20392 fi
20393 if test -z "$ac_cpp_err"; then
20394   eval "$as_ac_Header=yes"
20395 else
20396   echo "$as_me: failed program was:" >&5
20397   cat conftest.$ac_ext >&5
20398   eval "$as_ac_Header=no"
20399 fi
20400 rm -f conftest.err conftest.$ac_ext
20401 fi
20402 echo "$as_me:20402: result: `eval echo '${'$as_ac_Header'}'`" >&5
20403 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20404 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20405   cat >>confdefs.h <<EOF
20406 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20407 EOF
20408
20409 fi
20410 done
20411
20412 echo "$as_me:20412: checking for working mkstemp" >&5
20413 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20414 if test "${cf_cv_func_mkstemp+set}" = set; then
20415   echo $ECHO_N "(cached) $ECHO_C" >&6
20416 else
20417
20418 rm -rf conftest*
20419 if test "$cross_compiling" = yes; then
20420   cf_cv_func_mkstemp=maybe
20421 else
20422   cat >conftest.$ac_ext <<_ACEOF
20423 #line 20423 "configure"
20424 #include "confdefs.h"
20425
20426 #include <sys/types.h>
20427 #ifdef HAVE_UNISTD_H
20428 #include <unistd.h>
20429 #endif
20430 #include <stdlib.h>
20431 #include <stdio.h>
20432 #include <string.h>
20433 #include <sys/stat.h>
20434 int main(void)
20435 {
20436         char *tmpl = "conftestXXXXXX";
20437         char name[2][80];
20438         int n;
20439         int result = 0;
20440         int fd;
20441         struct stat sb;
20442
20443         umask(077);
20444         for (n = 0; n < 2; ++n) {
20445                 strcpy(name[n], tmpl);
20446                 if ((fd = mkstemp(name[n])) >= 0) {
20447                         if (!strcmp(name[n], tmpl)
20448                          || stat(name[n], &sb) != 0
20449                          || (sb.st_mode & S_IFMT) != S_IFREG
20450                          || (sb.st_mode & 077) != 0) {
20451                                 result = 1;
20452                         }
20453                         close(fd);
20454                 }
20455         }
20456         if (result == 0
20457          && !strcmp(name[0], name[1]))
20458                 result = 1;
20459         ${cf_cv_main_return:-return}(result);
20460 }
20461
20462 _ACEOF
20463 rm -f conftest$ac_exeext
20464 if { (eval echo "$as_me:20464: \"$ac_link\"") >&5
20465   (eval $ac_link) 2>&5
20466   ac_status=$?
20467   echo "$as_me:20467: \$? = $ac_status" >&5
20468   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20469   { (eval echo "$as_me:20469: \"$ac_try\"") >&5
20470   (eval $ac_try) 2>&5
20471   ac_status=$?
20472   echo "$as_me:20472: \$? = $ac_status" >&5
20473   (exit $ac_status); }; }; then
20474   cf_cv_func_mkstemp=yes
20475
20476 else
20477   echo "$as_me: program exited with status $ac_status" >&5
20478 echo "$as_me: failed program was:" >&5
20479 cat conftest.$ac_ext >&5
20480 cf_cv_func_mkstemp=no
20481
20482 fi
20483 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20484 fi
20485
20486 fi
20487 echo "$as_me:20487: result: $cf_cv_func_mkstemp" >&5
20488 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20489 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20490         echo "$as_me:20490: checking for mkstemp" >&5
20491 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20492 if test "${ac_cv_func_mkstemp+set}" = set; then
20493   echo $ECHO_N "(cached) $ECHO_C" >&6
20494 else
20495   cat >conftest.$ac_ext <<_ACEOF
20496 #line 20496 "configure"
20497 #include "confdefs.h"
20498 #define mkstemp autoconf_temporary
20499 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20500 #undef mkstemp
20501
20502 #ifdef __cplusplus
20503 extern "C"
20504 #endif
20505
20506 /* We use char because int might match the return type of a gcc2
20507    builtin and then its argument prototype would still apply.  */
20508 char mkstemp (void);
20509
20510 int
20511 main (void)
20512 {
20513
20514 /* The GNU C library defines stubs for functions which it implements
20515     to always fail with ENOSYS.  Some functions are actually named
20516     something starting with __ and the normal name is an alias.  */
20517 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20518 #error found stub for mkstemp
20519 #endif
20520
20521         return mkstemp ();
20522   ;
20523   return 0;
20524 }
20525 _ACEOF
20526 rm -f conftest.$ac_objext conftest$ac_exeext
20527 if { (eval echo "$as_me:20527: \"$ac_link\"") >&5
20528   (eval $ac_link) 2>&5
20529   ac_status=$?
20530   echo "$as_me:20530: \$? = $ac_status" >&5
20531   (exit $ac_status); } &&
20532          { ac_try='test -s conftest$ac_exeext'
20533   { (eval echo "$as_me:20533: \"$ac_try\"") >&5
20534   (eval $ac_try) 2>&5
20535   ac_status=$?
20536   echo "$as_me:20536: \$? = $ac_status" >&5
20537   (exit $ac_status); }; }; then
20538   ac_cv_func_mkstemp=yes
20539 else
20540   echo "$as_me: failed program was:" >&5
20541 cat conftest.$ac_ext >&5
20542 ac_cv_func_mkstemp=no
20543 fi
20544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20545 fi
20546 echo "$as_me:20546: result: $ac_cv_func_mkstemp" >&5
20547 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20548
20549 fi
20550 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20551
20552 cat >>confdefs.h <<\EOF
20553 #define HAVE_MKSTEMP 1
20554 EOF
20555
20556 fi
20557
20558 # setup for prototype of fallback for vsscanf()
20559
20560 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20561         HAVE_VSSCANF=1
20562 else
20563         HAVE_VSSCANF=0
20564 fi
20565
20566 if test "x$cross_compiling" = xyes ; then
20567         { echo "$as_me:20567: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20568 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20569 else
20570         echo "$as_me:20570: checking whether setvbuf arguments are reversed" >&5
20571 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20572 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20573   echo $ECHO_N "(cached) $ECHO_C" >&6
20574 else
20575   if test "$cross_compiling" = yes; then
20576   { { echo "$as_me:20576: error: cannot run test program while cross compiling" >&5
20577 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20578    { (exit 1); exit 1; }; }
20579 else
20580   cat >conftest.$ac_ext <<_ACEOF
20581 #line 20581 "configure"
20582 #include "confdefs.h"
20583 #include <stdio.h>
20584 /* If setvbuf has the reversed format, exit 0. */
20585 int
20586 main (void)
20587 {
20588   /* This call has the arguments reversed.
20589      A reversed system may check and see that the address of main
20590      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20591   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20592     $ac_main_return(1);
20593   putc('\r', stdout);
20594   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20595 }
20596 _ACEOF
20597 rm -f conftest$ac_exeext
20598 if { (eval echo "$as_me:20598: \"$ac_link\"") >&5
20599   (eval $ac_link) 2>&5
20600   ac_status=$?
20601   echo "$as_me:20601: \$? = $ac_status" >&5
20602   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20603   { (eval echo "$as_me:20603: \"$ac_try\"") >&5
20604   (eval $ac_try) 2>&5
20605   ac_status=$?
20606   echo "$as_me:20606: \$? = $ac_status" >&5
20607   (exit $ac_status); }; }; then
20608   ac_cv_func_setvbuf_reversed=yes
20609 else
20610   echo "$as_me: program exited with status $ac_status" >&5
20611 echo "$as_me: failed program was:" >&5
20612 cat conftest.$ac_ext >&5
20613 ac_cv_func_setvbuf_reversed=no
20614 fi
20615 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20616 fi
20617 rm -f core core.* *.core
20618 fi
20619 echo "$as_me:20619: result: $ac_cv_func_setvbuf_reversed" >&5
20620 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20621 if test $ac_cv_func_setvbuf_reversed = yes; then
20622
20623 cat >>confdefs.h <<\EOF
20624 #define SETVBUF_REVERSED 1
20625 EOF
20626
20627 fi
20628
20629 fi
20630 echo "$as_me:20630: checking for intptr_t" >&5
20631 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20632 if test "${ac_cv_type_intptr_t+set}" = set; then
20633   echo $ECHO_N "(cached) $ECHO_C" >&6
20634 else
20635   cat >conftest.$ac_ext <<_ACEOF
20636 #line 20636 "configure"
20637 #include "confdefs.h"
20638 $ac_includes_default
20639 int
20640 main (void)
20641 {
20642 if ((intptr_t *) 0)
20643   return 0;
20644 if (sizeof (intptr_t))
20645   return 0;
20646   ;
20647   return 0;
20648 }
20649 _ACEOF
20650 rm -f conftest.$ac_objext
20651 if { (eval echo "$as_me:20651: \"$ac_compile\"") >&5
20652   (eval $ac_compile) 2>&5
20653   ac_status=$?
20654   echo "$as_me:20654: \$? = $ac_status" >&5
20655   (exit $ac_status); } &&
20656          { ac_try='test -s conftest.$ac_objext'
20657   { (eval echo "$as_me:20657: \"$ac_try\"") >&5
20658   (eval $ac_try) 2>&5
20659   ac_status=$?
20660   echo "$as_me:20660: \$? = $ac_status" >&5
20661   (exit $ac_status); }; }; then
20662   ac_cv_type_intptr_t=yes
20663 else
20664   echo "$as_me: failed program was:" >&5
20665 cat conftest.$ac_ext >&5
20666 ac_cv_type_intptr_t=no
20667 fi
20668 rm -f conftest.$ac_objext conftest.$ac_ext
20669 fi
20670 echo "$as_me:20670: result: $ac_cv_type_intptr_t" >&5
20671 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20672 if test $ac_cv_type_intptr_t = yes; then
20673   :
20674 else
20675
20676 cat >>confdefs.h <<EOF
20677 #define intptr_t long
20678 EOF
20679
20680 fi
20681
20682 echo "$as_me:20682: checking for ssize_t" >&5
20683 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20684 if test "${ac_cv_type_ssize_t+set}" = set; then
20685   echo $ECHO_N "(cached) $ECHO_C" >&6
20686 else
20687   cat >conftest.$ac_ext <<_ACEOF
20688 #line 20688 "configure"
20689 #include "confdefs.h"
20690 $ac_includes_default
20691 int
20692 main (void)
20693 {
20694 if ((ssize_t *) 0)
20695   return 0;
20696 if (sizeof (ssize_t))
20697   return 0;
20698   ;
20699   return 0;
20700 }
20701 _ACEOF
20702 rm -f conftest.$ac_objext
20703 if { (eval echo "$as_me:20703: \"$ac_compile\"") >&5
20704   (eval $ac_compile) 2>&5
20705   ac_status=$?
20706   echo "$as_me:20706: \$? = $ac_status" >&5
20707   (exit $ac_status); } &&
20708          { ac_try='test -s conftest.$ac_objext'
20709   { (eval echo "$as_me:20709: \"$ac_try\"") >&5
20710   (eval $ac_try) 2>&5
20711   ac_status=$?
20712   echo "$as_me:20712: \$? = $ac_status" >&5
20713   (exit $ac_status); }; }; then
20714   ac_cv_type_ssize_t=yes
20715 else
20716   echo "$as_me: failed program was:" >&5
20717 cat conftest.$ac_ext >&5
20718 ac_cv_type_ssize_t=no
20719 fi
20720 rm -f conftest.$ac_objext conftest.$ac_ext
20721 fi
20722 echo "$as_me:20722: result: $ac_cv_type_ssize_t" >&5
20723 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20724 if test $ac_cv_type_ssize_t = yes; then
20725   :
20726 else
20727
20728 cat >>confdefs.h <<EOF
20729 #define ssize_t int
20730 EOF
20731
20732 fi
20733
20734 echo "$as_me:20734: checking for type sigaction_t" >&5
20735 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20736 if test "${cf_cv_type_sigaction+set}" = set; then
20737   echo $ECHO_N "(cached) $ECHO_C" >&6
20738 else
20739
20740         cat >conftest.$ac_ext <<_ACEOF
20741 #line 20741 "configure"
20742 #include "confdefs.h"
20743
20744 #include <signal.h>
20745 int
20746 main (void)
20747 {
20748 sigaction_t x
20749   ;
20750   return 0;
20751 }
20752 _ACEOF
20753 rm -f conftest.$ac_objext
20754 if { (eval echo "$as_me:20754: \"$ac_compile\"") >&5
20755   (eval $ac_compile) 2>&5
20756   ac_status=$?
20757   echo "$as_me:20757: \$? = $ac_status" >&5
20758   (exit $ac_status); } &&
20759          { ac_try='test -s conftest.$ac_objext'
20760   { (eval echo "$as_me:20760: \"$ac_try\"") >&5
20761   (eval $ac_try) 2>&5
20762   ac_status=$?
20763   echo "$as_me:20763: \$? = $ac_status" >&5
20764   (exit $ac_status); }; }; then
20765   cf_cv_type_sigaction=yes
20766 else
20767   echo "$as_me: failed program was:" >&5
20768 cat conftest.$ac_ext >&5
20769 cf_cv_type_sigaction=no
20770 fi
20771 rm -f conftest.$ac_objext conftest.$ac_ext
20772 fi
20773
20774 echo "$as_me:20774: result: $cf_cv_type_sigaction" >&5
20775 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20776 test "$cf_cv_type_sigaction" = yes &&
20777 cat >>confdefs.h <<\EOF
20778 #define HAVE_TYPE_SIGACTION 1
20779 EOF
20780
20781 echo "$as_me:20781: checking declaration of size-change" >&5
20782 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20783 if test "${cf_cv_sizechange+set}" = set; then
20784   echo $ECHO_N "(cached) $ECHO_C" >&6
20785 else
20786
20787         cf_cv_sizechange=unknown
20788         cf_save_CPPFLAGS="$CPPFLAGS"
20789
20790 for cf_opts in "" "NEED_PTEM_H"
20791 do
20792
20793         CPPFLAGS="$cf_save_CPPFLAGS"
20794         if test -n "$cf_opts"
20795         then
20796
20797         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20798         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20799
20800         fi
20801         cat >conftest.$ac_ext <<_ACEOF
20802 #line 20802 "configure"
20803 #include "confdefs.h"
20804 #include <sys/types.h>
20805 #ifdef HAVE_TERMIOS_H
20806 #include <termios.h>
20807 #else
20808 #ifdef HAVE_TERMIO_H
20809 #include <termio.h>
20810 #endif
20811 #endif
20812
20813 #ifdef NEED_PTEM_H
20814 /* This is a workaround for SCO:  they neglected to define struct winsize in
20815  * termios.h -- it's only in termio.h and ptem.h
20816  */
20817 #include <sys/stream.h>
20818 #include <sys/ptem.h>
20819 #endif
20820
20821 #ifdef HAVE_SYS_IOCTL_H
20822 #include <sys/ioctl.h>
20823 #endif
20824
20825 int
20826 main (void)
20827 {
20828
20829 #ifdef TIOCGSIZE
20830         struct ttysize win;     /* SunOS 3.0... */
20831         int y = win.ts_lines;
20832         int x = win.ts_cols;
20833 #else
20834 #ifdef TIOCGWINSZ
20835         struct winsize win;     /* everything else */
20836         int y = win.ws_row;
20837         int x = win.ws_col;
20838 #else
20839         no TIOCGSIZE or TIOCGWINSZ
20840 #endif /* TIOCGWINSZ */
20841 #endif /* TIOCGSIZE */
20842
20843   ;
20844   return 0;
20845 }
20846 _ACEOF
20847 rm -f conftest.$ac_objext
20848 if { (eval echo "$as_me:20848: \"$ac_compile\"") >&5
20849   (eval $ac_compile) 2>&5
20850   ac_status=$?
20851   echo "$as_me:20851: \$? = $ac_status" >&5
20852   (exit $ac_status); } &&
20853          { ac_try='test -s conftest.$ac_objext'
20854   { (eval echo "$as_me:20854: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:20857: \$? = $ac_status" >&5
20858   (exit $ac_status); }; }; then
20859   cf_cv_sizechange=yes
20860 else
20861   echo "$as_me: failed program was:" >&5
20862 cat conftest.$ac_ext >&5
20863 cf_cv_sizechange=no
20864 fi
20865 rm -f conftest.$ac_objext conftest.$ac_ext
20866
20867         CPPFLAGS="$cf_save_CPPFLAGS"
20868         if test "$cf_cv_sizechange" = yes ; then
20869                 echo "size-change succeeded ($cf_opts)" >&5
20870                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20871                 break
20872         fi
20873 done
20874
20875 fi
20876 echo "$as_me:20876: result: $cf_cv_sizechange" >&5
20877 echo "${ECHO_T}$cf_cv_sizechange" >&6
20878 if test "$cf_cv_sizechange" != no ; then
20879
20880 cat >>confdefs.h <<\EOF
20881 #define HAVE_SIZECHANGE 1
20882 EOF
20883
20884         case $cf_cv_sizechange in
20885         (NEED*)
20886                 cat >>confdefs.h <<EOF
20887 #define $cf_cv_sizechange  1
20888 EOF
20889
20890                 ;;
20891         esac
20892 fi
20893
20894 echo "$as_me:20894: checking for memmove" >&5
20895 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20896 if test "${ac_cv_func_memmove+set}" = set; then
20897   echo $ECHO_N "(cached) $ECHO_C" >&6
20898 else
20899   cat >conftest.$ac_ext <<_ACEOF
20900 #line 20900 "configure"
20901 #include "confdefs.h"
20902 #define memmove autoconf_temporary
20903 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20904 #undef memmove
20905
20906 #ifdef __cplusplus
20907 extern "C"
20908 #endif
20909
20910 /* We use char because int might match the return type of a gcc2
20911    builtin and then its argument prototype would still apply.  */
20912 char memmove (void);
20913
20914 int
20915 main (void)
20916 {
20917
20918 /* The GNU C library defines stubs for functions which it implements
20919     to always fail with ENOSYS.  Some functions are actually named
20920     something starting with __ and the normal name is an alias.  */
20921 #if defined (__stub_memmove) || defined (__stub___memmove)
20922 #error found stub for memmove
20923 #endif
20924
20925         return memmove ();
20926   ;
20927   return 0;
20928 }
20929 _ACEOF
20930 rm -f conftest.$ac_objext conftest$ac_exeext
20931 if { (eval echo "$as_me:20931: \"$ac_link\"") >&5
20932   (eval $ac_link) 2>&5
20933   ac_status=$?
20934   echo "$as_me:20934: \$? = $ac_status" >&5
20935   (exit $ac_status); } &&
20936          { ac_try='test -s conftest$ac_exeext'
20937   { (eval echo "$as_me:20937: \"$ac_try\"") >&5
20938   (eval $ac_try) 2>&5
20939   ac_status=$?
20940   echo "$as_me:20940: \$? = $ac_status" >&5
20941   (exit $ac_status); }; }; then
20942   ac_cv_func_memmove=yes
20943 else
20944   echo "$as_me: failed program was:" >&5
20945 cat conftest.$ac_ext >&5
20946 ac_cv_func_memmove=no
20947 fi
20948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20949 fi
20950 echo "$as_me:20950: result: $ac_cv_func_memmove" >&5
20951 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20952 if test $ac_cv_func_memmove = yes; then
20953   :
20954 else
20955
20956 echo "$as_me:20956: checking for bcopy" >&5
20957 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20958 if test "${ac_cv_func_bcopy+set}" = set; then
20959   echo $ECHO_N "(cached) $ECHO_C" >&6
20960 else
20961   cat >conftest.$ac_ext <<_ACEOF
20962 #line 20962 "configure"
20963 #include "confdefs.h"
20964 #define bcopy autoconf_temporary
20965 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20966 #undef bcopy
20967
20968 #ifdef __cplusplus
20969 extern "C"
20970 #endif
20971
20972 /* We use char because int might match the return type of a gcc2
20973    builtin and then its argument prototype would still apply.  */
20974 char bcopy (void);
20975
20976 int
20977 main (void)
20978 {
20979
20980 /* The GNU C library defines stubs for functions which it implements
20981     to always fail with ENOSYS.  Some functions are actually named
20982     something starting with __ and the normal name is an alias.  */
20983 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20984 #error found stub for bcopy
20985 #endif
20986
20987         return bcopy ();
20988   ;
20989   return 0;
20990 }
20991 _ACEOF
20992 rm -f conftest.$ac_objext conftest$ac_exeext
20993 if { (eval echo "$as_me:20993: \"$ac_link\"") >&5
20994   (eval $ac_link) 2>&5
20995   ac_status=$?
20996   echo "$as_me:20996: \$? = $ac_status" >&5
20997   (exit $ac_status); } &&
20998          { ac_try='test -s conftest$ac_exeext'
20999   { (eval echo "$as_me:20999: \"$ac_try\"") >&5
21000   (eval $ac_try) 2>&5
21001   ac_status=$?
21002   echo "$as_me:21002: \$? = $ac_status" >&5
21003   (exit $ac_status); }; }; then
21004   ac_cv_func_bcopy=yes
21005 else
21006   echo "$as_me: failed program was:" >&5
21007 cat conftest.$ac_ext >&5
21008 ac_cv_func_bcopy=no
21009 fi
21010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21011 fi
21012 echo "$as_me:21012: result: $ac_cv_func_bcopy" >&5
21013 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21014 if test $ac_cv_func_bcopy = yes; then
21015
21016         echo "$as_me:21016: checking if bcopy does overlapping moves" >&5
21017 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21018 if test "${cf_cv_good_bcopy+set}" = set; then
21019   echo $ECHO_N "(cached) $ECHO_C" >&6
21020 else
21021
21022                 if test "$cross_compiling" = yes; then
21023   cf_cv_good_bcopy=unknown
21024 else
21025   cat >conftest.$ac_ext <<_ACEOF
21026 #line 21026 "configure"
21027 #include "confdefs.h"
21028
21029 int main(void) {
21030         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21031         char temp[40];
21032         bcopy(data, temp, sizeof(data));
21033         bcopy(temp+10, temp, 15);
21034         bcopy(temp+5, temp+15, 10);
21035         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21036 }
21037
21038 _ACEOF
21039 rm -f conftest$ac_exeext
21040 if { (eval echo "$as_me:21040: \"$ac_link\"") >&5
21041   (eval $ac_link) 2>&5
21042   ac_status=$?
21043   echo "$as_me:21043: \$? = $ac_status" >&5
21044   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21045   { (eval echo "$as_me:21045: \"$ac_try\"") >&5
21046   (eval $ac_try) 2>&5
21047   ac_status=$?
21048   echo "$as_me:21048: \$? = $ac_status" >&5
21049   (exit $ac_status); }; }; then
21050   cf_cv_good_bcopy=yes
21051 else
21052   echo "$as_me: program exited with status $ac_status" >&5
21053 echo "$as_me: failed program was:" >&5
21054 cat conftest.$ac_ext >&5
21055 cf_cv_good_bcopy=no
21056 fi
21057 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21058 fi
21059
21060 fi
21061 echo "$as_me:21061: result: $cf_cv_good_bcopy" >&5
21062 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21063
21064 else
21065   cf_cv_good_bcopy=no
21066 fi
21067
21068         if test "$cf_cv_good_bcopy" = yes ; then
21069
21070 cat >>confdefs.h <<\EOF
21071 #define USE_OK_BCOPY 1
21072 EOF
21073
21074         else
21075
21076 cat >>confdefs.h <<\EOF
21077 #define USE_MY_MEMMOVE 1
21078 EOF
21079
21080         fi
21081
21082 fi
21083
21084 tty 2>&1 >/dev/null || {
21085 for ac_func in posix_openpt
21086 do
21087 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21088 echo "$as_me:21088: checking for $ac_func" >&5
21089 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21090 if eval "test \"\${$as_ac_var+set}\" = set"; then
21091   echo $ECHO_N "(cached) $ECHO_C" >&6
21092 else
21093   cat >conftest.$ac_ext <<_ACEOF
21094 #line 21094 "configure"
21095 #include "confdefs.h"
21096 #define $ac_func autoconf_temporary
21097 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21098 #undef $ac_func
21099
21100 #ifdef __cplusplus
21101 extern "C"
21102 #endif
21103
21104 /* We use char because int might match the return type of a gcc2
21105    builtin and then its argument prototype would still apply.  */
21106 char $ac_func (void);
21107
21108 int
21109 main (void)
21110 {
21111
21112 /* The GNU C library defines stubs for functions which it implements
21113     to always fail with ENOSYS.  Some functions are actually named
21114     something starting with __ and the normal name is an alias.  */
21115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21116 #error found stub for $ac_func
21117 #endif
21118
21119         return $ac_func ();
21120   ;
21121   return 0;
21122 }
21123 _ACEOF
21124 rm -f conftest.$ac_objext conftest$ac_exeext
21125 if { (eval echo "$as_me:21125: \"$ac_link\"") >&5
21126   (eval $ac_link) 2>&5
21127   ac_status=$?
21128   echo "$as_me:21128: \$? = $ac_status" >&5
21129   (exit $ac_status); } &&
21130          { ac_try='test -s conftest$ac_exeext'
21131   { (eval echo "$as_me:21131: \"$ac_try\"") >&5
21132   (eval $ac_try) 2>&5
21133   ac_status=$?
21134   echo "$as_me:21134: \$? = $ac_status" >&5
21135   (exit $ac_status); }; }; then
21136   eval "$as_ac_var=yes"
21137 else
21138   echo "$as_me: failed program was:" >&5
21139 cat conftest.$ac_ext >&5
21140 eval "$as_ac_var=no"
21141 fi
21142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21143 fi
21144 echo "$as_me:21144: result: `eval echo '${'$as_ac_var'}'`" >&5
21145 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21146 if test `eval echo '${'$as_ac_var'}'` = yes; then
21147   cat >>confdefs.h <<EOF
21148 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21149 EOF
21150
21151 fi
21152 done
21153  }
21154 echo "$as_me:21154: checking if poll really works" >&5
21155 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21156 if test "${cf_cv_working_poll+set}" = set; then
21157   echo $ECHO_N "(cached) $ECHO_C" >&6
21158 else
21159
21160 if test "$cross_compiling" = yes; then
21161   cf_cv_working_poll=unknown
21162 else
21163   cat >conftest.$ac_ext <<_ACEOF
21164 #line 21164 "configure"
21165 #include "confdefs.h"
21166
21167 #include <stdlib.h>
21168 #include <stdio.h>
21169 #include <unistd.h>
21170 #include <fcntl.h>
21171 #ifdef HAVE_POLL_H
21172 #include <poll.h>
21173 #else
21174 #include <sys/poll.h>
21175 #endif
21176 int main(void) {
21177         struct pollfd myfds;
21178         int ret;
21179
21180         /* check for Darwin bug with respect to "devices" */
21181         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21182         if (myfds.fd < 0)
21183                 myfds.fd = 0;
21184         myfds.events = POLLIN;
21185         myfds.revents = 0;
21186
21187         ret = poll(&myfds, 1, 100);
21188
21189         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21190                 ret = -1;
21191         } else {
21192                 int fd = 0;
21193                 if (!isatty(fd)) {
21194                         fd = open("/dev/tty", 2);       /* O_RDWR */
21195                 }
21196 #ifdef HAVE_POSIX_OPENPT
21197                 if (fd < 0) {
21198                         fd = posix_openpt(O_RDWR);
21199                 }
21200 #endif
21201
21202                 if (fd >= 0) {
21203                         /* also check with standard input */
21204                         myfds.fd = fd;
21205                         myfds.events = POLLIN;
21206                         myfds.revents = 0;
21207                         ret = poll(&myfds, 1, 100);
21208                 } else {
21209                         ret = -1;
21210                 }
21211         }
21212         ${cf_cv_main_return:-return}(ret < 0);
21213 }
21214 _ACEOF
21215 rm -f conftest$ac_exeext
21216 if { (eval echo "$as_me:21216: \"$ac_link\"") >&5
21217   (eval $ac_link) 2>&5
21218   ac_status=$?
21219   echo "$as_me:21219: \$? = $ac_status" >&5
21220   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21221   { (eval echo "$as_me:21221: \"$ac_try\"") >&5
21222   (eval $ac_try) 2>&5
21223   ac_status=$?
21224   echo "$as_me:21224: \$? = $ac_status" >&5
21225   (exit $ac_status); }; }; then
21226   cf_cv_working_poll=yes
21227 else
21228   echo "$as_me: program exited with status $ac_status" >&5
21229 echo "$as_me: failed program was:" >&5
21230 cat conftest.$ac_ext >&5
21231 cf_cv_working_poll=no
21232 fi
21233 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21234 fi
21235 fi
21236 echo "$as_me:21236: result: $cf_cv_working_poll" >&5
21237 echo "${ECHO_T}$cf_cv_working_poll" >&6
21238 test "$cf_cv_working_poll" = "yes" &&
21239 cat >>confdefs.h <<\EOF
21240 #define HAVE_WORKING_POLL 1
21241 EOF
21242
21243 echo "$as_me:21243: checking for va_copy" >&5
21244 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21245 if test "${cf_cv_have_va_copy+set}" = set; then
21246   echo $ECHO_N "(cached) $ECHO_C" >&6
21247 else
21248
21249 cat >conftest.$ac_ext <<_ACEOF
21250 #line 21250 "configure"
21251 #include "confdefs.h"
21252
21253 #include <stdarg.h>
21254
21255 int
21256 main (void)
21257 {
21258
21259         static va_list dst;
21260         static va_list src;
21261         va_copy(dst, src)
21262   ;
21263   return 0;
21264 }
21265 _ACEOF
21266 rm -f conftest.$ac_objext conftest$ac_exeext
21267 if { (eval echo "$as_me:21267: \"$ac_link\"") >&5
21268   (eval $ac_link) 2>&5
21269   ac_status=$?
21270   echo "$as_me:21270: \$? = $ac_status" >&5
21271   (exit $ac_status); } &&
21272          { ac_try='test -s conftest$ac_exeext'
21273   { (eval echo "$as_me:21273: \"$ac_try\"") >&5
21274   (eval $ac_try) 2>&5
21275   ac_status=$?
21276   echo "$as_me:21276: \$? = $ac_status" >&5
21277   (exit $ac_status); }; }; then
21278   cf_cv_have_va_copy=yes
21279 else
21280   echo "$as_me: failed program was:" >&5
21281 cat conftest.$ac_ext >&5
21282 cf_cv_have_va_copy=no
21283 fi
21284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21285 fi
21286 echo "$as_me:21286: result: $cf_cv_have_va_copy" >&5
21287 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21288
21289 if test "$cf_cv_have_va_copy" = yes;
21290 then
21291
21292 cat >>confdefs.h <<\EOF
21293 #define HAVE_VA_COPY 1
21294 EOF
21295
21296 else # !cf_cv_have_va_copy
21297
21298 echo "$as_me:21298: checking for __va_copy" >&5
21299 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21300 if test "${cf_cv_have___va_copy+set}" = set; then
21301   echo $ECHO_N "(cached) $ECHO_C" >&6
21302 else
21303
21304 cat >conftest.$ac_ext <<_ACEOF
21305 #line 21305 "configure"
21306 #include "confdefs.h"
21307
21308 #include <stdarg.h>
21309
21310 int
21311 main (void)
21312 {
21313
21314         static va_list dst;
21315         static va_list src;
21316         __va_copy(dst, src)
21317   ;
21318   return 0;
21319 }
21320 _ACEOF
21321 rm -f conftest.$ac_objext conftest$ac_exeext
21322 if { (eval echo "$as_me:21322: \"$ac_link\"") >&5
21323   (eval $ac_link) 2>&5
21324   ac_status=$?
21325   echo "$as_me:21325: \$? = $ac_status" >&5
21326   (exit $ac_status); } &&
21327          { ac_try='test -s conftest$ac_exeext'
21328   { (eval echo "$as_me:21328: \"$ac_try\"") >&5
21329   (eval $ac_try) 2>&5
21330   ac_status=$?
21331   echo "$as_me:21331: \$? = $ac_status" >&5
21332   (exit $ac_status); }; }; then
21333   cf_cv_have___va_copy=yes
21334 else
21335   echo "$as_me: failed program was:" >&5
21336 cat conftest.$ac_ext >&5
21337 cf_cv_have___va_copy=no
21338 fi
21339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21340 fi
21341 echo "$as_me:21341: result: $cf_cv_have___va_copy" >&5
21342 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21343
21344 if test "$cf_cv_have___va_copy" = yes
21345 then
21346
21347 cat >>confdefs.h <<\EOF
21348 #define HAVE___VA_COPY 1
21349 EOF
21350
21351 else # !cf_cv_have___va_copy
21352
21353 echo "$as_me:21353: checking for __builtin_va_copy" >&5
21354 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21355 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21356   echo $ECHO_N "(cached) $ECHO_C" >&6
21357 else
21358
21359 cat >conftest.$ac_ext <<_ACEOF
21360 #line 21360 "configure"
21361 #include "confdefs.h"
21362
21363 #include <stdarg.h>
21364
21365 int
21366 main (void)
21367 {
21368
21369         static va_list dst;
21370         static va_list src;
21371         __builtin_va_copy(dst, src)
21372   ;
21373   return 0;
21374 }
21375 _ACEOF
21376 rm -f conftest.$ac_objext conftest$ac_exeext
21377 if { (eval echo "$as_me:21377: \"$ac_link\"") >&5
21378   (eval $ac_link) 2>&5
21379   ac_status=$?
21380   echo "$as_me:21380: \$? = $ac_status" >&5
21381   (exit $ac_status); } &&
21382          { ac_try='test -s conftest$ac_exeext'
21383   { (eval echo "$as_me:21383: \"$ac_try\"") >&5
21384   (eval $ac_try) 2>&5
21385   ac_status=$?
21386   echo "$as_me:21386: \$? = $ac_status" >&5
21387   (exit $ac_status); }; }; then
21388   cf_cv_have___builtin_va_copy=yes
21389 else
21390   echo "$as_me: failed program was:" >&5
21391 cat conftest.$ac_ext >&5
21392 cf_cv_have___builtin_va_copy=no
21393 fi
21394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21395 fi
21396 echo "$as_me:21396: result: $cf_cv_have___builtin_va_copy" >&5
21397 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21398
21399 test "$cf_cv_have___builtin_va_copy" = yes &&
21400
21401 cat >>confdefs.h <<\EOF
21402 #define HAVE___BUILTIN_VA_COPY 1
21403 EOF
21404
21405 fi # cf_cv_have___va_copy
21406
21407 fi # cf_cv_have_va_copy
21408
21409 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21410 (*yes*)
21411         ;;
21412
21413 (*)
21414         echo "$as_me:21414: checking if we can simply copy va_list" >&5
21415 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21416 if test "${cf_cv_pointer_va_list+set}" = set; then
21417   echo $ECHO_N "(cached) $ECHO_C" >&6
21418 else
21419
21420 cat >conftest.$ac_ext <<_ACEOF
21421 #line 21421 "configure"
21422 #include "confdefs.h"
21423
21424 #include <stdarg.h>
21425
21426 int
21427 main (void)
21428 {
21429
21430         va_list dst;
21431         va_list src;
21432         dst = src
21433   ;
21434   return 0;
21435 }
21436 _ACEOF
21437 rm -f conftest.$ac_objext conftest$ac_exeext
21438 if { (eval echo "$as_me:21438: \"$ac_link\"") >&5
21439   (eval $ac_link) 2>&5
21440   ac_status=$?
21441   echo "$as_me:21441: \$? = $ac_status" >&5
21442   (exit $ac_status); } &&
21443          { ac_try='test -s conftest$ac_exeext'
21444   { (eval echo "$as_me:21444: \"$ac_try\"") >&5
21445   (eval $ac_try) 2>&5
21446   ac_status=$?
21447   echo "$as_me:21447: \$? = $ac_status" >&5
21448   (exit $ac_status); }; }; then
21449   cf_cv_pointer_va_list=yes
21450 else
21451   echo "$as_me: failed program was:" >&5
21452 cat conftest.$ac_ext >&5
21453 cf_cv_pointer_va_list=no
21454 fi
21455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21456 fi
21457 echo "$as_me:21457: result: $cf_cv_pointer_va_list" >&5
21458 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21459
21460         if test "$cf_cv_pointer_va_list" = no
21461         then
21462                 echo "$as_me:21462: checking if we can copy va_list indirectly" >&5
21463 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21464 if test "${cf_cv_array_va_list+set}" = set; then
21465   echo $ECHO_N "(cached) $ECHO_C" >&6
21466 else
21467
21468 cat >conftest.$ac_ext <<_ACEOF
21469 #line 21469 "configure"
21470 #include "confdefs.h"
21471
21472 #include <stdarg.h>
21473
21474 int
21475 main (void)
21476 {
21477
21478         va_list dst;
21479         va_list src;
21480         *dst = *src
21481   ;
21482   return 0;
21483 }
21484 _ACEOF
21485 rm -f conftest.$ac_objext conftest$ac_exeext
21486 if { (eval echo "$as_me:21486: \"$ac_link\"") >&5
21487   (eval $ac_link) 2>&5
21488   ac_status=$?
21489   echo "$as_me:21489: \$? = $ac_status" >&5
21490   (exit $ac_status); } &&
21491          { ac_try='test -s conftest$ac_exeext'
21492   { (eval echo "$as_me:21492: \"$ac_try\"") >&5
21493   (eval $ac_try) 2>&5
21494   ac_status=$?
21495   echo "$as_me:21495: \$? = $ac_status" >&5
21496   (exit $ac_status); }; }; then
21497   cf_cv_array_va_list=yes
21498 else
21499   echo "$as_me: failed program was:" >&5
21500 cat conftest.$ac_ext >&5
21501 cf_cv_array_va_list=no
21502 fi
21503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21504 fi
21505 echo "$as_me:21505: result: $cf_cv_array_va_list" >&5
21506 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21507                 test "$cf_cv_array_va_list" = yes &&
21508 cat >>confdefs.h <<\EOF
21509 #define ARRAY_VA_LIST 1
21510 EOF
21511
21512         fi
21513         ;;
21514 esac
21515
21516 echo "$as_me:21516: checking for pid_t" >&5
21517 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21518 if test "${ac_cv_type_pid_t+set}" = set; then
21519   echo $ECHO_N "(cached) $ECHO_C" >&6
21520 else
21521   cat >conftest.$ac_ext <<_ACEOF
21522 #line 21522 "configure"
21523 #include "confdefs.h"
21524 $ac_includes_default
21525 int
21526 main (void)
21527 {
21528 if ((pid_t *) 0)
21529   return 0;
21530 if (sizeof (pid_t))
21531   return 0;
21532   ;
21533   return 0;
21534 }
21535 _ACEOF
21536 rm -f conftest.$ac_objext
21537 if { (eval echo "$as_me:21537: \"$ac_compile\"") >&5
21538   (eval $ac_compile) 2>&5
21539   ac_status=$?
21540   echo "$as_me:21540: \$? = $ac_status" >&5
21541   (exit $ac_status); } &&
21542          { ac_try='test -s conftest.$ac_objext'
21543   { (eval echo "$as_me:21543: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:21546: \$? = $ac_status" >&5
21547   (exit $ac_status); }; }; then
21548   ac_cv_type_pid_t=yes
21549 else
21550   echo "$as_me: failed program was:" >&5
21551 cat conftest.$ac_ext >&5
21552 ac_cv_type_pid_t=no
21553 fi
21554 rm -f conftest.$ac_objext conftest.$ac_ext
21555 fi
21556 echo "$as_me:21556: result: $ac_cv_type_pid_t" >&5
21557 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21558 if test $ac_cv_type_pid_t = yes; then
21559   :
21560 else
21561
21562 cat >>confdefs.h <<EOF
21563 #define pid_t int
21564 EOF
21565
21566 fi
21567
21568 for ac_header in unistd.h vfork.h
21569 do
21570 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21571 echo "$as_me:21571: checking for $ac_header" >&5
21572 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21573 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21574   echo $ECHO_N "(cached) $ECHO_C" >&6
21575 else
21576   cat >conftest.$ac_ext <<_ACEOF
21577 #line 21577 "configure"
21578 #include "confdefs.h"
21579 #include <$ac_header>
21580 _ACEOF
21581 if { (eval echo "$as_me:21581: \"$ac_cpp conftest.$ac_ext\"") >&5
21582   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21583   ac_status=$?
21584   egrep -v '^ *\+' conftest.er1 >conftest.err
21585   rm -f conftest.er1
21586   cat conftest.err >&5
21587   echo "$as_me:21587: \$? = $ac_status" >&5
21588   (exit $ac_status); } >/dev/null; then
21589   if test -s conftest.err; then
21590     ac_cpp_err=$ac_c_preproc_warn_flag
21591   else
21592     ac_cpp_err=
21593   fi
21594 else
21595   ac_cpp_err=yes
21596 fi
21597 if test -z "$ac_cpp_err"; then
21598   eval "$as_ac_Header=yes"
21599 else
21600   echo "$as_me: failed program was:" >&5
21601   cat conftest.$ac_ext >&5
21602   eval "$as_ac_Header=no"
21603 fi
21604 rm -f conftest.err conftest.$ac_ext
21605 fi
21606 echo "$as_me:21606: result: `eval echo '${'$as_ac_Header'}'`" >&5
21607 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21608 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21609   cat >>confdefs.h <<EOF
21610 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21611 EOF
21612
21613 fi
21614 done
21615
21616 for ac_func in fork vfork
21617 do
21618 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21619 echo "$as_me:21619: checking for $ac_func" >&5
21620 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21621 if eval "test \"\${$as_ac_var+set}\" = set"; then
21622   echo $ECHO_N "(cached) $ECHO_C" >&6
21623 else
21624   cat >conftest.$ac_ext <<_ACEOF
21625 #line 21625 "configure"
21626 #include "confdefs.h"
21627 #define $ac_func autoconf_temporary
21628 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21629 #undef $ac_func
21630
21631 #ifdef __cplusplus
21632 extern "C"
21633 #endif
21634
21635 /* We use char because int might match the return type of a gcc2
21636    builtin and then its argument prototype would still apply.  */
21637 char $ac_func (void);
21638
21639 int
21640 main (void)
21641 {
21642
21643 /* The GNU C library defines stubs for functions which it implements
21644     to always fail with ENOSYS.  Some functions are actually named
21645     something starting with __ and the normal name is an alias.  */
21646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21647 #error found stub for $ac_func
21648 #endif
21649
21650         return $ac_func ();
21651   ;
21652   return 0;
21653 }
21654 _ACEOF
21655 rm -f conftest.$ac_objext conftest$ac_exeext
21656 if { (eval echo "$as_me:21656: \"$ac_link\"") >&5
21657   (eval $ac_link) 2>&5
21658   ac_status=$?
21659   echo "$as_me:21659: \$? = $ac_status" >&5
21660   (exit $ac_status); } &&
21661          { ac_try='test -s conftest$ac_exeext'
21662   { (eval echo "$as_me:21662: \"$ac_try\"") >&5
21663   (eval $ac_try) 2>&5
21664   ac_status=$?
21665   echo "$as_me:21665: \$? = $ac_status" >&5
21666   (exit $ac_status); }; }; then
21667   eval "$as_ac_var=yes"
21668 else
21669   echo "$as_me: failed program was:" >&5
21670 cat conftest.$ac_ext >&5
21671 eval "$as_ac_var=no"
21672 fi
21673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21674 fi
21675 echo "$as_me:21675: result: `eval echo '${'$as_ac_var'}'`" >&5
21676 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21677 if test `eval echo '${'$as_ac_var'}'` = yes; then
21678   cat >>confdefs.h <<EOF
21679 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21680 EOF
21681
21682 fi
21683 done
21684
21685 ac_cv_func_fork_works=$ac_cv_func_fork
21686 if test "x$ac_cv_func_fork" = xyes; then
21687   echo "$as_me:21687: checking for working fork" >&5
21688 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21689 if test "${ac_cv_func_fork_works+set}" = set; then
21690   echo $ECHO_N "(cached) $ECHO_C" >&6
21691 else
21692   if test "$cross_compiling" = yes; then
21693   ac_cv_func_fork_works=cross
21694 else
21695   cat >conftest.$ac_ext <<_ACEOF
21696 /* By Rüdiger Kuhlmann. */
21697       #include <sys/types.h>
21698       #if HAVE_UNISTD_H
21699       # include <unistd.h>
21700       #endif
21701       /* Some systems only have a dummy stub for fork() */
21702       int main (void)
21703       {
21704         if (fork() < 0)
21705           $ac_main_return (1);
21706         $ac_main_return (0);
21707       }
21708 _ACEOF
21709 rm -f conftest$ac_exeext
21710 if { (eval echo "$as_me:21710: \"$ac_link\"") >&5
21711   (eval $ac_link) 2>&5
21712   ac_status=$?
21713   echo "$as_me:21713: \$? = $ac_status" >&5
21714   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21715   { (eval echo "$as_me:21715: \"$ac_try\"") >&5
21716   (eval $ac_try) 2>&5
21717   ac_status=$?
21718   echo "$as_me:21718: \$? = $ac_status" >&5
21719   (exit $ac_status); }; }; then
21720   ac_cv_func_fork_works=yes
21721 else
21722   echo "$as_me: program exited with status $ac_status" >&5
21723 echo "$as_me: failed program was:" >&5
21724 cat conftest.$ac_ext >&5
21725 ac_cv_func_fork_works=no
21726 fi
21727 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21728 fi
21729 fi
21730 echo "$as_me:21730: result: $ac_cv_func_fork_works" >&5
21731 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21732
21733 fi
21734 if test "x$ac_cv_func_fork_works" = xcross; then
21735   case $host in
21736     *-*-amigaos* | *-*-msdosdjgpp*)
21737       # Override, as these systems have only a dummy fork() stub
21738       ac_cv_func_fork_works=no
21739       ;;
21740     *)
21741       ac_cv_func_fork_works=yes
21742       ;;
21743   esac
21744   { echo "$as_me:21744: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21745 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21746 fi
21747 ac_cv_func_vfork_works=$ac_cv_func_vfork
21748 if test "x$ac_cv_func_vfork" = xyes; then
21749   echo "$as_me:21749: checking for working vfork" >&5
21750 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21751 if test "${ac_cv_func_vfork_works+set}" = set; then
21752   echo $ECHO_N "(cached) $ECHO_C" >&6
21753 else
21754   if test "$cross_compiling" = yes; then
21755   ac_cv_func_vfork_works=cross
21756 else
21757   cat >conftest.$ac_ext <<_ACEOF
21758 #line 21758 "configure"
21759 #include "confdefs.h"
21760 /* Thanks to Paul Eggert for this test.  */
21761 #include <stdio.h>
21762 #include <sys/types.h>
21763 #include <sys/stat.h>
21764 #if HAVE_UNISTD_H
21765 # include <unistd.h>
21766 #endif
21767 #if HAVE_VFORK_H
21768 # include <vfork.h>
21769 #endif
21770 /* On some sparc systems, changes by the child to local and incoming
21771    argument registers are propagated back to the parent.  The compiler
21772    is told about this with #include <vfork.h>, but some compilers
21773    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21774    static variable whose address is put into a register that is
21775    clobbered by the vfork.  */
21776 static
21777 #ifdef __cplusplus
21778 sparc_address_test (int arg)
21779 # else
21780 sparc_address_test (arg) int arg;
21781 #endif
21782 {
21783   static pid_t child;
21784   if (!child) {
21785     child = vfork ();
21786     if (child < 0) {
21787       perror ("vfork");
21788       _exit(2);
21789     }
21790     if (!child) {
21791       arg = getpid();
21792       write(-1, "", 0);
21793       _exit (arg);
21794     }
21795   }
21796 }
21797
21798 int
21799 main (void)
21800 {
21801   pid_t parent = getpid ();
21802   pid_t child;
21803
21804   sparc_address_test ();
21805
21806   child = vfork ();
21807
21808   if (child == 0) {
21809     /* Here is another test for sparc vfork register problems.  This
21810        test uses lots of local variables, at least as many local
21811        variables as main has allocated so far including compiler
21812        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21813        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21814        reuse the register of parent for one of the local variables,
21815        since it will think that parent can't possibly be used any more
21816        in this routine.  Assigning to the local variable will thus
21817        munge parent in the parent process.  */
21818     pid_t
21819       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21820       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21821     /* Convince the compiler that p..p7 are live; otherwise, it might
21822        use the same hardware register for all 8 local variables.  */
21823     if (p != p1 || p != p2 || p != p3 || p != p4
21824         || p != p5 || p != p6 || p != p7)
21825       _exit(1);
21826
21827     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21828        from child file descriptors.  If the child closes a descriptor
21829        before it execs or exits, this munges the parent's descriptor
21830        as well.  Test for this by closing stdout in the child.  */
21831     _exit(close(fileno(stdout)) != 0);
21832   } else {
21833     int status;
21834     struct stat st;
21835
21836     while (wait(&status) != child)
21837       ;
21838     $ac_main_return(
21839          /* Was there some problem with vforking?  */
21840          child < 0
21841
21842          /* Did the child fail?  (This shouldn't happen.)  */
21843          || status
21844
21845          /* Did the vfork/compiler bug occur?  */
21846          || parent != getpid()
21847
21848          /* Did the file descriptor bug occur?  */
21849          || fstat(fileno(stdout), &st) != 0
21850          );
21851   }
21852 }
21853 _ACEOF
21854 rm -f conftest$ac_exeext
21855 if { (eval echo "$as_me:21855: \"$ac_link\"") >&5
21856   (eval $ac_link) 2>&5
21857   ac_status=$?
21858   echo "$as_me:21858: \$? = $ac_status" >&5
21859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21860   { (eval echo "$as_me:21860: \"$ac_try\"") >&5
21861   (eval $ac_try) 2>&5
21862   ac_status=$?
21863   echo "$as_me:21863: \$? = $ac_status" >&5
21864   (exit $ac_status); }; }; then
21865   ac_cv_func_vfork_works=yes
21866 else
21867   echo "$as_me: program exited with status $ac_status" >&5
21868 echo "$as_me: failed program was:" >&5
21869 cat conftest.$ac_ext >&5
21870 ac_cv_func_vfork_works=no
21871 fi
21872 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21873 fi
21874 fi
21875 echo "$as_me:21875: result: $ac_cv_func_vfork_works" >&5
21876 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21877
21878 fi;
21879 if test "x$ac_cv_func_fork_works" = xcross; then
21880   ac_cv_func_vfork_works=ac_cv_func_vfork
21881   { echo "$as_me:21881: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21882 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21883 fi
21884
21885 if test "x$ac_cv_func_vfork_works" = xyes; then
21886
21887 cat >>confdefs.h <<\EOF
21888 #define HAVE_WORKING_VFORK 1
21889 EOF
21890
21891 else
21892
21893 cat >>confdefs.h <<\EOF
21894 #define vfork fork
21895 EOF
21896
21897 fi
21898 if test "x$ac_cv_func_fork_works" = xyes; then
21899
21900 cat >>confdefs.h <<\EOF
21901 #define HAVE_WORKING_FORK 1
21902 EOF
21903
21904 fi
21905
21906 echo "$as_me:21906: checking if fopen accepts explicit binary mode" >&5
21907 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21908 if test "${cf_cv_fopen_bin_r+set}" = set; then
21909   echo $ECHO_N "(cached) $ECHO_C" >&6
21910 else
21911
21912         if test "$cross_compiling" = yes; then
21913   cf_cv_fopen_bin_r=unknown
21914 else
21915   cat >conftest.$ac_ext <<_ACEOF
21916 #line 21916 "configure"
21917 #include "confdefs.h"
21918
21919 #include <stdio.h>
21920 int main(void) {
21921         FILE *fp = fopen("conftest.tmp", "wb");
21922         int rc = 0;
21923         if (fp != 0) {
21924                 int p, q;
21925                 for (p = 0; p < 256; ++p) {
21926                         fputc(p, fp);
21927                 }
21928                 fclose(fp);
21929                 fp = fopen("conftest.tmp", "rb");
21930                 if (fp != 0) {
21931                         for (p = 0; p < 256; ++p) {
21932                                 q = fgetc(fp);
21933                                 if (q != p) {
21934                                         rc = 1;
21935                                         break;
21936                                 }
21937                         }
21938                 } else {
21939                         rc = 1;
21940                 }
21941         } else {
21942                 rc = 1;
21943         }
21944         ${cf_cv_main_return:-return} (rc);
21945 }
21946
21947 _ACEOF
21948 rm -f conftest$ac_exeext
21949 if { (eval echo "$as_me:21949: \"$ac_link\"") >&5
21950   (eval $ac_link) 2>&5
21951   ac_status=$?
21952   echo "$as_me:21952: \$? = $ac_status" >&5
21953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21954   { (eval echo "$as_me:21954: \"$ac_try\"") >&5
21955   (eval $ac_try) 2>&5
21956   ac_status=$?
21957   echo "$as_me:21957: \$? = $ac_status" >&5
21958   (exit $ac_status); }; }; then
21959   cf_cv_fopen_bin_r=yes
21960 else
21961   echo "$as_me: program exited with status $ac_status" >&5
21962 echo "$as_me: failed program was:" >&5
21963 cat conftest.$ac_ext >&5
21964 cf_cv_fopen_bin_r=no
21965 fi
21966 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21967 fi
21968
21969 fi
21970 echo "$as_me:21970: result: $cf_cv_fopen_bin_r" >&5
21971 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21972 test "x$cf_cv_fopen_bin_r" != xno &&
21973 cat >>confdefs.h <<\EOF
21974 #define USE_FOPEN_BIN_R 1
21975 EOF
21976
21977 # special check for test/ditto.c
21978
21979 echo "$as_me:21979: checking for openpty in -lutil" >&5
21980 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21981 if test "${ac_cv_lib_util_openpty+set}" = set; then
21982   echo $ECHO_N "(cached) $ECHO_C" >&6
21983 else
21984   ac_check_lib_save_LIBS=$LIBS
21985 LIBS="-lutil  $LIBS"
21986 cat >conftest.$ac_ext <<_ACEOF
21987 #line 21987 "configure"
21988 #include "confdefs.h"
21989
21990 /* Override any gcc2 internal prototype to avoid an error.  */
21991 #ifdef __cplusplus
21992 extern "C"
21993 #endif
21994 /* We use char because int might match the return type of a gcc2
21995    builtin and then its argument prototype would still apply.  */
21996 char openpty ();
21997 int
21998 main (void)
21999 {
22000 openpty ();
22001   ;
22002   return 0;
22003 }
22004 _ACEOF
22005 rm -f conftest.$ac_objext conftest$ac_exeext
22006 if { (eval echo "$as_me:22006: \"$ac_link\"") >&5
22007   (eval $ac_link) 2>&5
22008   ac_status=$?
22009   echo "$as_me:22009: \$? = $ac_status" >&5
22010   (exit $ac_status); } &&
22011          { ac_try='test -s conftest$ac_exeext'
22012   { (eval echo "$as_me:22012: \"$ac_try\"") >&5
22013   (eval $ac_try) 2>&5
22014   ac_status=$?
22015   echo "$as_me:22015: \$? = $ac_status" >&5
22016   (exit $ac_status); }; }; then
22017   ac_cv_lib_util_openpty=yes
22018 else
22019   echo "$as_me: failed program was:" >&5
22020 cat conftest.$ac_ext >&5
22021 ac_cv_lib_util_openpty=no
22022 fi
22023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22024 LIBS=$ac_check_lib_save_LIBS
22025 fi
22026 echo "$as_me:22026: result: $ac_cv_lib_util_openpty" >&5
22027 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22028 if test $ac_cv_lib_util_openpty = yes; then
22029   cf_cv_lib_util=yes
22030 else
22031   cf_cv_lib_util=no
22032 fi
22033
22034 echo "$as_me:22034: checking for openpty header" >&5
22035 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22036 if test "${cf_cv_func_openpty+set}" = set; then
22037   echo $ECHO_N "(cached) $ECHO_C" >&6
22038 else
22039
22040         cf_save_LIBS="$LIBS"
22041         test $cf_cv_lib_util = yes && {
22042 cf_add_libs="$LIBS"
22043 # reverse order
22044 cf_add_0lib=
22045 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22046 # filter duplicates
22047 for cf_add_1lib in $cf_add_0lib; do
22048         for cf_add_2lib in $cf_add_libs; do
22049                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22050                         cf_add_1lib=
22051                         break
22052                 fi
22053         done
22054         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22055 done
22056 LIBS="$cf_add_libs"
22057  }
22058         for cf_header in pty.h libutil.h util.h
22059         do
22060         cat >conftest.$ac_ext <<_ACEOF
22061 #line 22061 "configure"
22062 #include "confdefs.h"
22063
22064 #include <$cf_header>
22065
22066 int
22067 main (void)
22068 {
22069
22070         int x = openpty((int *)0, (int *)0, (char *)0,
22071                                    (struct termios *)0, (struct winsize *)0);
22072
22073   ;
22074   return 0;
22075 }
22076 _ACEOF
22077 rm -f conftest.$ac_objext conftest$ac_exeext
22078 if { (eval echo "$as_me:22078: \"$ac_link\"") >&5
22079   (eval $ac_link) 2>&5
22080   ac_status=$?
22081   echo "$as_me:22081: \$? = $ac_status" >&5
22082   (exit $ac_status); } &&
22083          { ac_try='test -s conftest$ac_exeext'
22084   { (eval echo "$as_me:22084: \"$ac_try\"") >&5
22085   (eval $ac_try) 2>&5
22086   ac_status=$?
22087   echo "$as_me:22087: \$? = $ac_status" >&5
22088   (exit $ac_status); }; }; then
22089
22090                 cf_cv_func_openpty=$cf_header
22091                 break
22092
22093 else
22094   echo "$as_me: failed program was:" >&5
22095 cat conftest.$ac_ext >&5
22096
22097                 cf_cv_func_openpty=no
22098
22099 fi
22100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22101         done
22102         LIBS="$cf_save_LIBS"
22103
22104 fi
22105 echo "$as_me:22105: result: $cf_cv_func_openpty" >&5
22106 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22107
22108 if test "$cf_cv_func_openpty" != no ; then
22109
22110 cat >>confdefs.h <<EOF
22111 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22112 EOF
22113
22114 cat >>confdefs.h <<\EOF
22115 #define USE_XTERM_PTY 1
22116 EOF
22117
22118         if test "x$cf_cv_lib_util" = xyes ; then
22119
22120 cf_add_libs="$TEST_LIBS"
22121 # reverse order
22122 cf_add_0lib=
22123 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22124 # filter duplicates
22125 for cf_add_1lib in $cf_add_0lib; do
22126         for cf_add_2lib in $cf_add_libs; do
22127                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22128                         cf_add_1lib=
22129                         break
22130                 fi
22131         done
22132         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22133 done
22134 TEST_LIBS="$cf_add_libs"
22135
22136         fi
22137 fi
22138
22139 if test "$with_hashed_db" != no ; then
22140
22141 cat >>confdefs.h <<\EOF
22142 #define USE_HASHED_DB 1
22143 EOF
22144
22145 case $with_hashed_db in
22146 (yes|*able*)
22147         ;;
22148 (*)
22149         if test -d "$with_hashed_db" ; then
22150
22151 if test -n "$with_hashed_db/include" ; then
22152   for cf_add_incdir in $with_hashed_db/include
22153   do
22154         while test $cf_add_incdir != /usr/include
22155         do
22156           if test -d $cf_add_incdir
22157           then
22158                 cf_have_incdir=no
22159                 if test -n "$CFLAGS$CPPFLAGS" ; then
22160                   # a loop is needed to ensure we can add subdirs of existing dirs
22161                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22162                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22163                           cf_have_incdir=yes; break
22164                         fi
22165                   done
22166                 fi
22167
22168                 if test "$cf_have_incdir" = no ; then
22169                   if test "$cf_add_incdir" = /usr/local/include ; then
22170                         if test "$GCC" = yes
22171                         then
22172                           cf_save_CPPFLAGS=$CPPFLAGS
22173
22174         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22175         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22176
22177                           cat >conftest.$ac_ext <<_ACEOF
22178 #line 22178 "configure"
22179 #include "confdefs.h"
22180 #include <stdio.h>
22181 int
22182 main (void)
22183 {
22184 printf("Hello")
22185   ;
22186   return 0;
22187 }
22188 _ACEOF
22189 rm -f conftest.$ac_objext
22190 if { (eval echo "$as_me:22190: \"$ac_compile\"") >&5
22191   (eval $ac_compile) 2>&5
22192   ac_status=$?
22193   echo "$as_me:22193: \$? = $ac_status" >&5
22194   (exit $ac_status); } &&
22195          { ac_try='test -s conftest.$ac_objext'
22196   { (eval echo "$as_me:22196: \"$ac_try\"") >&5
22197   (eval $ac_try) 2>&5
22198   ac_status=$?
22199   echo "$as_me:22199: \$? = $ac_status" >&5
22200   (exit $ac_status); }; }; then
22201   :
22202 else
22203   echo "$as_me: failed program was:" >&5
22204 cat conftest.$ac_ext >&5
22205 cf_have_incdir=yes
22206 fi
22207 rm -f conftest.$ac_objext conftest.$ac_ext
22208                           CPPFLAGS=$cf_save_CPPFLAGS
22209                         fi
22210                   fi
22211                 fi
22212
22213                 if test "$cf_have_incdir" = no ; then
22214                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22215
22216 echo "${as_me:-configure}:22216: testing adding $cf_add_incdir to include-path ..." 1>&5
22217
22218                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22219
22220                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22221                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22222                   cf_add_incdir="$cf_top_incdir"
22223                 else
22224                   break
22225                 fi
22226           else
22227                 break
22228           fi
22229         done
22230   done
22231 fi
22232
22233 if test -n "$with_hashed_db/lib" ; then
22234         for cf_add_libdir in $with_hashed_db/lib
22235         do
22236                 if test $cf_add_libdir = /usr/lib ; then
22237                         :
22238                 elif test -d $cf_add_libdir
22239                 then
22240                         cf_have_libdir=no
22241                         if test -n "$LDFLAGS$LIBS" ; then
22242                                 # a loop is needed to ensure we can add subdirs of existing dirs
22243                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22244                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22245                                                 cf_have_libdir=yes; break
22246                                         fi
22247                                 done
22248                         fi
22249                         if test "$cf_have_libdir" = no ; then
22250                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22251
22252 echo "${as_me:-configure}:22252: testing adding $cf_add_libdir to library-path ..." 1>&5
22253
22254                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22255                         fi
22256                 fi
22257         done
22258 fi
22259
22260         else
22261                 case "$with_hashed_db" in
22262                 (./*|../*|/*)
22263                         { echo "$as_me:22263: WARNING: no such directory $with_hashed_db" >&5
22264 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22265                         ;;
22266                 (*)
22267
22268 cf_search=
22269
22270 test "x$prefix" != "xNONE" && \
22271 test -d "$prefix" && \
22272  {
22273         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22274         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22275         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22276         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22277         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22278         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22279 }
22280
22281 for cf_subdir_prefix in \
22282         /usr \
22283         /usr/local \
22284         /usr/pkg \
22285         /opt \
22286         /opt/local \
22287         $HOME
22288 do
22289
22290 test "x$cf_subdir_prefix" != "x$prefix" && \
22291 test -d "$cf_subdir_prefix" && \
22292 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22293         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22294         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22295         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22296         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22297         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22298         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"
22299 }
22300
22301 done
22302
22303         for cf_item in $cf_search
22304         do
22305                 case $cf_item in
22306                 (*/$with_hashed_db)
22307
22308 if test -n "$cf_item" ; then
22309   for cf_add_incdir in $cf_item
22310   do
22311         while test $cf_add_incdir != /usr/include
22312         do
22313           if test -d $cf_add_incdir
22314           then
22315                 cf_have_incdir=no
22316                 if test -n "$CFLAGS$CPPFLAGS" ; then
22317                   # a loop is needed to ensure we can add subdirs of existing dirs
22318                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22319                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22320                           cf_have_incdir=yes; break
22321                         fi
22322                   done
22323                 fi
22324
22325                 if test "$cf_have_incdir" = no ; then
22326                   if test "$cf_add_incdir" = /usr/local/include ; then
22327                         if test "$GCC" = yes
22328                         then
22329                           cf_save_CPPFLAGS=$CPPFLAGS
22330
22331         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22332         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22333
22334                           cat >conftest.$ac_ext <<_ACEOF
22335 #line 22335 "configure"
22336 #include "confdefs.h"
22337 #include <stdio.h>
22338 int
22339 main (void)
22340 {
22341 printf("Hello")
22342   ;
22343   return 0;
22344 }
22345 _ACEOF
22346 rm -f conftest.$ac_objext
22347 if { (eval echo "$as_me:22347: \"$ac_compile\"") >&5
22348   (eval $ac_compile) 2>&5
22349   ac_status=$?
22350   echo "$as_me:22350: \$? = $ac_status" >&5
22351   (exit $ac_status); } &&
22352          { ac_try='test -s conftest.$ac_objext'
22353   { (eval echo "$as_me:22353: \"$ac_try\"") >&5
22354   (eval $ac_try) 2>&5
22355   ac_status=$?
22356   echo "$as_me:22356: \$? = $ac_status" >&5
22357   (exit $ac_status); }; }; then
22358   :
22359 else
22360   echo "$as_me: failed program was:" >&5
22361 cat conftest.$ac_ext >&5
22362 cf_have_incdir=yes
22363 fi
22364 rm -f conftest.$ac_objext conftest.$ac_ext
22365                           CPPFLAGS=$cf_save_CPPFLAGS
22366                         fi
22367                   fi
22368                 fi
22369
22370                 if test "$cf_have_incdir" = no ; then
22371                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22372
22373 echo "${as_me:-configure}:22373: testing adding $cf_add_incdir to include-path ..." 1>&5
22374
22375                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22376
22377                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22378                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22379                   cf_add_incdir="$cf_top_incdir"
22380                 else
22381                   break
22382                 fi
22383           else
22384                 break
22385           fi
22386         done
22387   done
22388 fi
22389
22390                         ;;
22391                 esac
22392         done
22393
22394 cf_search=
22395
22396 test "x$prefix" != "xNONE" && \
22397 test -d "$prefix" && \
22398  {
22399         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22400         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22401         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22402         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22403         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22404         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22405 }
22406
22407 for cf_subdir_prefix in \
22408         /usr \
22409         /usr/local \
22410         /usr/pkg \
22411         /opt \
22412         /opt/local \
22413         $HOME
22414 do
22415
22416 test "x$cf_subdir_prefix" != "x$prefix" && \
22417 test -d "$cf_subdir_prefix" && \
22418 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22419         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22420         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22421         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22422         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22423         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22424         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"
22425 }
22426
22427 done
22428
22429         for cf_item in $cf_search
22430         do
22431                 case $cf_item in
22432                 (*/$with_hashed_db)
22433
22434 if test -n "$cf_item" ; then
22435         for cf_add_libdir in $cf_item
22436         do
22437                 if test $cf_add_libdir = /usr/lib ; then
22438                         :
22439                 elif test -d $cf_add_libdir
22440                 then
22441                         cf_have_libdir=no
22442                         if test -n "$LDFLAGS$LIBS" ; then
22443                                 # a loop is needed to ensure we can add subdirs of existing dirs
22444                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22445                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22446                                                 cf_have_libdir=yes; break
22447                                         fi
22448                                 done
22449                         fi
22450                         if test "$cf_have_libdir" = no ; then
22451                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22452
22453 echo "${as_me:-configure}:22453: testing adding $cf_add_libdir to library-path ..." 1>&5
22454
22455                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22456                         fi
22457                 fi
22458         done
22459 fi
22460
22461                         ;;
22462                 esac
22463         done
22464
22465                         ;;
22466                 esac
22467         fi
22468 esac
22469
22470 echo "$as_me:22470: checking for db.h" >&5
22471 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22472 if test "${ac_cv_header_db_h+set}" = set; then
22473   echo $ECHO_N "(cached) $ECHO_C" >&6
22474 else
22475   cat >conftest.$ac_ext <<_ACEOF
22476 #line 22476 "configure"
22477 #include "confdefs.h"
22478 #include <db.h>
22479 _ACEOF
22480 if { (eval echo "$as_me:22480: \"$ac_cpp conftest.$ac_ext\"") >&5
22481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22482   ac_status=$?
22483   egrep -v '^ *\+' conftest.er1 >conftest.err
22484   rm -f conftest.er1
22485   cat conftest.err >&5
22486   echo "$as_me:22486: \$? = $ac_status" >&5
22487   (exit $ac_status); } >/dev/null; then
22488   if test -s conftest.err; then
22489     ac_cpp_err=$ac_c_preproc_warn_flag
22490   else
22491     ac_cpp_err=
22492   fi
22493 else
22494   ac_cpp_err=yes
22495 fi
22496 if test -z "$ac_cpp_err"; then
22497   ac_cv_header_db_h=yes
22498 else
22499   echo "$as_me: failed program was:" >&5
22500   cat conftest.$ac_ext >&5
22501   ac_cv_header_db_h=no
22502 fi
22503 rm -f conftest.err conftest.$ac_ext
22504 fi
22505 echo "$as_me:22505: result: $ac_cv_header_db_h" >&5
22506 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22507 if test $ac_cv_header_db_h = yes; then
22508
22509 echo "$as_me:22509: checking for version of db" >&5
22510 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22511 if test "${cf_cv_hashed_db_version+set}" = set; then
22512   echo $ECHO_N "(cached) $ECHO_C" >&6
22513 else
22514
22515 cf_cv_hashed_db_version=unknown
22516
22517 for cf_db_version in 1 2 3 4 5 6
22518 do
22519
22520 echo "${as_me:-configure}:22520: testing checking for db version $cf_db_version ..." 1>&5
22521
22522         cat >conftest.$ac_ext <<_ACEOF
22523 #line 22523 "configure"
22524 #include "confdefs.h"
22525
22526 $ac_includes_default
22527 #include <db.h>
22528
22529 #ifdef DB_VERSION_MAJOR
22530         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22531 #if $cf_db_version == DB_VERSION_MAJOR
22532         /* ok */
22533 #else
22534         make an error
22535 #endif
22536 #else
22537 #if $cf_db_version == 1
22538         /* ok: assuming this is DB 1.8.5 */
22539 #else
22540         make an error
22541 #endif
22542 #endif
22543
22544 int
22545 main (void)
22546 {
22547 DBT *foo = 0
22548   ;
22549   return 0;
22550 }
22551 _ACEOF
22552 rm -f conftest.$ac_objext
22553 if { (eval echo "$as_me:22553: \"$ac_compile\"") >&5
22554   (eval $ac_compile) 2>&5
22555   ac_status=$?
22556   echo "$as_me:22556: \$? = $ac_status" >&5
22557   (exit $ac_status); } &&
22558          { ac_try='test -s conftest.$ac_objext'
22559   { (eval echo "$as_me:22559: \"$ac_try\"") >&5
22560   (eval $ac_try) 2>&5
22561   ac_status=$?
22562   echo "$as_me:22562: \$? = $ac_status" >&5
22563   (exit $ac_status); }; }; then
22564
22565         cf_cv_hashed_db_version=$cf_db_version
22566         break
22567
22568 else
22569   echo "$as_me: failed program was:" >&5
22570 cat conftest.$ac_ext >&5
22571 fi
22572 rm -f conftest.$ac_objext conftest.$ac_ext
22573 done
22574
22575 fi
22576 echo "$as_me:22576: result: $cf_cv_hashed_db_version" >&5
22577 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22578
22579 if test "$cf_cv_hashed_db_version" = unknown ; then
22580         { { echo "$as_me:22580: error: Cannot determine version of db" >&5
22581 echo "$as_me: error: Cannot determine version of db" >&2;}
22582    { (exit 1); exit 1; }; }
22583 else
22584
22585 echo "$as_me:22585: checking for db libraries" >&5
22586 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22587 if test "${cf_cv_hashed_db_libs+set}" = set; then
22588   echo $ECHO_N "(cached) $ECHO_C" >&6
22589 else
22590
22591 cf_cv_hashed_db_libs=unknown
22592 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22593 do
22594         cf_save_libs="$LIBS"
22595         if test -n "$cf_db_libs"; then
22596
22597 cf_add_libs="$LIBS"
22598 # reverse order
22599 cf_add_0lib=
22600 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22601 # filter duplicates
22602 for cf_add_1lib in $cf_add_0lib; do
22603         for cf_add_2lib in $cf_add_libs; do
22604                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22605                         cf_add_1lib=
22606                         break
22607                 fi
22608         done
22609         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22610 done
22611 LIBS="$cf_add_libs"
22612
22613         fi
22614
22615 echo "${as_me:-configure}:22615: testing checking for library "$cf_db_libs" ..." 1>&5
22616
22617         cat >conftest.$ac_ext <<_ACEOF
22618 #line 22618 "configure"
22619 #include "confdefs.h"
22620
22621 $ac_includes_default
22622 #include <db.h>
22623
22624 int
22625 main (void)
22626 {
22627
22628         char *path = "/tmp/foo";
22629 #ifdef DB_VERSION_MAJOR
22630 #if DB_VERSION_MAJOR >= 4
22631         DB *result = 0;
22632         db_create(&result, NULL, 0);
22633         result->open(result,
22634                 NULL,
22635                 path,
22636                 path,
22637                 DB_HASH,
22638                 DB_CREATE,
22639                 0644);
22640 #elif DB_VERSION_MAJOR >= 3
22641         DB *result = 0;
22642         db_create(&result, NULL, 0);
22643         result->open(result,
22644                 path,
22645                 path,
22646                 DB_HASH,
22647                 DB_CREATE,
22648                 0644);
22649 #elif DB_VERSION_MAJOR >= 2
22650         DB *result = 0;
22651         db_open(path,
22652                 DB_HASH,
22653                 DB_CREATE,
22654                 0644,
22655                 (DB_ENV *) 0,
22656                 (DB_INFO *) 0,
22657                 &result);
22658 #endif /* DB_VERSION_MAJOR */
22659 #else
22660         DB *result = dbopen(path,
22661                      2,
22662                      0644,
22663                      DB_HASH,
22664                      0);
22665 #endif
22666         ${cf_cv_main_return:-return}(result != 0)
22667
22668   ;
22669   return 0;
22670 }
22671 _ACEOF
22672 rm -f conftest.$ac_objext conftest$ac_exeext
22673 if { (eval echo "$as_me:22673: \"$ac_link\"") >&5
22674   (eval $ac_link) 2>&5
22675   ac_status=$?
22676   echo "$as_me:22676: \$? = $ac_status" >&5
22677   (exit $ac_status); } &&
22678          { ac_try='test -s conftest$ac_exeext'
22679   { (eval echo "$as_me:22679: \"$ac_try\"") >&5
22680   (eval $ac_try) 2>&5
22681   ac_status=$?
22682   echo "$as_me:22682: \$? = $ac_status" >&5
22683   (exit $ac_status); }; }; then
22684
22685         if test -n "$cf_db_libs" ; then
22686                 cf_cv_hashed_db_libs=$cf_db_libs
22687         else
22688                 cf_cv_hashed_db_libs=default
22689         fi
22690         LIBS="$cf_save_libs"
22691         break
22692
22693 else
22694   echo "$as_me: failed program was:" >&5
22695 cat conftest.$ac_ext >&5
22696 fi
22697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22698         LIBS="$cf_save_libs"
22699 done
22700
22701 fi
22702 echo "$as_me:22702: result: $cf_cv_hashed_db_libs" >&5
22703 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22704
22705         if test "$cf_cv_hashed_db_libs" = unknown ; then
22706                 { { echo "$as_me:22706: error: Cannot determine library for db" >&5
22707 echo "$as_me: error: Cannot determine library for db" >&2;}
22708    { (exit 1); exit 1; }; }
22709         elif test "$cf_cv_hashed_db_libs" != default ; then
22710
22711 cf_add_libs="$LIBS"
22712 # reverse order
22713 cf_add_0lib=
22714 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22715 # filter duplicates
22716 for cf_add_1lib in $cf_add_0lib; do
22717         for cf_add_2lib in $cf_add_libs; do
22718                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22719                         cf_add_1lib=
22720                         break
22721                 fi
22722         done
22723         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22724 done
22725 LIBS="$cf_add_libs"
22726
22727         fi
22728 fi
22729
22730 else
22731
22732         { { echo "$as_me:22732: error: Cannot find db.h" >&5
22733 echo "$as_me: error: Cannot find db.h" >&2;}
22734    { (exit 1); exit 1; }; }
22735
22736 fi
22737
22738 fi
22739
22740 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22741         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22742         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22743 fi
22744
22745 # Just in case, check if the C compiler has a bool type.
22746
22747 echo "$as_me:22747: checking if we should include stdbool.h" >&5
22748 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22749
22750 if test "${cf_cv_header_stdbool_h+set}" = set; then
22751   echo $ECHO_N "(cached) $ECHO_C" >&6
22752 else
22753
22754         cat >conftest.$ac_ext <<_ACEOF
22755 #line 22755 "configure"
22756 #include "confdefs.h"
22757
22758 int
22759 main (void)
22760 {
22761 bool foo = false
22762   ;
22763   return 0;
22764 }
22765 _ACEOF
22766 rm -f conftest.$ac_objext
22767 if { (eval echo "$as_me:22767: \"$ac_compile\"") >&5
22768   (eval $ac_compile) 2>&5
22769   ac_status=$?
22770   echo "$as_me:22770: \$? = $ac_status" >&5
22771   (exit $ac_status); } &&
22772          { ac_try='test -s conftest.$ac_objext'
22773   { (eval echo "$as_me:22773: \"$ac_try\"") >&5
22774   (eval $ac_try) 2>&5
22775   ac_status=$?
22776   echo "$as_me:22776: \$? = $ac_status" >&5
22777   (exit $ac_status); }; }; then
22778   cf_cv_header_stdbool_h=0
22779 else
22780   echo "$as_me: failed program was:" >&5
22781 cat conftest.$ac_ext >&5
22782 cat >conftest.$ac_ext <<_ACEOF
22783 #line 22783 "configure"
22784 #include "confdefs.h"
22785
22786 #ifndef __BEOS__
22787 #include <stdbool.h>
22788 #endif
22789
22790 int
22791 main (void)
22792 {
22793 bool foo = false
22794   ;
22795   return 0;
22796 }
22797 _ACEOF
22798 rm -f conftest.$ac_objext
22799 if { (eval echo "$as_me:22799: \"$ac_compile\"") >&5
22800   (eval $ac_compile) 2>&5
22801   ac_status=$?
22802   echo "$as_me:22802: \$? = $ac_status" >&5
22803   (exit $ac_status); } &&
22804          { ac_try='test -s conftest.$ac_objext'
22805   { (eval echo "$as_me:22805: \"$ac_try\"") >&5
22806   (eval $ac_try) 2>&5
22807   ac_status=$?
22808   echo "$as_me:22808: \$? = $ac_status" >&5
22809   (exit $ac_status); }; }; then
22810   cf_cv_header_stdbool_h=1
22811 else
22812   echo "$as_me: failed program was:" >&5
22813 cat conftest.$ac_ext >&5
22814 cf_cv_header_stdbool_h=0
22815 fi
22816 rm -f conftest.$ac_objext conftest.$ac_ext
22817 fi
22818 rm -f conftest.$ac_objext conftest.$ac_ext
22819 fi
22820
22821 if test "$cf_cv_header_stdbool_h" = 1
22822 then    echo "$as_me:22822: result: yes" >&5
22823 echo "${ECHO_T}yes" >&6
22824 else    echo "$as_me:22824: result: no" >&5
22825 echo "${ECHO_T}no" >&6
22826 fi
22827
22828 echo "$as_me:22828: checking for builtin bool type" >&5
22829 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22830
22831 if test "${cf_cv_cc_bool_type+set}" = set; then
22832   echo $ECHO_N "(cached) $ECHO_C" >&6
22833 else
22834
22835         cat >conftest.$ac_ext <<_ACEOF
22836 #line 22836 "configure"
22837 #include "confdefs.h"
22838
22839 #include <stdio.h>
22840 #include <sys/types.h>
22841
22842 int
22843 main (void)
22844 {
22845 bool x = false
22846   ;
22847   return 0;
22848 }
22849 _ACEOF
22850 rm -f conftest.$ac_objext
22851 if { (eval echo "$as_me:22851: \"$ac_compile\"") >&5
22852   (eval $ac_compile) 2>&5
22853   ac_status=$?
22854   echo "$as_me:22854: \$? = $ac_status" >&5
22855   (exit $ac_status); } &&
22856          { ac_try='test -s conftest.$ac_objext'
22857   { (eval echo "$as_me:22857: \"$ac_try\"") >&5
22858   (eval $ac_try) 2>&5
22859   ac_status=$?
22860   echo "$as_me:22860: \$? = $ac_status" >&5
22861   (exit $ac_status); }; }; then
22862   cf_cv_cc_bool_type=1
22863 else
22864   echo "$as_me: failed program was:" >&5
22865 cat conftest.$ac_ext >&5
22866 cf_cv_cc_bool_type=0
22867 fi
22868 rm -f conftest.$ac_objext conftest.$ac_ext
22869
22870 fi
22871
22872 if test "$cf_cv_cc_bool_type" = 1
22873 then    echo "$as_me:22873: result: yes" >&5
22874 echo "${ECHO_T}yes" >&6
22875 else    echo "$as_me:22875: result: no" >&5
22876 echo "${ECHO_T}no" >&6
22877 fi
22878
22879 # Check for C++ compiler characteristics (and ensure that it's there!)
22880 if test -n "$CXX" ; then
22881         ac_ext=cc
22882 ac_cpp='$CXXCPP $CPPFLAGS'
22883 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22884 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22885 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22886 ac_main_return=return
22887
22888 if test -n "$GXX" ; then
22889
22890         cf_save="$LIBS"
22891         LIBS="$LIBS $CXXLIBS"
22892         echo "$as_me:22892: checking if we already have C++ library" >&5
22893 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22894         cat >conftest.$ac_ext <<_ACEOF
22895 #line 22895 "configure"
22896 #include "confdefs.h"
22897
22898                         #include <iostream>
22899 int
22900 main (void)
22901 {
22902
22903                         std::cout << "Hello World!" << std::endl;
22904   ;
22905   return 0;
22906 }
22907 _ACEOF
22908 rm -f conftest.$ac_objext conftest$ac_exeext
22909 if { (eval echo "$as_me:22909: \"$ac_link\"") >&5
22910   (eval $ac_link) 2>&5
22911   ac_status=$?
22912   echo "$as_me:22912: \$? = $ac_status" >&5
22913   (exit $ac_status); } &&
22914          { ac_try='test -s conftest$ac_exeext'
22915   { (eval echo "$as_me:22915: \"$ac_try\"") >&5
22916   (eval $ac_try) 2>&5
22917   ac_status=$?
22918   echo "$as_me:22918: \$? = $ac_status" >&5
22919   (exit $ac_status); }; }; then
22920   cf_have_libstdcpp=yes
22921 else
22922   echo "$as_me: failed program was:" >&5
22923 cat conftest.$ac_ext >&5
22924 cf_have_libstdcpp=no
22925 fi
22926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22927         echo "$as_me:22927: result: $cf_have_libstdcpp" >&5
22928 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22929         LIBS="$cf_save"
22930
22931         if test $cf_have_libstdcpp != yes
22932         then
22933                 case $cf_cv_system_name in
22934                 (os2*)
22935                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22936                                 cf_stdcpp_libname=stdcpp
22937                         else
22938                                 cf_stdcpp_libname=stdc++
22939                         fi
22940                         ;;
22941                 (*)
22942                         cf_stdcpp_libname=stdc++
22943                         ;;
22944                 esac
22945
22946                 echo "$as_me:22946: checking for library $cf_stdcpp_libname" >&5
22947 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22948 if test "${cf_cv_libstdcpp+set}" = set; then
22949   echo $ECHO_N "(cached) $ECHO_C" >&6
22950 else
22951
22952                         cf_save="$LIBS"
22953                         LIBS="$LIBS $CXXLIBS"
22954
22955 cf_add_libs="$LIBS"
22956 # reverse order
22957 cf_add_0lib=
22958 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22959 # filter duplicates
22960 for cf_add_1lib in $cf_add_0lib; do
22961         for cf_add_2lib in $cf_add_libs; do
22962                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22963                         cf_add_1lib=
22964                         break
22965                 fi
22966         done
22967         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22968 done
22969 LIBS="$cf_add_libs"
22970
22971                 cat >conftest.$ac_ext <<_ACEOF
22972 #line 22972 "configure"
22973 #include "confdefs.h"
22974
22975                                 #include <iostream>
22976 int
22977 main (void)
22978 {
22979
22980                                 std::cout << "Hello World!" << std::endl;
22981   ;
22982   return 0;
22983 }
22984 _ACEOF
22985 rm -f conftest.$ac_objext conftest$ac_exeext
22986 if { (eval echo "$as_me:22986: \"$ac_link\"") >&5
22987   (eval $ac_link) 2>&5
22988   ac_status=$?
22989   echo "$as_me:22989: \$? = $ac_status" >&5
22990   (exit $ac_status); } &&
22991          { ac_try='test -s conftest$ac_exeext'
22992   { (eval echo "$as_me:22992: \"$ac_try\"") >&5
22993   (eval $ac_try) 2>&5
22994   ac_status=$?
22995   echo "$as_me:22995: \$? = $ac_status" >&5
22996   (exit $ac_status); }; }; then
22997   cf_cv_libstdcpp=yes
22998 else
22999   echo "$as_me: failed program was:" >&5
23000 cat conftest.$ac_ext >&5
23001 cf_cv_libstdcpp=no
23002 fi
23003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23004                         LIBS="$cf_save"
23005
23006 fi
23007 echo "$as_me:23007: result: $cf_cv_libstdcpp" >&5
23008 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23009                 test "$cf_cv_libstdcpp" = yes && {
23010 cf_add_libs="$CXXLIBS"
23011 # reverse order
23012 cf_add_0lib=
23013 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23014 # filter duplicates
23015 for cf_add_1lib in $cf_add_0lib; do
23016         for cf_add_2lib in $cf_add_libs; do
23017                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23018                         cf_add_1lib=
23019                         break
23020                 fi
23021         done
23022         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23023 done
23024 CXXLIBS="$cf_add_libs"
23025  }
23026         fi
23027 fi
23028
23029         echo "$as_me:23029: checking whether $CXX understands -c and -o together" >&5
23030 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23031 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23032   echo $ECHO_N "(cached) $ECHO_C" >&6
23033 else
23034
23035 cat > conftest.$ac_ext <<CF_EOF
23036 int main(void)
23037 {
23038         ${cf_cv_main_return:-return}(0);
23039 }
23040 CF_EOF
23041 # We do the test twice because some compilers refuse to overwrite an
23042 # existing .o file with -o, though they will create one.
23043 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23044 if { (eval echo "$as_me:23044: \"$ac_try\"") >&5
23045   (eval $ac_try) 2>&5
23046   ac_status=$?
23047   echo "$as_me:23047: \$? = $ac_status" >&5
23048   (exit $ac_status); } &&
23049   test -f conftest2.$ac_objext && { (eval echo "$as_me:23049: \"$ac_try\"") >&5
23050   (eval $ac_try) 2>&5
23051   ac_status=$?
23052   echo "$as_me:23052: \$? = $ac_status" >&5
23053   (exit $ac_status); };
23054 then
23055   eval cf_cv_prog_CXX_c_o=yes
23056 else
23057   eval cf_cv_prog_CXX_c_o=no
23058 fi
23059 rm -rf conftest*
23060
23061 fi
23062 if test $cf_cv_prog_CXX_c_o = yes; then
23063   echo "$as_me:23063: result: yes" >&5
23064 echo "${ECHO_T}yes" >&6
23065 else
23066   echo "$as_me:23066: result: no" >&5
23067 echo "${ECHO_T}no" >&6
23068 fi
23069
23070         case $GXX_VERSION in
23071         (1*|2.0-6*)
23072                 cf_cxx_library=yes
23073                 ;;
23074         (*-2.7*|2.7*)
23075
23076 cf_cxx_library=unknown
23077 case $cf_cv_system_name in
23078 (os2*)
23079         cf_gpp_libname=gpp
23080         ;;
23081 (*)
23082         cf_gpp_libname=g++
23083         ;;
23084 esac
23085 if test "$GXX" = yes; then
23086         echo "$as_me:23086: checking for lib$cf_gpp_libname" >&5
23087 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23088         cf_save="$LIBS"
23089
23090 cf_add_libs="$LIBS"
23091 # reverse order
23092 cf_add_0lib=
23093 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23094 # filter duplicates
23095 for cf_add_1lib in $cf_add_0lib; do
23096         for cf_add_2lib in $cf_add_libs; do
23097                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23098                         cf_add_1lib=
23099                         break
23100                 fi
23101         done
23102         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23103 done
23104 LIBS="$cf_add_libs"
23105
23106         cat >conftest.$ac_ext <<_ACEOF
23107 #line 23107 "configure"
23108 #include "confdefs.h"
23109
23110 #include <$cf_gpp_libname/builtin.h>
23111
23112 int
23113 main (void)
23114 {
23115 two_arg_error_handler_t foo2 = lib_error_handler
23116   ;
23117   return 0;
23118 }
23119 _ACEOF
23120 rm -f conftest.$ac_objext conftest$ac_exeext
23121 if { (eval echo "$as_me:23121: \"$ac_link\"") >&5
23122   (eval $ac_link) 2>&5
23123   ac_status=$?
23124   echo "$as_me:23124: \$? = $ac_status" >&5
23125   (exit $ac_status); } &&
23126          { ac_try='test -s conftest$ac_exeext'
23127   { (eval echo "$as_me:23127: \"$ac_try\"") >&5
23128   (eval $ac_try) 2>&5
23129   ac_status=$?
23130   echo "$as_me:23130: \$? = $ac_status" >&5
23131   (exit $ac_status); }; }; then
23132   cf_cxx_library=yes
23133
23134 cf_add_libs="$CXXLIBS"
23135 # reverse order
23136 cf_add_0lib=
23137 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23138 # filter duplicates
23139 for cf_add_1lib in $cf_add_0lib; do
23140         for cf_add_2lib in $cf_add_libs; do
23141                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23142                         cf_add_1lib=
23143                         break
23144                 fi
23145         done
23146         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23147 done
23148 CXXLIBS="$cf_add_libs"
23149
23150          if test "$cf_gpp_libname" = cpp ; then
23151
23152 cat >>confdefs.h <<\EOF
23153 #define HAVE_GPP_BUILTIN_H 1
23154 EOF
23155
23156          else
23157
23158 cat >>confdefs.h <<\EOF
23159 #define HAVE_GXX_BUILTIN_H 1
23160 EOF
23161
23162          fi
23163 else
23164   echo "$as_me: failed program was:" >&5
23165 cat conftest.$ac_ext >&5
23166 cat >conftest.$ac_ext <<_ACEOF
23167 #line 23167 "configure"
23168 #include "confdefs.h"
23169
23170 #include <builtin.h>
23171
23172 int
23173 main (void)
23174 {
23175 two_arg_error_handler_t foo2 = lib_error_handler
23176   ;
23177   return 0;
23178 }
23179 _ACEOF
23180 rm -f conftest.$ac_objext conftest$ac_exeext
23181 if { (eval echo "$as_me:23181: \"$ac_link\"") >&5
23182   (eval $ac_link) 2>&5
23183   ac_status=$?
23184   echo "$as_me:23184: \$? = $ac_status" >&5
23185   (exit $ac_status); } &&
23186          { ac_try='test -s conftest$ac_exeext'
23187   { (eval echo "$as_me:23187: \"$ac_try\"") >&5
23188   (eval $ac_try) 2>&5
23189   ac_status=$?
23190   echo "$as_me:23190: \$? = $ac_status" >&5
23191   (exit $ac_status); }; }; then
23192   cf_cxx_library=yes
23193
23194 cf_add_libs="$CXXLIBS"
23195 # reverse order
23196 cf_add_0lib=
23197 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23198 # filter duplicates
23199 for cf_add_1lib in $cf_add_0lib; do
23200         for cf_add_2lib in $cf_add_libs; do
23201                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23202                         cf_add_1lib=
23203                         break
23204                 fi
23205         done
23206         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23207 done
23208 CXXLIBS="$cf_add_libs"
23209
23210 cat >>confdefs.h <<\EOF
23211 #define HAVE_BUILTIN_H 1
23212 EOF
23213
23214 else
23215   echo "$as_me: failed program was:" >&5
23216 cat conftest.$ac_ext >&5
23217 cf_cxx_library=no
23218 fi
23219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23220 fi
23221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23222         LIBS="$cf_save"
23223         echo "$as_me:23223: result: $cf_cxx_library" >&5
23224 echo "${ECHO_T}$cf_cxx_library" >&6
23225 fi
23226
23227                 ;;
23228         (*)
23229                 cf_cxx_library=no
23230                 ;;
23231         esac
23232
23233         ac_ext=cc
23234 ac_cpp='$CXXCPP $CPPFLAGS'
23235 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23236 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23237 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23238 ac_main_return=return
23239 echo "$as_me:23239: checking how to run the C++ preprocessor" >&5
23240 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23241 if test -z "$CXXCPP"; then
23242   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23243   echo $ECHO_N "(cached) $ECHO_C" >&6
23244 else
23245       # Double quotes because CXXCPP needs to be expanded
23246     for CXXCPP in "$CXX -E" "/lib/cpp"
23247     do
23248       ac_preproc_ok=false
23249 for ac_cxx_preproc_warn_flag in '' yes
23250 do
23251   # Use a header file that comes with gcc, so configuring glibc
23252   # with a fresh cross-compiler works.
23253   # On the NeXT, cc -E runs the code through the compiler's parser,
23254   # not just through cpp. "Syntax error" is here to catch this case.
23255   cat >conftest.$ac_ext <<_ACEOF
23256 #line 23256 "configure"
23257 #include "confdefs.h"
23258 #include <assert.h>
23259                      Syntax error
23260 _ACEOF
23261 if { (eval echo "$as_me:23261: \"$ac_cpp conftest.$ac_ext\"") >&5
23262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23263   ac_status=$?
23264   egrep -v '^ *\+' conftest.er1 >conftest.err
23265   rm -f conftest.er1
23266   cat conftest.err >&5
23267   echo "$as_me:23267: \$? = $ac_status" >&5
23268   (exit $ac_status); } >/dev/null; then
23269   if test -s conftest.err; then
23270     ac_cpp_err=$ac_cxx_preproc_warn_flag
23271   else
23272     ac_cpp_err=
23273   fi
23274 else
23275   ac_cpp_err=yes
23276 fi
23277 if test -z "$ac_cpp_err"; then
23278   :
23279 else
23280   echo "$as_me: failed program was:" >&5
23281   cat conftest.$ac_ext >&5
23282   # Broken: fails on valid input.
23283 continue
23284 fi
23285 rm -f conftest.err conftest.$ac_ext
23286
23287   # OK, works on sane cases.  Now check whether non-existent headers
23288   # can be detected and how.
23289   cat >conftest.$ac_ext <<_ACEOF
23290 #line 23290 "configure"
23291 #include "confdefs.h"
23292 #include <ac_nonexistent.h>
23293 _ACEOF
23294 if { (eval echo "$as_me:23294: \"$ac_cpp conftest.$ac_ext\"") >&5
23295   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23296   ac_status=$?
23297   egrep -v '^ *\+' conftest.er1 >conftest.err
23298   rm -f conftest.er1
23299   cat conftest.err >&5
23300   echo "$as_me:23300: \$? = $ac_status" >&5
23301   (exit $ac_status); } >/dev/null; then
23302   if test -s conftest.err; then
23303     ac_cpp_err=$ac_cxx_preproc_warn_flag
23304   else
23305     ac_cpp_err=
23306   fi
23307 else
23308   ac_cpp_err=yes
23309 fi
23310 if test -z "$ac_cpp_err"; then
23311   # Broken: success on invalid input.
23312 continue
23313 else
23314   echo "$as_me: failed program was:" >&5
23315   cat conftest.$ac_ext >&5
23316   # Passes both tests.
23317 ac_preproc_ok=:
23318 break
23319 fi
23320 rm -f conftest.err conftest.$ac_ext
23321
23322 done
23323 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23324 rm -f conftest.err conftest.$ac_ext
23325 if $ac_preproc_ok; then
23326   break
23327 fi
23328
23329     done
23330     ac_cv_prog_CXXCPP=$CXXCPP
23331
23332 fi
23333   CXXCPP=$ac_cv_prog_CXXCPP
23334 else
23335   ac_cv_prog_CXXCPP=$CXXCPP
23336 fi
23337 echo "$as_me:23337: result: $CXXCPP" >&5
23338 echo "${ECHO_T}$CXXCPP" >&6
23339 ac_preproc_ok=false
23340 for ac_cxx_preproc_warn_flag in '' yes
23341 do
23342   # Use a header file that comes with gcc, so configuring glibc
23343   # with a fresh cross-compiler works.
23344   # On the NeXT, cc -E runs the code through the compiler's parser,
23345   # not just through cpp. "Syntax error" is here to catch this case.
23346   cat >conftest.$ac_ext <<_ACEOF
23347 #line 23347 "configure"
23348 #include "confdefs.h"
23349 #include <assert.h>
23350                      Syntax error
23351 _ACEOF
23352 if { (eval echo "$as_me:23352: \"$ac_cpp conftest.$ac_ext\"") >&5
23353   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23354   ac_status=$?
23355   egrep -v '^ *\+' conftest.er1 >conftest.err
23356   rm -f conftest.er1
23357   cat conftest.err >&5
23358   echo "$as_me:23358: \$? = $ac_status" >&5
23359   (exit $ac_status); } >/dev/null; then
23360   if test -s conftest.err; then
23361     ac_cpp_err=$ac_cxx_preproc_warn_flag
23362   else
23363     ac_cpp_err=
23364   fi
23365 else
23366   ac_cpp_err=yes
23367 fi
23368 if test -z "$ac_cpp_err"; then
23369   :
23370 else
23371   echo "$as_me: failed program was:" >&5
23372   cat conftest.$ac_ext >&5
23373   # Broken: fails on valid input.
23374 continue
23375 fi
23376 rm -f conftest.err conftest.$ac_ext
23377
23378   # OK, works on sane cases.  Now check whether non-existent headers
23379   # can be detected and how.
23380   cat >conftest.$ac_ext <<_ACEOF
23381 #line 23381 "configure"
23382 #include "confdefs.h"
23383 #include <ac_nonexistent.h>
23384 _ACEOF
23385 if { (eval echo "$as_me:23385: \"$ac_cpp conftest.$ac_ext\"") >&5
23386   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23387   ac_status=$?
23388   egrep -v '^ *\+' conftest.er1 >conftest.err
23389   rm -f conftest.er1
23390   cat conftest.err >&5
23391   echo "$as_me:23391: \$? = $ac_status" >&5
23392   (exit $ac_status); } >/dev/null; then
23393   if test -s conftest.err; then
23394     ac_cpp_err=$ac_cxx_preproc_warn_flag
23395   else
23396     ac_cpp_err=
23397   fi
23398 else
23399   ac_cpp_err=yes
23400 fi
23401 if test -z "$ac_cpp_err"; then
23402   # Broken: success on invalid input.
23403 continue
23404 else
23405   echo "$as_me: failed program was:" >&5
23406   cat conftest.$ac_ext >&5
23407   # Passes both tests.
23408 ac_preproc_ok=:
23409 break
23410 fi
23411 rm -f conftest.err conftest.$ac_ext
23412
23413 done
23414 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23415 rm -f conftest.err conftest.$ac_ext
23416 if $ac_preproc_ok; then
23417   :
23418 else
23419   { { echo "$as_me:23419: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23420 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23421    { (exit 1); exit 1; }; }
23422 fi
23423
23424 ac_ext=cc
23425 ac_cpp='$CXXCPP $CPPFLAGS'
23426 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23427 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23428 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23429 ac_main_return=return
23430
23431 for ac_header in typeinfo
23432 do
23433 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23434 echo "$as_me:23434: checking for $ac_header" >&5
23435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23437   echo $ECHO_N "(cached) $ECHO_C" >&6
23438 else
23439   cat >conftest.$ac_ext <<_ACEOF
23440 #line 23440 "configure"
23441 #include "confdefs.h"
23442 #include <$ac_header>
23443 _ACEOF
23444 if { (eval echo "$as_me:23444: \"$ac_cpp conftest.$ac_ext\"") >&5
23445   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23446   ac_status=$?
23447   egrep -v '^ *\+' conftest.er1 >conftest.err
23448   rm -f conftest.er1
23449   cat conftest.err >&5
23450   echo "$as_me:23450: \$? = $ac_status" >&5
23451   (exit $ac_status); } >/dev/null; then
23452   if test -s conftest.err; then
23453     ac_cpp_err=$ac_cxx_preproc_warn_flag
23454   else
23455     ac_cpp_err=
23456   fi
23457 else
23458   ac_cpp_err=yes
23459 fi
23460 if test -z "$ac_cpp_err"; then
23461   eval "$as_ac_Header=yes"
23462 else
23463   echo "$as_me: failed program was:" >&5
23464   cat conftest.$ac_ext >&5
23465   eval "$as_ac_Header=no"
23466 fi
23467 rm -f conftest.err conftest.$ac_ext
23468 fi
23469 echo "$as_me:23469: result: `eval echo '${'$as_ac_Header'}'`" >&5
23470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23471 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23472   cat >>confdefs.h <<EOF
23473 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23474 EOF
23475
23476 fi
23477 done
23478
23479 for ac_header in iostream
23480 do
23481 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23482 echo "$as_me:23482: checking for $ac_header" >&5
23483 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23484 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23485   echo $ECHO_N "(cached) $ECHO_C" >&6
23486 else
23487   cat >conftest.$ac_ext <<_ACEOF
23488 #line 23488 "configure"
23489 #include "confdefs.h"
23490 #include <$ac_header>
23491 _ACEOF
23492 if { (eval echo "$as_me:23492: \"$ac_cpp conftest.$ac_ext\"") >&5
23493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23494   ac_status=$?
23495   egrep -v '^ *\+' conftest.er1 >conftest.err
23496   rm -f conftest.er1
23497   cat conftest.err >&5
23498   echo "$as_me:23498: \$? = $ac_status" >&5
23499   (exit $ac_status); } >/dev/null; then
23500   if test -s conftest.err; then
23501     ac_cpp_err=$ac_cxx_preproc_warn_flag
23502   else
23503     ac_cpp_err=
23504   fi
23505 else
23506   ac_cpp_err=yes
23507 fi
23508 if test -z "$ac_cpp_err"; then
23509   eval "$as_ac_Header=yes"
23510 else
23511   echo "$as_me: failed program was:" >&5
23512   cat conftest.$ac_ext >&5
23513   eval "$as_ac_Header=no"
23514 fi
23515 rm -f conftest.err conftest.$ac_ext
23516 fi
23517 echo "$as_me:23517: result: `eval echo '${'$as_ac_Header'}'`" >&5
23518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23519 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23520   cat >>confdefs.h <<EOF
23521 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23522 EOF
23523
23524 fi
23525 done
23526
23527 if test x"$ac_cv_header_iostream" = xyes ; then
23528         echo "$as_me:23528: checking if iostream uses std-namespace" >&5
23529 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23530         cat >conftest.$ac_ext <<_ACEOF
23531 #line 23531 "configure"
23532 #include "confdefs.h"
23533
23534 #include <iostream>
23535 using std::endl;
23536 using std::cerr;
23537 int
23538 main (void)
23539 {
23540
23541 cerr << "testing" << endl;
23542
23543   ;
23544   return 0;
23545 }
23546 _ACEOF
23547 rm -f conftest.$ac_objext
23548 if { (eval echo "$as_me:23548: \"$ac_compile\"") >&5
23549   (eval $ac_compile) 2>&5
23550   ac_status=$?
23551   echo "$as_me:23551: \$? = $ac_status" >&5
23552   (exit $ac_status); } &&
23553          { ac_try='test -s conftest.$ac_objext'
23554   { (eval echo "$as_me:23554: \"$ac_try\"") >&5
23555   (eval $ac_try) 2>&5
23556   ac_status=$?
23557   echo "$as_me:23557: \$? = $ac_status" >&5
23558   (exit $ac_status); }; }; then
23559   cf_iostream_namespace=yes
23560 else
23561   echo "$as_me: failed program was:" >&5
23562 cat conftest.$ac_ext >&5
23563 cf_iostream_namespace=no
23564 fi
23565 rm -f conftest.$ac_objext conftest.$ac_ext
23566         echo "$as_me:23566: result: $cf_iostream_namespace" >&5
23567 echo "${ECHO_T}$cf_iostream_namespace" >&6
23568         if test "$cf_iostream_namespace" = yes ; then
23569
23570 cat >>confdefs.h <<\EOF
23571 #define IOSTREAM_NAMESPACE 1
23572 EOF
23573
23574         fi
23575 fi
23576
23577 echo "$as_me:23577: checking if we should include stdbool.h" >&5
23578 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23579
23580 if test "${cf_cv_header_stdbool_h+set}" = set; then
23581   echo $ECHO_N "(cached) $ECHO_C" >&6
23582 else
23583
23584         cat >conftest.$ac_ext <<_ACEOF
23585 #line 23585 "configure"
23586 #include "confdefs.h"
23587
23588 int
23589 main (void)
23590 {
23591 bool foo = false
23592   ;
23593   return 0;
23594 }
23595 _ACEOF
23596 rm -f conftest.$ac_objext
23597 if { (eval echo "$as_me:23597: \"$ac_compile\"") >&5
23598   (eval $ac_compile) 2>&5
23599   ac_status=$?
23600   echo "$as_me:23600: \$? = $ac_status" >&5
23601   (exit $ac_status); } &&
23602          { ac_try='test -s conftest.$ac_objext'
23603   { (eval echo "$as_me:23603: \"$ac_try\"") >&5
23604   (eval $ac_try) 2>&5
23605   ac_status=$?
23606   echo "$as_me:23606: \$? = $ac_status" >&5
23607   (exit $ac_status); }; }; then
23608   cf_cv_header_stdbool_h=0
23609 else
23610   echo "$as_me: failed program was:" >&5
23611 cat conftest.$ac_ext >&5
23612 cat >conftest.$ac_ext <<_ACEOF
23613 #line 23613 "configure"
23614 #include "confdefs.h"
23615
23616 #ifndef __BEOS__
23617 #include <stdbool.h>
23618 #endif
23619
23620 int
23621 main (void)
23622 {
23623 bool foo = false
23624   ;
23625   return 0;
23626 }
23627 _ACEOF
23628 rm -f conftest.$ac_objext
23629 if { (eval echo "$as_me:23629: \"$ac_compile\"") >&5
23630   (eval $ac_compile) 2>&5
23631   ac_status=$?
23632   echo "$as_me:23632: \$? = $ac_status" >&5
23633   (exit $ac_status); } &&
23634          { ac_try='test -s conftest.$ac_objext'
23635   { (eval echo "$as_me:23635: \"$ac_try\"") >&5
23636   (eval $ac_try) 2>&5
23637   ac_status=$?
23638   echo "$as_me:23638: \$? = $ac_status" >&5
23639   (exit $ac_status); }; }; then
23640   cf_cv_header_stdbool_h=1
23641 else
23642   echo "$as_me: failed program was:" >&5
23643 cat conftest.$ac_ext >&5
23644 cf_cv_header_stdbool_h=0
23645 fi
23646 rm -f conftest.$ac_objext conftest.$ac_ext
23647 fi
23648 rm -f conftest.$ac_objext conftest.$ac_ext
23649 fi
23650
23651 if test "$cf_cv_header_stdbool_h" = 1
23652 then    echo "$as_me:23652: result: yes" >&5
23653 echo "${ECHO_T}yes" >&6
23654 else    echo "$as_me:23654: result: no" >&5
23655 echo "${ECHO_T}no" >&6
23656 fi
23657
23658 echo "$as_me:23658: checking for builtin bool type" >&5
23659 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23660
23661 if test "${cf_cv_builtin_bool+set}" = set; then
23662   echo $ECHO_N "(cached) $ECHO_C" >&6
23663 else
23664
23665         cat >conftest.$ac_ext <<_ACEOF
23666 #line 23666 "configure"
23667 #include "confdefs.h"
23668
23669 #include <stdio.h>
23670 #include <sys/types.h>
23671
23672 int
23673 main (void)
23674 {
23675 bool x = false
23676   ;
23677   return 0;
23678 }
23679 _ACEOF
23680 rm -f conftest.$ac_objext
23681 if { (eval echo "$as_me:23681: \"$ac_compile\"") >&5
23682   (eval $ac_compile) 2>&5
23683   ac_status=$?
23684   echo "$as_me:23684: \$? = $ac_status" >&5
23685   (exit $ac_status); } &&
23686          { ac_try='test -s conftest.$ac_objext'
23687   { (eval echo "$as_me:23687: \"$ac_try\"") >&5
23688   (eval $ac_try) 2>&5
23689   ac_status=$?
23690   echo "$as_me:23690: \$? = $ac_status" >&5
23691   (exit $ac_status); }; }; then
23692   cf_cv_builtin_bool=1
23693 else
23694   echo "$as_me: failed program was:" >&5
23695 cat conftest.$ac_ext >&5
23696 cf_cv_builtin_bool=0
23697 fi
23698 rm -f conftest.$ac_objext conftest.$ac_ext
23699
23700 fi
23701
23702 if test "$cf_cv_builtin_bool" = 1
23703 then    echo "$as_me:23703: result: yes" >&5
23704 echo "${ECHO_T}yes" >&6
23705 else    echo "$as_me:23705: result: no" >&5
23706 echo "${ECHO_T}no" >&6
23707 fi
23708
23709 echo "$as_me:23709: checking for size of bool" >&5
23710 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23711 if test "${cf_cv_type_of_bool+set}" = set; then
23712   echo $ECHO_N "(cached) $ECHO_C" >&6
23713 else
23714
23715         rm -f cf_test.out
23716         if test "$cross_compiling" = yes; then
23717   cf_cv_type_of_bool=unknown
23718 else
23719   cat >conftest.$ac_ext <<_ACEOF
23720 #line 23720 "configure"
23721 #include "confdefs.h"
23722
23723 #include <stdlib.h>
23724 #include <stdio.h>
23725
23726 #if defined(__cplusplus)
23727
23728 #ifdef HAVE_GXX_BUILTIN_H
23729 #include <g++/builtin.h>
23730 #elif HAVE_GPP_BUILTIN_H
23731 #include <gpp/builtin.h>
23732 #elif HAVE_BUILTIN_H
23733 #include <builtin.h>
23734 #endif
23735
23736 #else
23737
23738 #if $cf_cv_header_stdbool_h
23739 #include <stdbool.h>
23740 #endif
23741
23742 #endif
23743
23744 int main(void)
23745 {
23746         FILE *fp = fopen("cf_test.out", "w");
23747         if (fp != 0) {
23748                 bool x = true;
23749                 if ((bool)(-x) >= 0)
23750                         fputs("unsigned ", fp);
23751                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23752                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23753                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23754                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23755                 fclose(fp);
23756         }
23757         ${cf_cv_main_return:-return}(0);
23758 }
23759
23760 _ACEOF
23761 rm -f conftest$ac_exeext
23762 if { (eval echo "$as_me:23762: \"$ac_link\"") >&5
23763   (eval $ac_link) 2>&5
23764   ac_status=$?
23765   echo "$as_me:23765: \$? = $ac_status" >&5
23766   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23767   { (eval echo "$as_me:23767: \"$ac_try\"") >&5
23768   (eval $ac_try) 2>&5
23769   ac_status=$?
23770   echo "$as_me:23770: \$? = $ac_status" >&5
23771   (exit $ac_status); }; }; then
23772   cf_cv_type_of_bool=`cat cf_test.out`
23773                  if test -z "$cf_cv_type_of_bool"; then
23774                    cf_cv_type_of_bool=unknown
23775                  fi
23776 else
23777   echo "$as_me: program exited with status $ac_status" >&5
23778 echo "$as_me: failed program was:" >&5
23779 cat conftest.$ac_ext >&5
23780 cf_cv_type_of_bool=unknown
23781 fi
23782 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23783 fi
23784
23785 fi
23786
23787         rm -f cf_test.out
23788 echo "$as_me:23788: result: $cf_cv_type_of_bool" >&5
23789 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23790 if test "$cf_cv_type_of_bool" = unknown ; then
23791         case .$NCURSES_BOOL in
23792         (.auto|.) NCURSES_BOOL=unsigned;;
23793         esac
23794         { echo "$as_me:23794: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23795 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23796         cf_cv_type_of_bool=$NCURSES_BOOL
23797 fi
23798
23799 echo "$as_me:23799: checking for special defines needed for etip.h" >&5
23800 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23801 cf_save_CXXFLAGS="$CXXFLAGS"
23802 cf_result="none"
23803
23804 # etip.h includes ncurses.h which includes ncurses_dll.h
23805 # But ncurses_dll.h is generated - fix here.
23806 test -d include || mkdir include
23807 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
23808
23809 for cf_math in "" MATH_H
23810 do
23811 for cf_excp in "" MATH_EXCEPTION
23812 do
23813         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23814         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23815         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23816 cat >conftest.$ac_ext <<_ACEOF
23817 #line 23817 "configure"
23818 #include "confdefs.h"
23819
23820 #include <etip.h.in>
23821
23822 int
23823 main (void)
23824 {
23825
23826   ;
23827   return 0;
23828 }
23829 _ACEOF
23830 rm -f conftest.$ac_objext
23831 if { (eval echo "$as_me:23831: \"$ac_compile\"") >&5
23832   (eval $ac_compile) 2>&5
23833   ac_status=$?
23834   echo "$as_me:23834: \$? = $ac_status" >&5
23835   (exit $ac_status); } &&
23836          { ac_try='test -s conftest.$ac_objext'
23837   { (eval echo "$as_me:23837: \"$ac_try\"") >&5
23838   (eval $ac_try) 2>&5
23839   ac_status=$?
23840   echo "$as_me:23840: \$? = $ac_status" >&5
23841   (exit $ac_status); }; }; then
23842
23843         test -n "$cf_math" && cat >>confdefs.h <<EOF
23844 #define ETIP_NEEDS_${cf_math} 1
23845 EOF
23846
23847         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23848 #define ETIP_NEEDS_${cf_excp} 1
23849 EOF
23850
23851         cf_result="$cf_math $cf_excp"
23852         break 2
23853
23854 else
23855   echo "$as_me: failed program was:" >&5
23856 cat conftest.$ac_ext >&5
23857 fi
23858 rm -f conftest.$ac_objext conftest.$ac_ext
23859 done
23860 done
23861 echo "$as_me:23861: result: $cf_result" >&5
23862 echo "${ECHO_T}$cf_result" >&6
23863 CXXFLAGS="$cf_save_CXXFLAGS"
23864
23865 if test -n "$CXX"; then
23866 echo "$as_me:23866: checking if $CXX accepts parameter initialization" >&5
23867 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23868 if test "${cf_cv_cpp_param_init+set}" = set; then
23869   echo $ECHO_N "(cached) $ECHO_C" >&6
23870 else
23871
23872         ac_ext=cc
23873 ac_cpp='$CXXCPP $CPPFLAGS'
23874 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23875 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23876 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23877 ac_main_return=return
23878
23879         if test "$cross_compiling" = yes; then
23880   cf_cv_cpp_param_init=unknown
23881 else
23882   cat >conftest.$ac_ext <<_ACEOF
23883 #line 23883 "configure"
23884 #include "confdefs.h"
23885
23886 class TEST {
23887 private:
23888         int value;
23889 public:
23890         TEST(int x = 1);
23891         ~TEST();
23892 };
23893
23894 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23895 {
23896         value = x;
23897 }
23898 int main(void) { }
23899
23900 _ACEOF
23901 rm -f conftest$ac_exeext
23902 if { (eval echo "$as_me:23902: \"$ac_link\"") >&5
23903   (eval $ac_link) 2>&5
23904   ac_status=$?
23905   echo "$as_me:23905: \$? = $ac_status" >&5
23906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23907   { (eval echo "$as_me:23907: \"$ac_try\"") >&5
23908   (eval $ac_try) 2>&5
23909   ac_status=$?
23910   echo "$as_me:23910: \$? = $ac_status" >&5
23911   (exit $ac_status); }; }; then
23912   cf_cv_cpp_param_init=yes
23913 else
23914   echo "$as_me: program exited with status $ac_status" >&5
23915 echo "$as_me: failed program was:" >&5
23916 cat conftest.$ac_ext >&5
23917 cf_cv_cpp_param_init=no
23918 fi
23919 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23920 fi
23921         ac_ext=cc
23922 ac_cpp='$CXXCPP $CPPFLAGS'
23923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23926 ac_main_return=return
23927
23928 fi
23929 echo "$as_me:23929: result: $cf_cv_cpp_param_init" >&5
23930 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23931 fi
23932 test "$cf_cv_cpp_param_init" = yes &&
23933 cat >>confdefs.h <<\EOF
23934 #define CPP_HAS_PARAM_INIT 1
23935 EOF
23936
23937 if test -n "$CXX"; then
23938
23939 echo "$as_me:23939: checking if $CXX accepts static_cast" >&5
23940 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23941 if test "${cf_cv_cpp_static_cast+set}" = set; then
23942   echo $ECHO_N "(cached) $ECHO_C" >&6
23943 else
23944
23945         ac_ext=cc
23946 ac_cpp='$CXXCPP $CPPFLAGS'
23947 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23948 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23949 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23950 ac_main_return=return
23951
23952         cat >conftest.$ac_ext <<_ACEOF
23953 #line 23953 "configure"
23954 #include "confdefs.h"
23955
23956 class NCursesPanel
23957 {
23958 public:
23959   NCursesPanel(int nlines,
23960                int ncols,
23961                int begin_y = 0,
23962                int begin_x = 0)
23963   {
23964   }
23965   NCursesPanel();
23966   ~NCursesPanel();
23967 };
23968
23969 template<class T> class NCursesUserPanel : public NCursesPanel
23970 {
23971 public:
23972   NCursesUserPanel (int nlines,
23973                     int ncols,
23974                     int begin_y = 0,
23975                     int begin_x = 0,
23976                     const T* p_UserData = static_cast<T*>(0))
23977     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23978   {
23979   };
23980   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23981   {
23982   };
23983
23984   virtual ~NCursesUserPanel() {};
23985 };
23986
23987 int
23988 main (void)
23989 {
23990
23991         const char* p_UserData = static_cast<char*>(0)
23992   ;
23993   return 0;
23994 }
23995 _ACEOF
23996 rm -f conftest.$ac_objext
23997 if { (eval echo "$as_me:23997: \"$ac_compile\"") >&5
23998   (eval $ac_compile) 2>&5
23999   ac_status=$?
24000   echo "$as_me:24000: \$? = $ac_status" >&5
24001   (exit $ac_status); } &&
24002          { ac_try='test -s conftest.$ac_objext'
24003   { (eval echo "$as_me:24003: \"$ac_try\"") >&5
24004   (eval $ac_try) 2>&5
24005   ac_status=$?
24006   echo "$as_me:24006: \$? = $ac_status" >&5
24007   (exit $ac_status); }; }; then
24008   cf_cv_cpp_static_cast=yes
24009 else
24010   echo "$as_me: failed program was:" >&5
24011 cat conftest.$ac_ext >&5
24012 cf_cv_cpp_static_cast=no
24013 fi
24014 rm -f conftest.$ac_objext conftest.$ac_ext
24015
24016         ac_ext=cc
24017 ac_cpp='$CXXCPP $CPPFLAGS'
24018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24021 ac_main_return=return
24022
24023 fi
24024 echo "$as_me:24024: result: $cf_cv_cpp_static_cast" >&5
24025 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24026
24027 fi
24028
24029 test "$cf_cv_cpp_static_cast" = yes &&
24030 cat >>confdefs.h <<\EOF
24031 #define CPP_HAS_STATIC_CAST 1
24032 EOF
24033
24034         CXX_AR='$(AR)'
24035         CXX_ARFLAGS='$(ARFLAGS)'
24036         case $cf_cv_system_name in
24037         (irix*)
24038             if test "$GXX" != yes ; then
24039                 CXX_AR='$(CXX)'
24040                 CXX_ARFLAGS='-ar -o'
24041             fi
24042             ;;
24043         (sco3.2v5*)
24044             CXXLDFLAGS="-u main"
24045             ;;
24046         (solaris2*)
24047             if test "$GXX" != yes ; then
24048                 CXX_AR='$(CXX)'
24049                 CXX_ARFLAGS='-xar -o'
24050             fi
24051             ;;
24052         esac
24053
24054 else
24055         cf_cxx_library=no
24056         cf_cv_builtin_bool=1
24057
24058         # Just because we are not configuring against C++ right now does not
24059         # mean that a user will not want to use C++.  Some distributors disable
24060         # the C++ portion of this configuration as a shortcut (or just to avoid
24061         # compiling the demo in the c++ directory).  So we need a reasonable
24062         # default for the 'bool' type.
24063         #
24064         # Caveat: since the storage of the bool type is not standardized, it
24065         # may change.
24066
24067         if test "$NCURSES_BOOL" != auto ; then
24068                 cf_cv_type_of_bool=$NCURSES_BOOL
24069                 cf_cv_header_stdbool_h=0
24070         else
24071                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24072
24073 echo "$as_me:24073: checking for size of bool" >&5
24074 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24075 if test "${cf_cv_type_of_bool+set}" = set; then
24076   echo $ECHO_N "(cached) $ECHO_C" >&6
24077 else
24078
24079         rm -f cf_test.out
24080         if test "$cross_compiling" = yes; then
24081   cf_cv_type_of_bool=unknown
24082 else
24083   cat >conftest.$ac_ext <<_ACEOF
24084 #line 24084 "configure"
24085 #include "confdefs.h"
24086
24087 #include <stdlib.h>
24088 #include <stdio.h>
24089
24090 #if defined(__cplusplus)
24091
24092 #ifdef HAVE_GXX_BUILTIN_H
24093 #include <g++/builtin.h>
24094 #elif HAVE_GPP_BUILTIN_H
24095 #include <gpp/builtin.h>
24096 #elif HAVE_BUILTIN_H
24097 #include <builtin.h>
24098 #endif
24099
24100 #else
24101
24102 #if $cf_cv_header_stdbool_h
24103 #include <stdbool.h>
24104 #endif
24105
24106 #endif
24107
24108 int main(void)
24109 {
24110         FILE *fp = fopen("cf_test.out", "w");
24111         if (fp != 0) {
24112                 bool x = true;
24113                 if ((bool)(-x) >= 0)
24114                         fputs("unsigned ", fp);
24115                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24116                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24117                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24118                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24119                 fclose(fp);
24120         }
24121         ${cf_cv_main_return:-return}(0);
24122 }
24123
24124 _ACEOF
24125 rm -f conftest$ac_exeext
24126 if { (eval echo "$as_me:24126: \"$ac_link\"") >&5
24127   (eval $ac_link) 2>&5
24128   ac_status=$?
24129   echo "$as_me:24129: \$? = $ac_status" >&5
24130   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24131   { (eval echo "$as_me:24131: \"$ac_try\"") >&5
24132   (eval $ac_try) 2>&5
24133   ac_status=$?
24134   echo "$as_me:24134: \$? = $ac_status" >&5
24135   (exit $ac_status); }; }; then
24136   cf_cv_type_of_bool=`cat cf_test.out`
24137                  if test -z "$cf_cv_type_of_bool"; then
24138                    cf_cv_type_of_bool=unknown
24139                  fi
24140 else
24141   echo "$as_me: program exited with status $ac_status" >&5
24142 echo "$as_me: failed program was:" >&5
24143 cat conftest.$ac_ext >&5
24144 cf_cv_type_of_bool=unknown
24145 fi
24146 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24147 fi
24148
24149 fi
24150
24151         rm -f cf_test.out
24152 echo "$as_me:24152: result: $cf_cv_type_of_bool" >&5
24153 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24154 if test "$cf_cv_type_of_bool" = unknown ; then
24155         case .$NCURSES_BOOL in
24156         (.auto|.) NCURSES_BOOL=unsigned;;
24157         esac
24158         { echo "$as_me:24158: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24159 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24160         cf_cv_type_of_bool=$NCURSES_BOOL
24161 fi
24162
24163                 else
24164                         echo "$as_me:24164: checking for fallback type of bool" >&5
24165 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24166                         case "$host_cpu" in
24167                         (i?86)  cf_cv_type_of_bool=char ;;
24168                         (*)     cf_cv_type_of_bool=int  ;;
24169                         esac
24170                         echo "$as_me:24170: result: $cf_cv_type_of_bool" >&5
24171 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24172                 fi
24173         fi
24174 fi
24175
24176 # If the C compiler did not declare bool, and we did not determine that the C++
24177 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24178 # ncurses library use the same type as C++ bool.  Note that this allows one to
24179 # specify the type of bool in a configure-script option and postpone
24180 # integration with the C++ compiler provided that the types are compatible.
24181 USE_CXX_BOOL=1
24182 if test $cf_cv_cc_bool_type = 1
24183 then
24184         # oops: C has a bool.  Unlikely, but C++ could differ.
24185         USE_CXX_BOOL=0
24186 elif test $cf_cv_builtin_bool = 0
24187 then
24188         # C++ has no bool
24189         USE_CXX_BOOL=0
24190 else
24191         # this is the normal case
24192         USE_CXX_BOOL='defined(__cplusplus)'
24193 fi
24194
24195 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24196
24197         if test "$cf_with_ada" != "no" ; then
24198                 if test "$with_libtool" != "no"; then
24199                         { echo "$as_me:24199: WARNING: libtool does not support Ada - disabling feature" >&5
24200 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24201                         cf_with_ada=no
24202                 fi
24203         fi
24204
24205         if test "$cf_with_ada" != "no" ; then
24206
24207 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24208 do
24209
24210 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24211
24212         unset ac_cv_path_cf_TEMP_gnat
24213         unset cf_TEMP_gnat
24214         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24215 set dummy $cf_prog_gnat; ac_word=$2
24216 echo "$as_me:24216: checking for $ac_word" >&5
24217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24218 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24219   echo $ECHO_N "(cached) $ECHO_C" >&6
24220 else
24221   case $cf_TEMP_gnat in
24222   [\\/]* | ?:[\\/]*)
24223   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24224   ;;
24225   *)
24226   ac_save_IFS=$IFS; IFS=$ac_path_separator
24227 ac_dummy="$PATH"
24228 for ac_dir in $ac_dummy; do
24229   IFS=$ac_save_IFS
24230   test -z "$ac_dir" && ac_dir=.
24231   if $as_executable_p "$ac_dir/$ac_word"; then
24232    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24233    echo "$as_me:24233: found $ac_dir/$ac_word" >&5
24234    break
24235 fi
24236 done
24237
24238   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24239   ;;
24240 esac
24241 fi
24242 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24243
24244 if test -n "$cf_TEMP_gnat"; then
24245   echo "$as_me:24245: result: $cf_TEMP_gnat" >&5
24246 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24247 else
24248   echo "$as_me:24248: result: no" >&5
24249 echo "${ECHO_T}no" >&6
24250 fi
24251
24252         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24253
24254         if test "x$cf_TEMP_gnat" != xno; then
24255                 unset cf_cv_gnat_version
24256                 unset cf_TEMP_gnat
24257
24258 echo "$as_me:24258: checking for $cf_prog_gnat version" >&5
24259 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24260 if test "${cf_cv_gnat_version+set}" = set; then
24261   echo $ECHO_N "(cached) $ECHO_C" >&6
24262 else
24263
24264 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24265         grep '[0-9].[0-9][0-9]*' |\
24266         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24267
24268 fi
24269 echo "$as_me:24269: result: $cf_cv_gnat_version" >&5
24270 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24271 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24272 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24273
24274         fi
24275         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24276
24277         unset cf_TEMP_gnat
24278         unset cf_cv_gnat_version
24279         unset ac_cv_path_cf_TEMP_gnat
24280 done
24281
24282 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24283         cf_ada_make=
24284         cf_cv_prog_gnat_correct=no
24285 else
24286         cf_ada_make=gnatmake
24287         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24288                 # gprconfig is newer than gnatmake; we can continue...
24289                 cf_ada_config="##"
24290         else
24291                 rm -rf conftest* *~conftest*
24292                 if mkdir conftest.src
24293                 then
24294                         cf_ada_config=""
24295                         cd conftest.src
24296                         for cf_gprconfig in Ada C
24297                         do
24298                                 echo "$as_me:24298: checking for gprconfig name for $cf_gprconfig" >&5
24299 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24300                                 if test $cf_gprconfig = C
24301                                 then
24302                                         for cf_gprconfig_param in \
24303                                                 $cf_gprconfig,,,,GNATGCC \
24304                                                 $cf_gprconfig,,,,GCC \
24305                                                 $cf_gprconfig
24306                                         do
24307                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24308                                                 test -n "$cf_gprconfig_value" && break
24309                                         done
24310                                 else
24311                                         cf_gprconfig_param=$cf_gprconfig
24312                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24313                                 fi
24314                                 if test -n "$cf_gprconfig_value"
24315                                 then
24316                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24317                                         echo "$as_me:24317: result: $cf_gprconfig_value" >&5
24318 echo "${ECHO_T}$cf_gprconfig_value" >&6
24319                                 else
24320                                         echo "$as_me:24320: result: missing" >&5
24321 echo "${ECHO_T}missing" >&6
24322                                         cf_ada_config="#"
24323                                         break
24324                                 fi
24325                         done
24326                         cd ..
24327                         rm -rf conftest* *~conftest*
24328                 fi
24329         fi
24330         if test "x$cf_ada_config" != "x#"
24331         then
24332
24333 echo "$as_me:24333: checking for gnat version" >&5
24334 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24335 if test "${cf_cv_gnat_version+set}" = set; then
24336   echo $ECHO_N "(cached) $ECHO_C" >&6
24337 else
24338
24339 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24340         grep '[0-9].[0-9][0-9]*' |\
24341         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24342
24343 fi
24344 echo "$as_me:24344: result: $cf_cv_gnat_version" >&5
24345 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24346 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24347
24348 case $cf_cv_gnat_version in
24349 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24350         cf_cv_prog_gnat_correct=yes
24351         ;;
24352 (*)
24353         { echo "$as_me:24353: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24354 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24355         cf_cv_prog_gnat_correct=no
24356         ;;
24357 esac
24358
24359                 # Extract the first word of "m4", so it can be a program name with args.
24360 set dummy m4; ac_word=$2
24361 echo "$as_me:24361: checking for $ac_word" >&5
24362 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24363 if test "${ac_cv_prog_M4_exists+set}" = set; then
24364   echo $ECHO_N "(cached) $ECHO_C" >&6
24365 else
24366   if test -n "$M4_exists"; then
24367   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24368 else
24369   ac_save_IFS=$IFS; IFS=$ac_path_separator
24370 ac_dummy="$PATH"
24371 for ac_dir in $ac_dummy; do
24372   IFS=$ac_save_IFS
24373   test -z "$ac_dir" && ac_dir=.
24374   $as_executable_p "$ac_dir/$ac_word" || continue
24375 ac_cv_prog_M4_exists="yes"
24376 echo "$as_me:24376: found $ac_dir/$ac_word" >&5
24377 break
24378 done
24379
24380   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24381 fi
24382 fi
24383 M4_exists=$ac_cv_prog_M4_exists
24384 if test -n "$M4_exists"; then
24385   echo "$as_me:24385: result: $M4_exists" >&5
24386 echo "${ECHO_T}$M4_exists" >&6
24387 else
24388   echo "$as_me:24388: result: no" >&5
24389 echo "${ECHO_T}no" >&6
24390 fi
24391
24392                 if test "$ac_cv_prog_M4_exists" = no; then
24393                         cf_cv_prog_gnat_correct=no
24394                         { echo "$as_me:24394: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24395 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24396                 fi
24397                 if test "$cf_cv_prog_gnat_correct" = yes; then
24398                         echo "$as_me:24398: checking if GNAT works" >&5
24399 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24400
24401 rm -rf conftest* *~conftest*
24402 cat >>conftest.ads <<CF_EOF
24403 procedure conftest;
24404 CF_EOF
24405 cat >>conftest.adb <<CF_EOF
24406 with Text_IO;
24407 with GNAT.OS_Lib;
24408 procedure conftest is
24409 begin
24410    Text_IO.Put ("Hello World");
24411    Text_IO.New_Line;
24412    GNAT.OS_Lib.OS_Exit (0);
24413 end conftest;
24414 CF_EOF
24415 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24416    if ( ./conftest 1>&5 2>&1 ) ; then
24417       cf_cv_prog_gnat_correct=yes
24418    else
24419       cf_cv_prog_gnat_correct=no
24420    fi
24421 else
24422    cf_cv_prog_gnat_correct=no
24423 fi
24424 rm -rf conftest* *~conftest*
24425
24426                         echo "$as_me:24426: result: $cf_cv_prog_gnat_correct" >&5
24427 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24428                 fi
24429         else
24430                 cf_cv_prog_gnat_correct=no
24431         fi
24432 fi
24433
24434                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24435
24436         ADAFLAGS="$ADAFLAGS -gnatpn"
24437
24438         echo "$as_me:24438: checking optimization options for ADAFLAGS" >&5
24439 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24440         case "$CFLAGS" in
24441         (*-g*)
24442
24443         ADAFLAGS="$ADAFLAGS -g"
24444
24445                 ;;
24446         esac
24447         case "$CFLAGS" in
24448         (*-O*)
24449                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24450
24451         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24452
24453                 ;;
24454         esac
24455         echo "$as_me:24455: result: $ADAFLAGS" >&5
24456 echo "${ECHO_T}$ADAFLAGS" >&6
24457
24458 echo "$as_me:24458: checking if GNATPREP supports -T option" >&5
24459 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24460 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24461   echo $ECHO_N "(cached) $ECHO_C" >&6
24462 else
24463
24464 cf_cv_gnatprep_opt_t=no
24465 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24466
24467 fi
24468 echo "$as_me:24468: result: $cf_cv_gnatprep_opt_t" >&5
24469 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24470 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24471
24472 echo "$as_me:24472: checking if GNAT supports generics" >&5
24473 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24474 case $cf_cv_gnat_version in
24475 (3.[1-9]*|[4-9].*)
24476         cf_gnat_generics=yes
24477         ;;
24478 (*)
24479         cf_gnat_generics=no
24480         ;;
24481 esac
24482 echo "$as_me:24482: result: $cf_gnat_generics" >&5
24483 echo "${ECHO_T}$cf_gnat_generics" >&6
24484
24485 if test "$cf_gnat_generics" = yes
24486 then
24487         cf_compile_generics=generics
24488         cf_generic_objects="\${GENOBJS}"
24489 else
24490         cf_compile_generics=
24491         cf_generic_objects=
24492 fi
24493
24494 echo "$as_me:24494: checking if GNAT supports SIGINT" >&5
24495 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24496 if test "${cf_cv_gnat_sigint+set}" = set; then
24497   echo $ECHO_N "(cached) $ECHO_C" >&6
24498 else
24499
24500 rm -rf conftest* *~conftest*
24501 cat >>conftest.ads <<CF_EOF
24502 with Ada.Interrupts.Names;
24503
24504 package ConfTest is
24505
24506    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24507    pragma Unreserve_All_Interrupts;
24508    pragma Warnings (On);
24509
24510    protected Process is
24511       procedure Stop;
24512       function Continue return Boolean;
24513       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24514    private
24515       Done : Boolean := False;
24516    end Process;
24517
24518 end ConfTest;
24519 CF_EOF
24520 cat >>conftest.adb <<CF_EOF
24521 package body ConfTest is
24522    protected body Process is
24523       procedure Stop is
24524       begin
24525          Done := True;
24526       end Stop;
24527       function Continue return Boolean is
24528       begin
24529          return not Done;
24530       end Continue;
24531    end Process;
24532 end ConfTest;
24533 CF_EOF
24534 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24535       cf_cv_gnat_sigint=yes
24536 else
24537    cf_cv_gnat_sigint=no
24538 fi
24539 rm -rf conftest* *~conftest*
24540
24541 fi
24542 echo "$as_me:24542: result: $cf_cv_gnat_sigint" >&5
24543 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24544
24545 if test $cf_cv_gnat_sigint = yes ; then
24546         USE_GNAT_SIGINT=""
24547 else
24548         USE_GNAT_SIGINT="#"
24549 fi
24550
24551 cf_gnat_libraries=no
24552 cf_gnat_projects=no
24553
24554 if test "$enable_gnat_projects" != no ; then
24555 echo "$as_me:24555: checking if GNAT supports project files" >&5
24556 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24557 case $cf_cv_gnat_version in
24558 (3.[0-9]*)
24559         ;;
24560 (*)
24561         case $cf_cv_system_name in
24562         (cygwin*|msys*)
24563                 ;;
24564         (*)
24565                 rm -rf conftest* *~conftest*
24566                 if mkdir conftest.src conftest.bin conftest.lib
24567                 then
24568                         cd conftest.src
24569                         rm -rf conftest* *~conftest*
24570                         cat >>library.gpr <<CF_EOF
24571 project Library is
24572   Kind := External ("LIB_KIND");
24573   for Library_Name use "ConfTest";
24574   for Object_Dir use ".";
24575   for Library_ALI_Dir use External("LIBRARY_DIR");
24576   for Library_Version use External ("SONAME");
24577   for Library_Kind use Kind;
24578   for Library_Dir use External("BUILD_DIR");
24579   Source_Dir := External ("SOURCE_DIR");
24580   for Source_Dirs use (Source_Dir);
24581 end Library;
24582 CF_EOF
24583                         cat >>confpackage.ads <<CF_EOF
24584 package ConfPackage is
24585    procedure conftest;
24586 end ConfPackage;
24587 CF_EOF
24588                         cat >>confpackage.adb <<CF_EOF
24589 with Text_IO;
24590 package body ConfPackage is
24591    procedure conftest is
24592    begin
24593       Text_IO.Put ("Hello World");
24594       Text_IO.New_Line;
24595    end conftest;
24596 end ConfPackage;
24597 CF_EOF
24598                         if ( $cf_ada_make $ADAFLAGS \
24599                                         -Plibrary.gpr \
24600                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24601                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24602                                         -XSOURCE_DIR=`pwd` \
24603                                         -XSONAME=libConfTest.so.1 \
24604                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24605                                 cf_gnat_projects=yes
24606                         fi
24607                         cd ..
24608                 fi
24609                 if test -f conftest.lib/confpackage.ali
24610                 then
24611                         cf_gnat_libraries=yes
24612                 fi
24613                 rm -rf conftest* *~conftest*
24614                 ;;
24615         esac
24616         ;;
24617 esac
24618 echo "$as_me:24618: result: $cf_gnat_projects" >&5
24619 echo "${ECHO_T}$cf_gnat_projects" >&6
24620 fi # enable_gnat_projects
24621
24622 if test $cf_gnat_projects = yes
24623 then
24624         echo "$as_me:24624: checking if GNAT supports libraries" >&5
24625 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24626         echo "$as_me:24626: result: $cf_gnat_libraries" >&5
24627 echo "${ECHO_T}$cf_gnat_libraries" >&6
24628 fi
24629
24630 if test "$cf_gnat_projects" = yes
24631 then
24632         USE_OLD_MAKERULES="#"
24633         USE_GNAT_PROJECTS=""
24634 else
24635         USE_OLD_MAKERULES=""
24636         USE_GNAT_PROJECTS="#"
24637 fi
24638
24639 if test "$cf_gnat_libraries" = yes
24640 then
24641         USE_GNAT_LIBRARIES=""
24642 else
24643         USE_GNAT_LIBRARIES="#"
24644 fi
24645
24646 echo "$as_me:24646: checking for ada-compiler" >&5
24647 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24648
24649 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24650 if test "${with_ada_compiler+set}" = set; then
24651   withval="$with_ada_compiler"
24652   cf_ada_compiler=$withval
24653 else
24654   cf_ada_compiler=gnatmake
24655 fi;
24656
24657 echo "$as_me:24657: result: $cf_ada_compiler" >&5
24658 echo "${ECHO_T}$cf_ada_compiler" >&6
24659
24660                         cf_ada_package=terminal_interface
24661
24662 echo "$as_me:24662: checking for ada-include" >&5
24663 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24664
24665 # Check whether --with-ada-include or --without-ada-include was given.
24666 if test "${with_ada_include+set}" = set; then
24667   withval="$with_ada_include"
24668
24669 else
24670   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24671 fi; if test -n "$prefix/share/ada/adainclude" ; then
24672
24673 if test "x$prefix" != xNONE; then
24674         cf_path_syntax="$prefix"
24675 else
24676         cf_path_syntax="$ac_default_prefix"
24677 fi
24678
24679 case ".$withval" in
24680 (.\$\(*\)*|.\'*\'*)
24681         ;;
24682 (..|./*|.\\*)
24683         ;;
24684 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24685         ;;
24686 (.\${*prefix}*|.\${*dir}*)
24687         eval withval="$withval"
24688         case ".$withval" in
24689         (.NONE/*)
24690                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24691                 ;;
24692         esac
24693         ;;
24694 (.no|.NONE/*)
24695         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24696         ;;
24697 (*)
24698         { { echo "$as_me:24698: error: expected a pathname, not \"$withval\"" >&5
24699 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24700    { (exit 1); exit 1; }; }
24701         ;;
24702 esac
24703
24704 fi
24705 eval ADA_INCLUDE="$withval"
24706
24707 echo "$as_me:24707: result: $ADA_INCLUDE" >&5
24708 echo "${ECHO_T}$ADA_INCLUDE" >&6
24709
24710 echo "$as_me:24710: checking for ada-objects" >&5
24711 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24712
24713 # Check whether --with-ada-objects or --without-ada-objects was given.
24714 if test "${with_ada_objects+set}" = set; then
24715   withval="$with_ada_objects"
24716
24717 else
24718   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24719 fi; if test -n "$prefix/lib/ada/adalib" ; then
24720
24721 if test "x$prefix" != xNONE; then
24722         cf_path_syntax="$prefix"
24723 else
24724         cf_path_syntax="$ac_default_prefix"
24725 fi
24726
24727 case ".$withval" in
24728 (.\$\(*\)*|.\'*\'*)
24729         ;;
24730 (..|./*|.\\*)
24731         ;;
24732 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24733         ;;
24734 (.\${*prefix}*|.\${*dir}*)
24735         eval withval="$withval"
24736         case ".$withval" in
24737         (.NONE/*)
24738                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24739                 ;;
24740         esac
24741         ;;
24742 (.no|.NONE/*)
24743         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24744         ;;
24745 (*)
24746         { { echo "$as_me:24746: error: expected a pathname, not \"$withval\"" >&5
24747 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24748    { (exit 1); exit 1; }; }
24749         ;;
24750 esac
24751
24752 fi
24753 eval ADA_OBJECTS="$withval"
24754
24755 echo "$as_me:24755: result: $ADA_OBJECTS" >&5
24756 echo "${ECHO_T}$ADA_OBJECTS" >&6
24757
24758 echo "$as_me:24758: checking if an Ada95 shared-library should be built" >&5
24759 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24760
24761 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24762 if test "${with_ada_sharedlib+set}" = set; then
24763   withval="$with_ada_sharedlib"
24764   with_ada_sharedlib=$withval
24765 else
24766   with_ada_sharedlib=no
24767 fi;
24768 echo "$as_me:24768: result: $with_ada_sharedlib" >&5
24769 echo "${ECHO_T}$with_ada_sharedlib" >&6
24770
24771 if test "x$with_ada_sharedlib" != xno
24772 then
24773         if test "x$cf_gnat_projects" != xyes
24774         then
24775                 { echo "$as_me:24775: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24776 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24777                 with_ada_sharedlib=no
24778         fi
24779 fi
24780
24781 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24782 MAKE_ADA_SHAREDLIB="#"
24783
24784 if test "x$with_ada_sharedlib" != xno
24785 then
24786         MAKE_ADA_SHAREDLIB=
24787         if test "x$with_ada_sharedlib" != xyes
24788         then
24789                 ADA_SHAREDLIB="$with_ada_sharedlib"
24790         fi
24791 fi
24792
24793                         # allow the Ada binding to be renamed
24794
24795 echo "$as_me:24795: checking for ada-libname" >&5
24796 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24797
24798 # Check whether --with-ada-libname or --without-ada-libname was given.
24799 if test "${with_ada_libname+set}" = set; then
24800   withval="$with_ada_libname"
24801   ADA_LIBNAME=$withval
24802 else
24803   ADA_LIBNAME=AdaCurses
24804 fi;
24805 case "x$ADA_LIBNAME" in
24806 (x|xyes|xno)
24807         ADA_LIBNAME=AdaCurses
24808         ;;
24809 esac
24810
24811 echo "$as_me:24811: result: $ADA_LIBNAME" >&5
24812 echo "${ECHO_T}$ADA_LIBNAME" >&6
24813
24814                 fi
24815         fi
24816 else
24817         cf_with_ada=no
24818 fi
24819
24820 # do this "late" to avoid conflict with header-checks
24821 if test "x$with_widec" = xyes ; then
24822         echo "$as_me:24822: checking for wchar_t" >&5
24823 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24824 if test "${ac_cv_type_wchar_t+set}" = set; then
24825   echo $ECHO_N "(cached) $ECHO_C" >&6
24826 else
24827   cat >conftest.$ac_ext <<_ACEOF
24828 #line 24828 "configure"
24829 #include "confdefs.h"
24830 $ac_includes_default
24831 int
24832 main (void)
24833 {
24834 if ((wchar_t *) 0)
24835   return 0;
24836 if (sizeof (wchar_t))
24837   return 0;
24838   ;
24839   return 0;
24840 }
24841 _ACEOF
24842 rm -f conftest.$ac_objext
24843 if { (eval echo "$as_me:24843: \"$ac_compile\"") >&5
24844   (eval $ac_compile) 2>&5
24845   ac_status=$?
24846   echo "$as_me:24846: \$? = $ac_status" >&5
24847   (exit $ac_status); } &&
24848          { ac_try='test -s conftest.$ac_objext'
24849   { (eval echo "$as_me:24849: \"$ac_try\"") >&5
24850   (eval $ac_try) 2>&5
24851   ac_status=$?
24852   echo "$as_me:24852: \$? = $ac_status" >&5
24853   (exit $ac_status); }; }; then
24854   ac_cv_type_wchar_t=yes
24855 else
24856   echo "$as_me: failed program was:" >&5
24857 cat conftest.$ac_ext >&5
24858 ac_cv_type_wchar_t=no
24859 fi
24860 rm -f conftest.$ac_objext conftest.$ac_ext
24861 fi
24862 echo "$as_me:24862: result: $ac_cv_type_wchar_t" >&5
24863 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24864
24865 echo "$as_me:24865: checking size of wchar_t" >&5
24866 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24867 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24868   echo $ECHO_N "(cached) $ECHO_C" >&6
24869 else
24870   if test "$ac_cv_type_wchar_t" = yes; then
24871   if test "$cross_compiling" = yes; then
24872   # Depending upon the size, compute the lo and hi bounds.
24873 cat >conftest.$ac_ext <<_ACEOF
24874 #line 24874 "configure"
24875 #include "confdefs.h"
24876 $ac_includes_default
24877 int
24878 main (void)
24879 {
24880 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24881   ;
24882   return 0;
24883 }
24884 _ACEOF
24885 rm -f conftest.$ac_objext
24886 if { (eval echo "$as_me:24886: \"$ac_compile\"") >&5
24887   (eval $ac_compile) 2>&5
24888   ac_status=$?
24889   echo "$as_me:24889: \$? = $ac_status" >&5
24890   (exit $ac_status); } &&
24891          { ac_try='test -s conftest.$ac_objext'
24892   { (eval echo "$as_me:24892: \"$ac_try\"") >&5
24893   (eval $ac_try) 2>&5
24894   ac_status=$?
24895   echo "$as_me:24895: \$? = $ac_status" >&5
24896   (exit $ac_status); }; }; then
24897   ac_lo=0 ac_mid=0
24898   while :; do
24899     cat >conftest.$ac_ext <<_ACEOF
24900 #line 24900 "configure"
24901 #include "confdefs.h"
24902 $ac_includes_default
24903 int
24904 main (void)
24905 {
24906 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24907   ;
24908   return 0;
24909 }
24910 _ACEOF
24911 rm -f conftest.$ac_objext
24912 if { (eval echo "$as_me:24912: \"$ac_compile\"") >&5
24913   (eval $ac_compile) 2>&5
24914   ac_status=$?
24915   echo "$as_me:24915: \$? = $ac_status" >&5
24916   (exit $ac_status); } &&
24917          { ac_try='test -s conftest.$ac_objext'
24918   { (eval echo "$as_me:24918: \"$ac_try\"") >&5
24919   (eval $ac_try) 2>&5
24920   ac_status=$?
24921   echo "$as_me:24921: \$? = $ac_status" >&5
24922   (exit $ac_status); }; }; then
24923   ac_hi=$ac_mid; break
24924 else
24925   echo "$as_me: failed program was:" >&5
24926 cat conftest.$ac_ext >&5
24927 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24928 fi
24929 rm -f conftest.$ac_objext conftest.$ac_ext
24930   done
24931 else
24932   echo "$as_me: failed program was:" >&5
24933 cat conftest.$ac_ext >&5
24934 ac_hi=-1 ac_mid=-1
24935   while :; do
24936     cat >conftest.$ac_ext <<_ACEOF
24937 #line 24937 "configure"
24938 #include "confdefs.h"
24939 $ac_includes_default
24940 int
24941 main (void)
24942 {
24943 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24944   ;
24945   return 0;
24946 }
24947 _ACEOF
24948 rm -f conftest.$ac_objext
24949 if { (eval echo "$as_me:24949: \"$ac_compile\"") >&5
24950   (eval $ac_compile) 2>&5
24951   ac_status=$?
24952   echo "$as_me:24952: \$? = $ac_status" >&5
24953   (exit $ac_status); } &&
24954          { ac_try='test -s conftest.$ac_objext'
24955   { (eval echo "$as_me:24955: \"$ac_try\"") >&5
24956   (eval $ac_try) 2>&5
24957   ac_status=$?
24958   echo "$as_me:24958: \$? = $ac_status" >&5
24959   (exit $ac_status); }; }; then
24960   ac_lo=$ac_mid; break
24961 else
24962   echo "$as_me: failed program was:" >&5
24963 cat conftest.$ac_ext >&5
24964 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24965 fi
24966 rm -f conftest.$ac_objext conftest.$ac_ext
24967   done
24968 fi
24969 rm -f conftest.$ac_objext conftest.$ac_ext
24970 # Binary search between lo and hi bounds.
24971 while test "x$ac_lo" != "x$ac_hi"; do
24972   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24973   cat >conftest.$ac_ext <<_ACEOF
24974 #line 24974 "configure"
24975 #include "confdefs.h"
24976 $ac_includes_default
24977 int
24978 main (void)
24979 {
24980 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24981   ;
24982   return 0;
24983 }
24984 _ACEOF
24985 rm -f conftest.$ac_objext
24986 if { (eval echo "$as_me:24986: \"$ac_compile\"") >&5
24987   (eval $ac_compile) 2>&5
24988   ac_status=$?
24989   echo "$as_me:24989: \$? = $ac_status" >&5
24990   (exit $ac_status); } &&
24991          { ac_try='test -s conftest.$ac_objext'
24992   { (eval echo "$as_me:24992: \"$ac_try\"") >&5
24993   (eval $ac_try) 2>&5
24994   ac_status=$?
24995   echo "$as_me:24995: \$? = $ac_status" >&5
24996   (exit $ac_status); }; }; then
24997   ac_hi=$ac_mid
24998 else
24999   echo "$as_me: failed program was:" >&5
25000 cat conftest.$ac_ext >&5
25001 ac_lo=`expr $ac_mid + 1`
25002 fi
25003 rm -f conftest.$ac_objext conftest.$ac_ext
25004 done
25005 ac_cv_sizeof_wchar_t=$ac_lo
25006 else
25007   if test "$cross_compiling" = yes; then
25008   { { echo "$as_me:25008: error: cannot run test program while cross compiling" >&5
25009 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25010    { (exit 1); exit 1; }; }
25011 else
25012   cat >conftest.$ac_ext <<_ACEOF
25013 #line 25013 "configure"
25014 #include "confdefs.h"
25015 $ac_includes_default
25016 int
25017 main (void)
25018 {
25019 FILE *f = fopen ("conftest.val", "w");
25020 if (!f)
25021   $ac_main_return (1);
25022 fprintf (f, "%d", (sizeof (wchar_t)));
25023 fclose (f);
25024   ;
25025   return 0;
25026 }
25027 _ACEOF
25028 rm -f conftest$ac_exeext
25029 if { (eval echo "$as_me:25029: \"$ac_link\"") >&5
25030   (eval $ac_link) 2>&5
25031   ac_status=$?
25032   echo "$as_me:25032: \$? = $ac_status" >&5
25033   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25034   { (eval echo "$as_me:25034: \"$ac_try\"") >&5
25035   (eval $ac_try) 2>&5
25036   ac_status=$?
25037   echo "$as_me:25037: \$? = $ac_status" >&5
25038   (exit $ac_status); }; }; then
25039   ac_cv_sizeof_wchar_t=`cat conftest.val`
25040 else
25041   echo "$as_me: program exited with status $ac_status" >&5
25042 echo "$as_me: failed program was:" >&5
25043 cat conftest.$ac_ext >&5
25044 fi
25045 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25046 fi
25047 fi
25048 rm -f conftest.val
25049 else
25050   ac_cv_sizeof_wchar_t=0
25051 fi
25052 fi
25053 echo "$as_me:25053: result: $ac_cv_sizeof_wchar_t" >&5
25054 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25055 cat >>confdefs.h <<EOF
25056 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25057 EOF
25058
25059 fi
25060
25061 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25062 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25063 ###
25064 ### ticlib modules may be a separate library, otherwise contained in termlib.
25065 ### termlib modules may be a separate library, otherwise contained in ncurses.
25066 ###
25067 ### The of "+" or " " between the tokens controls the way the script
25068 ### chooses to split module lists into libraries.
25069 ###
25070 ### (see CF_LIB_RULES).
25071 echo "$as_me:25071: checking for library subsets" >&5
25072 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25073 LIB_SUBSETS=
25074
25075 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25076         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25077         if test "$with_ticlib" != no ; then
25078                 LIB_SUBSETS="${LIB_SUBSETS} "
25079         else
25080                 LIB_SUBSETS="${LIB_SUBSETS}+"
25081         fi
25082 fi
25083
25084 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25085 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25086
25087 if test "$with_termlib" != no ; then
25088         LIB_SUBSETS="${LIB_SUBSETS} "
25089 else
25090         LIB_SUBSETS="${LIB_SUBSETS}+"
25091 fi
25092
25093 LIB_SUBSETS="${LIB_SUBSETS}base"
25094
25095 # Most term-driver calls are to tinfo, but some like init_pair are to the
25096 # base library (so it resides in base).
25097 if test "$with_term_driver" != no ; then
25098         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25099         case $cf_cv_system_name in
25100         (*mingw32*|*mingw64*)
25101                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25102                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25103                 ;;
25104         (*)
25105                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25106                 ;;
25107         esac
25108 fi
25109
25110 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25111 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25112
25113 echo "$as_me:25113: result: $LIB_SUBSETS" >&5
25114 echo "${ECHO_T}$LIB_SUBSETS" >&6
25115
25116 ### Construct the list of include-directories to be generated
25117
25118 if test "$srcdir" != "."; then
25119         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25120 fi
25121 CPPFLAGS="-I../include $CPPFLAGS"
25122 if test "$srcdir" != "."; then
25123         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25124 fi
25125 CPPFLAGS="-I. $CPPFLAGS"
25126
25127 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25128 if test "$srcdir" != "."; then
25129         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25130 fi
25131 if test "$GCC" != yes; then
25132         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25133 elif test "$includedir" != "/usr/include"; then
25134         if test "$includedir" = '${prefix}/include' ; then
25135                 if test x$prefix != x/usr ; then
25136                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25137                 fi
25138         else
25139                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25140         fi
25141 fi
25142
25143 ### Build up pieces for makefile rules
25144 echo "$as_me:25144: checking default library suffix" >&5
25145 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25146
25147         case $DFT_LWR_MODEL in
25148         (libtool) DFT_ARG_SUFFIX=''   ;;
25149         (normal)  DFT_ARG_SUFFIX=''   ;;
25150         (debug)   DFT_ARG_SUFFIX='_g' ;;
25151         (profile) DFT_ARG_SUFFIX='_p' ;;
25152         (shared)  DFT_ARG_SUFFIX=''   ;;
25153         esac
25154         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25155 echo "$as_me:25155: result: $DFT_ARG_SUFFIX" >&5
25156 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25157
25158 echo "$as_me:25158: checking default library-dependency suffix" >&5
25159 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25160
25161         case X$DFT_LWR_MODEL in
25162         (Xlibtool)
25163                 DFT_LIB_SUFFIX='.la'
25164                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25165                 ;;
25166         (Xdebug)
25167                 DFT_LIB_SUFFIX='_g.a'
25168                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25169                 ;;
25170         (Xprofile)
25171                 DFT_LIB_SUFFIX='_p.a'
25172                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25173                 ;;
25174         (Xshared)
25175                 case $cf_cv_system_name in
25176                 (aix[5-7]*)
25177                         DFT_LIB_SUFFIX='.so'
25178                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25179                         ;;
25180                 (cygwin*|msys*|mingw*)
25181                         DFT_LIB_SUFFIX='.dll'
25182                         DFT_DEP_SUFFIX='.dll.a'
25183                         ;;
25184                 (darwin*)
25185                         DFT_LIB_SUFFIX='.dylib'
25186                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25187                         ;;
25188                 (hpux*)
25189                         case $target in
25190                         (ia64*)
25191                                 DFT_LIB_SUFFIX='.so'
25192                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25193                                 ;;
25194                         (*)
25195                                 DFT_LIB_SUFFIX='.sl'
25196                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25197                                 ;;
25198                         esac
25199                         ;;
25200                 (*)
25201                         DFT_LIB_SUFFIX='.so'
25202                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25203                         ;;
25204                 esac
25205                 ;;
25206         (*)
25207                 DFT_LIB_SUFFIX='.a'
25208                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25209                 ;;
25210         esac
25211         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25212         then
25213                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25214                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25215         fi
25216 echo "$as_me:25216: result: $DFT_DEP_SUFFIX" >&5
25217 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25218
25219 echo "$as_me:25219: checking default object directory" >&5
25220 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25221
25222         case $DFT_LWR_MODEL in
25223         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25224         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25225         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25226         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25227         (shared)
25228                 case $cf_cv_system_name in
25229                 (cygwin|msys)
25230                         DFT_OBJ_SUBDIR='objects' ;;
25231                 (*)
25232                         DFT_OBJ_SUBDIR='obj_s' ;;
25233                 esac
25234         esac
25235 echo "$as_me:25235: result: $DFT_OBJ_SUBDIR" >&5
25236 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25237
25238 if test "x$cf_with_cxx" = xyes ; then
25239 echo "$as_me:25239: checking c++ library-dependency suffix" >&5
25240 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25241 if test "$with_libtool" != "no"; then
25242         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25243         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25244 elif test "$with_shared_cxx" != "no"; then
25245         # also for g++ users...
25246         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25247 else
25248         # we normally make a static library because C/C++ library rules differ
25249
25250         case Xnormal in
25251         (Xlibtool)
25252                 CXX_LIB_SUFFIX='.la'
25253                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25254                 ;;
25255         (Xdebug)
25256                 CXX_LIB_SUFFIX='_g.a'
25257                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25258                 ;;
25259         (Xprofile)
25260                 CXX_LIB_SUFFIX='_p.a'
25261                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25262                 ;;
25263         (Xshared)
25264                 case $cf_cv_system_name in
25265                 (aix[5-7]*)
25266                         CXX_LIB_SUFFIX='.so'
25267                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25268                         ;;
25269                 (cygwin*|msys*|mingw*)
25270                         CXX_LIB_SUFFIX='.dll'
25271                         CXX_DEP_SUFFIX='.dll.a'
25272                         ;;
25273                 (darwin*)
25274                         CXX_LIB_SUFFIX='.dylib'
25275                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25276                         ;;
25277                 (hpux*)
25278                         case $target in
25279                         (ia64*)
25280                                 CXX_LIB_SUFFIX='.so'
25281                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25282                                 ;;
25283                         (*)
25284                                 CXX_LIB_SUFFIX='.sl'
25285                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25286                                 ;;
25287                         esac
25288                         ;;
25289                 (*)
25290                         CXX_LIB_SUFFIX='.so'
25291                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25292                         ;;
25293                 esac
25294                 ;;
25295         (*)
25296                 CXX_LIB_SUFFIX='.a'
25297                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25298                 ;;
25299         esac
25300         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25301         then
25302                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25303                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25304         fi
25305
25306 fi
25307 echo "$as_me:25307: result: $CXX_LIB_SUFFIX" >&5
25308 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25309
25310 fi
25311
25312 # do not want -ldl in build except as needed for -lncurses dependency
25313 if test "x$with_dlsym" = xyes ; then
25314 if test $DFT_LWR_MODEL = shared || \
25315    test $DFT_LWR_MODEL = libtool ; then
25316
25317 # remove dl library from $LIBS
25318 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25319
25320 fi
25321 fi
25322 ### Set up low-level terminfo dependencies for makefiles.
25323
25324 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25325 # do not need libdl
25326 TICS_LIST=
25327 if test "x$with_dlsym" = xyes ; then
25328
25329 # remove dl library from $SHLIB_LIST
25330 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25331
25332 fi
25333
25334 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25335 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25336 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25337 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25338 then
25339         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25340 fi
25341
25342 if test "$with_ticlib" != no ; then
25343
25344         if test "x$with_ticlib" != xyes ; then
25345                 TICS_NAME=$with_ticlib
25346                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25347                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25348                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25349                 TICS_LIB_SUFFIX="${with_ticlib}"
25350         else
25351                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25352                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25353                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25354                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25355         fi
25356         TICS_LDFLAGS="-L${LIB_DIR}"
25357         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25358 else
25359         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25360         TICS_LDFLAGS="-L${LIB_DIR}"
25361         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25362 fi
25363
25364 if test "$with_termlib" != no ; then
25365
25366         if test "x$with_termlib" != xyes ; then
25367                 TINFO_NAME=$with_termlib
25368                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25369                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25370                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25371                 TINFO_LIB_SUFFIX="${with_termlib}"
25372         else
25373                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25374                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25375                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25376                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25377         fi
25378
25379         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25380         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25381         if test "$DFT_LWR_MODEL" = "libtool"; then
25382                 TEST_ARGS="${TEST_DEPS}"
25383                 TEST_ARG2="${TEST_DEP2}"
25384                 TINFO_LDFLAGS="-L${LIB_DIR}"
25385                 TINFO_LIBS="$TEST_ARGS"
25386                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25387                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25388         else
25389                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25390                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25391                 if test "x$with_term_driver" != xno ; then
25392                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25393                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25394                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25395                 else
25396                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25397                         TINFO_LIBS="$TEST_ARGS"
25398                 fi
25399                 TINFO_LDFLAGS="-L${LIB_DIR}"
25400                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25401         fi
25402 else
25403         # the next lines are needed for linking libtic over libncurses
25404         TINFO_NAME=${LIB_NAME}
25405         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25406         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25407         if test "x$with_tic_depends" = xyes ; then
25408                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25409         else
25410                 TICS_LIST="$SHLIB_LIST"
25411         fi
25412
25413         TINFO_LDFLAGS="-L${LIB_DIR}"
25414         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25415 fi
25416
25417 if test "$DFT_LWR_MODEL" = shared ; then
25418         case $cf_cv_system_name in
25419         (cygwin*|msys*)
25420                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25421                 TINFO_SUFFIX=.dll
25422                 ;;
25423         esac
25424 fi
25425
25426 if test "x$with_dlsym" = xyes ; then
25427
25428 # remove dl library from $TICS_LIST
25429 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25430
25431 fi
25432
25433 if test "$DFT_LWR_MODEL" = "libtool"; then
25434         OBJEXT=lo
25435 fi
25436
25437 # needed for Ada95
25438 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25439
25440 case $DFT_LWR_MODEL in
25441 (normal|debug|profile)
25442
25443 if test "$GCC" = yes ; then
25444         case $cf_cv_system_name in
25445         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25446                 LDFLAGS_STATIC=
25447                 LDFLAGS_SHARED=
25448                 ;;
25449         (*)     # normally, except when broken
25450                 LDFLAGS_STATIC=-static
25451                 LDFLAGS_SHARED=-dynamic
25452                 ;;
25453         esac
25454 else
25455         case $cf_cv_system_name in
25456         (aix[4-7]*)     # from ld manpage
25457                 LDFLAGS_STATIC=-bstatic
25458                 LDFLAGS_SHARED=-bdynamic
25459                 ;;
25460         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25461                 # We could also use just "archive" and "shared".
25462                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25463                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25464                 ;;
25465         (irix*)         # from ld manpage IRIX64
25466                 LDFLAGS_STATIC=-Bstatic
25467                 LDFLAGS_SHARED=-Bdynamic
25468                 ;;
25469         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25470                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25471                 LDFLAGS_STATIC=-noso
25472                 LDFLAGS_SHARED=-so_archive
25473                 ;;
25474         (solaris2*)
25475                 LDFLAGS_STATIC=-Bstatic
25476                 LDFLAGS_SHARED=-Bdynamic
25477                 ;;
25478         esac
25479 fi
25480
25481 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25482 then
25483         echo "$as_me:25483: checking if linker supports switching between static/dynamic" >&5
25484 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25485
25486         rm -f libconftest.a
25487         cat >conftest.$ac_ext <<EOF
25488 #line 25488 "configure"
25489 #include <stdio.h>
25490 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25491 EOF
25492         if { (eval echo "$as_me:25492: \"$ac_compile\"") >&5
25493   (eval $ac_compile) 2>&5
25494   ac_status=$?
25495   echo "$as_me:25495: \$? = $ac_status" >&5
25496   (exit $ac_status); } ; then
25497                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25498                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25499         fi
25500         rm -f conftest.*
25501
25502         cf_save_LIBS="$LIBS"
25503
25504         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25505         cat >conftest.$ac_ext <<_ACEOF
25506 #line 25506 "configure"
25507 #include "confdefs.h"
25508
25509 #line 25509 "configure"
25510 #include <stdio.h>
25511 int cf_ldflags_static(FILE *fp);
25512
25513 int
25514 main (void)
25515 {
25516
25517         return cf_ldflags_static(stdin);
25518
25519   ;
25520   return 0;
25521 }
25522 _ACEOF
25523 rm -f conftest.$ac_objext conftest$ac_exeext
25524 if { (eval echo "$as_me:25524: \"$ac_link\"") >&5
25525   (eval $ac_link) 2>&5
25526   ac_status=$?
25527   echo "$as_me:25527: \$? = $ac_status" >&5
25528   (exit $ac_status); } &&
25529          { ac_try='test -s conftest$ac_exeext'
25530   { (eval echo "$as_me:25530: \"$ac_try\"") >&5
25531   (eval $ac_try) 2>&5
25532   ac_status=$?
25533   echo "$as_me:25533: \$? = $ac_status" >&5
25534   (exit $ac_status); }; }; then
25535
25536         # some linkers simply ignore the -dynamic
25537         case x`file conftest$ac_exeext 2>/dev/null` in
25538         (*static*)
25539                 cf_ldflags_static=no
25540                 ;;
25541         (*)
25542                 cf_ldflags_static=yes
25543                 ;;
25544         esac
25545
25546 else
25547   echo "$as_me: failed program was:" >&5
25548 cat conftest.$ac_ext >&5
25549 cf_ldflags_static=no
25550 fi
25551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25552
25553         rm -f libconftest.*
25554         LIBS="$cf_save_LIBS"
25555
25556         echo "$as_me:25556: result: $cf_ldflags_static" >&5
25557 echo "${ECHO_T}$cf_ldflags_static" >&6
25558
25559         if test $cf_ldflags_static != yes
25560         then
25561                 LDFLAGS_STATIC=
25562                 LDFLAGS_SHARED=
25563         fi
25564 else
25565         LDFLAGS_STATIC=
25566         LDFLAGS_SHARED=
25567 fi
25568
25569         ;;
25570 esac
25571
25572 echo "$as_me:25572: checking where we will install curses.h" >&5
25573 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25574
25575 includesubdir=
25576 if test "$with_overwrite" = no && \
25577  ( test "x$includedir" = 'x${prefix}/include' || \
25578    test "x$includedir" = "x${prefix}/include" )
25579 then
25580         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25581 fi
25582 echo "$as_me:25582: result: ${includedir}${includesubdir}" >&5
25583 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25584
25585 ### Resolve a conflict between normal and wide-curses by forcing applications
25586 ### that will need libutf8 to add it to their configure script.
25587 if test "$with_overwrite" != no ; then
25588 if test "$NCURSES_LIBUTF8" = 1 ; then
25589         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25590         { echo "$as_me:25590: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25591 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25592 fi
25593 fi
25594 WITH_OVERWRITE=$with_overwrite
25595
25596 # used to separate tack out of the tree
25597 NCURSES_TREE=
25598
25599 ### predefined stuff for the test programs
25600
25601 cat >>confdefs.h <<\EOF
25602 #define HAVE_SLK_COLOR 1
25603 EOF
25604
25605 ### Construct the list of subdirectories for which we'll customize makefiles
25606 ### with the appropriate compile-rules.
25607
25608 echo "$as_me:25608: checking for src modules" >&5
25609 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25610
25611 # dependencies and linker-arguments for test-programs
25612 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25613 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25614 if test "$DFT_LWR_MODEL" = "libtool"; then
25615         TEST_ARGS="${TEST_DEPS}"
25616         TEST_ARG2="${TEST_DEP2}"
25617 else
25618         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25619         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25620 fi
25621
25622 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25623 cf_cv_src_modules=
25624 for cf_dir in $modules_to_build
25625 do
25626         if test -f $srcdir/$cf_dir/modules; then
25627
25628                 # We may/may not have tack in the distribution, though the
25629                 # makefile is.
25630                 if test $cf_dir = tack ; then
25631                         if test "x$cf_with_tack" != "xyes"; then
25632                                 continue
25633                         fi
25634                 fi
25635
25636                 if test -z "$cf_cv_src_modules"; then
25637                         cf_cv_src_modules=$cf_dir
25638                 else
25639                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25640                 fi
25641
25642                 # Make the ncurses_cfg.h file record the library interface files as
25643                 # well.  These are header files that are the same name as their
25644                 # directory.  Ncurses is the only library that does not follow
25645                 # that pattern.
25646                 if test $cf_dir = tack ; then
25647                         continue
25648                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25649
25650 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25651
25652                         cat >>confdefs.h <<EOF
25653 #define HAVE_${cf_have_include}_H 1
25654 EOF
25655
25656                         cat >>confdefs.h <<EOF
25657 #define HAVE_LIB${cf_have_include} 1
25658 EOF
25659
25660                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25661                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25662                         if test "$DFT_LWR_MODEL" = "libtool"; then
25663                                 TEST_ARGS="${TEST_DEPS}"
25664                                 TEST_ARG2="${TEST_DEP2}"
25665                         else
25666                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25667                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25668                         fi
25669                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25670                 fi
25671         fi
25672 done
25673 echo "$as_me:25673: result: $cf_cv_src_modules" >&5
25674 echo "${ECHO_T}$cf_cv_src_modules" >&6
25675
25676 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25677 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25678
25679 SRC_SUBDIRS=
25680 if test "x$cf_with_manpages" != xno ; then
25681         SRC_SUBDIRS="$SRC_SUBDIRS man"
25682 fi
25683 SRC_SUBDIRS="$SRC_SUBDIRS include"
25684 for cf_dir in $cf_cv_src_modules
25685 do
25686         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25687 done
25688 if test "x$cf_with_tests" != "xno" ; then
25689         SRC_SUBDIRS="$SRC_SUBDIRS test"
25690 fi
25691 # always make this, to install the ncurses-config script
25692 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25693 if test "$cf_with_cxx_binding" != no; then
25694         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25695         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25696 fi
25697
25698 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25699 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25700
25701 ADA_SUBDIRS=
25702 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25703         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25704         ADA_SUBDIRS="gen src"
25705         if test "x$cf_with_tests" != "xno" ; then
25706                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25707         fi
25708 fi
25709
25710 SUB_MAKEFILES=
25711 for cf_dir in $SRC_SUBDIRS
25712 do
25713         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25714 done
25715
25716 if test -n "$ADA_SUBDIRS"; then
25717         for cf_dir in $ADA_SUBDIRS
25718         do
25719                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25720         done
25721
25722 fi
25723
25724 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25725    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25726    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25727    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25728 fi
25729
25730 DIRS_TO_MAKE="lib"
25731 for cf_item in $cf_list_models
25732 do
25733
25734         case $cf_item in
25735         (libtool) cf_subdir='obj_lo'  ;;
25736         (normal)  cf_subdir='objects' ;;
25737         (debug)   cf_subdir='obj_g' ;;
25738         (profile) cf_subdir='obj_p' ;;
25739         (shared)
25740                 case $cf_cv_system_name in
25741                 (cygwin|msys)
25742                         cf_subdir='objects' ;;
25743                 (*)
25744                         cf_subdir='obj_s' ;;
25745                 esac
25746         esac
25747
25748         for cf_item2 in $DIRS_TO_MAKE
25749         do
25750                 test $cf_item2 = $cf_subdir && break
25751         done
25752         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25753 done
25754 for cf_dir in $DIRS_TO_MAKE
25755 do
25756         test ! -d $cf_dir && mkdir $cf_dir
25757 done
25758
25759 # symbols that differ when compiling Ada95 by itself.
25760 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25761
25762 # values to use as strings
25763
25764 cat >>confdefs.h <<EOF
25765 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25766 EOF
25767
25768 cat >>confdefs.h <<EOF
25769 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25770 EOF
25771
25772 ### Now that we're done running tests, add the compiler-warnings, if any
25773
25774 cf_fix_cppflags=no
25775 cf_new_cflags=
25776 cf_new_cppflags=
25777 cf_new_extra_cppflags=
25778
25779 for cf_add_cflags in $EXTRA_CFLAGS
25780 do
25781 case $cf_fix_cppflags in
25782 (no)
25783         case $cf_add_cflags in
25784         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25785                 case $cf_add_cflags in
25786                 (-D*)
25787                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25788
25789                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25790                                 && test -z "${cf_tst_cflags}" \
25791                                 && cf_fix_cppflags=yes
25792
25793                         if test $cf_fix_cppflags = yes ; then
25794
25795         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25796         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25797
25798                                 continue
25799                         elif test "${cf_tst_cflags}" = "\"'" ; then
25800
25801         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25802         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25803
25804                                 continue
25805                         fi
25806                         ;;
25807                 esac
25808                 case "$CPPFLAGS" in
25809                 (*$cf_add_cflags)
25810                         ;;
25811                 (*)
25812                         case $cf_add_cflags in
25813                         (-D*)
25814                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25815
25816 CPPFLAGS=`echo "$CPPFLAGS" | \
25817         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25818                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25819
25820                                 ;;
25821                         esac
25822
25823         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25824         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25825
25826                         ;;
25827                 esac
25828                 ;;
25829         (*)
25830
25831         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25832         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25833
25834                 ;;
25835         esac
25836         ;;
25837 (yes)
25838
25839         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25840         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25841
25842         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25843
25844         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25845                 && test -z "${cf_tst_cflags}" \
25846                 && cf_fix_cppflags=no
25847         ;;
25848 esac
25849 done
25850
25851 if test -n "$cf_new_cflags" ; then
25852
25853         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25854         CFLAGS="${CFLAGS}$cf_new_cflags"
25855
25856 fi
25857
25858 if test -n "$cf_new_cppflags" ; then
25859
25860         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25861         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25862
25863 fi
25864
25865 if test -n "$cf_new_extra_cppflags" ; then
25866
25867         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25868         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25869
25870 fi
25871
25872 ### Define substitutions for header files to avoid name-pollution
25873
25874 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25875         HAVE_TCGETATTR=1
25876 else
25877         HAVE_TCGETATTR=0
25878 fi
25879
25880 if test "x$ac_cv_header_stdint_h" = xyes ; then
25881         HAVE_STDINT_H=1
25882 else
25883         HAVE_STDINT_H=0
25884 fi
25885
25886 if test "x$ac_cv_header_termio_h" = xyes ; then
25887         HAVE_TERMIO_H=1
25888 else
25889         HAVE_TERMIO_H=0
25890 fi
25891
25892 if test "x$ac_cv_header_termios_h" = xyes ; then
25893         HAVE_TERMIOS_H=1
25894 else
25895         HAVE_TERMIOS_H=0
25896 fi
25897
25898 ################################################################################
25899 test "x$use_database" = xyes && \
25900 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25901
25902 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25903 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25904
25905 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25906 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25907 fi
25908
25909 if test "x$cf_with_tests" != xno ; then
25910         MAKE_TESTS=
25911 else
25912         MAKE_TESTS="#"
25913 fi
25914
25915 ADAHTML_DIR=../../doc/html/ada
25916
25917 # these could be configurable, but are not currently
25918 PANEL_NAME=panel
25919 MENU_NAME=menu
25920 FORM_NAME=form
25921 CXX_NAME=ncurses++
25922
25923 # workaround for OS/2 (20151017)
25924 case $cf_cv_system_name in
25925 (os2*)
25926         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25927         ;;
25928 (*)
25929         LIBTOOL_OPTS_CXX=
25930         ;;
25931 esac
25932
25933 # workaround for g++ versus Solaris (20131116)
25934 case $cf_cv_system_name in
25935 (solaris2*)
25936         case "x$CPPFLAGS" in
25937         (*-D_XOPEN_SOURCE_EXTENDED*)
25938                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25939
25940 echo "${as_me:-configure}:25940: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25941
25942                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25943                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25944                 ;;
25945         esac
25946         ;;
25947 esac
25948
25949 # Help to automatically enable the extended curses features when using either
25950 # the *-config or the ".pc" files by adding defines.
25951 echo "$as_me:25951: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25952 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25953 PKG_CFLAGS=
25954 for cf_loop1 in $CPPFLAGS_after_XOPEN
25955 do
25956         cf_found=no
25957         for cf_loop2 in $CPPFLAGS_before_XOPEN
25958         do
25959                 if test "x$cf_loop1" = "x$cf_loop2"
25960                 then
25961                         cf_found=yes
25962                         break
25963                 fi
25964         done
25965         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25966 done
25967 echo "$as_me:25967: result: $PKG_CFLAGS" >&5
25968 echo "${ECHO_T}$PKG_CFLAGS" >&6
25969
25970 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25971 case "x$NCURSES_OSPEED" in
25972 (*short*)
25973         cf_compatible=1
25974         ;;
25975 (*)
25976         cf_compatible=0
25977         ;;
25978 esac
25979
25980 cat >>confdefs.h <<EOF
25981 #define NCURSES_OSPEED_COMPAT $cf_compatible
25982 EOF
25983
25984 case "x$cf_cv_typeof_chtype" in
25985 (xshort|xint|xlong)
25986         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25987         ;;
25988 esac
25989
25990 case "x$cf_cv_typeof_mmask_t" in
25991 (xshort|xint|xlong)
25992         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25993         ;;
25994 esac
25995
25996 # substitute into misc/Makefile to suppress
25997 # (un)install.data from the
25998 # (un)install rules.
25999 if test "x$cf_with_db_install" = "xno"; then
26000         MISC_INSTALL_DATA=
26001         MISC_UNINSTALL_DATA=
26002 else
26003         MISC_INSTALL_DATA=install.data
26004         MISC_UNINSTALL_DATA=uninstall.data
26005 fi
26006
26007 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26008         MAKE_DATABASE="#"
26009 else
26010         MAKE_DATABASE="$MAKE_TERMINFO"
26011 fi
26012
26013 if test -n "$PACKAGE"
26014 then
26015         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26016         export PACKAGE
26017         echo "package: $PACKAGE"
26018 fi
26019
26020 UNALTERED_SYMS=
26021 cf_filter_syms=no
26022
26023 if test -n "$RESULTING_SYMS"
26024 then
26025         cf_filter_syms=$cf_dft_filter_syms
26026         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26027
26028 echo "${as_me:-configure}:26028: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26029
26030 fi
26031
26032 if test "x$WILDCARD_SYMS" = xno
26033 then
26034         cf_filter_syms=yes
26035 fi
26036
26037 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26038
26039 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26040 if test $cf_filter_syms = yes
26041 then
26042         RESULTING_SYMS=resulting.map
26043 fi
26044
26045 if test "x$cross_compiling" = xyes ; then
26046         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26047         CHECK_BUILD="#"
26048 else
26049         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26050         CHECK_BUILD=
26051 fi
26052
26053 # This is used for the *-config script and *.pc data files.
26054
26055 echo "$as_me:26055: checking for linker search path" >&5
26056 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26057 if test "${cf_cv_ld_searchpath+set}" = set; then
26058   echo $ECHO_N "(cached) $ECHO_C" >&6
26059 else
26060
26061 if test "$cross_compiling" != yes ; then
26062
26063 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26064 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26065
26066 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26067 # update the cache, which makes it run faster.
26068 test -z "$cf_pathlist" && \
26069         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26070
26071 test -z "$cf_pathlist" &&
26072         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26073
26074 # This works with OpenBSD 6.5, which lists only filenames
26075 test -z "$cf_pathlist" &&
26076         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26077
26078 if test -z "$cf_pathlist"
26079 then
26080         # dyld default path with MacOS
26081         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26082         then
26083                 # do this to bypass check
26084                 cf_cv_ld_searchpath='$HOME/lib'
26085                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26086         fi
26087 fi
26088
26089 if test -z "$cf_pathlist"
26090 then
26091         # Solaris is hardcoded
26092         if test -d /opt/SUNWspro/lib
26093         then
26094                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26095         elif test -d /usr/ccs/lib
26096         then
26097                 cf_pathlist="/usr/ccs/lib /usr/lib"
26098         fi
26099 fi
26100
26101 fi
26102
26103 # If nothing else, assume it is conventional
26104 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26105
26106 # Finally, check that this is only directories
26107 for cf_path in $0 $cf_pathlist
26108 do
26109         if test -d "$cf_path"; then
26110                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26111                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26112         fi
26113 done
26114
26115 # Ensure that it is nonempty
26116 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26117
26118 fi
26119 echo "$as_me:26119: result: $cf_cv_ld_searchpath" >&5
26120 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26121
26122 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26123
26124 cat >>confdefs.h <<\EOF
26125 #define HAVE_CURSES_DATA_BOOLNAMES 1
26126 EOF
26127
26128 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"
26129 ac_config_commands="$ac_config_commands default"
26130 cat >confcache <<\_ACEOF
26131 # This file is a shell script that caches the results of configure
26132 # tests run on this system so they can be shared between configure
26133 # scripts and configure runs, see configure's option --config-cache.
26134 # It is not useful on other systems.  If it contains results you don't
26135 # want to keep, you may remove or edit it.
26136 #
26137 # config.status only pays attention to the cache file if you give it
26138 # the --recheck option to rerun configure.
26139 #
26140 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26141 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26142 # following values.
26143
26144 _ACEOF
26145
26146 # The following way of writing the cache mishandles newlines in values,
26147 # but we know of no workaround that is simple, portable, and efficient.
26148 # So, don't put newlines in cache variables' values.
26149 # Ultrix sh set writes to stderr and can't be redirected directly,
26150 # and sets the high bit in the cache file unless we assign to the vars.
26151 {
26152   (set) 2>&1 |
26153     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26154     *ac_space=\ *)
26155       # `set' does not quote correctly, so add quotes (double-quote
26156       # substitution turns \\\\ into \\, and sed turns \\ into \).
26157       sed -n \
26158         "s/'/'\\\\''/g;
26159           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26160       ;;
26161     *)
26162       # `set' quotes correctly as required by POSIX, so do not add quotes.
26163       sed -n \
26164         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26165       ;;
26166     esac;
26167 } |
26168   sed '
26169      t clear
26170      : clear
26171      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26172      t end
26173      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26174      : end' >>confcache
26175 if cmp -s $cache_file confcache; then :; else
26176   if test -w $cache_file; then
26177     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26178     cat confcache >$cache_file
26179   else
26180     echo "not updating unwritable cache $cache_file"
26181   fi
26182 fi
26183 rm -f confcache
26184
26185 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26186 # Let make expand exec_prefix.
26187 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26188
26189 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26190 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26191 # trailing colons and then remove the whole line if VPATH becomes empty
26192 # (actually we leave an empty line to preserve line numbers).
26193 if test "x$srcdir" = x.; then
26194   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26195 s/:*\$(srcdir):*/:/;
26196 s/:*\${srcdir}:*/:/;
26197 s/:*@srcdir@:*/:/;
26198 s/^\([^=]*=[    ]*\):*/\1/;
26199 s/:*$//;
26200 s/^[^=]*=[      ]*$//;
26201 }'
26202 fi
26203
26204 DEFS=-DHAVE_CONFIG_H
26205
26206 : ${CONFIG_STATUS=./config.status}
26207 ac_clean_files_save=$ac_clean_files
26208 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26209 { echo "$as_me:26209: creating $CONFIG_STATUS" >&5
26210 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26211 cat >$CONFIG_STATUS <<_ACEOF
26212 #! $SHELL
26213 # Generated automatically by configure.
26214 # Run this file to recreate the current configuration.
26215 # Compiler output produced by configure, useful for debugging
26216 # configure, is in config.log if it exists.
26217
26218 debug=false
26219 SHELL=\${CONFIG_SHELL-$SHELL}
26220 ac_cs_invocation="\$0 \$@"
26221
26222 _ACEOF
26223
26224 cat >>$CONFIG_STATUS <<\_ACEOF
26225 # Be Bourne compatible
26226 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26227   emulate sh
26228   NULLCMD=:
26229 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26230   set -o posix
26231 fi
26232
26233 # Name of the executable.
26234 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26235
26236 if expr a : '\(a\)' >/dev/null 2>&1; then
26237   as_expr=expr
26238 else
26239   as_expr=false
26240 fi
26241
26242 rm -f conf$$ conf$$.exe conf$$.file
26243 echo >conf$$.file
26244 if ln -s conf$$.file conf$$ 2>/dev/null; then
26245   # We could just check for DJGPP; but this test a) works b) is more generic
26246   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26247   if test -f conf$$.exe; then
26248     # Don't use ln at all; we don't have any links
26249     as_ln_s='cp -p'
26250   else
26251     as_ln_s='ln -s'
26252   fi
26253 elif ln conf$$.file conf$$ 2>/dev/null; then
26254   as_ln_s=ln
26255 else
26256   as_ln_s='cp -p'
26257 fi
26258 rm -f conf$$ conf$$.exe conf$$.file
26259
26260 as_executable_p="test -f"
26261
26262 # Support unset when possible.
26263 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26264   as_unset=unset
26265 else
26266   as_unset=false
26267 fi
26268
26269 # NLS nuisances.
26270 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26271 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26272 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26273 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26274 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26275 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26276 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26277 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26278
26279 # IFS
26280 # We need space, tab and new line, in precisely that order.
26281 as_nl='
26282 '
26283 IFS="   $as_nl"
26284
26285 # CDPATH.
26286 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26287
26288 exec 6>&1
26289
26290 _ACEOF
26291
26292 # Files that config.status was made for.
26293 if test -n "$ac_config_files"; then
26294   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26295 fi
26296
26297 if test -n "$ac_config_headers"; then
26298   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26299 fi
26300
26301 if test -n "$ac_config_links"; then
26302   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26303 fi
26304
26305 if test -n "$ac_config_commands"; then
26306   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26307 fi
26308
26309 cat >>$CONFIG_STATUS <<\EOF
26310
26311 ac_cs_usage="\
26312 \`$as_me' instantiates files from templates according to the
26313 current configuration.
26314
26315 Usage: $0 [OPTIONS] [FILE]...
26316
26317   -h, --help       print this help, then exit
26318   -V, --version    print version number, then exit
26319   -d, --debug      don't remove temporary files
26320       --recheck    update $as_me by reconfiguring in the same conditions
26321   --file=FILE[:TEMPLATE]
26322                    instantiate the configuration file FILE
26323   --header=FILE[:TEMPLATE]
26324                    instantiate the configuration header FILE
26325
26326 Configuration files:
26327 $config_files
26328
26329 Configuration headers:
26330 $config_headers
26331
26332 Configuration commands:
26333 $config_commands
26334
26335 Report bugs to <dickey@invisible-island.net>."
26336 EOF
26337
26338 cat >>$CONFIG_STATUS <<EOF
26339 ac_cs_version="\\
26340 config.status
26341 configured by $0, generated by GNU Autoconf 2.52.20200111,
26342   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26343
26344 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26345 Free Software Foundation, Inc.
26346 This config.status script is free software; the Free Software Foundation
26347 gives unlimited permission to copy, distribute and modify it."
26348 srcdir=$srcdir
26349 INSTALL="$INSTALL"
26350 EOF
26351
26352 cat >>$CONFIG_STATUS <<\EOF
26353 # If no file are specified by the user, then we need to provide default
26354 # value.  By we need to know if files were specified by the user.
26355 ac_need_defaults=:
26356 while test $# != 0
26357 do
26358   case $1 in
26359   --*=*)
26360     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26361     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26362     shift
26363     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26364     shift
26365     ;;
26366   -*);;
26367   *) # This is not an option, so the user has probably given explicit
26368      # arguments.
26369      ac_need_defaults=false;;
26370   esac
26371
26372   case $1 in
26373   # Handling of the options.
26374 EOF
26375 cat >>$CONFIG_STATUS <<EOF
26376   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26377     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26378     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26379 EOF
26380 cat >>$CONFIG_STATUS <<\EOF
26381   --version | --vers* | -V )
26382     echo "$ac_cs_version"; exit 0 ;;
26383   --he | --h)
26384     # Conflict between --help and --header
26385     { { echo "$as_me:26385: error: ambiguous option: $1
26386 Try \`$0 --help' for more information." >&5
26387 echo "$as_me: error: ambiguous option: $1
26388 Try \`$0 --help' for more information." >&2;}
26389    { (exit 1); exit 1; }; };;
26390   --help | --hel | -h )
26391     echo "$ac_cs_usage"; exit 0 ;;
26392   --debug | --d* | -d )
26393     debug=: ;;
26394   --file | --fil | --fi | --f )
26395     shift
26396     CONFIG_FILES="$CONFIG_FILES $1"
26397     ac_need_defaults=false;;
26398   --header | --heade | --head | --hea )
26399     shift
26400     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26401     ac_need_defaults=false;;
26402
26403   # This is an error.
26404   -*) { { echo "$as_me:26404: error: unrecognized option: $1
26405 Try \`$0 --help' for more information." >&5
26406 echo "$as_me: error: unrecognized option: $1
26407 Try \`$0 --help' for more information." >&2;}
26408    { (exit 1); exit 1; }; } ;;
26409
26410   *) ac_config_targets="$ac_config_targets $1" ;;
26411
26412   esac
26413   shift
26414 done
26415
26416 exec 5>>config.log
26417 cat >&5 << _ACEOF
26418
26419 ## ----------------------- ##
26420 ## Running config.status.  ##
26421 ## ----------------------- ##
26422
26423 This file was extended by $as_me 2.52.20200111, executed with
26424   CONFIG_FILES    = $CONFIG_FILES
26425   CONFIG_HEADERS  = $CONFIG_HEADERS
26426   CONFIG_LINKS    = $CONFIG_LINKS
26427   CONFIG_COMMANDS = $CONFIG_COMMANDS
26428   > $ac_cs_invocation
26429 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26430
26431 _ACEOF
26432 EOF
26433
26434 cat >>$CONFIG_STATUS <<EOF
26435 #
26436 # INIT-COMMANDS section.
26437 #
26438
26439 ### Special initialization commands, used to pass information from the
26440 ### configuration-run into config.status
26441
26442 AWK="$AWK"
26443 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26444 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26445 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26446 ECHO_LD="$ECHO_LD"
26447 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26448 LDCONFIG="$LDCONFIG"
26449 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26450 LIB_NAME="$LIB_NAME"
26451 LIB_PREFIX="$LIB_PREFIX"
26452 LIB_SUBSETS="$LIB_SUBSETS"
26453 LIB_SUFFIX="$LIB_SUFFIX"
26454 LIB_TRACING="$LIB_TRACING"
26455 LN_S="$LN_S"
26456 MAKE_TERMINFO="$MAKE_TERMINFO"
26457 NCURSES_MAJOR="$NCURSES_MAJOR"
26458 NCURSES_MINOR="$NCURSES_MINOR"
26459 NCURSES_OSPEED="$NCURSES_OSPEED"
26460 NCURSES_PATCH="$NCURSES_PATCH"
26461 SRC_SUBDIRS="$SRC_SUBDIRS"
26462 TERMINFO="$TERMINFO"
26463 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26464 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26465 TICS_NAME="$TICS_NAME"
26466 TICS_SUFFIX="$TICS_SUFFIX"
26467 TIC_PATH="$TIC_PATH"
26468 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26469 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26470 TINFO_NAME="$TINFO_NAME"
26471 TINFO_SUFFIX="$TINFO_SUFFIX"
26472 UNALTERED_SYMS="$UNALTERED_SYMS"
26473 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26474 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26475 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26476 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26477 WILDCARD_SYMS="$WILDCARD_SYMS"
26478 WITH_CURSES_H="$with_curses_h"
26479 WITH_ECHO="${enable_echo:=yes}"
26480 WITH_OVERWRITE="$with_overwrite"
26481 cf_LIST_MODELS="$cf_list_models"
26482 cf_cv_abi_version="$cf_cv_abi_version"
26483 cf_cv_do_relink="$cf_cv_do_relink"
26484 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26485 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26486 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26487 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26488 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26489 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26490 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26491 cf_cv_rel_version="$cf_cv_rel_version"
26492 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26493 cf_cv_shared_soname='$cf_cv_shared_soname'
26494 cf_cv_shlib_version="$cf_cv_shlib_version"
26495 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26496 cf_cv_system_name="$cf_cv_system_name"
26497 cf_cv_term_driver="$with_term_driver"
26498 cf_with_ada="$cf_with_ada"
26499 cf_with_cxx_binding="$cf_with_cxx_binding"
26500 cf_with_db_install="$cf_with_db_install"
26501 cf_with_manpages="$cf_with_manpages"
26502 cf_with_tests="$cf_with_tests"
26503 host="$host"
26504 target="$target"
26505 with_shared_cxx="$with_shared_cxx"
26506
26507 EOF
26508
26509 cat >>$CONFIG_STATUS <<\EOF
26510 for ac_config_target in $ac_config_targets
26511 do
26512   case "$ac_config_target" in
26513   # Handling of arguments.
26514   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26515   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26516   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26517   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26518   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26519   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26520   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26521   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26522   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26523   *) { { echo "$as_me:26523: error: invalid argument: $ac_config_target" >&5
26524 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26525    { (exit 1); exit 1; }; };;
26526   esac
26527 done
26528
26529 # If the user did not use the arguments to specify the items to instantiate,
26530 # then the envvar interface is used.  Set only those that are not.
26531 # We use the long form for the default assignment because of an extremely
26532 # bizarre bug on SunOS 4.1.3.
26533 if $ac_need_defaults; then
26534   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26535   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26536   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26537 fi
26538
26539 # Create a temporary directory, and hook for its removal unless debugging.
26540 $debug ||
26541 {
26542   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26543   trap '{ (exit 1); exit 1; }' 1 2 13 15
26544 }
26545
26546 # Create a (secure) tmp directory for tmp files.
26547 : ${TMPDIR=/tmp}
26548 {
26549   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26550   test -n "$tmp" && test -d "$tmp"
26551 }  ||
26552 {
26553   tmp=$TMPDIR/cs$$-$RANDOM
26554   (umask 077 && mkdir $tmp)
26555 } ||
26556 {
26557    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26558    { (exit 1); exit 1; }
26559 }
26560
26561 EOF
26562
26563 cat >>$CONFIG_STATUS <<EOF
26564
26565 #
26566 # CONFIG_FILES section.
26567 #
26568
26569 # No need to generate the scripts if there are no CONFIG_FILES.
26570 # This happens for instance when ./config.status config.h
26571 if test -n "\$CONFIG_FILES"; then
26572   # Protect against being on the right side of a sed subst in config.status.
26573   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26574    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26575 s,@SHELL@,$SHELL,;t t
26576 s,@exec_prefix@,$exec_prefix,;t t
26577 s,@prefix@,$prefix,;t t
26578 s,@program_transform_name@,$program_transform_name,;t t
26579 s,@bindir@,$bindir,;t t
26580 s,@sbindir@,$sbindir,;t t
26581 s,@libexecdir@,$libexecdir,;t t
26582 s,@datarootdir@,$datarootdir,;t t
26583 s,@datadir@,$datadir,;t t
26584 s,@sysconfdir@,$sysconfdir,;t t
26585 s,@sharedstatedir@,$sharedstatedir,;t t
26586 s,@localstatedir@,$localstatedir,;t t
26587 s,@runstatedir@,$runstatedir,;t t
26588 s,@libdir@,$libdir,;t t
26589 s,@includedir@,$includedir,;t t
26590 s,@oldincludedir@,$oldincludedir,;t t
26591 s,@infodir@,$infodir,;t t
26592 s,@mandir@,$mandir,;t t
26593 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26594 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26595 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26596 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26597 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26598 s,@build_alias@,$build_alias,;t t
26599 s,@host_alias@,$host_alias,;t t
26600 s,@target_alias@,$target_alias,;t t
26601 s,@ECHO_C@,$ECHO_C,;t t
26602 s,@ECHO_N@,$ECHO_N,;t t
26603 s,@ECHO_T@,$ECHO_T,;t t
26604 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26605 s,@DEFS@,$DEFS,;t t
26606 s,@LIBS@,$LIBS,;t t
26607 s,@top_builddir@,$top_builddir,;t t
26608 s,@EGREP@,$EGREP,;t t
26609 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26610 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26611 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26612 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26613 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26614 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26615 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26616 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26617 s,@VERSION@,$VERSION,;t t
26618 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26619 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26620 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26621 s,@PACKAGE@,$PACKAGE,;t t
26622 s,@build@,$build,;t t
26623 s,@build_cpu@,$build_cpu,;t t
26624 s,@build_vendor@,$build_vendor,;t t
26625 s,@build_os@,$build_os,;t t
26626 s,@host@,$host,;t t
26627 s,@host_cpu@,$host_cpu,;t t
26628 s,@host_vendor@,$host_vendor,;t t
26629 s,@host_os@,$host_os,;t t
26630 s,@target@,$target,;t t
26631 s,@target_cpu@,$target_cpu,;t t
26632 s,@target_vendor@,$target_vendor,;t t
26633 s,@target_os@,$target_os,;t t
26634 s,@CC@,$CC,;t t
26635 s,@CFLAGS@,$CFLAGS,;t t
26636 s,@LDFLAGS@,$LDFLAGS,;t t
26637 s,@CPPFLAGS@,$CPPFLAGS,;t t
26638 s,@ac_ct_CC@,$ac_ct_CC,;t t
26639 s,@EXEEXT@,$EXEEXT,;t t
26640 s,@OBJEXT@,$OBJEXT,;t t
26641 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26642 s,@CPP@,$CPP,;t t
26643 s,@LDCONFIG@,$LDCONFIG,;t t
26644 s,@CXX@,$CXX,;t t
26645 s,@CXXFLAGS@,$CXXFLAGS,;t t
26646 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26647 s,@AWK@,$AWK,;t t
26648 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26649 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26650 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26651 s,@LINT@,$LINT,;t t
26652 s,@LINT_OPTS@,$LINT_OPTS,;t t
26653 s,@LN_S@,$LN_S,;t t
26654 s,@cf_config_suffix@,$cf_config_suffix,;t t
26655 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26656 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26657 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26658 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26659 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26660 s,@SET_MAKE@,$SET_MAKE,;t t
26661 s,@CTAGS@,$CTAGS,;t t
26662 s,@ETAGS@,$ETAGS,;t t
26663 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26664 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26665 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26666 s,@RANLIB@,$RANLIB,;t t
26667 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26668 s,@LD@,$LD,;t t
26669 s,@ac_ct_LD@,$ac_ct_LD,;t t
26670 s,@AR@,$AR,;t t
26671 s,@ac_ct_AR@,$ac_ct_AR,;t t
26672 s,@NM@,$NM,;t t
26673 s,@ac_ct_NM@,$ac_ct_NM,;t t
26674 s,@ARFLAGS@,$ARFLAGS,;t t
26675 s,@DESTDIR@,$DESTDIR,;t t
26676 s,@BUILD_CC@,$BUILD_CC,;t t
26677 s,@BUILD_CPP@,$BUILD_CPP,;t t
26678 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26679 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26680 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26681 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26682 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26683 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26684 s,@cf_list_models@,$cf_list_models,;t t
26685 s,@ABI_VERSION@,$ABI_VERSION,;t t
26686 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26687 s,@LIBTOOL@,$LIBTOOL,;t t
26688 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26689 s,@LT_UNDEF@,$LT_UNDEF,;t t
26690 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26691 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26692 s,@LIB_CREATE@,$LIB_CREATE,;t t
26693 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26694 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26695 s,@LIB_PREP@,$LIB_PREP,;t t
26696 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26697 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26698 s,@LIB_LINK@,$LIB_LINK,;t t
26699 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26700 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26701 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26702 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26703 s,@TICS_NAME@,$TICS_NAME,;t t
26704 s,@TINFO_NAME@,$TINFO_NAME,;t t
26705 s,@LIB_NAME@,$LIB_NAME,;t t
26706 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26707 s,@CC_G_OPT@,$CC_G_OPT,;t t
26708 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26709 s,@LD_MODEL@,$LD_MODEL,;t t
26710 s,@shlibdir@,$shlibdir,;t t
26711 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26712 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26713 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26714 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26715 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26716 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26717 s,@LINK_PROGS@,$LINK_PROGS,;t t
26718 s,@LINK_TESTS@,$LINK_TESTS,;t t
26719 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26720 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26721 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26722 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26723 s,@RPATH_LIST@,$RPATH_LIST,;t t
26724 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26725 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26726 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26727 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26728 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26729 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26730 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26731 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26732 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26733 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26734 s,@TIC@,$TIC,;t t
26735 s,@INFOCMP@,$INFOCMP,;t t
26736 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26737 s,@XTERM_KBS@,$XTERM_KBS,;t t
26738 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26739 s,@TERMINFO@,$TERMINFO,;t t
26740 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26741 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26742 s,@TERMPATH@,$TERMPATH,;t t
26743 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26744 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26745 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26746 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26747 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26748 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26749 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26750 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26751 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26752 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26753 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26754 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26755 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26756 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26757 s,@RGB_PATH@,$RGB_PATH,;t t
26758 s,@no_x11_rgb@,$no_x11_rgb,;t t
26759 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26760 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26761 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26762 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26763 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26764 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26765 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26766 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26767 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26768 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26769 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26770 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26771 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26772 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26773 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26774 s,@PTHREAD@,$PTHREAD,;t t
26775 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26776 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26777 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26778 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26779 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26780 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26781 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26782 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26783 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26784 s,@ECHO_LT@,$ECHO_LT,;t t
26785 s,@ECHO_LD@,$ECHO_LD,;t t
26786 s,@RULE_CC@,$RULE_CC,;t t
26787 s,@SHOW_CC@,$SHOW_CC,;t t
26788 s,@ECHO_CC@,$ECHO_CC,;t t
26789 s,@ECHO_LINK@,$ECHO_LINK,;t t
26790 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26791 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26792 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26793 s,@ADAFLAGS@,$ADAFLAGS,;t t
26794 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26795 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26796 s,@ADA_TRACE@,$ADA_TRACE,;t t
26797 s,@MATH_LIB@,$MATH_LIB,;t t
26798 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26799 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26800 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26801 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26802 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26803 s,@TEST_LIBS@,$TEST_LIBS,;t t
26804 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26805 s,@CXXCPP@,$CXXCPP,;t t
26806 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26807 s,@CXX_AR@,$CXX_AR,;t t
26808 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26809 s,@CXXLIBS@,$CXXLIBS,;t t
26810 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26811 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26812 s,@M4_exists@,$M4_exists,;t t
26813 s,@cf_ada_make@,$cf_ada_make,;t t
26814 s,@cf_ada_config@,$cf_ada_config,;t t
26815 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26816 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26817 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26818 s,@cf_compile_generics@,$cf_compile_generics,;t t
26819 s,@cf_generic_objects@,$cf_generic_objects,;t t
26820 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26821 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26822 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26823 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26824 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26825 s,@cf_ada_package@,$cf_ada_package,;t t
26826 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26827 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26828 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26829 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26830 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26831 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26832 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26833 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26834 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26835 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26836 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26837 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26838 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26839 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26840 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26841 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26842 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26843 s,@TICS_LIBS@,$TICS_LIBS,;t t
26844 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26845 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26846 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26847 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26848 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26849 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26850 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26851 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26852 s,@includesubdir@,$includesubdir,;t t
26853 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26854 s,@TICS_LIST@,$TICS_LIST,;t t
26855 s,@TINFO_LIST@,$TINFO_LIST,;t t
26856 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26857 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26858 s,@TEST_ARGS@,$TEST_ARGS,;t t
26859 s,@TEST_DEPS@,$TEST_DEPS,;t t
26860 s,@TEST_ARG2@,$TEST_ARG2,;t t
26861 s,@TEST_DEP2@,$TEST_DEP2,;t t
26862 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26863 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26864 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26865 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26866 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26867 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26868 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26869 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26870 s,@cross_compiling@,$cross_compiling,;t t
26871 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26872 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26873 s,@PANEL_NAME@,$PANEL_NAME,;t t
26874 s,@MENU_NAME@,$MENU_NAME,;t t
26875 s,@FORM_NAME@,$FORM_NAME,;t t
26876 s,@CXX_NAME@,$CXX_NAME,;t t
26877 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26878 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26879 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26880 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26881 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26882 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26883 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26884 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26885 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26886 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26887 CEOF
26888
26889 EOF
26890
26891   cat >>$CONFIG_STATUS <<\EOF
26892   # Split the substitutions into bite-sized pieces for seds with
26893   # small command number limits, like on Digital OSF/1 and HP-UX.
26894   ac_max_sed_lines=48
26895   ac_sed_frag=1 # Number of current file.
26896   ac_beg=1 # First line for current file.
26897   ac_end=$ac_max_sed_lines # Line after last line for current file.
26898   ac_more_lines=:
26899   ac_sed_cmds=
26900   while $ac_more_lines; do
26901     if test $ac_beg -gt 1; then
26902       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26903     else
26904       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26905     fi
26906     if test ! -s $tmp/subs.frag; then
26907       ac_more_lines=false
26908     else
26909       # The purpose of the label and of the branching condition is to
26910       # speed up the sed processing (if there are no `@' at all, there
26911       # is no need to browse any of the substitutions).
26912       # These are the two extra sed commands mentioned above.
26913       (echo ':t
26914   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26915       # It is possible to make a multiline substitution using escaped newlines.
26916       # Ensure that we do not split the substitution between script fragments.
26917       ac_BEG=$ac_end
26918       ac_END=`expr $ac_end + $ac_max_sed_lines`
26919       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26920       if test -s $tmp/subs.next; then
26921         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26922         if test ! -s $tmp/subs.edit; then
26923           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26924           if test ! -s $tmp/subs.edit; then
26925             if test $ac_beg -gt 1; then
26926               ac_end=`expr $ac_end - 1`
26927               continue
26928             fi
26929           fi
26930         fi
26931       fi
26932
26933       if test -z "$ac_sed_cmds"; then
26934         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26935       else
26936         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26937       fi
26938       ac_sed_frag=`expr $ac_sed_frag + 1`
26939       ac_beg=$ac_end
26940       ac_end=`expr $ac_end + $ac_max_sed_lines`
26941     fi
26942   done
26943   if test -z "$ac_sed_cmds"; then
26944     ac_sed_cmds=cat
26945   fi
26946 fi # test -n "$CONFIG_FILES"
26947
26948 EOF
26949 cat >>$CONFIG_STATUS <<\EOF
26950 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26951   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26952   case $ac_file in
26953   - | *:- | *:-:* ) # input from stdin
26954         cat >$tmp/stdin
26955         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26956         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26957   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26958         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26959   * )   ac_file_in=$ac_file.in ;;
26960   esac
26961
26962   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26963   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26964          X"$ac_file" : 'X\(//\)[^/]' \| \
26965          X"$ac_file" : 'X\(//\)$' \| \
26966          X"$ac_file" : 'X\(/\)' \| \
26967          .     : '\(.\)' 2>/dev/null ||
26968 echo X"$ac_file" |
26969     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26970           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26971           /^X\(\/\/\)$/{ s//\1/; q; }
26972           /^X\(\/\).*/{ s//\1/; q; }
26973           s/.*/./; q'`
26974   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26975     { case "$ac_dir" in
26976   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26977   *)                      as_incr_dir=.;;
26978 esac
26979 as_dummy="$ac_dir"
26980 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26981   case $as_mkdir_dir in
26982     # Skip DOS drivespec
26983     ?:) as_incr_dir=$as_mkdir_dir ;;
26984     *)
26985       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26986       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26987     ;;
26988   esac
26989 done; }
26990
26991     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26992     # A "../" for each directory in $ac_dir_suffix.
26993     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26994   else
26995     ac_dir_suffix= ac_dots=
26996   fi
26997
26998   case $srcdir in
26999   .)  ac_srcdir=.
27000       if test -z "$ac_dots"; then
27001          ac_top_srcdir=.
27002       else
27003          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27004       fi ;;
27005   [\\/]* | ?:[\\/]* )
27006       ac_srcdir=$srcdir$ac_dir_suffix;
27007       ac_top_srcdir=$srcdir ;;
27008   *) # Relative path.
27009     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27010     ac_top_srcdir=$ac_dots$srcdir ;;
27011   esac
27012
27013   case $INSTALL in
27014   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27015   *) ac_INSTALL=$ac_dots$INSTALL ;;
27016   esac
27017
27018   if test x"$ac_file" != x-; then
27019     { echo "$as_me:27019: creating $ac_file" >&5
27020 echo "$as_me: creating $ac_file" >&6;}
27021     rm -f "$ac_file"
27022   fi
27023   # Let's still pretend it is `configure' which instantiates (i.e., don't
27024   # use $as_me), people would be surprised to read:
27025   #    /* config.h.  Generated automatically by config.status.  */
27026   configure_input="Generated automatically from `echo $ac_file_in |
27027                                                  sed 's,.*/,,'` by configure."
27028
27029   # First look for the input files in the build tree, otherwise in the
27030   # src tree.
27031   ac_file_inputs=`IFS=:
27032     for f in $ac_file_in; do
27033       case $f in
27034       -) echo $tmp/stdin ;;
27035       [\\/$]*)
27036          # Absolute (can't be DOS-style, as IFS=:)
27037          test -f "$f" || { { echo "$as_me:27037: error: cannot find input file: $f" >&5
27038 echo "$as_me: error: cannot find input file: $f" >&2;}
27039    { (exit 1); exit 1; }; }
27040          echo $f;;
27041       *) # Relative
27042          if test -f "$f"; then
27043            # Build tree
27044            echo $f
27045          elif test -f "$srcdir/$f"; then
27046            # Source tree
27047            echo $srcdir/$f
27048          else
27049            # /dev/null tree
27050            { { echo "$as_me:27050: error: cannot find input file: $f" >&5
27051 echo "$as_me: error: cannot find input file: $f" >&2;}
27052    { (exit 1); exit 1; }; }
27053          fi;;
27054       esac
27055     done` || { (exit 1); exit 1; }
27056 EOF
27057 cat >>$CONFIG_STATUS <<\EOF
27058   ac_warn_datarootdir=no
27059   if test x"$ac_file" != x-; then
27060     for ac_item in $ac_file_inputs
27061     do
27062       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27063       if test -n "$ac_seen"; then
27064         ac_used=`grep '@datarootdir@' $ac_item`
27065         if test -z "$ac_used"; then
27066           { echo "$as_me:27066: WARNING: datarootdir was used implicitly but not set:
27067 $ac_seen" >&5
27068 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27069 $ac_seen" >&2;}
27070           ac_warn_datarootdir=yes
27071         fi
27072       fi
27073       ac_seen=`grep '${datarootdir}' $ac_item`
27074       if test -n "$ac_seen"; then
27075         { echo "$as_me:27075: WARNING: datarootdir was used explicitly but not set:
27076 $ac_seen" >&5
27077 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27078 $ac_seen" >&2;}
27079         ac_warn_datarootdir=yes
27080       fi
27081     done
27082   fi
27083
27084 if test "x$ac_warn_datarootdir" = xyes; then
27085   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27086 fi
27087
27088 EOF
27089 cat >>$CONFIG_STATUS <<EOF
27090   sed "$ac_vpsub
27091 $extrasub
27092 EOF
27093 cat >>$CONFIG_STATUS <<\EOF
27094 :t
27095 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27096 s,@configure_input@,$configure_input,;t t
27097 s,@srcdir@,$ac_srcdir,;t t
27098 s,@top_srcdir@,$ac_top_srcdir,;t t
27099 s,@INSTALL@,$ac_INSTALL,;t t
27100 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27101   rm -f $tmp/stdin
27102   if test x"$ac_file" != x-; then
27103     cp $tmp/out $ac_file
27104
27105     for ac_name in prefix exec_prefix datarootdir
27106     do
27107         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27108         if test -n "$ac_seen"; then
27109             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27110             if test -z "$ac_init"; then
27111               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27112               { echo "$as_me:27112: WARNING: Variable $ac_name is used but was not set:
27113 $ac_seen" >&5
27114 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27115 $ac_seen" >&2;}
27116             fi
27117         fi
27118     done
27119     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27120     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27121     if test -s $tmp/out; then
27122       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27123       { echo "$as_me:27123: WARNING: Some variables may not be substituted:
27124 $ac_seen" >&5
27125 echo "$as_me: WARNING: Some variables may not be substituted:
27126 $ac_seen" >&2;}
27127     fi
27128   else
27129     cat $tmp/out
27130   fi
27131   rm -f $tmp/out
27132
27133 done
27134 EOF
27135 cat >>$CONFIG_STATUS <<\EOF
27136
27137 #
27138 # CONFIG_HEADER section.
27139 #
27140
27141 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27142 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27143 #
27144 # ac_d sets the value in "#define NAME VALUE" lines.
27145 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27146 ac_dB='[        ].*$,\1#\2'
27147 ac_dC=' '
27148 ac_dD=',;t'
27149 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27150 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27151 ac_iB='\([      ]\),\1#\2define\3'
27152 ac_iC=' '
27153 ac_iD='\4,;t'
27154 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27155 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27156 ac_uB='$,\1#\2define\3'
27157 ac_uC=' '
27158 ac_uD=',;t'
27159
27160 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27161   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27162   case $ac_file in
27163   - | *:- | *:-:* ) # input from stdin
27164         cat >$tmp/stdin
27165         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27166         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27167   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27168         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27169   * )   ac_file_in=$ac_file.in ;;
27170   esac
27171
27172   test x"$ac_file" != x- && { echo "$as_me:27172: creating $ac_file" >&5
27173 echo "$as_me: creating $ac_file" >&6;}
27174
27175   # First look for the input files in the build tree, otherwise in the
27176   # src tree.
27177   ac_file_inputs=`IFS=:
27178     for f in $ac_file_in; do
27179       case $f in
27180       -) echo $tmp/stdin ;;
27181       [\\/$]*)
27182          # Absolute (can't be DOS-style, as IFS=:)
27183          test -f "$f" || { { echo "$as_me:27183: error: cannot find input file: $f" >&5
27184 echo "$as_me: error: cannot find input file: $f" >&2;}
27185    { (exit 1); exit 1; }; }
27186          echo $f;;
27187       *) # Relative
27188          if test -f "$f"; then
27189            # Build tree
27190            echo $f
27191          elif test -f "$srcdir/$f"; then
27192            # Source tree
27193            echo $srcdir/$f
27194          else
27195            # /dev/null tree
27196            { { echo "$as_me:27196: error: cannot find input file: $f" >&5
27197 echo "$as_me: error: cannot find input file: $f" >&2;}
27198    { (exit 1); exit 1; }; }
27199          fi;;
27200       esac
27201     done` || { (exit 1); exit 1; }
27202   # Remove the trailing spaces.
27203   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27204
27205 EOF
27206
27207 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27208 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27209 # be either 'cat' or 'sort'.
27210 cat confdefs.h | uniq >conftest.vals
27211
27212 # Break up conftest.vals because some shells have a limit on
27213 # the size of here documents, and old seds have small limits too.
27214
27215 rm -f conftest.tail
27216 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27217 while grep . conftest.vals >/dev/null
27218 do
27219   # Write chunks of a limited-size here document to conftest.frag.
27220   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27221   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27222   echo 'CEOF' >> $CONFIG_STATUS
27223   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27224   rm -f conftest.vals
27225   mv conftest.tail conftest.vals
27226 done
27227 rm -f conftest.vals
27228
27229 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27230 # marker @DEFS@.
27231 echo '  cat >> conftest.edit <<CEOF
27232 /@DEFS@/r conftest.frag
27233 /@DEFS@/d
27234 CEOF
27235 sed -f conftest.edit $tmp/in > $tmp/out
27236 rm -f $tmp/in
27237 mv $tmp/out $tmp/in
27238 rm -f conftest.edit conftest.frag
27239 ' >> $CONFIG_STATUS
27240
27241 cat >>$CONFIG_STATUS <<\EOF
27242   # Let's still pretend it is `configure' which instantiates (i.e., don't
27243   # use $as_me), people would be surprised to read:
27244   #    /* config.h.  Generated automatically by config.status.  */
27245   if test x"$ac_file" = x-; then
27246     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27247   else
27248     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27249   fi
27250   cat $tmp/in >>$tmp/config.h
27251   rm -f $tmp/in
27252   if test x"$ac_file" != x-; then
27253     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27254       { echo "$as_me:27254: $ac_file is unchanged" >&5
27255 echo "$as_me: $ac_file is unchanged" >&6;}
27256     else
27257       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27258          X"$ac_file" : 'X\(//\)[^/]' \| \
27259          X"$ac_file" : 'X\(//\)$' \| \
27260          X"$ac_file" : 'X\(/\)' \| \
27261          .     : '\(.\)' 2>/dev/null ||
27262 echo X"$ac_file" |
27263     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27264           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27265           /^X\(\/\/\)$/{ s//\1/; q; }
27266           /^X\(\/\).*/{ s//\1/; q; }
27267           s/.*/./; q'`
27268       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27269         { case "$ac_dir" in
27270   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27271   *)                      as_incr_dir=.;;
27272 esac
27273 as_dummy="$ac_dir"
27274 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27275   case $as_mkdir_dir in
27276     # Skip DOS drivespec
27277     ?:) as_incr_dir=$as_mkdir_dir ;;
27278     *)
27279       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27280       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27281     ;;
27282   esac
27283 done; }
27284
27285       fi
27286       rm -f $ac_file
27287       mv $tmp/config.h $ac_file
27288     fi
27289   else
27290     cat $tmp/config.h
27291     rm -f $tmp/config.h
27292   fi
27293 done
27294 EOF
27295 cat >>$CONFIG_STATUS <<\EOF
27296 #
27297 # CONFIG_COMMANDS section.
27298 #
27299 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27300   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27301   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27302
27303   case $ac_dest in
27304     default )
27305 if test "x$cf_with_tests" != xno ; then
27306
27307 for cf_dir in test
27308 do
27309         if test ! -d $srcdir/$cf_dir; then
27310                 continue
27311         elif test -f $srcdir/$cf_dir/programs; then
27312                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27313         fi
27314 done
27315
27316 fi
27317
27318 cf_prefix=$LIB_PREFIX
27319
27320 case $cf_cv_shlib_version in
27321 (cygdll|msysdll|mingw)
27322         TINFO_NAME=$TINFO_ARG_SUFFIX
27323         TINFO_SUFFIX=.dll
27324         ;;
27325 esac
27326
27327 if test -n "$TINFO_SUFFIX" ; then
27328         case $TINFO_SUFFIX in
27329         (tw*)
27330                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27331                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27332                 ;;
27333         (t*)
27334                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27335                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27336                 ;;
27337         (w*)
27338                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27339                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27340                 ;;
27341         esac
27342 fi
27343
27344 for cf_dir in $SRC_SUBDIRS
27345 do
27346         if test ! -d $srcdir/$cf_dir ; then
27347                 continue
27348         elif test -f $srcdir/$cf_dir/modules; then
27349
27350                 SHARED_LIB=
27351                 Libs_To_Make=
27352                 cf_awk_program=
27353                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27354                 then
27355                         cf_awk_program="$cf_awk_program\
27356 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27357 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27358 "
27359                 fi
27360
27361                 if test "x$WILDCARD_SYMS" = xno
27362                 then
27363                         cf_awk_program="$cf_awk_program\
27364 /[      ]_\\*;/ { skip=1; next; }\
27365 "
27366                 fi
27367
27368                 if test "x$cf_awk_program" != "x"
27369                 then
27370                         cat >>$cf_dir/Makefile <<CF_EOF
27371
27372 # Generated by CF_LIB_RULES
27373 resulting.map: $UNALTERED_SYMS
27374         $AWK 'BEGIN { skip = 1; last=""; } \
27375 $cf_awk_program \
27376 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27377  skip = 0; last = \$\$0; } \
27378 END { print last; }' < $UNALTERED_SYMS >\$@
27379
27380 distclean::
27381         rm -f resulting.map
27382 CF_EOF
27383                 fi
27384
27385                 for cf_item in $cf_LIST_MODELS
27386                 do
27387
27388         case X$cf_item in
27389         (Xlibtool)
27390                 cf_suffix='.la'
27391                 cf_depsuf=$cf_suffix
27392                 ;;
27393         (Xdebug)
27394                 cf_suffix='_g.a'
27395                 cf_depsuf=$cf_suffix
27396                 ;;
27397         (Xprofile)
27398                 cf_suffix='_p.a'
27399                 cf_depsuf=$cf_suffix
27400                 ;;
27401         (Xshared)
27402                 case $cf_cv_system_name in
27403                 (aix[5-7]*)
27404                         cf_suffix='.so'
27405                         cf_depsuf=$cf_suffix
27406                         ;;
27407                 (cygwin*|msys*|mingw*)
27408                         cf_suffix='.dll'
27409                         cf_depsuf='.dll.a'
27410                         ;;
27411                 (darwin*)
27412                         cf_suffix='.dylib'
27413                         cf_depsuf=$cf_suffix
27414                         ;;
27415                 (hpux*)
27416                         case $target in
27417                         (ia64*)
27418                                 cf_suffix='.so'
27419                                 cf_depsuf=$cf_suffix
27420                                 ;;
27421                         (*)
27422                                 cf_suffix='.sl'
27423                                 cf_depsuf=$cf_suffix
27424                                 ;;
27425                         esac
27426                         ;;
27427                 (*)
27428                         cf_suffix='.so'
27429                         cf_depsuf=$cf_suffix
27430                         ;;
27431                 esac
27432                 ;;
27433         (*)
27434                 cf_suffix='.a'
27435                 cf_depsuf=$cf_suffix
27436                 ;;
27437         esac
27438         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27439         then
27440                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27441                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27442         fi
27443
27444                         cf_libname=$cf_dir
27445                         test "$cf_dir" = c++ && cf_libname=ncurses++
27446                         if test $cf_item = shared ; then
27447                                 if test -n "${LIB_SUFFIX}"
27448                                 then
27449                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27450                                 else
27451                                         cf_shared_suffix="$cf_suffix"
27452                                 fi
27453                                 if test "$cf_cv_do_symlinks" = yes ; then
27454                                         cf_version_name=
27455
27456                                         case "$cf_cv_shlib_version" in
27457                                         (rel)
27458                                                 cf_version_name=REL_VERSION
27459                                                 ;;
27460                                         (abi)
27461                                                 cf_version_name=ABI_VERSION
27462                                                 ;;
27463                                         esac
27464
27465                                         if test -n "$cf_version_name"
27466                                         then
27467                                                 case "$cf_cv_system_name" in
27468                                                 (darwin*)
27469                                                         # "w", etc?
27470                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27471                                                         ;;
27472                                                 (*)
27473                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27474                                                         ;;
27475                                                 esac
27476                                         fi
27477                                         if test -n "${USE_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                                 fi
27484                                 # cygwin needs import library, and has unique naming convention
27485                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27486                                 # use 'cyg' prefix for shared lib.
27487                                 case $cf_cv_shlib_version in
27488                                 (cygdll)
27489                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27490                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27491                                         ;;
27492                                 (msysdll)
27493                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27494                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27495                                         ;;
27496                                 (mingw)
27497                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27498                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27499                                         ;;
27500                                 (*)
27501                                         cf_add_lib=
27502                                         ;;
27503                                 esac
27504                                 if test -n "$cf_add_lib"
27505                                 then
27506                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27507                                         continue
27508                                 fi
27509                         fi
27510                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27511                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27512                 done
27513
27514                 if test $cf_dir = ncurses ; then
27515                         cf_subsets="$LIB_SUBSETS"
27516                         cf_r_parts="$cf_subsets"
27517                         cf_liblist="$Libs_To_Make"
27518
27519                         while test -n "$cf_r_parts"
27520                         do
27521                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27522                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27523                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27524                                         cf_add_lib=
27525                                         case $cf_l_parts in
27526                                         (*termlib*)
27527                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27528                                                 ;;
27529                                         (*ticlib*)
27530                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27531                                                 ;;
27532                                         (*)
27533                                                 break
27534                                                 ;;
27535                                         esac
27536                                         if test -n "$cf_add_lib"; then
27537                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27538                                         fi
27539                                 else
27540                                         break
27541                                 fi
27542                         done
27543                 else
27544                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27545                 fi
27546
27547                 if test $cf_dir = c++; then
27548                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27549                                 cf_list=
27550                                 for cf_item in $Libs_To_Make
27551                                 do
27552                                         case $cf_item in
27553                                         (*.a)
27554                                                 ;;
27555                                         (*)
27556                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27557                                                 ;;
27558                                         esac
27559                                         for cf_test in $cf_list
27560                                         do
27561                                                 if test "$cf_test" = "$cf_item"
27562                                                 then
27563                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27564                                                         cf_item=
27565                                                         break
27566                                                 fi
27567                                         done
27568                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27569                                 done
27570                                 Libs_To_Make="$cf_list"
27571                         fi
27572                 fi
27573
27574                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27575                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27576                         $cf_dir/Makefile >$cf_dir/Makefile.out
27577                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27578
27579                 $AWK -f $srcdir/mk-0th.awk \
27580                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27581                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27582
27583                 for cf_subset in $cf_subsets
27584                 do
27585                         cf_subdirs=
27586                         for cf_item in $cf_LIST_MODELS
27587                         do
27588
27589                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27590
27591 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27592
27593                         CXX_MODEL=$cf_ITEM
27594                         if test "$CXX_MODEL" = SHARED; then
27595                                 case $cf_cv_shlib_version in
27596                                 (cygdll|msysdll|mingw)
27597                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27598
27599 echo "${as_me:-configure}:27599: testing overriding CXX_MODEL to SHARED ..." 1>&5
27600
27601                                         with_shared_cxx=yes
27602                                         ;;
27603                                 (*)
27604                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27605                                         ;;
27606                                 esac
27607                         fi
27608
27609         case X$cf_item in
27610         (Xlibtool)
27611                 cf_suffix='.la'
27612                 cf_depsuf=$cf_suffix
27613                 ;;
27614         (Xdebug)
27615                 cf_suffix='_g.a'
27616                 cf_depsuf=$cf_suffix
27617                 ;;
27618         (Xprofile)
27619                 cf_suffix='_p.a'
27620                 cf_depsuf=$cf_suffix
27621                 ;;
27622         (Xshared)
27623                 case $cf_cv_system_name in
27624                 (aix[5-7]*)
27625                         cf_suffix='.so'
27626                         cf_depsuf=$cf_suffix
27627                         ;;
27628                 (cygwin*|msys*|mingw*)
27629                         cf_suffix='.dll'
27630                         cf_depsuf='.dll.a'
27631                         ;;
27632                 (darwin*)
27633                         cf_suffix='.dylib'
27634                         cf_depsuf=$cf_suffix
27635                         ;;
27636                 (hpux*)
27637                         case $target in
27638                         (ia64*)
27639                                 cf_suffix='.so'
27640                                 cf_depsuf=$cf_suffix
27641                                 ;;
27642                         (*)
27643                                 cf_suffix='.sl'
27644                                 cf_depsuf=$cf_suffix
27645                                 ;;
27646                         esac
27647                         ;;
27648                 (*)
27649                         cf_suffix='.so'
27650                         cf_depsuf=$cf_suffix
27651                         ;;
27652                 esac
27653                 ;;
27654         (*)
27655                 cf_suffix='.a'
27656                 cf_depsuf=$cf_suffix
27657                 ;;
27658         esac
27659         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27660         then
27661                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27662                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27663         fi
27664
27665         case $cf_item in
27666         (libtool) cf_subdir='obj_lo'  ;;
27667         (normal)  cf_subdir='objects' ;;
27668         (debug)   cf_subdir='obj_g' ;;
27669         (profile) cf_subdir='obj_p' ;;
27670         (shared)
27671                 case $cf_cv_system_name in
27672                 (cygwin|msys)
27673                         cf_subdir='objects' ;;
27674                 (*)
27675                         cf_subdir='obj_s' ;;
27676                 esac
27677         esac
27678
27679                         # Test for case where we build libtinfo with a different name.
27680                         cf_libname=$cf_dir
27681                         if test $cf_dir = ncurses ; then
27682                                 case $cf_subset in
27683                                 (*base*)
27684                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27685                                         ;;
27686                                 (*termlib*)
27687                                         cf_libname=$TINFO_LIB_SUFFIX
27688                                         ;;
27689                                 (ticlib*)
27690                                         cf_libname=$TICS_LIB_SUFFIX
27691                                         ;;
27692                                 esac
27693                         elif test $cf_dir = c++ ; then
27694                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27695                         else
27696                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27697                         fi
27698                         if test -n "${USE_ARG_SUFFIX}" ; then
27699                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27700                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27701                         fi
27702
27703                         # These dependencies really are for development, not
27704                         # builds, but they are useful in porting, too.
27705                         cf_depend="../include/ncurses_cfg.h"
27706                         if test "$srcdir" = "."; then
27707                                 cf_reldir="."
27708                         else
27709                                 cf_reldir="\${srcdir}"
27710                         fi
27711
27712                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27713                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27714                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27715                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27716                         fi
27717
27718                         cf_dir_suffix=
27719                         old_cf_suffix="$cf_suffix"
27720                         if test "$cf_cv_shlib_version_infix" = yes ; then
27721                         if test -n "$USE_LIB_SUFFIX" ; then
27722                                 case $USE_LIB_SUFFIX in
27723                                 (tw*)
27724                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27725                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27726                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27727                                         ;;
27728                                 (t*)
27729                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27730                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27731                                         cf_dir_suffix=t$EXTRA_SUFFIX
27732                                         ;;
27733                                 (w*)
27734                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27735                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27736                                         cf_dir_suffix=w$EXTRA_SUFFIX
27737                                         ;;
27738                                 (*)
27739                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27740                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27741                                         cf_dir_suffix=$EXTRA_SUFFIX
27742                                         ;;
27743                                 esac
27744                         fi
27745                         fi
27746
27747                         $AWK -f $srcdir/mk-1st.awk \
27748                                 name=${cf_libname}${cf_dir_suffix} \
27749                                 traces=$LIB_TRACING \
27750                                 MODEL=$cf_ITEM \
27751                                 CXX_MODEL=$CXX_MODEL \
27752                                 model=$cf_subdir \
27753                                 prefix=$cf_prefix \
27754                                 suffix=$cf_suffix \
27755                                 subset=$cf_subset \
27756                                 driver=$cf_cv_term_driver \
27757                                 SymLink="$LN_S" \
27758                                 TermlibRoot=$TINFO_NAME \
27759                                 TermlibSuffix=$TINFO_SUFFIX \
27760                                 ShlibVer=$cf_cv_shlib_version \
27761                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27762                                 ReLink=${cf_cv_do_relink:-no} \
27763                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27764                                 DoLinks=$cf_cv_do_symlinks \
27765                                 rmSoLocs=$cf_cv_rm_so_locs \
27766                                 ldconfig="$LDCONFIG" \
27767                                 overwrite=$WITH_OVERWRITE \
27768                                 depend="$cf_depend" \
27769                                 host="$host" \
27770                                 libtool_version="$LIBTOOL_VERSION" \
27771                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27772
27773                         cf_suffix="$old_cf_suffix"
27774
27775                         for cf_subdir2 in $cf_subdirs lib
27776                         do
27777                                 test $cf_subdir = $cf_subdir2 && break
27778                         done
27779                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27780                         $AWK -f $srcdir/mk-2nd.awk \
27781                                 name=$cf_dir \
27782                                 traces=$LIB_TRACING \
27783                                 MODEL=$cf_ITEM \
27784                                 model=$cf_subdir \
27785                                 subset=$cf_subset \
27786                                 srcdir=$srcdir \
27787                                 echo=$WITH_ECHO \
27788                                 crenames=$cf_cv_prog_CC_c_o \
27789                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27790                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27791                         cf_subdirs="$cf_subdirs $cf_subdir"
27792                         done
27793                 done
27794         fi
27795
27796         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27797 done
27798
27799 for cf_dir in $SRC_SUBDIRS
27800 do
27801         if test ! -d $srcdir/$cf_dir ; then
27802                 continue
27803         fi
27804
27805         if test -f $cf_dir/Makefile ; then
27806                 case "$cf_dir" in
27807                 (Ada95)
27808                         echo 'libs \' >> Makefile
27809                         echo 'install.libs \' >> Makefile
27810                         echo 'uninstall.libs ::' >> Makefile
27811                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27812                         ;;
27813                 esac
27814         fi
27815
27816         if test -f $srcdir/$cf_dir/modules; then
27817                 echo >> Makefile
27818                 if test -f $srcdir/$cf_dir/headers; then
27819 cat >> Makefile <<CF_EOF
27820 install.includes \\
27821 uninstall.includes \\
27822 CF_EOF
27823                 fi
27824 if test "$cf_dir" != "c++" ; then
27825 echo 'lint \' >> Makefile
27826 fi
27827 cat >> Makefile <<CF_EOF
27828 libs \\
27829 lintlib \\
27830 install.libs \\
27831 uninstall.libs \\
27832 install.$cf_dir \\
27833 uninstall.$cf_dir ::
27834         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27835 CF_EOF
27836         elif test -f $srcdir/$cf_dir/headers; then
27837 cat >> Makefile <<CF_EOF
27838
27839 libs \\
27840 install.libs \\
27841 uninstall.libs \\
27842 install.includes \\
27843 uninstall.includes ::
27844         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27845 CF_EOF
27846 fi
27847 done
27848
27849 if test "x$cf_with_db_install" = xyes; then
27850 cat >> Makefile <<CF_EOF
27851
27852 install.libs uninstall.libs \\
27853 install.data uninstall.data ::
27854 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27855 CF_EOF
27856 else
27857 cat >> Makefile <<CF_EOF
27858
27859 install.libs uninstall.libs ::
27860         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27861 CF_EOF
27862 fi
27863
27864 if test "x$cf_with_manpages" = xyes; then
27865 cat >> Makefile <<CF_EOF
27866
27867 install.man \\
27868 uninstall.man ::
27869         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27870 CF_EOF
27871 fi
27872
27873 cat >> Makefile <<CF_EOF
27874
27875 distclean ::
27876         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27877         rm -f headers.sh headers.sed mk_shared_lib.sh
27878         rm -f edit_man.* man_alias.*
27879         rm -rf \${DIRS_TO_MAKE}
27880 CF_EOF
27881
27882 # Special case: tack's manpage lives in its own directory.
27883 if test "x$cf_with_manpages" = xyes; then
27884 if test "x$cf_with_tack" = "xyes"; then
27885 cat >> Makefile <<CF_EOF
27886
27887 install.man \\
27888 uninstall.man ::
27889         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27890 CF_EOF
27891 fi
27892 fi
27893
27894 rm -f headers.sed headers.sh
27895
27896 echo creating headers.sh
27897 cat >headers.sh <<CF_EOF
27898 #! $SHELL
27899 # This shell script is generated by the 'configure' script.  It is invoked in a
27900 # subdirectory of the build tree.  It generates a sed-script in the parent
27901 # directory that is used to adjust includes for header files that reside in a
27902 # subdirectory of /usr/include, etc.
27903 PRG=""
27904 while test \$# != 3
27905 do
27906 PRG="\$PRG \$1"; shift
27907 done
27908 DST=\$1
27909 REF=\$2
27910 SRC=\$3
27911 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27912 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27913 echo installing \$SRC in \$DST
27914 CF_EOF
27915
27916 if test $WITH_CURSES_H = yes; then
27917         cat >>headers.sh <<CF_EOF
27918 case \$DST in
27919 (/*/include/*)
27920         END=\`basename \$DST\`
27921         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27922         do
27923                 NAME=\`basename \$i\`
27924                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27925         done
27926         ;;
27927 (*)
27928         echo "" >> \$TMPSED
27929         ;;
27930 esac
27931 CF_EOF
27932
27933 else
27934         cat >>headers.sh <<CF_EOF
27935 case \$DST in
27936 (/*/include/*)
27937         END=\`basename \$DST\`
27938         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27939         do
27940                 NAME=\`basename \$i\`
27941                 if test "\$NAME" = "curses.h"
27942                 then
27943                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27944                         NAME=ncurses.h
27945                 fi
27946                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27947         done
27948         ;;
27949 (*)
27950         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27951         ;;
27952 esac
27953 CF_EOF
27954 fi
27955 cat >>headers.sh <<CF_EOF
27956 rm -f \$TMPSRC
27957 sed -f \$TMPSED \$SRC > \$TMPSRC
27958 NAME=\`basename \$SRC\`
27959 CF_EOF
27960 if test $WITH_CURSES_H != yes; then
27961         cat >>headers.sh <<CF_EOF
27962 test "\$NAME" = "curses.h" && NAME=ncurses.h
27963 CF_EOF
27964 fi
27965 cat >>headers.sh <<CF_EOF
27966 # Just in case someone gzip'd manpages, remove the conflicting copy.
27967 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27968
27969 eval \$PRG \$TMPSRC \$DST/\$NAME
27970 rm -f \$TMPSRC \$TMPSED
27971 CF_EOF
27972
27973 chmod 0755 headers.sh
27974
27975 for cf_dir in $SRC_SUBDIRS
27976 do
27977         if test ! -d $srcdir/$cf_dir ; then
27978                 continue
27979         fi
27980
27981         if test -f $srcdir/$cf_dir/headers; then
27982                 $AWK -f $srcdir/mk-hdr.awk \
27983                         subset="$LIB_SUBSETS" \
27984                         compat="$WITH_CURSES_H" \
27985                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
27986         fi
27987
27988         if test -f $srcdir/$cf_dir/modules; then
27989                 if test "$cf_dir" != "c++" ; then
27990                         cat >>$cf_dir/Makefile <<"CF_EOF"
27991 depend : ${AUTO_SRC}
27992         makedepend -- ${CPPFLAGS} -- ${C_SRC}
27993
27994 # DO NOT DELETE THIS LINE -- make depend depends on it.
27995 CF_EOF
27996                 fi
27997         fi
27998 done
27999
28000 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28001 if test -z "$USE_OLD_MAKERULES" ; then
28002         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28003 fi
28004 fi
28005  ;;
28006   esac
28007 done
28008 EOF
28009
28010 cat >>$CONFIG_STATUS <<\EOF
28011
28012 { (exit 0); exit 0; }
28013 EOF
28014 chmod +x $CONFIG_STATUS
28015 ac_clean_files=$ac_clean_files_save
28016
28017 # configure is writing to config.log, and then calls config.status.
28018 # config.status does its own redirection, appending to config.log.
28019 # Unfortunately, on DOS this fails, as config.log is still kept open
28020 # by configure, so config.status won't be able to write to it; its
28021 # output is simply discarded.  So we exec the FD to /dev/null,
28022 # effectively closing config.log, so it can be properly (re)opened and
28023 # appended to by config.status.  When coming back to configure, we
28024 # need to make the FD available again.
28025 if test "$no_create" != yes; then
28026   ac_cs_success=:
28027   exec 5>/dev/null
28028   $SHELL $CONFIG_STATUS || ac_cs_success=false
28029   exec 5>>config.log
28030   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28031   # would make configure fail if this is the last instruction.
28032   $ac_cs_success || { (exit 1); exit 1; }
28033 fi
28034 ${MAKE:-make} preinstall