]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20200222
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.697 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200111.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --with-tic-path=XXX     specify path of tic for fallbacks
771   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
772   --without-xterm-new     specify if xterm terminfo should be old version
773   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
774   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
775   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
776   --disable-big-core      assume machine has little memory
777   --disable-big-strings   assume compiler has only standard-size strings
778   --enable-termcap        compile in termcap fallback support
779   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
780   --enable-getcap         fast termcap load, no xrefs to terminfo
781   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
782   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
783   --disable-root-environ  restrict environment when running as root
784   --enable-symlinks       make tic use symbolic links not hard links
785   --enable-broken_linker  compile with broken-linker support code
786   --enable-bsdpad         recognize BSD-style prefix padding
787   --enable-widec          compile with wide-char/UTF-8 code
788   --disable-lp64          allow chtype to be long (ignore _LP64)
789   --disable-largefile     omit support for large files
790   --disable-tparm-varargs compile tparm() without varargs interface
791   --disable-tic-depends   link tic library without explicit dependency on ncurses library
792   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
793   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
794   --with-bool=TYPE        override fallback type of bool variable
795   --with-caps=alt         compile with alternate Caps file
796   --with-chtype=TYPE      override type of chtype
797   --with-ospeed=TYPE      override type of ospeed variable
798   --with-mmask-t=TYPE     override type of mmask_t
799   --with-ccharw-max=XXX   override size CCHARW_MAX
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --with-tparm-arg=TYPE   override parameter type of tparm
802   --with-rcs-ids          compile-in RCS identifiers
803 Options to Specify How Manpages are Installed:
804   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
805                           optionally formatted/catonly, e.g., gzip,formatted
806   --with-manpage-renames  specify manpage-renaming
807   --with-manpage-aliases  specify manpage-aliases using .so
808   --with-manpage-symlinks specify manpage-aliases using symlinks
809   --with-manpage-tbl      specify manpage processing with tbl
810 Extensions:
811   --disable-ext-funcs     disable function-extensions
812   --enable-sp-funcs       enable SCREEN-extensions
813   --enable-term-driver    enable terminal-driver
814   --enable-const          compile with extra/non-standard const
815   --enable-ext-colors     compile for 256-color support
816   --enable-ext-mouse      compile for extended mouse-encoding
817   --enable-ext-putwin     compile with extended putwin/screendump
818   --enable-no-padding     compile with $NCURSES_NO_PADDING code
819   --enable-sigwinch       compile with SIGWINCH handler
820   --enable-tcap-names     compile with user-definable terminal capabilities
821 Reentrant Code:
822   --with-pthread          use POSIX thread library
823   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
824   --enable-weak-symbols   enable weak-symbols for pthreads
825   --enable-reentrant      compile with reentrant code
826   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
827   --enable-opaque-form    make form-library structures "opaque"
828   --enable-opaque-menu    make menu-library structures "opaque"
829   --enable-opaque-panel   make panel-library structures "opaque"
830   --with-wrap-prefix=XXX  override prefix used for public variables
831 Development Code:
832   --without-develop       disable development options
833   --enable-hard-tabs      compile with hard-tabs code
834   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
835 Experimental Code:
836   --disable-assumed-color do not assume anything about default-colors
837   --disable-hashmap       compile without hashmap scrolling-optimization
838   --enable-colorfgbg      compile-in experimental $COLORFGBG code
839   --enable-interop        compile-in interop bindings
840   --enable-safe-sprintf   compile with experimental safe-sprintf code
841   --disable-scroll-hints  compile without scroll-hints code
842   --enable-wgetch-events  compile with wgetch-events code
843 Testing/development Options:
844   --disable-echo          do not display "compiling" commands
845   --disable-stripping     do not strip (debug info) installed executables
846   --enable-warnings       build: turn on GCC compiler warnings
847   --enable-string-hacks   work around bogus compiler/loader warnings
848   --enable-assertions     test: turn on generation of assertion code
849   --with-dmalloc          test: use Gray Watson's dmalloc library
850   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
851   --with-valgrind         test: use valgrind
852   --disable-leaks         test: free permanent memory, analyze leaks
853   --enable-expanded       test: generate functions for certain macros
854   --disable-macros        test: use functions rather than macros
855   --with-trace            test: add trace() function to all models of ncurses
856   --disable-gnat-projects test: disable GNAT projects even if usable
857 Ada Binding Options:
858   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
859   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
860   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
861   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
862   --with-ada-libname=XXX  override default Ada library-name
863
864 Some influential environment variables:
865   CC          C compiler command
866   CFLAGS      C compiler flags
867   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
868               nonstandard directory <lib dir>
869   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
870               headers in a nonstandard directory <include dir>
871   CPP         C preprocessor
872   CXX         C++ compiler command
873   CXXFLAGS    C++ compiler flags
874   CXXCPP      C++ preprocessor
875
876 Use these variables to override the choices made by `configure' or to help
877 it to find libraries and programs with nonstandard names/locations.
878
879 EOF
880 fi
881
882 if test "$ac_init_help" = "recursive"; then
883   # If there are subdirs, report their specific --help.
884   ac_popdir=`pwd`
885   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
886     cd $ac_subdir
887     # A "../" for each directory in /$ac_subdir.
888     ac_dots=`echo $ac_subdir |
889              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
890
891     case $srcdir in
892     .) # No --srcdir option.  We are building in place.
893       ac_sub_srcdir=$srcdir ;;
894     [\\/]* | ?:[\\/]* ) # Absolute path.
895       ac_sub_srcdir=$srcdir/$ac_subdir ;;
896     *) # Relative path.
897       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
898     esac
899
900     # Check for guested configure; otherwise get Cygnus style configure.
901     if test -f $ac_sub_srcdir/configure.gnu; then
902       echo
903       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
904     elif test -f $ac_sub_srcdir/configure; then
905       echo
906       $SHELL $ac_sub_srcdir/configure  --help=recursive
907     elif test -f $ac_sub_srcdir/configure.ac ||
908            test -f $ac_sub_srcdir/configure.in; then
909       echo
910       $ac_configure --help
911     else
912       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
913     fi
914     cd $ac_popdir
915   done
916 fi
917
918 test -n "$ac_init_help" && exit 0
919 if $ac_init_version; then
920   cat <<\EOF
921
922 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
923 Free Software Foundation, Inc.
924 This configure script is free software; the Free Software Foundation
925 gives unlimited permission to copy, distribute and modify it.
926 EOF
927   exit 0
928 fi
929 exec 5>config.log
930 cat >&5 <<EOF
931 This file contains any messages produced by compilers while
932 running configure, to aid debugging if configure makes a mistake.
933
934 It was created by $as_me, which was
935 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
936
937   $ $0 $@
938
939 EOF
940 {
941 cat <<_ASUNAME
942 ## ---------- ##
943 ## Platform.  ##
944 ## ---------- ##
945
946 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
947 uname -m = `(uname -m) 2>/dev/null || echo unknown`
948 uname -r = `(uname -r) 2>/dev/null || echo unknown`
949 uname -s = `(uname -s) 2>/dev/null || echo unknown`
950 uname -v = `(uname -v) 2>/dev/null || echo unknown`
951
952 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
953 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
954
955 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
956 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
957 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
958 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
959 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
960 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
961 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
962
963 PATH = $PATH
964
965 _ASUNAME
966 } >&5
967
968 cat >&5 <<EOF
969 ## ------------ ##
970 ## Core tests.  ##
971 ## ------------ ##
972
973 EOF
974
975 # Keep a trace of the command line.
976 # Strip out --no-create and --no-recursion so they do not pile up.
977 # Also quote any args containing shell meta-characters.
978 ac_configure_args=
979 ac_sep=
980 for ac_arg
981 do
982   case $ac_arg in
983   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
984   | --no-cr | --no-c) ;;
985   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
986   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
987   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
988     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
989     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
990     ac_sep=" " ;;
991   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
992      ac_sep=" " ;;
993   esac
994   # Get rid of the leading space.
995 done
996
997 # When interrupted or exit'd, cleanup temporary files, and complete
998 # config.log.  We remove comments because anyway the quotes in there
999 # would cause problems or look ugly.
1000 trap 'exit_status=$?
1001   # Save into config.log some information that might help in debugging.
1002   echo >&5
1003   echo "## ----------------- ##" >&5
1004   echo "## Cache variables.  ##" >&5
1005   echo "## ----------------- ##" >&5
1006   echo >&5
1007   # The following way of writing the cache mishandles newlines in values,
1008 {
1009   (set) 2>&1 |
1010     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1011     *ac_space=\ *)
1012       sed -n \
1013         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1014           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1015       ;;
1016     *)
1017       sed -n \
1018         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1019       ;;
1020     esac;
1021 } >&5
1022   sed "/^$/d" confdefs.h >conftest.log
1023   if test -s conftest.log; then
1024     echo >&5
1025     echo "## ------------ ##" >&5
1026     echo "## confdefs.h.  ##" >&5
1027     echo "## ------------ ##" >&5
1028     echo >&5
1029     cat conftest.log >&5
1030   fi
1031   (echo; echo) >&5
1032   test "$ac_signal" != 0 &&
1033     echo "$as_me: caught signal $ac_signal" >&5
1034   echo "$as_me: exit $exit_status" >&5
1035   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1036     exit $exit_status
1037      ' 0
1038 for ac_signal in 1 2 13 15; do
1039   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1040 done
1041 ac_signal=0
1042
1043 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1044 rm -rf conftest* confdefs.h
1045 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1046 echo >confdefs.h
1047
1048 # Let the site file select an alternate cache file if it wants to.
1049 # Prefer explicitly selected file to automatically selected ones.
1050 if test -z "$CONFIG_SITE"; then
1051   if test "x$prefix" != xNONE; then
1052     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1053   else
1054     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1055   fi
1056 fi
1057 for ac_site_file in $CONFIG_SITE; do
1058   if test -r "$ac_site_file"; then
1059     { echo "$as_me:1059: loading site script $ac_site_file" >&5
1060 echo "$as_me: loading site script $ac_site_file" >&6;}
1061     cat "$ac_site_file" >&5
1062     . "$ac_site_file"
1063   fi
1064 done
1065
1066 if test -r "$cache_file"; then
1067   # Some versions of bash will fail to source /dev/null (special
1068   # files actually), so we avoid doing that.
1069   if test -f "$cache_file"; then
1070     { echo "$as_me:1070: loading cache $cache_file" >&5
1071 echo "$as_me: loading cache $cache_file" >&6;}
1072     case $cache_file in
1073       [\\/]* | ?:[\\/]* ) . $cache_file;;
1074       *)                      . ./$cache_file;;
1075     esac
1076   fi
1077 else
1078   { echo "$as_me:1078: creating cache $cache_file" >&5
1079 echo "$as_me: creating cache $cache_file" >&6;}
1080   >$cache_file
1081 fi
1082
1083 # Check that the precious variables saved in the cache have kept the same
1084 # value.
1085 ac_cache_corrupted=false
1086 for ac_var in `(set) 2>&1 |
1087                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1088   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1089   eval ac_new_set=\$ac_env_${ac_var}_set
1090   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1091   eval ac_new_val="\$ac_env_${ac_var}_value"
1092   case $ac_old_set,$ac_new_set in
1093     set,)
1094       { echo "$as_me:1094: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1095 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1096       ac_cache_corrupted=: ;;
1097     ,set)
1098       { echo "$as_me:1098: error: \`$ac_var' was not set in the previous run" >&5
1099 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1100       ac_cache_corrupted=: ;;
1101     ,);;
1102     *)
1103       if test "x$ac_old_val" != "x$ac_new_val"; then
1104         { echo "$as_me:1104: error: \`$ac_var' has changed since the previous run:" >&5
1105 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1106         { echo "$as_me:1106:   former value:  $ac_old_val" >&5
1107 echo "$as_me:   former value:  $ac_old_val" >&2;}
1108         { echo "$as_me:1108:   current value: $ac_new_val" >&5
1109 echo "$as_me:   current value: $ac_new_val" >&2;}
1110         ac_cache_corrupted=:
1111       fi;;
1112   esac
1113   # Pass precious variables to config.status.  It doesn't matter if
1114   # we pass some twice (in addition to the command line arguments).
1115   if test "$ac_new_set" = set; then
1116     case $ac_new_val in
1117     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1118       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1119       ac_configure_args="$ac_configure_args '$ac_arg'"
1120       ;;
1121     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1122        ;;
1123     esac
1124   fi
1125 done
1126 if $ac_cache_corrupted; then
1127   { echo "$as_me:1127: error: changes in the environment can compromise the build" >&5
1128 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1129   { { echo "$as_me:1129: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1130 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1131    { (exit 1); exit 1; }; }
1132 fi
1133
1134 ac_ext=c
1135 ac_cpp='$CPP $CPPFLAGS'
1136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139 ac_main_return=return
1140
1141 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1142   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1143                    ECHO_T='     ' ;;
1144   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1145   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1146 esac
1147 echo "#! $SHELL" >conftest.sh
1148 echo  "exit 0"   >>conftest.sh
1149 chmod +x conftest.sh
1150 if { (echo "$as_me:1150: PATH=\".;.\"; conftest.sh") >&5
1151   (PATH=".;."; conftest.sh) 2>&5
1152   ac_status=$?
1153   echo "$as_me:1153: \$? = $ac_status" >&5
1154   (exit $ac_status); }; then
1155   ac_path_separator=';'
1156 else
1157   ac_path_separator=:
1158 fi
1159 PATH_SEPARATOR="$ac_path_separator"
1160 rm -f conftest.sh
1161
1162 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1163
1164 top_builddir=`pwd`
1165
1166 echo "$as_me:1166: checking for egrep" >&5
1167 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1168 if test "${ac_cv_prog_egrep+set}" = set; then
1169   echo $ECHO_N "(cached) $ECHO_C" >&6
1170 else
1171   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1172                 then ac_cv_prog_egrep='grep -E'
1173                 else ac_cv_prog_egrep='egrep'
1174         fi
1175 fi
1176 echo "$as_me:1176: result: $ac_cv_prog_egrep" >&5
1177 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1178         EGREP=$ac_cv_prog_egrep
1179
1180         test -z "$EGREP" && { { echo "$as_me:1180: error: No egrep program found" >&5
1181 echo "$as_me: error: No egrep program found" >&2;}
1182    { (exit 1); exit 1; }; }
1183
1184 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1185 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1186 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1187 cf_cv_abi_version=${NCURSES_MAJOR}
1188 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1189 cf_cv_timestamp=`date`
1190 echo "$as_me:1190: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1191 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1192
1193 if test -f $srcdir/VERSION ; then
1194         echo "$as_me:1194: checking for package version" >&5
1195 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1196
1197         # if there are not enough fields, cut returns the last one...
1198         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1199         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1200         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1201
1202         # this is how CF_BUNDLED_INTL uses $VERSION:
1203         VERSION="$cf_field1"
1204
1205         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1206         test -z "$VERSION_MAJOR" && { { echo "$as_me:1206: error: missing major-version" >&5
1207 echo "$as_me: error: missing major-version" >&2;}
1208    { (exit 1); exit 1; }; }
1209
1210         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1211         test -z "$VERSION_MINOR" && { { echo "$as_me:1211: error: missing minor-version" >&5
1212 echo "$as_me: error: missing minor-version" >&2;}
1213    { (exit 1); exit 1; }; }
1214
1215         echo "$as_me:1215: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1216 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1217
1218         echo "$as_me:1218: checking for package patch date" >&5
1219 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1220         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1221         case .$VERSION_PATCH in
1222         (.)
1223                 { { echo "$as_me:1223: error: missing patch-date $VERSION_PATCH" >&5
1224 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1225    { (exit 1); exit 1; }; }
1226                 ;;
1227         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1228                 ;;
1229         (*)
1230                 { { echo "$as_me:1230: error: illegal patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         esac
1235         echo "$as_me:1235: result: $VERSION_PATCH" >&5
1236 echo "${ECHO_T}$VERSION_PATCH" >&6
1237 else
1238         { { echo "$as_me:1238: error: did not find $srcdir/VERSION" >&5
1239 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1240    { (exit 1); exit 1; }; }
1241 fi
1242
1243 # show the actual data that we have for versions:
1244 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1245
1246 echo "${as_me:-configure}:1246: testing ABI VERSION $VERSION ..." 1>&5
1247
1248 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1249
1250 echo "${as_me:-configure}:1250: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1251
1252 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1253
1254 echo "${as_me:-configure}:1254: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1255
1256 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1257
1258 echo "${as_me:-configure}:1258: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1259
1260         cf_PACKAGE=NCURSES
1261         PACKAGE=ncurses
1262
1263 cat >>confdefs.h <<EOF
1264 #define PACKAGE "$PACKAGE"
1265 EOF
1266
1267 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1268
1269         cat >>confdefs.h <<EOF
1270 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1271 EOF
1272
1273         cat >>confdefs.h <<EOF
1274 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1275 EOF
1276
1277 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1278
1279 # Check whether --with-rel-version or --without-rel-version was given.
1280 if test "${with_rel_version+set}" = set; then
1281   withval="$with_rel_version"
1282   { echo "$as_me:1282: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1283 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1284  cf_cv_rel_version=$withval
1285 fi;
1286
1287  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1288  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1289
1290 if test -n "$NCURSES_MAJOR" ; then
1291   case $NCURSES_MAJOR in
1292   ([0-9]*)
1293         ;;
1294   (*)
1295         { { echo "$as_me:1295: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1296 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1297    { (exit 1); exit 1; }; }
1298         ;;
1299   esac
1300 else
1301   { { echo "$as_me:1301: error: Release major-version value is empty" >&5
1302 echo "$as_me: error: Release major-version value is empty" >&2;}
1303    { (exit 1); exit 1; }; }
1304 fi
1305
1306 if test -n "$NCURSES_MINOR" ; then
1307   case $NCURSES_MINOR in
1308   ([0-9]*)
1309         ;;
1310   (*)
1311         { { echo "$as_me:1311: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1312 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1313    { (exit 1); exit 1; }; }
1314         ;;
1315   esac
1316 else
1317   { { echo "$as_me:1317: error: Release minor-version value is empty" >&5
1318 echo "$as_me: error: Release minor-version value is empty" >&2;}
1319    { (exit 1); exit 1; }; }
1320 fi
1321
1322 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1323
1324 # Check whether --with-abi-version or --without-abi-version was given.
1325 if test "${with_abi_version+set}" = set; then
1326   withval="$with_abi_version"
1327
1328         if test "x$cf_cv_abi_version" != "x$withval"
1329         then
1330                 { echo "$as_me:1330: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1331 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1332                 case $cf_cv_rel_version in
1333                 (5.*)
1334                         cf_cv_rel_version=$withval.0
1335                         ;;
1336                 (6.*)
1337                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1338                         ;;
1339                 esac
1340         fi
1341         cf_cv_abi_version=$withval
1342 fi;
1343
1344 if test -n "$cf_cv_abi_version" ; then
1345   case $cf_cv_abi_version in
1346   ([0-9]*)
1347         ;;
1348   (*)
1349         { { echo "$as_me:1349: error: ABI version is not a number: $cf_cv_abi_version" >&5
1350 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1351    { (exit 1); exit 1; }; }
1352         ;;
1353   esac
1354 else
1355   { { echo "$as_me:1355: error: ABI version value is empty" >&5
1356 echo "$as_me: error: ABI version value is empty" >&2;}
1357    { (exit 1); exit 1; }; }
1358 fi
1359
1360 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1361 then
1362         case $cf_cv_rel_version in
1363         (5.*)
1364                 cf_cv_rel_version=$with_abi_version.0
1365                 ;;
1366         esac
1367 fi
1368
1369 ac_aux_dir=
1370 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1371   if test -f $ac_dir/install-sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install-sh -c"
1374     break
1375   elif test -f $ac_dir/install.sh; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/install.sh -c"
1378     break
1379   elif test -f $ac_dir/shtool; then
1380     ac_aux_dir=$ac_dir
1381     ac_install_sh="$ac_aux_dir/shtool install -c"
1382     break
1383   fi
1384 done
1385 if test -z "$ac_aux_dir"; then
1386   { { echo "$as_me:1386: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1387 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1388    { (exit 1); exit 1; }; }
1389 fi
1390 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1391 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1392 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1393
1394 # Make sure we can run config.sub.
1395 $ac_config_sub sun4 >/dev/null 2>&1 ||
1396   { { echo "$as_me:1396: error: cannot run $ac_config_sub" >&5
1397 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1398    { (exit 1); exit 1; }; }
1399
1400 echo "$as_me:1400: checking build system type" >&5
1401 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1402 if test "${ac_cv_build+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_build_alias=$build_alias
1406 test -z "$ac_cv_build_alias" &&
1407   ac_cv_build_alias=`$ac_config_guess`
1408 test -z "$ac_cv_build_alias" &&
1409   { { echo "$as_me:1409: error: cannot guess build type; you must specify one" >&5
1410 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1411    { (exit 1); exit 1; }; }
1412 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1413   { { echo "$as_me:1413: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1414 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1415    { (exit 1); exit 1; }; }
1416
1417 fi
1418 echo "$as_me:1418: result: $ac_cv_build" >&5
1419 echo "${ECHO_T}$ac_cv_build" >&6
1420 build=$ac_cv_build
1421 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1422 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1423 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1424
1425 echo "$as_me:1425: checking host system type" >&5
1426 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1427 if test "${ac_cv_host+set}" = set; then
1428   echo $ECHO_N "(cached) $ECHO_C" >&6
1429 else
1430   ac_cv_host_alias=$host_alias
1431 test -z "$ac_cv_host_alias" &&
1432   ac_cv_host_alias=$ac_cv_build_alias
1433 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1434   { { echo "$as_me:1434: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1435 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1436    { (exit 1); exit 1; }; }
1437
1438 fi
1439 echo "$as_me:1439: result: $ac_cv_host" >&5
1440 echo "${ECHO_T}$ac_cv_host" >&6
1441 host=$ac_cv_host
1442 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1443 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1444 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1445
1446 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1447         echo "$as_me:1447: checking target system type" >&5
1448 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1449 if test "${ac_cv_target+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   ac_cv_target_alias=$target_alias
1453 test "x$ac_cv_target_alias" = "x" &&
1454   ac_cv_target_alias=$ac_cv_host_alias
1455 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1456   { { echo "$as_me:1456: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1457 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1458    { (exit 1); exit 1; }; }
1459
1460 fi
1461 echo "$as_me:1461: result: $ac_cv_target" >&5
1462 echo "${ECHO_T}$ac_cv_target" >&6
1463 target=$ac_cv_target
1464 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1465 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1466 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1467
1468 # The aliases save the names the user supplied, while $host etc.
1469 # will get canonicalized.
1470 test -n "$target_alias" &&
1471   test "$program_prefix$program_suffix$program_transform_name" = \
1472     NONENONEs,x,x, &&
1473   program_prefix=${target_alias}-
1474         system_name="$host_os"
1475 else
1476         system_name="`(uname -s -r) 2>/dev/null`"
1477         if test -z "$system_name" ; then
1478                 system_name="`(hostname) 2>/dev/null`"
1479         fi
1480 fi
1481 test -n "$system_name" &&
1482 cat >>confdefs.h <<EOF
1483 #define SYSTEM_NAME "$system_name"
1484 EOF
1485
1486 if test "${cf_cv_system_name+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   cf_cv_system_name="$system_name"
1490 fi
1491
1492 test -z "$system_name" && system_name="$cf_cv_system_name"
1493 test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5
1494 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1495
1496 if test ".$system_name" != ".$cf_cv_system_name" ; then
1497         echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1498 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1499         { { echo "$as_me:1499: error: \"Please remove config.cache and try again.\"" >&5
1500 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1501    { (exit 1); exit 1; }; }
1502 fi
1503
1504 # Check whether --with-system-type or --without-system-type was given.
1505 if test "${with_system_type+set}" = set; then
1506   withval="$with_system_type"
1507   { echo "$as_me:1507: WARNING: overriding system type to $withval" >&5
1508 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1509         cf_cv_system_name=$withval
1510         host_os=$withval
1511
1512 fi;
1513
1514 ###     Save the given $CFLAGS to allow user-override.
1515 cf_user_CFLAGS="$CFLAGS"
1516
1517 ###     Default install-location
1518
1519 echo "$as_me:1519: checking for prefix" >&5
1520 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1521 if test "x$prefix" = "xNONE" ; then
1522         case "$cf_cv_system_name" in
1523                 # non-vendor systems don't have a conflict
1524         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1525                 prefix=/usr
1526                 ;;
1527         (*)     prefix=$ac_default_prefix
1528                 ;;
1529         esac
1530 fi
1531 echo "$as_me:1531: result: $prefix" >&5
1532 echo "${ECHO_T}$prefix" >&6
1533
1534 if test "x$prefix" = "xNONE" ; then
1535 echo "$as_me:1535: checking for default include-directory" >&5
1536 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1537 test -n "$verbose" && echo 1>&6
1538 for cf_symbol in \
1539         $includedir \
1540         $includedir/ncurses \
1541         $prefix/include \
1542         $prefix/include/ncurses \
1543         /usr/local/include \
1544         /usr/local/include/ncurses \
1545         /usr/include \
1546         /usr/include/ncurses
1547 do
1548         cf_dir=`eval echo $cf_symbol`
1549         if test -f $cf_dir/curses.h ; then
1550         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1551                 includedir="$cf_symbol"
1552                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1553                 break
1554         fi
1555         fi
1556         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1557 done
1558 echo "$as_me:1558: result: $includedir" >&5
1559 echo "${ECHO_T}$includedir" >&6
1560 fi
1561
1562 ### Defaults for ncurses ABI
1563
1564 case x$cf_cv_abi_version in
1565 (x[6789])
1566         cf_dft_ext_colors=yes
1567         cf_dft_ext_const=yes
1568         cf_dft_ext_mouse=yes
1569         cf_dft_ext_putwin=yes
1570         cf_dft_ext_spfuncs=yes
1571         cf_dft_filter_syms=yes
1572         cf_dft_chtype=uint32_t
1573         cf_dft_mmask_t=uint32_t
1574         cf_dft_interop=yes
1575         cf_dft_tparm_arg=intptr_t
1576         cf_dft_with_lp64=yes
1577         ;;
1578 (*)
1579         cf_dft_ext_colors=no
1580         cf_dft_ext_const=no
1581         cf_dft_ext_mouse=no
1582         cf_dft_ext_putwin=no
1583         cf_dft_ext_spfuncs=no
1584         cf_dft_filter_syms=no
1585         cf_dft_chtype=auto
1586         cf_dft_mmask_t=auto
1587         cf_dft_interop=no
1588         cf_dft_tparm_arg=long
1589         cf_dft_with_lp64=no
1590         ;;
1591 esac
1592
1593 ###     Checks for programs.
1594
1595 # Check whether --with-ada or --without-ada was given.
1596 if test "${with_ada+set}" = set; then
1597   withval="$with_ada"
1598   cf_with_ada=$withval
1599 else
1600   cf_with_ada=yes
1601 fi;
1602
1603 if test "x$cf_with_ada" = xyes
1604 then
1605         cf_prog_cc="gnatgcc gcc cc"
1606 else
1607         cf_prog_cc="gcc cc"
1608 fi
1609
1610 ac_ext=c
1611 ac_cpp='$CPP $CPPFLAGS'
1612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1615 ac_main_return=return
1616 if test -n "$ac_tool_prefix"; then
1617   for ac_prog in $cf_prog_cc
1618   do
1619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1621 echo "$as_me:1621: checking for $ac_word" >&5
1622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1623 if test "${ac_cv_prog_CC+set}" = set; then
1624   echo $ECHO_N "(cached) $ECHO_C" >&6
1625 else
1626   if test -n "$CC"; then
1627   ac_cv_prog_CC="$CC" # Let the user override the test.
1628 else
1629   ac_save_IFS=$IFS; IFS=$ac_path_separator
1630 ac_dummy="$PATH"
1631 for ac_dir in $ac_dummy; do
1632   IFS=$ac_save_IFS
1633   test -z "$ac_dir" && ac_dir=.
1634   $as_executable_p "$ac_dir/$ac_word" || continue
1635 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1636 echo "$as_me:1636: found $ac_dir/$ac_word" >&5
1637 break
1638 done
1639
1640 fi
1641 fi
1642 CC=$ac_cv_prog_CC
1643 if test -n "$CC"; then
1644   echo "$as_me:1644: result: $CC" >&5
1645 echo "${ECHO_T}$CC" >&6
1646 else
1647   echo "$as_me:1647: result: no" >&5
1648 echo "${ECHO_T}no" >&6
1649 fi
1650
1651     test -n "$CC" && break
1652   done
1653 fi
1654 if test -z "$CC"; then
1655   ac_ct_CC=$CC
1656   for ac_prog in $cf_prog_cc
1657 do
1658   # Extract the first word of "$ac_prog", so it can be a program name with args.
1659 set dummy $ac_prog; ac_word=$2
1660 echo "$as_me:1660: checking for $ac_word" >&5
1661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1662 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1663   echo $ECHO_N "(cached) $ECHO_C" >&6
1664 else
1665   if test -n "$ac_ct_CC"; then
1666   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1667 else
1668   ac_save_IFS=$IFS; IFS=$ac_path_separator
1669 ac_dummy="$PATH"
1670 for ac_dir in $ac_dummy; do
1671   IFS=$ac_save_IFS
1672   test -z "$ac_dir" && ac_dir=.
1673   $as_executable_p "$ac_dir/$ac_word" || continue
1674 ac_cv_prog_ac_ct_CC="$ac_prog"
1675 echo "$as_me:1675: found $ac_dir/$ac_word" >&5
1676 break
1677 done
1678
1679 fi
1680 fi
1681 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1682 if test -n "$ac_ct_CC"; then
1683   echo "$as_me:1683: result: $ac_ct_CC" >&5
1684 echo "${ECHO_T}$ac_ct_CC" >&6
1685 else
1686   echo "$as_me:1686: result: no" >&5
1687 echo "${ECHO_T}no" >&6
1688 fi
1689
1690   test -n "$ac_ct_CC" && break
1691 done
1692
1693   CC=$ac_ct_CC
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main (void)
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main (void)
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main (void)
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main (void)
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main (void)
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main (void)
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 INTEL_COMPILER=no
2115
2116 if test "$GCC" = yes ; then
2117         case $host_os in
2118         (linux*|gnu*)
2119                 echo "$as_me:2119: checking if this is really Intel C compiler" >&5
2120 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2121                 cf_save_CFLAGS="$CFLAGS"
2122                 CFLAGS="$CFLAGS -no-gcc"
2123                 cat >conftest.$ac_ext <<_ACEOF
2124 #line 2124 "configure"
2125 #include "confdefs.h"
2126
2127 int
2128 main (void)
2129 {
2130
2131 #ifdef __INTEL_COMPILER
2132 #else
2133 make an error
2134 #endif
2135
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 rm -f conftest.$ac_objext
2141 if { (eval echo "$as_me:2141: \"$ac_compile\"") >&5
2142   (eval $ac_compile) 2>&5
2143   ac_status=$?
2144   echo "$as_me:2144: \$? = $ac_status" >&5
2145   (exit $ac_status); } &&
2146          { ac_try='test -s conftest.$ac_objext'
2147   { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148   (eval $ac_try) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); }; }; then
2152   INTEL_COMPILER=yes
2153 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2154
2155 else
2156   echo "$as_me: failed program was:" >&5
2157 cat conftest.$ac_ext >&5
2158 fi
2159 rm -f conftest.$ac_objext conftest.$ac_ext
2160                 CFLAGS="$cf_save_CFLAGS"
2161                 echo "$as_me:2161: result: $INTEL_COMPILER" >&5
2162 echo "${ECHO_T}$INTEL_COMPILER" >&6
2163                 ;;
2164         esac
2165 fi
2166
2167 CLANG_COMPILER=no
2168
2169 if test "$GCC" = yes ; then
2170         echo "$as_me:2170: checking if this is really Clang C compiler" >&5
2171 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2172         cf_save_CFLAGS="$CFLAGS"
2173         CFLAGS="$CFLAGS -Qunused-arguments"
2174         cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177
2178 int
2179 main (void)
2180 {
2181
2182 #ifdef __clang__
2183 #else
2184 make an error
2185 #endif
2186
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:2195: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   CLANG_COMPILER=yes
2204 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2205
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211         CFLAGS="$cf_save_CFLAGS"
2212         echo "$as_me:2212: result: $CLANG_COMPILER" >&5
2213 echo "${ECHO_T}$CLANG_COMPILER" >&6
2214 fi
2215
2216 echo "$as_me:2216: checking for $CC option to accept ANSI C" >&5
2217 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2218 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2219   echo $ECHO_N "(cached) $ECHO_C" >&6
2220 else
2221   ac_cv_prog_cc_stdc=no
2222 ac_save_CC=$CC
2223 cat >conftest.$ac_ext <<_ACEOF
2224 #line 2224 "configure"
2225 #include "confdefs.h"
2226 #include <stdarg.h>
2227 #include <stdio.h>
2228 #include <sys/types.h>
2229 #include <sys/stat.h>
2230 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2231 struct buf { int x; };
2232 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2233 static char *e (p, i)
2234      char **p;
2235      int i;
2236 {
2237   return p[i];
2238 }
2239 static char *f (char * (*g) (char **, int), char **p, ...)
2240 {
2241   char *s;
2242   va_list v;
2243   va_start (v,p);
2244   s = g (p, va_arg (v,int));
2245   va_end (v);
2246   return s;
2247 }
2248 int test (int i, double x);
2249 struct s1 {int (*f) (int a);};
2250 struct s2 {int (*f) (double a);};
2251 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2252 int argc;
2253 char **argv;
2254 int
2255 main (void)
2256 {
2257 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 # Don't try gcc -ansi; that turns off useful extensions and
2263 # breaks some systems' header files.
2264 # AIX                   -qlanglvl=ansi
2265 # Ultrix and OSF/1      -std1
2266 # HP-UX 10.20 and later -Ae
2267 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2268 # SVR4                  -Xc -D__EXTENSIONS__
2269 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2270 do
2271   CC="$ac_save_CC $ac_arg"
2272   rm -f conftest.$ac_objext
2273 if { (eval echo "$as_me:2273: \"$ac_compile\"") >&5
2274   (eval $ac_compile) 2>&5
2275   ac_status=$?
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } &&
2278          { ac_try='test -s conftest.$ac_objext'
2279   { (eval echo "$as_me:2279: \"$ac_try\"") >&5
2280   (eval $ac_try) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); }; }; then
2284   ac_cv_prog_cc_stdc=$ac_arg
2285 break
2286 else
2287   echo "$as_me: failed program was:" >&5
2288 cat conftest.$ac_ext >&5
2289 fi
2290 rm -f conftest.$ac_objext
2291 done
2292 rm -f conftest.$ac_ext conftest.$ac_objext
2293 CC=$ac_save_CC
2294
2295 fi
2296
2297 case "x$ac_cv_prog_cc_stdc" in
2298   x|xno)
2299     echo "$as_me:2299: result: none needed" >&5
2300 echo "${ECHO_T}none needed" >&6 ;;
2301   *)
2302     echo "$as_me:2302: result: $ac_cv_prog_cc_stdc" >&5
2303 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2304     CC="$CC $ac_cv_prog_cc_stdc" ;;
2305 esac
2306
2307 # This should have been defined by AC_PROG_CC
2308 : ${CC:=cc}
2309
2310 echo "$as_me:2310: checking \$CFLAGS variable" >&5
2311 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2312 case "x$CFLAGS" in
2313 (*-[IUD]*)
2314         echo "$as_me:2314: result: broken" >&5
2315 echo "${ECHO_T}broken" >&6
2316         { echo "$as_me:2316: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2317 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2318         cf_flags="$CFLAGS"
2319         CFLAGS=
2320         for cf_arg in $cf_flags
2321         do
2322
2323 cf_fix_cppflags=no
2324 cf_new_cflags=
2325 cf_new_cppflags=
2326 cf_new_extra_cppflags=
2327
2328 for cf_add_cflags in $cf_arg
2329 do
2330 case $cf_fix_cppflags in
2331 (no)
2332         case $cf_add_cflags in
2333         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2334                 case $cf_add_cflags in
2335                 (-D*)
2336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2337
2338                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2339                                 && test -z "${cf_tst_cflags}" \
2340                                 && cf_fix_cppflags=yes
2341
2342                         if test $cf_fix_cppflags = yes ; then
2343
2344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2346
2347                                 continue
2348                         elif test "${cf_tst_cflags}" = "\"'" ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         fi
2355                         ;;
2356                 esac
2357                 case "$CPPFLAGS" in
2358                 (*$cf_add_cflags)
2359                         ;;
2360                 (*)
2361                         case $cf_add_cflags in
2362                         (-D*)
2363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365 CPPFLAGS=`echo "$CPPFLAGS" | \
2366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2368
2369                                 ;;
2370                         esac
2371
2372         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2373         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2374
2375                         ;;
2376                 esac
2377                 ;;
2378         (*)
2379
2380         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2381         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2382
2383                 ;;
2384         esac
2385         ;;
2386 (yes)
2387
2388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2390
2391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2392
2393         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2394                 && test -z "${cf_tst_cflags}" \
2395                 && cf_fix_cppflags=no
2396         ;;
2397 esac
2398 done
2399
2400 if test -n "$cf_new_cflags" ; then
2401
2402         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2403         CFLAGS="${CFLAGS}$cf_new_cflags"
2404
2405 fi
2406
2407 if test -n "$cf_new_cppflags" ; then
2408
2409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2410         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2411
2412 fi
2413
2414 if test -n "$cf_new_extra_cppflags" ; then
2415
2416         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2417         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2418
2419 fi
2420
2421         done
2422         ;;
2423 (*)
2424         echo "$as_me:2424: result: ok" >&5
2425 echo "${ECHO_T}ok" >&6
2426         ;;
2427 esac
2428
2429 echo "$as_me:2429: checking \$CC variable" >&5
2430 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2431 case "$CC" in
2432 (*[\ \  ]-*)
2433         echo "$as_me:2433: result: broken" >&5
2434 echo "${ECHO_T}broken" >&6
2435         { echo "$as_me:2435: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2436 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2437         # humor him...
2438         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2439         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2440         CC="$cf_prog"
2441         for cf_arg in $cf_flags
2442         do
2443                 case "x$cf_arg" in
2444                 (x-[IUDfgOW]*)
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_arg
2452 do
2453 case $cf_fix_cppflags in
2454 (no)
2455         case $cf_add_cflags in
2456         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2457                 case $cf_add_cflags in
2458                 (-D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466
2467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2469
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         fi
2478                         ;;
2479                 esac
2480                 case "$CPPFLAGS" in
2481                 (*$cf_add_cflags)
2482                         ;;
2483                 (*)
2484                         case $cf_add_cflags in
2485                         (-D*)
2486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2487
2488 CPPFLAGS=`echo "$CPPFLAGS" | \
2489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2491
2492                                 ;;
2493                         esac
2494
2495         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2496         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2497
2498                         ;;
2499                 esac
2500                 ;;
2501         (*)
2502
2503         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2504         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2505
2506                 ;;
2507         esac
2508         ;;
2509 (yes)
2510
2511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2513
2514         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2515
2516         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2517                 && test -z "${cf_tst_cflags}" \
2518                 && cf_fix_cppflags=no
2519         ;;
2520 esac
2521 done
2522
2523 if test -n "$cf_new_cflags" ; then
2524
2525         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2526         CFLAGS="${CFLAGS}$cf_new_cflags"
2527
2528 fi
2529
2530 if test -n "$cf_new_cppflags" ; then
2531
2532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2533         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2534
2535 fi
2536
2537 if test -n "$cf_new_extra_cppflags" ; then
2538
2539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2541
2542 fi
2543
2544                         ;;
2545                 (*)
2546                         CC="$CC $cf_arg"
2547                         ;;
2548                 esac
2549         done
2550         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2551
2552 echo "${as_me:-configure}:2552: testing resulting CC: '$CC' ..." 1>&5
2553
2554         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2555
2556 echo "${as_me:-configure}:2556: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2557
2558         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2559
2560 echo "${as_me:-configure}:2560: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2561
2562         ;;
2563 (*)
2564         echo "$as_me:2564: result: ok" >&5
2565 echo "${ECHO_T}ok" >&6
2566         ;;
2567 esac
2568
2569 ac_ext=c
2570 ac_cpp='$CPP $CPPFLAGS'
2571 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2574 ac_main_return=return
2575 echo "$as_me:2575: checking how to run the C preprocessor" >&5
2576 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2577 # On Suns, sometimes $CPP names a directory.
2578 if test -n "$CPP" && test -d "$CPP"; then
2579   CPP=
2580 fi
2581 if test -z "$CPP"; then
2582   if test "${ac_cv_prog_CPP+set}" = set; then
2583   echo $ECHO_N "(cached) $ECHO_C" >&6
2584 else
2585       # Double quotes because CPP needs to be expanded
2586     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2587     do
2588       ac_preproc_ok=false
2589 for ac_c_preproc_warn_flag in '' yes
2590 do
2591   # Use a header file that comes with gcc, so configuring glibc
2592   # with a fresh cross-compiler works.
2593   # On the NeXT, cc -E runs the code through the compiler's parser,
2594   # not just through cpp. "Syntax error" is here to catch this case.
2595   cat >conftest.$ac_ext <<_ACEOF
2596 #line 2596 "configure"
2597 #include "confdefs.h"
2598 #include <assert.h>
2599                      Syntax error
2600 _ACEOF
2601 if { (eval echo "$as_me:2601: \"$ac_cpp conftest.$ac_ext\"") >&5
2602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2603   ac_status=$?
2604   egrep -v '^ *\+' conftest.er1 >conftest.err
2605   rm -f conftest.er1
2606   cat conftest.err >&5
2607   echo "$as_me:2607: \$? = $ac_status" >&5
2608   (exit $ac_status); } >/dev/null; then
2609   if test -s conftest.err; then
2610     ac_cpp_err=$ac_c_preproc_warn_flag
2611   else
2612     ac_cpp_err=
2613   fi
2614 else
2615   ac_cpp_err=yes
2616 fi
2617 if test -z "$ac_cpp_err"; then
2618   :
2619 else
2620   echo "$as_me: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   # Broken: fails on valid input.
2623 continue
2624 fi
2625 rm -f conftest.err conftest.$ac_ext
2626
2627   # OK, works on sane cases.  Now check whether non-existent headers
2628   # can be detected and how.
2629   cat >conftest.$ac_ext <<_ACEOF
2630 #line 2630 "configure"
2631 #include "confdefs.h"
2632 #include <ac_nonexistent.h>
2633 _ACEOF
2634 if { (eval echo "$as_me:2634: \"$ac_cpp conftest.$ac_ext\"") >&5
2635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2636   ac_status=$?
2637   egrep -v '^ *\+' conftest.er1 >conftest.err
2638   rm -f conftest.er1
2639   cat conftest.err >&5
2640   echo "$as_me:2640: \$? = $ac_status" >&5
2641   (exit $ac_status); } >/dev/null; then
2642   if test -s conftest.err; then
2643     ac_cpp_err=$ac_c_preproc_warn_flag
2644   else
2645     ac_cpp_err=
2646   fi
2647 else
2648   ac_cpp_err=yes
2649 fi
2650 if test -z "$ac_cpp_err"; then
2651   # Broken: success on invalid input.
2652 continue
2653 else
2654   echo "$as_me: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   # Passes both tests.
2657 ac_preproc_ok=:
2658 break
2659 fi
2660 rm -f conftest.err conftest.$ac_ext
2661
2662 done
2663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2664 rm -f conftest.err conftest.$ac_ext
2665 if $ac_preproc_ok; then
2666   break
2667 fi
2668
2669     done
2670     ac_cv_prog_CPP=$CPP
2671
2672 fi
2673   CPP=$ac_cv_prog_CPP
2674 else
2675   ac_cv_prog_CPP=$CPP
2676 fi
2677 echo "$as_me:2677: result: $CPP" >&5
2678 echo "${ECHO_T}$CPP" >&6
2679 ac_preproc_ok=false
2680 for ac_c_preproc_warn_flag in '' yes
2681 do
2682   # Use a header file that comes with gcc, so configuring glibc
2683   # with a fresh cross-compiler works.
2684   # On the NeXT, cc -E runs the code through the compiler's parser,
2685   # not just through cpp. "Syntax error" is here to catch this case.
2686   cat >conftest.$ac_ext <<_ACEOF
2687 #line 2687 "configure"
2688 #include "confdefs.h"
2689 #include <assert.h>
2690                      Syntax error
2691 _ACEOF
2692 if { (eval echo "$as_me:2692: \"$ac_cpp conftest.$ac_ext\"") >&5
2693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2694   ac_status=$?
2695   egrep -v '^ *\+' conftest.er1 >conftest.err
2696   rm -f conftest.er1
2697   cat conftest.err >&5
2698   echo "$as_me:2698: \$? = $ac_status" >&5
2699   (exit $ac_status); } >/dev/null; then
2700   if test -s conftest.err; then
2701     ac_cpp_err=$ac_c_preproc_warn_flag
2702   else
2703     ac_cpp_err=
2704   fi
2705 else
2706   ac_cpp_err=yes
2707 fi
2708 if test -z "$ac_cpp_err"; then
2709   :
2710 else
2711   echo "$as_me: failed program was:" >&5
2712   cat conftest.$ac_ext >&5
2713   # Broken: fails on valid input.
2714 continue
2715 fi
2716 rm -f conftest.err conftest.$ac_ext
2717
2718   # OK, works on sane cases.  Now check whether non-existent headers
2719   # can be detected and how.
2720   cat >conftest.$ac_ext <<_ACEOF
2721 #line 2721 "configure"
2722 #include "confdefs.h"
2723 #include <ac_nonexistent.h>
2724 _ACEOF
2725 if { (eval echo "$as_me:2725: \"$ac_cpp conftest.$ac_ext\"") >&5
2726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2727   ac_status=$?
2728   egrep -v '^ *\+' conftest.er1 >conftest.err
2729   rm -f conftest.er1
2730   cat conftest.err >&5
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); } >/dev/null; then
2733   if test -s conftest.err; then
2734     ac_cpp_err=$ac_c_preproc_warn_flag
2735   else
2736     ac_cpp_err=
2737   fi
2738 else
2739   ac_cpp_err=yes
2740 fi
2741 if test -z "$ac_cpp_err"; then
2742   # Broken: success on invalid input.
2743 continue
2744 else
2745   echo "$as_me: failed program was:" >&5
2746   cat conftest.$ac_ext >&5
2747   # Passes both tests.
2748 ac_preproc_ok=:
2749 break
2750 fi
2751 rm -f conftest.err conftest.$ac_ext
2752
2753 done
2754 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2755 rm -f conftest.err conftest.$ac_ext
2756 if $ac_preproc_ok; then
2757   :
2758 else
2759   { { echo "$as_me:2759: error: C preprocessor \"$CPP\" fails sanity check" >&5
2760 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2761    { (exit 1); exit 1; }; }
2762 fi
2763
2764 ac_ext=c
2765 ac_cpp='$CPP $CPPFLAGS'
2766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769 ac_main_return=return
2770
2771 if test $ac_cv_c_compiler_gnu = yes; then
2772     echo "$as_me:2772: checking whether $CC needs -traditional" >&5
2773 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2774 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777     ac_pattern="Autoconf.*'x'"
2778   cat >conftest.$ac_ext <<_ACEOF
2779 #line 2779 "configure"
2780 #include "confdefs.h"
2781 #include <sgtty.h>
2782 int Autoconf = TIOCGETP;
2783 _ACEOF
2784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2785   egrep "$ac_pattern" >/dev/null 2>&1; then
2786   ac_cv_prog_gcc_traditional=yes
2787 else
2788   ac_cv_prog_gcc_traditional=no
2789 fi
2790 rm -rf conftest*
2791
2792   if test $ac_cv_prog_gcc_traditional = no; then
2793     cat >conftest.$ac_ext <<_ACEOF
2794 #line 2794 "configure"
2795 #include "confdefs.h"
2796 #include <termio.h>
2797 int Autoconf = TCGETA;
2798 _ACEOF
2799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2800   egrep "$ac_pattern" >/dev/null 2>&1; then
2801   ac_cv_prog_gcc_traditional=yes
2802 fi
2803 rm -rf conftest*
2804
2805   fi
2806 fi
2807 echo "$as_me:2807: result: $ac_cv_prog_gcc_traditional" >&5
2808 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2809   if test $ac_cv_prog_gcc_traditional = yes; then
2810     CC="$CC -traditional"
2811   fi
2812 fi
2813
2814 echo "$as_me:2814: checking whether $CC understands -c and -o together" >&5
2815 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2816 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819
2820 cat > conftest.$ac_ext <<CF_EOF
2821 int main(void)
2822 {
2823         ${cf_cv_main_return:-return}(0);
2824 }
2825 CF_EOF
2826 # We do the test twice because some compilers refuse to overwrite an
2827 # existing .o file with -o, though they will create one.
2828 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2829 if { (eval echo "$as_me:2829: \"$ac_try\"") >&5
2830   (eval $ac_try) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); } &&
2834   test -f conftest2.$ac_objext && { (eval echo "$as_me:2834: \"$ac_try\"") >&5
2835   (eval $ac_try) 2>&5
2836   ac_status=$?
2837   echo "$as_me:2837: \$? = $ac_status" >&5
2838   (exit $ac_status); };
2839 then
2840   eval cf_cv_prog_CC_c_o=yes
2841 else
2842   eval cf_cv_prog_CC_c_o=no
2843 fi
2844 rm -rf conftest*
2845
2846 fi
2847 if test $cf_cv_prog_CC_c_o = yes; then
2848   echo "$as_me:2848: result: yes" >&5
2849 echo "${ECHO_T}yes" >&6
2850 else
2851   echo "$as_me:2851: result: no" >&5
2852 echo "${ECHO_T}no" >&6
2853 fi
2854
2855 if test "$cross_compiling" = yes ; then
2856         LDCONFIG=:
2857 else
2858         case "$cf_cv_system_name" in
2859         (dragonfly*|mirbsd*|freebsd*)
2860                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2861                 ;;
2862         (*) LDPATH=$PATH:/sbin:/usr/sbin
2863                 # Extract the first word of "ldconfig", so it can be a program name with args.
2864 set dummy ldconfig; ac_word=$2
2865 echo "$as_me:2865: checking for $ac_word" >&5
2866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2867 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870   case $LDCONFIG in
2871   [\\/]* | ?:[\\/]*)
2872   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2873   ;;
2874   *)
2875   ac_save_IFS=$IFS; IFS=$ac_path_separator
2876 ac_dummy="$LDPATH"
2877 for ac_dir in $ac_dummy; do
2878   IFS=$ac_save_IFS
2879   test -z "$ac_dir" && ac_dir=.
2880   if $as_executable_p "$ac_dir/$ac_word"; then
2881    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2882    echo "$as_me:2882: found $ac_dir/$ac_word" >&5
2883    break
2884 fi
2885 done
2886
2887   ;;
2888 esac
2889 fi
2890 LDCONFIG=$ac_cv_path_LDCONFIG
2891
2892 if test -n "$LDCONFIG"; then
2893   echo "$as_me:2893: result: $LDCONFIG" >&5
2894 echo "${ECHO_T}$LDCONFIG" >&6
2895 else
2896   echo "$as_me:2896: result: no" >&5
2897 echo "${ECHO_T}no" >&6
2898 fi
2899
2900                 ;;
2901         esac
2902 fi
2903
2904 echo "$as_me:2904: checking if you want to ensure bool is consistent with C++" >&5
2905 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2906
2907 # Check whether --with-cxx or --without-cxx was given.
2908 if test "${with_cxx+set}" = set; then
2909   withval="$with_cxx"
2910   cf_with_cxx=$withval
2911 else
2912   cf_with_cxx=yes
2913 fi;
2914 echo "$as_me:2914: result: $cf_with_cxx" >&5
2915 echo "${ECHO_T}$cf_with_cxx" >&6
2916 if test "X$cf_with_cxx" = Xno ; then
2917         CXX=""
2918         GXX=""
2919 else
2920         # with autoconf 2.13, we can change the error to a warning:
2921                 ac_ext=cc
2922 ac_cpp='$CXXCPP $CPPFLAGS'
2923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2926 ac_main_return=return
2927 if test -n "$ac_tool_prefix"; then
2928   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2929   do
2930     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2931 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2932 echo "$as_me:2932: checking for $ac_word" >&5
2933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2934 if test "${ac_cv_prog_CXX+set}" = set; then
2935   echo $ECHO_N "(cached) $ECHO_C" >&6
2936 else
2937   if test -n "$CXX"; then
2938   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2939 else
2940   ac_save_IFS=$IFS; IFS=$ac_path_separator
2941 ac_dummy="$PATH"
2942 for ac_dir in $ac_dummy; do
2943   IFS=$ac_save_IFS
2944   test -z "$ac_dir" && ac_dir=.
2945   $as_executable_p "$ac_dir/$ac_word" || continue
2946 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2947 echo "$as_me:2947: found $ac_dir/$ac_word" >&5
2948 break
2949 done
2950
2951 fi
2952 fi
2953 CXX=$ac_cv_prog_CXX
2954 if test -n "$CXX"; then
2955   echo "$as_me:2955: result: $CXX" >&5
2956 echo "${ECHO_T}$CXX" >&6
2957 else
2958   echo "$as_me:2958: result: no" >&5
2959 echo "${ECHO_T}no" >&6
2960 fi
2961
2962     test -n "$CXX" && break
2963   done
2964 fi
2965 if test -z "$CXX"; then
2966   ac_ct_CXX=$CXX
2967   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2968 do
2969   # Extract the first word of "$ac_prog", so it can be a program name with args.
2970 set dummy $ac_prog; ac_word=$2
2971 echo "$as_me:2971: checking for $ac_word" >&5
2972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2973 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   if test -n "$ac_ct_CXX"; then
2977   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2978 else
2979   ac_save_IFS=$IFS; IFS=$ac_path_separator
2980 ac_dummy="$PATH"
2981 for ac_dir in $ac_dummy; do
2982   IFS=$ac_save_IFS
2983   test -z "$ac_dir" && ac_dir=.
2984   $as_executable_p "$ac_dir/$ac_word" || continue
2985 ac_cv_prog_ac_ct_CXX="$ac_prog"
2986 echo "$as_me:2986: found $ac_dir/$ac_word" >&5
2987 break
2988 done
2989
2990 fi
2991 fi
2992 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2993 if test -n "$ac_ct_CXX"; then
2994   echo "$as_me:2994: result: $ac_ct_CXX" >&5
2995 echo "${ECHO_T}$ac_ct_CXX" >&6
2996 else
2997   echo "$as_me:2997: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999 fi
3000
3001   test -n "$ac_ct_CXX" && break
3002 done
3003 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3004
3005   CXX=$ac_ct_CXX
3006 fi
3007
3008 # Provide some information about the compiler.
3009 echo "$as_me:3009:" \
3010      "checking for C++ compiler version" >&5
3011 ac_compiler=`set X $ac_compile; echo $2`
3012 { (eval echo "$as_me:3012: \"$ac_compiler --version </dev/null >&5\"") >&5
3013   (eval $ac_compiler --version </dev/null >&5) 2>&5
3014   ac_status=$?
3015   echo "$as_me:3015: \$? = $ac_status" >&5
3016   (exit $ac_status); }
3017 { (eval echo "$as_me:3017: \"$ac_compiler -v </dev/null >&5\"") >&5
3018   (eval $ac_compiler -v </dev/null >&5) 2>&5
3019   ac_status=$?
3020   echo "$as_me:3020: \$? = $ac_status" >&5
3021   (exit $ac_status); }
3022 { (eval echo "$as_me:3022: \"$ac_compiler -V </dev/null >&5\"") >&5
3023   (eval $ac_compiler -V </dev/null >&5) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); }
3027
3028 echo "$as_me:3028: checking whether we are using the GNU C++ compiler" >&5
3029 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3030 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3031   echo $ECHO_N "(cached) $ECHO_C" >&6
3032 else
3033   cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036
3037 int
3038 main (void)
3039 {
3040 #ifndef __GNUC__
3041        choke me
3042 #endif
3043
3044   ;
3045   return 0;
3046 }
3047 _ACEOF
3048 rm -f conftest.$ac_objext
3049 if { (eval echo "$as_me:3049: \"$ac_compile\"") >&5
3050   (eval $ac_compile) 2>&5
3051   ac_status=$?
3052   echo "$as_me:3052: \$? = $ac_status" >&5
3053   (exit $ac_status); } &&
3054          { ac_try='test -s conftest.$ac_objext'
3055   { (eval echo "$as_me:3055: \"$ac_try\"") >&5
3056   (eval $ac_try) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); }; }; then
3060   ac_compiler_gnu=yes
3061 else
3062   echo "$as_me: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
3064 ac_compiler_gnu=no
3065 fi
3066 rm -f conftest.$ac_objext conftest.$ac_ext
3067 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3068
3069 fi
3070 echo "$as_me:3070: result: $ac_cv_cxx_compiler_gnu" >&5
3071 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3072 GXX=`test $ac_compiler_gnu = yes && echo yes`
3073 ac_test_CXXFLAGS=${CXXFLAGS+set}
3074 ac_save_CXXFLAGS=$CXXFLAGS
3075 CXXFLAGS="-g"
3076 echo "$as_me:3076: checking whether $CXX accepts -g" >&5
3077 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3078 if test "${ac_cv_prog_cxx_g+set}" = set; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081   cat >conftest.$ac_ext <<_ACEOF
3082 #line 3082 "configure"
3083 #include "confdefs.h"
3084
3085 int
3086 main (void)
3087 {
3088
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 rm -f conftest.$ac_objext
3094 if { (eval echo "$as_me:3094: \"$ac_compile\"") >&5
3095   (eval $ac_compile) 2>&5
3096   ac_status=$?
3097   echo "$as_me:3097: \$? = $ac_status" >&5
3098   (exit $ac_status); } &&
3099          { ac_try='test -s conftest.$ac_objext'
3100   { (eval echo "$as_me:3100: \"$ac_try\"") >&5
3101   (eval $ac_try) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); }; }; then
3105   ac_cv_prog_cxx_g=yes
3106 else
3107   echo "$as_me: failed program was:" >&5
3108 cat conftest.$ac_ext >&5
3109 ac_cv_prog_cxx_g=no
3110 fi
3111 rm -f conftest.$ac_objext conftest.$ac_ext
3112 fi
3113 echo "$as_me:3113: result: $ac_cv_prog_cxx_g" >&5
3114 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3115 if test "$ac_test_CXXFLAGS" = set; then
3116   CXXFLAGS=$ac_save_CXXFLAGS
3117 elif test $ac_cv_prog_cxx_g = yes; then
3118   if test "$GXX" = yes; then
3119     CXXFLAGS="-g -O2"
3120   else
3121     CXXFLAGS="-g"
3122   fi
3123 else
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-O2"
3126   else
3127     CXXFLAGS=
3128   fi
3129 fi
3130 for ac_declaration in \
3131    ''\
3132    '#include <stdlib.h>' \
3133    'extern "C" void std::exit (int) throw (); using std::exit;' \
3134    'extern "C" void std::exit (int); using std::exit;' \
3135    'extern "C" void exit (int) throw ();' \
3136    'extern "C" void exit (int);' \
3137    'void exit (int);'
3138 do
3139   cat >conftest.$ac_ext <<_ACEOF
3140 #line 3140 "configure"
3141 #include "confdefs.h"
3142 #include <stdlib.h>
3143 $ac_declaration
3144 int
3145 main (void)
3146 {
3147 exit (42);
3148   ;
3149   return 0;
3150 }
3151 _ACEOF
3152 rm -f conftest.$ac_objext
3153 if { (eval echo "$as_me:3153: \"$ac_compile\"") >&5
3154   (eval $ac_compile) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); } &&
3158          { ac_try='test -s conftest.$ac_objext'
3159   { (eval echo "$as_me:3159: \"$ac_try\"") >&5
3160   (eval $ac_try) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); }; }; then
3164   :
3165 else
3166   echo "$as_me: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3168 continue
3169 fi
3170 rm -f conftest.$ac_objext conftest.$ac_ext
3171   cat >conftest.$ac_ext <<_ACEOF
3172 #line 3172 "configure"
3173 #include "confdefs.h"
3174 $ac_declaration
3175 int
3176 main (void)
3177 {
3178 exit (42);
3179   ;
3180   return 0;
3181 }
3182 _ACEOF
3183 rm -f conftest.$ac_objext
3184 if { (eval echo "$as_me:3184: \"$ac_compile\"") >&5
3185   (eval $ac_compile) 2>&5
3186   ac_status=$?
3187   echo "$as_me:3187: \$? = $ac_status" >&5
3188   (exit $ac_status); } &&
3189          { ac_try='test -s conftest.$ac_objext'
3190   { (eval echo "$as_me:3190: \"$ac_try\"") >&5
3191   (eval $ac_try) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); }; }; then
3195   break
3196 else
3197   echo "$as_me: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 fi
3200 rm -f conftest.$ac_objext conftest.$ac_ext
3201 done
3202 rm -rf conftest*
3203 if test -n "$ac_declaration"; then
3204   echo '#ifdef __cplusplus' >>confdefs.h
3205   echo $ac_declaration      >>confdefs.h
3206   echo '#endif'             >>confdefs.h
3207 fi
3208
3209 ac_ext=c
3210 ac_cpp='$CPP $CPPFLAGS'
3211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3214 ac_main_return=return
3215
3216         ac_ext=cc
3217 ac_cpp='$CXXCPP $CPPFLAGS'
3218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3221 ac_main_return=return
3222
3223         if test "x$cf_with_cxx" != xno
3224         then
3225                 # Several of the C++ configurations do not work, particularly when
3226                 # cross-compiling (20140913 -TD)
3227                 echo "$as_me:3227: checking if $CXX works" >&5
3228 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3229
3230                 save_CPPFLAGS="$CPPFLAGS"
3231                 eval cf_includedir=${includedir}
3232                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3233
3234 cat >conftest.$ac_ext <<_ACEOF
3235 #line 3235 "configure"
3236 #include "confdefs.h"
3237
3238 #include <stdlib.h>
3239 #include <stdio.h>
3240
3241 int
3242 main (void)
3243 {
3244
3245                 printf("Hello world!\n")
3246
3247   ;
3248   return 0;
3249 }
3250 _ACEOF
3251 rm -f conftest.$ac_objext
3252 if { (eval echo "$as_me:3252: \"$ac_compile\"") >&5
3253   (eval $ac_compile) 2>&5
3254   ac_status=$?
3255   echo "$as_me:3255: \$? = $ac_status" >&5
3256   (exit $ac_status); } &&
3257          { ac_try='test -s conftest.$ac_objext'
3258   { (eval echo "$as_me:3258: \"$ac_try\"") >&5
3259   (eval $ac_try) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); }; }; then
3263   cf_cxx_works=yes
3264 else
3265   echo "$as_me: failed program was:" >&5
3266 cat conftest.$ac_ext >&5
3267 cf_cxx_works=no
3268 fi
3269 rm -f conftest.$ac_objext conftest.$ac_ext
3270                 CPPFLAGS="$save_CPPFLAGS"
3271
3272                 echo "$as_me:3272: result: $cf_cxx_works" >&5
3273 echo "${ECHO_T}$cf_cxx_works" >&6
3274                 if test "x$cf_cxx_works" = xno
3275                 then
3276                         { echo "$as_me:3276: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3277 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3278                         cf_with_cxx=no; CXX=""; GXX="";
3279                 fi
3280         fi
3281         ac_ext=c
3282 ac_cpp='$CPP $CPPFLAGS'
3283 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3284 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3285 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3286 ac_main_return=return
3287
3288         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3289         if test "$CXX" = "g++" ; then
3290                 # Extract the first word of "g++", so it can be a program name with args.
3291 set dummy g++; ac_word=$2
3292 echo "$as_me:3292: checking for $ac_word" >&5
3293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3294 if test "${ac_cv_path_CXX+set}" = set; then
3295   echo $ECHO_N "(cached) $ECHO_C" >&6
3296 else
3297   case $CXX in
3298   [\\/]* | ?:[\\/]*)
3299   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3300   ;;
3301   *)
3302   ac_save_IFS=$IFS; IFS=$ac_path_separator
3303 ac_dummy="$PATH"
3304 for ac_dir in $ac_dummy; do
3305   IFS=$ac_save_IFS
3306   test -z "$ac_dir" && ac_dir=.
3307   if $as_executable_p "$ac_dir/$ac_word"; then
3308    ac_cv_path_CXX="$ac_dir/$ac_word"
3309    echo "$as_me:3309: found $ac_dir/$ac_word" >&5
3310    break
3311 fi
3312 done
3313
3314   ;;
3315 esac
3316 fi
3317 CXX=$ac_cv_path_CXX
3318
3319 if test -n "$CXX"; then
3320   echo "$as_me:3320: result: $CXX" >&5
3321 echo "${ECHO_T}$CXX" >&6
3322 else
3323   echo "$as_me:3323: result: no" >&5
3324 echo "${ECHO_T}no" >&6
3325 fi
3326
3327         fi
3328         case "x$CXX" in
3329         (x|xg++)
3330                 { echo "$as_me:3330: WARNING: You don't have any C++ compiler, too bad" >&5
3331 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3332                 cf_with_cxx=no; CXX=""; GXX="";
3333                 ;;
3334         esac
3335 fi
3336
3337 GXX_VERSION=none
3338 if test "$GXX" = yes; then
3339         echo "$as_me:3339: checking version of ${CXX:-g++}" >&5
3340 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3341         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3342         if test -z "$GXX_VERSION"
3343         then
3344                 GXX_VERSION=unknown
3345                 GXX=no
3346         fi
3347         echo "$as_me:3347: result: $GXX_VERSION" >&5
3348 echo "${ECHO_T}$GXX_VERSION" >&6
3349 fi
3350
3351 case $GXX_VERSION in
3352 (1*|2.[0-6]*)
3353         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3354         # cf_cxx_library=no
3355         { echo "$as_me:3355: WARNING: templates do not work" >&5
3356 echo "$as_me: WARNING: templates do not work" >&2;}
3357         ;;
3358 esac
3359
3360 echo "$as_me:3360: checking if you want to build C++ binding and demo" >&5
3361 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3362
3363 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3364 if test "${with_cxx_binding+set}" = set; then
3365   withval="$with_cxx_binding"
3366   cf_with_cxx_binding=$withval
3367 else
3368   cf_with_cxx_binding=$cf_with_cxx
3369 fi;
3370 echo "$as_me:3370: result: $cf_with_cxx_binding" >&5
3371 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3372
3373 echo "$as_me:3373: checking if you want to build with Ada" >&5
3374 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3375 echo "$as_me:3375: result: $cf_with_ada" >&5
3376 echo "${ECHO_T}$cf_with_ada" >&6
3377
3378 echo "$as_me:3378: checking if you want to install terminal database" >&5
3379 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3380
3381 # Check whether --enable-db-install or --disable-db-install was given.
3382 if test "${enable_db_install+set}" = set; then
3383   enableval="$enable_db_install"
3384   cf_with_db_install=$enableval
3385 else
3386   cf_with_db_install=yes
3387 fi;
3388 echo "$as_me:3388: result: $cf_with_db_install" >&5
3389 echo "${ECHO_T}$cf_with_db_install" >&6
3390
3391 echo "$as_me:3391: checking if you want to install manpages" >&5
3392 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3393
3394 # Check whether --with-manpages or --without-manpages was given.
3395 if test "${with_manpages+set}" = set; then
3396   withval="$with_manpages"
3397   cf_with_manpages=$withval
3398 else
3399   cf_with_manpages=yes
3400 fi;
3401 echo "$as_me:3401: result: $cf_with_manpages" >&5
3402 echo "${ECHO_T}$cf_with_manpages" >&6
3403
3404 echo "$as_me:3404: checking if you want to build programs such as tic" >&5
3405 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3406
3407 # Check whether --with-progs or --without-progs was given.
3408 if test "${with_progs+set}" = set; then
3409   withval="$with_progs"
3410   cf_with_progs=$withval
3411 else
3412   cf_with_progs=yes
3413 fi;
3414 echo "$as_me:3414: result: $cf_with_progs" >&5
3415 echo "${ECHO_T}$cf_with_progs" >&6
3416
3417 if test -f $srcdir/tack/tack.h; then
3418         if test "x$cross_compiling" = xyes ; then
3419                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3420
3421 echo "${as_me:-configure}:3421: testing ignoring tack because we are cross-compiling ..." 1>&5
3422
3423                 cf_with_tack=no
3424         else
3425                 echo "$as_me:3425: checking if you want to build the tack program" >&5
3426 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3427
3428 # Check whether --with-tack or --without-tack was given.
3429 if test "${with_tack+set}" = set; then
3430   withval="$with_tack"
3431   cf_with_tack=$withval
3432 else
3433   cf_with_tack=$cf_with_progs
3434 fi;
3435                 echo "$as_me:3435: result: $cf_with_tack" >&5
3436 echo "${ECHO_T}$cf_with_tack" >&6
3437         fi
3438 else
3439         cf_with_tack=no
3440 fi
3441
3442 echo "$as_me:3442: checking if you want to build test-programs" >&5
3443 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3444
3445 # Check whether --with-tests or --without-tests was given.
3446 if test "${with_tests+set}" = set; then
3447   withval="$with_tests"
3448   cf_with_tests=$withval
3449 else
3450   cf_with_tests=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_tests" >&5
3453 echo "${ECHO_T}$cf_with_tests" >&6
3454
3455 echo "$as_me:3455: checking if you wish to install curses.h" >&5
3456 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3457
3458 # Check whether --with-curses-h or --without-curses-h was given.
3459 if test "${with_curses_h+set}" = set; then
3460   withval="$with_curses_h"
3461   with_curses_h=$withval
3462 else
3463   with_curses_h=yes
3464 fi;
3465 echo "$as_me:3465: result: $with_curses_h" >&5
3466 echo "${ECHO_T}$with_curses_h" >&6
3467
3468 modules_to_build="ncurses"
3469 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3470 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3471 modules_to_build="$modules_to_build panel menu form"
3472
3473 test "$program_prefix" != NONE &&
3474   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3475 # Use a double $ so make ignores it.
3476 test "$program_suffix" != NONE &&
3477   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3478 # Double any \ or $.  echo might interpret backslashes.
3479 # By default was `s,x,x', remove it if useless.
3480 cat <<\_ACEOF >conftest.sed
3481 s/[\\$]/&&/g;s/;s,x,x,$//
3482 _ACEOF
3483 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3484 rm conftest.sed
3485
3486 for ac_prog in mawk gawk nawk awk
3487 do
3488   # Extract the first word of "$ac_prog", so it can be a program name with args.
3489 set dummy $ac_prog; ac_word=$2
3490 echo "$as_me:3490: checking for $ac_word" >&5
3491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3492 if test "${ac_cv_prog_AWK+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495   if test -n "$AWK"; then
3496   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3497 else
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   $as_executable_p "$ac_dir/$ac_word" || continue
3504 ac_cv_prog_AWK="$ac_prog"
3505 echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506 break
3507 done
3508
3509 fi
3510 fi
3511 AWK=$ac_cv_prog_AWK
3512 if test -n "$AWK"; then
3513   echo "$as_me:3513: result: $AWK" >&5
3514 echo "${ECHO_T}$AWK" >&6
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518 fi
3519
3520   test -n "$AWK" && break
3521 done
3522
3523 test -z "$AWK" && { { echo "$as_me:3523: error: No awk program found" >&5
3524 echo "$as_me: error: No awk program found" >&2;}
3525    { (exit 1); exit 1; }; }
3526
3527 echo "$as_me:3527: checking for egrep" >&5
3528 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3529 if test "${ac_cv_prog_egrep+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3533                 then ac_cv_prog_egrep='grep -E'
3534                 else ac_cv_prog_egrep='egrep'
3535         fi
3536 fi
3537 echo "$as_me:3537: result: $ac_cv_prog_egrep" >&5
3538 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3539         EGREP=$ac_cv_prog_egrep
3540
3541         test -z "$EGREP" && { { echo "$as_me:3541: error: No egrep program found" >&5
3542 echo "$as_me: error: No egrep program found" >&2;}
3543    { (exit 1); exit 1; }; }
3544
3545 # Find a good install program.  We prefer a C program (faster),
3546 # so one script is as good as another.  But avoid the broken or
3547 # incompatible versions:
3548 # SysV /etc/install, /usr/sbin/install
3549 # SunOS /usr/etc/install
3550 # IRIX /sbin/install
3551 # AIX /bin/install
3552 # AmigaOS /C/install, which installs bootblocks on floppy discs
3553 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3554 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3555 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3556 # ./install, which can be erroneously created by make from ./install.sh.
3557 echo "$as_me:3557: checking for a BSD compatible install" >&5
3558 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3559 if test -z "$INSTALL"; then
3560 if test "${ac_cv_path_install+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563     ac_save_IFS=$IFS; IFS=$ac_path_separator
3564   for ac_dir in $PATH; do
3565     IFS=$ac_save_IFS
3566     # Account for people who put trailing slashes in PATH elements.
3567     case $ac_dir/ in
3568     / | ./ | .// | /cC/* \
3569     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3570     | /usr/ucb/* ) ;;
3571     *)
3572       # OSF1 and SCO ODT 3.0 have their own names for install.
3573       # Don't use installbsd from OSF since it installs stuff as root
3574       # by default.
3575       for ac_prog in ginstall scoinst install; do
3576         if $as_executable_p "$ac_dir/$ac_prog"; then
3577           if test $ac_prog = install &&
3578             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3579             # AIX install.  It has an incompatible calling convention.
3580             :
3581           elif test $ac_prog = install &&
3582             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3583             # program-specific install script used by HP pwplus--don't use.
3584             :
3585           else
3586             ac_cv_path_install="$ac_dir/$ac_prog -c"
3587             break 2
3588           fi
3589         fi
3590       done
3591       ;;
3592     esac
3593   done
3594
3595 fi
3596   if test "${ac_cv_path_install+set}" = set; then
3597     INSTALL=$ac_cv_path_install
3598   else
3599     # As a last resort, use the slow shell script.  We don't cache a
3600     # path for INSTALL within a source directory, because that will
3601     # break other packages using the cache if that directory is
3602     # removed, or if the path is relative.
3603     INSTALL=$ac_install_sh
3604   fi
3605 fi
3606 echo "$as_me:3606: result: $INSTALL" >&5
3607 echo "${ECHO_T}$INSTALL" >&6
3608
3609 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3610 # It thinks the first close brace ends the variable substitution.
3611 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3612
3613 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3614
3615 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3616
3617 case $INSTALL in
3618 (/*)
3619         ;;
3620 (*)
3621         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3622         test -z "$cf_dir" && cf_dir=.
3623         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3624         ;;
3625 esac
3626
3627 for ac_prog in lint cppcheck splint
3628 do
3629   # Extract the first word of "$ac_prog", so it can be a program name with args.
3630 set dummy $ac_prog; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_LINT+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$LINT"; then
3637   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_LINT="$ac_prog"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650 fi
3651 fi
3652 LINT=$ac_cv_prog_LINT
3653 if test -n "$LINT"; then
3654   echo "$as_me:3654: result: $LINT" >&5
3655 echo "${ECHO_T}$LINT" >&6
3656 else
3657   echo "$as_me:3657: result: no" >&5
3658 echo "${ECHO_T}no" >&6
3659 fi
3660
3661   test -n "$LINT" && break
3662 done
3663
3664 case "x$LINT" in
3665 (xcppcheck|x*/cppcheck)
3666         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3667         ;;
3668 esac
3669
3670 echo "$as_me:3670: checking whether ln -s works" >&5
3671 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3672 LN_S=$as_ln_s
3673 if test "$LN_S" = "ln -s"; then
3674   echo "$as_me:3674: result: yes" >&5
3675 echo "${ECHO_T}yes" >&6
3676 else
3677   echo "$as_me:3677: result: no, using $LN_S" >&5
3678 echo "${ECHO_T}no, using $LN_S" >&6
3679 fi
3680
3681 echo "$as_me:3681: checking if $LN_S -f options work" >&5
3682 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3683
3684 rm -f conf$$.src conf$$dst
3685 echo >conf$$.dst
3686 echo first >conf$$.src
3687 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3688         cf_prog_ln_sf=yes
3689 else
3690         cf_prog_ln_sf=no
3691 fi
3692 rm -f conf$$.dst conf$$src
3693 echo "$as_me:3693: result: $cf_prog_ln_sf" >&5
3694 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3695
3696 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3697
3698 echo "$as_me:3698: checking for long file names" >&5
3699 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3700 if test "${ac_cv_sys_long_file_names+set}" = set; then
3701   echo $ECHO_N "(cached) $ECHO_C" >&6
3702 else
3703   ac_cv_sys_long_file_names=yes
3704 # Test for long file names in all the places we know might matter:
3705 #      .                the current directory, where building will happen
3706 #      $prefix/lib      where we will be installing things
3707 #      $exec_prefix/lib likewise
3708 # eval it to expand exec_prefix.
3709 #      $TMPDIR          if set, where it might want to write temporary files
3710 # if $TMPDIR is not set:
3711 #      /tmp             where it might want to write temporary files
3712 #      /var/tmp         likewise
3713 #      /usr/tmp         likewise
3714 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3715   ac_tmpdirs=$TMPDIR
3716 else
3717   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3718 fi
3719 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3720   test -d $ac_dir || continue
3721   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3722   ac_xdir=$ac_dir/cf$$
3723   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3724   ac_tf1=$ac_xdir/conftest9012345
3725   ac_tf2=$ac_xdir/conftest9012346
3726   (echo 1 >$ac_tf1) 2>/dev/null
3727   (echo 2 >$ac_tf2) 2>/dev/null
3728   ac_val=`cat $ac_tf1 2>/dev/null`
3729   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3730     ac_cv_sys_long_file_names=no
3731     rm -rf $ac_xdir 2>/dev/null
3732     break
3733   fi
3734   rm -rf $ac_xdir 2>/dev/null
3735 done
3736 fi
3737 echo "$as_me:3737: result: $ac_cv_sys_long_file_names" >&5
3738 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3739 if test $ac_cv_sys_long_file_names = yes; then
3740
3741 cat >>confdefs.h <<\EOF
3742 #define HAVE_LONG_FILE_NAMES 1
3743 EOF
3744
3745 fi
3746
3747 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3748 # of package conflict.
3749 cf_config_suffix=
3750
3751 # Check whether --with-config-suffix or --without-config-suffix was given.
3752 if test "${with_config_suffix+set}" = set; then
3753   withval="$with_config_suffix"
3754   case "x$withval" in
3755         (xyes|xno)
3756                 { echo "$as_me:3756: WARNING: expected a value for config-suffix option" >&5
3757 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3758                 ;;
3759         (*)     cf_config_suffix="$withval"
3760                 ;;
3761         esac
3762 fi;
3763
3764 # If we find pkg-config, check if we should install the ".pc" files.
3765
3766 echo "$as_me:3766: checking if you want to use pkg-config" >&5
3767 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3768
3769 # Check whether --with-pkg-config or --without-pkg-config was given.
3770 if test "${with_pkg_config+set}" = set; then
3771   withval="$with_pkg_config"
3772   cf_pkg_config=$withval
3773 else
3774   cf_pkg_config=yes
3775 fi;
3776 echo "$as_me:3776: result: $cf_pkg_config" >&5
3777 echo "${ECHO_T}$cf_pkg_config" >&6
3778
3779 case $cf_pkg_config in
3780 (no)
3781         PKG_CONFIG=none
3782         ;;
3783 (yes)
3784
3785 if test -n "$ac_tool_prefix"; then
3786   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3787 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3788 echo "$as_me:3788: checking for $ac_word" >&5
3789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   case $PKG_CONFIG in
3794   [\\/]* | ?:[\\/]*)
3795   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3796   ;;
3797   *)
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   if $as_executable_p "$ac_dir/$ac_word"; then
3804    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3805    echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806    break
3807 fi
3808 done
3809
3810   ;;
3811 esac
3812 fi
3813 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3814
3815 if test -n "$PKG_CONFIG"; then
3816   echo "$as_me:3816: result: $PKG_CONFIG" >&5
3817 echo "${ECHO_T}$PKG_CONFIG" >&6
3818 else
3819   echo "$as_me:3819: result: no" >&5
3820 echo "${ECHO_T}no" >&6
3821 fi
3822
3823 fi
3824 if test -z "$ac_cv_path_PKG_CONFIG"; then
3825   ac_pt_PKG_CONFIG=$PKG_CONFIG
3826   # Extract the first word of "pkg-config", so it can be a program name with args.
3827 set dummy pkg-config; ac_word=$2
3828 echo "$as_me:3828: checking for $ac_word" >&5
3829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3830 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833   case $ac_pt_PKG_CONFIG in
3834   [\\/]* | ?:[\\/]*)
3835   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3836   ;;
3837   *)
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   if $as_executable_p "$ac_dir/$ac_word"; then
3844    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3845    echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846    break
3847 fi
3848 done
3849
3850   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3851   ;;
3852 esac
3853 fi
3854 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3855
3856 if test -n "$ac_pt_PKG_CONFIG"; then
3857   echo "$as_me:3857: result: $ac_pt_PKG_CONFIG" >&5
3858 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3859 else
3860   echo "$as_me:3860: result: no" >&5
3861 echo "${ECHO_T}no" >&6
3862 fi
3863
3864   PKG_CONFIG=$ac_pt_PKG_CONFIG
3865 else
3866   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3867 fi
3868
3869         ;;
3870 (*)
3871         PKG_CONFIG=$withval
3872         ;;
3873 esac
3874
3875 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3876 if test "$PKG_CONFIG" != none ; then
3877
3878 if test "x$prefix" != xNONE; then
3879         cf_path_syntax="$prefix"
3880 else
3881         cf_path_syntax="$ac_default_prefix"
3882 fi
3883
3884 case ".$PKG_CONFIG" in
3885 (.\$\(*\)*|.\'*\'*)
3886         ;;
3887 (..|./*|.\\*)
3888         ;;
3889 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3890         ;;
3891 (.\${*prefix}*|.\${*dir}*)
3892         eval PKG_CONFIG="$PKG_CONFIG"
3893         case ".$PKG_CONFIG" in
3894         (.NONE/*)
3895                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3896                 ;;
3897         esac
3898         ;;
3899 (.no|.NONE/*)
3900         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3901         ;;
3902 (*)
3903         { { echo "$as_me:3903: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3904 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3905    { (exit 1); exit 1; }; }
3906         ;;
3907 esac
3908
3909 elif test "x$cf_pkg_config" != xno ; then
3910         { echo "$as_me:3910: WARNING: pkg-config is not installed" >&5
3911 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3912 fi
3913
3914 case $PKG_CONFIG in
3915 (no|none|yes)
3916         echo "$as_me:3916: checking for pkg-config library directory" >&5
3917 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3918         ;;
3919 (*)
3920         echo "$as_me:3920: checking for $PKG_CONFIG library directory" >&5
3921 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3922         ;;
3923 esac
3924
3925 PKG_CONFIG_LIBDIR=no
3926
3927 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3928 if test "${with_pkg_config_libdir+set}" = set; then
3929   withval="$with_pkg_config_libdir"
3930   PKG_CONFIG_LIBDIR=$withval
3931 else
3932   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3933 fi;
3934
3935 case x$PKG_CONFIG_LIBDIR in
3936 (x/*)
3937         ;;
3938 (xyes)
3939         # Look for the library directory using the same prefix as the executable
3940         if test "x$PKG_CONFIG" = xnone
3941         then
3942                 cf_path=$prefix
3943         else
3944                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3945         fi
3946
3947         # If you don't like using the default architecture, you have to specify the
3948         # intended library directory and corresponding compiler/linker options.
3949         #
3950         # This case allows for Debian's 2014-flavor of multiarch, along with the
3951         # most common variations before that point.  Some other variants spell the
3952         # directory differently, e.g., "pkg-config", and put it in unusual places.
3953         # pkg-config has always been poorly standardized, which is ironic...
3954         case x`(arch) 2>/dev/null` in
3955         (*64)
3956                 cf_search_path="\
3957                         $cf_path/lib/*64-linux-gnu \
3958                         $cf_path/share \
3959                         $cf_path/lib64 \
3960                         $cf_path/lib32 \
3961                         $cf_path/lib"
3962                 ;;
3963         (*)
3964                 cf_search_path="\
3965                         $cf_path/lib/*-linux-gnu \
3966                         $cf_path/share \
3967                         $cf_path/lib32 \
3968                         $cf_path/lib \
3969                         $cf_path/libdata"
3970                 ;;
3971         esac
3972
3973         test -n "$verbose" && echo "    list..." 1>&6
3974
3975 echo "${as_me:-configure}:3975: testing list... ..." 1>&5
3976
3977         for cf_config in $cf_search_path
3978         do
3979                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing checking $cf_config/pkgconfig ..." 1>&5
3982
3983                 if test -d $cf_config/pkgconfig
3984                 then
3985                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3986                         echo "$as_me:3986: checking done" >&5
3987 echo $ECHO_N "checking done... $ECHO_C" >&6
3988                         break
3989                 fi
3990         done
3991         ;;
3992 (*)
3993         ;;
3994 esac
3995
3996 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3997         echo "$as_me:3997: result: $PKG_CONFIG_LIBDIR" >&5
3998 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3999 fi
4000
4001 if test "x$PKG_CONFIG" != xnone
4002 then
4003         echo "$as_me:4003: checking if we should install .pc files for $PKG_CONFIG" >&5
4004 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4005 else
4006         echo "$as_me:4006: checking if we should install .pc files" >&5
4007 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4008 fi
4009
4010 # Check whether --enable-pc-files or --disable-pc-files was given.
4011 if test "${enable_pc_files+set}" = set; then
4012   enableval="$enable_pc_files"
4013   enable_pc_files=$enableval
4014 else
4015   enable_pc_files=no
4016 fi;
4017 echo "$as_me:4017: result: $enable_pc_files" >&5
4018 echo "${ECHO_T}$enable_pc_files" >&6
4019
4020 if test "x$enable_pc_files" != xno
4021 then
4022         MAKE_PC_FILES=
4023         case "x$PKG_CONFIG_LIBDIR" in
4024         (xno|xyes)
4025                 { echo "$as_me:4025: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4026 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4027                 ;;
4028         (*)
4029
4030 if test "x$prefix" != xNONE; then
4031         cf_path_syntax="$prefix"
4032 else
4033         cf_path_syntax="$ac_default_prefix"
4034 fi
4035
4036 case ".$PKG_CONFIG_LIBDIR" in
4037 (.\$\(*\)*|.\'*\'*)
4038         ;;
4039 (..|./*|.\\*)
4040         ;;
4041 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4042         ;;
4043 (.\${*prefix}*|.\${*dir}*)
4044         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4045         case ".$PKG_CONFIG_LIBDIR" in
4046         (.NONE/*)
4047                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4048                 ;;
4049         esac
4050         ;;
4051 (.no|.NONE/*)
4052         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4053         ;;
4054 (*)
4055         { { echo "$as_me:4055: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4056 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4057    { (exit 1); exit 1; }; }
4058         ;;
4059 esac
4060
4061                 ;;
4062         esac
4063 else
4064         MAKE_PC_FILES="#"
4065 fi
4066
4067 if test -z "$MAKE_PC_FILES"
4068 then
4069         echo "$as_me:4069: checking for suffix to add to pc-files" >&5
4070 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4071
4072 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4073 if test "${with_pc_suffix+set}" = set; then
4074   withval="$with_pc_suffix"
4075   case "x$withval" in
4076         (xyes|xno)
4077                 PC_MODULE_SUFFIX=
4078                 ;;
4079         (*)     PC_MODULE_SUFFIX="$withval"
4080                 ;;
4081         esac
4082 fi;
4083         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4084         echo "$as_me:4084: result: $PC_MODULE_SUFFIX" >&5
4085 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4086         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4087
4088 fi
4089
4090 echo "$as_me:4090: checking if we should assume mixed-case filenames" >&5
4091 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4092
4093 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4094 if test "${enable_mixed_case+set}" = set; then
4095   enableval="$enable_mixed_case"
4096   enable_mixedcase=$enableval
4097 else
4098   enable_mixedcase=auto
4099 fi;
4100 echo "$as_me:4100: result: $enable_mixedcase" >&5
4101 echo "${ECHO_T}$enable_mixedcase" >&6
4102 if test "$enable_mixedcase" = "auto" ; then
4103
4104 echo "$as_me:4104: checking if filesystem supports mixed-case filenames" >&5
4105 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4106 if test "${cf_cv_mixedcase+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110 if test "$cross_compiling" = yes ; then
4111         case $target_alias in
4112         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4113                 cf_cv_mixedcase=no
4114                 ;;
4115         (*)
4116                 cf_cv_mixedcase=yes
4117                 ;;
4118         esac
4119 else
4120         rm -f conftest CONFTEST
4121         echo test >conftest
4122         if test -f CONFTEST ; then
4123                 cf_cv_mixedcase=no
4124         else
4125                 cf_cv_mixedcase=yes
4126         fi
4127         rm -f conftest CONFTEST
4128 fi
4129
4130 fi
4131 echo "$as_me:4131: result: $cf_cv_mixedcase" >&5
4132 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4133 test "$cf_cv_mixedcase" = yes &&
4134 cat >>confdefs.h <<\EOF
4135 #define MIXEDCASE_FILENAMES 1
4136 EOF
4137
4138 else
4139         cf_cv_mixedcase=$enable_mixedcase
4140         if test "x$enable_mixedcase" = "xyes" ; then
4141
4142 cat >>confdefs.h <<\EOF
4143 #define MIXEDCASE_FILENAMES 1
4144 EOF
4145
4146         fi
4147 fi
4148
4149 # do this after mixed-case option (tags/TAGS is not as important as tic).
4150 echo "$as_me:4150: checking whether ${MAKE-make} sets \${MAKE}" >&5
4151 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4152 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4153 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4154   echo $ECHO_N "(cached) $ECHO_C" >&6
4155 else
4156   cat >conftest.make <<\EOF
4157 all:
4158         @echo 'ac_maketemp="${MAKE}"'
4159 EOF
4160 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4161 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4162 if test -n "$ac_maketemp"; then
4163   eval ac_cv_prog_make_${ac_make}_set=yes
4164 else
4165   eval ac_cv_prog_make_${ac_make}_set=no
4166 fi
4167 rm -f conftest.make
4168 fi
4169 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4170   echo "$as_me:4170: result: yes" >&5
4171 echo "${ECHO_T}yes" >&6
4172   SET_MAKE=
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176   SET_MAKE="MAKE=${MAKE-make}"
4177 fi
4178
4179 for ac_prog in exctags ctags
4180 do
4181   # Extract the first word of "$ac_prog", so it can be a program name with args.
4182 set dummy $ac_prog; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_CTAGS+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$CTAGS"; then
4189   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_CTAGS="$ac_prog"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202 fi
4203 fi
4204 CTAGS=$ac_cv_prog_CTAGS
4205 if test -n "$CTAGS"; then
4206   echo "$as_me:4206: result: $CTAGS" >&5
4207 echo "${ECHO_T}$CTAGS" >&6
4208 else
4209   echo "$as_me:4209: result: no" >&5
4210 echo "${ECHO_T}no" >&6
4211 fi
4212
4213   test -n "$CTAGS" && break
4214 done
4215
4216 for ac_prog in exetags etags
4217 do
4218   # Extract the first word of "$ac_prog", so it can be a program name with args.
4219 set dummy $ac_prog; ac_word=$2
4220 echo "$as_me:4220: checking for $ac_word" >&5
4221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222 if test "${ac_cv_prog_ETAGS+set}" = set; then
4223   echo $ECHO_N "(cached) $ECHO_C" >&6
4224 else
4225   if test -n "$ETAGS"; then
4226   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4227 else
4228   ac_save_IFS=$IFS; IFS=$ac_path_separator
4229 ac_dummy="$PATH"
4230 for ac_dir in $ac_dummy; do
4231   IFS=$ac_save_IFS
4232   test -z "$ac_dir" && ac_dir=.
4233   $as_executable_p "$ac_dir/$ac_word" || continue
4234 ac_cv_prog_ETAGS="$ac_prog"
4235 echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236 break
4237 done
4238
4239 fi
4240 fi
4241 ETAGS=$ac_cv_prog_ETAGS
4242 if test -n "$ETAGS"; then
4243   echo "$as_me:4243: result: $ETAGS" >&5
4244 echo "${ECHO_T}$ETAGS" >&6
4245 else
4246   echo "$as_me:4246: result: no" >&5
4247 echo "${ECHO_T}no" >&6
4248 fi
4249
4250   test -n "$ETAGS" && break
4251 done
4252
4253 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4254 set dummy ${CTAGS:-ctags}; ac_word=$2
4255 echo "$as_me:4255: checking for $ac_word" >&5
4256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4257 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4258   echo $ECHO_N "(cached) $ECHO_C" >&6
4259 else
4260   if test -n "$MAKE_LOWER_TAGS"; then
4261   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4262 else
4263   ac_save_IFS=$IFS; IFS=$ac_path_separator
4264 ac_dummy="$PATH"
4265 for ac_dir in $ac_dummy; do
4266   IFS=$ac_save_IFS
4267   test -z "$ac_dir" && ac_dir=.
4268   $as_executable_p "$ac_dir/$ac_word" || continue
4269 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4270 echo "$as_me:4270: found $ac_dir/$ac_word" >&5
4271 break
4272 done
4273
4274   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4275 fi
4276 fi
4277 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4278 if test -n "$MAKE_LOWER_TAGS"; then
4279   echo "$as_me:4279: result: $MAKE_LOWER_TAGS" >&5
4280 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4281 else
4282   echo "$as_me:4282: result: no" >&5
4283 echo "${ECHO_T}no" >&6
4284 fi
4285
4286 if test "$cf_cv_mixedcase" = yes ; then
4287         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4288 set dummy ${ETAGS:-etags}; ac_word=$2
4289 echo "$as_me:4289: checking for $ac_word" >&5
4290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4291 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4292   echo $ECHO_N "(cached) $ECHO_C" >&6
4293 else
4294   if test -n "$MAKE_UPPER_TAGS"; then
4295   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4296 else
4297   ac_save_IFS=$IFS; IFS=$ac_path_separator
4298 ac_dummy="$PATH"
4299 for ac_dir in $ac_dummy; do
4300   IFS=$ac_save_IFS
4301   test -z "$ac_dir" && ac_dir=.
4302   $as_executable_p "$ac_dir/$ac_word" || continue
4303 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4304 echo "$as_me:4304: found $ac_dir/$ac_word" >&5
4305 break
4306 done
4307
4308   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4309 fi
4310 fi
4311 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4312 if test -n "$MAKE_UPPER_TAGS"; then
4313   echo "$as_me:4313: result: $MAKE_UPPER_TAGS" >&5
4314 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4315 else
4316   echo "$as_me:4316: result: no" >&5
4317 echo "${ECHO_T}no" >&6
4318 fi
4319
4320 else
4321         MAKE_UPPER_TAGS=no
4322 fi
4323
4324 if test "$MAKE_UPPER_TAGS" = yes ; then
4325         MAKE_UPPER_TAGS=
4326 else
4327         MAKE_UPPER_TAGS="#"
4328 fi
4329
4330 if test "$MAKE_LOWER_TAGS" = yes ; then
4331         MAKE_LOWER_TAGS=
4332 else
4333         MAKE_LOWER_TAGS="#"
4334 fi
4335
4336 echo "$as_me:4336: checking for makeflags variable" >&5
4337 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4338 if test "${cf_cv_makeflags+set}" = set; then
4339   echo $ECHO_N "(cached) $ECHO_C" >&6
4340 else
4341
4342         cf_cv_makeflags=''
4343         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4344         do
4345                 cat >cf_makeflags.tmp <<CF_EOF
4346 SHELL = $SHELL
4347 all :
4348         @ echo '.$cf_option'
4349 CF_EOF
4350                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4351                 case "$cf_result" in
4352                 (.*k|.*kw)
4353                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4354                         case "$cf_result" in
4355                         (.*CC=*)        cf_cv_makeflags=
4356                                 ;;
4357                         (*)     cf_cv_makeflags=$cf_option
4358                                 ;;
4359                         esac
4360                         break
4361                         ;;
4362                 (.-)
4363                         ;;
4364                 (*)
4365
4366 echo "${as_me:-configure}:4366: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4367
4368                         ;;
4369                 esac
4370         done
4371         rm -f cf_makeflags.tmp
4372
4373 fi
4374 echo "$as_me:4374: result: $cf_cv_makeflags" >&5
4375 echo "${ECHO_T}$cf_cv_makeflags" >&6
4376
4377 if test -n "$ac_tool_prefix"; then
4378   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4379 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4380 echo "$as_me:4380: checking for $ac_word" >&5
4381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4382 if test "${ac_cv_prog_RANLIB+set}" = set; then
4383   echo $ECHO_N "(cached) $ECHO_C" >&6
4384 else
4385   if test -n "$RANLIB"; then
4386   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4387 else
4388   ac_save_IFS=$IFS; IFS=$ac_path_separator
4389 ac_dummy="$PATH"
4390 for ac_dir in $ac_dummy; do
4391   IFS=$ac_save_IFS
4392   test -z "$ac_dir" && ac_dir=.
4393   $as_executable_p "$ac_dir/$ac_word" || continue
4394 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4395 echo "$as_me:4395: found $ac_dir/$ac_word" >&5
4396 break
4397 done
4398
4399 fi
4400 fi
4401 RANLIB=$ac_cv_prog_RANLIB
4402 if test -n "$RANLIB"; then
4403   echo "$as_me:4403: result: $RANLIB" >&5
4404 echo "${ECHO_T}$RANLIB" >&6
4405 else
4406   echo "$as_me:4406: result: no" >&5
4407 echo "${ECHO_T}no" >&6
4408 fi
4409
4410 fi
4411 if test -z "$ac_cv_prog_RANLIB"; then
4412   ac_ct_RANLIB=$RANLIB
4413   # Extract the first word of "ranlib", so it can be a program name with args.
4414 set dummy ranlib; ac_word=$2
4415 echo "$as_me:4415: checking for $ac_word" >&5
4416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4417 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4418   echo $ECHO_N "(cached) $ECHO_C" >&6
4419 else
4420   if test -n "$ac_ct_RANLIB"; then
4421   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4422 else
4423   ac_save_IFS=$IFS; IFS=$ac_path_separator
4424 ac_dummy="$PATH"
4425 for ac_dir in $ac_dummy; do
4426   IFS=$ac_save_IFS
4427   test -z "$ac_dir" && ac_dir=.
4428   $as_executable_p "$ac_dir/$ac_word" || continue
4429 ac_cv_prog_ac_ct_RANLIB="ranlib"
4430 echo "$as_me:4430: found $ac_dir/$ac_word" >&5
4431 break
4432 done
4433
4434   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4435 fi
4436 fi
4437 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4438 if test -n "$ac_ct_RANLIB"; then
4439   echo "$as_me:4439: result: $ac_ct_RANLIB" >&5
4440 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4441 else
4442   echo "$as_me:4442: result: no" >&5
4443 echo "${ECHO_T}no" >&6
4444 fi
4445
4446   RANLIB=$ac_ct_RANLIB
4447 else
4448   RANLIB="$ac_cv_prog_RANLIB"
4449 fi
4450
4451 if test -n "$ac_tool_prefix"; then
4452   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4453 set dummy ${ac_tool_prefix}ld; ac_word=$2
4454 echo "$as_me:4454: checking for $ac_word" >&5
4455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4456 if test "${ac_cv_prog_LD+set}" = set; then
4457   echo $ECHO_N "(cached) $ECHO_C" >&6
4458 else
4459   if test -n "$LD"; then
4460   ac_cv_prog_LD="$LD" # Let the user override the test.
4461 else
4462   ac_save_IFS=$IFS; IFS=$ac_path_separator
4463 ac_dummy="$PATH"
4464 for ac_dir in $ac_dummy; do
4465   IFS=$ac_save_IFS
4466   test -z "$ac_dir" && ac_dir=.
4467   $as_executable_p "$ac_dir/$ac_word" || continue
4468 ac_cv_prog_LD="${ac_tool_prefix}ld"
4469 echo "$as_me:4469: found $ac_dir/$ac_word" >&5
4470 break
4471 done
4472
4473 fi
4474 fi
4475 LD=$ac_cv_prog_LD
4476 if test -n "$LD"; then
4477   echo "$as_me:4477: result: $LD" >&5
4478 echo "${ECHO_T}$LD" >&6
4479 else
4480   echo "$as_me:4480: result: no" >&5
4481 echo "${ECHO_T}no" >&6
4482 fi
4483
4484 fi
4485 if test -z "$ac_cv_prog_LD"; then
4486   ac_ct_LD=$LD
4487   # Extract the first word of "ld", so it can be a program name with args.
4488 set dummy ld; ac_word=$2
4489 echo "$as_me:4489: checking for $ac_word" >&5
4490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4491 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4492   echo $ECHO_N "(cached) $ECHO_C" >&6
4493 else
4494   if test -n "$ac_ct_LD"; then
4495   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4496 else
4497   ac_save_IFS=$IFS; IFS=$ac_path_separator
4498 ac_dummy="$PATH"
4499 for ac_dir in $ac_dummy; do
4500   IFS=$ac_save_IFS
4501   test -z "$ac_dir" && ac_dir=.
4502   $as_executable_p "$ac_dir/$ac_word" || continue
4503 ac_cv_prog_ac_ct_LD="ld"
4504 echo "$as_me:4504: found $ac_dir/$ac_word" >&5
4505 break
4506 done
4507
4508   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4509 fi
4510 fi
4511 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4512 if test -n "$ac_ct_LD"; then
4513   echo "$as_me:4513: result: $ac_ct_LD" >&5
4514 echo "${ECHO_T}$ac_ct_LD" >&6
4515 else
4516   echo "$as_me:4516: result: no" >&5
4517 echo "${ECHO_T}no" >&6
4518 fi
4519
4520   LD=$ac_ct_LD
4521 else
4522   LD="$ac_cv_prog_LD"
4523 fi
4524
4525 if test -n "$ac_tool_prefix"; then
4526   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4527 set dummy ${ac_tool_prefix}ar; ac_word=$2
4528 echo "$as_me:4528: checking for $ac_word" >&5
4529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4530 if test "${ac_cv_prog_AR+set}" = set; then
4531   echo $ECHO_N "(cached) $ECHO_C" >&6
4532 else
4533   if test -n "$AR"; then
4534   ac_cv_prog_AR="$AR" # Let the user override the test.
4535 else
4536   ac_save_IFS=$IFS; IFS=$ac_path_separator
4537 ac_dummy="$PATH"
4538 for ac_dir in $ac_dummy; do
4539   IFS=$ac_save_IFS
4540   test -z "$ac_dir" && ac_dir=.
4541   $as_executable_p "$ac_dir/$ac_word" || continue
4542 ac_cv_prog_AR="${ac_tool_prefix}ar"
4543 echo "$as_me:4543: found $ac_dir/$ac_word" >&5
4544 break
4545 done
4546
4547 fi
4548 fi
4549 AR=$ac_cv_prog_AR
4550 if test -n "$AR"; then
4551   echo "$as_me:4551: result: $AR" >&5
4552 echo "${ECHO_T}$AR" >&6
4553 else
4554   echo "$as_me:4554: result: no" >&5
4555 echo "${ECHO_T}no" >&6
4556 fi
4557
4558 fi
4559 if test -z "$ac_cv_prog_AR"; then
4560   ac_ct_AR=$AR
4561   # Extract the first word of "ar", so it can be a program name with args.
4562 set dummy ar; ac_word=$2
4563 echo "$as_me:4563: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_AR"; then
4569   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4570 else
4571   ac_save_IFS=$IFS; IFS=$ac_path_separator
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574   IFS=$ac_save_IFS
4575   test -z "$ac_dir" && ac_dir=.
4576   $as_executable_p "$ac_dir/$ac_word" || continue
4577 ac_cv_prog_ac_ct_AR="ar"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4583 fi
4584 fi
4585 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4586 if test -n "$ac_ct_AR"; then
4587   echo "$as_me:4587: result: $ac_ct_AR" >&5
4588 echo "${ECHO_T}$ac_ct_AR" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   AR=$ac_ct_AR
4595 else
4596   AR="$ac_cv_prog_AR"
4597 fi
4598
4599 if test -n "$ac_tool_prefix"; then
4600   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4601 set dummy ${ac_tool_prefix}nm; ac_word=$2
4602 echo "$as_me:4602: checking for $ac_word" >&5
4603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4604 if test "${ac_cv_prog_NM+set}" = set; then
4605   echo $ECHO_N "(cached) $ECHO_C" >&6
4606 else
4607   if test -n "$NM"; then
4608   ac_cv_prog_NM="$NM" # Let the user override the test.
4609 else
4610   ac_save_IFS=$IFS; IFS=$ac_path_separator
4611 ac_dummy="$PATH"
4612 for ac_dir in $ac_dummy; do
4613   IFS=$ac_save_IFS
4614   test -z "$ac_dir" && ac_dir=.
4615   $as_executable_p "$ac_dir/$ac_word" || continue
4616 ac_cv_prog_NM="${ac_tool_prefix}nm"
4617 echo "$as_me:4617: found $ac_dir/$ac_word" >&5
4618 break
4619 done
4620
4621 fi
4622 fi
4623 NM=$ac_cv_prog_NM
4624 if test -n "$NM"; then
4625   echo "$as_me:4625: result: $NM" >&5
4626 echo "${ECHO_T}$NM" >&6
4627 else
4628   echo "$as_me:4628: result: no" >&5
4629 echo "${ECHO_T}no" >&6
4630 fi
4631
4632 fi
4633 if test -z "$ac_cv_prog_NM"; then
4634   ac_ct_NM=$NM
4635   # Extract the first word of "nm", so it can be a program name with args.
4636 set dummy nm; ac_word=$2
4637 echo "$as_me:4637: checking for $ac_word" >&5
4638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4639 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4640   echo $ECHO_N "(cached) $ECHO_C" >&6
4641 else
4642   if test -n "$ac_ct_NM"; then
4643   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4644 else
4645   ac_save_IFS=$IFS; IFS=$ac_path_separator
4646 ac_dummy="$PATH"
4647 for ac_dir in $ac_dummy; do
4648   IFS=$ac_save_IFS
4649   test -z "$ac_dir" && ac_dir=.
4650   $as_executable_p "$ac_dir/$ac_word" || continue
4651 ac_cv_prog_ac_ct_NM="nm"
4652 echo "$as_me:4652: found $ac_dir/$ac_word" >&5
4653 break
4654 done
4655
4656   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4657 fi
4658 fi
4659 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4660 if test -n "$ac_ct_NM"; then
4661   echo "$as_me:4661: result: $ac_ct_NM" >&5
4662 echo "${ECHO_T}$ac_ct_NM" >&6
4663 else
4664   echo "$as_me:4664: result: no" >&5
4665 echo "${ECHO_T}no" >&6
4666 fi
4667
4668   NM=$ac_ct_NM
4669 else
4670   NM="$ac_cv_prog_NM"
4671 fi
4672
4673 if test -n "$ac_tool_prefix"; then
4674   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4675 set dummy ${ac_tool_prefix}ar; ac_word=$2
4676 echo "$as_me:4676: checking for $ac_word" >&5
4677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4678 if test "${ac_cv_prog_AR+set}" = set; then
4679   echo $ECHO_N "(cached) $ECHO_C" >&6
4680 else
4681   if test -n "$AR"; then
4682   ac_cv_prog_AR="$AR" # Let the user override the test.
4683 else
4684   ac_save_IFS=$IFS; IFS=$ac_path_separator
4685 ac_dummy="$PATH"
4686 for ac_dir in $ac_dummy; do
4687   IFS=$ac_save_IFS
4688   test -z "$ac_dir" && ac_dir=.
4689   $as_executable_p "$ac_dir/$ac_word" || continue
4690 ac_cv_prog_AR="${ac_tool_prefix}ar"
4691 echo "$as_me:4691: found $ac_dir/$ac_word" >&5
4692 break
4693 done
4694
4695 fi
4696 fi
4697 AR=$ac_cv_prog_AR
4698 if test -n "$AR"; then
4699   echo "$as_me:4699: result: $AR" >&5
4700 echo "${ECHO_T}$AR" >&6
4701 else
4702   echo "$as_me:4702: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706 fi
4707 if test -z "$ac_cv_prog_AR"; then
4708   ac_ct_AR=$AR
4709   # Extract the first word of "ar", so it can be a program name with args.
4710 set dummy ar; ac_word=$2
4711 echo "$as_me:4711: checking for $ac_word" >&5
4712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   if test -n "$ac_ct_AR"; then
4717   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4718 else
4719   ac_save_IFS=$IFS; IFS=$ac_path_separator
4720 ac_dummy="$PATH"
4721 for ac_dir in $ac_dummy; do
4722   IFS=$ac_save_IFS
4723   test -z "$ac_dir" && ac_dir=.
4724   $as_executable_p "$ac_dir/$ac_word" || continue
4725 ac_cv_prog_ac_ct_AR="ar"
4726 echo "$as_me:4726: found $ac_dir/$ac_word" >&5
4727 break
4728 done
4729
4730   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4731 fi
4732 fi
4733 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4734 if test -n "$ac_ct_AR"; then
4735   echo "$as_me:4735: result: $ac_ct_AR" >&5
4736 echo "${ECHO_T}$ac_ct_AR" >&6
4737 else
4738   echo "$as_me:4738: result: no" >&5
4739 echo "${ECHO_T}no" >&6
4740 fi
4741
4742   AR=$ac_ct_AR
4743 else
4744   AR="$ac_cv_prog_AR"
4745 fi
4746
4747 echo "$as_me:4747: checking for options to update archives" >&5
4748 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4749 if test "${cf_cv_ar_flags+set}" = set; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752
4753         cf_cv_ar_flags=unknown
4754         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4755         do
4756
4757                 # check if $ARFLAGS already contains this choice
4758                 if test "x$ARFLAGS" != "x" ; then
4759                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4760                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4761                                 cf_cv_ar_flags=
4762                                 break
4763                         fi
4764                 fi
4765
4766                 rm -f conftest.$ac_cv_objext
4767                 rm -f conftest.a
4768
4769                 cat >conftest.$ac_ext <<EOF
4770 #line 4770 "configure"
4771 int     testdata[3] = { 123, 456, 789 };
4772 EOF
4773                 if { (eval echo "$as_me:4773: \"$ac_compile\"") >&5
4774   (eval $ac_compile) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); } ; then
4778                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4779                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4780                         if test -f conftest.a ; then
4781                                 cf_cv_ar_flags=$cf_ar_flags
4782                                 break
4783                         fi
4784                 else
4785                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4786
4787 echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5
4788
4789                         break
4790                 fi
4791         done
4792         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4793
4794 fi
4795 echo "$as_me:4795: result: $cf_cv_ar_flags" >&5
4796 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4797
4798 if test -n "$ARFLAGS" ; then
4799         if test -n "$cf_cv_ar_flags" ; then
4800                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4801         fi
4802 else
4803         ARFLAGS=$cf_cv_ar_flags
4804 fi
4805
4806 echo "$as_me:4806: checking if you have specified an install-prefix" >&5
4807 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4808
4809 # Check whether --with-install-prefix or --without-install-prefix was given.
4810 if test "${with_install_prefix+set}" = set; then
4811   withval="$with_install_prefix"
4812   case "x$withval" in
4813         (xyes|xno)
4814                 ;;
4815         (*)     DESTDIR="$withval"
4816                 ;;
4817         esac
4818 fi;
4819 echo "$as_me:4819: result: $DESTDIR" >&5
4820 echo "${ECHO_T}$DESTDIR" >&6
4821
4822 ###############################################################################
4823
4824 # If we're cross-compiling, allow the user to override the tools and their
4825 # options.  The configure script is oriented toward identifying the host
4826 # compiler, etc., but we need a build compiler to generate parts of the source.
4827
4828 if test "$cross_compiling" = yes ; then
4829
4830         # defaults that we might want to override
4831         : ${BUILD_CFLAGS:=''}
4832         : ${BUILD_CPPFLAGS:=''}
4833         : ${BUILD_LDFLAGS:=''}
4834         : ${BUILD_LIBS:=''}
4835         : ${BUILD_EXEEXT:='$x'}
4836         : ${BUILD_OBJEXT:='o'}
4837
4838 # Check whether --with-build-cc or --without-build-cc was given.
4839 if test "${with_build_cc+set}" = set; then
4840   withval="$with_build_cc"
4841   BUILD_CC="$withval"
4842 else
4843   for ac_prog in gcc clang c99 c89 cc cl
4844 do
4845   # Extract the first word of "$ac_prog", so it can be a program name with args.
4846 set dummy $ac_prog; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$BUILD_CC"; then
4853   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_BUILD_CC="$ac_prog"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866 fi
4867 fi
4868 BUILD_CC=$ac_cv_prog_BUILD_CC
4869 if test -n "$BUILD_CC"; then
4870   echo "$as_me:4870: result: $BUILD_CC" >&5
4871 echo "${ECHO_T}$BUILD_CC" >&6
4872 else
4873   echo "$as_me:4873: result: no" >&5
4874 echo "${ECHO_T}no" >&6
4875 fi
4876
4877   test -n "$BUILD_CC" && break
4878 done
4879 test -n "$BUILD_CC" || BUILD_CC="none"
4880
4881 fi;
4882         echo "$as_me:4882: checking for native build C compiler" >&5
4883 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4884         echo "$as_me:4884: result: $BUILD_CC" >&5
4885 echo "${ECHO_T}$BUILD_CC" >&6
4886
4887         echo "$as_me:4887: checking for native build C preprocessor" >&5
4888 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4889
4890 # Check whether --with-build-cpp or --without-build-cpp was given.
4891 if test "${with_build_cpp+set}" = set; then
4892   withval="$with_build_cpp"
4893   BUILD_CPP="$withval"
4894 else
4895   BUILD_CPP='${BUILD_CC} -E'
4896 fi;
4897         echo "$as_me:4897: result: $BUILD_CPP" >&5
4898 echo "${ECHO_T}$BUILD_CPP" >&6
4899
4900         echo "$as_me:4900: checking for native build C flags" >&5
4901 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4902
4903 # Check whether --with-build-cflags or --without-build-cflags was given.
4904 if test "${with_build_cflags+set}" = set; then
4905   withval="$with_build_cflags"
4906   BUILD_CFLAGS="$withval"
4907 fi;
4908         echo "$as_me:4908: result: $BUILD_CFLAGS" >&5
4909 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4910
4911         echo "$as_me:4911: checking for native build C preprocessor-flags" >&5
4912 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4913
4914 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4915 if test "${with_build_cppflags+set}" = set; then
4916   withval="$with_build_cppflags"
4917   BUILD_CPPFLAGS="$withval"
4918 fi;
4919         echo "$as_me:4919: result: $BUILD_CPPFLAGS" >&5
4920 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4921
4922         echo "$as_me:4922: checking for native build linker-flags" >&5
4923 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4924
4925 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4926 if test "${with_build_ldflags+set}" = set; then
4927   withval="$with_build_ldflags"
4928   BUILD_LDFLAGS="$withval"
4929 fi;
4930         echo "$as_me:4930: result: $BUILD_LDFLAGS" >&5
4931 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4932
4933         echo "$as_me:4933: checking for native build linker-libraries" >&5
4934 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4935
4936 # Check whether --with-build-libs or --without-build-libs was given.
4937 if test "${with_build_libs+set}" = set; then
4938   withval="$with_build_libs"
4939   BUILD_LIBS="$withval"
4940 fi;
4941         echo "$as_me:4941: result: $BUILD_LIBS" >&5
4942 echo "${ECHO_T}$BUILD_LIBS" >&6
4943
4944         # this assumes we're on Unix.
4945         BUILD_EXEEXT=
4946         BUILD_OBJEXT=o
4947
4948         : ${BUILD_CC:='${CC}'}
4949
4950         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4951                 { { echo "$as_me:4951: error: Cross-build requires two compilers.
4952 Use --with-build-cc to specify the native compiler." >&5
4953 echo "$as_me: error: Cross-build requires two compilers.
4954 Use --with-build-cc to specify the native compiler." >&2;}
4955    { (exit 1); exit 1; }; }
4956         fi
4957
4958 else
4959         : ${BUILD_CC:='${CC}'}
4960         : ${BUILD_CPP:='${CPP}'}
4961         : ${BUILD_CFLAGS:='${CFLAGS}'}
4962         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4963         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4964         : ${BUILD_LIBS:='${LIBS}'}
4965         : ${BUILD_EXEEXT:='$x'}
4966         : ${BUILD_OBJEXT:='o'}
4967 fi
4968
4969 ###############################################################################
4970
4971 ### Options to allow the user to specify the set of libraries which are used.
4972 ### Use "--without-normal --with-shared" to allow the default model to be
4973 ### shared, for example.
4974 cf_list_models=""
4975
4976 echo "$as_me:4976: checking if libtool -version-number should be used" >&5
4977 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4978
4979 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4980 if test "${enable_libtool_version+set}" = set; then
4981   enableval="$enable_libtool_version"
4982   test "$enableval" != no && enableval=yes
4983         if test "$enableval" != "yes" ; then
4984     cf_libtool_version=no
4985         else
4986                 cf_libtool_version=yes
4987         fi
4988 else
4989   enableval=yes
4990         cf_libtool_version=yes
4991
4992 fi;
4993 echo "$as_me:4993: result: $cf_libtool_version" >&5
4994 echo "${ECHO_T}$cf_libtool_version" >&6
4995
4996 if test "$cf_libtool_version" = yes ; then
4997         LIBTOOL_VERSION="-version-number"
4998 else
4999         LIBTOOL_VERSION="-version-info"
5000         case "x$VERSION" in
5001         (x)
5002                 { echo "$as_me:5002: WARNING: VERSION was not set" >&5
5003 echo "$as_me: WARNING: VERSION was not set" >&2;}
5004                 ;;
5005         (x*.*.*)
5006                 ABI_VERSION="$VERSION"
5007                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5008
5009 echo "${as_me:-configure}:5009: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5010
5011                 ;;
5012         (x*:*:*)
5013                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5014                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5017
5018                 ;;
5019         (*)
5020                 { echo "$as_me:5020: WARNING: unexpected VERSION value: $VERSION" >&5
5021 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5022                 ;;
5023         esac
5024 fi
5025
5026 LIBTOOL=
5027
5028 # common library maintenance symbols that are convenient for libtool scripts:
5029 LIB_CREATE='${AR} -cr'
5030 LIB_OBJECT='${OBJECTS}'
5031 LIB_SUFFIX=.a
5032 LIB_PREP="$RANLIB"
5033
5034 # symbols used to prop libtool up to enable it to determine what it should be
5035 # doing:
5036 LIB_CLEAN=
5037 LIB_COMPILE=
5038 LIB_LINK='${CC}'
5039 LIB_INSTALL=
5040 LIB_UNINSTALL=
5041
5042 echo "$as_me:5042: checking if you want to build libraries with libtool" >&5
5043 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5044
5045 # Check whether --with-libtool or --without-libtool was given.
5046 if test "${with_libtool+set}" = set; then
5047   withval="$with_libtool"
5048   with_libtool=$withval
5049 else
5050   with_libtool=no
5051 fi;
5052 echo "$as_me:5052: result: $with_libtool" >&5
5053 echo "${ECHO_T}$with_libtool" >&6
5054 if test "$with_libtool" != "no"; then
5055
5056         if test "$with_libtool" != "yes" ; then
5057
5058 if test "x$prefix" != xNONE; then
5059         cf_path_syntax="$prefix"
5060 else
5061         cf_path_syntax="$ac_default_prefix"
5062 fi
5063
5064 case ".$with_libtool" in
5065 (.\$\(*\)*|.\'*\'*)
5066         ;;
5067 (..|./*|.\\*)
5068         ;;
5069 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5070         ;;
5071 (.\${*prefix}*|.\${*dir}*)
5072         eval with_libtool="$with_libtool"
5073         case ".$with_libtool" in
5074         (.NONE/*)
5075                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5076                 ;;
5077         esac
5078         ;;
5079 (.no|.NONE/*)
5080         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5081         ;;
5082 (*)
5083         { { echo "$as_me:5083: error: expected a pathname, not \"$with_libtool\"" >&5
5084 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5085    { (exit 1); exit 1; }; }
5086         ;;
5087 esac
5088
5089                 LIBTOOL=$with_libtool
5090         else
5091                 if test -n "$ac_tool_prefix"; then
5092   for ac_prog in libtool glibtool
5093   do
5094     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5095 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5096 echo "$as_me:5096: checking for $ac_word" >&5
5097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5098 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101   if test -n "$LIBTOOL"; then
5102   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5103 else
5104   ac_save_IFS=$IFS; IFS=$ac_path_separator
5105 ac_dummy="$PATH"
5106 for ac_dir in $ac_dummy; do
5107   IFS=$ac_save_IFS
5108   test -z "$ac_dir" && ac_dir=.
5109   $as_executable_p "$ac_dir/$ac_word" || continue
5110 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5111 echo "$as_me:5111: found $ac_dir/$ac_word" >&5
5112 break
5113 done
5114
5115 fi
5116 fi
5117 LIBTOOL=$ac_cv_prog_LIBTOOL
5118 if test -n "$LIBTOOL"; then
5119   echo "$as_me:5119: result: $LIBTOOL" >&5
5120 echo "${ECHO_T}$LIBTOOL" >&6
5121 else
5122   echo "$as_me:5122: result: no" >&5
5123 echo "${ECHO_T}no" >&6
5124 fi
5125
5126     test -n "$LIBTOOL" && break
5127   done
5128 fi
5129 if test -z "$LIBTOOL"; then
5130   ac_ct_LIBTOOL=$LIBTOOL
5131   for ac_prog in libtool glibtool
5132 do
5133   # Extract the first word of "$ac_prog", so it can be a program name with args.
5134 set dummy $ac_prog; ac_word=$2
5135 echo "$as_me:5135: checking for $ac_word" >&5
5136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5137 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5138   echo $ECHO_N "(cached) $ECHO_C" >&6
5139 else
5140   if test -n "$ac_ct_LIBTOOL"; then
5141   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5142 else
5143   ac_save_IFS=$IFS; IFS=$ac_path_separator
5144 ac_dummy="$PATH"
5145 for ac_dir in $ac_dummy; do
5146   IFS=$ac_save_IFS
5147   test -z "$ac_dir" && ac_dir=.
5148   $as_executable_p "$ac_dir/$ac_word" || continue
5149 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5150 echo "$as_me:5150: found $ac_dir/$ac_word" >&5
5151 break
5152 done
5153
5154 fi
5155 fi
5156 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5157 if test -n "$ac_ct_LIBTOOL"; then
5158   echo "$as_me:5158: result: $ac_ct_LIBTOOL" >&5
5159 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5160 else
5161   echo "$as_me:5161: result: no" >&5
5162 echo "${ECHO_T}no" >&6
5163 fi
5164
5165   test -n "$ac_ct_LIBTOOL" && break
5166 done
5167 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5168
5169   LIBTOOL=$ac_ct_LIBTOOL
5170 fi
5171
5172 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5173 then
5174         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5175 else
5176         cf_cv_libtool_version=
5177 fi
5178 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5179
5180                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5181                 then
5182
5183 unset ac_cv_prog_ac_ct_LIBTOOL
5184 unset ac_ct_LIBTOOL
5185 unset LIBTOOL
5186
5187                         if test -n "$ac_tool_prefix"; then
5188   for ac_prog in glibtool
5189   do
5190     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5191 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5192 echo "$as_me:5192: checking for $ac_word" >&5
5193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5194 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   if test -n "$LIBTOOL"; then
5198   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5199 else
5200   ac_save_IFS=$IFS; IFS=$ac_path_separator
5201 ac_dummy="$PATH"
5202 for ac_dir in $ac_dummy; do
5203   IFS=$ac_save_IFS
5204   test -z "$ac_dir" && ac_dir=.
5205   $as_executable_p "$ac_dir/$ac_word" || continue
5206 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5207 echo "$as_me:5207: found $ac_dir/$ac_word" >&5
5208 break
5209 done
5210
5211 fi
5212 fi
5213 LIBTOOL=$ac_cv_prog_LIBTOOL
5214 if test -n "$LIBTOOL"; then
5215   echo "$as_me:5215: result: $LIBTOOL" >&5
5216 echo "${ECHO_T}$LIBTOOL" >&6
5217 else
5218   echo "$as_me:5218: result: no" >&5
5219 echo "${ECHO_T}no" >&6
5220 fi
5221
5222     test -n "$LIBTOOL" && break
5223   done
5224 fi
5225 if test -z "$LIBTOOL"; then
5226   ac_ct_LIBTOOL=$LIBTOOL
5227   for ac_prog in glibtool
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 echo "$as_me:5231: checking for $ac_word" >&5
5232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5233 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5234   echo $ECHO_N "(cached) $ECHO_C" >&6
5235 else
5236   if test -n "$ac_ct_LIBTOOL"; then
5237   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5238 else
5239   ac_save_IFS=$IFS; IFS=$ac_path_separator
5240 ac_dummy="$PATH"
5241 for ac_dir in $ac_dummy; do
5242   IFS=$ac_save_IFS
5243   test -z "$ac_dir" && ac_dir=.
5244   $as_executable_p "$ac_dir/$ac_word" || continue
5245 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5246 echo "$as_me:5246: found $ac_dir/$ac_word" >&5
5247 break
5248 done
5249
5250 fi
5251 fi
5252 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5253 if test -n "$ac_ct_LIBTOOL"; then
5254   echo "$as_me:5254: result: $ac_ct_LIBTOOL" >&5
5255 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5256 else
5257   echo "$as_me:5257: result: no" >&5
5258 echo "${ECHO_T}no" >&6
5259 fi
5260
5261   test -n "$ac_ct_LIBTOOL" && break
5262 done
5263 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5264
5265   LIBTOOL=$ac_ct_LIBTOOL
5266 fi
5267
5268 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5269 then
5270         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5271 else
5272         cf_cv_libtool_version=
5273 fi
5274 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5275
5276                 fi
5277         fi
5278         if test -z "$LIBTOOL" ; then
5279                 { { echo "$as_me:5279: error: Cannot find libtool" >&5
5280 echo "$as_me: error: Cannot find libtool" >&2;}
5281    { (exit 1); exit 1; }; }
5282         fi
5283         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5284         LIB_OBJECT='${OBJECTS:.o=.lo}'
5285         LIB_SUFFIX=.la
5286         LIB_CLEAN='${LIBTOOL} --mode=clean'
5287         LIB_COMPILE='${LIBTOOL} --mode=compile'
5288         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5289         LIB_INSTALL='${LIBTOOL} --mode=install'
5290         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5291         LIB_PREP=:
5292
5293 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5294 then
5295         echo "$as_me:5295: checking version of $LIBTOOL" >&5
5296 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5297
5298 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5299 then
5300         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5301 else
5302         cf_cv_libtool_version=
5303 fi
5304 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5305
5306         echo "$as_me:5306: result: $cf_cv_libtool_version" >&5
5307 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5308         if test -z "$cf_cv_libtool_version" ; then
5309                 { { echo "$as_me:5309: error: This is not GNU libtool" >&5
5310 echo "$as_me: error: This is not GNU libtool" >&2;}
5311    { (exit 1); exit 1; }; }
5312         fi
5313 else
5314         { { echo "$as_me:5314: error: GNU libtool has not been found" >&5
5315 echo "$as_me: error: GNU libtool has not been found" >&2;}
5316    { (exit 1); exit 1; }; }
5317 fi
5318
5319         # special hack to add -no-undefined (which libtool should do for itself)
5320         LT_UNDEF=
5321         case "$cf_cv_system_name" in
5322         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5323                 LT_UNDEF=-no-undefined
5324                 ;;
5325         esac
5326
5327         # special hack to add --tag option for C++ compiler
5328         case $cf_cv_libtool_version in
5329         (1.[5-9]*|[2-9].[0-9.a-z]*)
5330                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5331                 LIBTOOL="$LIBTOOL --tag=CC"
5332                 ;;
5333         (*)
5334                 LIBTOOL_CXX="$LIBTOOL"
5335                 ;;
5336         esac
5337 else
5338         LIBTOOL=""
5339         LIBTOOL_CXX=""
5340 fi
5341
5342 test -z "$LIBTOOL" && ECHO_LT=
5343
5344 if test "$with_libtool" != "no" ; then
5345
5346 cf_list_models="$cf_list_models libtool"
5347
5348 else
5349
5350 echo "$as_me:5350: checking if you want to build shared libraries" >&5
5351 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5352
5353 # Check whether --with-shared or --without-shared was given.
5354 if test "${with_shared+set}" = set; then
5355   withval="$with_shared"
5356   with_shared=$withval
5357 else
5358   with_shared=no
5359 fi;
5360 echo "$as_me:5360: result: $with_shared" >&5
5361 echo "${ECHO_T}$with_shared" >&6
5362 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5363
5364 echo "$as_me:5364: checking if you want to build static libraries" >&5
5365 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5366
5367 # Check whether --with-normal or --without-normal was given.
5368 if test "${with_normal+set}" = set; then
5369   withval="$with_normal"
5370   with_normal=$withval
5371 else
5372   with_normal=yes
5373 fi;
5374 echo "$as_me:5374: result: $with_normal" >&5
5375 echo "${ECHO_T}$with_normal" >&6
5376 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5377
5378 echo "$as_me:5378: checking if you want to build debug libraries" >&5
5379 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5380
5381 # Check whether --with-debug or --without-debug was given.
5382 if test "${with_debug+set}" = set; then
5383   withval="$with_debug"
5384   with_debug=$withval
5385 else
5386   with_debug=yes
5387 fi;
5388 echo "$as_me:5388: result: $with_debug" >&5
5389 echo "${ECHO_T}$with_debug" >&6
5390 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5391
5392 echo "$as_me:5392: checking if you want to build profiling libraries" >&5
5393 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5394
5395 # Check whether --with-profile or --without-profile was given.
5396 if test "${with_profile+set}" = set; then
5397   withval="$with_profile"
5398   with_profile=$withval
5399 else
5400   with_profile=no
5401 fi;
5402 echo "$as_me:5402: result: $with_profile" >&5
5403 echo "${ECHO_T}$with_profile" >&6
5404 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5405
5406 fi
5407
5408 if test "X$cf_with_cxx_binding" != Xno; then
5409 if test "x$with_shared" = "xyes"; then
5410 echo "$as_me:5410: checking if you want to build C++ shared libraries" >&5
5411 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5412
5413 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5414 if test "${with_cxx_shared+set}" = set; then
5415   withval="$with_cxx_shared"
5416   with_shared_cxx=$withval
5417 else
5418   with_shared_cxx=no
5419 fi;
5420 echo "$as_me:5420: result: $with_shared_cxx" >&5
5421 echo "${ECHO_T}$with_shared_cxx" >&6
5422 fi
5423 fi
5424
5425 ###############################################################################
5426
5427 echo "$as_me:5427: checking for specified models" >&5
5428 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5429 test -z "$cf_list_models" && cf_list_models=normal
5430 test "$with_libtool" != "no" && cf_list_models=libtool
5431 echo "$as_me:5431: result: $cf_list_models" >&5
5432 echo "${ECHO_T}$cf_list_models" >&6
5433
5434 ### Use the first model as the default, and save its suffix for use in building
5435 ### up test-applications.
5436 echo "$as_me:5436: checking for default model" >&5
5437 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5438 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5439 echo "$as_me:5439: result: $DFT_LWR_MODEL" >&5
5440 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5441
5442 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5443
5444 TICS_NAME=tic
5445
5446 TINFO_NAME=tinfo
5447
5448 LIB_NAME=ncurses
5449
5450 LIB_DIR=../lib
5451 LIB_2ND=../../lib
5452
5453 echo "$as_me:5453: checking if you want to have a library-prefix" >&5
5454 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5455
5456 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5457 if test "${with_lib_prefix+set}" = set; then
5458   withval="$with_lib_prefix"
5459   with_lib_prefix=$withval
5460 else
5461   with_lib_prefix=auto
5462 fi;
5463 echo "$as_me:5463: result: $with_lib_prefix" >&5
5464 echo "${ECHO_T}$with_lib_prefix" >&6
5465
5466 if test $with_lib_prefix = auto
5467 then
5468
5469         case $cf_cv_system_name in
5470         (OS/2*|os2*)
5471                 if test "$DFT_LWR_MODEL" = libtool; then
5472                         LIB_PREFIX='lib'
5473                 else
5474                         LIB_PREFIX=''
5475                 fi
5476                 ;;
5477         (*)     LIB_PREFIX='lib'
5478                 ;;
5479         esac
5480 cf_prefix=$LIB_PREFIX
5481
5482 elif test $with_lib_prefix = no
5483 then
5484         LIB_PREFIX=
5485 else
5486         LIB_PREFIX=$with_lib_prefix
5487 fi
5488
5489 LIB_SUFFIX=
5490
5491         echo "$as_me:5491: checking for PATH separator" >&5
5492 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5493         case $cf_cv_system_name in
5494         (os2*)  PATH_SEPARATOR=';'  ;;
5495         (*)     ${PATH_SEPARATOR:=':'}  ;;
5496         esac
5497
5498         echo "$as_me:5498: result: $PATH_SEPARATOR" >&5
5499 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5500
5501 ###############################################################################
5502
5503 echo "$as_me:5503: checking if you want to build a separate terminfo library" >&5
5504 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5505
5506 # Check whether --with-termlib or --without-termlib was given.
5507 if test "${with_termlib+set}" = set; then
5508   withval="$with_termlib"
5509   with_termlib=$withval
5510 else
5511   with_termlib=no
5512 fi;
5513 echo "$as_me:5513: result: $with_termlib" >&5
5514 echo "${ECHO_T}$with_termlib" >&6
5515
5516 echo "$as_me:5516: checking if you want to build a separate tic library" >&5
5517 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5518
5519 # Check whether --with-ticlib or --without-ticlib was given.
5520 if test "${with_ticlib+set}" = set; then
5521   withval="$with_ticlib"
5522   with_ticlib=$withval
5523 else
5524   with_ticlib=no
5525 fi;
5526 echo "$as_me:5526: result: $with_ticlib" >&5
5527 echo "${ECHO_T}$with_ticlib" >&6
5528
5529 if test X"$CC_G_OPT" = X"" ; then
5530         CC_G_OPT='-g'
5531         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5532 fi
5533
5534 if test X"$CXX_G_OPT" = X"" ; then
5535         CXX_G_OPT='-g'
5536         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5537 fi
5538
5539 echo "$as_me:5539: checking for default loader flags" >&5
5540 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5541 case $DFT_LWR_MODEL in
5542 (libtool) LD_MODEL=''   ;;
5543 (normal)  LD_MODEL=''   ;;
5544 (debug)   LD_MODEL=$CC_G_OPT ;;
5545 (profile) LD_MODEL='-pg';;
5546 (shared)  LD_MODEL=''   ;;
5547 esac
5548 echo "$as_me:5548: result: $LD_MODEL" >&5
5549 echo "${ECHO_T}$LD_MODEL" >&6
5550
5551 case $DFT_LWR_MODEL in
5552 (shared)
5553
5554 echo "$as_me:5554: checking if rpath option should be used" >&5
5555 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5556
5557 # Check whether --enable-rpath or --disable-rpath was given.
5558 if test "${enable_rpath+set}" = set; then
5559   enableval="$enable_rpath"
5560   cf_cv_enable_rpath=$enableval
5561 else
5562   cf_cv_enable_rpath=no
5563 fi;
5564 echo "$as_me:5564: result: $cf_cv_enable_rpath" >&5
5565 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5566
5567 echo "$as_me:5567: checking if shared libraries should be relinked during install" >&5
5568 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5569
5570 # Check whether --enable-relink or --disable-relink was given.
5571 if test "${enable_relink+set}" = set; then
5572   enableval="$enable_relink"
5573   cf_cv_do_relink=$enableval
5574 else
5575   cf_cv_do_relink=yes
5576 fi;
5577 echo "$as_me:5577: result: $cf_cv_do_relink" >&5
5578 echo "${ECHO_T}$cf_cv_do_relink" >&6
5579         ;;
5580 esac
5581
5582 # we will build libraries one-level down.
5583 rel_builddir=..
5584
5585 LD_RPATH_OPT=
5586 if test "x$cf_cv_enable_rpath" != xno
5587 then
5588         echo "$as_me:5588: checking for an rpath option" >&5
5589 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5590         case $cf_cv_system_name in
5591         (irix*)
5592                 if test "$GCC" = yes; then
5593                         LD_RPATH_OPT="-Wl,-rpath,"
5594                 else
5595                         LD_RPATH_OPT="-rpath "
5596                 fi
5597                 ;;
5598         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5599                 LD_RPATH_OPT="-Wl,-rpath,"
5600                 ;;
5601         (openbsd[2-9].*|mirbsd*)
5602                 LD_RPATH_OPT="-Wl,-rpath,"
5603                 ;;
5604         (dragonfly*)
5605                 LD_RPATH_OPT="-rpath "
5606                 ;;
5607         (netbsd*)
5608                 LD_RPATH_OPT="-Wl,-rpath,"
5609                 ;;
5610         (osf*|mls+*)
5611                 LD_RPATH_OPT="-rpath "
5612                 ;;
5613         (solaris2*)
5614                 LD_RPATH_OPT="-R"
5615                 ;;
5616         (*)
5617                 ;;
5618         esac
5619         echo "$as_me:5619: result: $LD_RPATH_OPT" >&5
5620 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5621
5622         case "x$LD_RPATH_OPT" in
5623         (x-R*)
5624                 echo "$as_me:5624: checking if we need a space after rpath option" >&5
5625 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5626                 cf_save_LIBS="$LIBS"
5627
5628 cf_add_libs="$LIBS"
5629 # reverse order
5630 cf_add_0lib=
5631 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5632 # filter duplicates
5633 for cf_add_1lib in $cf_add_0lib; do
5634         for cf_add_2lib in $cf_add_libs; do
5635                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5636                         cf_add_1lib=
5637                         break
5638                 fi
5639         done
5640         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5641 done
5642 LIBS="$cf_add_libs"
5643
5644                 cat >conftest.$ac_ext <<_ACEOF
5645 #line 5645 "configure"
5646 #include "confdefs.h"
5647
5648 int
5649 main (void)
5650 {
5651
5652   ;
5653   return 0;
5654 }
5655 _ACEOF
5656 rm -f conftest.$ac_objext conftest$ac_exeext
5657 if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658   (eval $ac_link) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); } &&
5662          { ac_try='test -s conftest$ac_exeext'
5663   { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664   (eval $ac_try) 2>&5
5665   ac_status=$?
5666   echo "$as_me:5666: \$? = $ac_status" >&5
5667   (exit $ac_status); }; }; then
5668   cf_rpath_space=no
5669 else
5670   echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 cf_rpath_space=yes
5673 fi
5674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675                 LIBS="$cf_save_LIBS"
5676                 echo "$as_me:5676: result: $cf_rpath_space" >&5
5677 echo "${ECHO_T}$cf_rpath_space" >&6
5678                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5679                 ;;
5680         esac
5681 fi
5682
5683         RM_SHARED_OPTS=
5684         LOCAL_LDFLAGS=
5685         LOCAL_LDFLAGS2=
5686         LD_SHARED_OPTS=
5687         INSTALL_LIB="-m 644"
5688         : ${rel_builddir:=.}
5689
5690         shlibdir=$libdir
5691
5692         MAKE_DLLS="#"
5693
5694         cf_cv_do_symlinks=no
5695         cf_ld_rpath_opt=
5696         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5697
5698         echo "$as_me:5698: checking if release/abi version should be used for shared libs" >&5
5699 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5700
5701 # Check whether --with-shlib-version or --without-shlib-version was given.
5702 if test "${with_shlib_version+set}" = set; then
5703   withval="$with_shlib_version"
5704   test -z "$withval" && withval=auto
5705         case $withval in
5706         (yes)
5707                 cf_cv_shlib_version=auto
5708                 ;;
5709         (rel|abi|auto)
5710                 cf_cv_shlib_version=$withval
5711                 ;;
5712         (*)
5713                 echo "$as_me:5713: result: $withval" >&5
5714 echo "${ECHO_T}$withval" >&6
5715                 { { echo "$as_me:5715: error: option value must be one of: rel, abi, or auto" >&5
5716 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5717    { (exit 1); exit 1; }; }
5718                 ;;
5719         esac
5720
5721 else
5722   cf_cv_shlib_version=auto
5723 fi;
5724         echo "$as_me:5724: result: $cf_cv_shlib_version" >&5
5725 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5726
5727         cf_cv_rm_so_locs=no
5728         cf_try_cflags=
5729
5730         # Some less-capable ports of gcc support only -fpic
5731         CC_SHARED_OPTS=
5732
5733         cf_try_fPIC=no
5734         if test "$GCC" = yes
5735         then
5736                 cf_try_fPIC=yes
5737         else
5738                 case $cf_cv_system_name in
5739                 (*linux*)       # e.g., PGI compiler
5740                         cf_try_fPIC=yes
5741                         ;;
5742                 esac
5743         fi
5744
5745         if test "$cf_try_fPIC" = yes
5746         then
5747                 echo "$as_me:5747: checking which $CC option to use" >&5
5748 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5749                 cf_save_CFLAGS="$CFLAGS"
5750                 for CC_SHARED_OPTS in -fPIC -fpic ''
5751                 do
5752                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5753                         cat >conftest.$ac_ext <<_ACEOF
5754 #line 5754 "configure"
5755 #include "confdefs.h"
5756 #include <stdio.h>
5757 int
5758 main (void)
5759 {
5760 int x = 1
5761   ;
5762   return 0;
5763 }
5764 _ACEOF
5765 rm -f conftest.$ac_objext
5766 if { (eval echo "$as_me:5766: \"$ac_compile\"") >&5
5767   (eval $ac_compile) 2>&5
5768   ac_status=$?
5769   echo "$as_me:5769: \$? = $ac_status" >&5
5770   (exit $ac_status); } &&
5771          { ac_try='test -s conftest.$ac_objext'
5772   { (eval echo "$as_me:5772: \"$ac_try\"") >&5
5773   (eval $ac_try) 2>&5
5774   ac_status=$?
5775   echo "$as_me:5775: \$? = $ac_status" >&5
5776   (exit $ac_status); }; }; then
5777   break
5778 else
5779   echo "$as_me: failed program was:" >&5
5780 cat conftest.$ac_ext >&5
5781 fi
5782 rm -f conftest.$ac_objext conftest.$ac_ext
5783                 done
5784                 echo "$as_me:5784: result: $CC_SHARED_OPTS" >&5
5785 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5786                 CFLAGS="$cf_save_CFLAGS"
5787         fi
5788
5789         cf_cv_shlib_version_infix=no
5790
5791         case $cf_cv_system_name in
5792         (aix4.3-9*|aix[5-7]*)
5793                 if test "$GCC" = yes; then
5794                         CC_SHARED_OPTS='-Wl,-brtl'
5795                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5796                 else
5797                         CC_SHARED_OPTS='-brtl'
5798                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5799                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5800                 fi
5801                 ;;
5802         (beos*)
5803                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5804                 ;;
5805         (cygwin*)
5806                 CC_SHARED_OPTS=
5807                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5808                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5809                 cf_cv_shlib_version=cygdll
5810                 cf_cv_shlib_version_infix=cygdll
5811                 shlibdir=$bindir
5812                 MAKE_DLLS=
5813                 cat >mk_shared_lib.sh <<-CF_EOF
5814                 #!$SHELL
5815                 SHARED_LIB=\$1
5816                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5817                 shift
5818                 cat <<-EOF
5819                 Linking shared library
5820                 ** SHARED_LIB \$SHARED_LIB
5821                 ** IMPORT_LIB \$IMPORT_LIB
5822 EOF
5823                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5824 CF_EOF
5825                 chmod +x mk_shared_lib.sh
5826                 ;;
5827         (msys*)
5828                 CC_SHARED_OPTS=
5829                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5830                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5831                 cf_cv_shlib_version=msysdll
5832                 cf_cv_shlib_version_infix=msysdll
5833                 shlibdir=$bindir
5834                 MAKE_DLLS=
5835                 cat >mk_shared_lib.sh <<-CF_EOF
5836                 #!$SHELL
5837                 SHARED_LIB=\$1
5838                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5839                 shift
5840                 cat <<-EOF
5841                 Linking shared library
5842                 ** SHARED_LIB \$SHARED_LIB
5843                 ** IMPORT_LIB \$IMPORT_LIB
5844 EOF
5845                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5846 CF_EOF
5847                 chmod +x mk_shared_lib.sh
5848                 ;;
5849         (darwin*)
5850                 cf_try_cflags="no-cpp-precomp"
5851                 CC_SHARED_OPTS="-dynamic"
5852                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5853                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5854                 cf_cv_shlib_version_infix=yes
5855                 echo "$as_me:5855: checking if ld -search_paths_first works" >&5
5856 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5857 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5858   echo $ECHO_N "(cached) $ECHO_C" >&6
5859 else
5860
5861                         cf_save_LDFLAGS=$LDFLAGS
5862                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5863                         cat >conftest.$ac_ext <<_ACEOF
5864 #line 5864 "configure"
5865 #include "confdefs.h"
5866
5867 int
5868 main (void)
5869 {
5870 int i;
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876 if { (eval echo "$as_me:5876: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest$ac_exeext'
5882   { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:5885: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   cf_cv_ldflags_search_paths_first=yes
5888 else
5889   echo "$as_me: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5891 cf_cv_ldflags_search_paths_first=no
5892 fi
5893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5894                                 LDFLAGS=$cf_save_LDFLAGS
5895 fi
5896 echo "$as_me:5896: result: $cf_cv_ldflags_search_paths_first" >&5
5897 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5898                 if test $cf_cv_ldflags_search_paths_first = yes; then
5899                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5900                 fi
5901                 ;;
5902         (hpux[7-8]*)
5903                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5904                 if test "$GCC" != yes; then
5905                         CC_SHARED_OPTS='+Z'
5906                 fi
5907                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5908                 INSTALL_LIB="-m 555"
5909                 ;;
5910         (hpux*)
5911                 # (tested with gcc 2.7.2 -- I don't have c89)
5912                 if test "$GCC" = yes; then
5913                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5914                 else
5915                         CC_SHARED_OPTS='+Z'
5916                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5917                 fi
5918                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5919                 # HP-UX shared libraries must be executable, and should be
5920                 # readonly to exploit a quirk in the memory manager.
5921                 INSTALL_LIB="-m 555"
5922                 ;;
5923         (interix*)
5924                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5925                 if test "$cf_cv_shlib_version" = rel; then
5926                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5927                 else
5928                         cf_shared_soname='`basename $@`'
5929                 fi
5930                 CC_SHARED_OPTS=
5931                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5932                 ;;
5933         (irix*)
5934                 if test "$cf_cv_enable_rpath" = yes ; then
5935                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5936                 fi
5937                 # tested with IRIX 5.2 and 'cc'.
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5941                 else
5942                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5943                 fi
5944                 cf_cv_rm_so_locs=yes
5945                 ;;
5946         (linux*|gnu*|k*bsd*-gnu)
5947                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5948                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5963                 ;;
5964         (mingw*)
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
9138 echo "$as_me:9138: checking if you want broken-linker support code" >&5
9139 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9140
9141 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9142 if test "${enable_broken_linker+set}" = set; then
9143   enableval="$enable_broken_linker"
9144   with_broken_linker=$enableval
9145 else
9146   with_broken_linker=no
9147 fi;
9148 echo "$as_me:9148: result: $with_broken_linker" >&5
9149 echo "${ECHO_T}$with_broken_linker" >&6
9150
9151 : ${BROKEN_LINKER:=0}
9152 if test "x$with_broken_linker" = xyes ; then
9153
9154 cat >>confdefs.h <<\EOF
9155 #define BROKEN_LINKER 1
9156 EOF
9157
9158         BROKEN_LINKER=1
9159 fi
9160
9161 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9162 echo "$as_me:9162: checking if tputs should process BSD-style prefix padding" >&5
9163 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9164
9165 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9166 if test "${enable_bsdpad+set}" = set; then
9167   enableval="$enable_bsdpad"
9168   with_bsdpad=$enableval
9169 else
9170   with_bsdpad=no
9171 fi;
9172 echo "$as_me:9172: result: $with_bsdpad" >&5
9173 echo "${ECHO_T}$with_bsdpad" >&6
9174 test "x$with_bsdpad" = xyes &&
9175 cat >>confdefs.h <<\EOF
9176 #define BSD_TPUTS 1
9177 EOF
9178
9179 ###   use option --enable-widec to turn on use of wide-character support
9180 NCURSES_CH_T=chtype
9181 NCURSES_LIBUTF8=0
9182
9183 NEED_WCHAR_H=0
9184 NCURSES_MBSTATE_T=0
9185 NCURSES_WCHAR_T=0
9186 NCURSES_WINT_T=0
9187
9188 # Check to define _XOPEN_SOURCE "automatically"
9189 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9190
9191 echo "$as_me:9191: checking if the POSIX test-macros are already defined" >&5
9192 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9193 if test "${cf_cv_posix_visible+set}" = set; then
9194   echo $ECHO_N "(cached) $ECHO_C" >&6
9195 else
9196
9197 cat >conftest.$ac_ext <<_ACEOF
9198 #line 9198 "configure"
9199 #include "confdefs.h"
9200 #include <stdio.h>
9201 int
9202 main (void)
9203 {
9204
9205 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9206         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9207         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9208         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9209 #error conflicting symbols found
9210 #endif
9211
9212   ;
9213   return 0;
9214 }
9215 _ACEOF
9216 rm -f conftest.$ac_objext
9217 if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
9218   (eval $ac_compile) 2>&5
9219   ac_status=$?
9220   echo "$as_me:9220: \$? = $ac_status" >&5
9221   (exit $ac_status); } &&
9222          { ac_try='test -s conftest.$ac_objext'
9223   { (eval echo "$as_me:9223: \"$ac_try\"") >&5
9224   (eval $ac_try) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); }; }; then
9228   cf_cv_posix_visible=no
9229 else
9230   echo "$as_me: failed program was:" >&5
9231 cat conftest.$ac_ext >&5
9232 cf_cv_posix_visible=yes
9233 fi
9234 rm -f conftest.$ac_objext conftest.$ac_ext
9235
9236 fi
9237 echo "$as_me:9237: result: $cf_cv_posix_visible" >&5
9238 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9239
9240 if test "$cf_cv_posix_visible" = no; then
9241
9242 cf_XOPEN_SOURCE=600
9243 cf_POSIX_C_SOURCE=199506L
9244 cf_xopen_source=
9245
9246 case $host_os in
9247 (aix[4-7]*)
9248         cf_xopen_source="-D_ALL_SOURCE"
9249         ;;
9250 (msys)
9251         cf_XOPEN_SOURCE=600
9252         ;;
9253 (darwin[0-8].*)
9254         cf_xopen_source="-D_APPLE_C_SOURCE"
9255         ;;
9256 (darwin*)
9257         cf_xopen_source="-D_DARWIN_C_SOURCE"
9258         cf_XOPEN_SOURCE=
9259         ;;
9260 (freebsd*|dragonfly*|midnightbsd*)
9261         # 5.x headers associate
9262         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9263         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9264         cf_POSIX_C_SOURCE=200112L
9265         cf_XOPEN_SOURCE=600
9266         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9267         ;;
9268 (hpux11*)
9269         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9270         ;;
9271 (hpux*)
9272         cf_xopen_source="-D_HPUX_SOURCE"
9273         ;;
9274 (irix[56].*)
9275         cf_xopen_source="-D_SGI_SOURCE"
9276         cf_XOPEN_SOURCE=
9277         ;;
9278 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9279
9280 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9281
9282 echo "$as_me:9282: checking if this is the GNU C library" >&5
9283 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9284 if test "${cf_cv_gnu_library+set}" = set; then
9285   echo $ECHO_N "(cached) $ECHO_C" >&6
9286 else
9287
9288 cat >conftest.$ac_ext <<_ACEOF
9289 #line 9289 "configure"
9290 #include "confdefs.h"
9291 #include <sys/types.h>
9292 int
9293 main (void)
9294 {
9295
9296         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9297                 return 0;
9298         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9299                 return 0;
9300         #else
9301         #       error not GNU C library
9302         #endif
9303   ;
9304   return 0;
9305 }
9306 _ACEOF
9307 rm -f conftest.$ac_objext
9308 if { (eval echo "$as_me:9308: \"$ac_compile\"") >&5
9309   (eval $ac_compile) 2>&5
9310   ac_status=$?
9311   echo "$as_me:9311: \$? = $ac_status" >&5
9312   (exit $ac_status); } &&
9313          { ac_try='test -s conftest.$ac_objext'
9314   { (eval echo "$as_me:9314: \"$ac_try\"") >&5
9315   (eval $ac_try) 2>&5
9316   ac_status=$?
9317   echo "$as_me:9317: \$? = $ac_status" >&5
9318   (exit $ac_status); }; }; then
9319   cf_cv_gnu_library=yes
9320 else
9321   echo "$as_me: failed program was:" >&5
9322 cat conftest.$ac_ext >&5
9323 cf_cv_gnu_library=no
9324 fi
9325 rm -f conftest.$ac_objext conftest.$ac_ext
9326
9327 fi
9328 echo "$as_me:9328: result: $cf_cv_gnu_library" >&5
9329 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9330
9331 if test x$cf_cv_gnu_library = xyes; then
9332
9333         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9334         # was changed to help a little.  newlib incorporated the change about 4
9335         # years later.
9336         echo "$as_me:9336: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9337 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9338 if test "${cf_cv_gnu_library_219+set}" = set; then
9339   echo $ECHO_N "(cached) $ECHO_C" >&6
9340 else
9341
9342                 cf_save="$CPPFLAGS"
9343
9344         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9345         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9346
9347                 cat >conftest.$ac_ext <<_ACEOF
9348 #line 9348 "configure"
9349 #include "confdefs.h"
9350 #include <sys/types.h>
9351 int
9352 main (void)
9353 {
9354
9355                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9356                                 return 0;
9357                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9358                                 return 0;
9359                         #else
9360                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9361                         #endif
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext
9367 if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest.$ac_objext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   cf_cv_gnu_library_219=yes
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 cf_cv_gnu_library_219=no
9383 fi
9384 rm -f conftest.$ac_objext conftest.$ac_ext
9385                 CPPFLAGS="$cf_save"
9386
9387 fi
9388 echo "$as_me:9388: result: $cf_cv_gnu_library_219" >&5
9389 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9390
9391         if test "x$cf_cv_gnu_library_219" = xyes; then
9392                 cf_save="$CPPFLAGS"
9393                 echo "$as_me:9393: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9394 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9395 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9396   echo $ECHO_N "(cached) $ECHO_C" >&6
9397 else
9398
9399 cf_fix_cppflags=no
9400 cf_new_cflags=
9401 cf_new_cppflags=
9402 cf_new_extra_cppflags=
9403
9404 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9405 do
9406 case $cf_fix_cppflags in
9407 (no)
9408         case $cf_add_cflags in
9409         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9410                 case $cf_add_cflags in
9411                 (-D*)
9412                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9413
9414                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9415                                 && test -z "${cf_tst_cflags}" \
9416                                 && cf_fix_cppflags=yes
9417
9418                         if test $cf_fix_cppflags = yes ; then
9419
9420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9422
9423                                 continue
9424                         elif test "${cf_tst_cflags}" = "\"'" ; then
9425
9426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9428
9429                                 continue
9430                         fi
9431                         ;;
9432                 esac
9433                 case "$CPPFLAGS" in
9434                 (*$cf_add_cflags)
9435                         ;;
9436                 (*)
9437                         case $cf_add_cflags in
9438                         (-D*)
9439                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9440
9441 CPPFLAGS=`echo "$CPPFLAGS" | \
9442         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9443                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9444
9445                                 ;;
9446                         esac
9447
9448         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9449         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9450
9451                         ;;
9452                 esac
9453                 ;;
9454         (*)
9455
9456         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9457         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9458
9459                 ;;
9460         esac
9461         ;;
9462 (yes)
9463
9464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9466
9467         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9468
9469         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9470                 && test -z "${cf_tst_cflags}" \
9471                 && cf_fix_cppflags=no
9472         ;;
9473 esac
9474 done
9475
9476 if test -n "$cf_new_cflags" ; then
9477
9478         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9479         CFLAGS="${CFLAGS}$cf_new_cflags"
9480
9481 fi
9482
9483 if test -n "$cf_new_cppflags" ; then
9484
9485         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9486         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9487
9488 fi
9489
9490 if test -n "$cf_new_extra_cppflags" ; then
9491
9492         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9493         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9494
9495 fi
9496
9497                         cat >conftest.$ac_ext <<_ACEOF
9498 #line 9498 "configure"
9499 #include "confdefs.h"
9500
9501                                 #include <limits.h>
9502                                 #include <sys/types.h>
9503
9504 int
9505 main (void)
9506 {
9507
9508                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9509                                         return 0;
9510                                 #else
9511                                 #       error GNU C library is too old
9512                                 #endif
9513   ;
9514   return 0;
9515 }
9516 _ACEOF
9517 rm -f conftest.$ac_objext
9518 if { (eval echo "$as_me:9518: \"$ac_compile\"") >&5
9519   (eval $ac_compile) 2>&5
9520   ac_status=$?
9521   echo "$as_me:9521: \$? = $ac_status" >&5
9522   (exit $ac_status); } &&
9523          { ac_try='test -s conftest.$ac_objext'
9524   { (eval echo "$as_me:9524: \"$ac_try\"") >&5
9525   (eval $ac_try) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); }; }; then
9529   cf_cv_gnu_dftsrc_219=yes
9530 else
9531   echo "$as_me: failed program was:" >&5
9532 cat conftest.$ac_ext >&5
9533 cf_cv_gnu_dftsrc_219=no
9534 fi
9535 rm -f conftest.$ac_objext conftest.$ac_ext
9536
9537 fi
9538 echo "$as_me:9538: result: $cf_cv_gnu_dftsrc_219" >&5
9539 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9540                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9541         else
9542                 cf_cv_gnu_dftsrc_219=maybe
9543         fi
9544
9545         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9546
9547                 echo "$as_me:9547: checking if we must define _GNU_SOURCE" >&5
9548 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9549 if test "${cf_cv_gnu_source+set}" = set; then
9550   echo $ECHO_N "(cached) $ECHO_C" >&6
9551 else
9552
9553                 cat >conftest.$ac_ext <<_ACEOF
9554 #line 9554 "configure"
9555 #include "confdefs.h"
9556 #include <sys/types.h>
9557 int
9558 main (void)
9559 {
9560
9561                         #ifndef _XOPEN_SOURCE
9562                         #error  expected _XOPEN_SOURCE to be defined
9563                         #endif
9564   ;
9565   return 0;
9566 }
9567 _ACEOF
9568 rm -f conftest.$ac_objext
9569 if { (eval echo "$as_me:9569: \"$ac_compile\"") >&5
9570   (eval $ac_compile) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit $ac_status); } &&
9574          { ac_try='test -s conftest.$ac_objext'
9575   { (eval echo "$as_me:9575: \"$ac_try\"") >&5
9576   (eval $ac_try) 2>&5
9577   ac_status=$?
9578   echo "$as_me:9578: \$? = $ac_status" >&5
9579   (exit $ac_status); }; }; then
9580   cf_cv_gnu_source=no
9581 else
9582   echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9584 cf_save="$CPPFLAGS"
9585
9586 cf_fix_cppflags=no
9587 cf_new_cflags=
9588 cf_new_cppflags=
9589 cf_new_extra_cppflags=
9590
9591 for cf_add_cflags in -D_GNU_SOURCE
9592 do
9593 case $cf_fix_cppflags in
9594 (no)
9595         case $cf_add_cflags in
9596         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9597                 case $cf_add_cflags in
9598                 (-D*)
9599                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9600
9601                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9602                                 && test -z "${cf_tst_cflags}" \
9603                                 && cf_fix_cppflags=yes
9604
9605                         if test $cf_fix_cppflags = yes ; then
9606
9607         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9608         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9609
9610                                 continue
9611                         elif test "${cf_tst_cflags}" = "\"'" ; then
9612
9613         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9614         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9615
9616                                 continue
9617                         fi
9618                         ;;
9619                 esac
9620                 case "$CPPFLAGS" in
9621                 (*$cf_add_cflags)
9622                         ;;
9623                 (*)
9624                         case $cf_add_cflags in
9625                         (-D*)
9626                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9627
9628 CPPFLAGS=`echo "$CPPFLAGS" | \
9629         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9630                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9631
9632                                 ;;
9633                         esac
9634
9635         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9636         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9637
9638                         ;;
9639                 esac
9640                 ;;
9641         (*)
9642
9643         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9644         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9645
9646                 ;;
9647         esac
9648         ;;
9649 (yes)
9650
9651         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9652         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9653
9654         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9655
9656         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9657                 && test -z "${cf_tst_cflags}" \
9658                 && cf_fix_cppflags=no
9659         ;;
9660 esac
9661 done
9662
9663 if test -n "$cf_new_cflags" ; then
9664
9665         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9666         CFLAGS="${CFLAGS}$cf_new_cflags"
9667
9668 fi
9669
9670 if test -n "$cf_new_cppflags" ; then
9671
9672         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9673         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9674
9675 fi
9676
9677 if test -n "$cf_new_extra_cppflags" ; then
9678
9679         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9680         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9681
9682 fi
9683
9684                          cat >conftest.$ac_ext <<_ACEOF
9685 #line 9685 "configure"
9686 #include "confdefs.h"
9687 #include <sys/types.h>
9688 int
9689 main (void)
9690 {
9691
9692                                 #ifdef _XOPEN_SOURCE
9693                                 #error  expected _XOPEN_SOURCE to be undefined
9694                                 #endif
9695   ;
9696   return 0;
9697 }
9698 _ACEOF
9699 rm -f conftest.$ac_objext
9700 if { (eval echo "$as_me:9700: \"$ac_compile\"") >&5
9701   (eval $ac_compile) 2>&5
9702   ac_status=$?
9703   echo "$as_me:9703: \$? = $ac_status" >&5
9704   (exit $ac_status); } &&
9705          { ac_try='test -s conftest.$ac_objext'
9706   { (eval echo "$as_me:9706: \"$ac_try\"") >&5
9707   (eval $ac_try) 2>&5
9708   ac_status=$?
9709   echo "$as_me:9709: \$? = $ac_status" >&5
9710   (exit $ac_status); }; }; then
9711   cf_cv_gnu_source=no
9712 else
9713   echo "$as_me: failed program was:" >&5
9714 cat conftest.$ac_ext >&5
9715 cf_cv_gnu_source=yes
9716 fi
9717 rm -f conftest.$ac_objext conftest.$ac_ext
9718                         CPPFLAGS="$cf_save"
9719
9720 fi
9721 rm -f conftest.$ac_objext conftest.$ac_ext
9722
9723 fi
9724 echo "$as_me:9724: result: $cf_cv_gnu_source" >&5
9725 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9726
9727                 if test "$cf_cv_gnu_source" = yes
9728                 then
9729                 echo "$as_me:9729: checking if we should also define _DEFAULT_SOURCE" >&5
9730 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9731 if test "${cf_cv_default_source+set}" = set; then
9732   echo $ECHO_N "(cached) $ECHO_C" >&6
9733 else
9734
9735         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9736         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9737
9738                         cat >conftest.$ac_ext <<_ACEOF
9739 #line 9739 "configure"
9740 #include "confdefs.h"
9741 #include <sys/types.h>
9742 int
9743 main (void)
9744 {
9745
9746                                 #ifdef _DEFAULT_SOURCE
9747                                 #error  expected _DEFAULT_SOURCE to be undefined
9748                                 #endif
9749   ;
9750   return 0;
9751 }
9752 _ACEOF
9753 rm -f conftest.$ac_objext
9754 if { (eval echo "$as_me:9754: \"$ac_compile\"") >&5
9755   (eval $ac_compile) 2>&5
9756   ac_status=$?
9757   echo "$as_me:9757: \$? = $ac_status" >&5
9758   (exit $ac_status); } &&
9759          { ac_try='test -s conftest.$ac_objext'
9760   { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9761   (eval $ac_try) 2>&5
9762   ac_status=$?
9763   echo "$as_me:9763: \$? = $ac_status" >&5
9764   (exit $ac_status); }; }; then
9765   cf_cv_default_source=no
9766 else
9767   echo "$as_me: failed program was:" >&5
9768 cat conftest.$ac_ext >&5
9769 cf_cv_default_source=yes
9770 fi
9771 rm -f conftest.$ac_objext conftest.$ac_ext
9772
9773 fi
9774 echo "$as_me:9774: result: $cf_cv_default_source" >&5
9775 echo "${ECHO_T}$cf_cv_default_source" >&6
9776                         if test "$cf_cv_default_source" = yes
9777                         then
9778
9779         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9780         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9781
9782                         fi
9783                 fi
9784         fi
9785
9786 fi
9787
9788         ;;
9789 (minix*)
9790         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9791         ;;
9792 (mirbsd*)
9793         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9794         cf_XOPEN_SOURCE=
9795
9796 if test "$cf_cv_posix_visible" = no; then
9797
9798 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9799
9800 cf_save_CFLAGS="$CFLAGS"
9801 cf_save_CPPFLAGS="$CPPFLAGS"
9802
9803 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9804         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9805                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9806
9807 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9808         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9809                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9810
9811 echo "$as_me:9811: checking if we should define _POSIX_C_SOURCE" >&5
9812 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9813 if test "${cf_cv_posix_c_source+set}" = set; then
9814   echo $ECHO_N "(cached) $ECHO_C" >&6
9815 else
9816
9817 echo "${as_me:-configure}:9817: testing if the symbol is already defined go no further ..." 1>&5
9818
9819         cat >conftest.$ac_ext <<_ACEOF
9820 #line 9820 "configure"
9821 #include "confdefs.h"
9822 #include <sys/types.h>
9823 int
9824 main (void)
9825 {
9826
9827 #ifndef _POSIX_C_SOURCE
9828 make an error
9829 #endif
9830   ;
9831   return 0;
9832 }
9833 _ACEOF
9834 rm -f conftest.$ac_objext
9835 if { (eval echo "$as_me:9835: \"$ac_compile\"") >&5
9836   (eval $ac_compile) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); } &&
9840          { ac_try='test -s conftest.$ac_objext'
9841   { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842   (eval $ac_try) 2>&5
9843   ac_status=$?
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); }; }; then
9846   cf_cv_posix_c_source=no
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9850 cf_want_posix_source=no
9851          case .$cf_POSIX_C_SOURCE in
9852          (.[12]??*)
9853                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9854                 ;;
9855          (.2)
9856                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9857                 cf_want_posix_source=yes
9858                 ;;
9859          (.*)
9860                 cf_want_posix_source=yes
9861                 ;;
9862          esac
9863          if test "$cf_want_posix_source" = yes ; then
9864                 cat >conftest.$ac_ext <<_ACEOF
9865 #line 9865 "configure"
9866 #include "confdefs.h"
9867 #include <sys/types.h>
9868 int
9869 main (void)
9870 {
9871
9872 #ifdef _POSIX_SOURCE
9873 make an error
9874 #endif
9875   ;
9876   return 0;
9877 }
9878 _ACEOF
9879 rm -f conftest.$ac_objext
9880 if { (eval echo "$as_me:9880: \"$ac_compile\"") >&5
9881   (eval $ac_compile) 2>&5
9882   ac_status=$?
9883   echo "$as_me:9883: \$? = $ac_status" >&5
9884   (exit $ac_status); } &&
9885          { ac_try='test -s conftest.$ac_objext'
9886   { (eval echo "$as_me:9886: \"$ac_try\"") >&5
9887   (eval $ac_try) 2>&5
9888   ac_status=$?
9889   echo "$as_me:9889: \$? = $ac_status" >&5
9890   (exit $ac_status); }; }; then
9891   :
9892 else
9893   echo "$as_me: failed program was:" >&5
9894 cat conftest.$ac_ext >&5
9895 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9896 fi
9897 rm -f conftest.$ac_objext conftest.$ac_ext
9898          fi
9899
9900 echo "${as_me:-configure}:9900: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9901
9902          CFLAGS="$cf_trim_CFLAGS"
9903          CPPFLAGS="$cf_trim_CPPFLAGS"
9904
9905         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9906         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9907
9908 echo "${as_me:-configure}:9908: testing if the second compile does not leave our definition intact error ..." 1>&5
9909
9910          cat >conftest.$ac_ext <<_ACEOF
9911 #line 9911 "configure"
9912 #include "confdefs.h"
9913 #include <sys/types.h>
9914 int
9915 main (void)
9916 {
9917
9918 #ifndef _POSIX_C_SOURCE
9919 make an error
9920 #endif
9921   ;
9922   return 0;
9923 }
9924 _ACEOF
9925 rm -f conftest.$ac_objext
9926 if { (eval echo "$as_me:9926: \"$ac_compile\"") >&5
9927   (eval $ac_compile) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest.$ac_objext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   :
9938 else
9939   echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 cf_cv_posix_c_source=no
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944          CFLAGS="$cf_save_CFLAGS"
9945          CPPFLAGS="$cf_save_CPPFLAGS"
9946
9947 fi
9948 rm -f conftest.$ac_objext conftest.$ac_ext
9949
9950 fi
9951 echo "$as_me:9951: result: $cf_cv_posix_c_source" >&5
9952 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9953
9954 if test "$cf_cv_posix_c_source" != no ; then
9955         CFLAGS="$cf_trim_CFLAGS"
9956         CPPFLAGS="$cf_trim_CPPFLAGS"
9957
9958 cf_fix_cppflags=no
9959 cf_new_cflags=
9960 cf_new_cppflags=
9961 cf_new_extra_cppflags=
9962
9963 for cf_add_cflags in $cf_cv_posix_c_source
9964 do
9965 case $cf_fix_cppflags in
9966 (no)
9967         case $cf_add_cflags in
9968         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9969                 case $cf_add_cflags in
9970                 (-D*)
9971                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9972
9973                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9974                                 && test -z "${cf_tst_cflags}" \
9975                                 && cf_fix_cppflags=yes
9976
9977                         if test $cf_fix_cppflags = yes ; then
9978
9979         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9980         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9981
9982                                 continue
9983                         elif test "${cf_tst_cflags}" = "\"'" ; then
9984
9985         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9986         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9987
9988                                 continue
9989                         fi
9990                         ;;
9991                 esac
9992                 case "$CPPFLAGS" in
9993                 (*$cf_add_cflags)
9994                         ;;
9995                 (*)
9996                         case $cf_add_cflags in
9997                         (-D*)
9998                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9999
10000 CPPFLAGS=`echo "$CPPFLAGS" | \
10001         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10002                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10003
10004                                 ;;
10005                         esac
10006
10007         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10008         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10009
10010                         ;;
10011                 esac
10012                 ;;
10013         (*)
10014
10015         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10016         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10017
10018                 ;;
10019         esac
10020         ;;
10021 (yes)
10022
10023         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10024         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10025
10026         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10027
10028         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10029                 && test -z "${cf_tst_cflags}" \
10030                 && cf_fix_cppflags=no
10031         ;;
10032 esac
10033 done
10034
10035 if test -n "$cf_new_cflags" ; then
10036
10037         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10038         CFLAGS="${CFLAGS}$cf_new_cflags"
10039
10040 fi
10041
10042 if test -n "$cf_new_cppflags" ; then
10043
10044         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10045         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10046
10047 fi
10048
10049 if test -n "$cf_new_extra_cppflags" ; then
10050
10051         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10052         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10053
10054 fi
10055
10056 fi
10057
10058 fi # cf_cv_posix_visible
10059
10060         ;;
10061 (netbsd*)
10062         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10063         ;;
10064 (openbsd[4-9]*)
10065         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10066         cf_xopen_source="-D_BSD_SOURCE"
10067         cf_XOPEN_SOURCE=600
10068         ;;
10069 (openbsd*)
10070         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10071         ;;
10072 (osf[45]*)
10073         cf_xopen_source="-D_OSF_SOURCE"
10074         ;;
10075 (nto-qnx*)
10076         cf_xopen_source="-D_QNX_SOURCE"
10077         ;;
10078 (sco*)
10079         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10080         ;;
10081 (solaris2.*)
10082         cf_xopen_source="-D__EXTENSIONS__"
10083         cf_cv_xopen_source=broken
10084         ;;
10085 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10086         cf_XOPEN_SOURCE=
10087         cf_POSIX_C_SOURCE=
10088         ;;
10089 (*)
10090
10091 echo "$as_me:10091: checking if we should define _XOPEN_SOURCE" >&5
10092 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10093 if test "${cf_cv_xopen_source+set}" = set; then
10094   echo $ECHO_N "(cached) $ECHO_C" >&6
10095 else
10096
10097         cat >conftest.$ac_ext <<_ACEOF
10098 #line 10098 "configure"
10099 #include "confdefs.h"
10100
10101 #include <stdlib.h>
10102 #include <string.h>
10103 #include <sys/types.h>
10104
10105 int
10106 main (void)
10107 {
10108
10109 #ifndef _XOPEN_SOURCE
10110 make an error
10111 #endif
10112   ;
10113   return 0;
10114 }
10115 _ACEOF
10116 rm -f conftest.$ac_objext
10117 if { (eval echo "$as_me:10117: \"$ac_compile\"") >&5
10118   (eval $ac_compile) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit $ac_status); } &&
10122          { ac_try='test -s conftest.$ac_objext'
10123   { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124   (eval $ac_try) 2>&5
10125   ac_status=$?
10126   echo "$as_me:10126: \$? = $ac_status" >&5
10127   (exit $ac_status); }; }; then
10128   cf_cv_xopen_source=no
10129 else
10130   echo "$as_me: failed program was:" >&5
10131 cat conftest.$ac_ext >&5
10132 cf_save="$CPPFLAGS"
10133
10134         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10135         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10136
10137          cat >conftest.$ac_ext <<_ACEOF
10138 #line 10138 "configure"
10139 #include "confdefs.h"
10140
10141 #include <stdlib.h>
10142 #include <string.h>
10143 #include <sys/types.h>
10144
10145 int
10146 main (void)
10147 {
10148
10149 #ifdef _XOPEN_SOURCE
10150 make an error
10151 #endif
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 rm -f conftest.$ac_objext
10157 if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5
10158   (eval $ac_compile) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit $ac_status); } &&
10162          { ac_try='test -s conftest.$ac_objext'
10163   { (eval echo "$as_me:10163: \"$ac_try\"") >&5
10164   (eval $ac_try) 2>&5
10165   ac_status=$?
10166   echo "$as_me:10166: \$? = $ac_status" >&5
10167   (exit $ac_status); }; }; then
10168   cf_cv_xopen_source=no
10169 else
10170   echo "$as_me: failed program was:" >&5
10171 cat conftest.$ac_ext >&5
10172 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10173 fi
10174 rm -f conftest.$ac_objext conftest.$ac_ext
10175         CPPFLAGS="$cf_save"
10176
10177 fi
10178 rm -f conftest.$ac_objext conftest.$ac_ext
10179
10180 fi
10181 echo "$as_me:10181: result: $cf_cv_xopen_source" >&5
10182 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10183
10184 if test "$cf_cv_xopen_source" != no ; then
10185
10186 CFLAGS=`echo "$CFLAGS" | \
10187         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10188                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10189
10190 CPPFLAGS=`echo "$CPPFLAGS" | \
10191         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10192                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10193
10194         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10195
10196 cf_fix_cppflags=no
10197 cf_new_cflags=
10198 cf_new_cppflags=
10199 cf_new_extra_cppflags=
10200
10201 for cf_add_cflags in $cf_temp_xopen_source
10202 do
10203 case $cf_fix_cppflags in
10204 (no)
10205         case $cf_add_cflags in
10206         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10207                 case $cf_add_cflags in
10208                 (-D*)
10209                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10210
10211                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10212                                 && test -z "${cf_tst_cflags}" \
10213                                 && cf_fix_cppflags=yes
10214
10215                         if test $cf_fix_cppflags = yes ; then
10216
10217         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10218         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10219
10220                                 continue
10221                         elif test "${cf_tst_cflags}" = "\"'" ; then
10222
10223         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10224         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10225
10226                                 continue
10227                         fi
10228                         ;;
10229                 esac
10230                 case "$CPPFLAGS" in
10231                 (*$cf_add_cflags)
10232                         ;;
10233                 (*)
10234                         case $cf_add_cflags in
10235                         (-D*)
10236                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10237
10238 CPPFLAGS=`echo "$CPPFLAGS" | \
10239         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10240                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10241
10242                                 ;;
10243                         esac
10244
10245         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10246         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10247
10248                         ;;
10249                 esac
10250                 ;;
10251         (*)
10252
10253         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10254         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10255
10256                 ;;
10257         esac
10258         ;;
10259 (yes)
10260
10261         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10262         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10263
10264         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10265
10266         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10267                 && test -z "${cf_tst_cflags}" \
10268                 && cf_fix_cppflags=no
10269         ;;
10270 esac
10271 done
10272
10273 if test -n "$cf_new_cflags" ; then
10274
10275         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10276         CFLAGS="${CFLAGS}$cf_new_cflags"
10277
10278 fi
10279
10280 if test -n "$cf_new_cppflags" ; then
10281
10282         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10283         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10284
10285 fi
10286
10287 if test -n "$cf_new_extra_cppflags" ; then
10288
10289         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10290         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10291
10292 fi
10293
10294 fi
10295
10296 if test "$cf_cv_posix_visible" = no; then
10297
10298 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10299
10300 cf_save_CFLAGS="$CFLAGS"
10301 cf_save_CPPFLAGS="$CPPFLAGS"
10302
10303 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10304         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10305                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10306
10307 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10308         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10309                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10310
10311 echo "$as_me:10311: checking if we should define _POSIX_C_SOURCE" >&5
10312 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10313 if test "${cf_cv_posix_c_source+set}" = set; then
10314   echo $ECHO_N "(cached) $ECHO_C" >&6
10315 else
10316
10317 echo "${as_me:-configure}:10317: testing if the symbol is already defined go no further ..." 1>&5
10318
10319         cat >conftest.$ac_ext <<_ACEOF
10320 #line 10320 "configure"
10321 #include "confdefs.h"
10322 #include <sys/types.h>
10323 int
10324 main (void)
10325 {
10326
10327 #ifndef _POSIX_C_SOURCE
10328 make an error
10329 #endif
10330   ;
10331   return 0;
10332 }
10333 _ACEOF
10334 rm -f conftest.$ac_objext
10335 if { (eval echo "$as_me:10335: \"$ac_compile\"") >&5
10336   (eval $ac_compile) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit $ac_status); } &&
10340          { ac_try='test -s conftest.$ac_objext'
10341   { (eval echo "$as_me:10341: \"$ac_try\"") >&5
10342   (eval $ac_try) 2>&5
10343   ac_status=$?
10344   echo "$as_me:10344: \$? = $ac_status" >&5
10345   (exit $ac_status); }; }; then
10346   cf_cv_posix_c_source=no
10347 else
10348   echo "$as_me: failed program was:" >&5
10349 cat conftest.$ac_ext >&5
10350 cf_want_posix_source=no
10351          case .$cf_POSIX_C_SOURCE in
10352          (.[12]??*)
10353                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10354                 ;;
10355          (.2)
10356                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10357                 cf_want_posix_source=yes
10358                 ;;
10359          (.*)
10360                 cf_want_posix_source=yes
10361                 ;;
10362          esac
10363          if test "$cf_want_posix_source" = yes ; then
10364                 cat >conftest.$ac_ext <<_ACEOF
10365 #line 10365 "configure"
10366 #include "confdefs.h"
10367 #include <sys/types.h>
10368 int
10369 main (void)
10370 {
10371
10372 #ifdef _POSIX_SOURCE
10373 make an error
10374 #endif
10375   ;
10376   return 0;
10377 }
10378 _ACEOF
10379 rm -f conftest.$ac_objext
10380 if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
10381   (eval $ac_compile) 2>&5
10382   ac_status=$?
10383   echo "$as_me:10383: \$? = $ac_status" >&5
10384   (exit $ac_status); } &&
10385          { ac_try='test -s conftest.$ac_objext'
10386   { (eval echo "$as_me:10386: \"$ac_try\"") >&5
10387   (eval $ac_try) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); }; }; then
10391   :
10392 else
10393   echo "$as_me: failed program was:" >&5
10394 cat conftest.$ac_ext >&5
10395 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10396 fi
10397 rm -f conftest.$ac_objext conftest.$ac_ext
10398          fi
10399
10400 echo "${as_me:-configure}:10400: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10401
10402          CFLAGS="$cf_trim_CFLAGS"
10403          CPPFLAGS="$cf_trim_CPPFLAGS"
10404
10405         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10406         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10407
10408 echo "${as_me:-configure}:10408: testing if the second compile does not leave our definition intact error ..." 1>&5
10409
10410          cat >conftest.$ac_ext <<_ACEOF
10411 #line 10411 "configure"
10412 #include "confdefs.h"
10413 #include <sys/types.h>
10414 int
10415 main (void)
10416 {
10417
10418 #ifndef _POSIX_C_SOURCE
10419 make an error
10420 #endif
10421   ;
10422   return 0;
10423 }
10424 _ACEOF
10425 rm -f conftest.$ac_objext
10426 if { (eval echo "$as_me:10426: \"$ac_compile\"") >&5
10427   (eval $ac_compile) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); } &&
10431          { ac_try='test -s conftest.$ac_objext'
10432   { (eval echo "$as_me:10432: \"$ac_try\"") >&5
10433   (eval $ac_try) 2>&5
10434   ac_status=$?
10435   echo "$as_me:10435: \$? = $ac_status" >&5
10436   (exit $ac_status); }; }; then
10437   :
10438 else
10439   echo "$as_me: failed program was:" >&5
10440 cat conftest.$ac_ext >&5
10441 cf_cv_posix_c_source=no
10442 fi
10443 rm -f conftest.$ac_objext conftest.$ac_ext
10444          CFLAGS="$cf_save_CFLAGS"
10445          CPPFLAGS="$cf_save_CPPFLAGS"
10446
10447 fi
10448 rm -f conftest.$ac_objext conftest.$ac_ext
10449
10450 fi
10451 echo "$as_me:10451: result: $cf_cv_posix_c_source" >&5
10452 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10453
10454 if test "$cf_cv_posix_c_source" != no ; then
10455         CFLAGS="$cf_trim_CFLAGS"
10456         CPPFLAGS="$cf_trim_CPPFLAGS"
10457
10458 cf_fix_cppflags=no
10459 cf_new_cflags=
10460 cf_new_cppflags=
10461 cf_new_extra_cppflags=
10462
10463 for cf_add_cflags in $cf_cv_posix_c_source
10464 do
10465 case $cf_fix_cppflags in
10466 (no)
10467         case $cf_add_cflags in
10468         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10469                 case $cf_add_cflags in
10470                 (-D*)
10471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10472
10473                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10474                                 && test -z "${cf_tst_cflags}" \
10475                                 && cf_fix_cppflags=yes
10476
10477                         if test $cf_fix_cppflags = yes ; then
10478
10479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10481
10482                                 continue
10483                         elif test "${cf_tst_cflags}" = "\"'" ; then
10484
10485         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10486         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10487
10488                                 continue
10489                         fi
10490                         ;;
10491                 esac
10492                 case "$CPPFLAGS" in
10493                 (*$cf_add_cflags)
10494                         ;;
10495                 (*)
10496                         case $cf_add_cflags in
10497                         (-D*)
10498                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10499
10500 CPPFLAGS=`echo "$CPPFLAGS" | \
10501         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10502                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10503
10504                                 ;;
10505                         esac
10506
10507         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10508         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10509
10510                         ;;
10511                 esac
10512                 ;;
10513         (*)
10514
10515         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10516         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10517
10518                 ;;
10519         esac
10520         ;;
10521 (yes)
10522
10523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10525
10526         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10527
10528         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10529                 && test -z "${cf_tst_cflags}" \
10530                 && cf_fix_cppflags=no
10531         ;;
10532 esac
10533 done
10534
10535 if test -n "$cf_new_cflags" ; then
10536
10537         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10538         CFLAGS="${CFLAGS}$cf_new_cflags"
10539
10540 fi
10541
10542 if test -n "$cf_new_cppflags" ; then
10543
10544         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10545         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10546
10547 fi
10548
10549 if test -n "$cf_new_extra_cppflags" ; then
10550
10551         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10552         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10553
10554 fi
10555
10556 fi
10557
10558 fi # cf_cv_posix_visible
10559
10560         ;;
10561 esac
10562
10563 if test -n "$cf_xopen_source" ; then
10564
10565 cf_fix_cppflags=no
10566 cf_new_cflags=
10567 cf_new_cppflags=
10568 cf_new_extra_cppflags=
10569
10570 for cf_add_cflags in $cf_xopen_source
10571 do
10572 case $cf_fix_cppflags in
10573 (no)
10574         case $cf_add_cflags in
10575         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10576                 case $cf_add_cflags in
10577                 (-D*)
10578                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10579
10580                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10581                                 && test -z "${cf_tst_cflags}" \
10582                                 && cf_fix_cppflags=yes
10583
10584                         if test $cf_fix_cppflags = yes ; then
10585
10586         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10587         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10588
10589                                 continue
10590                         elif test "${cf_tst_cflags}" = "\"'" ; then
10591
10592         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10593         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10594
10595                                 continue
10596                         fi
10597                         ;;
10598                 esac
10599                 case "$CPPFLAGS" in
10600                 (*$cf_add_cflags)
10601                         ;;
10602                 (*)
10603                         case $cf_add_cflags in
10604                         (-D*)
10605                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10606
10607 CPPFLAGS=`echo "$CPPFLAGS" | \
10608         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10609                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10610
10611                                 ;;
10612                         esac
10613
10614         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10615         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10616
10617                         ;;
10618                 esac
10619                 ;;
10620         (*)
10621
10622         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10623         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10624
10625                 ;;
10626         esac
10627         ;;
10628 (yes)
10629
10630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10632
10633         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10634
10635         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10636                 && test -z "${cf_tst_cflags}" \
10637                 && cf_fix_cppflags=no
10638         ;;
10639 esac
10640 done
10641
10642 if test -n "$cf_new_cflags" ; then
10643         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10644
10645 echo "${as_me:-configure}:10645: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10646
10647         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10648         CFLAGS="${CFLAGS}$cf_new_cflags"
10649
10650 fi
10651
10652 if test -n "$cf_new_cppflags" ; then
10653         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10654
10655 echo "${as_me:-configure}:10655: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10656
10657         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10658         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10659
10660 fi
10661
10662 if test -n "$cf_new_extra_cppflags" ; then
10663         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10664
10665 echo "${as_me:-configure}:10665: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10666
10667         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10668         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10669
10670 fi
10671
10672 fi
10673
10674 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10675         echo "$as_me:10675: checking if _XOPEN_SOURCE really is set" >&5
10676 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10677         cat >conftest.$ac_ext <<_ACEOF
10678 #line 10678 "configure"
10679 #include "confdefs.h"
10680 #include <stdlib.h>
10681 int
10682 main (void)
10683 {
10684
10685 #ifndef _XOPEN_SOURCE
10686 make an error
10687 #endif
10688   ;
10689   return 0;
10690 }
10691 _ACEOF
10692 rm -f conftest.$ac_objext
10693 if { (eval echo "$as_me:10693: \"$ac_compile\"") >&5
10694   (eval $ac_compile) 2>&5
10695   ac_status=$?
10696   echo "$as_me:10696: \$? = $ac_status" >&5
10697   (exit $ac_status); } &&
10698          { ac_try='test -s conftest.$ac_objext'
10699   { (eval echo "$as_me:10699: \"$ac_try\"") >&5
10700   (eval $ac_try) 2>&5
10701   ac_status=$?
10702   echo "$as_me:10702: \$? = $ac_status" >&5
10703   (exit $ac_status); }; }; then
10704   cf_XOPEN_SOURCE_set=yes
10705 else
10706   echo "$as_me: failed program was:" >&5
10707 cat conftest.$ac_ext >&5
10708 cf_XOPEN_SOURCE_set=no
10709 fi
10710 rm -f conftest.$ac_objext conftest.$ac_ext
10711         echo "$as_me:10711: result: $cf_XOPEN_SOURCE_set" >&5
10712 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10713         if test $cf_XOPEN_SOURCE_set = yes
10714         then
10715                 cat >conftest.$ac_ext <<_ACEOF
10716 #line 10716 "configure"
10717 #include "confdefs.h"
10718 #include <stdlib.h>
10719 int
10720 main (void)
10721 {
10722
10723 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10724 make an error
10725 #endif
10726   ;
10727   return 0;
10728 }
10729 _ACEOF
10730 rm -f conftest.$ac_objext
10731 if { (eval echo "$as_me:10731: \"$ac_compile\"") >&5
10732   (eval $ac_compile) 2>&5
10733   ac_status=$?
10734   echo "$as_me:10734: \$? = $ac_status" >&5
10735   (exit $ac_status); } &&
10736          { ac_try='test -s conftest.$ac_objext'
10737   { (eval echo "$as_me:10737: \"$ac_try\"") >&5
10738   (eval $ac_try) 2>&5
10739   ac_status=$?
10740   echo "$as_me:10740: \$? = $ac_status" >&5
10741   (exit $ac_status); }; }; then
10742   cf_XOPEN_SOURCE_set_ok=yes
10743 else
10744   echo "$as_me: failed program was:" >&5
10745 cat conftest.$ac_ext >&5
10746 cf_XOPEN_SOURCE_set_ok=no
10747 fi
10748 rm -f conftest.$ac_objext conftest.$ac_ext
10749                 if test $cf_XOPEN_SOURCE_set_ok = no
10750                 then
10751                         { echo "$as_me:10751: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10752 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10753                 fi
10754         else
10755
10756 echo "$as_me:10756: checking if we should define _XOPEN_SOURCE" >&5
10757 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10758 if test "${cf_cv_xopen_source+set}" = set; then
10759   echo $ECHO_N "(cached) $ECHO_C" >&6
10760 else
10761
10762         cat >conftest.$ac_ext <<_ACEOF
10763 #line 10763 "configure"
10764 #include "confdefs.h"
10765
10766 #include <stdlib.h>
10767 #include <string.h>
10768 #include <sys/types.h>
10769
10770 int
10771 main (void)
10772 {
10773
10774 #ifndef _XOPEN_SOURCE
10775 make an error
10776 #endif
10777   ;
10778   return 0;
10779 }
10780 _ACEOF
10781 rm -f conftest.$ac_objext
10782 if { (eval echo "$as_me:10782: \"$ac_compile\"") >&5
10783   (eval $ac_compile) 2>&5
10784   ac_status=$?
10785   echo "$as_me:10785: \$? = $ac_status" >&5
10786   (exit $ac_status); } &&
10787          { ac_try='test -s conftest.$ac_objext'
10788   { (eval echo "$as_me:10788: \"$ac_try\"") >&5
10789   (eval $ac_try) 2>&5
10790   ac_status=$?
10791   echo "$as_me:10791: \$? = $ac_status" >&5
10792   (exit $ac_status); }; }; then
10793   cf_cv_xopen_source=no
10794 else
10795   echo "$as_me: failed program was:" >&5
10796 cat conftest.$ac_ext >&5
10797 cf_save="$CPPFLAGS"
10798
10799         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10800         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10801
10802          cat >conftest.$ac_ext <<_ACEOF
10803 #line 10803 "configure"
10804 #include "confdefs.h"
10805
10806 #include <stdlib.h>
10807 #include <string.h>
10808 #include <sys/types.h>
10809
10810 int
10811 main (void)
10812 {
10813
10814 #ifdef _XOPEN_SOURCE
10815 make an error
10816 #endif
10817   ;
10818   return 0;
10819 }
10820 _ACEOF
10821 rm -f conftest.$ac_objext
10822 if { (eval echo "$as_me:10822: \"$ac_compile\"") >&5
10823   (eval $ac_compile) 2>&5
10824   ac_status=$?
10825   echo "$as_me:10825: \$? = $ac_status" >&5
10826   (exit $ac_status); } &&
10827          { ac_try='test -s conftest.$ac_objext'
10828   { (eval echo "$as_me:10828: \"$ac_try\"") >&5
10829   (eval $ac_try) 2>&5
10830   ac_status=$?
10831   echo "$as_me:10831: \$? = $ac_status" >&5
10832   (exit $ac_status); }; }; then
10833   cf_cv_xopen_source=no
10834 else
10835   echo "$as_me: failed program was:" >&5
10836 cat conftest.$ac_ext >&5
10837 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10838 fi
10839 rm -f conftest.$ac_objext conftest.$ac_ext
10840         CPPFLAGS="$cf_save"
10841
10842 fi
10843 rm -f conftest.$ac_objext conftest.$ac_ext
10844
10845 fi
10846 echo "$as_me:10846: result: $cf_cv_xopen_source" >&5
10847 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10848
10849 if test "$cf_cv_xopen_source" != no ; then
10850
10851 CFLAGS=`echo "$CFLAGS" | \
10852         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10853                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10854
10855 CPPFLAGS=`echo "$CPPFLAGS" | \
10856         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10857                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10858
10859         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10860
10861 cf_fix_cppflags=no
10862 cf_new_cflags=
10863 cf_new_cppflags=
10864 cf_new_extra_cppflags=
10865
10866 for cf_add_cflags in $cf_temp_xopen_source
10867 do
10868 case $cf_fix_cppflags in
10869 (no)
10870         case $cf_add_cflags in
10871         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10872                 case $cf_add_cflags in
10873                 (-D*)
10874                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10875
10876                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10877                                 && test -z "${cf_tst_cflags}" \
10878                                 && cf_fix_cppflags=yes
10879
10880                         if test $cf_fix_cppflags = yes ; then
10881
10882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10884
10885                                 continue
10886                         elif test "${cf_tst_cflags}" = "\"'" ; then
10887
10888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10890
10891                                 continue
10892                         fi
10893                         ;;
10894                 esac
10895                 case "$CPPFLAGS" in
10896                 (*$cf_add_cflags)
10897                         ;;
10898                 (*)
10899                         case $cf_add_cflags in
10900                         (-D*)
10901                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10902
10903 CPPFLAGS=`echo "$CPPFLAGS" | \
10904         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10905                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10906
10907                                 ;;
10908                         esac
10909
10910         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10911         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10912
10913                         ;;
10914                 esac
10915                 ;;
10916         (*)
10917
10918         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10919         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10920
10921                 ;;
10922         esac
10923         ;;
10924 (yes)
10925
10926         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10927         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10928
10929         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10930
10931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10932                 && test -z "${cf_tst_cflags}" \
10933                 && cf_fix_cppflags=no
10934         ;;
10935 esac
10936 done
10937
10938 if test -n "$cf_new_cflags" ; then
10939
10940         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10941         CFLAGS="${CFLAGS}$cf_new_cflags"
10942
10943 fi
10944
10945 if test -n "$cf_new_cppflags" ; then
10946
10947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10948         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10949
10950 fi
10951
10952 if test -n "$cf_new_extra_cppflags" ; then
10953
10954         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10955         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10956
10957 fi
10958
10959 fi
10960
10961         fi
10962 fi
10963 fi # cf_cv_posix_visible
10964
10965 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10966
10967 # Work around breakage on OS X
10968
10969 echo "$as_me:10969: checking if SIGWINCH is defined" >&5
10970 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10971 if test "${cf_cv_define_sigwinch+set}" = set; then
10972   echo $ECHO_N "(cached) $ECHO_C" >&6
10973 else
10974
10975         cat >conftest.$ac_ext <<_ACEOF
10976 #line 10976 "configure"
10977 #include "confdefs.h"
10978
10979 #include <sys/types.h>
10980 #include <sys/signal.h>
10981
10982 int
10983 main (void)
10984 {
10985 int x = SIGWINCH
10986   ;
10987   return 0;
10988 }
10989 _ACEOF
10990 rm -f conftest.$ac_objext
10991 if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5
10992   (eval $ac_compile) 2>&5
10993   ac_status=$?
10994   echo "$as_me:10994: \$? = $ac_status" >&5
10995   (exit $ac_status); } &&
10996          { ac_try='test -s conftest.$ac_objext'
10997   { (eval echo "$as_me:10997: \"$ac_try\"") >&5
10998   (eval $ac_try) 2>&5
10999   ac_status=$?
11000   echo "$as_me:11000: \$? = $ac_status" >&5
11001   (exit $ac_status); }; }; then
11002   cf_cv_define_sigwinch=yes
11003 else
11004   echo "$as_me: failed program was:" >&5
11005 cat conftest.$ac_ext >&5
11006 cat >conftest.$ac_ext <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009
11010 #undef _XOPEN_SOURCE
11011 #undef _POSIX_SOURCE
11012 #undef _POSIX_C_SOURCE
11013 #include <sys/types.h>
11014 #include <sys/signal.h>
11015
11016 int
11017 main (void)
11018 {
11019 int x = SIGWINCH
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f conftest.$ac_objext
11025 if { (eval echo "$as_me:11025: \"$ac_compile\"") >&5
11026   (eval $ac_compile) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit $ac_status); } &&
11030          { ac_try='test -s conftest.$ac_objext'
11031   { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032   (eval $ac_try) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit $ac_status); }; }; then
11036   cf_cv_define_sigwinch=maybe
11037 else
11038   echo "$as_me: failed program was:" >&5
11039 cat conftest.$ac_ext >&5
11040 cf_cv_define_sigwinch=no
11041 fi
11042 rm -f conftest.$ac_objext conftest.$ac_ext
11043
11044 fi
11045 rm -f conftest.$ac_objext conftest.$ac_ext
11046
11047 fi
11048 echo "$as_me:11048: result: $cf_cv_define_sigwinch" >&5
11049 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11050
11051 if test "$cf_cv_define_sigwinch" = maybe ; then
11052 echo "$as_me:11052: checking for actual SIGWINCH definition" >&5
11053 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11054 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11055   echo $ECHO_N "(cached) $ECHO_C" >&6
11056 else
11057
11058 cf_cv_fixup_sigwinch=unknown
11059 cf_sigwinch=32
11060 while test $cf_sigwinch != 1
11061 do
11062         cat >conftest.$ac_ext <<_ACEOF
11063 #line 11063 "configure"
11064 #include "confdefs.h"
11065
11066 #undef _XOPEN_SOURCE
11067 #undef _POSIX_SOURCE
11068 #undef _POSIX_C_SOURCE
11069 #include <sys/types.h>
11070 #include <sys/signal.h>
11071
11072 int
11073 main (void)
11074 {
11075
11076 #if SIGWINCH != $cf_sigwinch
11077 make an error
11078 #endif
11079 int x = SIGWINCH
11080   ;
11081   return 0;
11082 }
11083 _ACEOF
11084 rm -f conftest.$ac_objext
11085 if { (eval echo "$as_me:11085: \"$ac_compile\"") >&5
11086   (eval $ac_compile) 2>&5
11087   ac_status=$?
11088   echo "$as_me:11088: \$? = $ac_status" >&5
11089   (exit $ac_status); } &&
11090          { ac_try='test -s conftest.$ac_objext'
11091   { (eval echo "$as_me:11091: \"$ac_try\"") >&5
11092   (eval $ac_try) 2>&5
11093   ac_status=$?
11094   echo "$as_me:11094: \$? = $ac_status" >&5
11095   (exit $ac_status); }; }; then
11096   cf_cv_fixup_sigwinch=$cf_sigwinch
11097          break
11098 else
11099   echo "$as_me: failed program was:" >&5
11100 cat conftest.$ac_ext >&5
11101 fi
11102 rm -f conftest.$ac_objext conftest.$ac_ext
11103
11104 cf_sigwinch=`expr $cf_sigwinch - 1`
11105 done
11106
11107 fi
11108 echo "$as_me:11108: result: $cf_cv_fixup_sigwinch" >&5
11109 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11110
11111         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11112                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11113         fi
11114 fi
11115
11116 # Checks for CODESET support.
11117
11118 echo "$as_me:11118: checking for nl_langinfo and CODESET" >&5
11119 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11120 if test "${am_cv_langinfo_codeset+set}" = set; then
11121   echo $ECHO_N "(cached) $ECHO_C" >&6
11122 else
11123   cat >conftest.$ac_ext <<_ACEOF
11124 #line 11124 "configure"
11125 #include "confdefs.h"
11126 #include <langinfo.h>
11127 int
11128 main (void)
11129 {
11130 char* cs = nl_langinfo(CODESET);
11131   ;
11132   return 0;
11133 }
11134 _ACEOF
11135 rm -f conftest.$ac_objext conftest$ac_exeext
11136 if { (eval echo "$as_me:11136: \"$ac_link\"") >&5
11137   (eval $ac_link) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); } &&
11141          { ac_try='test -s conftest$ac_exeext'
11142   { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143   (eval $ac_try) 2>&5
11144   ac_status=$?
11145   echo "$as_me:11145: \$? = $ac_status" >&5
11146   (exit $ac_status); }; }; then
11147   am_cv_langinfo_codeset=yes
11148 else
11149   echo "$as_me: failed program was:" >&5
11150 cat conftest.$ac_ext >&5
11151 am_cv_langinfo_codeset=no
11152 fi
11153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11154
11155 fi
11156 echo "$as_me:11156: result: $am_cv_langinfo_codeset" >&5
11157 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11158         if test $am_cv_langinfo_codeset = yes; then
11159
11160 cat >>confdefs.h <<\EOF
11161 #define HAVE_LANGINFO_CODESET 1
11162 EOF
11163
11164         fi
11165
11166 # use these variables to work around a defect in gcc's fixincludes.
11167 NCURSES_OK_WCHAR_T=
11168 NCURSES_OK_WINT_T=
11169
11170 echo "$as_me:11170: checking if you want wide-character code" >&5
11171 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11172
11173 # Check whether --enable-widec or --disable-widec was given.
11174 if test "${enable_widec+set}" = set; then
11175   enableval="$enable_widec"
11176   with_widec=$enableval
11177 else
11178   with_widec=no
11179 fi;
11180 echo "$as_me:11180: result: $with_widec" >&5
11181 echo "${ECHO_T}$with_widec" >&6
11182
11183 NCURSES_WCWIDTH_GRAPHICS=1
11184
11185 if test "x$with_widec" = xyes ; then
11186         if test "x$disable_lib_suffixes" = xno ; then
11187                 LIB_SUFFIX="w${LIB_SUFFIX}"
11188         fi
11189
11190 cat >>confdefs.h <<\EOF
11191 #define USE_WIDEC_SUPPORT 1
11192 EOF
11193
11194 cat >>confdefs.h <<\EOF
11195 #define NCURSES_WIDECHAR 1
11196 EOF
11197
11198 for ac_header in \
11199 wchar.h \
11200 wctype.h \
11201
11202 do
11203 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11204 echo "$as_me:11204: checking for $ac_header" >&5
11205 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11206 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11207   echo $ECHO_N "(cached) $ECHO_C" >&6
11208 else
11209   cat >conftest.$ac_ext <<_ACEOF
11210 #line 11210 "configure"
11211 #include "confdefs.h"
11212 #include <$ac_header>
11213 _ACEOF
11214 if { (eval echo "$as_me:11214: \"$ac_cpp conftest.$ac_ext\"") >&5
11215   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11216   ac_status=$?
11217   egrep -v '^ *\+' conftest.er1 >conftest.err
11218   rm -f conftest.er1
11219   cat conftest.err >&5
11220   echo "$as_me:11220: \$? = $ac_status" >&5
11221   (exit $ac_status); } >/dev/null; then
11222   if test -s conftest.err; then
11223     ac_cpp_err=$ac_c_preproc_warn_flag
11224   else
11225     ac_cpp_err=
11226   fi
11227 else
11228   ac_cpp_err=yes
11229 fi
11230 if test -z "$ac_cpp_err"; then
11231   eval "$as_ac_Header=yes"
11232 else
11233   echo "$as_me: failed program was:" >&5
11234   cat conftest.$ac_ext >&5
11235   eval "$as_ac_Header=no"
11236 fi
11237 rm -f conftest.err conftest.$ac_ext
11238 fi
11239 echo "$as_me:11239: result: `eval echo '${'$as_ac_Header'}'`" >&5
11240 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11241 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11242   cat >>confdefs.h <<EOF
11243 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11244 EOF
11245
11246 fi
11247 done
11248
11249 echo "$as_me:11249: checking if wchar.h can be used as is" >&5
11250 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11251 if test "${cf_cv_wchar_h_okay+set}" = set; then
11252   echo $ECHO_N "(cached) $ECHO_C" >&6
11253 else
11254
11255 cat >conftest.$ac_ext <<_ACEOF
11256 #line 11256 "configure"
11257 #include "confdefs.h"
11258
11259 #include <stdlib.h>
11260 #ifdef HAVE_WCHAR_H
11261 #include <wchar.h>
11262 #endif
11263 #ifdef HAVE_WCTYPE_H
11264 #include <wctype.h>
11265 #endif
11266
11267 int
11268 main (void)
11269 {
11270
11271         wint_t foo = 0;
11272         int bar = iswpunct(foo)
11273   ;
11274   return 0;
11275 }
11276 _ACEOF
11277 rm -f conftest.$ac_objext
11278 if { (eval echo "$as_me:11278: \"$ac_compile\"") >&5
11279   (eval $ac_compile) 2>&5
11280   ac_status=$?
11281   echo "$as_me:11281: \$? = $ac_status" >&5
11282   (exit $ac_status); } &&
11283          { ac_try='test -s conftest.$ac_objext'
11284   { (eval echo "$as_me:11284: \"$ac_try\"") >&5
11285   (eval $ac_try) 2>&5
11286   ac_status=$?
11287   echo "$as_me:11287: \$? = $ac_status" >&5
11288   (exit $ac_status); }; }; then
11289   cf_cv_wchar_h_okay=yes
11290 else
11291   echo "$as_me: failed program was:" >&5
11292 cat conftest.$ac_ext >&5
11293 cf_cv_wchar_h_okay=no
11294 fi
11295 rm -f conftest.$ac_objext conftest.$ac_ext
11296 fi
11297 echo "$as_me:11297: result: $cf_cv_wchar_h_okay" >&5
11298 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11299
11300 if test $cf_cv_wchar_h_okay = no
11301 then
11302
11303 echo "$as_me:11303: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11304 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11305 cat >conftest.$ac_ext <<_ACEOF
11306 #line 11306 "configure"
11307 #include "confdefs.h"
11308 #include <sys/types.h>
11309
11310 int
11311 main (void)
11312 {
11313
11314 #ifndef _XOPEN_SOURCE_EXTENDED
11315 make an error
11316 #endif
11317   ;
11318   return 0;
11319 }
11320 _ACEOF
11321 rm -f conftest.$ac_objext
11322 if { (eval echo "$as_me:11322: \"$ac_compile\"") >&5
11323   (eval $ac_compile) 2>&5
11324   ac_status=$?
11325   echo "$as_me:11325: \$? = $ac_status" >&5
11326   (exit $ac_status); } &&
11327          { ac_try='test -s conftest.$ac_objext'
11328   { (eval echo "$as_me:11328: \"$ac_try\"") >&5
11329   (eval $ac_try) 2>&5
11330   ac_status=$?
11331   echo "$as_me:11331: \$? = $ac_status" >&5
11332   (exit $ac_status); }; }; then
11333   cf_result=no
11334 else
11335   echo "$as_me: failed program was:" >&5
11336 cat conftest.$ac_ext >&5
11337 cf_result=yes
11338 fi
11339 rm -f conftest.$ac_objext conftest.$ac_ext
11340 echo "$as_me:11340: result: $cf_result" >&5
11341 echo "${ECHO_T}$cf_result" >&6
11342
11343 if test "$cf_result" = yes ; then
11344         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11345 elif test "x" != "x" ; then
11346         echo "$as_me:11346: checking checking for compatible value versus " >&5
11347 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11348         cat >conftest.$ac_ext <<_ACEOF
11349 #line 11349 "configure"
11350 #include "confdefs.h"
11351 #include <sys/types.h>
11352
11353 int
11354 main (void)
11355 {
11356
11357 #if _XOPEN_SOURCE_EXTENDED- < 0
11358 make an error
11359 #endif
11360   ;
11361   return 0;
11362 }
11363 _ACEOF
11364 rm -f conftest.$ac_objext
11365 if { (eval echo "$as_me:11365: \"$ac_compile\"") >&5
11366   (eval $ac_compile) 2>&5
11367   ac_status=$?
11368   echo "$as_me:11368: \$? = $ac_status" >&5
11369   (exit $ac_status); } &&
11370          { ac_try='test -s conftest.$ac_objext'
11371   { (eval echo "$as_me:11371: \"$ac_try\"") >&5
11372   (eval $ac_try) 2>&5
11373   ac_status=$?
11374   echo "$as_me:11374: \$? = $ac_status" >&5
11375   (exit $ac_status); }; }; then
11376   cf_result=yes
11377 else
11378   echo "$as_me: failed program was:" >&5
11379 cat conftest.$ac_ext >&5
11380 cf_result=no
11381 fi
11382 rm -f conftest.$ac_objext conftest.$ac_ext
11383         echo "$as_me:11383: result: $cf_result" >&5
11384 echo "${ECHO_T}$cf_result" >&6
11385         if test "$cf_result" = no ; then
11386                 # perhaps we can override it - try...
11387                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11388         fi
11389 fi
11390
11391 fi
11392
11393 echo "$as_me:11393: checking if wcwidth agrees graphics are single-width" >&5
11394 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11395 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11396   echo $ECHO_N "(cached) $ECHO_C" >&6
11397 else
11398
11399 cat >conftest.in <<CF_EOF
11400 -       VT100 symbols
11401 0x250c  upper left corner
11402 0x2514  lower left corner
11403 0x2510  upper right corner
11404 0x2518  lower right corner
11405 0x251c  tee pointing left
11406 0x2524  tee pointing right
11407 0x2534  tee pointing up
11408 0x252c  tee pointing down
11409 0x2500  horizontal line
11410 0x2502  vertical line
11411 0x253c  large plus or crossover
11412 0x23ba  scan line 1
11413 0x23bd  scan line 9
11414 0x25c6  diamond
11415 0x2592  checker board (stipple)
11416 0x00b0  degree symbol
11417 0x00b1  plus/minus
11418 0x00b7  bullet
11419 -       Teletype 5410v1 symbols
11420 0x2190  arrow pointing left
11421 0x2192  arrow pointing right
11422 0x2193  arrow pointing down
11423 0x2191  arrow pointing up
11424 0x2592  board of squares
11425 0x2603  lantern symbol
11426 0x25ae  solid square block
11427 -       these defaults were invented for ncurses
11428 0x23bb  scan line 3
11429 0x23bc  scan line 7
11430 0x2264  less-than-or-equal-to
11431 0x2265  greater-than-or-equal-to
11432 0x03c0  greek pi
11433 0x2260  not-equal
11434 0x00a3  pound-sterling symbol
11435 -       thick-line-drawing
11436 0x250f  upper left corner
11437 0x2517  lower left corner
11438 0x2513  upper right corner
11439 0x251b  lower right corner
11440 0x2523  tee pointing left
11441 0x252b  tee pointing right
11442 0x253b  tee pointing up
11443 0x2533  tee pointing down
11444 0x2501  horizontal line
11445 0x2503  vertical line
11446 0x254b  large plus or crossover
11447 -       double-line-drawing
11448 0x2554  upper left corner
11449 0x255a  lower left corner
11450 0x2557  upper right corner
11451 0x255d  lower right corner
11452 0x2563  tee pointing left
11453 0x2560  tee pointing right
11454 0x2569  tee pointing up
11455 0x2566  tee pointing down
11456 0x2550  horizontal line
11457 0x2551  vertical line
11458 0x256c  large plus or crossover
11459 CF_EOF
11460 if test "$cross_compiling" = yes; then
11461   cf_cv_wcwidth_graphics=unknown
11462 else
11463   cat >conftest.$ac_ext <<_ACEOF
11464 #line 11464 "configure"
11465 #include "confdefs.h"
11466
11467 #include <locale.h>
11468 #include <stdio.h>
11469 #include <wchar.h>
11470
11471 #define MY_LEN 80
11472
11473 int
11474 main(void)
11475 {
11476         FILE *fp;
11477         int value;
11478         char buffer[MY_LEN + 1];
11479         char notes[MY_LEN + 1];
11480         int totals = 0;
11481         int passed = 0;
11482
11483         if (setlocale(LC_ALL, "en_US.UTF8") ||
11484                 setlocale(LC_ALL, "en_US.UTF-8") ||
11485                 setlocale(LC_ALL, "en_US.utf8") ||
11486                 setlocale(LC_ALL, "en_US.utf-8")) {
11487                 if ((fp = fopen("conftest.in", "r")) != 0) {
11488                         while (fgets(buffer, MY_LEN, fp) != 0) {
11489                                 if (*buffer == '-') {
11490                                         fprintf(stderr, "\t%s", buffer);
11491                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11492                                         ++totals;
11493                                         if (wcwidth(value) == 1)
11494                                                 ++passed;
11495                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11496                                 } else {
11497                                         fprintf(stderr, "?\t%s", buffer);
11498                                 }
11499                         }
11500                 }
11501         }
11502         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11503         return (totals == passed) ? 0 : 1;
11504 }
11505
11506 _ACEOF
11507 rm -f conftest$ac_exeext
11508 if { (eval echo "$as_me:11508: \"$ac_link\"") >&5
11509   (eval $ac_link) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11513   { (eval echo "$as_me:11513: \"$ac_try\"") >&5
11514   (eval $ac_try) 2>&5
11515   ac_status=$?
11516   echo "$as_me:11516: \$? = $ac_status" >&5
11517   (exit $ac_status); }; }; then
11518   cf_cv_wcwidth_graphics=yes
11519 else
11520   echo "$as_me: program exited with status $ac_status" >&5
11521 echo "$as_me: failed program was:" >&5
11522 cat conftest.$ac_ext >&5
11523 cf_cv_wcwidth_graphics=no
11524 fi
11525 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11526 fi
11527
11528 fi
11529 echo "$as_me:11529: result: $cf_cv_wcwidth_graphics" >&5
11530 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11531
11532         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11533
11534         # with_overwrite=no
11535         NCURSES_CH_T=cchar_t
11536
11537 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11538 do
11539 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11540 echo "$as_me:11540: checking for $ac_func" >&5
11541 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11542 if eval "test \"\${$as_ac_var+set}\" = set"; then
11543   echo $ECHO_N "(cached) $ECHO_C" >&6
11544 else
11545   cat >conftest.$ac_ext <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11548 #define $ac_func autoconf_temporary
11549 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11550 #undef $ac_func
11551
11552 #ifdef __cplusplus
11553 extern "C"
11554 #endif
11555
11556 /* We use char because int might match the return type of a gcc2
11557    builtin and then its argument prototype would still apply.  */
11558 char $ac_func (void);
11559
11560 int
11561 main (void)
11562 {
11563
11564 /* The GNU C library defines stubs for functions which it implements
11565     to always fail with ENOSYS.  Some functions are actually named
11566     something starting with __ and the normal name is an alias.  */
11567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11568 #error found stub for $ac_func
11569 #endif
11570
11571         return $ac_func ();
11572   ;
11573   return 0;
11574 }
11575 _ACEOF
11576 rm -f conftest.$ac_objext conftest$ac_exeext
11577 if { (eval echo "$as_me:11577: \"$ac_link\"") >&5
11578   (eval $ac_link) 2>&5
11579   ac_status=$?
11580   echo "$as_me:11580: \$? = $ac_status" >&5
11581   (exit $ac_status); } &&
11582          { ac_try='test -s conftest$ac_exeext'
11583   { (eval echo "$as_me:11583: \"$ac_try\"") >&5
11584   (eval $ac_try) 2>&5
11585   ac_status=$?
11586   echo "$as_me:11586: \$? = $ac_status" >&5
11587   (exit $ac_status); }; }; then
11588   eval "$as_ac_var=yes"
11589 else
11590   echo "$as_me: failed program was:" >&5
11591 cat conftest.$ac_ext >&5
11592 eval "$as_ac_var=no"
11593 fi
11594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11595 fi
11596 echo "$as_me:11596: result: `eval echo '${'$as_ac_var'}'`" >&5
11597 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11598 if test `eval echo '${'$as_ac_var'}'` = yes; then
11599   cat >>confdefs.h <<EOF
11600 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11601 EOF
11602
11603 fi
11604 done
11605
11606         if test "x$ac_cv_func_putwc" != xyes ; then
11607
11608 echo "$as_me:11608: checking for multibyte character support" >&5
11609 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11610 if test "${cf_cv_utf8_lib+set}" = set; then
11611   echo $ECHO_N "(cached) $ECHO_C" >&6
11612 else
11613
11614         cf_save_LIBS="$LIBS"
11615         cat >conftest.$ac_ext <<_ACEOF
11616 #line 11616 "configure"
11617 #include "confdefs.h"
11618
11619 #include <stdlib.h>
11620 int
11621 main (void)
11622 {
11623 putwc(0,0);
11624   ;
11625   return 0;
11626 }
11627 _ACEOF
11628 rm -f conftest.$ac_objext conftest$ac_exeext
11629 if { (eval echo "$as_me:11629: \"$ac_link\"") >&5
11630   (eval $ac_link) 2>&5
11631   ac_status=$?
11632   echo "$as_me:11632: \$? = $ac_status" >&5
11633   (exit $ac_status); } &&
11634          { ac_try='test -s conftest$ac_exeext'
11635   { (eval echo "$as_me:11635: \"$ac_try\"") >&5
11636   (eval $ac_try) 2>&5
11637   ac_status=$?
11638   echo "$as_me:11638: \$? = $ac_status" >&5
11639   (exit $ac_status); }; }; then
11640   cf_cv_utf8_lib=yes
11641 else
11642   echo "$as_me: failed program was:" >&5
11643 cat conftest.$ac_ext >&5
11644
11645 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11646 # will be set on completion of the AC_TRY_LINK below.
11647 cf_cv_header_path_utf8=
11648 cf_cv_library_path_utf8=
11649
11650 echo "${as_me:-configure}:11650: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11651
11652 cf_save_LIBS="$LIBS"
11653
11654 cat >conftest.$ac_ext <<_ACEOF
11655 #line 11655 "configure"
11656 #include "confdefs.h"
11657
11658 #include <libutf8.h>
11659 int
11660 main (void)
11661 {
11662 putwc(0,0);
11663   ;
11664   return 0;
11665 }
11666 _ACEOF
11667 rm -f conftest.$ac_objext conftest$ac_exeext
11668 if { (eval echo "$as_me:11668: \"$ac_link\"") >&5
11669   (eval $ac_link) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); } &&
11673          { ac_try='test -s conftest$ac_exeext'
11674   { (eval echo "$as_me:11674: \"$ac_try\"") >&5
11675   (eval $ac_try) 2>&5
11676   ac_status=$?
11677   echo "$as_me:11677: \$? = $ac_status" >&5
11678   (exit $ac_status); }; }; then
11679
11680         cf_cv_find_linkage_utf8=yes
11681         cf_cv_header_path_utf8=/usr/include
11682         cf_cv_library_path_utf8=/usr/lib
11683
11684 else
11685   echo "$as_me: failed program was:" >&5
11686 cat conftest.$ac_ext >&5
11687
11688 LIBS="-lutf8  $cf_save_LIBS"
11689
11690 cat >conftest.$ac_ext <<_ACEOF
11691 #line 11691 "configure"
11692 #include "confdefs.h"
11693
11694 #include <libutf8.h>
11695 int
11696 main (void)
11697 {
11698 putwc(0,0);
11699   ;
11700   return 0;
11701 }
11702 _ACEOF
11703 rm -f conftest.$ac_objext conftest$ac_exeext
11704 if { (eval echo "$as_me:11704: \"$ac_link\"") >&5
11705   (eval $ac_link) 2>&5
11706   ac_status=$?
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit $ac_status); } &&
11709          { ac_try='test -s conftest$ac_exeext'
11710   { (eval echo "$as_me:11710: \"$ac_try\"") >&5
11711   (eval $ac_try) 2>&5
11712   ac_status=$?
11713   echo "$as_me:11713: \$? = $ac_status" >&5
11714   (exit $ac_status); }; }; then
11715
11716         cf_cv_find_linkage_utf8=yes
11717         cf_cv_header_path_utf8=/usr/include
11718         cf_cv_library_path_utf8=/usr/lib
11719         cf_cv_library_file_utf8="-lutf8"
11720
11721 else
11722   echo "$as_me: failed program was:" >&5
11723 cat conftest.$ac_ext >&5
11724
11725         cf_cv_find_linkage_utf8=no
11726         LIBS="$cf_save_LIBS"
11727
11728         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11729
11730 echo "${as_me:-configure}:11730: testing find linkage for utf8 library ..." 1>&5
11731
11732 echo "${as_me:-configure}:11732: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11733
11734         cf_save_CPPFLAGS="$CPPFLAGS"
11735         cf_test_CPPFLAGS="$CPPFLAGS"
11736
11737 cf_search=
11738
11739 # collect the current set of include-directories from compiler flags
11740 cf_header_path_list=""
11741 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11742         for cf_header_path in $CPPFLAGS $CFLAGS
11743         do
11744                 case $cf_header_path in
11745                 (-I*)
11746                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11747
11748 test "x$cf_header_path" != "xNONE" && \
11749 test -d "$cf_header_path" && \
11750  {
11751         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11752         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11753         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11754         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11755         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11756         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11757 }
11758
11759                         cf_header_path_list="$cf_header_path_list $cf_search"
11760                         ;;
11761                 esac
11762         done
11763 fi
11764
11765 # add the variations for the package we are looking for
11766
11767 cf_search=
11768
11769 test "x$prefix" != "xNONE" && \
11770 test -d "$prefix" && \
11771  {
11772         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11773         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11774         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11775         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11776         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11777         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11778 }
11779
11780 for cf_subdir_prefix in \
11781         /usr \
11782         /usr/local \
11783         /usr/pkg \
11784         /opt \
11785         /opt/local \
11786         $HOME
11787 do
11788
11789 test "x$cf_subdir_prefix" != "x$prefix" && \
11790 test -d "$cf_subdir_prefix" && \
11791 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11792         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11793         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11794         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11795         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11796         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11797         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11798 }
11799
11800 done
11801
11802 test "$includedir" != NONE && \
11803 test "$includedir" != "/usr/include" && \
11804 test -d "$includedir" && {
11805         test -d $includedir &&    cf_search="$cf_search $includedir"
11806         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11807 }
11808
11809 test "$oldincludedir" != NONE && \
11810 test "$oldincludedir" != "/usr/include" && \
11811 test -d "$oldincludedir" && {
11812         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11813         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11814 }
11815
11816 cf_search="$cf_search $cf_header_path_list"
11817
11818         for cf_cv_header_path_utf8 in $cf_search
11819         do
11820                 if test -d $cf_cv_header_path_utf8 ; then
11821                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11822
11823 echo "${as_me:-configure}:11823: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11824
11825                         CPPFLAGS="$cf_save_CPPFLAGS"
11826
11827         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11828         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11829
11830                         cat >conftest.$ac_ext <<_ACEOF
11831 #line 11831 "configure"
11832 #include "confdefs.h"
11833
11834 #include <libutf8.h>
11835 int
11836 main (void)
11837 {
11838 putwc(0,0);
11839   ;
11840   return 0;
11841 }
11842 _ACEOF
11843 rm -f conftest.$ac_objext
11844 if { (eval echo "$as_me:11844: \"$ac_compile\"") >&5
11845   (eval $ac_compile) 2>&5
11846   ac_status=$?
11847   echo "$as_me:11847: \$? = $ac_status" >&5
11848   (exit $ac_status); } &&
11849          { ac_try='test -s conftest.$ac_objext'
11850   { (eval echo "$as_me:11850: \"$ac_try\"") >&5
11851   (eval $ac_try) 2>&5
11852   ac_status=$?
11853   echo "$as_me:11853: \$? = $ac_status" >&5
11854   (exit $ac_status); }; }; then
11855
11856                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11857
11858 echo "${as_me:-configure}:11858: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11859
11860                                 cf_cv_find_linkage_utf8=maybe
11861                                 cf_test_CPPFLAGS="$CPPFLAGS"
11862                                 break
11863 else
11864   echo "$as_me: failed program was:" >&5
11865 cat conftest.$ac_ext >&5
11866
11867                                 CPPFLAGS="$cf_save_CPPFLAGS"
11868
11869 fi
11870 rm -f conftest.$ac_objext conftest.$ac_ext
11871                 fi
11872         done
11873
11874         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11875
11876 echo "${as_me:-configure}:11876: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11877
11878                 cf_save_LIBS="$LIBS"
11879                 cf_save_LDFLAGS="$LDFLAGS"
11880
11881                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11882
11883 cf_search=
11884 cf_library_path_list=""
11885 if test -n "${LDFLAGS}${LIBS}" ; then
11886         for cf_library_path in $LDFLAGS $LIBS
11887         do
11888                 case $cf_library_path in
11889                 (-L*)
11890                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11891
11892 test "x$cf_library_path" != "xNONE" && \
11893 test -d "$cf_library_path" && \
11894  {
11895         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11896         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11897         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11898         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11899         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11900         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11901 }
11902
11903                         cf_library_path_list="$cf_library_path_list $cf_search"
11904                         ;;
11905                 esac
11906         done
11907 fi
11908
11909 cf_search=
11910
11911 test "x$prefix" != "xNONE" && \
11912 test -d "$prefix" && \
11913  {
11914         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11915         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11916         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11917         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11918         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11919         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11920 }
11921
11922 for cf_subdir_prefix in \
11923         /usr \
11924         /usr/local \
11925         /usr/pkg \
11926         /opt \
11927         /opt/local \
11928         $HOME
11929 do
11930
11931 test "x$cf_subdir_prefix" != "x$prefix" && \
11932 test -d "$cf_subdir_prefix" && \
11933 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11934         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11935         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11936         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11937         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11938         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11939         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11940 }
11941
11942 done
11943
11944 cf_search="$cf_library_path_list $cf_search"
11945
11946                         for cf_cv_library_path_utf8 in $cf_search
11947                         do
11948                                 if test -d $cf_cv_library_path_utf8 ; then
11949                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11950
11951 echo "${as_me:-configure}:11951: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11952
11953                                         CPPFLAGS="$cf_test_CPPFLAGS"
11954                                         LIBS="-lutf8  $cf_save_LIBS"
11955                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11956                                         cat >conftest.$ac_ext <<_ACEOF
11957 #line 11957 "configure"
11958 #include "confdefs.h"
11959
11960 #include <libutf8.h>
11961 int
11962 main (void)
11963 {
11964 putwc(0,0);
11965   ;
11966   return 0;
11967 }
11968 _ACEOF
11969 rm -f conftest.$ac_objext conftest$ac_exeext
11970 if { (eval echo "$as_me:11970: \"$ac_link\"") >&5
11971   (eval $ac_link) 2>&5
11972   ac_status=$?
11973   echo "$as_me:11973: \$? = $ac_status" >&5
11974   (exit $ac_status); } &&
11975          { ac_try='test -s conftest$ac_exeext'
11976   { (eval echo "$as_me:11976: \"$ac_try\"") >&5
11977   (eval $ac_try) 2>&5
11978   ac_status=$?
11979   echo "$as_me:11979: \$? = $ac_status" >&5
11980   (exit $ac_status); }; }; then
11981
11982                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11983
11984 echo "${as_me:-configure}:11984: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11985
11986                                         cf_cv_find_linkage_utf8=yes
11987                                         cf_cv_library_file_utf8="-lutf8"
11988                                         break
11989 else
11990   echo "$as_me: failed program was:" >&5
11991 cat conftest.$ac_ext >&5
11992
11993                                         CPPFLAGS="$cf_save_CPPFLAGS"
11994                                         LIBS="$cf_save_LIBS"
11995                                         LDFLAGS="$cf_save_LDFLAGS"
11996
11997 fi
11998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11999                                 fi
12000                         done
12001                         CPPFLAGS="$cf_save_CPPFLAGS"
12002                         LDFLAGS="$cf_save_LDFLAGS"
12003                 fi
12004
12005         else
12006                 cf_cv_find_linkage_utf8=no
12007         fi
12008
12009 fi
12010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12011
12012 fi
12013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12014
12015 LIBS="$cf_save_LIBS"
12016
12017 if test "$cf_cv_find_linkage_utf8" = yes ; then
12018 cf_cv_utf8_lib=add-on
12019 else
12020 cf_cv_utf8_lib=no
12021 fi
12022
12023 fi
12024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12025 fi
12026 echo "$as_me:12026: result: $cf_cv_utf8_lib" >&5
12027 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12028
12029 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12030 # ncurses/ncursesw:
12031 if test "$cf_cv_utf8_lib" = "add-on" ; then
12032
12033 cat >>confdefs.h <<\EOF
12034 #define HAVE_LIBUTF8_H 1
12035 EOF
12036
12037 if test -n "$cf_cv_header_path_utf8" ; then
12038   for cf_add_incdir in $cf_cv_header_path_utf8
12039   do
12040         while test $cf_add_incdir != /usr/include
12041         do
12042           if test -d $cf_add_incdir
12043           then
12044                 cf_have_incdir=no
12045                 if test -n "$CFLAGS$CPPFLAGS" ; then
12046                   # a loop is needed to ensure we can add subdirs of existing dirs
12047                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12048                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12049                           cf_have_incdir=yes; break
12050                         fi
12051                   done
12052                 fi
12053
12054                 if test "$cf_have_incdir" = no ; then
12055                   if test "$cf_add_incdir" = /usr/local/include ; then
12056                         if test "$GCC" = yes
12057                         then
12058                           cf_save_CPPFLAGS=$CPPFLAGS
12059
12060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12061         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12062
12063                           cat >conftest.$ac_ext <<_ACEOF
12064 #line 12064 "configure"
12065 #include "confdefs.h"
12066 #include <stdio.h>
12067 int
12068 main (void)
12069 {
12070 printf("Hello")
12071   ;
12072   return 0;
12073 }
12074 _ACEOF
12075 rm -f conftest.$ac_objext
12076 if { (eval echo "$as_me:12076: \"$ac_compile\"") >&5
12077   (eval $ac_compile) 2>&5
12078   ac_status=$?
12079   echo "$as_me:12079: \$? = $ac_status" >&5
12080   (exit $ac_status); } &&
12081          { ac_try='test -s conftest.$ac_objext'
12082   { (eval echo "$as_me:12082: \"$ac_try\"") >&5
12083   (eval $ac_try) 2>&5
12084   ac_status=$?
12085   echo "$as_me:12085: \$? = $ac_status" >&5
12086   (exit $ac_status); }; }; then
12087   :
12088 else
12089   echo "$as_me: failed program was:" >&5
12090 cat conftest.$ac_ext >&5
12091 cf_have_incdir=yes
12092 fi
12093 rm -f conftest.$ac_objext conftest.$ac_ext
12094                           CPPFLAGS=$cf_save_CPPFLAGS
12095                         fi
12096                   fi
12097                 fi
12098
12099                 if test "$cf_have_incdir" = no ; then
12100                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12101
12102 echo "${as_me:-configure}:12102: testing adding $cf_add_incdir to include-path ..." 1>&5
12103
12104                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12105
12106                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12107                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12108                   cf_add_incdir="$cf_top_incdir"
12109                 else
12110                   break
12111                 fi
12112           else
12113                 break
12114           fi
12115         done
12116   done
12117 fi
12118
12119 if test -n "$cf_cv_library_path_utf8" ; then
12120         for cf_add_libdir in $cf_cv_library_path_utf8
12121         do
12122                 if test $cf_add_libdir = /usr/lib ; then
12123                         :
12124                 elif test -d $cf_add_libdir
12125                 then
12126                         cf_have_libdir=no
12127                         if test -n "$LDFLAGS$LIBS" ; then
12128                                 # a loop is needed to ensure we can add subdirs of existing dirs
12129                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12130                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12131                                                 cf_have_libdir=yes; break
12132                                         fi
12133                                 done
12134                         fi
12135                         if test "$cf_have_libdir" = no ; then
12136                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12137
12138 echo "${as_me:-configure}:12138: testing adding $cf_add_libdir to library-path ..." 1>&5
12139
12140                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12141                         fi
12142                 fi
12143         done
12144 fi
12145
12146 cf_add_libs="$LIBS"
12147 # reverse order
12148 cf_add_0lib=
12149 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12150 # filter duplicates
12151 for cf_add_1lib in $cf_add_0lib; do
12152         for cf_add_2lib in $cf_add_libs; do
12153                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12154                         cf_add_1lib=
12155                         break
12156                 fi
12157         done
12158         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12159 done
12160 LIBS="$cf_add_libs"
12161
12162 fi
12163
12164                 if test "$cf_cv_utf8_lib" != no ; then
12165                         NCURSES_LIBUTF8=1
12166                 fi
12167         fi
12168
12169 # This is needed on Tru64 5.0 to declare mbstate_t
12170 echo "$as_me:12170: checking if we must include wchar.h to declare mbstate_t" >&5
12171 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12172 if test "${cf_cv_mbstate_t+set}" = set; then
12173   echo $ECHO_N "(cached) $ECHO_C" >&6
12174 else
12175
12176 cat >conftest.$ac_ext <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179
12180 #include <stdlib.h>
12181 #include <stdarg.h>
12182 #include <stdio.h>
12183 #ifdef HAVE_LIBUTF8_H
12184 #include <libutf8.h>
12185 #endif
12186 int
12187 main (void)
12188 {
12189 mbstate_t state
12190   ;
12191   return 0;
12192 }
12193 _ACEOF
12194 rm -f conftest.$ac_objext
12195 if { (eval echo "$as_me:12195: \"$ac_compile\"") >&5
12196   (eval $ac_compile) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); } &&
12200          { ac_try='test -s conftest.$ac_objext'
12201   { (eval echo "$as_me:12201: \"$ac_try\"") >&5
12202   (eval $ac_try) 2>&5
12203   ac_status=$?
12204   echo "$as_me:12204: \$? = $ac_status" >&5
12205   (exit $ac_status); }; }; then
12206   cf_cv_mbstate_t=no
12207 else
12208   echo "$as_me: failed program was:" >&5
12209 cat conftest.$ac_ext >&5
12210 cat >conftest.$ac_ext <<_ACEOF
12211 #line 12211 "configure"
12212 #include "confdefs.h"
12213
12214 #include <stdlib.h>
12215 #include <stdarg.h>
12216 #include <stdio.h>
12217 #include <wchar.h>
12218 #ifdef HAVE_LIBUTF8_H
12219 #include <libutf8.h>
12220 #endif
12221 int
12222 main (void)
12223 {
12224 mbstate_t value
12225   ;
12226   return 0;
12227 }
12228 _ACEOF
12229 rm -f conftest.$ac_objext
12230 if { (eval echo "$as_me:12230: \"$ac_compile\"") >&5
12231   (eval $ac_compile) 2>&5
12232   ac_status=$?
12233   echo "$as_me:12233: \$? = $ac_status" >&5
12234   (exit $ac_status); } &&
12235          { ac_try='test -s conftest.$ac_objext'
12236   { (eval echo "$as_me:12236: \"$ac_try\"") >&5
12237   (eval $ac_try) 2>&5
12238   ac_status=$?
12239   echo "$as_me:12239: \$? = $ac_status" >&5
12240   (exit $ac_status); }; }; then
12241   cf_cv_mbstate_t=yes
12242 else
12243   echo "$as_me: failed program was:" >&5
12244 cat conftest.$ac_ext >&5
12245 cf_cv_mbstate_t=unknown
12246 fi
12247 rm -f conftest.$ac_objext conftest.$ac_ext
12248 fi
12249 rm -f conftest.$ac_objext conftest.$ac_ext
12250 fi
12251 echo "$as_me:12251: result: $cf_cv_mbstate_t" >&5
12252 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12253
12254 if test "$cf_cv_mbstate_t" = yes ; then
12255
12256 cat >>confdefs.h <<\EOF
12257 #define NEED_WCHAR_H 1
12258 EOF
12259
12260         NEED_WCHAR_H=1
12261 fi
12262
12263 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12264 if test "$cf_cv_mbstate_t" = unknown ; then
12265         NCURSES_MBSTATE_T=1
12266 fi
12267
12268 # This is needed on Tru64 5.0 to declare wchar_t
12269 echo "$as_me:12269: checking if we must include wchar.h to declare wchar_t" >&5
12270 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12271 if test "${cf_cv_wchar_t+set}" = set; then
12272   echo $ECHO_N "(cached) $ECHO_C" >&6
12273 else
12274
12275 cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278
12279 #include <stdlib.h>
12280 #include <stdarg.h>
12281 #include <stdio.h>
12282 #ifdef HAVE_LIBUTF8_H
12283 #include <libutf8.h>
12284 #endif
12285 int
12286 main (void)
12287 {
12288 wchar_t state
12289   ;
12290   return 0;
12291 }
12292 _ACEOF
12293 rm -f conftest.$ac_objext
12294 if { (eval echo "$as_me:12294: \"$ac_compile\"") >&5
12295   (eval $ac_compile) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); } &&
12299          { ac_try='test -s conftest.$ac_objext'
12300   { (eval echo "$as_me:12300: \"$ac_try\"") >&5
12301   (eval $ac_try) 2>&5
12302   ac_status=$?
12303   echo "$as_me:12303: \$? = $ac_status" >&5
12304   (exit $ac_status); }; }; then
12305   cf_cv_wchar_t=no
12306 else
12307   echo "$as_me: failed program was:" >&5
12308 cat conftest.$ac_ext >&5
12309 cat >conftest.$ac_ext <<_ACEOF
12310 #line 12310 "configure"
12311 #include "confdefs.h"
12312
12313 #include <stdlib.h>
12314 #include <stdarg.h>
12315 #include <stdio.h>
12316 #include <wchar.h>
12317 #ifdef HAVE_LIBUTF8_H
12318 #include <libutf8.h>
12319 #endif
12320 int
12321 main (void)
12322 {
12323 wchar_t value
12324   ;
12325   return 0;
12326 }
12327 _ACEOF
12328 rm -f conftest.$ac_objext
12329 if { (eval echo "$as_me:12329: \"$ac_compile\"") >&5
12330   (eval $ac_compile) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); } &&
12334          { ac_try='test -s conftest.$ac_objext'
12335   { (eval echo "$as_me:12335: \"$ac_try\"") >&5
12336   (eval $ac_try) 2>&5
12337   ac_status=$?
12338   echo "$as_me:12338: \$? = $ac_status" >&5
12339   (exit $ac_status); }; }; then
12340   cf_cv_wchar_t=yes
12341 else
12342   echo "$as_me: failed program was:" >&5
12343 cat conftest.$ac_ext >&5
12344 cf_cv_wchar_t=unknown
12345 fi
12346 rm -f conftest.$ac_objext conftest.$ac_ext
12347 fi
12348 rm -f conftest.$ac_objext conftest.$ac_ext
12349 fi
12350 echo "$as_me:12350: result: $cf_cv_wchar_t" >&5
12351 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12352
12353 if test "$cf_cv_wchar_t" = yes ; then
12354
12355 cat >>confdefs.h <<\EOF
12356 #define NEED_WCHAR_H 1
12357 EOF
12358
12359         NEED_WCHAR_H=1
12360 fi
12361
12362 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12363 if test "$cf_cv_wchar_t" = unknown ; then
12364         NCURSES_WCHAR_T=1
12365 fi
12366
12367 # if we find wchar_t in either place, use substitution to provide a fallback.
12368 if test "$cf_cv_wchar_t" != unknown ; then
12369         NCURSES_OK_WCHAR_T=1
12370 fi
12371
12372 # This is needed on Tru64 5.0 to declare wint_t
12373 echo "$as_me:12373: checking if we must include wchar.h to declare wint_t" >&5
12374 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12375 if test "${cf_cv_wint_t+set}" = set; then
12376   echo $ECHO_N "(cached) $ECHO_C" >&6
12377 else
12378
12379 cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382
12383 #include <stdlib.h>
12384 #include <stdarg.h>
12385 #include <stdio.h>
12386 #ifdef HAVE_LIBUTF8_H
12387 #include <libutf8.h>
12388 #endif
12389 int
12390 main (void)
12391 {
12392 wint_t state
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 rm -f conftest.$ac_objext
12398 if { (eval echo "$as_me:12398: \"$ac_compile\"") >&5
12399   (eval $ac_compile) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } &&
12403          { ac_try='test -s conftest.$ac_objext'
12404   { (eval echo "$as_me:12404: \"$ac_try\"") >&5
12405   (eval $ac_try) 2>&5
12406   ac_status=$?
12407   echo "$as_me:12407: \$? = $ac_status" >&5
12408   (exit $ac_status); }; }; then
12409   cf_cv_wint_t=no
12410 else
12411   echo "$as_me: failed program was:" >&5
12412 cat conftest.$ac_ext >&5
12413 cat >conftest.$ac_ext <<_ACEOF
12414 #line 12414 "configure"
12415 #include "confdefs.h"
12416
12417 #include <stdlib.h>
12418 #include <stdarg.h>
12419 #include <stdio.h>
12420 #include <wchar.h>
12421 #ifdef HAVE_LIBUTF8_H
12422 #include <libutf8.h>
12423 #endif
12424 int
12425 main (void)
12426 {
12427 wint_t value
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext
12433 if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
12434   (eval $ac_compile) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); } &&
12438          { ac_try='test -s conftest.$ac_objext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   cf_cv_wint_t=yes
12445 else
12446   echo "$as_me: failed program was:" >&5
12447 cat conftest.$ac_ext >&5
12448 cf_cv_wint_t=unknown
12449 fi
12450 rm -f conftest.$ac_objext conftest.$ac_ext
12451 fi
12452 rm -f conftest.$ac_objext conftest.$ac_ext
12453 fi
12454 echo "$as_me:12454: result: $cf_cv_wint_t" >&5
12455 echo "${ECHO_T}$cf_cv_wint_t" >&6
12456
12457 if test "$cf_cv_wint_t" = yes ; then
12458
12459 cat >>confdefs.h <<\EOF
12460 #define NEED_WCHAR_H 1
12461 EOF
12462
12463         NEED_WCHAR_H=1
12464 fi
12465
12466 # if we do not find wint_t in either place, use substitution to provide a fallback.
12467 if test "$cf_cv_wint_t" = unknown ; then
12468         NCURSES_WINT_T=1
12469 fi
12470
12471 # if we find wint_t in either place, use substitution to provide a fallback.
12472 if test "$cf_cv_wint_t" != unknown ; then
12473         NCURSES_OK_WINT_T=1
12474 fi
12475
12476         if test "$NCURSES_MBSTATE_T" != 0; then
12477
12478 cat >>confdefs.h <<\EOF
12479 #define NEED_MBSTATE_T_DEF 1
12480 EOF
12481
12482         fi
12483 fi
12484
12485 ###   use option --disable-lp64 to allow long chtype
12486 echo "$as_me:12486: checking whether to enable _LP64 definition in curses.h" >&5
12487 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12488
12489 # Check whether --enable-lp64 or --disable-lp64 was given.
12490 if test "${enable_lp64+set}" = set; then
12491   enableval="$enable_lp64"
12492   with_lp64=$enableval
12493 else
12494   with_lp64=$cf_dft_with_lp64
12495 fi;
12496 echo "$as_me:12496: result: $with_lp64" >&5
12497 echo "${ECHO_T}$with_lp64" >&6
12498
12499 if test "x$with_lp64" = xyes ; then
12500         cf_cv_enable_lp64=1
12501 else
12502         cf_cv_enable_lp64=0
12503 fi
12504
12505 # Check whether --enable-largefile or --disable-largefile was given.
12506 if test "${enable_largefile+set}" = set; then
12507   enableval="$enable_largefile"
12508
12509 fi;
12510 if test "$enable_largefile" != no; then
12511
12512   echo "$as_me:12512: checking for special C compiler options needed for large files" >&5
12513 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12514 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12515   echo $ECHO_N "(cached) $ECHO_C" >&6
12516 else
12517   ac_cv_sys_largefile_CC=no
12518      if test "$GCC" != yes; then
12519        ac_save_CC=$CC
12520        while :; do
12521          # IRIX 6.2 and later do not support large files by default,
12522          # so use the C compiler's -n32 option if that helps.
12523          cat >conftest.$ac_ext <<_ACEOF
12524 #line 12524 "configure"
12525 #include "confdefs.h"
12526 #include <sys/types.h>
12527  /* Check that off_t can represent 2**63 - 1 correctly.
12528     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12529     since some C++ compilers masquerading as C compilers
12530     incorrectly reject 9223372036854775807.  */
12531 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12532   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12533                        && LARGE_OFF_T % 2147483647 == 1)
12534                       ? 1 : -1];
12535 int
12536 main (void)
12537 {
12538
12539   ;
12540   return 0;
12541 }
12542 _ACEOF
12543          rm -f conftest.$ac_objext
12544 if { (eval echo "$as_me:12544: \"$ac_compile\"") >&5
12545   (eval $ac_compile) 2>&5
12546   ac_status=$?
12547   echo "$as_me:12547: \$? = $ac_status" >&5
12548   (exit $ac_status); } &&
12549          { ac_try='test -s conftest.$ac_objext'
12550   { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551   (eval $ac_try) 2>&5
12552   ac_status=$?
12553   echo "$as_me:12553: \$? = $ac_status" >&5
12554   (exit $ac_status); }; }; then
12555   break
12556 else
12557   echo "$as_me: failed program was:" >&5
12558 cat conftest.$ac_ext >&5
12559 fi
12560 rm -f conftest.$ac_objext
12561          CC="$CC -n32"
12562          rm -f conftest.$ac_objext
12563 if { (eval echo "$as_me:12563: \"$ac_compile\"") >&5
12564   (eval $ac_compile) 2>&5
12565   ac_status=$?
12566   echo "$as_me:12566: \$? = $ac_status" >&5
12567   (exit $ac_status); } &&
12568          { ac_try='test -s conftest.$ac_objext'
12569   { (eval echo "$as_me:12569: \"$ac_try\"") >&5
12570   (eval $ac_try) 2>&5
12571   ac_status=$?
12572   echo "$as_me:12572: \$? = $ac_status" >&5
12573   (exit $ac_status); }; }; then
12574   ac_cv_sys_largefile_CC=' -n32'; break
12575 else
12576   echo "$as_me: failed program was:" >&5
12577 cat conftest.$ac_ext >&5
12578 fi
12579 rm -f conftest.$ac_objext
12580          break
12581        done
12582        CC=$ac_save_CC
12583        rm -f conftest.$ac_ext
12584     fi
12585 fi
12586 echo "$as_me:12586: result: $ac_cv_sys_largefile_CC" >&5
12587 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12588   if test "$ac_cv_sys_largefile_CC" != no; then
12589     CC=$CC$ac_cv_sys_largefile_CC
12590   fi
12591
12592   echo "$as_me:12592: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12593 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12594 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12595   echo $ECHO_N "(cached) $ECHO_C" >&6
12596 else
12597   while :; do
12598   ac_cv_sys_file_offset_bits=no
12599   cat >conftest.$ac_ext <<_ACEOF
12600 #line 12600 "configure"
12601 #include "confdefs.h"
12602 #include <sys/types.h>
12603  /* Check that off_t can represent 2**63 - 1 correctly.
12604     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12605     since some C++ compilers masquerading as C compilers
12606     incorrectly reject 9223372036854775807.  */
12607 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12608   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12609                        && LARGE_OFF_T % 2147483647 == 1)
12610                       ? 1 : -1];
12611 int
12612 main (void)
12613 {
12614
12615   ;
12616   return 0;
12617 }
12618 _ACEOF
12619 rm -f conftest.$ac_objext
12620 if { (eval echo "$as_me:12620: \"$ac_compile\"") >&5
12621   (eval $ac_compile) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit $ac_status); } &&
12625          { ac_try='test -s conftest.$ac_objext'
12626   { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627   (eval $ac_try) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit $ac_status); }; }; then
12631   break
12632 else
12633   echo "$as_me: failed program was:" >&5
12634 cat conftest.$ac_ext >&5
12635 fi
12636 rm -f conftest.$ac_objext conftest.$ac_ext
12637   cat >conftest.$ac_ext <<_ACEOF
12638 #line 12638 "configure"
12639 #include "confdefs.h"
12640 #define _FILE_OFFSET_BITS 64
12641 #include <sys/types.h>
12642  /* Check that off_t can represent 2**63 - 1 correctly.
12643     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12644     since some C++ compilers masquerading as C compilers
12645     incorrectly reject 9223372036854775807.  */
12646 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12647   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12648                        && LARGE_OFF_T % 2147483647 == 1)
12649                       ? 1 : -1];
12650 int
12651 main (void)
12652 {
12653
12654   ;
12655   return 0;
12656 }
12657 _ACEOF
12658 rm -f conftest.$ac_objext
12659 if { (eval echo "$as_me:12659: \"$ac_compile\"") >&5
12660   (eval $ac_compile) 2>&5
12661   ac_status=$?
12662   echo "$as_me:12662: \$? = $ac_status" >&5
12663   (exit $ac_status); } &&
12664          { ac_try='test -s conftest.$ac_objext'
12665   { (eval echo "$as_me:12665: \"$ac_try\"") >&5
12666   (eval $ac_try) 2>&5
12667   ac_status=$?
12668   echo "$as_me:12668: \$? = $ac_status" >&5
12669   (exit $ac_status); }; }; then
12670   ac_cv_sys_file_offset_bits=64; break
12671 else
12672   echo "$as_me: failed program was:" >&5
12673 cat conftest.$ac_ext >&5
12674 fi
12675 rm -f conftest.$ac_objext conftest.$ac_ext
12676   break
12677 done
12678 fi
12679 echo "$as_me:12679: result: $ac_cv_sys_file_offset_bits" >&5
12680 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12681 if test "$ac_cv_sys_file_offset_bits" != no; then
12682
12683 cat >>confdefs.h <<EOF
12684 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12685 EOF
12686
12687 fi
12688 rm -rf conftest*
12689   echo "$as_me:12689: checking for _LARGE_FILES value needed for large files" >&5
12690 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12691 if test "${ac_cv_sys_large_files+set}" = set; then
12692   echo $ECHO_N "(cached) $ECHO_C" >&6
12693 else
12694   while :; do
12695   ac_cv_sys_large_files=no
12696   cat >conftest.$ac_ext <<_ACEOF
12697 #line 12697 "configure"
12698 #include "confdefs.h"
12699 #include <sys/types.h>
12700  /* Check that off_t can represent 2**63 - 1 correctly.
12701     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12702     since some C++ compilers masquerading as C compilers
12703     incorrectly reject 9223372036854775807.  */
12704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12705   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12706                        && LARGE_OFF_T % 2147483647 == 1)
12707                       ? 1 : -1];
12708 int
12709 main (void)
12710 {
12711
12712   ;
12713   return 0;
12714 }
12715 _ACEOF
12716 rm -f conftest.$ac_objext
12717 if { (eval echo "$as_me:12717: \"$ac_compile\"") >&5
12718   (eval $ac_compile) 2>&5
12719   ac_status=$?
12720   echo "$as_me:12720: \$? = $ac_status" >&5
12721   (exit $ac_status); } &&
12722          { ac_try='test -s conftest.$ac_objext'
12723   { (eval echo "$as_me:12723: \"$ac_try\"") >&5
12724   (eval $ac_try) 2>&5
12725   ac_status=$?
12726   echo "$as_me:12726: \$? = $ac_status" >&5
12727   (exit $ac_status); }; }; then
12728   break
12729 else
12730   echo "$as_me: failed program was:" >&5
12731 cat conftest.$ac_ext >&5
12732 fi
12733 rm -f conftest.$ac_objext conftest.$ac_ext
12734   cat >conftest.$ac_ext <<_ACEOF
12735 #line 12735 "configure"
12736 #include "confdefs.h"
12737 #define _LARGE_FILES 1
12738 #include <sys/types.h>
12739  /* Check that off_t can represent 2**63 - 1 correctly.
12740     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12741     since some C++ compilers masquerading as C compilers
12742     incorrectly reject 9223372036854775807.  */
12743 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12744   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12745                        && LARGE_OFF_T % 2147483647 == 1)
12746                       ? 1 : -1];
12747 int
12748 main (void)
12749 {
12750
12751   ;
12752   return 0;
12753 }
12754 _ACEOF
12755 rm -f conftest.$ac_objext
12756 if { (eval echo "$as_me:12756: \"$ac_compile\"") >&5
12757   (eval $ac_compile) 2>&5
12758   ac_status=$?
12759   echo "$as_me:12759: \$? = $ac_status" >&5
12760   (exit $ac_status); } &&
12761          { ac_try='test -s conftest.$ac_objext'
12762   { (eval echo "$as_me:12762: \"$ac_try\"") >&5
12763   (eval $ac_try) 2>&5
12764   ac_status=$?
12765   echo "$as_me:12765: \$? = $ac_status" >&5
12766   (exit $ac_status); }; }; then
12767   ac_cv_sys_large_files=1; break
12768 else
12769   echo "$as_me: failed program was:" >&5
12770 cat conftest.$ac_ext >&5
12771 fi
12772 rm -f conftest.$ac_objext conftest.$ac_ext
12773   break
12774 done
12775 fi
12776 echo "$as_me:12776: result: $ac_cv_sys_large_files" >&5
12777 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12778 if test "$ac_cv_sys_large_files" != no; then
12779
12780 cat >>confdefs.h <<EOF
12781 #define _LARGE_FILES $ac_cv_sys_large_files
12782 EOF
12783
12784 fi
12785 rm -rf conftest*
12786 fi
12787
12788         if test "$enable_largefile" != no ; then
12789         echo "$as_me:12789: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12790 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12791 if test "${ac_cv_sys_largefile_source+set}" = set; then
12792   echo $ECHO_N "(cached) $ECHO_C" >&6
12793 else
12794   while :; do
12795   ac_cv_sys_largefile_source=no
12796   cat >conftest.$ac_ext <<_ACEOF
12797 #line 12797 "configure"
12798 #include "confdefs.h"
12799 #include <stdio.h>
12800 int
12801 main (void)
12802 {
12803 return !fseeko;
12804   ;
12805   return 0;
12806 }
12807 _ACEOF
12808 rm -f conftest.$ac_objext
12809 if { (eval echo "$as_me:12809: \"$ac_compile\"") >&5
12810   (eval $ac_compile) 2>&5
12811   ac_status=$?
12812   echo "$as_me:12812: \$? = $ac_status" >&5
12813   (exit $ac_status); } &&
12814          { ac_try='test -s conftest.$ac_objext'
12815   { (eval echo "$as_me:12815: \"$ac_try\"") >&5
12816   (eval $ac_try) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit $ac_status); }; }; then
12820   break
12821 else
12822   echo "$as_me: failed program was:" >&5
12823 cat conftest.$ac_ext >&5
12824 fi
12825 rm -f conftest.$ac_objext conftest.$ac_ext
12826   cat >conftest.$ac_ext <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12829 #define _LARGEFILE_SOURCE 1
12830 #include <stdio.h>
12831 int
12832 main (void)
12833 {
12834 return !fseeko;
12835   ;
12836   return 0;
12837 }
12838 _ACEOF
12839 rm -f conftest.$ac_objext
12840 if { (eval echo "$as_me:12840: \"$ac_compile\"") >&5
12841   (eval $ac_compile) 2>&5
12842   ac_status=$?
12843   echo "$as_me:12843: \$? = $ac_status" >&5
12844   (exit $ac_status); } &&
12845          { ac_try='test -s conftest.$ac_objext'
12846   { (eval echo "$as_me:12846: \"$ac_try\"") >&5
12847   (eval $ac_try) 2>&5
12848   ac_status=$?
12849   echo "$as_me:12849: \$? = $ac_status" >&5
12850   (exit $ac_status); }; }; then
12851   ac_cv_sys_largefile_source=1; break
12852 else
12853   echo "$as_me: failed program was:" >&5
12854 cat conftest.$ac_ext >&5
12855 fi
12856 rm -f conftest.$ac_objext conftest.$ac_ext
12857   break
12858 done
12859 fi
12860 echo "$as_me:12860: result: $ac_cv_sys_largefile_source" >&5
12861 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12862 if test "$ac_cv_sys_largefile_source" != no; then
12863
12864 cat >>confdefs.h <<EOF
12865 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12866 EOF
12867
12868 fi
12869 rm -rf conftest*
12870
12871 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12872 # in glibc 2.1.3, but that breaks too many other things.
12873 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12874 echo "$as_me:12874: checking for fseeko" >&5
12875 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12876 if test "${ac_cv_func_fseeko+set}" = set; then
12877   echo $ECHO_N "(cached) $ECHO_C" >&6
12878 else
12879   cat >conftest.$ac_ext <<_ACEOF
12880 #line 12880 "configure"
12881 #include "confdefs.h"
12882 #include <stdio.h>
12883 int
12884 main (void)
12885 {
12886 return fseeko && fseeko (stdin, 0, 0);
12887   ;
12888   return 0;
12889 }
12890 _ACEOF
12891 rm -f conftest.$ac_objext conftest$ac_exeext
12892 if { (eval echo "$as_me:12892: \"$ac_link\"") >&5
12893   (eval $ac_link) 2>&5
12894   ac_status=$?
12895   echo "$as_me:12895: \$? = $ac_status" >&5
12896   (exit $ac_status); } &&
12897          { ac_try='test -s conftest$ac_exeext'
12898   { (eval echo "$as_me:12898: \"$ac_try\"") >&5
12899   (eval $ac_try) 2>&5
12900   ac_status=$?
12901   echo "$as_me:12901: \$? = $ac_status" >&5
12902   (exit $ac_status); }; }; then
12903   ac_cv_func_fseeko=yes
12904 else
12905   echo "$as_me: failed program was:" >&5
12906 cat conftest.$ac_ext >&5
12907 ac_cv_func_fseeko=no
12908 fi
12909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12910 fi
12911 echo "$as_me:12911: result: $ac_cv_func_fseeko" >&5
12912 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12913 if test $ac_cv_func_fseeko = yes; then
12914
12915 cat >>confdefs.h <<\EOF
12916 #define HAVE_FSEEKO 1
12917 EOF
12918
12919 fi
12920
12921         # Normally we would collect these definitions in the config.h,
12922         # but (like _XOPEN_SOURCE), some environments rely on having these
12923         # defined before any of the system headers are included.  Another
12924         # case comes up with C++, e.g., on AIX the compiler compiles the
12925         # header files by themselves before looking at the body files it is
12926         # told to compile.  For ncurses, those header files do not include
12927         # the config.h
12928         if test "$ac_cv_sys_large_files" != no
12929         then
12930
12931         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12932         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12933
12934         fi
12935         if test "$ac_cv_sys_largefile_source" != no
12936         then
12937
12938         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12939         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12940
12941         fi
12942         if test "$ac_cv_sys_file_offset_bits" != no
12943         then
12944
12945         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12946         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12947
12948         fi
12949
12950         echo "$as_me:12950: checking whether to use struct dirent64" >&5
12951 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12952 if test "${cf_cv_struct_dirent64+set}" = set; then
12953   echo $ECHO_N "(cached) $ECHO_C" >&6
12954 else
12955
12956                 cat >conftest.$ac_ext <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959
12960 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12961 #include <sys/types.h>
12962 #include <dirent.h>
12963
12964 int
12965 main (void)
12966 {
12967
12968                 /* if transitional largefile support is setup, this is true */
12969                 extern struct dirent64 * readdir(DIR *);
12970                 struct dirent64 *x = readdir((DIR *)0);
12971                 struct dirent *y = readdir((DIR *)0);
12972                 int z = x - y;
12973
12974   ;
12975   return 0;
12976 }
12977 _ACEOF
12978 rm -f conftest.$ac_objext
12979 if { (eval echo "$as_me:12979: \"$ac_compile\"") >&5
12980   (eval $ac_compile) 2>&5
12981   ac_status=$?
12982   echo "$as_me:12982: \$? = $ac_status" >&5
12983   (exit $ac_status); } &&
12984          { ac_try='test -s conftest.$ac_objext'
12985   { (eval echo "$as_me:12985: \"$ac_try\"") >&5
12986   (eval $ac_try) 2>&5
12987   ac_status=$?
12988   echo "$as_me:12988: \$? = $ac_status" >&5
12989   (exit $ac_status); }; }; then
12990   cf_cv_struct_dirent64=yes
12991 else
12992   echo "$as_me: failed program was:" >&5
12993 cat conftest.$ac_ext >&5
12994 cf_cv_struct_dirent64=no
12995 fi
12996 rm -f conftest.$ac_objext conftest.$ac_ext
12997
12998 fi
12999 echo "$as_me:12999: result: $cf_cv_struct_dirent64" >&5
13000 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13001         test "$cf_cv_struct_dirent64" = yes &&
13002 cat >>confdefs.h <<\EOF
13003 #define HAVE_STRUCT_DIRENT64 1
13004 EOF
13005
13006         fi
13007
13008 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13009 echo "$as_me:13009: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13010 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13011
13012 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13013 if test "${enable_tparm_varargs+set}" = set; then
13014   enableval="$enable_tparm_varargs"
13015   with_tparm_varargs=$enableval
13016 else
13017   with_tparm_varargs=yes
13018 fi;
13019 echo "$as_me:13019: result: $with_tparm_varargs" >&5
13020 echo "${ECHO_T}$with_tparm_varargs" >&6
13021 NCURSES_TPARM_VARARGS=0
13022 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13023
13024 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13025 if test "$with_ticlib" != no ; then
13026 echo "$as_me:13026: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13027 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13028
13029 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13030 if test "${enable_tic_depends+set}" = set; then
13031   enableval="$enable_tic_depends"
13032   with_tic_depends=$enableval
13033 else
13034   with_tic_depends=yes
13035 fi;
13036 echo "$as_me:13036: result: $with_tic_depends" >&5
13037 echo "${ECHO_T}$with_tic_depends" >&6
13038 else
13039         with_tic_depends=no
13040 fi
13041
13042 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13043 echo "$as_me:13043: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13044 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13045
13046 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13047 if test "${enable_wattr_macros+set}" = set; then
13048   enableval="$enable_wattr_macros"
13049   with_wattr_macros=$enableval
13050 else
13051   with_wattr_macros=yes
13052 fi;
13053 if [ "x$with_wattr_macros" != xyes ]; then
13054         NCURSES_WATTR_MACROS=0
13055         echo "$as_me:13055: result: yes" >&5
13056 echo "${ECHO_T}yes" >&6
13057 else
13058         NCURSES_WATTR_MACROS=1
13059         echo "$as_me:13059: result: no" >&5
13060 echo "${ECHO_T}no" >&6
13061 fi
13062
13063 echo "$as_me:13063: checking for X11 rgb file" >&5
13064 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13065
13066 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13067 if test "${with_x11_rgb+set}" = set; then
13068   withval="$with_x11_rgb"
13069   RGB_PATH=$withval
13070 else
13071   RGB_PATH=auto
13072 fi;
13073
13074 if test "x$RGB_PATH" = xauto
13075 then
13076         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13077         for cf_path in \
13078                 /opt/local/share/X11/rgb.txt \
13079                 /opt/X11/share/X11/rgb.txt \
13080                 /usr/share/X11/rgb.txt \
13081                 /usr/X11/share/X11/rgb.txt \
13082                 /usr/X11/lib/X11/rgb.txt \
13083                 /usr/lib/X11/rgb.txt \
13084                 /etc/X11/rgb.txt \
13085                 /usr/pkg/lib/X11/rgb.txt \
13086                 /usr/X11R7/lib/X11/rgb.txt \
13087                 /usr/X11R6/lib/X11/rgb.txt \
13088                 /usr/X11R5/lib/X11/rgb.txt \
13089                 /usr/X11R4/lib/X11/rgb.txt \
13090                 /usr/local/lib/X11/rgb.txt \
13091                 /usr/local/share/X11/rgb.txt \
13092                 /usr/lib64/X11/rgb.txt
13093         do
13094                 if test -f "$cf_path" ; then
13095                         RGB_PATH="$cf_path"
13096                         break
13097                 fi
13098         done
13099 else
13100         cf_path=$RGB_PATH
13101
13102 if test "x$prefix" != xNONE; then
13103         cf_path_syntax="$prefix"
13104 else
13105         cf_path_syntax="$ac_default_prefix"
13106 fi
13107
13108 case ".$cf_path" in
13109 (.\$\(*\)*|.\'*\'*)
13110         ;;
13111 (..|./*|.\\*)
13112         ;;
13113 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13114         ;;
13115 (.\${*prefix}*|.\${*dir}*)
13116         eval cf_path="$cf_path"
13117         case ".$cf_path" in
13118         (.NONE/*)
13119                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13120                 ;;
13121         esac
13122         ;;
13123 (.no|.NONE/*)
13124         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13125         ;;
13126 (*)
13127         { { echo "$as_me:13127: error: expected a pathname, not \"$cf_path\"" >&5
13128 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13129    { (exit 1); exit 1; }; }
13130         ;;
13131 esac
13132
13133 fi
13134
13135 echo "$as_me:13135: result: $RGB_PATH" >&5
13136 echo "${ECHO_T}$RGB_PATH" >&6
13137
13138 cat >>confdefs.h <<EOF
13139 #define RGB_PATH "$cf_path"
13140 EOF
13141
13142 no_x11_rgb=
13143 if test "$RGB_PATH" = no
13144 then
13145         no_x11_rgb="#"
13146 fi
13147
13148 ###   use option --with-bool to override bool's type
13149 echo "$as_me:13149: checking for type of bool" >&5
13150 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13151
13152 # Check whether --with-bool or --without-bool was given.
13153 if test "${with_bool+set}" = set; then
13154   withval="$with_bool"
13155   NCURSES_BOOL="$withval"
13156 else
13157   NCURSES_BOOL=auto
13158 fi;
13159 echo "$as_me:13159: result: $NCURSES_BOOL" >&5
13160 echo "${ECHO_T}$NCURSES_BOOL" >&6
13161
13162 echo "$as_me:13162: checking for alternate terminal capabilities file" >&5
13163 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13164
13165 # Check whether --with-caps or --without-caps was given.
13166 if test "${with_caps+set}" = set; then
13167   withval="$with_caps"
13168   TERMINFO_CAPS=Caps.$withval
13169 else
13170   TERMINFO_CAPS=Caps
13171 fi;
13172 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13173 echo "$as_me:13173: result: $TERMINFO_CAPS" >&5
13174 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13175
13176 ###   use option --with-chtype to override chtype's type
13177 echo "$as_me:13177: checking for type of chtype" >&5
13178 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13179
13180 # Check whether --with-chtype or --without-chtype was given.
13181 if test "${with_chtype+set}" = set; then
13182   withval="$with_chtype"
13183   NCURSES_CHTYPE="$withval"
13184 else
13185   NCURSES_CHTYPE=$cf_dft_chtype
13186 fi;
13187 echo "$as_me:13187: result: $NCURSES_CHTYPE" >&5
13188 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13189
13190 ###   use option --with-ospeed to override ospeed's type
13191 echo "$as_me:13191: checking for type of ospeed" >&5
13192 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13193
13194 # Check whether --with-ospeed or --without-ospeed was given.
13195 if test "${with_ospeed+set}" = set; then
13196   withval="$with_ospeed"
13197   NCURSES_OSPEED="$withval"
13198 else
13199   NCURSES_OSPEED=short
13200 fi;
13201 echo "$as_me:13201: result: $NCURSES_OSPEED" >&5
13202 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13203
13204 ###   use option --with-mmask-t to override mmask_t's type
13205 echo "$as_me:13205: checking for type of mmask_t" >&5
13206 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13207
13208 # Check whether --with-mmask-t or --without-mmask-t was given.
13209 if test "${with_mmask_t+set}" = set; then
13210   withval="$with_mmask_t"
13211   NCURSES_MMASK_T="$withval"
13212 else
13213   NCURSES_MMASK_T=$cf_dft_mmask_t
13214 fi;
13215 echo "$as_me:13215: result: $NCURSES_MMASK_T" >&5
13216 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13217
13218 ###   use option --with-ccharw-max to override CCHARW_MAX size
13219 echo "$as_me:13219: checking for size CCHARW_MAX" >&5
13220 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13221
13222 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13223 if test "${with_ccharw_max+set}" = set; then
13224   withval="$with_ccharw_max"
13225   NCURSES_CCHARW_MAX="$withval"
13226 else
13227   NCURSES_CCHARW_MAX=5
13228 fi;
13229 echo "$as_me:13229: result: $NCURSES_CCHARW_MAX" >&5
13230 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13231
13232 echo "$as_me:13232: checking for ANSI C header files" >&5
13233 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13234 if test "${ac_cv_header_stdc+set}" = set; then
13235   echo $ECHO_N "(cached) $ECHO_C" >&6
13236 else
13237   cat >conftest.$ac_ext <<_ACEOF
13238 #line 13238 "configure"
13239 #include "confdefs.h"
13240 #include <stdlib.h>
13241 #include <stdarg.h>
13242 #include <string.h>
13243 #include <float.h>
13244
13245 _ACEOF
13246 if { (eval echo "$as_me:13246: \"$ac_cpp conftest.$ac_ext\"") >&5
13247   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13248   ac_status=$?
13249   egrep -v '^ *\+' conftest.er1 >conftest.err
13250   rm -f conftest.er1
13251   cat conftest.err >&5
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit $ac_status); } >/dev/null; then
13254   if test -s conftest.err; then
13255     ac_cpp_err=$ac_c_preproc_warn_flag
13256   else
13257     ac_cpp_err=
13258   fi
13259 else
13260   ac_cpp_err=yes
13261 fi
13262 if test -z "$ac_cpp_err"; then
13263   ac_cv_header_stdc=yes
13264 else
13265   echo "$as_me: failed program was:" >&5
13266   cat conftest.$ac_ext >&5
13267   ac_cv_header_stdc=no
13268 fi
13269 rm -f conftest.err conftest.$ac_ext
13270
13271 if test $ac_cv_header_stdc = yes; then
13272   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13273   cat >conftest.$ac_ext <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276 #include <string.h>
13277
13278 _ACEOF
13279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13280   egrep "memchr" >/dev/null 2>&1; then
13281   :
13282 else
13283   ac_cv_header_stdc=no
13284 fi
13285 rm -rf conftest*
13286
13287 fi
13288
13289 if test $ac_cv_header_stdc = yes; then
13290   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13291   cat >conftest.$ac_ext <<_ACEOF
13292 #line 13292 "configure"
13293 #include "confdefs.h"
13294 #include <stdlib.h>
13295
13296 _ACEOF
13297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13298   egrep "free" >/dev/null 2>&1; then
13299   :
13300 else
13301   ac_cv_header_stdc=no
13302 fi
13303 rm -rf conftest*
13304
13305 fi
13306
13307 if test $ac_cv_header_stdc = yes; then
13308   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13309   if test "$cross_compiling" = yes; then
13310   :
13311 else
13312   cat >conftest.$ac_ext <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315 #include <ctype.h>
13316 #if ((' ' & 0x0FF) == 0x020)
13317 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13318 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13319 #else
13320 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13321                      || ('j' <= (c) && (c) <= 'r') \
13322                      || ('s' <= (c) && (c) <= 'z'))
13323 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13324 #endif
13325
13326 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13327 int
13328 main (void)
13329 {
13330   int i;
13331   for (i = 0; i < 256; i++)
13332     if (XOR (islower (i), ISLOWER (i))
13333         || toupper (i) != TOUPPER (i))
13334       $ac_main_return(2);
13335   $ac_main_return (0);
13336 }
13337 _ACEOF
13338 rm -f conftest$ac_exeext
13339 if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
13340   (eval $ac_link) 2>&5
13341   ac_status=$?
13342   echo "$as_me:13342: \$? = $ac_status" >&5
13343   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13344   { (eval echo "$as_me:13344: \"$ac_try\"") >&5
13345   (eval $ac_try) 2>&5
13346   ac_status=$?
13347   echo "$as_me:13347: \$? = $ac_status" >&5
13348   (exit $ac_status); }; }; then
13349   :
13350 else
13351   echo "$as_me: program exited with status $ac_status" >&5
13352 echo "$as_me: failed program was:" >&5
13353 cat conftest.$ac_ext >&5
13354 ac_cv_header_stdc=no
13355 fi
13356 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13357 fi
13358 fi
13359 fi
13360 echo "$as_me:13360: result: $ac_cv_header_stdc" >&5
13361 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13362 if test $ac_cv_header_stdc = yes; then
13363
13364 cat >>confdefs.h <<\EOF
13365 #define STDC_HEADERS 1
13366 EOF
13367
13368 fi
13369
13370 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13371
13372 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13373                   inttypes.h stdint.h unistd.h
13374 do
13375 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13376 echo "$as_me:13376: checking for $ac_header" >&5
13377 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13378 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13379   echo $ECHO_N "(cached) $ECHO_C" >&6
13380 else
13381   cat >conftest.$ac_ext <<_ACEOF
13382 #line 13382 "configure"
13383 #include "confdefs.h"
13384 $ac_includes_default
13385 #include <$ac_header>
13386 _ACEOF
13387 rm -f conftest.$ac_objext
13388 if { (eval echo "$as_me:13388: \"$ac_compile\"") >&5
13389   (eval $ac_compile) 2>&5
13390   ac_status=$?
13391   echo "$as_me:13391: \$? = $ac_status" >&5
13392   (exit $ac_status); } &&
13393          { ac_try='test -s conftest.$ac_objext'
13394   { (eval echo "$as_me:13394: \"$ac_try\"") >&5
13395   (eval $ac_try) 2>&5
13396   ac_status=$?
13397   echo "$as_me:13397: \$? = $ac_status" >&5
13398   (exit $ac_status); }; }; then
13399   eval "$as_ac_Header=yes"
13400 else
13401   echo "$as_me: failed program was:" >&5
13402 cat conftest.$ac_ext >&5
13403 eval "$as_ac_Header=no"
13404 fi
13405 rm -f conftest.$ac_objext conftest.$ac_ext
13406 fi
13407 echo "$as_me:13407: result: `eval echo '${'$as_ac_Header'}'`" >&5
13408 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13409 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13410   cat >>confdefs.h <<EOF
13411 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13412 EOF
13413
13414 fi
13415 done
13416
13417 echo "$as_me:13417: checking for signed char" >&5
13418 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13419 if test "${ac_cv_type_signed_char+set}" = set; then
13420   echo $ECHO_N "(cached) $ECHO_C" >&6
13421 else
13422   cat >conftest.$ac_ext <<_ACEOF
13423 #line 13423 "configure"
13424 #include "confdefs.h"
13425 $ac_includes_default
13426 int
13427 main (void)
13428 {
13429 if ((signed char *) 0)
13430   return 0;
13431 if (sizeof (signed char))
13432   return 0;
13433   ;
13434   return 0;
13435 }
13436 _ACEOF
13437 rm -f conftest.$ac_objext
13438 if { (eval echo "$as_me:13438: \"$ac_compile\"") >&5
13439   (eval $ac_compile) 2>&5
13440   ac_status=$?
13441   echo "$as_me:13441: \$? = $ac_status" >&5
13442   (exit $ac_status); } &&
13443          { ac_try='test -s conftest.$ac_objext'
13444   { (eval echo "$as_me:13444: \"$ac_try\"") >&5
13445   (eval $ac_try) 2>&5
13446   ac_status=$?
13447   echo "$as_me:13447: \$? = $ac_status" >&5
13448   (exit $ac_status); }; }; then
13449   ac_cv_type_signed_char=yes
13450 else
13451   echo "$as_me: failed program was:" >&5
13452 cat conftest.$ac_ext >&5
13453 ac_cv_type_signed_char=no
13454 fi
13455 rm -f conftest.$ac_objext conftest.$ac_ext
13456 fi
13457 echo "$as_me:13457: result: $ac_cv_type_signed_char" >&5
13458 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13459
13460 echo "$as_me:13460: checking size of signed char" >&5
13461 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13462 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13463   echo $ECHO_N "(cached) $ECHO_C" >&6
13464 else
13465   if test "$ac_cv_type_signed_char" = yes; then
13466   if test "$cross_compiling" = yes; then
13467   # Depending upon the size, compute the lo and hi bounds.
13468 cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471 $ac_includes_default
13472 int
13473 main (void)
13474 {
13475 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13476   ;
13477   return 0;
13478 }
13479 _ACEOF
13480 rm -f conftest.$ac_objext
13481 if { (eval echo "$as_me:13481: \"$ac_compile\"") >&5
13482   (eval $ac_compile) 2>&5
13483   ac_status=$?
13484   echo "$as_me:13484: \$? = $ac_status" >&5
13485   (exit $ac_status); } &&
13486          { ac_try='test -s conftest.$ac_objext'
13487   { (eval echo "$as_me:13487: \"$ac_try\"") >&5
13488   (eval $ac_try) 2>&5
13489   ac_status=$?
13490   echo "$as_me:13490: \$? = $ac_status" >&5
13491   (exit $ac_status); }; }; then
13492   ac_lo=0 ac_mid=0
13493   while :; do
13494     cat >conftest.$ac_ext <<_ACEOF
13495 #line 13495 "configure"
13496 #include "confdefs.h"
13497 $ac_includes_default
13498 int
13499 main (void)
13500 {
13501 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13502   ;
13503   return 0;
13504 }
13505 _ACEOF
13506 rm -f conftest.$ac_objext
13507 if { (eval echo "$as_me:13507: \"$ac_compile\"") >&5
13508   (eval $ac_compile) 2>&5
13509   ac_status=$?
13510   echo "$as_me:13510: \$? = $ac_status" >&5
13511   (exit $ac_status); } &&
13512          { ac_try='test -s conftest.$ac_objext'
13513   { (eval echo "$as_me:13513: \"$ac_try\"") >&5
13514   (eval $ac_try) 2>&5
13515   ac_status=$?
13516   echo "$as_me:13516: \$? = $ac_status" >&5
13517   (exit $ac_status); }; }; then
13518   ac_hi=$ac_mid; break
13519 else
13520   echo "$as_me: failed program was:" >&5
13521 cat conftest.$ac_ext >&5
13522 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13523 fi
13524 rm -f conftest.$ac_objext conftest.$ac_ext
13525   done
13526 else
13527   echo "$as_me: failed program was:" >&5
13528 cat conftest.$ac_ext >&5
13529 ac_hi=-1 ac_mid=-1
13530   while :; do
13531     cat >conftest.$ac_ext <<_ACEOF
13532 #line 13532 "configure"
13533 #include "confdefs.h"
13534 $ac_includes_default
13535 int
13536 main (void)
13537 {
13538 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 rm -f conftest.$ac_objext
13544 if { (eval echo "$as_me:13544: \"$ac_compile\"") >&5
13545   (eval $ac_compile) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); } &&
13549          { ac_try='test -s conftest.$ac_objext'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit $ac_status); }; }; then
13555   ac_lo=$ac_mid; break
13556 else
13557   echo "$as_me: failed program was:" >&5
13558 cat conftest.$ac_ext >&5
13559 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13560 fi
13561 rm -f conftest.$ac_objext conftest.$ac_ext
13562   done
13563 fi
13564 rm -f conftest.$ac_objext conftest.$ac_ext
13565 # Binary search between lo and hi bounds.
13566 while test "x$ac_lo" != "x$ac_hi"; do
13567   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13568   cat >conftest.$ac_ext <<_ACEOF
13569 #line 13569 "configure"
13570 #include "confdefs.h"
13571 $ac_includes_default
13572 int
13573 main (void)
13574 {
13575 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13576   ;
13577   return 0;
13578 }
13579 _ACEOF
13580 rm -f conftest.$ac_objext
13581 if { (eval echo "$as_me:13581: \"$ac_compile\"") >&5
13582   (eval $ac_compile) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); } &&
13586          { ac_try='test -s conftest.$ac_objext'
13587   { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588   (eval $ac_try) 2>&5
13589   ac_status=$?
13590   echo "$as_me:13590: \$? = $ac_status" >&5
13591   (exit $ac_status); }; }; then
13592   ac_hi=$ac_mid
13593 else
13594   echo "$as_me: failed program was:" >&5
13595 cat conftest.$ac_ext >&5
13596 ac_lo=`expr $ac_mid + 1`
13597 fi
13598 rm -f conftest.$ac_objext conftest.$ac_ext
13599 done
13600 ac_cv_sizeof_signed_char=$ac_lo
13601 else
13602   if test "$cross_compiling" = yes; then
13603   { { echo "$as_me:13603: error: cannot run test program while cross compiling" >&5
13604 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13605    { (exit 1); exit 1; }; }
13606 else
13607   cat >conftest.$ac_ext <<_ACEOF
13608 #line 13608 "configure"
13609 #include "confdefs.h"
13610 $ac_includes_default
13611 int
13612 main (void)
13613 {
13614 FILE *f = fopen ("conftest.val", "w");
13615 if (!f)
13616   $ac_main_return (1);
13617 fprintf (f, "%d", (sizeof (signed char)));
13618 fclose (f);
13619   ;
13620   return 0;
13621 }
13622 _ACEOF
13623 rm -f conftest$ac_exeext
13624 if { (eval echo "$as_me:13624: \"$ac_link\"") >&5
13625   (eval $ac_link) 2>&5
13626   ac_status=$?
13627   echo "$as_me:13627: \$? = $ac_status" >&5
13628   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13629   { (eval echo "$as_me:13629: \"$ac_try\"") >&5
13630   (eval $ac_try) 2>&5
13631   ac_status=$?
13632   echo "$as_me:13632: \$? = $ac_status" >&5
13633   (exit $ac_status); }; }; then
13634   ac_cv_sizeof_signed_char=`cat conftest.val`
13635 else
13636   echo "$as_me: program exited with status $ac_status" >&5
13637 echo "$as_me: failed program was:" >&5
13638 cat conftest.$ac_ext >&5
13639 fi
13640 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13641 fi
13642 fi
13643 rm -f conftest.val
13644 else
13645   ac_cv_sizeof_signed_char=0
13646 fi
13647 fi
13648 echo "$as_me:13648: result: $ac_cv_sizeof_signed_char" >&5
13649 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13650 cat >>confdefs.h <<EOF
13651 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13652 EOF
13653
13654 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13655         NCURSES_SBOOL="signed char"
13656 else
13657         NCURSES_SBOOL="char"
13658 fi
13659 echo "$as_me:13659: checking if you want to use signed Boolean array in term.h" >&5
13660 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13661
13662 # Check whether --enable-signed-char or --disable-signed-char was given.
13663 if test "${enable_signed_char+set}" = set; then
13664   enableval="$enable_signed_char"
13665   with_signed_char=$enableval
13666 else
13667   with_signed_char=no
13668 fi;
13669 echo "$as_me:13669: result: $with_signed_char" >&5
13670 echo "${ECHO_T}$with_signed_char" >&6
13671 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13672
13673 ###   use option --with-tparm-arg to override tparm's argument type
13674 echo "$as_me:13674: checking for type of tparm args" >&5
13675 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13676
13677 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13678 if test "${with_tparm_arg+set}" = set; then
13679   withval="$with_tparm_arg"
13680   NCURSES_TPARM_ARG="$withval"
13681 else
13682   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13683 fi;
13684 echo "$as_me:13684: result: $NCURSES_TPARM_ARG" >&5
13685 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13686
13687 ### Enable compiling-in rcs id's
13688 echo "$as_me:13688: checking if RCS identifiers should be compiled-in" >&5
13689 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13690
13691 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13692 if test "${with_rcs_ids+set}" = set; then
13693   withval="$with_rcs_ids"
13694   with_rcs_ids=$withval
13695 else
13696   with_rcs_ids=no
13697 fi;
13698 echo "$as_me:13698: result: $with_rcs_ids" >&5
13699 echo "${ECHO_T}$with_rcs_ids" >&6
13700 test "x$with_rcs_ids" = xyes &&
13701 cat >>confdefs.h <<\EOF
13702 #define USE_RCS_IDS 1
13703 EOF
13704
13705 ###############################################################################
13706
13707 echo "$as_me:13707: checking format of man-pages" >&5
13708 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13709
13710 # Check whether --with-manpage-format or --without-manpage-format was given.
13711 if test "${with_manpage_format+set}" = set; then
13712   withval="$with_manpage_format"
13713   MANPAGE_FORMAT=$withval
13714 else
13715   MANPAGE_FORMAT=unknown
13716 fi;
13717
13718 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13719 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13720
13721 cf_unknown=
13722
13723 case $MANPAGE_FORMAT in
13724 (unknown)
13725         if test -z "$MANPATH" ; then
13726                 MANPATH="/usr/man:/usr/share/man"
13727         fi
13728
13729         # look for the 'date' man-page (it's most likely to be installed!)
13730         MANPAGE_FORMAT=
13731         cf_preform=no
13732         cf_catonly=yes
13733         cf_example=date
13734
13735         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13736         for cf_dir in $MANPATH; do
13737                 test -z "$cf_dir" && cf_dir=/usr/man
13738                 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
13739                 do
13740                         cf_test=`echo $cf_name | sed -e 's/*//'`
13741                         if test "x$cf_test" = "x$cf_name" ; then
13742
13743                                 case "$cf_name" in
13744                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13745                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13746                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13747                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13748                                 esac
13749
13750                                 case "$cf_name" in
13751                                 ($cf_dir/man*)
13752                                         cf_catonly=no
13753                                         ;;
13754                                 ($cf_dir/cat*)
13755                                         cf_preform=yes
13756                                         ;;
13757                                 esac
13758                                 break
13759                         fi
13760
13761                         # if we found a match in either man* or cat*, stop looking
13762                         if test -n "$MANPAGE_FORMAT" ; then
13763                                 cf_found=no
13764                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13765                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13766                                 case "$cf_name" in
13767                                 ($cf_dir/cat*)
13768                                         cf_found=yes
13769                                         ;;
13770                                 esac
13771                                 test $cf_found=yes && break
13772                         fi
13773                 done
13774                 # only check the first directory in $MANPATH where we find manpages
13775                 if test -n "$MANPAGE_FORMAT" ; then
13776                         break
13777                 fi
13778         done
13779         # if we did not find the example, just assume it is normal
13780         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13781         IFS="$ac_save_ifs"
13782         ;;
13783 (*)
13784         for cf_option in $MANPAGE_FORMAT; do
13785         case $cf_option in
13786         (gzip|compress|BSDI|normal|formatted|catonly)
13787                 ;;
13788         (*)
13789                 cf_unknown="$cf_unknown $cf_option"
13790                 ;;
13791         esac
13792         done
13793         ;;
13794 esac
13795
13796 echo "$as_me:13796: result: $MANPAGE_FORMAT" >&5
13797 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13798 if test -n "$cf_unknown" ; then
13799         { echo "$as_me:13799: WARNING: Unexpected manpage-format $cf_unknown" >&5
13800 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13801 fi
13802
13803 echo "$as_me:13803: checking for manpage renaming" >&5
13804 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13805
13806 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13807 if test "${with_manpage_renames+set}" = set; then
13808   withval="$with_manpage_renames"
13809   MANPAGE_RENAMES=$withval
13810 else
13811   MANPAGE_RENAMES=yes
13812 fi;
13813
13814 case ".$MANPAGE_RENAMES" in
13815 (.no)
13816         ;;
13817 (.|.yes)
13818         # Debian 'man' program?
13819         if test -f /etc/debian_version ; then
13820                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13821         else
13822                 MANPAGE_RENAMES=no
13823         fi
13824         ;;
13825 esac
13826
13827 if test "$MANPAGE_RENAMES" != no ; then
13828         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13829                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13830         elif test ! -f $MANPAGE_RENAMES ; then
13831                 { { echo "$as_me:13831: error: not a filename: $MANPAGE_RENAMES" >&5
13832 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13833    { (exit 1); exit 1; }; }
13834         fi
13835
13836         test ! -d man && mkdir man
13837
13838         # Construct a sed-script to perform renaming within man-pages
13839         if test -n "$MANPAGE_RENAMES" ; then
13840                 test ! -d man && mkdir man
13841                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13842         fi
13843 fi
13844
13845 echo "$as_me:13845: result: $MANPAGE_RENAMES" >&5
13846 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13847
13848 echo "$as_me:13848: checking if manpage aliases will be installed" >&5
13849 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13850
13851 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13852 if test "${with_manpage_aliases+set}" = set; then
13853   withval="$with_manpage_aliases"
13854   MANPAGE_ALIASES=$withval
13855 else
13856   MANPAGE_ALIASES=yes
13857 fi;
13858
13859 echo "$as_me:13859: result: $MANPAGE_ALIASES" >&5
13860 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13861
13862 case "x$LN_S" in
13863 (xln*)
13864         cf_use_symlinks=yes
13865         ;;
13866 (*)
13867         cf_use_symlinks=no
13868         ;;
13869 esac
13870
13871 MANPAGE_SYMLINKS=no
13872 if test "$MANPAGE_ALIASES" = yes ; then
13873 echo "$as_me:13873: checking if manpage symlinks should be used" >&5
13874 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13875
13876 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13877 if test "${with_manpage_symlinks+set}" = set; then
13878   withval="$with_manpage_symlinks"
13879   MANPAGE_SYMLINKS=$withval
13880 else
13881   MANPAGE_SYMLINKS=$cf_use_symlinks
13882 fi;
13883
13884 if test "$$cf_use_symlinks" = no; then
13885 if test "$MANPAGE_SYMLINKS" = yes ; then
13886         { echo "$as_me:13886: WARNING: cannot make symlinks" >&5
13887 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13888         MANPAGE_SYMLINKS=no
13889 fi
13890 fi
13891
13892 echo "$as_me:13892: result: $MANPAGE_SYMLINKS" >&5
13893 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13894 fi
13895
13896 echo "$as_me:13896: checking for manpage tbl" >&5
13897 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13898
13899 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13900 if test "${with_manpage_tbl+set}" = set; then
13901   withval="$with_manpage_tbl"
13902   MANPAGE_TBL=$withval
13903 else
13904   MANPAGE_TBL=no
13905 fi;
13906
13907 echo "$as_me:13907: result: $MANPAGE_TBL" >&5
13908 echo "${ECHO_T}$MANPAGE_TBL" >&6
13909
13910 if test "$prefix" = "NONE" ; then
13911         cf_prefix="$ac_default_prefix"
13912 else
13913         cf_prefix="$prefix"
13914 fi
13915
13916 case "$MANPAGE_FORMAT" in
13917 (*catonly*)
13918         cf_format=yes
13919         cf_inboth=no
13920         ;;
13921 (*formatted*)
13922         cf_format=yes
13923         cf_inboth=yes
13924         ;;
13925 (*)
13926         cf_format=no
13927         cf_inboth=no
13928         ;;
13929 esac
13930
13931 test ! -d man && mkdir man
13932
13933 cf_so_strip=
13934 cf_compress=
13935 case "$MANPAGE_FORMAT" in
13936 (*compress*)
13937         cf_so_strip="Z"
13938         cf_compress=compress
13939         ;;
13940 (*gzip*)
13941         cf_so_strip="gz"
13942         cf_compress=gzip
13943         ;;
13944 esac
13945
13946 cf_edit_man=./edit_man.sh
13947 cf_man_alias=`pwd`/man_alias.sed
13948
13949 cat >$cf_edit_man <<CF_EOF
13950 #! $SHELL
13951 # this script is generated by the configure-script CF_MAN_PAGES macro.
13952
13953 prefix="$cf_prefix"
13954 datarootdir="$datarootdir"
13955 datadir="$datadir"
13956
13957 NCURSES_MAJOR="$NCURSES_MAJOR"
13958 NCURSES_MINOR="$NCURSES_MINOR"
13959 NCURSES_PATCH="$NCURSES_PATCH"
13960
13961 NCURSES_OSPEED="$NCURSES_OSPEED"
13962 TERMINFO="$TERMINFO"
13963
13964 INSTALL="$INSTALL"
13965 INSTALL_DATA="$INSTALL_DATA"
13966
13967 transform="$program_transform_name"
13968
13969 TMP=\${TMPDIR:=/tmp}/man\$\$
13970 trap "rm -f \$TMP" 0 1 2 3 15
13971
13972 form=\$1
13973 shift || exit 1
13974
13975 verb=\$1
13976 shift || exit 1
13977
13978 mandir=\$1
13979 shift || exit 1
13980
13981 srcdir=\$1
13982 top_srcdir=\$srcdir/..
13983 shift || exit 1
13984
13985 if test "\$form" = normal ; then
13986         if test "$cf_format" = yes ; then
13987         if test "$cf_inboth" = no ; then
13988                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13989                 exit $?
13990         fi
13991         fi
13992         cf_subdir=\$mandir/man
13993         cf_tables=$MANPAGE_TBL
13994 else
13995         cf_subdir=\$mandir/cat
13996         cf_tables=yes
13997 fi
13998
13999 # process the list of source-files
14000 for i in \$* ; do
14001 case \$i in
14002 (*.orig|*.rej) ;;
14003 (*.[0-9]*)
14004         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14005         if test \$verb = installing ; then
14006         if test ! -d \$cf_subdir\${section} ; then
14007                 mkdir -p \$cf_subdir\$section
14008         fi
14009         fi
14010
14011         # replace variables in man page
14012         if test ! -f $cf_man_alias ; then
14013 cat >>$cf_man_alias <<-CF_EOF2
14014                 s,@DATADIR@,\$datadir,g
14015                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14016                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14017                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14018                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14019                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14020                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14021 CF_EOF
14022
14023         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14024         do
14025                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14026                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14027 cat >>$cf_edit_man <<-CF_EOF
14028                 s,@$cf_NAME@,$cf_name,g
14029 CF_EOF
14030         done
14031
14032 cat >>$cf_edit_man <<CF_EOF
14033 CF_EOF2
14034                 echo "...made $cf_man_alias"
14035         fi
14036
14037         aliases=
14038         cf_source=\`basename \$i\`
14039         inalias=\$cf_source
14040         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14041         if test ! -f \$inalias ; then
14042                 echo .. skipped \$cf_source
14043                 continue
14044         fi
14045 CF_EOF
14046
14047 if test "$MANPAGE_ALIASES" != no ; then
14048 cat >>$cf_edit_man <<CF_EOF
14049         nCurses=ignore.3x
14050         test $with_curses_h = yes && nCurses=ncurses.3x
14051         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14052 CF_EOF
14053 fi
14054
14055 if test "$MANPAGE_RENAMES" = no ; then
14056 cat >>$cf_edit_man <<CF_EOF
14057         # perform program transformations for section 1 man pages
14058         if test \$section = 1 ; then
14059                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14060         else
14061                 cf_target=\$cf_subdir\${section}/\$cf_source
14062         fi
14063 CF_EOF
14064 else
14065 cat >>$cf_edit_man <<CF_EOF
14066         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14067         if test -z "\$cf_target" ; then
14068                 echo '? missing rename for '\$cf_source
14069                 cf_target="\$cf_source"
14070         fi
14071         cf_target="\$cf_subdir\${section}/\${cf_target}"
14072
14073 CF_EOF
14074 fi
14075
14076 cat >>$cf_edit_man <<CF_EOF
14077         sed     -f $cf_man_alias \\
14078 CF_EOF
14079
14080 if test -f $MANPAGE_RENAMES ; then
14081 cat >>$cf_edit_man <<CF_EOF
14082                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14083 CF_EOF
14084 else
14085 cat >>$cf_edit_man <<CF_EOF
14086                 < \$i >\$TMP
14087 CF_EOF
14088 fi
14089
14090 cat >>$cf_edit_man <<CF_EOF
14091 if test \$cf_tables = yes ; then
14092         tbl \$TMP >\$TMP.out
14093         mv \$TMP.out \$TMP
14094 fi
14095 CF_EOF
14096
14097 if test $with_overwrite != yes ; then
14098 cat >>$cf_edit_man <<CF_EOF
14099         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14100         mv \$TMP.out \$TMP
14101 CF_EOF
14102 fi
14103
14104 if test $with_curses_h != yes ; then
14105 cat >>$cf_edit_man <<CF_EOF
14106         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14107         mv \$TMP.out \$TMP
14108 CF_EOF
14109 fi
14110
14111 cat >>$cf_edit_man <<CF_EOF
14112         if test \$form = format ; then
14113                 nroff -man \$TMP >\$TMP.out
14114                 mv \$TMP.out \$TMP
14115         fi
14116 CF_EOF
14117
14118 if test -n "$cf_compress" ; then
14119 cat >>$cf_edit_man <<CF_EOF
14120         if test \$verb = installing ; then
14121         if ( $cf_compress -f \$TMP )
14122         then
14123                 mv \$TMP.$cf_so_strip \$TMP
14124         fi
14125         fi
14126         cf_target="\$cf_target.$cf_so_strip"
14127 CF_EOF
14128 fi
14129
14130 case "$MANPAGE_FORMAT" in
14131 (*BSDI*)
14132 cat >>$cf_edit_man <<CF_EOF
14133         if test \$form = format ; then
14134                 # BSDI installs only .0 suffixes in the cat directories
14135                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14136         fi
14137 CF_EOF
14138   ;;
14139 esac
14140
14141 cat >>$cf_edit_man <<CF_EOF
14142         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14143         if test \$verb = installing ; then
14144                 echo \$verb \$cf_target
14145                 \$INSTALL_DATA \$TMP \$cf_target
14146                 test -d \$cf_subdir\${section} &&
14147                 test -n "\$aliases" && (
14148                         cd \$cf_subdir\${section} && (
14149                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14150                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14151                                 cf_target=\`basename \$cf_target\`
14152                                 for cf_alias in \$aliases
14153                                 do
14154                                         if test \$section = 1 ; then
14155                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14156                                         fi
14157
14158                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14159                                                 if test -f \$cf_alias\${suffix} ; then
14160                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14161                                                         then
14162                                                                 continue
14163                                                         fi
14164                                                 fi
14165                                                 echo .. \$verb alias \$cf_alias\${suffix}
14166 CF_EOF
14167 case "x$LN_S" in
14168 (*-f)
14169 cat >>$cf_edit_man <<CF_EOF
14170                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14171 CF_EOF
14172         ;;
14173 (*)
14174 cat >>$cf_edit_man <<CF_EOF
14175                                                 rm -f \$cf_alias\${suffix}
14176                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14177 CF_EOF
14178         ;;
14179 esac
14180 cat >>$cf_edit_man <<CF_EOF
14181                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14182                                                 echo ".so \$cf_source" >\$TMP
14183 CF_EOF
14184 if test -n "$cf_compress" ; then
14185 cat >>$cf_edit_man <<CF_EOF
14186                                                 if test -n "$cf_so_strip" ; then
14187                                                         $cf_compress -f \$TMP
14188                                                         mv \$TMP.$cf_so_strip \$TMP
14189                                                 fi
14190 CF_EOF
14191 fi
14192 cat >>$cf_edit_man <<CF_EOF
14193                                                 echo .. \$verb alias \$cf_alias\${suffix}
14194                                                 rm -f \$cf_alias\${suffix}
14195                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14196                                         fi
14197                                 done
14198                         )
14199                 )
14200         elif test \$verb = removing ; then
14201                 test -f \$cf_target && (
14202                         echo \$verb \$cf_target
14203                         rm -f \$cf_target
14204                 )
14205                 test -d \$cf_subdir\${section} &&
14206                 test -n "\$aliases" && (
14207                         cd \$cf_subdir\${section} && (
14208                                 for cf_alias in \$aliases
14209                                 do
14210                                         if test \$section = 1 ; then
14211                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14212                                         fi
14213
14214                                         echo .. \$verb alias \$cf_alias\${suffix}
14215                                         rm -f \$cf_alias\${suffix}
14216                                 done
14217                         )
14218                 )
14219         else
14220 #               echo ".hy 0"
14221                 cat \$TMP
14222         fi
14223         ;;
14224 esac
14225 done
14226
14227 if test $cf_inboth = yes ; then
14228 if test \$form != format ; then
14229         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14230 fi
14231 fi
14232
14233 exit 0
14234 CF_EOF
14235 chmod 755 $cf_edit_man
14236
14237 ###############################################################################
14238
14239 ### Note that some functions (such as const) are normally disabled anyway.
14240 echo "$as_me:14240: checking if you want to build with function extensions" >&5
14241 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14242
14243 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14244 if test "${enable_ext_funcs+set}" = set; then
14245   enableval="$enable_ext_funcs"
14246   with_ext_funcs=$enableval
14247 else
14248   with_ext_funcs=yes
14249 fi;
14250 echo "$as_me:14250: result: $with_ext_funcs" >&5
14251 echo "${ECHO_T}$with_ext_funcs" >&6
14252 if test "x$with_ext_funcs" = xyes ; then
14253         NCURSES_EXT_FUNCS=1
14254
14255 cat >>confdefs.h <<\EOF
14256 #define NCURSES_EXT_FUNCS 1
14257 EOF
14258
14259 cat >>confdefs.h <<\EOF
14260 #define HAVE_ASSUME_DEFAULT_COLORS 1
14261 EOF
14262
14263 cat >>confdefs.h <<\EOF
14264 #define HAVE_CURSES_VERSION 1
14265 EOF
14266
14267 cat >>confdefs.h <<\EOF
14268 #define HAVE_HAS_KEY 1
14269 EOF
14270
14271 cat >>confdefs.h <<\EOF
14272 #define HAVE_RESIZETERM 1
14273 EOF
14274
14275 cat >>confdefs.h <<\EOF
14276 #define HAVE_RESIZE_TERM 1
14277 EOF
14278
14279 cat >>confdefs.h <<\EOF
14280 #define HAVE_TERM_ENTRY_H 1
14281 EOF
14282
14283 cat >>confdefs.h <<\EOF
14284 #define HAVE_USE_DEFAULT_COLORS 1
14285 EOF
14286
14287 cat >>confdefs.h <<\EOF
14288 #define HAVE_USE_EXTENDED_NAMES 1
14289 EOF
14290
14291 cat >>confdefs.h <<\EOF
14292 #define HAVE_USE_SCREEN 1
14293 EOF
14294
14295 cat >>confdefs.h <<\EOF
14296 #define HAVE_USE_WINDOW 1
14297 EOF
14298
14299 cat >>confdefs.h <<\EOF
14300 #define HAVE_WRESIZE 1
14301 EOF
14302
14303         GENERATED_EXT_FUNCS=generated
14304         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14305 else
14306         NCURSES_EXT_FUNCS=0
14307         GENERATED_EXT_FUNCS=
14308 fi
14309
14310 echo "$as_me:14310: checking if you want to build with SCREEN extensions" >&5
14311 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14312
14313 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14314 if test "${enable_sp_funcs+set}" = set; then
14315   enableval="$enable_sp_funcs"
14316   with_sp_funcs=$enableval
14317 else
14318   with_sp_funcs=$cf_dft_ext_spfuncs
14319 fi;
14320 echo "$as_me:14320: result: $with_sp_funcs" >&5
14321 echo "${ECHO_T}$with_sp_funcs" >&6
14322 if test "x$with_sp_funcs" = xyes ; then
14323         NCURSES_SP_FUNCS=1
14324
14325 cat >>confdefs.h <<\EOF
14326 #define NCURSES_SP_FUNCS 1
14327 EOF
14328
14329 cat >>confdefs.h <<\EOF
14330 #define HAVE_TPUTS_SP 1
14331 EOF
14332
14333         GENERATED_SP_FUNCS=generated
14334 else
14335         NCURSES_SP_FUNCS=0
14336         GENERATED_SP_FUNCS=
14337 fi
14338
14339 echo "$as_me:14339: checking if you want to build with terminal-driver" >&5
14340 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14341
14342 # Check whether --enable-term-driver or --disable-term-driver was given.
14343 if test "${enable_term_driver+set}" = set; then
14344   enableval="$enable_term_driver"
14345   with_term_driver=$enableval
14346 else
14347   with_term_driver=no
14348 fi;
14349 echo "$as_me:14349: result: $with_term_driver" >&5
14350 echo "${ECHO_T}$with_term_driver" >&6
14351 if test "x$with_term_driver" = xyes ; then
14352
14353 cat >>confdefs.h <<\EOF
14354 #define USE_TERM_DRIVER 1
14355 EOF
14356
14357         if test "x$with_termlib" != xno ; then
14358                 { { echo "$as_me:14358: error: The term-driver option conflicts with the termlib option" >&5
14359 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14360    { (exit 1); exit 1; }; }
14361         fi
14362         if test "x$with_sp_funcs" != xyes ; then
14363                 { { echo "$as_me:14363: error: The term-driver option relies upon sp-funcs" >&5
14364 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14365    { (exit 1); exit 1; }; }
14366         fi
14367 fi
14368
14369 ###   use option --enable-const to turn on use of const beyond that in XSI.
14370 echo "$as_me:14370: checking for extended use of const keyword" >&5
14371 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14372
14373 # Check whether --enable-const or --disable-const was given.
14374 if test "${enable_const+set}" = set; then
14375   enableval="$enable_const"
14376   with_ext_const=$enableval
14377 else
14378   with_ext_const=$cf_dft_ext_const
14379 fi;
14380 echo "$as_me:14380: result: $with_ext_const" >&5
14381 echo "${ECHO_T}$with_ext_const" >&6
14382 NCURSES_CONST='/*nothing*/'
14383 if test "x$with_ext_const" = xyes ; then
14384         NCURSES_CONST=const
14385 fi
14386
14387 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14388 echo "$as_me:14388: checking if you want to use extended colors" >&5
14389 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14390
14391 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14392 if test "${enable_ext_colors+set}" = set; then
14393   enableval="$enable_ext_colors"
14394   with_ext_colors=$enableval
14395 else
14396   with_ext_colors=$cf_dft_ext_colors
14397 fi;
14398 echo "$as_me:14398: result: $with_ext_colors" >&5
14399 echo "${ECHO_T}$with_ext_colors" >&6
14400 NCURSES_EXT_COLORS=0
14401 if test "x$with_ext_colors" = xyes ; then
14402         if test "x$with_widec" != xyes ; then
14403                 { echo "$as_me:14403: WARNING: This option applies only to wide-character library" >&5
14404 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14405         else
14406                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14407
14408 if test "${with_abi_version+set}" != set; then
14409         case $cf_cv_rel_version in
14410         (5.*)
14411                 cf_cv_rel_version=6.0
14412                 cf_cv_abi_version=6
14413                 { echo "$as_me:14413: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14414 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14415                 ;;
14416         esac
14417 fi
14418
14419                 NCURSES_EXT_COLORS=1
14420
14421 cat >>confdefs.h <<\EOF
14422 #define NCURSES_EXT_COLORS 1
14423 EOF
14424
14425 cat >>confdefs.h <<\EOF
14426 #define HAVE_ALLOC_PAIR 1
14427 EOF
14428
14429 cat >>confdefs.h <<\EOF
14430 #define HAVE_INIT_EXTENDED_COLOR 1
14431 EOF
14432
14433 cat >>confdefs.h <<\EOF
14434 #define HAVE_RESET_COLOR_PAIRS 1
14435 EOF
14436
14437         fi
14438 fi
14439
14440 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14441 echo "$as_me:14441: checking if you want to use extended mouse encoding" >&5
14442 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14443
14444 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14445 if test "${enable_ext_mouse+set}" = set; then
14446   enableval="$enable_ext_mouse"
14447   with_ext_mouse=$enableval
14448 else
14449   with_ext_mouse=$cf_dft_ext_mouse
14450 fi;
14451 echo "$as_me:14451: result: $with_ext_mouse" >&5
14452 echo "${ECHO_T}$with_ext_mouse" >&6
14453 NCURSES_MOUSE_VERSION=1
14454 if test "x$with_ext_mouse" = xyes ; then
14455         NCURSES_MOUSE_VERSION=2
14456
14457 if test "${with_abi_version+set}" != set; then
14458         case $cf_cv_rel_version in
14459         (5.*)
14460                 cf_cv_rel_version=6.0
14461                 cf_cv_abi_version=6
14462                 { echo "$as_me:14462: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14463 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14464                 ;;
14465         esac
14466 fi
14467
14468 fi
14469
14470 ###   use option --enable-ext-putwin to turn on extended screendumps
14471 echo "$as_me:14471: checking if you want to use extended putwin/screendump" >&5
14472 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14473
14474 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14475 if test "${enable_ext_putwin+set}" = set; then
14476   enableval="$enable_ext_putwin"
14477   with_ext_putwin=$enableval
14478 else
14479   with_ext_putwin=$cf_dft_ext_putwin
14480 fi;
14481 echo "$as_me:14481: result: $with_ext_putwin" >&5
14482 echo "${ECHO_T}$with_ext_putwin" >&6
14483 if test "x$with_ext_putwin" = xyes ; then
14484
14485 cat >>confdefs.h <<\EOF
14486 #define NCURSES_EXT_PUTWIN 1
14487 EOF
14488
14489 fi
14490
14491 echo "$as_me:14491: checking if you want \$NCURSES_NO_PADDING code" >&5
14492 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14493
14494 # Check whether --enable-no-padding or --disable-no-padding was given.
14495 if test "${enable_no_padding+set}" = set; then
14496   enableval="$enable_no_padding"
14497   with_no_padding=$enableval
14498 else
14499   with_no_padding=$with_ext_funcs
14500 fi;
14501 echo "$as_me:14501: result: $with_no_padding" >&5
14502 echo "${ECHO_T}$with_no_padding" >&6
14503 test "x$with_no_padding" = xyes &&
14504 cat >>confdefs.h <<\EOF
14505 #define NCURSES_NO_PADDING 1
14506 EOF
14507
14508 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14509 echo "$as_me:14509: checking if you want SIGWINCH handler" >&5
14510 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14511
14512 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14513 if test "${enable_sigwinch+set}" = set; then
14514   enableval="$enable_sigwinch"
14515   with_sigwinch=$enableval
14516 else
14517   with_sigwinch=$with_ext_funcs
14518 fi;
14519 echo "$as_me:14519: result: $with_sigwinch" >&5
14520 echo "${ECHO_T}$with_sigwinch" >&6
14521 test "x$with_sigwinch" = xyes &&
14522 cat >>confdefs.h <<\EOF
14523 #define USE_SIGWINCH 1
14524 EOF
14525
14526 ###   use option --enable-tcap-names to allow user to define new capabilities
14527 echo "$as_me:14527: checking if you want user-definable terminal capabilities like termcap" >&5
14528 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14529
14530 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14531 if test "${enable_tcap_names+set}" = set; then
14532   enableval="$enable_tcap_names"
14533   with_tcap_names=$enableval
14534 else
14535   with_tcap_names=$with_ext_funcs
14536 fi;
14537 echo "$as_me:14537: result: $with_tcap_names" >&5
14538 echo "${ECHO_T}$with_tcap_names" >&6
14539 NCURSES_XNAMES=0
14540 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14541
14542 ##############################################################################
14543
14544 echo "$as_me:14544: checking if you want to link with the pthread library" >&5
14545 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14546
14547 # Check whether --with-pthread or --without-pthread was given.
14548 if test "${with_pthread+set}" = set; then
14549   withval="$with_pthread"
14550   with_pthread=$withval
14551 else
14552   with_pthread=no
14553 fi;
14554 echo "$as_me:14554: result: $with_pthread" >&5
14555 echo "${ECHO_T}$with_pthread" >&6
14556
14557 if test "$with_pthread" != no ; then
14558         echo "$as_me:14558: checking for pthread.h" >&5
14559 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14560 if test "${ac_cv_header_pthread_h+set}" = set; then
14561   echo $ECHO_N "(cached) $ECHO_C" >&6
14562 else
14563   cat >conftest.$ac_ext <<_ACEOF
14564 #line 14564 "configure"
14565 #include "confdefs.h"
14566 #include <pthread.h>
14567 _ACEOF
14568 if { (eval echo "$as_me:14568: \"$ac_cpp conftest.$ac_ext\"") >&5
14569   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14570   ac_status=$?
14571   egrep -v '^ *\+' conftest.er1 >conftest.err
14572   rm -f conftest.er1
14573   cat conftest.err >&5
14574   echo "$as_me:14574: \$? = $ac_status" >&5
14575   (exit $ac_status); } >/dev/null; then
14576   if test -s conftest.err; then
14577     ac_cpp_err=$ac_c_preproc_warn_flag
14578   else
14579     ac_cpp_err=
14580   fi
14581 else
14582   ac_cpp_err=yes
14583 fi
14584 if test -z "$ac_cpp_err"; then
14585   ac_cv_header_pthread_h=yes
14586 else
14587   echo "$as_me: failed program was:" >&5
14588   cat conftest.$ac_ext >&5
14589   ac_cv_header_pthread_h=no
14590 fi
14591 rm -f conftest.err conftest.$ac_ext
14592 fi
14593 echo "$as_me:14593: result: $ac_cv_header_pthread_h" >&5
14594 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14595 if test $ac_cv_header_pthread_h = yes; then
14596
14597 cat >>confdefs.h <<\EOF
14598 #define HAVE_PTHREADS_H 1
14599 EOF
14600
14601         for cf_lib_pthread in pthread c_r
14602         do
14603             echo "$as_me:14603: checking if we can link with the $cf_lib_pthread library" >&5
14604 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14605             cf_save_LIBS="$LIBS"
14606
14607 cf_add_libs="$LIBS"
14608 # reverse order
14609 cf_add_0lib=
14610 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14611 # filter duplicates
14612 for cf_add_1lib in $cf_add_0lib; do
14613         for cf_add_2lib in $cf_add_libs; do
14614                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14615                         cf_add_1lib=
14616                         break
14617                 fi
14618         done
14619         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14620 done
14621 LIBS="$cf_add_libs"
14622
14623             cat >conftest.$ac_ext <<_ACEOF
14624 #line 14624 "configure"
14625 #include "confdefs.h"
14626
14627 #include <pthread.h>
14628
14629 int
14630 main (void)
14631 {
14632
14633                 int rc = pthread_create(0,0,0,0);
14634                 int r2 = pthread_mutexattr_settype(0, 0);
14635
14636   ;
14637   return 0;
14638 }
14639 _ACEOF
14640 rm -f conftest.$ac_objext conftest$ac_exeext
14641 if { (eval echo "$as_me:14641: \"$ac_link\"") >&5
14642   (eval $ac_link) 2>&5
14643   ac_status=$?
14644   echo "$as_me:14644: \$? = $ac_status" >&5
14645   (exit $ac_status); } &&
14646          { ac_try='test -s conftest$ac_exeext'
14647   { (eval echo "$as_me:14647: \"$ac_try\"") >&5
14648   (eval $ac_try) 2>&5
14649   ac_status=$?
14650   echo "$as_me:14650: \$? = $ac_status" >&5
14651   (exit $ac_status); }; }; then
14652   with_pthread=yes
14653 else
14654   echo "$as_me: failed program was:" >&5
14655 cat conftest.$ac_ext >&5
14656 with_pthread=no
14657 fi
14658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14659             LIBS="$cf_save_LIBS"
14660             echo "$as_me:14660: result: $with_pthread" >&5
14661 echo "${ECHO_T}$with_pthread" >&6
14662             test "$with_pthread" = yes && break
14663         done
14664
14665         if test "$with_pthread" = yes ; then
14666
14667 cf_add_libs="$LIBS"
14668 # reverse order
14669 cf_add_0lib=
14670 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14671 # filter duplicates
14672 for cf_add_1lib in $cf_add_0lib; do
14673         for cf_add_2lib in $cf_add_libs; do
14674                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14675                         cf_add_1lib=
14676                         break
14677                 fi
14678         done
14679         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14680 done
14681 LIBS="$cf_add_libs"
14682
14683 cat >>confdefs.h <<\EOF
14684 #define HAVE_LIBPTHREADS 1
14685 EOF
14686
14687         else
14688             { { echo "$as_me:14688: error: Cannot link with pthread library" >&5
14689 echo "$as_me: error: Cannot link with pthread library" >&2;}
14690    { (exit 1); exit 1; }; }
14691         fi
14692
14693 fi
14694
14695 fi
14696
14697 if test "x$with_pthread" != xno; then
14698         echo "$as_me:14698: checking for pthread_kill" >&5
14699 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14700 if test "${ac_cv_func_pthread_kill+set}" = set; then
14701   echo $ECHO_N "(cached) $ECHO_C" >&6
14702 else
14703   cat >conftest.$ac_ext <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706 #define pthread_kill autoconf_temporary
14707 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14708 #undef pthread_kill
14709
14710 #ifdef __cplusplus
14711 extern "C"
14712 #endif
14713
14714 /* We use char because int might match the return type of a gcc2
14715    builtin and then its argument prototype would still apply.  */
14716 char pthread_kill (void);
14717
14718 int
14719 main (void)
14720 {
14721
14722 /* The GNU C library defines stubs for functions which it implements
14723     to always fail with ENOSYS.  Some functions are actually named
14724     something starting with __ and the normal name is an alias.  */
14725 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14726 #error found stub for pthread_kill
14727 #endif
14728
14729         return pthread_kill ();
14730   ;
14731   return 0;
14732 }
14733 _ACEOF
14734 rm -f conftest.$ac_objext conftest$ac_exeext
14735 if { (eval echo "$as_me:14735: \"$ac_link\"") >&5
14736   (eval $ac_link) 2>&5
14737   ac_status=$?
14738   echo "$as_me:14738: \$? = $ac_status" >&5
14739   (exit $ac_status); } &&
14740          { ac_try='test -s conftest$ac_exeext'
14741   { (eval echo "$as_me:14741: \"$ac_try\"") >&5
14742   (eval $ac_try) 2>&5
14743   ac_status=$?
14744   echo "$as_me:14744: \$? = $ac_status" >&5
14745   (exit $ac_status); }; }; then
14746   ac_cv_func_pthread_kill=yes
14747 else
14748   echo "$as_me: failed program was:" >&5
14749 cat conftest.$ac_ext >&5
14750 ac_cv_func_pthread_kill=no
14751 fi
14752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14753 fi
14754 echo "$as_me:14754: result: $ac_cv_func_pthread_kill" >&5
14755 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14756 if test $ac_cv_func_pthread_kill = yes; then
14757
14758                 echo "$as_me:14758: checking if you want to allow EINTR in wgetch with pthreads" >&5
14759 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14760
14761 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14762 if test "${enable_pthreads_eintr+set}" = set; then
14763   enableval="$enable_pthreads_eintr"
14764   use_pthreads_eintr=$enableval
14765 else
14766   use_pthreads_eintr=no
14767 fi;
14768                 echo "$as_me:14768: result: $use_pthreads_eintr" >&5
14769 echo "${ECHO_T}$use_pthreads_eintr" >&6
14770                 if test "x$use_pthreads_eintr" = xyes ; then
14771
14772 cat >>confdefs.h <<\EOF
14773 #define USE_PTHREADS_EINTR 1
14774 EOF
14775
14776                 fi
14777 fi
14778
14779         echo "$as_me:14779: checking if you want to use weak-symbols for pthreads" >&5
14780 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14781
14782 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14783 if test "${enable_weak_symbols+set}" = set; then
14784   enableval="$enable_weak_symbols"
14785   use_weak_symbols=$enableval
14786 else
14787   use_weak_symbols=no
14788 fi;
14789         echo "$as_me:14789: result: $use_weak_symbols" >&5
14790 echo "${ECHO_T}$use_weak_symbols" >&6
14791         if test "x$use_weak_symbols" = xyes ; then
14792
14793 echo "$as_me:14793: checking if $CC supports weak symbols" >&5
14794 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14795 if test "${cf_cv_weak_symbols+set}" = set; then
14796   echo $ECHO_N "(cached) $ECHO_C" >&6
14797 else
14798
14799 cat >conftest.$ac_ext <<_ACEOF
14800 #line 14800 "configure"
14801 #include "confdefs.h"
14802
14803 #include <stdio.h>
14804 int
14805 main (void)
14806 {
14807
14808 #if defined(__GNUC__)
14809 #  if defined __USE_ISOC99
14810 #    define _cat_pragma(exp)    _Pragma(#exp)
14811 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14812 #  else
14813 #    define _weak_pragma(exp)
14814 #  endif
14815 #  define _declare(name)        __extension__ extern __typeof__(name) name
14816 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14817 #endif
14818
14819 weak_symbol(fopen);
14820
14821   ;
14822   return 0;
14823 }
14824 _ACEOF
14825 rm -f conftest.$ac_objext
14826 if { (eval echo "$as_me:14826: \"$ac_compile\"") >&5
14827   (eval $ac_compile) 2>&5
14828   ac_status=$?
14829   echo "$as_me:14829: \$? = $ac_status" >&5
14830   (exit $ac_status); } &&
14831          { ac_try='test -s conftest.$ac_objext'
14832   { (eval echo "$as_me:14832: \"$ac_try\"") >&5
14833   (eval $ac_try) 2>&5
14834   ac_status=$?
14835   echo "$as_me:14835: \$? = $ac_status" >&5
14836   (exit $ac_status); }; }; then
14837   cf_cv_weak_symbols=yes
14838 else
14839   echo "$as_me: failed program was:" >&5
14840 cat conftest.$ac_ext >&5
14841 cf_cv_weak_symbols=no
14842 fi
14843 rm -f conftest.$ac_objext conftest.$ac_ext
14844
14845 fi
14846 echo "$as_me:14846: result: $cf_cv_weak_symbols" >&5
14847 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14848
14849         else
14850                 cf_cv_weak_symbols=no
14851         fi
14852
14853         if test "x$cf_cv_weak_symbols" = xyes ; then
14854
14855 cat >>confdefs.h <<\EOF
14856 #define USE_WEAK_SYMBOLS 1
14857 EOF
14858
14859         fi
14860 fi
14861
14862 PTHREAD=
14863 if test "x$with_pthread" = "xyes" ; then
14864
14865 cat >>confdefs.h <<\EOF
14866 #define USE_PTHREADS 1
14867 EOF
14868
14869         enable_reentrant=yes
14870         if test "x$cf_cv_weak_symbols" = xyes ; then
14871                 PTHREAD=-lpthread
14872
14873 cf_add_libs="$PRIVATE_LIBS"
14874 # reverse order
14875 cf_add_0lib=
14876 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14877 # filter duplicates
14878 for cf_add_1lib in $cf_add_0lib; do
14879         for cf_add_2lib in $cf_add_libs; do
14880                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14881                         cf_add_1lib=
14882                         break
14883                 fi
14884         done
14885         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14886 done
14887 PRIVATE_LIBS="$cf_add_libs"
14888
14889         fi
14890 fi
14891
14892 # Reentrant code has to be opaque; there's little advantage to making ncurses
14893 # opaque outside of that, so there is no --enable-opaque option.  We can use
14894 # this option without --with-pthreads, but this will be always set for
14895 # pthreads.
14896 echo "$as_me:14896: checking if you want reentrant code" >&5
14897 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14898
14899 # Check whether --enable-reentrant or --disable-reentrant was given.
14900 if test "${enable_reentrant+set}" = set; then
14901   enableval="$enable_reentrant"
14902   with_reentrant=$enableval
14903 else
14904   with_reentrant=no
14905 fi;
14906 echo "$as_me:14906: result: $with_reentrant" >&5
14907 echo "${ECHO_T}$with_reentrant" >&6
14908 if test "x$with_reentrant" = xyes ; then
14909         cf_cv_enable_reentrant=1
14910         cf_cv_enable_opaque="NCURSES_INTERNALS"
14911         NCURSES_SIZE_T=int
14912         if test "x$cf_cv_weak_symbols" = xyes ; then
14913
14914 # remove pthread library from $LIBS
14915 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14916
14917 cf_add_libs="$TEST_LIBS"
14918 # reverse order
14919 cf_add_0lib=
14920 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14921 # filter duplicates
14922 for cf_add_1lib in $cf_add_0lib; do
14923         for cf_add_2lib in $cf_add_libs; do
14924                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14925                         cf_add_1lib=
14926                         break
14927                 fi
14928         done
14929         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14930 done
14931 TEST_LIBS="$cf_add_libs"
14932
14933 cf_add_libs="$TEST_LIBS2"
14934 # reverse order
14935 cf_add_0lib=
14936 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14937 # filter duplicates
14938 for cf_add_1lib in $cf_add_0lib; do
14939         for cf_add_2lib in $cf_add_libs; do
14940                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14941                         cf_add_1lib=
14942                         break
14943                 fi
14944         done
14945         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14946 done
14947 TEST_LIBS2="$cf_add_libs"
14948
14949 cf_add_libs="$PRIVATE_LIBS"
14950 # reverse order
14951 cf_add_0lib=
14952 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14953 # filter duplicates
14954 for cf_add_1lib in $cf_add_0lib; do
14955         for cf_add_2lib in $cf_add_libs; do
14956                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14957                         cf_add_1lib=
14958                         break
14959                 fi
14960         done
14961         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14962 done
14963 PRIVATE_LIBS="$cf_add_libs"
14964
14965         else
14966                 # when not using weak symbols but with_reentrant,
14967                 # add 't' to the library suffix on all platforms
14968                 # except cygwin, where we only do that if ALSO
14969                 # compiling with full thread support.
14970                 case "$host" in
14971                 (*cygwin* | *msys*)
14972                         if test "$with_pthread" = "yes" ; then
14973                                 if test "x$disable_lib_suffixes" = "xno" ; then
14974                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14975                                 fi
14976                         fi ;;
14977                 (*)
14978                         if test "x$disable_lib_suffixes" = "xno" ; then
14979                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14980                         fi
14981                         ;;
14982                 esac
14983         fi
14984
14985 cat >>confdefs.h <<\EOF
14986 #define USE_REENTRANT 1
14987 EOF
14988
14989 if test "${with_abi_version+set}" != set; then
14990         case $cf_cv_rel_version in
14991         (5.*)
14992                 cf_cv_rel_version=6.0
14993                 cf_cv_abi_version=6
14994                 { echo "$as_me:14994: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14995 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14996                 ;;
14997         esac
14998 fi
14999
15000 else
15001         cf_cv_enable_reentrant=0
15002         cf_cv_enable_opaque="NCURSES_OPAQUE"
15003         NCURSES_SIZE_T=short
15004 fi
15005
15006 echo "$as_me:15006: checking if you want opaque curses-library structures" >&5
15007 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15008
15009 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15010 if test "${enable_opaque_curses+set}" = set; then
15011   enableval="$enable_opaque_curses"
15012   test "$enableval" != yes && enableval=no
15013         if test "$enableval" != "no" ; then
15014     enable_opaque_curses=yes
15015         else
15016
15017          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15018          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15019
15020         fi
15021 else
15022   enableval=no
15023
15024          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15025          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15026
15027 fi;
15028 echo "$as_me:15028: result: $enable_opaque_curses" >&5
15029 echo "${ECHO_T}$enable_opaque_curses" >&6
15030
15031 test "$cf_cv_enable_reentrant" = 1 && \
15032 test "$enable_opaque_curses" = no && \
15033 { { echo "$as_me:15033: error: reentrant configuration requires opaque library" >&5
15034 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15035    { (exit 1); exit 1; }; }
15036
15037 echo "$as_me:15037: checking if you want opaque form-library structures" >&5
15038 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15039
15040 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15041 if test "${enable_opaque_form+set}" = set; then
15042   enableval="$enable_opaque_form"
15043   enable_opaque_form=yes
15044 else
15045   enable_opaque_form=no
15046 fi;
15047 echo "$as_me:15047: result: $enable_opaque_form" >&5
15048 echo "${ECHO_T}$enable_opaque_form" >&6
15049
15050 echo "$as_me:15050: checking if you want opaque menu-library structures" >&5
15051 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15052
15053 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15054 if test "${enable_opaque_menu+set}" = set; then
15055   enableval="$enable_opaque_menu"
15056   enable_opaque_menu=yes
15057 else
15058   enable_opaque_menu=no
15059 fi;
15060 echo "$as_me:15060: result: $enable_opaque_menu" >&5
15061 echo "${ECHO_T}$enable_opaque_menu" >&6
15062
15063 echo "$as_me:15063: checking if you want opaque panel-library structures" >&5
15064 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15065
15066 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15067 if test "${enable_opaque_panel+set}" = set; then
15068   enableval="$enable_opaque_panel"
15069   enable_opaque_panel=yes
15070 else
15071   enable_opaque_panel=no
15072 fi;
15073 echo "$as_me:15073: result: $enable_opaque_panel" >&5
15074 echo "${ECHO_T}$enable_opaque_panel" >&6
15075
15076 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15077 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15078 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15079 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15080
15081 ### Allow using a different wrap-prefix
15082 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15083         echo "$as_me:15083: checking for prefix used to wrap public variables" >&5
15084 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15085
15086 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15087 if test "${with_wrap_prefix+set}" = set; then
15088   withval="$with_wrap_prefix"
15089   NCURSES_WRAP_PREFIX=$withval
15090 else
15091   NCURSES_WRAP_PREFIX=_nc_
15092 fi;
15093         echo "$as_me:15093: result: $NCURSES_WRAP_PREFIX" >&5
15094 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15095 else
15096         NCURSES_WRAP_PREFIX=_nc_
15097 fi
15098
15099 cat >>confdefs.h <<EOF
15100 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15101 EOF
15102
15103 ###############################################################################
15104 # These options are relatively safe to experiment with.
15105
15106 echo "$as_me:15106: checking if you want all development code" >&5
15107 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15108
15109 # Check whether --with-develop or --without-develop was given.
15110 if test "${with_develop+set}" = set; then
15111   withval="$with_develop"
15112   with_develop=$withval
15113 else
15114   with_develop=no
15115 fi;
15116 echo "$as_me:15116: result: $with_develop" >&5
15117 echo "${ECHO_T}$with_develop" >&6
15118
15119 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15120 echo "$as_me:15120: checking if you want hard-tabs code" >&5
15121 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15122
15123 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15124 if test "${enable_hard_tabs+set}" = set; then
15125   enableval="$enable_hard_tabs"
15126
15127 else
15128   enable_hard_tabs=$with_develop
15129 fi;
15130 echo "$as_me:15130: result: $enable_hard_tabs" >&5
15131 echo "${ECHO_T}$enable_hard_tabs" >&6
15132 test "x$enable_hard_tabs" = xyes &&
15133 cat >>confdefs.h <<\EOF
15134 #define USE_HARD_TABS 1
15135 EOF
15136
15137 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15138 echo "$as_me:15138: checking if you want limited support for xmc" >&5
15139 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15140
15141 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15142 if test "${enable_xmc_glitch+set}" = set; then
15143   enableval="$enable_xmc_glitch"
15144
15145 else
15146   enable_xmc_glitch=$with_develop
15147 fi;
15148 echo "$as_me:15148: result: $enable_xmc_glitch" >&5
15149 echo "${ECHO_T}$enable_xmc_glitch" >&6
15150 test "x$enable_xmc_glitch" = xyes &&
15151 cat >>confdefs.h <<\EOF
15152 #define USE_XMC_SUPPORT 1
15153 EOF
15154
15155 ###############################################################################
15156 # These are just experimental, probably should not be in a package:
15157
15158 echo "$as_me:15158: checking if you do not want to assume colors are white-on-black" >&5
15159 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15160
15161 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15162 if test "${enable_assumed_color+set}" = set; then
15163   enableval="$enable_assumed_color"
15164   with_assumed_color=$enableval
15165 else
15166   with_assumed_color=yes
15167 fi;
15168 echo "$as_me:15168: result: $with_assumed_color" >&5
15169 echo "${ECHO_T}$with_assumed_color" >&6
15170 test "x$with_assumed_color" = xyes &&
15171 cat >>confdefs.h <<\EOF
15172 #define USE_ASSUMED_COLOR 1
15173 EOF
15174
15175 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15176 echo "$as_me:15176: checking if you want hashmap scrolling-optimization code" >&5
15177 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15178
15179 # Check whether --enable-hashmap or --disable-hashmap was given.
15180 if test "${enable_hashmap+set}" = set; then
15181   enableval="$enable_hashmap"
15182   with_hashmap=$enableval
15183 else
15184   with_hashmap=yes
15185 fi;
15186 echo "$as_me:15186: result: $with_hashmap" >&5
15187 echo "${ECHO_T}$with_hashmap" >&6
15188 test "x$with_hashmap" = xyes &&
15189 cat >>confdefs.h <<\EOF
15190 #define USE_HASHMAP 1
15191 EOF
15192
15193 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15194 echo "$as_me:15194: checking if you want colorfgbg code" >&5
15195 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15196
15197 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15198 if test "${enable_colorfgbg+set}" = set; then
15199   enableval="$enable_colorfgbg"
15200   with_colorfgbg=$enableval
15201 else
15202   with_colorfgbg=no
15203 fi;
15204 echo "$as_me:15204: result: $with_colorfgbg" >&5
15205 echo "${ECHO_T}$with_colorfgbg" >&6
15206 test "x$with_colorfgbg" = xyes &&
15207 cat >>confdefs.h <<\EOF
15208 #define USE_COLORFGBG 1
15209 EOF
15210
15211 ###   use option --enable-interop to turn on use of bindings used for interop
15212 echo "$as_me:15212: checking if you want interop bindings" >&5
15213 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15214
15215 # Check whether --enable-interop or --disable-interop was given.
15216 if test "${enable_interop+set}" = set; then
15217   enableval="$enable_interop"
15218   with_exp_interop=$enableval
15219 else
15220   with_exp_interop=$cf_dft_interop
15221 fi;
15222 echo "$as_me:15222: result: $with_exp_interop" >&5
15223 echo "${ECHO_T}$with_exp_interop" >&6
15224
15225 NCURSES_INTEROP_FUNCS=0
15226 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15227
15228 echo "$as_me:15228: checking if you want experimental safe-sprintf code" >&5
15229 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15230
15231 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15232 if test "${enable_safe_sprintf+set}" = set; then
15233   enableval="$enable_safe_sprintf"
15234   with_safe_sprintf=$enableval
15235 else
15236   with_safe_sprintf=no
15237 fi;
15238 echo "$as_me:15238: result: $with_safe_sprintf" >&5
15239 echo "${ECHO_T}$with_safe_sprintf" >&6
15240
15241 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15242 # when hashmap is used scroll hints are useless
15243 if test "$with_hashmap" = no ; then
15244 echo "$as_me:15244: checking if you want to experiment without scrolling-hints code" >&5
15245 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15246
15247 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15248 if test "${enable_scroll_hints+set}" = set; then
15249   enableval="$enable_scroll_hints"
15250   with_scroll_hints=$enableval
15251 else
15252   with_scroll_hints=yes
15253 fi;
15254 echo "$as_me:15254: result: $with_scroll_hints" >&5
15255 echo "${ECHO_T}$with_scroll_hints" >&6
15256 test "x$with_scroll_hints" = xyes &&
15257 cat >>confdefs.h <<\EOF
15258 #define USE_SCROLL_HINTS 1
15259 EOF
15260
15261 fi
15262
15263 echo "$as_me:15263: checking if you want wgetch-events code" >&5
15264 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15265
15266 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15267 if test "${enable_wgetch_events+set}" = set; then
15268   enableval="$enable_wgetch_events"
15269   with_wgetch_events=$enableval
15270 else
15271   with_wgetch_events=no
15272 fi;
15273 echo "$as_me:15273: result: $with_wgetch_events" >&5
15274 echo "${ECHO_T}$with_wgetch_events" >&6
15275 test "x$with_wgetch_events" = xyes &&
15276 cat >>confdefs.h <<\EOF
15277 #define NCURSES_WGETCH_EVENTS 1
15278 EOF
15279
15280 ###############################################################################
15281
15282 ###     use option --disable-echo to suppress full display compiling commands
15283
15284 echo "$as_me:15284: checking if you want to see long compiling messages" >&5
15285 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15286
15287 # Check whether --enable-echo or --disable-echo was given.
15288 if test "${enable_echo+set}" = set; then
15289   enableval="$enable_echo"
15290   test "$enableval" != no && enableval=yes
15291         if test "$enableval" != "yes" ; then
15292
15293         ECHO_LT='--silent'
15294         ECHO_LD='@echo linking $@;'
15295         RULE_CC='@echo compiling $<'
15296         SHOW_CC='@echo compiling $@'
15297         ECHO_CC='@'
15298
15299         else
15300
15301         ECHO_LT=''
15302         ECHO_LD=''
15303         RULE_CC=''
15304         SHOW_CC=''
15305         ECHO_CC=''
15306
15307         fi
15308 else
15309   enableval=yes
15310
15311         ECHO_LT=''
15312         ECHO_LD=''
15313         RULE_CC=''
15314         SHOW_CC=''
15315         ECHO_CC=''
15316
15317 fi;
15318 echo "$as_me:15318: result: $enableval" >&5
15319 echo "${ECHO_T}$enableval" >&6
15320
15321 if test "x$enable_echo" = xyes; then
15322         ECHO_LINK=
15323 else
15324         ECHO_LINK='@ echo linking $@ ... ;'
15325         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15326         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15327 fi
15328
15329 # --disable-stripping is used for debugging
15330
15331 echo "$as_me:15331: checking if you want to install stripped executables" >&5
15332 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15333
15334 # Check whether --enable-stripping or --disable-stripping was given.
15335 if test "${enable_stripping+set}" = set; then
15336   enableval="$enable_stripping"
15337   test "$enableval" != no && enableval=yes
15338         if test "$enableval" != "yes" ; then
15339     with_stripping=no
15340         else
15341                 with_stripping=yes
15342         fi
15343 else
15344   enableval=yes
15345         with_stripping=yes
15346
15347 fi;
15348 echo "$as_me:15348: result: $with_stripping" >&5
15349 echo "${ECHO_T}$with_stripping" >&6
15350
15351 if test "$with_stripping" = yes
15352 then
15353         INSTALL_OPT_S="-s"
15354 else
15355         INSTALL_OPT_S=
15356 fi
15357
15358 : ${INSTALL:=install}
15359 echo "$as_me:15359: checking if install accepts -p option" >&5
15360 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15361 if test "${cf_cv_install_p+set}" = set; then
15362   echo $ECHO_N "(cached) $ECHO_C" >&6
15363 else
15364
15365         rm -rf conftest*
15366         date >conftest.in
15367         mkdir conftest.out
15368         sleep 3
15369         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15370         then
15371                 if test -f conftest.out/conftest.in
15372                 then
15373                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15374                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15375                         if test -s conftest.err
15376                         then
15377                                 cf_cv_install_p=no
15378                         else
15379                                 cf_cv_install_p=yes
15380                         fi
15381                 else
15382                         cf_cv_install_p=no
15383                 fi
15384         else
15385                 cf_cv_install_p=no
15386         fi
15387         rm -rf conftest*
15388
15389 fi
15390 echo "$as_me:15390: result: $cf_cv_install_p" >&5
15391 echo "${ECHO_T}$cf_cv_install_p" >&6
15392
15393 echo "$as_me:15393: checking if install needs to be told about ownership" >&5
15394 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15395 case `$ac_config_guess` in
15396 (*minix)
15397         with_install_o=yes
15398         ;;
15399 (*)
15400         with_install_o=no
15401         ;;
15402 esac
15403
15404 echo "$as_me:15404: result: $with_install_o" >&5
15405 echo "${ECHO_T}$with_install_o" >&6
15406 if test "x$with_install_o" = xyes
15407 then
15408         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'`
15409 else
15410         INSTALL_OPT_O=
15411 fi
15412
15413 # If we're avoiding relinking of shared libraries during install, that is to
15414 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15415 # the install program has "-p" (for preserving timestamps).
15416 cf_cv_do_reranlib=yes
15417 if test "x$cf_cv_install_p" = xyes
15418 then
15419         if test "x$cf_cv_do_relink" != xyes
15420         then
15421                 cf_cv_do_reranlib=no
15422                 INSTALL_OPT_P="-p"
15423                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15424         fi
15425 fi
15426
15427 ###     use option --enable-warnings to turn on all gcc warnings
15428 echo "$as_me:15428: checking if you want to see compiler warnings" >&5
15429 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15430
15431 # Check whether --enable-warnings or --disable-warnings was given.
15432 if test "${enable_warnings+set}" = set; then
15433   enableval="$enable_warnings"
15434   with_warnings=$enableval
15435 fi;
15436 echo "$as_me:15436: result: $with_warnings" >&5
15437 echo "${ECHO_T}$with_warnings" >&6
15438
15439 if test "x$with_warnings" = "xyes"; then
15440
15441         ADAFLAGS="$ADAFLAGS -gnatg"
15442
15443 if test "x$have_x" = xyes; then
15444
15445 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15446 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15447 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15448 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15449 for cf_X_CFLAGS in $X_CFLAGS
15450 do
15451         case "x$cf_X_CFLAGS" in
15452         x-[IUD]*)
15453                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15454                 ;;
15455         *)
15456                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15457                 ;;
15458         esac
15459 done
15460
15461 cat >conftest.$ac_ext <<_ACEOF
15462 #line 15462 "configure"
15463 #include "confdefs.h"
15464
15465 #include <stdlib.h>
15466 #include <X11/Intrinsic.h>
15467
15468 int
15469 main (void)
15470 {
15471 String foo = malloc(1)
15472   ;
15473   return 0;
15474 }
15475 _ACEOF
15476 rm -f conftest.$ac_objext
15477 if { (eval echo "$as_me:15477: \"$ac_compile\"") >&5
15478   (eval $ac_compile) 2>&5
15479   ac_status=$?
15480   echo "$as_me:15480: \$? = $ac_status" >&5
15481   (exit $ac_status); } &&
15482          { ac_try='test -s conftest.$ac_objext'
15483   { (eval echo "$as_me:15483: \"$ac_try\"") >&5
15484   (eval $ac_try) 2>&5
15485   ac_status=$?
15486   echo "$as_me:15486: \$? = $ac_status" >&5
15487   (exit $ac_status); }; }; then
15488
15489 echo "$as_me:15489: checking for X11/Xt const-feature" >&5
15490 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15491 if test "${cf_cv_const_x_string+set}" = set; then
15492   echo $ECHO_N "(cached) $ECHO_C" >&6
15493 else
15494
15495         cat >conftest.$ac_ext <<_ACEOF
15496 #line 15496 "configure"
15497 #include "confdefs.h"
15498
15499 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15500 #undef  XTSTRINGDEFINES /* X11R5 and later */
15501 #include <stdlib.h>
15502 #include <X11/Intrinsic.h>
15503
15504 int
15505 main (void)
15506 {
15507 String foo = malloc(1); *foo = 0
15508   ;
15509   return 0;
15510 }
15511 _ACEOF
15512 rm -f conftest.$ac_objext
15513 if { (eval echo "$as_me:15513: \"$ac_compile\"") >&5
15514   (eval $ac_compile) 2>&5
15515   ac_status=$?
15516   echo "$as_me:15516: \$? = $ac_status" >&5
15517   (exit $ac_status); } &&
15518          { ac_try='test -s conftest.$ac_objext'
15519   { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520   (eval $ac_try) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); }; }; then
15524
15525                         cf_cv_const_x_string=no
15526
15527 else
15528   echo "$as_me: failed program was:" >&5
15529 cat conftest.$ac_ext >&5
15530
15531                         cf_cv_const_x_string=yes
15532
15533 fi
15534 rm -f conftest.$ac_objext conftest.$ac_ext
15535
15536 fi
15537 echo "$as_me:15537: result: $cf_cv_const_x_string" >&5
15538 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15539
15540 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15541 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15542 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15543
15544 case $cf_cv_const_x_string in
15545 (no)
15546
15547         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15548         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15549
15550         ;;
15551 (*)
15552
15553         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15554         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15555
15556         ;;
15557 esac
15558
15559 else
15560   echo "$as_me: failed program was:" >&5
15561 cat conftest.$ac_ext >&5
15562 fi
15563 rm -f conftest.$ac_objext conftest.$ac_ext
15564  fi
15565 cat > conftest.$ac_ext <<EOF
15566 #line 15566 "${as_me:-configure}"
15567 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15568 EOF
15569 if test "$INTEL_COMPILER" = yes
15570 then
15571 # The "-wdXXX" options suppress warnings:
15572 # remark #1419: external declaration in primary source file
15573 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15574 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15575 # remark #193: zero used for undefined preprocessing identifier
15576 # remark #593: variable "curs_sb_left_arrow" was set but never used
15577 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15578 # remark #869: parameter "tw" was never referenced
15579 # remark #981: operands are evaluated in unspecified order
15580 # warning #279: controlling expression is constant
15581
15582         { echo "$as_me:15582: checking for $CC warning options..." >&5
15583 echo "$as_me: checking for $CC warning options..." >&6;}
15584         cf_save_CFLAGS="$CFLAGS"
15585         EXTRA_CFLAGS="-Wall"
15586         for cf_opt in \
15587                 wd1419 \
15588                 wd1683 \
15589                 wd1684 \
15590                 wd193 \
15591                 wd593 \
15592                 wd279 \
15593                 wd810 \
15594                 wd869 \
15595                 wd981
15596         do
15597                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15598                 if { (eval echo "$as_me:15598: \"$ac_compile\"") >&5
15599   (eval $ac_compile) 2>&5
15600   ac_status=$?
15601   echo "$as_me:15601: \$? = $ac_status" >&5
15602   (exit $ac_status); }; then
15603                         test -n "$verbose" && echo "$as_me:15603: result: ... -$cf_opt" >&5
15604 echo "${ECHO_T}... -$cf_opt" >&6
15605                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15606                 fi
15607         done
15608         CFLAGS="$cf_save_CFLAGS"
15609 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15610 then
15611         { echo "$as_me:15611: checking for $CC warning options..." >&5
15612 echo "$as_me: checking for $CC warning options..." >&6;}
15613         cf_save_CFLAGS="$CFLAGS"
15614         EXTRA_CFLAGS=
15615         cf_warn_CONST=""
15616         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15617         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15618         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15619         for cf_opt in W Wall \
15620                 Wbad-function-cast \
15621                 Wcast-align \
15622                 Wcast-qual \
15623                 Wdeclaration-after-statement \
15624                 Wextra \
15625                 Winline \
15626                 Wmissing-declarations \
15627                 Wmissing-prototypes \
15628                 Wnested-externs \
15629                 Wpointer-arith \
15630                 Wshadow \
15631                 Wstrict-prototypes \
15632                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15633         do
15634                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15635                 if { (eval echo "$as_me:15635: \"$ac_compile\"") >&5
15636   (eval $ac_compile) 2>&5
15637   ac_status=$?
15638   echo "$as_me:15638: \$? = $ac_status" >&5
15639   (exit $ac_status); }; then
15640                         test -n "$verbose" && echo "$as_me:15640: result: ... -$cf_opt" >&5
15641 echo "${ECHO_T}... -$cf_opt" >&6
15642                         case $cf_opt in
15643                         (Winline)
15644                                 case $GCC_VERSION in
15645                                 ([34].*)
15646                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15647
15648 echo "${as_me:-configure}:15648: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15649
15650                                         continue;;
15651                                 esac
15652                                 ;;
15653                         (Wpointer-arith)
15654                                 case $GCC_VERSION in
15655                                 ([12].*)
15656                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15657
15658 echo "${as_me:-configure}:15658: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15659
15660                                         continue;;
15661                                 esac
15662                                 ;;
15663                         esac
15664                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15665                 fi
15666         done
15667         CFLAGS="$cf_save_CFLAGS"
15668 fi
15669 rm -rf conftest*
15670
15671         if test "x$cf_with_cxx" = xyes ; then
15672
15673 INTEL_CPLUSPLUS=no
15674
15675 if test "$GCC" = yes ; then
15676         case $host_os in
15677         (linux*|gnu*)
15678                 echo "$as_me:15678: checking if this is really Intel C++ compiler" >&5
15679 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15680                 cf_save_CFLAGS="$CXXFLAGS"
15681                 CXXFLAGS="$CXXFLAGS -no-gcc"
15682                 cat >conftest.$ac_ext <<_ACEOF
15683 #line 15683 "configure"
15684 #include "confdefs.h"
15685
15686 int
15687 main (void)
15688 {
15689
15690 #ifdef __INTEL_COMPILER
15691 #else
15692 make an error
15693 #endif
15694
15695   ;
15696   return 0;
15697 }
15698 _ACEOF
15699 rm -f conftest.$ac_objext
15700 if { (eval echo "$as_me:15700: \"$ac_compile\"") >&5
15701   (eval $ac_compile) 2>&5
15702   ac_status=$?
15703   echo "$as_me:15703: \$? = $ac_status" >&5
15704   (exit $ac_status); } &&
15705          { ac_try='test -s conftest.$ac_objext'
15706   { (eval echo "$as_me:15706: \"$ac_try\"") >&5
15707   (eval $ac_try) 2>&5
15708   ac_status=$?
15709   echo "$as_me:15709: \$? = $ac_status" >&5
15710   (exit $ac_status); }; }; then
15711   INTEL_CPLUSPLUS=yes
15712 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15713
15714 else
15715   echo "$as_me: failed program was:" >&5
15716 cat conftest.$ac_ext >&5
15717 fi
15718 rm -f conftest.$ac_objext conftest.$ac_ext
15719                 CXXFLAGS="$cf_save_CFLAGS"
15720                 echo "$as_me:15720: result: $INTEL_CPLUSPLUS" >&5
15721 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15722                 ;;
15723         esac
15724 fi
15725
15726 CLANG_CPLUSPLUS=no
15727
15728 if test "$GCC" = yes ; then
15729         echo "$as_me:15729: checking if this is really Clang C++ compiler" >&5
15730 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15731         cf_save_CFLAGS="$CXXFLAGS"
15732         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15733         cat >conftest.$ac_ext <<_ACEOF
15734 #line 15734 "configure"
15735 #include "confdefs.h"
15736
15737 int
15738 main (void)
15739 {
15740
15741 #ifdef __clang__
15742 #else
15743 make an error
15744 #endif
15745
15746   ;
15747   return 0;
15748 }
15749 _ACEOF
15750 rm -f conftest.$ac_objext
15751 if { (eval echo "$as_me:15751: \"$ac_compile\"") >&5
15752   (eval $ac_compile) 2>&5
15753   ac_status=$?
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit $ac_status); } &&
15756          { ac_try='test -s conftest.$ac_objext'
15757   { (eval echo "$as_me:15757: \"$ac_try\"") >&5
15758   (eval $ac_try) 2>&5
15759   ac_status=$?
15760   echo "$as_me:15760: \$? = $ac_status" >&5
15761   (exit $ac_status); }; }; then
15762   CLANG_CPLUSPLUS=yes
15763 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15764
15765 else
15766   echo "$as_me: failed program was:" >&5
15767 cat conftest.$ac_ext >&5
15768 fi
15769 rm -f conftest.$ac_objext conftest.$ac_ext
15770         CXXFLAGS="$cf_save_CFLAGS"
15771         echo "$as_me:15771: result: $CLANG_CPLUSPLUS" >&5
15772 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15773 fi
15774
15775 ac_ext=cc
15776 ac_cpp='$CXXCPP $CPPFLAGS'
15777 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15778 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15779 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15780 ac_main_return=return
15781
15782 cat > conftest.$ac_ext <<EOF
15783 #line 15783 "configure"
15784 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15785 EOF
15786
15787 if test "$INTEL_CPLUSPLUS" = yes
15788 then
15789 # The "-wdXXX" options suppress warnings:
15790 # remark #1419: external declaration in primary source file
15791 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15792 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15793 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15794 # remark #193: zero used for undefined preprocessing identifier
15795 # remark #593: variable "curs_sb_left_arrow" was set but never used
15796 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15797 # remark #869: parameter "tw" was never referenced
15798 # remark #981: operands are evaluated in unspecified order
15799 # warning #269: invalid format string conversion
15800
15801         { echo "$as_me:15801: checking for $CC warning options..." >&5
15802 echo "$as_me: checking for $CC warning options..." >&6;}
15803         cf_save_CXXFLAGS="$CXXFLAGS"
15804         EXTRA_CXXFLAGS="-Wall"
15805         for cf_opt in \
15806                 wd1419 \
15807                 wd1682 \
15808                 wd1683 \
15809                 wd1684 \
15810                 wd193 \
15811                 wd279 \
15812                 wd593 \
15813                 wd810 \
15814                 wd869 \
15815                 wd981
15816         do
15817                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15818                 if { (eval echo "$as_me:15818: \"$ac_compile\"") >&5
15819   (eval $ac_compile) 2>&5
15820   ac_status=$?
15821   echo "$as_me:15821: \$? = $ac_status" >&5
15822   (exit $ac_status); }; then
15823                         test -n "$verbose" && echo "$as_me:15823: result: ... -$cf_opt" >&5
15824 echo "${ECHO_T}... -$cf_opt" >&6
15825                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15826                 fi
15827         done
15828         CXXFLAGS="$cf_save_CXXFLAGS"
15829
15830 elif test "$GXX" = yes
15831 then
15832         { echo "$as_me:15832: checking for $CXX warning options..." >&5
15833 echo "$as_me: checking for $CXX warning options..." >&6;}
15834         cf_save_CXXFLAGS="$CXXFLAGS"
15835         EXTRA_CXXFLAGS="-W -Wall"
15836         cf_gxx_extra_warnings=""
15837         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15838         case "$GCC_VERSION" in
15839         ([1-2].*)
15840                 ;;
15841         (*)
15842                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15843                 ;;
15844         esac
15845         for cf_opt in \
15846                 Wabi \
15847                 fabi-version=0 \
15848                 Wextra \
15849                 Wignored-qualifiers \
15850                 Wlogical-op \
15851                 Woverloaded-virtual \
15852                 Wsign-promo \
15853                 Wsynth \
15854                 Wold-style-cast \
15855                 Wcast-align \
15856                 Wcast-qual \
15857                 Wpointer-arith \
15858                 Wshadow \
15859                 Wundef $cf_gxx_extra_warnings Wno-unused
15860         do
15861                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15862                 if { (eval echo "$as_me:15862: \"$ac_compile\"") >&5
15863   (eval $ac_compile) 2>&5
15864   ac_status=$?
15865   echo "$as_me:15865: \$? = $ac_status" >&5
15866   (exit $ac_status); }; then
15867                         test -n "$verbose" && echo "$as_me:15867: result: ... -$cf_opt" >&5
15868 echo "${ECHO_T}... -$cf_opt" >&6
15869                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15870                 else
15871                         test -n "$verbose" && echo "$as_me:15871: result: ... no -$cf_opt" >&5
15872 echo "${ECHO_T}... no -$cf_opt" >&6
15873                 fi
15874         done
15875         CXXFLAGS="$cf_save_CXXFLAGS"
15876 fi
15877
15878 rm -rf conftest*
15879 ac_ext=c
15880 ac_cpp='$CPP $CPPFLAGS'
15881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15884 ac_main_return=return
15885
15886         fi
15887 fi
15888
15889 if test "$GCC" = yes
15890 then
15891 cat > conftest.i <<EOF
15892 #ifndef GCC_PRINTF
15893 #define GCC_PRINTF 0
15894 #endif
15895 #ifndef GCC_SCANF
15896 #define GCC_SCANF 0
15897 #endif
15898 #ifndef GCC_NORETURN
15899 #define GCC_NORETURN /* nothing */
15900 #endif
15901 #ifndef GCC_UNUSED
15902 #define GCC_UNUSED /* nothing */
15903 #endif
15904 EOF
15905 if test "$GCC" = yes
15906 then
15907         { echo "$as_me:15907: checking for $CC __attribute__ directives..." >&5
15908 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15909 cat > conftest.$ac_ext <<EOF
15910 #line 15910 "${as_me:-configure}"
15911 #include "confdefs.h"
15912 #include "conftest.h"
15913 #include "conftest.i"
15914 #if     GCC_PRINTF
15915 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15916 #else
15917 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15918 #endif
15919 #if     GCC_SCANF
15920 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15921 #else
15922 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15923 #endif
15924 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15925 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15926 extern void foo(void) GCC_NORETURN;
15927 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15928 EOF
15929         cf_printf_attribute=no
15930         cf_scanf_attribute=no
15931         for cf_attribute in scanf printf unused noreturn
15932         do
15933
15934 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15935
15936                 cf_directive="__attribute__(($cf_attribute))"
15937                 echo "checking for $CC $cf_directive" 1>&5
15938
15939                 case $cf_attribute in
15940                 (printf)
15941                         cf_printf_attribute=yes
15942                         cat >conftest.h <<EOF
15943 #define GCC_$cf_ATTRIBUTE 1
15944 EOF
15945                         ;;
15946                 (scanf)
15947                         cf_scanf_attribute=yes
15948                         cat >conftest.h <<EOF
15949 #define GCC_$cf_ATTRIBUTE 1
15950 EOF
15951                         ;;
15952                 (*)
15953                         cat >conftest.h <<EOF
15954 #define GCC_$cf_ATTRIBUTE $cf_directive
15955 EOF
15956                         ;;
15957                 esac
15958
15959                 if { (eval echo "$as_me:15959: \"$ac_compile\"") >&5
15960   (eval $ac_compile) 2>&5
15961   ac_status=$?
15962   echo "$as_me:15962: \$? = $ac_status" >&5
15963   (exit $ac_status); }; then
15964                         test -n "$verbose" && echo "$as_me:15964: result: ... $cf_attribute" >&5
15965 echo "${ECHO_T}... $cf_attribute" >&6
15966                         cat conftest.h >>confdefs.h
15967                         case $cf_attribute in
15968                         (noreturn)
15969
15970 cat >>confdefs.h <<EOF
15971 #define GCC_NORETURN $cf_directive
15972 EOF
15973
15974                                 ;;
15975                         (printf)
15976                                 cf_value='/* nothing */'
15977                                 if test "$cf_printf_attribute" != no ; then
15978                                         cf_value='__attribute__((format(printf,fmt,var)))'
15979
15980 cat >>confdefs.h <<\EOF
15981 #define GCC_PRINTF 1
15982 EOF
15983
15984                                 fi
15985
15986 cat >>confdefs.h <<EOF
15987 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15988 EOF
15989
15990                                 ;;
15991                         (scanf)
15992                                 cf_value='/* nothing */'
15993                                 if test "$cf_scanf_attribute" != no ; then
15994                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15995
15996 cat >>confdefs.h <<\EOF
15997 #define GCC_SCANF 1
15998 EOF
15999
16000                                 fi
16001
16002 cat >>confdefs.h <<EOF
16003 #define GCC_SCANFLIKE(fmt,var) $cf_value
16004 EOF
16005
16006                                 ;;
16007                         (unused)
16008
16009 cat >>confdefs.h <<EOF
16010 #define GCC_UNUSED $cf_directive
16011 EOF
16012
16013                                 ;;
16014                         esac
16015                 fi
16016         done
16017 else
16018         fgrep define conftest.i >>confdefs.h
16019 fi
16020 rm -rf conftest*
16021 fi
16022
16023 echo "$as_me:16023: checking if you want to work around bogus compiler/loader warnings" >&5
16024 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16025
16026 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16027 if test "${enable_string_hacks+set}" = set; then
16028   enableval="$enable_string_hacks"
16029   with_string_hacks=$enableval
16030 else
16031   with_string_hacks=no
16032 fi;
16033 echo "$as_me:16033: result: $with_string_hacks" >&5
16034 echo "${ECHO_T}$with_string_hacks" >&6
16035
16036 if test "x$with_string_hacks" = "xyes"; then
16037
16038 cat >>confdefs.h <<\EOF
16039 #define USE_STRING_HACKS 1
16040 EOF
16041
16042         { echo "$as_me:16042: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16043 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16044         echo "$as_me:16044: checking for strlcat" >&5
16045 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16046 if test "${ac_cv_func_strlcat+set}" = set; then
16047   echo $ECHO_N "(cached) $ECHO_C" >&6
16048 else
16049   cat >conftest.$ac_ext <<_ACEOF
16050 #line 16050 "configure"
16051 #include "confdefs.h"
16052 #define strlcat autoconf_temporary
16053 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16054 #undef strlcat
16055
16056 #ifdef __cplusplus
16057 extern "C"
16058 #endif
16059
16060 /* We use char because int might match the return type of a gcc2
16061    builtin and then its argument prototype would still apply.  */
16062 char strlcat (void);
16063
16064 int
16065 main (void)
16066 {
16067
16068 /* The GNU C library defines stubs for functions which it implements
16069     to always fail with ENOSYS.  Some functions are actually named
16070     something starting with __ and the normal name is an alias.  */
16071 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16072 #error found stub for strlcat
16073 #endif
16074
16075         return strlcat ();
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 rm -f conftest.$ac_objext conftest$ac_exeext
16081 if { (eval echo "$as_me:16081: \"$ac_link\"") >&5
16082   (eval $ac_link) 2>&5
16083   ac_status=$?
16084   echo "$as_me:16084: \$? = $ac_status" >&5
16085   (exit $ac_status); } &&
16086          { ac_try='test -s conftest$ac_exeext'
16087   { (eval echo "$as_me:16087: \"$ac_try\"") >&5
16088   (eval $ac_try) 2>&5
16089   ac_status=$?
16090   echo "$as_me:16090: \$? = $ac_status" >&5
16091   (exit $ac_status); }; }; then
16092   ac_cv_func_strlcat=yes
16093 else
16094   echo "$as_me: failed program was:" >&5
16095 cat conftest.$ac_ext >&5
16096 ac_cv_func_strlcat=no
16097 fi
16098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16099 fi
16100 echo "$as_me:16100: result: $ac_cv_func_strlcat" >&5
16101 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16102 if test $ac_cv_func_strlcat = yes; then
16103
16104 cat >>confdefs.h <<\EOF
16105 #define HAVE_STRLCAT 1
16106 EOF
16107
16108 else
16109
16110                 echo "$as_me:16110: checking for strlcat in -lbsd" >&5
16111 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16112 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16113   echo $ECHO_N "(cached) $ECHO_C" >&6
16114 else
16115   ac_check_lib_save_LIBS=$LIBS
16116 LIBS="-lbsd  $LIBS"
16117 cat >conftest.$ac_ext <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120
16121 /* Override any gcc2 internal prototype to avoid an error.  */
16122 #ifdef __cplusplus
16123 extern "C"
16124 #endif
16125 /* We use char because int might match the return type of a gcc2
16126    builtin and then its argument prototype would still apply.  */
16127 char strlcat ();
16128 int
16129 main (void)
16130 {
16131 strlcat ();
16132   ;
16133   return 0;
16134 }
16135 _ACEOF
16136 rm -f conftest.$ac_objext conftest$ac_exeext
16137 if { (eval echo "$as_me:16137: \"$ac_link\"") >&5
16138   (eval $ac_link) 2>&5
16139   ac_status=$?
16140   echo "$as_me:16140: \$? = $ac_status" >&5
16141   (exit $ac_status); } &&
16142          { ac_try='test -s conftest$ac_exeext'
16143   { (eval echo "$as_me:16143: \"$ac_try\"") >&5
16144   (eval $ac_try) 2>&5
16145   ac_status=$?
16146   echo "$as_me:16146: \$? = $ac_status" >&5
16147   (exit $ac_status); }; }; then
16148   ac_cv_lib_bsd_strlcat=yes
16149 else
16150   echo "$as_me: failed program was:" >&5
16151 cat conftest.$ac_ext >&5
16152 ac_cv_lib_bsd_strlcat=no
16153 fi
16154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16155 LIBS=$ac_check_lib_save_LIBS
16156 fi
16157 echo "$as_me:16157: result: $ac_cv_lib_bsd_strlcat" >&5
16158 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16159 if test $ac_cv_lib_bsd_strlcat = yes; then
16160
16161 cf_add_libs="$LIBS"
16162 # reverse order
16163 cf_add_0lib=
16164 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16165 # filter duplicates
16166 for cf_add_1lib in $cf_add_0lib; do
16167         for cf_add_2lib in $cf_add_libs; do
16168                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16169                         cf_add_1lib=
16170                         break
16171                 fi
16172         done
16173         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16174 done
16175 LIBS="$cf_add_libs"
16176
16177 for ac_header in bsd/string.h
16178 do
16179 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16180 echo "$as_me:16180: checking for $ac_header" >&5
16181 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16182 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16183   echo $ECHO_N "(cached) $ECHO_C" >&6
16184 else
16185   cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188 #include <$ac_header>
16189 _ACEOF
16190 if { (eval echo "$as_me:16190: \"$ac_cpp conftest.$ac_ext\"") >&5
16191   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16192   ac_status=$?
16193   egrep -v '^ *\+' conftest.er1 >conftest.err
16194   rm -f conftest.er1
16195   cat conftest.err >&5
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit $ac_status); } >/dev/null; then
16198   if test -s conftest.err; then
16199     ac_cpp_err=$ac_c_preproc_warn_flag
16200   else
16201     ac_cpp_err=
16202   fi
16203 else
16204   ac_cpp_err=yes
16205 fi
16206 if test -z "$ac_cpp_err"; then
16207   eval "$as_ac_Header=yes"
16208 else
16209   echo "$as_me: failed program was:" >&5
16210   cat conftest.$ac_ext >&5
16211   eval "$as_ac_Header=no"
16212 fi
16213 rm -f conftest.err conftest.$ac_ext
16214 fi
16215 echo "$as_me:16215: result: `eval echo '${'$as_ac_Header'}'`" >&5
16216 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16217 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16218   cat >>confdefs.h <<EOF
16219 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16220 EOF
16221
16222 fi
16223 done
16224
16225 cat >>confdefs.h <<\EOF
16226 #define HAVE_STRLCAT 1
16227 EOF
16228
16229 fi
16230
16231 fi
16232
16233 for ac_func in strlcpy snprintf
16234 do
16235 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16236 echo "$as_me:16236: checking for $ac_func" >&5
16237 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16238 if eval "test \"\${$as_ac_var+set}\" = set"; then
16239   echo $ECHO_N "(cached) $ECHO_C" >&6
16240 else
16241   cat >conftest.$ac_ext <<_ACEOF
16242 #line 16242 "configure"
16243 #include "confdefs.h"
16244 #define $ac_func autoconf_temporary
16245 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16246 #undef $ac_func
16247
16248 #ifdef __cplusplus
16249 extern "C"
16250 #endif
16251
16252 /* We use char because int might match the return type of a gcc2
16253    builtin and then its argument prototype would still apply.  */
16254 char $ac_func (void);
16255
16256 int
16257 main (void)
16258 {
16259
16260 /* The GNU C library defines stubs for functions which it implements
16261     to always fail with ENOSYS.  Some functions are actually named
16262     something starting with __ and the normal name is an alias.  */
16263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16264 #error found stub for $ac_func
16265 #endif
16266
16267         return $ac_func ();
16268   ;
16269   return 0;
16270 }
16271 _ACEOF
16272 rm -f conftest.$ac_objext conftest$ac_exeext
16273 if { (eval echo "$as_me:16273: \"$ac_link\"") >&5
16274   (eval $ac_link) 2>&5
16275   ac_status=$?
16276   echo "$as_me:16276: \$? = $ac_status" >&5
16277   (exit $ac_status); } &&
16278          { ac_try='test -s conftest$ac_exeext'
16279   { (eval echo "$as_me:16279: \"$ac_try\"") >&5
16280   (eval $ac_try) 2>&5
16281   ac_status=$?
16282   echo "$as_me:16282: \$? = $ac_status" >&5
16283   (exit $ac_status); }; }; then
16284   eval "$as_ac_var=yes"
16285 else
16286   echo "$as_me: failed program was:" >&5
16287 cat conftest.$ac_ext >&5
16288 eval "$as_ac_var=no"
16289 fi
16290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16291 fi
16292 echo "$as_me:16292: result: `eval echo '${'$as_ac_var'}'`" >&5
16293 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16294 if test `eval echo '${'$as_ac_var'}'` = yes; then
16295   cat >>confdefs.h <<EOF
16296 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16297 EOF
16298
16299 fi
16300 done
16301
16302 fi
16303
16304 ###     use option --enable-assertions to turn on generation of assertion code
16305 echo "$as_me:16305: checking if you want to enable runtime assertions" >&5
16306 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16307
16308 # Check whether --enable-assertions or --disable-assertions was given.
16309 if test "${enable_assertions+set}" = set; then
16310   enableval="$enable_assertions"
16311   with_assertions=$enableval
16312 else
16313   with_assertions=no
16314 fi;
16315 echo "$as_me:16315: result: $with_assertions" >&5
16316 echo "${ECHO_T}$with_assertions" >&6
16317 if test -n "$GCC"
16318 then
16319         if test "$with_assertions" = no
16320         then
16321                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16322         else
16323
16324         ADAFLAGS="$ADAFLAGS -gnata"
16325
16326         fi
16327 fi
16328
16329 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16330
16331 echo "$as_me:16331: checking if you want to use dmalloc for testing" >&5
16332 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16333
16334 # Check whether --with-dmalloc or --without-dmalloc was given.
16335 if test "${with_dmalloc+set}" = set; then
16336   withval="$with_dmalloc"
16337
16338 cat >>confdefs.h <<EOF
16339 #define USE_DMALLOC 1
16340 EOF
16341
16342         : ${with_cflags:=-g}
16343         : ${with_no_leaks:=yes}
16344          with_dmalloc=yes
16345 else
16346   with_dmalloc=
16347 fi;
16348 echo "$as_me:16348: result: ${with_dmalloc:-no}" >&5
16349 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16350
16351 case .$with_cflags in
16352 (.*-g*)
16353         case .$CFLAGS in
16354         (.*-g*)
16355                 ;;
16356         (*)
16357
16358 cf_fix_cppflags=no
16359 cf_new_cflags=
16360 cf_new_cppflags=
16361 cf_new_extra_cppflags=
16362
16363 for cf_add_cflags in -g
16364 do
16365 case $cf_fix_cppflags in
16366 (no)
16367         case $cf_add_cflags in
16368         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16369                 case $cf_add_cflags in
16370                 (-D*)
16371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16372
16373                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16374                                 && test -z "${cf_tst_cflags}" \
16375                                 && cf_fix_cppflags=yes
16376
16377                         if test $cf_fix_cppflags = yes ; then
16378
16379         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16380         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16381
16382                                 continue
16383                         elif test "${cf_tst_cflags}" = "\"'" ; then
16384
16385         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16386         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16387
16388                                 continue
16389                         fi
16390                         ;;
16391                 esac
16392                 case "$CPPFLAGS" in
16393                 (*$cf_add_cflags)
16394                         ;;
16395                 (*)
16396                         case $cf_add_cflags in
16397                         (-D*)
16398                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16399
16400 CPPFLAGS=`echo "$CPPFLAGS" | \
16401         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16402                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16403
16404                                 ;;
16405                         esac
16406
16407         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16408         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16409
16410                         ;;
16411                 esac
16412                 ;;
16413         (*)
16414
16415         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16416         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16417
16418                 ;;
16419         esac
16420         ;;
16421 (yes)
16422
16423         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16424         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16425
16426         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16427
16428         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16429                 && test -z "${cf_tst_cflags}" \
16430                 && cf_fix_cppflags=no
16431         ;;
16432 esac
16433 done
16434
16435 if test -n "$cf_new_cflags" ; then
16436
16437         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16438         CFLAGS="${CFLAGS}$cf_new_cflags"
16439
16440 fi
16441
16442 if test -n "$cf_new_cppflags" ; then
16443
16444         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16445         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16446
16447 fi
16448
16449 if test -n "$cf_new_extra_cppflags" ; then
16450
16451         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16452         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16453
16454 fi
16455
16456                 ;;
16457         esac
16458         ;;
16459 esac
16460
16461 if test "$with_dmalloc" = yes ; then
16462         echo "$as_me:16462: checking for dmalloc.h" >&5
16463 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16464 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16465   echo $ECHO_N "(cached) $ECHO_C" >&6
16466 else
16467   cat >conftest.$ac_ext <<_ACEOF
16468 #line 16468 "configure"
16469 #include "confdefs.h"
16470 #include <dmalloc.h>
16471 _ACEOF
16472 if { (eval echo "$as_me:16472: \"$ac_cpp conftest.$ac_ext\"") >&5
16473   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16474   ac_status=$?
16475   egrep -v '^ *\+' conftest.er1 >conftest.err
16476   rm -f conftest.er1
16477   cat conftest.err >&5
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); } >/dev/null; then
16480   if test -s conftest.err; then
16481     ac_cpp_err=$ac_c_preproc_warn_flag
16482   else
16483     ac_cpp_err=
16484   fi
16485 else
16486   ac_cpp_err=yes
16487 fi
16488 if test -z "$ac_cpp_err"; then
16489   ac_cv_header_dmalloc_h=yes
16490 else
16491   echo "$as_me: failed program was:" >&5
16492   cat conftest.$ac_ext >&5
16493   ac_cv_header_dmalloc_h=no
16494 fi
16495 rm -f conftest.err conftest.$ac_ext
16496 fi
16497 echo "$as_me:16497: result: $ac_cv_header_dmalloc_h" >&5
16498 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16499 if test $ac_cv_header_dmalloc_h = yes; then
16500
16501 echo "$as_me:16501: checking for dmalloc_debug in -ldmalloc" >&5
16502 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16503 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16504   echo $ECHO_N "(cached) $ECHO_C" >&6
16505 else
16506   ac_check_lib_save_LIBS=$LIBS
16507 LIBS="-ldmalloc  $LIBS"
16508 cat >conftest.$ac_ext <<_ACEOF
16509 #line 16509 "configure"
16510 #include "confdefs.h"
16511
16512 /* Override any gcc2 internal prototype to avoid an error.  */
16513 #ifdef __cplusplus
16514 extern "C"
16515 #endif
16516 /* We use char because int might match the return type of a gcc2
16517    builtin and then its argument prototype would still apply.  */
16518 char dmalloc_debug ();
16519 int
16520 main (void)
16521 {
16522 dmalloc_debug ();
16523   ;
16524   return 0;
16525 }
16526 _ACEOF
16527 rm -f conftest.$ac_objext conftest$ac_exeext
16528 if { (eval echo "$as_me:16528: \"$ac_link\"") >&5
16529   (eval $ac_link) 2>&5
16530   ac_status=$?
16531   echo "$as_me:16531: \$? = $ac_status" >&5
16532   (exit $ac_status); } &&
16533          { ac_try='test -s conftest$ac_exeext'
16534   { (eval echo "$as_me:16534: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:16537: \$? = $ac_status" >&5
16538   (exit $ac_status); }; }; then
16539   ac_cv_lib_dmalloc_dmalloc_debug=yes
16540 else
16541   echo "$as_me: failed program was:" >&5
16542 cat conftest.$ac_ext >&5
16543 ac_cv_lib_dmalloc_dmalloc_debug=no
16544 fi
16545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16546 LIBS=$ac_check_lib_save_LIBS
16547 fi
16548 echo "$as_me:16548: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16549 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16550 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16551   cat >>confdefs.h <<EOF
16552 #define HAVE_LIBDMALLOC 1
16553 EOF
16554
16555   LIBS="-ldmalloc $LIBS"
16556
16557 fi
16558
16559 fi
16560
16561 fi
16562
16563 echo "$as_me:16563: checking if you want to use dbmalloc for testing" >&5
16564 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16565
16566 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16567 if test "${with_dbmalloc+set}" = set; then
16568   withval="$with_dbmalloc"
16569
16570 cat >>confdefs.h <<EOF
16571 #define USE_DBMALLOC 1
16572 EOF
16573
16574         : ${with_cflags:=-g}
16575         : ${with_no_leaks:=yes}
16576          with_dbmalloc=yes
16577 else
16578   with_dbmalloc=
16579 fi;
16580 echo "$as_me:16580: result: ${with_dbmalloc:-no}" >&5
16581 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16582
16583 case .$with_cflags in
16584 (.*-g*)
16585         case .$CFLAGS in
16586         (.*-g*)
16587                 ;;
16588         (*)
16589
16590 cf_fix_cppflags=no
16591 cf_new_cflags=
16592 cf_new_cppflags=
16593 cf_new_extra_cppflags=
16594
16595 for cf_add_cflags in -g
16596 do
16597 case $cf_fix_cppflags in
16598 (no)
16599         case $cf_add_cflags in
16600         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16601                 case $cf_add_cflags in
16602                 (-D*)
16603                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16604
16605                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16606                                 && test -z "${cf_tst_cflags}" \
16607                                 && cf_fix_cppflags=yes
16608
16609                         if test $cf_fix_cppflags = yes ; then
16610
16611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16613
16614                                 continue
16615                         elif test "${cf_tst_cflags}" = "\"'" ; then
16616
16617         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16618         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16619
16620                                 continue
16621                         fi
16622                         ;;
16623                 esac
16624                 case "$CPPFLAGS" in
16625                 (*$cf_add_cflags)
16626                         ;;
16627                 (*)
16628                         case $cf_add_cflags in
16629                         (-D*)
16630                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16631
16632 CPPFLAGS=`echo "$CPPFLAGS" | \
16633         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16634                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16635
16636                                 ;;
16637                         esac
16638
16639         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16640         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16641
16642                         ;;
16643                 esac
16644                 ;;
16645         (*)
16646
16647         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16648         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16649
16650                 ;;
16651         esac
16652         ;;
16653 (yes)
16654
16655         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16656         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16657
16658         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16659
16660         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16661                 && test -z "${cf_tst_cflags}" \
16662                 && cf_fix_cppflags=no
16663         ;;
16664 esac
16665 done
16666
16667 if test -n "$cf_new_cflags" ; then
16668
16669         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16670         CFLAGS="${CFLAGS}$cf_new_cflags"
16671
16672 fi
16673
16674 if test -n "$cf_new_cppflags" ; then
16675
16676         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16677         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16678
16679 fi
16680
16681 if test -n "$cf_new_extra_cppflags" ; then
16682
16683         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16684         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16685
16686 fi
16687
16688                 ;;
16689         esac
16690         ;;
16691 esac
16692
16693 if test "$with_dbmalloc" = yes ; then
16694         echo "$as_me:16694: checking for dbmalloc.h" >&5
16695 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16696 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16697   echo $ECHO_N "(cached) $ECHO_C" >&6
16698 else
16699   cat >conftest.$ac_ext <<_ACEOF
16700 #line 16700 "configure"
16701 #include "confdefs.h"
16702 #include <dbmalloc.h>
16703 _ACEOF
16704 if { (eval echo "$as_me:16704: \"$ac_cpp conftest.$ac_ext\"") >&5
16705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16706   ac_status=$?
16707   egrep -v '^ *\+' conftest.er1 >conftest.err
16708   rm -f conftest.er1
16709   cat conftest.err >&5
16710   echo "$as_me:16710: \$? = $ac_status" >&5
16711   (exit $ac_status); } >/dev/null; then
16712   if test -s conftest.err; then
16713     ac_cpp_err=$ac_c_preproc_warn_flag
16714   else
16715     ac_cpp_err=
16716   fi
16717 else
16718   ac_cpp_err=yes
16719 fi
16720 if test -z "$ac_cpp_err"; then
16721   ac_cv_header_dbmalloc_h=yes
16722 else
16723   echo "$as_me: failed program was:" >&5
16724   cat conftest.$ac_ext >&5
16725   ac_cv_header_dbmalloc_h=no
16726 fi
16727 rm -f conftest.err conftest.$ac_ext
16728 fi
16729 echo "$as_me:16729: result: $ac_cv_header_dbmalloc_h" >&5
16730 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16731 if test $ac_cv_header_dbmalloc_h = yes; then
16732
16733 echo "$as_me:16733: checking for debug_malloc in -ldbmalloc" >&5
16734 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16735 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16736   echo $ECHO_N "(cached) $ECHO_C" >&6
16737 else
16738   ac_check_lib_save_LIBS=$LIBS
16739 LIBS="-ldbmalloc  $LIBS"
16740 cat >conftest.$ac_ext <<_ACEOF
16741 #line 16741 "configure"
16742 #include "confdefs.h"
16743
16744 /* Override any gcc2 internal prototype to avoid an error.  */
16745 #ifdef __cplusplus
16746 extern "C"
16747 #endif
16748 /* We use char because int might match the return type of a gcc2
16749    builtin and then its argument prototype would still apply.  */
16750 char debug_malloc ();
16751 int
16752 main (void)
16753 {
16754 debug_malloc ();
16755   ;
16756   return 0;
16757 }
16758 _ACEOF
16759 rm -f conftest.$ac_objext conftest$ac_exeext
16760 if { (eval echo "$as_me:16760: \"$ac_link\"") >&5
16761   (eval $ac_link) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit $ac_status); } &&
16765          { ac_try='test -s conftest$ac_exeext'
16766   { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767   (eval $ac_try) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit $ac_status); }; }; then
16771   ac_cv_lib_dbmalloc_debug_malloc=yes
16772 else
16773   echo "$as_me: failed program was:" >&5
16774 cat conftest.$ac_ext >&5
16775 ac_cv_lib_dbmalloc_debug_malloc=no
16776 fi
16777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16778 LIBS=$ac_check_lib_save_LIBS
16779 fi
16780 echo "$as_me:16780: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16781 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16782 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16783   cat >>confdefs.h <<EOF
16784 #define HAVE_LIBDBMALLOC 1
16785 EOF
16786
16787   LIBS="-ldbmalloc $LIBS"
16788
16789 fi
16790
16791 fi
16792
16793 fi
16794
16795 echo "$as_me:16795: checking if you want to use valgrind for testing" >&5
16796 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16797
16798 # Check whether --with-valgrind or --without-valgrind was given.
16799 if test "${with_valgrind+set}" = set; then
16800   withval="$with_valgrind"
16801
16802 cat >>confdefs.h <<EOF
16803 #define USE_VALGRIND 1
16804 EOF
16805
16806         : ${with_cflags:=-g}
16807         : ${with_no_leaks:=yes}
16808          with_valgrind=yes
16809 else
16810   with_valgrind=
16811 fi;
16812 echo "$as_me:16812: result: ${with_valgrind:-no}" >&5
16813 echo "${ECHO_T}${with_valgrind:-no}" >&6
16814
16815 case .$with_cflags in
16816 (.*-g*)
16817         case .$CFLAGS in
16818         (.*-g*)
16819                 ;;
16820         (*)
16821
16822 cf_fix_cppflags=no
16823 cf_new_cflags=
16824 cf_new_cppflags=
16825 cf_new_extra_cppflags=
16826
16827 for cf_add_cflags in -g
16828 do
16829 case $cf_fix_cppflags in
16830 (no)
16831         case $cf_add_cflags in
16832         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16833                 case $cf_add_cflags in
16834                 (-D*)
16835                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16836
16837                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16838                                 && test -z "${cf_tst_cflags}" \
16839                                 && cf_fix_cppflags=yes
16840
16841                         if test $cf_fix_cppflags = yes ; then
16842
16843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16845
16846                                 continue
16847                         elif test "${cf_tst_cflags}" = "\"'" ; then
16848
16849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16851
16852                                 continue
16853                         fi
16854                         ;;
16855                 esac
16856                 case "$CPPFLAGS" in
16857                 (*$cf_add_cflags)
16858                         ;;
16859                 (*)
16860                         case $cf_add_cflags in
16861                         (-D*)
16862                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16863
16864 CPPFLAGS=`echo "$CPPFLAGS" | \
16865         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16866                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16867
16868                                 ;;
16869                         esac
16870
16871         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16872         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16873
16874                         ;;
16875                 esac
16876                 ;;
16877         (*)
16878
16879         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16880         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16881
16882                 ;;
16883         esac
16884         ;;
16885 (yes)
16886
16887         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16888         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16889
16890         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16891
16892         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16893                 && test -z "${cf_tst_cflags}" \
16894                 && cf_fix_cppflags=no
16895         ;;
16896 esac
16897 done
16898
16899 if test -n "$cf_new_cflags" ; then
16900
16901         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16902         CFLAGS="${CFLAGS}$cf_new_cflags"
16903
16904 fi
16905
16906 if test -n "$cf_new_cppflags" ; then
16907
16908         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16909         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16910
16911 fi
16912
16913 if test -n "$cf_new_extra_cppflags" ; then
16914
16915         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16916         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16917
16918 fi
16919
16920                 ;;
16921         esac
16922         ;;
16923 esac
16924
16925 echo "$as_me:16925: checking if you want to perform memory-leak testing" >&5
16926 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16927
16928 # Check whether --enable-leaks or --disable-leaks was given.
16929 if test "${enable_leaks+set}" = set; then
16930   enableval="$enable_leaks"
16931   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16932 else
16933   : ${with_no_leaks:=no}
16934 fi;
16935 echo "$as_me:16935: result: $with_no_leaks" >&5
16936 echo "${ECHO_T}$with_no_leaks" >&6
16937
16938 if test "$with_no_leaks" = yes ; then
16939
16940 cat >>confdefs.h <<\EOF
16941 #define NO_LEAKS 1
16942 EOF
16943
16944 cat >>confdefs.h <<\EOF
16945 #define YY_NO_LEAKS 1
16946 EOF
16947
16948 fi
16949
16950 cat >>confdefs.h <<\EOF
16951 #define HAVE_NC_ALLOC_H 1
16952 EOF
16953
16954 ###     use option --enable-expanded to generate certain macros as functions
16955
16956 # Check whether --enable-expanded or --disable-expanded was given.
16957 if test "${enable_expanded+set}" = set; then
16958   enableval="$enable_expanded"
16959   test "x$enableval" = xyes &&
16960 cat >>confdefs.h <<\EOF
16961 #define NCURSES_EXPANDED 1
16962 EOF
16963
16964 fi;
16965
16966 ###     use option --disable-macros to suppress macros in favor of functions
16967
16968 # Check whether --enable-macros or --disable-macros was given.
16969 if test "${enable_macros+set}" = set; then
16970   enableval="$enable_macros"
16971   test "$enableval" = no &&
16972 cat >>confdefs.h <<\EOF
16973 #define NCURSES_NOMACROS 1
16974 EOF
16975
16976 fi;
16977
16978 # Normally we only add trace() to the debug-library.  Allow this to be
16979 # extended to all models of the ncurses library:
16980 cf_all_traces=no
16981 case "$CFLAGS $CPPFLAGS" in
16982 (*-DTRACE*)
16983         cf_all_traces=yes
16984         ;;
16985 esac
16986
16987 echo "$as_me:16987: checking whether to add trace feature to all models" >&5
16988 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16989
16990 # Check whether --with-trace or --without-trace was given.
16991 if test "${with_trace+set}" = set; then
16992   withval="$with_trace"
16993   cf_with_trace=$withval
16994 else
16995   cf_with_trace=$cf_all_traces
16996 fi;
16997 echo "$as_me:16997: result: $cf_with_trace" >&5
16998 echo "${ECHO_T}$cf_with_trace" >&6
16999
17000 if test "x$cf_with_trace" = xyes ; then
17001         LIB_TRACING=all
17002         ADA_TRACE=TRUE
17003
17004 cf_fix_cppflags=no
17005 cf_new_cflags=
17006 cf_new_cppflags=
17007 cf_new_extra_cppflags=
17008
17009 for cf_add_cflags in -DTRACE
17010 do
17011 case $cf_fix_cppflags in
17012 (no)
17013         case $cf_add_cflags in
17014         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17015                 case $cf_add_cflags in
17016                 (-D*)
17017                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17018
17019                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17020                                 && test -z "${cf_tst_cflags}" \
17021                                 && cf_fix_cppflags=yes
17022
17023                         if test $cf_fix_cppflags = yes ; then
17024
17025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17027
17028                                 continue
17029                         elif test "${cf_tst_cflags}" = "\"'" ; then
17030
17031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17033
17034                                 continue
17035                         fi
17036                         ;;
17037                 esac
17038                 case "$CPPFLAGS" in
17039                 (*$cf_add_cflags)
17040                         ;;
17041                 (*)
17042                         case $cf_add_cflags in
17043                         (-D*)
17044                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17045
17046 CPPFLAGS=`echo "$CPPFLAGS" | \
17047         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17048                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17049
17050                                 ;;
17051                         esac
17052
17053         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17054         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17055
17056                         ;;
17057                 esac
17058                 ;;
17059         (*)
17060
17061         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17062         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17063
17064                 ;;
17065         esac
17066         ;;
17067 (yes)
17068
17069         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17070         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17071
17072         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17073
17074         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17075                 && test -z "${cf_tst_cflags}" \
17076                 && cf_fix_cppflags=no
17077         ;;
17078 esac
17079 done
17080
17081 if test -n "$cf_new_cflags" ; then
17082
17083         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17084         CFLAGS="${CFLAGS}$cf_new_cflags"
17085
17086 fi
17087
17088 if test -n "$cf_new_cppflags" ; then
17089
17090         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17091         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17092
17093 fi
17094
17095 if test -n "$cf_new_extra_cppflags" ; then
17096
17097         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17098         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17099
17100 fi
17101
17102 cat >>confdefs.h <<\EOF
17103 #define HAVE__TRACEF 1
17104 EOF
17105
17106 else
17107         LIB_TRACING=DEBUG
17108         ADA_TRACE=FALSE
17109 fi
17110
17111 echo "$as_me:17111: checking if we want to use GNAT projects" >&5
17112 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17113
17114 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17115 if test "${enable_gnat_projects+set}" = set; then
17116   enableval="$enable_gnat_projects"
17117   test "$enableval" != no && enableval=yes
17118         if test "$enableval" != "yes" ; then
17119     enable_gnat_projects=no
17120         else
17121                 enable_gnat_projects=yes
17122         fi
17123 else
17124   enableval=yes
17125         enable_gnat_projects=yes
17126
17127 fi;
17128 echo "$as_me:17128: result: $enable_gnat_projects" >&5
17129 echo "${ECHO_T}$enable_gnat_projects" >&6
17130
17131 ###     Checks for libraries.
17132 case $cf_cv_system_name in
17133 (*mingw32*|*mingw64*)
17134         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17135         # Note: WINVER may be a problem with Windows 10
17136         ;;
17137 (*)
17138 echo "$as_me:17138: checking for gettimeofday" >&5
17139 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17140 if test "${ac_cv_func_gettimeofday+set}" = set; then
17141   echo $ECHO_N "(cached) $ECHO_C" >&6
17142 else
17143   cat >conftest.$ac_ext <<_ACEOF
17144 #line 17144 "configure"
17145 #include "confdefs.h"
17146 #define gettimeofday autoconf_temporary
17147 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17148 #undef gettimeofday
17149
17150 #ifdef __cplusplus
17151 extern "C"
17152 #endif
17153
17154 /* We use char because int might match the return type of a gcc2
17155    builtin and then its argument prototype would still apply.  */
17156 char gettimeofday (void);
17157
17158 int
17159 main (void)
17160 {
17161
17162 /* The GNU C library defines stubs for functions which it implements
17163     to always fail with ENOSYS.  Some functions are actually named
17164     something starting with __ and the normal name is an alias.  */
17165 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17166 #error found stub for gettimeofday
17167 #endif
17168
17169         return gettimeofday ();
17170   ;
17171   return 0;
17172 }
17173 _ACEOF
17174 rm -f conftest.$ac_objext conftest$ac_exeext
17175 if { (eval echo "$as_me:17175: \"$ac_link\"") >&5
17176   (eval $ac_link) 2>&5
17177   ac_status=$?
17178   echo "$as_me:17178: \$? = $ac_status" >&5
17179   (exit $ac_status); } &&
17180          { ac_try='test -s conftest$ac_exeext'
17181   { (eval echo "$as_me:17181: \"$ac_try\"") >&5
17182   (eval $ac_try) 2>&5
17183   ac_status=$?
17184   echo "$as_me:17184: \$? = $ac_status" >&5
17185   (exit $ac_status); }; }; then
17186   ac_cv_func_gettimeofday=yes
17187 else
17188   echo "$as_me: failed program was:" >&5
17189 cat conftest.$ac_ext >&5
17190 ac_cv_func_gettimeofday=no
17191 fi
17192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17193 fi
17194 echo "$as_me:17194: result: $ac_cv_func_gettimeofday" >&5
17195 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17196 if test $ac_cv_func_gettimeofday = yes; then
17197
17198 cat >>confdefs.h <<\EOF
17199 #define HAVE_GETTIMEOFDAY 1
17200 EOF
17201
17202 else
17203
17204 echo "$as_me:17204: checking for gettimeofday in -lbsd" >&5
17205 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17206 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17207   echo $ECHO_N "(cached) $ECHO_C" >&6
17208 else
17209   ac_check_lib_save_LIBS=$LIBS
17210 LIBS="-lbsd  $LIBS"
17211 cat >conftest.$ac_ext <<_ACEOF
17212 #line 17212 "configure"
17213 #include "confdefs.h"
17214
17215 /* Override any gcc2 internal prototype to avoid an error.  */
17216 #ifdef __cplusplus
17217 extern "C"
17218 #endif
17219 /* We use char because int might match the return type of a gcc2
17220    builtin and then its argument prototype would still apply.  */
17221 char gettimeofday ();
17222 int
17223 main (void)
17224 {
17225 gettimeofday ();
17226   ;
17227   return 0;
17228 }
17229 _ACEOF
17230 rm -f conftest.$ac_objext conftest$ac_exeext
17231 if { (eval echo "$as_me:17231: \"$ac_link\"") >&5
17232   (eval $ac_link) 2>&5
17233   ac_status=$?
17234   echo "$as_me:17234: \$? = $ac_status" >&5
17235   (exit $ac_status); } &&
17236          { ac_try='test -s conftest$ac_exeext'
17237   { (eval echo "$as_me:17237: \"$ac_try\"") >&5
17238   (eval $ac_try) 2>&5
17239   ac_status=$?
17240   echo "$as_me:17240: \$? = $ac_status" >&5
17241   (exit $ac_status); }; }; then
17242   ac_cv_lib_bsd_gettimeofday=yes
17243 else
17244   echo "$as_me: failed program was:" >&5
17245 cat conftest.$ac_ext >&5
17246 ac_cv_lib_bsd_gettimeofday=no
17247 fi
17248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17249 LIBS=$ac_check_lib_save_LIBS
17250 fi
17251 echo "$as_me:17251: result: $ac_cv_lib_bsd_gettimeofday" >&5
17252 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17253 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17254
17255 cat >>confdefs.h <<\EOF
17256 #define HAVE_GETTIMEOFDAY 1
17257 EOF
17258
17259 cf_add_libs="$LIBS"
17260 # reverse order
17261 cf_add_0lib=
17262 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17263 # filter duplicates
17264 for cf_add_1lib in $cf_add_0lib; do
17265         for cf_add_2lib in $cf_add_libs; do
17266                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17267                         cf_add_1lib=
17268                         break
17269                 fi
17270         done
17271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17272 done
17273 LIBS="$cf_add_libs"
17274
17275 fi
17276
17277 fi
17278         ;;
17279 esac
17280
17281 echo "$as_me:17281: checking if -lm needed for math functions" >&5
17282 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17283 if test "${cf_cv_need_libm+set}" = set; then
17284   echo $ECHO_N "(cached) $ECHO_C" >&6
17285 else
17286
17287         cat >conftest.$ac_ext <<_ACEOF
17288 #line 17288 "configure"
17289 #include "confdefs.h"
17290
17291         #include <stdio.h>
17292         #include <stdlib.h>
17293         #include <math.h>
17294
17295 int
17296 main (void)
17297 {
17298 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17299   ;
17300   return 0;
17301 }
17302 _ACEOF
17303 rm -f conftest.$ac_objext conftest$ac_exeext
17304 if { (eval echo "$as_me:17304: \"$ac_link\"") >&5
17305   (eval $ac_link) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); } &&
17309          { ac_try='test -s conftest$ac_exeext'
17310   { (eval echo "$as_me:17310: \"$ac_try\"") >&5
17311   (eval $ac_try) 2>&5
17312   ac_status=$?
17313   echo "$as_me:17313: \$? = $ac_status" >&5
17314   (exit $ac_status); }; }; then
17315   cf_cv_need_libm=no
17316 else
17317   echo "$as_me: failed program was:" >&5
17318 cat conftest.$ac_ext >&5
17319 cf_cv_need_libm=yes
17320 fi
17321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17322 fi
17323 echo "$as_me:17323: result: $cf_cv_need_libm" >&5
17324 echo "${ECHO_T}$cf_cv_need_libm" >&6
17325 if test "$cf_cv_need_libm" = yes
17326 then
17327 MATH_LIB=-lm
17328 fi
17329
17330 ###     Checks for header files.
17331 echo "$as_me:17331: checking for ANSI C header files" >&5
17332 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17333 if test "${ac_cv_header_stdc+set}" = set; then
17334   echo $ECHO_N "(cached) $ECHO_C" >&6
17335 else
17336   cat >conftest.$ac_ext <<_ACEOF
17337 #line 17337 "configure"
17338 #include "confdefs.h"
17339 #include <stdlib.h>
17340 #include <stdarg.h>
17341 #include <string.h>
17342 #include <float.h>
17343
17344 _ACEOF
17345 if { (eval echo "$as_me:17345: \"$ac_cpp conftest.$ac_ext\"") >&5
17346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17347   ac_status=$?
17348   egrep -v '^ *\+' conftest.er1 >conftest.err
17349   rm -f conftest.er1
17350   cat conftest.err >&5
17351   echo "$as_me:17351: \$? = $ac_status" >&5
17352   (exit $ac_status); } >/dev/null; then
17353   if test -s conftest.err; then
17354     ac_cpp_err=$ac_c_preproc_warn_flag
17355   else
17356     ac_cpp_err=
17357   fi
17358 else
17359   ac_cpp_err=yes
17360 fi
17361 if test -z "$ac_cpp_err"; then
17362   ac_cv_header_stdc=yes
17363 else
17364   echo "$as_me: failed program was:" >&5
17365   cat conftest.$ac_ext >&5
17366   ac_cv_header_stdc=no
17367 fi
17368 rm -f conftest.err conftest.$ac_ext
17369
17370 if test $ac_cv_header_stdc = yes; then
17371   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17372   cat >conftest.$ac_ext <<_ACEOF
17373 #line 17373 "configure"
17374 #include "confdefs.h"
17375 #include <string.h>
17376
17377 _ACEOF
17378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17379   egrep "memchr" >/dev/null 2>&1; then
17380   :
17381 else
17382   ac_cv_header_stdc=no
17383 fi
17384 rm -rf conftest*
17385
17386 fi
17387
17388 if test $ac_cv_header_stdc = yes; then
17389   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17390   cat >conftest.$ac_ext <<_ACEOF
17391 #line 17391 "configure"
17392 #include "confdefs.h"
17393 #include <stdlib.h>
17394
17395 _ACEOF
17396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17397   egrep "free" >/dev/null 2>&1; then
17398   :
17399 else
17400   ac_cv_header_stdc=no
17401 fi
17402 rm -rf conftest*
17403
17404 fi
17405
17406 if test $ac_cv_header_stdc = yes; then
17407   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17408   if test "$cross_compiling" = yes; then
17409   :
17410 else
17411   cat >conftest.$ac_ext <<_ACEOF
17412 #line 17412 "configure"
17413 #include "confdefs.h"
17414 #include <ctype.h>
17415 #if ((' ' & 0x0FF) == 0x020)
17416 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17417 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17418 #else
17419 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17420                      || ('j' <= (c) && (c) <= 'r') \
17421                      || ('s' <= (c) && (c) <= 'z'))
17422 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17423 #endif
17424
17425 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17426 int
17427 main (void)
17428 {
17429   int i;
17430   for (i = 0; i < 256; i++)
17431     if (XOR (islower (i), ISLOWER (i))
17432         || toupper (i) != TOUPPER (i))
17433       $ac_main_return(2);
17434   $ac_main_return (0);
17435 }
17436 _ACEOF
17437 rm -f conftest$ac_exeext
17438 if { (eval echo "$as_me:17438: \"$ac_link\"") >&5
17439   (eval $ac_link) 2>&5
17440   ac_status=$?
17441   echo "$as_me:17441: \$? = $ac_status" >&5
17442   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17443   { (eval echo "$as_me:17443: \"$ac_try\"") >&5
17444   (eval $ac_try) 2>&5
17445   ac_status=$?
17446   echo "$as_me:17446: \$? = $ac_status" >&5
17447   (exit $ac_status); }; }; then
17448   :
17449 else
17450   echo "$as_me: program exited with status $ac_status" >&5
17451 echo "$as_me: failed program was:" >&5
17452 cat conftest.$ac_ext >&5
17453 ac_cv_header_stdc=no
17454 fi
17455 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17456 fi
17457 fi
17458 fi
17459 echo "$as_me:17459: result: $ac_cv_header_stdc" >&5
17460 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17461 if test $ac_cv_header_stdc = yes; then
17462
17463 cat >>confdefs.h <<\EOF
17464 #define STDC_HEADERS 1
17465 EOF
17466
17467 fi
17468
17469 ac_header_dirent=no
17470 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17471   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17472 echo "$as_me:17472: checking for $ac_hdr that defines DIR" >&5
17473 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17475   echo $ECHO_N "(cached) $ECHO_C" >&6
17476 else
17477   cat >conftest.$ac_ext <<_ACEOF
17478 #line 17478 "configure"
17479 #include "confdefs.h"
17480 #include <sys/types.h>
17481 #include <$ac_hdr>
17482
17483 int
17484 main (void)
17485 {
17486 if ((DIR *) 0)
17487 return 0;
17488   ;
17489   return 0;
17490 }
17491 _ACEOF
17492 rm -f conftest.$ac_objext
17493 if { (eval echo "$as_me:17493: \"$ac_compile\"") >&5
17494   (eval $ac_compile) 2>&5
17495   ac_status=$?
17496   echo "$as_me:17496: \$? = $ac_status" >&5
17497   (exit $ac_status); } &&
17498          { ac_try='test -s conftest.$ac_objext'
17499   { (eval echo "$as_me:17499: \"$ac_try\"") >&5
17500   (eval $ac_try) 2>&5
17501   ac_status=$?
17502   echo "$as_me:17502: \$? = $ac_status" >&5
17503   (exit $ac_status); }; }; then
17504   eval "$as_ac_Header=yes"
17505 else
17506   echo "$as_me: failed program was:" >&5
17507 cat conftest.$ac_ext >&5
17508 eval "$as_ac_Header=no"
17509 fi
17510 rm -f conftest.$ac_objext conftest.$ac_ext
17511 fi
17512 echo "$as_me:17512: result: `eval echo '${'$as_ac_Header'}'`" >&5
17513 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17514 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17515   cat >>confdefs.h <<EOF
17516 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17517 EOF
17518
17519 ac_header_dirent=$ac_hdr; break
17520 fi
17521
17522 done
17523 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17524 if test $ac_header_dirent = dirent.h; then
17525   echo "$as_me:17525: checking for opendir in -ldir" >&5
17526 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17527 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17528   echo $ECHO_N "(cached) $ECHO_C" >&6
17529 else
17530   ac_check_lib_save_LIBS=$LIBS
17531 LIBS="-ldir  $LIBS"
17532 cat >conftest.$ac_ext <<_ACEOF
17533 #line 17533 "configure"
17534 #include "confdefs.h"
17535
17536 /* Override any gcc2 internal prototype to avoid an error.  */
17537 #ifdef __cplusplus
17538 extern "C"
17539 #endif
17540 /* We use char because int might match the return type of a gcc2
17541    builtin and then its argument prototype would still apply.  */
17542 char opendir ();
17543 int
17544 main (void)
17545 {
17546 opendir ();
17547   ;
17548   return 0;
17549 }
17550 _ACEOF
17551 rm -f conftest.$ac_objext conftest$ac_exeext
17552 if { (eval echo "$as_me:17552: \"$ac_link\"") >&5
17553   (eval $ac_link) 2>&5
17554   ac_status=$?
17555   echo "$as_me:17555: \$? = $ac_status" >&5
17556   (exit $ac_status); } &&
17557          { ac_try='test -s conftest$ac_exeext'
17558   { (eval echo "$as_me:17558: \"$ac_try\"") >&5
17559   (eval $ac_try) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); }; }; then
17563   ac_cv_lib_dir_opendir=yes
17564 else
17565   echo "$as_me: failed program was:" >&5
17566 cat conftest.$ac_ext >&5
17567 ac_cv_lib_dir_opendir=no
17568 fi
17569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17570 LIBS=$ac_check_lib_save_LIBS
17571 fi
17572 echo "$as_me:17572: result: $ac_cv_lib_dir_opendir" >&5
17573 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17574 if test $ac_cv_lib_dir_opendir = yes; then
17575   LIBS="$LIBS -ldir"
17576 fi
17577
17578 else
17579   echo "$as_me:17579: checking for opendir in -lx" >&5
17580 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17581 if test "${ac_cv_lib_x_opendir+set}" = set; then
17582   echo $ECHO_N "(cached) $ECHO_C" >&6
17583 else
17584   ac_check_lib_save_LIBS=$LIBS
17585 LIBS="-lx  $LIBS"
17586 cat >conftest.$ac_ext <<_ACEOF
17587 #line 17587 "configure"
17588 #include "confdefs.h"
17589
17590 /* Override any gcc2 internal prototype to avoid an error.  */
17591 #ifdef __cplusplus
17592 extern "C"
17593 #endif
17594 /* We use char because int might match the return type of a gcc2
17595    builtin and then its argument prototype would still apply.  */
17596 char opendir ();
17597 int
17598 main (void)
17599 {
17600 opendir ();
17601   ;
17602   return 0;
17603 }
17604 _ACEOF
17605 rm -f conftest.$ac_objext conftest$ac_exeext
17606 if { (eval echo "$as_me:17606: \"$ac_link\"") >&5
17607   (eval $ac_link) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); } &&
17611          { ac_try='test -s conftest$ac_exeext'
17612   { (eval echo "$as_me:17612: \"$ac_try\"") >&5
17613   (eval $ac_try) 2>&5
17614   ac_status=$?
17615   echo "$as_me:17615: \$? = $ac_status" >&5
17616   (exit $ac_status); }; }; then
17617   ac_cv_lib_x_opendir=yes
17618 else
17619   echo "$as_me: failed program was:" >&5
17620 cat conftest.$ac_ext >&5
17621 ac_cv_lib_x_opendir=no
17622 fi
17623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17624 LIBS=$ac_check_lib_save_LIBS
17625 fi
17626 echo "$as_me:17626: result: $ac_cv_lib_x_opendir" >&5
17627 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17628 if test $ac_cv_lib_x_opendir = yes; then
17629   LIBS="$LIBS -lx"
17630 fi
17631
17632 fi
17633
17634 echo "$as_me:17634: checking whether time.h and sys/time.h may both be included" >&5
17635 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17636 if test "${ac_cv_header_time+set}" = set; then
17637   echo $ECHO_N "(cached) $ECHO_C" >&6
17638 else
17639   cat >conftest.$ac_ext <<_ACEOF
17640 #line 17640 "configure"
17641 #include "confdefs.h"
17642 #include <sys/types.h>
17643 #include <sys/time.h>
17644 #include <time.h>
17645
17646 int
17647 main (void)
17648 {
17649 if ((struct tm *) 0)
17650 return 0;
17651   ;
17652   return 0;
17653 }
17654 _ACEOF
17655 rm -f conftest.$ac_objext
17656 if { (eval echo "$as_me:17656: \"$ac_compile\"") >&5
17657   (eval $ac_compile) 2>&5
17658   ac_status=$?
17659   echo "$as_me:17659: \$? = $ac_status" >&5
17660   (exit $ac_status); } &&
17661          { ac_try='test -s conftest.$ac_objext'
17662   { (eval echo "$as_me:17662: \"$ac_try\"") >&5
17663   (eval $ac_try) 2>&5
17664   ac_status=$?
17665   echo "$as_me:17665: \$? = $ac_status" >&5
17666   (exit $ac_status); }; }; then
17667   ac_cv_header_time=yes
17668 else
17669   echo "$as_me: failed program was:" >&5
17670 cat conftest.$ac_ext >&5
17671 ac_cv_header_time=no
17672 fi
17673 rm -f conftest.$ac_objext conftest.$ac_ext
17674 fi
17675 echo "$as_me:17675: result: $ac_cv_header_time" >&5
17676 echo "${ECHO_T}$ac_cv_header_time" >&6
17677 if test $ac_cv_header_time = yes; then
17678
17679 cat >>confdefs.h <<\EOF
17680 #define TIME_WITH_SYS_TIME 1
17681 EOF
17682
17683 fi
17684
17685 cf_regex_func=no
17686
17687 cf_regex_libs="regex re"
17688 case $host_os in
17689 (mingw*)
17690         cf_regex_libs="gnurx $cf_regex_libs"
17691         ;;
17692 esac
17693
17694 echo "$as_me:17694: checking for regcomp" >&5
17695 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17696 if test "${ac_cv_func_regcomp+set}" = set; then
17697   echo $ECHO_N "(cached) $ECHO_C" >&6
17698 else
17699   cat >conftest.$ac_ext <<_ACEOF
17700 #line 17700 "configure"
17701 #include "confdefs.h"
17702 #define regcomp autoconf_temporary
17703 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17704 #undef regcomp
17705
17706 #ifdef __cplusplus
17707 extern "C"
17708 #endif
17709
17710 /* We use char because int might match the return type of a gcc2
17711    builtin and then its argument prototype would still apply.  */
17712 char regcomp (void);
17713
17714 int
17715 main (void)
17716 {
17717
17718 /* The GNU C library defines stubs for functions which it implements
17719     to always fail with ENOSYS.  Some functions are actually named
17720     something starting with __ and the normal name is an alias.  */
17721 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17722 #error found stub for regcomp
17723 #endif
17724
17725         return regcomp ();
17726   ;
17727   return 0;
17728 }
17729 _ACEOF
17730 rm -f conftest.$ac_objext conftest$ac_exeext
17731 if { (eval echo "$as_me:17731: \"$ac_link\"") >&5
17732   (eval $ac_link) 2>&5
17733   ac_status=$?
17734   echo "$as_me:17734: \$? = $ac_status" >&5
17735   (exit $ac_status); } &&
17736          { ac_try='test -s conftest$ac_exeext'
17737   { (eval echo "$as_me:17737: \"$ac_try\"") >&5
17738   (eval $ac_try) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); }; }; then
17742   ac_cv_func_regcomp=yes
17743 else
17744   echo "$as_me: failed program was:" >&5
17745 cat conftest.$ac_ext >&5
17746 ac_cv_func_regcomp=no
17747 fi
17748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17749 fi
17750 echo "$as_me:17750: result: $ac_cv_func_regcomp" >&5
17751 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17752 if test $ac_cv_func_regcomp = yes; then
17753   cf_regex_func=regcomp
17754 else
17755
17756         for cf_regex_lib in $cf_regex_libs
17757         do
17758                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17759 echo "$as_me:17759: checking for regcomp in -l$cf_regex_lib" >&5
17760 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17761 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17762   echo $ECHO_N "(cached) $ECHO_C" >&6
17763 else
17764   ac_check_lib_save_LIBS=$LIBS
17765 LIBS="-l$cf_regex_lib  $LIBS"
17766 cat >conftest.$ac_ext <<_ACEOF
17767 #line 17767 "configure"
17768 #include "confdefs.h"
17769
17770 /* Override any gcc2 internal prototype to avoid an error.  */
17771 #ifdef __cplusplus
17772 extern "C"
17773 #endif
17774 /* We use char because int might match the return type of a gcc2
17775    builtin and then its argument prototype would still apply.  */
17776 char regcomp ();
17777 int
17778 main (void)
17779 {
17780 regcomp ();
17781   ;
17782   return 0;
17783 }
17784 _ACEOF
17785 rm -f conftest.$ac_objext conftest$ac_exeext
17786 if { (eval echo "$as_me:17786: \"$ac_link\"") >&5
17787   (eval $ac_link) 2>&5
17788   ac_status=$?
17789   echo "$as_me:17789: \$? = $ac_status" >&5
17790   (exit $ac_status); } &&
17791          { ac_try='test -s conftest$ac_exeext'
17792   { (eval echo "$as_me:17792: \"$ac_try\"") >&5
17793   (eval $ac_try) 2>&5
17794   ac_status=$?
17795   echo "$as_me:17795: \$? = $ac_status" >&5
17796   (exit $ac_status); }; }; then
17797   eval "$as_ac_Lib=yes"
17798 else
17799   echo "$as_me: failed program was:" >&5
17800 cat conftest.$ac_ext >&5
17801 eval "$as_ac_Lib=no"
17802 fi
17803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17804 LIBS=$ac_check_lib_save_LIBS
17805 fi
17806 echo "$as_me:17806: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17807 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17808 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17809
17810 cf_add_libs="$LIBS"
17811 # reverse order
17812 cf_add_0lib=
17813 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17814 # filter duplicates
17815 for cf_add_1lib in $cf_add_0lib; do
17816         for cf_add_2lib in $cf_add_libs; do
17817                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17818                         cf_add_1lib=
17819                         break
17820                 fi
17821         done
17822         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17823 done
17824 LIBS="$cf_add_libs"
17825
17826                                 cf_regex_func=regcomp
17827                                 break
17828 fi
17829
17830         done
17831
17832 fi
17833
17834 if test "$cf_regex_func" = no ; then
17835         echo "$as_me:17835: checking for compile" >&5
17836 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17837 if test "${ac_cv_func_compile+set}" = set; then
17838   echo $ECHO_N "(cached) $ECHO_C" >&6
17839 else
17840   cat >conftest.$ac_ext <<_ACEOF
17841 #line 17841 "configure"
17842 #include "confdefs.h"
17843 #define compile autoconf_temporary
17844 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17845 #undef compile
17846
17847 #ifdef __cplusplus
17848 extern "C"
17849 #endif
17850
17851 /* We use char because int might match the return type of a gcc2
17852    builtin and then its argument prototype would still apply.  */
17853 char compile (void);
17854
17855 int
17856 main (void)
17857 {
17858
17859 /* The GNU C library defines stubs for functions which it implements
17860     to always fail with ENOSYS.  Some functions are actually named
17861     something starting with __ and the normal name is an alias.  */
17862 #if defined (__stub_compile) || defined (__stub___compile)
17863 #error found stub for compile
17864 #endif
17865
17866         return compile ();
17867   ;
17868   return 0;
17869 }
17870 _ACEOF
17871 rm -f conftest.$ac_objext conftest$ac_exeext
17872 if { (eval echo "$as_me:17872: \"$ac_link\"") >&5
17873   (eval $ac_link) 2>&5
17874   ac_status=$?
17875   echo "$as_me:17875: \$? = $ac_status" >&5
17876   (exit $ac_status); } &&
17877          { ac_try='test -s conftest$ac_exeext'
17878   { (eval echo "$as_me:17878: \"$ac_try\"") >&5
17879   (eval $ac_try) 2>&5
17880   ac_status=$?
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit $ac_status); }; }; then
17883   ac_cv_func_compile=yes
17884 else
17885   echo "$as_me: failed program was:" >&5
17886 cat conftest.$ac_ext >&5
17887 ac_cv_func_compile=no
17888 fi
17889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17890 fi
17891 echo "$as_me:17891: result: $ac_cv_func_compile" >&5
17892 echo "${ECHO_T}$ac_cv_func_compile" >&6
17893 if test $ac_cv_func_compile = yes; then
17894   cf_regex_func=compile
17895 else
17896
17897                 echo "$as_me:17897: checking for compile in -lgen" >&5
17898 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17899 if test "${ac_cv_lib_gen_compile+set}" = set; then
17900   echo $ECHO_N "(cached) $ECHO_C" >&6
17901 else
17902   ac_check_lib_save_LIBS=$LIBS
17903 LIBS="-lgen  $LIBS"
17904 cat >conftest.$ac_ext <<_ACEOF
17905 #line 17905 "configure"
17906 #include "confdefs.h"
17907
17908 /* Override any gcc2 internal prototype to avoid an error.  */
17909 #ifdef __cplusplus
17910 extern "C"
17911 #endif
17912 /* We use char because int might match the return type of a gcc2
17913    builtin and then its argument prototype would still apply.  */
17914 char compile ();
17915 int
17916 main (void)
17917 {
17918 compile ();
17919   ;
17920   return 0;
17921 }
17922 _ACEOF
17923 rm -f conftest.$ac_objext conftest$ac_exeext
17924 if { (eval echo "$as_me:17924: \"$ac_link\"") >&5
17925   (eval $ac_link) 2>&5
17926   ac_status=$?
17927   echo "$as_me:17927: \$? = $ac_status" >&5
17928   (exit $ac_status); } &&
17929          { ac_try='test -s conftest$ac_exeext'
17930   { (eval echo "$as_me:17930: \"$ac_try\"") >&5
17931   (eval $ac_try) 2>&5
17932   ac_status=$?
17933   echo "$as_me:17933: \$? = $ac_status" >&5
17934   (exit $ac_status); }; }; then
17935   ac_cv_lib_gen_compile=yes
17936 else
17937   echo "$as_me: failed program was:" >&5
17938 cat conftest.$ac_ext >&5
17939 ac_cv_lib_gen_compile=no
17940 fi
17941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17942 LIBS=$ac_check_lib_save_LIBS
17943 fi
17944 echo "$as_me:17944: result: $ac_cv_lib_gen_compile" >&5
17945 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17946 if test $ac_cv_lib_gen_compile = yes; then
17947
17948 cf_add_libs="$LIBS"
17949 # reverse order
17950 cf_add_0lib=
17951 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17952 # filter duplicates
17953 for cf_add_1lib in $cf_add_0lib; do
17954         for cf_add_2lib in $cf_add_libs; do
17955                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17956                         cf_add_1lib=
17957                         break
17958                 fi
17959         done
17960         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17961 done
17962 LIBS="$cf_add_libs"
17963
17964                                 cf_regex_func=compile
17965 fi
17966
17967 fi
17968
17969 fi
17970
17971 if test "$cf_regex_func" = no ; then
17972         { echo "$as_me:17972: WARNING: cannot find regular expression library" >&5
17973 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17974 fi
17975
17976 echo "$as_me:17976: checking for regular-expression headers" >&5
17977 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17978 if test "${cf_cv_regex_hdrs+set}" = set; then
17979   echo $ECHO_N "(cached) $ECHO_C" >&6
17980 else
17981
17982 cf_cv_regex_hdrs=no
17983 case $cf_regex_func in
17984 (compile)
17985         for cf_regex_hdr in regexp.h regexpr.h
17986         do
17987                 cat >conftest.$ac_ext <<_ACEOF
17988 #line 17988 "configure"
17989 #include "confdefs.h"
17990 #include <$cf_regex_hdr>
17991 int
17992 main (void)
17993 {
17994
17995                         char *p = compile("", "", "", 0);
17996                         int x = step("", "");
17997
17998   ;
17999   return 0;
18000 }
18001 _ACEOF
18002 rm -f conftest.$ac_objext conftest$ac_exeext
18003 if { (eval echo "$as_me:18003: \"$ac_link\"") >&5
18004   (eval $ac_link) 2>&5
18005   ac_status=$?
18006   echo "$as_me:18006: \$? = $ac_status" >&5
18007   (exit $ac_status); } &&
18008          { ac_try='test -s conftest$ac_exeext'
18009   { (eval echo "$as_me:18009: \"$ac_try\"") >&5
18010   (eval $ac_try) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit $ac_status); }; }; then
18014
18015                         cf_cv_regex_hdrs=$cf_regex_hdr
18016                         break
18017
18018 else
18019   echo "$as_me: failed program was:" >&5
18020 cat conftest.$ac_ext >&5
18021 fi
18022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18023         done
18024         ;;
18025 (*)
18026         for cf_regex_hdr in regex.h
18027         do
18028                 cat >conftest.$ac_ext <<_ACEOF
18029 #line 18029 "configure"
18030 #include "confdefs.h"
18031 #include <sys/types.h>
18032 #include <$cf_regex_hdr>
18033 int
18034 main (void)
18035 {
18036
18037                         regex_t *p;
18038                         int x = regcomp(p, "", 0);
18039                         int y = regexec(p, "", 0, 0, 0);
18040                         regfree(p);
18041
18042   ;
18043   return 0;
18044 }
18045 _ACEOF
18046 rm -f conftest.$ac_objext conftest$ac_exeext
18047 if { (eval echo "$as_me:18047: \"$ac_link\"") >&5
18048   (eval $ac_link) 2>&5
18049   ac_status=$?
18050   echo "$as_me:18050: \$? = $ac_status" >&5
18051   (exit $ac_status); } &&
18052          { ac_try='test -s conftest$ac_exeext'
18053   { (eval echo "$as_me:18053: \"$ac_try\"") >&5
18054   (eval $ac_try) 2>&5
18055   ac_status=$?
18056   echo "$as_me:18056: \$? = $ac_status" >&5
18057   (exit $ac_status); }; }; then
18058
18059                         cf_cv_regex_hdrs=$cf_regex_hdr
18060                         break
18061
18062 else
18063   echo "$as_me: failed program was:" >&5
18064 cat conftest.$ac_ext >&5
18065 fi
18066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18067         done
18068         ;;
18069 esac
18070
18071 fi
18072 echo "$as_me:18072: result: $cf_cv_regex_hdrs" >&5
18073 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18074
18075 case $cf_cv_regex_hdrs in
18076         (no)            { echo "$as_me:18076: WARNING: no regular expression header found" >&5
18077 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18078         (regex.h)
18079 cat >>confdefs.h <<\EOF
18080 #define HAVE_REGEX_H_FUNCS 1
18081 EOF
18082  ;;
18083         (regexp.h)
18084 cat >>confdefs.h <<\EOF
18085 #define HAVE_REGEXP_H_FUNCS 1
18086 EOF
18087  ;;
18088         (regexpr.h)
18089 cat >>confdefs.h <<\EOF
18090 #define HAVE_REGEXPR_H_FUNCS 1
18091 EOF
18092  ;;
18093 esac
18094
18095 for ac_header in \
18096 fcntl.h \
18097 getopt.h \
18098 limits.h \
18099 locale.h \
18100 math.h \
18101 poll.h \
18102 sys/bsdtypes.h \
18103 sys/ioctl.h \
18104 sys/param.h \
18105 sys/poll.h \
18106 sys/select.h \
18107 sys/time.h \
18108 sys/times.h \
18109 ttyent.h \
18110 unistd.h \
18111 wctype.h \
18112
18113 do
18114 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18115 echo "$as_me:18115: checking for $ac_header" >&5
18116 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18118   echo $ECHO_N "(cached) $ECHO_C" >&6
18119 else
18120   cat >conftest.$ac_ext <<_ACEOF
18121 #line 18121 "configure"
18122 #include "confdefs.h"
18123 #include <$ac_header>
18124 _ACEOF
18125 if { (eval echo "$as_me:18125: \"$ac_cpp conftest.$ac_ext\"") >&5
18126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18127   ac_status=$?
18128   egrep -v '^ *\+' conftest.er1 >conftest.err
18129   rm -f conftest.er1
18130   cat conftest.err >&5
18131   echo "$as_me:18131: \$? = $ac_status" >&5
18132   (exit $ac_status); } >/dev/null; then
18133   if test -s conftest.err; then
18134     ac_cpp_err=$ac_c_preproc_warn_flag
18135   else
18136     ac_cpp_err=
18137   fi
18138 else
18139   ac_cpp_err=yes
18140 fi
18141 if test -z "$ac_cpp_err"; then
18142   eval "$as_ac_Header=yes"
18143 else
18144   echo "$as_me: failed program was:" >&5
18145   cat conftest.$ac_ext >&5
18146   eval "$as_ac_Header=no"
18147 fi
18148 rm -f conftest.err conftest.$ac_ext
18149 fi
18150 echo "$as_me:18150: result: `eval echo '${'$as_ac_Header'}'`" >&5
18151 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18152 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18153   cat >>confdefs.h <<EOF
18154 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18155 EOF
18156
18157 fi
18158 done
18159
18160 for ac_header in unistd.h getopt.h
18161 do
18162 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18163 echo "$as_me:18163: checking for $ac_header" >&5
18164 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18165 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18166   echo $ECHO_N "(cached) $ECHO_C" >&6
18167 else
18168   cat >conftest.$ac_ext <<_ACEOF
18169 #line 18169 "configure"
18170 #include "confdefs.h"
18171 #include <$ac_header>
18172 _ACEOF
18173 if { (eval echo "$as_me:18173: \"$ac_cpp conftest.$ac_ext\"") >&5
18174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18175   ac_status=$?
18176   egrep -v '^ *\+' conftest.er1 >conftest.err
18177   rm -f conftest.er1
18178   cat conftest.err >&5
18179   echo "$as_me:18179: \$? = $ac_status" >&5
18180   (exit $ac_status); } >/dev/null; then
18181   if test -s conftest.err; then
18182     ac_cpp_err=$ac_c_preproc_warn_flag
18183   else
18184     ac_cpp_err=
18185   fi
18186 else
18187   ac_cpp_err=yes
18188 fi
18189 if test -z "$ac_cpp_err"; then
18190   eval "$as_ac_Header=yes"
18191 else
18192   echo "$as_me: failed program was:" >&5
18193   cat conftest.$ac_ext >&5
18194   eval "$as_ac_Header=no"
18195 fi
18196 rm -f conftest.err conftest.$ac_ext
18197 fi
18198 echo "$as_me:18198: result: `eval echo '${'$as_ac_Header'}'`" >&5
18199 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18200 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18201   cat >>confdefs.h <<EOF
18202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18203 EOF
18204
18205 fi
18206 done
18207
18208 echo "$as_me:18208: checking for header declaring getopt variables" >&5
18209 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18210 if test "${cf_cv_getopt_header+set}" = set; then
18211   echo $ECHO_N "(cached) $ECHO_C" >&6
18212 else
18213
18214 cf_cv_getopt_header=none
18215 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18216 do
18217 cat >conftest.$ac_ext <<_ACEOF
18218 #line 18218 "configure"
18219 #include "confdefs.h"
18220
18221 #include <$cf_header>
18222 int
18223 main (void)
18224 {
18225 int x = optind; char *y = optarg
18226   ;
18227   return 0;
18228 }
18229 _ACEOF
18230 rm -f conftest.$ac_objext
18231 if { (eval echo "$as_me:18231: \"$ac_compile\"") >&5
18232   (eval $ac_compile) 2>&5
18233   ac_status=$?
18234   echo "$as_me:18234: \$? = $ac_status" >&5
18235   (exit $ac_status); } &&
18236          { ac_try='test -s conftest.$ac_objext'
18237   { (eval echo "$as_me:18237: \"$ac_try\"") >&5
18238   (eval $ac_try) 2>&5
18239   ac_status=$?
18240   echo "$as_me:18240: \$? = $ac_status" >&5
18241   (exit $ac_status); }; }; then
18242   cf_cv_getopt_header=$cf_header
18243  break
18244 else
18245   echo "$as_me: failed program was:" >&5
18246 cat conftest.$ac_ext >&5
18247 fi
18248 rm -f conftest.$ac_objext conftest.$ac_ext
18249 done
18250
18251 fi
18252 echo "$as_me:18252: result: $cf_cv_getopt_header" >&5
18253 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18254 if test $cf_cv_getopt_header != none ; then
18255
18256 cat >>confdefs.h <<\EOF
18257 #define HAVE_GETOPT_HEADER 1
18258 EOF
18259
18260 fi
18261 if test $cf_cv_getopt_header = getopt.h ; then
18262
18263 cat >>confdefs.h <<\EOF
18264 #define NEED_GETOPT_H 1
18265 EOF
18266
18267 fi
18268
18269 echo "$as_me:18269: checking if external environ is declared" >&5
18270 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18271 if test "${cf_cv_dcl_environ+set}" = set; then
18272   echo $ECHO_N "(cached) $ECHO_C" >&6
18273 else
18274
18275     cat >conftest.$ac_ext <<_ACEOF
18276 #line 18276 "configure"
18277 #include "confdefs.h"
18278
18279 #ifdef HAVE_STDLIB_H
18280 #include <stdlib.h>
18281 #endif
18282 #include <unistd.h>
18283 int
18284 main (void)
18285 {
18286 int x = (int) environ
18287   ;
18288   return 0;
18289 }
18290 _ACEOF
18291 rm -f conftest.$ac_objext
18292 if { (eval echo "$as_me:18292: \"$ac_compile\"") >&5
18293   (eval $ac_compile) 2>&5
18294   ac_status=$?
18295   echo "$as_me:18295: \$? = $ac_status" >&5
18296   (exit $ac_status); } &&
18297          { ac_try='test -s conftest.$ac_objext'
18298   { (eval echo "$as_me:18298: \"$ac_try\"") >&5
18299   (eval $ac_try) 2>&5
18300   ac_status=$?
18301   echo "$as_me:18301: \$? = $ac_status" >&5
18302   (exit $ac_status); }; }; then
18303   cf_cv_dcl_environ=yes
18304 else
18305   echo "$as_me: failed program was:" >&5
18306 cat conftest.$ac_ext >&5
18307 cf_cv_dcl_environ=no
18308 fi
18309 rm -f conftest.$ac_objext conftest.$ac_ext
18310
18311 fi
18312 echo "$as_me:18312: result: $cf_cv_dcl_environ" >&5
18313 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18314
18315 if test "$cf_cv_dcl_environ" = no ; then
18316
18317 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18318
18319     cat >>confdefs.h <<EOF
18320 #define $cf_result 1
18321 EOF
18322
18323 fi
18324
18325 # It's possible (for near-UNIX clones) that the data doesn't exist
18326
18327 echo "$as_me:18327: checking if external environ exists" >&5
18328 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18329 if test "${cf_cv_have_environ+set}" = set; then
18330   echo $ECHO_N "(cached) $ECHO_C" >&6
18331 else
18332
18333         cat >conftest.$ac_ext <<_ACEOF
18334 #line 18334 "configure"
18335 #include "confdefs.h"
18336
18337 #undef environ
18338 extern int environ;
18339
18340 int
18341 main (void)
18342 {
18343 environ = 2
18344   ;
18345   return 0;
18346 }
18347 _ACEOF
18348 rm -f conftest.$ac_objext conftest$ac_exeext
18349 if { (eval echo "$as_me:18349: \"$ac_link\"") >&5
18350   (eval $ac_link) 2>&5
18351   ac_status=$?
18352   echo "$as_me:18352: \$? = $ac_status" >&5
18353   (exit $ac_status); } &&
18354          { ac_try='test -s conftest$ac_exeext'
18355   { (eval echo "$as_me:18355: \"$ac_try\"") >&5
18356   (eval $ac_try) 2>&5
18357   ac_status=$?
18358   echo "$as_me:18358: \$? = $ac_status" >&5
18359   (exit $ac_status); }; }; then
18360   cf_cv_have_environ=yes
18361 else
18362   echo "$as_me: failed program was:" >&5
18363 cat conftest.$ac_ext >&5
18364 cf_cv_have_environ=no
18365 fi
18366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18367
18368 fi
18369 echo "$as_me:18369: result: $cf_cv_have_environ" >&5
18370 echo "${ECHO_T}$cf_cv_have_environ" >&6
18371
18372 if test "$cf_cv_have_environ" = yes ; then
18373
18374 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18375
18376         cat >>confdefs.h <<EOF
18377 #define $cf_result 1
18378 EOF
18379
18380 fi
18381
18382 echo "$as_me:18382: checking for getenv" >&5
18383 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18384 if test "${ac_cv_func_getenv+set}" = set; then
18385   echo $ECHO_N "(cached) $ECHO_C" >&6
18386 else
18387   cat >conftest.$ac_ext <<_ACEOF
18388 #line 18388 "configure"
18389 #include "confdefs.h"
18390 #define getenv autoconf_temporary
18391 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18392 #undef getenv
18393
18394 #ifdef __cplusplus
18395 extern "C"
18396 #endif
18397
18398 /* We use char because int might match the return type of a gcc2
18399    builtin and then its argument prototype would still apply.  */
18400 char getenv (void);
18401
18402 int
18403 main (void)
18404 {
18405
18406 /* The GNU C library defines stubs for functions which it implements
18407     to always fail with ENOSYS.  Some functions are actually named
18408     something starting with __ and the normal name is an alias.  */
18409 #if defined (__stub_getenv) || defined (__stub___getenv)
18410 #error found stub for getenv
18411 #endif
18412
18413         return getenv ();
18414   ;
18415   return 0;
18416 }
18417 _ACEOF
18418 rm -f conftest.$ac_objext conftest$ac_exeext
18419 if { (eval echo "$as_me:18419: \"$ac_link\"") >&5
18420   (eval $ac_link) 2>&5
18421   ac_status=$?
18422   echo "$as_me:18422: \$? = $ac_status" >&5
18423   (exit $ac_status); } &&
18424          { ac_try='test -s conftest$ac_exeext'
18425   { (eval echo "$as_me:18425: \"$ac_try\"") >&5
18426   (eval $ac_try) 2>&5
18427   ac_status=$?
18428   echo "$as_me:18428: \$? = $ac_status" >&5
18429   (exit $ac_status); }; }; then
18430   ac_cv_func_getenv=yes
18431 else
18432   echo "$as_me: failed program was:" >&5
18433 cat conftest.$ac_ext >&5
18434 ac_cv_func_getenv=no
18435 fi
18436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18437 fi
18438 echo "$as_me:18438: result: $ac_cv_func_getenv" >&5
18439 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18440
18441 for ac_func in putenv setenv strdup
18442 do
18443 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18444 echo "$as_me:18444: checking for $ac_func" >&5
18445 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18446 if eval "test \"\${$as_ac_var+set}\" = set"; then
18447   echo $ECHO_N "(cached) $ECHO_C" >&6
18448 else
18449   cat >conftest.$ac_ext <<_ACEOF
18450 #line 18450 "configure"
18451 #include "confdefs.h"
18452 #define $ac_func autoconf_temporary
18453 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18454 #undef $ac_func
18455
18456 #ifdef __cplusplus
18457 extern "C"
18458 #endif
18459
18460 /* We use char because int might match the return type of a gcc2
18461    builtin and then its argument prototype would still apply.  */
18462 char $ac_func (void);
18463
18464 int
18465 main (void)
18466 {
18467
18468 /* The GNU C library defines stubs for functions which it implements
18469     to always fail with ENOSYS.  Some functions are actually named
18470     something starting with __ and the normal name is an alias.  */
18471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18472 #error found stub for $ac_func
18473 #endif
18474
18475         return $ac_func ();
18476   ;
18477   return 0;
18478 }
18479 _ACEOF
18480 rm -f conftest.$ac_objext conftest$ac_exeext
18481 if { (eval echo "$as_me:18481: \"$ac_link\"") >&5
18482   (eval $ac_link) 2>&5
18483   ac_status=$?
18484   echo "$as_me:18484: \$? = $ac_status" >&5
18485   (exit $ac_status); } &&
18486          { ac_try='test -s conftest$ac_exeext'
18487   { (eval echo "$as_me:18487: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:18490: \$? = $ac_status" >&5
18491   (exit $ac_status); }; }; then
18492   eval "$as_ac_var=yes"
18493 else
18494   echo "$as_me: failed program was:" >&5
18495 cat conftest.$ac_ext >&5
18496 eval "$as_ac_var=no"
18497 fi
18498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18499 fi
18500 echo "$as_me:18500: result: `eval echo '${'$as_ac_var'}'`" >&5
18501 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18502 if test `eval echo '${'$as_ac_var'}'` = yes; then
18503   cat >>confdefs.h <<EOF
18504 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18505 EOF
18506
18507 fi
18508 done
18509
18510 echo "$as_me:18510: checking if getenv returns consistent values" >&5
18511 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
18512 if test "${cf_cv_consistent_getenv+set}" = set; then
18513   echo $ECHO_N "(cached) $ECHO_C" >&6
18514 else
18515
18516 if test "$cross_compiling" = yes; then
18517   cf_cv_consistent_getenv=unknown
18518 else
18519   cat >conftest.$ac_ext <<_ACEOF
18520 #line 18520 "configure"
18521 #include "confdefs.h"
18522
18523 #include <stdlib.h>
18524 #include <unistd.h>
18525 #include <stdio.h>
18526 #include <string.h>
18527 #include <sys/types.h>
18528
18529 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
18530 extern char **environ;  /* POSIX, but some systems are not... */
18531 #endif
18532
18533 #if defined(HAVE_STRDUP)
18534 #define str_alloc(s) strdup(s)
18535 #else
18536 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
18537 #endif
18538
18539 static void set_value(const char *name, const char *value)
18540 {
18541 #if defined(HAVE_SETENV)
18542         setenv(name, value, 1);
18543 #elif defined(HAVE_PUTENV)
18544         char buffer[1024];
18545         sprintf(buffer, "%s=%s", name, value);
18546         putenv(str_alloc(buffer));
18547 #else
18548 #error neither putenv/setenv found
18549 #endif
18550 }
18551 int main(void)
18552 {
18553         int pass;
18554         size_t numenv, limit, j;
18555         char **mynames;
18556         char **myvalues;
18557         char **mypointer;
18558         char *equals;
18559         for (numenv = 0; environ[numenv]; ++numenv) ;
18560         limit = numenv + 10;
18561         mynames = (char **) calloc(limit + 1, sizeof(char *));
18562         myvalues = (char **) calloc(limit + 1, sizeof(char *));
18563         mypointer = (char **) calloc(limit + 1, sizeof(char *));
18564 #if defined(HAVE_ENVIRON)
18565         for (j = 0; environ[j]; ++j) {
18566                 mynames[j] = str_alloc(environ[j]);
18567                 equals = strchr(mynames[j], '=');
18568                 if (equals != 0) {
18569                         *equals++ = '\0';
18570                         myvalues[j] = str_alloc(equals);
18571                 } else {
18572                         myvalues[j] = str_alloc("");
18573                 }
18574         }
18575 #endif
18576         for (j = numenv; j < limit; ++j) {
18577                 char name[80];
18578                 char value[80];
18579                 size_t found;
18580                 size_t k = 0;
18581                 do {
18582                         size_t jk;
18583                         found = 0;
18584                         sprintf(name, "TERM%lu", (unsigned long) k);
18585                         for (jk = 0; jk < j; ++jk) {
18586                                 if (!strcmp(name, mynames[jk])) {
18587                                         found = 1;
18588                                         ++k;
18589                                         break;
18590                                 }
18591                         }
18592                 } while (found);
18593                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
18594                 set_value(name, value);
18595                 mynames[j] = str_alloc(name);
18596                 myvalues[j] = str_alloc(value);
18597         }
18598         for (pass = 0; pass < 3; ++pass) {
18599                 for (j = 0; j < limit; ++j) {
18600                         char *value = getenv(mynames[j]);
18601                         if (pass) {
18602                                 if (value == 0) {
18603                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
18604                                         ${cf_cv_main_return:-return}(1);
18605                                 } else if (value != mypointer[j]) {
18606                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
18607                                         ${cf_cv_main_return:-return}(1);
18608                                 } else if (strcmp(value, myvalues[j])) {
18609                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
18610                                         ${cf_cv_main_return:-return}(1);
18611                                 }
18612                         } else {
18613                                 size_t k;
18614                                 mypointer[j] = value;
18615                                 for (k = 0; k < j; ++k) {
18616                                         if (mypointer[j] == mypointer[k]) {
18617                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
18618                                                 ${cf_cv_main_return:-return}(1);
18619                                         }
18620                                 }
18621                         }
18622                 }
18623         }
18624         ${cf_cv_main_return:-return}(0);
18625 }
18626
18627 _ACEOF
18628 rm -f conftest$ac_exeext
18629 if { (eval echo "$as_me:18629: \"$ac_link\"") >&5
18630   (eval $ac_link) 2>&5
18631   ac_status=$?
18632   echo "$as_me:18632: \$? = $ac_status" >&5
18633   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18634   { (eval echo "$as_me:18634: \"$ac_try\"") >&5
18635   (eval $ac_try) 2>&5
18636   ac_status=$?
18637   echo "$as_me:18637: \$? = $ac_status" >&5
18638   (exit $ac_status); }; }; then
18639   cf_cv_consistent_getenv=yes
18640 else
18641   echo "$as_me: program exited with status $ac_status" >&5
18642 echo "$as_me: failed program was:" >&5
18643 cat conftest.$ac_ext >&5
18644 cf_cv_consistent_getenv=no
18645 fi
18646 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18647 fi
18648
18649 fi
18650 echo "$as_me:18650: result: $cf_cv_consistent_getenv" >&5
18651 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
18652
18653 if test "x$cf_cv_consistent_getenv" = xno
18654 then
18655
18656 cat >>confdefs.h <<\EOF
18657 #define HAVE_CONSISTENT_GETENV 1
18658 EOF
18659
18660 fi
18661
18662 if test "x$cf_cv_consistent_getenv" = xno && \
18663         test "x$cf_with_trace" = xyes
18664 then
18665         { echo "$as_me:18665: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
18666 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
18667 fi
18668
18669 # check for ISC (this may also define _POSIX_SOURCE)
18670 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
18671 if test "x$ISC" = xyes ; then
18672
18673 echo "$as_me:18673: checking for main in -lcposix" >&5
18674 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
18675 if test "${ac_cv_lib_cposix_main+set}" = set; then
18676   echo $ECHO_N "(cached) $ECHO_C" >&6
18677 else
18678   ac_check_lib_save_LIBS=$LIBS
18679 LIBS="-lcposix  $LIBS"
18680 cat >conftest.$ac_ext <<_ACEOF
18681 #line 18681 "configure"
18682 #include "confdefs.h"
18683
18684 int
18685 main (void)
18686 {
18687 main ();
18688   ;
18689   return 0;
18690 }
18691 _ACEOF
18692 rm -f conftest.$ac_objext conftest$ac_exeext
18693 if { (eval echo "$as_me:18693: \"$ac_link\"") >&5
18694   (eval $ac_link) 2>&5
18695   ac_status=$?
18696   echo "$as_me:18696: \$? = $ac_status" >&5
18697   (exit $ac_status); } &&
18698          { ac_try='test -s conftest$ac_exeext'
18699   { (eval echo "$as_me:18699: \"$ac_try\"") >&5
18700   (eval $ac_try) 2>&5
18701   ac_status=$?
18702   echo "$as_me:18702: \$? = $ac_status" >&5
18703   (exit $ac_status); }; }; then
18704   ac_cv_lib_cposix_main=yes
18705 else
18706   echo "$as_me: failed program was:" >&5
18707 cat conftest.$ac_ext >&5
18708 ac_cv_lib_cposix_main=no
18709 fi
18710 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18711 LIBS=$ac_check_lib_save_LIBS
18712 fi
18713 echo "$as_me:18713: result: $ac_cv_lib_cposix_main" >&5
18714 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
18715 if test $ac_cv_lib_cposix_main = yes; then
18716   cat >>confdefs.h <<EOF
18717 #define HAVE_LIBCPOSIX 1
18718 EOF
18719
18720   LIBS="-lcposix $LIBS"
18721
18722 fi
18723
18724         echo "$as_me:18724: checking for bzero in -linet" >&5
18725 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
18726 if test "${ac_cv_lib_inet_bzero+set}" = set; then
18727   echo $ECHO_N "(cached) $ECHO_C" >&6
18728 else
18729   ac_check_lib_save_LIBS=$LIBS
18730 LIBS="-linet  $LIBS"
18731 cat >conftest.$ac_ext <<_ACEOF
18732 #line 18732 "configure"
18733 #include "confdefs.h"
18734
18735 /* Override any gcc2 internal prototype to avoid an error.  */
18736 #ifdef __cplusplus
18737 extern "C"
18738 #endif
18739 /* We use char because int might match the return type of a gcc2
18740    builtin and then its argument prototype would still apply.  */
18741 char bzero ();
18742 int
18743 main (void)
18744 {
18745 bzero ();
18746   ;
18747   return 0;
18748 }
18749 _ACEOF
18750 rm -f conftest.$ac_objext conftest$ac_exeext
18751 if { (eval echo "$as_me:18751: \"$ac_link\"") >&5
18752   (eval $ac_link) 2>&5
18753   ac_status=$?
18754   echo "$as_me:18754: \$? = $ac_status" >&5
18755   (exit $ac_status); } &&
18756          { ac_try='test -s conftest$ac_exeext'
18757   { (eval echo "$as_me:18757: \"$ac_try\"") >&5
18758   (eval $ac_try) 2>&5
18759   ac_status=$?
18760   echo "$as_me:18760: \$? = $ac_status" >&5
18761   (exit $ac_status); }; }; then
18762   ac_cv_lib_inet_bzero=yes
18763 else
18764   echo "$as_me: failed program was:" >&5
18765 cat conftest.$ac_ext >&5
18766 ac_cv_lib_inet_bzero=no
18767 fi
18768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18769 LIBS=$ac_check_lib_save_LIBS
18770 fi
18771 echo "$as_me:18771: result: $ac_cv_lib_inet_bzero" >&5
18772 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
18773 if test $ac_cv_lib_inet_bzero = yes; then
18774
18775 cf_add_libs="$LIBS"
18776 # reverse order
18777 cf_add_0lib=
18778 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18779 # filter duplicates
18780 for cf_add_1lib in $cf_add_0lib; do
18781         for cf_add_2lib in $cf_add_libs; do
18782                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18783                         cf_add_1lib=
18784                         break
18785                 fi
18786         done
18787         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18788 done
18789 LIBS="$cf_add_libs"
18790
18791 fi
18792 fi
18793
18794 echo "$as_me:18794: checking if sys/time.h works with sys/select.h" >&5
18795 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
18796 if test "${cf_cv_sys_time_select+set}" = set; then
18797   echo $ECHO_N "(cached) $ECHO_C" >&6
18798 else
18799
18800 cat >conftest.$ac_ext <<_ACEOF
18801 #line 18801 "configure"
18802 #include "confdefs.h"
18803
18804 #include <sys/types.h>
18805 #ifdef HAVE_SYS_TIME_H
18806 #include <sys/time.h>
18807 #endif
18808 #ifdef HAVE_SYS_SELECT_H
18809 #include <sys/select.h>
18810 #endif
18811
18812 int
18813 main (void)
18814 {
18815
18816   ;
18817   return 0;
18818 }
18819 _ACEOF
18820 rm -f conftest.$ac_objext
18821 if { (eval echo "$as_me:18821: \"$ac_compile\"") >&5
18822   (eval $ac_compile) 2>&5
18823   ac_status=$?
18824   echo "$as_me:18824: \$? = $ac_status" >&5
18825   (exit $ac_status); } &&
18826          { ac_try='test -s conftest.$ac_objext'
18827   { (eval echo "$as_me:18827: \"$ac_try\"") >&5
18828   (eval $ac_try) 2>&5
18829   ac_status=$?
18830   echo "$as_me:18830: \$? = $ac_status" >&5
18831   (exit $ac_status); }; }; then
18832   cf_cv_sys_time_select=yes
18833 else
18834   echo "$as_me: failed program was:" >&5
18835 cat conftest.$ac_ext >&5
18836 cf_cv_sys_time_select=no
18837 fi
18838 rm -f conftest.$ac_objext conftest.$ac_ext
18839
18840 fi
18841
18842 echo "$as_me:18842: result: $cf_cv_sys_time_select" >&5
18843 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
18844 test "$cf_cv_sys_time_select" = yes &&
18845 cat >>confdefs.h <<\EOF
18846 #define HAVE_SYS_TIME_SELECT 1
18847 EOF
18848
18849 ###     checks for compiler characteristics
18850 ac_ext=c
18851 ac_cpp='$CPP $CPPFLAGS'
18852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18855 ac_main_return=return
18856
18857 echo "$as_me:18857: checking for an ANSI C-conforming const" >&5
18858 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18859 if test "${ac_cv_c_const+set}" = set; then
18860   echo $ECHO_N "(cached) $ECHO_C" >&6
18861 else
18862   cat >conftest.$ac_ext <<_ACEOF
18863 #line 18863 "configure"
18864 #include "confdefs.h"
18865
18866 int
18867 main (void)
18868 {
18869 /* FIXME: Include the comments suggested by Paul. */
18870 #ifndef __cplusplus
18871   /* Ultrix mips cc rejects this.  */
18872   typedef int charset[2];
18873   const charset x;
18874   /* SunOS 4.1.1 cc rejects this.  */
18875   char const *const *ccp;
18876   char **p;
18877   /* NEC SVR4.0.2 mips cc rejects this.  */
18878   struct point {int x, y;};
18879   static struct point const zero = {0,0};
18880   /* AIX XL C 1.02.0.0 rejects this.
18881      It does not let you subtract one const X* pointer from another in
18882      an arm of an if-expression whose if-part is not a constant
18883      expression */
18884   const char *g = "string";
18885   ccp = &g + (g ? g-g : 0);
18886   /* HPUX 7.0 cc rejects these. */
18887   ++ccp;
18888   p = (char**) ccp;
18889   ccp = (char const *const *) p;
18890   { /* SCO 3.2v4 cc rejects this.  */
18891     char *t;
18892     char const *s = 0 ? (char *) 0 : (char const *) 0;
18893
18894     *t++ = 0;
18895   }
18896   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
18897     int x[] = {25, 17};
18898     const int *foo = &x[0];
18899     ++foo;
18900   }
18901   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18902     typedef const int *iptr;
18903     iptr p = 0;
18904     ++p;
18905   }
18906   { /* AIX XL C 1.02.0.0 rejects this saying
18907        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18908     struct s { int j; const int *ap[3]; };
18909     struct s *b; b->j = 5;
18910   }
18911   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18912     const int foo = 10;
18913   }
18914 #endif
18915
18916   ;
18917   return 0;
18918 }
18919 _ACEOF
18920 rm -f conftest.$ac_objext
18921 if { (eval echo "$as_me:18921: \"$ac_compile\"") >&5
18922   (eval $ac_compile) 2>&5
18923   ac_status=$?
18924   echo "$as_me:18924: \$? = $ac_status" >&5
18925   (exit $ac_status); } &&
18926          { ac_try='test -s conftest.$ac_objext'
18927   { (eval echo "$as_me:18927: \"$ac_try\"") >&5
18928   (eval $ac_try) 2>&5
18929   ac_status=$?
18930   echo "$as_me:18930: \$? = $ac_status" >&5
18931   (exit $ac_status); }; }; then
18932   ac_cv_c_const=yes
18933 else
18934   echo "$as_me: failed program was:" >&5
18935 cat conftest.$ac_ext >&5
18936 ac_cv_c_const=no
18937 fi
18938 rm -f conftest.$ac_objext conftest.$ac_ext
18939 fi
18940 echo "$as_me:18940: result: $ac_cv_c_const" >&5
18941 echo "${ECHO_T}$ac_cv_c_const" >&6
18942 if test $ac_cv_c_const = no; then
18943
18944 cat >>confdefs.h <<\EOF
18945 #define const
18946 EOF
18947
18948 fi
18949
18950 echo "$as_me:18950: checking for inline" >&5
18951 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18952 if test "${ac_cv_c_inline+set}" = set; then
18953   echo $ECHO_N "(cached) $ECHO_C" >&6
18954 else
18955   ac_cv_c_inline=no
18956 for ac_kw in inline __inline__ __inline; do
18957   cat >conftest.$ac_ext <<_ACEOF
18958 #line 18958 "configure"
18959 #include "confdefs.h"
18960 #ifndef __cplusplus
18961 static $ac_kw int static_foo () {return 0; }
18962 $ac_kw int foo () {return 0; }
18963 #endif
18964
18965 _ACEOF
18966 rm -f conftest.$ac_objext
18967 if { (eval echo "$as_me:18967: \"$ac_compile\"") >&5
18968   (eval $ac_compile) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); } &&
18972          { ac_try='test -s conftest.$ac_objext'
18973   { (eval echo "$as_me:18973: \"$ac_try\"") >&5
18974   (eval $ac_try) 2>&5
18975   ac_status=$?
18976   echo "$as_me:18976: \$? = $ac_status" >&5
18977   (exit $ac_status); }; }; then
18978   ac_cv_c_inline=$ac_kw; break
18979 else
18980   echo "$as_me: failed program was:" >&5
18981 cat conftest.$ac_ext >&5
18982 fi
18983 rm -f conftest.$ac_objext conftest.$ac_ext
18984 done
18985
18986 fi
18987 echo "$as_me:18987: result: $ac_cv_c_inline" >&5
18988 echo "${ECHO_T}$ac_cv_c_inline" >&6
18989 case $ac_cv_c_inline in
18990   inline | yes) ;;
18991   no)
18992 cat >>confdefs.h <<\EOF
18993 #define inline
18994 EOF
18995  ;;
18996   *)  cat >>confdefs.h <<EOF
18997 #define inline $ac_cv_c_inline
18998 EOF
18999  ;;
19000 esac
19001
19002 NCURSES_INLINE=
19003 if test "$ac_cv_c_inline" != no ; then
19004         NCURSES_INLINE=inline
19005         if test "$INTEL_COMPILER" = yes
19006         then
19007                 :
19008         elif test "$CLANG_COMPILER" = yes
19009         then
19010                 :
19011         elif test "$GCC" = yes
19012         then
19013                 echo "$as_me:19013: checking if $CC supports options to tune inlining" >&5
19014 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19015 if test "${cf_cv_gcc_inline+set}" = set; then
19016   echo $ECHO_N "(cached) $ECHO_C" >&6
19017 else
19018
19019                 cf_save_CFLAGS=$CFLAGS
19020                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19021                 cat >conftest.$ac_ext <<_ACEOF
19022 #line 19022 "configure"
19023 #include "confdefs.h"
19024 inline int foo(void) { return 1; }
19025 int
19026 main (void)
19027 {
19028 ${cf_cv_main_return:-return} foo()
19029   ;
19030   return 0;
19031 }
19032 _ACEOF
19033 rm -f conftest.$ac_objext
19034 if { (eval echo "$as_me:19034: \"$ac_compile\"") >&5
19035   (eval $ac_compile) 2>&5
19036   ac_status=$?
19037   echo "$as_me:19037: \$? = $ac_status" >&5
19038   (exit $ac_status); } &&
19039          { ac_try='test -s conftest.$ac_objext'
19040   { (eval echo "$as_me:19040: \"$ac_try\"") >&5
19041   (eval $ac_try) 2>&5
19042   ac_status=$?
19043   echo "$as_me:19043: \$? = $ac_status" >&5
19044   (exit $ac_status); }; }; then
19045   cf_cv_gcc_inline=yes
19046 else
19047   echo "$as_me: failed program was:" >&5
19048 cat conftest.$ac_ext >&5
19049 cf_cv_gcc_inline=no
19050 fi
19051 rm -f conftest.$ac_objext conftest.$ac_ext
19052                 CFLAGS=$cf_save_CFLAGS
19053
19054 fi
19055 echo "$as_me:19055: result: $cf_cv_gcc_inline" >&5
19056 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19057                 if test "$cf_cv_gcc_inline" = yes ; then
19058
19059 cf_fix_cppflags=no
19060 cf_new_cflags=
19061 cf_new_cppflags=
19062 cf_new_extra_cppflags=
19063
19064 for cf_add_cflags in --param max-inline-insns-single=1200
19065 do
19066 case $cf_fix_cppflags in
19067 (no)
19068         case $cf_add_cflags in
19069         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19070                 case $cf_add_cflags in
19071                 (-D*)
19072                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19073
19074                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19075                                 && test -z "${cf_tst_cflags}" \
19076                                 && cf_fix_cppflags=yes
19077
19078                         if test $cf_fix_cppflags = yes ; then
19079
19080         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19081         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19082
19083                                 continue
19084                         elif test "${cf_tst_cflags}" = "\"'" ; then
19085
19086         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19087         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19088
19089                                 continue
19090                         fi
19091                         ;;
19092                 esac
19093                 case "$CPPFLAGS" in
19094                 (*$cf_add_cflags)
19095                         ;;
19096                 (*)
19097                         case $cf_add_cflags in
19098                         (-D*)
19099                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19100
19101 CPPFLAGS=`echo "$CPPFLAGS" | \
19102         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19103                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19104
19105                                 ;;
19106                         esac
19107
19108         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19109         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19110
19111                         ;;
19112                 esac
19113                 ;;
19114         (*)
19115
19116         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19117         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19118
19119                 ;;
19120         esac
19121         ;;
19122 (yes)
19123
19124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19126
19127         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19128
19129         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19130                 && test -z "${cf_tst_cflags}" \
19131                 && cf_fix_cppflags=no
19132         ;;
19133 esac
19134 done
19135
19136 if test -n "$cf_new_cflags" ; then
19137
19138         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19139         CFLAGS="${CFLAGS}$cf_new_cflags"
19140
19141 fi
19142
19143 if test -n "$cf_new_cppflags" ; then
19144
19145         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19146         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19147
19148 fi
19149
19150 if test -n "$cf_new_extra_cppflags" ; then
19151
19152         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19153         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19154
19155 fi
19156
19157                 fi
19158         fi
19159 fi
19160
19161 echo "$as_me:19161: checking for signal global datatype" >&5
19162 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19163 if test "${cf_cv_sig_atomic_t+set}" = set; then
19164   echo $ECHO_N "(cached) $ECHO_C" >&6
19165 else
19166
19167         for cf_type in \
19168                 "volatile sig_atomic_t" \
19169                 "sig_atomic_t" \
19170                 "int"
19171         do
19172         cat >conftest.$ac_ext <<_ACEOF
19173 #line 19173 "configure"
19174 #include "confdefs.h"
19175
19176 #include <sys/types.h>
19177 #include <signal.h>
19178 #include <stdio.h>
19179
19180 extern $cf_type x;
19181 $cf_type x;
19182 static void handler(int sig)
19183 {
19184         x = 5;
19185 }
19186 int
19187 main (void)
19188 {
19189 signal(SIGINT, handler);
19190                  x = 1
19191   ;
19192   return 0;
19193 }
19194 _ACEOF
19195 rm -f conftest.$ac_objext
19196 if { (eval echo "$as_me:19196: \"$ac_compile\"") >&5
19197   (eval $ac_compile) 2>&5
19198   ac_status=$?
19199   echo "$as_me:19199: \$? = $ac_status" >&5
19200   (exit $ac_status); } &&
19201          { ac_try='test -s conftest.$ac_objext'
19202   { (eval echo "$as_me:19202: \"$ac_try\"") >&5
19203   (eval $ac_try) 2>&5
19204   ac_status=$?
19205   echo "$as_me:19205: \$? = $ac_status" >&5
19206   (exit $ac_status); }; }; then
19207   cf_cv_sig_atomic_t=$cf_type
19208 else
19209   echo "$as_me: failed program was:" >&5
19210 cat conftest.$ac_ext >&5
19211 cf_cv_sig_atomic_t=no
19212 fi
19213 rm -f conftest.$ac_objext conftest.$ac_ext
19214                 test "$cf_cv_sig_atomic_t" != no && break
19215         done
19216
19217 fi
19218
19219 echo "$as_me:19219: result: $cf_cv_sig_atomic_t" >&5
19220 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19221 test "$cf_cv_sig_atomic_t" != no &&
19222 cat >>confdefs.h <<EOF
19223 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19224 EOF
19225
19226 if test $NCURSES_CHTYPE = auto ; then
19227
19228 echo "$as_me:19228: checking for type of chtype" >&5
19229 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19230 if test "${cf_cv_typeof_chtype+set}" = set; then
19231   echo $ECHO_N "(cached) $ECHO_C" >&6
19232 else
19233
19234                 if test "$cross_compiling" = yes; then
19235   cf_cv_typeof_chtype=long
19236 else
19237   cat >conftest.$ac_ext <<_ACEOF
19238 #line 19238 "configure"
19239 #include "confdefs.h"
19240
19241 #define WANT_BITS 31
19242 #include <stdio.h>
19243 int main(void)
19244 {
19245         FILE *fp = fopen("cf_test.out", "w");
19246         if (fp != 0) {
19247                 char *result = "long";
19248                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19249                         int n;
19250                         unsigned int x, y;
19251                         for (n = 0; n < WANT_BITS; n++) {
19252                                 x = (1 << n);
19253                                 y = (x >> n);
19254                                 if (y != 1 || x == 0) {
19255                                         x = 0;
19256                                         break;
19257                                 }
19258                         }
19259                         /*
19260                          * If x is nonzero, an int is big enough for the bits
19261                          * that we want.
19262                          */
19263                         result = (x != 0) ? "int" : "long";
19264                 }
19265                 fputs(result, fp);
19266                 fclose(fp);
19267         }
19268         ${cf_cv_main_return:-return}(0);
19269 }
19270
19271 _ACEOF
19272 rm -f conftest$ac_exeext
19273 if { (eval echo "$as_me:19273: \"$ac_link\"") >&5
19274   (eval $ac_link) 2>&5
19275   ac_status=$?
19276   echo "$as_me:19276: \$? = $ac_status" >&5
19277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19278   { (eval echo "$as_me:19278: \"$ac_try\"") >&5
19279   (eval $ac_try) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit $ac_status); }; }; then
19283   cf_cv_typeof_chtype=`cat cf_test.out`
19284 else
19285   echo "$as_me: program exited with status $ac_status" >&5
19286 echo "$as_me: failed program was:" >&5
19287 cat conftest.$ac_ext >&5
19288 cf_cv_typeof_chtype=long
19289 fi
19290 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19291 fi
19292                 rm -f cf_test.out
19293
19294 fi
19295
19296 echo "$as_me:19296: result: $cf_cv_typeof_chtype" >&5
19297 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19298
19299 cat >>confdefs.h <<EOF
19300 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19301 EOF
19302
19303 else
19304         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19305 fi
19306 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19307
19308 echo "$as_me:19308: checking if unsigned literals are legal" >&5
19309 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19310 if test "${cf_cv_unsigned_literals+set}" = set; then
19311   echo $ECHO_N "(cached) $ECHO_C" >&6
19312 else
19313
19314         cat >conftest.$ac_ext <<_ACEOF
19315 #line 19315 "configure"
19316 #include "confdefs.h"
19317
19318 int
19319 main (void)
19320 {
19321 long x = 1L + 1UL + 1U + 1
19322   ;
19323   return 0;
19324 }
19325 _ACEOF
19326 rm -f conftest.$ac_objext
19327 if { (eval echo "$as_me:19327: \"$ac_compile\"") >&5
19328   (eval $ac_compile) 2>&5
19329   ac_status=$?
19330   echo "$as_me:19330: \$? = $ac_status" >&5
19331   (exit $ac_status); } &&
19332          { ac_try='test -s conftest.$ac_objext'
19333   { (eval echo "$as_me:19333: \"$ac_try\"") >&5
19334   (eval $ac_try) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit $ac_status); }; }; then
19338   cf_cv_unsigned_literals=yes
19339 else
19340   echo "$as_me: failed program was:" >&5
19341 cat conftest.$ac_ext >&5
19342 cf_cv_unsigned_literals=no
19343 fi
19344 rm -f conftest.$ac_objext conftest.$ac_ext
19345
19346 fi
19347
19348 echo "$as_me:19348: result: $cf_cv_unsigned_literals" >&5
19349 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19350
19351 cf_cv_1UL="1"
19352 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19353 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19354
19355 if test $NCURSES_MMASK_T = auto ; then
19356         cf_cv_typeof_mmask_t=long
19357 else
19358         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19359 fi
19360 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19361
19362 ###     Checks for external-data
19363
19364 echo "$as_me:19364: checking if external errno is declared" >&5
19365 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19366 if test "${cf_cv_dcl_errno+set}" = set; then
19367   echo $ECHO_N "(cached) $ECHO_C" >&6
19368 else
19369
19370         cat >conftest.$ac_ext <<_ACEOF
19371 #line 19371 "configure"
19372 #include "confdefs.h"
19373
19374 #ifdef HAVE_STDLIB_H
19375 #include <stdlib.h>
19376 #endif
19377 #include <stdio.h>
19378 #include <sys/types.h>
19379 #include <errno.h>
19380 int
19381 main (void)
19382 {
19383 int x = (int) errno
19384   ;
19385   return 0;
19386 }
19387 _ACEOF
19388 rm -f conftest.$ac_objext
19389 if { (eval echo "$as_me:19389: \"$ac_compile\"") >&5
19390   (eval $ac_compile) 2>&5
19391   ac_status=$?
19392   echo "$as_me:19392: \$? = $ac_status" >&5
19393   (exit $ac_status); } &&
19394          { ac_try='test -s conftest.$ac_objext'
19395   { (eval echo "$as_me:19395: \"$ac_try\"") >&5
19396   (eval $ac_try) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit $ac_status); }; }; then
19400   cf_cv_dcl_errno=yes
19401 else
19402   echo "$as_me: failed program was:" >&5
19403 cat conftest.$ac_ext >&5
19404 cf_cv_dcl_errno=no
19405 fi
19406 rm -f conftest.$ac_objext conftest.$ac_ext
19407
19408 fi
19409 echo "$as_me:19409: result: $cf_cv_dcl_errno" >&5
19410 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19411
19412 if test "$cf_cv_dcl_errno" = no ; then
19413
19414 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19415
19416         cat >>confdefs.h <<EOF
19417 #define $cf_result 1
19418 EOF
19419
19420 fi
19421
19422 # It's possible (for near-UNIX clones) that the data doesn't exist
19423
19424 echo "$as_me:19424: checking if external errno exists" >&5
19425 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19426 if test "${cf_cv_have_errno+set}" = set; then
19427   echo $ECHO_N "(cached) $ECHO_C" >&6
19428 else
19429
19430         cat >conftest.$ac_ext <<_ACEOF
19431 #line 19431 "configure"
19432 #include "confdefs.h"
19433
19434 #undef errno
19435 extern int errno;
19436
19437 int
19438 main (void)
19439 {
19440 errno = 2
19441   ;
19442   return 0;
19443 }
19444 _ACEOF
19445 rm -f conftest.$ac_objext conftest$ac_exeext
19446 if { (eval echo "$as_me:19446: \"$ac_link\"") >&5
19447   (eval $ac_link) 2>&5
19448   ac_status=$?
19449   echo "$as_me:19449: \$? = $ac_status" >&5
19450   (exit $ac_status); } &&
19451          { ac_try='test -s conftest$ac_exeext'
19452   { (eval echo "$as_me:19452: \"$ac_try\"") >&5
19453   (eval $ac_try) 2>&5
19454   ac_status=$?
19455   echo "$as_me:19455: \$? = $ac_status" >&5
19456   (exit $ac_status); }; }; then
19457   cf_cv_have_errno=yes
19458 else
19459   echo "$as_me: failed program was:" >&5
19460 cat conftest.$ac_ext >&5
19461 cf_cv_have_errno=no
19462 fi
19463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19464
19465 fi
19466 echo "$as_me:19466: result: $cf_cv_have_errno" >&5
19467 echo "${ECHO_T}$cf_cv_have_errno" >&6
19468
19469 if test "$cf_cv_have_errno" = yes ; then
19470
19471 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19472
19473         cat >>confdefs.h <<EOF
19474 #define $cf_result 1
19475 EOF
19476
19477 fi
19478
19479 echo "$as_me:19479: checking if data-only library module links" >&5
19480 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19481 if test "${cf_cv_link_dataonly+set}" = set; then
19482   echo $ECHO_N "(cached) $ECHO_C" >&6
19483 else
19484
19485         rm -f conftest.a
19486         cat >conftest.$ac_ext <<EOF
19487 #line 19487 "configure"
19488 int     testdata[3] = { 123, 456, 789 };
19489 EOF
19490         if { (eval echo "$as_me:19490: \"$ac_compile\"") >&5
19491   (eval $ac_compile) 2>&5
19492   ac_status=$?
19493   echo "$as_me:19493: \$? = $ac_status" >&5
19494   (exit $ac_status); } ; then
19495                 mv conftest.o data.o && \
19496                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19497         fi
19498         rm -f conftest.$ac_ext data.o
19499         cat >conftest.$ac_ext <<EOF
19500 #line 19500 "configure"
19501 int     testfunc(void)
19502 {
19503 #if defined(NeXT)
19504         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19505 #else
19506         extern int testdata[3];
19507         return testdata[0] == 123
19508            &&  testdata[1] == 456
19509            &&  testdata[2] == 789;
19510 #endif
19511 }
19512 EOF
19513         if { (eval echo "$as_me:19513: \"$ac_compile\"") >&5
19514   (eval $ac_compile) 2>&5
19515   ac_status=$?
19516   echo "$as_me:19516: \$? = $ac_status" >&5
19517   (exit $ac_status); }; then
19518                 mv conftest.o func.o && \
19519                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19520         fi
19521         rm -f conftest.$ac_ext func.o
19522         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19523         cf_saveLIBS="$LIBS"
19524         LIBS="conftest.a $LIBS"
19525         if test "$cross_compiling" = yes; then
19526   cf_cv_link_dataonly=unknown
19527 else
19528   cat >conftest.$ac_ext <<_ACEOF
19529 #line 19529 "configure"
19530 #include "confdefs.h"
19531
19532         int main(void)
19533         {
19534                 extern int testfunc();
19535                 ${cf_cv_main_return:-return} (!testfunc());
19536         }
19537
19538 _ACEOF
19539 rm -f conftest$ac_exeext
19540 if { (eval echo "$as_me:19540: \"$ac_link\"") >&5
19541   (eval $ac_link) 2>&5
19542   ac_status=$?
19543   echo "$as_me:19543: \$? = $ac_status" >&5
19544   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19545   { (eval echo "$as_me:19545: \"$ac_try\"") >&5
19546   (eval $ac_try) 2>&5
19547   ac_status=$?
19548   echo "$as_me:19548: \$? = $ac_status" >&5
19549   (exit $ac_status); }; }; then
19550   cf_cv_link_dataonly=yes
19551 else
19552   echo "$as_me: program exited with status $ac_status" >&5
19553 echo "$as_me: failed program was:" >&5
19554 cat conftest.$ac_ext >&5
19555 cf_cv_link_dataonly=no
19556 fi
19557 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19558 fi
19559         LIBS="$cf_saveLIBS"
19560
19561 fi
19562
19563 echo "$as_me:19563: result: $cf_cv_link_dataonly" >&5
19564 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19565
19566 if test "$cf_cv_link_dataonly" = no ; then
19567
19568 cat >>confdefs.h <<\EOF
19569 #define BROKEN_LINKER 1
19570 EOF
19571
19572         BROKEN_LINKER=1
19573 fi
19574
19575 ###     Checks for library functions.
19576
19577 for ac_func in \
19578 getcwd \
19579 getegid \
19580 geteuid \
19581 getopt \
19582 getttynam \
19583 issetugid \
19584 localeconv \
19585 poll \
19586 putenv \
19587 remove \
19588 select \
19589 setbuf \
19590 setbuffer \
19591 setenv \
19592 setvbuf \
19593 sigaction \
19594 sigvec \
19595 strdup \
19596 strstr \
19597 sysconf \
19598 tcgetpgrp \
19599 times \
19600 tsearch \
19601 vsnprintf \
19602
19603 do
19604 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19605 echo "$as_me:19605: checking for $ac_func" >&5
19606 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19607 if eval "test \"\${$as_ac_var+set}\" = set"; then
19608   echo $ECHO_N "(cached) $ECHO_C" >&6
19609 else
19610   cat >conftest.$ac_ext <<_ACEOF
19611 #line 19611 "configure"
19612 #include "confdefs.h"
19613 #define $ac_func autoconf_temporary
19614 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19615 #undef $ac_func
19616
19617 #ifdef __cplusplus
19618 extern "C"
19619 #endif
19620
19621 /* We use char because int might match the return type of a gcc2
19622    builtin and then its argument prototype would still apply.  */
19623 char $ac_func (void);
19624
19625 int
19626 main (void)
19627 {
19628
19629 /* The GNU C library defines stubs for functions which it implements
19630     to always fail with ENOSYS.  Some functions are actually named
19631     something starting with __ and the normal name is an alias.  */
19632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19633 #error found stub for $ac_func
19634 #endif
19635
19636         return $ac_func ();
19637   ;
19638   return 0;
19639 }
19640 _ACEOF
19641 rm -f conftest.$ac_objext conftest$ac_exeext
19642 if { (eval echo "$as_me:19642: \"$ac_link\"") >&5
19643   (eval $ac_link) 2>&5
19644   ac_status=$?
19645   echo "$as_me:19645: \$? = $ac_status" >&5
19646   (exit $ac_status); } &&
19647          { ac_try='test -s conftest$ac_exeext'
19648   { (eval echo "$as_me:19648: \"$ac_try\"") >&5
19649   (eval $ac_try) 2>&5
19650   ac_status=$?
19651   echo "$as_me:19651: \$? = $ac_status" >&5
19652   (exit $ac_status); }; }; then
19653   eval "$as_ac_var=yes"
19654 else
19655   echo "$as_me: failed program was:" >&5
19656 cat conftest.$ac_ext >&5
19657 eval "$as_ac_var=no"
19658 fi
19659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19660 fi
19661 echo "$as_me:19661: result: `eval echo '${'$as_ac_var'}'`" >&5
19662 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19663 if test `eval echo '${'$as_ac_var'}'` = yes; then
19664   cat >>confdefs.h <<EOF
19665 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19666 EOF
19667
19668 fi
19669 done
19670
19671 if test "x$ac_cv_func_getopt" = xno && \
19672    test "x$cf_with_progs$cf_with_tests" != xnono; then
19673         { { echo "$as_me:19673: error: getopt is required for building programs" >&5
19674 echo "$as_me: error: getopt is required for building programs" >&2;}
19675    { (exit 1); exit 1; }; }
19676 fi
19677
19678 if test "x$with_safe_sprintf" = xyes
19679 then
19680         if test "x$ac_cv_func_vsnprintf" = xyes
19681         then
19682                 { echo "$as_me:19682: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
19683 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
19684         else
19685
19686 cat >>confdefs.h <<\EOF
19687 #define USE_SAFE_SPRINTF 1
19688 EOF
19689
19690         fi
19691 fi
19692
19693 if test "x$with_getcap" = "xyes" ; then
19694
19695 echo "$as_me:19695: checking for terminal-capability database functions" >&5
19696 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
19697 if test "${cf_cv_cgetent+set}" = set; then
19698   echo $ECHO_N "(cached) $ECHO_C" >&6
19699 else
19700
19701 cat >conftest.$ac_ext <<_ACEOF
19702 #line 19702 "configure"
19703 #include "confdefs.h"
19704
19705 #include <stdlib.h>
19706 int
19707 main (void)
19708 {
19709
19710         char temp[128];
19711         char *buf = temp;
19712         char *db_array = temp;
19713         cgetent(&buf, &db_array, "vt100");
19714         cgetcap(buf, "tc", '=');
19715         cgetmatch(buf, "tc");
19716
19717   ;
19718   return 0;
19719 }
19720 _ACEOF
19721 rm -f conftest.$ac_objext conftest$ac_exeext
19722 if { (eval echo "$as_me:19722: \"$ac_link\"") >&5
19723   (eval $ac_link) 2>&5
19724   ac_status=$?
19725   echo "$as_me:19725: \$? = $ac_status" >&5
19726   (exit $ac_status); } &&
19727          { ac_try='test -s conftest$ac_exeext'
19728   { (eval echo "$as_me:19728: \"$ac_try\"") >&5
19729   (eval $ac_try) 2>&5
19730   ac_status=$?
19731   echo "$as_me:19731: \$? = $ac_status" >&5
19732   (exit $ac_status); }; }; then
19733   cf_cv_cgetent=yes
19734 else
19735   echo "$as_me: failed program was:" >&5
19736 cat conftest.$ac_ext >&5
19737 cf_cv_cgetent=no
19738 fi
19739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19740
19741 fi
19742 echo "$as_me:19742: result: $cf_cv_cgetent" >&5
19743 echo "${ECHO_T}$cf_cv_cgetent" >&6
19744
19745 if test "$cf_cv_cgetent" = yes
19746 then
19747
19748 cat >>confdefs.h <<\EOF
19749 #define HAVE_BSD_CGETENT 1
19750 EOF
19751
19752 echo "$as_me:19752: checking if cgetent uses const parameter" >&5
19753 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
19754 if test "${cf_cv_cgetent_const+set}" = set; then
19755   echo $ECHO_N "(cached) $ECHO_C" >&6
19756 else
19757
19758 cat >conftest.$ac_ext <<_ACEOF
19759 #line 19759 "configure"
19760 #include "confdefs.h"
19761
19762 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
19763 #include <stdlib.h>
19764 int
19765 main (void)
19766 {
19767
19768         char temp[128];
19769         char *buf = temp;
19770 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
19771         const char *db_array = temp;
19772         cgetent(&buf, &db_array, "vt100");
19773 #endif
19774         cgetcap(buf, "tc", '=');
19775         cgetmatch(buf, "tc");
19776
19777   ;
19778   return 0;
19779 }
19780 _ACEOF
19781 rm -f conftest.$ac_objext conftest$ac_exeext
19782 if { (eval echo "$as_me:19782: \"$ac_link\"") >&5
19783   (eval $ac_link) 2>&5
19784   ac_status=$?
19785   echo "$as_me:19785: \$? = $ac_status" >&5
19786   (exit $ac_status); } &&
19787          { ac_try='test -s conftest$ac_exeext'
19788   { (eval echo "$as_me:19788: \"$ac_try\"") >&5
19789   (eval $ac_try) 2>&5
19790   ac_status=$?
19791   echo "$as_me:19791: \$? = $ac_status" >&5
19792   (exit $ac_status); }; }; then
19793   cf_cv_cgetent_const=yes
19794 else
19795   echo "$as_me: failed program was:" >&5
19796 cat conftest.$ac_ext >&5
19797 cf_cv_cgetent_const=no
19798 fi
19799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19800
19801 fi
19802 echo "$as_me:19802: result: $cf_cv_cgetent_const" >&5
19803 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
19804         if test "$cf_cv_cgetent_const" = yes
19805         then
19806
19807 cat >>confdefs.h <<EOF
19808 #define CGETENT_CONST const
19809 EOF
19810
19811         fi
19812 fi
19813
19814 fi
19815
19816 echo "$as_me:19816: checking for isascii" >&5
19817 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
19818 if test "${cf_cv_have_isascii+set}" = set; then
19819   echo $ECHO_N "(cached) $ECHO_C" >&6
19820 else
19821
19822         cat >conftest.$ac_ext <<_ACEOF
19823 #line 19823 "configure"
19824 #include "confdefs.h"
19825 #include <ctype.h>
19826 int
19827 main (void)
19828 {
19829 int x = isascii(' ')
19830   ;
19831   return 0;
19832 }
19833 _ACEOF
19834 rm -f conftest.$ac_objext conftest$ac_exeext
19835 if { (eval echo "$as_me:19835: \"$ac_link\"") >&5
19836   (eval $ac_link) 2>&5
19837   ac_status=$?
19838   echo "$as_me:19838: \$? = $ac_status" >&5
19839   (exit $ac_status); } &&
19840          { ac_try='test -s conftest$ac_exeext'
19841   { (eval echo "$as_me:19841: \"$ac_try\"") >&5
19842   (eval $ac_try) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit $ac_status); }; }; then
19846   cf_cv_have_isascii=yes
19847 else
19848   echo "$as_me: failed program was:" >&5
19849 cat conftest.$ac_ext >&5
19850 cf_cv_have_isascii=no
19851 fi
19852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19853
19854 fi
19855 echo "$as_me:19855: result: $cf_cv_have_isascii" >&5
19856 echo "${ECHO_T}$cf_cv_have_isascii" >&6
19857 test "$cf_cv_have_isascii" = yes &&
19858 cat >>confdefs.h <<\EOF
19859 #define HAVE_ISASCII 1
19860 EOF
19861
19862 if test "$ac_cv_func_sigaction" = yes; then
19863 echo "$as_me:19863: checking whether sigaction needs _POSIX_SOURCE" >&5
19864 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
19865 cat >conftest.$ac_ext <<_ACEOF
19866 #line 19866 "configure"
19867 #include "confdefs.h"
19868
19869 #include <sys/types.h>
19870 #include <signal.h>
19871 int
19872 main (void)
19873 {
19874 struct sigaction act
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 rm -f conftest.$ac_objext
19880 if { (eval echo "$as_me:19880: \"$ac_compile\"") >&5
19881   (eval $ac_compile) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit $ac_status); } &&
19885          { ac_try='test -s conftest.$ac_objext'
19886   { (eval echo "$as_me:19886: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:19889: \$? = $ac_status" >&5
19890   (exit $ac_status); }; }; then
19891   sigact_bad=no
19892 else
19893   echo "$as_me: failed program was:" >&5
19894 cat conftest.$ac_ext >&5
19895
19896 cat >conftest.$ac_ext <<_ACEOF
19897 #line 19897 "configure"
19898 #include "confdefs.h"
19899
19900 #define _POSIX_SOURCE
19901 #include <sys/types.h>
19902 #include <signal.h>
19903 int
19904 main (void)
19905 {
19906 struct sigaction act
19907   ;
19908   return 0;
19909 }
19910 _ACEOF
19911 rm -f conftest.$ac_objext
19912 if { (eval echo "$as_me:19912: \"$ac_compile\"") >&5
19913   (eval $ac_compile) 2>&5
19914   ac_status=$?
19915   echo "$as_me:19915: \$? = $ac_status" >&5
19916   (exit $ac_status); } &&
19917          { ac_try='test -s conftest.$ac_objext'
19918   { (eval echo "$as_me:19918: \"$ac_try\"") >&5
19919   (eval $ac_try) 2>&5
19920   ac_status=$?
19921   echo "$as_me:19921: \$? = $ac_status" >&5
19922   (exit $ac_status); }; }; then
19923   sigact_bad=yes
19924
19925 cat >>confdefs.h <<\EOF
19926 #define _POSIX_SOURCE 1
19927 EOF
19928
19929 else
19930   echo "$as_me: failed program was:" >&5
19931 cat conftest.$ac_ext >&5
19932 sigact_bad=unknown
19933 fi
19934 rm -f conftest.$ac_objext conftest.$ac_ext
19935 fi
19936 rm -f conftest.$ac_objext conftest.$ac_ext
19937 echo "$as_me:19937: result: $sigact_bad" >&5
19938 echo "${ECHO_T}$sigact_bad" >&6
19939 fi
19940
19941 echo "$as_me:19941: checking if nanosleep really works" >&5
19942 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19943 if test "${cf_cv_func_nanosleep+set}" = set; then
19944   echo $ECHO_N "(cached) $ECHO_C" >&6
19945 else
19946
19947 if test "$cross_compiling" = yes; then
19948   cf_cv_func_nanosleep=unknown
19949 else
19950   cat >conftest.$ac_ext <<_ACEOF
19951 #line 19951 "configure"
19952 #include "confdefs.h"
19953
19954 #include <stdio.h>
19955 #include <errno.h>
19956 #include <time.h>
19957
19958 #ifdef HAVE_SYS_TIME_H
19959 #include <sys/time.h>
19960 #endif
19961
19962 int main(void) {
19963         struct timespec ts1, ts2;
19964         int code;
19965         ts1.tv_sec  = 0;
19966         ts1.tv_nsec = 750000000;
19967         ts2.tv_sec  = 0;
19968         ts2.tv_nsec = 0;
19969         errno = 0;
19970         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19971         ${cf_cv_main_return:-return}(code != 0);
19972 }
19973
19974 _ACEOF
19975 rm -f conftest$ac_exeext
19976 if { (eval echo "$as_me:19976: \"$ac_link\"") >&5
19977   (eval $ac_link) 2>&5
19978   ac_status=$?
19979   echo "$as_me:19979: \$? = $ac_status" >&5
19980   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19981   { (eval echo "$as_me:19981: \"$ac_try\"") >&5
19982   (eval $ac_try) 2>&5
19983   ac_status=$?
19984   echo "$as_me:19984: \$? = $ac_status" >&5
19985   (exit $ac_status); }; }; then
19986   cf_cv_func_nanosleep=yes
19987 else
19988   echo "$as_me: program exited with status $ac_status" >&5
19989 echo "$as_me: failed program was:" >&5
19990 cat conftest.$ac_ext >&5
19991 cf_cv_func_nanosleep=no
19992 fi
19993 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19994 fi
19995 fi
19996 echo "$as_me:19996: result: $cf_cv_func_nanosleep" >&5
19997 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19998
19999 test "$cf_cv_func_nanosleep" = "yes" &&
20000 cat >>confdefs.h <<\EOF
20001 #define HAVE_NANOSLEEP 1
20002 EOF
20003
20004 for ac_header in \
20005 termio.h \
20006 termios.h \
20007 unistd.h \
20008 sys/ioctl.h \
20009 sys/termio.h \
20010
20011 do
20012 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20013 echo "$as_me:20013: checking for $ac_header" >&5
20014 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20015 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20016   echo $ECHO_N "(cached) $ECHO_C" >&6
20017 else
20018   cat >conftest.$ac_ext <<_ACEOF
20019 #line 20019 "configure"
20020 #include "confdefs.h"
20021 #include <$ac_header>
20022 _ACEOF
20023 if { (eval echo "$as_me:20023: \"$ac_cpp conftest.$ac_ext\"") >&5
20024   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20025   ac_status=$?
20026   egrep -v '^ *\+' conftest.er1 >conftest.err
20027   rm -f conftest.er1
20028   cat conftest.err >&5
20029   echo "$as_me:20029: \$? = $ac_status" >&5
20030   (exit $ac_status); } >/dev/null; then
20031   if test -s conftest.err; then
20032     ac_cpp_err=$ac_c_preproc_warn_flag
20033   else
20034     ac_cpp_err=
20035   fi
20036 else
20037   ac_cpp_err=yes
20038 fi
20039 if test -z "$ac_cpp_err"; then
20040   eval "$as_ac_Header=yes"
20041 else
20042   echo "$as_me: failed program was:" >&5
20043   cat conftest.$ac_ext >&5
20044   eval "$as_ac_Header=no"
20045 fi
20046 rm -f conftest.err conftest.$ac_ext
20047 fi
20048 echo "$as_me:20048: result: `eval echo '${'$as_ac_Header'}'`" >&5
20049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20050 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20051   cat >>confdefs.h <<EOF
20052 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20053 EOF
20054
20055 fi
20056 done
20057
20058 if test "$ac_cv_header_termios_h" = yes ; then
20059         case "$CFLAGS $CPPFLAGS" in
20060         (*-D_POSIX_SOURCE*)
20061                 termios_bad=dunno ;;
20062         (*)     termios_bad=maybe ;;
20063         esac
20064         if test "$termios_bad" = maybe ; then
20065         echo "$as_me:20065: checking whether termios.h needs _POSIX_SOURCE" >&5
20066 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20067         cat >conftest.$ac_ext <<_ACEOF
20068 #line 20068 "configure"
20069 #include "confdefs.h"
20070 #include <termios.h>
20071 int
20072 main (void)
20073 {
20074 struct termios foo; int x = foo.c_iflag
20075   ;
20076   return 0;
20077 }
20078 _ACEOF
20079 rm -f conftest.$ac_objext
20080 if { (eval echo "$as_me:20080: \"$ac_compile\"") >&5
20081   (eval $ac_compile) 2>&5
20082   ac_status=$?
20083   echo "$as_me:20083: \$? = $ac_status" >&5
20084   (exit $ac_status); } &&
20085          { ac_try='test -s conftest.$ac_objext'
20086   { (eval echo "$as_me:20086: \"$ac_try\"") >&5
20087   (eval $ac_try) 2>&5
20088   ac_status=$?
20089   echo "$as_me:20089: \$? = $ac_status" >&5
20090   (exit $ac_status); }; }; then
20091   termios_bad=no
20092 else
20093   echo "$as_me: failed program was:" >&5
20094 cat conftest.$ac_ext >&5
20095
20096                 cat >conftest.$ac_ext <<_ACEOF
20097 #line 20097 "configure"
20098 #include "confdefs.h"
20099
20100 #define _POSIX_SOURCE
20101 #include <termios.h>
20102 int
20103 main (void)
20104 {
20105 struct termios foo; int x = foo.c_iflag
20106   ;
20107   return 0;
20108 }
20109 _ACEOF
20110 rm -f conftest.$ac_objext
20111 if { (eval echo "$as_me:20111: \"$ac_compile\"") >&5
20112   (eval $ac_compile) 2>&5
20113   ac_status=$?
20114   echo "$as_me:20114: \$? = $ac_status" >&5
20115   (exit $ac_status); } &&
20116          { ac_try='test -s conftest.$ac_objext'
20117   { (eval echo "$as_me:20117: \"$ac_try\"") >&5
20118   (eval $ac_try) 2>&5
20119   ac_status=$?
20120   echo "$as_me:20120: \$? = $ac_status" >&5
20121   (exit $ac_status); }; }; then
20122   termios_bad=unknown
20123 else
20124   echo "$as_me: failed program was:" >&5
20125 cat conftest.$ac_ext >&5
20126 termios_bad=yes
20127 cat >>confdefs.h <<\EOF
20128 #define _POSIX_SOURCE 1
20129 EOF
20130
20131 fi
20132 rm -f conftest.$ac_objext conftest.$ac_ext
20133
20134 fi
20135 rm -f conftest.$ac_objext conftest.$ac_ext
20136         echo "$as_me:20136: result: $termios_bad" >&5
20137 echo "${ECHO_T}$termios_bad" >&6
20138         fi
20139 fi
20140
20141 echo "$as_me:20141: checking for tcgetattr" >&5
20142 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20143 if test "${cf_cv_have_tcgetattr+set}" = set; then
20144   echo $ECHO_N "(cached) $ECHO_C" >&6
20145 else
20146
20147 cat >conftest.$ac_ext <<_ACEOF
20148 #line 20148 "configure"
20149 #include "confdefs.h"
20150
20151 #include <sys/types.h>
20152 #ifdef HAVE_UNISTD_H
20153 #include <unistd.h>
20154 #endif
20155 #ifdef HAVE_TERMIOS_H
20156 #include <termios.h>
20157 #define TTY struct termios
20158 #else
20159 #ifdef HAVE_TERMIO_H
20160 #include <termio.h>
20161 #define TTY struct termio
20162 #endif
20163 #endif
20164
20165 int
20166 main (void)
20167 {
20168
20169 TTY foo;
20170 tcgetattr(1, &foo);
20171   ;
20172   return 0;
20173 }
20174 _ACEOF
20175 rm -f conftest.$ac_objext conftest$ac_exeext
20176 if { (eval echo "$as_me:20176: \"$ac_link\"") >&5
20177   (eval $ac_link) 2>&5
20178   ac_status=$?
20179   echo "$as_me:20179: \$? = $ac_status" >&5
20180   (exit $ac_status); } &&
20181          { ac_try='test -s conftest$ac_exeext'
20182   { (eval echo "$as_me:20182: \"$ac_try\"") >&5
20183   (eval $ac_try) 2>&5
20184   ac_status=$?
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit $ac_status); }; }; then
20187   cf_cv_have_tcgetattr=yes
20188 else
20189   echo "$as_me: failed program was:" >&5
20190 cat conftest.$ac_ext >&5
20191 cf_cv_have_tcgetattr=no
20192 fi
20193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20194 fi
20195 echo "$as_me:20195: result: $cf_cv_have_tcgetattr" >&5
20196 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20197 test "$cf_cv_have_tcgetattr" = yes &&
20198 cat >>confdefs.h <<\EOF
20199 #define HAVE_TCGETATTR 1
20200 EOF
20201
20202 echo "$as_me:20202: checking for vsscanf function or workaround" >&5
20203 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20204 if test "${cf_cv_func_vsscanf+set}" = set; then
20205   echo $ECHO_N "(cached) $ECHO_C" >&6
20206 else
20207
20208 cat >conftest.$ac_ext <<_ACEOF
20209 #line 20209 "configure"
20210 #include "confdefs.h"
20211
20212 #include <stdarg.h>
20213 #include <stdio.h>
20214 int
20215 main (void)
20216 {
20217
20218         va_list ap;
20219         vsscanf("from", "%d", ap)
20220   ;
20221   return 0;
20222 }
20223 _ACEOF
20224 rm -f conftest.$ac_objext conftest$ac_exeext
20225 if { (eval echo "$as_me:20225: \"$ac_link\"") >&5
20226   (eval $ac_link) 2>&5
20227   ac_status=$?
20228   echo "$as_me:20228: \$? = $ac_status" >&5
20229   (exit $ac_status); } &&
20230          { ac_try='test -s conftest$ac_exeext'
20231   { (eval echo "$as_me:20231: \"$ac_try\"") >&5
20232   (eval $ac_try) 2>&5
20233   ac_status=$?
20234   echo "$as_me:20234: \$? = $ac_status" >&5
20235   (exit $ac_status); }; }; then
20236   cf_cv_func_vsscanf=vsscanf
20237 else
20238   echo "$as_me: failed program was:" >&5
20239 cat conftest.$ac_ext >&5
20240
20241 cat >conftest.$ac_ext <<_ACEOF
20242 #line 20242 "configure"
20243 #include "confdefs.h"
20244
20245 #include <stdarg.h>
20246 #include <stdio.h>
20247 int
20248 main (void)
20249 {
20250
20251         FILE strbuf;
20252         char *str = "from";
20253
20254         strbuf._flag = _IOREAD;
20255         strbuf._ptr = strbuf._base = (unsigned char *) str;
20256         strbuf._cnt = strlen(str);
20257         strbuf._file = _NFILE;
20258         return (vfscanf(&strbuf, "%d", ap))
20259   ;
20260   return 0;
20261 }
20262 _ACEOF
20263 rm -f conftest.$ac_objext conftest$ac_exeext
20264 if { (eval echo "$as_me:20264: \"$ac_link\"") >&5
20265   (eval $ac_link) 2>&5
20266   ac_status=$?
20267   echo "$as_me:20267: \$? = $ac_status" >&5
20268   (exit $ac_status); } &&
20269          { ac_try='test -s conftest$ac_exeext'
20270   { (eval echo "$as_me:20270: \"$ac_try\"") >&5
20271   (eval $ac_try) 2>&5
20272   ac_status=$?
20273   echo "$as_me:20273: \$? = $ac_status" >&5
20274   (exit $ac_status); }; }; then
20275   cf_cv_func_vsscanf=vfscanf
20276 else
20277   echo "$as_me: failed program was:" >&5
20278 cat conftest.$ac_ext >&5
20279
20280 cat >conftest.$ac_ext <<_ACEOF
20281 #line 20281 "configure"
20282 #include "confdefs.h"
20283
20284 #include <stdarg.h>
20285 #include <stdio.h>
20286 int
20287 main (void)
20288 {
20289
20290         FILE strbuf;
20291         char *str = "from";
20292
20293         strbuf._flag = _IOREAD;
20294         strbuf._ptr = strbuf._base = (unsigned char *) str;
20295         strbuf._cnt = strlen(str);
20296         strbuf._file = _NFILE;
20297         return (_doscan(&strbuf, "%d", ap))
20298   ;
20299   return 0;
20300 }
20301 _ACEOF
20302 rm -f conftest.$ac_objext conftest$ac_exeext
20303 if { (eval echo "$as_me:20303: \"$ac_link\"") >&5
20304   (eval $ac_link) 2>&5
20305   ac_status=$?
20306   echo "$as_me:20306: \$? = $ac_status" >&5
20307   (exit $ac_status); } &&
20308          { ac_try='test -s conftest$ac_exeext'
20309   { (eval echo "$as_me:20309: \"$ac_try\"") >&5
20310   (eval $ac_try) 2>&5
20311   ac_status=$?
20312   echo "$as_me:20312: \$? = $ac_status" >&5
20313   (exit $ac_status); }; }; then
20314   cf_cv_func_vsscanf=_doscan
20315 else
20316   echo "$as_me: failed program was:" >&5
20317 cat conftest.$ac_ext >&5
20318
20319 cf_cv_func_vsscanf=no
20320 fi
20321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20322 fi
20323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20324 fi
20325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20326 fi
20327 echo "$as_me:20327: result: $cf_cv_func_vsscanf" >&5
20328 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20329
20330 case $cf_cv_func_vsscanf in
20331 (vsscanf)
20332 cat >>confdefs.h <<\EOF
20333 #define HAVE_VSSCANF 1
20334 EOF
20335 ;;
20336 (vfscanf)
20337 cat >>confdefs.h <<\EOF
20338 #define HAVE_VFSCANF 1
20339 EOF
20340 ;;
20341 (_doscan)
20342 cat >>confdefs.h <<\EOF
20343 #define HAVE__DOSCAN 1
20344 EOF
20345 ;;
20346 esac
20347
20348 for ac_header in \
20349 unistd.h \
20350
20351 do
20352 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20353 echo "$as_me:20353: checking for $ac_header" >&5
20354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20356   echo $ECHO_N "(cached) $ECHO_C" >&6
20357 else
20358   cat >conftest.$ac_ext <<_ACEOF
20359 #line 20359 "configure"
20360 #include "confdefs.h"
20361 #include <$ac_header>
20362 _ACEOF
20363 if { (eval echo "$as_me:20363: \"$ac_cpp conftest.$ac_ext\"") >&5
20364   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20365   ac_status=$?
20366   egrep -v '^ *\+' conftest.er1 >conftest.err
20367   rm -f conftest.er1
20368   cat conftest.err >&5
20369   echo "$as_me:20369: \$? = $ac_status" >&5
20370   (exit $ac_status); } >/dev/null; then
20371   if test -s conftest.err; then
20372     ac_cpp_err=$ac_c_preproc_warn_flag
20373   else
20374     ac_cpp_err=
20375   fi
20376 else
20377   ac_cpp_err=yes
20378 fi
20379 if test -z "$ac_cpp_err"; then
20380   eval "$as_ac_Header=yes"
20381 else
20382   echo "$as_me: failed program was:" >&5
20383   cat conftest.$ac_ext >&5
20384   eval "$as_ac_Header=no"
20385 fi
20386 rm -f conftest.err conftest.$ac_ext
20387 fi
20388 echo "$as_me:20388: result: `eval echo '${'$as_ac_Header'}'`" >&5
20389 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20390 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20391   cat >>confdefs.h <<EOF
20392 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20393 EOF
20394
20395 fi
20396 done
20397
20398 echo "$as_me:20398: checking for working mkstemp" >&5
20399 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20400 if test "${cf_cv_func_mkstemp+set}" = set; then
20401   echo $ECHO_N "(cached) $ECHO_C" >&6
20402 else
20403
20404 rm -rf conftest*
20405 if test "$cross_compiling" = yes; then
20406   cf_cv_func_mkstemp=maybe
20407 else
20408   cat >conftest.$ac_ext <<_ACEOF
20409 #line 20409 "configure"
20410 #include "confdefs.h"
20411
20412 #include <sys/types.h>
20413 #ifdef HAVE_UNISTD_H
20414 #include <unistd.h>
20415 #endif
20416 #include <stdlib.h>
20417 #include <stdio.h>
20418 #include <string.h>
20419 #include <sys/stat.h>
20420 int main(void)
20421 {
20422         char *tmpl = "conftestXXXXXX";
20423         char name[2][80];
20424         int n;
20425         int result = 0;
20426         int fd;
20427         struct stat sb;
20428
20429         umask(077);
20430         for (n = 0; n < 2; ++n) {
20431                 strcpy(name[n], tmpl);
20432                 if ((fd = mkstemp(name[n])) >= 0) {
20433                         if (!strcmp(name[n], tmpl)
20434                          || stat(name[n], &sb) != 0
20435                          || (sb.st_mode & S_IFMT) != S_IFREG
20436                          || (sb.st_mode & 077) != 0) {
20437                                 result = 1;
20438                         }
20439                         close(fd);
20440                 }
20441         }
20442         if (result == 0
20443          && !strcmp(name[0], name[1]))
20444                 result = 1;
20445         ${cf_cv_main_return:-return}(result);
20446 }
20447
20448 _ACEOF
20449 rm -f conftest$ac_exeext
20450 if { (eval echo "$as_me:20450: \"$ac_link\"") >&5
20451   (eval $ac_link) 2>&5
20452   ac_status=$?
20453   echo "$as_me:20453: \$? = $ac_status" >&5
20454   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20455   { (eval echo "$as_me:20455: \"$ac_try\"") >&5
20456   (eval $ac_try) 2>&5
20457   ac_status=$?
20458   echo "$as_me:20458: \$? = $ac_status" >&5
20459   (exit $ac_status); }; }; then
20460   cf_cv_func_mkstemp=yes
20461
20462 else
20463   echo "$as_me: program exited with status $ac_status" >&5
20464 echo "$as_me: failed program was:" >&5
20465 cat conftest.$ac_ext >&5
20466 cf_cv_func_mkstemp=no
20467
20468 fi
20469 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20470 fi
20471
20472 fi
20473 echo "$as_me:20473: result: $cf_cv_func_mkstemp" >&5
20474 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20475 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20476         echo "$as_me:20476: checking for mkstemp" >&5
20477 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20478 if test "${ac_cv_func_mkstemp+set}" = set; then
20479   echo $ECHO_N "(cached) $ECHO_C" >&6
20480 else
20481   cat >conftest.$ac_ext <<_ACEOF
20482 #line 20482 "configure"
20483 #include "confdefs.h"
20484 #define mkstemp autoconf_temporary
20485 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20486 #undef mkstemp
20487
20488 #ifdef __cplusplus
20489 extern "C"
20490 #endif
20491
20492 /* We use char because int might match the return type of a gcc2
20493    builtin and then its argument prototype would still apply.  */
20494 char mkstemp (void);
20495
20496 int
20497 main (void)
20498 {
20499
20500 /* The GNU C library defines stubs for functions which it implements
20501     to always fail with ENOSYS.  Some functions are actually named
20502     something starting with __ and the normal name is an alias.  */
20503 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20504 #error found stub for mkstemp
20505 #endif
20506
20507         return mkstemp ();
20508   ;
20509   return 0;
20510 }
20511 _ACEOF
20512 rm -f conftest.$ac_objext conftest$ac_exeext
20513 if { (eval echo "$as_me:20513: \"$ac_link\"") >&5
20514   (eval $ac_link) 2>&5
20515   ac_status=$?
20516   echo "$as_me:20516: \$? = $ac_status" >&5
20517   (exit $ac_status); } &&
20518          { ac_try='test -s conftest$ac_exeext'
20519   { (eval echo "$as_me:20519: \"$ac_try\"") >&5
20520   (eval $ac_try) 2>&5
20521   ac_status=$?
20522   echo "$as_me:20522: \$? = $ac_status" >&5
20523   (exit $ac_status); }; }; then
20524   ac_cv_func_mkstemp=yes
20525 else
20526   echo "$as_me: failed program was:" >&5
20527 cat conftest.$ac_ext >&5
20528 ac_cv_func_mkstemp=no
20529 fi
20530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20531 fi
20532 echo "$as_me:20532: result: $ac_cv_func_mkstemp" >&5
20533 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20534
20535 fi
20536 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20537
20538 cat >>confdefs.h <<\EOF
20539 #define HAVE_MKSTEMP 1
20540 EOF
20541
20542 fi
20543
20544 # setup for prototype of fallback for vsscanf()
20545
20546 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20547         HAVE_VSSCANF=1
20548 else
20549         HAVE_VSSCANF=0
20550 fi
20551
20552 if test "x$cross_compiling" = xyes ; then
20553         { echo "$as_me:20553: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20554 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20555 else
20556         echo "$as_me:20556: checking whether setvbuf arguments are reversed" >&5
20557 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20558 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20559   echo $ECHO_N "(cached) $ECHO_C" >&6
20560 else
20561   if test "$cross_compiling" = yes; then
20562   { { echo "$as_me:20562: error: cannot run test program while cross compiling" >&5
20563 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20564    { (exit 1); exit 1; }; }
20565 else
20566   cat >conftest.$ac_ext <<_ACEOF
20567 #line 20567 "configure"
20568 #include "confdefs.h"
20569 #include <stdio.h>
20570 /* If setvbuf has the reversed format, exit 0. */
20571 int
20572 main (void)
20573 {
20574   /* This call has the arguments reversed.
20575      A reversed system may check and see that the address of main
20576      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20577   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20578     $ac_main_return(1);
20579   putc('\r', stdout);
20580   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20581 }
20582 _ACEOF
20583 rm -f conftest$ac_exeext
20584 if { (eval echo "$as_me:20584: \"$ac_link\"") >&5
20585   (eval $ac_link) 2>&5
20586   ac_status=$?
20587   echo "$as_me:20587: \$? = $ac_status" >&5
20588   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20589   { (eval echo "$as_me:20589: \"$ac_try\"") >&5
20590   (eval $ac_try) 2>&5
20591   ac_status=$?
20592   echo "$as_me:20592: \$? = $ac_status" >&5
20593   (exit $ac_status); }; }; then
20594   ac_cv_func_setvbuf_reversed=yes
20595 else
20596   echo "$as_me: program exited with status $ac_status" >&5
20597 echo "$as_me: failed program was:" >&5
20598 cat conftest.$ac_ext >&5
20599 ac_cv_func_setvbuf_reversed=no
20600 fi
20601 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20602 fi
20603 rm -f core core.* *.core
20604 fi
20605 echo "$as_me:20605: result: $ac_cv_func_setvbuf_reversed" >&5
20606 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20607 if test $ac_cv_func_setvbuf_reversed = yes; then
20608
20609 cat >>confdefs.h <<\EOF
20610 #define SETVBUF_REVERSED 1
20611 EOF
20612
20613 fi
20614
20615 fi
20616 echo "$as_me:20616: checking for intptr_t" >&5
20617 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
20618 if test "${ac_cv_type_intptr_t+set}" = set; then
20619   echo $ECHO_N "(cached) $ECHO_C" >&6
20620 else
20621   cat >conftest.$ac_ext <<_ACEOF
20622 #line 20622 "configure"
20623 #include "confdefs.h"
20624 $ac_includes_default
20625 int
20626 main (void)
20627 {
20628 if ((intptr_t *) 0)
20629   return 0;
20630 if (sizeof (intptr_t))
20631   return 0;
20632   ;
20633   return 0;
20634 }
20635 _ACEOF
20636 rm -f conftest.$ac_objext
20637 if { (eval echo "$as_me:20637: \"$ac_compile\"") >&5
20638   (eval $ac_compile) 2>&5
20639   ac_status=$?
20640   echo "$as_me:20640: \$? = $ac_status" >&5
20641   (exit $ac_status); } &&
20642          { ac_try='test -s conftest.$ac_objext'
20643   { (eval echo "$as_me:20643: \"$ac_try\"") >&5
20644   (eval $ac_try) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit $ac_status); }; }; then
20648   ac_cv_type_intptr_t=yes
20649 else
20650   echo "$as_me: failed program was:" >&5
20651 cat conftest.$ac_ext >&5
20652 ac_cv_type_intptr_t=no
20653 fi
20654 rm -f conftest.$ac_objext conftest.$ac_ext
20655 fi
20656 echo "$as_me:20656: result: $ac_cv_type_intptr_t" >&5
20657 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
20658 if test $ac_cv_type_intptr_t = yes; then
20659   :
20660 else
20661
20662 cat >>confdefs.h <<EOF
20663 #define intptr_t long
20664 EOF
20665
20666 fi
20667
20668 echo "$as_me:20668: checking for ssize_t" >&5
20669 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
20670 if test "${ac_cv_type_ssize_t+set}" = set; then
20671   echo $ECHO_N "(cached) $ECHO_C" >&6
20672 else
20673   cat >conftest.$ac_ext <<_ACEOF
20674 #line 20674 "configure"
20675 #include "confdefs.h"
20676 $ac_includes_default
20677 int
20678 main (void)
20679 {
20680 if ((ssize_t *) 0)
20681   return 0;
20682 if (sizeof (ssize_t))
20683   return 0;
20684   ;
20685   return 0;
20686 }
20687 _ACEOF
20688 rm -f conftest.$ac_objext
20689 if { (eval echo "$as_me:20689: \"$ac_compile\"") >&5
20690   (eval $ac_compile) 2>&5
20691   ac_status=$?
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit $ac_status); } &&
20694          { ac_try='test -s conftest.$ac_objext'
20695   { (eval echo "$as_me:20695: \"$ac_try\"") >&5
20696   (eval $ac_try) 2>&5
20697   ac_status=$?
20698   echo "$as_me:20698: \$? = $ac_status" >&5
20699   (exit $ac_status); }; }; then
20700   ac_cv_type_ssize_t=yes
20701 else
20702   echo "$as_me: failed program was:" >&5
20703 cat conftest.$ac_ext >&5
20704 ac_cv_type_ssize_t=no
20705 fi
20706 rm -f conftest.$ac_objext conftest.$ac_ext
20707 fi
20708 echo "$as_me:20708: result: $ac_cv_type_ssize_t" >&5
20709 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
20710 if test $ac_cv_type_ssize_t = yes; then
20711   :
20712 else
20713
20714 cat >>confdefs.h <<EOF
20715 #define ssize_t int
20716 EOF
20717
20718 fi
20719
20720 echo "$as_me:20720: checking for type sigaction_t" >&5
20721 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
20722 if test "${cf_cv_type_sigaction+set}" = set; then
20723   echo $ECHO_N "(cached) $ECHO_C" >&6
20724 else
20725
20726         cat >conftest.$ac_ext <<_ACEOF
20727 #line 20727 "configure"
20728 #include "confdefs.h"
20729
20730 #include <signal.h>
20731 int
20732 main (void)
20733 {
20734 sigaction_t x
20735   ;
20736   return 0;
20737 }
20738 _ACEOF
20739 rm -f conftest.$ac_objext
20740 if { (eval echo "$as_me:20740: \"$ac_compile\"") >&5
20741   (eval $ac_compile) 2>&5
20742   ac_status=$?
20743   echo "$as_me:20743: \$? = $ac_status" >&5
20744   (exit $ac_status); } &&
20745          { ac_try='test -s conftest.$ac_objext'
20746   { (eval echo "$as_me:20746: \"$ac_try\"") >&5
20747   (eval $ac_try) 2>&5
20748   ac_status=$?
20749   echo "$as_me:20749: \$? = $ac_status" >&5
20750   (exit $ac_status); }; }; then
20751   cf_cv_type_sigaction=yes
20752 else
20753   echo "$as_me: failed program was:" >&5
20754 cat conftest.$ac_ext >&5
20755 cf_cv_type_sigaction=no
20756 fi
20757 rm -f conftest.$ac_objext conftest.$ac_ext
20758 fi
20759
20760 echo "$as_me:20760: result: $cf_cv_type_sigaction" >&5
20761 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
20762 test "$cf_cv_type_sigaction" = yes &&
20763 cat >>confdefs.h <<\EOF
20764 #define HAVE_TYPE_SIGACTION 1
20765 EOF
20766
20767 echo "$as_me:20767: checking declaration of size-change" >&5
20768 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
20769 if test "${cf_cv_sizechange+set}" = set; then
20770   echo $ECHO_N "(cached) $ECHO_C" >&6
20771 else
20772
20773         cf_cv_sizechange=unknown
20774         cf_save_CPPFLAGS="$CPPFLAGS"
20775
20776 for cf_opts in "" "NEED_PTEM_H"
20777 do
20778
20779         CPPFLAGS="$cf_save_CPPFLAGS"
20780         if test -n "$cf_opts"
20781         then
20782
20783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20784         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
20785
20786         fi
20787         cat >conftest.$ac_ext <<_ACEOF
20788 #line 20788 "configure"
20789 #include "confdefs.h"
20790 #include <sys/types.h>
20791 #ifdef HAVE_TERMIOS_H
20792 #include <termios.h>
20793 #else
20794 #ifdef HAVE_TERMIO_H
20795 #include <termio.h>
20796 #endif
20797 #endif
20798
20799 #ifdef NEED_PTEM_H
20800 /* This is a workaround for SCO:  they neglected to define struct winsize in
20801  * termios.h -- it's only in termio.h and ptem.h
20802  */
20803 #include <sys/stream.h>
20804 #include <sys/ptem.h>
20805 #endif
20806
20807 #ifdef HAVE_SYS_IOCTL_H
20808 #include <sys/ioctl.h>
20809 #endif
20810
20811 int
20812 main (void)
20813 {
20814
20815 #ifdef TIOCGSIZE
20816         struct ttysize win;     /* SunOS 3.0... */
20817         int y = win.ts_lines;
20818         int x = win.ts_cols;
20819 #else
20820 #ifdef TIOCGWINSZ
20821         struct winsize win;     /* everything else */
20822         int y = win.ws_row;
20823         int x = win.ws_col;
20824 #else
20825         no TIOCGSIZE or TIOCGWINSZ
20826 #endif /* TIOCGWINSZ */
20827 #endif /* TIOCGSIZE */
20828
20829   ;
20830   return 0;
20831 }
20832 _ACEOF
20833 rm -f conftest.$ac_objext
20834 if { (eval echo "$as_me:20834: \"$ac_compile\"") >&5
20835   (eval $ac_compile) 2>&5
20836   ac_status=$?
20837   echo "$as_me:20837: \$? = $ac_status" >&5
20838   (exit $ac_status); } &&
20839          { ac_try='test -s conftest.$ac_objext'
20840   { (eval echo "$as_me:20840: \"$ac_try\"") >&5
20841   (eval $ac_try) 2>&5
20842   ac_status=$?
20843   echo "$as_me:20843: \$? = $ac_status" >&5
20844   (exit $ac_status); }; }; then
20845   cf_cv_sizechange=yes
20846 else
20847   echo "$as_me: failed program was:" >&5
20848 cat conftest.$ac_ext >&5
20849 cf_cv_sizechange=no
20850 fi
20851 rm -f conftest.$ac_objext conftest.$ac_ext
20852
20853         CPPFLAGS="$cf_save_CPPFLAGS"
20854         if test "$cf_cv_sizechange" = yes ; then
20855                 echo "size-change succeeded ($cf_opts)" >&5
20856                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
20857                 break
20858         fi
20859 done
20860
20861 fi
20862 echo "$as_me:20862: result: $cf_cv_sizechange" >&5
20863 echo "${ECHO_T}$cf_cv_sizechange" >&6
20864 if test "$cf_cv_sizechange" != no ; then
20865
20866 cat >>confdefs.h <<\EOF
20867 #define HAVE_SIZECHANGE 1
20868 EOF
20869
20870         case $cf_cv_sizechange in
20871         (NEED*)
20872                 cat >>confdefs.h <<EOF
20873 #define $cf_cv_sizechange  1
20874 EOF
20875
20876                 ;;
20877         esac
20878 fi
20879
20880 echo "$as_me:20880: checking for memmove" >&5
20881 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
20882 if test "${ac_cv_func_memmove+set}" = set; then
20883   echo $ECHO_N "(cached) $ECHO_C" >&6
20884 else
20885   cat >conftest.$ac_ext <<_ACEOF
20886 #line 20886 "configure"
20887 #include "confdefs.h"
20888 #define memmove autoconf_temporary
20889 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20890 #undef memmove
20891
20892 #ifdef __cplusplus
20893 extern "C"
20894 #endif
20895
20896 /* We use char because int might match the return type of a gcc2
20897    builtin and then its argument prototype would still apply.  */
20898 char memmove (void);
20899
20900 int
20901 main (void)
20902 {
20903
20904 /* The GNU C library defines stubs for functions which it implements
20905     to always fail with ENOSYS.  Some functions are actually named
20906     something starting with __ and the normal name is an alias.  */
20907 #if defined (__stub_memmove) || defined (__stub___memmove)
20908 #error found stub for memmove
20909 #endif
20910
20911         return memmove ();
20912   ;
20913   return 0;
20914 }
20915 _ACEOF
20916 rm -f conftest.$ac_objext conftest$ac_exeext
20917 if { (eval echo "$as_me:20917: \"$ac_link\"") >&5
20918   (eval $ac_link) 2>&5
20919   ac_status=$?
20920   echo "$as_me:20920: \$? = $ac_status" >&5
20921   (exit $ac_status); } &&
20922          { ac_try='test -s conftest$ac_exeext'
20923   { (eval echo "$as_me:20923: \"$ac_try\"") >&5
20924   (eval $ac_try) 2>&5
20925   ac_status=$?
20926   echo "$as_me:20926: \$? = $ac_status" >&5
20927   (exit $ac_status); }; }; then
20928   ac_cv_func_memmove=yes
20929 else
20930   echo "$as_me: failed program was:" >&5
20931 cat conftest.$ac_ext >&5
20932 ac_cv_func_memmove=no
20933 fi
20934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20935 fi
20936 echo "$as_me:20936: result: $ac_cv_func_memmove" >&5
20937 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20938 if test $ac_cv_func_memmove = yes; then
20939   :
20940 else
20941
20942 echo "$as_me:20942: checking for bcopy" >&5
20943 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20944 if test "${ac_cv_func_bcopy+set}" = set; then
20945   echo $ECHO_N "(cached) $ECHO_C" >&6
20946 else
20947   cat >conftest.$ac_ext <<_ACEOF
20948 #line 20948 "configure"
20949 #include "confdefs.h"
20950 #define bcopy autoconf_temporary
20951 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20952 #undef bcopy
20953
20954 #ifdef __cplusplus
20955 extern "C"
20956 #endif
20957
20958 /* We use char because int might match the return type of a gcc2
20959    builtin and then its argument prototype would still apply.  */
20960 char bcopy (void);
20961
20962 int
20963 main (void)
20964 {
20965
20966 /* The GNU C library defines stubs for functions which it implements
20967     to always fail with ENOSYS.  Some functions are actually named
20968     something starting with __ and the normal name is an alias.  */
20969 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20970 #error found stub for bcopy
20971 #endif
20972
20973         return bcopy ();
20974   ;
20975   return 0;
20976 }
20977 _ACEOF
20978 rm -f conftest.$ac_objext conftest$ac_exeext
20979 if { (eval echo "$as_me:20979: \"$ac_link\"") >&5
20980   (eval $ac_link) 2>&5
20981   ac_status=$?
20982   echo "$as_me:20982: \$? = $ac_status" >&5
20983   (exit $ac_status); } &&
20984          { ac_try='test -s conftest$ac_exeext'
20985   { (eval echo "$as_me:20985: \"$ac_try\"") >&5
20986   (eval $ac_try) 2>&5
20987   ac_status=$?
20988   echo "$as_me:20988: \$? = $ac_status" >&5
20989   (exit $ac_status); }; }; then
20990   ac_cv_func_bcopy=yes
20991 else
20992   echo "$as_me: failed program was:" >&5
20993 cat conftest.$ac_ext >&5
20994 ac_cv_func_bcopy=no
20995 fi
20996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20997 fi
20998 echo "$as_me:20998: result: $ac_cv_func_bcopy" >&5
20999 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21000 if test $ac_cv_func_bcopy = yes; then
21001
21002         echo "$as_me:21002: checking if bcopy does overlapping moves" >&5
21003 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21004 if test "${cf_cv_good_bcopy+set}" = set; then
21005   echo $ECHO_N "(cached) $ECHO_C" >&6
21006 else
21007
21008                 if test "$cross_compiling" = yes; then
21009   cf_cv_good_bcopy=unknown
21010 else
21011   cat >conftest.$ac_ext <<_ACEOF
21012 #line 21012 "configure"
21013 #include "confdefs.h"
21014
21015 int main(void) {
21016         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21017         char temp[40];
21018         bcopy(data, temp, sizeof(data));
21019         bcopy(temp+10, temp, 15);
21020         bcopy(temp+5, temp+15, 10);
21021         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21022 }
21023
21024 _ACEOF
21025 rm -f conftest$ac_exeext
21026 if { (eval echo "$as_me:21026: \"$ac_link\"") >&5
21027   (eval $ac_link) 2>&5
21028   ac_status=$?
21029   echo "$as_me:21029: \$? = $ac_status" >&5
21030   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21031   { (eval echo "$as_me:21031: \"$ac_try\"") >&5
21032   (eval $ac_try) 2>&5
21033   ac_status=$?
21034   echo "$as_me:21034: \$? = $ac_status" >&5
21035   (exit $ac_status); }; }; then
21036   cf_cv_good_bcopy=yes
21037 else
21038   echo "$as_me: program exited with status $ac_status" >&5
21039 echo "$as_me: failed program was:" >&5
21040 cat conftest.$ac_ext >&5
21041 cf_cv_good_bcopy=no
21042 fi
21043 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21044 fi
21045
21046 fi
21047 echo "$as_me:21047: result: $cf_cv_good_bcopy" >&5
21048 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21049
21050 else
21051   cf_cv_good_bcopy=no
21052 fi
21053
21054         if test "$cf_cv_good_bcopy" = yes ; then
21055
21056 cat >>confdefs.h <<\EOF
21057 #define USE_OK_BCOPY 1
21058 EOF
21059
21060         else
21061
21062 cat >>confdefs.h <<\EOF
21063 #define USE_MY_MEMMOVE 1
21064 EOF
21065
21066         fi
21067
21068 fi
21069
21070 tty 2>&1 >/dev/null || {
21071 for ac_func in posix_openpt
21072 do
21073 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21074 echo "$as_me:21074: checking for $ac_func" >&5
21075 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21076 if eval "test \"\${$as_ac_var+set}\" = set"; then
21077   echo $ECHO_N "(cached) $ECHO_C" >&6
21078 else
21079   cat >conftest.$ac_ext <<_ACEOF
21080 #line 21080 "configure"
21081 #include "confdefs.h"
21082 #define $ac_func autoconf_temporary
21083 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21084 #undef $ac_func
21085
21086 #ifdef __cplusplus
21087 extern "C"
21088 #endif
21089
21090 /* We use char because int might match the return type of a gcc2
21091    builtin and then its argument prototype would still apply.  */
21092 char $ac_func (void);
21093
21094 int
21095 main (void)
21096 {
21097
21098 /* The GNU C library defines stubs for functions which it implements
21099     to always fail with ENOSYS.  Some functions are actually named
21100     something starting with __ and the normal name is an alias.  */
21101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21102 #error found stub for $ac_func
21103 #endif
21104
21105         return $ac_func ();
21106   ;
21107   return 0;
21108 }
21109 _ACEOF
21110 rm -f conftest.$ac_objext conftest$ac_exeext
21111 if { (eval echo "$as_me:21111: \"$ac_link\"") >&5
21112   (eval $ac_link) 2>&5
21113   ac_status=$?
21114   echo "$as_me:21114: \$? = $ac_status" >&5
21115   (exit $ac_status); } &&
21116          { ac_try='test -s conftest$ac_exeext'
21117   { (eval echo "$as_me:21117: \"$ac_try\"") >&5
21118   (eval $ac_try) 2>&5
21119   ac_status=$?
21120   echo "$as_me:21120: \$? = $ac_status" >&5
21121   (exit $ac_status); }; }; then
21122   eval "$as_ac_var=yes"
21123 else
21124   echo "$as_me: failed program was:" >&5
21125 cat conftest.$ac_ext >&5
21126 eval "$as_ac_var=no"
21127 fi
21128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21129 fi
21130 echo "$as_me:21130: result: `eval echo '${'$as_ac_var'}'`" >&5
21131 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21132 if test `eval echo '${'$as_ac_var'}'` = yes; then
21133   cat >>confdefs.h <<EOF
21134 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21135 EOF
21136
21137 fi
21138 done
21139  }
21140 echo "$as_me:21140: checking if poll really works" >&5
21141 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21142 if test "${cf_cv_working_poll+set}" = set; then
21143   echo $ECHO_N "(cached) $ECHO_C" >&6
21144 else
21145
21146 if test "$cross_compiling" = yes; then
21147   cf_cv_working_poll=unknown
21148 else
21149   cat >conftest.$ac_ext <<_ACEOF
21150 #line 21150 "configure"
21151 #include "confdefs.h"
21152
21153 #include <stdlib.h>
21154 #include <stdio.h>
21155 #include <unistd.h>
21156 #include <fcntl.h>
21157 #ifdef HAVE_POLL_H
21158 #include <poll.h>
21159 #else
21160 #include <sys/poll.h>
21161 #endif
21162 int main(void) {
21163         struct pollfd myfds;
21164         int ret;
21165
21166         /* check for Darwin bug with respect to "devices" */
21167         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21168         if (myfds.fd < 0)
21169                 myfds.fd = 0;
21170         myfds.events = POLLIN;
21171         myfds.revents = 0;
21172
21173         ret = poll(&myfds, 1, 100);
21174
21175         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21176                 ret = -1;
21177         } else {
21178                 int fd = 0;
21179                 if (!isatty(fd)) {
21180                         fd = open("/dev/tty", 2);       /* O_RDWR */
21181                 }
21182 #ifdef HAVE_POSIX_OPENPT
21183                 if (fd < 0) {
21184                         fd = posix_openpt(O_RDWR);
21185                 }
21186 #endif
21187
21188                 if (fd >= 0) {
21189                         /* also check with standard input */
21190                         myfds.fd = fd;
21191                         myfds.events = POLLIN;
21192                         myfds.revents = 0;
21193                         ret = poll(&myfds, 1, 100);
21194                 } else {
21195                         ret = -1;
21196                 }
21197         }
21198         ${cf_cv_main_return:-return}(ret < 0);
21199 }
21200 _ACEOF
21201 rm -f conftest$ac_exeext
21202 if { (eval echo "$as_me:21202: \"$ac_link\"") >&5
21203   (eval $ac_link) 2>&5
21204   ac_status=$?
21205   echo "$as_me:21205: \$? = $ac_status" >&5
21206   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21207   { (eval echo "$as_me:21207: \"$ac_try\"") >&5
21208   (eval $ac_try) 2>&5
21209   ac_status=$?
21210   echo "$as_me:21210: \$? = $ac_status" >&5
21211   (exit $ac_status); }; }; then
21212   cf_cv_working_poll=yes
21213 else
21214   echo "$as_me: program exited with status $ac_status" >&5
21215 echo "$as_me: failed program was:" >&5
21216 cat conftest.$ac_ext >&5
21217 cf_cv_working_poll=no
21218 fi
21219 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21220 fi
21221 fi
21222 echo "$as_me:21222: result: $cf_cv_working_poll" >&5
21223 echo "${ECHO_T}$cf_cv_working_poll" >&6
21224 test "$cf_cv_working_poll" = "yes" &&
21225 cat >>confdefs.h <<\EOF
21226 #define HAVE_WORKING_POLL 1
21227 EOF
21228
21229 echo "$as_me:21229: checking for va_copy" >&5
21230 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21231 if test "${cf_cv_have_va_copy+set}" = set; then
21232   echo $ECHO_N "(cached) $ECHO_C" >&6
21233 else
21234
21235 cat >conftest.$ac_ext <<_ACEOF
21236 #line 21236 "configure"
21237 #include "confdefs.h"
21238
21239 #include <stdarg.h>
21240
21241 int
21242 main (void)
21243 {
21244
21245         static va_list dst;
21246         static va_list src;
21247         va_copy(dst, src)
21248   ;
21249   return 0;
21250 }
21251 _ACEOF
21252 rm -f conftest.$ac_objext conftest$ac_exeext
21253 if { (eval echo "$as_me:21253: \"$ac_link\"") >&5
21254   (eval $ac_link) 2>&5
21255   ac_status=$?
21256   echo "$as_me:21256: \$? = $ac_status" >&5
21257   (exit $ac_status); } &&
21258          { ac_try='test -s conftest$ac_exeext'
21259   { (eval echo "$as_me:21259: \"$ac_try\"") >&5
21260   (eval $ac_try) 2>&5
21261   ac_status=$?
21262   echo "$as_me:21262: \$? = $ac_status" >&5
21263   (exit $ac_status); }; }; then
21264   cf_cv_have_va_copy=yes
21265 else
21266   echo "$as_me: failed program was:" >&5
21267 cat conftest.$ac_ext >&5
21268 cf_cv_have_va_copy=no
21269 fi
21270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21271 fi
21272 echo "$as_me:21272: result: $cf_cv_have_va_copy" >&5
21273 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21274
21275 if test "$cf_cv_have_va_copy" = yes;
21276 then
21277
21278 cat >>confdefs.h <<\EOF
21279 #define HAVE_VA_COPY 1
21280 EOF
21281
21282 else # !cf_cv_have_va_copy
21283
21284 echo "$as_me:21284: checking for __va_copy" >&5
21285 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21286 if test "${cf_cv_have___va_copy+set}" = set; then
21287   echo $ECHO_N "(cached) $ECHO_C" >&6
21288 else
21289
21290 cat >conftest.$ac_ext <<_ACEOF
21291 #line 21291 "configure"
21292 #include "confdefs.h"
21293
21294 #include <stdarg.h>
21295
21296 int
21297 main (void)
21298 {
21299
21300         static va_list dst;
21301         static va_list src;
21302         __va_copy(dst, src)
21303   ;
21304   return 0;
21305 }
21306 _ACEOF
21307 rm -f conftest.$ac_objext conftest$ac_exeext
21308 if { (eval echo "$as_me:21308: \"$ac_link\"") >&5
21309   (eval $ac_link) 2>&5
21310   ac_status=$?
21311   echo "$as_me:21311: \$? = $ac_status" >&5
21312   (exit $ac_status); } &&
21313          { ac_try='test -s conftest$ac_exeext'
21314   { (eval echo "$as_me:21314: \"$ac_try\"") >&5
21315   (eval $ac_try) 2>&5
21316   ac_status=$?
21317   echo "$as_me:21317: \$? = $ac_status" >&5
21318   (exit $ac_status); }; }; then
21319   cf_cv_have___va_copy=yes
21320 else
21321   echo "$as_me: failed program was:" >&5
21322 cat conftest.$ac_ext >&5
21323 cf_cv_have___va_copy=no
21324 fi
21325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21326 fi
21327 echo "$as_me:21327: result: $cf_cv_have___va_copy" >&5
21328 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21329
21330 if test "$cf_cv_have___va_copy" = yes
21331 then
21332
21333 cat >>confdefs.h <<\EOF
21334 #define HAVE___VA_COPY 1
21335 EOF
21336
21337 else # !cf_cv_have___va_copy
21338
21339 echo "$as_me:21339: checking for __builtin_va_copy" >&5
21340 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21341 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21342   echo $ECHO_N "(cached) $ECHO_C" >&6
21343 else
21344
21345 cat >conftest.$ac_ext <<_ACEOF
21346 #line 21346 "configure"
21347 #include "confdefs.h"
21348
21349 #include <stdarg.h>
21350
21351 int
21352 main (void)
21353 {
21354
21355         static va_list dst;
21356         static va_list src;
21357         __builtin_va_copy(dst, src)
21358   ;
21359   return 0;
21360 }
21361 _ACEOF
21362 rm -f conftest.$ac_objext conftest$ac_exeext
21363 if { (eval echo "$as_me:21363: \"$ac_link\"") >&5
21364   (eval $ac_link) 2>&5
21365   ac_status=$?
21366   echo "$as_me:21366: \$? = $ac_status" >&5
21367   (exit $ac_status); } &&
21368          { ac_try='test -s conftest$ac_exeext'
21369   { (eval echo "$as_me:21369: \"$ac_try\"") >&5
21370   (eval $ac_try) 2>&5
21371   ac_status=$?
21372   echo "$as_me:21372: \$? = $ac_status" >&5
21373   (exit $ac_status); }; }; then
21374   cf_cv_have___builtin_va_copy=yes
21375 else
21376   echo "$as_me: failed program was:" >&5
21377 cat conftest.$ac_ext >&5
21378 cf_cv_have___builtin_va_copy=no
21379 fi
21380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21381 fi
21382 echo "$as_me:21382: result: $cf_cv_have___builtin_va_copy" >&5
21383 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21384
21385 test "$cf_cv_have___builtin_va_copy" = yes &&
21386
21387 cat >>confdefs.h <<\EOF
21388 #define HAVE___BUILTIN_VA_COPY 1
21389 EOF
21390
21391 fi # cf_cv_have___va_copy
21392
21393 fi # cf_cv_have_va_copy
21394
21395 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21396 (*yes*)
21397         ;;
21398
21399 (*)
21400         echo "$as_me:21400: checking if we can simply copy va_list" >&5
21401 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21402 if test "${cf_cv_pointer_va_list+set}" = set; then
21403   echo $ECHO_N "(cached) $ECHO_C" >&6
21404 else
21405
21406 cat >conftest.$ac_ext <<_ACEOF
21407 #line 21407 "configure"
21408 #include "confdefs.h"
21409
21410 #include <stdarg.h>
21411
21412 int
21413 main (void)
21414 {
21415
21416         va_list dst;
21417         va_list src;
21418         dst = src
21419   ;
21420   return 0;
21421 }
21422 _ACEOF
21423 rm -f conftest.$ac_objext conftest$ac_exeext
21424 if { (eval echo "$as_me:21424: \"$ac_link\"") >&5
21425   (eval $ac_link) 2>&5
21426   ac_status=$?
21427   echo "$as_me:21427: \$? = $ac_status" >&5
21428   (exit $ac_status); } &&
21429          { ac_try='test -s conftest$ac_exeext'
21430   { (eval echo "$as_me:21430: \"$ac_try\"") >&5
21431   (eval $ac_try) 2>&5
21432   ac_status=$?
21433   echo "$as_me:21433: \$? = $ac_status" >&5
21434   (exit $ac_status); }; }; then
21435   cf_cv_pointer_va_list=yes
21436 else
21437   echo "$as_me: failed program was:" >&5
21438 cat conftest.$ac_ext >&5
21439 cf_cv_pointer_va_list=no
21440 fi
21441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21442 fi
21443 echo "$as_me:21443: result: $cf_cv_pointer_va_list" >&5
21444 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21445
21446         if test "$cf_cv_pointer_va_list" = no
21447         then
21448                 echo "$as_me:21448: checking if we can copy va_list indirectly" >&5
21449 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21450 if test "${cf_cv_array_va_list+set}" = set; then
21451   echo $ECHO_N "(cached) $ECHO_C" >&6
21452 else
21453
21454 cat >conftest.$ac_ext <<_ACEOF
21455 #line 21455 "configure"
21456 #include "confdefs.h"
21457
21458 #include <stdarg.h>
21459
21460 int
21461 main (void)
21462 {
21463
21464         va_list dst;
21465         va_list src;
21466         *dst = *src
21467   ;
21468   return 0;
21469 }
21470 _ACEOF
21471 rm -f conftest.$ac_objext conftest$ac_exeext
21472 if { (eval echo "$as_me:21472: \"$ac_link\"") >&5
21473   (eval $ac_link) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit $ac_status); } &&
21477          { ac_try='test -s conftest$ac_exeext'
21478   { (eval echo "$as_me:21478: \"$ac_try\"") >&5
21479   (eval $ac_try) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit $ac_status); }; }; then
21483   cf_cv_array_va_list=yes
21484 else
21485   echo "$as_me: failed program was:" >&5
21486 cat conftest.$ac_ext >&5
21487 cf_cv_array_va_list=no
21488 fi
21489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21490 fi
21491 echo "$as_me:21491: result: $cf_cv_array_va_list" >&5
21492 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21493                 test "$cf_cv_array_va_list" = yes &&
21494 cat >>confdefs.h <<\EOF
21495 #define ARRAY_VA_LIST 1
21496 EOF
21497
21498         fi
21499         ;;
21500 esac
21501
21502 echo "$as_me:21502: checking for pid_t" >&5
21503 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21504 if test "${ac_cv_type_pid_t+set}" = set; then
21505   echo $ECHO_N "(cached) $ECHO_C" >&6
21506 else
21507   cat >conftest.$ac_ext <<_ACEOF
21508 #line 21508 "configure"
21509 #include "confdefs.h"
21510 $ac_includes_default
21511 int
21512 main (void)
21513 {
21514 if ((pid_t *) 0)
21515   return 0;
21516 if (sizeof (pid_t))
21517   return 0;
21518   ;
21519   return 0;
21520 }
21521 _ACEOF
21522 rm -f conftest.$ac_objext
21523 if { (eval echo "$as_me:21523: \"$ac_compile\"") >&5
21524   (eval $ac_compile) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit $ac_status); } &&
21528          { ac_try='test -s conftest.$ac_objext'
21529   { (eval echo "$as_me:21529: \"$ac_try\"") >&5
21530   (eval $ac_try) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit $ac_status); }; }; then
21534   ac_cv_type_pid_t=yes
21535 else
21536   echo "$as_me: failed program was:" >&5
21537 cat conftest.$ac_ext >&5
21538 ac_cv_type_pid_t=no
21539 fi
21540 rm -f conftest.$ac_objext conftest.$ac_ext
21541 fi
21542 echo "$as_me:21542: result: $ac_cv_type_pid_t" >&5
21543 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21544 if test $ac_cv_type_pid_t = yes; then
21545   :
21546 else
21547
21548 cat >>confdefs.h <<EOF
21549 #define pid_t int
21550 EOF
21551
21552 fi
21553
21554 for ac_header in unistd.h vfork.h
21555 do
21556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21557 echo "$as_me:21557: checking for $ac_header" >&5
21558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21560   echo $ECHO_N "(cached) $ECHO_C" >&6
21561 else
21562   cat >conftest.$ac_ext <<_ACEOF
21563 #line 21563 "configure"
21564 #include "confdefs.h"
21565 #include <$ac_header>
21566 _ACEOF
21567 if { (eval echo "$as_me:21567: \"$ac_cpp conftest.$ac_ext\"") >&5
21568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21569   ac_status=$?
21570   egrep -v '^ *\+' conftest.er1 >conftest.err
21571   rm -f conftest.er1
21572   cat conftest.err >&5
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit $ac_status); } >/dev/null; then
21575   if test -s conftest.err; then
21576     ac_cpp_err=$ac_c_preproc_warn_flag
21577   else
21578     ac_cpp_err=
21579   fi
21580 else
21581   ac_cpp_err=yes
21582 fi
21583 if test -z "$ac_cpp_err"; then
21584   eval "$as_ac_Header=yes"
21585 else
21586   echo "$as_me: failed program was:" >&5
21587   cat conftest.$ac_ext >&5
21588   eval "$as_ac_Header=no"
21589 fi
21590 rm -f conftest.err conftest.$ac_ext
21591 fi
21592 echo "$as_me:21592: result: `eval echo '${'$as_ac_Header'}'`" >&5
21593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21595   cat >>confdefs.h <<EOF
21596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21597 EOF
21598
21599 fi
21600 done
21601
21602 for ac_func in fork vfork
21603 do
21604 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21605 echo "$as_me:21605: checking for $ac_func" >&5
21606 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21607 if eval "test \"\${$as_ac_var+set}\" = set"; then
21608   echo $ECHO_N "(cached) $ECHO_C" >&6
21609 else
21610   cat >conftest.$ac_ext <<_ACEOF
21611 #line 21611 "configure"
21612 #include "confdefs.h"
21613 #define $ac_func autoconf_temporary
21614 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21615 #undef $ac_func
21616
21617 #ifdef __cplusplus
21618 extern "C"
21619 #endif
21620
21621 /* We use char because int might match the return type of a gcc2
21622    builtin and then its argument prototype would still apply.  */
21623 char $ac_func (void);
21624
21625 int
21626 main (void)
21627 {
21628
21629 /* The GNU C library defines stubs for functions which it implements
21630     to always fail with ENOSYS.  Some functions are actually named
21631     something starting with __ and the normal name is an alias.  */
21632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21633 #error found stub for $ac_func
21634 #endif
21635
21636         return $ac_func ();
21637   ;
21638   return 0;
21639 }
21640 _ACEOF
21641 rm -f conftest.$ac_objext conftest$ac_exeext
21642 if { (eval echo "$as_me:21642: \"$ac_link\"") >&5
21643   (eval $ac_link) 2>&5
21644   ac_status=$?
21645   echo "$as_me:21645: \$? = $ac_status" >&5
21646   (exit $ac_status); } &&
21647          { ac_try='test -s conftest$ac_exeext'
21648   { (eval echo "$as_me:21648: \"$ac_try\"") >&5
21649   (eval $ac_try) 2>&5
21650   ac_status=$?
21651   echo "$as_me:21651: \$? = $ac_status" >&5
21652   (exit $ac_status); }; }; then
21653   eval "$as_ac_var=yes"
21654 else
21655   echo "$as_me: failed program was:" >&5
21656 cat conftest.$ac_ext >&5
21657 eval "$as_ac_var=no"
21658 fi
21659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21660 fi
21661 echo "$as_me:21661: result: `eval echo '${'$as_ac_var'}'`" >&5
21662 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21663 if test `eval echo '${'$as_ac_var'}'` = yes; then
21664   cat >>confdefs.h <<EOF
21665 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21666 EOF
21667
21668 fi
21669 done
21670
21671 ac_cv_func_fork_works=$ac_cv_func_fork
21672 if test "x$ac_cv_func_fork" = xyes; then
21673   echo "$as_me:21673: checking for working fork" >&5
21674 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
21675 if test "${ac_cv_func_fork_works+set}" = set; then
21676   echo $ECHO_N "(cached) $ECHO_C" >&6
21677 else
21678   if test "$cross_compiling" = yes; then
21679   ac_cv_func_fork_works=cross
21680 else
21681   cat >conftest.$ac_ext <<_ACEOF
21682 /* By Rüdiger Kuhlmann. */
21683       #include <sys/types.h>
21684       #if HAVE_UNISTD_H
21685       # include <unistd.h>
21686       #endif
21687       /* Some systems only have a dummy stub for fork() */
21688       int main (void)
21689       {
21690         if (fork() < 0)
21691           $ac_main_return (1);
21692         $ac_main_return (0);
21693       }
21694 _ACEOF
21695 rm -f conftest$ac_exeext
21696 if { (eval echo "$as_me:21696: \"$ac_link\"") >&5
21697   (eval $ac_link) 2>&5
21698   ac_status=$?
21699   echo "$as_me:21699: \$? = $ac_status" >&5
21700   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21701   { (eval echo "$as_me:21701: \"$ac_try\"") >&5
21702   (eval $ac_try) 2>&5
21703   ac_status=$?
21704   echo "$as_me:21704: \$? = $ac_status" >&5
21705   (exit $ac_status); }; }; then
21706   ac_cv_func_fork_works=yes
21707 else
21708   echo "$as_me: program exited with status $ac_status" >&5
21709 echo "$as_me: failed program was:" >&5
21710 cat conftest.$ac_ext >&5
21711 ac_cv_func_fork_works=no
21712 fi
21713 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21714 fi
21715 fi
21716 echo "$as_me:21716: result: $ac_cv_func_fork_works" >&5
21717 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
21718
21719 fi
21720 if test "x$ac_cv_func_fork_works" = xcross; then
21721   case $host in
21722     *-*-amigaos* | *-*-msdosdjgpp*)
21723       # Override, as these systems have only a dummy fork() stub
21724       ac_cv_func_fork_works=no
21725       ;;
21726     *)
21727       ac_cv_func_fork_works=yes
21728       ;;
21729   esac
21730   { echo "$as_me:21730: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
21731 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
21732 fi
21733 ac_cv_func_vfork_works=$ac_cv_func_vfork
21734 if test "x$ac_cv_func_vfork" = xyes; then
21735   echo "$as_me:21735: checking for working vfork" >&5
21736 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
21737 if test "${ac_cv_func_vfork_works+set}" = set; then
21738   echo $ECHO_N "(cached) $ECHO_C" >&6
21739 else
21740   if test "$cross_compiling" = yes; then
21741   ac_cv_func_vfork_works=cross
21742 else
21743   cat >conftest.$ac_ext <<_ACEOF
21744 #line 21744 "configure"
21745 #include "confdefs.h"
21746 /* Thanks to Paul Eggert for this test.  */
21747 #include <stdio.h>
21748 #include <sys/types.h>
21749 #include <sys/stat.h>
21750 #if HAVE_UNISTD_H
21751 # include <unistd.h>
21752 #endif
21753 #if HAVE_VFORK_H
21754 # include <vfork.h>
21755 #endif
21756 /* On some sparc systems, changes by the child to local and incoming
21757    argument registers are propagated back to the parent.  The compiler
21758    is told about this with #include <vfork.h>, but some compilers
21759    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
21760    static variable whose address is put into a register that is
21761    clobbered by the vfork.  */
21762 static
21763 #ifdef __cplusplus
21764 sparc_address_test (int arg)
21765 # else
21766 sparc_address_test (arg) int arg;
21767 #endif
21768 {
21769   static pid_t child;
21770   if (!child) {
21771     child = vfork ();
21772     if (child < 0) {
21773       perror ("vfork");
21774       _exit(2);
21775     }
21776     if (!child) {
21777       arg = getpid();
21778       write(-1, "", 0);
21779       _exit (arg);
21780     }
21781   }
21782 }
21783
21784 int
21785 main (void)
21786 {
21787   pid_t parent = getpid ();
21788   pid_t child;
21789
21790   sparc_address_test ();
21791
21792   child = vfork ();
21793
21794   if (child == 0) {
21795     /* Here is another test for sparc vfork register problems.  This
21796        test uses lots of local variables, at least as many local
21797        variables as main has allocated so far including compiler
21798        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
21799        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
21800        reuse the register of parent for one of the local variables,
21801        since it will think that parent can't possibly be used any more
21802        in this routine.  Assigning to the local variable will thus
21803        munge parent in the parent process.  */
21804     pid_t
21805       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
21806       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
21807     /* Convince the compiler that p..p7 are live; otherwise, it might
21808        use the same hardware register for all 8 local variables.  */
21809     if (p != p1 || p != p2 || p != p3 || p != p4
21810         || p != p5 || p != p6 || p != p7)
21811       _exit(1);
21812
21813     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
21814        from child file descriptors.  If the child closes a descriptor
21815        before it execs or exits, this munges the parent's descriptor
21816        as well.  Test for this by closing stdout in the child.  */
21817     _exit(close(fileno(stdout)) != 0);
21818   } else {
21819     int status;
21820     struct stat st;
21821
21822     while (wait(&status) != child)
21823       ;
21824     $ac_main_return(
21825          /* Was there some problem with vforking?  */
21826          child < 0
21827
21828          /* Did the child fail?  (This shouldn't happen.)  */
21829          || status
21830
21831          /* Did the vfork/compiler bug occur?  */
21832          || parent != getpid()
21833
21834          /* Did the file descriptor bug occur?  */
21835          || fstat(fileno(stdout), &st) != 0
21836          );
21837   }
21838 }
21839 _ACEOF
21840 rm -f conftest$ac_exeext
21841 if { (eval echo "$as_me:21841: \"$ac_link\"") >&5
21842   (eval $ac_link) 2>&5
21843   ac_status=$?
21844   echo "$as_me:21844: \$? = $ac_status" >&5
21845   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21846   { (eval echo "$as_me:21846: \"$ac_try\"") >&5
21847   (eval $ac_try) 2>&5
21848   ac_status=$?
21849   echo "$as_me:21849: \$? = $ac_status" >&5
21850   (exit $ac_status); }; }; then
21851   ac_cv_func_vfork_works=yes
21852 else
21853   echo "$as_me: program exited with status $ac_status" >&5
21854 echo "$as_me: failed program was:" >&5
21855 cat conftest.$ac_ext >&5
21856 ac_cv_func_vfork_works=no
21857 fi
21858 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21859 fi
21860 fi
21861 echo "$as_me:21861: result: $ac_cv_func_vfork_works" >&5
21862 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
21863
21864 fi;
21865 if test "x$ac_cv_func_fork_works" = xcross; then
21866   ac_cv_func_vfork_works=ac_cv_func_vfork
21867   { echo "$as_me:21867: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
21868 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
21869 fi
21870
21871 if test "x$ac_cv_func_vfork_works" = xyes; then
21872
21873 cat >>confdefs.h <<\EOF
21874 #define HAVE_WORKING_VFORK 1
21875 EOF
21876
21877 else
21878
21879 cat >>confdefs.h <<\EOF
21880 #define vfork fork
21881 EOF
21882
21883 fi
21884 if test "x$ac_cv_func_fork_works" = xyes; then
21885
21886 cat >>confdefs.h <<\EOF
21887 #define HAVE_WORKING_FORK 1
21888 EOF
21889
21890 fi
21891
21892 echo "$as_me:21892: checking if fopen accepts explicit binary mode" >&5
21893 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
21894 if test "${cf_cv_fopen_bin_r+set}" = set; then
21895   echo $ECHO_N "(cached) $ECHO_C" >&6
21896 else
21897
21898         if test "$cross_compiling" = yes; then
21899   cf_cv_fopen_bin_r=unknown
21900 else
21901   cat >conftest.$ac_ext <<_ACEOF
21902 #line 21902 "configure"
21903 #include "confdefs.h"
21904
21905 #include <stdio.h>
21906 int main(void) {
21907         FILE *fp = fopen("conftest.tmp", "wb");
21908         int rc = 0;
21909         if (fp != 0) {
21910                 int p, q;
21911                 for (p = 0; p < 256; ++p) {
21912                         fputc(p, fp);
21913                 }
21914                 fclose(fp);
21915                 fp = fopen("conftest.tmp", "rb");
21916                 if (fp != 0) {
21917                         for (p = 0; p < 256; ++p) {
21918                                 q = fgetc(fp);
21919                                 if (q != p) {
21920                                         rc = 1;
21921                                         break;
21922                                 }
21923                         }
21924                 } else {
21925                         rc = 1;
21926                 }
21927         } else {
21928                 rc = 1;
21929         }
21930         ${cf_cv_main_return:-return} (rc);
21931 }
21932
21933 _ACEOF
21934 rm -f conftest$ac_exeext
21935 if { (eval echo "$as_me:21935: \"$ac_link\"") >&5
21936   (eval $ac_link) 2>&5
21937   ac_status=$?
21938   echo "$as_me:21938: \$? = $ac_status" >&5
21939   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21940   { (eval echo "$as_me:21940: \"$ac_try\"") >&5
21941   (eval $ac_try) 2>&5
21942   ac_status=$?
21943   echo "$as_me:21943: \$? = $ac_status" >&5
21944   (exit $ac_status); }; }; then
21945   cf_cv_fopen_bin_r=yes
21946 else
21947   echo "$as_me: program exited with status $ac_status" >&5
21948 echo "$as_me: failed program was:" >&5
21949 cat conftest.$ac_ext >&5
21950 cf_cv_fopen_bin_r=no
21951 fi
21952 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21953 fi
21954
21955 fi
21956 echo "$as_me:21956: result: $cf_cv_fopen_bin_r" >&5
21957 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
21958 test "x$cf_cv_fopen_bin_r" != xno &&
21959 cat >>confdefs.h <<\EOF
21960 #define USE_FOPEN_BIN_R 1
21961 EOF
21962
21963 # special check for test/ditto.c
21964
21965 echo "$as_me:21965: checking for openpty in -lutil" >&5
21966 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
21967 if test "${ac_cv_lib_util_openpty+set}" = set; then
21968   echo $ECHO_N "(cached) $ECHO_C" >&6
21969 else
21970   ac_check_lib_save_LIBS=$LIBS
21971 LIBS="-lutil  $LIBS"
21972 cat >conftest.$ac_ext <<_ACEOF
21973 #line 21973 "configure"
21974 #include "confdefs.h"
21975
21976 /* Override any gcc2 internal prototype to avoid an error.  */
21977 #ifdef __cplusplus
21978 extern "C"
21979 #endif
21980 /* We use char because int might match the return type of a gcc2
21981    builtin and then its argument prototype would still apply.  */
21982 char openpty ();
21983 int
21984 main (void)
21985 {
21986 openpty ();
21987   ;
21988   return 0;
21989 }
21990 _ACEOF
21991 rm -f conftest.$ac_objext conftest$ac_exeext
21992 if { (eval echo "$as_me:21992: \"$ac_link\"") >&5
21993   (eval $ac_link) 2>&5
21994   ac_status=$?
21995   echo "$as_me:21995: \$? = $ac_status" >&5
21996   (exit $ac_status); } &&
21997          { ac_try='test -s conftest$ac_exeext'
21998   { (eval echo "$as_me:21998: \"$ac_try\"") >&5
21999   (eval $ac_try) 2>&5
22000   ac_status=$?
22001   echo "$as_me:22001: \$? = $ac_status" >&5
22002   (exit $ac_status); }; }; then
22003   ac_cv_lib_util_openpty=yes
22004 else
22005   echo "$as_me: failed program was:" >&5
22006 cat conftest.$ac_ext >&5
22007 ac_cv_lib_util_openpty=no
22008 fi
22009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22010 LIBS=$ac_check_lib_save_LIBS
22011 fi
22012 echo "$as_me:22012: result: $ac_cv_lib_util_openpty" >&5
22013 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22014 if test $ac_cv_lib_util_openpty = yes; then
22015   cf_cv_lib_util=yes
22016 else
22017   cf_cv_lib_util=no
22018 fi
22019
22020 echo "$as_me:22020: checking for openpty header" >&5
22021 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22022 if test "${cf_cv_func_openpty+set}" = set; then
22023   echo $ECHO_N "(cached) $ECHO_C" >&6
22024 else
22025
22026         cf_save_LIBS="$LIBS"
22027         test $cf_cv_lib_util = yes && {
22028 cf_add_libs="$LIBS"
22029 # reverse order
22030 cf_add_0lib=
22031 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22032 # filter duplicates
22033 for cf_add_1lib in $cf_add_0lib; do
22034         for cf_add_2lib in $cf_add_libs; do
22035                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22036                         cf_add_1lib=
22037                         break
22038                 fi
22039         done
22040         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22041 done
22042 LIBS="$cf_add_libs"
22043  }
22044         for cf_header in pty.h libutil.h util.h
22045         do
22046         cat >conftest.$ac_ext <<_ACEOF
22047 #line 22047 "configure"
22048 #include "confdefs.h"
22049
22050 #include <$cf_header>
22051
22052 int
22053 main (void)
22054 {
22055
22056         int x = openpty((int *)0, (int *)0, (char *)0,
22057                                    (struct termios *)0, (struct winsize *)0);
22058
22059   ;
22060   return 0;
22061 }
22062 _ACEOF
22063 rm -f conftest.$ac_objext conftest$ac_exeext
22064 if { (eval echo "$as_me:22064: \"$ac_link\"") >&5
22065   (eval $ac_link) 2>&5
22066   ac_status=$?
22067   echo "$as_me:22067: \$? = $ac_status" >&5
22068   (exit $ac_status); } &&
22069          { ac_try='test -s conftest$ac_exeext'
22070   { (eval echo "$as_me:22070: \"$ac_try\"") >&5
22071   (eval $ac_try) 2>&5
22072   ac_status=$?
22073   echo "$as_me:22073: \$? = $ac_status" >&5
22074   (exit $ac_status); }; }; then
22075
22076                 cf_cv_func_openpty=$cf_header
22077                 break
22078
22079 else
22080   echo "$as_me: failed program was:" >&5
22081 cat conftest.$ac_ext >&5
22082
22083                 cf_cv_func_openpty=no
22084
22085 fi
22086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22087         done
22088         LIBS="$cf_save_LIBS"
22089
22090 fi
22091 echo "$as_me:22091: result: $cf_cv_func_openpty" >&5
22092 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22093
22094 if test "$cf_cv_func_openpty" != no ; then
22095
22096 cat >>confdefs.h <<EOF
22097 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22098 EOF
22099
22100 cat >>confdefs.h <<\EOF
22101 #define USE_XTERM_PTY 1
22102 EOF
22103
22104         if test "x$cf_cv_lib_util" = xyes ; then
22105
22106 cf_add_libs="$TEST_LIBS"
22107 # reverse order
22108 cf_add_0lib=
22109 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22110 # filter duplicates
22111 for cf_add_1lib in $cf_add_0lib; do
22112         for cf_add_2lib in $cf_add_libs; do
22113                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22114                         cf_add_1lib=
22115                         break
22116                 fi
22117         done
22118         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22119 done
22120 TEST_LIBS="$cf_add_libs"
22121
22122         fi
22123 fi
22124
22125 if test "$with_hashed_db" != no ; then
22126
22127 cat >>confdefs.h <<\EOF
22128 #define USE_HASHED_DB 1
22129 EOF
22130
22131 case $with_hashed_db in
22132 (yes|*able*)
22133         ;;
22134 (*)
22135         if test -d "$with_hashed_db" ; then
22136
22137 if test -n "$with_hashed_db/include" ; then
22138   for cf_add_incdir in $with_hashed_db/include
22139   do
22140         while test $cf_add_incdir != /usr/include
22141         do
22142           if test -d $cf_add_incdir
22143           then
22144                 cf_have_incdir=no
22145                 if test -n "$CFLAGS$CPPFLAGS" ; then
22146                   # a loop is needed to ensure we can add subdirs of existing dirs
22147                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22148                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22149                           cf_have_incdir=yes; break
22150                         fi
22151                   done
22152                 fi
22153
22154                 if test "$cf_have_incdir" = no ; then
22155                   if test "$cf_add_incdir" = /usr/local/include ; then
22156                         if test "$GCC" = yes
22157                         then
22158                           cf_save_CPPFLAGS=$CPPFLAGS
22159
22160         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22161         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22162
22163                           cat >conftest.$ac_ext <<_ACEOF
22164 #line 22164 "configure"
22165 #include "confdefs.h"
22166 #include <stdio.h>
22167 int
22168 main (void)
22169 {
22170 printf("Hello")
22171   ;
22172   return 0;
22173 }
22174 _ACEOF
22175 rm -f conftest.$ac_objext
22176 if { (eval echo "$as_me:22176: \"$ac_compile\"") >&5
22177   (eval $ac_compile) 2>&5
22178   ac_status=$?
22179   echo "$as_me:22179: \$? = $ac_status" >&5
22180   (exit $ac_status); } &&
22181          { ac_try='test -s conftest.$ac_objext'
22182   { (eval echo "$as_me:22182: \"$ac_try\"") >&5
22183   (eval $ac_try) 2>&5
22184   ac_status=$?
22185   echo "$as_me:22185: \$? = $ac_status" >&5
22186   (exit $ac_status); }; }; then
22187   :
22188 else
22189   echo "$as_me: failed program was:" >&5
22190 cat conftest.$ac_ext >&5
22191 cf_have_incdir=yes
22192 fi
22193 rm -f conftest.$ac_objext conftest.$ac_ext
22194                           CPPFLAGS=$cf_save_CPPFLAGS
22195                         fi
22196                   fi
22197                 fi
22198
22199                 if test "$cf_have_incdir" = no ; then
22200                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22201
22202 echo "${as_me:-configure}:22202: testing adding $cf_add_incdir to include-path ..." 1>&5
22203
22204                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22205
22206                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22207                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22208                   cf_add_incdir="$cf_top_incdir"
22209                 else
22210                   break
22211                 fi
22212           else
22213                 break
22214           fi
22215         done
22216   done
22217 fi
22218
22219 if test -n "$with_hashed_db/lib" ; then
22220         for cf_add_libdir in $with_hashed_db/lib
22221         do
22222                 if test $cf_add_libdir = /usr/lib ; then
22223                         :
22224                 elif test -d $cf_add_libdir
22225                 then
22226                         cf_have_libdir=no
22227                         if test -n "$LDFLAGS$LIBS" ; then
22228                                 # a loop is needed to ensure we can add subdirs of existing dirs
22229                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22230                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22231                                                 cf_have_libdir=yes; break
22232                                         fi
22233                                 done
22234                         fi
22235                         if test "$cf_have_libdir" = no ; then
22236                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22237
22238 echo "${as_me:-configure}:22238: testing adding $cf_add_libdir to library-path ..." 1>&5
22239
22240                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22241                         fi
22242                 fi
22243         done
22244 fi
22245
22246         else
22247                 case "$with_hashed_db" in
22248                 (./*|../*|/*)
22249                         { echo "$as_me:22249: WARNING: no such directory $with_hashed_db" >&5
22250 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22251                         ;;
22252                 (*)
22253
22254 cf_search=
22255
22256 test "x$prefix" != "xNONE" && \
22257 test -d "$prefix" && \
22258  {
22259         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22260         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22261         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22262         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22263         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22264         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22265 }
22266
22267 for cf_subdir_prefix in \
22268         /usr \
22269         /usr/local \
22270         /usr/pkg \
22271         /opt \
22272         /opt/local \
22273         $HOME
22274 do
22275
22276 test "x$cf_subdir_prefix" != "x$prefix" && \
22277 test -d "$cf_subdir_prefix" && \
22278 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22279         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22280         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22281         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22282         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22283         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22284         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"
22285 }
22286
22287 done
22288
22289         for cf_item in $cf_search
22290         do
22291                 case $cf_item in
22292                 (*/$with_hashed_db)
22293
22294 if test -n "$cf_item" ; then
22295   for cf_add_incdir in $cf_item
22296   do
22297         while test $cf_add_incdir != /usr/include
22298         do
22299           if test -d $cf_add_incdir
22300           then
22301                 cf_have_incdir=no
22302                 if test -n "$CFLAGS$CPPFLAGS" ; then
22303                   # a loop is needed to ensure we can add subdirs of existing dirs
22304                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22305                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22306                           cf_have_incdir=yes; break
22307                         fi
22308                   done
22309                 fi
22310
22311                 if test "$cf_have_incdir" = no ; then
22312                   if test "$cf_add_incdir" = /usr/local/include ; then
22313                         if test "$GCC" = yes
22314                         then
22315                           cf_save_CPPFLAGS=$CPPFLAGS
22316
22317         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22318         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22319
22320                           cat >conftest.$ac_ext <<_ACEOF
22321 #line 22321 "configure"
22322 #include "confdefs.h"
22323 #include <stdio.h>
22324 int
22325 main (void)
22326 {
22327 printf("Hello")
22328   ;
22329   return 0;
22330 }
22331 _ACEOF
22332 rm -f conftest.$ac_objext
22333 if { (eval echo "$as_me:22333: \"$ac_compile\"") >&5
22334   (eval $ac_compile) 2>&5
22335   ac_status=$?
22336   echo "$as_me:22336: \$? = $ac_status" >&5
22337   (exit $ac_status); } &&
22338          { ac_try='test -s conftest.$ac_objext'
22339   { (eval echo "$as_me:22339: \"$ac_try\"") >&5
22340   (eval $ac_try) 2>&5
22341   ac_status=$?
22342   echo "$as_me:22342: \$? = $ac_status" >&5
22343   (exit $ac_status); }; }; then
22344   :
22345 else
22346   echo "$as_me: failed program was:" >&5
22347 cat conftest.$ac_ext >&5
22348 cf_have_incdir=yes
22349 fi
22350 rm -f conftest.$ac_objext conftest.$ac_ext
22351                           CPPFLAGS=$cf_save_CPPFLAGS
22352                         fi
22353                   fi
22354                 fi
22355
22356                 if test "$cf_have_incdir" = no ; then
22357                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22358
22359 echo "${as_me:-configure}:22359: testing adding $cf_add_incdir to include-path ..." 1>&5
22360
22361                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22362
22363                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22364                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22365                   cf_add_incdir="$cf_top_incdir"
22366                 else
22367                   break
22368                 fi
22369           else
22370                 break
22371           fi
22372         done
22373   done
22374 fi
22375
22376                         ;;
22377                 esac
22378         done
22379
22380 cf_search=
22381
22382 test "x$prefix" != "xNONE" && \
22383 test -d "$prefix" && \
22384  {
22385         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22386         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22387         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22388         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22389         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22390         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22391 }
22392
22393 for cf_subdir_prefix in \
22394         /usr \
22395         /usr/local \
22396         /usr/pkg \
22397         /opt \
22398         /opt/local \
22399         $HOME
22400 do
22401
22402 test "x$cf_subdir_prefix" != "x$prefix" && \
22403 test -d "$cf_subdir_prefix" && \
22404 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22405         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22406         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22407         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22408         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22409         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22410         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"
22411 }
22412
22413 done
22414
22415         for cf_item in $cf_search
22416         do
22417                 case $cf_item in
22418                 (*/$with_hashed_db)
22419
22420 if test -n "$cf_item" ; then
22421         for cf_add_libdir in $cf_item
22422         do
22423                 if test $cf_add_libdir = /usr/lib ; then
22424                         :
22425                 elif test -d $cf_add_libdir
22426                 then
22427                         cf_have_libdir=no
22428                         if test -n "$LDFLAGS$LIBS" ; then
22429                                 # a loop is needed to ensure we can add subdirs of existing dirs
22430                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22431                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22432                                                 cf_have_libdir=yes; break
22433                                         fi
22434                                 done
22435                         fi
22436                         if test "$cf_have_libdir" = no ; then
22437                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22438
22439 echo "${as_me:-configure}:22439: testing adding $cf_add_libdir to library-path ..." 1>&5
22440
22441                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22442                         fi
22443                 fi
22444         done
22445 fi
22446
22447                         ;;
22448                 esac
22449         done
22450
22451                         ;;
22452                 esac
22453         fi
22454 esac
22455
22456 echo "$as_me:22456: checking for db.h" >&5
22457 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22458 if test "${ac_cv_header_db_h+set}" = set; then
22459   echo $ECHO_N "(cached) $ECHO_C" >&6
22460 else
22461   cat >conftest.$ac_ext <<_ACEOF
22462 #line 22462 "configure"
22463 #include "confdefs.h"
22464 #include <db.h>
22465 _ACEOF
22466 if { (eval echo "$as_me:22466: \"$ac_cpp conftest.$ac_ext\"") >&5
22467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22468   ac_status=$?
22469   egrep -v '^ *\+' conftest.er1 >conftest.err
22470   rm -f conftest.er1
22471   cat conftest.err >&5
22472   echo "$as_me:22472: \$? = $ac_status" >&5
22473   (exit $ac_status); } >/dev/null; then
22474   if test -s conftest.err; then
22475     ac_cpp_err=$ac_c_preproc_warn_flag
22476   else
22477     ac_cpp_err=
22478   fi
22479 else
22480   ac_cpp_err=yes
22481 fi
22482 if test -z "$ac_cpp_err"; then
22483   ac_cv_header_db_h=yes
22484 else
22485   echo "$as_me: failed program was:" >&5
22486   cat conftest.$ac_ext >&5
22487   ac_cv_header_db_h=no
22488 fi
22489 rm -f conftest.err conftest.$ac_ext
22490 fi
22491 echo "$as_me:22491: result: $ac_cv_header_db_h" >&5
22492 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22493 if test $ac_cv_header_db_h = yes; then
22494
22495 echo "$as_me:22495: checking for version of db" >&5
22496 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22497 if test "${cf_cv_hashed_db_version+set}" = set; then
22498   echo $ECHO_N "(cached) $ECHO_C" >&6
22499 else
22500
22501 cf_cv_hashed_db_version=unknown
22502
22503 for cf_db_version in 1 2 3 4 5 6
22504 do
22505
22506 echo "${as_me:-configure}:22506: testing checking for db version $cf_db_version ..." 1>&5
22507
22508         cat >conftest.$ac_ext <<_ACEOF
22509 #line 22509 "configure"
22510 #include "confdefs.h"
22511
22512 $ac_includes_default
22513 #include <db.h>
22514
22515 #ifdef DB_VERSION_MAJOR
22516         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22517 #if $cf_db_version == DB_VERSION_MAJOR
22518         /* ok */
22519 #else
22520         make an error
22521 #endif
22522 #else
22523 #if $cf_db_version == 1
22524         /* ok: assuming this is DB 1.8.5 */
22525 #else
22526         make an error
22527 #endif
22528 #endif
22529
22530 int
22531 main (void)
22532 {
22533 DBT *foo = 0
22534   ;
22535   return 0;
22536 }
22537 _ACEOF
22538 rm -f conftest.$ac_objext
22539 if { (eval echo "$as_me:22539: \"$ac_compile\"") >&5
22540   (eval $ac_compile) 2>&5
22541   ac_status=$?
22542   echo "$as_me:22542: \$? = $ac_status" >&5
22543   (exit $ac_status); } &&
22544          { ac_try='test -s conftest.$ac_objext'
22545   { (eval echo "$as_me:22545: \"$ac_try\"") >&5
22546   (eval $ac_try) 2>&5
22547   ac_status=$?
22548   echo "$as_me:22548: \$? = $ac_status" >&5
22549   (exit $ac_status); }; }; then
22550
22551         cf_cv_hashed_db_version=$cf_db_version
22552         break
22553
22554 else
22555   echo "$as_me: failed program was:" >&5
22556 cat conftest.$ac_ext >&5
22557 fi
22558 rm -f conftest.$ac_objext conftest.$ac_ext
22559 done
22560
22561 fi
22562 echo "$as_me:22562: result: $cf_cv_hashed_db_version" >&5
22563 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22564
22565 if test "$cf_cv_hashed_db_version" = unknown ; then
22566         { { echo "$as_me:22566: error: Cannot determine version of db" >&5
22567 echo "$as_me: error: Cannot determine version of db" >&2;}
22568    { (exit 1); exit 1; }; }
22569 else
22570
22571 echo "$as_me:22571: checking for db libraries" >&5
22572 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22573 if test "${cf_cv_hashed_db_libs+set}" = set; then
22574   echo $ECHO_N "(cached) $ECHO_C" >&6
22575 else
22576
22577 cf_cv_hashed_db_libs=unknown
22578 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22579 do
22580         cf_save_libs="$LIBS"
22581         if test -n "$cf_db_libs"; then
22582
22583 cf_add_libs="$LIBS"
22584 # reverse order
22585 cf_add_0lib=
22586 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22587 # filter duplicates
22588 for cf_add_1lib in $cf_add_0lib; do
22589         for cf_add_2lib in $cf_add_libs; do
22590                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22591                         cf_add_1lib=
22592                         break
22593                 fi
22594         done
22595         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22596 done
22597 LIBS="$cf_add_libs"
22598
22599         fi
22600
22601 echo "${as_me:-configure}:22601: testing checking for library "$cf_db_libs" ..." 1>&5
22602
22603         cat >conftest.$ac_ext <<_ACEOF
22604 #line 22604 "configure"
22605 #include "confdefs.h"
22606
22607 $ac_includes_default
22608 #include <db.h>
22609
22610 int
22611 main (void)
22612 {
22613
22614         char *path = "/tmp/foo";
22615 #ifdef DB_VERSION_MAJOR
22616 #if DB_VERSION_MAJOR >= 4
22617         DB *result = 0;
22618         db_create(&result, NULL, 0);
22619         result->open(result,
22620                 NULL,
22621                 path,
22622                 path,
22623                 DB_HASH,
22624                 DB_CREATE,
22625                 0644);
22626 #elif DB_VERSION_MAJOR >= 3
22627         DB *result = 0;
22628         db_create(&result, NULL, 0);
22629         result->open(result,
22630                 path,
22631                 path,
22632                 DB_HASH,
22633                 DB_CREATE,
22634                 0644);
22635 #elif DB_VERSION_MAJOR >= 2
22636         DB *result = 0;
22637         db_open(path,
22638                 DB_HASH,
22639                 DB_CREATE,
22640                 0644,
22641                 (DB_ENV *) 0,
22642                 (DB_INFO *) 0,
22643                 &result);
22644 #endif /* DB_VERSION_MAJOR */
22645 #else
22646         DB *result = dbopen(path,
22647                      2,
22648                      0644,
22649                      DB_HASH,
22650                      0);
22651 #endif
22652         ${cf_cv_main_return:-return}(result != 0)
22653
22654   ;
22655   return 0;
22656 }
22657 _ACEOF
22658 rm -f conftest.$ac_objext conftest$ac_exeext
22659 if { (eval echo "$as_me:22659: \"$ac_link\"") >&5
22660   (eval $ac_link) 2>&5
22661   ac_status=$?
22662   echo "$as_me:22662: \$? = $ac_status" >&5
22663   (exit $ac_status); } &&
22664          { ac_try='test -s conftest$ac_exeext'
22665   { (eval echo "$as_me:22665: \"$ac_try\"") >&5
22666   (eval $ac_try) 2>&5
22667   ac_status=$?
22668   echo "$as_me:22668: \$? = $ac_status" >&5
22669   (exit $ac_status); }; }; then
22670
22671         if test -n "$cf_db_libs" ; then
22672                 cf_cv_hashed_db_libs=$cf_db_libs
22673         else
22674                 cf_cv_hashed_db_libs=default
22675         fi
22676         LIBS="$cf_save_libs"
22677         break
22678
22679 else
22680   echo "$as_me: failed program was:" >&5
22681 cat conftest.$ac_ext >&5
22682 fi
22683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22684         LIBS="$cf_save_libs"
22685 done
22686
22687 fi
22688 echo "$as_me:22688: result: $cf_cv_hashed_db_libs" >&5
22689 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
22690
22691         if test "$cf_cv_hashed_db_libs" = unknown ; then
22692                 { { echo "$as_me:22692: error: Cannot determine library for db" >&5
22693 echo "$as_me: error: Cannot determine library for db" >&2;}
22694    { (exit 1); exit 1; }; }
22695         elif test "$cf_cv_hashed_db_libs" != default ; then
22696
22697 cf_add_libs="$LIBS"
22698 # reverse order
22699 cf_add_0lib=
22700 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22701 # filter duplicates
22702 for cf_add_1lib in $cf_add_0lib; do
22703         for cf_add_2lib in $cf_add_libs; do
22704                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22705                         cf_add_1lib=
22706                         break
22707                 fi
22708         done
22709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22710 done
22711 LIBS="$cf_add_libs"
22712
22713         fi
22714 fi
22715
22716 else
22717
22718         { { echo "$as_me:22718: error: Cannot find db.h" >&5
22719 echo "$as_me: error: Cannot find db.h" >&2;}
22720    { (exit 1); exit 1; }; }
22721
22722 fi
22723
22724 fi
22725
22726 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
22727         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22728         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
22729 fi
22730
22731 # Just in case, check if the C compiler has a bool type.
22732
22733 echo "$as_me:22733: checking if we should include stdbool.h" >&5
22734 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22735
22736 if test "${cf_cv_header_stdbool_h+set}" = set; then
22737   echo $ECHO_N "(cached) $ECHO_C" >&6
22738 else
22739
22740         cat >conftest.$ac_ext <<_ACEOF
22741 #line 22741 "configure"
22742 #include "confdefs.h"
22743
22744 int
22745 main (void)
22746 {
22747 bool foo = false
22748   ;
22749   return 0;
22750 }
22751 _ACEOF
22752 rm -f conftest.$ac_objext
22753 if { (eval echo "$as_me:22753: \"$ac_compile\"") >&5
22754   (eval $ac_compile) 2>&5
22755   ac_status=$?
22756   echo "$as_me:22756: \$? = $ac_status" >&5
22757   (exit $ac_status); } &&
22758          { ac_try='test -s conftest.$ac_objext'
22759   { (eval echo "$as_me:22759: \"$ac_try\"") >&5
22760   (eval $ac_try) 2>&5
22761   ac_status=$?
22762   echo "$as_me:22762: \$? = $ac_status" >&5
22763   (exit $ac_status); }; }; then
22764   cf_cv_header_stdbool_h=0
22765 else
22766   echo "$as_me: failed program was:" >&5
22767 cat conftest.$ac_ext >&5
22768 cat >conftest.$ac_ext <<_ACEOF
22769 #line 22769 "configure"
22770 #include "confdefs.h"
22771
22772 #ifndef __BEOS__
22773 #include <stdbool.h>
22774 #endif
22775
22776 int
22777 main (void)
22778 {
22779 bool foo = false
22780   ;
22781   return 0;
22782 }
22783 _ACEOF
22784 rm -f conftest.$ac_objext
22785 if { (eval echo "$as_me:22785: \"$ac_compile\"") >&5
22786   (eval $ac_compile) 2>&5
22787   ac_status=$?
22788   echo "$as_me:22788: \$? = $ac_status" >&5
22789   (exit $ac_status); } &&
22790          { ac_try='test -s conftest.$ac_objext'
22791   { (eval echo "$as_me:22791: \"$ac_try\"") >&5
22792   (eval $ac_try) 2>&5
22793   ac_status=$?
22794   echo "$as_me:22794: \$? = $ac_status" >&5
22795   (exit $ac_status); }; }; then
22796   cf_cv_header_stdbool_h=1
22797 else
22798   echo "$as_me: failed program was:" >&5
22799 cat conftest.$ac_ext >&5
22800 cf_cv_header_stdbool_h=0
22801 fi
22802 rm -f conftest.$ac_objext conftest.$ac_ext
22803 fi
22804 rm -f conftest.$ac_objext conftest.$ac_ext
22805 fi
22806
22807 if test "$cf_cv_header_stdbool_h" = 1
22808 then    echo "$as_me:22808: result: yes" >&5
22809 echo "${ECHO_T}yes" >&6
22810 else    echo "$as_me:22810: result: no" >&5
22811 echo "${ECHO_T}no" >&6
22812 fi
22813
22814 echo "$as_me:22814: checking for builtin bool type" >&5
22815 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22816
22817 if test "${cf_cv_cc_bool_type+set}" = set; then
22818   echo $ECHO_N "(cached) $ECHO_C" >&6
22819 else
22820
22821         cat >conftest.$ac_ext <<_ACEOF
22822 #line 22822 "configure"
22823 #include "confdefs.h"
22824
22825 #include <stdio.h>
22826 #include <sys/types.h>
22827
22828 int
22829 main (void)
22830 {
22831 bool x = false
22832   ;
22833   return 0;
22834 }
22835 _ACEOF
22836 rm -f conftest.$ac_objext
22837 if { (eval echo "$as_me:22837: \"$ac_compile\"") >&5
22838   (eval $ac_compile) 2>&5
22839   ac_status=$?
22840   echo "$as_me:22840: \$? = $ac_status" >&5
22841   (exit $ac_status); } &&
22842          { ac_try='test -s conftest.$ac_objext'
22843   { (eval echo "$as_me:22843: \"$ac_try\"") >&5
22844   (eval $ac_try) 2>&5
22845   ac_status=$?
22846   echo "$as_me:22846: \$? = $ac_status" >&5
22847   (exit $ac_status); }; }; then
22848   cf_cv_cc_bool_type=1
22849 else
22850   echo "$as_me: failed program was:" >&5
22851 cat conftest.$ac_ext >&5
22852 cf_cv_cc_bool_type=0
22853 fi
22854 rm -f conftest.$ac_objext conftest.$ac_ext
22855
22856 fi
22857
22858 if test "$cf_cv_cc_bool_type" = 1
22859 then    echo "$as_me:22859: result: yes" >&5
22860 echo "${ECHO_T}yes" >&6
22861 else    echo "$as_me:22861: result: no" >&5
22862 echo "${ECHO_T}no" >&6
22863 fi
22864
22865 # Check for C++ compiler characteristics (and ensure that it's there!)
22866 if test -n "$CXX" ; then
22867         ac_ext=cc
22868 ac_cpp='$CXXCPP $CPPFLAGS'
22869 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22870 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22871 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22872 ac_main_return=return
22873
22874 if test -n "$GXX" ; then
22875
22876         cf_save="$LIBS"
22877         LIBS="$LIBS $CXXLIBS"
22878         echo "$as_me:22878: checking if we already have C++ library" >&5
22879 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
22880         cat >conftest.$ac_ext <<_ACEOF
22881 #line 22881 "configure"
22882 #include "confdefs.h"
22883
22884                         #include <iostream>
22885 int
22886 main (void)
22887 {
22888
22889                         std::cout << "Hello World!" << std::endl;
22890   ;
22891   return 0;
22892 }
22893 _ACEOF
22894 rm -f conftest.$ac_objext conftest$ac_exeext
22895 if { (eval echo "$as_me:22895: \"$ac_link\"") >&5
22896   (eval $ac_link) 2>&5
22897   ac_status=$?
22898   echo "$as_me:22898: \$? = $ac_status" >&5
22899   (exit $ac_status); } &&
22900          { ac_try='test -s conftest$ac_exeext'
22901   { (eval echo "$as_me:22901: \"$ac_try\"") >&5
22902   (eval $ac_try) 2>&5
22903   ac_status=$?
22904   echo "$as_me:22904: \$? = $ac_status" >&5
22905   (exit $ac_status); }; }; then
22906   cf_have_libstdcpp=yes
22907 else
22908   echo "$as_me: failed program was:" >&5
22909 cat conftest.$ac_ext >&5
22910 cf_have_libstdcpp=no
22911 fi
22912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22913         echo "$as_me:22913: result: $cf_have_libstdcpp" >&5
22914 echo "${ECHO_T}$cf_have_libstdcpp" >&6
22915         LIBS="$cf_save"
22916
22917         if test $cf_have_libstdcpp != yes
22918         then
22919                 case $cf_cv_system_name in
22920                 (os2*)
22921                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
22922                                 cf_stdcpp_libname=stdcpp
22923                         else
22924                                 cf_stdcpp_libname=stdc++
22925                         fi
22926                         ;;
22927                 (*)
22928                         cf_stdcpp_libname=stdc++
22929                         ;;
22930                 esac
22931
22932                 echo "$as_me:22932: checking for library $cf_stdcpp_libname" >&5
22933 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
22934 if test "${cf_cv_libstdcpp+set}" = set; then
22935   echo $ECHO_N "(cached) $ECHO_C" >&6
22936 else
22937
22938                         cf_save="$LIBS"
22939                         LIBS="$LIBS $CXXLIBS"
22940
22941 cf_add_libs="$LIBS"
22942 # reverse order
22943 cf_add_0lib=
22944 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22945 # filter duplicates
22946 for cf_add_1lib in $cf_add_0lib; do
22947         for cf_add_2lib in $cf_add_libs; do
22948                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22949                         cf_add_1lib=
22950                         break
22951                 fi
22952         done
22953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22954 done
22955 LIBS="$cf_add_libs"
22956
22957                 cat >conftest.$ac_ext <<_ACEOF
22958 #line 22958 "configure"
22959 #include "confdefs.h"
22960
22961                                 #include <iostream>
22962 int
22963 main (void)
22964 {
22965
22966                                 std::cout << "Hello World!" << std::endl;
22967   ;
22968   return 0;
22969 }
22970 _ACEOF
22971 rm -f conftest.$ac_objext conftest$ac_exeext
22972 if { (eval echo "$as_me:22972: \"$ac_link\"") >&5
22973   (eval $ac_link) 2>&5
22974   ac_status=$?
22975   echo "$as_me:22975: \$? = $ac_status" >&5
22976   (exit $ac_status); } &&
22977          { ac_try='test -s conftest$ac_exeext'
22978   { (eval echo "$as_me:22978: \"$ac_try\"") >&5
22979   (eval $ac_try) 2>&5
22980   ac_status=$?
22981   echo "$as_me:22981: \$? = $ac_status" >&5
22982   (exit $ac_status); }; }; then
22983   cf_cv_libstdcpp=yes
22984 else
22985   echo "$as_me: failed program was:" >&5
22986 cat conftest.$ac_ext >&5
22987 cf_cv_libstdcpp=no
22988 fi
22989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22990                         LIBS="$cf_save"
22991
22992 fi
22993 echo "$as_me:22993: result: $cf_cv_libstdcpp" >&5
22994 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22995                 test "$cf_cv_libstdcpp" = yes && {
22996 cf_add_libs="$CXXLIBS"
22997 # reverse order
22998 cf_add_0lib=
22999 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23000 # filter duplicates
23001 for cf_add_1lib in $cf_add_0lib; do
23002         for cf_add_2lib in $cf_add_libs; do
23003                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23004                         cf_add_1lib=
23005                         break
23006                 fi
23007         done
23008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23009 done
23010 CXXLIBS="$cf_add_libs"
23011  }
23012         fi
23013 fi
23014
23015         echo "$as_me:23015: checking whether $CXX understands -c and -o together" >&5
23016 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23017 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23018   echo $ECHO_N "(cached) $ECHO_C" >&6
23019 else
23020
23021 cat > conftest.$ac_ext <<CF_EOF
23022 int main(void)
23023 {
23024         ${cf_cv_main_return:-return}(0);
23025 }
23026 CF_EOF
23027 # We do the test twice because some compilers refuse to overwrite an
23028 # existing .o file with -o, though they will create one.
23029 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23030 if { (eval echo "$as_me:23030: \"$ac_try\"") >&5
23031   (eval $ac_try) 2>&5
23032   ac_status=$?
23033   echo "$as_me:23033: \$? = $ac_status" >&5
23034   (exit $ac_status); } &&
23035   test -f conftest2.$ac_objext && { (eval echo "$as_me:23035: \"$ac_try\"") >&5
23036   (eval $ac_try) 2>&5
23037   ac_status=$?
23038   echo "$as_me:23038: \$? = $ac_status" >&5
23039   (exit $ac_status); };
23040 then
23041   eval cf_cv_prog_CXX_c_o=yes
23042 else
23043   eval cf_cv_prog_CXX_c_o=no
23044 fi
23045 rm -rf conftest*
23046
23047 fi
23048 if test $cf_cv_prog_CXX_c_o = yes; then
23049   echo "$as_me:23049: result: yes" >&5
23050 echo "${ECHO_T}yes" >&6
23051 else
23052   echo "$as_me:23052: result: no" >&5
23053 echo "${ECHO_T}no" >&6
23054 fi
23055
23056         case $GXX_VERSION in
23057         (1*|2.0-6*)
23058                 cf_cxx_library=yes
23059                 ;;
23060         (*-2.7*|2.7*)
23061
23062 cf_cxx_library=unknown
23063 case $cf_cv_system_name in
23064 (os2*)
23065         cf_gpp_libname=gpp
23066         ;;
23067 (*)
23068         cf_gpp_libname=g++
23069         ;;
23070 esac
23071 if test "$GXX" = yes; then
23072         echo "$as_me:23072: checking for lib$cf_gpp_libname" >&5
23073 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23074         cf_save="$LIBS"
23075
23076 cf_add_libs="$LIBS"
23077 # reverse order
23078 cf_add_0lib=
23079 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23080 # filter duplicates
23081 for cf_add_1lib in $cf_add_0lib; do
23082         for cf_add_2lib in $cf_add_libs; do
23083                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23084                         cf_add_1lib=
23085                         break
23086                 fi
23087         done
23088         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23089 done
23090 LIBS="$cf_add_libs"
23091
23092         cat >conftest.$ac_ext <<_ACEOF
23093 #line 23093 "configure"
23094 #include "confdefs.h"
23095
23096 #include <$cf_gpp_libname/builtin.h>
23097
23098 int
23099 main (void)
23100 {
23101 two_arg_error_handler_t foo2 = lib_error_handler
23102   ;
23103   return 0;
23104 }
23105 _ACEOF
23106 rm -f conftest.$ac_objext conftest$ac_exeext
23107 if { (eval echo "$as_me:23107: \"$ac_link\"") >&5
23108   (eval $ac_link) 2>&5
23109   ac_status=$?
23110   echo "$as_me:23110: \$? = $ac_status" >&5
23111   (exit $ac_status); } &&
23112          { ac_try='test -s conftest$ac_exeext'
23113   { (eval echo "$as_me:23113: \"$ac_try\"") >&5
23114   (eval $ac_try) 2>&5
23115   ac_status=$?
23116   echo "$as_me:23116: \$? = $ac_status" >&5
23117   (exit $ac_status); }; }; then
23118   cf_cxx_library=yes
23119
23120 cf_add_libs="$CXXLIBS"
23121 # reverse order
23122 cf_add_0lib=
23123 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23124 # filter duplicates
23125 for cf_add_1lib in $cf_add_0lib; do
23126         for cf_add_2lib in $cf_add_libs; do
23127                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23128                         cf_add_1lib=
23129                         break
23130                 fi
23131         done
23132         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23133 done
23134 CXXLIBS="$cf_add_libs"
23135
23136          if test "$cf_gpp_libname" = cpp ; then
23137
23138 cat >>confdefs.h <<\EOF
23139 #define HAVE_GPP_BUILTIN_H 1
23140 EOF
23141
23142          else
23143
23144 cat >>confdefs.h <<\EOF
23145 #define HAVE_GXX_BUILTIN_H 1
23146 EOF
23147
23148          fi
23149 else
23150   echo "$as_me: failed program was:" >&5
23151 cat conftest.$ac_ext >&5
23152 cat >conftest.$ac_ext <<_ACEOF
23153 #line 23153 "configure"
23154 #include "confdefs.h"
23155
23156 #include <builtin.h>
23157
23158 int
23159 main (void)
23160 {
23161 two_arg_error_handler_t foo2 = lib_error_handler
23162   ;
23163   return 0;
23164 }
23165 _ACEOF
23166 rm -f conftest.$ac_objext conftest$ac_exeext
23167 if { (eval echo "$as_me:23167: \"$ac_link\"") >&5
23168   (eval $ac_link) 2>&5
23169   ac_status=$?
23170   echo "$as_me:23170: \$? = $ac_status" >&5
23171   (exit $ac_status); } &&
23172          { ac_try='test -s conftest$ac_exeext'
23173   { (eval echo "$as_me:23173: \"$ac_try\"") >&5
23174   (eval $ac_try) 2>&5
23175   ac_status=$?
23176   echo "$as_me:23176: \$? = $ac_status" >&5
23177   (exit $ac_status); }; }; then
23178   cf_cxx_library=yes
23179
23180 cf_add_libs="$CXXLIBS"
23181 # reverse order
23182 cf_add_0lib=
23183 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23184 # filter duplicates
23185 for cf_add_1lib in $cf_add_0lib; do
23186         for cf_add_2lib in $cf_add_libs; do
23187                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23188                         cf_add_1lib=
23189                         break
23190                 fi
23191         done
23192         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23193 done
23194 CXXLIBS="$cf_add_libs"
23195
23196 cat >>confdefs.h <<\EOF
23197 #define HAVE_BUILTIN_H 1
23198 EOF
23199
23200 else
23201   echo "$as_me: failed program was:" >&5
23202 cat conftest.$ac_ext >&5
23203 cf_cxx_library=no
23204 fi
23205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23206 fi
23207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23208         LIBS="$cf_save"
23209         echo "$as_me:23209: result: $cf_cxx_library" >&5
23210 echo "${ECHO_T}$cf_cxx_library" >&6
23211 fi
23212
23213                 ;;
23214         (*)
23215                 cf_cxx_library=no
23216                 ;;
23217         esac
23218
23219         ac_ext=cc
23220 ac_cpp='$CXXCPP $CPPFLAGS'
23221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23224 ac_main_return=return
23225 echo "$as_me:23225: checking how to run the C++ preprocessor" >&5
23226 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23227 if test -z "$CXXCPP"; then
23228   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23229   echo $ECHO_N "(cached) $ECHO_C" >&6
23230 else
23231       # Double quotes because CXXCPP needs to be expanded
23232     for CXXCPP in "$CXX -E" "/lib/cpp"
23233     do
23234       ac_preproc_ok=false
23235 for ac_cxx_preproc_warn_flag in '' yes
23236 do
23237   # Use a header file that comes with gcc, so configuring glibc
23238   # with a fresh cross-compiler works.
23239   # On the NeXT, cc -E runs the code through the compiler's parser,
23240   # not just through cpp. "Syntax error" is here to catch this case.
23241   cat >conftest.$ac_ext <<_ACEOF
23242 #line 23242 "configure"
23243 #include "confdefs.h"
23244 #include <assert.h>
23245                      Syntax error
23246 _ACEOF
23247 if { (eval echo "$as_me:23247: \"$ac_cpp conftest.$ac_ext\"") >&5
23248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23249   ac_status=$?
23250   egrep -v '^ *\+' conftest.er1 >conftest.err
23251   rm -f conftest.er1
23252   cat conftest.err >&5
23253   echo "$as_me:23253: \$? = $ac_status" >&5
23254   (exit $ac_status); } >/dev/null; then
23255   if test -s conftest.err; then
23256     ac_cpp_err=$ac_cxx_preproc_warn_flag
23257   else
23258     ac_cpp_err=
23259   fi
23260 else
23261   ac_cpp_err=yes
23262 fi
23263 if test -z "$ac_cpp_err"; then
23264   :
23265 else
23266   echo "$as_me: failed program was:" >&5
23267   cat conftest.$ac_ext >&5
23268   # Broken: fails on valid input.
23269 continue
23270 fi
23271 rm -f conftest.err conftest.$ac_ext
23272
23273   # OK, works on sane cases.  Now check whether non-existent headers
23274   # can be detected and how.
23275   cat >conftest.$ac_ext <<_ACEOF
23276 #line 23276 "configure"
23277 #include "confdefs.h"
23278 #include <ac_nonexistent.h>
23279 _ACEOF
23280 if { (eval echo "$as_me:23280: \"$ac_cpp conftest.$ac_ext\"") >&5
23281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23282   ac_status=$?
23283   egrep -v '^ *\+' conftest.er1 >conftest.err
23284   rm -f conftest.er1
23285   cat conftest.err >&5
23286   echo "$as_me:23286: \$? = $ac_status" >&5
23287   (exit $ac_status); } >/dev/null; then
23288   if test -s conftest.err; then
23289     ac_cpp_err=$ac_cxx_preproc_warn_flag
23290   else
23291     ac_cpp_err=
23292   fi
23293 else
23294   ac_cpp_err=yes
23295 fi
23296 if test -z "$ac_cpp_err"; then
23297   # Broken: success on invalid input.
23298 continue
23299 else
23300   echo "$as_me: failed program was:" >&5
23301   cat conftest.$ac_ext >&5
23302   # Passes both tests.
23303 ac_preproc_ok=:
23304 break
23305 fi
23306 rm -f conftest.err conftest.$ac_ext
23307
23308 done
23309 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23310 rm -f conftest.err conftest.$ac_ext
23311 if $ac_preproc_ok; then
23312   break
23313 fi
23314
23315     done
23316     ac_cv_prog_CXXCPP=$CXXCPP
23317
23318 fi
23319   CXXCPP=$ac_cv_prog_CXXCPP
23320 else
23321   ac_cv_prog_CXXCPP=$CXXCPP
23322 fi
23323 echo "$as_me:23323: result: $CXXCPP" >&5
23324 echo "${ECHO_T}$CXXCPP" >&6
23325 ac_preproc_ok=false
23326 for ac_cxx_preproc_warn_flag in '' yes
23327 do
23328   # Use a header file that comes with gcc, so configuring glibc
23329   # with a fresh cross-compiler works.
23330   # On the NeXT, cc -E runs the code through the compiler's parser,
23331   # not just through cpp. "Syntax error" is here to catch this case.
23332   cat >conftest.$ac_ext <<_ACEOF
23333 #line 23333 "configure"
23334 #include "confdefs.h"
23335 #include <assert.h>
23336                      Syntax error
23337 _ACEOF
23338 if { (eval echo "$as_me:23338: \"$ac_cpp conftest.$ac_ext\"") >&5
23339   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23340   ac_status=$?
23341   egrep -v '^ *\+' conftest.er1 >conftest.err
23342   rm -f conftest.er1
23343   cat conftest.err >&5
23344   echo "$as_me:23344: \$? = $ac_status" >&5
23345   (exit $ac_status); } >/dev/null; then
23346   if test -s conftest.err; then
23347     ac_cpp_err=$ac_cxx_preproc_warn_flag
23348   else
23349     ac_cpp_err=
23350   fi
23351 else
23352   ac_cpp_err=yes
23353 fi
23354 if test -z "$ac_cpp_err"; then
23355   :
23356 else
23357   echo "$as_me: failed program was:" >&5
23358   cat conftest.$ac_ext >&5
23359   # Broken: fails on valid input.
23360 continue
23361 fi
23362 rm -f conftest.err conftest.$ac_ext
23363
23364   # OK, works on sane cases.  Now check whether non-existent headers
23365   # can be detected and how.
23366   cat >conftest.$ac_ext <<_ACEOF
23367 #line 23367 "configure"
23368 #include "confdefs.h"
23369 #include <ac_nonexistent.h>
23370 _ACEOF
23371 if { (eval echo "$as_me:23371: \"$ac_cpp conftest.$ac_ext\"") >&5
23372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23373   ac_status=$?
23374   egrep -v '^ *\+' conftest.er1 >conftest.err
23375   rm -f conftest.er1
23376   cat conftest.err >&5
23377   echo "$as_me:23377: \$? = $ac_status" >&5
23378   (exit $ac_status); } >/dev/null; then
23379   if test -s conftest.err; then
23380     ac_cpp_err=$ac_cxx_preproc_warn_flag
23381   else
23382     ac_cpp_err=
23383   fi
23384 else
23385   ac_cpp_err=yes
23386 fi
23387 if test -z "$ac_cpp_err"; then
23388   # Broken: success on invalid input.
23389 continue
23390 else
23391   echo "$as_me: failed program was:" >&5
23392   cat conftest.$ac_ext >&5
23393   # Passes both tests.
23394 ac_preproc_ok=:
23395 break
23396 fi
23397 rm -f conftest.err conftest.$ac_ext
23398
23399 done
23400 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23401 rm -f conftest.err conftest.$ac_ext
23402 if $ac_preproc_ok; then
23403   :
23404 else
23405   { { echo "$as_me:23405: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23406 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23407    { (exit 1); exit 1; }; }
23408 fi
23409
23410 ac_ext=cc
23411 ac_cpp='$CXXCPP $CPPFLAGS'
23412 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23413 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23414 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23415 ac_main_return=return
23416
23417 for ac_header in typeinfo
23418 do
23419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23420 echo "$as_me:23420: checking for $ac_header" >&5
23421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23423   echo $ECHO_N "(cached) $ECHO_C" >&6
23424 else
23425   cat >conftest.$ac_ext <<_ACEOF
23426 #line 23426 "configure"
23427 #include "confdefs.h"
23428 #include <$ac_header>
23429 _ACEOF
23430 if { (eval echo "$as_me:23430: \"$ac_cpp conftest.$ac_ext\"") >&5
23431   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23432   ac_status=$?
23433   egrep -v '^ *\+' conftest.er1 >conftest.err
23434   rm -f conftest.er1
23435   cat conftest.err >&5
23436   echo "$as_me:23436: \$? = $ac_status" >&5
23437   (exit $ac_status); } >/dev/null; then
23438   if test -s conftest.err; then
23439     ac_cpp_err=$ac_cxx_preproc_warn_flag
23440   else
23441     ac_cpp_err=
23442   fi
23443 else
23444   ac_cpp_err=yes
23445 fi
23446 if test -z "$ac_cpp_err"; then
23447   eval "$as_ac_Header=yes"
23448 else
23449   echo "$as_me: failed program was:" >&5
23450   cat conftest.$ac_ext >&5
23451   eval "$as_ac_Header=no"
23452 fi
23453 rm -f conftest.err conftest.$ac_ext
23454 fi
23455 echo "$as_me:23455: result: `eval echo '${'$as_ac_Header'}'`" >&5
23456 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23457 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23458   cat >>confdefs.h <<EOF
23459 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23460 EOF
23461
23462 fi
23463 done
23464
23465 for ac_header in iostream
23466 do
23467 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23468 echo "$as_me:23468: checking for $ac_header" >&5
23469 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23471   echo $ECHO_N "(cached) $ECHO_C" >&6
23472 else
23473   cat >conftest.$ac_ext <<_ACEOF
23474 #line 23474 "configure"
23475 #include "confdefs.h"
23476 #include <$ac_header>
23477 _ACEOF
23478 if { (eval echo "$as_me:23478: \"$ac_cpp conftest.$ac_ext\"") >&5
23479   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23480   ac_status=$?
23481   egrep -v '^ *\+' conftest.er1 >conftest.err
23482   rm -f conftest.er1
23483   cat conftest.err >&5
23484   echo "$as_me:23484: \$? = $ac_status" >&5
23485   (exit $ac_status); } >/dev/null; then
23486   if test -s conftest.err; then
23487     ac_cpp_err=$ac_cxx_preproc_warn_flag
23488   else
23489     ac_cpp_err=
23490   fi
23491 else
23492   ac_cpp_err=yes
23493 fi
23494 if test -z "$ac_cpp_err"; then
23495   eval "$as_ac_Header=yes"
23496 else
23497   echo "$as_me: failed program was:" >&5
23498   cat conftest.$ac_ext >&5
23499   eval "$as_ac_Header=no"
23500 fi
23501 rm -f conftest.err conftest.$ac_ext
23502 fi
23503 echo "$as_me:23503: result: `eval echo '${'$as_ac_Header'}'`" >&5
23504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23506   cat >>confdefs.h <<EOF
23507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23508 EOF
23509
23510 fi
23511 done
23512
23513 if test x"$ac_cv_header_iostream" = xyes ; then
23514         echo "$as_me:23514: checking if iostream uses std-namespace" >&5
23515 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23516         cat >conftest.$ac_ext <<_ACEOF
23517 #line 23517 "configure"
23518 #include "confdefs.h"
23519
23520 #include <iostream>
23521 using std::endl;
23522 using std::cerr;
23523 int
23524 main (void)
23525 {
23526
23527 cerr << "testing" << endl;
23528
23529   ;
23530   return 0;
23531 }
23532 _ACEOF
23533 rm -f conftest.$ac_objext
23534 if { (eval echo "$as_me:23534: \"$ac_compile\"") >&5
23535   (eval $ac_compile) 2>&5
23536   ac_status=$?
23537   echo "$as_me:23537: \$? = $ac_status" >&5
23538   (exit $ac_status); } &&
23539          { ac_try='test -s conftest.$ac_objext'
23540   { (eval echo "$as_me:23540: \"$ac_try\"") >&5
23541   (eval $ac_try) 2>&5
23542   ac_status=$?
23543   echo "$as_me:23543: \$? = $ac_status" >&5
23544   (exit $ac_status); }; }; then
23545   cf_iostream_namespace=yes
23546 else
23547   echo "$as_me: failed program was:" >&5
23548 cat conftest.$ac_ext >&5
23549 cf_iostream_namespace=no
23550 fi
23551 rm -f conftest.$ac_objext conftest.$ac_ext
23552         echo "$as_me:23552: result: $cf_iostream_namespace" >&5
23553 echo "${ECHO_T}$cf_iostream_namespace" >&6
23554         if test "$cf_iostream_namespace" = yes ; then
23555
23556 cat >>confdefs.h <<\EOF
23557 #define IOSTREAM_NAMESPACE 1
23558 EOF
23559
23560         fi
23561 fi
23562
23563 echo "$as_me:23563: checking if we should include stdbool.h" >&5
23564 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23565
23566 if test "${cf_cv_header_stdbool_h+set}" = set; then
23567   echo $ECHO_N "(cached) $ECHO_C" >&6
23568 else
23569
23570         cat >conftest.$ac_ext <<_ACEOF
23571 #line 23571 "configure"
23572 #include "confdefs.h"
23573
23574 int
23575 main (void)
23576 {
23577 bool foo = false
23578   ;
23579   return 0;
23580 }
23581 _ACEOF
23582 rm -f conftest.$ac_objext
23583 if { (eval echo "$as_me:23583: \"$ac_compile\"") >&5
23584   (eval $ac_compile) 2>&5
23585   ac_status=$?
23586   echo "$as_me:23586: \$? = $ac_status" >&5
23587   (exit $ac_status); } &&
23588          { ac_try='test -s conftest.$ac_objext'
23589   { (eval echo "$as_me:23589: \"$ac_try\"") >&5
23590   (eval $ac_try) 2>&5
23591   ac_status=$?
23592   echo "$as_me:23592: \$? = $ac_status" >&5
23593   (exit $ac_status); }; }; then
23594   cf_cv_header_stdbool_h=0
23595 else
23596   echo "$as_me: failed program was:" >&5
23597 cat conftest.$ac_ext >&5
23598 cat >conftest.$ac_ext <<_ACEOF
23599 #line 23599 "configure"
23600 #include "confdefs.h"
23601
23602 #ifndef __BEOS__
23603 #include <stdbool.h>
23604 #endif
23605
23606 int
23607 main (void)
23608 {
23609 bool foo = false
23610   ;
23611   return 0;
23612 }
23613 _ACEOF
23614 rm -f conftest.$ac_objext
23615 if { (eval echo "$as_me:23615: \"$ac_compile\"") >&5
23616   (eval $ac_compile) 2>&5
23617   ac_status=$?
23618   echo "$as_me:23618: \$? = $ac_status" >&5
23619   (exit $ac_status); } &&
23620          { ac_try='test -s conftest.$ac_objext'
23621   { (eval echo "$as_me:23621: \"$ac_try\"") >&5
23622   (eval $ac_try) 2>&5
23623   ac_status=$?
23624   echo "$as_me:23624: \$? = $ac_status" >&5
23625   (exit $ac_status); }; }; then
23626   cf_cv_header_stdbool_h=1
23627 else
23628   echo "$as_me: failed program was:" >&5
23629 cat conftest.$ac_ext >&5
23630 cf_cv_header_stdbool_h=0
23631 fi
23632 rm -f conftest.$ac_objext conftest.$ac_ext
23633 fi
23634 rm -f conftest.$ac_objext conftest.$ac_ext
23635 fi
23636
23637 if test "$cf_cv_header_stdbool_h" = 1
23638 then    echo "$as_me:23638: result: yes" >&5
23639 echo "${ECHO_T}yes" >&6
23640 else    echo "$as_me:23640: result: no" >&5
23641 echo "${ECHO_T}no" >&6
23642 fi
23643
23644 echo "$as_me:23644: checking for builtin bool type" >&5
23645 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23646
23647 if test "${cf_cv_builtin_bool+set}" = set; then
23648   echo $ECHO_N "(cached) $ECHO_C" >&6
23649 else
23650
23651         cat >conftest.$ac_ext <<_ACEOF
23652 #line 23652 "configure"
23653 #include "confdefs.h"
23654
23655 #include <stdio.h>
23656 #include <sys/types.h>
23657
23658 int
23659 main (void)
23660 {
23661 bool x = false
23662   ;
23663   return 0;
23664 }
23665 _ACEOF
23666 rm -f conftest.$ac_objext
23667 if { (eval echo "$as_me:23667: \"$ac_compile\"") >&5
23668   (eval $ac_compile) 2>&5
23669   ac_status=$?
23670   echo "$as_me:23670: \$? = $ac_status" >&5
23671   (exit $ac_status); } &&
23672          { ac_try='test -s conftest.$ac_objext'
23673   { (eval echo "$as_me:23673: \"$ac_try\"") >&5
23674   (eval $ac_try) 2>&5
23675   ac_status=$?
23676   echo "$as_me:23676: \$? = $ac_status" >&5
23677   (exit $ac_status); }; }; then
23678   cf_cv_builtin_bool=1
23679 else
23680   echo "$as_me: failed program was:" >&5
23681 cat conftest.$ac_ext >&5
23682 cf_cv_builtin_bool=0
23683 fi
23684 rm -f conftest.$ac_objext conftest.$ac_ext
23685
23686 fi
23687
23688 if test "$cf_cv_builtin_bool" = 1
23689 then    echo "$as_me:23689: result: yes" >&5
23690 echo "${ECHO_T}yes" >&6
23691 else    echo "$as_me:23691: result: no" >&5
23692 echo "${ECHO_T}no" >&6
23693 fi
23694
23695 echo "$as_me:23695: checking for size of bool" >&5
23696 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23697 if test "${cf_cv_type_of_bool+set}" = set; then
23698   echo $ECHO_N "(cached) $ECHO_C" >&6
23699 else
23700
23701         rm -f cf_test.out
23702         if test "$cross_compiling" = yes; then
23703   cf_cv_type_of_bool=unknown
23704 else
23705   cat >conftest.$ac_ext <<_ACEOF
23706 #line 23706 "configure"
23707 #include "confdefs.h"
23708
23709 #include <stdlib.h>
23710 #include <stdio.h>
23711
23712 #if defined(__cplusplus)
23713
23714 #ifdef HAVE_GXX_BUILTIN_H
23715 #include <g++/builtin.h>
23716 #elif HAVE_GPP_BUILTIN_H
23717 #include <gpp/builtin.h>
23718 #elif HAVE_BUILTIN_H
23719 #include <builtin.h>
23720 #endif
23721
23722 #else
23723
23724 #if $cf_cv_header_stdbool_h
23725 #include <stdbool.h>
23726 #endif
23727
23728 #endif
23729
23730 int main(void)
23731 {
23732         FILE *fp = fopen("cf_test.out", "w");
23733         if (fp != 0) {
23734                 bool x = true;
23735                 if ((bool)(-x) >= 0)
23736                         fputs("unsigned ", fp);
23737                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23738                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23739                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23740                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23741                 fclose(fp);
23742         }
23743         ${cf_cv_main_return:-return}(0);
23744 }
23745
23746 _ACEOF
23747 rm -f conftest$ac_exeext
23748 if { (eval echo "$as_me:23748: \"$ac_link\"") >&5
23749   (eval $ac_link) 2>&5
23750   ac_status=$?
23751   echo "$as_me:23751: \$? = $ac_status" >&5
23752   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23753   { (eval echo "$as_me:23753: \"$ac_try\"") >&5
23754   (eval $ac_try) 2>&5
23755   ac_status=$?
23756   echo "$as_me:23756: \$? = $ac_status" >&5
23757   (exit $ac_status); }; }; then
23758   cf_cv_type_of_bool=`cat cf_test.out`
23759                  if test -z "$cf_cv_type_of_bool"; then
23760                    cf_cv_type_of_bool=unknown
23761                  fi
23762 else
23763   echo "$as_me: program exited with status $ac_status" >&5
23764 echo "$as_me: failed program was:" >&5
23765 cat conftest.$ac_ext >&5
23766 cf_cv_type_of_bool=unknown
23767 fi
23768 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23769 fi
23770
23771 fi
23772
23773         rm -f cf_test.out
23774 echo "$as_me:23774: result: $cf_cv_type_of_bool" >&5
23775 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23776 if test "$cf_cv_type_of_bool" = unknown ; then
23777         case .$NCURSES_BOOL in
23778         (.auto|.) NCURSES_BOOL=unsigned;;
23779         esac
23780         { echo "$as_me:23780: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23781 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23782         cf_cv_type_of_bool=$NCURSES_BOOL
23783 fi
23784
23785 echo "$as_me:23785: checking for special defines needed for etip.h" >&5
23786 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
23787 cf_save_CXXFLAGS="$CXXFLAGS"
23788 cf_result="none"
23789
23790 # etip.h includes ncurses.h which includes ncurses_dll.h
23791 # But ncurses_dll.h is generated - fix here.
23792 test -d include || mkdir include
23793 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
23794
23795 for cf_math in "" MATH_H
23796 do
23797 for cf_excp in "" MATH_EXCEPTION
23798 do
23799         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
23800         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
23801         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
23802 cat >conftest.$ac_ext <<_ACEOF
23803 #line 23803 "configure"
23804 #include "confdefs.h"
23805
23806 #include <etip.h.in>
23807
23808 int
23809 main (void)
23810 {
23811
23812   ;
23813   return 0;
23814 }
23815 _ACEOF
23816 rm -f conftest.$ac_objext
23817 if { (eval echo "$as_me:23817: \"$ac_compile\"") >&5
23818   (eval $ac_compile) 2>&5
23819   ac_status=$?
23820   echo "$as_me:23820: \$? = $ac_status" >&5
23821   (exit $ac_status); } &&
23822          { ac_try='test -s conftest.$ac_objext'
23823   { (eval echo "$as_me:23823: \"$ac_try\"") >&5
23824   (eval $ac_try) 2>&5
23825   ac_status=$?
23826   echo "$as_me:23826: \$? = $ac_status" >&5
23827   (exit $ac_status); }; }; then
23828
23829         test -n "$cf_math" && cat >>confdefs.h <<EOF
23830 #define ETIP_NEEDS_${cf_math} 1
23831 EOF
23832
23833         test -n "$cf_excp" && cat >>confdefs.h <<EOF
23834 #define ETIP_NEEDS_${cf_excp} 1
23835 EOF
23836
23837         cf_result="$cf_math $cf_excp"
23838         break 2
23839
23840 else
23841   echo "$as_me: failed program was:" >&5
23842 cat conftest.$ac_ext >&5
23843 fi
23844 rm -f conftest.$ac_objext conftest.$ac_ext
23845 done
23846 done
23847 echo "$as_me:23847: result: $cf_result" >&5
23848 echo "${ECHO_T}$cf_result" >&6
23849 CXXFLAGS="$cf_save_CXXFLAGS"
23850
23851 if test -n "$CXX"; then
23852 echo "$as_me:23852: checking if $CXX accepts parameter initialization" >&5
23853 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
23854 if test "${cf_cv_cpp_param_init+set}" = set; then
23855   echo $ECHO_N "(cached) $ECHO_C" >&6
23856 else
23857
23858         ac_ext=cc
23859 ac_cpp='$CXXCPP $CPPFLAGS'
23860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23863 ac_main_return=return
23864
23865         if test "$cross_compiling" = yes; then
23866   cf_cv_cpp_param_init=unknown
23867 else
23868   cat >conftest.$ac_ext <<_ACEOF
23869 #line 23869 "configure"
23870 #include "confdefs.h"
23871
23872 class TEST {
23873 private:
23874         int value;
23875 public:
23876         TEST(int x = 1);
23877         ~TEST();
23878 };
23879
23880 TEST::TEST(int x = 1)   // some compilers do not like second initializer
23881 {
23882         value = x;
23883 }
23884 int main(void) { }
23885
23886 _ACEOF
23887 rm -f conftest$ac_exeext
23888 if { (eval echo "$as_me:23888: \"$ac_link\"") >&5
23889   (eval $ac_link) 2>&5
23890   ac_status=$?
23891   echo "$as_me:23891: \$? = $ac_status" >&5
23892   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23893   { (eval echo "$as_me:23893: \"$ac_try\"") >&5
23894   (eval $ac_try) 2>&5
23895   ac_status=$?
23896   echo "$as_me:23896: \$? = $ac_status" >&5
23897   (exit $ac_status); }; }; then
23898   cf_cv_cpp_param_init=yes
23899 else
23900   echo "$as_me: program exited with status $ac_status" >&5
23901 echo "$as_me: failed program was:" >&5
23902 cat conftest.$ac_ext >&5
23903 cf_cv_cpp_param_init=no
23904 fi
23905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23906 fi
23907         ac_ext=cc
23908 ac_cpp='$CXXCPP $CPPFLAGS'
23909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23912 ac_main_return=return
23913
23914 fi
23915 echo "$as_me:23915: result: $cf_cv_cpp_param_init" >&5
23916 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
23917 fi
23918 test "$cf_cv_cpp_param_init" = yes &&
23919 cat >>confdefs.h <<\EOF
23920 #define CPP_HAS_PARAM_INIT 1
23921 EOF
23922
23923 if test -n "$CXX"; then
23924
23925 echo "$as_me:23925: checking if $CXX accepts static_cast" >&5
23926 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
23927 if test "${cf_cv_cpp_static_cast+set}" = set; then
23928   echo $ECHO_N "(cached) $ECHO_C" >&6
23929 else
23930
23931         ac_ext=cc
23932 ac_cpp='$CXXCPP $CPPFLAGS'
23933 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23934 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23935 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23936 ac_main_return=return
23937
23938         cat >conftest.$ac_ext <<_ACEOF
23939 #line 23939 "configure"
23940 #include "confdefs.h"
23941
23942 class NCursesPanel
23943 {
23944 public:
23945   NCursesPanel(int nlines,
23946                int ncols,
23947                int begin_y = 0,
23948                int begin_x = 0)
23949   {
23950   }
23951   NCursesPanel();
23952   ~NCursesPanel();
23953 };
23954
23955 template<class T> class NCursesUserPanel : public NCursesPanel
23956 {
23957 public:
23958   NCursesUserPanel (int nlines,
23959                     int ncols,
23960                     int begin_y = 0,
23961                     int begin_x = 0,
23962                     const T* p_UserData = static_cast<T*>(0))
23963     : NCursesPanel (nlines, ncols, begin_y, begin_x)
23964   {
23965   };
23966   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
23967   {
23968   };
23969
23970   virtual ~NCursesUserPanel() {};
23971 };
23972
23973 int
23974 main (void)
23975 {
23976
23977         const char* p_UserData = static_cast<char*>(0)
23978   ;
23979   return 0;
23980 }
23981 _ACEOF
23982 rm -f conftest.$ac_objext
23983 if { (eval echo "$as_me:23983: \"$ac_compile\"") >&5
23984   (eval $ac_compile) 2>&5
23985   ac_status=$?
23986   echo "$as_me:23986: \$? = $ac_status" >&5
23987   (exit $ac_status); } &&
23988          { ac_try='test -s conftest.$ac_objext'
23989   { (eval echo "$as_me:23989: \"$ac_try\"") >&5
23990   (eval $ac_try) 2>&5
23991   ac_status=$?
23992   echo "$as_me:23992: \$? = $ac_status" >&5
23993   (exit $ac_status); }; }; then
23994   cf_cv_cpp_static_cast=yes
23995 else
23996   echo "$as_me: failed program was:" >&5
23997 cat conftest.$ac_ext >&5
23998 cf_cv_cpp_static_cast=no
23999 fi
24000 rm -f conftest.$ac_objext conftest.$ac_ext
24001
24002         ac_ext=cc
24003 ac_cpp='$CXXCPP $CPPFLAGS'
24004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24007 ac_main_return=return
24008
24009 fi
24010 echo "$as_me:24010: result: $cf_cv_cpp_static_cast" >&5
24011 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24012
24013 fi
24014
24015 test "$cf_cv_cpp_static_cast" = yes &&
24016 cat >>confdefs.h <<\EOF
24017 #define CPP_HAS_STATIC_CAST 1
24018 EOF
24019
24020         CXX_AR='$(AR)'
24021         CXX_ARFLAGS='$(ARFLAGS)'
24022         case $cf_cv_system_name in
24023         (irix*)
24024             if test "$GXX" != yes ; then
24025                 CXX_AR='$(CXX)'
24026                 CXX_ARFLAGS='-ar -o'
24027             fi
24028             ;;
24029         (sco3.2v5*)
24030             CXXLDFLAGS="-u main"
24031             ;;
24032         (solaris2*)
24033             if test "$GXX" != yes ; then
24034                 CXX_AR='$(CXX)'
24035                 CXX_ARFLAGS='-xar -o'
24036             fi
24037             ;;
24038         esac
24039
24040 else
24041         cf_cxx_library=no
24042         cf_cv_builtin_bool=1
24043
24044         # Just because we are not configuring against C++ right now does not
24045         # mean that a user will not want to use C++.  Some distributors disable
24046         # the C++ portion of this configuration as a shortcut (or just to avoid
24047         # compiling the demo in the c++ directory).  So we need a reasonable
24048         # default for the 'bool' type.
24049         #
24050         # Caveat: since the storage of the bool type is not standardized, it
24051         # may change.
24052
24053         if test "$NCURSES_BOOL" != auto ; then
24054                 cf_cv_type_of_bool=$NCURSES_BOOL
24055                 cf_cv_header_stdbool_h=0
24056         else
24057                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24058
24059 echo "$as_me:24059: checking for size of bool" >&5
24060 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24061 if test "${cf_cv_type_of_bool+set}" = set; then
24062   echo $ECHO_N "(cached) $ECHO_C" >&6
24063 else
24064
24065         rm -f cf_test.out
24066         if test "$cross_compiling" = yes; then
24067   cf_cv_type_of_bool=unknown
24068 else
24069   cat >conftest.$ac_ext <<_ACEOF
24070 #line 24070 "configure"
24071 #include "confdefs.h"
24072
24073 #include <stdlib.h>
24074 #include <stdio.h>
24075
24076 #if defined(__cplusplus)
24077
24078 #ifdef HAVE_GXX_BUILTIN_H
24079 #include <g++/builtin.h>
24080 #elif HAVE_GPP_BUILTIN_H
24081 #include <gpp/builtin.h>
24082 #elif HAVE_BUILTIN_H
24083 #include <builtin.h>
24084 #endif
24085
24086 #else
24087
24088 #if $cf_cv_header_stdbool_h
24089 #include <stdbool.h>
24090 #endif
24091
24092 #endif
24093
24094 int main(void)
24095 {
24096         FILE *fp = fopen("cf_test.out", "w");
24097         if (fp != 0) {
24098                 bool x = true;
24099                 if ((bool)(-x) >= 0)
24100                         fputs("unsigned ", fp);
24101                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24102                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24103                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24104                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24105                 fclose(fp);
24106         }
24107         ${cf_cv_main_return:-return}(0);
24108 }
24109
24110 _ACEOF
24111 rm -f conftest$ac_exeext
24112 if { (eval echo "$as_me:24112: \"$ac_link\"") >&5
24113   (eval $ac_link) 2>&5
24114   ac_status=$?
24115   echo "$as_me:24115: \$? = $ac_status" >&5
24116   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24117   { (eval echo "$as_me:24117: \"$ac_try\"") >&5
24118   (eval $ac_try) 2>&5
24119   ac_status=$?
24120   echo "$as_me:24120: \$? = $ac_status" >&5
24121   (exit $ac_status); }; }; then
24122   cf_cv_type_of_bool=`cat cf_test.out`
24123                  if test -z "$cf_cv_type_of_bool"; then
24124                    cf_cv_type_of_bool=unknown
24125                  fi
24126 else
24127   echo "$as_me: program exited with status $ac_status" >&5
24128 echo "$as_me: failed program was:" >&5
24129 cat conftest.$ac_ext >&5
24130 cf_cv_type_of_bool=unknown
24131 fi
24132 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24133 fi
24134
24135 fi
24136
24137         rm -f cf_test.out
24138 echo "$as_me:24138: result: $cf_cv_type_of_bool" >&5
24139 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24140 if test "$cf_cv_type_of_bool" = unknown ; then
24141         case .$NCURSES_BOOL in
24142         (.auto|.) NCURSES_BOOL=unsigned;;
24143         esac
24144         { echo "$as_me:24144: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24145 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24146         cf_cv_type_of_bool=$NCURSES_BOOL
24147 fi
24148
24149                 else
24150                         echo "$as_me:24150: checking for fallback type of bool" >&5
24151 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24152                         case "$host_cpu" in
24153                         (i?86)  cf_cv_type_of_bool=char ;;
24154                         (*)     cf_cv_type_of_bool=int  ;;
24155                         esac
24156                         echo "$as_me:24156: result: $cf_cv_type_of_bool" >&5
24157 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24158                 fi
24159         fi
24160 fi
24161
24162 # If the C compiler did not declare bool, and we did not determine that the C++
24163 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24164 # ncurses library use the same type as C++ bool.  Note that this allows one to
24165 # specify the type of bool in a configure-script option and postpone
24166 # integration with the C++ compiler provided that the types are compatible.
24167 USE_CXX_BOOL=1
24168 if test $cf_cv_cc_bool_type = 1
24169 then
24170         # oops: C has a bool.  Unlikely, but C++ could differ.
24171         USE_CXX_BOOL=0
24172 elif test $cf_cv_builtin_bool = 0
24173 then
24174         # C++ has no bool
24175         USE_CXX_BOOL=0
24176 else
24177         # this is the normal case
24178         USE_CXX_BOOL='defined(__cplusplus)'
24179 fi
24180
24181 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24182
24183         if test "$cf_with_ada" != "no" ; then
24184                 if test "$with_libtool" != "no"; then
24185                         { echo "$as_me:24185: WARNING: libtool does not support Ada - disabling feature" >&5
24186 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24187                         cf_with_ada=no
24188                 fi
24189         fi
24190
24191         if test "$cf_with_ada" != "no" ; then
24192
24193 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24194 do
24195
24196 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24197
24198         unset ac_cv_path_cf_TEMP_gnat
24199         unset cf_TEMP_gnat
24200         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24201 set dummy $cf_prog_gnat; ac_word=$2
24202 echo "$as_me:24202: checking for $ac_word" >&5
24203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24204 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24205   echo $ECHO_N "(cached) $ECHO_C" >&6
24206 else
24207   case $cf_TEMP_gnat in
24208   [\\/]* | ?:[\\/]*)
24209   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24210   ;;
24211   *)
24212   ac_save_IFS=$IFS; IFS=$ac_path_separator
24213 ac_dummy="$PATH"
24214 for ac_dir in $ac_dummy; do
24215   IFS=$ac_save_IFS
24216   test -z "$ac_dir" && ac_dir=.
24217   if $as_executable_p "$ac_dir/$ac_word"; then
24218    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24219    echo "$as_me:24219: found $ac_dir/$ac_word" >&5
24220    break
24221 fi
24222 done
24223
24224   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24225   ;;
24226 esac
24227 fi
24228 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24229
24230 if test -n "$cf_TEMP_gnat"; then
24231   echo "$as_me:24231: result: $cf_TEMP_gnat" >&5
24232 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24233 else
24234   echo "$as_me:24234: result: no" >&5
24235 echo "${ECHO_T}no" >&6
24236 fi
24237
24238         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24239
24240         if test "x$cf_TEMP_gnat" != xno; then
24241                 unset cf_cv_gnat_version
24242                 unset cf_TEMP_gnat
24243
24244 echo "$as_me:24244: checking for $cf_prog_gnat version" >&5
24245 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24246 if test "${cf_cv_gnat_version+set}" = set; then
24247   echo $ECHO_N "(cached) $ECHO_C" >&6
24248 else
24249
24250 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24251         grep '[0-9].[0-9][0-9]*' |\
24252         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24253
24254 fi
24255 echo "$as_me:24255: result: $cf_cv_gnat_version" >&5
24256 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24257 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24258 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24259
24260         fi
24261         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24262
24263         unset cf_TEMP_gnat
24264         unset cf_cv_gnat_version
24265         unset ac_cv_path_cf_TEMP_gnat
24266 done
24267
24268 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24269         cf_ada_make=
24270         cf_cv_prog_gnat_correct=no
24271 else
24272         cf_ada_make=gnatmake
24273         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24274                 # gprconfig is newer than gnatmake; we can continue...
24275                 cf_ada_config="##"
24276         else
24277                 rm -rf conftest* *~conftest*
24278                 if mkdir conftest.src
24279                 then
24280                         cf_ada_config=""
24281                         cd conftest.src
24282                         for cf_gprconfig in Ada C
24283                         do
24284                                 echo "$as_me:24284: checking for gprconfig name for $cf_gprconfig" >&5
24285 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24286                                 if test $cf_gprconfig = C
24287                                 then
24288                                         for cf_gprconfig_param in \
24289                                                 $cf_gprconfig,,,,GNATGCC \
24290                                                 $cf_gprconfig,,,,GCC \
24291                                                 $cf_gprconfig
24292                                         do
24293                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24294                                                 test -n "$cf_gprconfig_value" && break
24295                                         done
24296                                 else
24297                                         cf_gprconfig_param=$cf_gprconfig
24298                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24299                                 fi
24300                                 if test -n "$cf_gprconfig_value"
24301                                 then
24302                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24303                                         echo "$as_me:24303: result: $cf_gprconfig_value" >&5
24304 echo "${ECHO_T}$cf_gprconfig_value" >&6
24305                                 else
24306                                         echo "$as_me:24306: result: missing" >&5
24307 echo "${ECHO_T}missing" >&6
24308                                         cf_ada_config="#"
24309                                         break
24310                                 fi
24311                         done
24312                         cd ..
24313                         rm -rf conftest* *~conftest*
24314                 fi
24315         fi
24316         if test "x$cf_ada_config" != "x#"
24317         then
24318
24319 echo "$as_me:24319: checking for gnat version" >&5
24320 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24321 if test "${cf_cv_gnat_version+set}" = set; then
24322   echo $ECHO_N "(cached) $ECHO_C" >&6
24323 else
24324
24325 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24326         grep '[0-9].[0-9][0-9]*' |\
24327         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24328
24329 fi
24330 echo "$as_me:24330: result: $cf_cv_gnat_version" >&5
24331 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24332 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24333
24334 case $cf_cv_gnat_version in
24335 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
24336         cf_cv_prog_gnat_correct=yes
24337         ;;
24338 (*)
24339         { echo "$as_me:24339: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24340 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24341         cf_cv_prog_gnat_correct=no
24342         ;;
24343 esac
24344
24345                 # Extract the first word of "m4", so it can be a program name with args.
24346 set dummy m4; ac_word=$2
24347 echo "$as_me:24347: checking for $ac_word" >&5
24348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24349 if test "${ac_cv_prog_M4_exists+set}" = set; then
24350   echo $ECHO_N "(cached) $ECHO_C" >&6
24351 else
24352   if test -n "$M4_exists"; then
24353   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24354 else
24355   ac_save_IFS=$IFS; IFS=$ac_path_separator
24356 ac_dummy="$PATH"
24357 for ac_dir in $ac_dummy; do
24358   IFS=$ac_save_IFS
24359   test -z "$ac_dir" && ac_dir=.
24360   $as_executable_p "$ac_dir/$ac_word" || continue
24361 ac_cv_prog_M4_exists="yes"
24362 echo "$as_me:24362: found $ac_dir/$ac_word" >&5
24363 break
24364 done
24365
24366   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24367 fi
24368 fi
24369 M4_exists=$ac_cv_prog_M4_exists
24370 if test -n "$M4_exists"; then
24371   echo "$as_me:24371: result: $M4_exists" >&5
24372 echo "${ECHO_T}$M4_exists" >&6
24373 else
24374   echo "$as_me:24374: result: no" >&5
24375 echo "${ECHO_T}no" >&6
24376 fi
24377
24378                 if test "$ac_cv_prog_M4_exists" = no; then
24379                         cf_cv_prog_gnat_correct=no
24380                         { echo "$as_me:24380: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24381 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24382                 fi
24383                 if test "$cf_cv_prog_gnat_correct" = yes; then
24384                         echo "$as_me:24384: checking if GNAT works" >&5
24385 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24386
24387 rm -rf conftest* *~conftest*
24388 cat >>conftest.ads <<CF_EOF
24389 procedure conftest;
24390 CF_EOF
24391 cat >>conftest.adb <<CF_EOF
24392 with Text_IO;
24393 with GNAT.OS_Lib;
24394 procedure conftest is
24395 begin
24396    Text_IO.Put ("Hello World");
24397    Text_IO.New_Line;
24398    GNAT.OS_Lib.OS_Exit (0);
24399 end conftest;
24400 CF_EOF
24401 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24402    if ( ./conftest 1>&5 2>&1 ) ; then
24403       cf_cv_prog_gnat_correct=yes
24404    else
24405       cf_cv_prog_gnat_correct=no
24406    fi
24407 else
24408    cf_cv_prog_gnat_correct=no
24409 fi
24410 rm -rf conftest* *~conftest*
24411
24412                         echo "$as_me:24412: result: $cf_cv_prog_gnat_correct" >&5
24413 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24414                 fi
24415         else
24416                 cf_cv_prog_gnat_correct=no
24417         fi
24418 fi
24419
24420                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24421
24422         ADAFLAGS="$ADAFLAGS -gnatpn"
24423
24424         echo "$as_me:24424: checking optimization options for ADAFLAGS" >&5
24425 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24426         case "$CFLAGS" in
24427         (*-g*)
24428
24429         ADAFLAGS="$ADAFLAGS -g"
24430
24431                 ;;
24432         esac
24433         case "$CFLAGS" in
24434         (*-O*)
24435                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24436
24437         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24438
24439                 ;;
24440         esac
24441         echo "$as_me:24441: result: $ADAFLAGS" >&5
24442 echo "${ECHO_T}$ADAFLAGS" >&6
24443
24444 echo "$as_me:24444: checking if GNATPREP supports -T option" >&5
24445 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24446 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24447   echo $ECHO_N "(cached) $ECHO_C" >&6
24448 else
24449
24450 cf_cv_gnatprep_opt_t=no
24451 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24452
24453 fi
24454 echo "$as_me:24454: result: $cf_cv_gnatprep_opt_t" >&5
24455 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24456 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24457
24458 echo "$as_me:24458: checking if GNAT supports generics" >&5
24459 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24460 case $cf_cv_gnat_version in
24461 (3.[1-9]*|[4-9].*)
24462         cf_gnat_generics=yes
24463         ;;
24464 (*)
24465         cf_gnat_generics=no
24466         ;;
24467 esac
24468 echo "$as_me:24468: result: $cf_gnat_generics" >&5
24469 echo "${ECHO_T}$cf_gnat_generics" >&6
24470
24471 if test "$cf_gnat_generics" = yes
24472 then
24473         cf_compile_generics=generics
24474         cf_generic_objects="\${GENOBJS}"
24475 else
24476         cf_compile_generics=
24477         cf_generic_objects=
24478 fi
24479
24480 echo "$as_me:24480: checking if GNAT supports SIGINT" >&5
24481 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24482 if test "${cf_cv_gnat_sigint+set}" = set; then
24483   echo $ECHO_N "(cached) $ECHO_C" >&6
24484 else
24485
24486 rm -rf conftest* *~conftest*
24487 cat >>conftest.ads <<CF_EOF
24488 with Ada.Interrupts.Names;
24489
24490 package ConfTest is
24491
24492    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24493    pragma Unreserve_All_Interrupts;
24494    pragma Warnings (On);
24495
24496    protected Process is
24497       procedure Stop;
24498       function Continue return Boolean;
24499       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24500    private
24501       Done : Boolean := False;
24502    end Process;
24503
24504 end ConfTest;
24505 CF_EOF
24506 cat >>conftest.adb <<CF_EOF
24507 package body ConfTest is
24508    protected body Process is
24509       procedure Stop is
24510       begin
24511          Done := True;
24512       end Stop;
24513       function Continue return Boolean is
24514       begin
24515          return not Done;
24516       end Continue;
24517    end Process;
24518 end ConfTest;
24519 CF_EOF
24520 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24521       cf_cv_gnat_sigint=yes
24522 else
24523    cf_cv_gnat_sigint=no
24524 fi
24525 rm -rf conftest* *~conftest*
24526
24527 fi
24528 echo "$as_me:24528: result: $cf_cv_gnat_sigint" >&5
24529 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24530
24531 if test $cf_cv_gnat_sigint = yes ; then
24532         USE_GNAT_SIGINT=""
24533 else
24534         USE_GNAT_SIGINT="#"
24535 fi
24536
24537 cf_gnat_libraries=no
24538 cf_gnat_projects=no
24539
24540 if test "$enable_gnat_projects" != no ; then
24541 echo "$as_me:24541: checking if GNAT supports project files" >&5
24542 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24543 case $cf_cv_gnat_version in
24544 (3.[0-9]*)
24545         ;;
24546 (*)
24547         case $cf_cv_system_name in
24548         (cygwin*|msys*)
24549                 ;;
24550         (*)
24551                 rm -rf conftest* *~conftest*
24552                 if mkdir conftest.src conftest.bin conftest.lib
24553                 then
24554                         cd conftest.src
24555                         rm -rf conftest* *~conftest*
24556                         cat >>library.gpr <<CF_EOF
24557 project Library is
24558   Kind := External ("LIB_KIND");
24559   for Library_Name use "ConfTest";
24560   for Object_Dir use ".";
24561   for Library_ALI_Dir use External("LIBRARY_DIR");
24562   for Library_Version use External ("SONAME");
24563   for Library_Kind use Kind;
24564   for Library_Dir use External("BUILD_DIR");
24565   Source_Dir := External ("SOURCE_DIR");
24566   for Source_Dirs use (Source_Dir);
24567 end Library;
24568 CF_EOF
24569                         cat >>confpackage.ads <<CF_EOF
24570 package ConfPackage is
24571    procedure conftest;
24572 end ConfPackage;
24573 CF_EOF
24574                         cat >>confpackage.adb <<CF_EOF
24575 with Text_IO;
24576 package body ConfPackage is
24577    procedure conftest is
24578    begin
24579       Text_IO.Put ("Hello World");
24580       Text_IO.New_Line;
24581    end conftest;
24582 end ConfPackage;
24583 CF_EOF
24584                         if ( $cf_ada_make $ADAFLAGS \
24585                                         -Plibrary.gpr \
24586                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24587                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24588                                         -XSOURCE_DIR=`pwd` \
24589                                         -XSONAME=libConfTest.so.1 \
24590                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24591                                 cf_gnat_projects=yes
24592                         fi
24593                         cd ..
24594                 fi
24595                 if test -f conftest.lib/confpackage.ali
24596                 then
24597                         cf_gnat_libraries=yes
24598                 fi
24599                 rm -rf conftest* *~conftest*
24600                 ;;
24601         esac
24602         ;;
24603 esac
24604 echo "$as_me:24604: result: $cf_gnat_projects" >&5
24605 echo "${ECHO_T}$cf_gnat_projects" >&6
24606 fi # enable_gnat_projects
24607
24608 if test $cf_gnat_projects = yes
24609 then
24610         echo "$as_me:24610: checking if GNAT supports libraries" >&5
24611 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
24612         echo "$as_me:24612: result: $cf_gnat_libraries" >&5
24613 echo "${ECHO_T}$cf_gnat_libraries" >&6
24614 fi
24615
24616 if test "$cf_gnat_projects" = yes
24617 then
24618         USE_OLD_MAKERULES="#"
24619         USE_GNAT_PROJECTS=""
24620 else
24621         USE_OLD_MAKERULES=""
24622         USE_GNAT_PROJECTS="#"
24623 fi
24624
24625 if test "$cf_gnat_libraries" = yes
24626 then
24627         USE_GNAT_LIBRARIES=""
24628 else
24629         USE_GNAT_LIBRARIES="#"
24630 fi
24631
24632 echo "$as_me:24632: checking for ada-compiler" >&5
24633 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
24634
24635 # Check whether --with-ada-compiler or --without-ada-compiler was given.
24636 if test "${with_ada_compiler+set}" = set; then
24637   withval="$with_ada_compiler"
24638   cf_ada_compiler=$withval
24639 else
24640   cf_ada_compiler=gnatmake
24641 fi;
24642
24643 echo "$as_me:24643: result: $cf_ada_compiler" >&5
24644 echo "${ECHO_T}$cf_ada_compiler" >&6
24645
24646                         cf_ada_package=terminal_interface
24647
24648 echo "$as_me:24648: checking for ada-include" >&5
24649 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
24650
24651 # Check whether --with-ada-include or --without-ada-include was given.
24652 if test "${with_ada_include+set}" = set; then
24653   withval="$with_ada_include"
24654
24655 else
24656   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
24657 fi; if test -n "$prefix/share/ada/adainclude" ; then
24658
24659 if test "x$prefix" != xNONE; then
24660         cf_path_syntax="$prefix"
24661 else
24662         cf_path_syntax="$ac_default_prefix"
24663 fi
24664
24665 case ".$withval" in
24666 (.\$\(*\)*|.\'*\'*)
24667         ;;
24668 (..|./*|.\\*)
24669         ;;
24670 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24671         ;;
24672 (.\${*prefix}*|.\${*dir}*)
24673         eval withval="$withval"
24674         case ".$withval" in
24675         (.NONE/*)
24676                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24677                 ;;
24678         esac
24679         ;;
24680 (.no|.NONE/*)
24681         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24682         ;;
24683 (*)
24684         { { echo "$as_me:24684: error: expected a pathname, not \"$withval\"" >&5
24685 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24686    { (exit 1); exit 1; }; }
24687         ;;
24688 esac
24689
24690 fi
24691 eval ADA_INCLUDE="$withval"
24692
24693 echo "$as_me:24693: result: $ADA_INCLUDE" >&5
24694 echo "${ECHO_T}$ADA_INCLUDE" >&6
24695
24696 echo "$as_me:24696: checking for ada-objects" >&5
24697 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
24698
24699 # Check whether --with-ada-objects or --without-ada-objects was given.
24700 if test "${with_ada_objects+set}" = set; then
24701   withval="$with_ada_objects"
24702
24703 else
24704   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
24705 fi; if test -n "$prefix/lib/ada/adalib" ; then
24706
24707 if test "x$prefix" != xNONE; then
24708         cf_path_syntax="$prefix"
24709 else
24710         cf_path_syntax="$ac_default_prefix"
24711 fi
24712
24713 case ".$withval" in
24714 (.\$\(*\)*|.\'*\'*)
24715         ;;
24716 (..|./*|.\\*)
24717         ;;
24718 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
24719         ;;
24720 (.\${*prefix}*|.\${*dir}*)
24721         eval withval="$withval"
24722         case ".$withval" in
24723         (.NONE/*)
24724                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24725                 ;;
24726         esac
24727         ;;
24728 (.no|.NONE/*)
24729         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
24730         ;;
24731 (*)
24732         { { echo "$as_me:24732: error: expected a pathname, not \"$withval\"" >&5
24733 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
24734    { (exit 1); exit 1; }; }
24735         ;;
24736 esac
24737
24738 fi
24739 eval ADA_OBJECTS="$withval"
24740
24741 echo "$as_me:24741: result: $ADA_OBJECTS" >&5
24742 echo "${ECHO_T}$ADA_OBJECTS" >&6
24743
24744 echo "$as_me:24744: checking if an Ada95 shared-library should be built" >&5
24745 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
24746
24747 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
24748 if test "${with_ada_sharedlib+set}" = set; then
24749   withval="$with_ada_sharedlib"
24750   with_ada_sharedlib=$withval
24751 else
24752   with_ada_sharedlib=no
24753 fi;
24754 echo "$as_me:24754: result: $with_ada_sharedlib" >&5
24755 echo "${ECHO_T}$with_ada_sharedlib" >&6
24756
24757 if test "x$with_ada_sharedlib" != xno
24758 then
24759         if test "x$cf_gnat_projects" != xyes
24760         then
24761                 { echo "$as_me:24761: WARNING: disabling shared-library since GNAT projects are not supported" >&5
24762 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
24763                 with_ada_sharedlib=no
24764         fi
24765 fi
24766
24767 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
24768 MAKE_ADA_SHAREDLIB="#"
24769
24770 if test "x$with_ada_sharedlib" != xno
24771 then
24772         MAKE_ADA_SHAREDLIB=
24773         if test "x$with_ada_sharedlib" != xyes
24774         then
24775                 ADA_SHAREDLIB="$with_ada_sharedlib"
24776         fi
24777 fi
24778
24779                         # allow the Ada binding to be renamed
24780
24781 echo "$as_me:24781: checking for ada-libname" >&5
24782 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
24783
24784 # Check whether --with-ada-libname or --without-ada-libname was given.
24785 if test "${with_ada_libname+set}" = set; then
24786   withval="$with_ada_libname"
24787   ADA_LIBNAME=$withval
24788 else
24789   ADA_LIBNAME=AdaCurses
24790 fi;
24791 case "x$ADA_LIBNAME" in
24792 (x|xyes|xno)
24793         ADA_LIBNAME=AdaCurses
24794         ;;
24795 esac
24796
24797 echo "$as_me:24797: result: $ADA_LIBNAME" >&5
24798 echo "${ECHO_T}$ADA_LIBNAME" >&6
24799
24800                 fi
24801         fi
24802 else
24803         cf_with_ada=no
24804 fi
24805
24806 # do this "late" to avoid conflict with header-checks
24807 if test "x$with_widec" = xyes ; then
24808         echo "$as_me:24808: checking for wchar_t" >&5
24809 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
24810 if test "${ac_cv_type_wchar_t+set}" = set; then
24811   echo $ECHO_N "(cached) $ECHO_C" >&6
24812 else
24813   cat >conftest.$ac_ext <<_ACEOF
24814 #line 24814 "configure"
24815 #include "confdefs.h"
24816 $ac_includes_default
24817 int
24818 main (void)
24819 {
24820 if ((wchar_t *) 0)
24821   return 0;
24822 if (sizeof (wchar_t))
24823   return 0;
24824   ;
24825   return 0;
24826 }
24827 _ACEOF
24828 rm -f conftest.$ac_objext
24829 if { (eval echo "$as_me:24829: \"$ac_compile\"") >&5
24830   (eval $ac_compile) 2>&5
24831   ac_status=$?
24832   echo "$as_me:24832: \$? = $ac_status" >&5
24833   (exit $ac_status); } &&
24834          { ac_try='test -s conftest.$ac_objext'
24835   { (eval echo "$as_me:24835: \"$ac_try\"") >&5
24836   (eval $ac_try) 2>&5
24837   ac_status=$?
24838   echo "$as_me:24838: \$? = $ac_status" >&5
24839   (exit $ac_status); }; }; then
24840   ac_cv_type_wchar_t=yes
24841 else
24842   echo "$as_me: failed program was:" >&5
24843 cat conftest.$ac_ext >&5
24844 ac_cv_type_wchar_t=no
24845 fi
24846 rm -f conftest.$ac_objext conftest.$ac_ext
24847 fi
24848 echo "$as_me:24848: result: $ac_cv_type_wchar_t" >&5
24849 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
24850
24851 echo "$as_me:24851: checking size of wchar_t" >&5
24852 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
24853 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
24854   echo $ECHO_N "(cached) $ECHO_C" >&6
24855 else
24856   if test "$ac_cv_type_wchar_t" = yes; then
24857   if test "$cross_compiling" = yes; then
24858   # Depending upon the size, compute the lo and hi bounds.
24859 cat >conftest.$ac_ext <<_ACEOF
24860 #line 24860 "configure"
24861 #include "confdefs.h"
24862 $ac_includes_default
24863 int
24864 main (void)
24865 {
24866 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
24867   ;
24868   return 0;
24869 }
24870 _ACEOF
24871 rm -f conftest.$ac_objext
24872 if { (eval echo "$as_me:24872: \"$ac_compile\"") >&5
24873   (eval $ac_compile) 2>&5
24874   ac_status=$?
24875   echo "$as_me:24875: \$? = $ac_status" >&5
24876   (exit $ac_status); } &&
24877          { ac_try='test -s conftest.$ac_objext'
24878   { (eval echo "$as_me:24878: \"$ac_try\"") >&5
24879   (eval $ac_try) 2>&5
24880   ac_status=$?
24881   echo "$as_me:24881: \$? = $ac_status" >&5
24882   (exit $ac_status); }; }; then
24883   ac_lo=0 ac_mid=0
24884   while :; do
24885     cat >conftest.$ac_ext <<_ACEOF
24886 #line 24886 "configure"
24887 #include "confdefs.h"
24888 $ac_includes_default
24889 int
24890 main (void)
24891 {
24892 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24893   ;
24894   return 0;
24895 }
24896 _ACEOF
24897 rm -f conftest.$ac_objext
24898 if { (eval echo "$as_me:24898: \"$ac_compile\"") >&5
24899   (eval $ac_compile) 2>&5
24900   ac_status=$?
24901   echo "$as_me:24901: \$? = $ac_status" >&5
24902   (exit $ac_status); } &&
24903          { ac_try='test -s conftest.$ac_objext'
24904   { (eval echo "$as_me:24904: \"$ac_try\"") >&5
24905   (eval $ac_try) 2>&5
24906   ac_status=$?
24907   echo "$as_me:24907: \$? = $ac_status" >&5
24908   (exit $ac_status); }; }; then
24909   ac_hi=$ac_mid; break
24910 else
24911   echo "$as_me: failed program was:" >&5
24912 cat conftest.$ac_ext >&5
24913 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
24914 fi
24915 rm -f conftest.$ac_objext conftest.$ac_ext
24916   done
24917 else
24918   echo "$as_me: failed program was:" >&5
24919 cat conftest.$ac_ext >&5
24920 ac_hi=-1 ac_mid=-1
24921   while :; do
24922     cat >conftest.$ac_ext <<_ACEOF
24923 #line 24923 "configure"
24924 #include "confdefs.h"
24925 $ac_includes_default
24926 int
24927 main (void)
24928 {
24929 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
24930   ;
24931   return 0;
24932 }
24933 _ACEOF
24934 rm -f conftest.$ac_objext
24935 if { (eval echo "$as_me:24935: \"$ac_compile\"") >&5
24936   (eval $ac_compile) 2>&5
24937   ac_status=$?
24938   echo "$as_me:24938: \$? = $ac_status" >&5
24939   (exit $ac_status); } &&
24940          { ac_try='test -s conftest.$ac_objext'
24941   { (eval echo "$as_me:24941: \"$ac_try\"") >&5
24942   (eval $ac_try) 2>&5
24943   ac_status=$?
24944   echo "$as_me:24944: \$? = $ac_status" >&5
24945   (exit $ac_status); }; }; then
24946   ac_lo=$ac_mid; break
24947 else
24948   echo "$as_me: failed program was:" >&5
24949 cat conftest.$ac_ext >&5
24950 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
24951 fi
24952 rm -f conftest.$ac_objext conftest.$ac_ext
24953   done
24954 fi
24955 rm -f conftest.$ac_objext conftest.$ac_ext
24956 # Binary search between lo and hi bounds.
24957 while test "x$ac_lo" != "x$ac_hi"; do
24958   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24959   cat >conftest.$ac_ext <<_ACEOF
24960 #line 24960 "configure"
24961 #include "confdefs.h"
24962 $ac_includes_default
24963 int
24964 main (void)
24965 {
24966 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
24967   ;
24968   return 0;
24969 }
24970 _ACEOF
24971 rm -f conftest.$ac_objext
24972 if { (eval echo "$as_me:24972: \"$ac_compile\"") >&5
24973   (eval $ac_compile) 2>&5
24974   ac_status=$?
24975   echo "$as_me:24975: \$? = $ac_status" >&5
24976   (exit $ac_status); } &&
24977          { ac_try='test -s conftest.$ac_objext'
24978   { (eval echo "$as_me:24978: \"$ac_try\"") >&5
24979   (eval $ac_try) 2>&5
24980   ac_status=$?
24981   echo "$as_me:24981: \$? = $ac_status" >&5
24982   (exit $ac_status); }; }; then
24983   ac_hi=$ac_mid
24984 else
24985   echo "$as_me: failed program was:" >&5
24986 cat conftest.$ac_ext >&5
24987 ac_lo=`expr $ac_mid + 1`
24988 fi
24989 rm -f conftest.$ac_objext conftest.$ac_ext
24990 done
24991 ac_cv_sizeof_wchar_t=$ac_lo
24992 else
24993   if test "$cross_compiling" = yes; then
24994   { { echo "$as_me:24994: error: cannot run test program while cross compiling" >&5
24995 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
24996    { (exit 1); exit 1; }; }
24997 else
24998   cat >conftest.$ac_ext <<_ACEOF
24999 #line 24999 "configure"
25000 #include "confdefs.h"
25001 $ac_includes_default
25002 int
25003 main (void)
25004 {
25005 FILE *f = fopen ("conftest.val", "w");
25006 if (!f)
25007   $ac_main_return (1);
25008 fprintf (f, "%d", (sizeof (wchar_t)));
25009 fclose (f);
25010   ;
25011   return 0;
25012 }
25013 _ACEOF
25014 rm -f conftest$ac_exeext
25015 if { (eval echo "$as_me:25015: \"$ac_link\"") >&5
25016   (eval $ac_link) 2>&5
25017   ac_status=$?
25018   echo "$as_me:25018: \$? = $ac_status" >&5
25019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25020   { (eval echo "$as_me:25020: \"$ac_try\"") >&5
25021   (eval $ac_try) 2>&5
25022   ac_status=$?
25023   echo "$as_me:25023: \$? = $ac_status" >&5
25024   (exit $ac_status); }; }; then
25025   ac_cv_sizeof_wchar_t=`cat conftest.val`
25026 else
25027   echo "$as_me: program exited with status $ac_status" >&5
25028 echo "$as_me: failed program was:" >&5
25029 cat conftest.$ac_ext >&5
25030 fi
25031 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25032 fi
25033 fi
25034 rm -f conftest.val
25035 else
25036   ac_cv_sizeof_wchar_t=0
25037 fi
25038 fi
25039 echo "$as_me:25039: result: $ac_cv_sizeof_wchar_t" >&5
25040 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25041 cat >>confdefs.h <<EOF
25042 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25043 EOF
25044
25045         # cross-compiling to mingw can run into the problem that attempting to
25046         # link with the regex library fails, causing the test to not set this to
25047         # a number.  "recent" autoconf does not address this problem either -TD
25048         if test -z "$ac_cv_sizeof_wchar_t"
25049         then
25050                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25051
25052 echo "${as_me:-configure}:25052: testing test failed (assume 2) ..." 1>&5
25053
25054                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25055                 mv confdefs.tmp confdefs.h
25056                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25057         fi
25058 fi
25059
25060 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25061 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25062 ###
25063 ### ticlib modules may be a separate library, otherwise contained in termlib.
25064 ### termlib modules may be a separate library, otherwise contained in ncurses.
25065 ###
25066 ### The of "+" or " " between the tokens controls the way the script
25067 ### chooses to split module lists into libraries.
25068 ###
25069 ### (see CF_LIB_RULES).
25070 echo "$as_me:25070: checking for library subsets" >&5
25071 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25072 LIB_SUBSETS=
25073
25074 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25075         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25076         if test "$with_ticlib" != no ; then
25077                 LIB_SUBSETS="${LIB_SUBSETS} "
25078         else
25079                 LIB_SUBSETS="${LIB_SUBSETS}+"
25080         fi
25081 fi
25082
25083 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25084 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25085
25086 if test "$with_termlib" != no ; then
25087         LIB_SUBSETS="${LIB_SUBSETS} "
25088 else
25089         LIB_SUBSETS="${LIB_SUBSETS}+"
25090 fi
25091
25092 LIB_SUBSETS="${LIB_SUBSETS}base"
25093
25094 # Most term-driver calls are to tinfo, but some like init_pair are to the
25095 # base library (so it resides in base).
25096 if test "$with_term_driver" != no ; then
25097         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25098         case $cf_cv_system_name in
25099         (*mingw32*|*mingw64*)
25100                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25101                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25102                 ;;
25103         (*)
25104                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25105                 ;;
25106         esac
25107 fi
25108
25109 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25110 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25111
25112 echo "$as_me:25112: result: $LIB_SUBSETS" >&5
25113 echo "${ECHO_T}$LIB_SUBSETS" >&6
25114
25115 ### Construct the list of include-directories to be generated
25116
25117 if test "$srcdir" != "."; then
25118         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25119 fi
25120 CPPFLAGS="-I../include $CPPFLAGS"
25121 if test "$srcdir" != "."; then
25122         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25123 fi
25124 CPPFLAGS="-I. $CPPFLAGS"
25125
25126 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25127 if test "$srcdir" != "."; then
25128         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25129 fi
25130 if test "$GCC" != yes; then
25131         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25132 elif test "$includedir" != "/usr/include"; then
25133         if test "$includedir" = '${prefix}/include' ; then
25134                 if test x$prefix != x/usr ; then
25135                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25136                 fi
25137         else
25138                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25139         fi
25140 fi
25141
25142 ### Build up pieces for makefile rules
25143 echo "$as_me:25143: checking default library suffix" >&5
25144 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25145
25146         case $DFT_LWR_MODEL in
25147         (libtool) DFT_ARG_SUFFIX=''   ;;
25148         (normal)  DFT_ARG_SUFFIX=''   ;;
25149         (debug)   DFT_ARG_SUFFIX='_g' ;;
25150         (profile) DFT_ARG_SUFFIX='_p' ;;
25151         (shared)  DFT_ARG_SUFFIX=''   ;;
25152         esac
25153         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25154 echo "$as_me:25154: result: $DFT_ARG_SUFFIX" >&5
25155 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25156
25157 echo "$as_me:25157: checking default library-dependency suffix" >&5
25158 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25159
25160         case X$DFT_LWR_MODEL in
25161         (Xlibtool)
25162                 DFT_LIB_SUFFIX='.la'
25163                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25164                 ;;
25165         (Xdebug)
25166                 DFT_LIB_SUFFIX='_g.a'
25167                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25168                 ;;
25169         (Xprofile)
25170                 DFT_LIB_SUFFIX='_p.a'
25171                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25172                 ;;
25173         (Xshared)
25174                 case $cf_cv_system_name in
25175                 (aix[5-7]*)
25176                         DFT_LIB_SUFFIX='.so'
25177                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25178                         ;;
25179                 (cygwin*|msys*|mingw*)
25180                         DFT_LIB_SUFFIX='.dll'
25181                         DFT_DEP_SUFFIX='.dll.a'
25182                         ;;
25183                 (darwin*)
25184                         DFT_LIB_SUFFIX='.dylib'
25185                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25186                         ;;
25187                 (hpux*)
25188                         case $target in
25189                         (ia64*)
25190                                 DFT_LIB_SUFFIX='.so'
25191                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25192                                 ;;
25193                         (*)
25194                                 DFT_LIB_SUFFIX='.sl'
25195                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25196                                 ;;
25197                         esac
25198                         ;;
25199                 (*)
25200                         DFT_LIB_SUFFIX='.so'
25201                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25202                         ;;
25203                 esac
25204                 ;;
25205         (*)
25206                 DFT_LIB_SUFFIX='.a'
25207                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25208                 ;;
25209         esac
25210         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25211         then
25212                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25213                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25214         fi
25215 echo "$as_me:25215: result: $DFT_DEP_SUFFIX" >&5
25216 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25217
25218 echo "$as_me:25218: checking default object directory" >&5
25219 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25220
25221         case $DFT_LWR_MODEL in
25222         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25223         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25224         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25225         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25226         (shared)
25227                 case $cf_cv_system_name in
25228                 (cygwin|msys)
25229                         DFT_OBJ_SUBDIR='objects' ;;
25230                 (*)
25231                         DFT_OBJ_SUBDIR='obj_s' ;;
25232                 esac
25233         esac
25234 echo "$as_me:25234: result: $DFT_OBJ_SUBDIR" >&5
25235 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25236
25237 if test "x$cf_with_cxx" = xyes ; then
25238 echo "$as_me:25238: checking c++ library-dependency suffix" >&5
25239 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25240 if test "$with_libtool" != "no"; then
25241         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25242         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25243 elif test "$with_shared_cxx" != "no"; then
25244         # also for g++ users...
25245         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25246 else
25247         # we normally make a static library because C/C++ library rules differ
25248
25249         case Xnormal in
25250         (Xlibtool)
25251                 CXX_LIB_SUFFIX='.la'
25252                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25253                 ;;
25254         (Xdebug)
25255                 CXX_LIB_SUFFIX='_g.a'
25256                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25257                 ;;
25258         (Xprofile)
25259                 CXX_LIB_SUFFIX='_p.a'
25260                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25261                 ;;
25262         (Xshared)
25263                 case $cf_cv_system_name in
25264                 (aix[5-7]*)
25265                         CXX_LIB_SUFFIX='.so'
25266                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25267                         ;;
25268                 (cygwin*|msys*|mingw*)
25269                         CXX_LIB_SUFFIX='.dll'
25270                         CXX_DEP_SUFFIX='.dll.a'
25271                         ;;
25272                 (darwin*)
25273                         CXX_LIB_SUFFIX='.dylib'
25274                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25275                         ;;
25276                 (hpux*)
25277                         case $target in
25278                         (ia64*)
25279                                 CXX_LIB_SUFFIX='.so'
25280                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25281                                 ;;
25282                         (*)
25283                                 CXX_LIB_SUFFIX='.sl'
25284                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25285                                 ;;
25286                         esac
25287                         ;;
25288                 (*)
25289                         CXX_LIB_SUFFIX='.so'
25290                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25291                         ;;
25292                 esac
25293                 ;;
25294         (*)
25295                 CXX_LIB_SUFFIX='.a'
25296                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25297                 ;;
25298         esac
25299         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25300         then
25301                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25302                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25303         fi
25304
25305 fi
25306 echo "$as_me:25306: result: $CXX_LIB_SUFFIX" >&5
25307 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25308
25309 fi
25310
25311 # do not want -ldl in build except as needed for -lncurses dependency
25312 if test "x$with_dlsym" = xyes ; then
25313 if test $DFT_LWR_MODEL = shared || \
25314    test $DFT_LWR_MODEL = libtool ; then
25315
25316 # remove dl library from $LIBS
25317 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25318
25319 fi
25320 fi
25321 ### Set up low-level terminfo dependencies for makefiles.
25322
25323 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25324 # do not need libdl
25325 TICS_LIST=
25326 if test "x$with_dlsym" = xyes ; then
25327
25328 # remove dl library from $SHLIB_LIST
25329 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25330
25331 fi
25332
25333 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25334 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25335 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25336 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25337 then
25338         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25339 fi
25340
25341 if test "$with_ticlib" != no ; then
25342
25343         if test "x$with_ticlib" != xyes ; then
25344                 TICS_NAME=$with_ticlib
25345                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25346                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25347                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25348                 TICS_LIB_SUFFIX="${with_ticlib}"
25349         else
25350                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25351                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25352                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25353                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25354         fi
25355         TICS_LDFLAGS="-L${LIB_DIR}"
25356         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25357 else
25358         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25359         TICS_LDFLAGS="-L${LIB_DIR}"
25360         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25361 fi
25362
25363 if test "$with_termlib" != no ; then
25364
25365         if test "x$with_termlib" != xyes ; then
25366                 TINFO_NAME=$with_termlib
25367                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25368                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25369                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25370                 TINFO_LIB_SUFFIX="${with_termlib}"
25371         else
25372                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25373                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25374                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25375                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25376         fi
25377
25378         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25379         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25380         if test "$DFT_LWR_MODEL" = "libtool"; then
25381                 TEST_ARGS="${TEST_DEPS}"
25382                 TEST_ARG2="${TEST_DEP2}"
25383                 TINFO_LDFLAGS="-L${LIB_DIR}"
25384                 TINFO_LIBS="$TEST_ARGS"
25385                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25386                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25387         else
25388                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25389                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25390                 if test "x$with_term_driver" != xno ; then
25391                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25392                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25393                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25394                 else
25395                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25396                         TINFO_LIBS="$TEST_ARGS"
25397                 fi
25398                 TINFO_LDFLAGS="-L${LIB_DIR}"
25399                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25400         fi
25401 else
25402         # the next lines are needed for linking libtic over libncurses
25403         TINFO_NAME=${LIB_NAME}
25404         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25405         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25406         if test "x$with_tic_depends" = xyes ; then
25407                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25408         else
25409                 TICS_LIST="$SHLIB_LIST"
25410         fi
25411
25412         TINFO_LDFLAGS="-L${LIB_DIR}"
25413         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25414 fi
25415
25416 if test "$DFT_LWR_MODEL" = shared ; then
25417         case $cf_cv_system_name in
25418         (cygwin*|msys*)
25419                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25420                 TINFO_SUFFIX=.dll
25421                 ;;
25422         esac
25423 fi
25424
25425 if test "x$with_dlsym" = xyes ; then
25426
25427 # remove dl library from $TICS_LIST
25428 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25429
25430 fi
25431
25432 if test "$DFT_LWR_MODEL" = "libtool"; then
25433         OBJEXT=lo
25434 fi
25435
25436 # needed for Ada95
25437 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25438
25439 case $DFT_LWR_MODEL in
25440 (normal|debug|profile)
25441
25442 if test "$GCC" = yes ; then
25443         case $cf_cv_system_name in
25444         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25445                 LDFLAGS_STATIC=
25446                 LDFLAGS_SHARED=
25447                 ;;
25448         (*)     # normally, except when broken
25449                 LDFLAGS_STATIC=-static
25450                 LDFLAGS_SHARED=-dynamic
25451                 ;;
25452         esac
25453 else
25454         case $cf_cv_system_name in
25455         (aix[4-7]*)     # from ld manpage
25456                 LDFLAGS_STATIC=-bstatic
25457                 LDFLAGS_SHARED=-bdynamic
25458                 ;;
25459         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25460                 # We could also use just "archive" and "shared".
25461                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25462                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25463                 ;;
25464         (irix*)         # from ld manpage IRIX64
25465                 LDFLAGS_STATIC=-Bstatic
25466                 LDFLAGS_SHARED=-Bdynamic
25467                 ;;
25468         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25469                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25470                 LDFLAGS_STATIC=-noso
25471                 LDFLAGS_SHARED=-so_archive
25472                 ;;
25473         (solaris2*)
25474                 LDFLAGS_STATIC=-Bstatic
25475                 LDFLAGS_SHARED=-Bdynamic
25476                 ;;
25477         esac
25478 fi
25479
25480 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25481 then
25482         echo "$as_me:25482: checking if linker supports switching between static/dynamic" >&5
25483 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25484
25485         rm -f libconftest.a
25486         cat >conftest.$ac_ext <<EOF
25487 #line 25487 "configure"
25488 #include <stdio.h>
25489 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25490 EOF
25491         if { (eval echo "$as_me:25491: \"$ac_compile\"") >&5
25492   (eval $ac_compile) 2>&5
25493   ac_status=$?
25494   echo "$as_me:25494: \$? = $ac_status" >&5
25495   (exit $ac_status); } ; then
25496                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25497                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25498         fi
25499         rm -f conftest.*
25500
25501         cf_save_LIBS="$LIBS"
25502
25503         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25504         cat >conftest.$ac_ext <<_ACEOF
25505 #line 25505 "configure"
25506 #include "confdefs.h"
25507
25508 #line 25508 "configure"
25509 #include <stdio.h>
25510 int cf_ldflags_static(FILE *fp);
25511
25512 int
25513 main (void)
25514 {
25515
25516         return cf_ldflags_static(stdin);
25517
25518   ;
25519   return 0;
25520 }
25521 _ACEOF
25522 rm -f conftest.$ac_objext conftest$ac_exeext
25523 if { (eval echo "$as_me:25523: \"$ac_link\"") >&5
25524   (eval $ac_link) 2>&5
25525   ac_status=$?
25526   echo "$as_me:25526: \$? = $ac_status" >&5
25527   (exit $ac_status); } &&
25528          { ac_try='test -s conftest$ac_exeext'
25529   { (eval echo "$as_me:25529: \"$ac_try\"") >&5
25530   (eval $ac_try) 2>&5
25531   ac_status=$?
25532   echo "$as_me:25532: \$? = $ac_status" >&5
25533   (exit $ac_status); }; }; then
25534
25535         # some linkers simply ignore the -dynamic
25536         case x`file conftest$ac_exeext 2>/dev/null` in
25537         (*static*)
25538                 cf_ldflags_static=no
25539                 ;;
25540         (*)
25541                 cf_ldflags_static=yes
25542                 ;;
25543         esac
25544
25545 else
25546   echo "$as_me: failed program was:" >&5
25547 cat conftest.$ac_ext >&5
25548 cf_ldflags_static=no
25549 fi
25550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25551
25552         rm -f libconftest.*
25553         LIBS="$cf_save_LIBS"
25554
25555         echo "$as_me:25555: result: $cf_ldflags_static" >&5
25556 echo "${ECHO_T}$cf_ldflags_static" >&6
25557
25558         if test $cf_ldflags_static != yes
25559         then
25560                 LDFLAGS_STATIC=
25561                 LDFLAGS_SHARED=
25562         fi
25563 else
25564         LDFLAGS_STATIC=
25565         LDFLAGS_SHARED=
25566 fi
25567
25568         ;;
25569 esac
25570
25571 echo "$as_me:25571: checking where we will install curses.h" >&5
25572 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
25573
25574 includesubdir=
25575 if test "$with_overwrite" = no && \
25576  ( test "x$includedir" = 'x${prefix}/include' || \
25577    test "x$includedir" = "x${prefix}/include" )
25578 then
25579         includesubdir="/ncurses${USE_LIB_SUFFIX}"
25580 fi
25581 echo "$as_me:25581: result: ${includedir}${includesubdir}" >&5
25582 echo "${ECHO_T}${includedir}${includesubdir}" >&6
25583
25584 ### Resolve a conflict between normal and wide-curses by forcing applications
25585 ### that will need libutf8 to add it to their configure script.
25586 if test "$with_overwrite" != no ; then
25587 if test "$NCURSES_LIBUTF8" = 1 ; then
25588         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
25589         { echo "$as_me:25589: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
25590 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
25591 fi
25592 fi
25593 WITH_OVERWRITE=$with_overwrite
25594
25595 # used to separate tack out of the tree
25596 NCURSES_TREE=
25597
25598 ### predefined stuff for the test programs
25599
25600 cat >>confdefs.h <<\EOF
25601 #define HAVE_SLK_COLOR 1
25602 EOF
25603
25604 ### Construct the list of subdirectories for which we'll customize makefiles
25605 ### with the appropriate compile-rules.
25606
25607 echo "$as_me:25607: checking for src modules" >&5
25608 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
25609
25610 # dependencies and linker-arguments for test-programs
25611 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
25612 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
25613 if test "$DFT_LWR_MODEL" = "libtool"; then
25614         TEST_ARGS="${TEST_DEPS}"
25615         TEST_ARG2="${TEST_DEP2}"
25616 else
25617         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25618         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
25619 fi
25620
25621 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
25622 cf_cv_src_modules=
25623 for cf_dir in $modules_to_build
25624 do
25625         if test -f $srcdir/$cf_dir/modules; then
25626
25627                 # We may/may not have tack in the distribution, though the
25628                 # makefile is.
25629                 if test $cf_dir = tack ; then
25630                         if test "x$cf_with_tack" != "xyes"; then
25631                                 continue
25632                         fi
25633                 fi
25634
25635                 if test -z "$cf_cv_src_modules"; then
25636                         cf_cv_src_modules=$cf_dir
25637                 else
25638                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
25639                 fi
25640
25641                 # Make the ncurses_cfg.h file record the library interface files as
25642                 # well.  These are header files that are the same name as their
25643                 # directory.  Ncurses is the only library that does not follow
25644                 # that pattern.
25645                 if test $cf_dir = tack ; then
25646                         continue
25647                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
25648
25649 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25650
25651                         cat >>confdefs.h <<EOF
25652 #define HAVE_${cf_have_include}_H 1
25653 EOF
25654
25655                         cat >>confdefs.h <<EOF
25656 #define HAVE_LIB${cf_have_include} 1
25657 EOF
25658
25659                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
25660                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
25661                         if test "$DFT_LWR_MODEL" = "libtool"; then
25662                                 TEST_ARGS="${TEST_DEPS}"
25663                                 TEST_ARG2="${TEST_DEP2}"
25664                         else
25665                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
25666                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
25667                         fi
25668                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
25669                 fi
25670         fi
25671 done
25672 echo "$as_me:25672: result: $cf_cv_src_modules" >&5
25673 echo "${ECHO_T}$cf_cv_src_modules" >&6
25674
25675 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
25676 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
25677
25678 SRC_SUBDIRS=
25679 if test "x$cf_with_manpages" != xno ; then
25680         SRC_SUBDIRS="$SRC_SUBDIRS man"
25681 fi
25682 SRC_SUBDIRS="$SRC_SUBDIRS include"
25683 for cf_dir in $cf_cv_src_modules
25684 do
25685         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
25686 done
25687 if test "x$cf_with_tests" != "xno" ; then
25688         SRC_SUBDIRS="$SRC_SUBDIRS test"
25689 fi
25690 # always make this, to install the ncurses-config script
25691 SRC_SUBDIRS="$SRC_SUBDIRS misc"
25692 if test "$cf_with_cxx_binding" != no; then
25693         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
25694         SRC_SUBDIRS="$SRC_SUBDIRS c++"
25695 fi
25696
25697 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
25698 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
25699
25700 ADA_SUBDIRS=
25701 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
25702         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
25703         ADA_SUBDIRS="gen src"
25704         if test "x$cf_with_tests" != "xno" ; then
25705                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
25706         fi
25707 fi
25708
25709 SUB_MAKEFILES=
25710 for cf_dir in $SRC_SUBDIRS
25711 do
25712         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
25713 done
25714
25715 if test -n "$ADA_SUBDIRS"; then
25716         for cf_dir in $ADA_SUBDIRS
25717         do
25718                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
25719         done
25720
25721 fi
25722
25723 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25724    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
25725    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
25726    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
25727 fi
25728
25729 DIRS_TO_MAKE="lib"
25730 for cf_item in $cf_list_models
25731 do
25732
25733         case $cf_item in
25734         (libtool) cf_subdir='obj_lo'  ;;
25735         (normal)  cf_subdir='objects' ;;
25736         (debug)   cf_subdir='obj_g' ;;
25737         (profile) cf_subdir='obj_p' ;;
25738         (shared)
25739                 case $cf_cv_system_name in
25740                 (cygwin|msys)
25741                         cf_subdir='objects' ;;
25742                 (*)
25743                         cf_subdir='obj_s' ;;
25744                 esac
25745         esac
25746
25747         for cf_item2 in $DIRS_TO_MAKE
25748         do
25749                 test $cf_item2 = $cf_subdir && break
25750         done
25751         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
25752 done
25753 for cf_dir in $DIRS_TO_MAKE
25754 do
25755         test ! -d $cf_dir && mkdir $cf_dir
25756 done
25757
25758 # symbols that differ when compiling Ada95 by itself.
25759 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
25760
25761 # values to use as strings
25762
25763 cat >>confdefs.h <<EOF
25764 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
25765 EOF
25766
25767 cat >>confdefs.h <<EOF
25768 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
25769 EOF
25770
25771 ### Now that we're done running tests, add the compiler-warnings, if any
25772
25773 cf_fix_cppflags=no
25774 cf_new_cflags=
25775 cf_new_cppflags=
25776 cf_new_extra_cppflags=
25777
25778 for cf_add_cflags in $EXTRA_CFLAGS
25779 do
25780 case $cf_fix_cppflags in
25781 (no)
25782         case $cf_add_cflags in
25783         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25784                 case $cf_add_cflags in
25785                 (-D*)
25786                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25787
25788                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25789                                 && test -z "${cf_tst_cflags}" \
25790                                 && cf_fix_cppflags=yes
25791
25792                         if test $cf_fix_cppflags = yes ; then
25793
25794         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25795         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25796
25797                                 continue
25798                         elif test "${cf_tst_cflags}" = "\"'" ; then
25799
25800         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25801         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25802
25803                                 continue
25804                         fi
25805                         ;;
25806                 esac
25807                 case "$CPPFLAGS" in
25808                 (*$cf_add_cflags)
25809                         ;;
25810                 (*)
25811                         case $cf_add_cflags in
25812                         (-D*)
25813                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25814
25815 CPPFLAGS=`echo "$CPPFLAGS" | \
25816         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
25817                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
25818
25819                                 ;;
25820                         esac
25821
25822         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25823         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25824
25825                         ;;
25826                 esac
25827                 ;;
25828         (*)
25829
25830         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25831         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25832
25833                 ;;
25834         esac
25835         ;;
25836 (yes)
25837
25838         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25839         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25840
25841         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
25842
25843         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25844                 && test -z "${cf_tst_cflags}" \
25845                 && cf_fix_cppflags=no
25846         ;;
25847 esac
25848 done
25849
25850 if test -n "$cf_new_cflags" ; then
25851
25852         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25853         CFLAGS="${CFLAGS}$cf_new_cflags"
25854
25855 fi
25856
25857 if test -n "$cf_new_cppflags" ; then
25858
25859         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25860         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25861
25862 fi
25863
25864 if test -n "$cf_new_extra_cppflags" ; then
25865
25866         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25867         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25868
25869 fi
25870
25871 ### Define substitutions for header files to avoid name-pollution
25872
25873 if test "x$cf_cv_have_tcgetattr" = xyes ; then
25874         HAVE_TCGETATTR=1
25875 else
25876         HAVE_TCGETATTR=0
25877 fi
25878
25879 if test "x$ac_cv_header_stdint_h" = xyes ; then
25880         HAVE_STDINT_H=1
25881 else
25882         HAVE_STDINT_H=0
25883 fi
25884
25885 if test "x$ac_cv_header_termio_h" = xyes ; then
25886         HAVE_TERMIO_H=1
25887 else
25888         HAVE_TERMIO_H=0
25889 fi
25890
25891 if test "x$ac_cv_header_termios_h" = xyes ; then
25892         HAVE_TERMIOS_H=1
25893 else
25894         HAVE_TERMIOS_H=0
25895 fi
25896
25897 ################################################################################
25898 test "x$use_database" = xyes && \
25899 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
25900
25901 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
25902 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
25903
25904 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
25905 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
25906 fi
25907
25908 if test "x$cf_with_tests" != xno ; then
25909         MAKE_TESTS=
25910 else
25911         MAKE_TESTS="#"
25912 fi
25913
25914 ADAHTML_DIR=../../doc/html/ada
25915
25916 # these could be configurable, but are not currently
25917 PANEL_NAME=panel
25918 MENU_NAME=menu
25919 FORM_NAME=form
25920 CXX_NAME=ncurses++
25921
25922 # workaround for OS/2 (20151017)
25923 case $cf_cv_system_name in
25924 (os2*)
25925         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
25926         ;;
25927 (*)
25928         LIBTOOL_OPTS_CXX=
25929         ;;
25930 esac
25931
25932 # workaround for g++ versus Solaris (20131116)
25933 case $cf_cv_system_name in
25934 (solaris2*)
25935         case "x$CPPFLAGS" in
25936         (*-D_XOPEN_SOURCE_EXTENDED*)
25937                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
25938
25939 echo "${as_me:-configure}:25939: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
25940
25941                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
25942                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
25943                 ;;
25944         esac
25945         ;;
25946 esac
25947
25948 # Help to automatically enable the extended curses features when using either
25949 # the *-config or the ".pc" files by adding defines.
25950 echo "$as_me:25950: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
25951 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
25952 PKG_CFLAGS=
25953 for cf_loop1 in $CPPFLAGS_after_XOPEN
25954 do
25955         cf_found=no
25956         for cf_loop2 in $CPPFLAGS_before_XOPEN
25957         do
25958                 if test "x$cf_loop1" = "x$cf_loop2"
25959                 then
25960                         cf_found=yes
25961                         break
25962                 fi
25963         done
25964         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
25965 done
25966 echo "$as_me:25966: result: $PKG_CFLAGS" >&5
25967 echo "${ECHO_T}$PKG_CFLAGS" >&6
25968
25969 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
25970 case "x$NCURSES_OSPEED" in
25971 (*short*)
25972         cf_compatible=1
25973         ;;
25974 (*)
25975         cf_compatible=0
25976         ;;
25977 esac
25978
25979 cat >>confdefs.h <<EOF
25980 #define NCURSES_OSPEED_COMPAT $cf_compatible
25981 EOF
25982
25983 case "x$cf_cv_typeof_chtype" in
25984 (xshort|xint|xlong)
25985         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25986         ;;
25987 esac
25988
25989 case "x$cf_cv_typeof_mmask_t" in
25990 (xshort|xint|xlong)
25991         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25992         ;;
25993 esac
25994
25995 # substitute into misc/Makefile to suppress
25996 # (un)install.data from the
25997 # (un)install rules.
25998 if test "x$cf_with_db_install" = "xno"; then
25999         MISC_INSTALL_DATA=
26000         MISC_UNINSTALL_DATA=
26001 else
26002         MISC_INSTALL_DATA=install.data
26003         MISC_UNINSTALL_DATA=uninstall.data
26004 fi
26005
26006 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26007         MAKE_DATABASE="#"
26008 else
26009         MAKE_DATABASE="$MAKE_TERMINFO"
26010 fi
26011
26012 if test -n "$PACKAGE"
26013 then
26014         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26015         export PACKAGE
26016         echo "package: $PACKAGE"
26017 fi
26018
26019 UNALTERED_SYMS=
26020 cf_filter_syms=no
26021
26022 if test -n "$RESULTING_SYMS"
26023 then
26024         cf_filter_syms=$cf_dft_filter_syms
26025         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26026
26027 echo "${as_me:-configure}:26027: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26028
26029 fi
26030
26031 if test "x$WILDCARD_SYMS" = xno
26032 then
26033         cf_filter_syms=yes
26034 fi
26035
26036 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26037
26038 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26039 if test $cf_filter_syms = yes
26040 then
26041         RESULTING_SYMS=resulting.map
26042 fi
26043
26044 if test "x$cross_compiling" = xyes ; then
26045         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26046         CHECK_BUILD="#"
26047 else
26048         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26049         CHECK_BUILD=
26050 fi
26051
26052 # This is used for the *-config script and *.pc data files.
26053
26054 echo "$as_me:26054: checking for linker search path" >&5
26055 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26056 if test "${cf_cv_ld_searchpath+set}" = set; then
26057   echo $ECHO_N "(cached) $ECHO_C" >&6
26058 else
26059
26060 if test "$cross_compiling" != yes ; then
26061
26062 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26063 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26064
26065 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26066 # update the cache, which makes it run faster.
26067 test -z "$cf_pathlist" && \
26068         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26069
26070 test -z "$cf_pathlist" &&
26071         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26072
26073 # This works with OpenBSD 6.5, which lists only filenames
26074 test -z "$cf_pathlist" &&
26075         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26076
26077 if test -z "$cf_pathlist"
26078 then
26079         # dyld default path with MacOS
26080         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26081         then
26082                 # do this to bypass check
26083                 cf_cv_ld_searchpath='$HOME/lib'
26084                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26085         fi
26086 fi
26087
26088 if test -z "$cf_pathlist"
26089 then
26090         # Solaris is hardcoded
26091         if test -d /opt/SUNWspro/lib
26092         then
26093                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26094         elif test -d /usr/ccs/lib
26095         then
26096                 cf_pathlist="/usr/ccs/lib /usr/lib"
26097         fi
26098 fi
26099
26100 fi
26101
26102 # If nothing else, assume it is conventional
26103 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26104
26105 # Finally, check that this is only directories
26106 for cf_path in $0 $cf_pathlist
26107 do
26108         if test -d "$cf_path"; then
26109                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26110                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26111         fi
26112 done
26113
26114 # Ensure that it is nonempty
26115 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26116
26117 fi
26118 echo "$as_me:26118: result: $cf_cv_ld_searchpath" >&5
26119 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26120
26121 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26122
26123 cat >>confdefs.h <<\EOF
26124 #define HAVE_CURSES_DATA_BOOLNAMES 1
26125 EOF
26126
26127 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"
26128 ac_config_commands="$ac_config_commands default"
26129 cat >confcache <<\_ACEOF
26130 # This file is a shell script that caches the results of configure
26131 # tests run on this system so they can be shared between configure
26132 # scripts and configure runs, see configure's option --config-cache.
26133 # It is not useful on other systems.  If it contains results you don't
26134 # want to keep, you may remove or edit it.
26135 #
26136 # config.status only pays attention to the cache file if you give it
26137 # the --recheck option to rerun configure.
26138 #
26139 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26140 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26141 # following values.
26142
26143 _ACEOF
26144
26145 # The following way of writing the cache mishandles newlines in values,
26146 # but we know of no workaround that is simple, portable, and efficient.
26147 # So, don't put newlines in cache variables' values.
26148 # Ultrix sh set writes to stderr and can't be redirected directly,
26149 # and sets the high bit in the cache file unless we assign to the vars.
26150 {
26151   (set) 2>&1 |
26152     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26153     *ac_space=\ *)
26154       # `set' does not quote correctly, so add quotes (double-quote
26155       # substitution turns \\\\ into \\, and sed turns \\ into \).
26156       sed -n \
26157         "s/'/'\\\\''/g;
26158           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26159       ;;
26160     *)
26161       # `set' quotes correctly as required by POSIX, so do not add quotes.
26162       sed -n \
26163         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26164       ;;
26165     esac;
26166 } |
26167   sed '
26168      t clear
26169      : clear
26170      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26171      t end
26172      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26173      : end' >>confcache
26174 if cmp -s $cache_file confcache; then :; else
26175   if test -w $cache_file; then
26176     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26177     cat confcache >$cache_file
26178   else
26179     echo "not updating unwritable cache $cache_file"
26180   fi
26181 fi
26182 rm -f confcache
26183
26184 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26185 # Let make expand exec_prefix.
26186 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26187
26188 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26189 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26190 # trailing colons and then remove the whole line if VPATH becomes empty
26191 # (actually we leave an empty line to preserve line numbers).
26192 if test "x$srcdir" = x.; then
26193   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26194 s/:*\$(srcdir):*/:/;
26195 s/:*\${srcdir}:*/:/;
26196 s/:*@srcdir@:*/:/;
26197 s/^\([^=]*=[    ]*\):*/\1/;
26198 s/:*$//;
26199 s/^[^=]*=[      ]*$//;
26200 }'
26201 fi
26202
26203 DEFS=-DHAVE_CONFIG_H
26204
26205 : ${CONFIG_STATUS=./config.status}
26206 ac_clean_files_save=$ac_clean_files
26207 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26208 { echo "$as_me:26208: creating $CONFIG_STATUS" >&5
26209 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26210 cat >$CONFIG_STATUS <<_ACEOF
26211 #! $SHELL
26212 # Generated automatically by configure.
26213 # Run this file to recreate the current configuration.
26214 # Compiler output produced by configure, useful for debugging
26215 # configure, is in config.log if it exists.
26216
26217 debug=false
26218 SHELL=\${CONFIG_SHELL-$SHELL}
26219 ac_cs_invocation="\$0 \$@"
26220
26221 _ACEOF
26222
26223 cat >>$CONFIG_STATUS <<\_ACEOF
26224 # Be Bourne compatible
26225 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26226   emulate sh
26227   NULLCMD=:
26228 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26229   set -o posix
26230 fi
26231
26232 # Name of the executable.
26233 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26234
26235 if expr a : '\(a\)' >/dev/null 2>&1; then
26236   as_expr=expr
26237 else
26238   as_expr=false
26239 fi
26240
26241 rm -f conf$$ conf$$.exe conf$$.file
26242 echo >conf$$.file
26243 if ln -s conf$$.file conf$$ 2>/dev/null; then
26244   # We could just check for DJGPP; but this test a) works b) is more generic
26245   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26246   if test -f conf$$.exe; then
26247     # Don't use ln at all; we don't have any links
26248     as_ln_s='cp -p'
26249   else
26250     as_ln_s='ln -s'
26251   fi
26252 elif ln conf$$.file conf$$ 2>/dev/null; then
26253   as_ln_s=ln
26254 else
26255   as_ln_s='cp -p'
26256 fi
26257 rm -f conf$$ conf$$.exe conf$$.file
26258
26259 as_executable_p="test -f"
26260
26261 # Support unset when possible.
26262 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26263   as_unset=unset
26264 else
26265   as_unset=false
26266 fi
26267
26268 # NLS nuisances.
26269 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26270 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26271 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26272 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26273 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26274 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26275 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26276 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26277
26278 # IFS
26279 # We need space, tab and new line, in precisely that order.
26280 as_nl='
26281 '
26282 IFS="   $as_nl"
26283
26284 # CDPATH.
26285 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26286
26287 exec 6>&1
26288
26289 _ACEOF
26290
26291 # Files that config.status was made for.
26292 if test -n "$ac_config_files"; then
26293   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26294 fi
26295
26296 if test -n "$ac_config_headers"; then
26297   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26298 fi
26299
26300 if test -n "$ac_config_links"; then
26301   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26302 fi
26303
26304 if test -n "$ac_config_commands"; then
26305   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26306 fi
26307
26308 cat >>$CONFIG_STATUS <<\EOF
26309
26310 ac_cs_usage="\
26311 \`$as_me' instantiates files from templates according to the
26312 current configuration.
26313
26314 Usage: $0 [OPTIONS] [FILE]...
26315
26316   -h, --help       print this help, then exit
26317   -V, --version    print version number, then exit
26318   -d, --debug      don't remove temporary files
26319       --recheck    update $as_me by reconfiguring in the same conditions
26320   --file=FILE[:TEMPLATE]
26321                    instantiate the configuration file FILE
26322   --header=FILE[:TEMPLATE]
26323                    instantiate the configuration header FILE
26324
26325 Configuration files:
26326 $config_files
26327
26328 Configuration headers:
26329 $config_headers
26330
26331 Configuration commands:
26332 $config_commands
26333
26334 Report bugs to <dickey@invisible-island.net>."
26335 EOF
26336
26337 cat >>$CONFIG_STATUS <<EOF
26338 ac_cs_version="\\
26339 config.status
26340 configured by $0, generated by GNU Autoconf 2.52.20200111,
26341   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26342
26343 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26344 Free Software Foundation, Inc.
26345 This config.status script is free software; the Free Software Foundation
26346 gives unlimited permission to copy, distribute and modify it."
26347 srcdir=$srcdir
26348 INSTALL="$INSTALL"
26349 EOF
26350
26351 cat >>$CONFIG_STATUS <<\EOF
26352 # If no file are specified by the user, then we need to provide default
26353 # value.  By we need to know if files were specified by the user.
26354 ac_need_defaults=:
26355 while test $# != 0
26356 do
26357   case $1 in
26358   --*=*)
26359     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26360     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26361     shift
26362     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26363     shift
26364     ;;
26365   -*);;
26366   *) # This is not an option, so the user has probably given explicit
26367      # arguments.
26368      ac_need_defaults=false;;
26369   esac
26370
26371   case $1 in
26372   # Handling of the options.
26373 EOF
26374 cat >>$CONFIG_STATUS <<EOF
26375   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26376     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26377     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26378 EOF
26379 cat >>$CONFIG_STATUS <<\EOF
26380   --version | --vers* | -V )
26381     echo "$ac_cs_version"; exit 0 ;;
26382   --he | --h)
26383     # Conflict between --help and --header
26384     { { echo "$as_me:26384: error: ambiguous option: $1
26385 Try \`$0 --help' for more information." >&5
26386 echo "$as_me: error: ambiguous option: $1
26387 Try \`$0 --help' for more information." >&2;}
26388    { (exit 1); exit 1; }; };;
26389   --help | --hel | -h )
26390     echo "$ac_cs_usage"; exit 0 ;;
26391   --debug | --d* | -d )
26392     debug=: ;;
26393   --file | --fil | --fi | --f )
26394     shift
26395     CONFIG_FILES="$CONFIG_FILES $1"
26396     ac_need_defaults=false;;
26397   --header | --heade | --head | --hea )
26398     shift
26399     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26400     ac_need_defaults=false;;
26401
26402   # This is an error.
26403   -*) { { echo "$as_me:26403: error: unrecognized option: $1
26404 Try \`$0 --help' for more information." >&5
26405 echo "$as_me: error: unrecognized option: $1
26406 Try \`$0 --help' for more information." >&2;}
26407    { (exit 1); exit 1; }; } ;;
26408
26409   *) ac_config_targets="$ac_config_targets $1" ;;
26410
26411   esac
26412   shift
26413 done
26414
26415 exec 5>>config.log
26416 cat >&5 << _ACEOF
26417
26418 ## ----------------------- ##
26419 ## Running config.status.  ##
26420 ## ----------------------- ##
26421
26422 This file was extended by $as_me 2.52.20200111, executed with
26423   CONFIG_FILES    = $CONFIG_FILES
26424   CONFIG_HEADERS  = $CONFIG_HEADERS
26425   CONFIG_LINKS    = $CONFIG_LINKS
26426   CONFIG_COMMANDS = $CONFIG_COMMANDS
26427   > $ac_cs_invocation
26428 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26429
26430 _ACEOF
26431 EOF
26432
26433 cat >>$CONFIG_STATUS <<EOF
26434 #
26435 # INIT-COMMANDS section.
26436 #
26437
26438 ### Special initialization commands, used to pass information from the
26439 ### configuration-run into config.status
26440
26441 AWK="$AWK"
26442 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26443 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26444 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26445 ECHO_LD="$ECHO_LD"
26446 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26447 LDCONFIG="$LDCONFIG"
26448 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26449 LIB_NAME="$LIB_NAME"
26450 LIB_PREFIX="$LIB_PREFIX"
26451 LIB_SUBSETS="$LIB_SUBSETS"
26452 LIB_SUFFIX="$LIB_SUFFIX"
26453 LIB_TRACING="$LIB_TRACING"
26454 LN_S="$LN_S"
26455 MAKE_TERMINFO="$MAKE_TERMINFO"
26456 NCURSES_MAJOR="$NCURSES_MAJOR"
26457 NCURSES_MINOR="$NCURSES_MINOR"
26458 NCURSES_OSPEED="$NCURSES_OSPEED"
26459 NCURSES_PATCH="$NCURSES_PATCH"
26460 SRC_SUBDIRS="$SRC_SUBDIRS"
26461 TERMINFO="$TERMINFO"
26462 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
26463 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
26464 TICS_NAME="$TICS_NAME"
26465 TICS_SUFFIX="$TICS_SUFFIX"
26466 TIC_PATH="$TIC_PATH"
26467 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
26468 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
26469 TINFO_NAME="$TINFO_NAME"
26470 TINFO_SUFFIX="$TINFO_SUFFIX"
26471 UNALTERED_SYMS="$UNALTERED_SYMS"
26472 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
26473 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
26474 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
26475 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
26476 WILDCARD_SYMS="$WILDCARD_SYMS"
26477 WITH_CURSES_H="$with_curses_h"
26478 WITH_ECHO="${enable_echo:=yes}"
26479 WITH_OVERWRITE="$with_overwrite"
26480 cf_LIST_MODELS="$cf_list_models"
26481 cf_cv_abi_version="$cf_cv_abi_version"
26482 cf_cv_do_relink="$cf_cv_do_relink"
26483 cf_cv_do_reranlib="$cf_cv_do_reranlib"
26484 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26485 cf_cv_enable_lp64="$cf_cv_enable_lp64"
26486 cf_cv_enable_opaque="$cf_cv_enable_opaque"
26487 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
26488 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
26489 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
26490 cf_cv_rel_version="$cf_cv_rel_version"
26491 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
26492 cf_cv_shared_soname='$cf_cv_shared_soname'
26493 cf_cv_shlib_version="$cf_cv_shlib_version"
26494 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
26495 cf_cv_system_name="$cf_cv_system_name"
26496 cf_cv_term_driver="$with_term_driver"
26497 cf_with_ada="$cf_with_ada"
26498 cf_with_cxx_binding="$cf_with_cxx_binding"
26499 cf_with_db_install="$cf_with_db_install"
26500 cf_with_manpages="$cf_with_manpages"
26501 cf_with_tests="$cf_with_tests"
26502 host="$host"
26503 target="$target"
26504 with_shared_cxx="$with_shared_cxx"
26505
26506 EOF
26507
26508 cat >>$CONFIG_STATUS <<\EOF
26509 for ac_config_target in $ac_config_targets
26510 do
26511   case "$ac_config_target" in
26512   # Handling of arguments.
26513   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
26514   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
26515   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
26516   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
26517   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
26518   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
26519   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26520   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26521   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
26522   *) { { echo "$as_me:26522: error: invalid argument: $ac_config_target" >&5
26523 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26524    { (exit 1); exit 1; }; };;
26525   esac
26526 done
26527
26528 # If the user did not use the arguments to specify the items to instantiate,
26529 # then the envvar interface is used.  Set only those that are not.
26530 # We use the long form for the default assignment because of an extremely
26531 # bizarre bug on SunOS 4.1.3.
26532 if $ac_need_defaults; then
26533   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26534   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26535   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26536 fi
26537
26538 # Create a temporary directory, and hook for its removal unless debugging.
26539 $debug ||
26540 {
26541   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26542   trap '{ (exit 1); exit 1; }' 1 2 13 15
26543 }
26544
26545 # Create a (secure) tmp directory for tmp files.
26546 : ${TMPDIR=/tmp}
26547 {
26548   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26549   test -n "$tmp" && test -d "$tmp"
26550 }  ||
26551 {
26552   tmp=$TMPDIR/cs$$-$RANDOM
26553   (umask 077 && mkdir $tmp)
26554 } ||
26555 {
26556    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26557    { (exit 1); exit 1; }
26558 }
26559
26560 EOF
26561
26562 cat >>$CONFIG_STATUS <<EOF
26563
26564 #
26565 # CONFIG_FILES section.
26566 #
26567
26568 # No need to generate the scripts if there are no CONFIG_FILES.
26569 # This happens for instance when ./config.status config.h
26570 if test -n "\$CONFIG_FILES"; then
26571   # Protect against being on the right side of a sed subst in config.status.
26572   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26573    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26574 s,@SHELL@,$SHELL,;t t
26575 s,@exec_prefix@,$exec_prefix,;t t
26576 s,@prefix@,$prefix,;t t
26577 s,@program_transform_name@,$program_transform_name,;t t
26578 s,@bindir@,$bindir,;t t
26579 s,@sbindir@,$sbindir,;t t
26580 s,@libexecdir@,$libexecdir,;t t
26581 s,@datarootdir@,$datarootdir,;t t
26582 s,@datadir@,$datadir,;t t
26583 s,@sysconfdir@,$sysconfdir,;t t
26584 s,@sharedstatedir@,$sharedstatedir,;t t
26585 s,@localstatedir@,$localstatedir,;t t
26586 s,@runstatedir@,$runstatedir,;t t
26587 s,@libdir@,$libdir,;t t
26588 s,@includedir@,$includedir,;t t
26589 s,@oldincludedir@,$oldincludedir,;t t
26590 s,@infodir@,$infodir,;t t
26591 s,@mandir@,$mandir,;t t
26592 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26593 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26594 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26595 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26596 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26597 s,@build_alias@,$build_alias,;t t
26598 s,@host_alias@,$host_alias,;t t
26599 s,@target_alias@,$target_alias,;t t
26600 s,@ECHO_C@,$ECHO_C,;t t
26601 s,@ECHO_N@,$ECHO_N,;t t
26602 s,@ECHO_T@,$ECHO_T,;t t
26603 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26604 s,@DEFS@,$DEFS,;t t
26605 s,@LIBS@,$LIBS,;t t
26606 s,@top_builddir@,$top_builddir,;t t
26607 s,@EGREP@,$EGREP,;t t
26608 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
26609 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
26610 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
26611 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
26612 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
26613 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
26614 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
26615 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
26616 s,@VERSION@,$VERSION,;t t
26617 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26618 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26619 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26620 s,@PACKAGE@,$PACKAGE,;t t
26621 s,@build@,$build,;t t
26622 s,@build_cpu@,$build_cpu,;t t
26623 s,@build_vendor@,$build_vendor,;t t
26624 s,@build_os@,$build_os,;t t
26625 s,@host@,$host,;t t
26626 s,@host_cpu@,$host_cpu,;t t
26627 s,@host_vendor@,$host_vendor,;t t
26628 s,@host_os@,$host_os,;t t
26629 s,@target@,$target,;t t
26630 s,@target_cpu@,$target_cpu,;t t
26631 s,@target_vendor@,$target_vendor,;t t
26632 s,@target_os@,$target_os,;t t
26633 s,@CC@,$CC,;t t
26634 s,@CFLAGS@,$CFLAGS,;t t
26635 s,@LDFLAGS@,$LDFLAGS,;t t
26636 s,@CPPFLAGS@,$CPPFLAGS,;t t
26637 s,@ac_ct_CC@,$ac_ct_CC,;t t
26638 s,@EXEEXT@,$EXEEXT,;t t
26639 s,@OBJEXT@,$OBJEXT,;t t
26640 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26641 s,@CPP@,$CPP,;t t
26642 s,@LDCONFIG@,$LDCONFIG,;t t
26643 s,@CXX@,$CXX,;t t
26644 s,@CXXFLAGS@,$CXXFLAGS,;t t
26645 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
26646 s,@AWK@,$AWK,;t t
26647 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26648 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26649 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26650 s,@LINT@,$LINT,;t t
26651 s,@LINT_OPTS@,$LINT_OPTS,;t t
26652 s,@LN_S@,$LN_S,;t t
26653 s,@cf_config_suffix@,$cf_config_suffix,;t t
26654 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26655 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26656 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
26657 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
26658 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
26659 s,@SET_MAKE@,$SET_MAKE,;t t
26660 s,@CTAGS@,$CTAGS,;t t
26661 s,@ETAGS@,$ETAGS,;t t
26662 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26663 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26664 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26665 s,@RANLIB@,$RANLIB,;t t
26666 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26667 s,@LD@,$LD,;t t
26668 s,@ac_ct_LD@,$ac_ct_LD,;t t
26669 s,@AR@,$AR,;t t
26670 s,@ac_ct_AR@,$ac_ct_AR,;t t
26671 s,@NM@,$NM,;t t
26672 s,@ac_ct_NM@,$ac_ct_NM,;t t
26673 s,@ARFLAGS@,$ARFLAGS,;t t
26674 s,@DESTDIR@,$DESTDIR,;t t
26675 s,@BUILD_CC@,$BUILD_CC,;t t
26676 s,@BUILD_CPP@,$BUILD_CPP,;t t
26677 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
26678 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
26679 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
26680 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
26681 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
26682 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
26683 s,@cf_list_models@,$cf_list_models,;t t
26684 s,@ABI_VERSION@,$ABI_VERSION,;t t
26685 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26686 s,@LIBTOOL@,$LIBTOOL,;t t
26687 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26688 s,@LT_UNDEF@,$LT_UNDEF,;t t
26689 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26690 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26691 s,@LIB_CREATE@,$LIB_CREATE,;t t
26692 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26693 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26694 s,@LIB_PREP@,$LIB_PREP,;t t
26695 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26696 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26697 s,@LIB_LINK@,$LIB_LINK,;t t
26698 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26699 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26700 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26701 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
26702 s,@TICS_NAME@,$TICS_NAME,;t t
26703 s,@TINFO_NAME@,$TINFO_NAME,;t t
26704 s,@LIB_NAME@,$LIB_NAME,;t t
26705 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26706 s,@CC_G_OPT@,$CC_G_OPT,;t t
26707 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
26708 s,@LD_MODEL@,$LD_MODEL,;t t
26709 s,@shlibdir@,$shlibdir,;t t
26710 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26711 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26712 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26713 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26714 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26715 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26716 s,@LINK_PROGS@,$LINK_PROGS,;t t
26717 s,@LINK_TESTS@,$LINK_TESTS,;t t
26718 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26719 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26720 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26721 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26722 s,@RPATH_LIST@,$RPATH_LIST,;t t
26723 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26724 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26725 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26726 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26727 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26728 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
26729 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
26730 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
26731 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
26732 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
26733 s,@TIC@,$TIC,;t t
26734 s,@INFOCMP@,$INFOCMP,;t t
26735 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
26736 s,@XTERM_KBS@,$XTERM_KBS,;t t
26737 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
26738 s,@TERMINFO@,$TERMINFO,;t t
26739 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
26740 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
26741 s,@TERMPATH@,$TERMPATH,;t t
26742 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
26743 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
26744 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
26745 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
26746 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
26747 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
26748 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
26749 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
26750 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
26751 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
26752 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
26753 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
26754 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
26755 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
26756 s,@RGB_PATH@,$RGB_PATH,;t t
26757 s,@no_x11_rgb@,$no_x11_rgb,;t t
26758 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
26759 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
26760 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
26761 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
26762 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
26763 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
26764 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
26765 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
26766 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
26767 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
26768 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
26769 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
26770 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
26771 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
26772 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
26773 s,@PTHREAD@,$PTHREAD,;t t
26774 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
26775 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
26776 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
26777 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
26778 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
26779 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
26780 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
26781 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
26782 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
26783 s,@ECHO_LT@,$ECHO_LT,;t t
26784 s,@ECHO_LD@,$ECHO_LD,;t t
26785 s,@RULE_CC@,$RULE_CC,;t t
26786 s,@SHOW_CC@,$SHOW_CC,;t t
26787 s,@ECHO_CC@,$ECHO_CC,;t t
26788 s,@ECHO_LINK@,$ECHO_LINK,;t t
26789 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
26790 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
26791 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
26792 s,@ADAFLAGS@,$ADAFLAGS,;t t
26793 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26794 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
26795 s,@ADA_TRACE@,$ADA_TRACE,;t t
26796 s,@MATH_LIB@,$MATH_LIB,;t t
26797 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
26798 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
26799 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
26800 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
26801 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
26802 s,@TEST_LIBS@,$TEST_LIBS,;t t
26803 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
26804 s,@CXXCPP@,$CXXCPP,;t t
26805 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
26806 s,@CXX_AR@,$CXX_AR,;t t
26807 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
26808 s,@CXXLIBS@,$CXXLIBS,;t t
26809 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
26810 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
26811 s,@M4_exists@,$M4_exists,;t t
26812 s,@cf_ada_make@,$cf_ada_make,;t t
26813 s,@cf_ada_config@,$cf_ada_config,;t t
26814 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
26815 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
26816 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
26817 s,@cf_compile_generics@,$cf_compile_generics,;t t
26818 s,@cf_generic_objects@,$cf_generic_objects,;t t
26819 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
26820 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
26821 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
26822 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
26823 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
26824 s,@cf_ada_package@,$cf_ada_package,;t t
26825 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
26826 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
26827 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
26828 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
26829 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
26830 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
26831 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
26832 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26833 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
26834 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
26835 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
26836 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
26837 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
26838 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
26839 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
26840 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
26841 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
26842 s,@TICS_LIBS@,$TICS_LIBS,;t t
26843 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
26844 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
26845 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
26846 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
26847 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
26848 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
26849 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
26850 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
26851 s,@includesubdir@,$includesubdir,;t t
26852 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
26853 s,@TICS_LIST@,$TICS_LIST,;t t
26854 s,@TINFO_LIST@,$TINFO_LIST,;t t
26855 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
26856 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
26857 s,@TEST_ARGS@,$TEST_ARGS,;t t
26858 s,@TEST_DEPS@,$TEST_DEPS,;t t
26859 s,@TEST_ARG2@,$TEST_ARG2,;t t
26860 s,@TEST_DEP2@,$TEST_DEP2,;t t
26861 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
26862 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
26863 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
26864 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
26865 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
26866 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
26867 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
26868 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
26869 s,@cross_compiling@,$cross_compiling,;t t
26870 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
26871 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
26872 s,@PANEL_NAME@,$PANEL_NAME,;t t
26873 s,@MENU_NAME@,$MENU_NAME,;t t
26874 s,@FORM_NAME@,$FORM_NAME,;t t
26875 s,@CXX_NAME@,$CXX_NAME,;t t
26876 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
26877 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
26878 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
26879 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
26880 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
26881 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
26882 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
26883 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
26884 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
26885 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26886 CEOF
26887
26888 EOF
26889
26890   cat >>$CONFIG_STATUS <<\EOF
26891   # Split the substitutions into bite-sized pieces for seds with
26892   # small command number limits, like on Digital OSF/1 and HP-UX.
26893   ac_max_sed_lines=48
26894   ac_sed_frag=1 # Number of current file.
26895   ac_beg=1 # First line for current file.
26896   ac_end=$ac_max_sed_lines # Line after last line for current file.
26897   ac_more_lines=:
26898   ac_sed_cmds=
26899   while $ac_more_lines; do
26900     if test $ac_beg -gt 1; then
26901       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26902     else
26903       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26904     fi
26905     if test ! -s $tmp/subs.frag; then
26906       ac_more_lines=false
26907     else
26908       # The purpose of the label and of the branching condition is to
26909       # speed up the sed processing (if there are no `@' at all, there
26910       # is no need to browse any of the substitutions).
26911       # These are the two extra sed commands mentioned above.
26912       (echo ':t
26913   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26914       # It is possible to make a multiline substitution using escaped newlines.
26915       # Ensure that we do not split the substitution between script fragments.
26916       ac_BEG=$ac_end
26917       ac_END=`expr $ac_end + $ac_max_sed_lines`
26918       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26919       if test -s $tmp/subs.next; then
26920         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26921         if test ! -s $tmp/subs.edit; then
26922           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26923           if test ! -s $tmp/subs.edit; then
26924             if test $ac_beg -gt 1; then
26925               ac_end=`expr $ac_end - 1`
26926               continue
26927             fi
26928           fi
26929         fi
26930       fi
26931
26932       if test -z "$ac_sed_cmds"; then
26933         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26934       else
26935         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26936       fi
26937       ac_sed_frag=`expr $ac_sed_frag + 1`
26938       ac_beg=$ac_end
26939       ac_end=`expr $ac_end + $ac_max_sed_lines`
26940     fi
26941   done
26942   if test -z "$ac_sed_cmds"; then
26943     ac_sed_cmds=cat
26944   fi
26945 fi # test -n "$CONFIG_FILES"
26946
26947 EOF
26948 cat >>$CONFIG_STATUS <<\EOF
26949 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26950   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26951   case $ac_file in
26952   - | *:- | *:-:* ) # input from stdin
26953         cat >$tmp/stdin
26954         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26955         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26956   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26957         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26958   * )   ac_file_in=$ac_file.in ;;
26959   esac
26960
26961   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26962   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26963          X"$ac_file" : 'X\(//\)[^/]' \| \
26964          X"$ac_file" : 'X\(//\)$' \| \
26965          X"$ac_file" : 'X\(/\)' \| \
26966          .     : '\(.\)' 2>/dev/null ||
26967 echo X"$ac_file" |
26968     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26969           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26970           /^X\(\/\/\)$/{ s//\1/; q; }
26971           /^X\(\/\).*/{ s//\1/; q; }
26972           s/.*/./; q'`
26973   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26974     { case "$ac_dir" in
26975   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26976   *)                      as_incr_dir=.;;
26977 esac
26978 as_dummy="$ac_dir"
26979 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26980   case $as_mkdir_dir in
26981     # Skip DOS drivespec
26982     ?:) as_incr_dir=$as_mkdir_dir ;;
26983     *)
26984       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26985       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26986     ;;
26987   esac
26988 done; }
26989
26990     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26991     # A "../" for each directory in $ac_dir_suffix.
26992     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26993   else
26994     ac_dir_suffix= ac_dots=
26995   fi
26996
26997   case $srcdir in
26998   .)  ac_srcdir=.
26999       if test -z "$ac_dots"; then
27000          ac_top_srcdir=.
27001       else
27002          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27003       fi ;;
27004   [\\/]* | ?:[\\/]* )
27005       ac_srcdir=$srcdir$ac_dir_suffix;
27006       ac_top_srcdir=$srcdir ;;
27007   *) # Relative path.
27008     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27009     ac_top_srcdir=$ac_dots$srcdir ;;
27010   esac
27011
27012   case $INSTALL in
27013   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27014   *) ac_INSTALL=$ac_dots$INSTALL ;;
27015   esac
27016
27017   if test x"$ac_file" != x-; then
27018     { echo "$as_me:27018: creating $ac_file" >&5
27019 echo "$as_me: creating $ac_file" >&6;}
27020     rm -f "$ac_file"
27021   fi
27022   # Let's still pretend it is `configure' which instantiates (i.e., don't
27023   # use $as_me), people would be surprised to read:
27024   #    /* config.h.  Generated automatically by config.status.  */
27025   configure_input="Generated automatically from `echo $ac_file_in |
27026                                                  sed 's,.*/,,'` by configure."
27027
27028   # First look for the input files in the build tree, otherwise in the
27029   # src tree.
27030   ac_file_inputs=`IFS=:
27031     for f in $ac_file_in; do
27032       case $f in
27033       -) echo $tmp/stdin ;;
27034       [\\/$]*)
27035          # Absolute (can't be DOS-style, as IFS=:)
27036          test -f "$f" || { { echo "$as_me:27036: error: cannot find input file: $f" >&5
27037 echo "$as_me: error: cannot find input file: $f" >&2;}
27038    { (exit 1); exit 1; }; }
27039          echo $f;;
27040       *) # Relative
27041          if test -f "$f"; then
27042            # Build tree
27043            echo $f
27044          elif test -f "$srcdir/$f"; then
27045            # Source tree
27046            echo $srcdir/$f
27047          else
27048            # /dev/null tree
27049            { { echo "$as_me:27049: error: cannot find input file: $f" >&5
27050 echo "$as_me: error: cannot find input file: $f" >&2;}
27051    { (exit 1); exit 1; }; }
27052          fi;;
27053       esac
27054     done` || { (exit 1); exit 1; }
27055 EOF
27056 cat >>$CONFIG_STATUS <<\EOF
27057   ac_warn_datarootdir=no
27058   if test x"$ac_file" != x-; then
27059     for ac_item in $ac_file_inputs
27060     do
27061       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27062       if test -n "$ac_seen"; then
27063         ac_used=`grep '@datarootdir@' $ac_item`
27064         if test -z "$ac_used"; then
27065           { echo "$as_me:27065: WARNING: datarootdir was used implicitly but not set:
27066 $ac_seen" >&5
27067 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27068 $ac_seen" >&2;}
27069           ac_warn_datarootdir=yes
27070         fi
27071       fi
27072       ac_seen=`grep '${datarootdir}' $ac_item`
27073       if test -n "$ac_seen"; then
27074         { echo "$as_me:27074: WARNING: datarootdir was used explicitly but not set:
27075 $ac_seen" >&5
27076 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27077 $ac_seen" >&2;}
27078         ac_warn_datarootdir=yes
27079       fi
27080     done
27081   fi
27082
27083 if test "x$ac_warn_datarootdir" = xyes; then
27084   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27085 fi
27086
27087 EOF
27088 cat >>$CONFIG_STATUS <<EOF
27089   sed "$ac_vpsub
27090 $extrasub
27091 EOF
27092 cat >>$CONFIG_STATUS <<\EOF
27093 :t
27094 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27095 s,@configure_input@,$configure_input,;t t
27096 s,@srcdir@,$ac_srcdir,;t t
27097 s,@top_srcdir@,$ac_top_srcdir,;t t
27098 s,@INSTALL@,$ac_INSTALL,;t t
27099 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27100   rm -f $tmp/stdin
27101   if test x"$ac_file" != x-; then
27102     cp $tmp/out $ac_file
27103
27104     for ac_name in prefix exec_prefix datarootdir
27105     do
27106         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27107         if test -n "$ac_seen"; then
27108             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27109             if test -z "$ac_init"; then
27110               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27111               { echo "$as_me:27111: WARNING: Variable $ac_name is used but was not set:
27112 $ac_seen" >&5
27113 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27114 $ac_seen" >&2;}
27115             fi
27116         fi
27117     done
27118     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27119     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27120     if test -s $tmp/out; then
27121       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27122       { echo "$as_me:27122: WARNING: Some variables may not be substituted:
27123 $ac_seen" >&5
27124 echo "$as_me: WARNING: Some variables may not be substituted:
27125 $ac_seen" >&2;}
27126     fi
27127   else
27128     cat $tmp/out
27129   fi
27130   rm -f $tmp/out
27131
27132 done
27133 EOF
27134 cat >>$CONFIG_STATUS <<\EOF
27135
27136 #
27137 # CONFIG_HEADER section.
27138 #
27139
27140 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27141 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27142 #
27143 # ac_d sets the value in "#define NAME VALUE" lines.
27144 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27145 ac_dB='[        ].*$,\1#\2'
27146 ac_dC=' '
27147 ac_dD=',;t'
27148 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27149 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27150 ac_iB='\([      ]\),\1#\2define\3'
27151 ac_iC=' '
27152 ac_iD='\4,;t'
27153 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27154 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27155 ac_uB='$,\1#\2define\3'
27156 ac_uC=' '
27157 ac_uD=',;t'
27158
27159 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27160   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27161   case $ac_file in
27162   - | *:- | *:-:* ) # input from stdin
27163         cat >$tmp/stdin
27164         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27165         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27166   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27167         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27168   * )   ac_file_in=$ac_file.in ;;
27169   esac
27170
27171   test x"$ac_file" != x- && { echo "$as_me:27171: creating $ac_file" >&5
27172 echo "$as_me: creating $ac_file" >&6;}
27173
27174   # First look for the input files in the build tree, otherwise in the
27175   # src tree.
27176   ac_file_inputs=`IFS=:
27177     for f in $ac_file_in; do
27178       case $f in
27179       -) echo $tmp/stdin ;;
27180       [\\/$]*)
27181          # Absolute (can't be DOS-style, as IFS=:)
27182          test -f "$f" || { { echo "$as_me:27182: error: cannot find input file: $f" >&5
27183 echo "$as_me: error: cannot find input file: $f" >&2;}
27184    { (exit 1); exit 1; }; }
27185          echo $f;;
27186       *) # Relative
27187          if test -f "$f"; then
27188            # Build tree
27189            echo $f
27190          elif test -f "$srcdir/$f"; then
27191            # Source tree
27192            echo $srcdir/$f
27193          else
27194            # /dev/null tree
27195            { { echo "$as_me:27195: error: cannot find input file: $f" >&5
27196 echo "$as_me: error: cannot find input file: $f" >&2;}
27197    { (exit 1); exit 1; }; }
27198          fi;;
27199       esac
27200     done` || { (exit 1); exit 1; }
27201   # Remove the trailing spaces.
27202   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27203
27204 EOF
27205
27206 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27207 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27208 # be either 'cat' or 'sort'.
27209 cat confdefs.h | uniq >conftest.vals
27210
27211 # Break up conftest.vals because some shells have a limit on
27212 # the size of here documents, and old seds have small limits too.
27213
27214 rm -f conftest.tail
27215 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27216 while grep . conftest.vals >/dev/null
27217 do
27218   # Write chunks of a limited-size here document to conftest.frag.
27219   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27220   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27221   echo 'CEOF' >> $CONFIG_STATUS
27222   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27223   rm -f conftest.vals
27224   mv conftest.tail conftest.vals
27225 done
27226 rm -f conftest.vals
27227
27228 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27229 # marker @DEFS@.
27230 echo '  cat >> conftest.edit <<CEOF
27231 /@DEFS@/r conftest.frag
27232 /@DEFS@/d
27233 CEOF
27234 sed -f conftest.edit $tmp/in > $tmp/out
27235 rm -f $tmp/in
27236 mv $tmp/out $tmp/in
27237 rm -f conftest.edit conftest.frag
27238 ' >> $CONFIG_STATUS
27239
27240 cat >>$CONFIG_STATUS <<\EOF
27241   # Let's still pretend it is `configure' which instantiates (i.e., don't
27242   # use $as_me), people would be surprised to read:
27243   #    /* config.h.  Generated automatically by config.status.  */
27244   if test x"$ac_file" = x-; then
27245     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27246   else
27247     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27248   fi
27249   cat $tmp/in >>$tmp/config.h
27250   rm -f $tmp/in
27251   if test x"$ac_file" != x-; then
27252     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27253       { echo "$as_me:27253: $ac_file is unchanged" >&5
27254 echo "$as_me: $ac_file is unchanged" >&6;}
27255     else
27256       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27257          X"$ac_file" : 'X\(//\)[^/]' \| \
27258          X"$ac_file" : 'X\(//\)$' \| \
27259          X"$ac_file" : 'X\(/\)' \| \
27260          .     : '\(.\)' 2>/dev/null ||
27261 echo X"$ac_file" |
27262     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27263           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27264           /^X\(\/\/\)$/{ s//\1/; q; }
27265           /^X\(\/\).*/{ s//\1/; q; }
27266           s/.*/./; q'`
27267       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27268         { case "$ac_dir" in
27269   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27270   *)                      as_incr_dir=.;;
27271 esac
27272 as_dummy="$ac_dir"
27273 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27274   case $as_mkdir_dir in
27275     # Skip DOS drivespec
27276     ?:) as_incr_dir=$as_mkdir_dir ;;
27277     *)
27278       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27279       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27280     ;;
27281   esac
27282 done; }
27283
27284       fi
27285       rm -f $ac_file
27286       mv $tmp/config.h $ac_file
27287     fi
27288   else
27289     cat $tmp/config.h
27290     rm -f $tmp/config.h
27291   fi
27292 done
27293 EOF
27294 cat >>$CONFIG_STATUS <<\EOF
27295 #
27296 # CONFIG_COMMANDS section.
27297 #
27298 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27299   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27300   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27301
27302   case $ac_dest in
27303     default )
27304 if test "x$cf_with_tests" != xno ; then
27305
27306 for cf_dir in test
27307 do
27308         if test ! -d $srcdir/$cf_dir; then
27309                 continue
27310         elif test -f $srcdir/$cf_dir/programs; then
27311                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27312         fi
27313 done
27314
27315 fi
27316
27317 cf_prefix=$LIB_PREFIX
27318
27319 case $cf_cv_shlib_version in
27320 (cygdll|msysdll|mingw)
27321         TINFO_NAME=$TINFO_ARG_SUFFIX
27322         TINFO_SUFFIX=.dll
27323         ;;
27324 esac
27325
27326 if test -n "$TINFO_SUFFIX" ; then
27327         case $TINFO_SUFFIX in
27328         (tw*)
27329                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27330                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27331                 ;;
27332         (t*)
27333                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27334                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27335                 ;;
27336         (w*)
27337                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27338                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27339                 ;;
27340         esac
27341 fi
27342
27343 for cf_dir in $SRC_SUBDIRS
27344 do
27345         if test ! -d $srcdir/$cf_dir ; then
27346                 continue
27347         elif test -f $srcdir/$cf_dir/modules; then
27348
27349                 SHARED_LIB=
27350                 Libs_To_Make=
27351                 cf_awk_program=
27352                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27353                 then
27354                         cf_awk_program="$cf_awk_program\
27355 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27356 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27357 "
27358                 fi
27359
27360                 if test "x$WILDCARD_SYMS" = xno
27361                 then
27362                         cf_awk_program="$cf_awk_program\
27363 /[      ]_\\*;/ { skip=1; next; }\
27364 "
27365                 fi
27366
27367                 if test "x$cf_awk_program" != "x"
27368                 then
27369                         cat >>$cf_dir/Makefile <<CF_EOF
27370
27371 # Generated by CF_LIB_RULES
27372 resulting.map: $UNALTERED_SYMS
27373         $AWK 'BEGIN { skip = 1; last=""; } \
27374 $cf_awk_program \
27375 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27376  skip = 0; last = \$\$0; } \
27377 END { print last; }' < $UNALTERED_SYMS >\$@
27378
27379 distclean::
27380         rm -f resulting.map
27381 CF_EOF
27382                 fi
27383
27384                 for cf_item in $cf_LIST_MODELS
27385                 do
27386
27387         case X$cf_item in
27388         (Xlibtool)
27389                 cf_suffix='.la'
27390                 cf_depsuf=$cf_suffix
27391                 ;;
27392         (Xdebug)
27393                 cf_suffix='_g.a'
27394                 cf_depsuf=$cf_suffix
27395                 ;;
27396         (Xprofile)
27397                 cf_suffix='_p.a'
27398                 cf_depsuf=$cf_suffix
27399                 ;;
27400         (Xshared)
27401                 case $cf_cv_system_name in
27402                 (aix[5-7]*)
27403                         cf_suffix='.so'
27404                         cf_depsuf=$cf_suffix
27405                         ;;
27406                 (cygwin*|msys*|mingw*)
27407                         cf_suffix='.dll'
27408                         cf_depsuf='.dll.a'
27409                         ;;
27410                 (darwin*)
27411                         cf_suffix='.dylib'
27412                         cf_depsuf=$cf_suffix
27413                         ;;
27414                 (hpux*)
27415                         case $target in
27416                         (ia64*)
27417                                 cf_suffix='.so'
27418                                 cf_depsuf=$cf_suffix
27419                                 ;;
27420                         (*)
27421                                 cf_suffix='.sl'
27422                                 cf_depsuf=$cf_suffix
27423                                 ;;
27424                         esac
27425                         ;;
27426                 (*)
27427                         cf_suffix='.so'
27428                         cf_depsuf=$cf_suffix
27429                         ;;
27430                 esac
27431                 ;;
27432         (*)
27433                 cf_suffix='.a'
27434                 cf_depsuf=$cf_suffix
27435                 ;;
27436         esac
27437         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27438         then
27439                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27440                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27441         fi
27442
27443                         cf_libname=$cf_dir
27444                         test "$cf_dir" = c++ && cf_libname=ncurses++
27445                         if test $cf_item = shared ; then
27446                                 if test -n "${LIB_SUFFIX}"
27447                                 then
27448                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27449                                 else
27450                                         cf_shared_suffix="$cf_suffix"
27451                                 fi
27452                                 if test "$cf_cv_do_symlinks" = yes ; then
27453                                         cf_version_name=
27454
27455                                         case "$cf_cv_shlib_version" in
27456                                         (rel)
27457                                                 cf_version_name=REL_VERSION
27458                                                 ;;
27459                                         (abi)
27460                                                 cf_version_name=ABI_VERSION
27461                                                 ;;
27462                                         esac
27463
27464                                         if test -n "$cf_version_name"
27465                                         then
27466                                                 case "$cf_cv_system_name" in
27467                                                 (darwin*)
27468                                                         # "w", etc?
27469                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
27470                                                         ;;
27471                                                 (*)
27472                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
27473                                                         ;;
27474                                                 esac
27475                                         fi
27476                                         if test -n "${USE_LIB_SUFFIX}"
27477                                         then
27478                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
27479                                         else
27480                                                 cf_shared_suffix="$cf_suffix"
27481                                         fi
27482                                 fi
27483                                 # cygwin needs import library, and has unique naming convention
27484                                 # use autodetected ${cf_prefix} for import lib and static lib, but
27485                                 # use 'cyg' prefix for shared lib.
27486                                 case $cf_cv_shlib_version in
27487                                 (cygdll)
27488                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27489                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
27490                                         ;;
27491                                 (msysdll)
27492                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27493                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
27494                                         ;;
27495                                 (mingw)
27496                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
27497                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
27498                                         ;;
27499                                 (*)
27500                                         cf_add_lib=
27501                                         ;;
27502                                 esac
27503                                 if test -n "$cf_add_lib"
27504                                 then
27505                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27506                                         continue
27507                                 fi
27508                         fi
27509                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
27510                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
27511                 done
27512
27513                 if test $cf_dir = ncurses ; then
27514                         cf_subsets="$LIB_SUBSETS"
27515                         cf_r_parts="$cf_subsets"
27516                         cf_liblist="$Libs_To_Make"
27517
27518                         while test -n "$cf_r_parts"
27519                         do
27520                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
27521                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
27522                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
27523                                         cf_add_lib=
27524                                         case $cf_l_parts in
27525                                         (*termlib*)
27526                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
27527                                                 ;;
27528                                         (*ticlib*)
27529                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
27530                                                 ;;
27531                                         (*)
27532                                                 break
27533                                                 ;;
27534                                         esac
27535                                         if test -n "$cf_add_lib"; then
27536                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
27537                                         fi
27538                                 else
27539                                         break
27540                                 fi
27541                         done
27542                 else
27543                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
27544                 fi
27545
27546                 if test $cf_dir = c++; then
27547                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
27548                                 cf_list=
27549                                 for cf_item in $Libs_To_Make
27550                                 do
27551                                         case $cf_item in
27552                                         (*.a)
27553                                                 ;;
27554                                         (*)
27555                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
27556                                                 ;;
27557                                         esac
27558                                         for cf_test in $cf_list
27559                                         do
27560                                                 if test "$cf_test" = "$cf_item"
27561                                                 then
27562                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
27563                                                         cf_item=
27564                                                         break
27565                                                 fi
27566                                         done
27567                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
27568                                 done
27569                                 Libs_To_Make="$cf_list"
27570                         fi
27571                 fi
27572
27573                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
27574                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
27575                         $cf_dir/Makefile >$cf_dir/Makefile.out
27576                 mv $cf_dir/Makefile.out $cf_dir/Makefile
27577
27578                 $AWK -f $srcdir/mk-0th.awk \
27579                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
27580                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27581
27582                 for cf_subset in $cf_subsets
27583                 do
27584                         cf_subdirs=
27585                         for cf_item in $cf_LIST_MODELS
27586                         do
27587
27588                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
27589
27590 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27591
27592                         CXX_MODEL=$cf_ITEM
27593                         if test "$CXX_MODEL" = SHARED; then
27594                                 case $cf_cv_shlib_version in
27595                                 (cygdll|msysdll|mingw)
27596                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
27597
27598 echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>&5
27599
27600                                         with_shared_cxx=yes
27601                                         ;;
27602                                 (*)
27603                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
27604                                         ;;
27605                                 esac
27606                         fi
27607
27608         case X$cf_item in
27609         (Xlibtool)
27610                 cf_suffix='.la'
27611                 cf_depsuf=$cf_suffix
27612                 ;;
27613         (Xdebug)
27614                 cf_suffix='_g.a'
27615                 cf_depsuf=$cf_suffix
27616                 ;;
27617         (Xprofile)
27618                 cf_suffix='_p.a'
27619                 cf_depsuf=$cf_suffix
27620                 ;;
27621         (Xshared)
27622                 case $cf_cv_system_name in
27623                 (aix[5-7]*)
27624                         cf_suffix='.so'
27625                         cf_depsuf=$cf_suffix
27626                         ;;
27627                 (cygwin*|msys*|mingw*)
27628                         cf_suffix='.dll'
27629                         cf_depsuf='.dll.a'
27630                         ;;
27631                 (darwin*)
27632                         cf_suffix='.dylib'
27633                         cf_depsuf=$cf_suffix
27634                         ;;
27635                 (hpux*)
27636                         case $target in
27637                         (ia64*)
27638                                 cf_suffix='.so'
27639                                 cf_depsuf=$cf_suffix
27640                                 ;;
27641                         (*)
27642                                 cf_suffix='.sl'
27643                                 cf_depsuf=$cf_suffix
27644                                 ;;
27645                         esac
27646                         ;;
27647                 (*)
27648                         cf_suffix='.so'
27649                         cf_depsuf=$cf_suffix
27650                         ;;
27651                 esac
27652                 ;;
27653         (*)
27654                 cf_suffix='.a'
27655                 cf_depsuf=$cf_suffix
27656                 ;;
27657         esac
27658         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27659         then
27660                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
27661                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
27662         fi
27663
27664         case $cf_item in
27665         (libtool) cf_subdir='obj_lo'  ;;
27666         (normal)  cf_subdir='objects' ;;
27667         (debug)   cf_subdir='obj_g' ;;
27668         (profile) cf_subdir='obj_p' ;;
27669         (shared)
27670                 case $cf_cv_system_name in
27671                 (cygwin|msys)
27672                         cf_subdir='objects' ;;
27673                 (*)
27674                         cf_subdir='obj_s' ;;
27675                 esac
27676         esac
27677
27678                         # Test for case where we build libtinfo with a different name.
27679                         cf_libname=$cf_dir
27680                         if test $cf_dir = ncurses ; then
27681                                 case $cf_subset in
27682                                 (*base*)
27683                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
27684                                         ;;
27685                                 (*termlib*)
27686                                         cf_libname=$TINFO_LIB_SUFFIX
27687                                         ;;
27688                                 (ticlib*)
27689                                         cf_libname=$TICS_LIB_SUFFIX
27690                                         ;;
27691                                 esac
27692                         elif test $cf_dir = c++ ; then
27693                                 cf_libname=ncurses++$USE_LIB_SUFFIX
27694                         else
27695                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
27696                         fi
27697                         if test -n "${USE_ARG_SUFFIX}" ; then
27698                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
27699                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
27700                         fi
27701
27702                         # These dependencies really are for development, not
27703                         # builds, but they are useful in porting, too.
27704                         cf_depend="../include/ncurses_cfg.h"
27705                         if test "$srcdir" = "."; then
27706                                 cf_reldir="."
27707                         else
27708                                 cf_reldir="\${srcdir}"
27709                         fi
27710
27711                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
27712                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
27713                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
27714                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
27715                         fi
27716
27717                         cf_dir_suffix=
27718                         old_cf_suffix="$cf_suffix"
27719                         if test "$cf_cv_shlib_version_infix" = yes ; then
27720                         if test -n "$USE_LIB_SUFFIX" ; then
27721                                 case $USE_LIB_SUFFIX in
27722                                 (tw*)
27723                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
27724                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
27725                                         cf_dir_suffix=tw$EXTRA_SUFFIX
27726                                         ;;
27727                                 (t*)
27728                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
27729                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
27730                                         cf_dir_suffix=t$EXTRA_SUFFIX
27731                                         ;;
27732                                 (w*)
27733                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
27734                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
27735                                         cf_dir_suffix=w$EXTRA_SUFFIX
27736                                         ;;
27737                                 (*)
27738                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
27739                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
27740                                         cf_dir_suffix=$EXTRA_SUFFIX
27741                                         ;;
27742                                 esac
27743                         fi
27744                         fi
27745
27746                         $AWK -f $srcdir/mk-1st.awk \
27747                                 name=${cf_libname}${cf_dir_suffix} \
27748                                 traces=$LIB_TRACING \
27749                                 MODEL=$cf_ITEM \
27750                                 CXX_MODEL=$CXX_MODEL \
27751                                 model=$cf_subdir \
27752                                 prefix=$cf_prefix \
27753                                 suffix=$cf_suffix \
27754                                 subset=$cf_subset \
27755                                 driver=$cf_cv_term_driver \
27756                                 SymLink="$LN_S" \
27757                                 TermlibRoot=$TINFO_NAME \
27758                                 TermlibSuffix=$TINFO_SUFFIX \
27759                                 ShlibVer=$cf_cv_shlib_version \
27760                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
27761                                 ReLink=${cf_cv_do_relink:-no} \
27762                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
27763                                 DoLinks=$cf_cv_do_symlinks \
27764                                 rmSoLocs=$cf_cv_rm_so_locs \
27765                                 ldconfig="$LDCONFIG" \
27766                                 overwrite=$WITH_OVERWRITE \
27767                                 depend="$cf_depend" \
27768                                 host="$host" \
27769                                 libtool_version="$LIBTOOL_VERSION" \
27770                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27771
27772                         cf_suffix="$old_cf_suffix"
27773
27774                         for cf_subdir2 in $cf_subdirs lib
27775                         do
27776                                 test $cf_subdir = $cf_subdir2 && break
27777                         done
27778                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
27779                         $AWK -f $srcdir/mk-2nd.awk \
27780                                 name=$cf_dir \
27781                                 traces=$LIB_TRACING \
27782                                 MODEL=$cf_ITEM \
27783                                 model=$cf_subdir \
27784                                 subset=$cf_subset \
27785                                 srcdir=$srcdir \
27786                                 echo=$WITH_ECHO \
27787                                 crenames=$cf_cv_prog_CC_c_o \
27788                                 cxxrenames=$cf_cv_prog_CXX_c_o \
27789                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
27790                         cf_subdirs="$cf_subdirs $cf_subdir"
27791                         done
27792                 done
27793         fi
27794
27795         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
27796 done
27797
27798 for cf_dir in $SRC_SUBDIRS
27799 do
27800         if test ! -d $srcdir/$cf_dir ; then
27801                 continue
27802         fi
27803
27804         if test -f $cf_dir/Makefile ; then
27805                 case "$cf_dir" in
27806                 (Ada95)
27807                         echo 'libs \' >> Makefile
27808                         echo 'install.libs \' >> Makefile
27809                         echo 'uninstall.libs ::' >> Makefile
27810                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
27811                         ;;
27812                 esac
27813         fi
27814
27815         if test -f $srcdir/$cf_dir/modules; then
27816                 echo >> Makefile
27817                 if test -f $srcdir/$cf_dir/headers; then
27818 cat >> Makefile <<CF_EOF
27819 install.includes \\
27820 uninstall.includes \\
27821 CF_EOF
27822                 fi
27823 if test "$cf_dir" != "c++" ; then
27824 echo 'lint \' >> Makefile
27825 fi
27826 cat >> Makefile <<CF_EOF
27827 libs \\
27828 lintlib \\
27829 install.libs \\
27830 uninstall.libs \\
27831 install.$cf_dir \\
27832 uninstall.$cf_dir ::
27833         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27834 CF_EOF
27835         elif test -f $srcdir/$cf_dir/headers; then
27836 cat >> Makefile <<CF_EOF
27837
27838 libs \\
27839 install.libs \\
27840 uninstall.libs \\
27841 install.includes \\
27842 uninstall.includes ::
27843         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
27844 CF_EOF
27845 fi
27846 done
27847
27848 if test "x$cf_with_db_install" = xyes; then
27849 cat >> Makefile <<CF_EOF
27850
27851 install.libs uninstall.libs \\
27852 install.data uninstall.data ::
27853 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27854 CF_EOF
27855 else
27856 cat >> Makefile <<CF_EOF
27857
27858 install.libs uninstall.libs ::
27859         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
27860 CF_EOF
27861 fi
27862
27863 if test "x$cf_with_manpages" = xyes; then
27864 cat >> Makefile <<CF_EOF
27865
27866 install.man \\
27867 uninstall.man ::
27868         cd man && \${MAKE} \${TOP_MFLAGS} \$@
27869 CF_EOF
27870 fi
27871
27872 cat >> Makefile <<CF_EOF
27873
27874 distclean ::
27875         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
27876         rm -f headers.sh headers.sed mk_shared_lib.sh
27877         rm -f edit_man.* man_alias.*
27878         rm -rf \${DIRS_TO_MAKE}
27879 CF_EOF
27880
27881 # Special case: tack's manpage lives in its own directory.
27882 if test "x$cf_with_manpages" = xyes; then
27883 if test "x$cf_with_tack" = "xyes"; then
27884 cat >> Makefile <<CF_EOF
27885
27886 install.man \\
27887 uninstall.man ::
27888         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
27889 CF_EOF
27890 fi
27891 fi
27892
27893 rm -f headers.sed headers.sh
27894
27895 echo creating headers.sh
27896 cat >headers.sh <<CF_EOF
27897 #! $SHELL
27898 # This shell script is generated by the 'configure' script.  It is invoked in a
27899 # subdirectory of the build tree.  It generates a sed-script in the parent
27900 # directory that is used to adjust includes for header files that reside in a
27901 # subdirectory of /usr/include, etc.
27902 PRG=""
27903 while test \$# != 3
27904 do
27905 PRG="\$PRG \$1"; shift
27906 done
27907 DST=\$1
27908 REF=\$2
27909 SRC=\$3
27910 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
27911 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
27912 echo installing \$SRC in \$DST
27913 CF_EOF
27914
27915 if test $WITH_CURSES_H = yes; then
27916         cat >>headers.sh <<CF_EOF
27917 case \$DST in
27918 (/*/include/*)
27919         END=\`basename \$DST\`
27920         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27921         do
27922                 NAME=\`basename \$i\`
27923                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27924         done
27925         ;;
27926 (*)
27927         echo "" >> \$TMPSED
27928         ;;
27929 esac
27930 CF_EOF
27931
27932 else
27933         cat >>headers.sh <<CF_EOF
27934 case \$DST in
27935 (/*/include/*)
27936         END=\`basename \$DST\`
27937         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
27938         do
27939                 NAME=\`basename \$i\`
27940                 if test "\$NAME" = "curses.h"
27941                 then
27942                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27943                         NAME=ncurses.h
27944                 fi
27945                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
27946         done
27947         ;;
27948 (*)
27949         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
27950         ;;
27951 esac
27952 CF_EOF
27953 fi
27954 cat >>headers.sh <<CF_EOF
27955 rm -f \$TMPSRC
27956 sed -f \$TMPSED \$SRC > \$TMPSRC
27957 NAME=\`basename \$SRC\`
27958 CF_EOF
27959 if test $WITH_CURSES_H != yes; then
27960         cat >>headers.sh <<CF_EOF
27961 test "\$NAME" = "curses.h" && NAME=ncurses.h
27962 CF_EOF
27963 fi
27964 cat >>headers.sh <<CF_EOF
27965 # Just in case someone gzip'd manpages, remove the conflicting copy.
27966 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
27967
27968 eval \$PRG \$TMPSRC \$DST/\$NAME
27969 rm -f \$TMPSRC \$TMPSED
27970 CF_EOF
27971
27972 chmod 0755 headers.sh
27973
27974 for cf_dir in $SRC_SUBDIRS
27975 do
27976         if test ! -d $srcdir/$cf_dir ; then
27977                 continue
27978         fi
27979
27980         if test -f $srcdir/$cf_dir/headers; then
27981                 $AWK -f $srcdir/mk-hdr.awk \
27982                         subset="$LIB_SUBSETS" \
27983                         compat="$WITH_CURSES_H" \
27984                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
27985         fi
27986
27987         if test -f $srcdir/$cf_dir/modules; then
27988                 if test "$cf_dir" != "c++" ; then
27989                         cat >>$cf_dir/Makefile <<"CF_EOF"
27990 depend : ${AUTO_SRC}
27991         makedepend -- ${CPPFLAGS} -- ${C_SRC}
27992
27993 # DO NOT DELETE THIS LINE -- make depend depends on it.
27994 CF_EOF
27995                 fi
27996         fi
27997 done
27998
27999 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28000 if test -z "$USE_OLD_MAKERULES" ; then
28001         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28002 fi
28003 fi
28004  ;;
28005   esac
28006 done
28007 EOF
28008
28009 cat >>$CONFIG_STATUS <<\EOF
28010
28011 { (exit 0); exit 0; }
28012 EOF
28013 chmod +x $CONFIG_STATUS
28014 ac_clean_files=$ac_clean_files_save
28015
28016 # configure is writing to config.log, and then calls config.status.
28017 # config.status does its own redirection, appending to config.log.
28018 # Unfortunately, on DOS this fails, as config.log is still kept open
28019 # by configure, so config.status won't be able to write to it; its
28020 # output is simply discarded.  So we exec the FD to /dev/null,
28021 # effectively closing config.log, so it can be properly (re)opened and
28022 # appended to by config.status.  When coming back to configure, we
28023 # need to make the FD available again.
28024 if test "$no_create" != yes; then
28025   ac_cs_success=:
28026   exec 5>/dev/null
28027   $SHELL $CONFIG_STATUS || ac_cs_success=false
28028   exec 5>>config.log
28029   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28030   # would make configure fail if this is the last instruction.
28031   $ac_cs_success || { (exit 1); exit 1; }
28032 fi
28033 ${MAKE:-make} preinstall