]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
b0f2c28595da132b3483eaef232e4d5422130c27
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.666 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada95, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --without-xterm-new     specify if xterm terminfo should be old version
771   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
772   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
773   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
774   --disable-big-core      assume machine has little memory
775   --disable-big-strings   assume compiler has only standard-size strings
776   --enable-termcap        compile in termcap fallback support
777   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
778   --enable-getcap         fast termcap load, no xrefs to terminfo
779   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
780   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
781   --disable-root-environ  restrict environment when running as root
782   --enable-symlinks       make tic use symbolic links not hard links
783   --enable-broken_linker  compile with broken-linker support code
784   --enable-bsdpad         recognize BSD-style prefix padding
785   --enable-widec          compile with wide-char/UTF-8 code
786   --disable-lp64          allow chtype to be long (ignore _LP64)
787   --disable-largefile     omit support for large files
788   --disable-tparm-varargs compile tparm() without varargs interface
789   --disable-tic-depends   link tic library without explicit dependency on ncurses library
790   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
791   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
792   --with-bool=TYPE        override fallback type of bool variable
793   --with-caps=alt         compile with alternate Caps file
794   --with-chtype=TYPE      override type of chtype
795   --with-ospeed=TYPE      override type of ospeed variable
796   --with-mmask-t=TYPE     override type of mmask_t
797   --with-ccharw-max=XXX   override size CCHARW_MAX
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --with-tparm-arg=TYPE   override parameter type of tparm
800   --with-rcs-ids          compile-in RCS identifiers
801 Options to Specify How Manpages are Installed:
802   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
803                           optionally formatted/catonly, e.g., gzip,formatted
804   --with-manpage-renames  specify manpage-renaming
805   --with-manpage-aliases  specify manpage-aliases using .so
806   --with-manpage-symlinks specify manpage-aliases using symlinks
807   --with-manpage-tbl      specify manpage processing with tbl
808 Extensions:
809   --disable-ext-funcs     disable function-extensions
810   --enable-sp-funcs       enable SCREEN-extensions
811   --enable-term-driver    enable terminal-driver
812   --enable-const          compile with extra/non-standard const
813   --enable-ext-colors     compile for 256-color support
814   --enable-ext-mouse      compile for extended mouse-encoding
815   --enable-ext-putwin     compile with extended putwin/screendump
816   --enable-no-padding     compile with $NCURSES_NO_PADDING code
817   --enable-sigwinch       compile with SIGWINCH handler
818   --enable-tcap-names     compile with user-definable terminal capabilities
819 Reentrant Code:
820   --with-pthread          use POSIX thread library
821   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
822   --enable-weak-symbols   enable weak-symbols for pthreads
823   --enable-reentrant      compile with reentrant code
824   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
825   --enable-opaque-form    make form-library structures "opaque"
826   --enable-opaque-menu    make menu-library structures "opaque"
827   --enable-opaque-panel   make panel-library structures "opaque"
828   --with-wrap-prefix=XXX  override prefix used for public variables
829 Development Code:
830   --without-develop       disable development options
831   --enable-hard-tabs      compile with hard-tabs code
832   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
833 Experimental Code:
834   --disable-assumed-color do not assume anything about default-colors
835   --disable-hashmap       compile without hashmap scrolling-optimization
836   --enable-colorfgbg      compile-in experimental $COLORFGBG code
837   --enable-interop        compile-in interop bindings
838   --enable-safe-sprintf   compile with experimental safe-sprintf code
839   --disable-scroll-hints  compile without scroll-hints code
840   --enable-wgetch-events  compile with wgetch-events code
841 Testing/development Options:
842   --disable-echo          do not display "compiling" commands
843   --disable-stripping     do not strip (debug info) installed executables
844   --enable-warnings       build: turn on GCC compiler warnings
845   --enable-string-hacks   work around bogus compiler/loader warnings
846   --enable-assertions     test: turn on generation of assertion code
847   --with-dmalloc          test: use Gray Watson's dmalloc library
848   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
849   --with-valgrind         test: use valgrind
850   --disable-leaks         test: free permanent memory, analyze leaks
851   --enable-expanded       test: generate functions for certain macros
852   --disable-macros        test: use functions rather than macros
853   --with-trace            test: add trace() function to all models of ncurses
854   --disable-gnat-projects test: disable GNAT projects even if usable
855 Ada95 Binding Options:
856   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
857   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
858   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
859   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
860
861 Some influential environment variables:
862   CC          C compiler command
863   CFLAGS      C compiler flags
864   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
865               nonstandard directory <lib dir>
866   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
867               headers in a nonstandard directory <include dir>
868   CPP         C preprocessor
869   CXX         C++ compiler command
870   CXXFLAGS    C++ compiler flags
871   CXXCPP      C++ preprocessor
872
873 Use these variables to override the choices made by `configure' or to help
874 it to find libraries and programs with nonstandard names/locations.
875
876 EOF
877 fi
878
879 if test "$ac_init_help" = "recursive"; then
880   # If there are subdirs, report their specific --help.
881   ac_popdir=`pwd`
882   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
883     cd $ac_subdir
884     # A "../" for each directory in /$ac_subdir.
885     ac_dots=`echo $ac_subdir |
886              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
887
888     case $srcdir in
889     .) # No --srcdir option.  We are building in place.
890       ac_sub_srcdir=$srcdir ;;
891     [\\/]* | ?:[\\/]* ) # Absolute path.
892       ac_sub_srcdir=$srcdir/$ac_subdir ;;
893     *) # Relative path.
894       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
895     esac
896
897     # Check for guested configure; otherwise get Cygnus style configure.
898     if test -f $ac_sub_srcdir/configure.gnu; then
899       echo
900       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
901     elif test -f $ac_sub_srcdir/configure; then
902       echo
903       $SHELL $ac_sub_srcdir/configure  --help=recursive
904     elif test -f $ac_sub_srcdir/configure.ac ||
905            test -f $ac_sub_srcdir/configure.in; then
906       echo
907       $ac_configure --help
908     else
909       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
910     fi
911     cd $ac_popdir
912   done
913 fi
914
915 test -n "$ac_init_help" && exit 0
916 if $ac_init_version; then
917   cat <<\EOF
918
919 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
920 Free Software Foundation, Inc.
921 This configure script is free software; the Free Software Foundation
922 gives unlimited permission to copy, distribute and modify it.
923 EOF
924   exit 0
925 fi
926 exec 5>config.log
927 cat >&5 <<EOF
928 This file contains any messages produced by compilers while
929 running configure, to aid debugging if configure makes a mistake.
930
931 It was created by $as_me, which was
932 generated by GNU Autoconf 2.52.20181006.  Invocation command line was
933
934   $ $0 $@
935
936 EOF
937 {
938 cat <<_ASUNAME
939 ## ---------- ##
940 ## Platform.  ##
941 ## ---------- ##
942
943 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
944 uname -m = `(uname -m) 2>/dev/null || echo unknown`
945 uname -r = `(uname -r) 2>/dev/null || echo unknown`
946 uname -s = `(uname -s) 2>/dev/null || echo unknown`
947 uname -v = `(uname -v) 2>/dev/null || echo unknown`
948
949 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
950 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
951
952 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
953 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
954 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
955 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
956 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
957 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
958 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
959
960 PATH = $PATH
961
962 _ASUNAME
963 } >&5
964
965 cat >&5 <<EOF
966 ## ------------ ##
967 ## Core tests.  ##
968 ## ------------ ##
969
970 EOF
971
972 # Keep a trace of the command line.
973 # Strip out --no-create and --no-recursion so they do not pile up.
974 # Also quote any args containing shell meta-characters.
975 ac_configure_args=
976 ac_sep=
977 for ac_arg
978 do
979   case $ac_arg in
980   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
981   | --no-cr | --no-c) ;;
982   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
983   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
984   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
985     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
986     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
987     ac_sep=" " ;;
988   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
989      ac_sep=" " ;;
990   esac
991   # Get rid of the leading space.
992 done
993
994 # When interrupted or exit'd, cleanup temporary files, and complete
995 # config.log.  We remove comments because anyway the quotes in there
996 # would cause problems or look ugly.
997 trap 'exit_status=$?
998   # Save into config.log some information that might help in debugging.
999   echo >&5
1000   echo "## ----------------- ##" >&5
1001   echo "## Cache variables.  ##" >&5
1002   echo "## ----------------- ##" >&5
1003   echo >&5
1004   # The following way of writing the cache mishandles newlines in values,
1005 {
1006   (set) 2>&1 |
1007     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1008     *ac_space=\ *)
1009       sed -n \
1010         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1011           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1012       ;;
1013     *)
1014       sed -n \
1015         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1016       ;;
1017     esac;
1018 } >&5
1019   sed "/^$/d" confdefs.h >conftest.log
1020   if test -s conftest.log; then
1021     echo >&5
1022     echo "## ------------ ##" >&5
1023     echo "## confdefs.h.  ##" >&5
1024     echo "## ------------ ##" >&5
1025     echo >&5
1026     cat conftest.log >&5
1027   fi
1028   (echo; echo) >&5
1029   test "$ac_signal" != 0 &&
1030     echo "$as_me: caught signal $ac_signal" >&5
1031   echo "$as_me: exit $exit_status" >&5
1032   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1033     exit $exit_status
1034      ' 0
1035 for ac_signal in 1 2 13 15; do
1036   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1037 done
1038 ac_signal=0
1039
1040 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1041 rm -rf conftest* confdefs.h
1042 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1043 echo >confdefs.h
1044
1045 # Let the site file select an alternate cache file if it wants to.
1046 # Prefer explicitly selected file to automatically selected ones.
1047 if test -z "$CONFIG_SITE"; then
1048   if test "x$prefix" != xNONE; then
1049     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1050   else
1051     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1052   fi
1053 fi
1054 for ac_site_file in $CONFIG_SITE; do
1055   if test -r "$ac_site_file"; then
1056     { echo "$as_me:1056: loading site script $ac_site_file" >&5
1057 echo "$as_me: loading site script $ac_site_file" >&6;}
1058     cat "$ac_site_file" >&5
1059     . "$ac_site_file"
1060   fi
1061 done
1062
1063 if test -r "$cache_file"; then
1064   # Some versions of bash will fail to source /dev/null (special
1065   # files actually), so we avoid doing that.
1066   if test -f "$cache_file"; then
1067     { echo "$as_me:1067: loading cache $cache_file" >&5
1068 echo "$as_me: loading cache $cache_file" >&6;}
1069     case $cache_file in
1070       [\\/]* | ?:[\\/]* ) . $cache_file;;
1071       *)                      . ./$cache_file;;
1072     esac
1073   fi
1074 else
1075   { echo "$as_me:1075: creating cache $cache_file" >&5
1076 echo "$as_me: creating cache $cache_file" >&6;}
1077   >$cache_file
1078 fi
1079
1080 # Check that the precious variables saved in the cache have kept the same
1081 # value.
1082 ac_cache_corrupted=false
1083 for ac_var in `(set) 2>&1 |
1084                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1085   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1086   eval ac_new_set=\$ac_env_${ac_var}_set
1087   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1088   eval ac_new_val="\$ac_env_${ac_var}_value"
1089   case $ac_old_set,$ac_new_set in
1090     set,)
1091       { echo "$as_me:1091: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1092 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1093       ac_cache_corrupted=: ;;
1094     ,set)
1095       { echo "$as_me:1095: error: \`$ac_var' was not set in the previous run" >&5
1096 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1097       ac_cache_corrupted=: ;;
1098     ,);;
1099     *)
1100       if test "x$ac_old_val" != "x$ac_new_val"; then
1101         { echo "$as_me:1101: error: \`$ac_var' has changed since the previous run:" >&5
1102 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1103         { echo "$as_me:1103:   former value:  $ac_old_val" >&5
1104 echo "$as_me:   former value:  $ac_old_val" >&2;}
1105         { echo "$as_me:1105:   current value: $ac_new_val" >&5
1106 echo "$as_me:   current value: $ac_new_val" >&2;}
1107         ac_cache_corrupted=:
1108       fi;;
1109   esac
1110   # Pass precious variables to config.status.  It doesn't matter if
1111   # we pass some twice (in addition to the command line arguments).
1112   if test "$ac_new_set" = set; then
1113     case $ac_new_val in
1114     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1115       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1116       ac_configure_args="$ac_configure_args '$ac_arg'"
1117       ;;
1118     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1119        ;;
1120     esac
1121   fi
1122 done
1123 if $ac_cache_corrupted; then
1124   { echo "$as_me:1124: error: changes in the environment can compromise the build" >&5
1125 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1126   { { echo "$as_me:1126: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1127 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1128    { (exit 1); exit 1; }; }
1129 fi
1130
1131 ac_ext=c
1132 ac_cpp='$CPP $CPPFLAGS'
1133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1136 ac_main_return=return
1137
1138 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1139   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1140                    ECHO_T='     ' ;;
1141   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1142   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1143 esac
1144 echo "#! $SHELL" >conftest.sh
1145 echo  "exit 0"   >>conftest.sh
1146 chmod +x conftest.sh
1147 if { (echo "$as_me:1147: PATH=\".;.\"; conftest.sh") >&5
1148   (PATH=".;."; conftest.sh) 2>&5
1149   ac_status=$?
1150   echo "$as_me:1150: \$? = $ac_status" >&5
1151   (exit $ac_status); }; then
1152   ac_path_separator=';'
1153 else
1154   ac_path_separator=:
1155 fi
1156 PATH_SEPARATOR="$ac_path_separator"
1157 rm -f conftest.sh
1158
1159 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1160
1161 top_builddir=`pwd`
1162
1163 echo "$as_me:1163: checking for egrep" >&5
1164 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1165 if test "${ac_cv_prog_egrep+set}" = set; then
1166   echo $ECHO_N "(cached) $ECHO_C" >&6
1167 else
1168   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1169                 then ac_cv_prog_egrep='grep -E'
1170                 else ac_cv_prog_egrep='egrep'
1171         fi
1172 fi
1173 echo "$as_me:1173: result: $ac_cv_prog_egrep" >&5
1174 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1175         EGREP=$ac_cv_prog_egrep
1176
1177         test -z "$EGREP" && { { echo "$as_me:1177: error: No egrep program found" >&5
1178 echo "$as_me: error: No egrep program found" >&2;}
1179    { (exit 1); exit 1; }; }
1180
1181 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1182 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1183 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1184 cf_cv_abi_version=${NCURSES_MAJOR}
1185 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1186 cf_cv_timestamp=`date`
1187 echo "$as_me:1187: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1188 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1189
1190 if test -f $srcdir/VERSION ; then
1191         echo "$as_me:1191: checking for package version" >&5
1192 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1193
1194         # if there are not enough fields, cut returns the last one...
1195         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1196         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1197         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1198
1199         # this is how CF_BUNDLED_INTL uses $VERSION:
1200         VERSION="$cf_field1"
1201
1202         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1203         test -z "$VERSION_MAJOR" && { { echo "$as_me:1203: error: missing major-version" >&5
1204 echo "$as_me: error: missing major-version" >&2;}
1205    { (exit 1); exit 1; }; }
1206
1207         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1208         test -z "$VERSION_MINOR" && { { echo "$as_me:1208: error: missing minor-version" >&5
1209 echo "$as_me: error: missing minor-version" >&2;}
1210    { (exit 1); exit 1; }; }
1211
1212         echo "$as_me:1212: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1213 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1214
1215         echo "$as_me:1215: checking for package patch date" >&5
1216 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1217         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1218         case .$VERSION_PATCH in
1219         (.)
1220                 { { echo "$as_me:1220: error: missing patch-date $VERSION_PATCH" >&5
1221 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1222    { (exit 1); exit 1; }; }
1223                 ;;
1224         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1225                 ;;
1226         (*)
1227                 { { echo "$as_me:1227: error: illegal patch-date $VERSION_PATCH" >&5
1228 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1229    { (exit 1); exit 1; }; }
1230                 ;;
1231         esac
1232         echo "$as_me:1232: result: $VERSION_PATCH" >&5
1233 echo "${ECHO_T}$VERSION_PATCH" >&6
1234 else
1235         { { echo "$as_me:1235: error: did not find $srcdir/VERSION" >&5
1236 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1237    { (exit 1); exit 1; }; }
1238 fi
1239
1240 # show the actual data that we have for versions:
1241 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing ABI VERSION $VERSION ..." 1>&5
1244
1245 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1246
1247 echo "${as_me:-configure}:1247: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1248
1249 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1250
1251 echo "${as_me:-configure}:1251: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1252
1253 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1254
1255 echo "${as_me:-configure}:1255: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1256
1257         cf_PACKAGE=NCURSES
1258         PACKAGE=ncurses
1259
1260 cat >>confdefs.h <<EOF
1261 #define PACKAGE "$PACKAGE"
1262 EOF
1263
1264 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1265
1266         cat >>confdefs.h <<EOF
1267 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1268 EOF
1269
1270         cat >>confdefs.h <<EOF
1271 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1272 EOF
1273
1274 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1275
1276 # Check whether --with-rel-version or --without-rel-version was given.
1277 if test "${with_rel_version+set}" = set; then
1278   withval="$with_rel_version"
1279   { echo "$as_me:1279: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1280 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1281  cf_cv_rel_version=$withval
1282 fi;
1283
1284  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1285  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1286
1287 if test -n "$NCURSES_MAJOR" ; then
1288   case $NCURSES_MAJOR in
1289   ([0-9]*)
1290         ;;
1291   (*)
1292         { { echo "$as_me:1292: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1293 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1294    { (exit 1); exit 1; }; }
1295         ;;
1296   esac
1297 else
1298   { { echo "$as_me:1298: error: Release major-version value is empty" >&5
1299 echo "$as_me: error: Release major-version value is empty" >&2;}
1300    { (exit 1); exit 1; }; }
1301 fi
1302
1303 if test -n "$NCURSES_MINOR" ; then
1304   case $NCURSES_MINOR in
1305   ([0-9]*)
1306         ;;
1307   (*)
1308         { { echo "$as_me:1308: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1309 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1310    { (exit 1); exit 1; }; }
1311         ;;
1312   esac
1313 else
1314   { { echo "$as_me:1314: error: Release minor-version value is empty" >&5
1315 echo "$as_me: error: Release minor-version value is empty" >&2;}
1316    { (exit 1); exit 1; }; }
1317 fi
1318
1319 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1320
1321 # Check whether --with-abi-version or --without-abi-version was given.
1322 if test "${with_abi_version+set}" = set; then
1323   withval="$with_abi_version"
1324
1325         if test "x$cf_cv_abi_version" != "x$withval"
1326         then
1327                 { echo "$as_me:1327: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1328 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1329                 case $cf_cv_rel_version in
1330                 (5.*)
1331                         cf_cv_rel_version=$withval.0
1332                         ;;
1333                 (6.*)
1334                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1335                         ;;
1336                 esac
1337         fi
1338         cf_cv_abi_version=$withval
1339 fi;
1340
1341 if test -n "$cf_cv_abi_version" ; then
1342   case $cf_cv_abi_version in
1343   ([0-9]*)
1344         ;;
1345   (*)
1346         { { echo "$as_me:1346: error: ABI version is not a number: $cf_cv_abi_version" >&5
1347 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1348    { (exit 1); exit 1; }; }
1349         ;;
1350   esac
1351 else
1352   { { echo "$as_me:1352: error: ABI version value is empty" >&5
1353 echo "$as_me: error: ABI version value is empty" >&2;}
1354    { (exit 1); exit 1; }; }
1355 fi
1356
1357 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1358 then
1359         case $cf_cv_rel_version in
1360         (5.*)
1361                 cf_cv_rel_version=$with_abi_version.0
1362                 ;;
1363         esac
1364 fi
1365
1366 ac_aux_dir=
1367 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1368   if test -f $ac_dir/install-sh; then
1369     ac_aux_dir=$ac_dir
1370     ac_install_sh="$ac_aux_dir/install-sh -c"
1371     break
1372   elif test -f $ac_dir/install.sh; then
1373     ac_aux_dir=$ac_dir
1374     ac_install_sh="$ac_aux_dir/install.sh -c"
1375     break
1376   elif test -f $ac_dir/shtool; then
1377     ac_aux_dir=$ac_dir
1378     ac_install_sh="$ac_aux_dir/shtool install -c"
1379     break
1380   fi
1381 done
1382 if test -z "$ac_aux_dir"; then
1383   { { echo "$as_me:1383: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1384 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1385    { (exit 1); exit 1; }; }
1386 fi
1387 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1388 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1389 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1390
1391 # Make sure we can run config.sub.
1392 $ac_config_sub sun4 >/dev/null 2>&1 ||
1393   { { echo "$as_me:1393: error: cannot run $ac_config_sub" >&5
1394 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1395    { (exit 1); exit 1; }; }
1396
1397 echo "$as_me:1397: checking build system type" >&5
1398 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1399 if test "${ac_cv_build+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   ac_cv_build_alias=$build_alias
1403 test -z "$ac_cv_build_alias" &&
1404   ac_cv_build_alias=`$ac_config_guess`
1405 test -z "$ac_cv_build_alias" &&
1406   { { echo "$as_me:1406: error: cannot guess build type; you must specify one" >&5
1407 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1408    { (exit 1); exit 1; }; }
1409 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_build" >&5
1416 echo "${ECHO_T}$ac_cv_build" >&6
1417 build=$ac_cv_build
1418 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 echo "$as_me:1422: checking host system type" >&5
1423 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1424 if test "${ac_cv_host+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_host_alias=$host_alias
1428 test -z "$ac_cv_host_alias" &&
1429   ac_cv_host_alias=$ac_cv_build_alias
1430 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_host" >&5
1437 echo "${ECHO_T}$ac_cv_host" >&6
1438 host=$ac_cv_host
1439 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1444         echo "$as_me:1444: checking target system type" >&5
1445 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1446 if test "${ac_cv_target+set}" = set; then
1447   echo $ECHO_N "(cached) $ECHO_C" >&6
1448 else
1449   ac_cv_target_alias=$target_alias
1450 test "x$ac_cv_target_alias" = "x" &&
1451   ac_cv_target_alias=$ac_cv_host_alias
1452 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1453   { { echo "$as_me:1453: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1454 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1455    { (exit 1); exit 1; }; }
1456
1457 fi
1458 echo "$as_me:1458: result: $ac_cv_target" >&5
1459 echo "${ECHO_T}$ac_cv_target" >&6
1460 target=$ac_cv_target
1461 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1462 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1463 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1464
1465 # The aliases save the names the user supplied, while $host etc.
1466 # will get canonicalized.
1467 test -n "$target_alias" &&
1468   test "$program_prefix$program_suffix$program_transform_name" = \
1469     NONENONEs,x,x, &&
1470   program_prefix=${target_alias}-
1471         system_name="$host_os"
1472 else
1473         system_name="`(uname -s -r) 2>/dev/null`"
1474         if test -z "$system_name" ; then
1475                 system_name="`(hostname) 2>/dev/null`"
1476         fi
1477 fi
1478 test -n "$system_name" &&
1479 cat >>confdefs.h <<EOF
1480 #define SYSTEM_NAME "$system_name"
1481 EOF
1482
1483 if test "${cf_cv_system_name+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   cf_cv_system_name="$system_name"
1487 fi
1488
1489 test -z "$system_name" && system_name="$cf_cv_system_name"
1490 test -n "$cf_cv_system_name" && echo "$as_me:1490: result: Configuring for $cf_cv_system_name" >&5
1491 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1492
1493 if test ".$system_name" != ".$cf_cv_system_name" ; then
1494         echo "$as_me:1494: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1495 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1496         { { echo "$as_me:1496: error: \"Please remove config.cache and try again.\"" >&5
1497 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1498    { (exit 1); exit 1; }; }
1499 fi
1500
1501 # Check whether --with-system-type or --without-system-type was given.
1502 if test "${with_system_type+set}" = set; then
1503   withval="$with_system_type"
1504   { echo "$as_me:1504: WARNING: overriding system type to $withval" >&5
1505 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1506         cf_cv_system_name=$withval
1507         host_os=$withval
1508
1509 fi;
1510
1511 ###     Save the given $CFLAGS to allow user-override.
1512 cf_user_CFLAGS="$CFLAGS"
1513
1514 ###     Default install-location
1515
1516 echo "$as_me:1516: checking for prefix" >&5
1517 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1518 if test "x$prefix" = "xNONE" ; then
1519         case "$cf_cv_system_name" in
1520                 # non-vendor systems don't have a conflict
1521         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1522                 prefix=/usr
1523                 ;;
1524         (*)     prefix=$ac_default_prefix
1525                 ;;
1526         esac
1527 fi
1528 echo "$as_me:1528: result: $prefix" >&5
1529 echo "${ECHO_T}$prefix" >&6
1530
1531 if test "x$prefix" = "xNONE" ; then
1532 echo "$as_me:1532: checking for default include-directory" >&5
1533 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1534 test -n "$verbose" && echo 1>&6
1535 for cf_symbol in \
1536         $includedir \
1537         $includedir/ncurses \
1538         $prefix/include \
1539         $prefix/include/ncurses \
1540         /usr/local/include \
1541         /usr/local/include/ncurses \
1542         /usr/include \
1543         /usr/include/ncurses
1544 do
1545         cf_dir=`eval echo $cf_symbol`
1546         if test -f $cf_dir/curses.h ; then
1547         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1548                 includedir="$cf_symbol"
1549                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1550                 break
1551         fi
1552         fi
1553         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1554 done
1555 echo "$as_me:1555: result: $includedir" >&5
1556 echo "${ECHO_T}$includedir" >&6
1557 fi
1558
1559 ### Defaults for ncurses ABI
1560
1561 case x$cf_cv_abi_version in
1562 (x[6789])
1563         cf_dft_ext_colors=yes
1564         cf_dft_ext_const=yes
1565         cf_dft_ext_mouse=yes
1566         cf_dft_ext_putwin=yes
1567         cf_dft_ext_spfuncs=yes
1568         cf_dft_filter_syms=yes
1569         cf_dft_chtype=uint32_t
1570         cf_dft_mmask_t=uint32_t
1571         cf_dft_interop=yes
1572         cf_dft_tparm_arg=intptr_t
1573         cf_dft_with_lp64=yes
1574         ;;
1575 (*)
1576         cf_dft_ext_colors=no
1577         cf_dft_ext_const=no
1578         cf_dft_ext_mouse=no
1579         cf_dft_ext_putwin=no
1580         cf_dft_ext_spfuncs=no
1581         cf_dft_filter_syms=no
1582         cf_dft_chtype=auto
1583         cf_dft_mmask_t=auto
1584         cf_dft_interop=no
1585         cf_dft_tparm_arg=long
1586         cf_dft_with_lp64=no
1587         ;;
1588 esac
1589
1590 ###     Checks for programs.
1591
1592 # Check whether --with-ada or --without-ada was given.
1593 if test "${with_ada+set}" = set; then
1594   withval="$with_ada"
1595   cf_with_ada=$withval
1596 else
1597   cf_with_ada=yes
1598 fi;
1599 if test "x$cf_with_ada" = xyes
1600 then
1601         cf_PROG_CC="gnatgcc gcc cc"
1602 else
1603         cf_PROG_CC="gcc cc"
1604 fi
1605
1606 ac_ext=c
1607 ac_cpp='$CPP $CPPFLAGS'
1608 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1609 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1610 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1611 ac_main_return=return
1612 if test -n "$ac_tool_prefix"; then
1613   for ac_prog in $cf_PROG_CC
1614   do
1615     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1616 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1617 echo "$as_me:1617: checking for $ac_word" >&5
1618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1619 if test "${ac_cv_prog_CC+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if test -n "$CC"; then
1623   ac_cv_prog_CC="$CC" # Let the user override the test.
1624 else
1625   ac_save_IFS=$IFS; IFS=$ac_path_separator
1626 ac_dummy="$PATH"
1627 for ac_dir in $ac_dummy; do
1628   IFS=$ac_save_IFS
1629   test -z "$ac_dir" && ac_dir=.
1630   $as_executable_p "$ac_dir/$ac_word" || continue
1631 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1632 echo "$as_me:1632: found $ac_dir/$ac_word" >&5
1633 break
1634 done
1635
1636 fi
1637 fi
1638 CC=$ac_cv_prog_CC
1639 if test -n "$CC"; then
1640   echo "$as_me:1640: result: $CC" >&5
1641 echo "${ECHO_T}$CC" >&6
1642 else
1643   echo "$as_me:1643: result: no" >&5
1644 echo "${ECHO_T}no" >&6
1645 fi
1646
1647     test -n "$CC" && break
1648   done
1649 fi
1650 if test -z "$CC"; then
1651   ac_ct_CC=$CC
1652   for ac_prog in $cf_PROG_CC
1653 do
1654   # Extract the first word of "$ac_prog", so it can be a program name with args.
1655 set dummy $ac_prog; ac_word=$2
1656 echo "$as_me:1656: checking for $ac_word" >&5
1657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1658 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1659   echo $ECHO_N "(cached) $ECHO_C" >&6
1660 else
1661   if test -n "$ac_ct_CC"; then
1662   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1663 else
1664   ac_save_IFS=$IFS; IFS=$ac_path_separator
1665 ac_dummy="$PATH"
1666 for ac_dir in $ac_dummy; do
1667   IFS=$ac_save_IFS
1668   test -z "$ac_dir" && ac_dir=.
1669   $as_executable_p "$ac_dir/$ac_word" || continue
1670 ac_cv_prog_ac_ct_CC="$ac_prog"
1671 echo "$as_me:1671: found $ac_dir/$ac_word" >&5
1672 break
1673 done
1674
1675 fi
1676 fi
1677 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1678 if test -n "$ac_ct_CC"; then
1679   echo "$as_me:1679: result: $ac_ct_CC" >&5
1680 echo "${ECHO_T}$ac_ct_CC" >&6
1681 else
1682   echo "$as_me:1682: result: no" >&5
1683 echo "${ECHO_T}no" >&6
1684 fi
1685
1686   test -n "$ac_ct_CC" && break
1687 done
1688
1689   CC=$ac_ct_CC
1690 fi
1691
1692 test -z "$CC" && { { echo "$as_me:1692: error: no acceptable cc found in \$PATH" >&5
1693 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1694    { (exit 1); exit 1; }; }
1695
1696 # Provide some information about the compiler.
1697 echo "$as_me:1697:" \
1698      "checking for C compiler version" >&5
1699 ac_compiler=`set X $ac_compile; echo $2`
1700 { (eval echo "$as_me:1700: \"$ac_compiler --version </dev/null >&5\"") >&5
1701   (eval $ac_compiler --version </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705 { (eval echo "$as_me:1705: \"$ac_compiler -v </dev/null >&5\"") >&5
1706   (eval $ac_compiler -v </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710 { (eval echo "$as_me:1710: \"$ac_compiler -V </dev/null >&5\"") >&5
1711   (eval $ac_compiler -V </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715
1716 cat >conftest.$ac_ext <<_ACEOF
1717 #line 1717 "configure"
1718 #include "confdefs.h"
1719
1720 int
1721 main (void)
1722 {
1723
1724   ;
1725   return 0;
1726 }
1727 _ACEOF
1728 ac_clean_files_save=$ac_clean_files
1729 ac_clean_files="$ac_clean_files a.out a.exe"
1730 # Try to create an executable without -o first, disregard a.out.
1731 # It will help us diagnose broken compilers, and finding out an intuition
1732 # of exeext.
1733 echo "$as_me:1733: checking for C compiler default output" >&5
1734 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1735 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1736 if { (eval echo "$as_me:1736: \"$ac_link_default\"") >&5
1737   (eval $ac_link_default) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; then
1741   # Find the output, starting from the most likely.  This scheme is
1742 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1743 # resort.
1744 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1745                 ls a.out conftest 2>/dev/null;
1746                 ls a.* conftest.* 2>/dev/null`; do
1747   case $ac_file in
1748     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1749     a.out ) # We found the default executable, but exeext='' is most
1750             # certainly right.
1751             break;;
1752     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1753           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1754           export ac_cv_exeext
1755           break;;
1756     * ) break;;
1757   esac
1758 done
1759 else
1760   echo "$as_me: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 { { echo "$as_me:1762: error: C compiler cannot create executables" >&5
1763 echo "$as_me: error: C compiler cannot create executables" >&2;}
1764    { (exit 77); exit 77; }; }
1765 fi
1766
1767 ac_exeext=$ac_cv_exeext
1768 echo "$as_me:1768: result: $ac_file" >&5
1769 echo "${ECHO_T}$ac_file" >&6
1770
1771 # Check the compiler produces executables we can run.  If not, either
1772 # the compiler is broken, or we cross compile.
1773 echo "$as_me:1773: checking whether the C compiler works" >&5
1774 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1775 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1776 # If not cross compiling, check that we can run a simple program.
1777 if test "$cross_compiling" != yes; then
1778   if { ac_try='./$ac_file'
1779   { (eval echo "$as_me:1779: \"$ac_try\"") >&5
1780   (eval $ac_try) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); }; }; then
1784     cross_compiling=no
1785   else
1786     if test "$cross_compiling" = maybe; then
1787         cross_compiling=yes
1788     else
1789         { { echo "$as_me:1789: error: cannot run C compiled programs.
1790 If you meant to cross compile, use \`--host'." >&5
1791 echo "$as_me: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&2;}
1793    { (exit 1); exit 1; }; }
1794     fi
1795   fi
1796 fi
1797 echo "$as_me:1797: result: yes" >&5
1798 echo "${ECHO_T}yes" >&6
1799
1800 rm -f a.out a.exe conftest$ac_cv_exeext
1801 ac_clean_files=$ac_clean_files_save
1802 # Check the compiler produces executables we can run.  If not, either
1803 # the compiler is broken, or we cross compile.
1804 echo "$as_me:1804: checking whether we are cross compiling" >&5
1805 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1806 echo "$as_me:1806: result: $cross_compiling" >&5
1807 echo "${ECHO_T}$cross_compiling" >&6
1808
1809 echo "$as_me:1809: checking for executable suffix" >&5
1810 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1811 if { (eval echo "$as_me:1811: \"$ac_link\"") >&5
1812   (eval $ac_link) 2>&5
1813   ac_status=$?
1814   echo "$as_me:1814: \$? = $ac_status" >&5
1815   (exit $ac_status); }; then
1816   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1817 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1818 # work properly (i.e., refer to `conftest.exe'), while it won't with
1819 # `rm'.
1820 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1821   case $ac_file in
1822     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1823     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1824           export ac_cv_exeext
1825           break;;
1826     * ) break;;
1827   esac
1828 done
1829 else
1830   { { echo "$as_me:1830: error: cannot compute EXEEXT: cannot compile and link" >&5
1831 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1832    { (exit 1); exit 1; }; }
1833 fi
1834
1835 rm -f conftest$ac_cv_exeext
1836 echo "$as_me:1836: result: $ac_cv_exeext" >&5
1837 echo "${ECHO_T}$ac_cv_exeext" >&6
1838
1839 rm -f conftest.$ac_ext
1840 EXEEXT=$ac_cv_exeext
1841 ac_exeext=$EXEEXT
1842 echo "$as_me:1842: checking for object suffix" >&5
1843 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1844 if test "${ac_cv_objext+set}" = set; then
1845   echo $ECHO_N "(cached) $ECHO_C" >&6
1846 else
1847   cat >conftest.$ac_ext <<_ACEOF
1848 #line 1848 "configure"
1849 #include "confdefs.h"
1850
1851 int
1852 main (void)
1853 {
1854
1855   ;
1856   return 0;
1857 }
1858 _ACEOF
1859 rm -f conftest.o conftest.obj
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861   (eval $ac_compile) 2>&5
1862   ac_status=$?
1863   echo "$as_me:1863: \$? = $ac_status" >&5
1864   (exit $ac_status); }; then
1865   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1866   case $ac_file in
1867     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1868     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1869        break;;
1870   esac
1871 done
1872 else
1873   echo "$as_me: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 { { echo "$as_me:1875: error: cannot compute OBJEXT: cannot compile" >&5
1876 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1877    { (exit 1); exit 1; }; }
1878 fi
1879
1880 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1881 fi
1882 echo "$as_me:1882: result: $ac_cv_objext" >&5
1883 echo "${ECHO_T}$ac_cv_objext" >&6
1884 OBJEXT=$ac_cv_objext
1885 ac_objext=$OBJEXT
1886 echo "$as_me:1886: checking whether we are using the GNU C compiler" >&5
1887 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1888 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1889   echo $ECHO_N "(cached) $ECHO_C" >&6
1890 else
1891   cat >conftest.$ac_ext <<_ACEOF
1892 #line 1892 "configure"
1893 #include "confdefs.h"
1894
1895 int
1896 main (void)
1897 {
1898 #ifndef __GNUC__
1899        choke me
1900 #endif
1901
1902   ;
1903   return 0;
1904 }
1905 _ACEOF
1906 rm -f conftest.$ac_objext
1907 if { (eval echo "$as_me:1907: \"$ac_compile\"") >&5
1908   (eval $ac_compile) 2>&5
1909   ac_status=$?
1910   echo "$as_me:1910: \$? = $ac_status" >&5
1911   (exit $ac_status); } &&
1912          { ac_try='test -s conftest.$ac_objext'
1913   { (eval echo "$as_me:1913: \"$ac_try\"") >&5
1914   (eval $ac_try) 2>&5
1915   ac_status=$?
1916   echo "$as_me:1916: \$? = $ac_status" >&5
1917   (exit $ac_status); }; }; then
1918   ac_compiler_gnu=yes
1919 else
1920   echo "$as_me: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
1922 ac_compiler_gnu=no
1923 fi
1924 rm -f conftest.$ac_objext conftest.$ac_ext
1925 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1926
1927 fi
1928 echo "$as_me:1928: result: $ac_cv_c_compiler_gnu" >&5
1929 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1930 GCC=`test $ac_compiler_gnu = yes && echo yes`
1931 ac_test_CFLAGS=${CFLAGS+set}
1932 ac_save_CFLAGS=$CFLAGS
1933 CFLAGS="-g"
1934 echo "$as_me:1934: checking whether $CC accepts -g" >&5
1935 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1936 if test "${ac_cv_prog_cc_g+set}" = set; then
1937   echo $ECHO_N "(cached) $ECHO_C" >&6
1938 else
1939   cat >conftest.$ac_ext <<_ACEOF
1940 #line 1940 "configure"
1941 #include "confdefs.h"
1942
1943 int
1944 main (void)
1945 {
1946
1947   ;
1948   return 0;
1949 }
1950 _ACEOF
1951 rm -f conftest.$ac_objext
1952 if { (eval echo "$as_me:1952: \"$ac_compile\"") >&5
1953   (eval $ac_compile) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit $ac_status); } &&
1957          { ac_try='test -s conftest.$ac_objext'
1958   { (eval echo "$as_me:1958: \"$ac_try\"") >&5
1959   (eval $ac_try) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); }; }; then
1963   ac_cv_prog_cc_g=yes
1964 else
1965   echo "$as_me: failed program was:" >&5
1966 cat conftest.$ac_ext >&5
1967 ac_cv_prog_cc_g=no
1968 fi
1969 rm -f conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 echo "$as_me:1971: result: $ac_cv_prog_cc_g" >&5
1972 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1973 if test "$ac_test_CFLAGS" = set; then
1974   CFLAGS=$ac_save_CFLAGS
1975 elif test $ac_cv_prog_cc_g = yes; then
1976   if test "$GCC" = yes; then
1977     CFLAGS="-g -O2"
1978   else
1979     CFLAGS="-g"
1980   fi
1981 else
1982   if test "$GCC" = yes; then
1983     CFLAGS="-O2"
1984   else
1985     CFLAGS=
1986   fi
1987 fi
1988 # Some people use a C++ compiler to compile C.  Since we use `exit',
1989 # in C++ we need to declare it.  In case someone uses the same compiler
1990 # for both compiling C and C++ we need to have the C++ compiler decide
1991 # the declaration of exit, since it's the most demanding environment.
1992 cat >conftest.$ac_ext <<_ACEOF
1993 #ifndef __cplusplus
1994   choke me
1995 #endif
1996 _ACEOF
1997 rm -f conftest.$ac_objext
1998 if { (eval echo "$as_me:1998: \"$ac_compile\"") >&5
1999   (eval $ac_compile) 2>&5
2000   ac_status=$?
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit $ac_status); } &&
2003          { ac_try='test -s conftest.$ac_objext'
2004   { (eval echo "$as_me:2004: \"$ac_try\"") >&5
2005   (eval $ac_try) 2>&5
2006   ac_status=$?
2007   echo "$as_me:2007: \$? = $ac_status" >&5
2008   (exit $ac_status); }; }; then
2009   for ac_declaration in \
2010    ''\
2011    '#include <stdlib.h>' \
2012    'extern "C" void std::exit (int) throw (); using std::exit;' \
2013    'extern "C" void std::exit (int); using std::exit;' \
2014    'extern "C" void exit (int) throw ();' \
2015    'extern "C" void exit (int);' \
2016    'void exit (int);'
2017 do
2018   cat >conftest.$ac_ext <<_ACEOF
2019 #line 2019 "configure"
2020 #include "confdefs.h"
2021 #include <stdlib.h>
2022 $ac_declaration
2023 int
2024 main (void)
2025 {
2026 exit (42);
2027   ;
2028   return 0;
2029 }
2030 _ACEOF
2031 rm -f conftest.$ac_objext
2032 if { (eval echo "$as_me:2032: \"$ac_compile\"") >&5
2033   (eval $ac_compile) 2>&5
2034   ac_status=$?
2035   echo "$as_me:2035: \$? = $ac_status" >&5
2036   (exit $ac_status); } &&
2037          { ac_try='test -s conftest.$ac_objext'
2038   { (eval echo "$as_me:2038: \"$ac_try\"") >&5
2039   (eval $ac_try) 2>&5
2040   ac_status=$?
2041   echo "$as_me:2041: \$? = $ac_status" >&5
2042   (exit $ac_status); }; }; then
2043   :
2044 else
2045   echo "$as_me: failed program was:" >&5
2046 cat conftest.$ac_ext >&5
2047 continue
2048 fi
2049 rm -f conftest.$ac_objext conftest.$ac_ext
2050   cat >conftest.$ac_ext <<_ACEOF
2051 #line 2051 "configure"
2052 #include "confdefs.h"
2053 $ac_declaration
2054 int
2055 main (void)
2056 {
2057 exit (42);
2058   ;
2059   return 0;
2060 }
2061 _ACEOF
2062 rm -f conftest.$ac_objext
2063 if { (eval echo "$as_me:2063: \"$ac_compile\"") >&5
2064   (eval $ac_compile) 2>&5
2065   ac_status=$?
2066   echo "$as_me:2066: \$? = $ac_status" >&5
2067   (exit $ac_status); } &&
2068          { ac_try='test -s conftest.$ac_objext'
2069   { (eval echo "$as_me:2069: \"$ac_try\"") >&5
2070   (eval $ac_try) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit $ac_status); }; }; then
2074   break
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 done
2081 rm -rf conftest*
2082 if test -n "$ac_declaration"; then
2083   echo '#ifdef __cplusplus' >>confdefs.h
2084   echo $ac_declaration      >>confdefs.h
2085   echo '#endif'             >>confdefs.h
2086 fi
2087
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 fi
2092 rm -f conftest.$ac_objext conftest.$ac_ext
2093 ac_ext=c
2094 ac_cpp='$CPP $CPPFLAGS'
2095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098 ac_main_return=return
2099
2100 GCC_VERSION=none
2101 if test "$GCC" = yes ; then
2102         echo "$as_me:2102: checking version of $CC" >&5
2103 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2104         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.].*//'`"
2105         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2106         echo "$as_me:2106: result: $GCC_VERSION" >&5
2107 echo "${ECHO_T}$GCC_VERSION" >&6
2108 fi
2109
2110 echo "$as_me:2110: checking for $CC option to accept ANSI C" >&5
2111 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2112 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2113   echo $ECHO_N "(cached) $ECHO_C" >&6
2114 else
2115   ac_cv_prog_cc_stdc=no
2116 ac_save_CC=$CC
2117 cat >conftest.$ac_ext <<_ACEOF
2118 #line 2118 "configure"
2119 #include "confdefs.h"
2120 #include <stdarg.h>
2121 #include <stdio.h>
2122 #include <sys/types.h>
2123 #include <sys/stat.h>
2124 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2125 struct buf { int x; };
2126 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2127 static char *e (p, i)
2128      char **p;
2129      int i;
2130 {
2131   return p[i];
2132 }
2133 static char *f (char * (*g) (char **, int), char **p, ...)
2134 {
2135   char *s;
2136   va_list v;
2137   va_start (v,p);
2138   s = g (p, va_arg (v,int));
2139   va_end (v);
2140   return s;
2141 }
2142 int test (int i, double x);
2143 struct s1 {int (*f) (int a);};
2144 struct s2 {int (*f) (double a);};
2145 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2146 int argc;
2147 char **argv;
2148 int
2149 main (void)
2150 {
2151 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2152   ;
2153   return 0;
2154 }
2155 _ACEOF
2156 # Don't try gcc -ansi; that turns off useful extensions and
2157 # breaks some systems' header files.
2158 # AIX                   -qlanglvl=ansi
2159 # Ultrix and OSF/1      -std1
2160 # HP-UX 10.20 and later -Ae
2161 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2162 # SVR4                  -Xc -D__EXTENSIONS__
2163 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2164 do
2165   CC="$ac_save_CC $ac_arg"
2166   rm -f conftest.$ac_objext
2167 if { (eval echo "$as_me:2167: \"$ac_compile\"") >&5
2168   (eval $ac_compile) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit $ac_status); } &&
2172          { ac_try='test -s conftest.$ac_objext'
2173   { (eval echo "$as_me:2173: \"$ac_try\"") >&5
2174   (eval $ac_try) 2>&5
2175   ac_status=$?
2176   echo "$as_me:2176: \$? = $ac_status" >&5
2177   (exit $ac_status); }; }; then
2178   ac_cv_prog_cc_stdc=$ac_arg
2179 break
2180 else
2181   echo "$as_me: failed program was:" >&5
2182 cat conftest.$ac_ext >&5
2183 fi
2184 rm -f conftest.$ac_objext
2185 done
2186 rm -f conftest.$ac_ext conftest.$ac_objext
2187 CC=$ac_save_CC
2188
2189 fi
2190
2191 case "x$ac_cv_prog_cc_stdc" in
2192   x|xno)
2193     echo "$as_me:2193: result: none needed" >&5
2194 echo "${ECHO_T}none needed" >&6 ;;
2195   *)
2196     echo "$as_me:2196: result: $ac_cv_prog_cc_stdc" >&5
2197 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2198     CC="$CC $ac_cv_prog_cc_stdc" ;;
2199 esac
2200
2201 # This should have been defined by AC_PROG_CC
2202 : ${CC:=cc}
2203
2204 echo "$as_me:2204: checking \$CFLAGS variable" >&5
2205 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2206 case "x$CFLAGS" in
2207 (*-[IUD]*)
2208         echo "$as_me:2208: result: broken" >&5
2209 echo "${ECHO_T}broken" >&6
2210         { echo "$as_me:2210: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2211 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2212         cf_flags="$CFLAGS"
2213         CFLAGS=
2214         for cf_arg in $cf_flags
2215         do
2216
2217 cf_fix_cppflags=no
2218 cf_new_cflags=
2219 cf_new_cppflags=
2220 cf_new_extra_cppflags=
2221
2222 for cf_add_cflags in $cf_arg
2223 do
2224 case $cf_fix_cppflags in
2225 (no)
2226         case $cf_add_cflags in
2227         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2228                 case $cf_add_cflags in
2229                 (-D*)
2230                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2231
2232                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2233                                 && test -z "${cf_tst_cflags}" \
2234                                 && cf_fix_cppflags=yes
2235
2236                         if test $cf_fix_cppflags = yes ; then
2237
2238         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2239         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2240
2241                                 continue
2242                         elif test "${cf_tst_cflags}" = "\"'" ; then
2243
2244         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2245         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2246
2247                                 continue
2248                         fi
2249                         ;;
2250                 esac
2251                 case "$CPPFLAGS" in
2252                 (*$cf_add_cflags)
2253                         ;;
2254                 (*)
2255                         case $cf_add_cflags in
2256                         (-D*)
2257                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2258
2259 CPPFLAGS=`echo "$CPPFLAGS" | \
2260         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2261                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2262
2263                                 ;;
2264                         esac
2265
2266         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2267         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2268
2269                         ;;
2270                 esac
2271                 ;;
2272         (*)
2273
2274         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2275         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2276
2277                 ;;
2278         esac
2279         ;;
2280 (yes)
2281
2282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2284
2285         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2286
2287         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2288                 && test -z "${cf_tst_cflags}" \
2289                 && cf_fix_cppflags=no
2290         ;;
2291 esac
2292 done
2293
2294 if test -n "$cf_new_cflags" ; then
2295
2296         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2297         CFLAGS="${CFLAGS}$cf_new_cflags"
2298
2299 fi
2300
2301 if test -n "$cf_new_cppflags" ; then
2302
2303         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2304         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2305
2306 fi
2307
2308 if test -n "$cf_new_extra_cppflags" ; then
2309
2310         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2311         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2312
2313 fi
2314
2315         done
2316         ;;
2317 (*)
2318         echo "$as_me:2318: result: ok" >&5
2319 echo "${ECHO_T}ok" >&6
2320         ;;
2321 esac
2322
2323 echo "$as_me:2323: checking \$CC variable" >&5
2324 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2325 case "$CC" in
2326 (*[\ \  ]-*)
2327         echo "$as_me:2327: result: broken" >&5
2328 echo "${ECHO_T}broken" >&6
2329         { echo "$as_me:2329: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2330 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2331         # humor him...
2332         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2333         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2334         CC="$cf_prog"
2335         for cf_arg in $cf_flags
2336         do
2337                 case "x$cf_arg" in
2338                 (x-[IUDfgOW]*)
2339
2340 cf_fix_cppflags=no
2341 cf_new_cflags=
2342 cf_new_cppflags=
2343 cf_new_extra_cppflags=
2344
2345 for cf_add_cflags in $cf_arg
2346 do
2347 case $cf_fix_cppflags in
2348 (no)
2349         case $cf_add_cflags in
2350         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2351                 case $cf_add_cflags in
2352                 (-D*)
2353                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2354
2355                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2356                                 && test -z "${cf_tst_cflags}" \
2357                                 && cf_fix_cppflags=yes
2358
2359                         if test $cf_fix_cppflags = yes ; then
2360
2361         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2362         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2363
2364                                 continue
2365                         elif test "${cf_tst_cflags}" = "\"'" ; then
2366
2367         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2368         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2369
2370                                 continue
2371                         fi
2372                         ;;
2373                 esac
2374                 case "$CPPFLAGS" in
2375                 (*$cf_add_cflags)
2376                         ;;
2377                 (*)
2378                         case $cf_add_cflags in
2379                         (-D*)
2380                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2381
2382 CPPFLAGS=`echo "$CPPFLAGS" | \
2383         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2384                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2385
2386                                 ;;
2387                         esac
2388
2389         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2390         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2391
2392                         ;;
2393                 esac
2394                 ;;
2395         (*)
2396
2397         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2398         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2399
2400                 ;;
2401         esac
2402         ;;
2403 (yes)
2404
2405         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2406         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2407
2408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2409
2410         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2411                 && test -z "${cf_tst_cflags}" \
2412                 && cf_fix_cppflags=no
2413         ;;
2414 esac
2415 done
2416
2417 if test -n "$cf_new_cflags" ; then
2418
2419         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2420         CFLAGS="${CFLAGS}$cf_new_cflags"
2421
2422 fi
2423
2424 if test -n "$cf_new_cppflags" ; then
2425
2426         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2427         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2428
2429 fi
2430
2431 if test -n "$cf_new_extra_cppflags" ; then
2432
2433         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2434         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2435
2436 fi
2437
2438                         ;;
2439                 (*)
2440                         CC="$CC $cf_arg"
2441                         ;;
2442                 esac
2443         done
2444         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2445
2446 echo "${as_me:-configure}:2446: testing resulting CC: '$CC' ..." 1>&5
2447
2448         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2449
2450 echo "${as_me:-configure}:2450: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2451
2452         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2453
2454 echo "${as_me:-configure}:2454: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2455
2456         ;;
2457 (*)
2458         echo "$as_me:2458: result: ok" >&5
2459 echo "${ECHO_T}ok" >&6
2460         ;;
2461 esac
2462
2463 ac_ext=c
2464 ac_cpp='$CPP $CPPFLAGS'
2465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2468 ac_main_return=return
2469 echo "$as_me:2469: checking how to run the C preprocessor" >&5
2470 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2471 # On Suns, sometimes $CPP names a directory.
2472 if test -n "$CPP" && test -d "$CPP"; then
2473   CPP=
2474 fi
2475 if test -z "$CPP"; then
2476   if test "${ac_cv_prog_CPP+set}" = set; then
2477   echo $ECHO_N "(cached) $ECHO_C" >&6
2478 else
2479       # Double quotes because CPP needs to be expanded
2480     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2481     do
2482       ac_preproc_ok=false
2483 for ac_c_preproc_warn_flag in '' yes
2484 do
2485   # Use a header file that comes with gcc, so configuring glibc
2486   # with a fresh cross-compiler works.
2487   # On the NeXT, cc -E runs the code through the compiler's parser,
2488   # not just through cpp. "Syntax error" is here to catch this case.
2489   cat >conftest.$ac_ext <<_ACEOF
2490 #line 2490 "configure"
2491 #include "confdefs.h"
2492 #include <assert.h>
2493                      Syntax error
2494 _ACEOF
2495 if { (eval echo "$as_me:2495: \"$ac_cpp conftest.$ac_ext\"") >&5
2496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2497   ac_status=$?
2498   egrep -v '^ *\+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:2501: \$? = $ac_status" >&5
2502   (exit $ac_status); } >/dev/null; then
2503   if test -s conftest.err; then
2504     ac_cpp_err=$ac_c_preproc_warn_flag
2505   else
2506     ac_cpp_err=
2507   fi
2508 else
2509   ac_cpp_err=yes
2510 fi
2511 if test -z "$ac_cpp_err"; then
2512   :
2513 else
2514   echo "$as_me: failed program was:" >&5
2515   cat conftest.$ac_ext >&5
2516   # Broken: fails on valid input.
2517 continue
2518 fi
2519 rm -f conftest.err conftest.$ac_ext
2520
2521   # OK, works on sane cases.  Now check whether non-existent headers
2522   # can be detected and how.
2523   cat >conftest.$ac_ext <<_ACEOF
2524 #line 2524 "configure"
2525 #include "confdefs.h"
2526 #include <ac_nonexistent.h>
2527 _ACEOF
2528 if { (eval echo "$as_me:2528: \"$ac_cpp conftest.$ac_ext\"") >&5
2529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2530   ac_status=$?
2531   egrep -v '^ *\+' conftest.er1 >conftest.err
2532   rm -f conftest.er1
2533   cat conftest.err >&5
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit $ac_status); } >/dev/null; then
2536   if test -s conftest.err; then
2537     ac_cpp_err=$ac_c_preproc_warn_flag
2538   else
2539     ac_cpp_err=
2540   fi
2541 else
2542   ac_cpp_err=yes
2543 fi
2544 if test -z "$ac_cpp_err"; then
2545   # Broken: success on invalid input.
2546 continue
2547 else
2548   echo "$as_me: failed program was:" >&5
2549   cat conftest.$ac_ext >&5
2550   # Passes both tests.
2551 ac_preproc_ok=:
2552 break
2553 fi
2554 rm -f conftest.err conftest.$ac_ext
2555
2556 done
2557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2558 rm -f conftest.err conftest.$ac_ext
2559 if $ac_preproc_ok; then
2560   break
2561 fi
2562
2563     done
2564     ac_cv_prog_CPP=$CPP
2565
2566 fi
2567   CPP=$ac_cv_prog_CPP
2568 else
2569   ac_cv_prog_CPP=$CPP
2570 fi
2571 echo "$as_me:2571: result: $CPP" >&5
2572 echo "${ECHO_T}$CPP" >&6
2573 ac_preproc_ok=false
2574 for ac_c_preproc_warn_flag in '' yes
2575 do
2576   # Use a header file that comes with gcc, so configuring glibc
2577   # with a fresh cross-compiler works.
2578   # On the NeXT, cc -E runs the code through the compiler's parser,
2579   # not just through cpp. "Syntax error" is here to catch this case.
2580   cat >conftest.$ac_ext <<_ACEOF
2581 #line 2581 "configure"
2582 #include "confdefs.h"
2583 #include <assert.h>
2584                      Syntax error
2585 _ACEOF
2586 if { (eval echo "$as_me:2586: \"$ac_cpp conftest.$ac_ext\"") >&5
2587   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2588   ac_status=$?
2589   egrep -v '^ *\+' conftest.er1 >conftest.err
2590   rm -f conftest.er1
2591   cat conftest.err >&5
2592   echo "$as_me:2592: \$? = $ac_status" >&5
2593   (exit $ac_status); } >/dev/null; then
2594   if test -s conftest.err; then
2595     ac_cpp_err=$ac_c_preproc_warn_flag
2596   else
2597     ac_cpp_err=
2598   fi
2599 else
2600   ac_cpp_err=yes
2601 fi
2602 if test -z "$ac_cpp_err"; then
2603   :
2604 else
2605   echo "$as_me: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   # Broken: fails on valid input.
2608 continue
2609 fi
2610 rm -f conftest.err conftest.$ac_ext
2611
2612   # OK, works on sane cases.  Now check whether non-existent headers
2613   # can be detected and how.
2614   cat >conftest.$ac_ext <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2618 _ACEOF
2619 if { (eval echo "$as_me:2619: \"$ac_cpp conftest.$ac_ext\"") >&5
2620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2621   ac_status=$?
2622   egrep -v '^ *\+' conftest.er1 >conftest.err
2623   rm -f conftest.er1
2624   cat conftest.err >&5
2625   echo "$as_me:2625: \$? = $ac_status" >&5
2626   (exit $ac_status); } >/dev/null; then
2627   if test -s conftest.err; then
2628     ac_cpp_err=$ac_c_preproc_warn_flag
2629   else
2630     ac_cpp_err=
2631   fi
2632 else
2633   ac_cpp_err=yes
2634 fi
2635 if test -z "$ac_cpp_err"; then
2636   # Broken: success on invalid input.
2637 continue
2638 else
2639   echo "$as_me: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   # Passes both tests.
2642 ac_preproc_ok=:
2643 break
2644 fi
2645 rm -f conftest.err conftest.$ac_ext
2646
2647 done
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err conftest.$ac_ext
2650 if $ac_preproc_ok; then
2651   :
2652 else
2653   { { echo "$as_me:2653: error: C preprocessor \"$CPP\" fails sanity check" >&5
2654 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2655    { (exit 1); exit 1; }; }
2656 fi
2657
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663 ac_main_return=return
2664
2665 if test $ac_cv_c_compiler_gnu = yes; then
2666     echo "$as_me:2666: checking whether $CC needs -traditional" >&5
2667 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2668 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2669   echo $ECHO_N "(cached) $ECHO_C" >&6
2670 else
2671     ac_pattern="Autoconf.*'x'"
2672   cat >conftest.$ac_ext <<_ACEOF
2673 #line 2673 "configure"
2674 #include "confdefs.h"
2675 #include <sgtty.h>
2676 int Autoconf = TIOCGETP;
2677 _ACEOF
2678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2679   egrep "$ac_pattern" >/dev/null 2>&1; then
2680   ac_cv_prog_gcc_traditional=yes
2681 else
2682   ac_cv_prog_gcc_traditional=no
2683 fi
2684 rm -rf conftest*
2685
2686   if test $ac_cv_prog_gcc_traditional = no; then
2687     cat >conftest.$ac_ext <<_ACEOF
2688 #line 2688 "configure"
2689 #include "confdefs.h"
2690 #include <termio.h>
2691 int Autoconf = TCGETA;
2692 _ACEOF
2693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2694   egrep "$ac_pattern" >/dev/null 2>&1; then
2695   ac_cv_prog_gcc_traditional=yes
2696 fi
2697 rm -rf conftest*
2698
2699   fi
2700 fi
2701 echo "$as_me:2701: result: $ac_cv_prog_gcc_traditional" >&5
2702 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2703   if test $ac_cv_prog_gcc_traditional = yes; then
2704     CC="$CC -traditional"
2705   fi
2706 fi
2707
2708 echo "$as_me:2708: checking whether $CC understands -c and -o together" >&5
2709 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2710 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2711   echo $ECHO_N "(cached) $ECHO_C" >&6
2712 else
2713
2714 cat > conftest.$ac_ext <<CF_EOF
2715 int main(void)
2716 {
2717         ${cf_cv_main_return:-return}(0);
2718 }
2719 CF_EOF
2720 # We do the test twice because some compilers refuse to overwrite an
2721 # existing .o file with -o, though they will create one.
2722 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2723 if { (eval echo "$as_me:2723: \"$ac_try\"") >&5
2724   (eval $ac_try) 2>&5
2725   ac_status=$?
2726   echo "$as_me:2726: \$? = $ac_status" >&5
2727   (exit $ac_status); } &&
2728   test -f conftest2.$ac_objext && { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); };
2733 then
2734   eval cf_cv_prog_CC_c_o=yes
2735 else
2736   eval cf_cv_prog_CC_c_o=no
2737 fi
2738 rm -rf conftest*
2739
2740 fi
2741 if test $cf_cv_prog_CC_c_o = yes; then
2742   echo "$as_me:2742: result: yes" >&5
2743 echo "${ECHO_T}yes" >&6
2744 else
2745   echo "$as_me:2745: result: no" >&5
2746 echo "${ECHO_T}no" >&6
2747 fi
2748
2749 if test "$cross_compiling" = yes ; then
2750         LDCONFIG=:
2751 else
2752         case "$cf_cv_system_name" in
2753         (dragonfly*|mirbsd*|freebsd*)
2754                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2755                 ;;
2756         (*) LDPATH=$PATH:/sbin:/usr/sbin
2757                 # Extract the first word of "ldconfig", so it can be a program name with args.
2758 set dummy ldconfig; ac_word=$2
2759 echo "$as_me:2759: checking for $ac_word" >&5
2760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2761 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2762   echo $ECHO_N "(cached) $ECHO_C" >&6
2763 else
2764   case $LDCONFIG in
2765   [\\/]* | ?:[\\/]*)
2766   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2767   ;;
2768   *)
2769   ac_save_IFS=$IFS; IFS=$ac_path_separator
2770 ac_dummy="$LDPATH"
2771 for ac_dir in $ac_dummy; do
2772   IFS=$ac_save_IFS
2773   test -z "$ac_dir" && ac_dir=.
2774   if $as_executable_p "$ac_dir/$ac_word"; then
2775    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2776    echo "$as_me:2776: found $ac_dir/$ac_word" >&5
2777    break
2778 fi
2779 done
2780
2781   ;;
2782 esac
2783 fi
2784 LDCONFIG=$ac_cv_path_LDCONFIG
2785
2786 if test -n "$LDCONFIG"; then
2787   echo "$as_me:2787: result: $LDCONFIG" >&5
2788 echo "${ECHO_T}$LDCONFIG" >&6
2789 else
2790   echo "$as_me:2790: result: no" >&5
2791 echo "${ECHO_T}no" >&6
2792 fi
2793
2794                 ;;
2795         esac
2796 fi
2797
2798 echo "$as_me:2798: checking if you want to ensure bool is consistent with C++" >&5
2799 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2800
2801 # Check whether --with-cxx or --without-cxx was given.
2802 if test "${with_cxx+set}" = set; then
2803   withval="$with_cxx"
2804   cf_with_cxx=$withval
2805 else
2806   cf_with_cxx=yes
2807 fi;
2808 echo "$as_me:2808: result: $cf_with_cxx" >&5
2809 echo "${ECHO_T}$cf_with_cxx" >&6
2810 if test "X$cf_with_cxx" = Xno ; then
2811         CXX=""
2812         GXX=""
2813 else
2814         # with autoconf 2.13, we can change the error to a warning:
2815                 ac_ext=cc
2816 ac_cpp='$CXXCPP $CPPFLAGS'
2817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2820 ac_main_return=return
2821 if test -n "$ac_tool_prefix"; then
2822   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2823   do
2824     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2826 echo "$as_me:2826: checking for $ac_word" >&5
2827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2828 if test "${ac_cv_prog_CXX+set}" = set; then
2829   echo $ECHO_N "(cached) $ECHO_C" >&6
2830 else
2831   if test -n "$CXX"; then
2832   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2833 else
2834   ac_save_IFS=$IFS; IFS=$ac_path_separator
2835 ac_dummy="$PATH"
2836 for ac_dir in $ac_dummy; do
2837   IFS=$ac_save_IFS
2838   test -z "$ac_dir" && ac_dir=.
2839   $as_executable_p "$ac_dir/$ac_word" || continue
2840 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2841 echo "$as_me:2841: found $ac_dir/$ac_word" >&5
2842 break
2843 done
2844
2845 fi
2846 fi
2847 CXX=$ac_cv_prog_CXX
2848 if test -n "$CXX"; then
2849   echo "$as_me:2849: result: $CXX" >&5
2850 echo "${ECHO_T}$CXX" >&6
2851 else
2852   echo "$as_me:2852: result: no" >&5
2853 echo "${ECHO_T}no" >&6
2854 fi
2855
2856     test -n "$CXX" && break
2857   done
2858 fi
2859 if test -z "$CXX"; then
2860   ac_ct_CXX=$CXX
2861   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2862 do
2863   # Extract the first word of "$ac_prog", so it can be a program name with args.
2864 set dummy $ac_prog; 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_prog_ac_ct_CXX+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870   if test -n "$ac_ct_CXX"; then
2871   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2872 else
2873   ac_save_IFS=$IFS; IFS=$ac_path_separator
2874 ac_dummy="$PATH"
2875 for ac_dir in $ac_dummy; do
2876   IFS=$ac_save_IFS
2877   test -z "$ac_dir" && ac_dir=.
2878   $as_executable_p "$ac_dir/$ac_word" || continue
2879 ac_cv_prog_ac_ct_CXX="$ac_prog"
2880 echo "$as_me:2880: found $ac_dir/$ac_word" >&5
2881 break
2882 done
2883
2884 fi
2885 fi
2886 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2887 if test -n "$ac_ct_CXX"; then
2888   echo "$as_me:2888: result: $ac_ct_CXX" >&5
2889 echo "${ECHO_T}$ac_ct_CXX" >&6
2890 else
2891   echo "$as_me:2891: result: no" >&5
2892 echo "${ECHO_T}no" >&6
2893 fi
2894
2895   test -n "$ac_ct_CXX" && break
2896 done
2897 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2898
2899   CXX=$ac_ct_CXX
2900 fi
2901
2902 # Provide some information about the compiler.
2903 echo "$as_me:2903:" \
2904      "checking for C++ compiler version" >&5
2905 ac_compiler=`set X $ac_compile; echo $2`
2906 { (eval echo "$as_me:2906: \"$ac_compiler --version </dev/null >&5\"") >&5
2907   (eval $ac_compiler --version </dev/null >&5) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); }
2911 { (eval echo "$as_me:2911: \"$ac_compiler -v </dev/null >&5\"") >&5
2912   (eval $ac_compiler -v </dev/null >&5) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); }
2916 { (eval echo "$as_me:2916: \"$ac_compiler -V </dev/null >&5\"") >&5
2917   (eval $ac_compiler -V </dev/null >&5) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); }
2921
2922 echo "$as_me:2922: checking whether we are using the GNU C++ compiler" >&5
2923 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2924 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2925   echo $ECHO_N "(cached) $ECHO_C" >&6
2926 else
2927   cat >conftest.$ac_ext <<_ACEOF
2928 #line 2928 "configure"
2929 #include "confdefs.h"
2930
2931 int
2932 main (void)
2933 {
2934 #ifndef __GNUC__
2935        choke me
2936 #endif
2937
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:2943: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>&5
2945   ac_status=$?
2946   echo "$as_me:2946: \$? = $ac_status" >&5
2947   (exit $ac_status); } &&
2948          { ac_try='test -s conftest.$ac_objext'
2949   { (eval echo "$as_me:2949: \"$ac_try\"") >&5
2950   (eval $ac_try) 2>&5
2951   ac_status=$?
2952   echo "$as_me:2952: \$? = $ac_status" >&5
2953   (exit $ac_status); }; }; then
2954   ac_compiler_gnu=yes
2955 else
2956   echo "$as_me: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 ac_compiler_gnu=no
2959 fi
2960 rm -f conftest.$ac_objext conftest.$ac_ext
2961 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2962
2963 fi
2964 echo "$as_me:2964: result: $ac_cv_cxx_compiler_gnu" >&5
2965 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2966 GXX=`test $ac_compiler_gnu = yes && echo yes`
2967 ac_test_CXXFLAGS=${CXXFLAGS+set}
2968 ac_save_CXXFLAGS=$CXXFLAGS
2969 CXXFLAGS="-g"
2970 echo "$as_me:2970: checking whether $CXX accepts -g" >&5
2971 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2972 if test "${ac_cv_prog_cxx_g+set}" = set; then
2973   echo $ECHO_N "(cached) $ECHO_C" >&6
2974 else
2975   cat >conftest.$ac_ext <<_ACEOF
2976 #line 2976 "configure"
2977 #include "confdefs.h"
2978
2979 int
2980 main (void)
2981 {
2982
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   ac_cv_prog_cxx_g=yes
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 ac_cv_prog_cxx_g=no
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006 fi
3007 echo "$as_me:3007: result: $ac_cv_prog_cxx_g" >&5
3008 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3009 if test "$ac_test_CXXFLAGS" = set; then
3010   CXXFLAGS=$ac_save_CXXFLAGS
3011 elif test $ac_cv_prog_cxx_g = yes; then
3012   if test "$GXX" = yes; then
3013     CXXFLAGS="-g -O2"
3014   else
3015     CXXFLAGS="-g"
3016   fi
3017 else
3018   if test "$GXX" = yes; then
3019     CXXFLAGS="-O2"
3020   else
3021     CXXFLAGS=
3022   fi
3023 fi
3024 for ac_declaration in \
3025    ''\
3026    '#include <stdlib.h>' \
3027    'extern "C" void std::exit (int) throw (); using std::exit;' \
3028    'extern "C" void std::exit (int); using std::exit;' \
3029    'extern "C" void exit (int) throw ();' \
3030    'extern "C" void exit (int);' \
3031    'void exit (int);'
3032 do
3033   cat >conftest.$ac_ext <<_ACEOF
3034 #line 3034 "configure"
3035 #include "confdefs.h"
3036 #include <stdlib.h>
3037 $ac_declaration
3038 int
3039 main (void)
3040 {
3041 exit (42);
3042   ;
3043   return 0;
3044 }
3045 _ACEOF
3046 rm -f conftest.$ac_objext
3047 if { (eval echo "$as_me:3047: \"$ac_compile\"") >&5
3048   (eval $ac_compile) 2>&5
3049   ac_status=$?
3050   echo "$as_me:3050: \$? = $ac_status" >&5
3051   (exit $ac_status); } &&
3052          { ac_try='test -s conftest.$ac_objext'
3053   { (eval echo "$as_me:3053: \"$ac_try\"") >&5
3054   (eval $ac_try) 2>&5
3055   ac_status=$?
3056   echo "$as_me:3056: \$? = $ac_status" >&5
3057   (exit $ac_status); }; }; then
3058   :
3059 else
3060   echo "$as_me: failed program was:" >&5
3061 cat conftest.$ac_ext >&5
3062 continue
3063 fi
3064 rm -f conftest.$ac_objext conftest.$ac_ext
3065   cat >conftest.$ac_ext <<_ACEOF
3066 #line 3066 "configure"
3067 #include "confdefs.h"
3068 $ac_declaration
3069 int
3070 main (void)
3071 {
3072 exit (42);
3073   ;
3074   return 0;
3075 }
3076 _ACEOF
3077 rm -f conftest.$ac_objext
3078 if { (eval echo "$as_me:3078: \"$ac_compile\"") >&5
3079   (eval $ac_compile) 2>&5
3080   ac_status=$?
3081   echo "$as_me:3081: \$? = $ac_status" >&5
3082   (exit $ac_status); } &&
3083          { ac_try='test -s conftest.$ac_objext'
3084   { (eval echo "$as_me:3084: \"$ac_try\"") >&5
3085   (eval $ac_try) 2>&5
3086   ac_status=$?
3087   echo "$as_me:3087: \$? = $ac_status" >&5
3088   (exit $ac_status); }; }; then
3089   break
3090 else
3091   echo "$as_me: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 fi
3094 rm -f conftest.$ac_objext conftest.$ac_ext
3095 done
3096 rm -rf conftest*
3097 if test -n "$ac_declaration"; then
3098   echo '#ifdef __cplusplus' >>confdefs.h
3099   echo $ac_declaration      >>confdefs.h
3100   echo '#endif'             >>confdefs.h
3101 fi
3102
3103 ac_ext=c
3104 ac_cpp='$CPP $CPPFLAGS'
3105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3108 ac_main_return=return
3109
3110         ac_ext=cc
3111 ac_cpp='$CXXCPP $CPPFLAGS'
3112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3115 ac_main_return=return
3116
3117         if test "x$cf_with_cxx" != xno
3118         then
3119                 # Several of the C++ configurations do not work, particularly when
3120                 # cross-compiling (20140913 -TD)
3121                 echo "$as_me:3121: checking if $CXX works" >&5
3122 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3123
3124                 save_CPPFLAGS="$CPPFLAGS"
3125                 eval cf_includedir=${includedir}
3126                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3127
3128 cat >conftest.$ac_ext <<_ACEOF
3129 #line 3129 "configure"
3130 #include "confdefs.h"
3131
3132 #include <stdlib.h>
3133 #include <stdio.h>
3134
3135 int
3136 main (void)
3137 {
3138
3139                 printf("Hello world!\n")
3140
3141   ;
3142   return 0;
3143 }
3144 _ACEOF
3145 rm -f conftest.$ac_objext
3146 if { (eval echo "$as_me:3146: \"$ac_compile\"") >&5
3147   (eval $ac_compile) 2>&5
3148   ac_status=$?
3149   echo "$as_me:3149: \$? = $ac_status" >&5
3150   (exit $ac_status); } &&
3151          { ac_try='test -s conftest.$ac_objext'
3152   { (eval echo "$as_me:3152: \"$ac_try\"") >&5
3153   (eval $ac_try) 2>&5
3154   ac_status=$?
3155   echo "$as_me:3155: \$? = $ac_status" >&5
3156   (exit $ac_status); }; }; then
3157   cf_cxx_works=yes
3158 else
3159   echo "$as_me: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
3161 cf_cxx_works=no
3162 fi
3163 rm -f conftest.$ac_objext conftest.$ac_ext
3164                 CPPFLAGS="$save_CPPFLAGS"
3165
3166                 echo "$as_me:3166: result: $cf_cxx_works" >&5
3167 echo "${ECHO_T}$cf_cxx_works" >&6
3168                 if test "x$cf_cxx_works" = xno
3169                 then
3170                         { echo "$as_me:3170: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3171 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3172                         cf_with_cxx=no; CXX=""; GXX="";
3173                 fi
3174         fi
3175         ac_ext=c
3176 ac_cpp='$CPP $CPPFLAGS'
3177 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3178 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3179 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3180 ac_main_return=return
3181
3182         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3183         if test "$CXX" = "g++" ; then
3184                 # Extract the first word of "g++", so it can be a program name with args.
3185 set dummy g++; ac_word=$2
3186 echo "$as_me:3186: checking for $ac_word" >&5
3187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3188 if test "${ac_cv_path_CXX+set}" = set; then
3189   echo $ECHO_N "(cached) $ECHO_C" >&6
3190 else
3191   case $CXX in
3192   [\\/]* | ?:[\\/]*)
3193   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3194   ;;
3195   *)
3196   ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 ac_dummy="$PATH"
3198 for ac_dir in $ac_dummy; do
3199   IFS=$ac_save_IFS
3200   test -z "$ac_dir" && ac_dir=.
3201   if $as_executable_p "$ac_dir/$ac_word"; then
3202    ac_cv_path_CXX="$ac_dir/$ac_word"
3203    echo "$as_me:3203: found $ac_dir/$ac_word" >&5
3204    break
3205 fi
3206 done
3207
3208   ;;
3209 esac
3210 fi
3211 CXX=$ac_cv_path_CXX
3212
3213 if test -n "$CXX"; then
3214   echo "$as_me:3214: result: $CXX" >&5
3215 echo "${ECHO_T}$CXX" >&6
3216 else
3217   echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3219 fi
3220
3221         fi
3222         case "x$CXX" in
3223         (x|xg++)
3224                 { echo "$as_me:3224: WARNING: You don't have any C++ compiler, too bad" >&5
3225 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3226                 cf_with_cxx=no; CXX=""; GXX="";
3227                 ;;
3228         esac
3229 fi
3230
3231 GXX_VERSION=none
3232 if test "$GXX" = yes; then
3233         echo "$as_me:3233: checking version of ${CXX:-g++}" >&5
3234 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3235         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3236         if test -z "$GXX_VERSION"
3237         then
3238                 GXX_VERSION=unknown
3239                 GXX=no
3240         fi
3241         echo "$as_me:3241: result: $GXX_VERSION" >&5
3242 echo "${ECHO_T}$GXX_VERSION" >&6
3243 fi
3244
3245 case $GXX_VERSION in
3246 (1*|2.[0-6]*)
3247         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3248         # cf_cxx_library=no
3249         { echo "$as_me:3249: WARNING: templates do not work" >&5
3250 echo "$as_me: WARNING: templates do not work" >&2;}
3251         ;;
3252 esac
3253
3254 echo "$as_me:3254: checking if you want to build C++ binding and demo" >&5
3255 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3256
3257 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3258 if test "${with_cxx_binding+set}" = set; then
3259   withval="$with_cxx_binding"
3260   cf_with_cxx_binding=$withval
3261 else
3262   cf_with_cxx_binding=$cf_with_cxx
3263 fi;
3264 echo "$as_me:3264: result: $cf_with_cxx_binding" >&5
3265 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3266
3267 echo "$as_me:3267: checking if you want to build with Ada95" >&5
3268 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3269 echo "$as_me:3269: result: $cf_with_ada" >&5
3270 echo "${ECHO_T}$cf_with_ada" >&6
3271
3272 echo "$as_me:3272: checking if you want to install terminal database" >&5
3273 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3274
3275 # Check whether --enable-db-install or --disable-db-install was given.
3276 if test "${enable_db_install+set}" = set; then
3277   enableval="$enable_db_install"
3278   cf_with_db_install=$enableval
3279 else
3280   cf_with_db_install=yes
3281 fi;
3282 echo "$as_me:3282: result: $cf_with_db_install" >&5
3283 echo "${ECHO_T}$cf_with_db_install" >&6
3284
3285 echo "$as_me:3285: checking if you want to install manpages" >&5
3286 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3287
3288 # Check whether --with-manpages or --without-manpages was given.
3289 if test "${with_manpages+set}" = set; then
3290   withval="$with_manpages"
3291   cf_with_manpages=$withval
3292 else
3293   cf_with_manpages=yes
3294 fi;
3295 echo "$as_me:3295: result: $cf_with_manpages" >&5
3296 echo "${ECHO_T}$cf_with_manpages" >&6
3297
3298 echo "$as_me:3298: checking if you want to build programs such as tic" >&5
3299 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3300
3301 # Check whether --with-progs or --without-progs was given.
3302 if test "${with_progs+set}" = set; then
3303   withval="$with_progs"
3304   cf_with_progs=$withval
3305 else
3306   cf_with_progs=yes
3307 fi;
3308 echo "$as_me:3308: result: $cf_with_progs" >&5
3309 echo "${ECHO_T}$cf_with_progs" >&6
3310
3311 if test -f $srcdir/tack/tack.h; then
3312         if test "x$cross_compiling" = xyes ; then
3313                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3314
3315 echo "${as_me:-configure}:3315: testing ignoring tack because we are cross-compiling ..." 1>&5
3316
3317                 cf_with_tack=no
3318         else
3319                 echo "$as_me:3319: checking if you want to build the tack program" >&5
3320 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3321
3322 # Check whether --with-tack or --without-tack was given.
3323 if test "${with_tack+set}" = set; then
3324   withval="$with_tack"
3325   cf_with_tack=$withval
3326 else
3327   cf_with_tack=$cf_with_progs
3328 fi;
3329                 echo "$as_me:3329: result: $cf_with_tack" >&5
3330 echo "${ECHO_T}$cf_with_tack" >&6
3331         fi
3332 else
3333         cf_with_tack=no
3334 fi
3335
3336 echo "$as_me:3336: checking if you want to build test-programs" >&5
3337 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3338
3339 # Check whether --with-tests or --without-tests was given.
3340 if test "${with_tests+set}" = set; then
3341   withval="$with_tests"
3342   cf_with_tests=$withval
3343 else
3344   cf_with_tests=yes
3345 fi;
3346 echo "$as_me:3346: result: $cf_with_tests" >&5
3347 echo "${ECHO_T}$cf_with_tests" >&6
3348
3349 echo "$as_me:3349: checking if you wish to install curses.h" >&5
3350 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3351
3352 # Check whether --with-curses-h or --without-curses-h was given.
3353 if test "${with_curses_h+set}" = set; then
3354   withval="$with_curses_h"
3355   with_curses_h=$withval
3356 else
3357   with_curses_h=yes
3358 fi;
3359 echo "$as_me:3359: result: $with_curses_h" >&5
3360 echo "${ECHO_T}$with_curses_h" >&6
3361
3362 modules_to_build="ncurses"
3363 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3364 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3365 modules_to_build="$modules_to_build panel menu form"
3366
3367 test "$program_prefix" != NONE &&
3368   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3369 # Use a double $ so make ignores it.
3370 test "$program_suffix" != NONE &&
3371   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3372 # Double any \ or $.  echo might interpret backslashes.
3373 # By default was `s,x,x', remove it if useless.
3374 cat <<\_ACEOF >conftest.sed
3375 s/[\\$]/&&/g;s/;s,x,x,$//
3376 _ACEOF
3377 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3378 rm conftest.sed
3379
3380 for ac_prog in mawk gawk nawk awk
3381 do
3382   # Extract the first word of "$ac_prog", so it can be a program name with args.
3383 set dummy $ac_prog; ac_word=$2
3384 echo "$as_me:3384: checking for $ac_word" >&5
3385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3386 if test "${ac_cv_prog_AWK+set}" = set; then
3387   echo $ECHO_N "(cached) $ECHO_C" >&6
3388 else
3389   if test -n "$AWK"; then
3390   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3391 else
3392   ac_save_IFS=$IFS; IFS=$ac_path_separator
3393 ac_dummy="$PATH"
3394 for ac_dir in $ac_dummy; do
3395   IFS=$ac_save_IFS
3396   test -z "$ac_dir" && ac_dir=.
3397   $as_executable_p "$ac_dir/$ac_word" || continue
3398 ac_cv_prog_AWK="$ac_prog"
3399 echo "$as_me:3399: found $ac_dir/$ac_word" >&5
3400 break
3401 done
3402
3403 fi
3404 fi
3405 AWK=$ac_cv_prog_AWK
3406 if test -n "$AWK"; then
3407   echo "$as_me:3407: result: $AWK" >&5
3408 echo "${ECHO_T}$AWK" >&6
3409 else
3410   echo "$as_me:3410: result: no" >&5
3411 echo "${ECHO_T}no" >&6
3412 fi
3413
3414   test -n "$AWK" && break
3415 done
3416
3417 test -z "$AWK" && { { echo "$as_me:3417: error: No awk program found" >&5
3418 echo "$as_me: error: No awk program found" >&2;}
3419    { (exit 1); exit 1; }; }
3420
3421 echo "$as_me:3421: checking for egrep" >&5
3422 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3423 if test "${ac_cv_prog_egrep+set}" = set; then
3424   echo $ECHO_N "(cached) $ECHO_C" >&6
3425 else
3426   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3427                 then ac_cv_prog_egrep='grep -E'
3428                 else ac_cv_prog_egrep='egrep'
3429         fi
3430 fi
3431 echo "$as_me:3431: result: $ac_cv_prog_egrep" >&5
3432 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3433         EGREP=$ac_cv_prog_egrep
3434
3435         test -z "$EGREP" && { { echo "$as_me:3435: error: No egrep program found" >&5
3436 echo "$as_me: error: No egrep program found" >&2;}
3437    { (exit 1); exit 1; }; }
3438
3439 # Find a good install program.  We prefer a C program (faster),
3440 # so one script is as good as another.  But avoid the broken or
3441 # incompatible versions:
3442 # SysV /etc/install, /usr/sbin/install
3443 # SunOS /usr/etc/install
3444 # IRIX /sbin/install
3445 # AIX /bin/install
3446 # AmigaOS /C/install, which installs bootblocks on floppy discs
3447 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3448 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3449 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3450 # ./install, which can be erroneously created by make from ./install.sh.
3451 echo "$as_me:3451: checking for a BSD compatible install" >&5
3452 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3453 if test -z "$INSTALL"; then
3454 if test "${ac_cv_path_install+set}" = set; then
3455   echo $ECHO_N "(cached) $ECHO_C" >&6
3456 else
3457     ac_save_IFS=$IFS; IFS=$ac_path_separator
3458   for ac_dir in $PATH; do
3459     IFS=$ac_save_IFS
3460     # Account for people who put trailing slashes in PATH elements.
3461     case $ac_dir/ in
3462     / | ./ | .// | /cC/* \
3463     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3464     | /usr/ucb/* ) ;;
3465     *)
3466       # OSF1 and SCO ODT 3.0 have their own names for install.
3467       # Don't use installbsd from OSF since it installs stuff as root
3468       # by default.
3469       for ac_prog in ginstall scoinst install; do
3470         if $as_executable_p "$ac_dir/$ac_prog"; then
3471           if test $ac_prog = install &&
3472             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3473             # AIX install.  It has an incompatible calling convention.
3474             :
3475           elif test $ac_prog = install &&
3476             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3477             # program-specific install script used by HP pwplus--don't use.
3478             :
3479           else
3480             ac_cv_path_install="$ac_dir/$ac_prog -c"
3481             break 2
3482           fi
3483         fi
3484       done
3485       ;;
3486     esac
3487   done
3488
3489 fi
3490   if test "${ac_cv_path_install+set}" = set; then
3491     INSTALL=$ac_cv_path_install
3492   else
3493     # As a last resort, use the slow shell script.  We don't cache a
3494     # path for INSTALL within a source directory, because that will
3495     # break other packages using the cache if that directory is
3496     # removed, or if the path is relative.
3497     INSTALL=$ac_install_sh
3498   fi
3499 fi
3500 echo "$as_me:3500: result: $INSTALL" >&5
3501 echo "${ECHO_T}$INSTALL" >&6
3502
3503 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3504 # It thinks the first close brace ends the variable substitution.
3505 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3506
3507 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3508
3509 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3510
3511 case $INSTALL in
3512 (/*)
3513         ;;
3514 (*)
3515         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3516         test -z "$cf_dir" && cf_dir=.
3517         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3518         ;;
3519 esac
3520
3521 for ac_prog in lint cppcheck splint
3522 do
3523   # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_LINT+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   if test -n "$LINT"; then
3531   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3532 else
3533   ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   IFS=$ac_save_IFS
3537   test -z "$ac_dir" && ac_dir=.
3538   $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_LINT="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3541 break
3542 done
3543
3544 fi
3545 fi
3546 LINT=$ac_cv_prog_LINT
3547 if test -n "$LINT"; then
3548   echo "$as_me:3548: result: $LINT" >&5
3549 echo "${ECHO_T}$LINT" >&6
3550 else
3551   echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3553 fi
3554
3555   test -n "$LINT" && break
3556 done
3557
3558 echo "$as_me:3558: checking whether ln -s works" >&5
3559 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3560 LN_S=$as_ln_s
3561 if test "$LN_S" = "ln -s"; then
3562   echo "$as_me:3562: result: yes" >&5
3563 echo "${ECHO_T}yes" >&6
3564 else
3565   echo "$as_me:3565: result: no, using $LN_S" >&5
3566 echo "${ECHO_T}no, using $LN_S" >&6
3567 fi
3568
3569 echo "$as_me:3569: checking if $LN_S -f options work" >&5
3570 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3571
3572 rm -f conf$$.src conf$$dst
3573 echo >conf$$.dst
3574 echo first >conf$$.src
3575 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3576         cf_prog_ln_sf=yes
3577 else
3578         cf_prog_ln_sf=no
3579 fi
3580 rm -f conf$$.dst conf$$src
3581 echo "$as_me:3581: result: $cf_prog_ln_sf" >&5
3582 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3583
3584 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3585
3586 echo "$as_me:3586: checking for long file names" >&5
3587 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3588 if test "${ac_cv_sys_long_file_names+set}" = set; then
3589   echo $ECHO_N "(cached) $ECHO_C" >&6
3590 else
3591   ac_cv_sys_long_file_names=yes
3592 # Test for long file names in all the places we know might matter:
3593 #      .                the current directory, where building will happen
3594 #      $prefix/lib      where we will be installing things
3595 #      $exec_prefix/lib likewise
3596 # eval it to expand exec_prefix.
3597 #      $TMPDIR          if set, where it might want to write temporary files
3598 # if $TMPDIR is not set:
3599 #      /tmp             where it might want to write temporary files
3600 #      /var/tmp         likewise
3601 #      /usr/tmp         likewise
3602 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3603   ac_tmpdirs=$TMPDIR
3604 else
3605   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3606 fi
3607 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3608   test -d $ac_dir || continue
3609   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3610   ac_xdir=$ac_dir/cf$$
3611   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3612   ac_tf1=$ac_xdir/conftest9012345
3613   ac_tf2=$ac_xdir/conftest9012346
3614   (echo 1 >$ac_tf1) 2>/dev/null
3615   (echo 2 >$ac_tf2) 2>/dev/null
3616   ac_val=`cat $ac_tf1 2>/dev/null`
3617   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3618     ac_cv_sys_long_file_names=no
3619     rm -rf $ac_xdir 2>/dev/null
3620     break
3621   fi
3622   rm -rf $ac_xdir 2>/dev/null
3623 done
3624 fi
3625 echo "$as_me:3625: result: $ac_cv_sys_long_file_names" >&5
3626 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3627 if test $ac_cv_sys_long_file_names = yes; then
3628
3629 cat >>confdefs.h <<\EOF
3630 #define HAVE_LONG_FILE_NAMES 1
3631 EOF
3632
3633 fi
3634
3635 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3636 # of package conflict.
3637 cf_config_suffix=
3638
3639 # Check whether --with-config-suffix or --without-config-suffix was given.
3640 if test "${with_config_suffix+set}" = set; then
3641   withval="$with_config_suffix"
3642   case "x$withval" in
3643         (xyes|xno)
3644                 { echo "$as_me:3644: WARNING: expected a value for config-suffix option" >&5
3645 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3646                 ;;
3647         (*)     cf_config_suffix="$withval"
3648                 ;;
3649         esac
3650 fi;
3651
3652 # If we find pkg-config, check if we should install the ".pc" files.
3653
3654 echo "$as_me:3654: checking if you want to use pkg-config" >&5
3655 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3656
3657 # Check whether --with-pkg-config or --without-pkg-config was given.
3658 if test "${with_pkg_config+set}" = set; then
3659   withval="$with_pkg_config"
3660   cf_pkg_config=$withval
3661 else
3662   cf_pkg_config=yes
3663 fi;
3664 echo "$as_me:3664: result: $cf_pkg_config" >&5
3665 echo "${ECHO_T}$cf_pkg_config" >&6
3666
3667 case $cf_pkg_config in
3668 (no)
3669         PKG_CONFIG=none
3670         ;;
3671 (yes)
3672
3673 if test -n "$ac_tool_prefix"; then
3674   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3675 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3676 echo "$as_me:3676: checking for $ac_word" >&5
3677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3678 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3679   echo $ECHO_N "(cached) $ECHO_C" >&6
3680 else
3681   case $PKG_CONFIG in
3682   [\\/]* | ?:[\\/]*)
3683   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3684   ;;
3685   *)
3686   ac_save_IFS=$IFS; IFS=$ac_path_separator
3687 ac_dummy="$PATH"
3688 for ac_dir in $ac_dummy; do
3689   IFS=$ac_save_IFS
3690   test -z "$ac_dir" && ac_dir=.
3691   if $as_executable_p "$ac_dir/$ac_word"; then
3692    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3693    echo "$as_me:3693: found $ac_dir/$ac_word" >&5
3694    break
3695 fi
3696 done
3697
3698   ;;
3699 esac
3700 fi
3701 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3702
3703 if test -n "$PKG_CONFIG"; then
3704   echo "$as_me:3704: result: $PKG_CONFIG" >&5
3705 echo "${ECHO_T}$PKG_CONFIG" >&6
3706 else
3707   echo "$as_me:3707: result: no" >&5
3708 echo "${ECHO_T}no" >&6
3709 fi
3710
3711 fi
3712 if test -z "$ac_cv_path_PKG_CONFIG"; then
3713   ac_pt_PKG_CONFIG=$PKG_CONFIG
3714   # Extract the first word of "pkg-config", so it can be a program name with args.
3715 set dummy pkg-config; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3719   echo $ECHO_N "(cached) $ECHO_C" >&6
3720 else
3721   case $ac_pt_PKG_CONFIG in
3722   [\\/]* | ?:[\\/]*)
3723   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3724   ;;
3725   *)
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   if $as_executable_p "$ac_dir/$ac_word"; then
3732    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3733    echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734    break
3735 fi
3736 done
3737
3738   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3739   ;;
3740 esac
3741 fi
3742 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3743
3744 if test -n "$ac_pt_PKG_CONFIG"; then
3745   echo "$as_me:3745: result: $ac_pt_PKG_CONFIG" >&5
3746 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3747 else
3748   echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3750 fi
3751
3752   PKG_CONFIG=$ac_pt_PKG_CONFIG
3753 else
3754   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3755 fi
3756
3757         ;;
3758 (*)
3759         PKG_CONFIG=$withval
3760         ;;
3761 esac
3762
3763 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3764 if test "$PKG_CONFIG" != none ; then
3765
3766 if test "x$prefix" != xNONE; then
3767         cf_path_syntax="$prefix"
3768 else
3769         cf_path_syntax="$ac_default_prefix"
3770 fi
3771
3772 case ".$PKG_CONFIG" in
3773 (.\$\(*\)*|.\'*\'*)
3774         ;;
3775 (..|./*|.\\*)
3776         ;;
3777 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3778         ;;
3779 (.\${*prefix}*|.\${*dir}*)
3780         eval PKG_CONFIG="$PKG_CONFIG"
3781         case ".$PKG_CONFIG" in
3782         (.NONE/*)
3783                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3784                 ;;
3785         esac
3786         ;;
3787 (.no|.NONE/*)
3788         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3789         ;;
3790 (*)
3791         { { echo "$as_me:3791: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3792 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3793    { (exit 1); exit 1; }; }
3794         ;;
3795 esac
3796
3797 elif test "x$cf_pkg_config" != xno ; then
3798         { echo "$as_me:3798: WARNING: pkg-config is not installed" >&5
3799 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3800 fi
3801
3802 case $PKG_CONFIG in
3803 (no|none|yes)
3804         echo "$as_me:3804: checking for pkg-config library directory" >&5
3805 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3806         ;;
3807 (*)
3808         echo "$as_me:3808: checking for $PKG_CONFIG library directory" >&5
3809 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3810         ;;
3811 esac
3812
3813 PKG_CONFIG_LIBDIR=no
3814
3815 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3816 if test "${with_pkg_config_libdir+set}" = set; then
3817   withval="$with_pkg_config_libdir"
3818   PKG_CONFIG_LIBDIR=$withval
3819 else
3820   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3821 fi;
3822
3823 case x$PKG_CONFIG_LIBDIR in
3824 (x/*)
3825         ;;
3826 (xyes)
3827         # Look for the library directory using the same prefix as the executable
3828         if test "x$PKG_CONFIG" = xnone
3829         then
3830                 cf_path=$prefix
3831         else
3832                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3833         fi
3834
3835         # If you don't like using the default architecture, you have to specify the
3836         # intended library directory and corresponding compiler/linker options.
3837         #
3838         # This case allows for Debian's 2014-flavor of multiarch, along with the
3839         # most common variations before that point.  Some other variants spell the
3840         # directory differently, e.g., "pkg-config", and put it in unusual places.
3841         # pkg-config has always been poorly standardized, which is ironic...
3842         case x`(arch) 2>/dev/null` in
3843         (*64)
3844                 cf_search_path="\
3845                         $cf_path/lib/*64-linux-gnu \
3846                         $cf_path/share \
3847                         $cf_path/lib64 \
3848                         $cf_path/lib32 \
3849                         $cf_path/lib"
3850                 ;;
3851         (*)
3852                 cf_search_path="\
3853                         $cf_path/lib/*-linux-gnu \
3854                         $cf_path/share \
3855                         $cf_path/lib32 \
3856                         $cf_path/lib \
3857                         $cf_path/libdata"
3858                 ;;
3859         esac
3860
3861         test -n "$verbose" && echo "    list..." 1>&6
3862
3863 echo "${as_me:-configure}:3863: testing list... ..." 1>&5
3864
3865         for cf_config in $cf_search_path
3866         do
3867                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3868
3869 echo "${as_me:-configure}:3869: testing checking $cf_config/pkgconfig ..." 1>&5
3870
3871                 if test -d $cf_config/pkgconfig
3872                 then
3873                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3874                         echo "$as_me:3874: checking done" >&5
3875 echo $ECHO_N "checking done... $ECHO_C" >&6
3876                         break
3877                 fi
3878         done
3879         ;;
3880 (*)
3881         ;;
3882 esac
3883
3884 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3885         echo "$as_me:3885: result: $PKG_CONFIG_LIBDIR" >&5
3886 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3887 fi
3888
3889 if test "x$PKG_CONFIG" != xnone
3890 then
3891         echo "$as_me:3891: checking if we should install .pc files for $PKG_CONFIG" >&5
3892 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3893 else
3894         echo "$as_me:3894: checking if we should install .pc files" >&5
3895 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3896 fi
3897
3898 # Check whether --enable-pc-files or --disable-pc-files was given.
3899 if test "${enable_pc_files+set}" = set; then
3900   enableval="$enable_pc_files"
3901   enable_pc_files=$enableval
3902 else
3903   enable_pc_files=no
3904 fi;
3905 echo "$as_me:3905: result: $enable_pc_files" >&5
3906 echo "${ECHO_T}$enable_pc_files" >&6
3907
3908 if test "x$enable_pc_files" != xno
3909 then
3910         MAKE_PC_FILES=
3911         case "x$PKG_CONFIG_LIBDIR" in
3912         (xno|xyes)
3913                 { echo "$as_me:3913: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3914 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3915                 ;;
3916         (*)
3917
3918 if test "x$prefix" != xNONE; then
3919         cf_path_syntax="$prefix"
3920 else
3921         cf_path_syntax="$ac_default_prefix"
3922 fi
3923
3924 case ".$PKG_CONFIG_LIBDIR" in
3925 (.\$\(*\)*|.\'*\'*)
3926         ;;
3927 (..|./*|.\\*)
3928         ;;
3929 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3930         ;;
3931 (.\${*prefix}*|.\${*dir}*)
3932         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3933         case ".$PKG_CONFIG_LIBDIR" in
3934         (.NONE/*)
3935                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3936                 ;;
3937         esac
3938         ;;
3939 (.no|.NONE/*)
3940         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3941         ;;
3942 (*)
3943         { { echo "$as_me:3943: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3944 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3945    { (exit 1); exit 1; }; }
3946         ;;
3947 esac
3948
3949                 ;;
3950         esac
3951 else
3952         MAKE_PC_FILES="#"
3953 fi
3954
3955 if test -z "$MAKE_PC_FILES"
3956 then
3957         echo "$as_me:3957: checking for suffix to add to pc-files" >&5
3958 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3959
3960 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3961 if test "${with_pc_suffix+set}" = set; then
3962   withval="$with_pc_suffix"
3963   case "x$withval" in
3964         (xyes|xno)
3965                 PC_MODULE_SUFFIX=
3966                 ;;
3967         (*)     PC_MODULE_SUFFIX="$withval"
3968                 ;;
3969         esac
3970 fi;
3971         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3972         echo "$as_me:3972: result: $PC_MODULE_SUFFIX" >&5
3973 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3974         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3975
3976 fi
3977
3978 echo "$as_me:3978: checking if we should assume mixed-case filenames" >&5
3979 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3980
3981 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3982 if test "${enable_mixed_case+set}" = set; then
3983   enableval="$enable_mixed_case"
3984   enable_mixedcase=$enableval
3985 else
3986   enable_mixedcase=auto
3987 fi;
3988 echo "$as_me:3988: result: $enable_mixedcase" >&5
3989 echo "${ECHO_T}$enable_mixedcase" >&6
3990 if test "$enable_mixedcase" = "auto" ; then
3991
3992 echo "$as_me:3992: checking if filesystem supports mixed-case filenames" >&5
3993 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3994 if test "${cf_cv_mixedcase+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997
3998 if test "$cross_compiling" = yes ; then
3999         case $target_alias in
4000         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4001                 cf_cv_mixedcase=no
4002                 ;;
4003         (*)
4004                 cf_cv_mixedcase=yes
4005                 ;;
4006         esac
4007 else
4008         rm -f conftest CONFTEST
4009         echo test >conftest
4010         if test -f CONFTEST ; then
4011                 cf_cv_mixedcase=no
4012         else
4013                 cf_cv_mixedcase=yes
4014         fi
4015         rm -f conftest CONFTEST
4016 fi
4017
4018 fi
4019 echo "$as_me:4019: result: $cf_cv_mixedcase" >&5
4020 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4021 test "$cf_cv_mixedcase" = yes &&
4022 cat >>confdefs.h <<\EOF
4023 #define MIXEDCASE_FILENAMES 1
4024 EOF
4025
4026 else
4027         cf_cv_mixedcase=$enable_mixedcase
4028         if test "x$enable_mixedcase" = "xyes" ; then
4029
4030 cat >>confdefs.h <<\EOF
4031 #define MIXEDCASE_FILENAMES 1
4032 EOF
4033
4034         fi
4035 fi
4036
4037 # do this after mixed-case option (tags/TAGS is not as important as tic).
4038 echo "$as_me:4038: checking whether ${MAKE-make} sets \${MAKE}" >&5
4039 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4040 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4041 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4042   echo $ECHO_N "(cached) $ECHO_C" >&6
4043 else
4044   cat >conftest.make <<\EOF
4045 all:
4046         @echo 'ac_maketemp="${MAKE}"'
4047 EOF
4048 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4049 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4050 if test -n "$ac_maketemp"; then
4051   eval ac_cv_prog_make_${ac_make}_set=yes
4052 else
4053   eval ac_cv_prog_make_${ac_make}_set=no
4054 fi
4055 rm -f conftest.make
4056 fi
4057 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4058   echo "$as_me:4058: result: yes" >&5
4059 echo "${ECHO_T}yes" >&6
4060   SET_MAKE=
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064   SET_MAKE="MAKE=${MAKE-make}"
4065 fi
4066
4067 for ac_prog in exctags ctags
4068 do
4069   # Extract the first word of "$ac_prog", so it can be a program name with args.
4070 set dummy $ac_prog; ac_word=$2
4071 echo "$as_me:4071: checking for $ac_word" >&5
4072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4073 if test "${ac_cv_prog_CTAGS+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076   if test -n "$CTAGS"; then
4077   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4078 else
4079   ac_save_IFS=$IFS; IFS=$ac_path_separator
4080 ac_dummy="$PATH"
4081 for ac_dir in $ac_dummy; do
4082   IFS=$ac_save_IFS
4083   test -z "$ac_dir" && ac_dir=.
4084   $as_executable_p "$ac_dir/$ac_word" || continue
4085 ac_cv_prog_CTAGS="$ac_prog"
4086 echo "$as_me:4086: found $ac_dir/$ac_word" >&5
4087 break
4088 done
4089
4090 fi
4091 fi
4092 CTAGS=$ac_cv_prog_CTAGS
4093 if test -n "$CTAGS"; then
4094   echo "$as_me:4094: result: $CTAGS" >&5
4095 echo "${ECHO_T}$CTAGS" >&6
4096 else
4097   echo "$as_me:4097: result: no" >&5
4098 echo "${ECHO_T}no" >&6
4099 fi
4100
4101   test -n "$CTAGS" && break
4102 done
4103
4104 for ac_prog in exetags etags
4105 do
4106   # Extract the first word of "$ac_prog", so it can be a program name with args.
4107 set dummy $ac_prog; ac_word=$2
4108 echo "$as_me:4108: checking for $ac_word" >&5
4109 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4110 if test "${ac_cv_prog_ETAGS+set}" = set; then
4111   echo $ECHO_N "(cached) $ECHO_C" >&6
4112 else
4113   if test -n "$ETAGS"; then
4114   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4115 else
4116   ac_save_IFS=$IFS; IFS=$ac_path_separator
4117 ac_dummy="$PATH"
4118 for ac_dir in $ac_dummy; do
4119   IFS=$ac_save_IFS
4120   test -z "$ac_dir" && ac_dir=.
4121   $as_executable_p "$ac_dir/$ac_word" || continue
4122 ac_cv_prog_ETAGS="$ac_prog"
4123 echo "$as_me:4123: found $ac_dir/$ac_word" >&5
4124 break
4125 done
4126
4127 fi
4128 fi
4129 ETAGS=$ac_cv_prog_ETAGS
4130 if test -n "$ETAGS"; then
4131   echo "$as_me:4131: result: $ETAGS" >&5
4132 echo "${ECHO_T}$ETAGS" >&6
4133 else
4134   echo "$as_me:4134: result: no" >&5
4135 echo "${ECHO_T}no" >&6
4136 fi
4137
4138   test -n "$ETAGS" && break
4139 done
4140
4141 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4142 set dummy ${CTAGS:-ctags}; ac_word=$2
4143 echo "$as_me:4143: checking for $ac_word" >&5
4144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4145 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4146   echo $ECHO_N "(cached) $ECHO_C" >&6
4147 else
4148   if test -n "$MAKE_LOWER_TAGS"; then
4149   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4150 else
4151   ac_save_IFS=$IFS; IFS=$ac_path_separator
4152 ac_dummy="$PATH"
4153 for ac_dir in $ac_dummy; do
4154   IFS=$ac_save_IFS
4155   test -z "$ac_dir" && ac_dir=.
4156   $as_executable_p "$ac_dir/$ac_word" || continue
4157 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4158 echo "$as_me:4158: found $ac_dir/$ac_word" >&5
4159 break
4160 done
4161
4162   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4163 fi
4164 fi
4165 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4166 if test -n "$MAKE_LOWER_TAGS"; then
4167   echo "$as_me:4167: result: $MAKE_LOWER_TAGS" >&5
4168 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4169 else
4170   echo "$as_me:4170: result: no" >&5
4171 echo "${ECHO_T}no" >&6
4172 fi
4173
4174 if test "$cf_cv_mixedcase" = yes ; then
4175         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4176 set dummy ${ETAGS:-etags}; ac_word=$2
4177 echo "$as_me:4177: checking for $ac_word" >&5
4178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4179 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4180   echo $ECHO_N "(cached) $ECHO_C" >&6
4181 else
4182   if test -n "$MAKE_UPPER_TAGS"; then
4183   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4184 else
4185   ac_save_IFS=$IFS; IFS=$ac_path_separator
4186 ac_dummy="$PATH"
4187 for ac_dir in $ac_dummy; do
4188   IFS=$ac_save_IFS
4189   test -z "$ac_dir" && ac_dir=.
4190   $as_executable_p "$ac_dir/$ac_word" || continue
4191 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4192 echo "$as_me:4192: found $ac_dir/$ac_word" >&5
4193 break
4194 done
4195
4196   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4197 fi
4198 fi
4199 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4200 if test -n "$MAKE_UPPER_TAGS"; then
4201   echo "$as_me:4201: result: $MAKE_UPPER_TAGS" >&5
4202 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4203 else
4204   echo "$as_me:4204: result: no" >&5
4205 echo "${ECHO_T}no" >&6
4206 fi
4207
4208 else
4209         MAKE_UPPER_TAGS=no
4210 fi
4211
4212 if test "$MAKE_UPPER_TAGS" = yes ; then
4213         MAKE_UPPER_TAGS=
4214 else
4215         MAKE_UPPER_TAGS="#"
4216 fi
4217
4218 if test "$MAKE_LOWER_TAGS" = yes ; then
4219         MAKE_LOWER_TAGS=
4220 else
4221         MAKE_LOWER_TAGS="#"
4222 fi
4223
4224 echo "$as_me:4224: checking for makeflags variable" >&5
4225 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4226 if test "${cf_cv_makeflags+set}" = set; then
4227   echo $ECHO_N "(cached) $ECHO_C" >&6
4228 else
4229
4230         cf_cv_makeflags=''
4231         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4232         do
4233                 cat >cf_makeflags.tmp <<CF_EOF
4234 SHELL = $SHELL
4235 all :
4236         @ echo '.$cf_option'
4237 CF_EOF
4238                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4239                 case "$cf_result" in
4240                 (.*k|.*kw)
4241                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4242                         case "$cf_result" in
4243                         (.*CC=*)        cf_cv_makeflags=
4244                                 ;;
4245                         (*)     cf_cv_makeflags=$cf_option
4246                                 ;;
4247                         esac
4248                         break
4249                         ;;
4250                 (.-)
4251                         ;;
4252                 (*)
4253
4254 echo "${as_me:-configure}:4254: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4255
4256                         ;;
4257                 esac
4258         done
4259         rm -f cf_makeflags.tmp
4260
4261 fi
4262 echo "$as_me:4262: result: $cf_cv_makeflags" >&5
4263 echo "${ECHO_T}$cf_cv_makeflags" >&6
4264
4265 if test -n "$ac_tool_prefix"; then
4266   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4267 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4268 echo "$as_me:4268: checking for $ac_word" >&5
4269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4270 if test "${ac_cv_prog_RANLIB+set}" = set; then
4271   echo $ECHO_N "(cached) $ECHO_C" >&6
4272 else
4273   if test -n "$RANLIB"; then
4274   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4275 else
4276   ac_save_IFS=$IFS; IFS=$ac_path_separator
4277 ac_dummy="$PATH"
4278 for ac_dir in $ac_dummy; do
4279   IFS=$ac_save_IFS
4280   test -z "$ac_dir" && ac_dir=.
4281   $as_executable_p "$ac_dir/$ac_word" || continue
4282 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4283 echo "$as_me:4283: found $ac_dir/$ac_word" >&5
4284 break
4285 done
4286
4287 fi
4288 fi
4289 RANLIB=$ac_cv_prog_RANLIB
4290 if test -n "$RANLIB"; then
4291   echo "$as_me:4291: result: $RANLIB" >&5
4292 echo "${ECHO_T}$RANLIB" >&6
4293 else
4294   echo "$as_me:4294: result: no" >&5
4295 echo "${ECHO_T}no" >&6
4296 fi
4297
4298 fi
4299 if test -z "$ac_cv_prog_RANLIB"; then
4300   ac_ct_RANLIB=$RANLIB
4301   # Extract the first word of "ranlib", so it can be a program name with args.
4302 set dummy ranlib; ac_word=$2
4303 echo "$as_me:4303: checking for $ac_word" >&5
4304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4305 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4306   echo $ECHO_N "(cached) $ECHO_C" >&6
4307 else
4308   if test -n "$ac_ct_RANLIB"; then
4309   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4310 else
4311   ac_save_IFS=$IFS; IFS=$ac_path_separator
4312 ac_dummy="$PATH"
4313 for ac_dir in $ac_dummy; do
4314   IFS=$ac_save_IFS
4315   test -z "$ac_dir" && ac_dir=.
4316   $as_executable_p "$ac_dir/$ac_word" || continue
4317 ac_cv_prog_ac_ct_RANLIB="ranlib"
4318 echo "$as_me:4318: found $ac_dir/$ac_word" >&5
4319 break
4320 done
4321
4322   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4323 fi
4324 fi
4325 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4326 if test -n "$ac_ct_RANLIB"; then
4327   echo "$as_me:4327: result: $ac_ct_RANLIB" >&5
4328 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4329 else
4330   echo "$as_me:4330: result: no" >&5
4331 echo "${ECHO_T}no" >&6
4332 fi
4333
4334   RANLIB=$ac_ct_RANLIB
4335 else
4336   RANLIB="$ac_cv_prog_RANLIB"
4337 fi
4338
4339 if test -n "$ac_tool_prefix"; then
4340   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4341 set dummy ${ac_tool_prefix}ld; ac_word=$2
4342 echo "$as_me:4342: checking for $ac_word" >&5
4343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4344 if test "${ac_cv_prog_LD+set}" = set; then
4345   echo $ECHO_N "(cached) $ECHO_C" >&6
4346 else
4347   if test -n "$LD"; then
4348   ac_cv_prog_LD="$LD" # Let the user override the test.
4349 else
4350   ac_save_IFS=$IFS; IFS=$ac_path_separator
4351 ac_dummy="$PATH"
4352 for ac_dir in $ac_dummy; do
4353   IFS=$ac_save_IFS
4354   test -z "$ac_dir" && ac_dir=.
4355   $as_executable_p "$ac_dir/$ac_word" || continue
4356 ac_cv_prog_LD="${ac_tool_prefix}ld"
4357 echo "$as_me:4357: found $ac_dir/$ac_word" >&5
4358 break
4359 done
4360
4361 fi
4362 fi
4363 LD=$ac_cv_prog_LD
4364 if test -n "$LD"; then
4365   echo "$as_me:4365: result: $LD" >&5
4366 echo "${ECHO_T}$LD" >&6
4367 else
4368   echo "$as_me:4368: result: no" >&5
4369 echo "${ECHO_T}no" >&6
4370 fi
4371
4372 fi
4373 if test -z "$ac_cv_prog_LD"; then
4374   ac_ct_LD=$LD
4375   # Extract the first word of "ld", so it can be a program name with args.
4376 set dummy ld; ac_word=$2
4377 echo "$as_me:4377: checking for $ac_word" >&5
4378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4379 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   if test -n "$ac_ct_LD"; then
4383   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4384 else
4385   ac_save_IFS=$IFS; IFS=$ac_path_separator
4386 ac_dummy="$PATH"
4387 for ac_dir in $ac_dummy; do
4388   IFS=$ac_save_IFS
4389   test -z "$ac_dir" && ac_dir=.
4390   $as_executable_p "$ac_dir/$ac_word" || continue
4391 ac_cv_prog_ac_ct_LD="ld"
4392 echo "$as_me:4392: found $ac_dir/$ac_word" >&5
4393 break
4394 done
4395
4396   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4397 fi
4398 fi
4399 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4400 if test -n "$ac_ct_LD"; then
4401   echo "$as_me:4401: result: $ac_ct_LD" >&5
4402 echo "${ECHO_T}$ac_ct_LD" >&6
4403 else
4404   echo "$as_me:4404: result: no" >&5
4405 echo "${ECHO_T}no" >&6
4406 fi
4407
4408   LD=$ac_ct_LD
4409 else
4410   LD="$ac_cv_prog_LD"
4411 fi
4412
4413 if test -n "$ac_tool_prefix"; then
4414   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4415 set dummy ${ac_tool_prefix}ar; ac_word=$2
4416 echo "$as_me:4416: checking for $ac_word" >&5
4417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4418 if test "${ac_cv_prog_AR+set}" = set; then
4419   echo $ECHO_N "(cached) $ECHO_C" >&6
4420 else
4421   if test -n "$AR"; then
4422   ac_cv_prog_AR="$AR" # Let the user override the test.
4423 else
4424   ac_save_IFS=$IFS; IFS=$ac_path_separator
4425 ac_dummy="$PATH"
4426 for ac_dir in $ac_dummy; do
4427   IFS=$ac_save_IFS
4428   test -z "$ac_dir" && ac_dir=.
4429   $as_executable_p "$ac_dir/$ac_word" || continue
4430 ac_cv_prog_AR="${ac_tool_prefix}ar"
4431 echo "$as_me:4431: found $ac_dir/$ac_word" >&5
4432 break
4433 done
4434
4435 fi
4436 fi
4437 AR=$ac_cv_prog_AR
4438 if test -n "$AR"; then
4439   echo "$as_me:4439: result: $AR" >&5
4440 echo "${ECHO_T}$AR" >&6
4441 else
4442   echo "$as_me:4442: result: no" >&5
4443 echo "${ECHO_T}no" >&6
4444 fi
4445
4446 fi
4447 if test -z "$ac_cv_prog_AR"; then
4448   ac_ct_AR=$AR
4449   # Extract the first word of "ar", so it can be a program name with args.
4450 set dummy ar; ac_word=$2
4451 echo "$as_me:4451: checking for $ac_word" >&5
4452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4453 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   if test -n "$ac_ct_AR"; then
4457   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4458 else
4459   ac_save_IFS=$IFS; IFS=$ac_path_separator
4460 ac_dummy="$PATH"
4461 for ac_dir in $ac_dummy; do
4462   IFS=$ac_save_IFS
4463   test -z "$ac_dir" && ac_dir=.
4464   $as_executable_p "$ac_dir/$ac_word" || continue
4465 ac_cv_prog_ac_ct_AR="ar"
4466 echo "$as_me:4466: found $ac_dir/$ac_word" >&5
4467 break
4468 done
4469
4470   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4471 fi
4472 fi
4473 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4474 if test -n "$ac_ct_AR"; then
4475   echo "$as_me:4475: result: $ac_ct_AR" >&5
4476 echo "${ECHO_T}$ac_ct_AR" >&6
4477 else
4478   echo "$as_me:4478: result: no" >&5
4479 echo "${ECHO_T}no" >&6
4480 fi
4481
4482   AR=$ac_ct_AR
4483 else
4484   AR="$ac_cv_prog_AR"
4485 fi
4486
4487 if test -n "$ac_tool_prefix"; then
4488   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4489 set dummy ${ac_tool_prefix}nm; ac_word=$2
4490 echo "$as_me:4490: checking for $ac_word" >&5
4491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4492 if test "${ac_cv_prog_NM+set}" = set; then
4493   echo $ECHO_N "(cached) $ECHO_C" >&6
4494 else
4495   if test -n "$NM"; then
4496   ac_cv_prog_NM="$NM" # Let the user override the test.
4497 else
4498   ac_save_IFS=$IFS; IFS=$ac_path_separator
4499 ac_dummy="$PATH"
4500 for ac_dir in $ac_dummy; do
4501   IFS=$ac_save_IFS
4502   test -z "$ac_dir" && ac_dir=.
4503   $as_executable_p "$ac_dir/$ac_word" || continue
4504 ac_cv_prog_NM="${ac_tool_prefix}nm"
4505 echo "$as_me:4505: found $ac_dir/$ac_word" >&5
4506 break
4507 done
4508
4509 fi
4510 fi
4511 NM=$ac_cv_prog_NM
4512 if test -n "$NM"; then
4513   echo "$as_me:4513: result: $NM" >&5
4514 echo "${ECHO_T}$NM" >&6
4515 else
4516   echo "$as_me:4516: result: no" >&5
4517 echo "${ECHO_T}no" >&6
4518 fi
4519
4520 fi
4521 if test -z "$ac_cv_prog_NM"; then
4522   ac_ct_NM=$NM
4523   # Extract the first word of "nm", so it can be a program name with args.
4524 set dummy nm; ac_word=$2
4525 echo "$as_me:4525: checking for $ac_word" >&5
4526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4527 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4528   echo $ECHO_N "(cached) $ECHO_C" >&6
4529 else
4530   if test -n "$ac_ct_NM"; then
4531   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4532 else
4533   ac_save_IFS=$IFS; IFS=$ac_path_separator
4534 ac_dummy="$PATH"
4535 for ac_dir in $ac_dummy; do
4536   IFS=$ac_save_IFS
4537   test -z "$ac_dir" && ac_dir=.
4538   $as_executable_p "$ac_dir/$ac_word" || continue
4539 ac_cv_prog_ac_ct_NM="nm"
4540 echo "$as_me:4540: found $ac_dir/$ac_word" >&5
4541 break
4542 done
4543
4544   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4545 fi
4546 fi
4547 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4548 if test -n "$ac_ct_NM"; then
4549   echo "$as_me:4549: result: $ac_ct_NM" >&5
4550 echo "${ECHO_T}$ac_ct_NM" >&6
4551 else
4552   echo "$as_me:4552: result: no" >&5
4553 echo "${ECHO_T}no" >&6
4554 fi
4555
4556   NM=$ac_ct_NM
4557 else
4558   NM="$ac_cv_prog_NM"
4559 fi
4560
4561 if test -n "$ac_tool_prefix"; then
4562   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4563 set dummy ${ac_tool_prefix}ar; ac_word=$2
4564 echo "$as_me:4564: checking for $ac_word" >&5
4565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4566 if test "${ac_cv_prog_AR+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   if test -n "$AR"; then
4570   ac_cv_prog_AR="$AR" # Let the user override the test.
4571 else
4572   ac_save_IFS=$IFS; IFS=$ac_path_separator
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575   IFS=$ac_save_IFS
4576   test -z "$ac_dir" && ac_dir=.
4577   $as_executable_p "$ac_dir/$ac_word" || continue
4578 ac_cv_prog_AR="${ac_tool_prefix}ar"
4579 echo "$as_me:4579: found $ac_dir/$ac_word" >&5
4580 break
4581 done
4582
4583 fi
4584 fi
4585 AR=$ac_cv_prog_AR
4586 if test -n "$AR"; then
4587   echo "$as_me:4587: result: $AR" >&5
4588 echo "${ECHO_T}$AR" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594 fi
4595 if test -z "$ac_cv_prog_AR"; then
4596   ac_ct_AR=$AR
4597   # Extract the first word of "ar", so it can be a program name with args.
4598 set dummy ar; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$ac_ct_AR"; then
4605   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_ac_ct_AR="ar"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4619 fi
4620 fi
4621 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4622 if test -n "$ac_ct_AR"; then
4623   echo "$as_me:4623: result: $ac_ct_AR" >&5
4624 echo "${ECHO_T}$ac_ct_AR" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630   AR=$ac_ct_AR
4631 else
4632   AR="$ac_cv_prog_AR"
4633 fi
4634
4635 echo "$as_me:4635: checking for options to update archives" >&5
4636 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4637 if test "${cf_cv_ar_flags+set}" = set; then
4638   echo $ECHO_N "(cached) $ECHO_C" >&6
4639 else
4640
4641         cf_cv_ar_flags=unknown
4642         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4643         do
4644
4645                 # check if $ARFLAGS already contains this choice
4646                 if test "x$ARFLAGS" != "x" ; then
4647                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4648                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4649                                 cf_cv_ar_flags=
4650                                 break
4651                         fi
4652                 fi
4653
4654                 rm -f conftest.$ac_cv_objext
4655                 rm -f conftest.a
4656
4657                 cat >conftest.$ac_ext <<EOF
4658 #line 4658 "configure"
4659 int     testdata[3] = { 123, 456, 789 };
4660 EOF
4661                 if { (eval echo "$as_me:4661: \"$ac_compile\"") >&5
4662   (eval $ac_compile) 2>&5
4663   ac_status=$?
4664   echo "$as_me:4664: \$? = $ac_status" >&5
4665   (exit $ac_status); } ; then
4666                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4667                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4668                         if test -f conftest.a ; then
4669                                 cf_cv_ar_flags=$cf_ar_flags
4670                                 break
4671                         fi
4672                 else
4673                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4674
4675 echo "${as_me:-configure}:4675: testing cannot compile test-program ..." 1>&5
4676
4677                         break
4678                 fi
4679         done
4680         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4681
4682 fi
4683 echo "$as_me:4683: result: $cf_cv_ar_flags" >&5
4684 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4685
4686 if test -n "$ARFLAGS" ; then
4687         if test -n "$cf_cv_ar_flags" ; then
4688                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4689         fi
4690 else
4691         ARFLAGS=$cf_cv_ar_flags
4692 fi
4693
4694 echo "$as_me:4694: checking if you have specified an install-prefix" >&5
4695 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4696
4697 # Check whether --with-install-prefix or --without-install-prefix was given.
4698 if test "${with_install_prefix+set}" = set; then
4699   withval="$with_install_prefix"
4700   case "x$withval" in
4701         (xyes|xno)
4702                 ;;
4703         (*)     DESTDIR="$withval"
4704                 ;;
4705         esac
4706 fi;
4707 echo "$as_me:4707: result: $DESTDIR" >&5
4708 echo "${ECHO_T}$DESTDIR" >&6
4709
4710 ###############################################################################
4711
4712 # If we're cross-compiling, allow the user to override the tools and their
4713 # options.  The configure script is oriented toward identifying the host
4714 # compiler, etc., but we need a build compiler to generate parts of the source.
4715
4716 if test "$cross_compiling" = yes ; then
4717
4718         # defaults that we might want to override
4719         : ${BUILD_CFLAGS:=''}
4720         : ${BUILD_CPPFLAGS:=''}
4721         : ${BUILD_LDFLAGS:=''}
4722         : ${BUILD_LIBS:=''}
4723         : ${BUILD_EXEEXT:='$x'}
4724         : ${BUILD_OBJEXT:='o'}
4725
4726 # Check whether --with-build-cc or --without-build-cc was given.
4727 if test "${with_build_cc+set}" = set; then
4728   withval="$with_build_cc"
4729   BUILD_CC="$withval"
4730 else
4731   for ac_prog in gcc clang c99 c89 cc cl
4732 do
4733   # Extract the first word of "$ac_prog", so it can be a program name with args.
4734 set dummy $ac_prog; ac_word=$2
4735 echo "$as_me:4735: checking for $ac_word" >&5
4736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4737 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4738   echo $ECHO_N "(cached) $ECHO_C" >&6
4739 else
4740   if test -n "$BUILD_CC"; then
4741   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4742 else
4743   ac_save_IFS=$IFS; IFS=$ac_path_separator
4744 ac_dummy="$PATH"
4745 for ac_dir in $ac_dummy; do
4746   IFS=$ac_save_IFS
4747   test -z "$ac_dir" && ac_dir=.
4748   $as_executable_p "$ac_dir/$ac_word" || continue
4749 ac_cv_prog_BUILD_CC="$ac_prog"
4750 echo "$as_me:4750: found $ac_dir/$ac_word" >&5
4751 break
4752 done
4753
4754 fi
4755 fi
4756 BUILD_CC=$ac_cv_prog_BUILD_CC
4757 if test -n "$BUILD_CC"; then
4758   echo "$as_me:4758: result: $BUILD_CC" >&5
4759 echo "${ECHO_T}$BUILD_CC" >&6
4760 else
4761   echo "$as_me:4761: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763 fi
4764
4765   test -n "$BUILD_CC" && break
4766 done
4767 test -n "$BUILD_CC" || BUILD_CC="none"
4768
4769 fi;
4770         echo "$as_me:4770: checking for native build C compiler" >&5
4771 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4772         echo "$as_me:4772: result: $BUILD_CC" >&5
4773 echo "${ECHO_T}$BUILD_CC" >&6
4774
4775         echo "$as_me:4775: checking for native build C preprocessor" >&5
4776 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4777
4778 # Check whether --with-build-cpp or --without-build-cpp was given.
4779 if test "${with_build_cpp+set}" = set; then
4780   withval="$with_build_cpp"
4781   BUILD_CPP="$withval"
4782 else
4783   BUILD_CPP='${BUILD_CC} -E'
4784 fi;
4785         echo "$as_me:4785: result: $BUILD_CPP" >&5
4786 echo "${ECHO_T}$BUILD_CPP" >&6
4787
4788         echo "$as_me:4788: checking for native build C flags" >&5
4789 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4790
4791 # Check whether --with-build-cflags or --without-build-cflags was given.
4792 if test "${with_build_cflags+set}" = set; then
4793   withval="$with_build_cflags"
4794   BUILD_CFLAGS="$withval"
4795 fi;
4796         echo "$as_me:4796: result: $BUILD_CFLAGS" >&5
4797 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4798
4799         echo "$as_me:4799: checking for native build C preprocessor-flags" >&5
4800 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4801
4802 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4803 if test "${with_build_cppflags+set}" = set; then
4804   withval="$with_build_cppflags"
4805   BUILD_CPPFLAGS="$withval"
4806 fi;
4807         echo "$as_me:4807: result: $BUILD_CPPFLAGS" >&5
4808 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4809
4810         echo "$as_me:4810: checking for native build linker-flags" >&5
4811 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4812
4813 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4814 if test "${with_build_ldflags+set}" = set; then
4815   withval="$with_build_ldflags"
4816   BUILD_LDFLAGS="$withval"
4817 fi;
4818         echo "$as_me:4818: result: $BUILD_LDFLAGS" >&5
4819 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4820
4821         echo "$as_me:4821: checking for native build linker-libraries" >&5
4822 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4823
4824 # Check whether --with-build-libs or --without-build-libs was given.
4825 if test "${with_build_libs+set}" = set; then
4826   withval="$with_build_libs"
4827   BUILD_LIBS="$withval"
4828 fi;
4829         echo "$as_me:4829: result: $BUILD_LIBS" >&5
4830 echo "${ECHO_T}$BUILD_LIBS" >&6
4831
4832         # this assumes we're on Unix.
4833         BUILD_EXEEXT=
4834         BUILD_OBJEXT=o
4835
4836         : ${BUILD_CC:='${CC}'}
4837
4838         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4839                 { { echo "$as_me:4839: error: Cross-build requires two compilers.
4840 Use --with-build-cc to specify the native compiler." >&5
4841 echo "$as_me: error: Cross-build requires two compilers.
4842 Use --with-build-cc to specify the native compiler." >&2;}
4843    { (exit 1); exit 1; }; }
4844         fi
4845
4846 else
4847         : ${BUILD_CC:='${CC}'}
4848         : ${BUILD_CPP:='${CPP}'}
4849         : ${BUILD_CFLAGS:='${CFLAGS}'}
4850         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4851         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4852         : ${BUILD_LIBS:='${LIBS}'}
4853         : ${BUILD_EXEEXT:='$x'}
4854         : ${BUILD_OBJEXT:='o'}
4855 fi
4856
4857 ###############################################################################
4858
4859 ### Options to allow the user to specify the set of libraries which are used.
4860 ### Use "--without-normal --with-shared" to allow the default model to be
4861 ### shared, for example.
4862 cf_list_models=""
4863
4864 echo "$as_me:4864: checking if libtool -version-number should be used" >&5
4865 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4866
4867 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4868 if test "${enable_libtool_version+set}" = set; then
4869   enableval="$enable_libtool_version"
4870   test "$enableval" != no && enableval=yes
4871         if test "$enableval" != "yes" ; then
4872     cf_libtool_version=no
4873         else
4874                 cf_libtool_version=yes
4875         fi
4876 else
4877   enableval=yes
4878         cf_libtool_version=yes
4879
4880 fi;
4881 echo "$as_me:4881: result: $cf_libtool_version" >&5
4882 echo "${ECHO_T}$cf_libtool_version" >&6
4883
4884 if test "$cf_libtool_version" = yes ; then
4885         LIBTOOL_VERSION="-version-number"
4886 else
4887         LIBTOOL_VERSION="-version-info"
4888         case "x$VERSION" in
4889         (x)
4890                 { echo "$as_me:4890: WARNING: VERSION was not set" >&5
4891 echo "$as_me: WARNING: VERSION was not set" >&2;}
4892                 ;;
4893         (x*.*.*)
4894                 ABI_VERSION="$VERSION"
4895                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4896
4897 echo "${as_me:-configure}:4897: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4898
4899                 ;;
4900         (x*:*:*)
4901                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4902                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4903
4904 echo "${as_me:-configure}:4904: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4905
4906                 ;;
4907         (*)
4908                 { echo "$as_me:4908: WARNING: unexpected VERSION value: $VERSION" >&5
4909 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4910                 ;;
4911         esac
4912 fi
4913
4914 LIBTOOL=
4915
4916 # common library maintenance symbols that are convenient for libtool scripts:
4917 LIB_CREATE='${AR} -cr'
4918 LIB_OBJECT='${OBJECTS}'
4919 LIB_SUFFIX=.a
4920 LIB_PREP="$RANLIB"
4921
4922 # symbols used to prop libtool up to enable it to determine what it should be
4923 # doing:
4924 LIB_CLEAN=
4925 LIB_COMPILE=
4926 LIB_LINK='${CC}'
4927 LIB_INSTALL=
4928 LIB_UNINSTALL=
4929
4930 echo "$as_me:4930: checking if you want to build libraries with libtool" >&5
4931 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4932
4933 # Check whether --with-libtool or --without-libtool was given.
4934 if test "${with_libtool+set}" = set; then
4935   withval="$with_libtool"
4936   with_libtool=$withval
4937 else
4938   with_libtool=no
4939 fi;
4940 echo "$as_me:4940: result: $with_libtool" >&5
4941 echo "${ECHO_T}$with_libtool" >&6
4942 if test "$with_libtool" != "no"; then
4943
4944         if test "$with_libtool" != "yes" ; then
4945
4946 if test "x$prefix" != xNONE; then
4947         cf_path_syntax="$prefix"
4948 else
4949         cf_path_syntax="$ac_default_prefix"
4950 fi
4951
4952 case ".$with_libtool" in
4953 (.\$\(*\)*|.\'*\'*)
4954         ;;
4955 (..|./*|.\\*)
4956         ;;
4957 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4958         ;;
4959 (.\${*prefix}*|.\${*dir}*)
4960         eval with_libtool="$with_libtool"
4961         case ".$with_libtool" in
4962         (.NONE/*)
4963                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4964                 ;;
4965         esac
4966         ;;
4967 (.no|.NONE/*)
4968         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4969         ;;
4970 (*)
4971         { { echo "$as_me:4971: error: expected a pathname, not \"$with_libtool\"" >&5
4972 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4973    { (exit 1); exit 1; }; }
4974         ;;
4975 esac
4976
4977                 LIBTOOL=$with_libtool
4978         else
4979                 if test -n "$ac_tool_prefix"; then
4980   for ac_prog in libtool glibtool
4981   do
4982     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4983 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4984 echo "$as_me:4984: checking for $ac_word" >&5
4985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4986 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4987   echo $ECHO_N "(cached) $ECHO_C" >&6
4988 else
4989   if test -n "$LIBTOOL"; then
4990   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4991 else
4992   ac_save_IFS=$IFS; IFS=$ac_path_separator
4993 ac_dummy="$PATH"
4994 for ac_dir in $ac_dummy; do
4995   IFS=$ac_save_IFS
4996   test -z "$ac_dir" && ac_dir=.
4997   $as_executable_p "$ac_dir/$ac_word" || continue
4998 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4999 echo "$as_me:4999: found $ac_dir/$ac_word" >&5
5000 break
5001 done
5002
5003 fi
5004 fi
5005 LIBTOOL=$ac_cv_prog_LIBTOOL
5006 if test -n "$LIBTOOL"; then
5007   echo "$as_me:5007: result: $LIBTOOL" >&5
5008 echo "${ECHO_T}$LIBTOOL" >&6
5009 else
5010   echo "$as_me:5010: result: no" >&5
5011 echo "${ECHO_T}no" >&6
5012 fi
5013
5014     test -n "$LIBTOOL" && break
5015   done
5016 fi
5017 if test -z "$LIBTOOL"; then
5018   ac_ct_LIBTOOL=$LIBTOOL
5019   for ac_prog in libtool glibtool
5020 do
5021   # Extract the first word of "$ac_prog", so it can be a program name with args.
5022 set dummy $ac_prog; ac_word=$2
5023 echo "$as_me:5023: checking for $ac_word" >&5
5024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5025 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5026   echo $ECHO_N "(cached) $ECHO_C" >&6
5027 else
5028   if test -n "$ac_ct_LIBTOOL"; then
5029   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5030 else
5031   ac_save_IFS=$IFS; IFS=$ac_path_separator
5032 ac_dummy="$PATH"
5033 for ac_dir in $ac_dummy; do
5034   IFS=$ac_save_IFS
5035   test -z "$ac_dir" && ac_dir=.
5036   $as_executable_p "$ac_dir/$ac_word" || continue
5037 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5038 echo "$as_me:5038: found $ac_dir/$ac_word" >&5
5039 break
5040 done
5041
5042 fi
5043 fi
5044 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5045 if test -n "$ac_ct_LIBTOOL"; then
5046   echo "$as_me:5046: result: $ac_ct_LIBTOOL" >&5
5047 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5048 else
5049   echo "$as_me:5049: result: no" >&5
5050 echo "${ECHO_T}no" >&6
5051 fi
5052
5053   test -n "$ac_ct_LIBTOOL" && break
5054 done
5055 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5056
5057   LIBTOOL=$ac_ct_LIBTOOL
5058 fi
5059
5060 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5061 then
5062         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.].*//'`
5063 else
5064         cf_cv_libtool_version=
5065 fi
5066 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5067
5068                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5069                 then
5070
5071 unset ac_cv_prog_ac_ct_LIBTOOL
5072 unset ac_ct_LIBTOOL
5073 unset LIBTOOL
5074
5075                         if test -n "$ac_tool_prefix"; then
5076   for ac_prog in glibtool
5077   do
5078     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5079 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5080 echo "$as_me:5080: checking for $ac_word" >&5
5081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5082 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5083   echo $ECHO_N "(cached) $ECHO_C" >&6
5084 else
5085   if test -n "$LIBTOOL"; then
5086   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5087 else
5088   ac_save_IFS=$IFS; IFS=$ac_path_separator
5089 ac_dummy="$PATH"
5090 for ac_dir in $ac_dummy; do
5091   IFS=$ac_save_IFS
5092   test -z "$ac_dir" && ac_dir=.
5093   $as_executable_p "$ac_dir/$ac_word" || continue
5094 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5095 echo "$as_me:5095: found $ac_dir/$ac_word" >&5
5096 break
5097 done
5098
5099 fi
5100 fi
5101 LIBTOOL=$ac_cv_prog_LIBTOOL
5102 if test -n "$LIBTOOL"; then
5103   echo "$as_me:5103: result: $LIBTOOL" >&5
5104 echo "${ECHO_T}$LIBTOOL" >&6
5105 else
5106   echo "$as_me:5106: result: no" >&5
5107 echo "${ECHO_T}no" >&6
5108 fi
5109
5110     test -n "$LIBTOOL" && break
5111   done
5112 fi
5113 if test -z "$LIBTOOL"; then
5114   ac_ct_LIBTOOL=$LIBTOOL
5115   for ac_prog in glibtool
5116 do
5117   # Extract the first word of "$ac_prog", so it can be a program name with args.
5118 set dummy $ac_prog; ac_word=$2
5119 echo "$as_me:5119: checking for $ac_word" >&5
5120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5121 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5122   echo $ECHO_N "(cached) $ECHO_C" >&6
5123 else
5124   if test -n "$ac_ct_LIBTOOL"; then
5125   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5126 else
5127   ac_save_IFS=$IFS; IFS=$ac_path_separator
5128 ac_dummy="$PATH"
5129 for ac_dir in $ac_dummy; do
5130   IFS=$ac_save_IFS
5131   test -z "$ac_dir" && ac_dir=.
5132   $as_executable_p "$ac_dir/$ac_word" || continue
5133 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5134 echo "$as_me:5134: found $ac_dir/$ac_word" >&5
5135 break
5136 done
5137
5138 fi
5139 fi
5140 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5141 if test -n "$ac_ct_LIBTOOL"; then
5142   echo "$as_me:5142: result: $ac_ct_LIBTOOL" >&5
5143 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5144 else
5145   echo "$as_me:5145: result: no" >&5
5146 echo "${ECHO_T}no" >&6
5147 fi
5148
5149   test -n "$ac_ct_LIBTOOL" && break
5150 done
5151 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5152
5153   LIBTOOL=$ac_ct_LIBTOOL
5154 fi
5155
5156 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5157 then
5158         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.].*//'`
5159 else
5160         cf_cv_libtool_version=
5161 fi
5162 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5163
5164                 fi
5165         fi
5166         if test -z "$LIBTOOL" ; then
5167                 { { echo "$as_me:5167: error: Cannot find libtool" >&5
5168 echo "$as_me: error: Cannot find libtool" >&2;}
5169    { (exit 1); exit 1; }; }
5170         fi
5171         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5172         LIB_OBJECT='${OBJECTS:.o=.lo}'
5173         LIB_SUFFIX=.la
5174         LIB_CLEAN='${LIBTOOL} --mode=clean'
5175         LIB_COMPILE='${LIBTOOL} --mode=compile'
5176         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5177         LIB_INSTALL='${LIBTOOL} --mode=install'
5178         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5179         LIB_PREP=:
5180
5181 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5182 then
5183         echo "$as_me:5183: checking version of $LIBTOOL" >&5
5184 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5185
5186 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5187 then
5188         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.].*//'`
5189 else
5190         cf_cv_libtool_version=
5191 fi
5192 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5193
5194         echo "$as_me:5194: result: $cf_cv_libtool_version" >&5
5195 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5196         if test -z "$cf_cv_libtool_version" ; then
5197                 { { echo "$as_me:5197: error: This is not GNU libtool" >&5
5198 echo "$as_me: error: This is not GNU libtool" >&2;}
5199    { (exit 1); exit 1; }; }
5200         fi
5201 else
5202         { { echo "$as_me:5202: error: GNU libtool has not been found" >&5
5203 echo "$as_me: error: GNU libtool has not been found" >&2;}
5204    { (exit 1); exit 1; }; }
5205 fi
5206
5207         # special hack to add -no-undefined (which libtool should do for itself)
5208         LT_UNDEF=
5209         case "$cf_cv_system_name" in
5210         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5211                 LT_UNDEF=-no-undefined
5212                 ;;
5213         esac
5214
5215         # special hack to add --tag option for C++ compiler
5216         case $cf_cv_libtool_version in
5217         (1.[5-9]*|[2-9].[0-9.a-z]*)
5218                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5219                 LIBTOOL="$LIBTOOL --tag=CC"
5220                 ;;
5221         (*)
5222                 LIBTOOL_CXX="$LIBTOOL"
5223                 ;;
5224         esac
5225 else
5226         LIBTOOL=""
5227         LIBTOOL_CXX=""
5228 fi
5229
5230 test -z "$LIBTOOL" && ECHO_LT=
5231
5232 if test "$with_libtool" != "no" ; then
5233
5234 cf_list_models="$cf_list_models libtool"
5235
5236 else
5237
5238 echo "$as_me:5238: checking if you want to build shared libraries" >&5
5239 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5240
5241 # Check whether --with-shared or --without-shared was given.
5242 if test "${with_shared+set}" = set; then
5243   withval="$with_shared"
5244   with_shared=$withval
5245 else
5246   with_shared=no
5247 fi;
5248 echo "$as_me:5248: result: $with_shared" >&5
5249 echo "${ECHO_T}$with_shared" >&6
5250 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5251
5252 echo "$as_me:5252: checking if you want to build static libraries" >&5
5253 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5254
5255 # Check whether --with-normal or --without-normal was given.
5256 if test "${with_normal+set}" = set; then
5257   withval="$with_normal"
5258   with_normal=$withval
5259 else
5260   with_normal=yes
5261 fi;
5262 echo "$as_me:5262: result: $with_normal" >&5
5263 echo "${ECHO_T}$with_normal" >&6
5264 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5265
5266 echo "$as_me:5266: checking if you want to build debug libraries" >&5
5267 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5268
5269 # Check whether --with-debug or --without-debug was given.
5270 if test "${with_debug+set}" = set; then
5271   withval="$with_debug"
5272   with_debug=$withval
5273 else
5274   with_debug=yes
5275 fi;
5276 echo "$as_me:5276: result: $with_debug" >&5
5277 echo "${ECHO_T}$with_debug" >&6
5278 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5279
5280 echo "$as_me:5280: checking if you want to build profiling libraries" >&5
5281 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5282
5283 # Check whether --with-profile or --without-profile was given.
5284 if test "${with_profile+set}" = set; then
5285   withval="$with_profile"
5286   with_profile=$withval
5287 else
5288   with_profile=no
5289 fi;
5290 echo "$as_me:5290: result: $with_profile" >&5
5291 echo "${ECHO_T}$with_profile" >&6
5292 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5293
5294 fi
5295
5296 if test "X$cf_with_cxx_binding" != Xno; then
5297 if test "x$with_shared" = "xyes"; then
5298 echo "$as_me:5298: checking if you want to build C++ shared libraries" >&5
5299 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5300
5301 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5302 if test "${with_cxx_shared+set}" = set; then
5303   withval="$with_cxx_shared"
5304   with_shared_cxx=$withval
5305 else
5306   with_shared_cxx=no
5307 fi;
5308 echo "$as_me:5308: result: $with_shared_cxx" >&5
5309 echo "${ECHO_T}$with_shared_cxx" >&6
5310 fi
5311 fi
5312
5313 ###############################################################################
5314
5315 echo "$as_me:5315: checking for specified models" >&5
5316 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5317 test -z "$cf_list_models" && cf_list_models=normal
5318 test "$with_libtool" != "no" && cf_list_models=libtool
5319 echo "$as_me:5319: result: $cf_list_models" >&5
5320 echo "${ECHO_T}$cf_list_models" >&6
5321
5322 ### Use the first model as the default, and save its suffix for use in building
5323 ### up test-applications.
5324 echo "$as_me:5324: checking for default model" >&5
5325 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5326 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5327 echo "$as_me:5327: result: $DFT_LWR_MODEL" >&5
5328 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5329
5330 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5331
5332 TICS_NAME=tic
5333
5334 TINFO_NAME=tinfo
5335
5336 LIB_NAME=ncurses
5337
5338 LIB_DIR=../lib
5339 LIB_2ND=../../lib
5340
5341 echo "$as_me:5341: checking if you want to have a library-prefix" >&5
5342 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5343
5344 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5345 if test "${with_lib_prefix+set}" = set; then
5346   withval="$with_lib_prefix"
5347   with_lib_prefix=$withval
5348 else
5349   with_lib_prefix=auto
5350 fi;
5351 echo "$as_me:5351: result: $with_lib_prefix" >&5
5352 echo "${ECHO_T}$with_lib_prefix" >&6
5353
5354 if test $with_lib_prefix = auto
5355 then
5356
5357         case $cf_cv_system_name in
5358         (OS/2*|os2*)
5359                 if test "$DFT_LWR_MODEL" = libtool; then
5360                         LIB_PREFIX='lib'
5361                 else
5362                         LIB_PREFIX=''
5363                 fi
5364                 ;;
5365         (*)     LIB_PREFIX='lib'
5366                 ;;
5367         esac
5368 cf_prefix=$LIB_PREFIX
5369
5370 elif test $with_lib_prefix = no
5371 then
5372         LIB_PREFIX=
5373 else
5374         LIB_PREFIX=$with_lib_prefix
5375 fi
5376
5377 LIB_SUFFIX=
5378
5379         echo "$as_me:5379: checking for PATH separator" >&5
5380 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5381         case $cf_cv_system_name in
5382         (os2*)  PATH_SEPARATOR=';'  ;;
5383         (*)     ${PATH_SEPARATOR:=':'}  ;;
5384         esac
5385
5386         echo "$as_me:5386: result: $PATH_SEPARATOR" >&5
5387 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5388
5389 ###############################################################################
5390
5391 echo "$as_me:5391: checking if you want to build a separate terminfo library" >&5
5392 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5393
5394 # Check whether --with-termlib or --without-termlib was given.
5395 if test "${with_termlib+set}" = set; then
5396   withval="$with_termlib"
5397   with_termlib=$withval
5398 else
5399   with_termlib=no
5400 fi;
5401 echo "$as_me:5401: result: $with_termlib" >&5
5402 echo "${ECHO_T}$with_termlib" >&6
5403
5404 echo "$as_me:5404: checking if you want to build a separate tic library" >&5
5405 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5406
5407 # Check whether --with-ticlib or --without-ticlib was given.
5408 if test "${with_ticlib+set}" = set; then
5409   withval="$with_ticlib"
5410   with_ticlib=$withval
5411 else
5412   with_ticlib=no
5413 fi;
5414 echo "$as_me:5414: result: $with_ticlib" >&5
5415 echo "${ECHO_T}$with_ticlib" >&6
5416
5417 if test X"$CC_G_OPT" = X"" ; then
5418         CC_G_OPT='-g'
5419         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5420 fi
5421
5422 if test X"$CXX_G_OPT" = X"" ; then
5423         CXX_G_OPT='-g'
5424         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5425 fi
5426
5427 echo "$as_me:5427: checking for default loader flags" >&5
5428 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5429 case $DFT_LWR_MODEL in
5430 (libtool) LD_MODEL=''   ;;
5431 (normal)  LD_MODEL=''   ;;
5432 (debug)   LD_MODEL=$CC_G_OPT ;;
5433 (profile) LD_MODEL='-pg';;
5434 (shared)  LD_MODEL=''   ;;
5435 esac
5436 echo "$as_me:5436: result: $LD_MODEL" >&5
5437 echo "${ECHO_T}$LD_MODEL" >&6
5438
5439 case $DFT_LWR_MODEL in
5440 (shared)
5441
5442 echo "$as_me:5442: checking if rpath option should be used" >&5
5443 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5444
5445 # Check whether --enable-rpath or --disable-rpath was given.
5446 if test "${enable_rpath+set}" = set; then
5447   enableval="$enable_rpath"
5448   cf_cv_enable_rpath=$enableval
5449 else
5450   cf_cv_enable_rpath=no
5451 fi;
5452 echo "$as_me:5452: result: $cf_cv_enable_rpath" >&5
5453 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5454
5455 echo "$as_me:5455: checking if shared libraries should be relinked during install" >&5
5456 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5457
5458 # Check whether --enable-relink or --disable-relink was given.
5459 if test "${enable_relink+set}" = set; then
5460   enableval="$enable_relink"
5461   cf_cv_do_relink=$enableval
5462 else
5463   cf_cv_do_relink=yes
5464 fi;
5465 echo "$as_me:5465: result: $cf_cv_do_relink" >&5
5466 echo "${ECHO_T}$cf_cv_do_relink" >&6
5467         ;;
5468 esac
5469
5470 # we will build libraries one-level down.
5471 rel_builddir=..
5472
5473 LD_RPATH_OPT=
5474 if test "x$cf_cv_enable_rpath" != xno
5475 then
5476         echo "$as_me:5476: checking for an rpath option" >&5
5477 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5478         case $cf_cv_system_name in
5479         (irix*)
5480                 if test "$GCC" = yes; then
5481                         LD_RPATH_OPT="-Wl,-rpath,"
5482                 else
5483                         LD_RPATH_OPT="-rpath "
5484                 fi
5485                 ;;
5486         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5487                 LD_RPATH_OPT="-Wl,-rpath,"
5488                 ;;
5489         (openbsd[2-9].*|mirbsd*)
5490                 LD_RPATH_OPT="-Wl,-rpath,"
5491                 ;;
5492         (dragonfly*)
5493                 LD_RPATH_OPT="-rpath "
5494                 ;;
5495         (netbsd*)
5496                 LD_RPATH_OPT="-Wl,-rpath,"
5497                 ;;
5498         (osf*|mls+*)
5499                 LD_RPATH_OPT="-rpath "
5500                 ;;
5501         (solaris2*)
5502                 LD_RPATH_OPT="-R"
5503                 ;;
5504         (*)
5505                 ;;
5506         esac
5507         echo "$as_me:5507: result: $LD_RPATH_OPT" >&5
5508 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5509
5510         case "x$LD_RPATH_OPT" in
5511         (x-R*)
5512                 echo "$as_me:5512: checking if we need a space after rpath option" >&5
5513 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5514                 cf_save_LIBS="$LIBS"
5515
5516 cf_add_libs="${LD_RPATH_OPT}$libdir"
5517 # Filter out duplicates - this happens with badly-designed ".pc" files...
5518 for cf_add_1lib in $LIBS
5519 do
5520         for cf_add_2lib in $cf_add_libs
5521         do
5522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5523                 then
5524                         cf_add_1lib=
5525                         break
5526                 fi
5527         done
5528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5529 done
5530 LIBS="$cf_add_libs"
5531
5532                 cat >conftest.$ac_ext <<_ACEOF
5533 #line 5533 "configure"
5534 #include "confdefs.h"
5535
5536 int
5537 main (void)
5538 {
5539
5540   ;
5541   return 0;
5542 }
5543 _ACEOF
5544 rm -f conftest.$ac_objext conftest$ac_exeext
5545 if { (eval echo "$as_me:5545: \"$ac_link\"") >&5
5546   (eval $ac_link) 2>&5
5547   ac_status=$?
5548   echo "$as_me:5548: \$? = $ac_status" >&5
5549   (exit $ac_status); } &&
5550          { ac_try='test -s conftest$ac_exeext'
5551   { (eval echo "$as_me:5551: \"$ac_try\"") >&5
5552   (eval $ac_try) 2>&5
5553   ac_status=$?
5554   echo "$as_me:5554: \$? = $ac_status" >&5
5555   (exit $ac_status); }; }; then
5556   cf_rpath_space=no
5557 else
5558   echo "$as_me: failed program was:" >&5
5559 cat conftest.$ac_ext >&5
5560 cf_rpath_space=yes
5561 fi
5562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5563                 LIBS="$cf_save_LIBS"
5564                 echo "$as_me:5564: result: $cf_rpath_space" >&5
5565 echo "${ECHO_T}$cf_rpath_space" >&6
5566                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5567                 ;;
5568         esac
5569 fi
5570
5571         RM_SHARED_OPTS=
5572         LOCAL_LDFLAGS=
5573         LOCAL_LDFLAGS2=
5574         LD_SHARED_OPTS=
5575         INSTALL_LIB="-m 644"
5576         : ${rel_builddir:=.}
5577
5578         shlibdir=$libdir
5579
5580         MAKE_DLLS="#"
5581
5582         cf_cv_do_symlinks=no
5583         cf_ld_rpath_opt=
5584         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5585
5586         echo "$as_me:5586: checking if release/abi version should be used for shared libs" >&5
5587 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5588
5589 # Check whether --with-shlib-version or --without-shlib-version was given.
5590 if test "${with_shlib_version+set}" = set; then
5591   withval="$with_shlib_version"
5592   test -z "$withval" && withval=auto
5593         case $withval in
5594         (yes)
5595                 cf_cv_shlib_version=auto
5596                 ;;
5597         (rel|abi|auto)
5598                 cf_cv_shlib_version=$withval
5599                 ;;
5600         (*)
5601                 echo "$as_me:5601: result: $withval" >&5
5602 echo "${ECHO_T}$withval" >&6
5603                 { { echo "$as_me:5603: error: option value must be one of: rel, abi, or auto" >&5
5604 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5605    { (exit 1); exit 1; }; }
5606                 ;;
5607         esac
5608
5609 else
5610   cf_cv_shlib_version=auto
5611 fi;
5612         echo "$as_me:5612: result: $cf_cv_shlib_version" >&5
5613 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5614
5615         cf_cv_rm_so_locs=no
5616         cf_try_cflags=
5617
5618         # Some less-capable ports of gcc support only -fpic
5619         CC_SHARED_OPTS=
5620
5621         cf_try_fPIC=no
5622         if test "$GCC" = yes
5623         then
5624                 cf_try_fPIC=yes
5625         else
5626                 case $cf_cv_system_name in
5627                 (*linux*)       # e.g., PGI compiler
5628                         cf_try_fPIC=yes
5629                         ;;
5630                 esac
5631         fi
5632
5633         if test "$cf_try_fPIC" = yes
5634         then
5635                 echo "$as_me:5635: checking which $CC option to use" >&5
5636 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5637                 cf_save_CFLAGS="$CFLAGS"
5638                 for CC_SHARED_OPTS in -fPIC -fpic ''
5639                 do
5640                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5641                         cat >conftest.$ac_ext <<_ACEOF
5642 #line 5642 "configure"
5643 #include "confdefs.h"
5644 #include <stdio.h>
5645 int
5646 main (void)
5647 {
5648 int x = 1
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 rm -f conftest.$ac_objext
5654 if { (eval echo "$as_me:5654: \"$ac_compile\"") >&5
5655   (eval $ac_compile) 2>&5
5656   ac_status=$?
5657   echo "$as_me:5657: \$? = $ac_status" >&5
5658   (exit $ac_status); } &&
5659          { ac_try='test -s conftest.$ac_objext'
5660   { (eval echo "$as_me:5660: \"$ac_try\"") >&5
5661   (eval $ac_try) 2>&5
5662   ac_status=$?
5663   echo "$as_me:5663: \$? = $ac_status" >&5
5664   (exit $ac_status); }; }; then
5665   break
5666 else
5667   echo "$as_me: failed program was:" >&5
5668 cat conftest.$ac_ext >&5
5669 fi
5670 rm -f conftest.$ac_objext conftest.$ac_ext
5671                 done
5672                 echo "$as_me:5672: result: $CC_SHARED_OPTS" >&5
5673 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5674                 CFLAGS="$cf_save_CFLAGS"
5675         fi
5676
5677         cf_cv_shlib_version_infix=no
5678
5679         case $cf_cv_system_name in
5680         (aix4.3-9*|aix[5-7]*)
5681                 if test "$GCC" = yes; then
5682                         CC_SHARED_OPTS='-Wl,-brtl'
5683                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5684                 else
5685                         CC_SHARED_OPTS='-brtl'
5686                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5687                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5688                 fi
5689                 ;;
5690         (beos*)
5691                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5692                 ;;
5693         (cygwin*)
5694                 CC_SHARED_OPTS=
5695                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5696                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5697                 cf_cv_shlib_version=cygdll
5698                 cf_cv_shlib_version_infix=cygdll
5699                 shlibdir=$bindir
5700                 MAKE_DLLS=
5701                 cat >mk_shared_lib.sh <<-CF_EOF
5702                 #!$SHELL
5703                 SHARED_LIB=\$1
5704                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5705                 shift
5706                 cat <<-EOF
5707                 Linking shared library
5708                 ** SHARED_LIB \$SHARED_LIB
5709                 ** IMPORT_LIB \$IMPORT_LIB
5710 EOF
5711                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5712 CF_EOF
5713                 chmod +x mk_shared_lib.sh
5714                 ;;
5715         (msys*)
5716                 CC_SHARED_OPTS=
5717                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5718                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5719                 cf_cv_shlib_version=msysdll
5720                 cf_cv_shlib_version_infix=msysdll
5721                 shlibdir=$bindir
5722                 MAKE_DLLS=
5723                 cat >mk_shared_lib.sh <<-CF_EOF
5724                 #!$SHELL
5725                 SHARED_LIB=\$1
5726                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5727                 shift
5728                 cat <<-EOF
5729                 Linking shared library
5730                 ** SHARED_LIB \$SHARED_LIB
5731                 ** IMPORT_LIB \$IMPORT_LIB
5732 EOF
5733                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5734 CF_EOF
5735                 chmod +x mk_shared_lib.sh
5736                 ;;
5737         (darwin*)
5738                 cf_try_cflags="no-cpp-precomp"
5739                 CC_SHARED_OPTS="-dynamic"
5740                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5741                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5742                 cf_cv_shlib_version_infix=yes
5743                 echo "$as_me:5743: checking if ld -search_paths_first works" >&5
5744 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5745 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5746   echo $ECHO_N "(cached) $ECHO_C" >&6
5747 else
5748
5749                         cf_save_LDFLAGS=$LDFLAGS
5750                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5751                         cat >conftest.$ac_ext <<_ACEOF
5752 #line 5752 "configure"
5753 #include "confdefs.h"
5754
5755 int
5756 main (void)
5757 {
5758 int i;
5759   ;
5760   return 0;
5761 }
5762 _ACEOF
5763 rm -f conftest.$ac_objext conftest$ac_exeext
5764 if { (eval echo "$as_me:5764: \"$ac_link\"") >&5
5765   (eval $ac_link) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); } &&
5769          { ac_try='test -s conftest$ac_exeext'
5770   { (eval echo "$as_me:5770: \"$ac_try\"") >&5
5771   (eval $ac_try) 2>&5
5772   ac_status=$?
5773   echo "$as_me:5773: \$? = $ac_status" >&5
5774   (exit $ac_status); }; }; then
5775   cf_cv_ldflags_search_paths_first=yes
5776 else
5777   echo "$as_me: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 cf_cv_ldflags_search_paths_first=no
5780 fi
5781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5782                                 LDFLAGS=$cf_save_LDFLAGS
5783 fi
5784 echo "$as_me:5784: result: $cf_cv_ldflags_search_paths_first" >&5
5785 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5786                 if test $cf_cv_ldflags_search_paths_first = yes; then
5787                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5788                 fi
5789                 ;;
5790         (hpux[7-8]*)
5791                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5792                 if test "$GCC" != yes; then
5793                         CC_SHARED_OPTS='+Z'
5794                 fi
5795                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5796                 INSTALL_LIB="-m 555"
5797                 ;;
5798         (hpux*)
5799                 # (tested with gcc 2.7.2 -- I don't have c89)
5800                 if test "$GCC" = yes; then
5801                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5802                 else
5803                         CC_SHARED_OPTS='+Z'
5804                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5805                 fi
5806                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5807                 # HP-UX shared libraries must be executable, and should be
5808                 # readonly to exploit a quirk in the memory manager.
5809                 INSTALL_LIB="-m 555"
5810                 ;;
5811         (interix*)
5812                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5813                 if test "$cf_cv_shlib_version" = rel; then
5814                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5815                 else
5816                         cf_shared_soname='`basename $@`'
5817                 fi
5818                 CC_SHARED_OPTS=
5819                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5820                 ;;
5821         (irix*)
5822                 if test "$cf_cv_enable_rpath" = yes ; then
5823                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5824                 fi
5825                 # tested with IRIX 5.2 and 'cc'.
5826                 if test "$GCC" != yes; then
5827                         CC_SHARED_OPTS='-KPIC'
5828                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5829                 else
5830                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5831                 fi
5832                 cf_cv_rm_so_locs=yes
5833                 ;;
5834         (linux*|gnu*|k*bsd*-gnu)
5835                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5836                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5837                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5838                 fi
5839                 if test "$cf_cv_enable_rpath" = yes ; then
5840                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5841                 fi
5842
5843         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5844         if test "$cf_cv_shlib_version" = rel; then
5845                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5846         else
5847                 cf_cv_shared_soname='`basename $@`'
5848         fi
5849
5850                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5851                 ;;
5852         (mingw*)
5853                 cf_cv_shlib_version=mingw
5854                 cf_cv_shlib_version_infix=mingw
5855                 shlibdir=$bindir
5856                 MAKE_DLLS=
5857                 if test "$DFT_LWR_MODEL" = "shared" ; then
5858                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5859                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5860                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5861                 fi
5862                 CC_SHARED_OPTS=
5863                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5864                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5865                 cat >mk_shared_lib.sh <<-CF_EOF
5866                 #!$SHELL
5867                 SHARED_LIB=\$1
5868                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5869                 shift
5870                 cat <<-EOF
5871                 Linking shared library
5872                 ** SHARED_LIB \$SHARED_LIB
5873                 ** IMPORT_LIB \$IMPORT_LIB
5874 EOF
5875                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5876 CF_EOF
5877                 chmod +x mk_shared_lib.sh
5878                 ;;
5879         (openbsd[2-9].*|mirbsd*)
5880                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5881                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5882                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5883                 fi
5884                 if test "$cf_cv_enable_rpath" = yes ; then
5885                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5886                 fi
5887                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5888
5889         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5890         if test "$cf_cv_shlib_version" = rel; then
5891                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5892         else
5893                 cf_cv_shared_soname='`basename $@`'
5894         fi
5895
5896                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5897                 ;;
5898         (nto-qnx*|openbsd*|freebsd[12].*)
5899                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5900                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5901                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5902                 ;;
5903         (dragonfly*|freebsd*)
5904                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5905                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5906                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5907                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5908                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5909                 fi
5910
5911         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5912         if test "$cf_cv_shlib_version" = rel; then
5913                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5914         else
5915                 cf_cv_shared_soname='`basename $@`'
5916         fi
5917
5918                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5919                 ;;
5920         (netbsd*)
5921                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5922                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5923                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5924                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5925                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5926                         if test "$cf_cv_shlib_version" = auto; then
5927                         if test -f /usr/libexec/ld.elf_so; then
5928                                 cf_cv_shlib_version=abi
5929                         else
5930                                 cf_cv_shlib_version=rel
5931                         fi
5932                         fi
5933
5934         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5935         if test "$cf_cv_shlib_version" = rel; then
5936                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5937         else
5938                 cf_cv_shared_soname='`basename $@`'
5939         fi
5940
5941                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5942                 else
5943                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5944                 fi
5945                 ;;
5946         (osf*|mls+*)
5947                 # tested with OSF/1 V3.2 and 'cc'
5948                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5949                 # link with shared libs).
5950                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5951                 case $host_os in
5952                 (osf4*)
5953                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5954                         ;;
5955                 esac
5956                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5957                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5958                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5959                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5960                 fi
5961                 cf_cv_rm_so_locs=yes
5962                 ;;
5963         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5964                 # tested with osr5.0.5
5965                 if test "$GCC" != yes; then
5966                         CC_SHARED_OPTS='-belf -KPIC'
5967                 fi
5968                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5969                 if test "$cf_cv_enable_rpath" = yes ; then
5970                         # only way is to set LD_RUN_PATH but no switch for it
5971                         RUN_PATH=$libdir
5972                 fi
5973                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5974                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5975                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5976                 ;;
5977         (sunos4*)
5978                 # tested with SunOS 4.1.1 and gcc 2.7.0
5979                 if test "$GCC" != yes; then
5980                         CC_SHARED_OPTS='-KPIC'
5981                 fi
5982                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5983                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5984                 ;;
5985         (solaris2*)
5986                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5987                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5988                 if test "$DFT_LWR_MODEL" = "shared" ; then
5989                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5990                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5991                 fi
5992                 if test "$cf_cv_enable_rpath" = yes ; then
5993                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5994                 fi
5995
5996         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5997         if test "$cf_cv_shlib_version" = rel; then
5998                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5999         else
6000                 cf_cv_shared_soname='`basename $@`'
6001         fi
6002
6003                 if test "$GCC" != yes; then
6004                         cf_save_CFLAGS="$CFLAGS"
6005                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6006                         do
6007                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6008                                 cat >conftest.$ac_ext <<_ACEOF
6009 #line 6009 "configure"
6010 #include "confdefs.h"
6011 #include <stdio.h>
6012 int
6013 main (void)
6014 {
6015 printf("Hello\n");
6016   ;
6017   return 0;
6018 }
6019 _ACEOF
6020 rm -f conftest.$ac_objext
6021 if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5
6022   (eval $ac_compile) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); } &&
6026          { ac_try='test -s conftest.$ac_objext'
6027   { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:6030: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   break
6033 else
6034   echo "$as_me: failed program was:" >&5
6035 cat conftest.$ac_ext >&5
6036 fi
6037 rm -f conftest.$ac_objext conftest.$ac_ext
6038                         done
6039                         CFLAGS="$cf_save_CFLAGS"
6040                         CC_SHARED_OPTS=$cf_shared_opts
6041                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6042                 else
6043                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6044                 fi
6045                 ;;
6046         (sysv5uw7*|unix_sv*)
6047                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6048                 if test "$GCC" != yes; then
6049                         CC_SHARED_OPTS='-KPIC'
6050                 fi
6051                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6052                 ;;
6053         (*)
6054                 CC_SHARED_OPTS='unknown'
6055                 MK_SHARED_LIB='echo unknown'
6056                 ;;
6057         esac
6058
6059         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6060         case "$cf_cv_shlib_version" in
6061         (rel|abi)
6062                 case "$MK_SHARED_LIB" in
6063                 (*'-o $@')
6064                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6065                         ;;
6066                 (*)
6067                         { echo "$as_me:6067: WARNING: ignored --with-shlib-version" >&5
6068 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6069                         ;;
6070                 esac
6071                 ;;
6072         esac
6073
6074         if test -n "$cf_try_cflags"
6075         then
6076 cat > conftest.$ac_ext <<EOF
6077 #line 6077 "${as_me:-configure}"
6078 #include <stdio.h>
6079 int main(int argc, char *argv[])
6080 {
6081         printf("hello\n");
6082         return (argv[argc-1] == 0) ;
6083 }
6084 EOF
6085                 cf_save_CFLAGS="$CFLAGS"
6086                 for cf_opt in $cf_try_cflags
6087                 do
6088                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6089                         echo "$as_me:6089: checking if CFLAGS option -$cf_opt works" >&5
6090 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6091                         if { (eval echo "$as_me:6091: \"$ac_compile\"") >&5
6092   (eval $ac_compile) 2>&5
6093   ac_status=$?
6094   echo "$as_me:6094: \$? = $ac_status" >&5
6095   (exit $ac_status); }; then
6096                                 echo "$as_me:6096: result: yes" >&5
6097 echo "${ECHO_T}yes" >&6
6098                                 cf_save_CFLAGS="$CFLAGS"
6099                         else
6100                                 echo "$as_me:6100: result: no" >&5
6101 echo "${ECHO_T}no" >&6
6102                         fi
6103                 done
6104                 CFLAGS="$cf_save_CFLAGS"
6105         fi
6106
6107         # RPATH_LIST is a colon-separated list of directories
6108         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6109         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6110
6111         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6112
6113         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6114
6115 echo "${as_me:-configure}:6115: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6116
6117         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6118
6119 echo "${as_me:-configure}:6119: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6120
6121 for model in $cf_list_models; do
6122         case $model in
6123         (libtool)
6124
6125 echo "$as_me:6125: checking for additional libtool options" >&5
6126 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6127
6128 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6129 if test "${with_libtool_opts+set}" = set; then
6130   withval="$with_libtool_opts"
6131   with_libtool_opts=$withval
6132 else
6133   with_libtool_opts=no
6134 fi;
6135 echo "$as_me:6135: result: $with_libtool_opts" >&5
6136 echo "${ECHO_T}$with_libtool_opts" >&6
6137
6138 case .$with_libtool_opts in
6139 (.yes|.no|.)
6140         ;;
6141 (*)
6142         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6143         ;;
6144 esac
6145
6146 echo "$as_me:6146: checking if exported-symbols file should be used" >&5
6147 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6148
6149 # Check whether --with-export-syms or --without-export-syms was given.
6150 if test "${with_export_syms+set}" = set; then
6151   withval="$with_export_syms"
6152   with_export_syms=$withval
6153 else
6154   with_export_syms=no
6155 fi;
6156 if test "x$with_export_syms" = xyes
6157 then
6158         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6159
6160 fi
6161 echo "$as_me:6161: result: $with_export_syms" >&5
6162 echo "${ECHO_T}$with_export_syms" >&6
6163 if test "x$with_export_syms" != xno
6164 then
6165         EXPORT_SYMS="-export-symbols $with_export_syms"
6166
6167 fi
6168
6169                 ;;
6170         (shared)
6171                 if test "$CC_SHARED_OPTS" = "unknown"; then
6172                         { { echo "$as_me:6172: error: Shared libraries are not supported in this version" >&5
6173 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6174    { (exit 1); exit 1; }; }
6175                 fi
6176                 # workaround for inept transition to PIE vs PIC...
6177                 echo "$as_me:6177: checking if current CFLAGS link properly" >&5
6178 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6179                 cat >conftest.$ac_ext <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182 #include <stdio.h>
6183 int
6184 main (void)
6185 {
6186 printf("Hello work\n");
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f conftest.$ac_objext conftest$ac_exeext
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit $ac_status); } &&
6197          { ac_try='test -s conftest$ac_exeext'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit $ac_status); }; }; then
6203   cf_cflags_work=yes
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 cf_cflags_work=no
6208 fi
6209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6210                 echo "$as_me:6210: result: $cf_cflags_work" >&5
6211 echo "${ECHO_T}$cf_cflags_work" >&6
6212                 if test "$cf_cflags_work" = no
6213                 then
6214                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6215
6216 echo "${as_me:-configure}:6216: testing try to work around by appending shared-options ..." 1>&5
6217
6218                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6219                 fi
6220
6221 echo "$as_me:6221: checking if versioned-symbols file should be used" >&5
6222 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6223
6224 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6225 if test "${with_versioned_syms+set}" = set; then
6226   withval="$with_versioned_syms"
6227   with_versioned_syms=$withval
6228 else
6229   with_versioned_syms=no
6230 fi;
6231 if test "x$with_versioned_syms" = xyes
6232 then
6233         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6234
6235 fi
6236 echo "$as_me:6236: result: $with_versioned_syms" >&5
6237 echo "${ECHO_T}$with_versioned_syms" >&6
6238
6239 RESULTING_SYMS=
6240 VERSIONED_SYMS=
6241 WILDCARD_SYMS=
6242
6243 if test "x$with_versioned_syms" != xno
6244 then
6245         RESULTING_SYMS=$with_versioned_syms
6246         case "x$MK_SHARED_LIB" in
6247         (*-Wl,*)
6248                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6249                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6250                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6251
6252 echo "${as_me:-configure}:6252: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6253
6254                 ;;
6255         (*-dy\ *)
6256                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6257                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6258                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6259
6260 echo "${as_me:-configure}:6260: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6261
6262                 ;;
6263         (*)
6264                 { echo "$as_me:6264: WARNING: this system does not support versioned-symbols" >&5
6265 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6266                 ;;
6267         esac
6268
6269         # Linux ld can selectively override scope, e.g., of symbols beginning with
6270         # "_" by first declaring some as global, and then using a wildcard to
6271         # declare the others as local.  Some other loaders cannot do this.  Check
6272         # by constructing a (very) simple shared library and inspecting its
6273         # symbols.
6274         if test "x$VERSIONED_SYMS" != "x"
6275         then
6276                 echo "$as_me:6276: checking if wildcards can be used to selectively omit symbols" >&5
6277 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6278                 WILDCARD_SYMS=no
6279
6280                 # make sources
6281                 rm -f conftest.*
6282
6283                 cat >conftest.ver <<EOF
6284 module_1.0 {
6285 global:
6286         globalf1;
6287 local:
6288         localf1;
6289 };
6290 module_2.0 {
6291 global:
6292         globalf2;
6293 local:
6294         localf2;
6295         _*;
6296 } module_1.0;
6297 submodule_1.0 {
6298 global:
6299         subglobalf1;
6300         _ismissing;
6301 local:
6302         sublocalf1;
6303 };
6304 submodule_2.0 {
6305 global:
6306         subglobalf2;
6307 local:
6308         sublocalf2;
6309         _*;
6310 } submodule_1.0;
6311 EOF
6312                 cat >conftest.$ac_ext <<EOF
6313 #line 6313 "configure"
6314 int     _ismissing(void) { return 1; }
6315 int     _localf1(void) { return 1; }
6316 int     _localf2(void) { return 2; }
6317 int     globalf1(void) { return 1; }
6318 int     globalf2(void) { return 2; }
6319 int     _sublocalf1(void) { return 1; }
6320 int     _sublocalf2(void) { return 2; }
6321 int     subglobalf1(void) { return 1; }
6322 int     subglobalf2(void) { return 2; }
6323 EOF
6324                 cat >conftest.mk <<EOF
6325 CC=${CC}
6326 CFLAGS=${CFLAGS}
6327 CPPFLAGS=${CPPFLAGS}
6328 LDFLAGS=${LDFLAGS}
6329 LIBS=${LIBS}
6330 VERSIONED_SYMS=${VERSIONED_SYMS}
6331 RESULTING_SYMS=conftest.ver
6332 MK_SHARED_LIB=${MK_SHARED_LIB}
6333 conftest.so: conftest.$ac_cv_objext
6334                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6335 EOF
6336
6337                 # compile source, make library
6338                 if make -f conftest.mk 2>&5 >/dev/null
6339                 then
6340                         # test for missing symbol in either Data or Text section
6341                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6342                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6343                 fi
6344                 echo "$as_me:6344: result: $WILDCARD_SYMS" >&5
6345 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6346                 rm -f conftest.*
6347         fi
6348 fi
6349
6350                 ;;
6351         esac
6352 done
6353
6354 ### Checks for special libraries, must be done up-front.
6355 SHLIB_LIST=""
6356
6357 echo "$as_me:6357: checking if you want to link with the GPM mouse library" >&5
6358 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6359
6360 # Check whether --with-gpm or --without-gpm was given.
6361 if test "${with_gpm+set}" = set; then
6362   withval="$with_gpm"
6363   with_gpm=$withval
6364 else
6365   with_gpm=maybe
6366 fi;
6367 echo "$as_me:6367: result: $with_gpm" >&5
6368 echo "${ECHO_T}$with_gpm" >&6
6369
6370 if test "$with_gpm" != no ; then
6371         echo "$as_me:6371: checking for gpm.h" >&5
6372 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6373 if test "${ac_cv_header_gpm_h+set}" = set; then
6374   echo $ECHO_N "(cached) $ECHO_C" >&6
6375 else
6376   cat >conftest.$ac_ext <<_ACEOF
6377 #line 6377 "configure"
6378 #include "confdefs.h"
6379 #include <gpm.h>
6380 _ACEOF
6381 if { (eval echo "$as_me:6381: \"$ac_cpp conftest.$ac_ext\"") >&5
6382   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6383   ac_status=$?
6384   egrep -v '^ *\+' conftest.er1 >conftest.err
6385   rm -f conftest.er1
6386   cat conftest.err >&5
6387   echo "$as_me:6387: \$? = $ac_status" >&5
6388   (exit $ac_status); } >/dev/null; then
6389   if test -s conftest.err; then
6390     ac_cpp_err=$ac_c_preproc_warn_flag
6391   else
6392     ac_cpp_err=
6393   fi
6394 else
6395   ac_cpp_err=yes
6396 fi
6397 if test -z "$ac_cpp_err"; then
6398   ac_cv_header_gpm_h=yes
6399 else
6400   echo "$as_me: failed program was:" >&5
6401   cat conftest.$ac_ext >&5
6402   ac_cv_header_gpm_h=no
6403 fi
6404 rm -f conftest.err conftest.$ac_ext
6405 fi
6406 echo "$as_me:6406: result: $ac_cv_header_gpm_h" >&5
6407 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6408 if test $ac_cv_header_gpm_h = yes; then
6409
6410 cat >>confdefs.h <<\EOF
6411 #define HAVE_GPM_H 1
6412 EOF
6413
6414                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6415                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6416
6417 echo "${as_me:-configure}:6417: testing assuming we really have GPM library ..." 1>&5
6418
6419 cat >>confdefs.h <<\EOF
6420 #define HAVE_LIBGPM 1
6421 EOF
6422
6423                         with_gpm=yes
6424                 else
6425                         echo "$as_me:6425: checking for Gpm_Open in -lgpm" >&5
6426 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6427 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6428   echo $ECHO_N "(cached) $ECHO_C" >&6
6429 else
6430   ac_check_lib_save_LIBS=$LIBS
6431 LIBS="-lgpm  $LIBS"
6432 cat >conftest.$ac_ext <<_ACEOF
6433 #line 6433 "configure"
6434 #include "confdefs.h"
6435
6436 /* Override any gcc2 internal prototype to avoid an error.  */
6437 #ifdef __cplusplus
6438 extern "C"
6439 #endif
6440 /* We use char because int might match the return type of a gcc2
6441    builtin and then its argument prototype would still apply.  */
6442 char Gpm_Open ();
6443 int
6444 main (void)
6445 {
6446 Gpm_Open ();
6447   ;
6448   return 0;
6449 }
6450 _ACEOF
6451 rm -f conftest.$ac_objext conftest$ac_exeext
6452 if { (eval echo "$as_me:6452: \"$ac_link\"") >&5
6453   (eval $ac_link) 2>&5
6454   ac_status=$?
6455   echo "$as_me:6455: \$? = $ac_status" >&5
6456   (exit $ac_status); } &&
6457          { ac_try='test -s conftest$ac_exeext'
6458   { (eval echo "$as_me:6458: \"$ac_try\"") >&5
6459   (eval $ac_try) 2>&5
6460   ac_status=$?
6461   echo "$as_me:6461: \$? = $ac_status" >&5
6462   (exit $ac_status); }; }; then
6463   ac_cv_lib_gpm_Gpm_Open=yes
6464 else
6465   echo "$as_me: failed program was:" >&5
6466 cat conftest.$ac_ext >&5
6467 ac_cv_lib_gpm_Gpm_Open=no
6468 fi
6469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6470 LIBS=$ac_check_lib_save_LIBS
6471 fi
6472 echo "$as_me:6472: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6473 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6474 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6475   with_gpm=yes
6476 else
6477
6478                                 if test "$with_gpm" = maybe; then
6479                                         { echo "$as_me:6479: WARNING: Cannot link with GPM library" >&5
6480 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6481                                         with_gpm=no
6482                                 else
6483                                         { { echo "$as_me:6483: error: Cannot link with GPM library" >&5
6484 echo "$as_me: error: Cannot link with GPM library" >&2;}
6485    { (exit 1); exit 1; }; }
6486                                 fi
6487
6488 fi
6489
6490                 fi
6491
6492 else
6493
6494                 test "$with_gpm" != maybe && { echo "$as_me:6494: WARNING: Cannot find GPM header" >&5
6495 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6496                 with_gpm=no
6497
6498 fi
6499
6500 fi
6501
6502 if test "$with_gpm" != no ; then
6503         echo "$as_me:6503: checking if you want to load GPM dynamically" >&5
6504 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6505
6506 # Check whether --with-dlsym or --without-dlsym was given.
6507 if test "${with_dlsym+set}" = set; then
6508   withval="$with_dlsym"
6509   with_dlsym=$withval
6510 else
6511   with_dlsym=yes
6512 fi;
6513         echo "$as_me:6513: result: $with_dlsym" >&5
6514 echo "${ECHO_T}$with_dlsym" >&6
6515         if test "x$with_dlsym" = xyes ; then
6516
6517 cf_have_dlsym=no
6518 echo "$as_me:6518: checking for dlsym" >&5
6519 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6520 if test "${ac_cv_func_dlsym+set}" = set; then
6521   echo $ECHO_N "(cached) $ECHO_C" >&6
6522 else
6523   cat >conftest.$ac_ext <<_ACEOF
6524 #line 6524 "configure"
6525 #include "confdefs.h"
6526 #define dlsym autoconf_temporary
6527 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6528 #undef dlsym
6529
6530 #ifdef __cplusplus
6531 extern "C"
6532 #endif
6533
6534 /* We use char because int might match the return type of a gcc2
6535    builtin and then its argument prototype would still apply.  */
6536 char dlsym (void);
6537
6538 int
6539 main (void)
6540 {
6541
6542 /* The GNU C library defines stubs for functions which it implements
6543     to always fail with ENOSYS.  Some functions are actually named
6544     something starting with __ and the normal name is an alias.  */
6545 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6546 #error found stub for dlsym
6547 #endif
6548
6549         return dlsym ();
6550   ;
6551   return 0;
6552 }
6553 _ACEOF
6554 rm -f conftest.$ac_objext conftest$ac_exeext
6555 if { (eval echo "$as_me:6555: \"$ac_link\"") >&5
6556   (eval $ac_link) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); } &&
6560          { ac_try='test -s conftest$ac_exeext'
6561   { (eval echo "$as_me:6561: \"$ac_try\"") >&5
6562   (eval $ac_try) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); }; }; then
6566   ac_cv_func_dlsym=yes
6567 else
6568   echo "$as_me: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 ac_cv_func_dlsym=no
6571 fi
6572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6573 fi
6574 echo "$as_me:6574: result: $ac_cv_func_dlsym" >&5
6575 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6576 if test $ac_cv_func_dlsym = yes; then
6577   cf_have_dlsym=yes
6578 else
6579
6580 cf_have_libdl=no
6581 echo "$as_me:6581: checking for dlsym in -ldl" >&5
6582 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6583 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6584   echo $ECHO_N "(cached) $ECHO_C" >&6
6585 else
6586   ac_check_lib_save_LIBS=$LIBS
6587 LIBS="-ldl  $LIBS"
6588 cat >conftest.$ac_ext <<_ACEOF
6589 #line 6589 "configure"
6590 #include "confdefs.h"
6591
6592 /* Override any gcc2 internal prototype to avoid an error.  */
6593 #ifdef __cplusplus
6594 extern "C"
6595 #endif
6596 /* We use char because int might match the return type of a gcc2
6597    builtin and then its argument prototype would still apply.  */
6598 char dlsym ();
6599 int
6600 main (void)
6601 {
6602 dlsym ();
6603   ;
6604   return 0;
6605 }
6606 _ACEOF
6607 rm -f conftest.$ac_objext conftest$ac_exeext
6608 if { (eval echo "$as_me:6608: \"$ac_link\"") >&5
6609   (eval $ac_link) 2>&5
6610   ac_status=$?
6611   echo "$as_me:6611: \$? = $ac_status" >&5
6612   (exit $ac_status); } &&
6613          { ac_try='test -s conftest$ac_exeext'
6614   { (eval echo "$as_me:6614: \"$ac_try\"") >&5
6615   (eval $ac_try) 2>&5
6616   ac_status=$?
6617   echo "$as_me:6617: \$? = $ac_status" >&5
6618   (exit $ac_status); }; }; then
6619   ac_cv_lib_dl_dlsym=yes
6620 else
6621   echo "$as_me: failed program was:" >&5
6622 cat conftest.$ac_ext >&5
6623 ac_cv_lib_dl_dlsym=no
6624 fi
6625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6626 LIBS=$ac_check_lib_save_LIBS
6627 fi
6628 echo "$as_me:6628: result: $ac_cv_lib_dl_dlsym" >&5
6629 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6630 if test $ac_cv_lib_dl_dlsym = yes; then
6631
6632         cf_have_dlsym=yes
6633         cf_have_libdl=yes
6634 fi
6635
6636 fi
6637
6638 if test "$cf_have_dlsym" = yes ; then
6639         test "$cf_have_libdl" = yes && {
6640 cf_add_libs="-ldl"
6641 # Filter out duplicates - this happens with badly-designed ".pc" files...
6642 for cf_add_1lib in $LIBS
6643 do
6644         for cf_add_2lib in $cf_add_libs
6645         do
6646                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6647                 then
6648                         cf_add_1lib=
6649                         break
6650                 fi
6651         done
6652         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6653 done
6654 LIBS="$cf_add_libs"
6655  }
6656
6657         echo "$as_me:6657: checking whether able to link to dl*() functions" >&5
6658 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6659         cat >conftest.$ac_ext <<_ACEOF
6660 #line 6660 "configure"
6661 #include "confdefs.h"
6662 #include <dlfcn.h>
6663 int
6664 main (void)
6665 {
6666
6667                 void *obj;
6668                 if ((obj = dlopen("filename", 0)) != 0) {
6669                         if (dlsym(obj, "symbolname") == 0) {
6670                         dlclose(obj);
6671                         }
6672                 }
6673   ;
6674   return 0;
6675 }
6676 _ACEOF
6677 rm -f conftest.$ac_objext conftest$ac_exeext
6678 if { (eval echo "$as_me:6678: \"$ac_link\"") >&5
6679   (eval $ac_link) 2>&5
6680   ac_status=$?
6681   echo "$as_me:6681: \$? = $ac_status" >&5
6682   (exit $ac_status); } &&
6683          { ac_try='test -s conftest$ac_exeext'
6684   { (eval echo "$as_me:6684: \"$ac_try\"") >&5
6685   (eval $ac_try) 2>&5
6686   ac_status=$?
6687   echo "$as_me:6687: \$? = $ac_status" >&5
6688   (exit $ac_status); }; }; then
6689
6690 cat >>confdefs.h <<\EOF
6691 #define HAVE_LIBDL 1
6692 EOF
6693
6694 else
6695   echo "$as_me: failed program was:" >&5
6696 cat conftest.$ac_ext >&5
6697
6698                 { { echo "$as_me:6698: error: Cannot link test program for libdl" >&5
6699 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6700    { (exit 1); exit 1; }; }
6701 fi
6702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6703         echo "$as_me:6703: result: ok" >&5
6704 echo "${ECHO_T}ok" >&6
6705 else
6706         { { echo "$as_me:6706: error: Cannot find dlsym function" >&5
6707 echo "$as_me: error: Cannot find dlsym function" >&2;}
6708    { (exit 1); exit 1; }; }
6709 fi
6710
6711                 if test "x$with_gpm" != xyes ; then
6712                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6713
6714 echo "${as_me:-configure}:6714: testing assuming soname for gpm is $with_gpm ..." 1>&5
6715
6716                         cf_cv_gpm_soname="$with_gpm"
6717                 else
6718
6719 echo "$as_me:6719: checking for soname of gpm library" >&5
6720 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6721 if test "${cf_cv_gpm_soname+set}" = set; then
6722   echo $ECHO_N "(cached) $ECHO_C" >&6
6723 else
6724
6725 cf_cv_gpm_soname=unknown
6726 if test "$cross_compiling" != yes ; then
6727 cat >conftest.$ac_ext <<CF_EOF
6728 #include <gpm.h>
6729 int main(void)
6730 {
6731 if (Gpm_Open(0,0)) Gpm_Close();
6732         ${cf_cv_main_return:-return}(0);
6733 }
6734 CF_EOF
6735 cf_save_LIBS="$LIBS"
6736
6737 cf_add_libs="-lgpm"
6738 # Filter out duplicates - this happens with badly-designed ".pc" files...
6739 for cf_add_1lib in $LIBS
6740 do
6741         for cf_add_2lib in $cf_add_libs
6742         do
6743                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6744                 then
6745                         cf_add_1lib=
6746                         break
6747                 fi
6748         done
6749         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6750 done
6751 LIBS="$cf_add_libs"
6752
6753         if { (eval echo "$as_me:6753: \"$ac_compile\"") >&5
6754   (eval $ac_compile) 2>&5
6755   ac_status=$?
6756   echo "$as_me:6756: \$? = $ac_status" >&5
6757   (exit $ac_status); } ; then
6758                 if { (eval echo "$as_me:6758: \"$ac_link\"") >&5
6759   (eval $ac_link) 2>&5
6760   ac_status=$?
6761   echo "$as_me:6761: \$? = $ac_status" >&5
6762   (exit $ac_status); } ; then
6763                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6764                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6765                 fi
6766         fi
6767 rm -rf conftest*
6768 LIBS="$cf_save_LIBS"
6769 fi
6770
6771 fi
6772 echo "$as_me:6772: result: $cf_cv_gpm_soname" >&5
6773 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6774
6775                 fi
6776                 test "$cf_cv_gpm_soname" != "unknown" &&
6777 cat >>confdefs.h <<EOF
6778 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6779 EOF
6780
6781                 SHLIB_LIST="-ldl $SHLIB_LIST"
6782
6783 cf_add_libs="-ldl"
6784 # Filter out duplicates - this happens with badly-designed ".pc" files...
6785 for cf_add_1lib in $PRIVATE_LIBS
6786 do
6787         for cf_add_2lib in $cf_add_libs
6788         do
6789                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6790                 then
6791                         cf_add_1lib=
6792                         break
6793                 fi
6794         done
6795         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6796 done
6797 PRIVATE_LIBS="$cf_add_libs"
6798
6799         else
6800                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6801
6802 cf_add_libs="-lgpm"
6803 # Filter out duplicates - this happens with badly-designed ".pc" files...
6804 for cf_add_1lib in $TEST_LIBS
6805 do
6806         for cf_add_2lib in $cf_add_libs
6807         do
6808                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6809                 then
6810                         cf_add_1lib=
6811                         break
6812                 fi
6813         done
6814         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6815 done
6816 TEST_LIBS="$cf_add_libs"
6817
6818 cf_add_libs="-lgpm"
6819 # Filter out duplicates - this happens with badly-designed ".pc" files...
6820 for cf_add_1lib in $PRIVATE_LIBS
6821 do
6822         for cf_add_2lib in $cf_add_libs
6823         do
6824                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6825                 then
6826                         cf_add_1lib=
6827                         break
6828                 fi
6829         done
6830         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6831 done
6832 PRIVATE_LIBS="$cf_add_libs"
6833
6834         fi
6835
6836 cat >>confdefs.h <<\EOF
6837 #define HAVE_LIBGPM 1
6838 EOF
6839
6840 echo "$as_me:6840: checking for Gpm_Wgetch in -lgpm" >&5
6841 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6842 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6843   echo $ECHO_N "(cached) $ECHO_C" >&6
6844 else
6845   ac_check_lib_save_LIBS=$LIBS
6846 LIBS="-lgpm  $LIBS"
6847 cat >conftest.$ac_ext <<_ACEOF
6848 #line 6848 "configure"
6849 #include "confdefs.h"
6850
6851 /* Override any gcc2 internal prototype to avoid an error.  */
6852 #ifdef __cplusplus
6853 extern "C"
6854 #endif
6855 /* We use char because int might match the return type of a gcc2
6856    builtin and then its argument prototype would still apply.  */
6857 char Gpm_Wgetch ();
6858 int
6859 main (void)
6860 {
6861 Gpm_Wgetch ();
6862   ;
6863   return 0;
6864 }
6865 _ACEOF
6866 rm -f conftest.$ac_objext conftest$ac_exeext
6867 if { (eval echo "$as_me:6867: \"$ac_link\"") >&5
6868   (eval $ac_link) 2>&5
6869   ac_status=$?
6870   echo "$as_me:6870: \$? = $ac_status" >&5
6871   (exit $ac_status); } &&
6872          { ac_try='test -s conftest$ac_exeext'
6873   { (eval echo "$as_me:6873: \"$ac_try\"") >&5
6874   (eval $ac_try) 2>&5
6875   ac_status=$?
6876   echo "$as_me:6876: \$? = $ac_status" >&5
6877   (exit $ac_status); }; }; then
6878   ac_cv_lib_gpm_Gpm_Wgetch=yes
6879 else
6880   echo "$as_me: failed program was:" >&5
6881 cat conftest.$ac_ext >&5
6882 ac_cv_lib_gpm_Gpm_Wgetch=no
6883 fi
6884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6885 LIBS=$ac_check_lib_save_LIBS
6886 fi
6887 echo "$as_me:6887: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6888 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6889 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6890
6891 echo "$as_me:6891: checking if GPM is weakly bound to curses library" >&5
6892 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6893 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6894   echo $ECHO_N "(cached) $ECHO_C" >&6
6895 else
6896
6897 cf_cv_check_gpm_wgetch=unknown
6898 if test "$cross_compiling" != yes ; then
6899
6900 cat >conftest.$ac_ext <<CF_EOF
6901 #include <gpm.h>
6902 int main(void)
6903 {
6904         Gpm_Wgetch();
6905         ${cf_cv_main_return:-return}(0);
6906 }
6907 CF_EOF
6908
6909         cf_save_LIBS="$LIBS"
6910         # This only works if we can look at the symbol table.  If a shared
6911         # library is stripped for install, we cannot use that.  So we're forced
6912         # to rely on the static library, noting that some packagers may not
6913         # include it.
6914         LIBS="-static -lgpm -dynamic $LIBS"
6915         if { (eval echo "$as_me:6915: \"$ac_compile\"") >&5
6916   (eval $ac_compile) 2>&5
6917   ac_status=$?
6918   echo "$as_me:6918: \$? = $ac_status" >&5
6919   (exit $ac_status); } ; then
6920                 if { (eval echo "$as_me:6920: \"$ac_link\"") >&5
6921   (eval $ac_link) 2>&5
6922   ac_status=$?
6923   echo "$as_me:6923: \$? = $ac_status" >&5
6924   (exit $ac_status); } ; then
6925                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6926                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6927                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6928                 fi
6929         fi
6930         rm -rf conftest*
6931         LIBS="$cf_save_LIBS"
6932 fi
6933
6934 fi
6935 echo "$as_me:6935: result: $cf_cv_check_gpm_wgetch" >&5
6936 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6937
6938 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6939         { echo "$as_me:6939: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6940 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6941 fi
6942
6943 fi
6944
6945 fi
6946
6947 echo "$as_me:6947: checking if you want to use PCRE2 for regular-expressions" >&5
6948 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6949
6950 # Check whether --with-pcre2 or --without-pcre2 was given.
6951 if test "${with_pcre2+set}" = set; then
6952   withval="$with_pcre2"
6953
6954 fi;
6955 test -z "$with_pcre2" && with_pcre2=no
6956 echo "$as_me:6956: result: $with_pcre2" >&5
6957 echo "${ECHO_T}$with_pcre2" >&6
6958
6959 if test "x$with_pcre2" != xno ; then
6960
6961 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6962         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6963
6964 echo "${as_me:-configure}:6964: testing found package libpcre2 ..." 1>&5
6965
6966         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6967         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6968         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6969
6970 echo "${as_me:-configure}:6970: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6971
6972         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6973
6974 echo "${as_me:-configure}:6974: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6975
6976 cf_fix_cppflags=no
6977 cf_new_cflags=
6978 cf_new_cppflags=
6979 cf_new_extra_cppflags=
6980
6981 for cf_add_cflags in $cf_pkgconfig_incs
6982 do
6983 case $cf_fix_cppflags in
6984 (no)
6985         case $cf_add_cflags in
6986         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6987                 case $cf_add_cflags in
6988                 (-D*)
6989                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6990
6991                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6992                                 && test -z "${cf_tst_cflags}" \
6993                                 && cf_fix_cppflags=yes
6994
6995                         if test $cf_fix_cppflags = yes ; then
6996
6997         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6998         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6999
7000                                 continue
7001                         elif test "${cf_tst_cflags}" = "\"'" ; then
7002
7003         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7004         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7005
7006                                 continue
7007                         fi
7008                         ;;
7009                 esac
7010                 case "$CPPFLAGS" in
7011                 (*$cf_add_cflags)
7012                         ;;
7013                 (*)
7014                         case $cf_add_cflags in
7015                         (-D*)
7016                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7017
7018 CPPFLAGS=`echo "$CPPFLAGS" | \
7019         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7020                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7021
7022                                 ;;
7023                         esac
7024
7025         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7026         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7027
7028                         ;;
7029                 esac
7030                 ;;
7031         (*)
7032
7033         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7034         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7035
7036                 ;;
7037         esac
7038         ;;
7039 (yes)
7040
7041         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7042         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7043
7044         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7045
7046         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7047                 && test -z "${cf_tst_cflags}" \
7048                 && cf_fix_cppflags=no
7049         ;;
7050 esac
7051 done
7052
7053 if test -n "$cf_new_cflags" ; then
7054
7055         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7056         CFLAGS="${CFLAGS}$cf_new_cflags"
7057
7058 fi
7059
7060 if test -n "$cf_new_cppflags" ; then
7061
7062         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7063         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7064
7065 fi
7066
7067 if test -n "$cf_new_extra_cppflags" ; then
7068
7069         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7070         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7071
7072 fi
7073
7074 cf_add_libs="$cf_pkgconfig_libs"
7075 # Filter out duplicates - this happens with badly-designed ".pc" files...
7076 for cf_add_1lib in $LIBS
7077 do
7078         for cf_add_2lib in $cf_add_libs
7079         do
7080                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7081                 then
7082                         cf_add_1lib=
7083                         break
7084                 fi
7085         done
7086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7087 done
7088 LIBS="$cf_add_libs"
7089
7090         :
7091 else
7092         cf_pkgconfig_incs=
7093         cf_pkgconfig_libs=
7094
7095 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7096         test -n "$verbose" && echo "    found package libpcre" 1>&6
7097
7098 echo "${as_me:-configure}:7098: testing found package libpcre ..." 1>&5
7099
7100         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7101         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7102         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7103
7104 echo "${as_me:-configure}:7104: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7105
7106         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7107
7108 echo "${as_me:-configure}:7108: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7109
7110 cf_fix_cppflags=no
7111 cf_new_cflags=
7112 cf_new_cppflags=
7113 cf_new_extra_cppflags=
7114
7115 for cf_add_cflags in $cf_pkgconfig_incs
7116 do
7117 case $cf_fix_cppflags in
7118 (no)
7119         case $cf_add_cflags in
7120         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7121                 case $cf_add_cflags in
7122                 (-D*)
7123                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7124
7125                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7126                                 && test -z "${cf_tst_cflags}" \
7127                                 && cf_fix_cppflags=yes
7128
7129                         if test $cf_fix_cppflags = yes ; then
7130
7131         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7132         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7133
7134                                 continue
7135                         elif test "${cf_tst_cflags}" = "\"'" ; then
7136
7137         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7138         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7139
7140                                 continue
7141                         fi
7142                         ;;
7143                 esac
7144                 case "$CPPFLAGS" in
7145                 (*$cf_add_cflags)
7146                         ;;
7147                 (*)
7148                         case $cf_add_cflags in
7149                         (-D*)
7150                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7151
7152 CPPFLAGS=`echo "$CPPFLAGS" | \
7153         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7154                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7155
7156                                 ;;
7157                         esac
7158
7159         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7160         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7161
7162                         ;;
7163                 esac
7164                 ;;
7165         (*)
7166
7167         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7168         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7169
7170                 ;;
7171         esac
7172         ;;
7173 (yes)
7174
7175         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7176         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7177
7178         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7179
7180         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7181                 && test -z "${cf_tst_cflags}" \
7182                 && cf_fix_cppflags=no
7183         ;;
7184 esac
7185 done
7186
7187 if test -n "$cf_new_cflags" ; then
7188
7189         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7190         CFLAGS="${CFLAGS}$cf_new_cflags"
7191
7192 fi
7193
7194 if test -n "$cf_new_cppflags" ; then
7195
7196         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7197         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7198
7199 fi
7200
7201 if test -n "$cf_new_extra_cppflags" ; then
7202
7203         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7204         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7205
7206 fi
7207
7208 cf_add_libs="$cf_pkgconfig_libs"
7209 # Filter out duplicates - this happens with badly-designed ".pc" files...
7210 for cf_add_1lib in $LIBS
7211 do
7212         for cf_add_2lib in $cf_add_libs
7213         do
7214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7215                 then
7216                         cf_add_1lib=
7217                         break
7218                 fi
7219         done
7220         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7221 done
7222 LIBS="$cf_add_libs"
7223
7224         :
7225 else
7226         cf_pkgconfig_incs=
7227         cf_pkgconfig_libs=
7228
7229                         { { echo "$as_me:7229: error: Cannot find PCRE2 library" >&5
7230 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7231    { (exit 1); exit 1; }; }
7232 fi
7233
7234 fi
7235
7236 cat >>confdefs.h <<\EOF
7237 #define HAVE_LIB_PCRE2 1
7238 EOF
7239
7240         # if pkgconfig gave no results, look for the libraries directly
7241         case $LIBS in
7242         (*pcre2-posix*|*pcreposix*)
7243                 ;;
7244         (*)
7245                 echo "$as_me:7245: checking for regcomp in -lpcre2-posix" >&5
7246 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7247 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7248   echo $ECHO_N "(cached) $ECHO_C" >&6
7249 else
7250   ac_check_lib_save_LIBS=$LIBS
7251 LIBS="-lpcre2-posix  $LIBS"
7252 cat >conftest.$ac_ext <<_ACEOF
7253 #line 7253 "configure"
7254 #include "confdefs.h"
7255
7256 /* Override any gcc2 internal prototype to avoid an error.  */
7257 #ifdef __cplusplus
7258 extern "C"
7259 #endif
7260 /* We use char because int might match the return type of a gcc2
7261    builtin and then its argument prototype would still apply.  */
7262 char regcomp ();
7263 int
7264 main (void)
7265 {
7266 regcomp ();
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 rm -f conftest.$ac_objext conftest$ac_exeext
7272 if { (eval echo "$as_me:7272: \"$ac_link\"") >&5
7273   (eval $ac_link) 2>&5
7274   ac_status=$?
7275   echo "$as_me:7275: \$? = $ac_status" >&5
7276   (exit $ac_status); } &&
7277          { ac_try='test -s conftest$ac_exeext'
7278   { (eval echo "$as_me:7278: \"$ac_try\"") >&5
7279   (eval $ac_try) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit $ac_status); }; }; then
7283   ac_cv_lib_pcre2_posix_regcomp=yes
7284 else
7285   echo "$as_me: failed program was:" >&5
7286 cat conftest.$ac_ext >&5
7287 ac_cv_lib_pcre2_posix_regcomp=no
7288 fi
7289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7290 LIBS=$ac_check_lib_save_LIBS
7291 fi
7292 echo "$as_me:7292: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7293 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7294 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7295
7296 cf_add_libs="-lpcre2-posix"
7297 # Filter out duplicates - this happens with badly-designed ".pc" files...
7298 for cf_add_1lib in $LIBS
7299 do
7300         for cf_add_2lib in $cf_add_libs
7301         do
7302                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7303                 then
7304                         cf_add_1lib=
7305                         break
7306                 fi
7307         done
7308         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7309 done
7310 LIBS="$cf_add_libs"
7311
7312 else
7313   echo "$as_me:7313: checking for regcomp in -lpcreposix" >&5
7314 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7315 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7316   echo $ECHO_N "(cached) $ECHO_C" >&6
7317 else
7318   ac_check_lib_save_LIBS=$LIBS
7319 LIBS="-lpcreposix  $LIBS"
7320 cat >conftest.$ac_ext <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7323
7324 /* Override any gcc2 internal prototype to avoid an error.  */
7325 #ifdef __cplusplus
7326 extern "C"
7327 #endif
7328 /* We use char because int might match the return type of a gcc2
7329    builtin and then its argument prototype would still apply.  */
7330 char regcomp ();
7331 int
7332 main (void)
7333 {
7334 regcomp ();
7335   ;
7336   return 0;
7337 }
7338 _ACEOF
7339 rm -f conftest.$ac_objext conftest$ac_exeext
7340 if { (eval echo "$as_me:7340: \"$ac_link\"") >&5
7341   (eval $ac_link) 2>&5
7342   ac_status=$?
7343   echo "$as_me:7343: \$? = $ac_status" >&5
7344   (exit $ac_status); } &&
7345          { ac_try='test -s conftest$ac_exeext'
7346   { (eval echo "$as_me:7346: \"$ac_try\"") >&5
7347   (eval $ac_try) 2>&5
7348   ac_status=$?
7349   echo "$as_me:7349: \$? = $ac_status" >&5
7350   (exit $ac_status); }; }; then
7351   ac_cv_lib_pcreposix_regcomp=yes
7352 else
7353   echo "$as_me: failed program was:" >&5
7354 cat conftest.$ac_ext >&5
7355 ac_cv_lib_pcreposix_regcomp=no
7356 fi
7357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7358 LIBS=$ac_check_lib_save_LIBS
7359 fi
7360 echo "$as_me:7360: result: $ac_cv_lib_pcreposix_regcomp" >&5
7361 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7362 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7363
7364 cf_add_libs="-lpcreposix"
7365 # Filter out duplicates - this happens with badly-designed ".pc" files...
7366 for cf_add_1lib in $LIBS
7367 do
7368         for cf_add_2lib in $cf_add_libs
7369         do
7370                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7371                 then
7372                         cf_add_1lib=
7373                         break
7374                 fi
7375         done
7376         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7377 done
7378 LIBS="$cf_add_libs"
7379
7380 else
7381   { { echo "$as_me:7381: error: Cannot find PCRE2 POSIX library" >&5
7382 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7383    { (exit 1); exit 1; }; }
7384 fi
7385
7386 fi
7387
7388                 ;;
7389         esac
7390
7391         # either way, check for the library header files
7392
7393 for ac_header in pcre2-posix.h pcreposix.h
7394 do
7395 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7396 echo "$as_me:7396: checking for $ac_header" >&5
7397 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7398 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7399   echo $ECHO_N "(cached) $ECHO_C" >&6
7400 else
7401   cat >conftest.$ac_ext <<_ACEOF
7402 #line 7402 "configure"
7403 #include "confdefs.h"
7404 #include <$ac_header>
7405 _ACEOF
7406 if { (eval echo "$as_me:7406: \"$ac_cpp conftest.$ac_ext\"") >&5
7407   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7408   ac_status=$?
7409   egrep -v '^ *\+' conftest.er1 >conftest.err
7410   rm -f conftest.er1
7411   cat conftest.err >&5
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit $ac_status); } >/dev/null; then
7414   if test -s conftest.err; then
7415     ac_cpp_err=$ac_c_preproc_warn_flag
7416   else
7417     ac_cpp_err=
7418   fi
7419 else
7420   ac_cpp_err=yes
7421 fi
7422 if test -z "$ac_cpp_err"; then
7423   eval "$as_ac_Header=yes"
7424 else
7425   echo "$as_me: failed program was:" >&5
7426   cat conftest.$ac_ext >&5
7427   eval "$as_ac_Header=no"
7428 fi
7429 rm -f conftest.err conftest.$ac_ext
7430 fi
7431 echo "$as_me:7431: result: `eval echo '${'$as_ac_Header'}'`" >&5
7432 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7433 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7434   cat >>confdefs.h <<EOF
7435 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7436 EOF
7437
7438 fi
7439 done
7440
7441 fi
7442
7443 # not everyone has "test -c"
7444 if test -c /dev/sysmouse 2>/dev/null ; then
7445 echo "$as_me:7445: checking if you want to use sysmouse" >&5
7446 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7447
7448 # Check whether --with-sysmouse or --without-sysmouse was given.
7449 if test "${with_sysmouse+set}" = set; then
7450   withval="$with_sysmouse"
7451   cf_with_sysmouse=$withval
7452 else
7453   cf_with_sysmouse=maybe
7454 fi;
7455         if test "$cf_with_sysmouse" != no ; then
7456         cat >conftest.$ac_ext <<_ACEOF
7457 #line 7457 "configure"
7458 #include "confdefs.h"
7459
7460 #include <osreldate.h>
7461 #if (__FreeBSD_version >= 400017)
7462 #include <sys/consio.h>
7463 #include <sys/fbio.h>
7464 #else
7465 #include <machine/console.h>
7466 #endif
7467
7468 int
7469 main (void)
7470 {
7471
7472         struct mouse_info the_mouse;
7473         ioctl(0, CONS_MOUSECTL, &the_mouse);
7474
7475   ;
7476   return 0;
7477 }
7478 _ACEOF
7479 rm -f conftest.$ac_objext
7480 if { (eval echo "$as_me:7480: \"$ac_compile\"") >&5
7481   (eval $ac_compile) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); } &&
7485          { ac_try='test -s conftest.$ac_objext'
7486   { (eval echo "$as_me:7486: \"$ac_try\"") >&5
7487   (eval $ac_try) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit $ac_status); }; }; then
7491   cf_with_sysmouse=yes
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 cat conftest.$ac_ext >&5
7495 cf_with_sysmouse=no
7496 fi
7497 rm -f conftest.$ac_objext conftest.$ac_ext
7498         fi
7499 echo "$as_me:7499: result: $cf_with_sysmouse" >&5
7500 echo "${ECHO_T}$cf_with_sysmouse" >&6
7501 test "$cf_with_sysmouse" = yes &&
7502 cat >>confdefs.h <<\EOF
7503 #define USE_SYSMOUSE 1
7504 EOF
7505
7506 fi
7507
7508 # pretend that ncurses==ncursesw==ncursest
7509 echo "$as_me:7509: checking if you want to disable library suffixes" >&5
7510 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7511
7512 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7513 if test "${enable_lib_suffixes+set}" = set; then
7514   enableval="$enable_lib_suffixes"
7515   test "$enableval" != no && enableval=yes
7516         if test "$enableval" != "yes" ; then
7517     disable_lib_suffixes=yes
7518         else
7519                 disable_lib_suffixes=no
7520         fi
7521 else
7522   enableval=yes
7523         disable_lib_suffixes=no
7524
7525 fi;
7526 echo "$as_me:7526: result: $disable_lib_suffixes" >&5
7527 echo "${ECHO_T}$disable_lib_suffixes" >&6
7528
7529 ### If we're building with rpath, try to link non-standard libs that way too.
7530 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7531
7532 echo "$as_me:7532: checking if rpath-hack should be disabled" >&5
7533 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7534
7535 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7536 if test "${enable_rpath_hack+set}" = set; then
7537   enableval="$enable_rpath_hack"
7538   test "$enableval" != no && enableval=yes
7539         if test "$enableval" != "yes" ; then
7540     cf_disable_rpath_hack=yes
7541         else
7542                 cf_disable_rpath_hack=no
7543         fi
7544 else
7545   enableval=yes
7546         cf_disable_rpath_hack=no
7547
7548 fi;
7549 echo "$as_me:7549: result: $cf_disable_rpath_hack" >&5
7550 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7551 if test "$cf_disable_rpath_hack" = no ; then
7552
7553 echo "$as_me:7553: checking for updated LDFLAGS" >&5
7554 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7555 if test -n "$LD_RPATH_OPT" ; then
7556         echo "$as_me:7556: result: maybe" >&5
7557 echo "${ECHO_T}maybe" >&6
7558
7559         for ac_prog in ldd
7560 do
7561   # Extract the first word of "$ac_prog", so it can be a program name with args.
7562 set dummy $ac_prog; ac_word=$2
7563 echo "$as_me:7563: checking for $ac_word" >&5
7564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7565 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7566   echo $ECHO_N "(cached) $ECHO_C" >&6
7567 else
7568   if test -n "$cf_ldd_prog"; then
7569   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7570 else
7571   ac_save_IFS=$IFS; IFS=$ac_path_separator
7572 ac_dummy="$PATH"
7573 for ac_dir in $ac_dummy; do
7574   IFS=$ac_save_IFS
7575   test -z "$ac_dir" && ac_dir=.
7576   $as_executable_p "$ac_dir/$ac_word" || continue
7577 ac_cv_prog_cf_ldd_prog="$ac_prog"
7578 echo "$as_me:7578: found $ac_dir/$ac_word" >&5
7579 break
7580 done
7581
7582 fi
7583 fi
7584 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7585 if test -n "$cf_ldd_prog"; then
7586   echo "$as_me:7586: result: $cf_ldd_prog" >&5
7587 echo "${ECHO_T}$cf_ldd_prog" >&6
7588 else
7589   echo "$as_me:7589: result: no" >&5
7590 echo "${ECHO_T}no" >&6
7591 fi
7592
7593   test -n "$cf_ldd_prog" && break
7594 done
7595 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7596
7597         cf_rpath_list="/usr/lib /lib"
7598         if test "$cf_ldd_prog" != no
7599         then
7600                 cf_rpath_oops=
7601
7602 cat >conftest.$ac_ext <<_ACEOF
7603 #line 7603 "configure"
7604 #include "confdefs.h"
7605 #include <stdio.h>
7606 int
7607 main (void)
7608 {
7609 printf("Hello");
7610   ;
7611   return 0;
7612 }
7613 _ACEOF
7614 rm -f conftest.$ac_objext conftest$ac_exeext
7615 if { (eval echo "$as_me:7615: \"$ac_link\"") >&5
7616   (eval $ac_link) 2>&5
7617   ac_status=$?
7618   echo "$as_me:7618: \$? = $ac_status" >&5
7619   (exit $ac_status); } &&
7620          { ac_try='test -s conftest$ac_exeext'
7621   { (eval echo "$as_me:7621: \"$ac_try\"") >&5
7622   (eval $ac_try) 2>&5
7623   ac_status=$?
7624   echo "$as_me:7624: \$? = $ac_status" >&5
7625   (exit $ac_status); }; }; then
7626   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7627                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7628 else
7629   echo "$as_me: failed program was:" >&5
7630 cat conftest.$ac_ext >&5
7631 fi
7632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7633
7634                 # If we passed the link-test, but get a "not found" on a given library,
7635                 # this could be due to inept reconfiguration of gcc to make it only
7636                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7637                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7638                 # /usr/local libraries.
7639                 if test -n "$cf_rpath_oops"
7640                 then
7641                         for cf_rpath_src in $cf_rpath_oops
7642                         do
7643                                 for cf_rpath_dir in \
7644                                         /usr/local \
7645                                         /usr/pkg \
7646                                         /opt/sfw
7647                                 do
7648                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7649                                         then
7650                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7651
7652 echo "${as_me:-configure}:7652: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7653
7654                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7655                                                 break
7656                                         fi
7657                                 done
7658                         done
7659                 fi
7660         fi
7661
7662         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7663
7664 echo "${as_me:-configure}:7664: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7665
7666 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7667
7668 echo "${as_me:-configure}:7668: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7669
7670 cf_rpath_dst=
7671 for cf_rpath_src in $LDFLAGS
7672 do
7673         case $cf_rpath_src in
7674         (-L*)
7675
7676                 # check if this refers to a directory which we will ignore
7677                 cf_rpath_skip=no
7678                 if test -n "$cf_rpath_list"
7679                 then
7680                         for cf_rpath_item in $cf_rpath_list
7681                         do
7682                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7683                                 then
7684                                         cf_rpath_skip=yes
7685                                         break
7686                                 fi
7687                         done
7688                 fi
7689
7690                 if test "$cf_rpath_skip" = no
7691                 then
7692                         # transform the option
7693                         if test "$LD_RPATH_OPT" = "-R " ; then
7694                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7695                         else
7696                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7697                         fi
7698
7699                         # if we have not already added this, add it now
7700                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7701                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7702                         then
7703                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7704
7705 echo "${as_me:-configure}:7705: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7706
7707                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7708                         fi
7709                 fi
7710                 ;;
7711         esac
7712         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7713 done
7714 LDFLAGS=$cf_rpath_dst
7715
7716 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7717
7718 echo "${as_me:-configure}:7718: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7719
7720 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7721
7722 echo "${as_me:-configure}:7722: testing ...checking LIBS $LIBS ..." 1>&5
7723
7724 cf_rpath_dst=
7725 for cf_rpath_src in $LIBS
7726 do
7727         case $cf_rpath_src in
7728         (-L*)
7729
7730                 # check if this refers to a directory which we will ignore
7731                 cf_rpath_skip=no
7732                 if test -n "$cf_rpath_list"
7733                 then
7734                         for cf_rpath_item in $cf_rpath_list
7735                         do
7736                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7737                                 then
7738                                         cf_rpath_skip=yes
7739                                         break
7740                                 fi
7741                         done
7742                 fi
7743
7744                 if test "$cf_rpath_skip" = no
7745                 then
7746                         # transform the option
7747                         if test "$LD_RPATH_OPT" = "-R " ; then
7748                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7749                         else
7750                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7751                         fi
7752
7753                         # if we have not already added this, add it now
7754                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7755                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7756                         then
7757                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7758
7759 echo "${as_me:-configure}:7759: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7760
7761                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7762                         fi
7763                 fi
7764                 ;;
7765         esac
7766         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7767 done
7768 LIBS=$cf_rpath_dst
7769
7770 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7771
7772 echo "${as_me:-configure}:7772: testing ...checked LIBS $LIBS ..." 1>&5
7773
7774         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7775
7776 echo "${as_me:-configure}:7776: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7777
7778 else
7779         echo "$as_me:7779: result: no" >&5
7780 echo "${ECHO_T}no" >&6
7781 fi
7782
7783 fi
7784
7785 fi
7786
7787 ###############################################################################
7788
7789 ###     use option --with-extra-suffix to append suffix to headers and libraries
7790 echo "$as_me:7790: checking if you wish to append extra suffix to header/library paths" >&5
7791 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7792 EXTRA_SUFFIX=
7793
7794 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7795 if test "${with_extra_suffix+set}" = set; then
7796   withval="$with_extra_suffix"
7797   case x$withval in
7798         (no)
7799                 ;;
7800         (xyes|x)
7801                 EXTRA_SUFFIX=$cf_cv_abi_version
7802                 ;;
7803         (*)
7804                 EXTRA_SUFFIX=$withval
7805                 ;;
7806         esac
7807
7808 fi;
7809 echo "$as_me:7809: result: $EXTRA_SUFFIX" >&5
7810 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7811
7812 ###     use option --disable-overwrite to leave out the link to -lcurses
7813 echo "$as_me:7813: checking if you wish to install ncurses overwriting curses" >&5
7814 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7815
7816 # Check whether --enable-overwrite or --disable-overwrite was given.
7817 if test "${enable_overwrite+set}" = set; then
7818   enableval="$enable_overwrite"
7819   with_overwrite=$enableval
7820 else
7821   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7822 fi;
7823 echo "$as_me:7823: result: $with_overwrite" >&5
7824 echo "${ECHO_T}$with_overwrite" >&6
7825
7826 echo "$as_me:7826: checking if external terminfo-database is used" >&5
7827 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7828
7829 # Check whether --enable-database or --disable-database was given.
7830 if test "${enable_database+set}" = set; then
7831   enableval="$enable_database"
7832   use_database=$enableval
7833 else
7834   use_database=yes
7835 fi;
7836 echo "$as_me:7836: result: $use_database" >&5
7837 echo "${ECHO_T}$use_database" >&6
7838
7839 case $host_os in
7840 (os2*)
7841         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7842         ;;
7843 (*)
7844         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7845         ;;
7846 esac
7847
7848 NCURSES_USE_DATABASE=0
7849 if test "$use_database" != no ; then
7850         NCURSES_USE_DATABASE=1
7851
7852         echo "$as_me:7852: checking which terminfo source-file will be installed" >&5
7853 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7854
7855 # Check whether --with-database or --without-database was given.
7856 if test "${with_database+set}" = set; then
7857   withval="$with_database"
7858   TERMINFO_SRC=$withval
7859 fi;
7860         echo "$as_me:7860: result: $TERMINFO_SRC" >&5
7861 echo "${ECHO_T}$TERMINFO_SRC" >&6
7862
7863         echo "$as_me:7863: checking whether to use hashed database instead of directory/tree" >&5
7864 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7865
7866 # Check whether --with-hashed-db or --without-hashed-db was given.
7867 if test "${with_hashed_db+set}" = set; then
7868   withval="$with_hashed_db"
7869
7870 else
7871   with_hashed_db=no
7872 fi;
7873         echo "$as_me:7873: result: $with_hashed_db" >&5
7874 echo "${ECHO_T}$with_hashed_db" >&6
7875 else
7876         with_hashed_db=no
7877 fi
7878
7879 echo "$as_me:7879: checking for list of fallback descriptions" >&5
7880 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7881
7882 # Check whether --with-fallbacks or --without-fallbacks was given.
7883 if test "${with_fallbacks+set}" = set; then
7884   withval="$with_fallbacks"
7885   with_fallback=$withval
7886 else
7887   with_fallback=
7888 fi;
7889 echo "$as_me:7889: result: $with_fallback" >&5
7890 echo "${ECHO_T}$with_fallback" >&6
7891 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7892
7893 echo "$as_me:7893: checking if you want modern xterm or antique" >&5
7894 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7895
7896 # Check whether --with-xterm-new or --without-xterm-new was given.
7897 if test "${with_xterm_new+set}" = set; then
7898   withval="$with_xterm_new"
7899   with_xterm_new=$withval
7900 else
7901   with_xterm_new=yes
7902 fi;
7903 case $with_xterm_new in
7904 (no) with_xterm_new=xterm-old;;
7905 (*)      with_xterm_new=xterm-new;;
7906 esac
7907 echo "$as_me:7907: result: $with_xterm_new" >&5
7908 echo "${ECHO_T}$with_xterm_new" >&6
7909 WHICH_XTERM=$with_xterm_new
7910
7911 echo "$as_me:7911: checking if xterm backspace sends BS or DEL" >&5
7912 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7913
7914 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7915 if test "${with_xterm_kbs+set}" = set; then
7916   withval="$with_xterm_kbs"
7917   with_xterm_kbs=$withval
7918 else
7919   with_xterm_kbs=BS
7920 fi;
7921 case x$with_xterm_kbs in
7922 (xyes|xno|xBS|xbs|x8)
7923         with_xterm_kbs=BS
7924         ;;
7925 (xDEL|xdel|x127)
7926         with_xterm_kbs=DEL
7927         ;;
7928 (*)
7929         with_xterm_kbs=$withval
7930         ;;
7931 esac
7932 echo "$as_me:7932: result: $with_xterm_kbs" >&5
7933 echo "${ECHO_T}$with_xterm_kbs" >&6
7934 XTERM_KBS=$with_xterm_kbs
7935
7936 MAKE_TERMINFO=
7937 if test "$use_database" = no ; then
7938         TERMINFO="${datadir}/terminfo"
7939         MAKE_TERMINFO="#"
7940 else
7941
7942 echo "$as_me:7942: checking for list of terminfo directories" >&5
7943 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7944
7945 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7946 if test "${with_terminfo_dirs+set}" = set; then
7947   withval="$with_terminfo_dirs"
7948
7949 else
7950   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7951 fi;
7952 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7953 cf_dst_path=
7954 for cf_src_path in $withval
7955 do
7956
7957 if test "x$prefix" != xNONE; then
7958         cf_path_syntax="$prefix"
7959 else
7960         cf_path_syntax="$ac_default_prefix"
7961 fi
7962
7963 case ".$cf_src_path" in
7964 (.\$\(*\)*|.\'*\'*)
7965         ;;
7966 (..|./*|.\\*)
7967         ;;
7968 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7969         ;;
7970 (.\${*prefix}*|.\${*dir}*)
7971         eval cf_src_path="$cf_src_path"
7972         case ".$cf_src_path" in
7973         (.NONE/*)
7974                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7975                 ;;
7976         esac
7977         ;;
7978 (.no|.NONE/*)
7979         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7980         ;;
7981 (*)
7982         { { echo "$as_me:7982: error: expected a pathname, not \"$cf_src_path\"" >&5
7983 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7984    { (exit 1); exit 1; }; }
7985         ;;
7986 esac
7987
7988   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7989   cf_dst_path="${cf_dst_path}${cf_src_path}"
7990 done
7991 IFS="$ac_save_ifs"
7992
7993 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7994 # so we have to check/work around.  We do prefer the result of "eval"...
7995 eval cf_dst_eval="$cf_dst_path"
7996 case "x$cf_dst_eval" in
7997 (xNONE*)
7998         TERMINFO_DIRS=$cf_dst_path
7999         ;;
8000 (*)
8001         TERMINFO_DIRS="$cf_dst_eval"
8002         ;;
8003 esac
8004
8005 echo "$as_me:8005: result: $TERMINFO_DIRS" >&5
8006 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8007 test -n "$TERMINFO_DIRS" &&
8008 cat >>confdefs.h <<EOF
8009 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8010 EOF
8011
8012 echo "$as_me:8012: checking for default terminfo directory" >&5
8013 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8014
8015 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8016 if test "${with_default_terminfo_dir+set}" = set; then
8017   withval="$with_default_terminfo_dir"
8018
8019 else
8020   withval="${TERMINFO:-${datadir}/terminfo}"
8021 fi; if test -n "${datadir}/terminfo" ; then
8022
8023 if test "x$prefix" != xNONE; then
8024         cf_path_syntax="$prefix"
8025 else
8026         cf_path_syntax="$ac_default_prefix"
8027 fi
8028
8029 case ".$withval" in
8030 (.\$\(*\)*|.\'*\'*)
8031         ;;
8032 (..|./*|.\\*)
8033         ;;
8034 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8035         ;;
8036 (.\${*prefix}*|.\${*dir}*)
8037         eval withval="$withval"
8038         case ".$withval" in
8039         (.NONE/*)
8040                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8041                 ;;
8042         esac
8043         ;;
8044 (.no|.NONE/*)
8045         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8046         ;;
8047 (*)
8048         { { echo "$as_me:8048: error: expected a pathname, not \"$withval\"" >&5
8049 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8050    { (exit 1); exit 1; }; }
8051         ;;
8052 esac
8053
8054 fi
8055 eval TERMINFO="$withval"
8056
8057 echo "$as_me:8057: result: $TERMINFO" >&5
8058 echo "${ECHO_T}$TERMINFO" >&6
8059
8060 cat >>confdefs.h <<EOF
8061 #define TERMINFO "$TERMINFO"
8062 EOF
8063
8064 fi
8065
8066 ###     use option --disable-big-core to make tic run on small machines
8067 ###     We need 4Mb, check if we can allocate 50% more than that.
8068 echo "$as_me:8068: checking if big-core option selected" >&5
8069 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8070
8071 # Check whether --enable-big-core or --disable-big-core was given.
8072 if test "${enable_big_core+set}" = set; then
8073   enableval="$enable_big_core"
8074   with_big_core=$enableval
8075 else
8076   if test "$cross_compiling" = yes; then
8077   with_big_core=no
8078 else
8079   cat >conftest.$ac_ext <<_ACEOF
8080 #line 8080 "configure"
8081 #include "confdefs.h"
8082
8083 #include <stdlib.h>
8084 #include <string.h>
8085 int main() {
8086         unsigned long n = 6000000L;
8087         char *s = malloc(n);
8088         if (s != 0)
8089                 s[0] = s[n-1] = 0;
8090         ${cf_cv_main_return:-return}(s == 0);
8091 }
8092 _ACEOF
8093 rm -f conftest$ac_exeext
8094 if { (eval echo "$as_me:8094: \"$ac_link\"") >&5
8095   (eval $ac_link) 2>&5
8096   ac_status=$?
8097   echo "$as_me:8097: \$? = $ac_status" >&5
8098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8099   { (eval echo "$as_me:8099: \"$ac_try\"") >&5
8100   (eval $ac_try) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); }; }; then
8104   with_big_core=yes
8105 else
8106   echo "$as_me: program exited with status $ac_status" >&5
8107 echo "$as_me: failed program was:" >&5
8108 cat conftest.$ac_ext >&5
8109 with_big_core=no
8110 fi
8111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8112 fi
8113 fi;
8114 echo "$as_me:8114: result: $with_big_core" >&5
8115 echo "${ECHO_T}$with_big_core" >&6
8116 test "x$with_big_core" = "xyes" &&
8117 cat >>confdefs.h <<\EOF
8118 #define HAVE_BIG_CORE 1
8119 EOF
8120
8121 ### ISO C only guarantees 512-char strings, we have tables which load faster
8122 ### when constructed using "big" strings.  More than the C compiler, the awk
8123 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8124 echo "$as_me:8124: checking if big-strings option selected" >&5
8125 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8126
8127 # Check whether --enable-big-strings or --disable-big-strings was given.
8128 if test "${enable_big_strings+set}" = set; then
8129   enableval="$enable_big_strings"
8130   with_big_strings=$enableval
8131 else
8132
8133         case x$AWK in
8134         (x)
8135                 eval with_big_strings=no
8136                 ;;
8137         (*)
8138                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8139                         | $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
8140                         eval with_big_strings=yes
8141                 else
8142                         eval with_big_strings=no
8143                 fi
8144                 ;;
8145         esac
8146
8147 fi;
8148 echo "$as_me:8148: result: $with_big_strings" >&5
8149 echo "${ECHO_T}$with_big_strings" >&6
8150
8151 USE_BIG_STRINGS=0
8152 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8153
8154 ###     use option --enable-termcap to compile in the termcap fallback support
8155 echo "$as_me:8155: checking if you want termcap-fallback support" >&5
8156 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8157
8158 # Check whether --enable-termcap or --disable-termcap was given.
8159 if test "${enable_termcap+set}" = set; then
8160   enableval="$enable_termcap"
8161   with_termcap=$enableval
8162 else
8163   with_termcap=no
8164 fi;
8165 echo "$as_me:8165: result: $with_termcap" >&5
8166 echo "${ECHO_T}$with_termcap" >&6
8167
8168 NCURSES_USE_TERMCAP=0
8169 if test "x$with_termcap" != "xyes" ; then
8170         if test "$use_database" = no ; then
8171                 if test -z "$with_fallback" ; then
8172                         { { echo "$as_me:8172: error: You have disabled the database w/o specifying fallbacks" >&5
8173 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8174    { (exit 1); exit 1; }; }
8175                 fi
8176         fi
8177
8178 cat >>confdefs.h <<\EOF
8179 #define PURE_TERMINFO 1
8180 EOF
8181
8182 else
8183
8184         if test "$with_ticlib" != no ; then
8185                 { { echo "$as_me:8185: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8186 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8187    { (exit 1); exit 1; }; }
8188         fi
8189
8190         NCURSES_USE_TERMCAP=1
8191         echo "$as_me:8191: checking for list of termcap files" >&5
8192 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8193
8194 # Check whether --with-termpath or --without-termpath was given.
8195 if test "${with_termpath+set}" = set; then
8196   withval="$with_termpath"
8197
8198 else
8199   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8200 fi;
8201 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8202 cf_dst_path=
8203 for cf_src_path in $withval
8204 do
8205
8206 if test "x$prefix" != xNONE; then
8207         cf_path_syntax="$prefix"
8208 else
8209         cf_path_syntax="$ac_default_prefix"
8210 fi
8211
8212 case ".$cf_src_path" in
8213 (.\$\(*\)*|.\'*\'*)
8214         ;;
8215 (..|./*|.\\*)
8216         ;;
8217 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8218         ;;
8219 (.\${*prefix}*|.\${*dir}*)
8220         eval cf_src_path="$cf_src_path"
8221         case ".$cf_src_path" in
8222         (.NONE/*)
8223                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8224                 ;;
8225         esac
8226         ;;
8227 (.no|.NONE/*)
8228         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8229         ;;
8230 (*)
8231         { { echo "$as_me:8231: error: expected a pathname, not \"$cf_src_path\"" >&5
8232 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8233    { (exit 1); exit 1; }; }
8234         ;;
8235 esac
8236
8237   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8238   cf_dst_path="${cf_dst_path}${cf_src_path}"
8239 done
8240 IFS="$ac_save_ifs"
8241
8242 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8243 # so we have to check/work around.  We do prefer the result of "eval"...
8244 eval cf_dst_eval="$cf_dst_path"
8245 case "x$cf_dst_eval" in
8246 (xNONE*)
8247         TERMPATH=$cf_dst_path
8248         ;;
8249 (*)
8250         TERMPATH="$cf_dst_eval"
8251         ;;
8252 esac
8253
8254         echo "$as_me:8254: result: $TERMPATH" >&5
8255 echo "${ECHO_T}$TERMPATH" >&6
8256         test -n "$TERMPATH" &&
8257 cat >>confdefs.h <<EOF
8258 #define TERMPATH "$TERMPATH"
8259 EOF
8260
8261         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8262         echo "$as_me:8262: checking if fast termcap-loader is needed" >&5
8263 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8264
8265 # Check whether --enable-getcap or --disable-getcap was given.
8266 if test "${enable_getcap+set}" = set; then
8267   enableval="$enable_getcap"
8268   with_getcap=$enableval
8269 else
8270   with_getcap=no
8271 fi;
8272         echo "$as_me:8272: result: $with_getcap" >&5
8273 echo "${ECHO_T}$with_getcap" >&6
8274         test "x$with_getcap" = "xyes" &&
8275 cat >>confdefs.h <<\EOF
8276 #define USE_GETCAP 1
8277 EOF
8278
8279         echo "$as_me:8279: checking if translated termcaps will be cached in ~/.terminfo" >&5
8280 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8281
8282 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8283 if test "${enable_getcap_cache+set}" = set; then
8284   enableval="$enable_getcap_cache"
8285   with_getcap_cache=$enableval
8286 else
8287   with_getcap_cache=no
8288 fi;
8289         echo "$as_me:8289: result: $with_getcap_cache" >&5
8290 echo "${ECHO_T}$with_getcap_cache" >&6
8291         test "x$with_getcap_cache" = "xyes" &&
8292 cat >>confdefs.h <<\EOF
8293 #define USE_GETCAP_CACHE 1
8294 EOF
8295
8296 fi
8297
8298 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8299 echo "$as_me:8299: checking if ~/.terminfo is wanted" >&5
8300 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8301
8302 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8303 if test "${enable_home_terminfo+set}" = set; then
8304   enableval="$enable_home_terminfo"
8305   with_home_terminfo=$enableval
8306 else
8307   with_home_terminfo=yes
8308 fi;
8309 echo "$as_me:8309: result: $with_home_terminfo" >&5
8310 echo "${ECHO_T}$with_home_terminfo" >&6
8311 test "x$with_home_terminfo" = "xyes" &&
8312 cat >>confdefs.h <<\EOF
8313 #define USE_HOME_TERMINFO 1
8314 EOF
8315
8316 echo "$as_me:8316: checking if you want to use restricted environment when running as root" >&5
8317 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8318
8319 # Check whether --enable-root-environ or --disable-root-environ was given.
8320 if test "${enable_root_environ+set}" = set; then
8321   enableval="$enable_root_environ"
8322   with_root_environ=$enableval
8323 else
8324   with_root_environ=yes
8325 fi;
8326 echo "$as_me:8326: result: $with_root_environ" >&5
8327 echo "${ECHO_T}$with_root_environ" >&6
8328 test "x$with_root_environ" = xyes &&
8329 cat >>confdefs.h <<\EOF
8330 #define USE_ROOT_ENVIRON 1
8331 EOF
8332
8333 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8334 ###   to reduce storage requirements for the terminfo database.
8335
8336 for ac_header in \
8337 unistd.h \
8338
8339 do
8340 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8341 echo "$as_me:8341: checking for $ac_header" >&5
8342 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8343 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8344   echo $ECHO_N "(cached) $ECHO_C" >&6
8345 else
8346   cat >conftest.$ac_ext <<_ACEOF
8347 #line 8347 "configure"
8348 #include "confdefs.h"
8349 #include <$ac_header>
8350 _ACEOF
8351 if { (eval echo "$as_me:8351: \"$ac_cpp conftest.$ac_ext\"") >&5
8352   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8353   ac_status=$?
8354   egrep -v '^ *\+' conftest.er1 >conftest.err
8355   rm -f conftest.er1
8356   cat conftest.err >&5
8357   echo "$as_me:8357: \$? = $ac_status" >&5
8358   (exit $ac_status); } >/dev/null; then
8359   if test -s conftest.err; then
8360     ac_cpp_err=$ac_c_preproc_warn_flag
8361   else
8362     ac_cpp_err=
8363   fi
8364 else
8365   ac_cpp_err=yes
8366 fi
8367 if test -z "$ac_cpp_err"; then
8368   eval "$as_ac_Header=yes"
8369 else
8370   echo "$as_me: failed program was:" >&5
8371   cat conftest.$ac_ext >&5
8372   eval "$as_ac_Header=no"
8373 fi
8374 rm -f conftest.err conftest.$ac_ext
8375 fi
8376 echo "$as_me:8376: result: `eval echo '${'$as_ac_Header'}'`" >&5
8377 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8378 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8379   cat >>confdefs.h <<EOF
8380 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8381 EOF
8382
8383 fi
8384 done
8385
8386 for ac_func in \
8387         remove \
8388         unlink
8389 do
8390 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8391 echo "$as_me:8391: checking for $ac_func" >&5
8392 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8393 if eval "test \"\${$as_ac_var+set}\" = set"; then
8394   echo $ECHO_N "(cached) $ECHO_C" >&6
8395 else
8396   cat >conftest.$ac_ext <<_ACEOF
8397 #line 8397 "configure"
8398 #include "confdefs.h"
8399 #define $ac_func autoconf_temporary
8400 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8401 #undef $ac_func
8402
8403 #ifdef __cplusplus
8404 extern "C"
8405 #endif
8406
8407 /* We use char because int might match the return type of a gcc2
8408    builtin and then its argument prototype would still apply.  */
8409 char $ac_func (void);
8410
8411 int
8412 main (void)
8413 {
8414
8415 /* The GNU C library defines stubs for functions which it implements
8416     to always fail with ENOSYS.  Some functions are actually named
8417     something starting with __ and the normal name is an alias.  */
8418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8419 #error found stub for $ac_func
8420 #endif
8421
8422         return $ac_func ();
8423   ;
8424   return 0;
8425 }
8426 _ACEOF
8427 rm -f conftest.$ac_objext conftest$ac_exeext
8428 if { (eval echo "$as_me:8428: \"$ac_link\"") >&5
8429   (eval $ac_link) 2>&5
8430   ac_status=$?
8431   echo "$as_me:8431: \$? = $ac_status" >&5
8432   (exit $ac_status); } &&
8433          { ac_try='test -s conftest$ac_exeext'
8434   { (eval echo "$as_me:8434: \"$ac_try\"") >&5
8435   (eval $ac_try) 2>&5
8436   ac_status=$?
8437   echo "$as_me:8437: \$? = $ac_status" >&5
8438   (exit $ac_status); }; }; then
8439   eval "$as_ac_var=yes"
8440 else
8441   echo "$as_me: failed program was:" >&5
8442 cat conftest.$ac_ext >&5
8443 eval "$as_ac_var=no"
8444 fi
8445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8446 fi
8447 echo "$as_me:8447: result: `eval echo '${'$as_ac_var'}'`" >&5
8448 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8449 if test `eval echo '${'$as_ac_var'}'` = yes; then
8450   cat >>confdefs.h <<EOF
8451 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8452 EOF
8453
8454 fi
8455 done
8456
8457 if test "$cross_compiling" = yes ; then
8458
8459 for ac_func in \
8460                 link \
8461                 symlink
8462 do
8463 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8464 echo "$as_me:8464: checking for $ac_func" >&5
8465 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8466 if eval "test \"\${$as_ac_var+set}\" = set"; then
8467   echo $ECHO_N "(cached) $ECHO_C" >&6
8468 else
8469   cat >conftest.$ac_ext <<_ACEOF
8470 #line 8470 "configure"
8471 #include "confdefs.h"
8472 #define $ac_func autoconf_temporary
8473 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8474 #undef $ac_func
8475
8476 #ifdef __cplusplus
8477 extern "C"
8478 #endif
8479
8480 /* We use char because int might match the return type of a gcc2
8481    builtin and then its argument prototype would still apply.  */
8482 char $ac_func (void);
8483
8484 int
8485 main (void)
8486 {
8487
8488 /* The GNU C library defines stubs for functions which it implements
8489     to always fail with ENOSYS.  Some functions are actually named
8490     something starting with __ and the normal name is an alias.  */
8491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8492 #error found stub for $ac_func
8493 #endif
8494
8495         return $ac_func ();
8496   ;
8497   return 0;
8498 }
8499 _ACEOF
8500 rm -f conftest.$ac_objext conftest$ac_exeext
8501 if { (eval echo "$as_me:8501: \"$ac_link\"") >&5
8502   (eval $ac_link) 2>&5
8503   ac_status=$?
8504   echo "$as_me:8504: \$? = $ac_status" >&5
8505   (exit $ac_status); } &&
8506          { ac_try='test -s conftest$ac_exeext'
8507   { (eval echo "$as_me:8507: \"$ac_try\"") >&5
8508   (eval $ac_try) 2>&5
8509   ac_status=$?
8510   echo "$as_me:8510: \$? = $ac_status" >&5
8511   (exit $ac_status); }; }; then
8512   eval "$as_ac_var=yes"
8513 else
8514   echo "$as_me: failed program was:" >&5
8515 cat conftest.$ac_ext >&5
8516 eval "$as_ac_var=no"
8517 fi
8518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8519 fi
8520 echo "$as_me:8520: result: `eval echo '${'$as_ac_var'}'`" >&5
8521 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8522 if test `eval echo '${'$as_ac_var'}'` = yes; then
8523   cat >>confdefs.h <<EOF
8524 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8525 EOF
8526
8527 fi
8528 done
8529
8530 else
8531         echo "$as_me:8531: checking if link/symlink functions work" >&5
8532 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8533 if test "${cf_cv_link_funcs+set}" = set; then
8534   echo $ECHO_N "(cached) $ECHO_C" >&6
8535 else
8536
8537                 cf_cv_link_funcs=
8538                 for cf_func in link symlink ; do
8539                         if test "$cross_compiling" = yes; then
8540
8541                         eval 'ac_cv_func_'$cf_func'=error'
8542 else
8543   cat >conftest.$ac_ext <<_ACEOF
8544 #line 8544 "configure"
8545 #include "confdefs.h"
8546
8547 #include <sys/types.h>
8548 #include <sys/stat.h>
8549 #ifdef HAVE_UNISTD_H
8550 #include <unistd.h>
8551 #endif
8552 int main(void)
8553 {
8554         int fail = 0;
8555         char *src = "config.log";
8556         char *dst = "conftest.chk";
8557         struct stat src_sb;
8558         struct stat dst_sb;
8559
8560         stat(src, &src_sb);
8561         fail = ($cf_func("config.log", "conftest.chk") < 0)
8562             || (stat(dst, &dst_sb) < 0)
8563             || (dst_sb.st_mtime != src_sb.st_mtime);
8564 #ifdef HAVE_UNLINK
8565         unlink(dst);
8566 #else
8567         remove(dst);
8568 #endif
8569         ${cf_cv_main_return:-return} (fail);
8570 }
8571
8572 _ACEOF
8573 rm -f conftest$ac_exeext
8574 if { (eval echo "$as_me:8574: \"$ac_link\"") >&5
8575   (eval $ac_link) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8579   { (eval echo "$as_me:8579: \"$ac_try\"") >&5
8580   (eval $ac_try) 2>&5
8581   ac_status=$?
8582   echo "$as_me:8582: \$? = $ac_status" >&5
8583   (exit $ac_status); }; }; then
8584
8585                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8586                         eval 'ac_cv_func_'$cf_func'=yes'
8587 else
8588   echo "$as_me: program exited with status $ac_status" >&5
8589 echo "$as_me: failed program was:" >&5
8590 cat conftest.$ac_ext >&5
8591
8592                         eval 'ac_cv_func_'$cf_func'=no'
8593 fi
8594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8595 fi
8596                 done
8597                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8598
8599 fi
8600 echo "$as_me:8600: result: $cf_cv_link_funcs" >&5
8601 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8602         test "$ac_cv_func_link"    = yes &&
8603 cat >>confdefs.h <<\EOF
8604 #define HAVE_LINK 1
8605 EOF
8606
8607         test "$ac_cv_func_symlink" = yes &&
8608 cat >>confdefs.h <<\EOF
8609 #define HAVE_SYMLINK 1
8610 EOF
8611
8612 fi
8613
8614 with_links=no
8615 with_symlinks=no
8616
8617 # soft links (symbolic links) are useful for some systems where hard links do
8618 # not work, or to make it simpler to copy terminfo trees around.
8619 if test "x$ac_cv_func_symlink" = xyes ; then
8620         echo "$as_me:8620: checking if tic should use symbolic links" >&5
8621 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8622
8623 # Check whether --enable-symlinks or --disable-symlinks was given.
8624 if test "${enable_symlinks+set}" = set; then
8625   enableval="$enable_symlinks"
8626   with_symlinks=$enableval
8627 else
8628   with_symlinks=no
8629 fi;
8630         echo "$as_me:8630: result: $with_symlinks" >&5
8631 echo "${ECHO_T}$with_symlinks" >&6
8632 fi
8633
8634 # If we have hard links and did not choose to use soft links instead, there is
8635 # no reason to make this choice optional - use the hard links.
8636 if test "$with_symlinks" = no ; then
8637         echo "$as_me:8637: checking if tic should use hard links" >&5
8638 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8639         if test "x$ac_cv_func_link" = xyes ; then
8640                 with_links=yes
8641         else
8642                 with_links=no
8643         fi
8644         echo "$as_me:8644: result: $with_links" >&5
8645 echo "${ECHO_T}$with_links" >&6
8646 fi
8647
8648 test "x$with_links" = xyes &&
8649 cat >>confdefs.h <<\EOF
8650 #define USE_LINKS 1
8651 EOF
8652
8653 test "x$with_symlinks" = xyes &&
8654 cat >>confdefs.h <<\EOF
8655 #define USE_SYMLINKS 1
8656 EOF
8657
8658 ###   use option --enable-broken-linker to force on use of broken-linker support
8659 echo "$as_me:8659: checking if you want broken-linker support code" >&5
8660 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8661
8662 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8663 if test "${enable_broken_linker+set}" = set; then
8664   enableval="$enable_broken_linker"
8665   with_broken_linker=$enableval
8666 else
8667   with_broken_linker=${BROKEN_LINKER:-no}
8668 fi;
8669 echo "$as_me:8669: result: $with_broken_linker" >&5
8670 echo "${ECHO_T}$with_broken_linker" >&6
8671
8672 BROKEN_LINKER=0
8673 if test "x$with_broken_linker" = xyes ; then
8674
8675 cat >>confdefs.h <<\EOF
8676 #define BROKEN_LINKER 1
8677 EOF
8678
8679         BROKEN_LINKER=1
8680 elif test "$DFT_LWR_MODEL" = shared ; then
8681         case $cf_cv_system_name in
8682         (cygwin*)
8683
8684 cat >>confdefs.h <<\EOF
8685 #define BROKEN_LINKER 1
8686 EOF
8687
8688                 BROKEN_LINKER=1
8689                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8690
8691 echo "${as_me:-configure}:8691: testing cygwin linker is broken anyway ..." 1>&5
8692
8693                 ;;
8694         esac
8695 fi
8696
8697 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8698 echo "$as_me:8698: checking if tputs should process BSD-style prefix padding" >&5
8699 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8700
8701 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8702 if test "${enable_bsdpad+set}" = set; then
8703   enableval="$enable_bsdpad"
8704   with_bsdpad=$enableval
8705 else
8706   with_bsdpad=no
8707 fi;
8708 echo "$as_me:8708: result: $with_bsdpad" >&5
8709 echo "${ECHO_T}$with_bsdpad" >&6
8710 test "x$with_bsdpad" = xyes &&
8711 cat >>confdefs.h <<\EOF
8712 #define BSD_TPUTS 1
8713 EOF
8714
8715 ###   use option --enable-widec to turn on use of wide-character support
8716 NCURSES_CH_T=chtype
8717 NCURSES_LIBUTF8=0
8718
8719 NEED_WCHAR_H=0
8720 NCURSES_MBSTATE_T=0
8721 NCURSES_WCHAR_T=0
8722 NCURSES_WINT_T=0
8723
8724 # Check to define _XOPEN_SOURCE "automatically"
8725 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8726
8727 cf_XOPEN_SOURCE=600
8728 cf_POSIX_C_SOURCE=199506L
8729 cf_xopen_source=
8730
8731 case $host_os in
8732 (aix[4-7]*)
8733         cf_xopen_source="-D_ALL_SOURCE"
8734         ;;
8735 (msys)
8736         cf_XOPEN_SOURCE=600
8737         ;;
8738 (darwin[0-8].*)
8739         cf_xopen_source="-D_APPLE_C_SOURCE"
8740         ;;
8741 (darwin*)
8742         cf_xopen_source="-D_DARWIN_C_SOURCE"
8743         cf_XOPEN_SOURCE=
8744         ;;
8745 (freebsd*|dragonfly*)
8746         # 5.x headers associate
8747         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8748         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8749         cf_POSIX_C_SOURCE=200112L
8750         cf_XOPEN_SOURCE=600
8751         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8752         ;;
8753 (hpux11*)
8754         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8755         ;;
8756 (hpux*)
8757         cf_xopen_source="-D_HPUX_SOURCE"
8758         ;;
8759 (irix[56].*)
8760         cf_xopen_source="-D_SGI_SOURCE"
8761         cf_XOPEN_SOURCE=
8762         ;;
8763 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8764
8765 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8766
8767 echo "$as_me:8767: checking if this is the GNU C library" >&5
8768 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8769 if test "${cf_cv_gnu_library+set}" = set; then
8770   echo $ECHO_N "(cached) $ECHO_C" >&6
8771 else
8772
8773 cat >conftest.$ac_ext <<_ACEOF
8774 #line 8774 "configure"
8775 #include "confdefs.h"
8776 #include <sys/types.h>
8777 int
8778 main (void)
8779 {
8780
8781         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8782                 return 0;
8783         #else
8784         #       error not GNU C library
8785         #endif
8786   ;
8787   return 0;
8788 }
8789 _ACEOF
8790 rm -f conftest.$ac_objext
8791 if { (eval echo "$as_me:8791: \"$ac_compile\"") >&5
8792   (eval $ac_compile) 2>&5
8793   ac_status=$?
8794   echo "$as_me:8794: \$? = $ac_status" >&5
8795   (exit $ac_status); } &&
8796          { ac_try='test -s conftest.$ac_objext'
8797   { (eval echo "$as_me:8797: \"$ac_try\"") >&5
8798   (eval $ac_try) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); }; }; then
8802   cf_cv_gnu_library=yes
8803 else
8804   echo "$as_me: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 cf_cv_gnu_library=no
8807 fi
8808 rm -f conftest.$ac_objext conftest.$ac_ext
8809
8810 fi
8811 echo "$as_me:8811: result: $cf_cv_gnu_library" >&5
8812 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8813
8814 if test x$cf_cv_gnu_library = xyes; then
8815
8816         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8817         # was changed to help a little...
8818         echo "$as_me:8818: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8819 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8820 if test "${cf_cv_gnu_library_219+set}" = set; then
8821   echo $ECHO_N "(cached) $ECHO_C" >&6
8822 else
8823
8824                 cf_save="$CPPFLAGS"
8825
8826         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8827         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8828
8829                 cat >conftest.$ac_ext <<_ACEOF
8830 #line 8830 "configure"
8831 #include "confdefs.h"
8832 #include <sys/types.h>
8833 int
8834 main (void)
8835 {
8836
8837                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8838                                 return 0;
8839                         #else
8840                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8841                         #endif
8842   ;
8843   return 0;
8844 }
8845 _ACEOF
8846 rm -f conftest.$ac_objext
8847 if { (eval echo "$as_me:8847: \"$ac_compile\"") >&5
8848   (eval $ac_compile) 2>&5
8849   ac_status=$?
8850   echo "$as_me:8850: \$? = $ac_status" >&5
8851   (exit $ac_status); } &&
8852          { ac_try='test -s conftest.$ac_objext'
8853   { (eval echo "$as_me:8853: \"$ac_try\"") >&5
8854   (eval $ac_try) 2>&5
8855   ac_status=$?
8856   echo "$as_me:8856: \$? = $ac_status" >&5
8857   (exit $ac_status); }; }; then
8858   cf_cv_gnu_library_219=yes
8859 else
8860   echo "$as_me: failed program was:" >&5
8861 cat conftest.$ac_ext >&5
8862 cf_cv_gnu_library_219=no
8863 fi
8864 rm -f conftest.$ac_objext conftest.$ac_ext
8865                 CPPFLAGS="$cf_save"
8866
8867 fi
8868 echo "$as_me:8868: result: $cf_cv_gnu_library_219" >&5
8869 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8870
8871         if test "x$cf_cv_gnu_library_219" = xyes; then
8872                 cf_save="$CPPFLAGS"
8873                 echo "$as_me:8873: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8874 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8875 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8876   echo $ECHO_N "(cached) $ECHO_C" >&6
8877 else
8878
8879 cf_fix_cppflags=no
8880 cf_new_cflags=
8881 cf_new_cppflags=
8882 cf_new_extra_cppflags=
8883
8884 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8885 do
8886 case $cf_fix_cppflags in
8887 (no)
8888         case $cf_add_cflags in
8889         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8890                 case $cf_add_cflags in
8891                 (-D*)
8892                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8893
8894                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8895                                 && test -z "${cf_tst_cflags}" \
8896                                 && cf_fix_cppflags=yes
8897
8898                         if test $cf_fix_cppflags = yes ; then
8899
8900         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8901         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8902
8903                                 continue
8904                         elif test "${cf_tst_cflags}" = "\"'" ; then
8905
8906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8908
8909                                 continue
8910                         fi
8911                         ;;
8912                 esac
8913                 case "$CPPFLAGS" in
8914                 (*$cf_add_cflags)
8915                         ;;
8916                 (*)
8917                         case $cf_add_cflags in
8918                         (-D*)
8919                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8920
8921 CPPFLAGS=`echo "$CPPFLAGS" | \
8922         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8923                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8924
8925                                 ;;
8926                         esac
8927
8928         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8929         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8930
8931                         ;;
8932                 esac
8933                 ;;
8934         (*)
8935
8936         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8937         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8938
8939                 ;;
8940         esac
8941         ;;
8942 (yes)
8943
8944         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8945         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8946
8947         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8948
8949         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8950                 && test -z "${cf_tst_cflags}" \
8951                 && cf_fix_cppflags=no
8952         ;;
8953 esac
8954 done
8955
8956 if test -n "$cf_new_cflags" ; then
8957
8958         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8959         CFLAGS="${CFLAGS}$cf_new_cflags"
8960
8961 fi
8962
8963 if test -n "$cf_new_cppflags" ; then
8964
8965         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8966         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8967
8968 fi
8969
8970 if test -n "$cf_new_extra_cppflags" ; then
8971
8972         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8973         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8974
8975 fi
8976
8977                         cat >conftest.$ac_ext <<_ACEOF
8978 #line 8978 "configure"
8979 #include "confdefs.h"
8980
8981                                 #include <limits.h>
8982                                 #include <sys/types.h>
8983
8984 int
8985 main (void)
8986 {
8987
8988                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
8989                                         return 0;
8990                                 #else
8991                                 #       error GNU C library is too old
8992                                 #endif
8993   ;
8994   return 0;
8995 }
8996 _ACEOF
8997 rm -f conftest.$ac_objext
8998 if { (eval echo "$as_me:8998: \"$ac_compile\"") >&5
8999   (eval $ac_compile) 2>&5
9000   ac_status=$?
9001   echo "$as_me:9001: \$? = $ac_status" >&5
9002   (exit $ac_status); } &&
9003          { ac_try='test -s conftest.$ac_objext'
9004   { (eval echo "$as_me:9004: \"$ac_try\"") >&5
9005   (eval $ac_try) 2>&5
9006   ac_status=$?
9007   echo "$as_me:9007: \$? = $ac_status" >&5
9008   (exit $ac_status); }; }; then
9009   cf_cv_gnu_dftsrc_219=yes
9010 else
9011   echo "$as_me: failed program was:" >&5
9012 cat conftest.$ac_ext >&5
9013 cf_cv_gnu_dftsrc_219=no
9014 fi
9015 rm -f conftest.$ac_objext conftest.$ac_ext
9016
9017 fi
9018 echo "$as_me:9018: result: $cf_cv_gnu_dftsrc_219" >&5
9019 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9020                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9021         else
9022                 cf_cv_gnu_dftsrc_219=maybe
9023         fi
9024
9025         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9026
9027                 echo "$as_me:9027: checking if we must define _GNU_SOURCE" >&5
9028 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9029 if test "${cf_cv_gnu_source+set}" = set; then
9030   echo $ECHO_N "(cached) $ECHO_C" >&6
9031 else
9032
9033                 cat >conftest.$ac_ext <<_ACEOF
9034 #line 9034 "configure"
9035 #include "confdefs.h"
9036 #include <sys/types.h>
9037 int
9038 main (void)
9039 {
9040
9041                         #ifndef _XOPEN_SOURCE
9042                         #error  expected _XOPEN_SOURCE to be defined
9043                         #endif
9044   ;
9045   return 0;
9046 }
9047 _ACEOF
9048 rm -f conftest.$ac_objext
9049 if { (eval echo "$as_me:9049: \"$ac_compile\"") >&5
9050   (eval $ac_compile) 2>&5
9051   ac_status=$?
9052   echo "$as_me:9052: \$? = $ac_status" >&5
9053   (exit $ac_status); } &&
9054          { ac_try='test -s conftest.$ac_objext'
9055   { (eval echo "$as_me:9055: \"$ac_try\"") >&5
9056   (eval $ac_try) 2>&5
9057   ac_status=$?
9058   echo "$as_me:9058: \$? = $ac_status" >&5
9059   (exit $ac_status); }; }; then
9060   cf_cv_gnu_source=no
9061 else
9062   echo "$as_me: failed program was:" >&5
9063 cat conftest.$ac_ext >&5
9064 cf_save="$CPPFLAGS"
9065
9066 cf_fix_cppflags=no
9067 cf_new_cflags=
9068 cf_new_cppflags=
9069 cf_new_extra_cppflags=
9070
9071 for cf_add_cflags in -D_GNU_SOURCE
9072 do
9073 case $cf_fix_cppflags in
9074 (no)
9075         case $cf_add_cflags in
9076         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9077                 case $cf_add_cflags in
9078                 (-D*)
9079                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9080
9081                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9082                                 && test -z "${cf_tst_cflags}" \
9083                                 && cf_fix_cppflags=yes
9084
9085                         if test $cf_fix_cppflags = yes ; then
9086
9087         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9088         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9089
9090                                 continue
9091                         elif test "${cf_tst_cflags}" = "\"'" ; then
9092
9093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9095
9096                                 continue
9097                         fi
9098                         ;;
9099                 esac
9100                 case "$CPPFLAGS" in
9101                 (*$cf_add_cflags)
9102                         ;;
9103                 (*)
9104                         case $cf_add_cflags in
9105                         (-D*)
9106                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9107
9108 CPPFLAGS=`echo "$CPPFLAGS" | \
9109         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9110                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9111
9112                                 ;;
9113                         esac
9114
9115         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9116         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9117
9118                         ;;
9119                 esac
9120                 ;;
9121         (*)
9122
9123         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9124         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9125
9126                 ;;
9127         esac
9128         ;;
9129 (yes)
9130
9131         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9132         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9133
9134         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9135
9136         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9137                 && test -z "${cf_tst_cflags}" \
9138                 && cf_fix_cppflags=no
9139         ;;
9140 esac
9141 done
9142
9143 if test -n "$cf_new_cflags" ; then
9144
9145         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9146         CFLAGS="${CFLAGS}$cf_new_cflags"
9147
9148 fi
9149
9150 if test -n "$cf_new_cppflags" ; then
9151
9152         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9153         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9154
9155 fi
9156
9157 if test -n "$cf_new_extra_cppflags" ; then
9158
9159         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9160         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9161
9162 fi
9163
9164                          cat >conftest.$ac_ext <<_ACEOF
9165 #line 9165 "configure"
9166 #include "confdefs.h"
9167 #include <sys/types.h>
9168 int
9169 main (void)
9170 {
9171
9172                                 #ifdef _XOPEN_SOURCE
9173                                 #error  expected _XOPEN_SOURCE to be undefined
9174                                 #endif
9175   ;
9176   return 0;
9177 }
9178 _ACEOF
9179 rm -f conftest.$ac_objext
9180 if { (eval echo "$as_me:9180: \"$ac_compile\"") >&5
9181   (eval $ac_compile) 2>&5
9182   ac_status=$?
9183   echo "$as_me:9183: \$? = $ac_status" >&5
9184   (exit $ac_status); } &&
9185          { ac_try='test -s conftest.$ac_objext'
9186   { (eval echo "$as_me:9186: \"$ac_try\"") >&5
9187   (eval $ac_try) 2>&5
9188   ac_status=$?
9189   echo "$as_me:9189: \$? = $ac_status" >&5
9190   (exit $ac_status); }; }; then
9191   cf_cv_gnu_source=no
9192 else
9193   echo "$as_me: failed program was:" >&5
9194 cat conftest.$ac_ext >&5
9195 cf_cv_gnu_source=yes
9196 fi
9197 rm -f conftest.$ac_objext conftest.$ac_ext
9198                         CPPFLAGS="$cf_save"
9199
9200 fi
9201 rm -f conftest.$ac_objext conftest.$ac_ext
9202
9203 fi
9204 echo "$as_me:9204: result: $cf_cv_gnu_source" >&5
9205 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9206
9207                 if test "$cf_cv_gnu_source" = yes
9208                 then
9209                 echo "$as_me:9209: checking if we should also define _DEFAULT_SOURCE" >&5
9210 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9211 if test "${cf_cv_default_source+set}" = set; then
9212   echo $ECHO_N "(cached) $ECHO_C" >&6
9213 else
9214
9215         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9216         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9217
9218                         cat >conftest.$ac_ext <<_ACEOF
9219 #line 9219 "configure"
9220 #include "confdefs.h"
9221 #include <sys/types.h>
9222 int
9223 main (void)
9224 {
9225
9226                                 #ifdef _DEFAULT_SOURCE
9227                                 #error  expected _DEFAULT_SOURCE to be undefined
9228                                 #endif
9229   ;
9230   return 0;
9231 }
9232 _ACEOF
9233 rm -f conftest.$ac_objext
9234 if { (eval echo "$as_me:9234: \"$ac_compile\"") >&5
9235   (eval $ac_compile) 2>&5
9236   ac_status=$?
9237   echo "$as_me:9237: \$? = $ac_status" >&5
9238   (exit $ac_status); } &&
9239          { ac_try='test -s conftest.$ac_objext'
9240   { (eval echo "$as_me:9240: \"$ac_try\"") >&5
9241   (eval $ac_try) 2>&5
9242   ac_status=$?
9243   echo "$as_me:9243: \$? = $ac_status" >&5
9244   (exit $ac_status); }; }; then
9245   cf_cv_default_source=no
9246 else
9247   echo "$as_me: failed program was:" >&5
9248 cat conftest.$ac_ext >&5
9249 cf_cv_default_source=yes
9250 fi
9251 rm -f conftest.$ac_objext conftest.$ac_ext
9252
9253 fi
9254 echo "$as_me:9254: result: $cf_cv_default_source" >&5
9255 echo "${ECHO_T}$cf_cv_default_source" >&6
9256                         if test "$cf_cv_default_source" = yes
9257                         then
9258
9259         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9260         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9261
9262                         fi
9263                 fi
9264         fi
9265
9266 fi
9267
9268         ;;
9269 (minix*)
9270         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9271         ;;
9272 (mirbsd*)
9273         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9274         cf_XOPEN_SOURCE=
9275
9276 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9277
9278 cf_save_CFLAGS="$CFLAGS"
9279 cf_save_CPPFLAGS="$CPPFLAGS"
9280
9281 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9282         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9283                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9284
9285 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9286         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9287                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9288
9289 echo "$as_me:9289: checking if we should define _POSIX_C_SOURCE" >&5
9290 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9291 if test "${cf_cv_posix_c_source+set}" = set; then
9292   echo $ECHO_N "(cached) $ECHO_C" >&6
9293 else
9294
9295 echo "${as_me:-configure}:9295: testing if the symbol is already defined go no further ..." 1>&5
9296
9297         cat >conftest.$ac_ext <<_ACEOF
9298 #line 9298 "configure"
9299 #include "confdefs.h"
9300 #include <sys/types.h>
9301 int
9302 main (void)
9303 {
9304
9305 #ifndef _POSIX_C_SOURCE
9306 make an error
9307 #endif
9308   ;
9309   return 0;
9310 }
9311 _ACEOF
9312 rm -f conftest.$ac_objext
9313 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); } &&
9318          { ac_try='test -s conftest.$ac_objext'
9319   { (eval echo "$as_me:9319: \"$ac_try\"") >&5
9320   (eval $ac_try) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); }; }; then
9324   cf_cv_posix_c_source=no
9325 else
9326   echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 cf_want_posix_source=no
9329          case .$cf_POSIX_C_SOURCE in
9330          (.[12]??*)
9331                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9332                 ;;
9333          (.2)
9334                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9335                 cf_want_posix_source=yes
9336                 ;;
9337          (.*)
9338                 cf_want_posix_source=yes
9339                 ;;
9340          esac
9341          if test "$cf_want_posix_source" = yes ; then
9342                 cat >conftest.$ac_ext <<_ACEOF
9343 #line 9343 "configure"
9344 #include "confdefs.h"
9345 #include <sys/types.h>
9346 int
9347 main (void)
9348 {
9349
9350 #ifdef _POSIX_SOURCE
9351 make an error
9352 #endif
9353   ;
9354   return 0;
9355 }
9356 _ACEOF
9357 rm -f conftest.$ac_objext
9358 if { (eval echo "$as_me:9358: \"$ac_compile\"") >&5
9359   (eval $ac_compile) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); } &&
9363          { ac_try='test -s conftest.$ac_objext'
9364   { (eval echo "$as_me:9364: \"$ac_try\"") >&5
9365   (eval $ac_try) 2>&5
9366   ac_status=$?
9367   echo "$as_me:9367: \$? = $ac_status" >&5
9368   (exit $ac_status); }; }; then
9369   :
9370 else
9371   echo "$as_me: failed program was:" >&5
9372 cat conftest.$ac_ext >&5
9373 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9374 fi
9375 rm -f conftest.$ac_objext conftest.$ac_ext
9376          fi
9377
9378 echo "${as_me:-configure}:9378: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9379
9380          CFLAGS="$cf_trim_CFLAGS"
9381          CPPFLAGS="$cf_trim_CPPFLAGS"
9382
9383         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9384         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9385
9386 echo "${as_me:-configure}:9386: testing if the second compile does not leave our definition intact error ..." 1>&5
9387
9388          cat >conftest.$ac_ext <<_ACEOF
9389 #line 9389 "configure"
9390 #include "confdefs.h"
9391 #include <sys/types.h>
9392 int
9393 main (void)
9394 {
9395
9396 #ifndef _POSIX_C_SOURCE
9397 make an error
9398 #endif
9399   ;
9400   return 0;
9401 }
9402 _ACEOF
9403 rm -f conftest.$ac_objext
9404 if { (eval echo "$as_me:9404: \"$ac_compile\"") >&5
9405   (eval $ac_compile) 2>&5
9406   ac_status=$?
9407   echo "$as_me:9407: \$? = $ac_status" >&5
9408   (exit $ac_status); } &&
9409          { ac_try='test -s conftest.$ac_objext'
9410   { (eval echo "$as_me:9410: \"$ac_try\"") >&5
9411   (eval $ac_try) 2>&5
9412   ac_status=$?
9413   echo "$as_me:9413: \$? = $ac_status" >&5
9414   (exit $ac_status); }; }; then
9415   :
9416 else
9417   echo "$as_me: failed program was:" >&5
9418 cat conftest.$ac_ext >&5
9419 cf_cv_posix_c_source=no
9420 fi
9421 rm -f conftest.$ac_objext conftest.$ac_ext
9422          CFLAGS="$cf_save_CFLAGS"
9423          CPPFLAGS="$cf_save_CPPFLAGS"
9424
9425 fi
9426 rm -f conftest.$ac_objext conftest.$ac_ext
9427
9428 fi
9429 echo "$as_me:9429: result: $cf_cv_posix_c_source" >&5
9430 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9431
9432 if test "$cf_cv_posix_c_source" != no ; then
9433         CFLAGS="$cf_trim_CFLAGS"
9434         CPPFLAGS="$cf_trim_CPPFLAGS"
9435
9436 cf_fix_cppflags=no
9437 cf_new_cflags=
9438 cf_new_cppflags=
9439 cf_new_extra_cppflags=
9440
9441 for cf_add_cflags in $cf_cv_posix_c_source
9442 do
9443 case $cf_fix_cppflags in
9444 (no)
9445         case $cf_add_cflags in
9446         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9447                 case $cf_add_cflags in
9448                 (-D*)
9449                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9450
9451                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9452                                 && test -z "${cf_tst_cflags}" \
9453                                 && cf_fix_cppflags=yes
9454
9455                         if test $cf_fix_cppflags = yes ; then
9456
9457         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9458         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9459
9460                                 continue
9461                         elif test "${cf_tst_cflags}" = "\"'" ; then
9462
9463         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9464         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9465
9466                                 continue
9467                         fi
9468                         ;;
9469                 esac
9470                 case "$CPPFLAGS" in
9471                 (*$cf_add_cflags)
9472                         ;;
9473                 (*)
9474                         case $cf_add_cflags in
9475                         (-D*)
9476                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9477
9478 CPPFLAGS=`echo "$CPPFLAGS" | \
9479         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9480                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9481
9482                                 ;;
9483                         esac
9484
9485         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9486         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9487
9488                         ;;
9489                 esac
9490                 ;;
9491         (*)
9492
9493         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9494         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9495
9496                 ;;
9497         esac
9498         ;;
9499 (yes)
9500
9501         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9502         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9503
9504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9505
9506         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9507                 && test -z "${cf_tst_cflags}" \
9508                 && cf_fix_cppflags=no
9509         ;;
9510 esac
9511 done
9512
9513 if test -n "$cf_new_cflags" ; then
9514
9515         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9516         CFLAGS="${CFLAGS}$cf_new_cflags"
9517
9518 fi
9519
9520 if test -n "$cf_new_cppflags" ; then
9521
9522         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9523         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9524
9525 fi
9526
9527 if test -n "$cf_new_extra_cppflags" ; then
9528
9529         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9530         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9531
9532 fi
9533
9534 fi
9535
9536         ;;
9537 (netbsd*)
9538         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9539         ;;
9540 (openbsd[4-9]*)
9541         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9542         cf_xopen_source="-D_BSD_SOURCE"
9543         cf_XOPEN_SOURCE=600
9544         ;;
9545 (openbsd*)
9546         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9547         ;;
9548 (osf[45]*)
9549         cf_xopen_source="-D_OSF_SOURCE"
9550         ;;
9551 (nto-qnx*)
9552         cf_xopen_source="-D_QNX_SOURCE"
9553         ;;
9554 (sco*)
9555         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9556         ;;
9557 (solaris2.*)
9558         cf_xopen_source="-D__EXTENSIONS__"
9559         cf_cv_xopen_source=broken
9560         ;;
9561 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9562         cf_XOPEN_SOURCE=
9563         cf_POSIX_C_SOURCE=
9564         ;;
9565 (*)
9566
9567 echo "$as_me:9567: checking if we should define _XOPEN_SOURCE" >&5
9568 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9569 if test "${cf_cv_xopen_source+set}" = set; then
9570   echo $ECHO_N "(cached) $ECHO_C" >&6
9571 else
9572
9573         cat >conftest.$ac_ext <<_ACEOF
9574 #line 9574 "configure"
9575 #include "confdefs.h"
9576
9577 #include <stdlib.h>
9578 #include <string.h>
9579 #include <sys/types.h>
9580
9581 int
9582 main (void)
9583 {
9584
9585 #ifndef _XOPEN_SOURCE
9586 make an error
9587 #endif
9588   ;
9589   return 0;
9590 }
9591 _ACEOF
9592 rm -f conftest.$ac_objext
9593 if { (eval echo "$as_me:9593: \"$ac_compile\"") >&5
9594   (eval $ac_compile) 2>&5
9595   ac_status=$?
9596   echo "$as_me:9596: \$? = $ac_status" >&5
9597   (exit $ac_status); } &&
9598          { ac_try='test -s conftest.$ac_objext'
9599   { (eval echo "$as_me:9599: \"$ac_try\"") >&5
9600   (eval $ac_try) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); }; }; then
9604   cf_cv_xopen_source=no
9605 else
9606   echo "$as_me: failed program was:" >&5
9607 cat conftest.$ac_ext >&5
9608 cf_save="$CPPFLAGS"
9609
9610         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9611         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9612
9613          cat >conftest.$ac_ext <<_ACEOF
9614 #line 9614 "configure"
9615 #include "confdefs.h"
9616
9617 #include <stdlib.h>
9618 #include <string.h>
9619 #include <sys/types.h>
9620
9621 int
9622 main (void)
9623 {
9624
9625 #ifdef _XOPEN_SOURCE
9626 make an error
9627 #endif
9628   ;
9629   return 0;
9630 }
9631 _ACEOF
9632 rm -f conftest.$ac_objext
9633 if { (eval echo "$as_me:9633: \"$ac_compile\"") >&5
9634   (eval $ac_compile) 2>&5
9635   ac_status=$?
9636   echo "$as_me:9636: \$? = $ac_status" >&5
9637   (exit $ac_status); } &&
9638          { ac_try='test -s conftest.$ac_objext'
9639   { (eval echo "$as_me:9639: \"$ac_try\"") >&5
9640   (eval $ac_try) 2>&5
9641   ac_status=$?
9642   echo "$as_me:9642: \$? = $ac_status" >&5
9643   (exit $ac_status); }; }; then
9644   cf_cv_xopen_source=no
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 cat conftest.$ac_ext >&5
9648 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9649 fi
9650 rm -f conftest.$ac_objext conftest.$ac_ext
9651         CPPFLAGS="$cf_save"
9652
9653 fi
9654 rm -f conftest.$ac_objext conftest.$ac_ext
9655
9656 fi
9657 echo "$as_me:9657: result: $cf_cv_xopen_source" >&5
9658 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9659
9660 if test "$cf_cv_xopen_source" != no ; then
9661
9662 CFLAGS=`echo "$CFLAGS" | \
9663         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9664                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9665
9666 CPPFLAGS=`echo "$CPPFLAGS" | \
9667         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9668                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9669
9670         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9671
9672 cf_fix_cppflags=no
9673 cf_new_cflags=
9674 cf_new_cppflags=
9675 cf_new_extra_cppflags=
9676
9677 for cf_add_cflags in $cf_temp_xopen_source
9678 do
9679 case $cf_fix_cppflags in
9680 (no)
9681         case $cf_add_cflags in
9682         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9683                 case $cf_add_cflags in
9684                 (-D*)
9685                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9686
9687                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9688                                 && test -z "${cf_tst_cflags}" \
9689                                 && cf_fix_cppflags=yes
9690
9691                         if test $cf_fix_cppflags = yes ; then
9692
9693         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9694         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9695
9696                                 continue
9697                         elif test "${cf_tst_cflags}" = "\"'" ; then
9698
9699         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9700         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9701
9702                                 continue
9703                         fi
9704                         ;;
9705                 esac
9706                 case "$CPPFLAGS" in
9707                 (*$cf_add_cflags)
9708                         ;;
9709                 (*)
9710                         case $cf_add_cflags in
9711                         (-D*)
9712                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9713
9714 CPPFLAGS=`echo "$CPPFLAGS" | \
9715         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9716                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9717
9718                                 ;;
9719                         esac
9720
9721         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9722         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9723
9724                         ;;
9725                 esac
9726                 ;;
9727         (*)
9728
9729         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9730         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9731
9732                 ;;
9733         esac
9734         ;;
9735 (yes)
9736
9737         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9738         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9739
9740         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9741
9742         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9743                 && test -z "${cf_tst_cflags}" \
9744                 && cf_fix_cppflags=no
9745         ;;
9746 esac
9747 done
9748
9749 if test -n "$cf_new_cflags" ; then
9750
9751         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9752         CFLAGS="${CFLAGS}$cf_new_cflags"
9753
9754 fi
9755
9756 if test -n "$cf_new_cppflags" ; then
9757
9758         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9759         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9760
9761 fi
9762
9763 if test -n "$cf_new_extra_cppflags" ; then
9764
9765         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9766         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9767
9768 fi
9769
9770 fi
9771
9772 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9773
9774 cf_save_CFLAGS="$CFLAGS"
9775 cf_save_CPPFLAGS="$CPPFLAGS"
9776
9777 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9778         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9779                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9780
9781 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9782         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9783                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9784
9785 echo "$as_me:9785: checking if we should define _POSIX_C_SOURCE" >&5
9786 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9787 if test "${cf_cv_posix_c_source+set}" = set; then
9788   echo $ECHO_N "(cached) $ECHO_C" >&6
9789 else
9790
9791 echo "${as_me:-configure}:9791: testing if the symbol is already defined go no further ..." 1>&5
9792
9793         cat >conftest.$ac_ext <<_ACEOF
9794 #line 9794 "configure"
9795 #include "confdefs.h"
9796 #include <sys/types.h>
9797 int
9798 main (void)
9799 {
9800
9801 #ifndef _POSIX_C_SOURCE
9802 make an error
9803 #endif
9804   ;
9805   return 0;
9806 }
9807 _ACEOF
9808 rm -f conftest.$ac_objext
9809 if { (eval echo "$as_me:9809: \"$ac_compile\"") >&5
9810   (eval $ac_compile) 2>&5
9811   ac_status=$?
9812   echo "$as_me:9812: \$? = $ac_status" >&5
9813   (exit $ac_status); } &&
9814          { ac_try='test -s conftest.$ac_objext'
9815   { (eval echo "$as_me:9815: \"$ac_try\"") >&5
9816   (eval $ac_try) 2>&5
9817   ac_status=$?
9818   echo "$as_me:9818: \$? = $ac_status" >&5
9819   (exit $ac_status); }; }; then
9820   cf_cv_posix_c_source=no
9821 else
9822   echo "$as_me: failed program was:" >&5
9823 cat conftest.$ac_ext >&5
9824 cf_want_posix_source=no
9825          case .$cf_POSIX_C_SOURCE in
9826          (.[12]??*)
9827                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9828                 ;;
9829          (.2)
9830                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9831                 cf_want_posix_source=yes
9832                 ;;
9833          (.*)
9834                 cf_want_posix_source=yes
9835                 ;;
9836          esac
9837          if test "$cf_want_posix_source" = yes ; then
9838                 cat >conftest.$ac_ext <<_ACEOF
9839 #line 9839 "configure"
9840 #include "confdefs.h"
9841 #include <sys/types.h>
9842 int
9843 main (void)
9844 {
9845
9846 #ifdef _POSIX_SOURCE
9847 make an error
9848 #endif
9849   ;
9850   return 0;
9851 }
9852 _ACEOF
9853 rm -f conftest.$ac_objext
9854 if { (eval echo "$as_me:9854: \"$ac_compile\"") >&5
9855   (eval $ac_compile) 2>&5
9856   ac_status=$?
9857   echo "$as_me:9857: \$? = $ac_status" >&5
9858   (exit $ac_status); } &&
9859          { ac_try='test -s conftest.$ac_objext'
9860   { (eval echo "$as_me:9860: \"$ac_try\"") >&5
9861   (eval $ac_try) 2>&5
9862   ac_status=$?
9863   echo "$as_me:9863: \$? = $ac_status" >&5
9864   (exit $ac_status); }; }; then
9865   :
9866 else
9867   echo "$as_me: failed program was:" >&5
9868 cat conftest.$ac_ext >&5
9869 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9870 fi
9871 rm -f conftest.$ac_objext conftest.$ac_ext
9872          fi
9873
9874 echo "${as_me:-configure}:9874: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9875
9876          CFLAGS="$cf_trim_CFLAGS"
9877          CPPFLAGS="$cf_trim_CPPFLAGS"
9878
9879         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9880         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9881
9882 echo "${as_me:-configure}:9882: testing if the second compile does not leave our definition intact error ..." 1>&5
9883
9884          cat >conftest.$ac_ext <<_ACEOF
9885 #line 9885 "configure"
9886 #include "confdefs.h"
9887 #include <sys/types.h>
9888 int
9889 main (void)
9890 {
9891
9892 #ifndef _POSIX_C_SOURCE
9893 make an error
9894 #endif
9895   ;
9896   return 0;
9897 }
9898 _ACEOF
9899 rm -f conftest.$ac_objext
9900 if { (eval echo "$as_me:9900: \"$ac_compile\"") >&5
9901   (eval $ac_compile) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); } &&
9905          { ac_try='test -s conftest.$ac_objext'
9906   { (eval echo "$as_me:9906: \"$ac_try\"") >&5
9907   (eval $ac_try) 2>&5
9908   ac_status=$?
9909   echo "$as_me:9909: \$? = $ac_status" >&5
9910   (exit $ac_status); }; }; then
9911   :
9912 else
9913   echo "$as_me: failed program was:" >&5
9914 cat conftest.$ac_ext >&5
9915 cf_cv_posix_c_source=no
9916 fi
9917 rm -f conftest.$ac_objext conftest.$ac_ext
9918          CFLAGS="$cf_save_CFLAGS"
9919          CPPFLAGS="$cf_save_CPPFLAGS"
9920
9921 fi
9922 rm -f conftest.$ac_objext conftest.$ac_ext
9923
9924 fi
9925 echo "$as_me:9925: result: $cf_cv_posix_c_source" >&5
9926 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9927
9928 if test "$cf_cv_posix_c_source" != no ; then
9929         CFLAGS="$cf_trim_CFLAGS"
9930         CPPFLAGS="$cf_trim_CPPFLAGS"
9931
9932 cf_fix_cppflags=no
9933 cf_new_cflags=
9934 cf_new_cppflags=
9935 cf_new_extra_cppflags=
9936
9937 for cf_add_cflags in $cf_cv_posix_c_source
9938 do
9939 case $cf_fix_cppflags in
9940 (no)
9941         case $cf_add_cflags in
9942         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9943                 case $cf_add_cflags in
9944                 (-D*)
9945                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9946
9947                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9948                                 && test -z "${cf_tst_cflags}" \
9949                                 && cf_fix_cppflags=yes
9950
9951                         if test $cf_fix_cppflags = yes ; then
9952
9953         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9954         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9955
9956                                 continue
9957                         elif test "${cf_tst_cflags}" = "\"'" ; then
9958
9959         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9960         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9961
9962                                 continue
9963                         fi
9964                         ;;
9965                 esac
9966                 case "$CPPFLAGS" in
9967                 (*$cf_add_cflags)
9968                         ;;
9969                 (*)
9970                         case $cf_add_cflags in
9971                         (-D*)
9972                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9973
9974 CPPFLAGS=`echo "$CPPFLAGS" | \
9975         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9976                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9977
9978                                 ;;
9979                         esac
9980
9981         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9982         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9983
9984                         ;;
9985                 esac
9986                 ;;
9987         (*)
9988
9989         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9990         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9991
9992                 ;;
9993         esac
9994         ;;
9995 (yes)
9996
9997         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9998         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9999
10000         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10001
10002         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10003                 && test -z "${cf_tst_cflags}" \
10004                 && cf_fix_cppflags=no
10005         ;;
10006 esac
10007 done
10008
10009 if test -n "$cf_new_cflags" ; then
10010
10011         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10012         CFLAGS="${CFLAGS}$cf_new_cflags"
10013
10014 fi
10015
10016 if test -n "$cf_new_cppflags" ; then
10017
10018         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10019         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10020
10021 fi
10022
10023 if test -n "$cf_new_extra_cppflags" ; then
10024
10025         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10026         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10027
10028 fi
10029
10030 fi
10031
10032         ;;
10033 esac
10034
10035 if test -n "$cf_xopen_source" ; then
10036
10037 cf_fix_cppflags=no
10038 cf_new_cflags=
10039 cf_new_cppflags=
10040 cf_new_extra_cppflags=
10041
10042 for cf_add_cflags in $cf_xopen_source
10043 do
10044 case $cf_fix_cppflags in
10045 (no)
10046         case $cf_add_cflags in
10047         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10048                 case $cf_add_cflags in
10049                 (-D*)
10050                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10051
10052                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10053                                 && test -z "${cf_tst_cflags}" \
10054                                 && cf_fix_cppflags=yes
10055
10056                         if test $cf_fix_cppflags = yes ; then
10057
10058         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10059         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10060
10061                                 continue
10062                         elif test "${cf_tst_cflags}" = "\"'" ; then
10063
10064         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10065         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10066
10067                                 continue
10068                         fi
10069                         ;;
10070                 esac
10071                 case "$CPPFLAGS" in
10072                 (*$cf_add_cflags)
10073                         ;;
10074                 (*)
10075                         case $cf_add_cflags in
10076                         (-D*)
10077                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10078
10079 CPPFLAGS=`echo "$CPPFLAGS" | \
10080         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10081                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10082
10083                                 ;;
10084                         esac
10085
10086         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10087         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10088
10089                         ;;
10090                 esac
10091                 ;;
10092         (*)
10093
10094         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10095         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10096
10097                 ;;
10098         esac
10099         ;;
10100 (yes)
10101
10102         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10103         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10104
10105         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10106
10107         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10108                 && test -z "${cf_tst_cflags}" \
10109                 && cf_fix_cppflags=no
10110         ;;
10111 esac
10112 done
10113
10114 if test -n "$cf_new_cflags" ; then
10115         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10116
10117 echo "${as_me:-configure}:10117: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10118
10119         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10120         CFLAGS="${CFLAGS}$cf_new_cflags"
10121
10122 fi
10123
10124 if test -n "$cf_new_cppflags" ; then
10125         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10126
10127 echo "${as_me:-configure}:10127: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10128
10129         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10130         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10131
10132 fi
10133
10134 if test -n "$cf_new_extra_cppflags" ; then
10135         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10136
10137 echo "${as_me:-configure}:10137: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10138
10139         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10140         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10141
10142 fi
10143
10144 fi
10145
10146 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10147         echo "$as_me:10147: checking if _XOPEN_SOURCE really is set" >&5
10148 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10149         cat >conftest.$ac_ext <<_ACEOF
10150 #line 10150 "configure"
10151 #include "confdefs.h"
10152 #include <stdlib.h>
10153 int
10154 main (void)
10155 {
10156
10157 #ifndef _XOPEN_SOURCE
10158 make an error
10159 #endif
10160   ;
10161   return 0;
10162 }
10163 _ACEOF
10164 rm -f conftest.$ac_objext
10165 if { (eval echo "$as_me:10165: \"$ac_compile\"") >&5
10166   (eval $ac_compile) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); } &&
10170          { ac_try='test -s conftest.$ac_objext'
10171   { (eval echo "$as_me:10171: \"$ac_try\"") >&5
10172   (eval $ac_try) 2>&5
10173   ac_status=$?
10174   echo "$as_me:10174: \$? = $ac_status" >&5
10175   (exit $ac_status); }; }; then
10176   cf_XOPEN_SOURCE_set=yes
10177 else
10178   echo "$as_me: failed program was:" >&5
10179 cat conftest.$ac_ext >&5
10180 cf_XOPEN_SOURCE_set=no
10181 fi
10182 rm -f conftest.$ac_objext conftest.$ac_ext
10183         echo "$as_me:10183: result: $cf_XOPEN_SOURCE_set" >&5
10184 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10185         if test $cf_XOPEN_SOURCE_set = yes
10186         then
10187                 cat >conftest.$ac_ext <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10190 #include <stdlib.h>
10191 int
10192 main (void)
10193 {
10194
10195 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10196 make an error
10197 #endif
10198   ;
10199   return 0;
10200 }
10201 _ACEOF
10202 rm -f conftest.$ac_objext
10203 if { (eval echo "$as_me:10203: \"$ac_compile\"") >&5
10204   (eval $ac_compile) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit $ac_status); } &&
10208          { ac_try='test -s conftest.$ac_objext'
10209   { (eval echo "$as_me:10209: \"$ac_try\"") >&5
10210   (eval $ac_try) 2>&5
10211   ac_status=$?
10212   echo "$as_me:10212: \$? = $ac_status" >&5
10213   (exit $ac_status); }; }; then
10214   cf_XOPEN_SOURCE_set_ok=yes
10215 else
10216   echo "$as_me: failed program was:" >&5
10217 cat conftest.$ac_ext >&5
10218 cf_XOPEN_SOURCE_set_ok=no
10219 fi
10220 rm -f conftest.$ac_objext conftest.$ac_ext
10221                 if test $cf_XOPEN_SOURCE_set_ok = no
10222                 then
10223                         { echo "$as_me:10223: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10224 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10225                 fi
10226         else
10227
10228 echo "$as_me:10228: checking if we should define _XOPEN_SOURCE" >&5
10229 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10230 if test "${cf_cv_xopen_source+set}" = set; then
10231   echo $ECHO_N "(cached) $ECHO_C" >&6
10232 else
10233
10234         cat >conftest.$ac_ext <<_ACEOF
10235 #line 10235 "configure"
10236 #include "confdefs.h"
10237
10238 #include <stdlib.h>
10239 #include <string.h>
10240 #include <sys/types.h>
10241
10242 int
10243 main (void)
10244 {
10245
10246 #ifndef _XOPEN_SOURCE
10247 make an error
10248 #endif
10249   ;
10250   return 0;
10251 }
10252 _ACEOF
10253 rm -f conftest.$ac_objext
10254 if { (eval echo "$as_me:10254: \"$ac_compile\"") >&5
10255   (eval $ac_compile) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); } &&
10259          { ac_try='test -s conftest.$ac_objext'
10260   { (eval echo "$as_me:10260: \"$ac_try\"") >&5
10261   (eval $ac_try) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); }; }; then
10265   cf_cv_xopen_source=no
10266 else
10267   echo "$as_me: failed program was:" >&5
10268 cat conftest.$ac_ext >&5
10269 cf_save="$CPPFLAGS"
10270
10271         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10272         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10273
10274          cat >conftest.$ac_ext <<_ACEOF
10275 #line 10275 "configure"
10276 #include "confdefs.h"
10277
10278 #include <stdlib.h>
10279 #include <string.h>
10280 #include <sys/types.h>
10281
10282 int
10283 main (void)
10284 {
10285
10286 #ifdef _XOPEN_SOURCE
10287 make an error
10288 #endif
10289   ;
10290   return 0;
10291 }
10292 _ACEOF
10293 rm -f conftest.$ac_objext
10294 if { (eval echo "$as_me:10294: \"$ac_compile\"") >&5
10295   (eval $ac_compile) 2>&5
10296   ac_status=$?
10297   echo "$as_me:10297: \$? = $ac_status" >&5
10298   (exit $ac_status); } &&
10299          { ac_try='test -s conftest.$ac_objext'
10300   { (eval echo "$as_me:10300: \"$ac_try\"") >&5
10301   (eval $ac_try) 2>&5
10302   ac_status=$?
10303   echo "$as_me:10303: \$? = $ac_status" >&5
10304   (exit $ac_status); }; }; then
10305   cf_cv_xopen_source=no
10306 else
10307   echo "$as_me: failed program was:" >&5
10308 cat conftest.$ac_ext >&5
10309 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10310 fi
10311 rm -f conftest.$ac_objext conftest.$ac_ext
10312         CPPFLAGS="$cf_save"
10313
10314 fi
10315 rm -f conftest.$ac_objext conftest.$ac_ext
10316
10317 fi
10318 echo "$as_me:10318: result: $cf_cv_xopen_source" >&5
10319 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10320
10321 if test "$cf_cv_xopen_source" != no ; then
10322
10323 CFLAGS=`echo "$CFLAGS" | \
10324         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10325                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10326
10327 CPPFLAGS=`echo "$CPPFLAGS" | \
10328         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10329                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10330
10331         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10332
10333 cf_fix_cppflags=no
10334 cf_new_cflags=
10335 cf_new_cppflags=
10336 cf_new_extra_cppflags=
10337
10338 for cf_add_cflags in $cf_temp_xopen_source
10339 do
10340 case $cf_fix_cppflags in
10341 (no)
10342         case $cf_add_cflags in
10343         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10344                 case $cf_add_cflags in
10345                 (-D*)
10346                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10347
10348                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10349                                 && test -z "${cf_tst_cflags}" \
10350                                 && cf_fix_cppflags=yes
10351
10352                         if test $cf_fix_cppflags = yes ; then
10353
10354         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10355         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10356
10357                                 continue
10358                         elif test "${cf_tst_cflags}" = "\"'" ; then
10359
10360         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10361         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10362
10363                                 continue
10364                         fi
10365                         ;;
10366                 esac
10367                 case "$CPPFLAGS" in
10368                 (*$cf_add_cflags)
10369                         ;;
10370                 (*)
10371                         case $cf_add_cflags in
10372                         (-D*)
10373                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10374
10375 CPPFLAGS=`echo "$CPPFLAGS" | \
10376         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10377                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10378
10379                                 ;;
10380                         esac
10381
10382         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10383         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10384
10385                         ;;
10386                 esac
10387                 ;;
10388         (*)
10389
10390         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10391         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10392
10393                 ;;
10394         esac
10395         ;;
10396 (yes)
10397
10398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10400
10401         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10402
10403         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10404                 && test -z "${cf_tst_cflags}" \
10405                 && cf_fix_cppflags=no
10406         ;;
10407 esac
10408 done
10409
10410 if test -n "$cf_new_cflags" ; then
10411
10412         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10413         CFLAGS="${CFLAGS}$cf_new_cflags"
10414
10415 fi
10416
10417 if test -n "$cf_new_cppflags" ; then
10418
10419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10420         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10421
10422 fi
10423
10424 if test -n "$cf_new_extra_cppflags" ; then
10425
10426         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10427         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10428
10429 fi
10430
10431 fi
10432
10433         fi
10434 fi
10435
10436 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10437
10438 # Work around breakage on OS X
10439
10440 echo "$as_me:10440: checking if SIGWINCH is defined" >&5
10441 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10442 if test "${cf_cv_define_sigwinch+set}" = set; then
10443   echo $ECHO_N "(cached) $ECHO_C" >&6
10444 else
10445
10446         cat >conftest.$ac_ext <<_ACEOF
10447 #line 10447 "configure"
10448 #include "confdefs.h"
10449
10450 #include <sys/types.h>
10451 #include <sys/signal.h>
10452
10453 int
10454 main (void)
10455 {
10456 int x = SIGWINCH
10457   ;
10458   return 0;
10459 }
10460 _ACEOF
10461 rm -f conftest.$ac_objext
10462 if { (eval echo "$as_me:10462: \"$ac_compile\"") >&5
10463   (eval $ac_compile) 2>&5
10464   ac_status=$?
10465   echo "$as_me:10465: \$? = $ac_status" >&5
10466   (exit $ac_status); } &&
10467          { ac_try='test -s conftest.$ac_objext'
10468   { (eval echo "$as_me:10468: \"$ac_try\"") >&5
10469   (eval $ac_try) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit $ac_status); }; }; then
10473   cf_cv_define_sigwinch=yes
10474 else
10475   echo "$as_me: failed program was:" >&5
10476 cat conftest.$ac_ext >&5
10477 cat >conftest.$ac_ext <<_ACEOF
10478 #line 10478 "configure"
10479 #include "confdefs.h"
10480
10481 #undef _XOPEN_SOURCE
10482 #undef _POSIX_SOURCE
10483 #undef _POSIX_C_SOURCE
10484 #include <sys/types.h>
10485 #include <sys/signal.h>
10486
10487 int
10488 main (void)
10489 {
10490 int x = SIGWINCH
10491   ;
10492   return 0;
10493 }
10494 _ACEOF
10495 rm -f conftest.$ac_objext
10496 if { (eval echo "$as_me:10496: \"$ac_compile\"") >&5
10497   (eval $ac_compile) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit $ac_status); } &&
10501          { ac_try='test -s conftest.$ac_objext'
10502   { (eval echo "$as_me:10502: \"$ac_try\"") >&5
10503   (eval $ac_try) 2>&5
10504   ac_status=$?
10505   echo "$as_me:10505: \$? = $ac_status" >&5
10506   (exit $ac_status); }; }; then
10507   cf_cv_define_sigwinch=maybe
10508 else
10509   echo "$as_me: failed program was:" >&5
10510 cat conftest.$ac_ext >&5
10511 cf_cv_define_sigwinch=no
10512 fi
10513 rm -f conftest.$ac_objext conftest.$ac_ext
10514
10515 fi
10516 rm -f conftest.$ac_objext conftest.$ac_ext
10517
10518 fi
10519 echo "$as_me:10519: result: $cf_cv_define_sigwinch" >&5
10520 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10521
10522 if test "$cf_cv_define_sigwinch" = maybe ; then
10523 echo "$as_me:10523: checking for actual SIGWINCH definition" >&5
10524 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10525 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10526   echo $ECHO_N "(cached) $ECHO_C" >&6
10527 else
10528
10529 cf_cv_fixup_sigwinch=unknown
10530 cf_sigwinch=32
10531 while test $cf_sigwinch != 1
10532 do
10533         cat >conftest.$ac_ext <<_ACEOF
10534 #line 10534 "configure"
10535 #include "confdefs.h"
10536
10537 #undef _XOPEN_SOURCE
10538 #undef _POSIX_SOURCE
10539 #undef _POSIX_C_SOURCE
10540 #include <sys/types.h>
10541 #include <sys/signal.h>
10542
10543 int
10544 main (void)
10545 {
10546
10547 #if SIGWINCH != $cf_sigwinch
10548 make an error
10549 #endif
10550 int x = SIGWINCH
10551   ;
10552   return 0;
10553 }
10554 _ACEOF
10555 rm -f conftest.$ac_objext
10556 if { (eval echo "$as_me:10556: \"$ac_compile\"") >&5
10557   (eval $ac_compile) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit $ac_status); } &&
10561          { ac_try='test -s conftest.$ac_objext'
10562   { (eval echo "$as_me:10562: \"$ac_try\"") >&5
10563   (eval $ac_try) 2>&5
10564   ac_status=$?
10565   echo "$as_me:10565: \$? = $ac_status" >&5
10566   (exit $ac_status); }; }; then
10567   cf_cv_fixup_sigwinch=$cf_sigwinch
10568          break
10569 else
10570   echo "$as_me: failed program was:" >&5
10571 cat conftest.$ac_ext >&5
10572 fi
10573 rm -f conftest.$ac_objext conftest.$ac_ext
10574
10575 cf_sigwinch=`expr $cf_sigwinch - 1`
10576 done
10577
10578 fi
10579 echo "$as_me:10579: result: $cf_cv_fixup_sigwinch" >&5
10580 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10581
10582         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10583                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10584         fi
10585 fi
10586
10587 # Checks for CODESET support.
10588
10589 echo "$as_me:10589: checking for nl_langinfo and CODESET" >&5
10590 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10591 if test "${am_cv_langinfo_codeset+set}" = set; then
10592   echo $ECHO_N "(cached) $ECHO_C" >&6
10593 else
10594   cat >conftest.$ac_ext <<_ACEOF
10595 #line 10595 "configure"
10596 #include "confdefs.h"
10597 #include <langinfo.h>
10598 int
10599 main (void)
10600 {
10601 char* cs = nl_langinfo(CODESET);
10602   ;
10603   return 0;
10604 }
10605 _ACEOF
10606 rm -f conftest.$ac_objext conftest$ac_exeext
10607 if { (eval echo "$as_me:10607: \"$ac_link\"") >&5
10608   (eval $ac_link) 2>&5
10609   ac_status=$?
10610   echo "$as_me:10610: \$? = $ac_status" >&5
10611   (exit $ac_status); } &&
10612          { ac_try='test -s conftest$ac_exeext'
10613   { (eval echo "$as_me:10613: \"$ac_try\"") >&5
10614   (eval $ac_try) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); }; }; then
10618   am_cv_langinfo_codeset=yes
10619 else
10620   echo "$as_me: failed program was:" >&5
10621 cat conftest.$ac_ext >&5
10622 am_cv_langinfo_codeset=no
10623 fi
10624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10625
10626 fi
10627 echo "$as_me:10627: result: $am_cv_langinfo_codeset" >&5
10628 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10629         if test $am_cv_langinfo_codeset = yes; then
10630
10631 cat >>confdefs.h <<\EOF
10632 #define HAVE_LANGINFO_CODESET 1
10633 EOF
10634
10635         fi
10636
10637 # use these variables to work around a defect in gcc's fixincludes.
10638 NCURSES_OK_WCHAR_T=
10639 NCURSES_OK_WINT_T=
10640
10641 echo "$as_me:10641: checking if you want wide-character code" >&5
10642 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10643
10644 # Check whether --enable-widec or --disable-widec was given.
10645 if test "${enable_widec+set}" = set; then
10646   enableval="$enable_widec"
10647   with_widec=$enableval
10648 else
10649   with_widec=no
10650 fi;
10651 echo "$as_me:10651: result: $with_widec" >&5
10652 echo "${ECHO_T}$with_widec" >&6
10653
10654 NCURSES_WCWIDTH_GRAPHICS=1
10655
10656 if test "x$with_widec" = xyes ; then
10657         if test "x$disable_lib_suffixes" = xno ; then
10658                 LIB_SUFFIX="w${LIB_SUFFIX}"
10659         fi
10660
10661 cat >>confdefs.h <<\EOF
10662 #define USE_WIDEC_SUPPORT 1
10663 EOF
10664
10665 cat >>confdefs.h <<\EOF
10666 #define NCURSES_WIDECHAR 1
10667 EOF
10668
10669 for ac_header in \
10670 wchar.h \
10671 wctype.h \
10672
10673 do
10674 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10675 echo "$as_me:10675: checking for $ac_header" >&5
10676 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10677 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10678   echo $ECHO_N "(cached) $ECHO_C" >&6
10679 else
10680   cat >conftest.$ac_ext <<_ACEOF
10681 #line 10681 "configure"
10682 #include "confdefs.h"
10683 #include <$ac_header>
10684 _ACEOF
10685 if { (eval echo "$as_me:10685: \"$ac_cpp conftest.$ac_ext\"") >&5
10686   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10687   ac_status=$?
10688   egrep -v '^ *\+' conftest.er1 >conftest.err
10689   rm -f conftest.er1
10690   cat conftest.err >&5
10691   echo "$as_me:10691: \$? = $ac_status" >&5
10692   (exit $ac_status); } >/dev/null; then
10693   if test -s conftest.err; then
10694     ac_cpp_err=$ac_c_preproc_warn_flag
10695   else
10696     ac_cpp_err=
10697   fi
10698 else
10699   ac_cpp_err=yes
10700 fi
10701 if test -z "$ac_cpp_err"; then
10702   eval "$as_ac_Header=yes"
10703 else
10704   echo "$as_me: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   eval "$as_ac_Header=no"
10707 fi
10708 rm -f conftest.err conftest.$ac_ext
10709 fi
10710 echo "$as_me:10710: result: `eval echo '${'$as_ac_Header'}'`" >&5
10711 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10712 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10713   cat >>confdefs.h <<EOF
10714 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10715 EOF
10716
10717 fi
10718 done
10719
10720 echo "$as_me:10720: checking if wchar.h can be used as is" >&5
10721 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10722 if test "${cf_cv_wchar_h_okay+set}" = set; then
10723   echo $ECHO_N "(cached) $ECHO_C" >&6
10724 else
10725
10726 cat >conftest.$ac_ext <<_ACEOF
10727 #line 10727 "configure"
10728 #include "confdefs.h"
10729
10730 #include <stdlib.h>
10731 #ifdef HAVE_WCHAR_H
10732 #include <wchar.h>
10733 #endif
10734 #ifdef HAVE_WCTYPE_H
10735 #include <wctype.h>
10736 #endif
10737
10738 int
10739 main (void)
10740 {
10741
10742         wint_t foo = 0;
10743         int bar = iswpunct(foo)
10744   ;
10745   return 0;
10746 }
10747 _ACEOF
10748 rm -f conftest.$ac_objext
10749 if { (eval echo "$as_me:10749: \"$ac_compile\"") >&5
10750   (eval $ac_compile) 2>&5
10751   ac_status=$?
10752   echo "$as_me:10752: \$? = $ac_status" >&5
10753   (exit $ac_status); } &&
10754          { ac_try='test -s conftest.$ac_objext'
10755   { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756   (eval $ac_try) 2>&5
10757   ac_status=$?
10758   echo "$as_me:10758: \$? = $ac_status" >&5
10759   (exit $ac_status); }; }; then
10760   cf_cv_wchar_h_okay=yes
10761 else
10762   echo "$as_me: failed program was:" >&5
10763 cat conftest.$ac_ext >&5
10764 cf_cv_wchar_h_okay=no
10765 fi
10766 rm -f conftest.$ac_objext conftest.$ac_ext
10767 fi
10768 echo "$as_me:10768: result: $cf_cv_wchar_h_okay" >&5
10769 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10770
10771 if test $cf_cv_wchar_h_okay = no
10772 then
10773
10774 echo "$as_me:10774: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10775 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10776 cat >conftest.$ac_ext <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10779 #include <sys/types.h>
10780
10781 int
10782 main (void)
10783 {
10784
10785 #ifndef _XOPEN_SOURCE_EXTENDED
10786 make an error
10787 #endif
10788   ;
10789   return 0;
10790 }
10791 _ACEOF
10792 rm -f conftest.$ac_objext
10793 if { (eval echo "$as_me:10793: \"$ac_compile\"") >&5
10794   (eval $ac_compile) 2>&5
10795   ac_status=$?
10796   echo "$as_me:10796: \$? = $ac_status" >&5
10797   (exit $ac_status); } &&
10798          { ac_try='test -s conftest.$ac_objext'
10799   { (eval echo "$as_me:10799: \"$ac_try\"") >&5
10800   (eval $ac_try) 2>&5
10801   ac_status=$?
10802   echo "$as_me:10802: \$? = $ac_status" >&5
10803   (exit $ac_status); }; }; then
10804   cf_result=no
10805 else
10806   echo "$as_me: failed program was:" >&5
10807 cat conftest.$ac_ext >&5
10808 cf_result=yes
10809 fi
10810 rm -f conftest.$ac_objext conftest.$ac_ext
10811 echo "$as_me:10811: result: $cf_result" >&5
10812 echo "${ECHO_T}$cf_result" >&6
10813
10814 if test "$cf_result" = yes ; then
10815         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10816 elif test "x" != "x" ; then
10817         echo "$as_me:10817: checking checking for compatible value versus " >&5
10818 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10819         cat >conftest.$ac_ext <<_ACEOF
10820 #line 10820 "configure"
10821 #include "confdefs.h"
10822 #include <sys/types.h>
10823
10824 int
10825 main (void)
10826 {
10827
10828 #if _XOPEN_SOURCE_EXTENDED- < 0
10829 make an error
10830 #endif
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:10836: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit $ac_status); } &&
10841          { ac_try='test -s conftest.$ac_objext'
10842   { (eval echo "$as_me:10842: \"$ac_try\"") >&5
10843   (eval $ac_try) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit $ac_status); }; }; then
10847   cf_result=yes
10848 else
10849   echo "$as_me: failed program was:" >&5
10850 cat conftest.$ac_ext >&5
10851 cf_result=no
10852 fi
10853 rm -f conftest.$ac_objext conftest.$ac_ext
10854         echo "$as_me:10854: result: $cf_result" >&5
10855 echo "${ECHO_T}$cf_result" >&6
10856         if test "$cf_result" = no ; then
10857                 # perhaps we can override it - try...
10858                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10859         fi
10860 fi
10861
10862 fi
10863
10864 echo "$as_me:10864: checking if wcwidth agrees graphics are single-width" >&5
10865 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10866 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10867   echo $ECHO_N "(cached) $ECHO_C" >&6
10868 else
10869
10870 cat >conftest.in <<CF_EOF
10871 -       VT100 symbols
10872 0x250c  upper left corner
10873 0x2514  lower left corner
10874 0x2510  upper right corner
10875 0x2518  lower right corner
10876 0x251c  tee pointing left
10877 0x2524  tee pointing right
10878 0x2534  tee pointing up
10879 0x252c  tee pointing down
10880 0x2500  horizontal line
10881 0x2502  vertical line
10882 0x253c  large plus or crossover
10883 0x23ba  scan line 1
10884 0x23bd  scan line 9
10885 0x25c6  diamond
10886 0x2592  checker board (stipple)
10887 0x00b0  degree symbol
10888 0x00b1  plus/minus
10889 0x00b7  bullet
10890 -       Teletype 5410v1 symbols
10891 0x2190  arrow pointing left
10892 0x2192  arrow pointing right
10893 0x2193  arrow pointing down
10894 0x2191  arrow pointing up
10895 0x2592  board of squares
10896 0x2603  lantern symbol
10897 0x25ae  solid square block
10898 -       these defaults were invented for ncurses
10899 0x23bb  scan line 3
10900 0x23bc  scan line 7
10901 0x2264  less-than-or-equal-to
10902 0x2265  greater-than-or-equal-to
10903 0x03c0  greek pi
10904 0x2260  not-equal
10905 0x00a3  pound-sterling symbol
10906 -       thick-line-drawing
10907 0x250f  upper left corner
10908 0x2517  lower left corner
10909 0x2513  upper right corner
10910 0x251b  lower right corner
10911 0x2523  tee pointing left
10912 0x252b  tee pointing right
10913 0x253b  tee pointing up
10914 0x2533  tee pointing down
10915 0x2501  horizontal line
10916 0x2503  vertical line
10917 0x254b  large plus or crossover
10918 -       double-line-drawing
10919 0x2554  upper left corner
10920 0x255a  lower left corner
10921 0x2557  upper right corner
10922 0x255d  lower right corner
10923 0x2563  tee pointing left
10924 0x2560  tee pointing right
10925 0x2569  tee pointing up
10926 0x2566  tee pointing down
10927 0x2550  horizontal line
10928 0x2551  vertical line
10929 0x256c  large plus or crossover
10930 CF_EOF
10931 if test "$cross_compiling" = yes; then
10932   cf_cv_wcwidth_graphics=unknown
10933 else
10934   cat >conftest.$ac_ext <<_ACEOF
10935 #line 10935 "configure"
10936 #include "confdefs.h"
10937
10938 #include <locale.h>
10939 #include <stdio.h>
10940 #include <wchar.h>
10941
10942 #define MY_LEN 80
10943
10944 int
10945 main(void)
10946 {
10947         FILE *fp;
10948         int value;
10949         char buffer[MY_LEN + 1];
10950         char notes[MY_LEN + 1];
10951         int totals = 0;
10952         int passed = 0;
10953
10954         if (setlocale(LC_ALL, "en_US.UTF8") ||
10955                 setlocale(LC_ALL, "en_US.UTF-8") ||
10956                 setlocale(LC_ALL, "en_US.utf8") ||
10957                 setlocale(LC_ALL, "en_US.utf-8")) {
10958                 if ((fp = fopen("conftest.in", "r")) != 0) {
10959                         while (fgets(buffer, MY_LEN, fp) != 0) {
10960                                 if (*buffer == '-') {
10961                                         fprintf(stderr, "\t%s", buffer);
10962                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10963                                         ++totals;
10964                                         if (wcwidth(value) == 1)
10965                                                 ++passed;
10966                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10967                                 } else {
10968                                         fprintf(stderr, "?\t%s", buffer);
10969                                 }
10970                         }
10971                 }
10972         }
10973         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10974         return (totals == passed) ? 0 : 1;
10975 }
10976
10977 _ACEOF
10978 rm -f conftest$ac_exeext
10979 if { (eval echo "$as_me:10979: \"$ac_link\"") >&5
10980   (eval $ac_link) 2>&5
10981   ac_status=$?
10982   echo "$as_me:10982: \$? = $ac_status" >&5
10983   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10984   { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985   (eval $ac_try) 2>&5
10986   ac_status=$?
10987   echo "$as_me:10987: \$? = $ac_status" >&5
10988   (exit $ac_status); }; }; then
10989   cf_cv_wcwidth_graphics=yes
10990 else
10991   echo "$as_me: program exited with status $ac_status" >&5
10992 echo "$as_me: failed program was:" >&5
10993 cat conftest.$ac_ext >&5
10994 cf_cv_wcwidth_graphics=no
10995 fi
10996 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10997 fi
10998
10999 fi
11000 echo "$as_me:11000: result: $cf_cv_wcwidth_graphics" >&5
11001 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11002
11003         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11004
11005         # with_overwrite=no
11006         NCURSES_CH_T=cchar_t
11007
11008 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11009 do
11010 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11011 echo "$as_me:11011: checking for $ac_func" >&5
11012 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11013 if eval "test \"\${$as_ac_var+set}\" = set"; then
11014   echo $ECHO_N "(cached) $ECHO_C" >&6
11015 else
11016   cat >conftest.$ac_ext <<_ACEOF
11017 #line 11017 "configure"
11018 #include "confdefs.h"
11019 #define $ac_func autoconf_temporary
11020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11021 #undef $ac_func
11022
11023 #ifdef __cplusplus
11024 extern "C"
11025 #endif
11026
11027 /* We use char because int might match the return type of a gcc2
11028    builtin and then its argument prototype would still apply.  */
11029 char $ac_func (void);
11030
11031 int
11032 main (void)
11033 {
11034
11035 /* The GNU C library defines stubs for functions which it implements
11036     to always fail with ENOSYS.  Some functions are actually named
11037     something starting with __ and the normal name is an alias.  */
11038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11039 #error found stub for $ac_func
11040 #endif
11041
11042         return $ac_func ();
11043   ;
11044   return 0;
11045 }
11046 _ACEOF
11047 rm -f conftest.$ac_objext conftest$ac_exeext
11048 if { (eval echo "$as_me:11048: \"$ac_link\"") >&5
11049   (eval $ac_link) 2>&5
11050   ac_status=$?
11051   echo "$as_me:11051: \$? = $ac_status" >&5
11052   (exit $ac_status); } &&
11053          { ac_try='test -s conftest$ac_exeext'
11054   { (eval echo "$as_me:11054: \"$ac_try\"") >&5
11055   (eval $ac_try) 2>&5
11056   ac_status=$?
11057   echo "$as_me:11057: \$? = $ac_status" >&5
11058   (exit $ac_status); }; }; then
11059   eval "$as_ac_var=yes"
11060 else
11061   echo "$as_me: failed program was:" >&5
11062 cat conftest.$ac_ext >&5
11063 eval "$as_ac_var=no"
11064 fi
11065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11066 fi
11067 echo "$as_me:11067: result: `eval echo '${'$as_ac_var'}'`" >&5
11068 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11069 if test `eval echo '${'$as_ac_var'}'` = yes; then
11070   cat >>confdefs.h <<EOF
11071 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11072 EOF
11073
11074 fi
11075 done
11076
11077         if test "x$ac_cv_func_putwc" != xyes ; then
11078
11079 echo "$as_me:11079: checking for multibyte character support" >&5
11080 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11081 if test "${cf_cv_utf8_lib+set}" = set; then
11082   echo $ECHO_N "(cached) $ECHO_C" >&6
11083 else
11084
11085         cf_save_LIBS="$LIBS"
11086         cat >conftest.$ac_ext <<_ACEOF
11087 #line 11087 "configure"
11088 #include "confdefs.h"
11089
11090 #include <stdlib.h>
11091 int
11092 main (void)
11093 {
11094 putwc(0,0);
11095   ;
11096   return 0;
11097 }
11098 _ACEOF
11099 rm -f conftest.$ac_objext conftest$ac_exeext
11100 if { (eval echo "$as_me:11100: \"$ac_link\"") >&5
11101   (eval $ac_link) 2>&5
11102   ac_status=$?
11103   echo "$as_me:11103: \$? = $ac_status" >&5
11104   (exit $ac_status); } &&
11105          { ac_try='test -s conftest$ac_exeext'
11106   { (eval echo "$as_me:11106: \"$ac_try\"") >&5
11107   (eval $ac_try) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); }; }; then
11111   cf_cv_utf8_lib=yes
11112 else
11113   echo "$as_me: failed program was:" >&5
11114 cat conftest.$ac_ext >&5
11115
11116 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11117 # will be set on completion of the AC_TRY_LINK below.
11118 cf_cv_header_path_utf8=
11119 cf_cv_library_path_utf8=
11120
11121 echo "${as_me:-configure}:11121: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11122
11123 cf_save_LIBS="$LIBS"
11124
11125 cat >conftest.$ac_ext <<_ACEOF
11126 #line 11126 "configure"
11127 #include "confdefs.h"
11128
11129 #include <libutf8.h>
11130 int
11131 main (void)
11132 {
11133 putwc(0,0);
11134   ;
11135   return 0;
11136 }
11137 _ACEOF
11138 rm -f conftest.$ac_objext conftest$ac_exeext
11139 if { (eval echo "$as_me:11139: \"$ac_link\"") >&5
11140   (eval $ac_link) 2>&5
11141   ac_status=$?
11142   echo "$as_me:11142: \$? = $ac_status" >&5
11143   (exit $ac_status); } &&
11144          { ac_try='test -s conftest$ac_exeext'
11145   { (eval echo "$as_me:11145: \"$ac_try\"") >&5
11146   (eval $ac_try) 2>&5
11147   ac_status=$?
11148   echo "$as_me:11148: \$? = $ac_status" >&5
11149   (exit $ac_status); }; }; then
11150
11151         cf_cv_find_linkage_utf8=yes
11152         cf_cv_header_path_utf8=/usr/include
11153         cf_cv_library_path_utf8=/usr/lib
11154
11155 else
11156   echo "$as_me: failed program was:" >&5
11157 cat conftest.$ac_ext >&5
11158
11159 LIBS="-lutf8  $cf_save_LIBS"
11160
11161 cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11164
11165 #include <libutf8.h>
11166 int
11167 main (void)
11168 {
11169 putwc(0,0);
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 rm -f conftest.$ac_objext conftest$ac_exeext
11175 if { (eval echo "$as_me:11175: \"$ac_link\"") >&5
11176   (eval $ac_link) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); } &&
11180          { ac_try='test -s conftest$ac_exeext'
11181   { (eval echo "$as_me:11181: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); }; }; then
11186
11187         cf_cv_find_linkage_utf8=yes
11188         cf_cv_header_path_utf8=/usr/include
11189         cf_cv_library_path_utf8=/usr/lib
11190         cf_cv_library_file_utf8="-lutf8"
11191
11192 else
11193   echo "$as_me: failed program was:" >&5
11194 cat conftest.$ac_ext >&5
11195
11196         cf_cv_find_linkage_utf8=no
11197         LIBS="$cf_save_LIBS"
11198
11199         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11200
11201 echo "${as_me:-configure}:11201: testing find linkage for utf8 library ..." 1>&5
11202
11203 echo "${as_me:-configure}:11203: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11204
11205         cf_save_CPPFLAGS="$CPPFLAGS"
11206         cf_test_CPPFLAGS="$CPPFLAGS"
11207
11208 cf_search=
11209
11210 # collect the current set of include-directories from compiler flags
11211 cf_header_path_list=""
11212 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11213         for cf_header_path in $CPPFLAGS $CFLAGS
11214         do
11215                 case $cf_header_path in
11216                 (-I*)
11217                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11218
11219 test "x$cf_header_path" != "xNONE" && \
11220 test -d "$cf_header_path" && \
11221  {
11222         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11223         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11224         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11225         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11226         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11227         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11228 }
11229
11230                         cf_header_path_list="$cf_header_path_list $cf_search"
11231                         ;;
11232                 esac
11233         done
11234 fi
11235
11236 # add the variations for the package we are looking for
11237
11238 cf_search=
11239
11240 test "x$prefix" != "xNONE" && \
11241 test -d "$prefix" && \
11242  {
11243         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11244         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11245         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11246         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11247         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11248         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11249 }
11250
11251 for cf_subdir_prefix in \
11252         /usr \
11253         /usr/local \
11254         /usr/pkg \
11255         /opt \
11256         /opt/local \
11257         $HOME
11258 do
11259
11260 test "x$cf_subdir_prefix" != "x$prefix" && \
11261 test -d "$cf_subdir_prefix" && \
11262 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11263         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11264         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11265         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11266         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11267         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11268         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11269 }
11270
11271 done
11272
11273 test "$includedir" != NONE && \
11274 test "$includedir" != "/usr/include" && \
11275 test -d "$includedir" && {
11276         test -d $includedir &&    cf_search="$cf_search $includedir"
11277         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11278 }
11279
11280 test "$oldincludedir" != NONE && \
11281 test "$oldincludedir" != "/usr/include" && \
11282 test -d "$oldincludedir" && {
11283         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11284         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11285 }
11286
11287 cf_search="$cf_search $cf_header_path_list"
11288
11289         for cf_cv_header_path_utf8 in $cf_search
11290         do
11291                 if test -d $cf_cv_header_path_utf8 ; then
11292                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11293
11294 echo "${as_me:-configure}:11294: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11295
11296                         CPPFLAGS="$cf_save_CPPFLAGS"
11297
11298         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11299         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11300
11301                         cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11304
11305 #include <libutf8.h>
11306 int
11307 main (void)
11308 {
11309 putwc(0,0);
11310   ;
11311   return 0;
11312 }
11313 _ACEOF
11314 rm -f conftest.$ac_objext
11315 if { (eval echo "$as_me:11315: \"$ac_compile\"") >&5
11316   (eval $ac_compile) 2>&5
11317   ac_status=$?
11318   echo "$as_me:11318: \$? = $ac_status" >&5
11319   (exit $ac_status); } &&
11320          { ac_try='test -s conftest.$ac_objext'
11321   { (eval echo "$as_me:11321: \"$ac_try\"") >&5
11322   (eval $ac_try) 2>&5
11323   ac_status=$?
11324   echo "$as_me:11324: \$? = $ac_status" >&5
11325   (exit $ac_status); }; }; then
11326
11327                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11328
11329 echo "${as_me:-configure}:11329: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11330
11331                                 cf_cv_find_linkage_utf8=maybe
11332                                 cf_test_CPPFLAGS="$CPPFLAGS"
11333                                 break
11334 else
11335   echo "$as_me: failed program was:" >&5
11336 cat conftest.$ac_ext >&5
11337
11338                                 CPPFLAGS="$cf_save_CPPFLAGS"
11339
11340 fi
11341 rm -f conftest.$ac_objext conftest.$ac_ext
11342                 fi
11343         done
11344
11345         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11346
11347 echo "${as_me:-configure}:11347: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11348
11349                 cf_save_LIBS="$LIBS"
11350                 cf_save_LDFLAGS="$LDFLAGS"
11351
11352                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11353
11354 cf_search=
11355 cf_library_path_list=""
11356 if test -n "${LDFLAGS}${LIBS}" ; then
11357         for cf_library_path in $LDFLAGS $LIBS
11358         do
11359                 case $cf_library_path in
11360                 (-L*)
11361                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11362
11363 test "x$cf_library_path" != "xNONE" && \
11364 test -d "$cf_library_path" && \
11365  {
11366         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11367         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11368         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11369         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11370         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11371         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11372 }
11373
11374                         cf_library_path_list="$cf_library_path_list $cf_search"
11375                         ;;
11376                 esac
11377         done
11378 fi
11379
11380 cf_search=
11381
11382 test "x$prefix" != "xNONE" && \
11383 test -d "$prefix" && \
11384  {
11385         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11386         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11387         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11388         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11389         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11390         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11391 }
11392
11393 for cf_subdir_prefix in \
11394         /usr \
11395         /usr/local \
11396         /usr/pkg \
11397         /opt \
11398         /opt/local \
11399         $HOME
11400 do
11401
11402 test "x$cf_subdir_prefix" != "x$prefix" && \
11403 test -d "$cf_subdir_prefix" && \
11404 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11405         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11406         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11407         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11408         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11409         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11410         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11411 }
11412
11413 done
11414
11415 cf_search="$cf_library_path_list $cf_search"
11416
11417                         for cf_cv_library_path_utf8 in $cf_search
11418                         do
11419                                 if test -d $cf_cv_library_path_utf8 ; then
11420                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11421
11422 echo "${as_me:-configure}:11422: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11423
11424                                         CPPFLAGS="$cf_test_CPPFLAGS"
11425                                         LIBS="-lutf8  $cf_save_LIBS"
11426                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11427                                         cat >conftest.$ac_ext <<_ACEOF
11428 #line 11428 "configure"
11429 #include "confdefs.h"
11430
11431 #include <libutf8.h>
11432 int
11433 main (void)
11434 {
11435 putwc(0,0);
11436   ;
11437   return 0;
11438 }
11439 _ACEOF
11440 rm -f conftest.$ac_objext conftest$ac_exeext
11441 if { (eval echo "$as_me:11441: \"$ac_link\"") >&5
11442   (eval $ac_link) 2>&5
11443   ac_status=$?
11444   echo "$as_me:11444: \$? = $ac_status" >&5
11445   (exit $ac_status); } &&
11446          { ac_try='test -s conftest$ac_exeext'
11447   { (eval echo "$as_me:11447: \"$ac_try\"") >&5
11448   (eval $ac_try) 2>&5
11449   ac_status=$?
11450   echo "$as_me:11450: \$? = $ac_status" >&5
11451   (exit $ac_status); }; }; then
11452
11453                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11454
11455 echo "${as_me:-configure}:11455: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11456
11457                                         cf_cv_find_linkage_utf8=yes
11458                                         cf_cv_library_file_utf8="-lutf8"
11459                                         break
11460 else
11461   echo "$as_me: failed program was:" >&5
11462 cat conftest.$ac_ext >&5
11463
11464                                         CPPFLAGS="$cf_save_CPPFLAGS"
11465                                         LIBS="$cf_save_LIBS"
11466                                         LDFLAGS="$cf_save_LDFLAGS"
11467
11468 fi
11469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11470                                 fi
11471                         done
11472                         CPPFLAGS="$cf_save_CPPFLAGS"
11473                         LDFLAGS="$cf_save_LDFLAGS"
11474                 fi
11475
11476         else
11477                 cf_cv_find_linkage_utf8=no
11478         fi
11479
11480 fi
11481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11482
11483 fi
11484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11485
11486 LIBS="$cf_save_LIBS"
11487
11488 if test "$cf_cv_find_linkage_utf8" = yes ; then
11489 cf_cv_utf8_lib=add-on
11490 else
11491 cf_cv_utf8_lib=no
11492 fi
11493
11494 fi
11495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11496 fi
11497 echo "$as_me:11497: result: $cf_cv_utf8_lib" >&5
11498 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11499
11500 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11501 # ncurses/ncursesw:
11502 if test "$cf_cv_utf8_lib" = "add-on" ; then
11503
11504 cat >>confdefs.h <<\EOF
11505 #define HAVE_LIBUTF8_H 1
11506 EOF
11507
11508 if test -n "$cf_cv_header_path_utf8" ; then
11509   for cf_add_incdir in $cf_cv_header_path_utf8
11510   do
11511         while test $cf_add_incdir != /usr/include
11512         do
11513           if test -d $cf_add_incdir
11514           then
11515                 cf_have_incdir=no
11516                 if test -n "$CFLAGS$CPPFLAGS" ; then
11517                   # a loop is needed to ensure we can add subdirs of existing dirs
11518                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11519                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11520                           cf_have_incdir=yes; break
11521                         fi
11522                   done
11523                 fi
11524
11525                 if test "$cf_have_incdir" = no ; then
11526                   if test "$cf_add_incdir" = /usr/local/include ; then
11527                         if test "$GCC" = yes
11528                         then
11529                           cf_save_CPPFLAGS=$CPPFLAGS
11530
11531         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11532         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11533
11534                           cat >conftest.$ac_ext <<_ACEOF
11535 #line 11535 "configure"
11536 #include "confdefs.h"
11537 #include <stdio.h>
11538 int
11539 main (void)
11540 {
11541 printf("Hello")
11542   ;
11543   return 0;
11544 }
11545 _ACEOF
11546 rm -f conftest.$ac_objext
11547 if { (eval echo "$as_me:11547: \"$ac_compile\"") >&5
11548   (eval $ac_compile) 2>&5
11549   ac_status=$?
11550   echo "$as_me:11550: \$? = $ac_status" >&5
11551   (exit $ac_status); } &&
11552          { ac_try='test -s conftest.$ac_objext'
11553   { (eval echo "$as_me:11553: \"$ac_try\"") >&5
11554   (eval $ac_try) 2>&5
11555   ac_status=$?
11556   echo "$as_me:11556: \$? = $ac_status" >&5
11557   (exit $ac_status); }; }; then
11558   :
11559 else
11560   echo "$as_me: failed program was:" >&5
11561 cat conftest.$ac_ext >&5
11562 cf_have_incdir=yes
11563 fi
11564 rm -f conftest.$ac_objext conftest.$ac_ext
11565                           CPPFLAGS=$cf_save_CPPFLAGS
11566                         fi
11567                   fi
11568                 fi
11569
11570                 if test "$cf_have_incdir" = no ; then
11571                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11572
11573 echo "${as_me:-configure}:11573: testing adding $cf_add_incdir to include-path ..." 1>&5
11574
11575                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11576
11577                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11578                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11579                   cf_add_incdir="$cf_top_incdir"
11580                 else
11581                   break
11582                 fi
11583           else
11584                 break
11585           fi
11586         done
11587   done
11588 fi
11589
11590 if test -n "$cf_cv_library_path_utf8" ; then
11591         for cf_add_libdir in $cf_cv_library_path_utf8
11592         do
11593                 if test $cf_add_libdir = /usr/lib ; then
11594                         :
11595                 elif test -d $cf_add_libdir
11596                 then
11597                         cf_have_libdir=no
11598                         if test -n "$LDFLAGS$LIBS" ; then
11599                                 # a loop is needed to ensure we can add subdirs of existing dirs
11600                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11601                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11602                                                 cf_have_libdir=yes; break
11603                                         fi
11604                                 done
11605                         fi
11606                         if test "$cf_have_libdir" = no ; then
11607                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11608
11609 echo "${as_me:-configure}:11609: testing adding $cf_add_libdir to library-path ..." 1>&5
11610
11611                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11612                         fi
11613                 fi
11614         done
11615 fi
11616
11617 cf_add_libs="$cf_cv_library_file_utf8"
11618 # Filter out duplicates - this happens with badly-designed ".pc" files...
11619 for cf_add_1lib in $LIBS
11620 do
11621         for cf_add_2lib in $cf_add_libs
11622         do
11623                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11624                 then
11625                         cf_add_1lib=
11626                         break
11627                 fi
11628         done
11629         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11630 done
11631 LIBS="$cf_add_libs"
11632
11633 fi
11634
11635                 if test "$cf_cv_utf8_lib" != no ; then
11636                         NCURSES_LIBUTF8=1
11637                 fi
11638         fi
11639
11640 # This is needed on Tru64 5.0 to declare mbstate_t
11641 echo "$as_me:11641: checking if we must include wchar.h to declare mbstate_t" >&5
11642 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11643 if test "${cf_cv_mbstate_t+set}" = set; then
11644   echo $ECHO_N "(cached) $ECHO_C" >&6
11645 else
11646
11647 cat >conftest.$ac_ext <<_ACEOF
11648 #line 11648 "configure"
11649 #include "confdefs.h"
11650
11651 #include <stdlib.h>
11652 #include <stdarg.h>
11653 #include <stdio.h>
11654 #ifdef HAVE_LIBUTF8_H
11655 #include <libutf8.h>
11656 #endif
11657 int
11658 main (void)
11659 {
11660 mbstate_t state
11661   ;
11662   return 0;
11663 }
11664 _ACEOF
11665 rm -f conftest.$ac_objext
11666 if { (eval echo "$as_me:11666: \"$ac_compile\"") >&5
11667   (eval $ac_compile) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); } &&
11671          { ac_try='test -s conftest.$ac_objext'
11672   { (eval echo "$as_me:11672: \"$ac_try\"") >&5
11673   (eval $ac_try) 2>&5
11674   ac_status=$?
11675   echo "$as_me:11675: \$? = $ac_status" >&5
11676   (exit $ac_status); }; }; then
11677   cf_cv_mbstate_t=no
11678 else
11679   echo "$as_me: failed program was:" >&5
11680 cat conftest.$ac_ext >&5
11681 cat >conftest.$ac_ext <<_ACEOF
11682 #line 11682 "configure"
11683 #include "confdefs.h"
11684
11685 #include <stdlib.h>
11686 #include <stdarg.h>
11687 #include <stdio.h>
11688 #include <wchar.h>
11689 #ifdef HAVE_LIBUTF8_H
11690 #include <libutf8.h>
11691 #endif
11692 int
11693 main (void)
11694 {
11695 mbstate_t value
11696   ;
11697   return 0;
11698 }
11699 _ACEOF
11700 rm -f conftest.$ac_objext
11701 if { (eval echo "$as_me:11701: \"$ac_compile\"") >&5
11702   (eval $ac_compile) 2>&5
11703   ac_status=$?
11704   echo "$as_me:11704: \$? = $ac_status" >&5
11705   (exit $ac_status); } &&
11706          { ac_try='test -s conftest.$ac_objext'
11707   { (eval echo "$as_me:11707: \"$ac_try\"") >&5
11708   (eval $ac_try) 2>&5
11709   ac_status=$?
11710   echo "$as_me:11710: \$? = $ac_status" >&5
11711   (exit $ac_status); }; }; then
11712   cf_cv_mbstate_t=yes
11713 else
11714   echo "$as_me: failed program was:" >&5
11715 cat conftest.$ac_ext >&5
11716 cf_cv_mbstate_t=unknown
11717 fi
11718 rm -f conftest.$ac_objext conftest.$ac_ext
11719 fi
11720 rm -f conftest.$ac_objext conftest.$ac_ext
11721 fi
11722 echo "$as_me:11722: result: $cf_cv_mbstate_t" >&5
11723 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11724
11725 if test "$cf_cv_mbstate_t" = yes ; then
11726
11727 cat >>confdefs.h <<\EOF
11728 #define NEED_WCHAR_H 1
11729 EOF
11730
11731         NEED_WCHAR_H=1
11732 fi
11733
11734 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11735 if test "$cf_cv_mbstate_t" = unknown ; then
11736         NCURSES_MBSTATE_T=1
11737 fi
11738
11739 # This is needed on Tru64 5.0 to declare wchar_t
11740 echo "$as_me:11740: checking if we must include wchar.h to declare wchar_t" >&5
11741 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11742 if test "${cf_cv_wchar_t+set}" = set; then
11743   echo $ECHO_N "(cached) $ECHO_C" >&6
11744 else
11745
11746 cat >conftest.$ac_ext <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749
11750 #include <stdlib.h>
11751 #include <stdarg.h>
11752 #include <stdio.h>
11753 #ifdef HAVE_LIBUTF8_H
11754 #include <libutf8.h>
11755 #endif
11756 int
11757 main (void)
11758 {
11759 wchar_t state
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f conftest.$ac_objext
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit $ac_status); } &&
11770          { ac_try='test -s conftest.$ac_objext'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); }; }; then
11776   cf_cv_wchar_t=no
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat conftest.$ac_ext >&5
11780 cat >conftest.$ac_ext <<_ACEOF
11781 #line 11781 "configure"
11782 #include "confdefs.h"
11783
11784 #include <stdlib.h>
11785 #include <stdarg.h>
11786 #include <stdio.h>
11787 #include <wchar.h>
11788 #ifdef HAVE_LIBUTF8_H
11789 #include <libutf8.h>
11790 #endif
11791 int
11792 main (void)
11793 {
11794 wchar_t value
11795   ;
11796   return 0;
11797 }
11798 _ACEOF
11799 rm -f conftest.$ac_objext
11800 if { (eval echo "$as_me:11800: \"$ac_compile\"") >&5
11801   (eval $ac_compile) 2>&5
11802   ac_status=$?
11803   echo "$as_me:11803: \$? = $ac_status" >&5
11804   (exit $ac_status); } &&
11805          { ac_try='test -s conftest.$ac_objext'
11806   { (eval echo "$as_me:11806: \"$ac_try\"") >&5
11807   (eval $ac_try) 2>&5
11808   ac_status=$?
11809   echo "$as_me:11809: \$? = $ac_status" >&5
11810   (exit $ac_status); }; }; then
11811   cf_cv_wchar_t=yes
11812 else
11813   echo "$as_me: failed program was:" >&5
11814 cat conftest.$ac_ext >&5
11815 cf_cv_wchar_t=unknown
11816 fi
11817 rm -f conftest.$ac_objext conftest.$ac_ext
11818 fi
11819 rm -f conftest.$ac_objext conftest.$ac_ext
11820 fi
11821 echo "$as_me:11821: result: $cf_cv_wchar_t" >&5
11822 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11823
11824 if test "$cf_cv_wchar_t" = yes ; then
11825
11826 cat >>confdefs.h <<\EOF
11827 #define NEED_WCHAR_H 1
11828 EOF
11829
11830         NEED_WCHAR_H=1
11831 fi
11832
11833 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11834 if test "$cf_cv_wchar_t" = unknown ; then
11835         NCURSES_WCHAR_T=1
11836 fi
11837
11838 # if we find wchar_t in either place, use substitution to provide a fallback.
11839 if test "$cf_cv_wchar_t" != unknown ; then
11840         NCURSES_OK_WCHAR_T=1
11841 fi
11842
11843 # This is needed on Tru64 5.0 to declare wint_t
11844 echo "$as_me:11844: checking if we must include wchar.h to declare wint_t" >&5
11845 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11846 if test "${cf_cv_wint_t+set}" = set; then
11847   echo $ECHO_N "(cached) $ECHO_C" >&6
11848 else
11849
11850 cat >conftest.$ac_ext <<_ACEOF
11851 #line 11851 "configure"
11852 #include "confdefs.h"
11853
11854 #include <stdlib.h>
11855 #include <stdarg.h>
11856 #include <stdio.h>
11857 #ifdef HAVE_LIBUTF8_H
11858 #include <libutf8.h>
11859 #endif
11860 int
11861 main (void)
11862 {
11863 wint_t state
11864   ;
11865   return 0;
11866 }
11867 _ACEOF
11868 rm -f conftest.$ac_objext
11869 if { (eval echo "$as_me:11869: \"$ac_compile\"") >&5
11870   (eval $ac_compile) 2>&5
11871   ac_status=$?
11872   echo "$as_me:11872: \$? = $ac_status" >&5
11873   (exit $ac_status); } &&
11874          { ac_try='test -s conftest.$ac_objext'
11875   { (eval echo "$as_me:11875: \"$ac_try\"") >&5
11876   (eval $ac_try) 2>&5
11877   ac_status=$?
11878   echo "$as_me:11878: \$? = $ac_status" >&5
11879   (exit $ac_status); }; }; then
11880   cf_cv_wint_t=no
11881 else
11882   echo "$as_me: failed program was:" >&5
11883 cat conftest.$ac_ext >&5
11884 cat >conftest.$ac_ext <<_ACEOF
11885 #line 11885 "configure"
11886 #include "confdefs.h"
11887
11888 #include <stdlib.h>
11889 #include <stdarg.h>
11890 #include <stdio.h>
11891 #include <wchar.h>
11892 #ifdef HAVE_LIBUTF8_H
11893 #include <libutf8.h>
11894 #endif
11895 int
11896 main (void)
11897 {
11898 wint_t value
11899   ;
11900   return 0;
11901 }
11902 _ACEOF
11903 rm -f conftest.$ac_objext
11904 if { (eval echo "$as_me:11904: \"$ac_compile\"") >&5
11905   (eval $ac_compile) 2>&5
11906   ac_status=$?
11907   echo "$as_me:11907: \$? = $ac_status" >&5
11908   (exit $ac_status); } &&
11909          { ac_try='test -s conftest.$ac_objext'
11910   { (eval echo "$as_me:11910: \"$ac_try\"") >&5
11911   (eval $ac_try) 2>&5
11912   ac_status=$?
11913   echo "$as_me:11913: \$? = $ac_status" >&5
11914   (exit $ac_status); }; }; then
11915   cf_cv_wint_t=yes
11916 else
11917   echo "$as_me: failed program was:" >&5
11918 cat conftest.$ac_ext >&5
11919 cf_cv_wint_t=unknown
11920 fi
11921 rm -f conftest.$ac_objext conftest.$ac_ext
11922 fi
11923 rm -f conftest.$ac_objext conftest.$ac_ext
11924 fi
11925 echo "$as_me:11925: result: $cf_cv_wint_t" >&5
11926 echo "${ECHO_T}$cf_cv_wint_t" >&6
11927
11928 if test "$cf_cv_wint_t" = yes ; then
11929
11930 cat >>confdefs.h <<\EOF
11931 #define NEED_WCHAR_H 1
11932 EOF
11933
11934         NEED_WCHAR_H=1
11935 fi
11936
11937 # if we do not find wint_t in either place, use substitution to provide a fallback.
11938 if test "$cf_cv_wint_t" = unknown ; then
11939         NCURSES_WINT_T=1
11940 fi
11941
11942 # if we find wint_t in either place, use substitution to provide a fallback.
11943 if test "$cf_cv_wint_t" != unknown ; then
11944         NCURSES_OK_WINT_T=1
11945 fi
11946
11947         if test "$NCURSES_MBSTATE_T" != 0; then
11948
11949 cat >>confdefs.h <<\EOF
11950 #define NEED_MBSTATE_T_DEF 1
11951 EOF
11952
11953         fi
11954 fi
11955
11956 ###   use option --disable-lp64 to allow long chtype
11957 echo "$as_me:11957: checking whether to enable _LP64 definition in curses.h" >&5
11958 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11959
11960 # Check whether --enable-lp64 or --disable-lp64 was given.
11961 if test "${enable_lp64+set}" = set; then
11962   enableval="$enable_lp64"
11963   with_lp64=$enableval
11964 else
11965   with_lp64=$cf_dft_with_lp64
11966 fi;
11967 echo "$as_me:11967: result: $with_lp64" >&5
11968 echo "${ECHO_T}$with_lp64" >&6
11969
11970 if test "x$with_lp64" = xyes ; then
11971         cf_cv_enable_lp64=1
11972 else
11973         cf_cv_enable_lp64=0
11974 fi
11975
11976 # Check whether --enable-largefile or --disable-largefile was given.
11977 if test "${enable_largefile+set}" = set; then
11978   enableval="$enable_largefile"
11979
11980 fi;
11981 if test "$enable_largefile" != no; then
11982
11983   echo "$as_me:11983: checking for special C compiler options needed for large files" >&5
11984 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11985 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11986   echo $ECHO_N "(cached) $ECHO_C" >&6
11987 else
11988   ac_cv_sys_largefile_CC=no
11989      if test "$GCC" != yes; then
11990        ac_save_CC=$CC
11991        while :; do
11992          # IRIX 6.2 and later do not support large files by default,
11993          # so use the C compiler's -n32 option if that helps.
11994          cat >conftest.$ac_ext <<_ACEOF
11995 #line 11995 "configure"
11996 #include "confdefs.h"
11997 #include <sys/types.h>
11998  /* Check that off_t can represent 2**63 - 1 correctly.
11999     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12000     since some C++ compilers masquerading as C compilers
12001     incorrectly reject 9223372036854775807.  */
12002 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12003   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12004                        && LARGE_OFF_T % 2147483647 == 1)
12005                       ? 1 : -1];
12006 int
12007 main (void)
12008 {
12009
12010   ;
12011   return 0;
12012 }
12013 _ACEOF
12014          rm -f conftest.$ac_objext
12015 if { (eval echo "$as_me:12015: \"$ac_compile\"") >&5
12016   (eval $ac_compile) 2>&5
12017   ac_status=$?
12018   echo "$as_me:12018: \$? = $ac_status" >&5
12019   (exit $ac_status); } &&
12020          { ac_try='test -s conftest.$ac_objext'
12021   { (eval echo "$as_me:12021: \"$ac_try\"") >&5
12022   (eval $ac_try) 2>&5
12023   ac_status=$?
12024   echo "$as_me:12024: \$? = $ac_status" >&5
12025   (exit $ac_status); }; }; then
12026   break
12027 else
12028   echo "$as_me: failed program was:" >&5
12029 cat conftest.$ac_ext >&5
12030 fi
12031 rm -f conftest.$ac_objext
12032          CC="$CC -n32"
12033          rm -f conftest.$ac_objext
12034 if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
12035   (eval $ac_compile) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); } &&
12039          { ac_try='test -s conftest.$ac_objext'
12040   { (eval echo "$as_me:12040: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:12043: \$? = $ac_status" >&5
12044   (exit $ac_status); }; }; then
12045   ac_cv_sys_largefile_CC=' -n32'; break
12046 else
12047   echo "$as_me: failed program was:" >&5
12048 cat conftest.$ac_ext >&5
12049 fi
12050 rm -f conftest.$ac_objext
12051          break
12052        done
12053        CC=$ac_save_CC
12054        rm -f conftest.$ac_ext
12055     fi
12056 fi
12057 echo "$as_me:12057: result: $ac_cv_sys_largefile_CC" >&5
12058 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12059   if test "$ac_cv_sys_largefile_CC" != no; then
12060     CC=$CC$ac_cv_sys_largefile_CC
12061   fi
12062
12063   echo "$as_me:12063: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12064 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12065 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12066   echo $ECHO_N "(cached) $ECHO_C" >&6
12067 else
12068   while :; do
12069   ac_cv_sys_file_offset_bits=no
12070   cat >conftest.$ac_ext <<_ACEOF
12071 #line 12071 "configure"
12072 #include "confdefs.h"
12073 #include <sys/types.h>
12074  /* Check that off_t can represent 2**63 - 1 correctly.
12075     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12076     since some C++ compilers masquerading as C compilers
12077     incorrectly reject 9223372036854775807.  */
12078 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12079   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12080                        && LARGE_OFF_T % 2147483647 == 1)
12081                       ? 1 : -1];
12082 int
12083 main (void)
12084 {
12085
12086   ;
12087   return 0;
12088 }
12089 _ACEOF
12090 rm -f conftest.$ac_objext
12091 if { (eval echo "$as_me:12091: \"$ac_compile\"") >&5
12092   (eval $ac_compile) 2>&5
12093   ac_status=$?
12094   echo "$as_me:12094: \$? = $ac_status" >&5
12095   (exit $ac_status); } &&
12096          { ac_try='test -s conftest.$ac_objext'
12097   { (eval echo "$as_me:12097: \"$ac_try\"") >&5
12098   (eval $ac_try) 2>&5
12099   ac_status=$?
12100   echo "$as_me:12100: \$? = $ac_status" >&5
12101   (exit $ac_status); }; }; then
12102   break
12103 else
12104   echo "$as_me: failed program was:" >&5
12105 cat conftest.$ac_ext >&5
12106 fi
12107 rm -f conftest.$ac_objext conftest.$ac_ext
12108   cat >conftest.$ac_ext <<_ACEOF
12109 #line 12109 "configure"
12110 #include "confdefs.h"
12111 #define _FILE_OFFSET_BITS 64
12112 #include <sys/types.h>
12113  /* Check that off_t can represent 2**63 - 1 correctly.
12114     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12115     since some C++ compilers masquerading as C compilers
12116     incorrectly reject 9223372036854775807.  */
12117 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12118   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12119                        && LARGE_OFF_T % 2147483647 == 1)
12120                       ? 1 : -1];
12121 int
12122 main (void)
12123 {
12124
12125   ;
12126   return 0;
12127 }
12128 _ACEOF
12129 rm -f conftest.$ac_objext
12130 if { (eval echo "$as_me:12130: \"$ac_compile\"") >&5
12131   (eval $ac_compile) 2>&5
12132   ac_status=$?
12133   echo "$as_me:12133: \$? = $ac_status" >&5
12134   (exit $ac_status); } &&
12135          { ac_try='test -s conftest.$ac_objext'
12136   { (eval echo "$as_me:12136: \"$ac_try\"") >&5
12137   (eval $ac_try) 2>&5
12138   ac_status=$?
12139   echo "$as_me:12139: \$? = $ac_status" >&5
12140   (exit $ac_status); }; }; then
12141   ac_cv_sys_file_offset_bits=64; break
12142 else
12143   echo "$as_me: failed program was:" >&5
12144 cat conftest.$ac_ext >&5
12145 fi
12146 rm -f conftest.$ac_objext conftest.$ac_ext
12147   break
12148 done
12149 fi
12150 echo "$as_me:12150: result: $ac_cv_sys_file_offset_bits" >&5
12151 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12152 if test "$ac_cv_sys_file_offset_bits" != no; then
12153
12154 cat >>confdefs.h <<EOF
12155 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12156 EOF
12157
12158 fi
12159 rm -rf conftest*
12160   echo "$as_me:12160: checking for _LARGE_FILES value needed for large files" >&5
12161 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12162 if test "${ac_cv_sys_large_files+set}" = set; then
12163   echo $ECHO_N "(cached) $ECHO_C" >&6
12164 else
12165   while :; do
12166   ac_cv_sys_large_files=no
12167   cat >conftest.$ac_ext <<_ACEOF
12168 #line 12168 "configure"
12169 #include "confdefs.h"
12170 #include <sys/types.h>
12171  /* Check that off_t can represent 2**63 - 1 correctly.
12172     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12173     since some C++ compilers masquerading as C compilers
12174     incorrectly reject 9223372036854775807.  */
12175 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12176   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12177                        && LARGE_OFF_T % 2147483647 == 1)
12178                       ? 1 : -1];
12179 int
12180 main (void)
12181 {
12182
12183   ;
12184   return 0;
12185 }
12186 _ACEOF
12187 rm -f conftest.$ac_objext
12188 if { (eval echo "$as_me:12188: \"$ac_compile\"") >&5
12189   (eval $ac_compile) 2>&5
12190   ac_status=$?
12191   echo "$as_me:12191: \$? = $ac_status" >&5
12192   (exit $ac_status); } &&
12193          { ac_try='test -s conftest.$ac_objext'
12194   { (eval echo "$as_me:12194: \"$ac_try\"") >&5
12195   (eval $ac_try) 2>&5
12196   ac_status=$?
12197   echo "$as_me:12197: \$? = $ac_status" >&5
12198   (exit $ac_status); }; }; then
12199   break
12200 else
12201   echo "$as_me: failed program was:" >&5
12202 cat conftest.$ac_ext >&5
12203 fi
12204 rm -f conftest.$ac_objext conftest.$ac_ext
12205   cat >conftest.$ac_ext <<_ACEOF
12206 #line 12206 "configure"
12207 #include "confdefs.h"
12208 #define _LARGE_FILES 1
12209 #include <sys/types.h>
12210  /* Check that off_t can represent 2**63 - 1 correctly.
12211     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12212     since some C++ compilers masquerading as C compilers
12213     incorrectly reject 9223372036854775807.  */
12214 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12215   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12216                        && LARGE_OFF_T % 2147483647 == 1)
12217                       ? 1 : -1];
12218 int
12219 main (void)
12220 {
12221
12222   ;
12223   return 0;
12224 }
12225 _ACEOF
12226 rm -f conftest.$ac_objext
12227 if { (eval echo "$as_me:12227: \"$ac_compile\"") >&5
12228   (eval $ac_compile) 2>&5
12229   ac_status=$?
12230   echo "$as_me:12230: \$? = $ac_status" >&5
12231   (exit $ac_status); } &&
12232          { ac_try='test -s conftest.$ac_objext'
12233   { (eval echo "$as_me:12233: \"$ac_try\"") >&5
12234   (eval $ac_try) 2>&5
12235   ac_status=$?
12236   echo "$as_me:12236: \$? = $ac_status" >&5
12237   (exit $ac_status); }; }; then
12238   ac_cv_sys_large_files=1; break
12239 else
12240   echo "$as_me: failed program was:" >&5
12241 cat conftest.$ac_ext >&5
12242 fi
12243 rm -f conftest.$ac_objext conftest.$ac_ext
12244   break
12245 done
12246 fi
12247 echo "$as_me:12247: result: $ac_cv_sys_large_files" >&5
12248 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12249 if test "$ac_cv_sys_large_files" != no; then
12250
12251 cat >>confdefs.h <<EOF
12252 #define _LARGE_FILES $ac_cv_sys_large_files
12253 EOF
12254
12255 fi
12256 rm -rf conftest*
12257 fi
12258
12259         if test "$enable_largefile" != no ; then
12260         echo "$as_me:12260: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12261 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12262 if test "${ac_cv_sys_largefile_source+set}" = set; then
12263   echo $ECHO_N "(cached) $ECHO_C" >&6
12264 else
12265   while :; do
12266   ac_cv_sys_largefile_source=no
12267   cat >conftest.$ac_ext <<_ACEOF
12268 #line 12268 "configure"
12269 #include "confdefs.h"
12270 #include <stdio.h>
12271 int
12272 main (void)
12273 {
12274 return !fseeko;
12275   ;
12276   return 0;
12277 }
12278 _ACEOF
12279 rm -f conftest.$ac_objext
12280 if { (eval echo "$as_me:12280: \"$ac_compile\"") >&5
12281   (eval $ac_compile) 2>&5
12282   ac_status=$?
12283   echo "$as_me:12283: \$? = $ac_status" >&5
12284   (exit $ac_status); } &&
12285          { ac_try='test -s conftest.$ac_objext'
12286   { (eval echo "$as_me:12286: \"$ac_try\"") >&5
12287   (eval $ac_try) 2>&5
12288   ac_status=$?
12289   echo "$as_me:12289: \$? = $ac_status" >&5
12290   (exit $ac_status); }; }; then
12291   break
12292 else
12293   echo "$as_me: failed program was:" >&5
12294 cat conftest.$ac_ext >&5
12295 fi
12296 rm -f conftest.$ac_objext conftest.$ac_ext
12297   cat >conftest.$ac_ext <<_ACEOF
12298 #line 12298 "configure"
12299 #include "confdefs.h"
12300 #define _LARGEFILE_SOURCE 1
12301 #include <stdio.h>
12302 int
12303 main (void)
12304 {
12305 return !fseeko;
12306   ;
12307   return 0;
12308 }
12309 _ACEOF
12310 rm -f conftest.$ac_objext
12311 if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
12312   (eval $ac_compile) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit $ac_status); } &&
12316          { ac_try='test -s conftest.$ac_objext'
12317   { (eval echo "$as_me:12317: \"$ac_try\"") >&5
12318   (eval $ac_try) 2>&5
12319   ac_status=$?
12320   echo "$as_me:12320: \$? = $ac_status" >&5
12321   (exit $ac_status); }; }; then
12322   ac_cv_sys_largefile_source=1; break
12323 else
12324   echo "$as_me: failed program was:" >&5
12325 cat conftest.$ac_ext >&5
12326 fi
12327 rm -f conftest.$ac_objext conftest.$ac_ext
12328   break
12329 done
12330 fi
12331 echo "$as_me:12331: result: $ac_cv_sys_largefile_source" >&5
12332 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12333 if test "$ac_cv_sys_largefile_source" != no; then
12334
12335 cat >>confdefs.h <<EOF
12336 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12337 EOF
12338
12339 fi
12340 rm -rf conftest*
12341
12342 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12343 # in glibc 2.1.3, but that breaks too many other things.
12344 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12345 echo "$as_me:12345: checking for fseeko" >&5
12346 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12347 if test "${ac_cv_func_fseeko+set}" = set; then
12348   echo $ECHO_N "(cached) $ECHO_C" >&6
12349 else
12350   cat >conftest.$ac_ext <<_ACEOF
12351 #line 12351 "configure"
12352 #include "confdefs.h"
12353 #include <stdio.h>
12354 int
12355 main (void)
12356 {
12357 return fseeko && fseeko (stdin, 0, 0);
12358   ;
12359   return 0;
12360 }
12361 _ACEOF
12362 rm -f conftest.$ac_objext conftest$ac_exeext
12363 if { (eval echo "$as_me:12363: \"$ac_link\"") >&5
12364   (eval $ac_link) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); } &&
12368          { ac_try='test -s conftest$ac_exeext'
12369   { (eval echo "$as_me:12369: \"$ac_try\"") >&5
12370   (eval $ac_try) 2>&5
12371   ac_status=$?
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit $ac_status); }; }; then
12374   ac_cv_func_fseeko=yes
12375 else
12376   echo "$as_me: failed program was:" >&5
12377 cat conftest.$ac_ext >&5
12378 ac_cv_func_fseeko=no
12379 fi
12380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12381 fi
12382 echo "$as_me:12382: result: $ac_cv_func_fseeko" >&5
12383 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12384 if test $ac_cv_func_fseeko = yes; then
12385
12386 cat >>confdefs.h <<\EOF
12387 #define HAVE_FSEEKO 1
12388 EOF
12389
12390 fi
12391
12392         # Normally we would collect these definitions in the config.h,
12393         # but (like _XOPEN_SOURCE), some environments rely on having these
12394         # defined before any of the system headers are included.  Another
12395         # case comes up with C++, e.g., on AIX the compiler compiles the
12396         # header files by themselves before looking at the body files it is
12397         # told to compile.  For ncurses, those header files do not include
12398         # the config.h
12399         if test "$ac_cv_sys_large_files" != no
12400         then
12401
12402         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12403         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12404
12405         fi
12406         if test "$ac_cv_sys_largefile_source" != no
12407         then
12408
12409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12410         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12411
12412         fi
12413         if test "$ac_cv_sys_file_offset_bits" != no
12414         then
12415
12416         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12417         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12418
12419         fi
12420
12421         echo "$as_me:12421: checking whether to use struct dirent64" >&5
12422 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12423 if test "${cf_cv_struct_dirent64+set}" = set; then
12424   echo $ECHO_N "(cached) $ECHO_C" >&6
12425 else
12426
12427                 cat >conftest.$ac_ext <<_ACEOF
12428 #line 12428 "configure"
12429 #include "confdefs.h"
12430
12431 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12432 #include <sys/types.h>
12433 #include <dirent.h>
12434
12435 int
12436 main (void)
12437 {
12438
12439                 /* if transitional largefile support is setup, this is true */
12440                 extern struct dirent64 * readdir(DIR *);
12441                 struct dirent64 *x = readdir((DIR *)0);
12442                 struct dirent *y = readdir((DIR *)0);
12443                 int z = x - y;
12444
12445   ;
12446   return 0;
12447 }
12448 _ACEOF
12449 rm -f conftest.$ac_objext
12450 if { (eval echo "$as_me:12450: \"$ac_compile\"") >&5
12451   (eval $ac_compile) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit $ac_status); } &&
12455          { ac_try='test -s conftest.$ac_objext'
12456   { (eval echo "$as_me:12456: \"$ac_try\"") >&5
12457   (eval $ac_try) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit $ac_status); }; }; then
12461   cf_cv_struct_dirent64=yes
12462 else
12463   echo "$as_me: failed program was:" >&5
12464 cat conftest.$ac_ext >&5
12465 cf_cv_struct_dirent64=no
12466 fi
12467 rm -f conftest.$ac_objext conftest.$ac_ext
12468
12469 fi
12470 echo "$as_me:12470: result: $cf_cv_struct_dirent64" >&5
12471 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12472         test "$cf_cv_struct_dirent64" = yes &&
12473 cat >>confdefs.h <<\EOF
12474 #define HAVE_STRUCT_DIRENT64 1
12475 EOF
12476
12477         fi
12478
12479 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12480 echo "$as_me:12480: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12481 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12482
12483 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12484 if test "${enable_tparm_varargs+set}" = set; then
12485   enableval="$enable_tparm_varargs"
12486   with_tparm_varargs=$enableval
12487 else
12488   with_tparm_varargs=yes
12489 fi;
12490 echo "$as_me:12490: result: $with_tparm_varargs" >&5
12491 echo "${ECHO_T}$with_tparm_varargs" >&6
12492 NCURSES_TPARM_VARARGS=0
12493 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12494
12495 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12496 if test "$with_ticlib" != no ; then
12497 echo "$as_me:12497: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12498 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12499
12500 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12501 if test "${enable_tic_depends+set}" = set; then
12502   enableval="$enable_tic_depends"
12503   with_tic_depends=$enableval
12504 else
12505   with_tic_depends=yes
12506 fi;
12507 echo "$as_me:12507: result: $with_tic_depends" >&5
12508 echo "${ECHO_T}$with_tic_depends" >&6
12509 else
12510         with_tic_depends=no
12511 fi
12512
12513 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12514 echo "$as_me:12514: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12515 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12516
12517 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12518 if test "${enable_wattr_macros+set}" = set; then
12519   enableval="$enable_wattr_macros"
12520   with_wattr_macros=$enableval
12521 else
12522   with_wattr_macros=yes
12523 fi;
12524 if [ "x$with_wattr_macros" != xyes ]; then
12525         NCURSES_WATTR_MACROS=0
12526         echo "$as_me:12526: result: yes" >&5
12527 echo "${ECHO_T}yes" >&6
12528 else
12529         NCURSES_WATTR_MACROS=1
12530         echo "$as_me:12530: result: no" >&5
12531 echo "${ECHO_T}no" >&6
12532 fi
12533
12534 echo "$as_me:12534: checking for X11 rgb file" >&5
12535 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12536
12537 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12538 if test "${with_x11_rgb+set}" = set; then
12539   withval="$with_x11_rgb"
12540   RGB_PATH=$withval
12541 else
12542   RGB_PATH=auto
12543 fi;
12544
12545 if test "x$RGB_PATH" = xauto
12546 then
12547         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12548         for cf_path in \
12549                 /opt/local/share/X11/rgb.txt \
12550                 /opt/X11/share/X11/rgb.txt \
12551                 /usr/share/X11/rgb.txt \
12552                 /usr/X11/share/X11/rgb.txt \
12553                 /usr/X11/lib/X11/rgb.txt \
12554                 /usr/lib/X11/rgb.txt \
12555                 /etc/X11/rgb.txt \
12556                 /usr/pkg/lib/X11/rgb.txt \
12557                 /usr/X11R7/lib/X11/rgb.txt \
12558                 /usr/X11R6/lib/X11/rgb.txt \
12559                 /usr/X11R5/lib/X11/rgb.txt \
12560                 /usr/X11R4/lib/X11/rgb.txt \
12561                 /usr/local/lib/X11/rgb.txt \
12562                 /usr/local/share/X11/rgb.txt \
12563                 /usr/lib64/X11/rgb.txt
12564         do
12565                 if test -f "$cf_path" ; then
12566                         RGB_PATH="$cf_path"
12567                         break
12568                 fi
12569         done
12570 else
12571         cf_path=$RGB_PATH
12572
12573 if test "x$prefix" != xNONE; then
12574         cf_path_syntax="$prefix"
12575 else
12576         cf_path_syntax="$ac_default_prefix"
12577 fi
12578
12579 case ".$cf_path" in
12580 (.\$\(*\)*|.\'*\'*)
12581         ;;
12582 (..|./*|.\\*)
12583         ;;
12584 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12585         ;;
12586 (.\${*prefix}*|.\${*dir}*)
12587         eval cf_path="$cf_path"
12588         case ".$cf_path" in
12589         (.NONE/*)
12590                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12591                 ;;
12592         esac
12593         ;;
12594 (.no|.NONE/*)
12595         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12596         ;;
12597 (*)
12598         { { echo "$as_me:12598: error: expected a pathname, not \"$cf_path\"" >&5
12599 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12600    { (exit 1); exit 1; }; }
12601         ;;
12602 esac
12603
12604 fi
12605
12606 echo "$as_me:12606: result: $RGB_PATH" >&5
12607 echo "${ECHO_T}$RGB_PATH" >&6
12608
12609 cat >>confdefs.h <<EOF
12610 #define RGB_PATH "$cf_path"
12611 EOF
12612
12613 no_x11_rgb=
12614 if test "$RGB_PATH" = no
12615 then
12616         no_x11_rgb="#"
12617 fi
12618
12619 ###   use option --with-bool to override bool's type
12620 echo "$as_me:12620: checking for type of bool" >&5
12621 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12622
12623 # Check whether --with-bool or --without-bool was given.
12624 if test "${with_bool+set}" = set; then
12625   withval="$with_bool"
12626   NCURSES_BOOL="$withval"
12627 else
12628   NCURSES_BOOL=auto
12629 fi;
12630 echo "$as_me:12630: result: $NCURSES_BOOL" >&5
12631 echo "${ECHO_T}$NCURSES_BOOL" >&6
12632
12633 echo "$as_me:12633: checking for alternate terminal capabilities file" >&5
12634 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12635
12636 # Check whether --with-caps or --without-caps was given.
12637 if test "${with_caps+set}" = set; then
12638   withval="$with_caps"
12639   TERMINFO_CAPS=Caps.$withval
12640 else
12641   TERMINFO_CAPS=Caps
12642 fi;
12643 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12644 echo "$as_me:12644: result: $TERMINFO_CAPS" >&5
12645 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12646
12647 ###   use option --with-chtype to override chtype's type
12648 echo "$as_me:12648: checking for type of chtype" >&5
12649 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12650
12651 # Check whether --with-chtype or --without-chtype was given.
12652 if test "${with_chtype+set}" = set; then
12653   withval="$with_chtype"
12654   NCURSES_CHTYPE="$withval"
12655 else
12656   NCURSES_CHTYPE=$cf_dft_chtype
12657 fi;
12658 echo "$as_me:12658: result: $NCURSES_CHTYPE" >&5
12659 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12660
12661 ###   use option --with-ospeed to override ospeed's type
12662 echo "$as_me:12662: checking for type of ospeed" >&5
12663 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12664
12665 # Check whether --with-ospeed or --without-ospeed was given.
12666 if test "${with_ospeed+set}" = set; then
12667   withval="$with_ospeed"
12668   NCURSES_OSPEED="$withval"
12669 else
12670   NCURSES_OSPEED=short
12671 fi;
12672 echo "$as_me:12672: result: $NCURSES_OSPEED" >&5
12673 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12674
12675 ###   use option --with-mmask-t to override mmask_t's type
12676 echo "$as_me:12676: checking for type of mmask_t" >&5
12677 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12678
12679 # Check whether --with-mmask-t or --without-mmask-t was given.
12680 if test "${with_mmask_t+set}" = set; then
12681   withval="$with_mmask_t"
12682   NCURSES_MMASK_T="$withval"
12683 else
12684   NCURSES_MMASK_T=$cf_dft_mmask_t
12685 fi;
12686 echo "$as_me:12686: result: $NCURSES_MMASK_T" >&5
12687 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12688
12689 ###   use option --with-ccharw-max to override CCHARW_MAX size
12690 echo "$as_me:12690: checking for size CCHARW_MAX" >&5
12691 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12692
12693 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12694 if test "${with_ccharw_max+set}" = set; then
12695   withval="$with_ccharw_max"
12696   NCURSES_CCHARW_MAX="$withval"
12697 else
12698   NCURSES_CCHARW_MAX=5
12699 fi;
12700 echo "$as_me:12700: result: $NCURSES_CCHARW_MAX" >&5
12701 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12702
12703 echo "$as_me:12703: checking for ANSI C header files" >&5
12704 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12705 if test "${ac_cv_header_stdc+set}" = set; then
12706   echo $ECHO_N "(cached) $ECHO_C" >&6
12707 else
12708   cat >conftest.$ac_ext <<_ACEOF
12709 #line 12709 "configure"
12710 #include "confdefs.h"
12711 #include <stdlib.h>
12712 #include <stdarg.h>
12713 #include <string.h>
12714 #include <float.h>
12715
12716 _ACEOF
12717 if { (eval echo "$as_me:12717: \"$ac_cpp conftest.$ac_ext\"") >&5
12718   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12719   ac_status=$?
12720   egrep -v '^ *\+' conftest.er1 >conftest.err
12721   rm -f conftest.er1
12722   cat conftest.err >&5
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); } >/dev/null; then
12725   if test -s conftest.err; then
12726     ac_cpp_err=$ac_c_preproc_warn_flag
12727   else
12728     ac_cpp_err=
12729   fi
12730 else
12731   ac_cpp_err=yes
12732 fi
12733 if test -z "$ac_cpp_err"; then
12734   ac_cv_header_stdc=yes
12735 else
12736   echo "$as_me: failed program was:" >&5
12737   cat conftest.$ac_ext >&5
12738   ac_cv_header_stdc=no
12739 fi
12740 rm -f conftest.err conftest.$ac_ext
12741
12742 if test $ac_cv_header_stdc = yes; then
12743   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12744   cat >conftest.$ac_ext <<_ACEOF
12745 #line 12745 "configure"
12746 #include "confdefs.h"
12747 #include <string.h>
12748
12749 _ACEOF
12750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12751   egrep "memchr" >/dev/null 2>&1; then
12752   :
12753 else
12754   ac_cv_header_stdc=no
12755 fi
12756 rm -rf conftest*
12757
12758 fi
12759
12760 if test $ac_cv_header_stdc = yes; then
12761   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12762   cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765 #include <stdlib.h>
12766
12767 _ACEOF
12768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12769   egrep "free" >/dev/null 2>&1; then
12770   :
12771 else
12772   ac_cv_header_stdc=no
12773 fi
12774 rm -rf conftest*
12775
12776 fi
12777
12778 if test $ac_cv_header_stdc = yes; then
12779   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12780   if test "$cross_compiling" = yes; then
12781   :
12782 else
12783   cat >conftest.$ac_ext <<_ACEOF
12784 #line 12784 "configure"
12785 #include "confdefs.h"
12786 #include <ctype.h>
12787 #if ((' ' & 0x0FF) == 0x020)
12788 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12789 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12790 #else
12791 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12792                      || ('j' <= (c) && (c) <= 'r') \
12793                      || ('s' <= (c) && (c) <= 'z'))
12794 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12795 #endif
12796
12797 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12798 int
12799 main (void)
12800 {
12801   int i;
12802   for (i = 0; i < 256; i++)
12803     if (XOR (islower (i), ISLOWER (i))
12804         || toupper (i) != TOUPPER (i))
12805       $ac_main_return(2);
12806   $ac_main_return (0);
12807 }
12808 _ACEOF
12809 rm -f conftest$ac_exeext
12810 if { (eval echo "$as_me:12810: \"$ac_link\"") >&5
12811   (eval $ac_link) 2>&5
12812   ac_status=$?
12813   echo "$as_me:12813: \$? = $ac_status" >&5
12814   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   :
12821 else
12822   echo "$as_me: program exited with status $ac_status" >&5
12823 echo "$as_me: failed program was:" >&5
12824 cat conftest.$ac_ext >&5
12825 ac_cv_header_stdc=no
12826 fi
12827 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12828 fi
12829 fi
12830 fi
12831 echo "$as_me:12831: result: $ac_cv_header_stdc" >&5
12832 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12833 if test $ac_cv_header_stdc = yes; then
12834
12835 cat >>confdefs.h <<\EOF
12836 #define STDC_HEADERS 1
12837 EOF
12838
12839 fi
12840
12841 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12842
12843 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12844                   inttypes.h stdint.h unistd.h
12845 do
12846 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12847 echo "$as_me:12847: checking for $ac_header" >&5
12848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12850   echo $ECHO_N "(cached) $ECHO_C" >&6
12851 else
12852   cat >conftest.$ac_ext <<_ACEOF
12853 #line 12853 "configure"
12854 #include "confdefs.h"
12855 $ac_includes_default
12856 #include <$ac_header>
12857 _ACEOF
12858 rm -f conftest.$ac_objext
12859 if { (eval echo "$as_me:12859: \"$ac_compile\"") >&5
12860   (eval $ac_compile) 2>&5
12861   ac_status=$?
12862   echo "$as_me:12862: \$? = $ac_status" >&5
12863   (exit $ac_status); } &&
12864          { ac_try='test -s conftest.$ac_objext'
12865   { (eval echo "$as_me:12865: \"$ac_try\"") >&5
12866   (eval $ac_try) 2>&5
12867   ac_status=$?
12868   echo "$as_me:12868: \$? = $ac_status" >&5
12869   (exit $ac_status); }; }; then
12870   eval "$as_ac_Header=yes"
12871 else
12872   echo "$as_me: failed program was:" >&5
12873 cat conftest.$ac_ext >&5
12874 eval "$as_ac_Header=no"
12875 fi
12876 rm -f conftest.$ac_objext conftest.$ac_ext
12877 fi
12878 echo "$as_me:12878: result: `eval echo '${'$as_ac_Header'}'`" >&5
12879 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12880 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12881   cat >>confdefs.h <<EOF
12882 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12883 EOF
12884
12885 fi
12886 done
12887
12888 echo "$as_me:12888: checking for signed char" >&5
12889 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12890 if test "${ac_cv_type_signed_char+set}" = set; then
12891   echo $ECHO_N "(cached) $ECHO_C" >&6
12892 else
12893   cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896 $ac_includes_default
12897 int
12898 main (void)
12899 {
12900 if ((signed char *) 0)
12901   return 0;
12902 if (sizeof (signed char))
12903   return 0;
12904   ;
12905   return 0;
12906 }
12907 _ACEOF
12908 rm -f conftest.$ac_objext
12909 if { (eval echo "$as_me:12909: \"$ac_compile\"") >&5
12910   (eval $ac_compile) 2>&5
12911   ac_status=$?
12912   echo "$as_me:12912: \$? = $ac_status" >&5
12913   (exit $ac_status); } &&
12914          { ac_try='test -s conftest.$ac_objext'
12915   { (eval echo "$as_me:12915: \"$ac_try\"") >&5
12916   (eval $ac_try) 2>&5
12917   ac_status=$?
12918   echo "$as_me:12918: \$? = $ac_status" >&5
12919   (exit $ac_status); }; }; then
12920   ac_cv_type_signed_char=yes
12921 else
12922   echo "$as_me: failed program was:" >&5
12923 cat conftest.$ac_ext >&5
12924 ac_cv_type_signed_char=no
12925 fi
12926 rm -f conftest.$ac_objext conftest.$ac_ext
12927 fi
12928 echo "$as_me:12928: result: $ac_cv_type_signed_char" >&5
12929 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12930
12931 echo "$as_me:12931: checking size of signed char" >&5
12932 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12933 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12934   echo $ECHO_N "(cached) $ECHO_C" >&6
12935 else
12936   if test "$ac_cv_type_signed_char" = yes; then
12937   if test "$cross_compiling" = yes; then
12938   # Depending upon the size, compute the lo and hi bounds.
12939 cat >conftest.$ac_ext <<_ACEOF
12940 #line 12940 "configure"
12941 #include "confdefs.h"
12942 $ac_includes_default
12943 int
12944 main (void)
12945 {
12946 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 rm -f conftest.$ac_objext
12952 if { (eval echo "$as_me:12952: \"$ac_compile\"") >&5
12953   (eval $ac_compile) 2>&5
12954   ac_status=$?
12955   echo "$as_me:12955: \$? = $ac_status" >&5
12956   (exit $ac_status); } &&
12957          { ac_try='test -s conftest.$ac_objext'
12958   { (eval echo "$as_me:12958: \"$ac_try\"") >&5
12959   (eval $ac_try) 2>&5
12960   ac_status=$?
12961   echo "$as_me:12961: \$? = $ac_status" >&5
12962   (exit $ac_status); }; }; then
12963   ac_lo=0 ac_mid=0
12964   while :; do
12965     cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968 $ac_includes_default
12969 int
12970 main (void)
12971 {
12972 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f conftest.$ac_objext
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979   (eval $ac_compile) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit $ac_status); } &&
12983          { ac_try='test -s conftest.$ac_objext'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit $ac_status); }; }; then
12989   ac_hi=$ac_mid; break
12990 else
12991   echo "$as_me: failed program was:" >&5
12992 cat conftest.$ac_ext >&5
12993 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12994 fi
12995 rm -f conftest.$ac_objext conftest.$ac_ext
12996   done
12997 else
12998   echo "$as_me: failed program was:" >&5
12999 cat conftest.$ac_ext >&5
13000 ac_hi=-1 ac_mid=-1
13001   while :; do
13002     cat >conftest.$ac_ext <<_ACEOF
13003 #line 13003 "configure"
13004 #include "confdefs.h"
13005 $ac_includes_default
13006 int
13007 main (void)
13008 {
13009 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13010   ;
13011   return 0;
13012 }
13013 _ACEOF
13014 rm -f conftest.$ac_objext
13015 if { (eval echo "$as_me:13015: \"$ac_compile\"") >&5
13016   (eval $ac_compile) 2>&5
13017   ac_status=$?
13018   echo "$as_me:13018: \$? = $ac_status" >&5
13019   (exit $ac_status); } &&
13020          { ac_try='test -s conftest.$ac_objext'
13021   { (eval echo "$as_me:13021: \"$ac_try\"") >&5
13022   (eval $ac_try) 2>&5
13023   ac_status=$?
13024   echo "$as_me:13024: \$? = $ac_status" >&5
13025   (exit $ac_status); }; }; then
13026   ac_lo=$ac_mid; break
13027 else
13028   echo "$as_me: failed program was:" >&5
13029 cat conftest.$ac_ext >&5
13030 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13031 fi
13032 rm -f conftest.$ac_objext conftest.$ac_ext
13033   done
13034 fi
13035 rm -f conftest.$ac_objext conftest.$ac_ext
13036 # Binary search between lo and hi bounds.
13037 while test "x$ac_lo" != "x$ac_hi"; do
13038   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13039   cat >conftest.$ac_ext <<_ACEOF
13040 #line 13040 "configure"
13041 #include "confdefs.h"
13042 $ac_includes_default
13043 int
13044 main (void)
13045 {
13046 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13047   ;
13048   return 0;
13049 }
13050 _ACEOF
13051 rm -f conftest.$ac_objext
13052 if { (eval echo "$as_me:13052: \"$ac_compile\"") >&5
13053   (eval $ac_compile) 2>&5
13054   ac_status=$?
13055   echo "$as_me:13055: \$? = $ac_status" >&5
13056   (exit $ac_status); } &&
13057          { ac_try='test -s conftest.$ac_objext'
13058   { (eval echo "$as_me:13058: \"$ac_try\"") >&5
13059   (eval $ac_try) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); }; }; then
13063   ac_hi=$ac_mid
13064 else
13065   echo "$as_me: failed program was:" >&5
13066 cat conftest.$ac_ext >&5
13067 ac_lo=`expr $ac_mid + 1`
13068 fi
13069 rm -f conftest.$ac_objext conftest.$ac_ext
13070 done
13071 ac_cv_sizeof_signed_char=$ac_lo
13072 else
13073   if test "$cross_compiling" = yes; then
13074   { { echo "$as_me:13074: error: cannot run test program while cross compiling" >&5
13075 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13076    { (exit 1); exit 1; }; }
13077 else
13078   cat >conftest.$ac_ext <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13081 $ac_includes_default
13082 int
13083 main (void)
13084 {
13085 FILE *f = fopen ("conftest.val", "w");
13086 if (!f)
13087   $ac_main_return (1);
13088 fprintf (f, "%d", (sizeof (signed char)));
13089 fclose (f);
13090   ;
13091   return 0;
13092 }
13093 _ACEOF
13094 rm -f conftest$ac_exeext
13095 if { (eval echo "$as_me:13095: \"$ac_link\"") >&5
13096   (eval $ac_link) 2>&5
13097   ac_status=$?
13098   echo "$as_me:13098: \$? = $ac_status" >&5
13099   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13100   { (eval echo "$as_me:13100: \"$ac_try\"") >&5
13101   (eval $ac_try) 2>&5
13102   ac_status=$?
13103   echo "$as_me:13103: \$? = $ac_status" >&5
13104   (exit $ac_status); }; }; then
13105   ac_cv_sizeof_signed_char=`cat conftest.val`
13106 else
13107   echo "$as_me: program exited with status $ac_status" >&5
13108 echo "$as_me: failed program was:" >&5
13109 cat conftest.$ac_ext >&5
13110 fi
13111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13112 fi
13113 fi
13114 rm -f conftest.val
13115 else
13116   ac_cv_sizeof_signed_char=0
13117 fi
13118 fi
13119 echo "$as_me:13119: result: $ac_cv_sizeof_signed_char" >&5
13120 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13121 cat >>confdefs.h <<EOF
13122 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13123 EOF
13124
13125 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13126         NCURSES_SBOOL="signed char"
13127 else
13128         NCURSES_SBOOL="char"
13129 fi
13130 echo "$as_me:13130: checking if you want to use signed Boolean array in term.h" >&5
13131 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13132
13133 # Check whether --enable-signed-char or --disable-signed-char was given.
13134 if test "${enable_signed_char+set}" = set; then
13135   enableval="$enable_signed_char"
13136   with_signed_char=$enableval
13137 else
13138   with_signed_char=no
13139 fi;
13140 echo "$as_me:13140: result: $with_signed_char" >&5
13141 echo "${ECHO_T}$with_signed_char" >&6
13142 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13143
13144 ###   use option --with-tparm-arg to override tparm's argument type
13145 echo "$as_me:13145: checking for type of tparm args" >&5
13146 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13147
13148 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13149 if test "${with_tparm_arg+set}" = set; then
13150   withval="$with_tparm_arg"
13151   NCURSES_TPARM_ARG="$withval"
13152 else
13153   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13154 fi;
13155 echo "$as_me:13155: result: $NCURSES_TPARM_ARG" >&5
13156 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13157
13158 ### Enable compiling-in rcs id's
13159 echo "$as_me:13159: checking if RCS identifiers should be compiled-in" >&5
13160 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13161
13162 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13163 if test "${with_rcs_ids+set}" = set; then
13164   withval="$with_rcs_ids"
13165   with_rcs_ids=$withval
13166 else
13167   with_rcs_ids=no
13168 fi;
13169 echo "$as_me:13169: result: $with_rcs_ids" >&5
13170 echo "${ECHO_T}$with_rcs_ids" >&6
13171 test "x$with_rcs_ids" = xyes &&
13172 cat >>confdefs.h <<\EOF
13173 #define USE_RCS_IDS 1
13174 EOF
13175
13176 ###############################################################################
13177
13178 echo "$as_me:13178: checking format of man-pages" >&5
13179 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13180
13181 # Check whether --with-manpage-format or --without-manpage-format was given.
13182 if test "${with_manpage_format+set}" = set; then
13183   withval="$with_manpage_format"
13184   MANPAGE_FORMAT=$withval
13185 else
13186   MANPAGE_FORMAT=unknown
13187 fi;
13188
13189 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13190 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13191
13192 cf_unknown=
13193
13194 case $MANPAGE_FORMAT in
13195 (unknown)
13196         if test -z "$MANPATH" ; then
13197                 MANPATH="/usr/man:/usr/share/man"
13198         fi
13199
13200         # look for the 'date' man-page (it's most likely to be installed!)
13201         MANPAGE_FORMAT=
13202         cf_preform=no
13203         cf_catonly=yes
13204         cf_example=date
13205
13206         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13207         for cf_dir in $MANPATH; do
13208                 test -z "$cf_dir" && cf_dir=/usr/man
13209                 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
13210                 do
13211                         cf_test=`echo $cf_name | sed -e 's/*//'`
13212                         if test "x$cf_test" = "x$cf_name" ; then
13213
13214                                 case "$cf_name" in
13215                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13216                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13217                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13218                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13219                                 esac
13220
13221                                 case "$cf_name" in
13222                                 ($cf_dir/man*)
13223                                         cf_catonly=no
13224                                         ;;
13225                                 ($cf_dir/cat*)
13226                                         cf_preform=yes
13227                                         ;;
13228                                 esac
13229                                 break
13230                         fi
13231
13232                         # if we found a match in either man* or cat*, stop looking
13233                         if test -n "$MANPAGE_FORMAT" ; then
13234                                 cf_found=no
13235                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13236                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13237                                 case "$cf_name" in
13238                                 ($cf_dir/cat*)
13239                                         cf_found=yes
13240                                         ;;
13241                                 esac
13242                                 test $cf_found=yes && break
13243                         fi
13244                 done
13245                 # only check the first directory in $MANPATH where we find manpages
13246                 if test -n "$MANPAGE_FORMAT" ; then
13247                         break
13248                 fi
13249         done
13250         # if we did not find the example, just assume it is normal
13251         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13252         IFS="$ac_save_ifs"
13253         ;;
13254 (*)
13255         for cf_option in $MANPAGE_FORMAT; do
13256         case $cf_option in
13257         (gzip|compress|BSDI|normal|formatted|catonly)
13258                 ;;
13259         (*)
13260                 cf_unknown="$cf_unknown $cf_option"
13261                 ;;
13262         esac
13263         done
13264         ;;
13265 esac
13266
13267 echo "$as_me:13267: result: $MANPAGE_FORMAT" >&5
13268 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13269 if test -n "$cf_unknown" ; then
13270         { echo "$as_me:13270: WARNING: Unexpected manpage-format $cf_unknown" >&5
13271 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13272 fi
13273
13274 echo "$as_me:13274: checking for manpage renaming" >&5
13275 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13276
13277 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13278 if test "${with_manpage_renames+set}" = set; then
13279   withval="$with_manpage_renames"
13280   MANPAGE_RENAMES=$withval
13281 else
13282   MANPAGE_RENAMES=yes
13283 fi;
13284
13285 case ".$MANPAGE_RENAMES" in
13286 (.no)
13287         ;;
13288 (.|.yes)
13289         # Debian 'man' program?
13290         if test -f /etc/debian_version ; then
13291                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13292         else
13293                 MANPAGE_RENAMES=no
13294         fi
13295         ;;
13296 esac
13297
13298 if test "$MANPAGE_RENAMES" != no ; then
13299         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13300                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13301         elif test ! -f $MANPAGE_RENAMES ; then
13302                 { { echo "$as_me:13302: error: not a filename: $MANPAGE_RENAMES" >&5
13303 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13304    { (exit 1); exit 1; }; }
13305         fi
13306
13307         test ! -d man && mkdir man
13308
13309         # Construct a sed-script to perform renaming within man-pages
13310         if test -n "$MANPAGE_RENAMES" ; then
13311                 test ! -d man && mkdir man
13312                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13313         fi
13314 fi
13315
13316 echo "$as_me:13316: result: $MANPAGE_RENAMES" >&5
13317 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13318
13319 echo "$as_me:13319: checking if manpage aliases will be installed" >&5
13320 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13321
13322 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13323 if test "${with_manpage_aliases+set}" = set; then
13324   withval="$with_manpage_aliases"
13325   MANPAGE_ALIASES=$withval
13326 else
13327   MANPAGE_ALIASES=yes
13328 fi;
13329
13330 echo "$as_me:13330: result: $MANPAGE_ALIASES" >&5
13331 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13332
13333 case "x$LN_S" in
13334 (xln*)
13335         cf_use_symlinks=yes
13336         ;;
13337 (*)
13338         cf_use_symlinks=no
13339         ;;
13340 esac
13341
13342 MANPAGE_SYMLINKS=no
13343 if test "$MANPAGE_ALIASES" = yes ; then
13344 echo "$as_me:13344: checking if manpage symlinks should be used" >&5
13345 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13346
13347 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13348 if test "${with_manpage_symlinks+set}" = set; then
13349   withval="$with_manpage_symlinks"
13350   MANPAGE_SYMLINKS=$withval
13351 else
13352   MANPAGE_SYMLINKS=$cf_use_symlinks
13353 fi;
13354
13355 if test "$$cf_use_symlinks" = no; then
13356 if test "$MANPAGE_SYMLINKS" = yes ; then
13357         { echo "$as_me:13357: WARNING: cannot make symlinks" >&5
13358 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13359         MANPAGE_SYMLINKS=no
13360 fi
13361 fi
13362
13363 echo "$as_me:13363: result: $MANPAGE_SYMLINKS" >&5
13364 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13365 fi
13366
13367 echo "$as_me:13367: checking for manpage tbl" >&5
13368 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13369
13370 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13371 if test "${with_manpage_tbl+set}" = set; then
13372   withval="$with_manpage_tbl"
13373   MANPAGE_TBL=$withval
13374 else
13375   MANPAGE_TBL=no
13376 fi;
13377
13378 echo "$as_me:13378: result: $MANPAGE_TBL" >&5
13379 echo "${ECHO_T}$MANPAGE_TBL" >&6
13380
13381 if test "$prefix" = "NONE" ; then
13382         cf_prefix="$ac_default_prefix"
13383 else
13384         cf_prefix="$prefix"
13385 fi
13386
13387 case "$MANPAGE_FORMAT" in
13388 (*catonly*)
13389         cf_format=yes
13390         cf_inboth=no
13391         ;;
13392 (*formatted*)
13393         cf_format=yes
13394         cf_inboth=yes
13395         ;;
13396 (*)
13397         cf_format=no
13398         cf_inboth=no
13399         ;;
13400 esac
13401
13402 test ! -d man && mkdir man
13403
13404 cf_so_strip=
13405 cf_compress=
13406 case "$MANPAGE_FORMAT" in
13407 (*compress*)
13408         cf_so_strip="Z"
13409         cf_compress=compress
13410         ;;
13411 (*gzip*)
13412         cf_so_strip="gz"
13413         cf_compress=gzip
13414         ;;
13415 esac
13416
13417 cf_edit_man=./edit_man.sh
13418 cf_man_alias=`pwd`/man_alias.sed
13419
13420 cat >$cf_edit_man <<CF_EOF
13421 #! $SHELL
13422 # this script is generated by the configure-script CF_MAN_PAGES macro.
13423
13424 prefix="$cf_prefix"
13425 datarootdir="$datarootdir"
13426 datadir="$datadir"
13427
13428 NCURSES_MAJOR="$NCURSES_MAJOR"
13429 NCURSES_MINOR="$NCURSES_MINOR"
13430 NCURSES_PATCH="$NCURSES_PATCH"
13431
13432 NCURSES_OSPEED="$NCURSES_OSPEED"
13433 TERMINFO="$TERMINFO"
13434
13435 INSTALL="$INSTALL"
13436 INSTALL_DATA="$INSTALL_DATA"
13437
13438 transform="$program_transform_name"
13439
13440 TMP=\${TMPDIR:=/tmp}/man\$\$
13441 trap "rm -f \$TMP" 0 1 2 3 15
13442
13443 form=\$1
13444 shift || exit 1
13445
13446 verb=\$1
13447 shift || exit 1
13448
13449 mandir=\$1
13450 shift || exit 1
13451
13452 srcdir=\$1
13453 top_srcdir=\$srcdir/..
13454 shift || exit 1
13455
13456 if test "\$form" = normal ; then
13457         if test "$cf_format" = yes ; then
13458         if test "$cf_inboth" = no ; then
13459                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13460                 exit $?
13461         fi
13462         fi
13463         cf_subdir=\$mandir/man
13464         cf_tables=$MANPAGE_TBL
13465 else
13466         cf_subdir=\$mandir/cat
13467         cf_tables=yes
13468 fi
13469
13470 # process the list of source-files
13471 for i in \$* ; do
13472 case \$i in
13473 (*.orig|*.rej) ;;
13474 (*.[0-9]*)
13475         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13476         if test \$verb = installing ; then
13477         if test ! -d \$cf_subdir\${section} ; then
13478                 mkdir -p \$cf_subdir\$section
13479         fi
13480         fi
13481
13482         # replace variables in man page
13483         if test ! -f $cf_man_alias ; then
13484 cat >>$cf_man_alias <<-CF_EOF2
13485                 s,@DATADIR@,\$datadir,g
13486                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13487                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13488                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13489                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13490                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13491                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13492 CF_EOF
13493
13494         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13495         do
13496                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13497                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13498 cat >>$cf_edit_man <<-CF_EOF
13499                 s,@$cf_NAME@,$cf_name,g
13500 CF_EOF
13501         done
13502
13503 cat >>$cf_edit_man <<CF_EOF
13504 CF_EOF2
13505                 echo "...made $cf_man_alias"
13506         fi
13507
13508         aliases=
13509         cf_source=\`basename \$i\`
13510         inalias=\$cf_source
13511         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13512         if test ! -f \$inalias ; then
13513                 echo .. skipped \$cf_source
13514                 continue
13515         fi
13516 CF_EOF
13517
13518 if test "$MANPAGE_ALIASES" != no ; then
13519 cat >>$cf_edit_man <<CF_EOF
13520         nCurses=ignore.3x
13521         test $with_curses_h = yes && nCurses=ncurses.3x
13522         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13523 CF_EOF
13524 fi
13525
13526 if test "$MANPAGE_RENAMES" = no ; then
13527 cat >>$cf_edit_man <<CF_EOF
13528         # perform program transformations for section 1 man pages
13529         if test \$section = 1 ; then
13530                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13531         else
13532                 cf_target=\$cf_subdir\${section}/\$cf_source
13533         fi
13534 CF_EOF
13535 else
13536 cat >>$cf_edit_man <<CF_EOF
13537         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13538         if test -z "\$cf_target" ; then
13539                 echo '? missing rename for '\$cf_source
13540                 cf_target="\$cf_source"
13541         fi
13542         cf_target="\$cf_subdir\${section}/\${cf_target}"
13543
13544 CF_EOF
13545 fi
13546
13547 cat >>$cf_edit_man <<CF_EOF
13548         sed     -f $cf_man_alias \\
13549 CF_EOF
13550
13551 if test -f $MANPAGE_RENAMES ; then
13552 cat >>$cf_edit_man <<CF_EOF
13553                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13554 CF_EOF
13555 else
13556 cat >>$cf_edit_man <<CF_EOF
13557                 < \$i >\$TMP
13558 CF_EOF
13559 fi
13560
13561 cat >>$cf_edit_man <<CF_EOF
13562 if test \$cf_tables = yes ; then
13563         tbl \$TMP >\$TMP.out
13564         mv \$TMP.out \$TMP
13565 fi
13566 CF_EOF
13567
13568 if test $with_overwrite != yes ; then
13569 cat >>$cf_edit_man <<CF_EOF
13570         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13571         mv \$TMP.out \$TMP
13572 CF_EOF
13573 fi
13574
13575 if test $with_curses_h != yes ; then
13576 cat >>$cf_edit_man <<CF_EOF
13577         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13578         mv \$TMP.out \$TMP
13579 CF_EOF
13580 fi
13581
13582 cat >>$cf_edit_man <<CF_EOF
13583         if test \$form = format ; then
13584                 nroff -man \$TMP >\$TMP.out
13585                 mv \$TMP.out \$TMP
13586         fi
13587 CF_EOF
13588
13589 if test -n "$cf_compress" ; then
13590 cat >>$cf_edit_man <<CF_EOF
13591         if test \$verb = installing ; then
13592         if ( $cf_compress -f \$TMP )
13593         then
13594                 mv \$TMP.$cf_so_strip \$TMP
13595         fi
13596         fi
13597         cf_target="\$cf_target.$cf_so_strip"
13598 CF_EOF
13599 fi
13600
13601 case "$MANPAGE_FORMAT" in
13602 (*BSDI*)
13603 cat >>$cf_edit_man <<CF_EOF
13604         if test \$form = format ; then
13605                 # BSDI installs only .0 suffixes in the cat directories
13606                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13607         fi
13608 CF_EOF
13609   ;;
13610 esac
13611
13612 cat >>$cf_edit_man <<CF_EOF
13613         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13614         if test \$verb = installing ; then
13615                 echo \$verb \$cf_target
13616                 \$INSTALL_DATA \$TMP \$cf_target
13617                 test -d \$cf_subdir\${section} &&
13618                 test -n "\$aliases" && (
13619                         cd \$cf_subdir\${section} && (
13620                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13621                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13622                                 cf_target=\`basename \$cf_target\`
13623                                 for cf_alias in \$aliases
13624                                 do
13625                                         if test \$section = 1 ; then
13626                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13627                                         fi
13628
13629                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13630                                                 if test -f \$cf_alias\${suffix} ; then
13631                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13632                                                         then
13633                                                                 continue
13634                                                         fi
13635                                                 fi
13636                                                 echo .. \$verb alias \$cf_alias\${suffix}
13637 CF_EOF
13638 case "x$LN_S" in
13639 (*-f)
13640 cat >>$cf_edit_man <<CF_EOF
13641                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13642 CF_EOF
13643         ;;
13644 (*)
13645 cat >>$cf_edit_man <<CF_EOF
13646                                                 rm -f \$cf_alias\${suffix}
13647                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13648 CF_EOF
13649         ;;
13650 esac
13651 cat >>$cf_edit_man <<CF_EOF
13652                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13653                                                 echo ".so \$cf_source" >\$TMP
13654 CF_EOF
13655 if test -n "$cf_compress" ; then
13656 cat >>$cf_edit_man <<CF_EOF
13657                                                 if test -n "$cf_so_strip" ; then
13658                                                         $cf_compress -f \$TMP
13659                                                         mv \$TMP.$cf_so_strip \$TMP
13660                                                 fi
13661 CF_EOF
13662 fi
13663 cat >>$cf_edit_man <<CF_EOF
13664                                                 echo .. \$verb alias \$cf_alias\${suffix}
13665                                                 rm -f \$cf_alias\${suffix}
13666                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13667                                         fi
13668                                 done
13669                         )
13670                 )
13671         elif test \$verb = removing ; then
13672                 test -f \$cf_target && (
13673                         echo \$verb \$cf_target
13674                         rm -f \$cf_target
13675                 )
13676                 test -d \$cf_subdir\${section} &&
13677                 test -n "\$aliases" && (
13678                         cd \$cf_subdir\${section} && (
13679                                 for cf_alias in \$aliases
13680                                 do
13681                                         if test \$section = 1 ; then
13682                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13683                                         fi
13684
13685                                         echo .. \$verb alias \$cf_alias\${suffix}
13686                                         rm -f \$cf_alias\${suffix}
13687                                 done
13688                         )
13689                 )
13690         else
13691 #               echo ".hy 0"
13692                 cat \$TMP
13693         fi
13694         ;;
13695 esac
13696 done
13697
13698 if test $cf_inboth = yes ; then
13699 if test \$form != format ; then
13700         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13701 fi
13702 fi
13703
13704 exit 0
13705 CF_EOF
13706 chmod 755 $cf_edit_man
13707
13708 ###############################################################################
13709
13710 ### Note that some functions (such as const) are normally disabled anyway.
13711 echo "$as_me:13711: checking if you want to build with function extensions" >&5
13712 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13713
13714 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13715 if test "${enable_ext_funcs+set}" = set; then
13716   enableval="$enable_ext_funcs"
13717   with_ext_funcs=$enableval
13718 else
13719   with_ext_funcs=yes
13720 fi;
13721 echo "$as_me:13721: result: $with_ext_funcs" >&5
13722 echo "${ECHO_T}$with_ext_funcs" >&6
13723 if test "x$with_ext_funcs" = xyes ; then
13724         NCURSES_EXT_FUNCS=1
13725
13726 cat >>confdefs.h <<\EOF
13727 #define NCURSES_EXT_FUNCS 1
13728 EOF
13729
13730 cat >>confdefs.h <<\EOF
13731 #define HAVE_ASSUME_DEFAULT_COLORS 1
13732 EOF
13733
13734 cat >>confdefs.h <<\EOF
13735 #define HAVE_CURSES_VERSION 1
13736 EOF
13737
13738 cat >>confdefs.h <<\EOF
13739 #define HAVE_HAS_KEY 1
13740 EOF
13741
13742 cat >>confdefs.h <<\EOF
13743 #define HAVE_RESIZETERM 1
13744 EOF
13745
13746 cat >>confdefs.h <<\EOF
13747 #define HAVE_RESIZE_TERM 1
13748 EOF
13749
13750 cat >>confdefs.h <<\EOF
13751 #define HAVE_TERM_ENTRY_H 1
13752 EOF
13753
13754 cat >>confdefs.h <<\EOF
13755 #define HAVE_USE_DEFAULT_COLORS 1
13756 EOF
13757
13758 cat >>confdefs.h <<\EOF
13759 #define HAVE_USE_EXTENDED_NAMES 1
13760 EOF
13761
13762 cat >>confdefs.h <<\EOF
13763 #define HAVE_USE_SCREEN 1
13764 EOF
13765
13766 cat >>confdefs.h <<\EOF
13767 #define HAVE_USE_WINDOW 1
13768 EOF
13769
13770 cat >>confdefs.h <<\EOF
13771 #define HAVE_WRESIZE 1
13772 EOF
13773
13774         GENERATED_EXT_FUNCS=generated
13775         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13776 else
13777         NCURSES_EXT_FUNCS=0
13778         GENERATED_EXT_FUNCS=
13779 fi
13780
13781 echo "$as_me:13781: checking if you want to build with SCREEN extensions" >&5
13782 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13783
13784 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13785 if test "${enable_sp_funcs+set}" = set; then
13786   enableval="$enable_sp_funcs"
13787   with_sp_funcs=$enableval
13788 else
13789   with_sp_funcs=$cf_dft_ext_spfuncs
13790 fi;
13791 echo "$as_me:13791: result: $with_sp_funcs" >&5
13792 echo "${ECHO_T}$with_sp_funcs" >&6
13793 if test "x$with_sp_funcs" = xyes ; then
13794         NCURSES_SP_FUNCS=1
13795
13796 cat >>confdefs.h <<\EOF
13797 #define NCURSES_SP_FUNCS 1
13798 EOF
13799
13800 cat >>confdefs.h <<\EOF
13801 #define HAVE_TPUTS_SP 1
13802 EOF
13803
13804         GENERATED_SP_FUNCS=generated
13805 else
13806         NCURSES_SP_FUNCS=0
13807         GENERATED_SP_FUNCS=
13808 fi
13809
13810 echo "$as_me:13810: checking if you want to build with terminal-driver" >&5
13811 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13812
13813 # Check whether --enable-term-driver or --disable-term-driver was given.
13814 if test "${enable_term_driver+set}" = set; then
13815   enableval="$enable_term_driver"
13816   with_term_driver=$enableval
13817 else
13818   with_term_driver=no
13819 fi;
13820 echo "$as_me:13820: result: $with_term_driver" >&5
13821 echo "${ECHO_T}$with_term_driver" >&6
13822 if test "x$with_term_driver" = xyes ; then
13823
13824 cat >>confdefs.h <<\EOF
13825 #define USE_TERM_DRIVER 1
13826 EOF
13827
13828         if test "x$with_termlib" != xno ; then
13829                 { { echo "$as_me:13829: error: The term-driver option conflicts with the termlib option" >&5
13830 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13831    { (exit 1); exit 1; }; }
13832         fi
13833         if test "x$with_sp_funcs" != xyes ; then
13834                 { { echo "$as_me:13834: error: The term-driver option relies upon sp-funcs" >&5
13835 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13836    { (exit 1); exit 1; }; }
13837         fi
13838 fi
13839
13840 ###   use option --enable-const to turn on use of const beyond that in XSI.
13841 echo "$as_me:13841: checking for extended use of const keyword" >&5
13842 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13843
13844 # Check whether --enable-const or --disable-const was given.
13845 if test "${enable_const+set}" = set; then
13846   enableval="$enable_const"
13847   with_ext_const=$enableval
13848 else
13849   with_ext_const=$cf_dft_ext_const
13850 fi;
13851 echo "$as_me:13851: result: $with_ext_const" >&5
13852 echo "${ECHO_T}$with_ext_const" >&6
13853 NCURSES_CONST='/*nothing*/'
13854 if test "x$with_ext_const" = xyes ; then
13855         NCURSES_CONST=const
13856 fi
13857
13858 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13859 echo "$as_me:13859: checking if you want to use extended colors" >&5
13860 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13861
13862 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13863 if test "${enable_ext_colors+set}" = set; then
13864   enableval="$enable_ext_colors"
13865   with_ext_colors=$enableval
13866 else
13867   with_ext_colors=$cf_dft_ext_colors
13868 fi;
13869 echo "$as_me:13869: result: $with_ext_colors" >&5
13870 echo "${ECHO_T}$with_ext_colors" >&6
13871 NCURSES_EXT_COLORS=0
13872 if test "x$with_ext_colors" = xyes ; then
13873         if test "x$with_widec" != xyes ; then
13874                 { echo "$as_me:13874: WARNING: This option applies only to wide-character library" >&5
13875 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13876         else
13877                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13878
13879 if test "${with_abi_version+set}" != set; then
13880         case $cf_cv_rel_version in
13881         (5.*)
13882                 cf_cv_rel_version=6.0
13883                 cf_cv_abi_version=6
13884                 { echo "$as_me:13884: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13885 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13886                 ;;
13887         esac
13888 fi
13889
13890                 NCURSES_EXT_COLORS=1
13891
13892 cat >>confdefs.h <<\EOF
13893 #define NCURSES_EXT_COLORS 1
13894 EOF
13895
13896 cat >>confdefs.h <<\EOF
13897 #define HAVE_ALLOC_PAIR 1
13898 EOF
13899
13900 cat >>confdefs.h <<\EOF
13901 #define HAVE_INIT_EXTENDED_COLOR 1
13902 EOF
13903
13904 cat >>confdefs.h <<\EOF
13905 #define HAVE_RESET_COLOR_PAIRS 1
13906 EOF
13907
13908         fi
13909 fi
13910
13911 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13912 echo "$as_me:13912: checking if you want to use extended mouse encoding" >&5
13913 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13914
13915 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13916 if test "${enable_ext_mouse+set}" = set; then
13917   enableval="$enable_ext_mouse"
13918   with_ext_mouse=$enableval
13919 else
13920   with_ext_mouse=$cf_dft_ext_mouse
13921 fi;
13922 echo "$as_me:13922: result: $with_ext_mouse" >&5
13923 echo "${ECHO_T}$with_ext_mouse" >&6
13924 NCURSES_MOUSE_VERSION=1
13925 if test "x$with_ext_mouse" = xyes ; then
13926         NCURSES_MOUSE_VERSION=2
13927
13928 if test "${with_abi_version+set}" != set; then
13929         case $cf_cv_rel_version in
13930         (5.*)
13931                 cf_cv_rel_version=6.0
13932                 cf_cv_abi_version=6
13933                 { echo "$as_me:13933: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13934 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13935                 ;;
13936         esac
13937 fi
13938
13939 fi
13940
13941 ###   use option --enable-ext-putwin to turn on extended screendumps
13942 echo "$as_me:13942: checking if you want to use extended putwin/screendump" >&5
13943 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13944
13945 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13946 if test "${enable_ext_putwin+set}" = set; then
13947   enableval="$enable_ext_putwin"
13948   with_ext_putwin=$enableval
13949 else
13950   with_ext_putwin=$cf_dft_ext_putwin
13951 fi;
13952 echo "$as_me:13952: result: $with_ext_putwin" >&5
13953 echo "${ECHO_T}$with_ext_putwin" >&6
13954 if test "x$with_ext_putwin" = xyes ; then
13955
13956 cat >>confdefs.h <<\EOF
13957 #define NCURSES_EXT_PUTWIN 1
13958 EOF
13959
13960 fi
13961
13962 echo "$as_me:13962: checking if you want \$NCURSES_NO_PADDING code" >&5
13963 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13964
13965 # Check whether --enable-no-padding or --disable-no-padding was given.
13966 if test "${enable_no_padding+set}" = set; then
13967   enableval="$enable_no_padding"
13968   with_no_padding=$enableval
13969 else
13970   with_no_padding=$with_ext_funcs
13971 fi;
13972 echo "$as_me:13972: result: $with_no_padding" >&5
13973 echo "${ECHO_T}$with_no_padding" >&6
13974 test "x$with_no_padding" = xyes &&
13975 cat >>confdefs.h <<\EOF
13976 #define NCURSES_NO_PADDING 1
13977 EOF
13978
13979 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
13980 echo "$as_me:13980: checking if you want SIGWINCH handler" >&5
13981 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
13982
13983 # Check whether --enable-sigwinch or --disable-sigwinch was given.
13984 if test "${enable_sigwinch+set}" = set; then
13985   enableval="$enable_sigwinch"
13986   with_sigwinch=$enableval
13987 else
13988   with_sigwinch=$with_ext_funcs
13989 fi;
13990 echo "$as_me:13990: result: $with_sigwinch" >&5
13991 echo "${ECHO_T}$with_sigwinch" >&6
13992 test "x$with_sigwinch" = xyes &&
13993 cat >>confdefs.h <<\EOF
13994 #define USE_SIGWINCH 1
13995 EOF
13996
13997 ###   use option --enable-tcap-names to allow user to define new capabilities
13998 echo "$as_me:13998: checking if you want user-definable terminal capabilities like termcap" >&5
13999 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14000
14001 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14002 if test "${enable_tcap_names+set}" = set; then
14003   enableval="$enable_tcap_names"
14004   with_tcap_names=$enableval
14005 else
14006   with_tcap_names=$with_ext_funcs
14007 fi;
14008 echo "$as_me:14008: result: $with_tcap_names" >&5
14009 echo "${ECHO_T}$with_tcap_names" >&6
14010 NCURSES_XNAMES=0
14011 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14012
14013 ##############################################################################
14014
14015 echo "$as_me:14015: checking if you want to link with the pthread library" >&5
14016 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14017
14018 # Check whether --with-pthread or --without-pthread was given.
14019 if test "${with_pthread+set}" = set; then
14020   withval="$with_pthread"
14021   with_pthread=$withval
14022 else
14023   with_pthread=no
14024 fi;
14025 echo "$as_me:14025: result: $with_pthread" >&5
14026 echo "${ECHO_T}$with_pthread" >&6
14027
14028 if test "$with_pthread" != no ; then
14029         echo "$as_me:14029: checking for pthread.h" >&5
14030 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14031 if test "${ac_cv_header_pthread_h+set}" = set; then
14032   echo $ECHO_N "(cached) $ECHO_C" >&6
14033 else
14034   cat >conftest.$ac_ext <<_ACEOF
14035 #line 14035 "configure"
14036 #include "confdefs.h"
14037 #include <pthread.h>
14038 _ACEOF
14039 if { (eval echo "$as_me:14039: \"$ac_cpp conftest.$ac_ext\"") >&5
14040   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14041   ac_status=$?
14042   egrep -v '^ *\+' conftest.er1 >conftest.err
14043   rm -f conftest.er1
14044   cat conftest.err >&5
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit $ac_status); } >/dev/null; then
14047   if test -s conftest.err; then
14048     ac_cpp_err=$ac_c_preproc_warn_flag
14049   else
14050     ac_cpp_err=
14051   fi
14052 else
14053   ac_cpp_err=yes
14054 fi
14055 if test -z "$ac_cpp_err"; then
14056   ac_cv_header_pthread_h=yes
14057 else
14058   echo "$as_me: failed program was:" >&5
14059   cat conftest.$ac_ext >&5
14060   ac_cv_header_pthread_h=no
14061 fi
14062 rm -f conftest.err conftest.$ac_ext
14063 fi
14064 echo "$as_me:14064: result: $ac_cv_header_pthread_h" >&5
14065 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14066 if test $ac_cv_header_pthread_h = yes; then
14067
14068 cat >>confdefs.h <<\EOF
14069 #define HAVE_PTHREADS_H 1
14070 EOF
14071
14072         for cf_lib_pthread in pthread c_r
14073         do
14074             echo "$as_me:14074: checking if we can link with the $cf_lib_pthread library" >&5
14075 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14076             cf_save_LIBS="$LIBS"
14077
14078 cf_add_libs="-l$cf_lib_pthread"
14079 # Filter out duplicates - this happens with badly-designed ".pc" files...
14080 for cf_add_1lib in $LIBS
14081 do
14082         for cf_add_2lib in $cf_add_libs
14083         do
14084                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14085                 then
14086                         cf_add_1lib=
14087                         break
14088                 fi
14089         done
14090         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14091 done
14092 LIBS="$cf_add_libs"
14093
14094             cat >conftest.$ac_ext <<_ACEOF
14095 #line 14095 "configure"
14096 #include "confdefs.h"
14097
14098 #include <pthread.h>
14099
14100 int
14101 main (void)
14102 {
14103
14104                 int rc = pthread_create(0,0,0,0);
14105                 int r2 = pthread_mutexattr_settype(0, 0);
14106
14107   ;
14108   return 0;
14109 }
14110 _ACEOF
14111 rm -f conftest.$ac_objext conftest$ac_exeext
14112 if { (eval echo "$as_me:14112: \"$ac_link\"") >&5
14113   (eval $ac_link) 2>&5
14114   ac_status=$?
14115   echo "$as_me:14115: \$? = $ac_status" >&5
14116   (exit $ac_status); } &&
14117          { ac_try='test -s conftest$ac_exeext'
14118   { (eval echo "$as_me:14118: \"$ac_try\"") >&5
14119   (eval $ac_try) 2>&5
14120   ac_status=$?
14121   echo "$as_me:14121: \$? = $ac_status" >&5
14122   (exit $ac_status); }; }; then
14123   with_pthread=yes
14124 else
14125   echo "$as_me: failed program was:" >&5
14126 cat conftest.$ac_ext >&5
14127 with_pthread=no
14128 fi
14129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14130             LIBS="$cf_save_LIBS"
14131             echo "$as_me:14131: result: $with_pthread" >&5
14132 echo "${ECHO_T}$with_pthread" >&6
14133             test "$with_pthread" = yes && break
14134         done
14135
14136         if test "$with_pthread" = yes ; then
14137
14138 cf_add_libs="-l$cf_lib_pthread"
14139 # Filter out duplicates - this happens with badly-designed ".pc" files...
14140 for cf_add_1lib in $LIBS
14141 do
14142         for cf_add_2lib in $cf_add_libs
14143         do
14144                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14145                 then
14146                         cf_add_1lib=
14147                         break
14148                 fi
14149         done
14150         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14151 done
14152 LIBS="$cf_add_libs"
14153
14154 cat >>confdefs.h <<\EOF
14155 #define HAVE_LIBPTHREADS 1
14156 EOF
14157
14158         else
14159             { { echo "$as_me:14159: error: Cannot link with pthread library" >&5
14160 echo "$as_me: error: Cannot link with pthread library" >&2;}
14161    { (exit 1); exit 1; }; }
14162         fi
14163
14164 fi
14165
14166 fi
14167
14168 if test "x$with_pthread" != xno; then
14169         echo "$as_me:14169: checking for pthread_kill" >&5
14170 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14171 if test "${ac_cv_func_pthread_kill+set}" = set; then
14172   echo $ECHO_N "(cached) $ECHO_C" >&6
14173 else
14174   cat >conftest.$ac_ext <<_ACEOF
14175 #line 14175 "configure"
14176 #include "confdefs.h"
14177 #define pthread_kill autoconf_temporary
14178 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14179 #undef pthread_kill
14180
14181 #ifdef __cplusplus
14182 extern "C"
14183 #endif
14184
14185 /* We use char because int might match the return type of a gcc2
14186    builtin and then its argument prototype would still apply.  */
14187 char pthread_kill (void);
14188
14189 int
14190 main (void)
14191 {
14192
14193 /* The GNU C library defines stubs for functions which it implements
14194     to always fail with ENOSYS.  Some functions are actually named
14195     something starting with __ and the normal name is an alias.  */
14196 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14197 #error found stub for pthread_kill
14198 #endif
14199
14200         return pthread_kill ();
14201   ;
14202   return 0;
14203 }
14204 _ACEOF
14205 rm -f conftest.$ac_objext conftest$ac_exeext
14206 if { (eval echo "$as_me:14206: \"$ac_link\"") >&5
14207   (eval $ac_link) 2>&5
14208   ac_status=$?
14209   echo "$as_me:14209: \$? = $ac_status" >&5
14210   (exit $ac_status); } &&
14211          { ac_try='test -s conftest$ac_exeext'
14212   { (eval echo "$as_me:14212: \"$ac_try\"") >&5
14213   (eval $ac_try) 2>&5
14214   ac_status=$?
14215   echo "$as_me:14215: \$? = $ac_status" >&5
14216   (exit $ac_status); }; }; then
14217   ac_cv_func_pthread_kill=yes
14218 else
14219   echo "$as_me: failed program was:" >&5
14220 cat conftest.$ac_ext >&5
14221 ac_cv_func_pthread_kill=no
14222 fi
14223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14224 fi
14225 echo "$as_me:14225: result: $ac_cv_func_pthread_kill" >&5
14226 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14227 if test $ac_cv_func_pthread_kill = yes; then
14228
14229                 echo "$as_me:14229: checking if you want to allow EINTR in wgetch with pthreads" >&5
14230 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14231
14232 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14233 if test "${enable_pthreads_eintr+set}" = set; then
14234   enableval="$enable_pthreads_eintr"
14235   use_pthreads_eintr=$enableval
14236 else
14237   use_pthreads_eintr=no
14238 fi;
14239                 echo "$as_me:14239: result: $use_pthreads_eintr" >&5
14240 echo "${ECHO_T}$use_pthreads_eintr" >&6
14241                 if test "x$use_pthreads_eintr" = xyes ; then
14242
14243 cat >>confdefs.h <<\EOF
14244 #define USE_PTHREADS_EINTR 1
14245 EOF
14246
14247                 fi
14248 fi
14249
14250         echo "$as_me:14250: checking if you want to use weak-symbols for pthreads" >&5
14251 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14252
14253 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14254 if test "${enable_weak_symbols+set}" = set; then
14255   enableval="$enable_weak_symbols"
14256   use_weak_symbols=$enableval
14257 else
14258   use_weak_symbols=no
14259 fi;
14260         echo "$as_me:14260: result: $use_weak_symbols" >&5
14261 echo "${ECHO_T}$use_weak_symbols" >&6
14262         if test "x$use_weak_symbols" = xyes ; then
14263
14264 echo "$as_me:14264: checking if $CC supports weak symbols" >&5
14265 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14266 if test "${cf_cv_weak_symbols+set}" = set; then
14267   echo $ECHO_N "(cached) $ECHO_C" >&6
14268 else
14269
14270 cat >conftest.$ac_ext <<_ACEOF
14271 #line 14271 "configure"
14272 #include "confdefs.h"
14273
14274 #include <stdio.h>
14275 int
14276 main (void)
14277 {
14278
14279 #if defined(__GNUC__)
14280 #  if defined __USE_ISOC99
14281 #    define _cat_pragma(exp)    _Pragma(#exp)
14282 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14283 #  else
14284 #    define _weak_pragma(exp)
14285 #  endif
14286 #  define _declare(name)        __extension__ extern __typeof__(name) name
14287 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14288 #endif
14289
14290 weak_symbol(fopen);
14291
14292   ;
14293   return 0;
14294 }
14295 _ACEOF
14296 rm -f conftest.$ac_objext
14297 if { (eval echo "$as_me:14297: \"$ac_compile\"") >&5
14298   (eval $ac_compile) 2>&5
14299   ac_status=$?
14300   echo "$as_me:14300: \$? = $ac_status" >&5
14301   (exit $ac_status); } &&
14302          { ac_try='test -s conftest.$ac_objext'
14303   { (eval echo "$as_me:14303: \"$ac_try\"") >&5
14304   (eval $ac_try) 2>&5
14305   ac_status=$?
14306   echo "$as_me:14306: \$? = $ac_status" >&5
14307   (exit $ac_status); }; }; then
14308   cf_cv_weak_symbols=yes
14309 else
14310   echo "$as_me: failed program was:" >&5
14311 cat conftest.$ac_ext >&5
14312 cf_cv_weak_symbols=no
14313 fi
14314 rm -f conftest.$ac_objext conftest.$ac_ext
14315
14316 fi
14317 echo "$as_me:14317: result: $cf_cv_weak_symbols" >&5
14318 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14319
14320         else
14321                 cf_cv_weak_symbols=no
14322         fi
14323
14324         if test "x$cf_cv_weak_symbols" = xyes ; then
14325
14326 cat >>confdefs.h <<\EOF
14327 #define USE_WEAK_SYMBOLS 1
14328 EOF
14329
14330         fi
14331 fi
14332
14333 PTHREAD=
14334 if test "x$with_pthread" = "xyes" ; then
14335
14336 cat >>confdefs.h <<\EOF
14337 #define USE_PTHREADS 1
14338 EOF
14339
14340         enable_reentrant=yes
14341         if test "x$cf_cv_weak_symbols" = xyes ; then
14342                 PTHREAD=-lpthread
14343
14344 cf_add_libs="-lpthread"
14345 # Filter out duplicates - this happens with badly-designed ".pc" files...
14346 for cf_add_1lib in $PRIVATE_LIBS
14347 do
14348         for cf_add_2lib in $cf_add_libs
14349         do
14350                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14351                 then
14352                         cf_add_1lib=
14353                         break
14354                 fi
14355         done
14356         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14357 done
14358 PRIVATE_LIBS="$cf_add_libs"
14359
14360         fi
14361 fi
14362
14363 # Reentrant code has to be opaque; there's little advantage to making ncurses
14364 # opaque outside of that, so there is no --enable-opaque option.  We can use
14365 # this option without --with-pthreads, but this will be always set for
14366 # pthreads.
14367 echo "$as_me:14367: checking if you want reentrant code" >&5
14368 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14369
14370 # Check whether --enable-reentrant or --disable-reentrant was given.
14371 if test "${enable_reentrant+set}" = set; then
14372   enableval="$enable_reentrant"
14373   with_reentrant=$enableval
14374 else
14375   with_reentrant=no
14376 fi;
14377 echo "$as_me:14377: result: $with_reentrant" >&5
14378 echo "${ECHO_T}$with_reentrant" >&6
14379 if test "x$with_reentrant" = xyes ; then
14380         cf_cv_enable_reentrant=1
14381         cf_cv_enable_opaque="NCURSES_INTERNALS"
14382         NCURSES_SIZE_T=int
14383         if test "x$cf_cv_weak_symbols" = xyes ; then
14384
14385 # remove pthread library from $LIBS
14386 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14387
14388 cf_add_libs="-lpthread"
14389 # Filter out duplicates - this happens with badly-designed ".pc" files...
14390 for cf_add_1lib in $TEST_LIBS
14391 do
14392         for cf_add_2lib in $cf_add_libs
14393         do
14394                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14395                 then
14396                         cf_add_1lib=
14397                         break
14398                 fi
14399         done
14400         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14401 done
14402 TEST_LIBS="$cf_add_libs"
14403
14404 cf_add_libs="-lpthread"
14405 # Filter out duplicates - this happens with badly-designed ".pc" files...
14406 for cf_add_1lib in $TEST_LIBS2
14407 do
14408         for cf_add_2lib in $cf_add_libs
14409         do
14410                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14411                 then
14412                         cf_add_1lib=
14413                         break
14414                 fi
14415         done
14416         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14417 done
14418 TEST_LIBS2="$cf_add_libs"
14419
14420 cf_add_libs="-lpthread"
14421 # Filter out duplicates - this happens with badly-designed ".pc" files...
14422 for cf_add_1lib in $PRIVATE_LIBS
14423 do
14424         for cf_add_2lib in $cf_add_libs
14425         do
14426                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14427                 then
14428                         cf_add_1lib=
14429                         break
14430                 fi
14431         done
14432         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14433 done
14434 PRIVATE_LIBS="$cf_add_libs"
14435
14436         else
14437                 # when not using weak symbols but with_reentrant,
14438                 # add 't' to the library suffix on all platforms
14439                 # except cygwin, where we only do that if ALSO
14440                 # compiling with full thread support.
14441                 case "$host" in
14442                 (*cygwin* | *msys*)
14443                         if test "$with_pthread" = "yes" ; then
14444                                 if test "x$disable_lib_suffixes" = "xno" ; then
14445                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14446                                 fi
14447                         fi ;;
14448                 (*)
14449                         if test "x$disable_lib_suffixes" = "xno" ; then
14450                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14451                         fi
14452                         ;;
14453                 esac
14454         fi
14455
14456 cat >>confdefs.h <<\EOF
14457 #define USE_REENTRANT 1
14458 EOF
14459
14460 if test "${with_abi_version+set}" != set; then
14461         case $cf_cv_rel_version in
14462         (5.*)
14463                 cf_cv_rel_version=6.0
14464                 cf_cv_abi_version=6
14465                 { echo "$as_me:14465: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14466 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14467                 ;;
14468         esac
14469 fi
14470
14471 else
14472         cf_cv_enable_reentrant=0
14473         cf_cv_enable_opaque="NCURSES_OPAQUE"
14474         NCURSES_SIZE_T=short
14475 fi
14476
14477 echo "$as_me:14477: checking if you want opaque curses-library structures" >&5
14478 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14479
14480 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14481 if test "${enable_opaque_curses+set}" = set; then
14482   enableval="$enable_opaque_curses"
14483   test "$enableval" != yes && enableval=no
14484         if test "$enableval" != "no" ; then
14485     enable_opaque_curses=yes
14486         else
14487
14488          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14489          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14490
14491         fi
14492 else
14493   enableval=no
14494
14495          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14496          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14497
14498 fi;
14499 echo "$as_me:14499: result: $enable_opaque_curses" >&5
14500 echo "${ECHO_T}$enable_opaque_curses" >&6
14501
14502 test "$cf_cv_enable_reentrant" = 1 && \
14503 test "$enable_opaque_curses" = no && \
14504 { { echo "$as_me:14504: error: reentrant configuration requires opaque library" >&5
14505 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14506    { (exit 1); exit 1; }; }
14507
14508 echo "$as_me:14508: checking if you want opaque form-library structures" >&5
14509 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14510
14511 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14512 if test "${enable_opaque_form+set}" = set; then
14513   enableval="$enable_opaque_form"
14514   enable_opaque_form=yes
14515 else
14516   enable_opaque_form=no
14517 fi;
14518 echo "$as_me:14518: result: $enable_opaque_form" >&5
14519 echo "${ECHO_T}$enable_opaque_form" >&6
14520
14521 echo "$as_me:14521: checking if you want opaque menu-library structures" >&5
14522 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14523
14524 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14525 if test "${enable_opaque_menu+set}" = set; then
14526   enableval="$enable_opaque_menu"
14527   enable_opaque_menu=yes
14528 else
14529   enable_opaque_menu=no
14530 fi;
14531 echo "$as_me:14531: result: $enable_opaque_menu" >&5
14532 echo "${ECHO_T}$enable_opaque_menu" >&6
14533
14534 echo "$as_me:14534: checking if you want opaque panel-library structures" >&5
14535 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14536
14537 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14538 if test "${enable_opaque_panel+set}" = set; then
14539   enableval="$enable_opaque_panel"
14540   enable_opaque_panel=yes
14541 else
14542   enable_opaque_panel=no
14543 fi;
14544 echo "$as_me:14544: result: $enable_opaque_panel" >&5
14545 echo "${ECHO_T}$enable_opaque_panel" >&6
14546
14547 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14548 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14549 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14550 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14551
14552 ### Allow using a different wrap-prefix
14553 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14554         echo "$as_me:14554: checking for prefix used to wrap public variables" >&5
14555 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14556
14557 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14558 if test "${with_wrap_prefix+set}" = set; then
14559   withval="$with_wrap_prefix"
14560   NCURSES_WRAP_PREFIX=$withval
14561 else
14562   NCURSES_WRAP_PREFIX=_nc_
14563 fi;
14564         echo "$as_me:14564: result: $NCURSES_WRAP_PREFIX" >&5
14565 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14566 else
14567         NCURSES_WRAP_PREFIX=_nc_
14568 fi
14569
14570 cat >>confdefs.h <<EOF
14571 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14572 EOF
14573
14574 ###############################################################################
14575 # These options are relatively safe to experiment with.
14576
14577 echo "$as_me:14577: checking if you want all development code" >&5
14578 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14579
14580 # Check whether --with-develop or --without-develop was given.
14581 if test "${with_develop+set}" = set; then
14582   withval="$with_develop"
14583   with_develop=$withval
14584 else
14585   with_develop=no
14586 fi;
14587 echo "$as_me:14587: result: $with_develop" >&5
14588 echo "${ECHO_T}$with_develop" >&6
14589
14590 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14591 echo "$as_me:14591: checking if you want hard-tabs code" >&5
14592 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14593
14594 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14595 if test "${enable_hard_tabs+set}" = set; then
14596   enableval="$enable_hard_tabs"
14597
14598 else
14599   enable_hard_tabs=$with_develop
14600 fi;
14601 echo "$as_me:14601: result: $enable_hard_tabs" >&5
14602 echo "${ECHO_T}$enable_hard_tabs" >&6
14603 test "x$enable_hard_tabs" = xyes &&
14604 cat >>confdefs.h <<\EOF
14605 #define USE_HARD_TABS 1
14606 EOF
14607
14608 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14609 echo "$as_me:14609: checking if you want limited support for xmc" >&5
14610 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14611
14612 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14613 if test "${enable_xmc_glitch+set}" = set; then
14614   enableval="$enable_xmc_glitch"
14615
14616 else
14617   enable_xmc_glitch=$with_develop
14618 fi;
14619 echo "$as_me:14619: result: $enable_xmc_glitch" >&5
14620 echo "${ECHO_T}$enable_xmc_glitch" >&6
14621 test "x$enable_xmc_glitch" = xyes &&
14622 cat >>confdefs.h <<\EOF
14623 #define USE_XMC_SUPPORT 1
14624 EOF
14625
14626 ###############################################################################
14627 # These are just experimental, probably should not be in a package:
14628
14629 echo "$as_me:14629: checking if you do not want to assume colors are white-on-black" >&5
14630 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14631
14632 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14633 if test "${enable_assumed_color+set}" = set; then
14634   enableval="$enable_assumed_color"
14635   with_assumed_color=$enableval
14636 else
14637   with_assumed_color=yes
14638 fi;
14639 echo "$as_me:14639: result: $with_assumed_color" >&5
14640 echo "${ECHO_T}$with_assumed_color" >&6
14641 test "x$with_assumed_color" = xyes &&
14642 cat >>confdefs.h <<\EOF
14643 #define USE_ASSUMED_COLOR 1
14644 EOF
14645
14646 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14647 echo "$as_me:14647: checking if you want hashmap scrolling-optimization code" >&5
14648 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14649
14650 # Check whether --enable-hashmap or --disable-hashmap was given.
14651 if test "${enable_hashmap+set}" = set; then
14652   enableval="$enable_hashmap"
14653   with_hashmap=$enableval
14654 else
14655   with_hashmap=yes
14656 fi;
14657 echo "$as_me:14657: result: $with_hashmap" >&5
14658 echo "${ECHO_T}$with_hashmap" >&6
14659 test "x$with_hashmap" = xyes &&
14660 cat >>confdefs.h <<\EOF
14661 #define USE_HASHMAP 1
14662 EOF
14663
14664 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14665 echo "$as_me:14665: checking if you want colorfgbg code" >&5
14666 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14667
14668 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14669 if test "${enable_colorfgbg+set}" = set; then
14670   enableval="$enable_colorfgbg"
14671   with_colorfgbg=$enableval
14672 else
14673   with_colorfgbg=no
14674 fi;
14675 echo "$as_me:14675: result: $with_colorfgbg" >&5
14676 echo "${ECHO_T}$with_colorfgbg" >&6
14677 test "x$with_colorfgbg" = xyes &&
14678 cat >>confdefs.h <<\EOF
14679 #define USE_COLORFGBG 1
14680 EOF
14681
14682 ###   use option --enable-interop to turn on use of bindings used for interop
14683 echo "$as_me:14683: checking if you want interop bindings" >&5
14684 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14685
14686 # Check whether --enable-interop or --disable-interop was given.
14687 if test "${enable_interop+set}" = set; then
14688   enableval="$enable_interop"
14689   with_exp_interop=$enableval
14690 else
14691   with_exp_interop=$cf_dft_interop
14692 fi;
14693 echo "$as_me:14693: result: $with_exp_interop" >&5
14694 echo "${ECHO_T}$with_exp_interop" >&6
14695
14696 NCURSES_INTEROP_FUNCS=0
14697 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14698
14699 echo "$as_me:14699: checking if you want experimental safe-sprintf code" >&5
14700 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14701
14702 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14703 if test "${enable_safe_sprintf+set}" = set; then
14704   enableval="$enable_safe_sprintf"
14705   with_safe_sprintf=$enableval
14706 else
14707   with_safe_sprintf=no
14708 fi;
14709 echo "$as_me:14709: result: $with_safe_sprintf" >&5
14710 echo "${ECHO_T}$with_safe_sprintf" >&6
14711
14712 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14713 # when hashmap is used scroll hints are useless
14714 if test "$with_hashmap" = no ; then
14715 echo "$as_me:14715: checking if you want to experiment without scrolling-hints code" >&5
14716 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14717
14718 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14719 if test "${enable_scroll_hints+set}" = set; then
14720   enableval="$enable_scroll_hints"
14721   with_scroll_hints=$enableval
14722 else
14723   with_scroll_hints=yes
14724 fi;
14725 echo "$as_me:14725: result: $with_scroll_hints" >&5
14726 echo "${ECHO_T}$with_scroll_hints" >&6
14727 test "x$with_scroll_hints" = xyes &&
14728 cat >>confdefs.h <<\EOF
14729 #define USE_SCROLL_HINTS 1
14730 EOF
14731
14732 fi
14733
14734 echo "$as_me:14734: checking if you want wgetch-events code" >&5
14735 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14736
14737 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14738 if test "${enable_wgetch_events+set}" = set; then
14739   enableval="$enable_wgetch_events"
14740   with_wgetch_events=$enableval
14741 else
14742   with_wgetch_events=no
14743 fi;
14744 echo "$as_me:14744: result: $with_wgetch_events" >&5
14745 echo "${ECHO_T}$with_wgetch_events" >&6
14746 test "x$with_wgetch_events" = xyes &&
14747 cat >>confdefs.h <<\EOF
14748 #define NCURSES_WGETCH_EVENTS 1
14749 EOF
14750
14751 ###############################################################################
14752
14753 ###     use option --disable-echo to suppress full display compiling commands
14754
14755 echo "$as_me:14755: checking if you want to see long compiling messages" >&5
14756 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14757
14758 # Check whether --enable-echo or --disable-echo was given.
14759 if test "${enable_echo+set}" = set; then
14760   enableval="$enable_echo"
14761   test "$enableval" != no && enableval=yes
14762         if test "$enableval" != "yes" ; then
14763
14764         ECHO_LT='--silent'
14765         ECHO_LD='@echo linking $@;'
14766         RULE_CC='@echo compiling $<'
14767         SHOW_CC='@echo compiling $@'
14768         ECHO_CC='@'
14769
14770         else
14771
14772         ECHO_LT=''
14773         ECHO_LD=''
14774         RULE_CC=''
14775         SHOW_CC=''
14776         ECHO_CC=''
14777
14778         fi
14779 else
14780   enableval=yes
14781
14782         ECHO_LT=''
14783         ECHO_LD=''
14784         RULE_CC=''
14785         SHOW_CC=''
14786         ECHO_CC=''
14787
14788 fi;
14789 echo "$as_me:14789: result: $enableval" >&5
14790 echo "${ECHO_T}$enableval" >&6
14791
14792 if test "x$enable_echo" = xyes; then
14793         ECHO_LINK=
14794 else
14795         ECHO_LINK='@ echo linking $@ ... ;'
14796         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14797         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14798 fi
14799
14800 # --disable-stripping is used for debugging
14801
14802 echo "$as_me:14802: checking if you want to install stripped executables" >&5
14803 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14804
14805 # Check whether --enable-stripping or --disable-stripping was given.
14806 if test "${enable_stripping+set}" = set; then
14807   enableval="$enable_stripping"
14808   test "$enableval" != no && enableval=yes
14809         if test "$enableval" != "yes" ; then
14810     with_stripping=no
14811         else
14812                 with_stripping=yes
14813         fi
14814 else
14815   enableval=yes
14816         with_stripping=yes
14817
14818 fi;
14819 echo "$as_me:14819: result: $with_stripping" >&5
14820 echo "${ECHO_T}$with_stripping" >&6
14821
14822 if test "$with_stripping" = yes
14823 then
14824         INSTALL_OPT_S="-s"
14825 else
14826         INSTALL_OPT_S=
14827 fi
14828
14829 : ${INSTALL:=install}
14830 echo "$as_me:14830: checking if install accepts -p option" >&5
14831 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14832 if test "${cf_cv_install_p+set}" = set; then
14833   echo $ECHO_N "(cached) $ECHO_C" >&6
14834 else
14835
14836         rm -rf conftest*
14837         date >conftest.in
14838         mkdir conftest.out
14839         sleep 3
14840         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14841         then
14842                 if test -f conftest.out/conftest.in
14843                 then
14844                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14845                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14846                         if test -s conftest.err
14847                         then
14848                                 cf_cv_install_p=no
14849                         else
14850                                 cf_cv_install_p=yes
14851                         fi
14852                 else
14853                         cf_cv_install_p=no
14854                 fi
14855         else
14856                 cf_cv_install_p=no
14857         fi
14858         rm -rf conftest*
14859
14860 fi
14861 echo "$as_me:14861: result: $cf_cv_install_p" >&5
14862 echo "${ECHO_T}$cf_cv_install_p" >&6
14863
14864 echo "$as_me:14864: checking if install needs to be told about ownership" >&5
14865 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14866 case `$ac_config_guess` in
14867 (*minix)
14868         with_install_o=yes
14869         ;;
14870 (*)
14871         with_install_o=no
14872         ;;
14873 esac
14874
14875 echo "$as_me:14875: result: $with_install_o" >&5
14876 echo "${ECHO_T}$with_install_o" >&6
14877 if test "x$with_install_o" = xyes
14878 then
14879         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'`
14880 else
14881         INSTALL_OPT_O=
14882 fi
14883
14884 # If we're avoiding relinking of shared libraries during install, that is to
14885 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14886 # the install program has "-p" (for preserving timestamps).
14887 cf_cv_do_reranlib=yes
14888 if test "x$cf_cv_install_p" = xyes
14889 then
14890         if test "x$cf_cv_do_relink" != xyes
14891         then
14892                 cf_cv_do_reranlib=no
14893                 INSTALL_OPT_P="-p"
14894                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14895         fi
14896 fi
14897
14898 ###     use option --enable-warnings to turn on all gcc warnings
14899 echo "$as_me:14899: checking if you want to see compiler warnings" >&5
14900 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14901
14902 # Check whether --enable-warnings or --disable-warnings was given.
14903 if test "${enable_warnings+set}" = set; then
14904   enableval="$enable_warnings"
14905   with_warnings=$enableval
14906 fi;
14907 echo "$as_me:14907: result: $with_warnings" >&5
14908 echo "${ECHO_T}$with_warnings" >&6
14909
14910 if test "x$with_warnings" = "xyes"; then
14911
14912         ADAFLAGS="$ADAFLAGS -gnatg"
14913
14914 INTEL_COMPILER=no
14915
14916 if test "$GCC" = yes ; then
14917         case $host_os in
14918         (linux*|gnu*)
14919                 echo "$as_me:14919: checking if this is really Intel C compiler" >&5
14920 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14921                 cf_save_CFLAGS="$CFLAGS"
14922                 CFLAGS="$CFLAGS -no-gcc"
14923                 cat >conftest.$ac_ext <<_ACEOF
14924 #line 14924 "configure"
14925 #include "confdefs.h"
14926
14927 int
14928 main (void)
14929 {
14930
14931 #ifdef __INTEL_COMPILER
14932 #else
14933 make an error
14934 #endif
14935
14936   ;
14937   return 0;
14938 }
14939 _ACEOF
14940 rm -f conftest.$ac_objext
14941 if { (eval echo "$as_me:14941: \"$ac_compile\"") >&5
14942   (eval $ac_compile) 2>&5
14943   ac_status=$?
14944   echo "$as_me:14944: \$? = $ac_status" >&5
14945   (exit $ac_status); } &&
14946          { ac_try='test -s conftest.$ac_objext'
14947   { (eval echo "$as_me:14947: \"$ac_try\"") >&5
14948   (eval $ac_try) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); }; }; then
14952   INTEL_COMPILER=yes
14953 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14954
14955 else
14956   echo "$as_me: failed program was:" >&5
14957 cat conftest.$ac_ext >&5
14958 fi
14959 rm -f conftest.$ac_objext conftest.$ac_ext
14960                 CFLAGS="$cf_save_CFLAGS"
14961                 echo "$as_me:14961: result: $INTEL_COMPILER" >&5
14962 echo "${ECHO_T}$INTEL_COMPILER" >&6
14963                 ;;
14964         esac
14965 fi
14966
14967 CLANG_COMPILER=no
14968
14969 if test "$GCC" = yes ; then
14970         echo "$as_me:14970: checking if this is really Clang C compiler" >&5
14971 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14972         cf_save_CFLAGS="$CFLAGS"
14973         CFLAGS="$CFLAGS -Qunused-arguments"
14974         cat >conftest.$ac_ext <<_ACEOF
14975 #line 14975 "configure"
14976 #include "confdefs.h"
14977
14978 int
14979 main (void)
14980 {
14981
14982 #ifdef __clang__
14983 #else
14984 make an error
14985 #endif
14986
14987   ;
14988   return 0;
14989 }
14990 _ACEOF
14991 rm -f conftest.$ac_objext
14992 if { (eval echo "$as_me:14992: \"$ac_compile\"") >&5
14993   (eval $ac_compile) 2>&5
14994   ac_status=$?
14995   echo "$as_me:14995: \$? = $ac_status" >&5
14996   (exit $ac_status); } &&
14997          { ac_try='test -s conftest.$ac_objext'
14998   { (eval echo "$as_me:14998: \"$ac_try\"") >&5
14999   (eval $ac_try) 2>&5
15000   ac_status=$?
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); }; }; then
15003   CLANG_COMPILER=yes
15004 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15005
15006 else
15007   echo "$as_me: failed program was:" >&5
15008 cat conftest.$ac_ext >&5
15009 fi
15010 rm -f conftest.$ac_objext conftest.$ac_ext
15011         CFLAGS="$cf_save_CFLAGS"
15012         echo "$as_me:15012: result: $CLANG_COMPILER" >&5
15013 echo "${ECHO_T}$CLANG_COMPILER" >&6
15014 fi
15015
15016 cat > conftest.$ac_ext <<EOF
15017 #line 15017 "${as_me:-configure}"
15018 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15019 EOF
15020
15021 if test "$INTEL_COMPILER" = yes
15022 then
15023 # The "-wdXXX" options suppress warnings:
15024 # remark #1419: external declaration in primary source file
15025 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15026 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15027 # remark #193: zero used for undefined preprocessing identifier
15028 # remark #593: variable "curs_sb_left_arrow" was set but never used
15029 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15030 # remark #869: parameter "tw" was never referenced
15031 # remark #981: operands are evaluated in unspecified order
15032 # warning #279: controlling expression is constant
15033
15034         { echo "$as_me:15034: checking for $CC warning options..." >&5
15035 echo "$as_me: checking for $CC warning options..." >&6;}
15036         cf_save_CFLAGS="$CFLAGS"
15037         EXTRA_CFLAGS="-Wall"
15038         for cf_opt in \
15039                 wd1419 \
15040                 wd1683 \
15041                 wd1684 \
15042                 wd193 \
15043                 wd593 \
15044                 wd279 \
15045                 wd810 \
15046                 wd869 \
15047                 wd981
15048         do
15049                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15050                 if { (eval echo "$as_me:15050: \"$ac_compile\"") >&5
15051   (eval $ac_compile) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); }; then
15055                         test -n "$verbose" && echo "$as_me:15055: result: ... -$cf_opt" >&5
15056 echo "${ECHO_T}... -$cf_opt" >&6
15057                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15058                 fi
15059         done
15060         CFLAGS="$cf_save_CFLAGS"
15061
15062 elif test "$GCC" = yes
15063 then
15064         { echo "$as_me:15064: checking for $CC warning options..." >&5
15065 echo "$as_me: checking for $CC warning options..." >&6;}
15066         cf_save_CFLAGS="$CFLAGS"
15067         EXTRA_CFLAGS=
15068         cf_warn_CONST=""
15069         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15070         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15071         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15072         for cf_opt in W Wall \
15073                 Wbad-function-cast \
15074                 Wcast-align \
15075                 Wcast-qual \
15076                 Wdeclaration-after-statement \
15077                 Wextra \
15078                 Winline \
15079                 Wmissing-declarations \
15080                 Wmissing-prototypes \
15081                 Wnested-externs \
15082                 Wpointer-arith \
15083                 Wshadow \
15084                 Wstrict-prototypes \
15085                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15086         do
15087                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15088                 if { (eval echo "$as_me:15088: \"$ac_compile\"") >&5
15089   (eval $ac_compile) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); }; then
15093                         test -n "$verbose" && echo "$as_me:15093: result: ... -$cf_opt" >&5
15094 echo "${ECHO_T}... -$cf_opt" >&6
15095                         case $cf_opt in
15096                         (Wcast-qual)
15097
15098         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15099         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15100
15101                                 ;;
15102                         (Winline)
15103                                 case $GCC_VERSION in
15104                                 ([34].*)
15105                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15106
15107 echo "${as_me:-configure}:15107: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15108
15109                                         continue;;
15110                                 esac
15111                                 ;;
15112                         (Wpointer-arith)
15113                                 case $GCC_VERSION in
15114                                 ([12].*)
15115                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15116
15117 echo "${as_me:-configure}:15117: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15118
15119                                         continue;;
15120                                 esac
15121                                 ;;
15122                         esac
15123                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15124                 fi
15125         done
15126         CFLAGS="$cf_save_CFLAGS"
15127 fi
15128 rm -rf conftest*
15129
15130         if test "x$cf_with_cxx" = xyes ; then
15131
15132 INTEL_CPLUSPLUS=no
15133
15134 if test "$GCC" = yes ; then
15135         case $host_os in
15136         (linux*|gnu*)
15137                 echo "$as_me:15137: checking if this is really Intel C++ compiler" >&5
15138 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15139                 cf_save_CFLAGS="$CXXFLAGS"
15140                 CXXFLAGS="$CXXFLAGS -no-gcc"
15141                 cat >conftest.$ac_ext <<_ACEOF
15142 #line 15142 "configure"
15143 #include "confdefs.h"
15144
15145 int
15146 main (void)
15147 {
15148
15149 #ifdef __INTEL_COMPILER
15150 #else
15151 make an error
15152 #endif
15153
15154   ;
15155   return 0;
15156 }
15157 _ACEOF
15158 rm -f conftest.$ac_objext
15159 if { (eval echo "$as_me:15159: \"$ac_compile\"") >&5
15160   (eval $ac_compile) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); } &&
15164          { ac_try='test -s conftest.$ac_objext'
15165   { (eval echo "$as_me:15165: \"$ac_try\"") >&5
15166   (eval $ac_try) 2>&5
15167   ac_status=$?
15168   echo "$as_me:15168: \$? = $ac_status" >&5
15169   (exit $ac_status); }; }; then
15170   INTEL_CPLUSPLUS=yes
15171 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15172
15173 else
15174   echo "$as_me: failed program was:" >&5
15175 cat conftest.$ac_ext >&5
15176 fi
15177 rm -f conftest.$ac_objext conftest.$ac_ext
15178                 CXXFLAGS="$cf_save_CFLAGS"
15179                 echo "$as_me:15179: result: $INTEL_CPLUSPLUS" >&5
15180 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15181                 ;;
15182         esac
15183 fi
15184
15185 CLANG_CPLUSPLUS=no
15186
15187 if test "$GCC" = yes ; then
15188         echo "$as_me:15188: checking if this is really Clang C++ compiler" >&5
15189 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15190         cf_save_CFLAGS="$CXXFLAGS"
15191         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15192         cat >conftest.$ac_ext <<_ACEOF
15193 #line 15193 "configure"
15194 #include "confdefs.h"
15195
15196 int
15197 main (void)
15198 {
15199
15200 #ifdef __clang__
15201 #else
15202 make an error
15203 #endif
15204
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext
15210 if { (eval echo "$as_me:15210: \"$ac_compile\"") >&5
15211   (eval $ac_compile) 2>&5
15212   ac_status=$?
15213   echo "$as_me:15213: \$? = $ac_status" >&5
15214   (exit $ac_status); } &&
15215          { ac_try='test -s conftest.$ac_objext'
15216   { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217   (eval $ac_try) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); }; }; then
15221   CLANG_CPLUSPLUS=yes
15222 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15223
15224 else
15225   echo "$as_me: failed program was:" >&5
15226 cat conftest.$ac_ext >&5
15227 fi
15228 rm -f conftest.$ac_objext conftest.$ac_ext
15229         CXXFLAGS="$cf_save_CFLAGS"
15230         echo "$as_me:15230: result: $CLANG_CPLUSPLUS" >&5
15231 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15232 fi
15233
15234 ac_ext=cc
15235 ac_cpp='$CXXCPP $CPPFLAGS'
15236 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15237 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15238 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15239 ac_main_return=return
15240
15241 cat > conftest.$ac_ext <<EOF
15242 #line 15242 "configure"
15243 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15244 EOF
15245
15246 if test "$INTEL_CPLUSPLUS" = yes
15247 then
15248 # The "-wdXXX" options suppress warnings:
15249 # remark #1419: external declaration in primary source file
15250 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15251 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15252 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15253 # remark #193: zero used for undefined preprocessing identifier
15254 # remark #593: variable "curs_sb_left_arrow" was set but never used
15255 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15256 # remark #869: parameter "tw" was never referenced
15257 # remark #981: operands are evaluated in unspecified order
15258 # warning #269: invalid format string conversion
15259
15260         { echo "$as_me:15260: checking for $CC warning options..." >&5
15261 echo "$as_me: checking for $CC warning options..." >&6;}
15262         cf_save_CXXFLAGS="$CXXFLAGS"
15263         EXTRA_CXXFLAGS="-Wall"
15264         for cf_opt in \
15265                 wd1419 \
15266                 wd1682 \
15267                 wd1683 \
15268                 wd1684 \
15269                 wd193 \
15270                 wd279 \
15271                 wd593 \
15272                 wd810 \
15273                 wd869 \
15274                 wd981
15275         do
15276                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15277                 if { (eval echo "$as_me:15277: \"$ac_compile\"") >&5
15278   (eval $ac_compile) 2>&5
15279   ac_status=$?
15280   echo "$as_me:15280: \$? = $ac_status" >&5
15281   (exit $ac_status); }; then
15282                         test -n "$verbose" && echo "$as_me:15282: result: ... -$cf_opt" >&5
15283 echo "${ECHO_T}... -$cf_opt" >&6
15284                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15285                 fi
15286         done
15287         CXXFLAGS="$cf_save_CXXFLAGS"
15288
15289 elif test "$GXX" = yes
15290 then
15291         { echo "$as_me:15291: checking for $CXX warning options..." >&5
15292 echo "$as_me: checking for $CXX warning options..." >&6;}
15293         cf_save_CXXFLAGS="$CXXFLAGS"
15294         EXTRA_CXXFLAGS="-W -Wall"
15295         cf_gxx_extra_warnings=""
15296         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15297         case "$GCC_VERSION" in
15298         ([1-2].*)
15299                 ;;
15300         (*)
15301                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15302                 ;;
15303         esac
15304         for cf_opt in \
15305                 Wabi \
15306                 fabi-version=0 \
15307                 Wextra \
15308                 Wignored-qualifiers \
15309                 Wlogical-op \
15310                 Woverloaded-virtual \
15311                 Wsign-promo \
15312                 Wsynth \
15313                 Wold-style-cast \
15314                 Wcast-align \
15315                 Wcast-qual \
15316                 Wpointer-arith \
15317                 Wshadow \
15318                 Wundef $cf_gxx_extra_warnings Wno-unused
15319         do
15320                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15321                 if { (eval echo "$as_me:15321: \"$ac_compile\"") >&5
15322   (eval $ac_compile) 2>&5
15323   ac_status=$?
15324   echo "$as_me:15324: \$? = $ac_status" >&5
15325   (exit $ac_status); }; then
15326                         test -n "$verbose" && echo "$as_me:15326: result: ... -$cf_opt" >&5
15327 echo "${ECHO_T}... -$cf_opt" >&6
15328                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15329                 else
15330                         test -n "$verbose" && echo "$as_me:15330: result: ... no -$cf_opt" >&5
15331 echo "${ECHO_T}... no -$cf_opt" >&6
15332                 fi
15333         done
15334         CXXFLAGS="$cf_save_CXXFLAGS"
15335 fi
15336
15337 rm -rf conftest*
15338 ac_ext=c
15339 ac_cpp='$CPP $CPPFLAGS'
15340 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15341 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15342 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15343 ac_main_return=return
15344
15345         fi
15346 fi
15347
15348 if test "$GCC" = yes
15349 then
15350 cat > conftest.i <<EOF
15351 #ifndef GCC_PRINTF
15352 #define GCC_PRINTF 0
15353 #endif
15354 #ifndef GCC_SCANF
15355 #define GCC_SCANF 0
15356 #endif
15357 #ifndef GCC_NORETURN
15358 #define GCC_NORETURN /* nothing */
15359 #endif
15360 #ifndef GCC_UNUSED
15361 #define GCC_UNUSED /* nothing */
15362 #endif
15363 EOF
15364 if test "$GCC" = yes
15365 then
15366         { echo "$as_me:15366: checking for $CC __attribute__ directives..." >&5
15367 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15368 cat > conftest.$ac_ext <<EOF
15369 #line 15369 "${as_me:-configure}"
15370 #include "confdefs.h"
15371 #include "conftest.h"
15372 #include "conftest.i"
15373 #if     GCC_PRINTF
15374 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15375 #else
15376 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15377 #endif
15378 #if     GCC_SCANF
15379 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15380 #else
15381 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15382 #endif
15383 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15384 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15385 extern void foo(void) GCC_NORETURN;
15386 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15387 EOF
15388         cf_printf_attribute=no
15389         cf_scanf_attribute=no
15390         for cf_attribute in scanf printf unused noreturn
15391         do
15392
15393 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15394
15395                 cf_directive="__attribute__(($cf_attribute))"
15396                 echo "checking for $CC $cf_directive" 1>&5
15397
15398                 case $cf_attribute in
15399                 (printf)
15400                         cf_printf_attribute=yes
15401                         cat >conftest.h <<EOF
15402 #define GCC_$cf_ATTRIBUTE 1
15403 EOF
15404                         ;;
15405                 (scanf)
15406                         cf_scanf_attribute=yes
15407                         cat >conftest.h <<EOF
15408 #define GCC_$cf_ATTRIBUTE 1
15409 EOF
15410                         ;;
15411                 (*)
15412                         cat >conftest.h <<EOF
15413 #define GCC_$cf_ATTRIBUTE $cf_directive
15414 EOF
15415                         ;;
15416                 esac
15417
15418                 if { (eval echo "$as_me:15418: \"$ac_compile\"") >&5
15419   (eval $ac_compile) 2>&5
15420   ac_status=$?
15421   echo "$as_me:15421: \$? = $ac_status" >&5
15422   (exit $ac_status); }; then
15423                         test -n "$verbose" && echo "$as_me:15423: result: ... $cf_attribute" >&5
15424 echo "${ECHO_T}... $cf_attribute" >&6
15425                         cat conftest.h >>confdefs.h
15426                         case $cf_attribute in
15427                         (noreturn)
15428
15429 cat >>confdefs.h <<EOF
15430 #define GCC_NORETURN $cf_directive
15431 EOF
15432
15433                                 ;;
15434                         (printf)
15435                                 cf_value='/* nothing */'
15436                                 if test "$cf_printf_attribute" != no ; then
15437                                         cf_value='__attribute__((format(printf,fmt,var)))'
15438
15439 cat >>confdefs.h <<\EOF
15440 #define GCC_PRINTF 1
15441 EOF
15442
15443                                 fi
15444
15445 cat >>confdefs.h <<EOF
15446 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15447 EOF
15448
15449                                 ;;
15450                         (scanf)
15451                                 cf_value='/* nothing */'
15452                                 if test "$cf_scanf_attribute" != no ; then
15453                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15454
15455 cat >>confdefs.h <<\EOF
15456 #define GCC_SCANF 1
15457 EOF
15458
15459                                 fi
15460
15461 cat >>confdefs.h <<EOF
15462 #define GCC_SCANFLIKE(fmt,var) $cf_value
15463 EOF
15464
15465                                 ;;
15466                         (unused)
15467
15468 cat >>confdefs.h <<EOF
15469 #define GCC_UNUSED $cf_directive
15470 EOF
15471
15472                                 ;;
15473                         esac
15474                 fi
15475         done
15476 else
15477         fgrep define conftest.i >>confdefs.h
15478 fi
15479 rm -rf conftest*
15480 fi
15481
15482 echo "$as_me:15482: checking if you want to work around bogus compiler/loader warnings" >&5
15483 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15484
15485 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15486 if test "${enable_string_hacks+set}" = set; then
15487   enableval="$enable_string_hacks"
15488   with_string_hacks=$enableval
15489 else
15490   with_string_hacks=no
15491 fi;
15492 echo "$as_me:15492: result: $with_string_hacks" >&5
15493 echo "${ECHO_T}$with_string_hacks" >&6
15494
15495 if test "x$with_string_hacks" = "xyes"; then
15496
15497 cat >>confdefs.h <<\EOF
15498 #define USE_STRING_HACKS 1
15499 EOF
15500
15501         { echo "$as_me:15501: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15502 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15503         echo "$as_me:15503: checking for strlcat" >&5
15504 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15505 if test "${ac_cv_func_strlcat+set}" = set; then
15506   echo $ECHO_N "(cached) $ECHO_C" >&6
15507 else
15508   cat >conftest.$ac_ext <<_ACEOF
15509 #line 15509 "configure"
15510 #include "confdefs.h"
15511 #define strlcat autoconf_temporary
15512 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15513 #undef strlcat
15514
15515 #ifdef __cplusplus
15516 extern "C"
15517 #endif
15518
15519 /* We use char because int might match the return type of a gcc2
15520    builtin and then its argument prototype would still apply.  */
15521 char strlcat (void);
15522
15523 int
15524 main (void)
15525 {
15526
15527 /* The GNU C library defines stubs for functions which it implements
15528     to always fail with ENOSYS.  Some functions are actually named
15529     something starting with __ and the normal name is an alias.  */
15530 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15531 #error found stub for strlcat
15532 #endif
15533
15534         return strlcat ();
15535   ;
15536   return 0;
15537 }
15538 _ACEOF
15539 rm -f conftest.$ac_objext conftest$ac_exeext
15540 if { (eval echo "$as_me:15540: \"$ac_link\"") >&5
15541   (eval $ac_link) 2>&5
15542   ac_status=$?
15543   echo "$as_me:15543: \$? = $ac_status" >&5
15544   (exit $ac_status); } &&
15545          { ac_try='test -s conftest$ac_exeext'
15546   { (eval echo "$as_me:15546: \"$ac_try\"") >&5
15547   (eval $ac_try) 2>&5
15548   ac_status=$?
15549   echo "$as_me:15549: \$? = $ac_status" >&5
15550   (exit $ac_status); }; }; then
15551   ac_cv_func_strlcat=yes
15552 else
15553   echo "$as_me: failed program was:" >&5
15554 cat conftest.$ac_ext >&5
15555 ac_cv_func_strlcat=no
15556 fi
15557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15558 fi
15559 echo "$as_me:15559: result: $ac_cv_func_strlcat" >&5
15560 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15561 if test $ac_cv_func_strlcat = yes; then
15562
15563 cat >>confdefs.h <<\EOF
15564 #define HAVE_STRLCAT 1
15565 EOF
15566
15567 else
15568
15569                 echo "$as_me:15569: checking for strlcat in -lbsd" >&5
15570 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15571 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15572   echo $ECHO_N "(cached) $ECHO_C" >&6
15573 else
15574   ac_check_lib_save_LIBS=$LIBS
15575 LIBS="-lbsd  $LIBS"
15576 cat >conftest.$ac_ext <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15579
15580 /* Override any gcc2 internal prototype to avoid an error.  */
15581 #ifdef __cplusplus
15582 extern "C"
15583 #endif
15584 /* We use char because int might match the return type of a gcc2
15585    builtin and then its argument prototype would still apply.  */
15586 char strlcat ();
15587 int
15588 main (void)
15589 {
15590 strlcat ();
15591   ;
15592   return 0;
15593 }
15594 _ACEOF
15595 rm -f conftest.$ac_objext conftest$ac_exeext
15596 if { (eval echo "$as_me:15596: \"$ac_link\"") >&5
15597   (eval $ac_link) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit $ac_status); } &&
15601          { ac_try='test -s conftest$ac_exeext'
15602   { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603   (eval $ac_try) 2>&5
15604   ac_status=$?
15605   echo "$as_me:15605: \$? = $ac_status" >&5
15606   (exit $ac_status); }; }; then
15607   ac_cv_lib_bsd_strlcat=yes
15608 else
15609   echo "$as_me: failed program was:" >&5
15610 cat conftest.$ac_ext >&5
15611 ac_cv_lib_bsd_strlcat=no
15612 fi
15613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15614 LIBS=$ac_check_lib_save_LIBS
15615 fi
15616 echo "$as_me:15616: result: $ac_cv_lib_bsd_strlcat" >&5
15617 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15618 if test $ac_cv_lib_bsd_strlcat = yes; then
15619
15620 cf_add_libs="-lbsd"
15621 # Filter out duplicates - this happens with badly-designed ".pc" files...
15622 for cf_add_1lib in $LIBS
15623 do
15624         for cf_add_2lib in $cf_add_libs
15625         do
15626                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15627                 then
15628                         cf_add_1lib=
15629                         break
15630                 fi
15631         done
15632         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15633 done
15634 LIBS="$cf_add_libs"
15635
15636 for ac_header in bsd/string.h
15637 do
15638 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15639 echo "$as_me:15639: checking for $ac_header" >&5
15640 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15641 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15642   echo $ECHO_N "(cached) $ECHO_C" >&6
15643 else
15644   cat >conftest.$ac_ext <<_ACEOF
15645 #line 15645 "configure"
15646 #include "confdefs.h"
15647 #include <$ac_header>
15648 _ACEOF
15649 if { (eval echo "$as_me:15649: \"$ac_cpp conftest.$ac_ext\"") >&5
15650   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15651   ac_status=$?
15652   egrep -v '^ *\+' conftest.er1 >conftest.err
15653   rm -f conftest.er1
15654   cat conftest.err >&5
15655   echo "$as_me:15655: \$? = $ac_status" >&5
15656   (exit $ac_status); } >/dev/null; then
15657   if test -s conftest.err; then
15658     ac_cpp_err=$ac_c_preproc_warn_flag
15659   else
15660     ac_cpp_err=
15661   fi
15662 else
15663   ac_cpp_err=yes
15664 fi
15665 if test -z "$ac_cpp_err"; then
15666   eval "$as_ac_Header=yes"
15667 else
15668   echo "$as_me: failed program was:" >&5
15669   cat conftest.$ac_ext >&5
15670   eval "$as_ac_Header=no"
15671 fi
15672 rm -f conftest.err conftest.$ac_ext
15673 fi
15674 echo "$as_me:15674: result: `eval echo '${'$as_ac_Header'}'`" >&5
15675 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15676 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15677   cat >>confdefs.h <<EOF
15678 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15679 EOF
15680
15681 fi
15682 done
15683
15684 cat >>confdefs.h <<\EOF
15685 #define HAVE_STRLCAT 1
15686 EOF
15687
15688 fi
15689
15690 fi
15691
15692 for ac_func in strlcpy snprintf
15693 do
15694 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15695 echo "$as_me:15695: checking for $ac_func" >&5
15696 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15697 if eval "test \"\${$as_ac_var+set}\" = set"; then
15698   echo $ECHO_N "(cached) $ECHO_C" >&6
15699 else
15700   cat >conftest.$ac_ext <<_ACEOF
15701 #line 15701 "configure"
15702 #include "confdefs.h"
15703 #define $ac_func autoconf_temporary
15704 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15705 #undef $ac_func
15706
15707 #ifdef __cplusplus
15708 extern "C"
15709 #endif
15710
15711 /* We use char because int might match the return type of a gcc2
15712    builtin and then its argument prototype would still apply.  */
15713 char $ac_func (void);
15714
15715 int
15716 main (void)
15717 {
15718
15719 /* The GNU C library defines stubs for functions which it implements
15720     to always fail with ENOSYS.  Some functions are actually named
15721     something starting with __ and the normal name is an alias.  */
15722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15723 #error found stub for $ac_func
15724 #endif
15725
15726         return $ac_func ();
15727   ;
15728   return 0;
15729 }
15730 _ACEOF
15731 rm -f conftest.$ac_objext conftest$ac_exeext
15732 if { (eval echo "$as_me:15732: \"$ac_link\"") >&5
15733   (eval $ac_link) 2>&5
15734   ac_status=$?
15735   echo "$as_me:15735: \$? = $ac_status" >&5
15736   (exit $ac_status); } &&
15737          { ac_try='test -s conftest$ac_exeext'
15738   { (eval echo "$as_me:15738: \"$ac_try\"") >&5
15739   (eval $ac_try) 2>&5
15740   ac_status=$?
15741   echo "$as_me:15741: \$? = $ac_status" >&5
15742   (exit $ac_status); }; }; then
15743   eval "$as_ac_var=yes"
15744 else
15745   echo "$as_me: failed program was:" >&5
15746 cat conftest.$ac_ext >&5
15747 eval "$as_ac_var=no"
15748 fi
15749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15750 fi
15751 echo "$as_me:15751: result: `eval echo '${'$as_ac_var'}'`" >&5
15752 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15753 if test `eval echo '${'$as_ac_var'}'` = yes; then
15754   cat >>confdefs.h <<EOF
15755 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15756 EOF
15757
15758 fi
15759 done
15760
15761 fi
15762
15763 ###     use option --enable-assertions to turn on generation of assertion code
15764 echo "$as_me:15764: checking if you want to enable runtime assertions" >&5
15765 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15766
15767 # Check whether --enable-assertions or --disable-assertions was given.
15768 if test "${enable_assertions+set}" = set; then
15769   enableval="$enable_assertions"
15770   with_assertions=$enableval
15771 else
15772   with_assertions=no
15773 fi;
15774 echo "$as_me:15774: result: $with_assertions" >&5
15775 echo "${ECHO_T}$with_assertions" >&6
15776 if test -n "$GCC"
15777 then
15778         if test "$with_assertions" = no
15779         then
15780                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15781         else
15782
15783         ADAFLAGS="$ADAFLAGS -gnata"
15784
15785         fi
15786 fi
15787
15788 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15789
15790 echo "$as_me:15790: checking if you want to use dmalloc for testing" >&5
15791 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15792
15793 # Check whether --with-dmalloc or --without-dmalloc was given.
15794 if test "${with_dmalloc+set}" = set; then
15795   withval="$with_dmalloc"
15796
15797 cat >>confdefs.h <<EOF
15798 #define USE_DMALLOC 1
15799 EOF
15800
15801         : ${with_cflags:=-g}
15802         : ${with_no_leaks:=yes}
15803          with_dmalloc=yes
15804 else
15805   with_dmalloc=
15806 fi;
15807 echo "$as_me:15807: result: ${with_dmalloc:-no}" >&5
15808 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15809
15810 case .$with_cflags in
15811 (.*-g*)
15812         case .$CFLAGS in
15813         (.*-g*)
15814                 ;;
15815         (*)
15816
15817 cf_fix_cppflags=no
15818 cf_new_cflags=
15819 cf_new_cppflags=
15820 cf_new_extra_cppflags=
15821
15822 for cf_add_cflags in -g
15823 do
15824 case $cf_fix_cppflags in
15825 (no)
15826         case $cf_add_cflags in
15827         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15828                 case $cf_add_cflags in
15829                 (-D*)
15830                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15831
15832                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15833                                 && test -z "${cf_tst_cflags}" \
15834                                 && cf_fix_cppflags=yes
15835
15836                         if test $cf_fix_cppflags = yes ; then
15837
15838         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15839         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15840
15841                                 continue
15842                         elif test "${cf_tst_cflags}" = "\"'" ; then
15843
15844         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15845         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15846
15847                                 continue
15848                         fi
15849                         ;;
15850                 esac
15851                 case "$CPPFLAGS" in
15852                 (*$cf_add_cflags)
15853                         ;;
15854                 (*)
15855                         case $cf_add_cflags in
15856                         (-D*)
15857                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15858
15859 CPPFLAGS=`echo "$CPPFLAGS" | \
15860         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15861                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15862
15863                                 ;;
15864                         esac
15865
15866         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15867         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15868
15869                         ;;
15870                 esac
15871                 ;;
15872         (*)
15873
15874         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15875         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15876
15877                 ;;
15878         esac
15879         ;;
15880 (yes)
15881
15882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15884
15885         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15886
15887         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15888                 && test -z "${cf_tst_cflags}" \
15889                 && cf_fix_cppflags=no
15890         ;;
15891 esac
15892 done
15893
15894 if test -n "$cf_new_cflags" ; then
15895
15896         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15897         CFLAGS="${CFLAGS}$cf_new_cflags"
15898
15899 fi
15900
15901 if test -n "$cf_new_cppflags" ; then
15902
15903         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15904         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15905
15906 fi
15907
15908 if test -n "$cf_new_extra_cppflags" ; then
15909
15910         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15911         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15912
15913 fi
15914
15915                 ;;
15916         esac
15917         ;;
15918 esac
15919
15920 if test "$with_dmalloc" = yes ; then
15921         echo "$as_me:15921: checking for dmalloc.h" >&5
15922 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15923 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15924   echo $ECHO_N "(cached) $ECHO_C" >&6
15925 else
15926   cat >conftest.$ac_ext <<_ACEOF
15927 #line 15927 "configure"
15928 #include "confdefs.h"
15929 #include <dmalloc.h>
15930 _ACEOF
15931 if { (eval echo "$as_me:15931: \"$ac_cpp conftest.$ac_ext\"") >&5
15932   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15933   ac_status=$?
15934   egrep -v '^ *\+' conftest.er1 >conftest.err
15935   rm -f conftest.er1
15936   cat conftest.err >&5
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit $ac_status); } >/dev/null; then
15939   if test -s conftest.err; then
15940     ac_cpp_err=$ac_c_preproc_warn_flag
15941   else
15942     ac_cpp_err=
15943   fi
15944 else
15945   ac_cpp_err=yes
15946 fi
15947 if test -z "$ac_cpp_err"; then
15948   ac_cv_header_dmalloc_h=yes
15949 else
15950   echo "$as_me: failed program was:" >&5
15951   cat conftest.$ac_ext >&5
15952   ac_cv_header_dmalloc_h=no
15953 fi
15954 rm -f conftest.err conftest.$ac_ext
15955 fi
15956 echo "$as_me:15956: result: $ac_cv_header_dmalloc_h" >&5
15957 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15958 if test $ac_cv_header_dmalloc_h = yes; then
15959
15960 echo "$as_me:15960: checking for dmalloc_debug in -ldmalloc" >&5
15961 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15962 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15963   echo $ECHO_N "(cached) $ECHO_C" >&6
15964 else
15965   ac_check_lib_save_LIBS=$LIBS
15966 LIBS="-ldmalloc  $LIBS"
15967 cat >conftest.$ac_ext <<_ACEOF
15968 #line 15968 "configure"
15969 #include "confdefs.h"
15970
15971 /* Override any gcc2 internal prototype to avoid an error.  */
15972 #ifdef __cplusplus
15973 extern "C"
15974 #endif
15975 /* We use char because int might match the return type of a gcc2
15976    builtin and then its argument prototype would still apply.  */
15977 char dmalloc_debug ();
15978 int
15979 main (void)
15980 {
15981 dmalloc_debug ();
15982   ;
15983   return 0;
15984 }
15985 _ACEOF
15986 rm -f conftest.$ac_objext conftest$ac_exeext
15987 if { (eval echo "$as_me:15987: \"$ac_link\"") >&5
15988   (eval $ac_link) 2>&5
15989   ac_status=$?
15990   echo "$as_me:15990: \$? = $ac_status" >&5
15991   (exit $ac_status); } &&
15992          { ac_try='test -s conftest$ac_exeext'
15993   { (eval echo "$as_me:15993: \"$ac_try\"") >&5
15994   (eval $ac_try) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit $ac_status); }; }; then
15998   ac_cv_lib_dmalloc_dmalloc_debug=yes
15999 else
16000   echo "$as_me: failed program was:" >&5
16001 cat conftest.$ac_ext >&5
16002 ac_cv_lib_dmalloc_dmalloc_debug=no
16003 fi
16004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16005 LIBS=$ac_check_lib_save_LIBS
16006 fi
16007 echo "$as_me:16007: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16008 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16009 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16010   cat >>confdefs.h <<EOF
16011 #define HAVE_LIBDMALLOC 1
16012 EOF
16013
16014   LIBS="-ldmalloc $LIBS"
16015
16016 fi
16017
16018 fi
16019
16020 fi
16021
16022 echo "$as_me:16022: checking if you want to use dbmalloc for testing" >&5
16023 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16024
16025 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16026 if test "${with_dbmalloc+set}" = set; then
16027   withval="$with_dbmalloc"
16028
16029 cat >>confdefs.h <<EOF
16030 #define USE_DBMALLOC 1
16031 EOF
16032
16033         : ${with_cflags:=-g}
16034         : ${with_no_leaks:=yes}
16035          with_dbmalloc=yes
16036 else
16037   with_dbmalloc=
16038 fi;
16039 echo "$as_me:16039: result: ${with_dbmalloc:-no}" >&5
16040 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16041
16042 case .$with_cflags in
16043 (.*-g*)
16044         case .$CFLAGS in
16045         (.*-g*)
16046                 ;;
16047         (*)
16048
16049 cf_fix_cppflags=no
16050 cf_new_cflags=
16051 cf_new_cppflags=
16052 cf_new_extra_cppflags=
16053
16054 for cf_add_cflags in -g
16055 do
16056 case $cf_fix_cppflags in
16057 (no)
16058         case $cf_add_cflags in
16059         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16060                 case $cf_add_cflags in
16061                 (-D*)
16062                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16063
16064                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16065                                 && test -z "${cf_tst_cflags}" \
16066                                 && cf_fix_cppflags=yes
16067
16068                         if test $cf_fix_cppflags = yes ; then
16069
16070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16072
16073                                 continue
16074                         elif test "${cf_tst_cflags}" = "\"'" ; then
16075
16076         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16077         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16078
16079                                 continue
16080                         fi
16081                         ;;
16082                 esac
16083                 case "$CPPFLAGS" in
16084                 (*$cf_add_cflags)
16085                         ;;
16086                 (*)
16087                         case $cf_add_cflags in
16088                         (-D*)
16089                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16090
16091 CPPFLAGS=`echo "$CPPFLAGS" | \
16092         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16093                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16094
16095                                 ;;
16096                         esac
16097
16098         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16099         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16100
16101                         ;;
16102                 esac
16103                 ;;
16104         (*)
16105
16106         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16107         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16108
16109                 ;;
16110         esac
16111         ;;
16112 (yes)
16113
16114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16116
16117         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16118
16119         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16120                 && test -z "${cf_tst_cflags}" \
16121                 && cf_fix_cppflags=no
16122         ;;
16123 esac
16124 done
16125
16126 if test -n "$cf_new_cflags" ; then
16127
16128         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16129         CFLAGS="${CFLAGS}$cf_new_cflags"
16130
16131 fi
16132
16133 if test -n "$cf_new_cppflags" ; then
16134
16135         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16136         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16137
16138 fi
16139
16140 if test -n "$cf_new_extra_cppflags" ; then
16141
16142         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16143         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16144
16145 fi
16146
16147                 ;;
16148         esac
16149         ;;
16150 esac
16151
16152 if test "$with_dbmalloc" = yes ; then
16153         echo "$as_me:16153: checking for dbmalloc.h" >&5
16154 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16155 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16156   echo $ECHO_N "(cached) $ECHO_C" >&6
16157 else
16158   cat >conftest.$ac_ext <<_ACEOF
16159 #line 16159 "configure"
16160 #include "confdefs.h"
16161 #include <dbmalloc.h>
16162 _ACEOF
16163 if { (eval echo "$as_me:16163: \"$ac_cpp conftest.$ac_ext\"") >&5
16164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16165   ac_status=$?
16166   egrep -v '^ *\+' conftest.er1 >conftest.err
16167   rm -f conftest.er1
16168   cat conftest.err >&5
16169   echo "$as_me:16169: \$? = $ac_status" >&5
16170   (exit $ac_status); } >/dev/null; then
16171   if test -s conftest.err; then
16172     ac_cpp_err=$ac_c_preproc_warn_flag
16173   else
16174     ac_cpp_err=
16175   fi
16176 else
16177   ac_cpp_err=yes
16178 fi
16179 if test -z "$ac_cpp_err"; then
16180   ac_cv_header_dbmalloc_h=yes
16181 else
16182   echo "$as_me: failed program was:" >&5
16183   cat conftest.$ac_ext >&5
16184   ac_cv_header_dbmalloc_h=no
16185 fi
16186 rm -f conftest.err conftest.$ac_ext
16187 fi
16188 echo "$as_me:16188: result: $ac_cv_header_dbmalloc_h" >&5
16189 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16190 if test $ac_cv_header_dbmalloc_h = yes; then
16191
16192 echo "$as_me:16192: checking for debug_malloc in -ldbmalloc" >&5
16193 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16194 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16195   echo $ECHO_N "(cached) $ECHO_C" >&6
16196 else
16197   ac_check_lib_save_LIBS=$LIBS
16198 LIBS="-ldbmalloc  $LIBS"
16199 cat >conftest.$ac_ext <<_ACEOF
16200 #line 16200 "configure"
16201 #include "confdefs.h"
16202
16203 /* Override any gcc2 internal prototype to avoid an error.  */
16204 #ifdef __cplusplus
16205 extern "C"
16206 #endif
16207 /* We use char because int might match the return type of a gcc2
16208    builtin and then its argument prototype would still apply.  */
16209 char debug_malloc ();
16210 int
16211 main (void)
16212 {
16213 debug_malloc ();
16214   ;
16215   return 0;
16216 }
16217 _ACEOF
16218 rm -f conftest.$ac_objext conftest$ac_exeext
16219 if { (eval echo "$as_me:16219: \"$ac_link\"") >&5
16220   (eval $ac_link) 2>&5
16221   ac_status=$?
16222   echo "$as_me:16222: \$? = $ac_status" >&5
16223   (exit $ac_status); } &&
16224          { ac_try='test -s conftest$ac_exeext'
16225   { (eval echo "$as_me:16225: \"$ac_try\"") >&5
16226   (eval $ac_try) 2>&5
16227   ac_status=$?
16228   echo "$as_me:16228: \$? = $ac_status" >&5
16229   (exit $ac_status); }; }; then
16230   ac_cv_lib_dbmalloc_debug_malloc=yes
16231 else
16232   echo "$as_me: failed program was:" >&5
16233 cat conftest.$ac_ext >&5
16234 ac_cv_lib_dbmalloc_debug_malloc=no
16235 fi
16236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16237 LIBS=$ac_check_lib_save_LIBS
16238 fi
16239 echo "$as_me:16239: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16240 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16241 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16242   cat >>confdefs.h <<EOF
16243 #define HAVE_LIBDBMALLOC 1
16244 EOF
16245
16246   LIBS="-ldbmalloc $LIBS"
16247
16248 fi
16249
16250 fi
16251
16252 fi
16253
16254 echo "$as_me:16254: checking if you want to use valgrind for testing" >&5
16255 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16256
16257 # Check whether --with-valgrind or --without-valgrind was given.
16258 if test "${with_valgrind+set}" = set; then
16259   withval="$with_valgrind"
16260
16261 cat >>confdefs.h <<EOF
16262 #define USE_VALGRIND 1
16263 EOF
16264
16265         : ${with_cflags:=-g}
16266         : ${with_no_leaks:=yes}
16267          with_valgrind=yes
16268 else
16269   with_valgrind=
16270 fi;
16271 echo "$as_me:16271: result: ${with_valgrind:-no}" >&5
16272 echo "${ECHO_T}${with_valgrind:-no}" >&6
16273
16274 case .$with_cflags in
16275 (.*-g*)
16276         case .$CFLAGS in
16277         (.*-g*)
16278                 ;;
16279         (*)
16280
16281 cf_fix_cppflags=no
16282 cf_new_cflags=
16283 cf_new_cppflags=
16284 cf_new_extra_cppflags=
16285
16286 for cf_add_cflags in -g
16287 do
16288 case $cf_fix_cppflags in
16289 (no)
16290         case $cf_add_cflags in
16291         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16292                 case $cf_add_cflags in
16293                 (-D*)
16294                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16295
16296                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16297                                 && test -z "${cf_tst_cflags}" \
16298                                 && cf_fix_cppflags=yes
16299
16300                         if test $cf_fix_cppflags = yes ; then
16301
16302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16304
16305                                 continue
16306                         elif test "${cf_tst_cflags}" = "\"'" ; then
16307
16308         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16309         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16310
16311                                 continue
16312                         fi
16313                         ;;
16314                 esac
16315                 case "$CPPFLAGS" in
16316                 (*$cf_add_cflags)
16317                         ;;
16318                 (*)
16319                         case $cf_add_cflags in
16320                         (-D*)
16321                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16322
16323 CPPFLAGS=`echo "$CPPFLAGS" | \
16324         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16325                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16326
16327                                 ;;
16328                         esac
16329
16330         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16331         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16332
16333                         ;;
16334                 esac
16335                 ;;
16336         (*)
16337
16338         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16339         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16340
16341                 ;;
16342         esac
16343         ;;
16344 (yes)
16345
16346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16348
16349         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16350
16351         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16352                 && test -z "${cf_tst_cflags}" \
16353                 && cf_fix_cppflags=no
16354         ;;
16355 esac
16356 done
16357
16358 if test -n "$cf_new_cflags" ; then
16359
16360         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16361         CFLAGS="${CFLAGS}$cf_new_cflags"
16362
16363 fi
16364
16365 if test -n "$cf_new_cppflags" ; then
16366
16367         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16368         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16369
16370 fi
16371
16372 if test -n "$cf_new_extra_cppflags" ; then
16373
16374         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16375         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16376
16377 fi
16378
16379                 ;;
16380         esac
16381         ;;
16382 esac
16383
16384 echo "$as_me:16384: checking if you want to perform memory-leak testing" >&5
16385 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16386
16387 # Check whether --enable-leaks or --disable-leaks was given.
16388 if test "${enable_leaks+set}" = set; then
16389   enableval="$enable_leaks"
16390   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16391 else
16392   : ${with_no_leaks:=no}
16393 fi;
16394 echo "$as_me:16394: result: $with_no_leaks" >&5
16395 echo "${ECHO_T}$with_no_leaks" >&6
16396
16397 if test "$with_no_leaks" = yes ; then
16398
16399 cat >>confdefs.h <<\EOF
16400 #define NO_LEAKS 1
16401 EOF
16402
16403 cat >>confdefs.h <<\EOF
16404 #define YY_NO_LEAKS 1
16405 EOF
16406
16407 fi
16408
16409 cat >>confdefs.h <<\EOF
16410 #define HAVE_NC_ALLOC_H 1
16411 EOF
16412
16413 ###     use option --enable-expanded to generate certain macros as functions
16414
16415 # Check whether --enable-expanded or --disable-expanded was given.
16416 if test "${enable_expanded+set}" = set; then
16417   enableval="$enable_expanded"
16418   test "x$enableval" = xyes &&
16419 cat >>confdefs.h <<\EOF
16420 #define NCURSES_EXPANDED 1
16421 EOF
16422
16423 fi;
16424
16425 ###     use option --disable-macros to suppress macros in favor of functions
16426
16427 # Check whether --enable-macros or --disable-macros was given.
16428 if test "${enable_macros+set}" = set; then
16429   enableval="$enable_macros"
16430   test "$enableval" = no &&
16431 cat >>confdefs.h <<\EOF
16432 #define NCURSES_NOMACROS 1
16433 EOF
16434
16435 fi;
16436
16437 # Normally we only add trace() to the debug-library.  Allow this to be
16438 # extended to all models of the ncurses library:
16439 cf_all_traces=no
16440 case "$CFLAGS $CPPFLAGS" in
16441 (*-DTRACE*)
16442         cf_all_traces=yes
16443         ;;
16444 esac
16445
16446 echo "$as_me:16446: checking whether to add trace feature to all models" >&5
16447 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16448
16449 # Check whether --with-trace or --without-trace was given.
16450 if test "${with_trace+set}" = set; then
16451   withval="$with_trace"
16452   cf_with_trace=$withval
16453 else
16454   cf_with_trace=$cf_all_traces
16455 fi;
16456 echo "$as_me:16456: result: $cf_with_trace" >&5
16457 echo "${ECHO_T}$cf_with_trace" >&6
16458
16459 if test "x$cf_with_trace" = xyes ; then
16460         LIB_TRACING=all
16461         ADA_TRACE=TRUE
16462
16463 cf_fix_cppflags=no
16464 cf_new_cflags=
16465 cf_new_cppflags=
16466 cf_new_extra_cppflags=
16467
16468 for cf_add_cflags in -DTRACE
16469 do
16470 case $cf_fix_cppflags in
16471 (no)
16472         case $cf_add_cflags in
16473         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16474                 case $cf_add_cflags in
16475                 (-D*)
16476                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16477
16478                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16479                                 && test -z "${cf_tst_cflags}" \
16480                                 && cf_fix_cppflags=yes
16481
16482                         if test $cf_fix_cppflags = yes ; then
16483
16484         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16485         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16486
16487                                 continue
16488                         elif test "${cf_tst_cflags}" = "\"'" ; then
16489
16490         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16491         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16492
16493                                 continue
16494                         fi
16495                         ;;
16496                 esac
16497                 case "$CPPFLAGS" in
16498                 (*$cf_add_cflags)
16499                         ;;
16500                 (*)
16501                         case $cf_add_cflags in
16502                         (-D*)
16503                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16504
16505 CPPFLAGS=`echo "$CPPFLAGS" | \
16506         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16507                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16508
16509                                 ;;
16510                         esac
16511
16512         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16513         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16514
16515                         ;;
16516                 esac
16517                 ;;
16518         (*)
16519
16520         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16521         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16522
16523                 ;;
16524         esac
16525         ;;
16526 (yes)
16527
16528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16530
16531         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16532
16533         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16534                 && test -z "${cf_tst_cflags}" \
16535                 && cf_fix_cppflags=no
16536         ;;
16537 esac
16538 done
16539
16540 if test -n "$cf_new_cflags" ; then
16541
16542         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16543         CFLAGS="${CFLAGS}$cf_new_cflags"
16544
16545 fi
16546
16547 if test -n "$cf_new_cppflags" ; then
16548
16549         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16550         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16551
16552 fi
16553
16554 if test -n "$cf_new_extra_cppflags" ; then
16555
16556         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16557         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16558
16559 fi
16560
16561 cat >>confdefs.h <<\EOF
16562 #define HAVE__TRACEF 1
16563 EOF
16564
16565 else
16566         LIB_TRACING=DEBUG
16567         ADA_TRACE=FALSE
16568 fi
16569
16570 echo "$as_me:16570: checking if we want to use GNAT projects" >&5
16571 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16572
16573 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16574 if test "${enable_gnat_projects+set}" = set; then
16575   enableval="$enable_gnat_projects"
16576   test "$enableval" != no && enableval=yes
16577         if test "$enableval" != "yes" ; then
16578     enable_gnat_projects=no
16579         else
16580                 enable_gnat_projects=yes
16581         fi
16582 else
16583   enableval=yes
16584         enable_gnat_projects=yes
16585
16586 fi;
16587 echo "$as_me:16587: result: $enable_gnat_projects" >&5
16588 echo "${ECHO_T}$enable_gnat_projects" >&6
16589
16590 ###     Checks for libraries.
16591 case $cf_cv_system_name in
16592 (*mingw32*|*mingw64*)
16593         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16594         LIBS=" -lpsapi $LIBS"
16595         ;;
16596 (*)
16597 echo "$as_me:16597: checking for gettimeofday" >&5
16598 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16599 if test "${ac_cv_func_gettimeofday+set}" = set; then
16600   echo $ECHO_N "(cached) $ECHO_C" >&6
16601 else
16602   cat >conftest.$ac_ext <<_ACEOF
16603 #line 16603 "configure"
16604 #include "confdefs.h"
16605 #define gettimeofday autoconf_temporary
16606 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16607 #undef gettimeofday
16608
16609 #ifdef __cplusplus
16610 extern "C"
16611 #endif
16612
16613 /* We use char because int might match the return type of a gcc2
16614    builtin and then its argument prototype would still apply.  */
16615 char gettimeofday (void);
16616
16617 int
16618 main (void)
16619 {
16620
16621 /* The GNU C library defines stubs for functions which it implements
16622     to always fail with ENOSYS.  Some functions are actually named
16623     something starting with __ and the normal name is an alias.  */
16624 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16625 #error found stub for gettimeofday
16626 #endif
16627
16628         return gettimeofday ();
16629   ;
16630   return 0;
16631 }
16632 _ACEOF
16633 rm -f conftest.$ac_objext conftest$ac_exeext
16634 if { (eval echo "$as_me:16634: \"$ac_link\"") >&5
16635   (eval $ac_link) 2>&5
16636   ac_status=$?
16637   echo "$as_me:16637: \$? = $ac_status" >&5
16638   (exit $ac_status); } &&
16639          { ac_try='test -s conftest$ac_exeext'
16640   { (eval echo "$as_me:16640: \"$ac_try\"") >&5
16641   (eval $ac_try) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); }; }; then
16645   ac_cv_func_gettimeofday=yes
16646 else
16647   echo "$as_me: failed program was:" >&5
16648 cat conftest.$ac_ext >&5
16649 ac_cv_func_gettimeofday=no
16650 fi
16651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16652 fi
16653 echo "$as_me:16653: result: $ac_cv_func_gettimeofday" >&5
16654 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16655 if test $ac_cv_func_gettimeofday = yes; then
16656
16657 cat >>confdefs.h <<\EOF
16658 #define HAVE_GETTIMEOFDAY 1
16659 EOF
16660
16661 else
16662
16663 echo "$as_me:16663: checking for gettimeofday in -lbsd" >&5
16664 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16665 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16666   echo $ECHO_N "(cached) $ECHO_C" >&6
16667 else
16668   ac_check_lib_save_LIBS=$LIBS
16669 LIBS="-lbsd  $LIBS"
16670 cat >conftest.$ac_ext <<_ACEOF
16671 #line 16671 "configure"
16672 #include "confdefs.h"
16673
16674 /* Override any gcc2 internal prototype to avoid an error.  */
16675 #ifdef __cplusplus
16676 extern "C"
16677 #endif
16678 /* We use char because int might match the return type of a gcc2
16679    builtin and then its argument prototype would still apply.  */
16680 char gettimeofday ();
16681 int
16682 main (void)
16683 {
16684 gettimeofday ();
16685   ;
16686   return 0;
16687 }
16688 _ACEOF
16689 rm -f conftest.$ac_objext conftest$ac_exeext
16690 if { (eval echo "$as_me:16690: \"$ac_link\"") >&5
16691   (eval $ac_link) 2>&5
16692   ac_status=$?
16693   echo "$as_me:16693: \$? = $ac_status" >&5
16694   (exit $ac_status); } &&
16695          { ac_try='test -s conftest$ac_exeext'
16696   { (eval echo "$as_me:16696: \"$ac_try\"") >&5
16697   (eval $ac_try) 2>&5
16698   ac_status=$?
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); }; }; then
16701   ac_cv_lib_bsd_gettimeofday=yes
16702 else
16703   echo "$as_me: failed program was:" >&5
16704 cat conftest.$ac_ext >&5
16705 ac_cv_lib_bsd_gettimeofday=no
16706 fi
16707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16708 LIBS=$ac_check_lib_save_LIBS
16709 fi
16710 echo "$as_me:16710: result: $ac_cv_lib_bsd_gettimeofday" >&5
16711 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16712 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16713
16714 cat >>confdefs.h <<\EOF
16715 #define HAVE_GETTIMEOFDAY 1
16716 EOF
16717
16718 cf_add_libs="-lbsd"
16719 # Filter out duplicates - this happens with badly-designed ".pc" files...
16720 for cf_add_1lib in $LIBS
16721 do
16722         for cf_add_2lib in $cf_add_libs
16723         do
16724                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16725                 then
16726                         cf_add_1lib=
16727                         break
16728                 fi
16729         done
16730         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16731 done
16732 LIBS="$cf_add_libs"
16733
16734 fi
16735
16736 fi
16737         ;;
16738 esac
16739
16740 echo "$as_me:16740: checking if -lm needed for math functions" >&5
16741 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16742 if test "${cf_cv_need_libm+set}" = set; then
16743   echo $ECHO_N "(cached) $ECHO_C" >&6
16744 else
16745
16746         cat >conftest.$ac_ext <<_ACEOF
16747 #line 16747 "configure"
16748 #include "confdefs.h"
16749
16750         #include <stdio.h>
16751         #include <stdlib.h>
16752         #include <math.h>
16753
16754 int
16755 main (void)
16756 {
16757 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16758   ;
16759   return 0;
16760 }
16761 _ACEOF
16762 rm -f conftest.$ac_objext conftest$ac_exeext
16763 if { (eval echo "$as_me:16763: \"$ac_link\"") >&5
16764   (eval $ac_link) 2>&5
16765   ac_status=$?
16766   echo "$as_me:16766: \$? = $ac_status" >&5
16767   (exit $ac_status); } &&
16768          { ac_try='test -s conftest$ac_exeext'
16769   { (eval echo "$as_me:16769: \"$ac_try\"") >&5
16770   (eval $ac_try) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); }; }; then
16774   cf_cv_need_libm=no
16775 else
16776   echo "$as_me: failed program was:" >&5
16777 cat conftest.$ac_ext >&5
16778 cf_cv_need_libm=yes
16779 fi
16780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16781 fi
16782 echo "$as_me:16782: result: $cf_cv_need_libm" >&5
16783 echo "${ECHO_T}$cf_cv_need_libm" >&6
16784 if test "$cf_cv_need_libm" = yes
16785 then
16786 MATH_LIB=-lm
16787 fi
16788
16789 ###     Checks for header files.
16790 echo "$as_me:16790: checking for ANSI C header files" >&5
16791 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16792 if test "${ac_cv_header_stdc+set}" = set; then
16793   echo $ECHO_N "(cached) $ECHO_C" >&6
16794 else
16795   cat >conftest.$ac_ext <<_ACEOF
16796 #line 16796 "configure"
16797 #include "confdefs.h"
16798 #include <stdlib.h>
16799 #include <stdarg.h>
16800 #include <string.h>
16801 #include <float.h>
16802
16803 _ACEOF
16804 if { (eval echo "$as_me:16804: \"$ac_cpp conftest.$ac_ext\"") >&5
16805   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16806   ac_status=$?
16807   egrep -v '^ *\+' conftest.er1 >conftest.err
16808   rm -f conftest.er1
16809   cat conftest.err >&5
16810   echo "$as_me:16810: \$? = $ac_status" >&5
16811   (exit $ac_status); } >/dev/null; then
16812   if test -s conftest.err; then
16813     ac_cpp_err=$ac_c_preproc_warn_flag
16814   else
16815     ac_cpp_err=
16816   fi
16817 else
16818   ac_cpp_err=yes
16819 fi
16820 if test -z "$ac_cpp_err"; then
16821   ac_cv_header_stdc=yes
16822 else
16823   echo "$as_me: failed program was:" >&5
16824   cat conftest.$ac_ext >&5
16825   ac_cv_header_stdc=no
16826 fi
16827 rm -f conftest.err conftest.$ac_ext
16828
16829 if test $ac_cv_header_stdc = yes; then
16830   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16831   cat >conftest.$ac_ext <<_ACEOF
16832 #line 16832 "configure"
16833 #include "confdefs.h"
16834 #include <string.h>
16835
16836 _ACEOF
16837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16838   egrep "memchr" >/dev/null 2>&1; then
16839   :
16840 else
16841   ac_cv_header_stdc=no
16842 fi
16843 rm -rf conftest*
16844
16845 fi
16846
16847 if test $ac_cv_header_stdc = yes; then
16848   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16849   cat >conftest.$ac_ext <<_ACEOF
16850 #line 16850 "configure"
16851 #include "confdefs.h"
16852 #include <stdlib.h>
16853
16854 _ACEOF
16855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16856   egrep "free" >/dev/null 2>&1; then
16857   :
16858 else
16859   ac_cv_header_stdc=no
16860 fi
16861 rm -rf conftest*
16862
16863 fi
16864
16865 if test $ac_cv_header_stdc = yes; then
16866   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16867   if test "$cross_compiling" = yes; then
16868   :
16869 else
16870   cat >conftest.$ac_ext <<_ACEOF
16871 #line 16871 "configure"
16872 #include "confdefs.h"
16873 #include <ctype.h>
16874 #if ((' ' & 0x0FF) == 0x020)
16875 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16876 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16877 #else
16878 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16879                      || ('j' <= (c) && (c) <= 'r') \
16880                      || ('s' <= (c) && (c) <= 'z'))
16881 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16882 #endif
16883
16884 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16885 int
16886 main (void)
16887 {
16888   int i;
16889   for (i = 0; i < 256; i++)
16890     if (XOR (islower (i), ISLOWER (i))
16891         || toupper (i) != TOUPPER (i))
16892       $ac_main_return(2);
16893   $ac_main_return (0);
16894 }
16895 _ACEOF
16896 rm -f conftest$ac_exeext
16897 if { (eval echo "$as_me:16897: \"$ac_link\"") >&5
16898   (eval $ac_link) 2>&5
16899   ac_status=$?
16900   echo "$as_me:16900: \$? = $ac_status" >&5
16901   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16902   { (eval echo "$as_me:16902: \"$ac_try\"") >&5
16903   (eval $ac_try) 2>&5
16904   ac_status=$?
16905   echo "$as_me:16905: \$? = $ac_status" >&5
16906   (exit $ac_status); }; }; then
16907   :
16908 else
16909   echo "$as_me: program exited with status $ac_status" >&5
16910 echo "$as_me: failed program was:" >&5
16911 cat conftest.$ac_ext >&5
16912 ac_cv_header_stdc=no
16913 fi
16914 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16915 fi
16916 fi
16917 fi
16918 echo "$as_me:16918: result: $ac_cv_header_stdc" >&5
16919 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16920 if test $ac_cv_header_stdc = yes; then
16921
16922 cat >>confdefs.h <<\EOF
16923 #define STDC_HEADERS 1
16924 EOF
16925
16926 fi
16927
16928 ac_header_dirent=no
16929 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16930   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16931 echo "$as_me:16931: checking for $ac_hdr that defines DIR" >&5
16932 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16933 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16934   echo $ECHO_N "(cached) $ECHO_C" >&6
16935 else
16936   cat >conftest.$ac_ext <<_ACEOF
16937 #line 16937 "configure"
16938 #include "confdefs.h"
16939 #include <sys/types.h>
16940 #include <$ac_hdr>
16941
16942 int
16943 main (void)
16944 {
16945 if ((DIR *) 0)
16946 return 0;
16947   ;
16948   return 0;
16949 }
16950 _ACEOF
16951 rm -f conftest.$ac_objext
16952 if { (eval echo "$as_me:16952: \"$ac_compile\"") >&5
16953   (eval $ac_compile) 2>&5
16954   ac_status=$?
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit $ac_status); } &&
16957          { ac_try='test -s conftest.$ac_objext'
16958   { (eval echo "$as_me:16958: \"$ac_try\"") >&5
16959   (eval $ac_try) 2>&5
16960   ac_status=$?
16961   echo "$as_me:16961: \$? = $ac_status" >&5
16962   (exit $ac_status); }; }; then
16963   eval "$as_ac_Header=yes"
16964 else
16965   echo "$as_me: failed program was:" >&5
16966 cat conftest.$ac_ext >&5
16967 eval "$as_ac_Header=no"
16968 fi
16969 rm -f conftest.$ac_objext conftest.$ac_ext
16970 fi
16971 echo "$as_me:16971: result: `eval echo '${'$as_ac_Header'}'`" >&5
16972 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16973 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16974   cat >>confdefs.h <<EOF
16975 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16976 EOF
16977
16978 ac_header_dirent=$ac_hdr; break
16979 fi
16980
16981 done
16982 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16983 if test $ac_header_dirent = dirent.h; then
16984   echo "$as_me:16984: checking for opendir in -ldir" >&5
16985 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16986 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16987   echo $ECHO_N "(cached) $ECHO_C" >&6
16988 else
16989   ac_check_lib_save_LIBS=$LIBS
16990 LIBS="-ldir  $LIBS"
16991 cat >conftest.$ac_ext <<_ACEOF
16992 #line 16992 "configure"
16993 #include "confdefs.h"
16994
16995 /* Override any gcc2 internal prototype to avoid an error.  */
16996 #ifdef __cplusplus
16997 extern "C"
16998 #endif
16999 /* We use char because int might match the return type of a gcc2
17000    builtin and then its argument prototype would still apply.  */
17001 char opendir ();
17002 int
17003 main (void)
17004 {
17005 opendir ();
17006   ;
17007   return 0;
17008 }
17009 _ACEOF
17010 rm -f conftest.$ac_objext conftest$ac_exeext
17011 if { (eval echo "$as_me:17011: \"$ac_link\"") >&5
17012   (eval $ac_link) 2>&5
17013   ac_status=$?
17014   echo "$as_me:17014: \$? = $ac_status" >&5
17015   (exit $ac_status); } &&
17016          { ac_try='test -s conftest$ac_exeext'
17017   { (eval echo "$as_me:17017: \"$ac_try\"") >&5
17018   (eval $ac_try) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit $ac_status); }; }; then
17022   ac_cv_lib_dir_opendir=yes
17023 else
17024   echo "$as_me: failed program was:" >&5
17025 cat conftest.$ac_ext >&5
17026 ac_cv_lib_dir_opendir=no
17027 fi
17028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17029 LIBS=$ac_check_lib_save_LIBS
17030 fi
17031 echo "$as_me:17031: result: $ac_cv_lib_dir_opendir" >&5
17032 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17033 if test $ac_cv_lib_dir_opendir = yes; then
17034   LIBS="$LIBS -ldir"
17035 fi
17036
17037 else
17038   echo "$as_me:17038: checking for opendir in -lx" >&5
17039 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17040 if test "${ac_cv_lib_x_opendir+set}" = set; then
17041   echo $ECHO_N "(cached) $ECHO_C" >&6
17042 else
17043   ac_check_lib_save_LIBS=$LIBS
17044 LIBS="-lx  $LIBS"
17045 cat >conftest.$ac_ext <<_ACEOF
17046 #line 17046 "configure"
17047 #include "confdefs.h"
17048
17049 /* Override any gcc2 internal prototype to avoid an error.  */
17050 #ifdef __cplusplus
17051 extern "C"
17052 #endif
17053 /* We use char because int might match the return type of a gcc2
17054    builtin and then its argument prototype would still apply.  */
17055 char opendir ();
17056 int
17057 main (void)
17058 {
17059 opendir ();
17060   ;
17061   return 0;
17062 }
17063 _ACEOF
17064 rm -f conftest.$ac_objext conftest$ac_exeext
17065 if { (eval echo "$as_me:17065: \"$ac_link\"") >&5
17066   (eval $ac_link) 2>&5
17067   ac_status=$?
17068   echo "$as_me:17068: \$? = $ac_status" >&5
17069   (exit $ac_status); } &&
17070          { ac_try='test -s conftest$ac_exeext'
17071   { (eval echo "$as_me:17071: \"$ac_try\"") >&5
17072   (eval $ac_try) 2>&5
17073   ac_status=$?
17074   echo "$as_me:17074: \$? = $ac_status" >&5
17075   (exit $ac_status); }; }; then
17076   ac_cv_lib_x_opendir=yes
17077 else
17078   echo "$as_me: failed program was:" >&5
17079 cat conftest.$ac_ext >&5
17080 ac_cv_lib_x_opendir=no
17081 fi
17082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17083 LIBS=$ac_check_lib_save_LIBS
17084 fi
17085 echo "$as_me:17085: result: $ac_cv_lib_x_opendir" >&5
17086 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17087 if test $ac_cv_lib_x_opendir = yes; then
17088   LIBS="$LIBS -lx"
17089 fi
17090
17091 fi
17092
17093 echo "$as_me:17093: checking whether time.h and sys/time.h may both be included" >&5
17094 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17095 if test "${ac_cv_header_time+set}" = set; then
17096   echo $ECHO_N "(cached) $ECHO_C" >&6
17097 else
17098   cat >conftest.$ac_ext <<_ACEOF
17099 #line 17099 "configure"
17100 #include "confdefs.h"
17101 #include <sys/types.h>
17102 #include <sys/time.h>
17103 #include <time.h>
17104
17105 int
17106 main (void)
17107 {
17108 if ((struct tm *) 0)
17109 return 0;
17110   ;
17111   return 0;
17112 }
17113 _ACEOF
17114 rm -f conftest.$ac_objext
17115 if { (eval echo "$as_me:17115: \"$ac_compile\"") >&5
17116   (eval $ac_compile) 2>&5
17117   ac_status=$?
17118   echo "$as_me:17118: \$? = $ac_status" >&5
17119   (exit $ac_status); } &&
17120          { ac_try='test -s conftest.$ac_objext'
17121   { (eval echo "$as_me:17121: \"$ac_try\"") >&5
17122   (eval $ac_try) 2>&5
17123   ac_status=$?
17124   echo "$as_me:17124: \$? = $ac_status" >&5
17125   (exit $ac_status); }; }; then
17126   ac_cv_header_time=yes
17127 else
17128   echo "$as_me: failed program was:" >&5
17129 cat conftest.$ac_ext >&5
17130 ac_cv_header_time=no
17131 fi
17132 rm -f conftest.$ac_objext conftest.$ac_ext
17133 fi
17134 echo "$as_me:17134: result: $ac_cv_header_time" >&5
17135 echo "${ECHO_T}$ac_cv_header_time" >&6
17136 if test $ac_cv_header_time = yes; then
17137
17138 cat >>confdefs.h <<\EOF
17139 #define TIME_WITH_SYS_TIME 1
17140 EOF
17141
17142 fi
17143
17144 cf_regex_func=no
17145
17146 cf_regex_libs="regex re"
17147 case $host_os in
17148 (mingw*)
17149         cf_regex_libs="gnurx $cf_regex_libs"
17150         ;;
17151 esac
17152
17153 echo "$as_me:17153: checking for regcomp" >&5
17154 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17155 if test "${ac_cv_func_regcomp+set}" = set; then
17156   echo $ECHO_N "(cached) $ECHO_C" >&6
17157 else
17158   cat >conftest.$ac_ext <<_ACEOF
17159 #line 17159 "configure"
17160 #include "confdefs.h"
17161 #define regcomp autoconf_temporary
17162 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17163 #undef regcomp
17164
17165 #ifdef __cplusplus
17166 extern "C"
17167 #endif
17168
17169 /* We use char because int might match the return type of a gcc2
17170    builtin and then its argument prototype would still apply.  */
17171 char regcomp (void);
17172
17173 int
17174 main (void)
17175 {
17176
17177 /* The GNU C library defines stubs for functions which it implements
17178     to always fail with ENOSYS.  Some functions are actually named
17179     something starting with __ and the normal name is an alias.  */
17180 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17181 #error found stub for regcomp
17182 #endif
17183
17184         return regcomp ();
17185   ;
17186   return 0;
17187 }
17188 _ACEOF
17189 rm -f conftest.$ac_objext conftest$ac_exeext
17190 if { (eval echo "$as_me:17190: \"$ac_link\"") >&5
17191   (eval $ac_link) 2>&5
17192   ac_status=$?
17193   echo "$as_me:17193: \$? = $ac_status" >&5
17194   (exit $ac_status); } &&
17195          { ac_try='test -s conftest$ac_exeext'
17196   { (eval echo "$as_me:17196: \"$ac_try\"") >&5
17197   (eval $ac_try) 2>&5
17198   ac_status=$?
17199   echo "$as_me:17199: \$? = $ac_status" >&5
17200   (exit $ac_status); }; }; then
17201   ac_cv_func_regcomp=yes
17202 else
17203   echo "$as_me: failed program was:" >&5
17204 cat conftest.$ac_ext >&5
17205 ac_cv_func_regcomp=no
17206 fi
17207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17208 fi
17209 echo "$as_me:17209: result: $ac_cv_func_regcomp" >&5
17210 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17211 if test $ac_cv_func_regcomp = yes; then
17212   cf_regex_func=regcomp
17213 else
17214
17215         for cf_regex_lib in $cf_regex_libs
17216         do
17217                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17218 echo "$as_me:17218: checking for regcomp in -l$cf_regex_lib" >&5
17219 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17220 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17221   echo $ECHO_N "(cached) $ECHO_C" >&6
17222 else
17223   ac_check_lib_save_LIBS=$LIBS
17224 LIBS="-l$cf_regex_lib  $LIBS"
17225 cat >conftest.$ac_ext <<_ACEOF
17226 #line 17226 "configure"
17227 #include "confdefs.h"
17228
17229 /* Override any gcc2 internal prototype to avoid an error.  */
17230 #ifdef __cplusplus
17231 extern "C"
17232 #endif
17233 /* We use char because int might match the return type of a gcc2
17234    builtin and then its argument prototype would still apply.  */
17235 char regcomp ();
17236 int
17237 main (void)
17238 {
17239 regcomp ();
17240   ;
17241   return 0;
17242 }
17243 _ACEOF
17244 rm -f conftest.$ac_objext conftest$ac_exeext
17245 if { (eval echo "$as_me:17245: \"$ac_link\"") >&5
17246   (eval $ac_link) 2>&5
17247   ac_status=$?
17248   echo "$as_me:17248: \$? = $ac_status" >&5
17249   (exit $ac_status); } &&
17250          { ac_try='test -s conftest$ac_exeext'
17251   { (eval echo "$as_me:17251: \"$ac_try\"") >&5
17252   (eval $ac_try) 2>&5
17253   ac_status=$?
17254   echo "$as_me:17254: \$? = $ac_status" >&5
17255   (exit $ac_status); }; }; then
17256   eval "$as_ac_Lib=yes"
17257 else
17258   echo "$as_me: failed program was:" >&5
17259 cat conftest.$ac_ext >&5
17260 eval "$as_ac_Lib=no"
17261 fi
17262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17263 LIBS=$ac_check_lib_save_LIBS
17264 fi
17265 echo "$as_me:17265: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17266 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17267 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17268
17269 cf_add_libs="-l$cf_regex_lib"
17270 # Filter out duplicates - this happens with badly-designed ".pc" files...
17271 for cf_add_1lib in $LIBS
17272 do
17273         for cf_add_2lib in $cf_add_libs
17274         do
17275                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17276                 then
17277                         cf_add_1lib=
17278                         break
17279                 fi
17280         done
17281         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17282 done
17283 LIBS="$cf_add_libs"
17284
17285                                 cf_regex_func=regcomp
17286                                 break
17287 fi
17288
17289         done
17290
17291 fi
17292
17293 if test "$cf_regex_func" = no ; then
17294         echo "$as_me:17294: checking for compile" >&5
17295 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17296 if test "${ac_cv_func_compile+set}" = set; then
17297   echo $ECHO_N "(cached) $ECHO_C" >&6
17298 else
17299   cat >conftest.$ac_ext <<_ACEOF
17300 #line 17300 "configure"
17301 #include "confdefs.h"
17302 #define compile autoconf_temporary
17303 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17304 #undef compile
17305
17306 #ifdef __cplusplus
17307 extern "C"
17308 #endif
17309
17310 /* We use char because int might match the return type of a gcc2
17311    builtin and then its argument prototype would still apply.  */
17312 char compile (void);
17313
17314 int
17315 main (void)
17316 {
17317
17318 /* The GNU C library defines stubs for functions which it implements
17319     to always fail with ENOSYS.  Some functions are actually named
17320     something starting with __ and the normal name is an alias.  */
17321 #if defined (__stub_compile) || defined (__stub___compile)
17322 #error found stub for compile
17323 #endif
17324
17325         return compile ();
17326   ;
17327   return 0;
17328 }
17329 _ACEOF
17330 rm -f conftest.$ac_objext conftest$ac_exeext
17331 if { (eval echo "$as_me:17331: \"$ac_link\"") >&5
17332   (eval $ac_link) 2>&5
17333   ac_status=$?
17334   echo "$as_me:17334: \$? = $ac_status" >&5
17335   (exit $ac_status); } &&
17336          { ac_try='test -s conftest$ac_exeext'
17337   { (eval echo "$as_me:17337: \"$ac_try\"") >&5
17338   (eval $ac_try) 2>&5
17339   ac_status=$?
17340   echo "$as_me:17340: \$? = $ac_status" >&5
17341   (exit $ac_status); }; }; then
17342   ac_cv_func_compile=yes
17343 else
17344   echo "$as_me: failed program was:" >&5
17345 cat conftest.$ac_ext >&5
17346 ac_cv_func_compile=no
17347 fi
17348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17349 fi
17350 echo "$as_me:17350: result: $ac_cv_func_compile" >&5
17351 echo "${ECHO_T}$ac_cv_func_compile" >&6
17352 if test $ac_cv_func_compile = yes; then
17353   cf_regex_func=compile
17354 else
17355
17356                 echo "$as_me:17356: checking for compile in -lgen" >&5
17357 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17358 if test "${ac_cv_lib_gen_compile+set}" = set; then
17359   echo $ECHO_N "(cached) $ECHO_C" >&6
17360 else
17361   ac_check_lib_save_LIBS=$LIBS
17362 LIBS="-lgen  $LIBS"
17363 cat >conftest.$ac_ext <<_ACEOF
17364 #line 17364 "configure"
17365 #include "confdefs.h"
17366
17367 /* Override any gcc2 internal prototype to avoid an error.  */
17368 #ifdef __cplusplus
17369 extern "C"
17370 #endif
17371 /* We use char because int might match the return type of a gcc2
17372    builtin and then its argument prototype would still apply.  */
17373 char compile ();
17374 int
17375 main (void)
17376 {
17377 compile ();
17378   ;
17379   return 0;
17380 }
17381 _ACEOF
17382 rm -f conftest.$ac_objext conftest$ac_exeext
17383 if { (eval echo "$as_me:17383: \"$ac_link\"") >&5
17384   (eval $ac_link) 2>&5
17385   ac_status=$?
17386   echo "$as_me:17386: \$? = $ac_status" >&5
17387   (exit $ac_status); } &&
17388          { ac_try='test -s conftest$ac_exeext'
17389   { (eval echo "$as_me:17389: \"$ac_try\"") >&5
17390   (eval $ac_try) 2>&5
17391   ac_status=$?
17392   echo "$as_me:17392: \$? = $ac_status" >&5
17393   (exit $ac_status); }; }; then
17394   ac_cv_lib_gen_compile=yes
17395 else
17396   echo "$as_me: failed program was:" >&5
17397 cat conftest.$ac_ext >&5
17398 ac_cv_lib_gen_compile=no
17399 fi
17400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17401 LIBS=$ac_check_lib_save_LIBS
17402 fi
17403 echo "$as_me:17403: result: $ac_cv_lib_gen_compile" >&5
17404 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17405 if test $ac_cv_lib_gen_compile = yes; then
17406
17407 cf_add_libs="-lgen"
17408 # Filter out duplicates - this happens with badly-designed ".pc" files...
17409 for cf_add_1lib in $LIBS
17410 do
17411         for cf_add_2lib in $cf_add_libs
17412         do
17413                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17414                 then
17415                         cf_add_1lib=
17416                         break
17417                 fi
17418         done
17419         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17420 done
17421 LIBS="$cf_add_libs"
17422
17423                                 cf_regex_func=compile
17424 fi
17425
17426 fi
17427
17428 fi
17429
17430 if test "$cf_regex_func" = no ; then
17431         { echo "$as_me:17431: WARNING: cannot find regular expression library" >&5
17432 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17433 fi
17434
17435 echo "$as_me:17435: checking for regular-expression headers" >&5
17436 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17437 if test "${cf_cv_regex_hdrs+set}" = set; then
17438   echo $ECHO_N "(cached) $ECHO_C" >&6
17439 else
17440
17441 cf_cv_regex_hdrs=no
17442 case $cf_regex_func in
17443 (compile)
17444         for cf_regex_hdr in regexp.h regexpr.h
17445         do
17446                 cat >conftest.$ac_ext <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449 #include <$cf_regex_hdr>
17450 int
17451 main (void)
17452 {
17453
17454                         char *p = compile("", "", "", 0);
17455                         int x = step("", "");
17456
17457   ;
17458   return 0;
17459 }
17460 _ACEOF
17461 rm -f conftest.$ac_objext conftest$ac_exeext
17462 if { (eval echo "$as_me:17462: \"$ac_link\"") >&5
17463   (eval $ac_link) 2>&5
17464   ac_status=$?
17465   echo "$as_me:17465: \$? = $ac_status" >&5
17466   (exit $ac_status); } &&
17467          { ac_try='test -s conftest$ac_exeext'
17468   { (eval echo "$as_me:17468: \"$ac_try\"") >&5
17469   (eval $ac_try) 2>&5
17470   ac_status=$?
17471   echo "$as_me:17471: \$? = $ac_status" >&5
17472   (exit $ac_status); }; }; then
17473
17474                         cf_cv_regex_hdrs=$cf_regex_hdr
17475                         break
17476
17477 else
17478   echo "$as_me: failed program was:" >&5
17479 cat conftest.$ac_ext >&5
17480 fi
17481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17482         done
17483         ;;
17484 (*)
17485         for cf_regex_hdr in regex.h
17486         do
17487                 cat >conftest.$ac_ext <<_ACEOF
17488 #line 17488 "configure"
17489 #include "confdefs.h"
17490 #include <sys/types.h>
17491 #include <$cf_regex_hdr>
17492 int
17493 main (void)
17494 {
17495
17496                         regex_t *p;
17497                         int x = regcomp(p, "", 0);
17498                         int y = regexec(p, "", 0, 0, 0);
17499                         regfree(p);
17500
17501   ;
17502   return 0;
17503 }
17504 _ACEOF
17505 rm -f conftest.$ac_objext conftest$ac_exeext
17506 if { (eval echo "$as_me:17506: \"$ac_link\"") >&5
17507   (eval $ac_link) 2>&5
17508   ac_status=$?
17509   echo "$as_me:17509: \$? = $ac_status" >&5
17510   (exit $ac_status); } &&
17511          { ac_try='test -s conftest$ac_exeext'
17512   { (eval echo "$as_me:17512: \"$ac_try\"") >&5
17513   (eval $ac_try) 2>&5
17514   ac_status=$?
17515   echo "$as_me:17515: \$? = $ac_status" >&5
17516   (exit $ac_status); }; }; then
17517
17518                         cf_cv_regex_hdrs=$cf_regex_hdr
17519                         break
17520
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 cat conftest.$ac_ext >&5
17524 fi
17525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17526         done
17527         ;;
17528 esac
17529
17530 fi
17531 echo "$as_me:17531: result: $cf_cv_regex_hdrs" >&5
17532 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17533
17534 case $cf_cv_regex_hdrs in
17535         (no)            { echo "$as_me:17535: WARNING: no regular expression header found" >&5
17536 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17537         (regex.h)
17538 cat >>confdefs.h <<\EOF
17539 #define HAVE_REGEX_H_FUNCS 1
17540 EOF
17541  ;;
17542         (regexp.h)
17543 cat >>confdefs.h <<\EOF
17544 #define HAVE_REGEXP_H_FUNCS 1
17545 EOF
17546  ;;
17547         (regexpr.h)
17548 cat >>confdefs.h <<\EOF
17549 #define HAVE_REGEXPR_H_FUNCS 1
17550 EOF
17551  ;;
17552 esac
17553
17554 for ac_header in \
17555 fcntl.h \
17556 getopt.h \
17557 limits.h \
17558 locale.h \
17559 math.h \
17560 poll.h \
17561 sys/bsdtypes.h \
17562 sys/ioctl.h \
17563 sys/param.h \
17564 sys/poll.h \
17565 sys/select.h \
17566 sys/time.h \
17567 sys/times.h \
17568 ttyent.h \
17569 unistd.h \
17570 wctype.h \
17571
17572 do
17573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17574 echo "$as_me:17574: checking for $ac_header" >&5
17575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17577   echo $ECHO_N "(cached) $ECHO_C" >&6
17578 else
17579   cat >conftest.$ac_ext <<_ACEOF
17580 #line 17580 "configure"
17581 #include "confdefs.h"
17582 #include <$ac_header>
17583 _ACEOF
17584 if { (eval echo "$as_me:17584: \"$ac_cpp conftest.$ac_ext\"") >&5
17585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17586   ac_status=$?
17587   egrep -v '^ *\+' conftest.er1 >conftest.err
17588   rm -f conftest.er1
17589   cat conftest.err >&5
17590   echo "$as_me:17590: \$? = $ac_status" >&5
17591   (exit $ac_status); } >/dev/null; then
17592   if test -s conftest.err; then
17593     ac_cpp_err=$ac_c_preproc_warn_flag
17594   else
17595     ac_cpp_err=
17596   fi
17597 else
17598   ac_cpp_err=yes
17599 fi
17600 if test -z "$ac_cpp_err"; then
17601   eval "$as_ac_Header=yes"
17602 else
17603   echo "$as_me: failed program was:" >&5
17604   cat conftest.$ac_ext >&5
17605   eval "$as_ac_Header=no"
17606 fi
17607 rm -f conftest.err conftest.$ac_ext
17608 fi
17609 echo "$as_me:17609: result: `eval echo '${'$as_ac_Header'}'`" >&5
17610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17612   cat >>confdefs.h <<EOF
17613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17614 EOF
17615
17616 fi
17617 done
17618
17619 for ac_header in unistd.h getopt.h
17620 do
17621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17622 echo "$as_me:17622: checking for $ac_header" >&5
17623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17625   echo $ECHO_N "(cached) $ECHO_C" >&6
17626 else
17627   cat >conftest.$ac_ext <<_ACEOF
17628 #line 17628 "configure"
17629 #include "confdefs.h"
17630 #include <$ac_header>
17631 _ACEOF
17632 if { (eval echo "$as_me:17632: \"$ac_cpp conftest.$ac_ext\"") >&5
17633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17634   ac_status=$?
17635   egrep -v '^ *\+' conftest.er1 >conftest.err
17636   rm -f conftest.er1
17637   cat conftest.err >&5
17638   echo "$as_me:17638: \$? = $ac_status" >&5
17639   (exit $ac_status); } >/dev/null; then
17640   if test -s conftest.err; then
17641     ac_cpp_err=$ac_c_preproc_warn_flag
17642   else
17643     ac_cpp_err=
17644   fi
17645 else
17646   ac_cpp_err=yes
17647 fi
17648 if test -z "$ac_cpp_err"; then
17649   eval "$as_ac_Header=yes"
17650 else
17651   echo "$as_me: failed program was:" >&5
17652   cat conftest.$ac_ext >&5
17653   eval "$as_ac_Header=no"
17654 fi
17655 rm -f conftest.err conftest.$ac_ext
17656 fi
17657 echo "$as_me:17657: result: `eval echo '${'$as_ac_Header'}'`" >&5
17658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17660   cat >>confdefs.h <<EOF
17661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17662 EOF
17663
17664 fi
17665 done
17666
17667 echo "$as_me:17667: checking for header declaring getopt variables" >&5
17668 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17669 if test "${cf_cv_getopt_header+set}" = set; then
17670   echo $ECHO_N "(cached) $ECHO_C" >&6
17671 else
17672
17673 cf_cv_getopt_header=none
17674 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17675 do
17676 cat >conftest.$ac_ext <<_ACEOF
17677 #line 17677 "configure"
17678 #include "confdefs.h"
17679
17680 #include <$cf_header>
17681 int
17682 main (void)
17683 {
17684 int x = optind; char *y = optarg
17685   ;
17686   return 0;
17687 }
17688 _ACEOF
17689 rm -f conftest.$ac_objext
17690 if { (eval echo "$as_me:17690: \"$ac_compile\"") >&5
17691   (eval $ac_compile) 2>&5
17692   ac_status=$?
17693   echo "$as_me:17693: \$? = $ac_status" >&5
17694   (exit $ac_status); } &&
17695          { ac_try='test -s conftest.$ac_objext'
17696   { (eval echo "$as_me:17696: \"$ac_try\"") >&5
17697   (eval $ac_try) 2>&5
17698   ac_status=$?
17699   echo "$as_me:17699: \$? = $ac_status" >&5
17700   (exit $ac_status); }; }; then
17701   cf_cv_getopt_header=$cf_header
17702  break
17703 else
17704   echo "$as_me: failed program was:" >&5
17705 cat conftest.$ac_ext >&5
17706 fi
17707 rm -f conftest.$ac_objext conftest.$ac_ext
17708 done
17709
17710 fi
17711 echo "$as_me:17711: result: $cf_cv_getopt_header" >&5
17712 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17713 if test $cf_cv_getopt_header != none ; then
17714
17715 cat >>confdefs.h <<\EOF
17716 #define HAVE_GETOPT_HEADER 1
17717 EOF
17718
17719 fi
17720 if test $cf_cv_getopt_header = getopt.h ; then
17721
17722 cat >>confdefs.h <<\EOF
17723 #define NEED_GETOPT_H 1
17724 EOF
17725
17726 fi
17727
17728 # check for ISC (this may also define _POSIX_SOURCE)
17729 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17730 if test "x$ISC" = xyes ; then
17731
17732 echo "$as_me:17732: checking for main in -lcposix" >&5
17733 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17734 if test "${ac_cv_lib_cposix_main+set}" = set; then
17735   echo $ECHO_N "(cached) $ECHO_C" >&6
17736 else
17737   ac_check_lib_save_LIBS=$LIBS
17738 LIBS="-lcposix  $LIBS"
17739 cat >conftest.$ac_ext <<_ACEOF
17740 #line 17740 "configure"
17741 #include "confdefs.h"
17742
17743 int
17744 main (void)
17745 {
17746 main ();
17747   ;
17748   return 0;
17749 }
17750 _ACEOF
17751 rm -f conftest.$ac_objext conftest$ac_exeext
17752 if { (eval echo "$as_me:17752: \"$ac_link\"") >&5
17753   (eval $ac_link) 2>&5
17754   ac_status=$?
17755   echo "$as_me:17755: \$? = $ac_status" >&5
17756   (exit $ac_status); } &&
17757          { ac_try='test -s conftest$ac_exeext'
17758   { (eval echo "$as_me:17758: \"$ac_try\"") >&5
17759   (eval $ac_try) 2>&5
17760   ac_status=$?
17761   echo "$as_me:17761: \$? = $ac_status" >&5
17762   (exit $ac_status); }; }; then
17763   ac_cv_lib_cposix_main=yes
17764 else
17765   echo "$as_me: failed program was:" >&5
17766 cat conftest.$ac_ext >&5
17767 ac_cv_lib_cposix_main=no
17768 fi
17769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17770 LIBS=$ac_check_lib_save_LIBS
17771 fi
17772 echo "$as_me:17772: result: $ac_cv_lib_cposix_main" >&5
17773 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17774 if test $ac_cv_lib_cposix_main = yes; then
17775   cat >>confdefs.h <<EOF
17776 #define HAVE_LIBCPOSIX 1
17777 EOF
17778
17779   LIBS="-lcposix $LIBS"
17780
17781 fi
17782
17783         echo "$as_me:17783: checking for bzero in -linet" >&5
17784 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17785 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17786   echo $ECHO_N "(cached) $ECHO_C" >&6
17787 else
17788   ac_check_lib_save_LIBS=$LIBS
17789 LIBS="-linet  $LIBS"
17790 cat >conftest.$ac_ext <<_ACEOF
17791 #line 17791 "configure"
17792 #include "confdefs.h"
17793
17794 /* Override any gcc2 internal prototype to avoid an error.  */
17795 #ifdef __cplusplus
17796 extern "C"
17797 #endif
17798 /* We use char because int might match the return type of a gcc2
17799    builtin and then its argument prototype would still apply.  */
17800 char bzero ();
17801 int
17802 main (void)
17803 {
17804 bzero ();
17805   ;
17806   return 0;
17807 }
17808 _ACEOF
17809 rm -f conftest.$ac_objext conftest$ac_exeext
17810 if { (eval echo "$as_me:17810: \"$ac_link\"") >&5
17811   (eval $ac_link) 2>&5
17812   ac_status=$?
17813   echo "$as_me:17813: \$? = $ac_status" >&5
17814   (exit $ac_status); } &&
17815          { ac_try='test -s conftest$ac_exeext'
17816   { (eval echo "$as_me:17816: \"$ac_try\"") >&5
17817   (eval $ac_try) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); }; }; then
17821   ac_cv_lib_inet_bzero=yes
17822 else
17823   echo "$as_me: failed program was:" >&5
17824 cat conftest.$ac_ext >&5
17825 ac_cv_lib_inet_bzero=no
17826 fi
17827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17828 LIBS=$ac_check_lib_save_LIBS
17829 fi
17830 echo "$as_me:17830: result: $ac_cv_lib_inet_bzero" >&5
17831 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17832 if test $ac_cv_lib_inet_bzero = yes; then
17833
17834 cf_add_libs="-linet"
17835 # Filter out duplicates - this happens with badly-designed ".pc" files...
17836 for cf_add_1lib in $LIBS
17837 do
17838         for cf_add_2lib in $cf_add_libs
17839         do
17840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17841                 then
17842                         cf_add_1lib=
17843                         break
17844                 fi
17845         done
17846         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17847 done
17848 LIBS="$cf_add_libs"
17849
17850 fi
17851 fi
17852
17853 echo "$as_me:17853: checking if sys/time.h works with sys/select.h" >&5
17854 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17855 if test "${cf_cv_sys_time_select+set}" = set; then
17856   echo $ECHO_N "(cached) $ECHO_C" >&6
17857 else
17858
17859 cat >conftest.$ac_ext <<_ACEOF
17860 #line 17860 "configure"
17861 #include "confdefs.h"
17862
17863 #include <sys/types.h>
17864 #ifdef HAVE_SYS_TIME_H
17865 #include <sys/time.h>
17866 #endif
17867 #ifdef HAVE_SYS_SELECT_H
17868 #include <sys/select.h>
17869 #endif
17870
17871 int
17872 main (void)
17873 {
17874
17875   ;
17876   return 0;
17877 }
17878 _ACEOF
17879 rm -f conftest.$ac_objext
17880 if { (eval echo "$as_me:17880: \"$ac_compile\"") >&5
17881   (eval $ac_compile) 2>&5
17882   ac_status=$?
17883   echo "$as_me:17883: \$? = $ac_status" >&5
17884   (exit $ac_status); } &&
17885          { ac_try='test -s conftest.$ac_objext'
17886   { (eval echo "$as_me:17886: \"$ac_try\"") >&5
17887   (eval $ac_try) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit $ac_status); }; }; then
17891   cf_cv_sys_time_select=yes
17892 else
17893   echo "$as_me: failed program was:" >&5
17894 cat conftest.$ac_ext >&5
17895 cf_cv_sys_time_select=no
17896 fi
17897 rm -f conftest.$ac_objext conftest.$ac_ext
17898
17899 fi
17900
17901 echo "$as_me:17901: result: $cf_cv_sys_time_select" >&5
17902 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17903 test "$cf_cv_sys_time_select" = yes &&
17904 cat >>confdefs.h <<\EOF
17905 #define HAVE_SYS_TIME_SELECT 1
17906 EOF
17907
17908 ###     checks for compiler characteristics
17909 ac_ext=c
17910 ac_cpp='$CPP $CPPFLAGS'
17911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17914 ac_main_return=return
17915
17916 echo "$as_me:17916: checking for an ANSI C-conforming const" >&5
17917 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17918 if test "${ac_cv_c_const+set}" = set; then
17919   echo $ECHO_N "(cached) $ECHO_C" >&6
17920 else
17921   cat >conftest.$ac_ext <<_ACEOF
17922 #line 17922 "configure"
17923 #include "confdefs.h"
17924
17925 int
17926 main (void)
17927 {
17928 /* FIXME: Include the comments suggested by Paul. */
17929 #ifndef __cplusplus
17930   /* Ultrix mips cc rejects this.  */
17931   typedef int charset[2];
17932   const charset x;
17933   /* SunOS 4.1.1 cc rejects this.  */
17934   char const *const *ccp;
17935   char **p;
17936   /* NEC SVR4.0.2 mips cc rejects this.  */
17937   struct point {int x, y;};
17938   static struct point const zero = {0,0};
17939   /* AIX XL C 1.02.0.0 rejects this.
17940      It does not let you subtract one const X* pointer from another in
17941      an arm of an if-expression whose if-part is not a constant
17942      expression */
17943   const char *g = "string";
17944   ccp = &g + (g ? g-g : 0);
17945   /* HPUX 7.0 cc rejects these. */
17946   ++ccp;
17947   p = (char**) ccp;
17948   ccp = (char const *const *) p;
17949   { /* SCO 3.2v4 cc rejects this.  */
17950     char *t;
17951     char const *s = 0 ? (char *) 0 : (char const *) 0;
17952
17953     *t++ = 0;
17954   }
17955   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17956     int x[] = {25, 17};
17957     const int *foo = &x[0];
17958     ++foo;
17959   }
17960   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17961     typedef const int *iptr;
17962     iptr p = 0;
17963     ++p;
17964   }
17965   { /* AIX XL C 1.02.0.0 rejects this saying
17966        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17967     struct s { int j; const int *ap[3]; };
17968     struct s *b; b->j = 5;
17969   }
17970   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17971     const int foo = 10;
17972   }
17973 #endif
17974
17975   ;
17976   return 0;
17977 }
17978 _ACEOF
17979 rm -f conftest.$ac_objext
17980 if { (eval echo "$as_me:17980: \"$ac_compile\"") >&5
17981   (eval $ac_compile) 2>&5
17982   ac_status=$?
17983   echo "$as_me:17983: \$? = $ac_status" >&5
17984   (exit $ac_status); } &&
17985          { ac_try='test -s conftest.$ac_objext'
17986   { (eval echo "$as_me:17986: \"$ac_try\"") >&5
17987   (eval $ac_try) 2>&5
17988   ac_status=$?
17989   echo "$as_me:17989: \$? = $ac_status" >&5
17990   (exit $ac_status); }; }; then
17991   ac_cv_c_const=yes
17992 else
17993   echo "$as_me: failed program was:" >&5
17994 cat conftest.$ac_ext >&5
17995 ac_cv_c_const=no
17996 fi
17997 rm -f conftest.$ac_objext conftest.$ac_ext
17998 fi
17999 echo "$as_me:17999: result: $ac_cv_c_const" >&5
18000 echo "${ECHO_T}$ac_cv_c_const" >&6
18001 if test $ac_cv_c_const = no; then
18002
18003 cat >>confdefs.h <<\EOF
18004 #define const
18005 EOF
18006
18007 fi
18008
18009 echo "$as_me:18009: checking for inline" >&5
18010 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18011 if test "${ac_cv_c_inline+set}" = set; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014   ac_cv_c_inline=no
18015 for ac_kw in inline __inline__ __inline; do
18016   cat >conftest.$ac_ext <<_ACEOF
18017 #line 18017 "configure"
18018 #include "confdefs.h"
18019 #ifndef __cplusplus
18020 static $ac_kw int static_foo () {return 0; }
18021 $ac_kw int foo () {return 0; }
18022 #endif
18023
18024 _ACEOF
18025 rm -f conftest.$ac_objext
18026 if { (eval echo "$as_me:18026: \"$ac_compile\"") >&5
18027   (eval $ac_compile) 2>&5
18028   ac_status=$?
18029   echo "$as_me:18029: \$? = $ac_status" >&5
18030   (exit $ac_status); } &&
18031          { ac_try='test -s conftest.$ac_objext'
18032   { (eval echo "$as_me:18032: \"$ac_try\"") >&5
18033   (eval $ac_try) 2>&5
18034   ac_status=$?
18035   echo "$as_me:18035: \$? = $ac_status" >&5
18036   (exit $ac_status); }; }; then
18037   ac_cv_c_inline=$ac_kw; break
18038 else
18039   echo "$as_me: failed program was:" >&5
18040 cat conftest.$ac_ext >&5
18041 fi
18042 rm -f conftest.$ac_objext conftest.$ac_ext
18043 done
18044
18045 fi
18046 echo "$as_me:18046: result: $ac_cv_c_inline" >&5
18047 echo "${ECHO_T}$ac_cv_c_inline" >&6
18048 case $ac_cv_c_inline in
18049   inline | yes) ;;
18050   no)
18051 cat >>confdefs.h <<\EOF
18052 #define inline
18053 EOF
18054  ;;
18055   *)  cat >>confdefs.h <<EOF
18056 #define inline $ac_cv_c_inline
18057 EOF
18058  ;;
18059 esac
18060
18061 NCURSES_INLINE=
18062 if test "$ac_cv_c_inline" != no ; then
18063         NCURSES_INLINE=inline
18064         if test "$INTEL_COMPILER" = yes
18065         then
18066                 :
18067         elif test "$CLANG_COMPILER" = yes
18068         then
18069                 :
18070         elif test "$GCC" = yes
18071         then
18072                 echo "$as_me:18072: checking if $CC supports options to tune inlining" >&5
18073 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18074 if test "${cf_cv_gcc_inline+set}" = set; then
18075   echo $ECHO_N "(cached) $ECHO_C" >&6
18076 else
18077
18078                 cf_save_CFLAGS=$CFLAGS
18079                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18080                 cat >conftest.$ac_ext <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18083 inline int foo(void) { return 1; }
18084 int
18085 main (void)
18086 {
18087 ${cf_cv_main_return:-return} foo()
18088   ;
18089   return 0;
18090 }
18091 _ACEOF
18092 rm -f conftest.$ac_objext
18093 if { (eval echo "$as_me:18093: \"$ac_compile\"") >&5
18094   (eval $ac_compile) 2>&5
18095   ac_status=$?
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit $ac_status); } &&
18098          { ac_try='test -s conftest.$ac_objext'
18099   { (eval echo "$as_me:18099: \"$ac_try\"") >&5
18100   (eval $ac_try) 2>&5
18101   ac_status=$?
18102   echo "$as_me:18102: \$? = $ac_status" >&5
18103   (exit $ac_status); }; }; then
18104   cf_cv_gcc_inline=yes
18105 else
18106   echo "$as_me: failed program was:" >&5
18107 cat conftest.$ac_ext >&5
18108 cf_cv_gcc_inline=no
18109 fi
18110 rm -f conftest.$ac_objext conftest.$ac_ext
18111                 CFLAGS=$cf_save_CFLAGS
18112
18113 fi
18114 echo "$as_me:18114: result: $cf_cv_gcc_inline" >&5
18115 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18116                 if test "$cf_cv_gcc_inline" = yes ; then
18117
18118 cf_fix_cppflags=no
18119 cf_new_cflags=
18120 cf_new_cppflags=
18121 cf_new_extra_cppflags=
18122
18123 for cf_add_cflags in --param max-inline-insns-single=1200
18124 do
18125 case $cf_fix_cppflags in
18126 (no)
18127         case $cf_add_cflags in
18128         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18129                 case $cf_add_cflags in
18130                 (-D*)
18131                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18132
18133                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18134                                 && test -z "${cf_tst_cflags}" \
18135                                 && cf_fix_cppflags=yes
18136
18137                         if test $cf_fix_cppflags = yes ; then
18138
18139         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18140         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18141
18142                                 continue
18143                         elif test "${cf_tst_cflags}" = "\"'" ; then
18144
18145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18147
18148                                 continue
18149                         fi
18150                         ;;
18151                 esac
18152                 case "$CPPFLAGS" in
18153                 (*$cf_add_cflags)
18154                         ;;
18155                 (*)
18156                         case $cf_add_cflags in
18157                         (-D*)
18158                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18159
18160 CPPFLAGS=`echo "$CPPFLAGS" | \
18161         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18162                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18163
18164                                 ;;
18165                         esac
18166
18167         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18168         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18169
18170                         ;;
18171                 esac
18172                 ;;
18173         (*)
18174
18175         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18176         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18177
18178                 ;;
18179         esac
18180         ;;
18181 (yes)
18182
18183         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18184         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18185
18186         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18187
18188         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18189                 && test -z "${cf_tst_cflags}" \
18190                 && cf_fix_cppflags=no
18191         ;;
18192 esac
18193 done
18194
18195 if test -n "$cf_new_cflags" ; then
18196
18197         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18198         CFLAGS="${CFLAGS}$cf_new_cflags"
18199
18200 fi
18201
18202 if test -n "$cf_new_cppflags" ; then
18203
18204         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18205         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18206
18207 fi
18208
18209 if test -n "$cf_new_extra_cppflags" ; then
18210
18211         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18212         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18213
18214 fi
18215
18216                 fi
18217         fi
18218 fi
18219
18220 echo "$as_me:18220: checking for signal global datatype" >&5
18221 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18222 if test "${cf_cv_sig_atomic_t+set}" = set; then
18223   echo $ECHO_N "(cached) $ECHO_C" >&6
18224 else
18225
18226         for cf_type in \
18227                 "volatile sig_atomic_t" \
18228                 "sig_atomic_t" \
18229                 "int"
18230         do
18231         cat >conftest.$ac_ext <<_ACEOF
18232 #line 18232 "configure"
18233 #include "confdefs.h"
18234
18235 #include <sys/types.h>
18236 #include <signal.h>
18237 #include <stdio.h>
18238
18239 extern $cf_type x;
18240 $cf_type x;
18241 static void handler(int sig)
18242 {
18243         x = 5;
18244 }
18245 int
18246 main (void)
18247 {
18248 signal(SIGINT, handler);
18249                  x = 1
18250   ;
18251   return 0;
18252 }
18253 _ACEOF
18254 rm -f conftest.$ac_objext
18255 if { (eval echo "$as_me:18255: \"$ac_compile\"") >&5
18256   (eval $ac_compile) 2>&5
18257   ac_status=$?
18258   echo "$as_me:18258: \$? = $ac_status" >&5
18259   (exit $ac_status); } &&
18260          { ac_try='test -s conftest.$ac_objext'
18261   { (eval echo "$as_me:18261: \"$ac_try\"") >&5
18262   (eval $ac_try) 2>&5
18263   ac_status=$?
18264   echo "$as_me:18264: \$? = $ac_status" >&5
18265   (exit $ac_status); }; }; then
18266   cf_cv_sig_atomic_t=$cf_type
18267 else
18268   echo "$as_me: failed program was:" >&5
18269 cat conftest.$ac_ext >&5
18270 cf_cv_sig_atomic_t=no
18271 fi
18272 rm -f conftest.$ac_objext conftest.$ac_ext
18273                 test "$cf_cv_sig_atomic_t" != no && break
18274         done
18275
18276 fi
18277
18278 echo "$as_me:18278: result: $cf_cv_sig_atomic_t" >&5
18279 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18280 test "$cf_cv_sig_atomic_t" != no &&
18281 cat >>confdefs.h <<EOF
18282 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18283 EOF
18284
18285 if test $NCURSES_CHTYPE = auto ; then
18286
18287 echo "$as_me:18287: checking for type of chtype" >&5
18288 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18289 if test "${cf_cv_typeof_chtype+set}" = set; then
18290   echo $ECHO_N "(cached) $ECHO_C" >&6
18291 else
18292
18293                 if test "$cross_compiling" = yes; then
18294   cf_cv_typeof_chtype=long
18295 else
18296   cat >conftest.$ac_ext <<_ACEOF
18297 #line 18297 "configure"
18298 #include "confdefs.h"
18299
18300 #define WANT_BITS 31
18301 #include <stdio.h>
18302 int main(void)
18303 {
18304         FILE *fp = fopen("cf_test.out", "w");
18305         if (fp != 0) {
18306                 char *result = "long";
18307                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18308                         int n;
18309                         unsigned int x, y;
18310                         for (n = 0; n < WANT_BITS; n++) {
18311                                 x = (1 << n);
18312                                 y = (x >> n);
18313                                 if (y != 1 || x == 0) {
18314                                         x = 0;
18315                                         break;
18316                                 }
18317                         }
18318                         /*
18319                          * If x is nonzero, an int is big enough for the bits
18320                          * that we want.
18321                          */
18322                         result = (x != 0) ? "int" : "long";
18323                 }
18324                 fputs(result, fp);
18325                 fclose(fp);
18326         }
18327         ${cf_cv_main_return:-return}(0);
18328 }
18329
18330 _ACEOF
18331 rm -f conftest$ac_exeext
18332 if { (eval echo "$as_me:18332: \"$ac_link\"") >&5
18333   (eval $ac_link) 2>&5
18334   ac_status=$?
18335   echo "$as_me:18335: \$? = $ac_status" >&5
18336   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18337   { (eval echo "$as_me:18337: \"$ac_try\"") >&5
18338   (eval $ac_try) 2>&5
18339   ac_status=$?
18340   echo "$as_me:18340: \$? = $ac_status" >&5
18341   (exit $ac_status); }; }; then
18342   cf_cv_typeof_chtype=`cat cf_test.out`
18343 else
18344   echo "$as_me: program exited with status $ac_status" >&5
18345 echo "$as_me: failed program was:" >&5
18346 cat conftest.$ac_ext >&5
18347 cf_cv_typeof_chtype=long
18348 fi
18349 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18350 fi
18351                 rm -f cf_test.out
18352
18353 fi
18354
18355 echo "$as_me:18355: result: $cf_cv_typeof_chtype" >&5
18356 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18357
18358 cat >>confdefs.h <<EOF
18359 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18360 EOF
18361
18362 else
18363         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18364 fi
18365 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18366
18367 echo "$as_me:18367: checking if unsigned literals are legal" >&5
18368 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18369 if test "${cf_cv_unsigned_literals+set}" = set; then
18370   echo $ECHO_N "(cached) $ECHO_C" >&6
18371 else
18372
18373         cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18376
18377 int
18378 main (void)
18379 {
18380 long x = 1L + 1UL + 1U + 1
18381   ;
18382   return 0;
18383 }
18384 _ACEOF
18385 rm -f conftest.$ac_objext
18386 if { (eval echo "$as_me:18386: \"$ac_compile\"") >&5
18387   (eval $ac_compile) 2>&5
18388   ac_status=$?
18389   echo "$as_me:18389: \$? = $ac_status" >&5
18390   (exit $ac_status); } &&
18391          { ac_try='test -s conftest.$ac_objext'
18392   { (eval echo "$as_me:18392: \"$ac_try\"") >&5
18393   (eval $ac_try) 2>&5
18394   ac_status=$?
18395   echo "$as_me:18395: \$? = $ac_status" >&5
18396   (exit $ac_status); }; }; then
18397   cf_cv_unsigned_literals=yes
18398 else
18399   echo "$as_me: failed program was:" >&5
18400 cat conftest.$ac_ext >&5
18401 cf_cv_unsigned_literals=no
18402 fi
18403 rm -f conftest.$ac_objext conftest.$ac_ext
18404
18405 fi
18406
18407 echo "$as_me:18407: result: $cf_cv_unsigned_literals" >&5
18408 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18409
18410 cf_cv_1UL="1"
18411 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18412 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18413
18414 if test $NCURSES_MMASK_T = auto ; then
18415         cf_cv_typeof_mmask_t=long
18416 else
18417         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18418 fi
18419 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18420
18421 ###     Checks for external-data
18422
18423 echo "$as_me:18423: checking if external errno is declared" >&5
18424 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18425 if test "${cf_cv_dcl_errno+set}" = set; then
18426   echo $ECHO_N "(cached) $ECHO_C" >&6
18427 else
18428
18429         cat >conftest.$ac_ext <<_ACEOF
18430 #line 18430 "configure"
18431 #include "confdefs.h"
18432
18433 #ifdef HAVE_STDLIB_H
18434 #include <stdlib.h>
18435 #endif
18436 #include <stdio.h>
18437 #include <sys/types.h>
18438 #include <errno.h>
18439 int
18440 main (void)
18441 {
18442 int x = (int) errno
18443   ;
18444   return 0;
18445 }
18446 _ACEOF
18447 rm -f conftest.$ac_objext
18448 if { (eval echo "$as_me:18448: \"$ac_compile\"") >&5
18449   (eval $ac_compile) 2>&5
18450   ac_status=$?
18451   echo "$as_me:18451: \$? = $ac_status" >&5
18452   (exit $ac_status); } &&
18453          { ac_try='test -s conftest.$ac_objext'
18454   { (eval echo "$as_me:18454: \"$ac_try\"") >&5
18455   (eval $ac_try) 2>&5
18456   ac_status=$?
18457   echo "$as_me:18457: \$? = $ac_status" >&5
18458   (exit $ac_status); }; }; then
18459   cf_cv_dcl_errno=yes
18460 else
18461   echo "$as_me: failed program was:" >&5
18462 cat conftest.$ac_ext >&5
18463 cf_cv_dcl_errno=no
18464 fi
18465 rm -f conftest.$ac_objext conftest.$ac_ext
18466
18467 fi
18468 echo "$as_me:18468: result: $cf_cv_dcl_errno" >&5
18469 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18470
18471 if test "$cf_cv_dcl_errno" = no ; then
18472
18473 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18474
18475         cat >>confdefs.h <<EOF
18476 #define $cf_result 1
18477 EOF
18478
18479 fi
18480
18481 # It's possible (for near-UNIX clones) that the data doesn't exist
18482
18483 echo "$as_me:18483: checking if external errno exists" >&5
18484 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18485 if test "${cf_cv_have_errno+set}" = set; then
18486   echo $ECHO_N "(cached) $ECHO_C" >&6
18487 else
18488
18489         cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492
18493 #undef errno
18494 extern int errno;
18495
18496 int
18497 main (void)
18498 {
18499 errno = 2
18500   ;
18501   return 0;
18502 }
18503 _ACEOF
18504 rm -f conftest.$ac_objext conftest$ac_exeext
18505 if { (eval echo "$as_me:18505: \"$ac_link\"") >&5
18506   (eval $ac_link) 2>&5
18507   ac_status=$?
18508   echo "$as_me:18508: \$? = $ac_status" >&5
18509   (exit $ac_status); } &&
18510          { ac_try='test -s conftest$ac_exeext'
18511   { (eval echo "$as_me:18511: \"$ac_try\"") >&5
18512   (eval $ac_try) 2>&5
18513   ac_status=$?
18514   echo "$as_me:18514: \$? = $ac_status" >&5
18515   (exit $ac_status); }; }; then
18516   cf_cv_have_errno=yes
18517 else
18518   echo "$as_me: failed program was:" >&5
18519 cat conftest.$ac_ext >&5
18520 cf_cv_have_errno=no
18521 fi
18522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18523
18524 fi
18525 echo "$as_me:18525: result: $cf_cv_have_errno" >&5
18526 echo "${ECHO_T}$cf_cv_have_errno" >&6
18527
18528 if test "$cf_cv_have_errno" = yes ; then
18529
18530 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18531
18532         cat >>confdefs.h <<EOF
18533 #define $cf_result 1
18534 EOF
18535
18536 fi
18537
18538 echo "$as_me:18538: checking if data-only library module links" >&5
18539 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18540 if test "${cf_cv_link_dataonly+set}" = set; then
18541   echo $ECHO_N "(cached) $ECHO_C" >&6
18542 else
18543
18544         rm -f conftest.a
18545         cat >conftest.$ac_ext <<EOF
18546 #line 18546 "configure"
18547 int     testdata[3] = { 123, 456, 789 };
18548 EOF
18549         if { (eval echo "$as_me:18549: \"$ac_compile\"") >&5
18550   (eval $ac_compile) 2>&5
18551   ac_status=$?
18552   echo "$as_me:18552: \$? = $ac_status" >&5
18553   (exit $ac_status); } ; then
18554                 mv conftest.o data.o && \
18555                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18556         fi
18557         rm -f conftest.$ac_ext data.o
18558         cat >conftest.$ac_ext <<EOF
18559 #line 18559 "configure"
18560 int     testfunc(void)
18561 {
18562 #if defined(NeXT)
18563         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18564 #else
18565         extern int testdata[3];
18566         return testdata[0] == 123
18567            &&  testdata[1] == 456
18568            &&  testdata[2] == 789;
18569 #endif
18570 }
18571 EOF
18572         if { (eval echo "$as_me:18572: \"$ac_compile\"") >&5
18573   (eval $ac_compile) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit $ac_status); }; then
18577                 mv conftest.o func.o && \
18578                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18579         fi
18580         rm -f conftest.$ac_ext func.o
18581         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18582         cf_saveLIBS="$LIBS"
18583         LIBS="conftest.a $LIBS"
18584         if test "$cross_compiling" = yes; then
18585   cf_cv_link_dataonly=unknown
18586 else
18587   cat >conftest.$ac_ext <<_ACEOF
18588 #line 18588 "configure"
18589 #include "confdefs.h"
18590
18591         int main(void)
18592         {
18593                 extern int testfunc();
18594                 ${cf_cv_main_return:-return} (!testfunc());
18595         }
18596
18597 _ACEOF
18598 rm -f conftest$ac_exeext
18599 if { (eval echo "$as_me:18599: \"$ac_link\"") >&5
18600   (eval $ac_link) 2>&5
18601   ac_status=$?
18602   echo "$as_me:18602: \$? = $ac_status" >&5
18603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18604   { (eval echo "$as_me:18604: \"$ac_try\"") >&5
18605   (eval $ac_try) 2>&5
18606   ac_status=$?
18607   echo "$as_me:18607: \$? = $ac_status" >&5
18608   (exit $ac_status); }; }; then
18609   cf_cv_link_dataonly=yes
18610 else
18611   echo "$as_me: program exited with status $ac_status" >&5
18612 echo "$as_me: failed program was:" >&5
18613 cat conftest.$ac_ext >&5
18614 cf_cv_link_dataonly=no
18615 fi
18616 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18617 fi
18618         LIBS="$cf_saveLIBS"
18619
18620 fi
18621
18622 echo "$as_me:18622: result: $cf_cv_link_dataonly" >&5
18623 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18624
18625 if test "$cf_cv_link_dataonly" = no ; then
18626
18627 cat >>confdefs.h <<\EOF
18628 #define BROKEN_LINKER 1
18629 EOF
18630
18631         BROKEN_LINKER=1
18632 fi
18633
18634 ###     Checks for library functions.
18635
18636 for ac_func in \
18637 getcwd \
18638 getegid \
18639 geteuid \
18640 getopt \
18641 getttynam \
18642 issetugid \
18643 poll \
18644 putenv \
18645 remove \
18646 select \
18647 setbuf \
18648 setbuffer \
18649 setenv \
18650 setvbuf \
18651 sigaction \
18652 sigvec \
18653 strdup \
18654 strstr \
18655 sysconf \
18656 tcgetpgrp \
18657 tdestroy \
18658 times \
18659 tsearch \
18660 vsnprintf \
18661
18662 do
18663 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18664 echo "$as_me:18664: checking for $ac_func" >&5
18665 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18666 if eval "test \"\${$as_ac_var+set}\" = set"; then
18667   echo $ECHO_N "(cached) $ECHO_C" >&6
18668 else
18669   cat >conftest.$ac_ext <<_ACEOF
18670 #line 18670 "configure"
18671 #include "confdefs.h"
18672 #define $ac_func autoconf_temporary
18673 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18674 #undef $ac_func
18675
18676 #ifdef __cplusplus
18677 extern "C"
18678 #endif
18679
18680 /* We use char because int might match the return type of a gcc2
18681    builtin and then its argument prototype would still apply.  */
18682 char $ac_func (void);
18683
18684 int
18685 main (void)
18686 {
18687
18688 /* The GNU C library defines stubs for functions which it implements
18689     to always fail with ENOSYS.  Some functions are actually named
18690     something starting with __ and the normal name is an alias.  */
18691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18692 #error found stub for $ac_func
18693 #endif
18694
18695         return $ac_func ();
18696   ;
18697   return 0;
18698 }
18699 _ACEOF
18700 rm -f conftest.$ac_objext conftest$ac_exeext
18701 if { (eval echo "$as_me:18701: \"$ac_link\"") >&5
18702   (eval $ac_link) 2>&5
18703   ac_status=$?
18704   echo "$as_me:18704: \$? = $ac_status" >&5
18705   (exit $ac_status); } &&
18706          { ac_try='test -s conftest$ac_exeext'
18707   { (eval echo "$as_me:18707: \"$ac_try\"") >&5
18708   (eval $ac_try) 2>&5
18709   ac_status=$?
18710   echo "$as_me:18710: \$? = $ac_status" >&5
18711   (exit $ac_status); }; }; then
18712   eval "$as_ac_var=yes"
18713 else
18714   echo "$as_me: failed program was:" >&5
18715 cat conftest.$ac_ext >&5
18716 eval "$as_ac_var=no"
18717 fi
18718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18719 fi
18720 echo "$as_me:18720: result: `eval echo '${'$as_ac_var'}'`" >&5
18721 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18722 if test `eval echo '${'$as_ac_var'}'` = yes; then
18723   cat >>confdefs.h <<EOF
18724 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18725 EOF
18726
18727 fi
18728 done
18729
18730 if test "x$ac_cv_func_getopt" = xno && \
18731    test "x$cf_with_progs$cf_with_tests" != xnono; then
18732         { { echo "$as_me:18732: error: getopt is required for building programs" >&5
18733 echo "$as_me: error: getopt is required for building programs" >&2;}
18734    { (exit 1); exit 1; }; }
18735 fi
18736
18737 if test "x$with_safe_sprintf" = xyes
18738 then
18739         if test "x$ac_cv_func_vsnprintf" = xyes
18740         then
18741                 { echo "$as_me:18741: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18742 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18743         else
18744
18745 cat >>confdefs.h <<\EOF
18746 #define USE_SAFE_SPRINTF 1
18747 EOF
18748
18749         fi
18750 fi
18751
18752 if test "x$with_getcap" = "xyes" ; then
18753
18754 echo "$as_me:18754: checking for terminal-capability database functions" >&5
18755 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18756 if test "${cf_cv_cgetent+set}" = set; then
18757   echo $ECHO_N "(cached) $ECHO_C" >&6
18758 else
18759
18760 cat >conftest.$ac_ext <<_ACEOF
18761 #line 18761 "configure"
18762 #include "confdefs.h"
18763
18764 #include <stdlib.h>
18765 int
18766 main (void)
18767 {
18768
18769         char temp[128];
18770         char *buf = temp;
18771         char *db_array = temp;
18772         cgetent(&buf, &db_array, "vt100");
18773         cgetcap(buf, "tc", '=');
18774         cgetmatch(buf, "tc");
18775
18776   ;
18777   return 0;
18778 }
18779 _ACEOF
18780 rm -f conftest.$ac_objext conftest$ac_exeext
18781 if { (eval echo "$as_me:18781: \"$ac_link\"") >&5
18782   (eval $ac_link) 2>&5
18783   ac_status=$?
18784   echo "$as_me:18784: \$? = $ac_status" >&5
18785   (exit $ac_status); } &&
18786          { ac_try='test -s conftest$ac_exeext'
18787   { (eval echo "$as_me:18787: \"$ac_try\"") >&5
18788   (eval $ac_try) 2>&5
18789   ac_status=$?
18790   echo "$as_me:18790: \$? = $ac_status" >&5
18791   (exit $ac_status); }; }; then
18792   cf_cv_cgetent=yes
18793 else
18794   echo "$as_me: failed program was:" >&5
18795 cat conftest.$ac_ext >&5
18796 cf_cv_cgetent=no
18797 fi
18798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18799
18800 fi
18801 echo "$as_me:18801: result: $cf_cv_cgetent" >&5
18802 echo "${ECHO_T}$cf_cv_cgetent" >&6
18803
18804 if test "$cf_cv_cgetent" = yes
18805 then
18806
18807 cat >>confdefs.h <<\EOF
18808 #define HAVE_BSD_CGETENT 1
18809 EOF
18810
18811 echo "$as_me:18811: checking if cgetent uses const parameter" >&5
18812 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18813 if test "${cf_cv_cgetent_const+set}" = set; then
18814   echo $ECHO_N "(cached) $ECHO_C" >&6
18815 else
18816
18817 cat >conftest.$ac_ext <<_ACEOF
18818 #line 18818 "configure"
18819 #include "confdefs.h"
18820
18821 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18822 #include <stdlib.h>
18823 int
18824 main (void)
18825 {
18826
18827         char temp[128];
18828         char *buf = temp;
18829 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18830         const char *db_array = temp;
18831         cgetent(&buf, &db_array, "vt100");
18832 #endif
18833         cgetcap(buf, "tc", '=');
18834         cgetmatch(buf, "tc");
18835
18836   ;
18837   return 0;
18838 }
18839 _ACEOF
18840 rm -f conftest.$ac_objext conftest$ac_exeext
18841 if { (eval echo "$as_me:18841: \"$ac_link\"") >&5
18842   (eval $ac_link) 2>&5
18843   ac_status=$?
18844   echo "$as_me:18844: \$? = $ac_status" >&5
18845   (exit $ac_status); } &&
18846          { ac_try='test -s conftest$ac_exeext'
18847   { (eval echo "$as_me:18847: \"$ac_try\"") >&5
18848   (eval $ac_try) 2>&5
18849   ac_status=$?
18850   echo "$as_me:18850: \$? = $ac_status" >&5
18851   (exit $ac_status); }; }; then
18852   cf_cv_cgetent_const=yes
18853 else
18854   echo "$as_me: failed program was:" >&5
18855 cat conftest.$ac_ext >&5
18856 cf_cv_cgetent_const=no
18857 fi
18858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18859
18860 fi
18861 echo "$as_me:18861: result: $cf_cv_cgetent_const" >&5
18862 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18863         if test "$cf_cv_cgetent_const" = yes
18864         then
18865
18866 cat >>confdefs.h <<EOF
18867 #define CGETENT_CONST const
18868 EOF
18869
18870         fi
18871 fi
18872
18873 fi
18874
18875 echo "$as_me:18875: checking for isascii" >&5
18876 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18877 if test "${cf_cv_have_isascii+set}" = set; then
18878   echo $ECHO_N "(cached) $ECHO_C" >&6
18879 else
18880
18881         cat >conftest.$ac_ext <<_ACEOF
18882 #line 18882 "configure"
18883 #include "confdefs.h"
18884 #include <ctype.h>
18885 int
18886 main (void)
18887 {
18888 int x = isascii(' ')
18889   ;
18890   return 0;
18891 }
18892 _ACEOF
18893 rm -f conftest.$ac_objext conftest$ac_exeext
18894 if { (eval echo "$as_me:18894: \"$ac_link\"") >&5
18895   (eval $ac_link) 2>&5
18896   ac_status=$?
18897   echo "$as_me:18897: \$? = $ac_status" >&5
18898   (exit $ac_status); } &&
18899          { ac_try='test -s conftest$ac_exeext'
18900   { (eval echo "$as_me:18900: \"$ac_try\"") >&5
18901   (eval $ac_try) 2>&5
18902   ac_status=$?
18903   echo "$as_me:18903: \$? = $ac_status" >&5
18904   (exit $ac_status); }; }; then
18905   cf_cv_have_isascii=yes
18906 else
18907   echo "$as_me: failed program was:" >&5
18908 cat conftest.$ac_ext >&5
18909 cf_cv_have_isascii=no
18910 fi
18911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18912
18913 fi
18914 echo "$as_me:18914: result: $cf_cv_have_isascii" >&5
18915 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18916 test "$cf_cv_have_isascii" = yes &&
18917 cat >>confdefs.h <<\EOF
18918 #define HAVE_ISASCII 1
18919 EOF
18920
18921 if test "$ac_cv_func_sigaction" = yes; then
18922 echo "$as_me:18922: checking whether sigaction needs _POSIX_SOURCE" >&5
18923 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18924 cat >conftest.$ac_ext <<_ACEOF
18925 #line 18925 "configure"
18926 #include "confdefs.h"
18927
18928 #include <sys/types.h>
18929 #include <signal.h>
18930 int
18931 main (void)
18932 {
18933 struct sigaction act
18934   ;
18935   return 0;
18936 }
18937 _ACEOF
18938 rm -f conftest.$ac_objext
18939 if { (eval echo "$as_me:18939: \"$ac_compile\"") >&5
18940   (eval $ac_compile) 2>&5
18941   ac_status=$?
18942   echo "$as_me:18942: \$? = $ac_status" >&5
18943   (exit $ac_status); } &&
18944          { ac_try='test -s conftest.$ac_objext'
18945   { (eval echo "$as_me:18945: \"$ac_try\"") >&5
18946   (eval $ac_try) 2>&5
18947   ac_status=$?
18948   echo "$as_me:18948: \$? = $ac_status" >&5
18949   (exit $ac_status); }; }; then
18950   sigact_bad=no
18951 else
18952   echo "$as_me: failed program was:" >&5
18953 cat conftest.$ac_ext >&5
18954
18955 cat >conftest.$ac_ext <<_ACEOF
18956 #line 18956 "configure"
18957 #include "confdefs.h"
18958
18959 #define _POSIX_SOURCE
18960 #include <sys/types.h>
18961 #include <signal.h>
18962 int
18963 main (void)
18964 {
18965 struct sigaction act
18966   ;
18967   return 0;
18968 }
18969 _ACEOF
18970 rm -f conftest.$ac_objext
18971 if { (eval echo "$as_me:18971: \"$ac_compile\"") >&5
18972   (eval $ac_compile) 2>&5
18973   ac_status=$?
18974   echo "$as_me:18974: \$? = $ac_status" >&5
18975   (exit $ac_status); } &&
18976          { ac_try='test -s conftest.$ac_objext'
18977   { (eval echo "$as_me:18977: \"$ac_try\"") >&5
18978   (eval $ac_try) 2>&5
18979   ac_status=$?
18980   echo "$as_me:18980: \$? = $ac_status" >&5
18981   (exit $ac_status); }; }; then
18982   sigact_bad=yes
18983
18984 cat >>confdefs.h <<\EOF
18985 #define _POSIX_SOURCE 1
18986 EOF
18987
18988 else
18989   echo "$as_me: failed program was:" >&5
18990 cat conftest.$ac_ext >&5
18991 sigact_bad=unknown
18992 fi
18993 rm -f conftest.$ac_objext conftest.$ac_ext
18994 fi
18995 rm -f conftest.$ac_objext conftest.$ac_ext
18996 echo "$as_me:18996: result: $sigact_bad" >&5
18997 echo "${ECHO_T}$sigact_bad" >&6
18998 fi
18999
19000 echo "$as_me:19000: checking if nanosleep really works" >&5
19001 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19002 if test "${cf_cv_func_nanosleep+set}" = set; then
19003   echo $ECHO_N "(cached) $ECHO_C" >&6
19004 else
19005
19006 if test "$cross_compiling" = yes; then
19007   cf_cv_func_nanosleep=unknown
19008 else
19009   cat >conftest.$ac_ext <<_ACEOF
19010 #line 19010 "configure"
19011 #include "confdefs.h"
19012
19013 #include <stdio.h>
19014 #include <errno.h>
19015 #include <time.h>
19016
19017 #ifdef HAVE_SYS_TIME_H
19018 #include <sys/time.h>
19019 #endif
19020
19021 int main(void) {
19022         struct timespec ts1, ts2;
19023         int code;
19024         ts1.tv_sec  = 0;
19025         ts1.tv_nsec = 750000000;
19026         ts2.tv_sec  = 0;
19027         ts2.tv_nsec = 0;
19028         errno = 0;
19029         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19030         ${cf_cv_main_return:-return}(code != 0);
19031 }
19032
19033 _ACEOF
19034 rm -f conftest$ac_exeext
19035 if { (eval echo "$as_me:19035: \"$ac_link\"") >&5
19036   (eval $ac_link) 2>&5
19037   ac_status=$?
19038   echo "$as_me:19038: \$? = $ac_status" >&5
19039   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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_func_nanosleep=yes
19046 else
19047   echo "$as_me: program exited with status $ac_status" >&5
19048 echo "$as_me: failed program was:" >&5
19049 cat conftest.$ac_ext >&5
19050 cf_cv_func_nanosleep=no
19051 fi
19052 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19053 fi
19054 fi
19055 echo "$as_me:19055: result: $cf_cv_func_nanosleep" >&5
19056 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19057
19058 test "$cf_cv_func_nanosleep" = "yes" &&
19059 cat >>confdefs.h <<\EOF
19060 #define HAVE_NANOSLEEP 1
19061 EOF
19062
19063 for ac_header in \
19064 termio.h \
19065 termios.h \
19066 unistd.h \
19067 sys/ioctl.h \
19068 sys/termio.h \
19069
19070 do
19071 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19072 echo "$as_me:19072: checking for $ac_header" >&5
19073 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19074 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19075   echo $ECHO_N "(cached) $ECHO_C" >&6
19076 else
19077   cat >conftest.$ac_ext <<_ACEOF
19078 #line 19078 "configure"
19079 #include "confdefs.h"
19080 #include <$ac_header>
19081 _ACEOF
19082 if { (eval echo "$as_me:19082: \"$ac_cpp conftest.$ac_ext\"") >&5
19083   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19084   ac_status=$?
19085   egrep -v '^ *\+' conftest.er1 >conftest.err
19086   rm -f conftest.er1
19087   cat conftest.err >&5
19088   echo "$as_me:19088: \$? = $ac_status" >&5
19089   (exit $ac_status); } >/dev/null; then
19090   if test -s conftest.err; then
19091     ac_cpp_err=$ac_c_preproc_warn_flag
19092   else
19093     ac_cpp_err=
19094   fi
19095 else
19096   ac_cpp_err=yes
19097 fi
19098 if test -z "$ac_cpp_err"; then
19099   eval "$as_ac_Header=yes"
19100 else
19101   echo "$as_me: failed program was:" >&5
19102   cat conftest.$ac_ext >&5
19103   eval "$as_ac_Header=no"
19104 fi
19105 rm -f conftest.err conftest.$ac_ext
19106 fi
19107 echo "$as_me:19107: result: `eval echo '${'$as_ac_Header'}'`" >&5
19108 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19109 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19110   cat >>confdefs.h <<EOF
19111 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19112 EOF
19113
19114 fi
19115 done
19116
19117 if test "$ac_cv_header_termios_h" = yes ; then
19118         case "$CFLAGS $CPPFLAGS" in
19119         (*-D_POSIX_SOURCE*)
19120                 termios_bad=dunno ;;
19121         (*)     termios_bad=maybe ;;
19122         esac
19123         if test "$termios_bad" = maybe ; then
19124         echo "$as_me:19124: checking whether termios.h needs _POSIX_SOURCE" >&5
19125 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19126         cat >conftest.$ac_ext <<_ACEOF
19127 #line 19127 "configure"
19128 #include "confdefs.h"
19129 #include <termios.h>
19130 int
19131 main (void)
19132 {
19133 struct termios foo; int x = foo.c_iflag
19134   ;
19135   return 0;
19136 }
19137 _ACEOF
19138 rm -f conftest.$ac_objext
19139 if { (eval echo "$as_me:19139: \"$ac_compile\"") >&5
19140   (eval $ac_compile) 2>&5
19141   ac_status=$?
19142   echo "$as_me:19142: \$? = $ac_status" >&5
19143   (exit $ac_status); } &&
19144          { ac_try='test -s conftest.$ac_objext'
19145   { (eval echo "$as_me:19145: \"$ac_try\"") >&5
19146   (eval $ac_try) 2>&5
19147   ac_status=$?
19148   echo "$as_me:19148: \$? = $ac_status" >&5
19149   (exit $ac_status); }; }; then
19150   termios_bad=no
19151 else
19152   echo "$as_me: failed program was:" >&5
19153 cat conftest.$ac_ext >&5
19154
19155                 cat >conftest.$ac_ext <<_ACEOF
19156 #line 19156 "configure"
19157 #include "confdefs.h"
19158
19159 #define _POSIX_SOURCE
19160 #include <termios.h>
19161 int
19162 main (void)
19163 {
19164 struct termios foo; int x = foo.c_iflag
19165   ;
19166   return 0;
19167 }
19168 _ACEOF
19169 rm -f conftest.$ac_objext
19170 if { (eval echo "$as_me:19170: \"$ac_compile\"") >&5
19171   (eval $ac_compile) 2>&5
19172   ac_status=$?
19173   echo "$as_me:19173: \$? = $ac_status" >&5
19174   (exit $ac_status); } &&
19175          { ac_try='test -s conftest.$ac_objext'
19176   { (eval echo "$as_me:19176: \"$ac_try\"") >&5
19177   (eval $ac_try) 2>&5
19178   ac_status=$?
19179   echo "$as_me:19179: \$? = $ac_status" >&5
19180   (exit $ac_status); }; }; then
19181   termios_bad=unknown
19182 else
19183   echo "$as_me: failed program was:" >&5
19184 cat conftest.$ac_ext >&5
19185 termios_bad=yes
19186 cat >>confdefs.h <<\EOF
19187 #define _POSIX_SOURCE 1
19188 EOF
19189
19190 fi
19191 rm -f conftest.$ac_objext conftest.$ac_ext
19192
19193 fi
19194 rm -f conftest.$ac_objext conftest.$ac_ext
19195         echo "$as_me:19195: result: $termios_bad" >&5
19196 echo "${ECHO_T}$termios_bad" >&6
19197         fi
19198 fi
19199
19200 echo "$as_me:19200: checking for tcgetattr" >&5
19201 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19202 if test "${cf_cv_have_tcgetattr+set}" = set; then
19203   echo $ECHO_N "(cached) $ECHO_C" >&6
19204 else
19205
19206 cat >conftest.$ac_ext <<_ACEOF
19207 #line 19207 "configure"
19208 #include "confdefs.h"
19209
19210 #include <sys/types.h>
19211 #ifdef HAVE_UNISTD_H
19212 #include <unistd.h>
19213 #endif
19214 #ifdef HAVE_TERMIOS_H
19215 #include <termios.h>
19216 #define TTY struct termios
19217 #else
19218 #ifdef HAVE_TERMIO_H
19219 #include <termio.h>
19220 #define TTY struct termio
19221 #endif
19222 #endif
19223
19224 int
19225 main (void)
19226 {
19227
19228 TTY foo;
19229 tcgetattr(1, &foo);
19230   ;
19231   return 0;
19232 }
19233 _ACEOF
19234 rm -f conftest.$ac_objext conftest$ac_exeext
19235 if { (eval echo "$as_me:19235: \"$ac_link\"") >&5
19236   (eval $ac_link) 2>&5
19237   ac_status=$?
19238   echo "$as_me:19238: \$? = $ac_status" >&5
19239   (exit $ac_status); } &&
19240          { ac_try='test -s conftest$ac_exeext'
19241   { (eval echo "$as_me:19241: \"$ac_try\"") >&5
19242   (eval $ac_try) 2>&5
19243   ac_status=$?
19244   echo "$as_me:19244: \$? = $ac_status" >&5
19245   (exit $ac_status); }; }; then
19246   cf_cv_have_tcgetattr=yes
19247 else
19248   echo "$as_me: failed program was:" >&5
19249 cat conftest.$ac_ext >&5
19250 cf_cv_have_tcgetattr=no
19251 fi
19252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19253 fi
19254 echo "$as_me:19254: result: $cf_cv_have_tcgetattr" >&5
19255 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19256 test "$cf_cv_have_tcgetattr" = yes &&
19257 cat >>confdefs.h <<\EOF
19258 #define HAVE_TCGETATTR 1
19259 EOF
19260
19261 echo "$as_me:19261: checking for vsscanf function or workaround" >&5
19262 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19263 if test "${cf_cv_func_vsscanf+set}" = set; then
19264   echo $ECHO_N "(cached) $ECHO_C" >&6
19265 else
19266
19267 cat >conftest.$ac_ext <<_ACEOF
19268 #line 19268 "configure"
19269 #include "confdefs.h"
19270
19271 #include <stdarg.h>
19272 #include <stdio.h>
19273 int
19274 main (void)
19275 {
19276
19277         va_list ap;
19278         vsscanf("from", "%d", ap)
19279   ;
19280   return 0;
19281 }
19282 _ACEOF
19283 rm -f conftest.$ac_objext conftest$ac_exeext
19284 if { (eval echo "$as_me:19284: \"$ac_link\"") >&5
19285   (eval $ac_link) 2>&5
19286   ac_status=$?
19287   echo "$as_me:19287: \$? = $ac_status" >&5
19288   (exit $ac_status); } &&
19289          { ac_try='test -s conftest$ac_exeext'
19290   { (eval echo "$as_me:19290: \"$ac_try\"") >&5
19291   (eval $ac_try) 2>&5
19292   ac_status=$?
19293   echo "$as_me:19293: \$? = $ac_status" >&5
19294   (exit $ac_status); }; }; then
19295   cf_cv_func_vsscanf=vsscanf
19296 else
19297   echo "$as_me: failed program was:" >&5
19298 cat conftest.$ac_ext >&5
19299
19300 cat >conftest.$ac_ext <<_ACEOF
19301 #line 19301 "configure"
19302 #include "confdefs.h"
19303
19304 #include <stdarg.h>
19305 #include <stdio.h>
19306 int
19307 main (void)
19308 {
19309
19310         FILE strbuf;
19311         char *str = "from";
19312
19313         strbuf._flag = _IOREAD;
19314         strbuf._ptr = strbuf._base = (unsigned char *) str;
19315         strbuf._cnt = strlen(str);
19316         strbuf._file = _NFILE;
19317         return (vfscanf(&strbuf, "%d", ap))
19318   ;
19319   return 0;
19320 }
19321 _ACEOF
19322 rm -f conftest.$ac_objext conftest$ac_exeext
19323 if { (eval echo "$as_me:19323: \"$ac_link\"") >&5
19324   (eval $ac_link) 2>&5
19325   ac_status=$?
19326   echo "$as_me:19326: \$? = $ac_status" >&5
19327   (exit $ac_status); } &&
19328          { ac_try='test -s conftest$ac_exeext'
19329   { (eval echo "$as_me:19329: \"$ac_try\"") >&5
19330   (eval $ac_try) 2>&5
19331   ac_status=$?
19332   echo "$as_me:19332: \$? = $ac_status" >&5
19333   (exit $ac_status); }; }; then
19334   cf_cv_func_vsscanf=vfscanf
19335 else
19336   echo "$as_me: failed program was:" >&5
19337 cat conftest.$ac_ext >&5
19338
19339 cat >conftest.$ac_ext <<_ACEOF
19340 #line 19340 "configure"
19341 #include "confdefs.h"
19342
19343 #include <stdarg.h>
19344 #include <stdio.h>
19345 int
19346 main (void)
19347 {
19348
19349         FILE strbuf;
19350         char *str = "from";
19351
19352         strbuf._flag = _IOREAD;
19353         strbuf._ptr = strbuf._base = (unsigned char *) str;
19354         strbuf._cnt = strlen(str);
19355         strbuf._file = _NFILE;
19356         return (_doscan(&strbuf, "%d", ap))
19357   ;
19358   return 0;
19359 }
19360 _ACEOF
19361 rm -f conftest.$ac_objext conftest$ac_exeext
19362 if { (eval echo "$as_me:19362: \"$ac_link\"") >&5
19363   (eval $ac_link) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit $ac_status); } &&
19367          { ac_try='test -s conftest$ac_exeext'
19368   { (eval echo "$as_me:19368: \"$ac_try\"") >&5
19369   (eval $ac_try) 2>&5
19370   ac_status=$?
19371   echo "$as_me:19371: \$? = $ac_status" >&5
19372   (exit $ac_status); }; }; then
19373   cf_cv_func_vsscanf=_doscan
19374 else
19375   echo "$as_me: failed program was:" >&5
19376 cat conftest.$ac_ext >&5
19377
19378 cf_cv_func_vsscanf=no
19379 fi
19380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19381 fi
19382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19383 fi
19384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19385 fi
19386 echo "$as_me:19386: result: $cf_cv_func_vsscanf" >&5
19387 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19388
19389 case $cf_cv_func_vsscanf in
19390 (vsscanf)
19391 cat >>confdefs.h <<\EOF
19392 #define HAVE_VSSCANF 1
19393 EOF
19394 ;;
19395 (vfscanf)
19396 cat >>confdefs.h <<\EOF
19397 #define HAVE_VFSCANF 1
19398 EOF
19399 ;;
19400 (_doscan)
19401 cat >>confdefs.h <<\EOF
19402 #define HAVE__DOSCAN 1
19403 EOF
19404 ;;
19405 esac
19406
19407 for ac_header in \
19408 unistd.h \
19409
19410 do
19411 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19412 echo "$as_me:19412: checking for $ac_header" >&5
19413 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19414 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19415   echo $ECHO_N "(cached) $ECHO_C" >&6
19416 else
19417   cat >conftest.$ac_ext <<_ACEOF
19418 #line 19418 "configure"
19419 #include "confdefs.h"
19420 #include <$ac_header>
19421 _ACEOF
19422 if { (eval echo "$as_me:19422: \"$ac_cpp conftest.$ac_ext\"") >&5
19423   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19424   ac_status=$?
19425   egrep -v '^ *\+' conftest.er1 >conftest.err
19426   rm -f conftest.er1
19427   cat conftest.err >&5
19428   echo "$as_me:19428: \$? = $ac_status" >&5
19429   (exit $ac_status); } >/dev/null; then
19430   if test -s conftest.err; then
19431     ac_cpp_err=$ac_c_preproc_warn_flag
19432   else
19433     ac_cpp_err=
19434   fi
19435 else
19436   ac_cpp_err=yes
19437 fi
19438 if test -z "$ac_cpp_err"; then
19439   eval "$as_ac_Header=yes"
19440 else
19441   echo "$as_me: failed program was:" >&5
19442   cat conftest.$ac_ext >&5
19443   eval "$as_ac_Header=no"
19444 fi
19445 rm -f conftest.err conftest.$ac_ext
19446 fi
19447 echo "$as_me:19447: result: `eval echo '${'$as_ac_Header'}'`" >&5
19448 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19449 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19450   cat >>confdefs.h <<EOF
19451 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19452 EOF
19453
19454 fi
19455 done
19456
19457 echo "$as_me:19457: checking for working mkstemp" >&5
19458 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19459 if test "${cf_cv_func_mkstemp+set}" = set; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462
19463 rm -rf conftest*
19464 if test "$cross_compiling" = yes; then
19465   cf_cv_func_mkstemp=maybe
19466 else
19467   cat >conftest.$ac_ext <<_ACEOF
19468 #line 19468 "configure"
19469 #include "confdefs.h"
19470
19471 #include <sys/types.h>
19472 #ifdef HAVE_UNISTD_H
19473 #include <unistd.h>
19474 #endif
19475 #include <stdlib.h>
19476 #include <stdio.h>
19477 #include <string.h>
19478 #include <sys/stat.h>
19479 int main(void)
19480 {
19481         char *tmpl = "conftestXXXXXX";
19482         char name[2][80];
19483         int n;
19484         int result = 0;
19485         int fd;
19486         struct stat sb;
19487
19488         umask(077);
19489         for (n = 0; n < 2; ++n) {
19490                 strcpy(name[n], tmpl);
19491                 if ((fd = mkstemp(name[n])) >= 0) {
19492                         if (!strcmp(name[n], tmpl)
19493                          || stat(name[n], &sb) != 0
19494                          || (sb.st_mode & S_IFMT) != S_IFREG
19495                          || (sb.st_mode & 077) != 0) {
19496                                 result = 1;
19497                         }
19498                         close(fd);
19499                 }
19500         }
19501         if (result == 0
19502          && !strcmp(name[0], name[1]))
19503                 result = 1;
19504         ${cf_cv_main_return:-return}(result);
19505 }
19506
19507 _ACEOF
19508 rm -f conftest$ac_exeext
19509 if { (eval echo "$as_me:19509: \"$ac_link\"") >&5
19510   (eval $ac_link) 2>&5
19511   ac_status=$?
19512   echo "$as_me:19512: \$? = $ac_status" >&5
19513   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19514   { (eval echo "$as_me:19514: \"$ac_try\"") >&5
19515   (eval $ac_try) 2>&5
19516   ac_status=$?
19517   echo "$as_me:19517: \$? = $ac_status" >&5
19518   (exit $ac_status); }; }; then
19519   cf_cv_func_mkstemp=yes
19520
19521 else
19522   echo "$as_me: program exited with status $ac_status" >&5
19523 echo "$as_me: failed program was:" >&5
19524 cat conftest.$ac_ext >&5
19525 cf_cv_func_mkstemp=no
19526
19527 fi
19528 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19529 fi
19530
19531 fi
19532 echo "$as_me:19532: result: $cf_cv_func_mkstemp" >&5
19533 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19534 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19535         echo "$as_me:19535: checking for mkstemp" >&5
19536 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19537 if test "${ac_cv_func_mkstemp+set}" = set; then
19538   echo $ECHO_N "(cached) $ECHO_C" >&6
19539 else
19540   cat >conftest.$ac_ext <<_ACEOF
19541 #line 19541 "configure"
19542 #include "confdefs.h"
19543 #define mkstemp autoconf_temporary
19544 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19545 #undef mkstemp
19546
19547 #ifdef __cplusplus
19548 extern "C"
19549 #endif
19550
19551 /* We use char because int might match the return type of a gcc2
19552    builtin and then its argument prototype would still apply.  */
19553 char mkstemp (void);
19554
19555 int
19556 main (void)
19557 {
19558
19559 /* The GNU C library defines stubs for functions which it implements
19560     to always fail with ENOSYS.  Some functions are actually named
19561     something starting with __ and the normal name is an alias.  */
19562 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19563 #error found stub for mkstemp
19564 #endif
19565
19566         return mkstemp ();
19567   ;
19568   return 0;
19569 }
19570 _ACEOF
19571 rm -f conftest.$ac_objext conftest$ac_exeext
19572 if { (eval echo "$as_me:19572: \"$ac_link\"") >&5
19573   (eval $ac_link) 2>&5
19574   ac_status=$?
19575   echo "$as_me:19575: \$? = $ac_status" >&5
19576   (exit $ac_status); } &&
19577          { ac_try='test -s conftest$ac_exeext'
19578   { (eval echo "$as_me:19578: \"$ac_try\"") >&5
19579   (eval $ac_try) 2>&5
19580   ac_status=$?
19581   echo "$as_me:19581: \$? = $ac_status" >&5
19582   (exit $ac_status); }; }; then
19583   ac_cv_func_mkstemp=yes
19584 else
19585   echo "$as_me: failed program was:" >&5
19586 cat conftest.$ac_ext >&5
19587 ac_cv_func_mkstemp=no
19588 fi
19589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19590 fi
19591 echo "$as_me:19591: result: $ac_cv_func_mkstemp" >&5
19592 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19593
19594 fi
19595 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19596
19597 cat >>confdefs.h <<\EOF
19598 #define HAVE_MKSTEMP 1
19599 EOF
19600
19601 fi
19602
19603 # setup for prototype of fallback for vsscanf()
19604
19605 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19606         HAVE_VSSCANF=1
19607 else
19608         HAVE_VSSCANF=0
19609 fi
19610
19611 if test "x$cross_compiling" = xyes ; then
19612         { echo "$as_me:19612: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19613 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19614 else
19615         echo "$as_me:19615: checking whether setvbuf arguments are reversed" >&5
19616 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19617 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19618   echo $ECHO_N "(cached) $ECHO_C" >&6
19619 else
19620   if test "$cross_compiling" = yes; then
19621   { { echo "$as_me:19621: error: cannot run test program while cross compiling" >&5
19622 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19623    { (exit 1); exit 1; }; }
19624 else
19625   cat >conftest.$ac_ext <<_ACEOF
19626 #line 19626 "configure"
19627 #include "confdefs.h"
19628 #include <stdio.h>
19629 /* If setvbuf has the reversed format, exit 0. */
19630 int
19631 main (void)
19632 {
19633   /* This call has the arguments reversed.
19634      A reversed system may check and see that the address of main
19635      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19636   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19637     $ac_main_return(1);
19638   putc('\r', stdout);
19639   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19640 }
19641 _ACEOF
19642 rm -f conftest$ac_exeext
19643 if { (eval echo "$as_me:19643: \"$ac_link\"") >&5
19644   (eval $ac_link) 2>&5
19645   ac_status=$?
19646   echo "$as_me:19646: \$? = $ac_status" >&5
19647   (exit $ac_status); } && { ac_try='./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   ac_cv_func_setvbuf_reversed=yes
19654 else
19655   echo "$as_me: program exited with status $ac_status" >&5
19656 echo "$as_me: failed program was:" >&5
19657 cat conftest.$ac_ext >&5
19658 ac_cv_func_setvbuf_reversed=no
19659 fi
19660 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19661 fi
19662 rm -f core core.* *.core
19663 fi
19664 echo "$as_me:19664: result: $ac_cv_func_setvbuf_reversed" >&5
19665 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19666 if test $ac_cv_func_setvbuf_reversed = yes; then
19667
19668 cat >>confdefs.h <<\EOF
19669 #define SETVBUF_REVERSED 1
19670 EOF
19671
19672 fi
19673
19674 fi
19675 echo "$as_me:19675: checking for intptr_t" >&5
19676 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19677 if test "${ac_cv_type_intptr_t+set}" = set; then
19678   echo $ECHO_N "(cached) $ECHO_C" >&6
19679 else
19680   cat >conftest.$ac_ext <<_ACEOF
19681 #line 19681 "configure"
19682 #include "confdefs.h"
19683 $ac_includes_default
19684 int
19685 main (void)
19686 {
19687 if ((intptr_t *) 0)
19688   return 0;
19689 if (sizeof (intptr_t))
19690   return 0;
19691   ;
19692   return 0;
19693 }
19694 _ACEOF
19695 rm -f conftest.$ac_objext
19696 if { (eval echo "$as_me:19696: \"$ac_compile\"") >&5
19697   (eval $ac_compile) 2>&5
19698   ac_status=$?
19699   echo "$as_me:19699: \$? = $ac_status" >&5
19700   (exit $ac_status); } &&
19701          { ac_try='test -s conftest.$ac_objext'
19702   { (eval echo "$as_me:19702: \"$ac_try\"") >&5
19703   (eval $ac_try) 2>&5
19704   ac_status=$?
19705   echo "$as_me:19705: \$? = $ac_status" >&5
19706   (exit $ac_status); }; }; then
19707   ac_cv_type_intptr_t=yes
19708 else
19709   echo "$as_me: failed program was:" >&5
19710 cat conftest.$ac_ext >&5
19711 ac_cv_type_intptr_t=no
19712 fi
19713 rm -f conftest.$ac_objext conftest.$ac_ext
19714 fi
19715 echo "$as_me:19715: result: $ac_cv_type_intptr_t" >&5
19716 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19717 if test $ac_cv_type_intptr_t = yes; then
19718   :
19719 else
19720
19721 cat >>confdefs.h <<EOF
19722 #define intptr_t long
19723 EOF
19724
19725 fi
19726
19727 echo "$as_me:19727: checking for ssize_t" >&5
19728 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19729 if test "${ac_cv_type_ssize_t+set}" = set; then
19730   echo $ECHO_N "(cached) $ECHO_C" >&6
19731 else
19732   cat >conftest.$ac_ext <<_ACEOF
19733 #line 19733 "configure"
19734 #include "confdefs.h"
19735 $ac_includes_default
19736 int
19737 main (void)
19738 {
19739 if ((ssize_t *) 0)
19740   return 0;
19741 if (sizeof (ssize_t))
19742   return 0;
19743   ;
19744   return 0;
19745 }
19746 _ACEOF
19747 rm -f conftest.$ac_objext
19748 if { (eval echo "$as_me:19748: \"$ac_compile\"") >&5
19749   (eval $ac_compile) 2>&5
19750   ac_status=$?
19751   echo "$as_me:19751: \$? = $ac_status" >&5
19752   (exit $ac_status); } &&
19753          { ac_try='test -s conftest.$ac_objext'
19754   { (eval echo "$as_me:19754: \"$ac_try\"") >&5
19755   (eval $ac_try) 2>&5
19756   ac_status=$?
19757   echo "$as_me:19757: \$? = $ac_status" >&5
19758   (exit $ac_status); }; }; then
19759   ac_cv_type_ssize_t=yes
19760 else
19761   echo "$as_me: failed program was:" >&5
19762 cat conftest.$ac_ext >&5
19763 ac_cv_type_ssize_t=no
19764 fi
19765 rm -f conftest.$ac_objext conftest.$ac_ext
19766 fi
19767 echo "$as_me:19767: result: $ac_cv_type_ssize_t" >&5
19768 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19769 if test $ac_cv_type_ssize_t = yes; then
19770   :
19771 else
19772
19773 cat >>confdefs.h <<EOF
19774 #define ssize_t int
19775 EOF
19776
19777 fi
19778
19779 echo "$as_me:19779: checking for type sigaction_t" >&5
19780 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19781 if test "${cf_cv_type_sigaction+set}" = set; then
19782   echo $ECHO_N "(cached) $ECHO_C" >&6
19783 else
19784
19785         cat >conftest.$ac_ext <<_ACEOF
19786 #line 19786 "configure"
19787 #include "confdefs.h"
19788
19789 #include <signal.h>
19790 int
19791 main (void)
19792 {
19793 sigaction_t x
19794   ;
19795   return 0;
19796 }
19797 _ACEOF
19798 rm -f conftest.$ac_objext
19799 if { (eval echo "$as_me:19799: \"$ac_compile\"") >&5
19800   (eval $ac_compile) 2>&5
19801   ac_status=$?
19802   echo "$as_me:19802: \$? = $ac_status" >&5
19803   (exit $ac_status); } &&
19804          { ac_try='test -s conftest.$ac_objext'
19805   { (eval echo "$as_me:19805: \"$ac_try\"") >&5
19806   (eval $ac_try) 2>&5
19807   ac_status=$?
19808   echo "$as_me:19808: \$? = $ac_status" >&5
19809   (exit $ac_status); }; }; then
19810   cf_cv_type_sigaction=yes
19811 else
19812   echo "$as_me: failed program was:" >&5
19813 cat conftest.$ac_ext >&5
19814 cf_cv_type_sigaction=no
19815 fi
19816 rm -f conftest.$ac_objext conftest.$ac_ext
19817 fi
19818
19819 echo "$as_me:19819: result: $cf_cv_type_sigaction" >&5
19820 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19821 test "$cf_cv_type_sigaction" = yes &&
19822 cat >>confdefs.h <<\EOF
19823 #define HAVE_TYPE_SIGACTION 1
19824 EOF
19825
19826 echo "$as_me:19826: checking declaration of size-change" >&5
19827 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19828 if test "${cf_cv_sizechange+set}" = set; then
19829   echo $ECHO_N "(cached) $ECHO_C" >&6
19830 else
19831
19832         cf_cv_sizechange=unknown
19833         cf_save_CPPFLAGS="$CPPFLAGS"
19834
19835 for cf_opts in "" "NEED_PTEM_H"
19836 do
19837
19838         CPPFLAGS="$cf_save_CPPFLAGS"
19839         if test -n "$cf_opts"
19840         then
19841
19842         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19843         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19844
19845         fi
19846         cat >conftest.$ac_ext <<_ACEOF
19847 #line 19847 "configure"
19848 #include "confdefs.h"
19849 #include <sys/types.h>
19850 #ifdef HAVE_TERMIOS_H
19851 #include <termios.h>
19852 #else
19853 #ifdef HAVE_TERMIO_H
19854 #include <termio.h>
19855 #endif
19856 #endif
19857
19858 #ifdef NEED_PTEM_H
19859 /* This is a workaround for SCO:  they neglected to define struct winsize in
19860  * termios.h -- it's only in termio.h and ptem.h
19861  */
19862 #include <sys/stream.h>
19863 #include <sys/ptem.h>
19864 #endif
19865
19866 #ifdef HAVE_SYS_IOCTL_H
19867 #include <sys/ioctl.h>
19868 #endif
19869
19870 int
19871 main (void)
19872 {
19873
19874 #ifdef TIOCGSIZE
19875         struct ttysize win;     /* SunOS 3.0... */
19876         int y = win.ts_lines;
19877         int x = win.ts_cols;
19878 #else
19879 #ifdef TIOCGWINSZ
19880         struct winsize win;     /* everything else */
19881         int y = win.ws_row;
19882         int x = win.ws_col;
19883 #else
19884         no TIOCGSIZE or TIOCGWINSZ
19885 #endif /* TIOCGWINSZ */
19886 #endif /* TIOCGSIZE */
19887
19888   ;
19889   return 0;
19890 }
19891 _ACEOF
19892 rm -f conftest.$ac_objext
19893 if { (eval echo "$as_me:19893: \"$ac_compile\"") >&5
19894   (eval $ac_compile) 2>&5
19895   ac_status=$?
19896   echo "$as_me:19896: \$? = $ac_status" >&5
19897   (exit $ac_status); } &&
19898          { ac_try='test -s conftest.$ac_objext'
19899   { (eval echo "$as_me:19899: \"$ac_try\"") >&5
19900   (eval $ac_try) 2>&5
19901   ac_status=$?
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit $ac_status); }; }; then
19904   cf_cv_sizechange=yes
19905 else
19906   echo "$as_me: failed program was:" >&5
19907 cat conftest.$ac_ext >&5
19908 cf_cv_sizechange=no
19909 fi
19910 rm -f conftest.$ac_objext conftest.$ac_ext
19911
19912         CPPFLAGS="$cf_save_CPPFLAGS"
19913         if test "$cf_cv_sizechange" = yes ; then
19914                 echo "size-change succeeded ($cf_opts)" >&5
19915                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19916                 break
19917         fi
19918 done
19919
19920 fi
19921 echo "$as_me:19921: result: $cf_cv_sizechange" >&5
19922 echo "${ECHO_T}$cf_cv_sizechange" >&6
19923 if test "$cf_cv_sizechange" != no ; then
19924
19925 cat >>confdefs.h <<\EOF
19926 #define HAVE_SIZECHANGE 1
19927 EOF
19928
19929         case $cf_cv_sizechange in
19930         (NEED*)
19931                 cat >>confdefs.h <<EOF
19932 #define $cf_cv_sizechange  1
19933 EOF
19934
19935                 ;;
19936         esac
19937 fi
19938
19939 echo "$as_me:19939: checking for memmove" >&5
19940 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19941 if test "${ac_cv_func_memmove+set}" = set; then
19942   echo $ECHO_N "(cached) $ECHO_C" >&6
19943 else
19944   cat >conftest.$ac_ext <<_ACEOF
19945 #line 19945 "configure"
19946 #include "confdefs.h"
19947 #define memmove autoconf_temporary
19948 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19949 #undef memmove
19950
19951 #ifdef __cplusplus
19952 extern "C"
19953 #endif
19954
19955 /* We use char because int might match the return type of a gcc2
19956    builtin and then its argument prototype would still apply.  */
19957 char memmove (void);
19958
19959 int
19960 main (void)
19961 {
19962
19963 /* The GNU C library defines stubs for functions which it implements
19964     to always fail with ENOSYS.  Some functions are actually named
19965     something starting with __ and the normal name is an alias.  */
19966 #if defined (__stub_memmove) || defined (__stub___memmove)
19967 #error found stub for memmove
19968 #endif
19969
19970         return memmove ();
19971   ;
19972   return 0;
19973 }
19974 _ACEOF
19975 rm -f conftest.$ac_objext 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); } &&
19981          { ac_try='test -s conftest$ac_exeext'
19982   { (eval echo "$as_me:19982: \"$ac_try\"") >&5
19983   (eval $ac_try) 2>&5
19984   ac_status=$?
19985   echo "$as_me:19985: \$? = $ac_status" >&5
19986   (exit $ac_status); }; }; then
19987   ac_cv_func_memmove=yes
19988 else
19989   echo "$as_me: failed program was:" >&5
19990 cat conftest.$ac_ext >&5
19991 ac_cv_func_memmove=no
19992 fi
19993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19994 fi
19995 echo "$as_me:19995: result: $ac_cv_func_memmove" >&5
19996 echo "${ECHO_T}$ac_cv_func_memmove" >&6
19997 if test $ac_cv_func_memmove = yes; then
19998   :
19999 else
20000
20001 echo "$as_me:20001: checking for bcopy" >&5
20002 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20003 if test "${ac_cv_func_bcopy+set}" = set; then
20004   echo $ECHO_N "(cached) $ECHO_C" >&6
20005 else
20006   cat >conftest.$ac_ext <<_ACEOF
20007 #line 20007 "configure"
20008 #include "confdefs.h"
20009 #define bcopy autoconf_temporary
20010 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20011 #undef bcopy
20012
20013 #ifdef __cplusplus
20014 extern "C"
20015 #endif
20016
20017 /* We use char because int might match the return type of a gcc2
20018    builtin and then its argument prototype would still apply.  */
20019 char bcopy (void);
20020
20021 int
20022 main (void)
20023 {
20024
20025 /* The GNU C library defines stubs for functions which it implements
20026     to always fail with ENOSYS.  Some functions are actually named
20027     something starting with __ and the normal name is an alias.  */
20028 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20029 #error found stub for bcopy
20030 #endif
20031
20032         return bcopy ();
20033   ;
20034   return 0;
20035 }
20036 _ACEOF
20037 rm -f conftest.$ac_objext conftest$ac_exeext
20038 if { (eval echo "$as_me:20038: \"$ac_link\"") >&5
20039   (eval $ac_link) 2>&5
20040   ac_status=$?
20041   echo "$as_me:20041: \$? = $ac_status" >&5
20042   (exit $ac_status); } &&
20043          { ac_try='test -s conftest$ac_exeext'
20044   { (eval echo "$as_me:20044: \"$ac_try\"") >&5
20045   (eval $ac_try) 2>&5
20046   ac_status=$?
20047   echo "$as_me:20047: \$? = $ac_status" >&5
20048   (exit $ac_status); }; }; then
20049   ac_cv_func_bcopy=yes
20050 else
20051   echo "$as_me: failed program was:" >&5
20052 cat conftest.$ac_ext >&5
20053 ac_cv_func_bcopy=no
20054 fi
20055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20056 fi
20057 echo "$as_me:20057: result: $ac_cv_func_bcopy" >&5
20058 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20059 if test $ac_cv_func_bcopy = yes; then
20060
20061         echo "$as_me:20061: checking if bcopy does overlapping moves" >&5
20062 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20063 if test "${cf_cv_good_bcopy+set}" = set; then
20064   echo $ECHO_N "(cached) $ECHO_C" >&6
20065 else
20066
20067                 if test "$cross_compiling" = yes; then
20068   cf_cv_good_bcopy=unknown
20069 else
20070   cat >conftest.$ac_ext <<_ACEOF
20071 #line 20071 "configure"
20072 #include "confdefs.h"
20073
20074 int main(void) {
20075         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20076         char temp[40];
20077         bcopy(data, temp, sizeof(data));
20078         bcopy(temp+10, temp, 15);
20079         bcopy(temp+5, temp+15, 10);
20080         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20081 }
20082
20083 _ACEOF
20084 rm -f conftest$ac_exeext
20085 if { (eval echo "$as_me:20085: \"$ac_link\"") >&5
20086   (eval $ac_link) 2>&5
20087   ac_status=$?
20088   echo "$as_me:20088: \$? = $ac_status" >&5
20089   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20090   { (eval echo "$as_me:20090: \"$ac_try\"") >&5
20091   (eval $ac_try) 2>&5
20092   ac_status=$?
20093   echo "$as_me:20093: \$? = $ac_status" >&5
20094   (exit $ac_status); }; }; then
20095   cf_cv_good_bcopy=yes
20096 else
20097   echo "$as_me: program exited with status $ac_status" >&5
20098 echo "$as_me: failed program was:" >&5
20099 cat conftest.$ac_ext >&5
20100 cf_cv_good_bcopy=no
20101 fi
20102 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20103 fi
20104
20105 fi
20106 echo "$as_me:20106: result: $cf_cv_good_bcopy" >&5
20107 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20108
20109 else
20110   cf_cv_good_bcopy=no
20111 fi
20112
20113         if test "$cf_cv_good_bcopy" = yes ; then
20114
20115 cat >>confdefs.h <<\EOF
20116 #define USE_OK_BCOPY 1
20117 EOF
20118
20119         else
20120
20121 cat >>confdefs.h <<\EOF
20122 #define USE_MY_MEMMOVE 1
20123 EOF
20124
20125         fi
20126
20127 fi
20128
20129 tty 2>&1 >/dev/null || {
20130 for ac_func in posix_openpt
20131 do
20132 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20133 echo "$as_me:20133: checking for $ac_func" >&5
20134 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20135 if eval "test \"\${$as_ac_var+set}\" = set"; then
20136   echo $ECHO_N "(cached) $ECHO_C" >&6
20137 else
20138   cat >conftest.$ac_ext <<_ACEOF
20139 #line 20139 "configure"
20140 #include "confdefs.h"
20141 #define $ac_func autoconf_temporary
20142 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20143 #undef $ac_func
20144
20145 #ifdef __cplusplus
20146 extern "C"
20147 #endif
20148
20149 /* We use char because int might match the return type of a gcc2
20150    builtin and then its argument prototype would still apply.  */
20151 char $ac_func (void);
20152
20153 int
20154 main (void)
20155 {
20156
20157 /* The GNU C library defines stubs for functions which it implements
20158     to always fail with ENOSYS.  Some functions are actually named
20159     something starting with __ and the normal name is an alias.  */
20160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20161 #error found stub for $ac_func
20162 #endif
20163
20164         return $ac_func ();
20165   ;
20166   return 0;
20167 }
20168 _ACEOF
20169 rm -f conftest.$ac_objext conftest$ac_exeext
20170 if { (eval echo "$as_me:20170: \"$ac_link\"") >&5
20171   (eval $ac_link) 2>&5
20172   ac_status=$?
20173   echo "$as_me:20173: \$? = $ac_status" >&5
20174   (exit $ac_status); } &&
20175          { ac_try='test -s conftest$ac_exeext'
20176   { (eval echo "$as_me:20176: \"$ac_try\"") >&5
20177   (eval $ac_try) 2>&5
20178   ac_status=$?
20179   echo "$as_me:20179: \$? = $ac_status" >&5
20180   (exit $ac_status); }; }; then
20181   eval "$as_ac_var=yes"
20182 else
20183   echo "$as_me: failed program was:" >&5
20184 cat conftest.$ac_ext >&5
20185 eval "$as_ac_var=no"
20186 fi
20187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20188 fi
20189 echo "$as_me:20189: result: `eval echo '${'$as_ac_var'}'`" >&5
20190 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20191 if test `eval echo '${'$as_ac_var'}'` = yes; then
20192   cat >>confdefs.h <<EOF
20193 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20194 EOF
20195
20196 fi
20197 done
20198  }
20199 echo "$as_me:20199: checking if poll really works" >&5
20200 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20201 if test "${cf_cv_working_poll+set}" = set; then
20202   echo $ECHO_N "(cached) $ECHO_C" >&6
20203 else
20204
20205 if test "$cross_compiling" = yes; then
20206   cf_cv_working_poll=unknown
20207 else
20208   cat >conftest.$ac_ext <<_ACEOF
20209 #line 20209 "configure"
20210 #include "confdefs.h"
20211
20212 #include <stdlib.h>
20213 #include <stdio.h>
20214 #include <unistd.h>
20215 #include <fcntl.h>
20216 #ifdef HAVE_POLL_H
20217 #include <poll.h>
20218 #else
20219 #include <sys/poll.h>
20220 #endif
20221 int main(void) {
20222         struct pollfd myfds;
20223         int ret;
20224
20225         /* check for Darwin bug with respect to "devices" */
20226         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20227         if (myfds.fd < 0)
20228                 myfds.fd = 0;
20229         myfds.events = POLLIN;
20230         myfds.revents = 0;
20231
20232         ret = poll(&myfds, 1, 100);
20233
20234         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20235                 ret = -1;
20236         } else {
20237                 int fd = 0;
20238                 if (!isatty(fd)) {
20239                         fd = open("/dev/tty", 2);       /* O_RDWR */
20240                 }
20241 #ifdef HAVE_POSIX_OPENPT
20242                 if (fd < 0) {
20243                         fd = posix_openpt(O_RDWR);
20244                 }
20245 #endif
20246
20247                 if (fd >= 0) {
20248                         /* also check with standard input */
20249                         myfds.fd = fd;
20250                         myfds.events = POLLIN;
20251                         myfds.revents = 0;
20252                         ret = poll(&myfds, 1, 100);
20253                 } else {
20254                         ret = -1;
20255                 }
20256         }
20257         ${cf_cv_main_return:-return}(ret < 0);
20258 }
20259 _ACEOF
20260 rm -f conftest$ac_exeext
20261 if { (eval echo "$as_me:20261: \"$ac_link\"") >&5
20262   (eval $ac_link) 2>&5
20263   ac_status=$?
20264   echo "$as_me:20264: \$? = $ac_status" >&5
20265   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20266   { (eval echo "$as_me:20266: \"$ac_try\"") >&5
20267   (eval $ac_try) 2>&5
20268   ac_status=$?
20269   echo "$as_me:20269: \$? = $ac_status" >&5
20270   (exit $ac_status); }; }; then
20271   cf_cv_working_poll=yes
20272 else
20273   echo "$as_me: program exited with status $ac_status" >&5
20274 echo "$as_me: failed program was:" >&5
20275 cat conftest.$ac_ext >&5
20276 cf_cv_working_poll=no
20277 fi
20278 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20279 fi
20280 fi
20281 echo "$as_me:20281: result: $cf_cv_working_poll" >&5
20282 echo "${ECHO_T}$cf_cv_working_poll" >&6
20283 test "$cf_cv_working_poll" = "yes" &&
20284 cat >>confdefs.h <<\EOF
20285 #define HAVE_WORKING_POLL 1
20286 EOF
20287
20288 echo "$as_me:20288: checking for va_copy" >&5
20289 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20290 if test "${cf_cv_have_va_copy+set}" = set; then
20291   echo $ECHO_N "(cached) $ECHO_C" >&6
20292 else
20293
20294 cat >conftest.$ac_ext <<_ACEOF
20295 #line 20295 "configure"
20296 #include "confdefs.h"
20297
20298 #include <stdarg.h>
20299
20300 int
20301 main (void)
20302 {
20303
20304         static va_list dst;
20305         static va_list src;
20306         va_copy(dst, src)
20307   ;
20308   return 0;
20309 }
20310 _ACEOF
20311 rm -f conftest.$ac_objext conftest$ac_exeext
20312 if { (eval echo "$as_me:20312: \"$ac_link\"") >&5
20313   (eval $ac_link) 2>&5
20314   ac_status=$?
20315   echo "$as_me:20315: \$? = $ac_status" >&5
20316   (exit $ac_status); } &&
20317          { ac_try='test -s conftest$ac_exeext'
20318   { (eval echo "$as_me:20318: \"$ac_try\"") >&5
20319   (eval $ac_try) 2>&5
20320   ac_status=$?
20321   echo "$as_me:20321: \$? = $ac_status" >&5
20322   (exit $ac_status); }; }; then
20323   cf_cv_have_va_copy=yes
20324 else
20325   echo "$as_me: failed program was:" >&5
20326 cat conftest.$ac_ext >&5
20327 cf_cv_have_va_copy=no
20328 fi
20329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20330 fi
20331 echo "$as_me:20331: result: $cf_cv_have_va_copy" >&5
20332 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20333
20334 test "$cf_cv_have_va_copy" = yes &&
20335 cat >>confdefs.h <<\EOF
20336 #define HAVE_VA_COPY 1
20337 EOF
20338
20339 echo "$as_me:20339: checking for __va_copy" >&5
20340 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20341 if test "${cf_cv_have___va_copy+set}" = set; then
20342   echo $ECHO_N "(cached) $ECHO_C" >&6
20343 else
20344
20345 cat >conftest.$ac_ext <<_ACEOF
20346 #line 20346 "configure"
20347 #include "confdefs.h"
20348
20349 #include <stdarg.h>
20350
20351 int
20352 main (void)
20353 {
20354
20355         static va_list dst;
20356         static va_list src;
20357         __va_copy(dst, src)
20358   ;
20359   return 0;
20360 }
20361 _ACEOF
20362 rm -f conftest.$ac_objext conftest$ac_exeext
20363 if { (eval echo "$as_me:20363: \"$ac_link\"") >&5
20364   (eval $ac_link) 2>&5
20365   ac_status=$?
20366   echo "$as_me:20366: \$? = $ac_status" >&5
20367   (exit $ac_status); } &&
20368          { ac_try='test -s conftest$ac_exeext'
20369   { (eval echo "$as_me:20369: \"$ac_try\"") >&5
20370   (eval $ac_try) 2>&5
20371   ac_status=$?
20372   echo "$as_me:20372: \$? = $ac_status" >&5
20373   (exit $ac_status); }; }; then
20374   cf_cv_have___va_copy=yes
20375 else
20376   echo "$as_me: failed program was:" >&5
20377 cat conftest.$ac_ext >&5
20378 cf_cv_have___va_copy=no
20379 fi
20380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20381 fi
20382 echo "$as_me:20382: result: $cf_cv_have___va_copy" >&5
20383 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20384
20385 test "$cf_cv_have___va_copy" = yes &&
20386 cat >>confdefs.h <<\EOF
20387 #define HAVE___VA_COPY 1
20388 EOF
20389
20390 echo "$as_me:20390: checking for pid_t" >&5
20391 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20392 if test "${ac_cv_type_pid_t+set}" = set; then
20393   echo $ECHO_N "(cached) $ECHO_C" >&6
20394 else
20395   cat >conftest.$ac_ext <<_ACEOF
20396 #line 20396 "configure"
20397 #include "confdefs.h"
20398 $ac_includes_default
20399 int
20400 main (void)
20401 {
20402 if ((pid_t *) 0)
20403   return 0;
20404 if (sizeof (pid_t))
20405   return 0;
20406   ;
20407   return 0;
20408 }
20409 _ACEOF
20410 rm -f conftest.$ac_objext
20411 if { (eval echo "$as_me:20411: \"$ac_compile\"") >&5
20412   (eval $ac_compile) 2>&5
20413   ac_status=$?
20414   echo "$as_me:20414: \$? = $ac_status" >&5
20415   (exit $ac_status); } &&
20416          { ac_try='test -s conftest.$ac_objext'
20417   { (eval echo "$as_me:20417: \"$ac_try\"") >&5
20418   (eval $ac_try) 2>&5
20419   ac_status=$?
20420   echo "$as_me:20420: \$? = $ac_status" >&5
20421   (exit $ac_status); }; }; then
20422   ac_cv_type_pid_t=yes
20423 else
20424   echo "$as_me: failed program was:" >&5
20425 cat conftest.$ac_ext >&5
20426 ac_cv_type_pid_t=no
20427 fi
20428 rm -f conftest.$ac_objext conftest.$ac_ext
20429 fi
20430 echo "$as_me:20430: result: $ac_cv_type_pid_t" >&5
20431 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20432 if test $ac_cv_type_pid_t = yes; then
20433   :
20434 else
20435
20436 cat >>confdefs.h <<EOF
20437 #define pid_t int
20438 EOF
20439
20440 fi
20441
20442 for ac_header in unistd.h vfork.h
20443 do
20444 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20445 echo "$as_me:20445: checking for $ac_header" >&5
20446 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20447 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20448   echo $ECHO_N "(cached) $ECHO_C" >&6
20449 else
20450   cat >conftest.$ac_ext <<_ACEOF
20451 #line 20451 "configure"
20452 #include "confdefs.h"
20453 #include <$ac_header>
20454 _ACEOF
20455 if { (eval echo "$as_me:20455: \"$ac_cpp conftest.$ac_ext\"") >&5
20456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20457   ac_status=$?
20458   egrep -v '^ *\+' conftest.er1 >conftest.err
20459   rm -f conftest.er1
20460   cat conftest.err >&5
20461   echo "$as_me:20461: \$? = $ac_status" >&5
20462   (exit $ac_status); } >/dev/null; then
20463   if test -s conftest.err; then
20464     ac_cpp_err=$ac_c_preproc_warn_flag
20465   else
20466     ac_cpp_err=
20467   fi
20468 else
20469   ac_cpp_err=yes
20470 fi
20471 if test -z "$ac_cpp_err"; then
20472   eval "$as_ac_Header=yes"
20473 else
20474   echo "$as_me: failed program was:" >&5
20475   cat conftest.$ac_ext >&5
20476   eval "$as_ac_Header=no"
20477 fi
20478 rm -f conftest.err conftest.$ac_ext
20479 fi
20480 echo "$as_me:20480: result: `eval echo '${'$as_ac_Header'}'`" >&5
20481 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20482 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20483   cat >>confdefs.h <<EOF
20484 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20485 EOF
20486
20487 fi
20488 done
20489
20490 for ac_func in fork vfork
20491 do
20492 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20493 echo "$as_me:20493: checking for $ac_func" >&5
20494 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20495 if eval "test \"\${$as_ac_var+set}\" = set"; then
20496   echo $ECHO_N "(cached) $ECHO_C" >&6
20497 else
20498   cat >conftest.$ac_ext <<_ACEOF
20499 #line 20499 "configure"
20500 #include "confdefs.h"
20501 #define $ac_func autoconf_temporary
20502 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20503 #undef $ac_func
20504
20505 #ifdef __cplusplus
20506 extern "C"
20507 #endif
20508
20509 /* We use char because int might match the return type of a gcc2
20510    builtin and then its argument prototype would still apply.  */
20511 char $ac_func (void);
20512
20513 int
20514 main (void)
20515 {
20516
20517 /* The GNU C library defines stubs for functions which it implements
20518     to always fail with ENOSYS.  Some functions are actually named
20519     something starting with __ and the normal name is an alias.  */
20520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20521 #error found stub for $ac_func
20522 #endif
20523
20524         return $ac_func ();
20525   ;
20526   return 0;
20527 }
20528 _ACEOF
20529 rm -f conftest.$ac_objext conftest$ac_exeext
20530 if { (eval echo "$as_me:20530: \"$ac_link\"") >&5
20531   (eval $ac_link) 2>&5
20532   ac_status=$?
20533   echo "$as_me:20533: \$? = $ac_status" >&5
20534   (exit $ac_status); } &&
20535          { ac_try='test -s conftest$ac_exeext'
20536   { (eval echo "$as_me:20536: \"$ac_try\"") >&5
20537   (eval $ac_try) 2>&5
20538   ac_status=$?
20539   echo "$as_me:20539: \$? = $ac_status" >&5
20540   (exit $ac_status); }; }; then
20541   eval "$as_ac_var=yes"
20542 else
20543   echo "$as_me: failed program was:" >&5
20544 cat conftest.$ac_ext >&5
20545 eval "$as_ac_var=no"
20546 fi
20547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20548 fi
20549 echo "$as_me:20549: result: `eval echo '${'$as_ac_var'}'`" >&5
20550 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20551 if test `eval echo '${'$as_ac_var'}'` = yes; then
20552   cat >>confdefs.h <<EOF
20553 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20554 EOF
20555
20556 fi
20557 done
20558
20559 ac_cv_func_fork_works=$ac_cv_func_fork
20560 if test "x$ac_cv_func_fork" = xyes; then
20561   echo "$as_me:20561: checking for working fork" >&5
20562 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20563 if test "${ac_cv_func_fork_works+set}" = set; then
20564   echo $ECHO_N "(cached) $ECHO_C" >&6
20565 else
20566   if test "$cross_compiling" = yes; then
20567   ac_cv_func_fork_works=cross
20568 else
20569   cat >conftest.$ac_ext <<_ACEOF
20570 /* By Rüdiger Kuhlmann. */
20571       #include <sys/types.h>
20572       #if HAVE_UNISTD_H
20573       # include <unistd.h>
20574       #endif
20575       /* Some systems only have a dummy stub for fork() */
20576       int main (void)
20577       {
20578         if (fork() < 0)
20579           $ac_main_return (1);
20580         $ac_main_return (0);
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_fork_works=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_fork_works=no
20600 fi
20601 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20602 fi
20603 fi
20604 echo "$as_me:20604: result: $ac_cv_func_fork_works" >&5
20605 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20606
20607 fi
20608 if test "x$ac_cv_func_fork_works" = xcross; then
20609   case $host in
20610     *-*-amigaos* | *-*-msdosdjgpp*)
20611       # Override, as these systems have only a dummy fork() stub
20612       ac_cv_func_fork_works=no
20613       ;;
20614     *)
20615       ac_cv_func_fork_works=yes
20616       ;;
20617   esac
20618   { echo "$as_me:20618: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20619 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20620 fi
20621 ac_cv_func_vfork_works=$ac_cv_func_vfork
20622 if test "x$ac_cv_func_vfork" = xyes; then
20623   echo "$as_me:20623: checking for working vfork" >&5
20624 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20625 if test "${ac_cv_func_vfork_works+set}" = set; then
20626   echo $ECHO_N "(cached) $ECHO_C" >&6
20627 else
20628   if test "$cross_compiling" = yes; then
20629   ac_cv_func_vfork_works=cross
20630 else
20631   cat >conftest.$ac_ext <<_ACEOF
20632 #line 20632 "configure"
20633 #include "confdefs.h"
20634 /* Thanks to Paul Eggert for this test.  */
20635 #include <stdio.h>
20636 #include <sys/types.h>
20637 #include <sys/stat.h>
20638 #if HAVE_UNISTD_H
20639 # include <unistd.h>
20640 #endif
20641 #if HAVE_VFORK_H
20642 # include <vfork.h>
20643 #endif
20644 /* On some sparc systems, changes by the child to local and incoming
20645    argument registers are propagated back to the parent.  The compiler
20646    is told about this with #include <vfork.h>, but some compilers
20647    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20648    static variable whose address is put into a register that is
20649    clobbered by the vfork.  */
20650 static
20651 #ifdef __cplusplus
20652 sparc_address_test (int arg)
20653 # else
20654 sparc_address_test (arg) int arg;
20655 #endif
20656 {
20657   static pid_t child;
20658   if (!child) {
20659     child = vfork ();
20660     if (child < 0) {
20661       perror ("vfork");
20662       _exit(2);
20663     }
20664     if (!child) {
20665       arg = getpid();
20666       write(-1, "", 0);
20667       _exit (arg);
20668     }
20669   }
20670 }
20671
20672 int
20673 main (void)
20674 {
20675   pid_t parent = getpid ();
20676   pid_t child;
20677
20678   sparc_address_test ();
20679
20680   child = vfork ();
20681
20682   if (child == 0) {
20683     /* Here is another test for sparc vfork register problems.  This
20684        test uses lots of local variables, at least as many local
20685        variables as main has allocated so far including compiler
20686        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20687        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20688        reuse the register of parent for one of the local variables,
20689        since it will think that parent can't possibly be used any more
20690        in this routine.  Assigning to the local variable will thus
20691        munge parent in the parent process.  */
20692     pid_t
20693       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20694       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20695     /* Convince the compiler that p..p7 are live; otherwise, it might
20696        use the same hardware register for all 8 local variables.  */
20697     if (p != p1 || p != p2 || p != p3 || p != p4
20698         || p != p5 || p != p6 || p != p7)
20699       _exit(1);
20700
20701     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20702        from child file descriptors.  If the child closes a descriptor
20703        before it execs or exits, this munges the parent's descriptor
20704        as well.  Test for this by closing stdout in the child.  */
20705     _exit(close(fileno(stdout)) != 0);
20706   } else {
20707     int status;
20708     struct stat st;
20709
20710     while (wait(&status) != child)
20711       ;
20712     $ac_main_return(
20713          /* Was there some problem with vforking?  */
20714          child < 0
20715
20716          /* Did the child fail?  (This shouldn't happen.)  */
20717          || status
20718
20719          /* Did the vfork/compiler bug occur?  */
20720          || parent != getpid()
20721
20722          /* Did the file descriptor bug occur?  */
20723          || fstat(fileno(stdout), &st) != 0
20724          );
20725   }
20726 }
20727 _ACEOF
20728 rm -f conftest$ac_exeext
20729 if { (eval echo "$as_me:20729: \"$ac_link\"") >&5
20730   (eval $ac_link) 2>&5
20731   ac_status=$?
20732   echo "$as_me:20732: \$? = $ac_status" >&5
20733   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20734   { (eval echo "$as_me:20734: \"$ac_try\"") >&5
20735   (eval $ac_try) 2>&5
20736   ac_status=$?
20737   echo "$as_me:20737: \$? = $ac_status" >&5
20738   (exit $ac_status); }; }; then
20739   ac_cv_func_vfork_works=yes
20740 else
20741   echo "$as_me: program exited with status $ac_status" >&5
20742 echo "$as_me: failed program was:" >&5
20743 cat conftest.$ac_ext >&5
20744 ac_cv_func_vfork_works=no
20745 fi
20746 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20747 fi
20748 fi
20749 echo "$as_me:20749: result: $ac_cv_func_vfork_works" >&5
20750 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20751
20752 fi;
20753 if test "x$ac_cv_func_fork_works" = xcross; then
20754   ac_cv_func_vfork_works=ac_cv_func_vfork
20755   { echo "$as_me:20755: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20756 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20757 fi
20758
20759 if test "x$ac_cv_func_vfork_works" = xyes; then
20760
20761 cat >>confdefs.h <<\EOF
20762 #define HAVE_WORKING_VFORK 1
20763 EOF
20764
20765 else
20766
20767 cat >>confdefs.h <<\EOF
20768 #define vfork fork
20769 EOF
20770
20771 fi
20772 if test "x$ac_cv_func_fork_works" = xyes; then
20773
20774 cat >>confdefs.h <<\EOF
20775 #define HAVE_WORKING_FORK 1
20776 EOF
20777
20778 fi
20779
20780 # special check for test/ditto.c
20781
20782 echo "$as_me:20782: checking for openpty in -lutil" >&5
20783 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20784 if test "${ac_cv_lib_util_openpty+set}" = set; then
20785   echo $ECHO_N "(cached) $ECHO_C" >&6
20786 else
20787   ac_check_lib_save_LIBS=$LIBS
20788 LIBS="-lutil  $LIBS"
20789 cat >conftest.$ac_ext <<_ACEOF
20790 #line 20790 "configure"
20791 #include "confdefs.h"
20792
20793 /* Override any gcc2 internal prototype to avoid an error.  */
20794 #ifdef __cplusplus
20795 extern "C"
20796 #endif
20797 /* We use char because int might match the return type of a gcc2
20798    builtin and then its argument prototype would still apply.  */
20799 char openpty ();
20800 int
20801 main (void)
20802 {
20803 openpty ();
20804   ;
20805   return 0;
20806 }
20807 _ACEOF
20808 rm -f conftest.$ac_objext conftest$ac_exeext
20809 if { (eval echo "$as_me:20809: \"$ac_link\"") >&5
20810   (eval $ac_link) 2>&5
20811   ac_status=$?
20812   echo "$as_me:20812: \$? = $ac_status" >&5
20813   (exit $ac_status); } &&
20814          { ac_try='test -s conftest$ac_exeext'
20815   { (eval echo "$as_me:20815: \"$ac_try\"") >&5
20816   (eval $ac_try) 2>&5
20817   ac_status=$?
20818   echo "$as_me:20818: \$? = $ac_status" >&5
20819   (exit $ac_status); }; }; then
20820   ac_cv_lib_util_openpty=yes
20821 else
20822   echo "$as_me: failed program was:" >&5
20823 cat conftest.$ac_ext >&5
20824 ac_cv_lib_util_openpty=no
20825 fi
20826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20827 LIBS=$ac_check_lib_save_LIBS
20828 fi
20829 echo "$as_me:20829: result: $ac_cv_lib_util_openpty" >&5
20830 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20831 if test $ac_cv_lib_util_openpty = yes; then
20832   cf_cv_lib_util=yes
20833 else
20834   cf_cv_lib_util=no
20835 fi
20836
20837 echo "$as_me:20837: checking for openpty header" >&5
20838 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20839 if test "${cf_cv_func_openpty+set}" = set; then
20840   echo $ECHO_N "(cached) $ECHO_C" >&6
20841 else
20842
20843         cf_save_LIBS="$LIBS"
20844         test $cf_cv_lib_util = yes && {
20845 cf_add_libs="-lutil"
20846 # Filter out duplicates - this happens with badly-designed ".pc" files...
20847 for cf_add_1lib in $LIBS
20848 do
20849         for cf_add_2lib in $cf_add_libs
20850         do
20851                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20852                 then
20853                         cf_add_1lib=
20854                         break
20855                 fi
20856         done
20857         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20858 done
20859 LIBS="$cf_add_libs"
20860  }
20861         for cf_header in pty.h libutil.h util.h
20862         do
20863         cat >conftest.$ac_ext <<_ACEOF
20864 #line 20864 "configure"
20865 #include "confdefs.h"
20866
20867 #include <$cf_header>
20868
20869 int
20870 main (void)
20871 {
20872
20873         int x = openpty((int *)0, (int *)0, (char *)0,
20874                                    (struct termios *)0, (struct winsize *)0);
20875
20876   ;
20877   return 0;
20878 }
20879 _ACEOF
20880 rm -f conftest.$ac_objext conftest$ac_exeext
20881 if { (eval echo "$as_me:20881: \"$ac_link\"") >&5
20882   (eval $ac_link) 2>&5
20883   ac_status=$?
20884   echo "$as_me:20884: \$? = $ac_status" >&5
20885   (exit $ac_status); } &&
20886          { ac_try='test -s conftest$ac_exeext'
20887   { (eval echo "$as_me:20887: \"$ac_try\"") >&5
20888   (eval $ac_try) 2>&5
20889   ac_status=$?
20890   echo "$as_me:20890: \$? = $ac_status" >&5
20891   (exit $ac_status); }; }; then
20892
20893                 cf_cv_func_openpty=$cf_header
20894                 break
20895
20896 else
20897   echo "$as_me: failed program was:" >&5
20898 cat conftest.$ac_ext >&5
20899
20900                 cf_cv_func_openpty=no
20901
20902 fi
20903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20904         done
20905         LIBS="$cf_save_LIBS"
20906
20907 fi
20908 echo "$as_me:20908: result: $cf_cv_func_openpty" >&5
20909 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20910
20911 if test "$cf_cv_func_openpty" != no ; then
20912
20913 cat >>confdefs.h <<EOF
20914 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20915 EOF
20916
20917 cat >>confdefs.h <<\EOF
20918 #define USE_XTERM_PTY 1
20919 EOF
20920
20921         if test "x$cf_cv_lib_util" = xyes ; then
20922
20923 cf_add_libs="-lutil"
20924 # Filter out duplicates - this happens with badly-designed ".pc" files...
20925 for cf_add_1lib in $TEST_LIBS
20926 do
20927         for cf_add_2lib in $cf_add_libs
20928         do
20929                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20930                 then
20931                         cf_add_1lib=
20932                         break
20933                 fi
20934         done
20935         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20936 done
20937 TEST_LIBS="$cf_add_libs"
20938
20939         fi
20940 fi
20941
20942 if test "$with_hashed_db" != no ; then
20943
20944 cat >>confdefs.h <<\EOF
20945 #define USE_HASHED_DB 1
20946 EOF
20947
20948 case $with_hashed_db in
20949 (yes|*able*)
20950         ;;
20951 (*)
20952         if test -d "$with_hashed_db" ; then
20953
20954 if test -n "$with_hashed_db/include" ; then
20955   for cf_add_incdir in $with_hashed_db/include
20956   do
20957         while test $cf_add_incdir != /usr/include
20958         do
20959           if test -d $cf_add_incdir
20960           then
20961                 cf_have_incdir=no
20962                 if test -n "$CFLAGS$CPPFLAGS" ; then
20963                   # a loop is needed to ensure we can add subdirs of existing dirs
20964                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20965                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20966                           cf_have_incdir=yes; break
20967                         fi
20968                   done
20969                 fi
20970
20971                 if test "$cf_have_incdir" = no ; then
20972                   if test "$cf_add_incdir" = /usr/local/include ; then
20973                         if test "$GCC" = yes
20974                         then
20975                           cf_save_CPPFLAGS=$CPPFLAGS
20976
20977         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20978         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20979
20980                           cat >conftest.$ac_ext <<_ACEOF
20981 #line 20981 "configure"
20982 #include "confdefs.h"
20983 #include <stdio.h>
20984 int
20985 main (void)
20986 {
20987 printf("Hello")
20988   ;
20989   return 0;
20990 }
20991 _ACEOF
20992 rm -f conftest.$ac_objext
20993 if { (eval echo "$as_me:20993: \"$ac_compile\"") >&5
20994   (eval $ac_compile) 2>&5
20995   ac_status=$?
20996   echo "$as_me:20996: \$? = $ac_status" >&5
20997   (exit $ac_status); } &&
20998          { ac_try='test -s conftest.$ac_objext'
20999   { (eval echo "$as_me:20999: \"$ac_try\"") >&5
21000   (eval $ac_try) 2>&5
21001   ac_status=$?
21002   echo "$as_me:21002: \$? = $ac_status" >&5
21003   (exit $ac_status); }; }; then
21004   :
21005 else
21006   echo "$as_me: failed program was:" >&5
21007 cat conftest.$ac_ext >&5
21008 cf_have_incdir=yes
21009 fi
21010 rm -f conftest.$ac_objext conftest.$ac_ext
21011                           CPPFLAGS=$cf_save_CPPFLAGS
21012                         fi
21013                   fi
21014                 fi
21015
21016                 if test "$cf_have_incdir" = no ; then
21017                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21018
21019 echo "${as_me:-configure}:21019: testing adding $cf_add_incdir to include-path ..." 1>&5
21020
21021                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21022
21023                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21024                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21025                   cf_add_incdir="$cf_top_incdir"
21026                 else
21027                   break
21028                 fi
21029           else
21030                 break
21031           fi
21032         done
21033   done
21034 fi
21035
21036 if test -n "$with_hashed_db/lib" ; then
21037         for cf_add_libdir in $with_hashed_db/lib
21038         do
21039                 if test $cf_add_libdir = /usr/lib ; then
21040                         :
21041                 elif test -d $cf_add_libdir
21042                 then
21043                         cf_have_libdir=no
21044                         if test -n "$LDFLAGS$LIBS" ; then
21045                                 # a loop is needed to ensure we can add subdirs of existing dirs
21046                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21047                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21048                                                 cf_have_libdir=yes; break
21049                                         fi
21050                                 done
21051                         fi
21052                         if test "$cf_have_libdir" = no ; then
21053                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21054
21055 echo "${as_me:-configure}:21055: testing adding $cf_add_libdir to library-path ..." 1>&5
21056
21057                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21058                         fi
21059                 fi
21060         done
21061 fi
21062
21063         else
21064                 case "$with_hashed_db" in
21065                 (./*|../*|/*)
21066                         { echo "$as_me:21066: WARNING: no such directory $with_hashed_db" >&5
21067 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21068                         ;;
21069                 (*)
21070
21071 cf_search=
21072
21073 test "x$prefix" != "xNONE" && \
21074 test -d "$prefix" && \
21075  {
21076         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21077         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21078         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21079         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21080         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21081         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21082 }
21083
21084 for cf_subdir_prefix in \
21085         /usr \
21086         /usr/local \
21087         /usr/pkg \
21088         /opt \
21089         /opt/local \
21090         $HOME
21091 do
21092
21093 test "x$cf_subdir_prefix" != "x$prefix" && \
21094 test -d "$cf_subdir_prefix" && \
21095 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21096         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21097         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21098         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21099         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21100         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21101         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"
21102 }
21103
21104 done
21105
21106         for cf_item in $cf_search
21107         do
21108                 case $cf_item in
21109                 (*/$with_hashed_db)
21110
21111 if test -n "$cf_item" ; then
21112   for cf_add_incdir in $cf_item
21113   do
21114         while test $cf_add_incdir != /usr/include
21115         do
21116           if test -d $cf_add_incdir
21117           then
21118                 cf_have_incdir=no
21119                 if test -n "$CFLAGS$CPPFLAGS" ; then
21120                   # a loop is needed to ensure we can add subdirs of existing dirs
21121                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21122                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21123                           cf_have_incdir=yes; break
21124                         fi
21125                   done
21126                 fi
21127
21128                 if test "$cf_have_incdir" = no ; then
21129                   if test "$cf_add_incdir" = /usr/local/include ; then
21130                         if test "$GCC" = yes
21131                         then
21132                           cf_save_CPPFLAGS=$CPPFLAGS
21133
21134         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21135         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21136
21137                           cat >conftest.$ac_ext <<_ACEOF
21138 #line 21138 "configure"
21139 #include "confdefs.h"
21140 #include <stdio.h>
21141 int
21142 main (void)
21143 {
21144 printf("Hello")
21145   ;
21146   return 0;
21147 }
21148 _ACEOF
21149 rm -f conftest.$ac_objext
21150 if { (eval echo "$as_me:21150: \"$ac_compile\"") >&5
21151   (eval $ac_compile) 2>&5
21152   ac_status=$?
21153   echo "$as_me:21153: \$? = $ac_status" >&5
21154   (exit $ac_status); } &&
21155          { ac_try='test -s conftest.$ac_objext'
21156   { (eval echo "$as_me:21156: \"$ac_try\"") >&5
21157   (eval $ac_try) 2>&5
21158   ac_status=$?
21159   echo "$as_me:21159: \$? = $ac_status" >&5
21160   (exit $ac_status); }; }; then
21161   :
21162 else
21163   echo "$as_me: failed program was:" >&5
21164 cat conftest.$ac_ext >&5
21165 cf_have_incdir=yes
21166 fi
21167 rm -f conftest.$ac_objext conftest.$ac_ext
21168                           CPPFLAGS=$cf_save_CPPFLAGS
21169                         fi
21170                   fi
21171                 fi
21172
21173                 if test "$cf_have_incdir" = no ; then
21174                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21175
21176 echo "${as_me:-configure}:21176: testing adding $cf_add_incdir to include-path ..." 1>&5
21177
21178                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21179
21180                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21181                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21182                   cf_add_incdir="$cf_top_incdir"
21183                 else
21184                   break
21185                 fi
21186           else
21187                 break
21188           fi
21189         done
21190   done
21191 fi
21192
21193                         ;;
21194                 esac
21195         done
21196
21197 cf_search=
21198
21199 test "x$prefix" != "xNONE" && \
21200 test -d "$prefix" && \
21201  {
21202         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21203         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21204         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21205         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21206         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21207         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21208 }
21209
21210 for cf_subdir_prefix in \
21211         /usr \
21212         /usr/local \
21213         /usr/pkg \
21214         /opt \
21215         /opt/local \
21216         $HOME
21217 do
21218
21219 test "x$cf_subdir_prefix" != "x$prefix" && \
21220 test -d "$cf_subdir_prefix" && \
21221 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21222         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21223         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21224         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21225         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21226         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21227         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"
21228 }
21229
21230 done
21231
21232         for cf_item in $cf_search
21233         do
21234                 case $cf_item in
21235                 (*/$with_hashed_db)
21236
21237 if test -n "$cf_item" ; then
21238         for cf_add_libdir in $cf_item
21239         do
21240                 if test $cf_add_libdir = /usr/lib ; then
21241                         :
21242                 elif test -d $cf_add_libdir
21243                 then
21244                         cf_have_libdir=no
21245                         if test -n "$LDFLAGS$LIBS" ; then
21246                                 # a loop is needed to ensure we can add subdirs of existing dirs
21247                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21248                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21249                                                 cf_have_libdir=yes; break
21250                                         fi
21251                                 done
21252                         fi
21253                         if test "$cf_have_libdir" = no ; then
21254                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21255
21256 echo "${as_me:-configure}:21256: testing adding $cf_add_libdir to library-path ..." 1>&5
21257
21258                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21259                         fi
21260                 fi
21261         done
21262 fi
21263
21264                         ;;
21265                 esac
21266         done
21267
21268                         ;;
21269                 esac
21270         fi
21271 esac
21272
21273 echo "$as_me:21273: checking for db.h" >&5
21274 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21275 if test "${ac_cv_header_db_h+set}" = set; then
21276   echo $ECHO_N "(cached) $ECHO_C" >&6
21277 else
21278   cat >conftest.$ac_ext <<_ACEOF
21279 #line 21279 "configure"
21280 #include "confdefs.h"
21281 #include <db.h>
21282 _ACEOF
21283 if { (eval echo "$as_me:21283: \"$ac_cpp conftest.$ac_ext\"") >&5
21284   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21285   ac_status=$?
21286   egrep -v '^ *\+' conftest.er1 >conftest.err
21287   rm -f conftest.er1
21288   cat conftest.err >&5
21289   echo "$as_me:21289: \$? = $ac_status" >&5
21290   (exit $ac_status); } >/dev/null; then
21291   if test -s conftest.err; then
21292     ac_cpp_err=$ac_c_preproc_warn_flag
21293   else
21294     ac_cpp_err=
21295   fi
21296 else
21297   ac_cpp_err=yes
21298 fi
21299 if test -z "$ac_cpp_err"; then
21300   ac_cv_header_db_h=yes
21301 else
21302   echo "$as_me: failed program was:" >&5
21303   cat conftest.$ac_ext >&5
21304   ac_cv_header_db_h=no
21305 fi
21306 rm -f conftest.err conftest.$ac_ext
21307 fi
21308 echo "$as_me:21308: result: $ac_cv_header_db_h" >&5
21309 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21310 if test $ac_cv_header_db_h = yes; then
21311
21312 echo "$as_me:21312: checking for version of db" >&5
21313 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21314 if test "${cf_cv_hashed_db_version+set}" = set; then
21315   echo $ECHO_N "(cached) $ECHO_C" >&6
21316 else
21317
21318 cf_cv_hashed_db_version=unknown
21319
21320 for cf_db_version in 1 2 3 4 5 6
21321 do
21322
21323 echo "${as_me:-configure}:21323: testing checking for db version $cf_db_version ..." 1>&5
21324
21325         cat >conftest.$ac_ext <<_ACEOF
21326 #line 21326 "configure"
21327 #include "confdefs.h"
21328
21329 $ac_includes_default
21330 #include <db.h>
21331
21332 #ifdef DB_VERSION_MAJOR
21333         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21334 #if $cf_db_version == DB_VERSION_MAJOR
21335         /* ok */
21336 #else
21337         make an error
21338 #endif
21339 #else
21340 #if $cf_db_version == 1
21341         /* ok: assuming this is DB 1.8.5 */
21342 #else
21343         make an error
21344 #endif
21345 #endif
21346
21347 int
21348 main (void)
21349 {
21350 DBT *foo = 0
21351   ;
21352   return 0;
21353 }
21354 _ACEOF
21355 rm -f conftest.$ac_objext
21356 if { (eval echo "$as_me:21356: \"$ac_compile\"") >&5
21357   (eval $ac_compile) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit $ac_status); } &&
21361          { ac_try='test -s conftest.$ac_objext'
21362   { (eval echo "$as_me:21362: \"$ac_try\"") >&5
21363   (eval $ac_try) 2>&5
21364   ac_status=$?
21365   echo "$as_me:21365: \$? = $ac_status" >&5
21366   (exit $ac_status); }; }; then
21367
21368         cf_cv_hashed_db_version=$cf_db_version
21369         break
21370
21371 else
21372   echo "$as_me: failed program was:" >&5
21373 cat conftest.$ac_ext >&5
21374 fi
21375 rm -f conftest.$ac_objext conftest.$ac_ext
21376 done
21377
21378 fi
21379 echo "$as_me:21379: result: $cf_cv_hashed_db_version" >&5
21380 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21381
21382 if test "$cf_cv_hashed_db_version" = unknown ; then
21383         { { echo "$as_me:21383: error: Cannot determine version of db" >&5
21384 echo "$as_me: error: Cannot determine version of db" >&2;}
21385    { (exit 1); exit 1; }; }
21386 else
21387
21388 echo "$as_me:21388: checking for db libraries" >&5
21389 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21390 if test "${cf_cv_hashed_db_libs+set}" = set; then
21391   echo $ECHO_N "(cached) $ECHO_C" >&6
21392 else
21393
21394 cf_cv_hashed_db_libs=unknown
21395 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21396 do
21397         cf_save_libs="$LIBS"
21398         if test -n "$cf_db_libs"; then
21399
21400 cf_add_libs="-l$cf_db_libs"
21401 # Filter out duplicates - this happens with badly-designed ".pc" files...
21402 for cf_add_1lib in $LIBS
21403 do
21404         for cf_add_2lib in $cf_add_libs
21405         do
21406                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21407                 then
21408                         cf_add_1lib=
21409                         break
21410                 fi
21411         done
21412         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21413 done
21414 LIBS="$cf_add_libs"
21415
21416         fi
21417
21418 echo "${as_me:-configure}:21418: testing checking for library "$cf_db_libs" ..." 1>&5
21419
21420         cat >conftest.$ac_ext <<_ACEOF
21421 #line 21421 "configure"
21422 #include "confdefs.h"
21423
21424 $ac_includes_default
21425 #include <db.h>
21426
21427 int
21428 main (void)
21429 {
21430
21431         char *path = "/tmp/foo";
21432 #ifdef DB_VERSION_MAJOR
21433 #if DB_VERSION_MAJOR >= 4
21434         DB *result = 0;
21435         db_create(&result, NULL, 0);
21436         result->open(result,
21437                 NULL,
21438                 path,
21439                 path,
21440                 DB_HASH,
21441                 DB_CREATE,
21442                 0644);
21443 #elif DB_VERSION_MAJOR >= 3
21444         DB *result = 0;
21445         db_create(&result, NULL, 0);
21446         result->open(result,
21447                 path,
21448                 path,
21449                 DB_HASH,
21450                 DB_CREATE,
21451                 0644);
21452 #elif DB_VERSION_MAJOR >= 2
21453         DB *result = 0;
21454         db_open(path,
21455                 DB_HASH,
21456                 DB_CREATE,
21457                 0644,
21458                 (DB_ENV *) 0,
21459                 (DB_INFO *) 0,
21460                 &result);
21461 #endif /* DB_VERSION_MAJOR */
21462 #else
21463         DB *result = dbopen(path,
21464                      2,
21465                      0644,
21466                      DB_HASH,
21467                      0);
21468 #endif
21469         ${cf_cv_main_return:-return}(result != 0)
21470
21471   ;
21472   return 0;
21473 }
21474 _ACEOF
21475 rm -f conftest.$ac_objext conftest$ac_exeext
21476 if { (eval echo "$as_me:21476: \"$ac_link\"") >&5
21477   (eval $ac_link) 2>&5
21478   ac_status=$?
21479   echo "$as_me:21479: \$? = $ac_status" >&5
21480   (exit $ac_status); } &&
21481          { ac_try='test -s conftest$ac_exeext'
21482   { (eval echo "$as_me:21482: \"$ac_try\"") >&5
21483   (eval $ac_try) 2>&5
21484   ac_status=$?
21485   echo "$as_me:21485: \$? = $ac_status" >&5
21486   (exit $ac_status); }; }; then
21487
21488         if test -n "$cf_db_libs" ; then
21489                 cf_cv_hashed_db_libs=$cf_db_libs
21490         else
21491                 cf_cv_hashed_db_libs=default
21492         fi
21493         LIBS="$cf_save_libs"
21494         break
21495
21496 else
21497   echo "$as_me: failed program was:" >&5
21498 cat conftest.$ac_ext >&5
21499 fi
21500 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21501         LIBS="$cf_save_libs"
21502 done
21503
21504 fi
21505 echo "$as_me:21505: result: $cf_cv_hashed_db_libs" >&5
21506 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21507
21508         if test "$cf_cv_hashed_db_libs" = unknown ; then
21509                 { { echo "$as_me:21509: error: Cannot determine library for db" >&5
21510 echo "$as_me: error: Cannot determine library for db" >&2;}
21511    { (exit 1); exit 1; }; }
21512         elif test "$cf_cv_hashed_db_libs" != default ; then
21513
21514 cf_add_libs="-l$cf_cv_hashed_db_libs"
21515 # Filter out duplicates - this happens with badly-designed ".pc" files...
21516 for cf_add_1lib in $LIBS
21517 do
21518         for cf_add_2lib in $cf_add_libs
21519         do
21520                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21521                 then
21522                         cf_add_1lib=
21523                         break
21524                 fi
21525         done
21526         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21527 done
21528 LIBS="$cf_add_libs"
21529
21530         fi
21531 fi
21532
21533 else
21534
21535         { { echo "$as_me:21535: error: Cannot find db.h" >&5
21536 echo "$as_me: error: Cannot find db.h" >&2;}
21537    { (exit 1); exit 1; }; }
21538
21539 fi
21540
21541 fi
21542
21543 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21544         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21545         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21546 fi
21547
21548 # Just in case, check if the C compiler has a bool type.
21549
21550 echo "$as_me:21550: checking if we should include stdbool.h" >&5
21551 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21552
21553 if test "${cf_cv_header_stdbool_h+set}" = set; then
21554   echo $ECHO_N "(cached) $ECHO_C" >&6
21555 else
21556
21557         cat >conftest.$ac_ext <<_ACEOF
21558 #line 21558 "configure"
21559 #include "confdefs.h"
21560
21561 int
21562 main (void)
21563 {
21564 bool foo = false
21565   ;
21566   return 0;
21567 }
21568 _ACEOF
21569 rm -f conftest.$ac_objext
21570 if { (eval echo "$as_me:21570: \"$ac_compile\"") >&5
21571   (eval $ac_compile) 2>&5
21572   ac_status=$?
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit $ac_status); } &&
21575          { ac_try='test -s conftest.$ac_objext'
21576   { (eval echo "$as_me:21576: \"$ac_try\"") >&5
21577   (eval $ac_try) 2>&5
21578   ac_status=$?
21579   echo "$as_me:21579: \$? = $ac_status" >&5
21580   (exit $ac_status); }; }; then
21581   cf_cv_header_stdbool_h=0
21582 else
21583   echo "$as_me: failed program was:" >&5
21584 cat conftest.$ac_ext >&5
21585 cat >conftest.$ac_ext <<_ACEOF
21586 #line 21586 "configure"
21587 #include "confdefs.h"
21588
21589 #ifndef __BEOS__
21590 #include <stdbool.h>
21591 #endif
21592
21593 int
21594 main (void)
21595 {
21596 bool foo = false
21597   ;
21598   return 0;
21599 }
21600 _ACEOF
21601 rm -f conftest.$ac_objext
21602 if { (eval echo "$as_me:21602: \"$ac_compile\"") >&5
21603   (eval $ac_compile) 2>&5
21604   ac_status=$?
21605   echo "$as_me:21605: \$? = $ac_status" >&5
21606   (exit $ac_status); } &&
21607          { ac_try='test -s conftest.$ac_objext'
21608   { (eval echo "$as_me:21608: \"$ac_try\"") >&5
21609   (eval $ac_try) 2>&5
21610   ac_status=$?
21611   echo "$as_me:21611: \$? = $ac_status" >&5
21612   (exit $ac_status); }; }; then
21613   cf_cv_header_stdbool_h=1
21614 else
21615   echo "$as_me: failed program was:" >&5
21616 cat conftest.$ac_ext >&5
21617 cf_cv_header_stdbool_h=0
21618 fi
21619 rm -f conftest.$ac_objext conftest.$ac_ext
21620 fi
21621 rm -f conftest.$ac_objext conftest.$ac_ext
21622 fi
21623
21624 if test "$cf_cv_header_stdbool_h" = 1
21625 then    echo "$as_me:21625: result: yes" >&5
21626 echo "${ECHO_T}yes" >&6
21627 else    echo "$as_me:21627: result: no" >&5
21628 echo "${ECHO_T}no" >&6
21629 fi
21630
21631 echo "$as_me:21631: checking for builtin bool type" >&5
21632 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21633
21634 if test "${cf_cv_cc_bool_type+set}" = set; then
21635   echo $ECHO_N "(cached) $ECHO_C" >&6
21636 else
21637
21638         cat >conftest.$ac_ext <<_ACEOF
21639 #line 21639 "configure"
21640 #include "confdefs.h"
21641
21642 #include <stdio.h>
21643 #include <sys/types.h>
21644
21645 int
21646 main (void)
21647 {
21648 bool x = false
21649   ;
21650   return 0;
21651 }
21652 _ACEOF
21653 rm -f conftest.$ac_objext
21654 if { (eval echo "$as_me:21654: \"$ac_compile\"") >&5
21655   (eval $ac_compile) 2>&5
21656   ac_status=$?
21657   echo "$as_me:21657: \$? = $ac_status" >&5
21658   (exit $ac_status); } &&
21659          { ac_try='test -s conftest.$ac_objext'
21660   { (eval echo "$as_me:21660: \"$ac_try\"") >&5
21661   (eval $ac_try) 2>&5
21662   ac_status=$?
21663   echo "$as_me:21663: \$? = $ac_status" >&5
21664   (exit $ac_status); }; }; then
21665   cf_cv_cc_bool_type=1
21666 else
21667   echo "$as_me: failed program was:" >&5
21668 cat conftest.$ac_ext >&5
21669 cf_cv_cc_bool_type=0
21670 fi
21671 rm -f conftest.$ac_objext conftest.$ac_ext
21672
21673 fi
21674
21675 if test "$cf_cv_cc_bool_type" = 1
21676 then    echo "$as_me:21676: result: yes" >&5
21677 echo "${ECHO_T}yes" >&6
21678 else    echo "$as_me:21678: result: no" >&5
21679 echo "${ECHO_T}no" >&6
21680 fi
21681
21682 # Check for C++ compiler characteristics (and ensure that it's there!)
21683 if test -n "$CXX" ; then
21684         ac_ext=cc
21685 ac_cpp='$CXXCPP $CPPFLAGS'
21686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21687 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21689 ac_main_return=return
21690
21691 if test -n "$GXX" ; then
21692
21693         cf_save="$LIBS"
21694         LIBS="$LIBS $CXXLIBS"
21695         echo "$as_me:21695: checking if we already have C++ library" >&5
21696 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21697         cat >conftest.$ac_ext <<_ACEOF
21698 #line 21698 "configure"
21699 #include "confdefs.h"
21700
21701                         #include <iostream>
21702 int
21703 main (void)
21704 {
21705
21706                         std::cout << "Hello World!" << std::endl;
21707   ;
21708   return 0;
21709 }
21710 _ACEOF
21711 rm -f conftest.$ac_objext conftest$ac_exeext
21712 if { (eval echo "$as_me:21712: \"$ac_link\"") >&5
21713   (eval $ac_link) 2>&5
21714   ac_status=$?
21715   echo "$as_me:21715: \$? = $ac_status" >&5
21716   (exit $ac_status); } &&
21717          { ac_try='test -s conftest$ac_exeext'
21718   { (eval echo "$as_me:21718: \"$ac_try\"") >&5
21719   (eval $ac_try) 2>&5
21720   ac_status=$?
21721   echo "$as_me:21721: \$? = $ac_status" >&5
21722   (exit $ac_status); }; }; then
21723   cf_have_libstdcpp=yes
21724 else
21725   echo "$as_me: failed program was:" >&5
21726 cat conftest.$ac_ext >&5
21727 cf_have_libstdcpp=no
21728 fi
21729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21730         echo "$as_me:21730: result: $cf_have_libstdcpp" >&5
21731 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21732         LIBS="$cf_save"
21733
21734         if test $cf_have_libstdcpp != yes
21735         then
21736                 case $cf_cv_system_name in
21737                 (os2*)
21738                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21739                                 cf_stdcpp_libname=stdcpp
21740                         else
21741                                 cf_stdcpp_libname=stdc++
21742                         fi
21743                         ;;
21744                 (*)
21745                         cf_stdcpp_libname=stdc++
21746                         ;;
21747                 esac
21748
21749                 echo "$as_me:21749: checking for library $cf_stdcpp_libname" >&5
21750 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21751 if test "${cf_cv_libstdcpp+set}" = set; then
21752   echo $ECHO_N "(cached) $ECHO_C" >&6
21753 else
21754
21755                         cf_save="$LIBS"
21756                         LIBS="$LIBS $CXXLIBS"
21757
21758 cf_add_libs="-l$cf_stdcpp_libname"
21759 # Filter out duplicates - this happens with badly-designed ".pc" files...
21760 for cf_add_1lib in $LIBS
21761 do
21762         for cf_add_2lib in $cf_add_libs
21763         do
21764                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21765                 then
21766                         cf_add_1lib=
21767                         break
21768                 fi
21769         done
21770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21771 done
21772 LIBS="$cf_add_libs"
21773
21774                 cat >conftest.$ac_ext <<_ACEOF
21775 #line 21775 "configure"
21776 #include "confdefs.h"
21777
21778                                 #include <iostream>
21779 int
21780 main (void)
21781 {
21782
21783                                 std::cout << "Hello World!" << std::endl;
21784   ;
21785   return 0;
21786 }
21787 _ACEOF
21788 rm -f conftest.$ac_objext conftest$ac_exeext
21789 if { (eval echo "$as_me:21789: \"$ac_link\"") >&5
21790   (eval $ac_link) 2>&5
21791   ac_status=$?
21792   echo "$as_me:21792: \$? = $ac_status" >&5
21793   (exit $ac_status); } &&
21794          { ac_try='test -s conftest$ac_exeext'
21795   { (eval echo "$as_me:21795: \"$ac_try\"") >&5
21796   (eval $ac_try) 2>&5
21797   ac_status=$?
21798   echo "$as_me:21798: \$? = $ac_status" >&5
21799   (exit $ac_status); }; }; then
21800   cf_cv_libstdcpp=yes
21801 else
21802   echo "$as_me: failed program was:" >&5
21803 cat conftest.$ac_ext >&5
21804 cf_cv_libstdcpp=no
21805 fi
21806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21807                         LIBS="$cf_save"
21808
21809 fi
21810 echo "$as_me:21810: result: $cf_cv_libstdcpp" >&5
21811 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21812                 test "$cf_cv_libstdcpp" = yes && {
21813 cf_add_libs="-l$cf_stdcpp_libname"
21814 # Filter out duplicates - this happens with badly-designed ".pc" files...
21815 for cf_add_1lib in $CXXLIBS
21816 do
21817         for cf_add_2lib in $cf_add_libs
21818         do
21819                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21820                 then
21821                         cf_add_1lib=
21822                         break
21823                 fi
21824         done
21825         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21826 done
21827 CXXLIBS="$cf_add_libs"
21828  }
21829         fi
21830 fi
21831
21832         echo "$as_me:21832: checking whether $CXX understands -c and -o together" >&5
21833 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21834 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21835   echo $ECHO_N "(cached) $ECHO_C" >&6
21836 else
21837
21838 cat > conftest.$ac_ext <<CF_EOF
21839 int main(void)
21840 {
21841         ${cf_cv_main_return:-return}(0);
21842 }
21843 CF_EOF
21844 # We do the test twice because some compilers refuse to overwrite an
21845 # existing .o file with -o, though they will create one.
21846 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21847 if { (eval echo "$as_me:21847: \"$ac_try\"") >&5
21848   (eval $ac_try) 2>&5
21849   ac_status=$?
21850   echo "$as_me:21850: \$? = $ac_status" >&5
21851   (exit $ac_status); } &&
21852   test -f conftest2.$ac_objext && { (eval echo "$as_me:21852: \"$ac_try\"") >&5
21853   (eval $ac_try) 2>&5
21854   ac_status=$?
21855   echo "$as_me:21855: \$? = $ac_status" >&5
21856   (exit $ac_status); };
21857 then
21858   eval cf_cv_prog_CXX_c_o=yes
21859 else
21860   eval cf_cv_prog_CXX_c_o=no
21861 fi
21862 rm -rf conftest*
21863
21864 fi
21865 if test $cf_cv_prog_CXX_c_o = yes; then
21866   echo "$as_me:21866: result: yes" >&5
21867 echo "${ECHO_T}yes" >&6
21868 else
21869   echo "$as_me:21869: result: no" >&5
21870 echo "${ECHO_T}no" >&6
21871 fi
21872
21873         case $GXX_VERSION in
21874         (1*|2.0-6*)
21875                 cf_cxx_library=yes
21876                 ;;
21877         (*-2.7*|2.7*)
21878
21879 cf_cxx_library=unknown
21880 case $cf_cv_system_name in
21881 (os2*)
21882         cf_gpp_libname=gpp
21883         ;;
21884 (*)
21885         cf_gpp_libname=g++
21886         ;;
21887 esac
21888 if test "$GXX" = yes; then
21889         echo "$as_me:21889: checking for lib$cf_gpp_libname" >&5
21890 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21891         cf_save="$LIBS"
21892
21893 cf_add_libs="-l$cf_gpp_libname"
21894 # Filter out duplicates - this happens with badly-designed ".pc" files...
21895 for cf_add_1lib in $LIBS
21896 do
21897         for cf_add_2lib in $cf_add_libs
21898         do
21899                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21900                 then
21901                         cf_add_1lib=
21902                         break
21903                 fi
21904         done
21905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21906 done
21907 LIBS="$cf_add_libs"
21908
21909         cat >conftest.$ac_ext <<_ACEOF
21910 #line 21910 "configure"
21911 #include "confdefs.h"
21912
21913 #include <$cf_gpp_libname/builtin.h>
21914
21915 int
21916 main (void)
21917 {
21918 two_arg_error_handler_t foo2 = lib_error_handler
21919   ;
21920   return 0;
21921 }
21922 _ACEOF
21923 rm -f conftest.$ac_objext conftest$ac_exeext
21924 if { (eval echo "$as_me:21924: \"$ac_link\"") >&5
21925   (eval $ac_link) 2>&5
21926   ac_status=$?
21927   echo "$as_me:21927: \$? = $ac_status" >&5
21928   (exit $ac_status); } &&
21929          { ac_try='test -s conftest$ac_exeext'
21930   { (eval echo "$as_me:21930: \"$ac_try\"") >&5
21931   (eval $ac_try) 2>&5
21932   ac_status=$?
21933   echo "$as_me:21933: \$? = $ac_status" >&5
21934   (exit $ac_status); }; }; then
21935   cf_cxx_library=yes
21936
21937 cf_add_libs="-l$cf_gpp_libname"
21938 # Filter out duplicates - this happens with badly-designed ".pc" files...
21939 for cf_add_1lib in $CXXLIBS
21940 do
21941         for cf_add_2lib in $cf_add_libs
21942         do
21943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21944                 then
21945                         cf_add_1lib=
21946                         break
21947                 fi
21948         done
21949         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21950 done
21951 CXXLIBS="$cf_add_libs"
21952
21953          if test "$cf_gpp_libname" = cpp ; then
21954
21955 cat >>confdefs.h <<\EOF
21956 #define HAVE_GPP_BUILTIN_H 1
21957 EOF
21958
21959          else
21960
21961 cat >>confdefs.h <<\EOF
21962 #define HAVE_GXX_BUILTIN_H 1
21963 EOF
21964
21965          fi
21966 else
21967   echo "$as_me: failed program was:" >&5
21968 cat conftest.$ac_ext >&5
21969 cat >conftest.$ac_ext <<_ACEOF
21970 #line 21970 "configure"
21971 #include "confdefs.h"
21972
21973 #include <builtin.h>
21974
21975 int
21976 main (void)
21977 {
21978 two_arg_error_handler_t foo2 = lib_error_handler
21979   ;
21980   return 0;
21981 }
21982 _ACEOF
21983 rm -f conftest.$ac_objext conftest$ac_exeext
21984 if { (eval echo "$as_me:21984: \"$ac_link\"") >&5
21985   (eval $ac_link) 2>&5
21986   ac_status=$?
21987   echo "$as_me:21987: \$? = $ac_status" >&5
21988   (exit $ac_status); } &&
21989          { ac_try='test -s conftest$ac_exeext'
21990   { (eval echo "$as_me:21990: \"$ac_try\"") >&5
21991   (eval $ac_try) 2>&5
21992   ac_status=$?
21993   echo "$as_me:21993: \$? = $ac_status" >&5
21994   (exit $ac_status); }; }; then
21995   cf_cxx_library=yes
21996
21997 cf_add_libs="-l$cf_gpp_libname"
21998 # Filter out duplicates - this happens with badly-designed ".pc" files...
21999 for cf_add_1lib in $CXXLIBS
22000 do
22001         for cf_add_2lib in $cf_add_libs
22002         do
22003                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22004                 then
22005                         cf_add_1lib=
22006                         break
22007                 fi
22008         done
22009         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22010 done
22011 CXXLIBS="$cf_add_libs"
22012
22013 cat >>confdefs.h <<\EOF
22014 #define HAVE_BUILTIN_H 1
22015 EOF
22016
22017 else
22018   echo "$as_me: failed program was:" >&5
22019 cat conftest.$ac_ext >&5
22020 cf_cxx_library=no
22021 fi
22022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22023 fi
22024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22025         LIBS="$cf_save"
22026         echo "$as_me:22026: result: $cf_cxx_library" >&5
22027 echo "${ECHO_T}$cf_cxx_library" >&6
22028 fi
22029
22030                 ;;
22031         (*)
22032                 cf_cxx_library=no
22033                 ;;
22034         esac
22035
22036         ac_ext=cc
22037 ac_cpp='$CXXCPP $CPPFLAGS'
22038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22041 ac_main_return=return
22042 echo "$as_me:22042: checking how to run the C++ preprocessor" >&5
22043 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22044 if test -z "$CXXCPP"; then
22045   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22046   echo $ECHO_N "(cached) $ECHO_C" >&6
22047 else
22048       # Double quotes because CXXCPP needs to be expanded
22049     for CXXCPP in "$CXX -E" "/lib/cpp"
22050     do
22051       ac_preproc_ok=false
22052 for ac_cxx_preproc_warn_flag in '' yes
22053 do
22054   # Use a header file that comes with gcc, so configuring glibc
22055   # with a fresh cross-compiler works.
22056   # On the NeXT, cc -E runs the code through the compiler's parser,
22057   # not just through cpp. "Syntax error" is here to catch this case.
22058   cat >conftest.$ac_ext <<_ACEOF
22059 #line 22059 "configure"
22060 #include "confdefs.h"
22061 #include <assert.h>
22062                      Syntax error
22063 _ACEOF
22064 if { (eval echo "$as_me:22064: \"$ac_cpp conftest.$ac_ext\"") >&5
22065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22066   ac_status=$?
22067   egrep -v '^ *\+' conftest.er1 >conftest.err
22068   rm -f conftest.er1
22069   cat conftest.err >&5
22070   echo "$as_me:22070: \$? = $ac_status" >&5
22071   (exit $ac_status); } >/dev/null; then
22072   if test -s conftest.err; then
22073     ac_cpp_err=$ac_cxx_preproc_warn_flag
22074   else
22075     ac_cpp_err=
22076   fi
22077 else
22078   ac_cpp_err=yes
22079 fi
22080 if test -z "$ac_cpp_err"; then
22081   :
22082 else
22083   echo "$as_me: failed program was:" >&5
22084   cat conftest.$ac_ext >&5
22085   # Broken: fails on valid input.
22086 continue
22087 fi
22088 rm -f conftest.err conftest.$ac_ext
22089
22090   # OK, works on sane cases.  Now check whether non-existent headers
22091   # can be detected and how.
22092   cat >conftest.$ac_ext <<_ACEOF
22093 #line 22093 "configure"
22094 #include "confdefs.h"
22095 #include <ac_nonexistent.h>
22096 _ACEOF
22097 if { (eval echo "$as_me:22097: \"$ac_cpp conftest.$ac_ext\"") >&5
22098   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22099   ac_status=$?
22100   egrep -v '^ *\+' conftest.er1 >conftest.err
22101   rm -f conftest.er1
22102   cat conftest.err >&5
22103   echo "$as_me:22103: \$? = $ac_status" >&5
22104   (exit $ac_status); } >/dev/null; then
22105   if test -s conftest.err; then
22106     ac_cpp_err=$ac_cxx_preproc_warn_flag
22107   else
22108     ac_cpp_err=
22109   fi
22110 else
22111   ac_cpp_err=yes
22112 fi
22113 if test -z "$ac_cpp_err"; then
22114   # Broken: success on invalid input.
22115 continue
22116 else
22117   echo "$as_me: failed program was:" >&5
22118   cat conftest.$ac_ext >&5
22119   # Passes both tests.
22120 ac_preproc_ok=:
22121 break
22122 fi
22123 rm -f conftest.err conftest.$ac_ext
22124
22125 done
22126 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22127 rm -f conftest.err conftest.$ac_ext
22128 if $ac_preproc_ok; then
22129   break
22130 fi
22131
22132     done
22133     ac_cv_prog_CXXCPP=$CXXCPP
22134
22135 fi
22136   CXXCPP=$ac_cv_prog_CXXCPP
22137 else
22138   ac_cv_prog_CXXCPP=$CXXCPP
22139 fi
22140 echo "$as_me:22140: result: $CXXCPP" >&5
22141 echo "${ECHO_T}$CXXCPP" >&6
22142 ac_preproc_ok=false
22143 for ac_cxx_preproc_warn_flag in '' yes
22144 do
22145   # Use a header file that comes with gcc, so configuring glibc
22146   # with a fresh cross-compiler works.
22147   # On the NeXT, cc -E runs the code through the compiler's parser,
22148   # not just through cpp. "Syntax error" is here to catch this case.
22149   cat >conftest.$ac_ext <<_ACEOF
22150 #line 22150 "configure"
22151 #include "confdefs.h"
22152 #include <assert.h>
22153                      Syntax error
22154 _ACEOF
22155 if { (eval echo "$as_me:22155: \"$ac_cpp conftest.$ac_ext\"") >&5
22156   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22157   ac_status=$?
22158   egrep -v '^ *\+' conftest.er1 >conftest.err
22159   rm -f conftest.er1
22160   cat conftest.err >&5
22161   echo "$as_me:22161: \$? = $ac_status" >&5
22162   (exit $ac_status); } >/dev/null; then
22163   if test -s conftest.err; then
22164     ac_cpp_err=$ac_cxx_preproc_warn_flag
22165   else
22166     ac_cpp_err=
22167   fi
22168 else
22169   ac_cpp_err=yes
22170 fi
22171 if test -z "$ac_cpp_err"; then
22172   :
22173 else
22174   echo "$as_me: failed program was:" >&5
22175   cat conftest.$ac_ext >&5
22176   # Broken: fails on valid input.
22177 continue
22178 fi
22179 rm -f conftest.err conftest.$ac_ext
22180
22181   # OK, works on sane cases.  Now check whether non-existent headers
22182   # can be detected and how.
22183   cat >conftest.$ac_ext <<_ACEOF
22184 #line 22184 "configure"
22185 #include "confdefs.h"
22186 #include <ac_nonexistent.h>
22187 _ACEOF
22188 if { (eval echo "$as_me:22188: \"$ac_cpp conftest.$ac_ext\"") >&5
22189   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22190   ac_status=$?
22191   egrep -v '^ *\+' conftest.er1 >conftest.err
22192   rm -f conftest.er1
22193   cat conftest.err >&5
22194   echo "$as_me:22194: \$? = $ac_status" >&5
22195   (exit $ac_status); } >/dev/null; then
22196   if test -s conftest.err; then
22197     ac_cpp_err=$ac_cxx_preproc_warn_flag
22198   else
22199     ac_cpp_err=
22200   fi
22201 else
22202   ac_cpp_err=yes
22203 fi
22204 if test -z "$ac_cpp_err"; then
22205   # Broken: success on invalid input.
22206 continue
22207 else
22208   echo "$as_me: failed program was:" >&5
22209   cat conftest.$ac_ext >&5
22210   # Passes both tests.
22211 ac_preproc_ok=:
22212 break
22213 fi
22214 rm -f conftest.err conftest.$ac_ext
22215
22216 done
22217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22218 rm -f conftest.err conftest.$ac_ext
22219 if $ac_preproc_ok; then
22220   :
22221 else
22222   { { echo "$as_me:22222: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22223 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22224    { (exit 1); exit 1; }; }
22225 fi
22226
22227 ac_ext=cc
22228 ac_cpp='$CXXCPP $CPPFLAGS'
22229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22232 ac_main_return=return
22233
22234 for ac_header in typeinfo
22235 do
22236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22237 echo "$as_me:22237: checking for $ac_header" >&5
22238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22240   echo $ECHO_N "(cached) $ECHO_C" >&6
22241 else
22242   cat >conftest.$ac_ext <<_ACEOF
22243 #line 22243 "configure"
22244 #include "confdefs.h"
22245 #include <$ac_header>
22246 _ACEOF
22247 if { (eval echo "$as_me:22247: \"$ac_cpp conftest.$ac_ext\"") >&5
22248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22249   ac_status=$?
22250   egrep -v '^ *\+' conftest.er1 >conftest.err
22251   rm -f conftest.er1
22252   cat conftest.err >&5
22253   echo "$as_me:22253: \$? = $ac_status" >&5
22254   (exit $ac_status); } >/dev/null; then
22255   if test -s conftest.err; then
22256     ac_cpp_err=$ac_cxx_preproc_warn_flag
22257   else
22258     ac_cpp_err=
22259   fi
22260 else
22261   ac_cpp_err=yes
22262 fi
22263 if test -z "$ac_cpp_err"; then
22264   eval "$as_ac_Header=yes"
22265 else
22266   echo "$as_me: failed program was:" >&5
22267   cat conftest.$ac_ext >&5
22268   eval "$as_ac_Header=no"
22269 fi
22270 rm -f conftest.err conftest.$ac_ext
22271 fi
22272 echo "$as_me:22272: result: `eval echo '${'$as_ac_Header'}'`" >&5
22273 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22274 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22275   cat >>confdefs.h <<EOF
22276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22277 EOF
22278
22279 fi
22280 done
22281
22282 for ac_header in iostream
22283 do
22284 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22285 echo "$as_me:22285: checking for $ac_header" >&5
22286 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22287 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22288   echo $ECHO_N "(cached) $ECHO_C" >&6
22289 else
22290   cat >conftest.$ac_ext <<_ACEOF
22291 #line 22291 "configure"
22292 #include "confdefs.h"
22293 #include <$ac_header>
22294 _ACEOF
22295 if { (eval echo "$as_me:22295: \"$ac_cpp conftest.$ac_ext\"") >&5
22296   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22297   ac_status=$?
22298   egrep -v '^ *\+' conftest.er1 >conftest.err
22299   rm -f conftest.er1
22300   cat conftest.err >&5
22301   echo "$as_me:22301: \$? = $ac_status" >&5
22302   (exit $ac_status); } >/dev/null; then
22303   if test -s conftest.err; then
22304     ac_cpp_err=$ac_cxx_preproc_warn_flag
22305   else
22306     ac_cpp_err=
22307   fi
22308 else
22309   ac_cpp_err=yes
22310 fi
22311 if test -z "$ac_cpp_err"; then
22312   eval "$as_ac_Header=yes"
22313 else
22314   echo "$as_me: failed program was:" >&5
22315   cat conftest.$ac_ext >&5
22316   eval "$as_ac_Header=no"
22317 fi
22318 rm -f conftest.err conftest.$ac_ext
22319 fi
22320 echo "$as_me:22320: result: `eval echo '${'$as_ac_Header'}'`" >&5
22321 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22322 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22323   cat >>confdefs.h <<EOF
22324 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22325 EOF
22326
22327 fi
22328 done
22329
22330 if test x"$ac_cv_header_iostream" = xyes ; then
22331         echo "$as_me:22331: checking if iostream uses std-namespace" >&5
22332 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22333         cat >conftest.$ac_ext <<_ACEOF
22334 #line 22334 "configure"
22335 #include "confdefs.h"
22336
22337 #include <iostream>
22338 using std::endl;
22339 using std::cerr;
22340 int
22341 main (void)
22342 {
22343
22344 cerr << "testing" << endl;
22345
22346   ;
22347   return 0;
22348 }
22349 _ACEOF
22350 rm -f conftest.$ac_objext
22351 if { (eval echo "$as_me:22351: \"$ac_compile\"") >&5
22352   (eval $ac_compile) 2>&5
22353   ac_status=$?
22354   echo "$as_me:22354: \$? = $ac_status" >&5
22355   (exit $ac_status); } &&
22356          { ac_try='test -s conftest.$ac_objext'
22357   { (eval echo "$as_me:22357: \"$ac_try\"") >&5
22358   (eval $ac_try) 2>&5
22359   ac_status=$?
22360   echo "$as_me:22360: \$? = $ac_status" >&5
22361   (exit $ac_status); }; }; then
22362   cf_iostream_namespace=yes
22363 else
22364   echo "$as_me: failed program was:" >&5
22365 cat conftest.$ac_ext >&5
22366 cf_iostream_namespace=no
22367 fi
22368 rm -f conftest.$ac_objext conftest.$ac_ext
22369         echo "$as_me:22369: result: $cf_iostream_namespace" >&5
22370 echo "${ECHO_T}$cf_iostream_namespace" >&6
22371         if test "$cf_iostream_namespace" = yes ; then
22372
22373 cat >>confdefs.h <<\EOF
22374 #define IOSTREAM_NAMESPACE 1
22375 EOF
22376
22377         fi
22378 fi
22379
22380 echo "$as_me:22380: checking if we should include stdbool.h" >&5
22381 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22382
22383 if test "${cf_cv_header_stdbool_h+set}" = set; then
22384   echo $ECHO_N "(cached) $ECHO_C" >&6
22385 else
22386
22387         cat >conftest.$ac_ext <<_ACEOF
22388 #line 22388 "configure"
22389 #include "confdefs.h"
22390
22391 int
22392 main (void)
22393 {
22394 bool foo = false
22395   ;
22396   return 0;
22397 }
22398 _ACEOF
22399 rm -f conftest.$ac_objext
22400 if { (eval echo "$as_me:22400: \"$ac_compile\"") >&5
22401   (eval $ac_compile) 2>&5
22402   ac_status=$?
22403   echo "$as_me:22403: \$? = $ac_status" >&5
22404   (exit $ac_status); } &&
22405          { ac_try='test -s conftest.$ac_objext'
22406   { (eval echo "$as_me:22406: \"$ac_try\"") >&5
22407   (eval $ac_try) 2>&5
22408   ac_status=$?
22409   echo "$as_me:22409: \$? = $ac_status" >&5
22410   (exit $ac_status); }; }; then
22411   cf_cv_header_stdbool_h=0
22412 else
22413   echo "$as_me: failed program was:" >&5
22414 cat conftest.$ac_ext >&5
22415 cat >conftest.$ac_ext <<_ACEOF
22416 #line 22416 "configure"
22417 #include "confdefs.h"
22418
22419 #ifndef __BEOS__
22420 #include <stdbool.h>
22421 #endif
22422
22423 int
22424 main (void)
22425 {
22426 bool foo = false
22427   ;
22428   return 0;
22429 }
22430 _ACEOF
22431 rm -f conftest.$ac_objext
22432 if { (eval echo "$as_me:22432: \"$ac_compile\"") >&5
22433   (eval $ac_compile) 2>&5
22434   ac_status=$?
22435   echo "$as_me:22435: \$? = $ac_status" >&5
22436   (exit $ac_status); } &&
22437          { ac_try='test -s conftest.$ac_objext'
22438   { (eval echo "$as_me:22438: \"$ac_try\"") >&5
22439   (eval $ac_try) 2>&5
22440   ac_status=$?
22441   echo "$as_me:22441: \$? = $ac_status" >&5
22442   (exit $ac_status); }; }; then
22443   cf_cv_header_stdbool_h=1
22444 else
22445   echo "$as_me: failed program was:" >&5
22446 cat conftest.$ac_ext >&5
22447 cf_cv_header_stdbool_h=0
22448 fi
22449 rm -f conftest.$ac_objext conftest.$ac_ext
22450 fi
22451 rm -f conftest.$ac_objext conftest.$ac_ext
22452 fi
22453
22454 if test "$cf_cv_header_stdbool_h" = 1
22455 then    echo "$as_me:22455: result: yes" >&5
22456 echo "${ECHO_T}yes" >&6
22457 else    echo "$as_me:22457: result: no" >&5
22458 echo "${ECHO_T}no" >&6
22459 fi
22460
22461 echo "$as_me:22461: checking for builtin bool type" >&5
22462 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22463
22464 if test "${cf_cv_builtin_bool+set}" = set; then
22465   echo $ECHO_N "(cached) $ECHO_C" >&6
22466 else
22467
22468         cat >conftest.$ac_ext <<_ACEOF
22469 #line 22469 "configure"
22470 #include "confdefs.h"
22471
22472 #include <stdio.h>
22473 #include <sys/types.h>
22474
22475 int
22476 main (void)
22477 {
22478 bool x = false
22479   ;
22480   return 0;
22481 }
22482 _ACEOF
22483 rm -f conftest.$ac_objext
22484 if { (eval echo "$as_me:22484: \"$ac_compile\"") >&5
22485   (eval $ac_compile) 2>&5
22486   ac_status=$?
22487   echo "$as_me:22487: \$? = $ac_status" >&5
22488   (exit $ac_status); } &&
22489          { ac_try='test -s conftest.$ac_objext'
22490   { (eval echo "$as_me:22490: \"$ac_try\"") >&5
22491   (eval $ac_try) 2>&5
22492   ac_status=$?
22493   echo "$as_me:22493: \$? = $ac_status" >&5
22494   (exit $ac_status); }; }; then
22495   cf_cv_builtin_bool=1
22496 else
22497   echo "$as_me: failed program was:" >&5
22498 cat conftest.$ac_ext >&5
22499 cf_cv_builtin_bool=0
22500 fi
22501 rm -f conftest.$ac_objext conftest.$ac_ext
22502
22503 fi
22504
22505 if test "$cf_cv_builtin_bool" = 1
22506 then    echo "$as_me:22506: result: yes" >&5
22507 echo "${ECHO_T}yes" >&6
22508 else    echo "$as_me:22508: result: no" >&5
22509 echo "${ECHO_T}no" >&6
22510 fi
22511
22512 echo "$as_me:22512: checking for size of bool" >&5
22513 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22514 if test "${cf_cv_type_of_bool+set}" = set; then
22515   echo $ECHO_N "(cached) $ECHO_C" >&6
22516 else
22517
22518         rm -f cf_test.out
22519         if test "$cross_compiling" = yes; then
22520   cf_cv_type_of_bool=unknown
22521 else
22522   cat >conftest.$ac_ext <<_ACEOF
22523 #line 22523 "configure"
22524 #include "confdefs.h"
22525
22526 #include <stdlib.h>
22527 #include <stdio.h>
22528
22529 #if defined(__cplusplus)
22530
22531 #ifdef HAVE_GXX_BUILTIN_H
22532 #include <g++/builtin.h>
22533 #elif HAVE_GPP_BUILTIN_H
22534 #include <gpp/builtin.h>
22535 #elif HAVE_BUILTIN_H
22536 #include <builtin.h>
22537 #endif
22538
22539 #else
22540
22541 #if $cf_cv_header_stdbool_h
22542 #include <stdbool.h>
22543 #endif
22544
22545 #endif
22546
22547 int main(void)
22548 {
22549         FILE *fp = fopen("cf_test.out", "w");
22550         if (fp != 0) {
22551                 bool x = true;
22552                 if ((bool)(-x) >= 0)
22553                         fputs("unsigned ", fp);
22554                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22555                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22556                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22557                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22558                 fclose(fp);
22559         }
22560         ${cf_cv_main_return:-return}(0);
22561 }
22562
22563 _ACEOF
22564 rm -f conftest$ac_exeext
22565 if { (eval echo "$as_me:22565: \"$ac_link\"") >&5
22566   (eval $ac_link) 2>&5
22567   ac_status=$?
22568   echo "$as_me:22568: \$? = $ac_status" >&5
22569   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22570   { (eval echo "$as_me:22570: \"$ac_try\"") >&5
22571   (eval $ac_try) 2>&5
22572   ac_status=$?
22573   echo "$as_me:22573: \$? = $ac_status" >&5
22574   (exit $ac_status); }; }; then
22575   cf_cv_type_of_bool=`cat cf_test.out`
22576                  if test -z "$cf_cv_type_of_bool"; then
22577                    cf_cv_type_of_bool=unknown
22578                  fi
22579 else
22580   echo "$as_me: program exited with status $ac_status" >&5
22581 echo "$as_me: failed program was:" >&5
22582 cat conftest.$ac_ext >&5
22583 cf_cv_type_of_bool=unknown
22584 fi
22585 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22586 fi
22587
22588 fi
22589
22590         rm -f cf_test.out
22591 echo "$as_me:22591: result: $cf_cv_type_of_bool" >&5
22592 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22593 if test "$cf_cv_type_of_bool" = unknown ; then
22594         case .$NCURSES_BOOL in
22595         (.auto|.) NCURSES_BOOL=unsigned;;
22596         esac
22597         { echo "$as_me:22597: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22598 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22599         cf_cv_type_of_bool=$NCURSES_BOOL
22600 fi
22601
22602 echo "$as_me:22602: checking for special defines needed for etip.h" >&5
22603 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22604 cf_save_CXXFLAGS="$CXXFLAGS"
22605 cf_result="none"
22606
22607 # etip.h includes ncurses.h which includes ncurses_dll.h
22608 # But ncurses_dll.h is generated - fix here.
22609 test -d include || mkdir include
22610 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
22611
22612 for cf_math in "" MATH_H
22613 do
22614 for cf_excp in "" MATH_EXCEPTION
22615 do
22616         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22617         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22618         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22619 cat >conftest.$ac_ext <<_ACEOF
22620 #line 22620 "configure"
22621 #include "confdefs.h"
22622
22623 #include <etip.h.in>
22624
22625 int
22626 main (void)
22627 {
22628
22629   ;
22630   return 0;
22631 }
22632 _ACEOF
22633 rm -f conftest.$ac_objext
22634 if { (eval echo "$as_me:22634: \"$ac_compile\"") >&5
22635   (eval $ac_compile) 2>&5
22636   ac_status=$?
22637   echo "$as_me:22637: \$? = $ac_status" >&5
22638   (exit $ac_status); } &&
22639          { ac_try='test -s conftest.$ac_objext'
22640   { (eval echo "$as_me:22640: \"$ac_try\"") >&5
22641   (eval $ac_try) 2>&5
22642   ac_status=$?
22643   echo "$as_me:22643: \$? = $ac_status" >&5
22644   (exit $ac_status); }; }; then
22645
22646         test -n "$cf_math" && cat >>confdefs.h <<EOF
22647 #define ETIP_NEEDS_${cf_math} 1
22648 EOF
22649
22650         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22651 #define ETIP_NEEDS_${cf_excp} 1
22652 EOF
22653
22654         cf_result="$cf_math $cf_excp"
22655         break 2
22656
22657 else
22658   echo "$as_me: failed program was:" >&5
22659 cat conftest.$ac_ext >&5
22660 fi
22661 rm -f conftest.$ac_objext conftest.$ac_ext
22662 done
22663 done
22664 echo "$as_me:22664: result: $cf_result" >&5
22665 echo "${ECHO_T}$cf_result" >&6
22666 CXXFLAGS="$cf_save_CXXFLAGS"
22667
22668 if test -n "$CXX"; then
22669 echo "$as_me:22669: checking if $CXX accepts parameter initialization" >&5
22670 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22671 if test "${cf_cv_cpp_param_init+set}" = set; then
22672   echo $ECHO_N "(cached) $ECHO_C" >&6
22673 else
22674
22675         ac_ext=cc
22676 ac_cpp='$CXXCPP $CPPFLAGS'
22677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22678 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22680 ac_main_return=return
22681
22682         if test "$cross_compiling" = yes; then
22683   cf_cv_cpp_param_init=unknown
22684 else
22685   cat >conftest.$ac_ext <<_ACEOF
22686 #line 22686 "configure"
22687 #include "confdefs.h"
22688
22689 class TEST {
22690 private:
22691         int value;
22692 public:
22693         TEST(int x = 1);
22694         ~TEST();
22695 };
22696
22697 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22698 {
22699         value = x;
22700 }
22701 int main(void) { }
22702
22703 _ACEOF
22704 rm -f conftest$ac_exeext
22705 if { (eval echo "$as_me:22705: \"$ac_link\"") >&5
22706   (eval $ac_link) 2>&5
22707   ac_status=$?
22708   echo "$as_me:22708: \$? = $ac_status" >&5
22709   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22710   { (eval echo "$as_me:22710: \"$ac_try\"") >&5
22711   (eval $ac_try) 2>&5
22712   ac_status=$?
22713   echo "$as_me:22713: \$? = $ac_status" >&5
22714   (exit $ac_status); }; }; then
22715   cf_cv_cpp_param_init=yes
22716 else
22717   echo "$as_me: program exited with status $ac_status" >&5
22718 echo "$as_me: failed program was:" >&5
22719 cat conftest.$ac_ext >&5
22720 cf_cv_cpp_param_init=no
22721 fi
22722 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22723 fi
22724         ac_ext=cc
22725 ac_cpp='$CXXCPP $CPPFLAGS'
22726 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22727 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22728 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22729 ac_main_return=return
22730
22731 fi
22732 echo "$as_me:22732: result: $cf_cv_cpp_param_init" >&5
22733 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22734 fi
22735 test "$cf_cv_cpp_param_init" = yes &&
22736 cat >>confdefs.h <<\EOF
22737 #define CPP_HAS_PARAM_INIT 1
22738 EOF
22739
22740 if test -n "$CXX"; then
22741
22742 echo "$as_me:22742: checking if $CXX accepts static_cast" >&5
22743 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22744 if test "${cf_cv_cpp_static_cast+set}" = set; then
22745   echo $ECHO_N "(cached) $ECHO_C" >&6
22746 else
22747
22748         ac_ext=cc
22749 ac_cpp='$CXXCPP $CPPFLAGS'
22750 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22751 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22752 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22753 ac_main_return=return
22754
22755         cat >conftest.$ac_ext <<_ACEOF
22756 #line 22756 "configure"
22757 #include "confdefs.h"
22758
22759 class NCursesPanel
22760 {
22761 public:
22762   NCursesPanel(int nlines,
22763                int ncols,
22764                int begin_y = 0,
22765                int begin_x = 0)
22766   {
22767   }
22768   NCursesPanel();
22769   ~NCursesPanel();
22770 };
22771
22772 template<class T> class NCursesUserPanel : public NCursesPanel
22773 {
22774 public:
22775   NCursesUserPanel (int nlines,
22776                     int ncols,
22777                     int begin_y = 0,
22778                     int begin_x = 0,
22779                     const T* p_UserData = static_cast<T*>(0))
22780     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22781   {
22782   };
22783   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22784   {
22785   };
22786
22787   virtual ~NCursesUserPanel() {};
22788 };
22789
22790 int
22791 main (void)
22792 {
22793
22794         const char* p_UserData = static_cast<char*>(0)
22795   ;
22796   return 0;
22797 }
22798 _ACEOF
22799 rm -f conftest.$ac_objext
22800 if { (eval echo "$as_me:22800: \"$ac_compile\"") >&5
22801   (eval $ac_compile) 2>&5
22802   ac_status=$?
22803   echo "$as_me:22803: \$? = $ac_status" >&5
22804   (exit $ac_status); } &&
22805          { ac_try='test -s conftest.$ac_objext'
22806   { (eval echo "$as_me:22806: \"$ac_try\"") >&5
22807   (eval $ac_try) 2>&5
22808   ac_status=$?
22809   echo "$as_me:22809: \$? = $ac_status" >&5
22810   (exit $ac_status); }; }; then
22811   cf_cv_cpp_static_cast=yes
22812 else
22813   echo "$as_me: failed program was:" >&5
22814 cat conftest.$ac_ext >&5
22815 cf_cv_cpp_static_cast=no
22816 fi
22817 rm -f conftest.$ac_objext conftest.$ac_ext
22818
22819         ac_ext=cc
22820 ac_cpp='$CXXCPP $CPPFLAGS'
22821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22822 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22824 ac_main_return=return
22825
22826 fi
22827 echo "$as_me:22827: result: $cf_cv_cpp_static_cast" >&5
22828 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22829
22830 fi
22831
22832 test "$cf_cv_cpp_static_cast" = yes &&
22833 cat >>confdefs.h <<\EOF
22834 #define CPP_HAS_STATIC_CAST 1
22835 EOF
22836
22837         CXX_AR='$(AR)'
22838         CXX_ARFLAGS='$(ARFLAGS)'
22839         case $cf_cv_system_name in
22840         (irix*)
22841             if test "$GXX" != yes ; then
22842                 CXX_AR='$(CXX)'
22843                 CXX_ARFLAGS='-ar -o'
22844             fi
22845             ;;
22846         (sco3.2v5*)
22847             CXXLDFLAGS="-u main"
22848             ;;
22849         (solaris2*)
22850             if test "$GXX" != yes ; then
22851                 CXX_AR='$(CXX)'
22852                 CXX_ARFLAGS='-xar -o'
22853             fi
22854             ;;
22855         esac
22856
22857 else
22858         cf_cxx_library=no
22859         cf_cv_builtin_bool=1
22860
22861         # Just because we are not configuring against C++ right now does not
22862         # mean that a user will not want to use C++.  Some distributors disable
22863         # the C++ portion of this configuration as a shortcut (or just to avoid
22864         # compiling the demo in the c++ directory).  So we need a reasonable
22865         # default for the 'bool' type.
22866         #
22867         # Caveat: since the storage of the bool type is not standardized, it
22868         # may change.
22869
22870         if test "$NCURSES_BOOL" != auto ; then
22871                 cf_cv_type_of_bool=$NCURSES_BOOL
22872                 cf_cv_header_stdbool_h=0
22873         else
22874                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22875
22876 echo "$as_me:22876: checking for size of bool" >&5
22877 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22878 if test "${cf_cv_type_of_bool+set}" = set; then
22879   echo $ECHO_N "(cached) $ECHO_C" >&6
22880 else
22881
22882         rm -f cf_test.out
22883         if test "$cross_compiling" = yes; then
22884   cf_cv_type_of_bool=unknown
22885 else
22886   cat >conftest.$ac_ext <<_ACEOF
22887 #line 22887 "configure"
22888 #include "confdefs.h"
22889
22890 #include <stdlib.h>
22891 #include <stdio.h>
22892
22893 #if defined(__cplusplus)
22894
22895 #ifdef HAVE_GXX_BUILTIN_H
22896 #include <g++/builtin.h>
22897 #elif HAVE_GPP_BUILTIN_H
22898 #include <gpp/builtin.h>
22899 #elif HAVE_BUILTIN_H
22900 #include <builtin.h>
22901 #endif
22902
22903 #else
22904
22905 #if $cf_cv_header_stdbool_h
22906 #include <stdbool.h>
22907 #endif
22908
22909 #endif
22910
22911 int main(void)
22912 {
22913         FILE *fp = fopen("cf_test.out", "w");
22914         if (fp != 0) {
22915                 bool x = true;
22916                 if ((bool)(-x) >= 0)
22917                         fputs("unsigned ", fp);
22918                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22919                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22920                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22921                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22922                 fclose(fp);
22923         }
22924         ${cf_cv_main_return:-return}(0);
22925 }
22926
22927 _ACEOF
22928 rm -f conftest$ac_exeext
22929 if { (eval echo "$as_me:22929: \"$ac_link\"") >&5
22930   (eval $ac_link) 2>&5
22931   ac_status=$?
22932   echo "$as_me:22932: \$? = $ac_status" >&5
22933   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22934   { (eval echo "$as_me:22934: \"$ac_try\"") >&5
22935   (eval $ac_try) 2>&5
22936   ac_status=$?
22937   echo "$as_me:22937: \$? = $ac_status" >&5
22938   (exit $ac_status); }; }; then
22939   cf_cv_type_of_bool=`cat cf_test.out`
22940                  if test -z "$cf_cv_type_of_bool"; then
22941                    cf_cv_type_of_bool=unknown
22942                  fi
22943 else
22944   echo "$as_me: program exited with status $ac_status" >&5
22945 echo "$as_me: failed program was:" >&5
22946 cat conftest.$ac_ext >&5
22947 cf_cv_type_of_bool=unknown
22948 fi
22949 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22950 fi
22951
22952 fi
22953
22954         rm -f cf_test.out
22955 echo "$as_me:22955: result: $cf_cv_type_of_bool" >&5
22956 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22957 if test "$cf_cv_type_of_bool" = unknown ; then
22958         case .$NCURSES_BOOL in
22959         (.auto|.) NCURSES_BOOL=unsigned;;
22960         esac
22961         { echo "$as_me:22961: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22962 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22963         cf_cv_type_of_bool=$NCURSES_BOOL
22964 fi
22965
22966                 else
22967                         echo "$as_me:22967: checking for fallback type of bool" >&5
22968 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22969                         case "$host_cpu" in
22970                         (i?86)  cf_cv_type_of_bool=char ;;
22971                         (*)     cf_cv_type_of_bool=int  ;;
22972                         esac
22973                         echo "$as_me:22973: result: $cf_cv_type_of_bool" >&5
22974 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22975                 fi
22976         fi
22977 fi
22978
22979 # If the C compiler did not declare bool, and we did not determine that the C++
22980 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
22981 # ncurses library use the same type as C++ bool.  Note that this allows one to
22982 # specify the type of bool in a configure-script option and postpone
22983 # integration with the C++ compiler provided that the types are compatible.
22984 USE_CXX_BOOL=1
22985 if test $cf_cv_cc_bool_type = 1
22986 then
22987         # oops: C has a bool.  Unlikely, but C++ could differ.
22988         USE_CXX_BOOL=0
22989 elif test $cf_cv_builtin_bool = 0
22990 then
22991         # C++ has no bool
22992         USE_CXX_BOOL=0
22993 else
22994         # this is the normal case
22995         USE_CXX_BOOL='defined(__cplusplus)'
22996 fi
22997
22998 if test -f "${srcdir}/Ada95/Makefile.in" ; then
22999
23000         if test "$cf_with_ada" != "no" ; then
23001                 if test "$with_libtool" != "no"; then
23002                         { echo "$as_me:23002: WARNING: libtool does not support Ada - disabling feature" >&5
23003 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
23004                         cf_with_ada=no
23005                 fi
23006         fi
23007
23008         if test "$cf_with_ada" != "no" ; then
23009
23010 cf_ada_make=gnatmake
23011 cf_ada_config="#"
23012 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23013 set dummy $cf_ada_make; ac_word=$2
23014 echo "$as_me:23014: checking for $ac_word" >&5
23015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23016 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23017   echo $ECHO_N "(cached) $ECHO_C" >&6
23018 else
23019   if test -n "$gnatmake_exists"; then
23020   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23021 else
23022   ac_save_IFS=$IFS; IFS=$ac_path_separator
23023 ac_dummy="$PATH"
23024 for ac_dir in $ac_dummy; do
23025   IFS=$ac_save_IFS
23026   test -z "$ac_dir" && ac_dir=.
23027   $as_executable_p "$ac_dir/$ac_word" || continue
23028 ac_cv_prog_gnatmake_exists="yes"
23029 echo "$as_me:23029: found $ac_dir/$ac_word" >&5
23030 break
23031 done
23032
23033   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23034 fi
23035 fi
23036 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23037 if test -n "$gnatmake_exists"; then
23038   echo "$as_me:23038: result: $gnatmake_exists" >&5
23039 echo "${ECHO_T}$gnatmake_exists" >&6
23040 else
23041   echo "$as_me:23041: result: no" >&5
23042 echo "${ECHO_T}no" >&6
23043 fi
23044
23045 if test "$ac_cv_prog_gnatmake_exists" = no; then
23046         cf_ada_make=
23047         cf_cv_prog_gnat_correct=no
23048 else
23049         # Extract the first word of "gprconfig", so it can be a program name with args.
23050 set dummy gprconfig; ac_word=$2
23051 echo "$as_me:23051: checking for $ac_word" >&5
23052 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23053 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23054   echo $ECHO_N "(cached) $ECHO_C" >&6
23055 else
23056   if test -n "$gprconfig_exists"; then
23057   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23058 else
23059   ac_save_IFS=$IFS; IFS=$ac_path_separator
23060 ac_dummy="$PATH"
23061 for ac_dir in $ac_dummy; do
23062   IFS=$ac_save_IFS
23063   test -z "$ac_dir" && ac_dir=.
23064   $as_executable_p "$ac_dir/$ac_word" || continue
23065 ac_cv_prog_gprconfig_exists="yes"
23066 echo "$as_me:23066: found $ac_dir/$ac_word" >&5
23067 break
23068 done
23069
23070   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23071 fi
23072 fi
23073 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23074 if test -n "$gprconfig_exists"; then
23075   echo "$as_me:23075: result: $gprconfig_exists" >&5
23076 echo "${ECHO_T}$gprconfig_exists" >&6
23077 else
23078   echo "$as_me:23078: result: no" >&5
23079 echo "${ECHO_T}no" >&6
23080 fi
23081
23082         if test "$ac_cv_prog_gprconfig_exists" = yes
23083         then
23084                 rm -rf conftest* *~conftest*
23085                 if mkdir conftest.src
23086                 then
23087                         cf_ada_config=""
23088                         cd conftest.src
23089                         for cf_gprconfig in Ada C
23090                         do
23091                                 echo "$as_me:23091: checking for gprconfig name for $cf_gprconfig" >&5
23092 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23093                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23094                                 if test -n "$cf_gprconfig_value"
23095                                 then
23096                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23097                                         echo "$as_me:23097: result: $cf_gprconfig_value" >&5
23098 echo "${ECHO_T}$cf_gprconfig_value" >&6
23099                                 else
23100                                         echo "$as_me:23100: result: missing" >&5
23101 echo "${ECHO_T}missing" >&6
23102                                         cf_ada_config="#"
23103                                         break
23104                                 fi
23105                         done
23106                         cd ..
23107                         rm -rf conftest* *~conftest*
23108                 fi
23109         else
23110                 # gprconfig is newer than gnatmake; we can continue...
23111                 cf_ada_config="##"
23112         fi
23113         if test "x$cf_ada_config" != "x#"
23114         then
23115
23116 echo "$as_me:23116: checking for gnat version" >&5
23117 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23118 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23119         grep '[0-9].[0-9][0-9]*' |\
23120         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23121 echo "$as_me:23121: result: $cf_gnat_version" >&5
23122 echo "${ECHO_T}$cf_gnat_version" >&6
23123
23124 case $cf_gnat_version in
23125 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23126         cf_cv_prog_gnat_correct=yes
23127         ;;
23128 (*)
23129         { echo "$as_me:23129: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23130 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23131         cf_cv_prog_gnat_correct=no
23132         ;;
23133 esac
23134
23135                 # Extract the first word of "m4", so it can be a program name with args.
23136 set dummy m4; ac_word=$2
23137 echo "$as_me:23137: checking for $ac_word" >&5
23138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23139 if test "${ac_cv_prog_M4_exists+set}" = set; then
23140   echo $ECHO_N "(cached) $ECHO_C" >&6
23141 else
23142   if test -n "$M4_exists"; then
23143   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23144 else
23145   ac_save_IFS=$IFS; IFS=$ac_path_separator
23146 ac_dummy="$PATH"
23147 for ac_dir in $ac_dummy; do
23148   IFS=$ac_save_IFS
23149   test -z "$ac_dir" && ac_dir=.
23150   $as_executable_p "$ac_dir/$ac_word" || continue
23151 ac_cv_prog_M4_exists="yes"
23152 echo "$as_me:23152: found $ac_dir/$ac_word" >&5
23153 break
23154 done
23155
23156   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23157 fi
23158 fi
23159 M4_exists=$ac_cv_prog_M4_exists
23160 if test -n "$M4_exists"; then
23161   echo "$as_me:23161: result: $M4_exists" >&5
23162 echo "${ECHO_T}$M4_exists" >&6
23163 else
23164   echo "$as_me:23164: result: no" >&5
23165 echo "${ECHO_T}no" >&6
23166 fi
23167
23168                 if test "$ac_cv_prog_M4_exists" = no; then
23169                         cf_cv_prog_gnat_correct=no
23170                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23171                 fi
23172                 if test "$cf_cv_prog_gnat_correct" = yes; then
23173                         echo "$as_me:23173: checking if GNAT works" >&5
23174 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23175
23176 rm -rf conftest* *~conftest*
23177 cat >>conftest.ads <<CF_EOF
23178 procedure conftest;
23179 CF_EOF
23180 cat >>conftest.adb <<CF_EOF
23181 with Text_IO;
23182 with GNAT.OS_Lib;
23183 procedure conftest is
23184 begin
23185    Text_IO.Put ("Hello World");
23186    Text_IO.New_Line;
23187    GNAT.OS_Lib.OS_Exit (0);
23188 end conftest;
23189 CF_EOF
23190 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23191    if ( ./conftest 1>&5 2>&1 ) ; then
23192       cf_cv_prog_gnat_correct=yes
23193    else
23194       cf_cv_prog_gnat_correct=no
23195    fi
23196 else
23197    cf_cv_prog_gnat_correct=no
23198 fi
23199 rm -rf conftest* *~conftest*
23200
23201                         echo "$as_me:23201: result: $cf_cv_prog_gnat_correct" >&5
23202 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23203                 fi
23204         else
23205                 cf_cv_prog_gnat_correct=no
23206         fi
23207 fi
23208
23209                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23210
23211         ADAFLAGS="$ADAFLAGS -gnatpn"
23212
23213         echo "$as_me:23213: checking optimization options for ADAFLAGS" >&5
23214 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23215         case "$CFLAGS" in
23216         (*-g*)
23217
23218         ADAFLAGS="$ADAFLAGS -g"
23219
23220                 ;;
23221         esac
23222         case "$CFLAGS" in
23223         (*-O*)
23224                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23225
23226         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23227
23228                 ;;
23229         esac
23230         echo "$as_me:23230: result: $ADAFLAGS" >&5
23231 echo "${ECHO_T}$ADAFLAGS" >&6
23232
23233 echo "$as_me:23233: checking if GNATPREP supports -T option" >&5
23234 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23235 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23236   echo $ECHO_N "(cached) $ECHO_C" >&6
23237 else
23238
23239 cf_cv_gnatprep_opt_t=no
23240 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23241
23242 fi
23243 echo "$as_me:23243: result: $cf_cv_gnatprep_opt_t" >&5
23244 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23245 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23246
23247 echo "$as_me:23247: checking if GNAT supports generics" >&5
23248 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23249 case $cf_gnat_version in
23250 (3.[1-9]*|[4-9].*)
23251         cf_gnat_generics=yes
23252         ;;
23253 (*)
23254         cf_gnat_generics=no
23255         ;;
23256 esac
23257 echo "$as_me:23257: result: $cf_gnat_generics" >&5
23258 echo "${ECHO_T}$cf_gnat_generics" >&6
23259
23260 if test "$cf_gnat_generics" = yes
23261 then
23262         cf_compile_generics=generics
23263         cf_generic_objects="\${GENOBJS}"
23264 else
23265         cf_compile_generics=
23266         cf_generic_objects=
23267 fi
23268
23269 echo "$as_me:23269: checking if GNAT supports SIGINT" >&5
23270 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23271 if test "${cf_cv_gnat_sigint+set}" = set; then
23272   echo $ECHO_N "(cached) $ECHO_C" >&6
23273 else
23274
23275 rm -rf conftest* *~conftest*
23276 cat >>conftest.ads <<CF_EOF
23277 with Ada.Interrupts.Names;
23278
23279 package ConfTest is
23280
23281    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23282    pragma Unreserve_All_Interrupts;
23283    pragma Warnings (On);
23284
23285    protected Process is
23286       procedure Stop;
23287       function Continue return Boolean;
23288       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23289    private
23290       Done : Boolean := False;
23291    end Process;
23292
23293 end ConfTest;
23294 CF_EOF
23295 cat >>conftest.adb <<CF_EOF
23296 package body ConfTest is
23297    protected body Process is
23298       procedure Stop is
23299       begin
23300          Done := True;
23301       end Stop;
23302       function Continue return Boolean is
23303       begin
23304          return not Done;
23305       end Continue;
23306    end Process;
23307 end ConfTest;
23308 CF_EOF
23309 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23310       cf_cv_gnat_sigint=yes
23311 else
23312    cf_cv_gnat_sigint=no
23313 fi
23314 rm -rf conftest* *~conftest*
23315
23316 fi
23317 echo "$as_me:23317: result: $cf_cv_gnat_sigint" >&5
23318 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23319
23320 if test $cf_cv_gnat_sigint = yes ; then
23321         USE_GNAT_SIGINT=""
23322 else
23323         USE_GNAT_SIGINT="#"
23324 fi
23325
23326 cf_gnat_libraries=no
23327 cf_gnat_projects=no
23328
23329 if test "$enable_gnat_projects" != no ; then
23330 echo "$as_me:23330: checking if GNAT supports project files" >&5
23331 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23332 case $cf_gnat_version in
23333 (3.[0-9]*)
23334         ;;
23335 (*)
23336         case $cf_cv_system_name in
23337         (cygwin*|msys*)
23338                 ;;
23339         (*)
23340                 rm -rf conftest* *~conftest*
23341                 if mkdir conftest.src conftest.bin conftest.lib
23342                 then
23343                         cd conftest.src
23344                         rm -rf conftest* *~conftest*
23345                         cat >>library.gpr <<CF_EOF
23346 project Library is
23347   Kind := External ("LIB_KIND");
23348   for Library_Name use "ConfTest";
23349   for Object_Dir use ".";
23350   for Library_ALI_Dir use External("LIBRARY_DIR");
23351   for Library_Version use External ("SONAME");
23352   for Library_Kind use Kind;
23353   for Library_Dir use External("BUILD_DIR");
23354   Source_Dir := External ("SOURCE_DIR");
23355   for Source_Dirs use (Source_Dir);
23356 end Library;
23357 CF_EOF
23358                         cat >>confpackage.ads <<CF_EOF
23359 package ConfPackage is
23360    procedure conftest;
23361 end ConfPackage;
23362 CF_EOF
23363                         cat >>confpackage.adb <<CF_EOF
23364 with Text_IO;
23365 package body ConfPackage is
23366    procedure conftest is
23367    begin
23368       Text_IO.Put ("Hello World");
23369       Text_IO.New_Line;
23370    end conftest;
23371 end ConfPackage;
23372 CF_EOF
23373                         if ( $cf_ada_make $ADAFLAGS \
23374                                         -Plibrary.gpr \
23375                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23376                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23377                                         -XSOURCE_DIR=`pwd` \
23378                                         -XSONAME=libConfTest.so.1 \
23379                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23380                                 cf_gnat_projects=yes
23381                         fi
23382                         cd ..
23383                 fi
23384                 if test -f conftest.lib/confpackage.ali
23385                 then
23386                         cf_gnat_libraries=yes
23387                 fi
23388                 rm -rf conftest* *~conftest*
23389                 ;;
23390         esac
23391         ;;
23392 esac
23393 echo "$as_me:23393: result: $cf_gnat_projects" >&5
23394 echo "${ECHO_T}$cf_gnat_projects" >&6
23395 fi # enable_gnat_projects
23396
23397 if test $cf_gnat_projects = yes
23398 then
23399         echo "$as_me:23399: checking if GNAT supports libraries" >&5
23400 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23401         echo "$as_me:23401: result: $cf_gnat_libraries" >&5
23402 echo "${ECHO_T}$cf_gnat_libraries" >&6
23403 fi
23404
23405 if test "$cf_gnat_projects" = yes
23406 then
23407         USE_OLD_MAKERULES="#"
23408         USE_GNAT_PROJECTS=""
23409 else
23410         USE_OLD_MAKERULES=""
23411         USE_GNAT_PROJECTS="#"
23412 fi
23413
23414 if test "$cf_gnat_libraries" = yes
23415 then
23416         USE_GNAT_LIBRARIES=""
23417 else
23418         USE_GNAT_LIBRARIES="#"
23419 fi
23420
23421 echo "$as_me:23421: checking for ada-compiler" >&5
23422 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23423
23424 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23425 if test "${with_ada_compiler+set}" = set; then
23426   withval="$with_ada_compiler"
23427   cf_ada_compiler=$withval
23428 else
23429   cf_ada_compiler=gnatmake
23430 fi;
23431
23432 echo "$as_me:23432: result: $cf_ada_compiler" >&5
23433 echo "${ECHO_T}$cf_ada_compiler" >&6
23434
23435                         cf_ada_package=terminal_interface
23436
23437 echo "$as_me:23437: checking for ada-include" >&5
23438 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23439
23440 # Check whether --with-ada-include or --without-ada-include was given.
23441 if test "${with_ada_include+set}" = set; then
23442   withval="$with_ada_include"
23443
23444 else
23445   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23446 fi; if test -n "$prefix/share/ada/adainclude" ; then
23447
23448 if test "x$prefix" != xNONE; then
23449         cf_path_syntax="$prefix"
23450 else
23451         cf_path_syntax="$ac_default_prefix"
23452 fi
23453
23454 case ".$withval" in
23455 (.\$\(*\)*|.\'*\'*)
23456         ;;
23457 (..|./*|.\\*)
23458         ;;
23459 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23460         ;;
23461 (.\${*prefix}*|.\${*dir}*)
23462         eval withval="$withval"
23463         case ".$withval" in
23464         (.NONE/*)
23465                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23466                 ;;
23467         esac
23468         ;;
23469 (.no|.NONE/*)
23470         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23471         ;;
23472 (*)
23473         { { echo "$as_me:23473: error: expected a pathname, not \"$withval\"" >&5
23474 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23475    { (exit 1); exit 1; }; }
23476         ;;
23477 esac
23478
23479 fi
23480 eval ADA_INCLUDE="$withval"
23481
23482 echo "$as_me:23482: result: $ADA_INCLUDE" >&5
23483 echo "${ECHO_T}$ADA_INCLUDE" >&6
23484
23485 echo "$as_me:23485: checking for ada-objects" >&5
23486 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23487
23488 # Check whether --with-ada-objects or --without-ada-objects was given.
23489 if test "${with_ada_objects+set}" = set; then
23490   withval="$with_ada_objects"
23491
23492 else
23493   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23494 fi; if test -n "$prefix/lib/ada/adalib" ; then
23495
23496 if test "x$prefix" != xNONE; then
23497         cf_path_syntax="$prefix"
23498 else
23499         cf_path_syntax="$ac_default_prefix"
23500 fi
23501
23502 case ".$withval" in
23503 (.\$\(*\)*|.\'*\'*)
23504         ;;
23505 (..|./*|.\\*)
23506         ;;
23507 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23508         ;;
23509 (.\${*prefix}*|.\${*dir}*)
23510         eval withval="$withval"
23511         case ".$withval" in
23512         (.NONE/*)
23513                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23514                 ;;
23515         esac
23516         ;;
23517 (.no|.NONE/*)
23518         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23519         ;;
23520 (*)
23521         { { echo "$as_me:23521: error: expected a pathname, not \"$withval\"" >&5
23522 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23523    { (exit 1); exit 1; }; }
23524         ;;
23525 esac
23526
23527 fi
23528 eval ADA_OBJECTS="$withval"
23529
23530 echo "$as_me:23530: result: $ADA_OBJECTS" >&5
23531 echo "${ECHO_T}$ADA_OBJECTS" >&6
23532
23533 echo "$as_me:23533: checking if an Ada95 shared-library should be built" >&5
23534 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23535
23536 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23537 if test "${with_ada_sharedlib+set}" = set; then
23538   withval="$with_ada_sharedlib"
23539   with_ada_sharedlib=$withval
23540 else
23541   with_ada_sharedlib=no
23542 fi;
23543 echo "$as_me:23543: result: $with_ada_sharedlib" >&5
23544 echo "${ECHO_T}$with_ada_sharedlib" >&6
23545
23546 if test "x$with_ada_sharedlib" != xno
23547 then
23548         if test "x$cf_gnat_projects" != xyes
23549         then
23550                 { echo "$as_me:23550: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23551 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23552                 with_ada_sharedlib=no
23553         fi
23554 fi
23555
23556 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23557 MAKE_ADA_SHAREDLIB="#"
23558
23559 if test "x$with_ada_sharedlib" != xno
23560 then
23561         MAKE_ADA_SHAREDLIB=
23562         if test "x$with_ada_sharedlib" != xyes
23563         then
23564                 ADA_SHAREDLIB="$with_ada_sharedlib"
23565         fi
23566 fi
23567
23568                 fi
23569         fi
23570 else
23571         cf_with_ada=no
23572 fi
23573
23574 # do this "late" to avoid conflict with header-checks
23575 if test "x$with_widec" = xyes ; then
23576         echo "$as_me:23576: checking for wchar_t" >&5
23577 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23578 if test "${ac_cv_type_wchar_t+set}" = set; then
23579   echo $ECHO_N "(cached) $ECHO_C" >&6
23580 else
23581   cat >conftest.$ac_ext <<_ACEOF
23582 #line 23582 "configure"
23583 #include "confdefs.h"
23584 $ac_includes_default
23585 int
23586 main (void)
23587 {
23588 if ((wchar_t *) 0)
23589   return 0;
23590 if (sizeof (wchar_t))
23591   return 0;
23592   ;
23593   return 0;
23594 }
23595 _ACEOF
23596 rm -f conftest.$ac_objext
23597 if { (eval echo "$as_me:23597: \"$ac_compile\"") >&5
23598   (eval $ac_compile) 2>&5
23599   ac_status=$?
23600   echo "$as_me:23600: \$? = $ac_status" >&5
23601   (exit $ac_status); } &&
23602          { ac_try='test -s conftest.$ac_objext'
23603   { (eval echo "$as_me:23603: \"$ac_try\"") >&5
23604   (eval $ac_try) 2>&5
23605   ac_status=$?
23606   echo "$as_me:23606: \$? = $ac_status" >&5
23607   (exit $ac_status); }; }; then
23608   ac_cv_type_wchar_t=yes
23609 else
23610   echo "$as_me: failed program was:" >&5
23611 cat conftest.$ac_ext >&5
23612 ac_cv_type_wchar_t=no
23613 fi
23614 rm -f conftest.$ac_objext conftest.$ac_ext
23615 fi
23616 echo "$as_me:23616: result: $ac_cv_type_wchar_t" >&5
23617 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23618
23619 echo "$as_me:23619: checking size of wchar_t" >&5
23620 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23621 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23622   echo $ECHO_N "(cached) $ECHO_C" >&6
23623 else
23624   if test "$ac_cv_type_wchar_t" = yes; then
23625   if test "$cross_compiling" = yes; then
23626   # Depending upon the size, compute the lo and hi bounds.
23627 cat >conftest.$ac_ext <<_ACEOF
23628 #line 23628 "configure"
23629 #include "confdefs.h"
23630 $ac_includes_default
23631 int
23632 main (void)
23633 {
23634 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23635   ;
23636   return 0;
23637 }
23638 _ACEOF
23639 rm -f conftest.$ac_objext
23640 if { (eval echo "$as_me:23640: \"$ac_compile\"") >&5
23641   (eval $ac_compile) 2>&5
23642   ac_status=$?
23643   echo "$as_me:23643: \$? = $ac_status" >&5
23644   (exit $ac_status); } &&
23645          { ac_try='test -s conftest.$ac_objext'
23646   { (eval echo "$as_me:23646: \"$ac_try\"") >&5
23647   (eval $ac_try) 2>&5
23648   ac_status=$?
23649   echo "$as_me:23649: \$? = $ac_status" >&5
23650   (exit $ac_status); }; }; then
23651   ac_lo=0 ac_mid=0
23652   while :; do
23653     cat >conftest.$ac_ext <<_ACEOF
23654 #line 23654 "configure"
23655 #include "confdefs.h"
23656 $ac_includes_default
23657 int
23658 main (void)
23659 {
23660 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23661   ;
23662   return 0;
23663 }
23664 _ACEOF
23665 rm -f conftest.$ac_objext
23666 if { (eval echo "$as_me:23666: \"$ac_compile\"") >&5
23667   (eval $ac_compile) 2>&5
23668   ac_status=$?
23669   echo "$as_me:23669: \$? = $ac_status" >&5
23670   (exit $ac_status); } &&
23671          { ac_try='test -s conftest.$ac_objext'
23672   { (eval echo "$as_me:23672: \"$ac_try\"") >&5
23673   (eval $ac_try) 2>&5
23674   ac_status=$?
23675   echo "$as_me:23675: \$? = $ac_status" >&5
23676   (exit $ac_status); }; }; then
23677   ac_hi=$ac_mid; break
23678 else
23679   echo "$as_me: failed program was:" >&5
23680 cat conftest.$ac_ext >&5
23681 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23682 fi
23683 rm -f conftest.$ac_objext conftest.$ac_ext
23684   done
23685 else
23686   echo "$as_me: failed program was:" >&5
23687 cat conftest.$ac_ext >&5
23688 ac_hi=-1 ac_mid=-1
23689   while :; do
23690     cat >conftest.$ac_ext <<_ACEOF
23691 #line 23691 "configure"
23692 #include "confdefs.h"
23693 $ac_includes_default
23694 int
23695 main (void)
23696 {
23697 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23698   ;
23699   return 0;
23700 }
23701 _ACEOF
23702 rm -f conftest.$ac_objext
23703 if { (eval echo "$as_me:23703: \"$ac_compile\"") >&5
23704   (eval $ac_compile) 2>&5
23705   ac_status=$?
23706   echo "$as_me:23706: \$? = $ac_status" >&5
23707   (exit $ac_status); } &&
23708          { ac_try='test -s conftest.$ac_objext'
23709   { (eval echo "$as_me:23709: \"$ac_try\"") >&5
23710   (eval $ac_try) 2>&5
23711   ac_status=$?
23712   echo "$as_me:23712: \$? = $ac_status" >&5
23713   (exit $ac_status); }; }; then
23714   ac_lo=$ac_mid; break
23715 else
23716   echo "$as_me: failed program was:" >&5
23717 cat conftest.$ac_ext >&5
23718 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23719 fi
23720 rm -f conftest.$ac_objext conftest.$ac_ext
23721   done
23722 fi
23723 rm -f conftest.$ac_objext conftest.$ac_ext
23724 # Binary search between lo and hi bounds.
23725 while test "x$ac_lo" != "x$ac_hi"; do
23726   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23727   cat >conftest.$ac_ext <<_ACEOF
23728 #line 23728 "configure"
23729 #include "confdefs.h"
23730 $ac_includes_default
23731 int
23732 main (void)
23733 {
23734 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23735   ;
23736   return 0;
23737 }
23738 _ACEOF
23739 rm -f conftest.$ac_objext
23740 if { (eval echo "$as_me:23740: \"$ac_compile\"") >&5
23741   (eval $ac_compile) 2>&5
23742   ac_status=$?
23743   echo "$as_me:23743: \$? = $ac_status" >&5
23744   (exit $ac_status); } &&
23745          { ac_try='test -s conftest.$ac_objext'
23746   { (eval echo "$as_me:23746: \"$ac_try\"") >&5
23747   (eval $ac_try) 2>&5
23748   ac_status=$?
23749   echo "$as_me:23749: \$? = $ac_status" >&5
23750   (exit $ac_status); }; }; then
23751   ac_hi=$ac_mid
23752 else
23753   echo "$as_me: failed program was:" >&5
23754 cat conftest.$ac_ext >&5
23755 ac_lo=`expr $ac_mid + 1`
23756 fi
23757 rm -f conftest.$ac_objext conftest.$ac_ext
23758 done
23759 ac_cv_sizeof_wchar_t=$ac_lo
23760 else
23761   if test "$cross_compiling" = yes; then
23762   { { echo "$as_me:23762: error: cannot run test program while cross compiling" >&5
23763 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23764    { (exit 1); exit 1; }; }
23765 else
23766   cat >conftest.$ac_ext <<_ACEOF
23767 #line 23767 "configure"
23768 #include "confdefs.h"
23769 $ac_includes_default
23770 int
23771 main (void)
23772 {
23773 FILE *f = fopen ("conftest.val", "w");
23774 if (!f)
23775   $ac_main_return (1);
23776 fprintf (f, "%d", (sizeof (wchar_t)));
23777 fclose (f);
23778   ;
23779   return 0;
23780 }
23781 _ACEOF
23782 rm -f conftest$ac_exeext
23783 if { (eval echo "$as_me:23783: \"$ac_link\"") >&5
23784   (eval $ac_link) 2>&5
23785   ac_status=$?
23786   echo "$as_me:23786: \$? = $ac_status" >&5
23787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23788   { (eval echo "$as_me:23788: \"$ac_try\"") >&5
23789   (eval $ac_try) 2>&5
23790   ac_status=$?
23791   echo "$as_me:23791: \$? = $ac_status" >&5
23792   (exit $ac_status); }; }; then
23793   ac_cv_sizeof_wchar_t=`cat conftest.val`
23794 else
23795   echo "$as_me: program exited with status $ac_status" >&5
23796 echo "$as_me: failed program was:" >&5
23797 cat conftest.$ac_ext >&5
23798 fi
23799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23800 fi
23801 fi
23802 rm -f conftest.val
23803 else
23804   ac_cv_sizeof_wchar_t=0
23805 fi
23806 fi
23807 echo "$as_me:23807: result: $ac_cv_sizeof_wchar_t" >&5
23808 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23809 cat >>confdefs.h <<EOF
23810 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23811 EOF
23812
23813 fi
23814
23815 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23816 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23817 ###
23818 ### ticlib modules may be a separate library, otherwise contained in termlib.
23819 ### termlib modules may be a separate library, otherwise contained in ncurses.
23820 ###
23821 ### The of "+" or " " between the tokens controls the way the script
23822 ### chooses to split module lists into libraries.
23823 ###
23824 ### (see CF_LIB_RULES).
23825 echo "$as_me:23825: checking for library subsets" >&5
23826 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23827 LIB_SUBSETS=
23828
23829 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23830         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23831         if test "$with_ticlib" != no ; then
23832                 LIB_SUBSETS="${LIB_SUBSETS} "
23833         else
23834                 LIB_SUBSETS="${LIB_SUBSETS}+"
23835         fi
23836 fi
23837
23838 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23839 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23840
23841 if test "$with_termlib" != no ; then
23842         LIB_SUBSETS="${LIB_SUBSETS} "
23843 else
23844         LIB_SUBSETS="${LIB_SUBSETS}+"
23845 fi
23846
23847 LIB_SUBSETS="${LIB_SUBSETS}base"
23848
23849 # Most term-driver calls are to tinfo, but some like init_pair are to the
23850 # base library (so it resides in base).
23851 if test "$with_term_driver" != no ; then
23852         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23853         case $cf_cv_system_name in
23854         (*mingw32*|*mingw64*)
23855                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23856                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23857                 ;;
23858         (*)
23859                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23860                 ;;
23861         esac
23862 fi
23863
23864 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23865 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23866
23867 echo "$as_me:23867: result: $LIB_SUBSETS" >&5
23868 echo "${ECHO_T}$LIB_SUBSETS" >&6
23869
23870 ### Construct the list of include-directories to be generated
23871
23872 if test "$srcdir" != "."; then
23873         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23874 fi
23875 CPPFLAGS="-I../include $CPPFLAGS"
23876 if test "$srcdir" != "."; then
23877         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23878 fi
23879 CPPFLAGS="-I. $CPPFLAGS"
23880
23881 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23882 if test "$srcdir" != "."; then
23883         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23884 fi
23885 if test "$GCC" != yes; then
23886         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23887 elif test "$includedir" != "/usr/include"; then
23888         if test "$includedir" = '${prefix}/include' ; then
23889                 if test x$prefix != x/usr ; then
23890                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23891                 fi
23892         else
23893                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23894         fi
23895 fi
23896
23897 ### Build up pieces for makefile rules
23898 echo "$as_me:23898: checking default library suffix" >&5
23899 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23900
23901         case $DFT_LWR_MODEL in
23902         (libtool) DFT_ARG_SUFFIX=''   ;;
23903         (normal)  DFT_ARG_SUFFIX=''   ;;
23904         (debug)   DFT_ARG_SUFFIX='_g' ;;
23905         (profile) DFT_ARG_SUFFIX='_p' ;;
23906         (shared)  DFT_ARG_SUFFIX=''   ;;
23907         esac
23908         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23909 echo "$as_me:23909: result: $DFT_ARG_SUFFIX" >&5
23910 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23911
23912 echo "$as_me:23912: checking default library-dependency suffix" >&5
23913 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23914
23915         case X$DFT_LWR_MODEL in
23916         (Xlibtool)
23917                 DFT_LIB_SUFFIX='.la'
23918                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23919                 ;;
23920         (Xdebug)
23921                 DFT_LIB_SUFFIX='_g.a'
23922                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23923                 ;;
23924         (Xprofile)
23925                 DFT_LIB_SUFFIX='_p.a'
23926                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23927                 ;;
23928         (Xshared)
23929                 case $cf_cv_system_name in
23930                 (aix[5-7]*)
23931                         DFT_LIB_SUFFIX='.so'
23932                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23933                         ;;
23934                 (cygwin*|msys*|mingw*)
23935                         DFT_LIB_SUFFIX='.dll'
23936                         DFT_DEP_SUFFIX='.dll.a'
23937                         ;;
23938                 (darwin*)
23939                         DFT_LIB_SUFFIX='.dylib'
23940                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23941                         ;;
23942                 (hpux*)
23943                         case $target in
23944                         (ia64*)
23945                                 DFT_LIB_SUFFIX='.so'
23946                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23947                                 ;;
23948                         (*)
23949                                 DFT_LIB_SUFFIX='.sl'
23950                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23951                                 ;;
23952                         esac
23953                         ;;
23954                 (*)
23955                         DFT_LIB_SUFFIX='.so'
23956                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23957                         ;;
23958                 esac
23959                 ;;
23960         (*)
23961                 DFT_LIB_SUFFIX='.a'
23962                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23963                 ;;
23964         esac
23965         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23966         then
23967                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23968                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23969         fi
23970 echo "$as_me:23970: result: $DFT_DEP_SUFFIX" >&5
23971 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23972
23973 echo "$as_me:23973: checking default object directory" >&5
23974 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23975
23976         case $DFT_LWR_MODEL in
23977         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
23978         (normal)  DFT_OBJ_SUBDIR='objects' ;;
23979         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
23980         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
23981         (shared)
23982                 case $cf_cv_system_name in
23983                 (cygwin|msys)
23984                         DFT_OBJ_SUBDIR='objects' ;;
23985                 (*)
23986                         DFT_OBJ_SUBDIR='obj_s' ;;
23987                 esac
23988         esac
23989 echo "$as_me:23989: result: $DFT_OBJ_SUBDIR" >&5
23990 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
23991
23992 if test "x$cf_with_cxx" = xyes ; then
23993 echo "$as_me:23993: checking c++ library-dependency suffix" >&5
23994 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
23995 if test "$with_libtool" != "no"; then
23996         # libtool thinks it can make c++ shared libraries (perhaps only g++)
23997         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23998 elif test "$with_shared_cxx" != "no"; then
23999         # also for g++ users...
24000         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24001 else
24002         # we normally make a static library because C/C++ library rules differ
24003
24004         case Xnormal in
24005         (Xlibtool)
24006                 CXX_LIB_SUFFIX='.la'
24007                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24008                 ;;
24009         (Xdebug)
24010                 CXX_LIB_SUFFIX='_g.a'
24011                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24012                 ;;
24013         (Xprofile)
24014                 CXX_LIB_SUFFIX='_p.a'
24015                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24016                 ;;
24017         (Xshared)
24018                 case $cf_cv_system_name in
24019                 (aix[5-7]*)
24020                         CXX_LIB_SUFFIX='.so'
24021                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24022                         ;;
24023                 (cygwin*|msys*|mingw*)
24024                         CXX_LIB_SUFFIX='.dll'
24025                         CXX_DEP_SUFFIX='.dll.a'
24026                         ;;
24027                 (darwin*)
24028                         CXX_LIB_SUFFIX='.dylib'
24029                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24030                         ;;
24031                 (hpux*)
24032                         case $target in
24033                         (ia64*)
24034                                 CXX_LIB_SUFFIX='.so'
24035                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24036                                 ;;
24037                         (*)
24038                                 CXX_LIB_SUFFIX='.sl'
24039                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24040                                 ;;
24041                         esac
24042                         ;;
24043                 (*)
24044                         CXX_LIB_SUFFIX='.so'
24045                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24046                         ;;
24047                 esac
24048                 ;;
24049         (*)
24050                 CXX_LIB_SUFFIX='.a'
24051                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24052                 ;;
24053         esac
24054         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24055         then
24056                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24057                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24058         fi
24059
24060 fi
24061 echo "$as_me:24061: result: $CXX_LIB_SUFFIX" >&5
24062 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24063
24064 fi
24065
24066 # do not want -ldl in build except as needed for -lncurses dependency
24067 if test "x$with_dlsym" = xyes ; then
24068 if test $DFT_LWR_MODEL = shared || \
24069    test $DFT_LWR_MODEL = libtool ; then
24070
24071 # remove dl library from $LIBS
24072 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24073
24074 fi
24075 fi
24076 ### Set up low-level terminfo dependencies for makefiles.
24077
24078 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24079 # do not need libdl
24080 TICS_LIST=
24081 if test "x$with_dlsym" = xyes ; then
24082
24083 # remove dl library from $SHLIB_LIST
24084 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24085
24086 fi
24087
24088 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24089 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24090 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24091 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24092 then
24093         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24094 fi
24095
24096 if test "$with_ticlib" != no ; then
24097
24098         if test "x$with_ticlib" != xyes ; then
24099                 TICS_NAME=$with_ticlib
24100                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24101                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24102                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24103                 TICS_LIB_SUFFIX="${with_ticlib}"
24104         else
24105                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24106                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24107                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24108                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24109         fi
24110         TICS_LDFLAGS="-L${LIB_DIR}"
24111         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24112 else
24113         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24114         TICS_LDFLAGS="-L${LIB_DIR}"
24115         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24116 fi
24117
24118 if test "$with_termlib" != no ; then
24119
24120         if test "x$with_termlib" != xyes ; then
24121                 TINFO_NAME=$with_termlib
24122                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24123                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24124                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24125                 TINFO_LIB_SUFFIX="${with_termlib}"
24126         else
24127                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24128                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24129                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24130                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24131         fi
24132
24133         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24134         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24135         if test "$DFT_LWR_MODEL" = "libtool"; then
24136                 TEST_ARGS="${TEST_DEPS}"
24137                 TEST_ARG2="${TEST_DEP2}"
24138                 TINFO_LDFLAGS="-L${LIB_DIR}"
24139                 TINFO_LIBS="$TEST_ARGS"
24140                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24141                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24142         else
24143                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24144                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24145                 if test "x$with_term_driver" != xno ; then
24146                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24147                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24148                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24149                 else
24150                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24151                         TINFO_LIBS="$TEST_ARGS"
24152                 fi
24153                 TINFO_LDFLAGS="-L${LIB_DIR}"
24154                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24155         fi
24156 else
24157         # the next lines are needed for linking libtic over libncurses
24158         TINFO_NAME=${LIB_NAME}
24159         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24160         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24161         if test "x$with_tic_depends" = xyes ; then
24162                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24163         else
24164                 TICS_LIST="$SHLIB_LIST"
24165         fi
24166
24167         TINFO_LDFLAGS="-L${LIB_DIR}"
24168         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24169 fi
24170
24171 if test "$DFT_LWR_MODEL" = shared ; then
24172         case $cf_cv_system_name in
24173         (cygwin*|msys*)
24174                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24175                 TINFO_SUFFIX=.dll
24176                 ;;
24177         esac
24178 fi
24179
24180 if test "x$with_dlsym" = xyes ; then
24181
24182 # remove dl library from $TICS_LIST
24183 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24184
24185 fi
24186
24187 if test "$DFT_LWR_MODEL" = "libtool"; then
24188         OBJEXT=lo
24189 fi
24190
24191 # needed for Ada95
24192 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24193
24194 case $DFT_LWR_MODEL in
24195 (normal|debug|profile)
24196
24197 if test "$GCC" = yes ; then
24198         case $cf_cv_system_name in
24199         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24200                 LDFLAGS_STATIC=
24201                 LDFLAGS_SHARED=
24202                 ;;
24203         (*)     # normally, except when broken
24204                 LDFLAGS_STATIC=-static
24205                 LDFLAGS_SHARED=-dynamic
24206                 ;;
24207         esac
24208 else
24209         case $cf_cv_system_name in
24210         (aix[4-7]*)     # from ld manpage
24211                 LDFLAGS_STATIC=-bstatic
24212                 LDFLAGS_SHARED=-bdynamic
24213                 ;;
24214         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24215                 # We could also use just "archive" and "shared".
24216                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24217                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24218                 ;;
24219         (irix*)         # from ld manpage IRIX64
24220                 LDFLAGS_STATIC=-Bstatic
24221                 LDFLAGS_SHARED=-Bdynamic
24222                 ;;
24223         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24224                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24225                 LDFLAGS_STATIC=-noso
24226                 LDFLAGS_SHARED=-so_archive
24227                 ;;
24228         (solaris2*)
24229                 LDFLAGS_STATIC=-Bstatic
24230                 LDFLAGS_SHARED=-Bdynamic
24231                 ;;
24232         esac
24233 fi
24234
24235 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24236 then
24237         echo "$as_me:24237: checking if linker supports switching between static/dynamic" >&5
24238 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24239
24240         rm -f libconftest.a
24241         cat >conftest.$ac_ext <<EOF
24242 #line 24242 "configure"
24243 #include <stdio.h>
24244 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24245 EOF
24246         if { (eval echo "$as_me:24246: \"$ac_compile\"") >&5
24247   (eval $ac_compile) 2>&5
24248   ac_status=$?
24249   echo "$as_me:24249: \$? = $ac_status" >&5
24250   (exit $ac_status); } ; then
24251                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24252                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24253         fi
24254         rm -f conftest.*
24255
24256         cf_save_LIBS="$LIBS"
24257
24258         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24259         cat >conftest.$ac_ext <<_ACEOF
24260 #line 24260 "configure"
24261 #include "confdefs.h"
24262
24263 #line 24263 "configure"
24264 #include <stdio.h>
24265 int cf_ldflags_static(FILE *fp);
24266
24267 int
24268 main (void)
24269 {
24270
24271         return cf_ldflags_static(stdin);
24272
24273   ;
24274   return 0;
24275 }
24276 _ACEOF
24277 rm -f conftest.$ac_objext conftest$ac_exeext
24278 if { (eval echo "$as_me:24278: \"$ac_link\"") >&5
24279   (eval $ac_link) 2>&5
24280   ac_status=$?
24281   echo "$as_me:24281: \$? = $ac_status" >&5
24282   (exit $ac_status); } &&
24283          { ac_try='test -s conftest$ac_exeext'
24284   { (eval echo "$as_me:24284: \"$ac_try\"") >&5
24285   (eval $ac_try) 2>&5
24286   ac_status=$?
24287   echo "$as_me:24287: \$? = $ac_status" >&5
24288   (exit $ac_status); }; }; then
24289
24290         # some linkers simply ignore the -dynamic
24291         case x`file conftest$ac_exeext 2>/dev/null` in
24292         (*static*)
24293                 cf_ldflags_static=no
24294                 ;;
24295         (*)
24296                 cf_ldflags_static=yes
24297                 ;;
24298         esac
24299
24300 else
24301   echo "$as_me: failed program was:" >&5
24302 cat conftest.$ac_ext >&5
24303 cf_ldflags_static=no
24304 fi
24305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24306
24307         rm -f libconftest.*
24308         LIBS="$cf_save_LIBS"
24309
24310         echo "$as_me:24310: result: $cf_ldflags_static" >&5
24311 echo "${ECHO_T}$cf_ldflags_static" >&6
24312
24313         if test $cf_ldflags_static != yes
24314         then
24315                 LDFLAGS_STATIC=
24316                 LDFLAGS_SHARED=
24317         fi
24318 else
24319         LDFLAGS_STATIC=
24320         LDFLAGS_SHARED=
24321 fi
24322
24323         ;;
24324 esac
24325
24326 echo "$as_me:24326: checking where we will install curses.h" >&5
24327 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24328
24329 includesubdir=
24330 if test "$with_overwrite" = no && \
24331  ( test "x$includedir" = 'x${prefix}/include' || \
24332    test "x$includedir" = "x${prefix}/include" )
24333 then
24334         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24335 fi
24336 echo "$as_me:24336: result: ${includedir}${includesubdir}" >&5
24337 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24338
24339 ### Resolve a conflict between normal and wide-curses by forcing applications
24340 ### that will need libutf8 to add it to their configure script.
24341 if test "$with_overwrite" != no ; then
24342 if test "$NCURSES_LIBUTF8" = 1 ; then
24343         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24344         { echo "$as_me:24344: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24345 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24346 fi
24347 fi
24348 WITH_OVERWRITE=$with_overwrite
24349
24350 # used to separate tack out of the tree
24351 NCURSES_TREE=
24352
24353 ### predefined stuff for the test programs
24354
24355 cat >>confdefs.h <<\EOF
24356 #define HAVE_SLK_COLOR 1
24357 EOF
24358
24359 ### Construct the list of subdirectories for which we'll customize makefiles
24360 ### with the appropriate compile-rules.
24361
24362 echo "$as_me:24362: checking for src modules" >&5
24363 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24364
24365 # dependencies and linker-arguments for test-programs
24366 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24367 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24368 if test "$DFT_LWR_MODEL" = "libtool"; then
24369         TEST_ARGS="${TEST_DEPS}"
24370         TEST_ARG2="${TEST_DEP2}"
24371 else
24372         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24373         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24374 fi
24375
24376 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24377 cf_cv_src_modules=
24378 for cf_dir in $modules_to_build
24379 do
24380         if test -f $srcdir/$cf_dir/modules; then
24381
24382                 # We may/may not have tack in the distribution, though the
24383                 # makefile is.
24384                 if test $cf_dir = tack ; then
24385                         if test "x$cf_with_tack" != "xyes"; then
24386                                 continue
24387                         fi
24388                 fi
24389
24390                 if test -z "$cf_cv_src_modules"; then
24391                         cf_cv_src_modules=$cf_dir
24392                 else
24393                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24394                 fi
24395
24396                 # Make the ncurses_cfg.h file record the library interface files as
24397                 # well.  These are header files that are the same name as their
24398                 # directory.  Ncurses is the only library that does not follow
24399                 # that pattern.
24400                 if test $cf_dir = tack ; then
24401                         continue
24402                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24403
24404 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24405
24406                         cat >>confdefs.h <<EOF
24407 #define HAVE_${cf_have_include}_H 1
24408 EOF
24409
24410                         cat >>confdefs.h <<EOF
24411 #define HAVE_LIB${cf_have_include} 1
24412 EOF
24413
24414                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24415                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24416                         if test "$DFT_LWR_MODEL" = "libtool"; then
24417                                 TEST_ARGS="${TEST_DEPS}"
24418                                 TEST_ARG2="${TEST_DEP2}"
24419                         else
24420                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24421                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24422                         fi
24423                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24424                 fi
24425         fi
24426 done
24427 echo "$as_me:24427: result: $cf_cv_src_modules" >&5
24428 echo "${ECHO_T}$cf_cv_src_modules" >&6
24429
24430 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24431 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24432
24433 SRC_SUBDIRS=
24434 if test "x$cf_with_manpages" != xno ; then
24435         SRC_SUBDIRS="$SRC_SUBDIRS man"
24436 fi
24437 SRC_SUBDIRS="$SRC_SUBDIRS include"
24438 for cf_dir in $cf_cv_src_modules
24439 do
24440         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24441 done
24442 if test "x$cf_with_tests" != "xno" ; then
24443         SRC_SUBDIRS="$SRC_SUBDIRS test"
24444 fi
24445 # always make this, to install the ncurses-config script
24446 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24447 if test "$cf_with_cxx_binding" != no; then
24448         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24449         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24450 fi
24451
24452 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24453 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24454
24455 ADA_SUBDIRS=
24456 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24457         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24458         ADA_SUBDIRS="gen src"
24459         if test "x$cf_with_tests" != "xno" ; then
24460                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24461         fi
24462 fi
24463
24464 SUB_MAKEFILES=
24465 for cf_dir in $SRC_SUBDIRS
24466 do
24467         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24468 done
24469
24470 if test -n "$ADA_SUBDIRS"; then
24471         for cf_dir in $ADA_SUBDIRS
24472         do
24473                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24474         done
24475
24476 fi
24477
24478 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24479    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24480    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24481 fi
24482
24483 DIRS_TO_MAKE="lib"
24484 for cf_item in $cf_list_models
24485 do
24486
24487         case $cf_item in
24488         (libtool) cf_subdir='obj_lo'  ;;
24489         (normal)  cf_subdir='objects' ;;
24490         (debug)   cf_subdir='obj_g' ;;
24491         (profile) cf_subdir='obj_p' ;;
24492         (shared)
24493                 case $cf_cv_system_name in
24494                 (cygwin|msys)
24495                         cf_subdir='objects' ;;
24496                 (*)
24497                         cf_subdir='obj_s' ;;
24498                 esac
24499         esac
24500
24501         for cf_item2 in $DIRS_TO_MAKE
24502         do
24503                 test $cf_item2 = $cf_subdir && break
24504         done
24505         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24506 done
24507 for cf_dir in $DIRS_TO_MAKE
24508 do
24509         test ! -d $cf_dir && mkdir $cf_dir
24510 done
24511
24512 # symbols that differ when compiling Ada95 by itself.
24513 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24514
24515 # values to use as strings
24516
24517 cat >>confdefs.h <<EOF
24518 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24519 EOF
24520
24521 cat >>confdefs.h <<EOF
24522 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24523 EOF
24524
24525 ### Now that we're done running tests, add the compiler-warnings, if any
24526
24527 cf_fix_cppflags=no
24528 cf_new_cflags=
24529 cf_new_cppflags=
24530 cf_new_extra_cppflags=
24531
24532 for cf_add_cflags in $EXTRA_CFLAGS
24533 do
24534 case $cf_fix_cppflags in
24535 (no)
24536         case $cf_add_cflags in
24537         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24538                 case $cf_add_cflags in
24539                 (-D*)
24540                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24541
24542                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24543                                 && test -z "${cf_tst_cflags}" \
24544                                 && cf_fix_cppflags=yes
24545
24546                         if test $cf_fix_cppflags = yes ; then
24547
24548         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24549         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24550
24551                                 continue
24552                         elif test "${cf_tst_cflags}" = "\"'" ; then
24553
24554         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24555         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24556
24557                                 continue
24558                         fi
24559                         ;;
24560                 esac
24561                 case "$CPPFLAGS" in
24562                 (*$cf_add_cflags)
24563                         ;;
24564                 (*)
24565                         case $cf_add_cflags in
24566                         (-D*)
24567                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24568
24569 CPPFLAGS=`echo "$CPPFLAGS" | \
24570         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24571                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24572
24573                                 ;;
24574                         esac
24575
24576         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24577         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24578
24579                         ;;
24580                 esac
24581                 ;;
24582         (*)
24583
24584         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24585         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24586
24587                 ;;
24588         esac
24589         ;;
24590 (yes)
24591
24592         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24593         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24594
24595         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24596
24597         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24598                 && test -z "${cf_tst_cflags}" \
24599                 && cf_fix_cppflags=no
24600         ;;
24601 esac
24602 done
24603
24604 if test -n "$cf_new_cflags" ; then
24605
24606         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24607         CFLAGS="${CFLAGS}$cf_new_cflags"
24608
24609 fi
24610
24611 if test -n "$cf_new_cppflags" ; then
24612
24613         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24614         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24615
24616 fi
24617
24618 if test -n "$cf_new_extra_cppflags" ; then
24619
24620         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24621         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24622
24623 fi
24624
24625 ### Define substitutions for header files to avoid name-pollution
24626
24627 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24628         HAVE_TCGETATTR=1
24629 else
24630         HAVE_TCGETATTR=0
24631 fi
24632
24633 if test "x$ac_cv_header_stdint_h" = xyes ; then
24634         HAVE_STDINT_H=1
24635 else
24636         HAVE_STDINT_H=0
24637 fi
24638
24639 if test "x$ac_cv_header_termio_h" = xyes ; then
24640         HAVE_TERMIO_H=1
24641 else
24642         HAVE_TERMIO_H=0
24643 fi
24644
24645 if test "x$ac_cv_header_termios_h" = xyes ; then
24646         HAVE_TERMIOS_H=1
24647 else
24648         HAVE_TERMIOS_H=0
24649 fi
24650
24651 ################################################################################
24652 test "x$use_database" = xyes && \
24653 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24654
24655 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24656 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24657
24658 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24659 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24660 fi
24661
24662 # Extract the first word of "tic", so it can be a program name with args.
24663 set dummy tic; ac_word=$2
24664 echo "$as_me:24664: checking for $ac_word" >&5
24665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24666 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24667   echo $ECHO_N "(cached) $ECHO_C" >&6
24668 else
24669   case $TIC_PATH in
24670   [\\/]* | ?:[\\/]*)
24671   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24672   ;;
24673   *)
24674   ac_save_IFS=$IFS; IFS=$ac_path_separator
24675 ac_dummy="$PATH:/usr/local/ncurses/bin"
24676 for ac_dir in $ac_dummy; do
24677   IFS=$ac_save_IFS
24678   test -z "$ac_dir" && ac_dir=.
24679   if $as_executable_p "$ac_dir/$ac_word"; then
24680    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24681    echo "$as_me:24681: found $ac_dir/$ac_word" >&5
24682    break
24683 fi
24684 done
24685
24686   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24687   ;;
24688 esac
24689 fi
24690 TIC_PATH=$ac_cv_path_TIC_PATH
24691
24692 if test -n "$TIC_PATH"; then
24693   echo "$as_me:24693: result: $TIC_PATH" >&5
24694 echo "${ECHO_T}$TIC_PATH" >&6
24695 else
24696   echo "$as_me:24696: result: no" >&5
24697 echo "${ECHO_T}no" >&6
24698 fi
24699
24700 if test -n "$FALLBACK_LIST"
24701 then
24702         if test "$TIC_PATH" = unknown
24703         then
24704                 { echo "$as_me:24704: WARNING: no tic program found for fallbacks" >&5
24705 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24706         fi
24707 fi
24708
24709 if test "x$cf_with_tests" != xno ; then
24710         MAKE_TESTS=
24711 else
24712         MAKE_TESTS="#"
24713 fi
24714
24715 ADAHTML_DIR=../../doc/html/ada
24716
24717 # these could be configurable, but are not currently
24718 PANEL_NAME=panel
24719 MENU_NAME=menu
24720 FORM_NAME=form
24721 CXX_NAME=ncurses++
24722
24723 # workaround for OS/2 (20151017)
24724 case $cf_cv_system_name in
24725 (os2*)
24726         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24727         ;;
24728 (*)
24729         LIBTOOL_OPTS_CXX=
24730         ;;
24731 esac
24732
24733 # workaround for g++ versus Solaris (20131116)
24734 case $cf_cv_system_name in
24735 (solaris2*)
24736         case "x$CPPFLAGS" in
24737         (*-D_XOPEN_SOURCE_EXTENDED*)
24738                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24739
24740 echo "${as_me:-configure}:24740: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24741
24742                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24743                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24744                 ;;
24745         esac
24746         ;;
24747 esac
24748
24749 # Help to automatically enable the extended curses features when using either
24750 # the *-config or the ".pc" files by adding defines.
24751 echo "$as_me:24751: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24752 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24753 PKG_CFLAGS=
24754 for cf_loop1 in $CPPFLAGS_after_XOPEN
24755 do
24756         cf_found=no
24757         for cf_loop2 in $CPPFLAGS_before_XOPEN
24758         do
24759                 if test "x$cf_loop1" = "x$cf_loop2"
24760                 then
24761                         cf_found=yes
24762                         break
24763                 fi
24764         done
24765         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24766 done
24767 echo "$as_me:24767: result: $PKG_CFLAGS" >&5
24768 echo "${ECHO_T}$PKG_CFLAGS" >&6
24769
24770 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24771 case "x$NCURSES_OSPEED" in
24772 (*short*)
24773         cf_compatible=1
24774         ;;
24775 (*)
24776         cf_compatible=0
24777         ;;
24778 esac
24779
24780 cat >>confdefs.h <<EOF
24781 #define NCURSES_OSPEED_COMPAT $cf_compatible
24782 EOF
24783
24784 case "x$cf_cv_typeof_chtype" in
24785 (xshort|xint|xlong)
24786         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24787         ;;
24788 esac
24789
24790 case "x$cf_cv_typeof_mmask_t" in
24791 (xshort|xint|xlong)
24792         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24793         ;;
24794 esac
24795
24796 # substitute into misc/Makefile to suppress
24797 # (un)install.data from the
24798 # (un)install rules.
24799 if test "x$cf_with_db_install" = "xno"; then
24800         MISC_INSTALL_DATA=
24801         MISC_UNINSTALL_DATA=
24802 else
24803         MISC_INSTALL_DATA=install.data
24804         MISC_UNINSTALL_DATA=uninstall.data
24805 fi
24806
24807 SUB_SCRIPTS=
24808
24809 if test -n "$PACKAGE"
24810 then
24811         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24812         export PACKAGE
24813         echo "package: $PACKAGE"
24814 fi
24815
24816 UNALTERED_SYMS=
24817 cf_filter_syms=no
24818
24819 if test -n "$RESULTING_SYMS"
24820 then
24821         cf_filter_syms=$cf_dft_filter_syms
24822         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24823
24824 echo "${as_me:-configure}:24824: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24825
24826 fi
24827
24828 if test "x$WILDCARD_SYMS" = xno
24829 then
24830         cf_filter_syms=yes
24831 fi
24832
24833 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24834
24835 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24836 if test $cf_filter_syms = yes
24837 then
24838         RESULTING_SYMS=resulting.map
24839 fi
24840
24841 if test "x$cross_compiling" = xyes ; then
24842         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24843         CHECK_BUILD="#"
24844 else
24845         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24846         CHECK_BUILD=
24847 fi
24848
24849 cat >>confdefs.h <<\EOF
24850 #define HAVE_CURSES_DATA_BOOLNAMES 1
24851 EOF
24852
24853 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
24854 ac_config_commands="$ac_config_commands default"
24855 cat >confcache <<\_ACEOF
24856 # This file is a shell script that caches the results of configure
24857 # tests run on this system so they can be shared between configure
24858 # scripts and configure runs, see configure's option --config-cache.
24859 # It is not useful on other systems.  If it contains results you don't
24860 # want to keep, you may remove or edit it.
24861 #
24862 # config.status only pays attention to the cache file if you give it
24863 # the --recheck option to rerun configure.
24864 #
24865 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24866 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24867 # following values.
24868
24869 _ACEOF
24870
24871 # The following way of writing the cache mishandles newlines in values,
24872 # but we know of no workaround that is simple, portable, and efficient.
24873 # So, don't put newlines in cache variables' values.
24874 # Ultrix sh set writes to stderr and can't be redirected directly,
24875 # and sets the high bit in the cache file unless we assign to the vars.
24876 {
24877   (set) 2>&1 |
24878     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24879     *ac_space=\ *)
24880       # `set' does not quote correctly, so add quotes (double-quote
24881       # substitution turns \\\\ into \\, and sed turns \\ into \).
24882       sed -n \
24883         "s/'/'\\\\''/g;
24884           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24885       ;;
24886     *)
24887       # `set' quotes correctly as required by POSIX, so do not add quotes.
24888       sed -n \
24889         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24890       ;;
24891     esac;
24892 } |
24893   sed '
24894      t clear
24895      : clear
24896      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24897      t end
24898      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24899      : end' >>confcache
24900 if cmp -s $cache_file confcache; then :; else
24901   if test -w $cache_file; then
24902     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24903     cat confcache >$cache_file
24904   else
24905     echo "not updating unwritable cache $cache_file"
24906   fi
24907 fi
24908 rm -f confcache
24909
24910 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24911 # Let make expand exec_prefix.
24912 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24913
24914 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24915 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24916 # trailing colons and then remove the whole line if VPATH becomes empty
24917 # (actually we leave an empty line to preserve line numbers).
24918 if test "x$srcdir" = x.; then
24919   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24920 s/:*\$(srcdir):*/:/;
24921 s/:*\${srcdir}:*/:/;
24922 s/:*@srcdir@:*/:/;
24923 s/^\([^=]*=[    ]*\):*/\1/;
24924 s/:*$//;
24925 s/^[^=]*=[      ]*$//;
24926 }'
24927 fi
24928
24929 DEFS=-DHAVE_CONFIG_H
24930
24931 : ${CONFIG_STATUS=./config.status}
24932 ac_clean_files_save=$ac_clean_files
24933 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24934 { echo "$as_me:24934: creating $CONFIG_STATUS" >&5
24935 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24936 cat >$CONFIG_STATUS <<_ACEOF
24937 #! $SHELL
24938 # Generated automatically by configure.
24939 # Run this file to recreate the current configuration.
24940 # Compiler output produced by configure, useful for debugging
24941 # configure, is in config.log if it exists.
24942
24943 debug=false
24944 SHELL=\${CONFIG_SHELL-$SHELL}
24945 ac_cs_invocation="\$0 \$@"
24946
24947 _ACEOF
24948
24949 cat >>$CONFIG_STATUS <<\_ACEOF
24950 # Be Bourne compatible
24951 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24952   emulate sh
24953   NULLCMD=:
24954 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24955   set -o posix
24956 fi
24957
24958 # Name of the executable.
24959 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24960
24961 if expr a : '\(a\)' >/dev/null 2>&1; then
24962   as_expr=expr
24963 else
24964   as_expr=false
24965 fi
24966
24967 rm -f conf$$ conf$$.exe conf$$.file
24968 echo >conf$$.file
24969 if ln -s conf$$.file conf$$ 2>/dev/null; then
24970   # We could just check for DJGPP; but this test a) works b) is more generic
24971   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24972   if test -f conf$$.exe; then
24973     # Don't use ln at all; we don't have any links
24974     as_ln_s='cp -p'
24975   else
24976     as_ln_s='ln -s'
24977   fi
24978 elif ln conf$$.file conf$$ 2>/dev/null; then
24979   as_ln_s=ln
24980 else
24981   as_ln_s='cp -p'
24982 fi
24983 rm -f conf$$ conf$$.exe conf$$.file
24984
24985 as_executable_p="test -f"
24986
24987 # Support unset when possible.
24988 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24989   as_unset=unset
24990 else
24991   as_unset=false
24992 fi
24993
24994 # NLS nuisances.
24995 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24996 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24997 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24998 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24999 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25000 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25001 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25002 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25003
25004 # IFS
25005 # We need space, tab and new line, in precisely that order.
25006 as_nl='
25007 '
25008 IFS="   $as_nl"
25009
25010 # CDPATH.
25011 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25012
25013 exec 6>&1
25014
25015 _ACEOF
25016
25017 # Files that config.status was made for.
25018 if test -n "$ac_config_files"; then
25019   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25020 fi
25021
25022 if test -n "$ac_config_headers"; then
25023   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25024 fi
25025
25026 if test -n "$ac_config_links"; then
25027   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25028 fi
25029
25030 if test -n "$ac_config_commands"; then
25031   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25032 fi
25033
25034 cat >>$CONFIG_STATUS <<\EOF
25035
25036 ac_cs_usage="\
25037 \`$as_me' instantiates files from templates according to the
25038 current configuration.
25039
25040 Usage: $0 [OPTIONS] [FILE]...
25041
25042   -h, --help       print this help, then exit
25043   -V, --version    print version number, then exit
25044   -d, --debug      don't remove temporary files
25045       --recheck    update $as_me by reconfiguring in the same conditions
25046   --file=FILE[:TEMPLATE]
25047                    instantiate the configuration file FILE
25048   --header=FILE[:TEMPLATE]
25049                    instantiate the configuration header FILE
25050
25051 Configuration files:
25052 $config_files
25053
25054 Configuration headers:
25055 $config_headers
25056
25057 Configuration commands:
25058 $config_commands
25059
25060 Report bugs to <dickey@invisible-island.net>."
25061 EOF
25062
25063 cat >>$CONFIG_STATUS <<EOF
25064 ac_cs_version="\\
25065 config.status
25066 configured by $0, generated by GNU Autoconf 2.52.20181006,
25067   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25068
25069 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25070 Free Software Foundation, Inc.
25071 This config.status script is free software; the Free Software Foundation
25072 gives unlimited permission to copy, distribute and modify it."
25073 srcdir=$srcdir
25074 INSTALL="$INSTALL"
25075 EOF
25076
25077 cat >>$CONFIG_STATUS <<\EOF
25078 # If no file are specified by the user, then we need to provide default
25079 # value.  By we need to know if files were specified by the user.
25080 ac_need_defaults=:
25081 while test $# != 0
25082 do
25083   case $1 in
25084   --*=*)
25085     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25086     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25087     shift
25088     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25089     shift
25090     ;;
25091   -*);;
25092   *) # This is not an option, so the user has probably given explicit
25093      # arguments.
25094      ac_need_defaults=false;;
25095   esac
25096
25097   case $1 in
25098   # Handling of the options.
25099 EOF
25100 cat >>$CONFIG_STATUS <<EOF
25101   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25102     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25103     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25104 EOF
25105 cat >>$CONFIG_STATUS <<\EOF
25106   --version | --vers* | -V )
25107     echo "$ac_cs_version"; exit 0 ;;
25108   --he | --h)
25109     # Conflict between --help and --header
25110     { { echo "$as_me:25110: error: ambiguous option: $1
25111 Try \`$0 --help' for more information." >&5
25112 echo "$as_me: error: ambiguous option: $1
25113 Try \`$0 --help' for more information." >&2;}
25114    { (exit 1); exit 1; }; };;
25115   --help | --hel | -h )
25116     echo "$ac_cs_usage"; exit 0 ;;
25117   --debug | --d* | -d )
25118     debug=: ;;
25119   --file | --fil | --fi | --f )
25120     shift
25121     CONFIG_FILES="$CONFIG_FILES $1"
25122     ac_need_defaults=false;;
25123   --header | --heade | --head | --hea )
25124     shift
25125     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25126     ac_need_defaults=false;;
25127
25128   # This is an error.
25129   -*) { { echo "$as_me:25129: error: unrecognized option: $1
25130 Try \`$0 --help' for more information." >&5
25131 echo "$as_me: error: unrecognized option: $1
25132 Try \`$0 --help' for more information." >&2;}
25133    { (exit 1); exit 1; }; } ;;
25134
25135   *) ac_config_targets="$ac_config_targets $1" ;;
25136
25137   esac
25138   shift
25139 done
25140
25141 exec 5>>config.log
25142 cat >&5 << _ACEOF
25143
25144 ## ----------------------- ##
25145 ## Running config.status.  ##
25146 ## ----------------------- ##
25147
25148 This file was extended by $as_me 2.52.20181006, executed with
25149   CONFIG_FILES    = $CONFIG_FILES
25150   CONFIG_HEADERS  = $CONFIG_HEADERS
25151   CONFIG_LINKS    = $CONFIG_LINKS
25152   CONFIG_COMMANDS = $CONFIG_COMMANDS
25153   > $ac_cs_invocation
25154 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25155
25156 _ACEOF
25157 EOF
25158
25159 cat >>$CONFIG_STATUS <<EOF
25160 #
25161 # INIT-COMMANDS section.
25162 #
25163
25164 ### Special initialization commands, used to pass information from the
25165 ### configuration-run into config.status
25166
25167 AWK="$AWK"
25168 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25169 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25170 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25171 ECHO_LD="$ECHO_LD"
25172 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25173 LDCONFIG="$LDCONFIG"
25174 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25175 LIB_NAME="$LIB_NAME"
25176 LIB_PREFIX="$LIB_PREFIX"
25177 LIB_SUBSETS="$LIB_SUBSETS"
25178 LIB_SUFFIX="$LIB_SUFFIX"
25179 LIB_TRACING="$LIB_TRACING"
25180 LN_S="$LN_S"
25181 MAKE_TERMINFO="$MAKE_TERMINFO"
25182 NCURSES_MAJOR="$NCURSES_MAJOR"
25183 NCURSES_MINOR="$NCURSES_MINOR"
25184 NCURSES_OSPEED="$NCURSES_OSPEED"
25185 NCURSES_PATCH="$NCURSES_PATCH"
25186 SRC_SUBDIRS="$SRC_SUBDIRS"
25187 TERMINFO="$TERMINFO"
25188 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25189 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25190 TICS_NAME="$TICS_NAME"
25191 TICS_SUFFIX="$TICS_SUFFIX"
25192 TIC_PATH="$TIC_PATH"
25193 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25194 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25195 TINFO_NAME="$TINFO_NAME"
25196 TINFO_SUFFIX="$TINFO_SUFFIX"
25197 UNALTERED_SYMS="$UNALTERED_SYMS"
25198 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25199 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25200 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25201 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25202 WILDCARD_SYMS="$WILDCARD_SYMS"
25203 WITH_CURSES_H="$with_curses_h"
25204 WITH_ECHO="${enable_echo:=yes}"
25205 WITH_OVERWRITE="$with_overwrite"
25206 cf_LIST_MODELS="$cf_list_models"
25207 cf_cv_abi_version="$cf_cv_abi_version"
25208 cf_cv_do_relink="$cf_cv_do_relink"
25209 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25210 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25211 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25212 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25213 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25214 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25215 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25216 cf_cv_rel_version="$cf_cv_rel_version"
25217 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25218 cf_cv_shared_soname='$cf_cv_shared_soname'
25219 cf_cv_shlib_version="$cf_cv_shlib_version"
25220 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25221 cf_cv_system_name="$cf_cv_system_name"
25222 cf_cv_term_driver="$with_term_driver"
25223 cf_with_ada="$cf_with_ada"
25224 cf_with_cxx_binding="$cf_with_cxx_binding"
25225 cf_with_db_install="$cf_with_db_install"
25226 cf_with_manpages="$cf_with_manpages"
25227 cf_with_tests="$cf_with_tests"
25228 host="$host"
25229 target="$target"
25230 with_shared_cxx="$with_shared_cxx"
25231
25232 EOF
25233
25234 cat >>$CONFIG_STATUS <<\EOF
25235 for ac_config_target in $ac_config_targets
25236 do
25237   case "$ac_config_target" in
25238   # Handling of arguments.
25239   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25240   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25241   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25242   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25243   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25244   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25245   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25246   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25247   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25248   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25249   *) { { echo "$as_me:25249: error: invalid argument: $ac_config_target" >&5
25250 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25251    { (exit 1); exit 1; }; };;
25252   esac
25253 done
25254
25255 # If the user did not use the arguments to specify the items to instantiate,
25256 # then the envvar interface is used.  Set only those that are not.
25257 # We use the long form for the default assignment because of an extremely
25258 # bizarre bug on SunOS 4.1.3.
25259 if $ac_need_defaults; then
25260   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25261   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25262   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25263 fi
25264
25265 # Create a temporary directory, and hook for its removal unless debugging.
25266 $debug ||
25267 {
25268   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25269   trap '{ (exit 1); exit 1; }' 1 2 13 15
25270 }
25271
25272 # Create a (secure) tmp directory for tmp files.
25273 : ${TMPDIR=/tmp}
25274 {
25275   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25276   test -n "$tmp" && test -d "$tmp"
25277 }  ||
25278 {
25279   tmp=$TMPDIR/cs$$-$RANDOM
25280   (umask 077 && mkdir $tmp)
25281 } ||
25282 {
25283    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25284    { (exit 1); exit 1; }
25285 }
25286
25287 EOF
25288
25289 cat >>$CONFIG_STATUS <<EOF
25290
25291 #
25292 # CONFIG_FILES section.
25293 #
25294
25295 # No need to generate the scripts if there are no CONFIG_FILES.
25296 # This happens for instance when ./config.status config.h
25297 if test -n "\$CONFIG_FILES"; then
25298   # Protect against being on the right side of a sed subst in config.status.
25299   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25300    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25301 s,@SHELL@,$SHELL,;t t
25302 s,@exec_prefix@,$exec_prefix,;t t
25303 s,@prefix@,$prefix,;t t
25304 s,@program_transform_name@,$program_transform_name,;t t
25305 s,@bindir@,$bindir,;t t
25306 s,@sbindir@,$sbindir,;t t
25307 s,@libexecdir@,$libexecdir,;t t
25308 s,@datarootdir@,$datarootdir,;t t
25309 s,@datadir@,$datadir,;t t
25310 s,@sysconfdir@,$sysconfdir,;t t
25311 s,@sharedstatedir@,$sharedstatedir,;t t
25312 s,@localstatedir@,$localstatedir,;t t
25313 s,@runstatedir@,$runstatedir,;t t
25314 s,@libdir@,$libdir,;t t
25315 s,@includedir@,$includedir,;t t
25316 s,@oldincludedir@,$oldincludedir,;t t
25317 s,@infodir@,$infodir,;t t
25318 s,@mandir@,$mandir,;t t
25319 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25320 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25321 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25322 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25323 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25324 s,@build_alias@,$build_alias,;t t
25325 s,@host_alias@,$host_alias,;t t
25326 s,@target_alias@,$target_alias,;t t
25327 s,@ECHO_C@,$ECHO_C,;t t
25328 s,@ECHO_N@,$ECHO_N,;t t
25329 s,@ECHO_T@,$ECHO_T,;t t
25330 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25331 s,@DEFS@,$DEFS,;t t
25332 s,@LIBS@,$LIBS,;t t
25333 s,@top_builddir@,$top_builddir,;t t
25334 s,@EGREP@,$EGREP,;t t
25335 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25336 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25337 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25338 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25339 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25340 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25341 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25342 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25343 s,@VERSION@,$VERSION,;t t
25344 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25345 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25346 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25347 s,@PACKAGE@,$PACKAGE,;t t
25348 s,@build@,$build,;t t
25349 s,@build_cpu@,$build_cpu,;t t
25350 s,@build_vendor@,$build_vendor,;t t
25351 s,@build_os@,$build_os,;t t
25352 s,@host@,$host,;t t
25353 s,@host_cpu@,$host_cpu,;t t
25354 s,@host_vendor@,$host_vendor,;t t
25355 s,@host_os@,$host_os,;t t
25356 s,@target@,$target,;t t
25357 s,@target_cpu@,$target_cpu,;t t
25358 s,@target_vendor@,$target_vendor,;t t
25359 s,@target_os@,$target_os,;t t
25360 s,@CC@,$CC,;t t
25361 s,@CFLAGS@,$CFLAGS,;t t
25362 s,@LDFLAGS@,$LDFLAGS,;t t
25363 s,@CPPFLAGS@,$CPPFLAGS,;t t
25364 s,@ac_ct_CC@,$ac_ct_CC,;t t
25365 s,@EXEEXT@,$EXEEXT,;t t
25366 s,@OBJEXT@,$OBJEXT,;t t
25367 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25368 s,@CPP@,$CPP,;t t
25369 s,@LDCONFIG@,$LDCONFIG,;t t
25370 s,@CXX@,$CXX,;t t
25371 s,@CXXFLAGS@,$CXXFLAGS,;t t
25372 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25373 s,@AWK@,$AWK,;t t
25374 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25375 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25376 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25377 s,@LINT@,$LINT,;t t
25378 s,@LINT_OPTS@,$LINT_OPTS,;t t
25379 s,@LN_S@,$LN_S,;t t
25380 s,@cf_config_suffix@,$cf_config_suffix,;t t
25381 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25382 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25383 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25384 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25385 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25386 s,@SET_MAKE@,$SET_MAKE,;t t
25387 s,@CTAGS@,$CTAGS,;t t
25388 s,@ETAGS@,$ETAGS,;t t
25389 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25390 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25391 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25392 s,@RANLIB@,$RANLIB,;t t
25393 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25394 s,@LD@,$LD,;t t
25395 s,@ac_ct_LD@,$ac_ct_LD,;t t
25396 s,@AR@,$AR,;t t
25397 s,@ac_ct_AR@,$ac_ct_AR,;t t
25398 s,@NM@,$NM,;t t
25399 s,@ac_ct_NM@,$ac_ct_NM,;t t
25400 s,@ARFLAGS@,$ARFLAGS,;t t
25401 s,@DESTDIR@,$DESTDIR,;t t
25402 s,@BUILD_CC@,$BUILD_CC,;t t
25403 s,@BUILD_CPP@,$BUILD_CPP,;t t
25404 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25405 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25406 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25407 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25408 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25409 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25410 s,@cf_list_models@,$cf_list_models,;t t
25411 s,@ABI_VERSION@,$ABI_VERSION,;t t
25412 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25413 s,@LIBTOOL@,$LIBTOOL,;t t
25414 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25415 s,@LT_UNDEF@,$LT_UNDEF,;t t
25416 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25417 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25418 s,@LIB_CREATE@,$LIB_CREATE,;t t
25419 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25420 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25421 s,@LIB_PREP@,$LIB_PREP,;t t
25422 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25423 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25424 s,@LIB_LINK@,$LIB_LINK,;t t
25425 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25426 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25427 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25428 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25429 s,@TICS_NAME@,$TICS_NAME,;t t
25430 s,@TINFO_NAME@,$TINFO_NAME,;t t
25431 s,@LIB_NAME@,$LIB_NAME,;t t
25432 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25433 s,@CC_G_OPT@,$CC_G_OPT,;t t
25434 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25435 s,@LD_MODEL@,$LD_MODEL,;t t
25436 s,@shlibdir@,$shlibdir,;t t
25437 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25438 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25439 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25440 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25441 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25442 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25443 s,@LINK_PROGS@,$LINK_PROGS,;t t
25444 s,@LINK_TESTS@,$LINK_TESTS,;t t
25445 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25446 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25447 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25448 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25449 s,@RPATH_LIST@,$RPATH_LIST,;t t
25450 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25451 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25452 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25453 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25454 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25455 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25456 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25457 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25458 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25459 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25460 s,@XTERM_KBS@,$XTERM_KBS,;t t
25461 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25462 s,@TERMINFO@,$TERMINFO,;t t
25463 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25464 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25465 s,@TERMPATH@,$TERMPATH,;t t
25466 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25467 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25468 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25469 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25470 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25471 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25472 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25473 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25474 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25475 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25476 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25477 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25478 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25479 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25480 s,@RGB_PATH@,$RGB_PATH,;t t
25481 s,@no_x11_rgb@,$no_x11_rgb,;t t
25482 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25483 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25484 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25485 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25486 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25487 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25488 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25489 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25490 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25491 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25492 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25493 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25494 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25495 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25496 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25497 s,@PTHREAD@,$PTHREAD,;t t
25498 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25499 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25500 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25501 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25502 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25503 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25504 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25505 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25506 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25507 s,@ECHO_LT@,$ECHO_LT,;t t
25508 s,@ECHO_LD@,$ECHO_LD,;t t
25509 s,@RULE_CC@,$RULE_CC,;t t
25510 s,@SHOW_CC@,$SHOW_CC,;t t
25511 s,@ECHO_CC@,$ECHO_CC,;t t
25512 s,@ECHO_LINK@,$ECHO_LINK,;t t
25513 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25514 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25515 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25516 s,@ADAFLAGS@,$ADAFLAGS,;t t
25517 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25518 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25519 s,@ADA_TRACE@,$ADA_TRACE,;t t
25520 s,@MATH_LIB@,$MATH_LIB,;t t
25521 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25522 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25523 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25524 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25525 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25526 s,@TEST_LIBS@,$TEST_LIBS,;t t
25527 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25528 s,@CXXCPP@,$CXXCPP,;t t
25529 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25530 s,@CXX_AR@,$CXX_AR,;t t
25531 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25532 s,@CXXLIBS@,$CXXLIBS,;t t
25533 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25534 s,@gnatmake_exists@,$gnatmake_exists,;t t
25535 s,@gprconfig_exists@,$gprconfig_exists,;t t
25536 s,@M4_exists@,$M4_exists,;t t
25537 s,@cf_ada_make@,$cf_ada_make,;t t
25538 s,@cf_ada_config@,$cf_ada_config,;t t
25539 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25540 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25541 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25542 s,@cf_compile_generics@,$cf_compile_generics,;t t
25543 s,@cf_generic_objects@,$cf_generic_objects,;t t
25544 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25545 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25546 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25547 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25548 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25549 s,@cf_ada_package@,$cf_ada_package,;t t
25550 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25551 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25552 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25553 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25554 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25555 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25556 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25557 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25558 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25559 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25560 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25561 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25562 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25563 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25564 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25565 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25566 s,@TICS_LIBS@,$TICS_LIBS,;t t
25567 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25568 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25569 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25570 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25571 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25572 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25573 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25574 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25575 s,@includesubdir@,$includesubdir,;t t
25576 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25577 s,@TICS_LIST@,$TICS_LIST,;t t
25578 s,@TINFO_LIST@,$TINFO_LIST,;t t
25579 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25580 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25581 s,@TEST_ARGS@,$TEST_ARGS,;t t
25582 s,@TEST_DEPS@,$TEST_DEPS,;t t
25583 s,@TEST_ARG2@,$TEST_ARG2,;t t
25584 s,@TEST_DEP2@,$TEST_DEP2,;t t
25585 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25586 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25587 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25588 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25589 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25590 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25591 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25592 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25593 s,@cross_compiling@,$cross_compiling,;t t
25594 s,@TIC_PATH@,$TIC_PATH,;t t
25595 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25596 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25597 s,@PANEL_NAME@,$PANEL_NAME,;t t
25598 s,@MENU_NAME@,$MENU_NAME,;t t
25599 s,@FORM_NAME@,$FORM_NAME,;t t
25600 s,@CXX_NAME@,$CXX_NAME,;t t
25601 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25602 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25603 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25604 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25605 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25606 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25607 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25608 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25609 CEOF
25610
25611 EOF
25612
25613   cat >>$CONFIG_STATUS <<\EOF
25614   # Split the substitutions into bite-sized pieces for seds with
25615   # small command number limits, like on Digital OSF/1 and HP-UX.
25616   ac_max_sed_lines=48
25617   ac_sed_frag=1 # Number of current file.
25618   ac_beg=1 # First line for current file.
25619   ac_end=$ac_max_sed_lines # Line after last line for current file.
25620   ac_more_lines=:
25621   ac_sed_cmds=
25622   while $ac_more_lines; do
25623     if test $ac_beg -gt 1; then
25624       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25625     else
25626       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25627     fi
25628     if test ! -s $tmp/subs.frag; then
25629       ac_more_lines=false
25630     else
25631       # The purpose of the label and of the branching condition is to
25632       # speed up the sed processing (if there are no `@' at all, there
25633       # is no need to browse any of the substitutions).
25634       # These are the two extra sed commands mentioned above.
25635       (echo ':t
25636   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25637       # It is possible to make a multiline substitution using escaped newlines.
25638       # Ensure that we do not split the substitution between script fragments.
25639       ac_BEG=$ac_end
25640       ac_END=`expr $ac_end + $ac_max_sed_lines`
25641       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25642       if test -s $tmp/subs.next; then
25643         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25644         if test ! -s $tmp/subs.edit; then
25645           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25646           if test ! -s $tmp/subs.edit; then
25647             if test $ac_beg -gt 1; then
25648               ac_end=`expr $ac_end - 1`
25649               continue
25650             fi
25651           fi
25652         fi
25653       fi
25654
25655       if test -z "$ac_sed_cmds"; then
25656         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25657       else
25658         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25659       fi
25660       ac_sed_frag=`expr $ac_sed_frag + 1`
25661       ac_beg=$ac_end
25662       ac_end=`expr $ac_end + $ac_max_sed_lines`
25663     fi
25664   done
25665   if test -z "$ac_sed_cmds"; then
25666     ac_sed_cmds=cat
25667   fi
25668 fi # test -n "$CONFIG_FILES"
25669
25670 EOF
25671 cat >>$CONFIG_STATUS <<\EOF
25672 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25673   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25674   case $ac_file in
25675   - | *:- | *:-:* ) # input from stdin
25676         cat >$tmp/stdin
25677         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25678         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25679   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25680         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25681   * )   ac_file_in=$ac_file.in ;;
25682   esac
25683
25684   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25685   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25686          X"$ac_file" : 'X\(//\)[^/]' \| \
25687          X"$ac_file" : 'X\(//\)$' \| \
25688          X"$ac_file" : 'X\(/\)' \| \
25689          .     : '\(.\)' 2>/dev/null ||
25690 echo X"$ac_file" |
25691     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25692           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25693           /^X\(\/\/\)$/{ s//\1/; q; }
25694           /^X\(\/\).*/{ s//\1/; q; }
25695           s/.*/./; q'`
25696   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25697     { case "$ac_dir" in
25698   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25699   *)                      as_incr_dir=.;;
25700 esac
25701 as_dummy="$ac_dir"
25702 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25703   case $as_mkdir_dir in
25704     # Skip DOS drivespec
25705     ?:) as_incr_dir=$as_mkdir_dir ;;
25706     *)
25707       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25708       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25709     ;;
25710   esac
25711 done; }
25712
25713     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25714     # A "../" for each directory in $ac_dir_suffix.
25715     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25716   else
25717     ac_dir_suffix= ac_dots=
25718   fi
25719
25720   case $srcdir in
25721   .)  ac_srcdir=.
25722       if test -z "$ac_dots"; then
25723          ac_top_srcdir=.
25724       else
25725          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25726       fi ;;
25727   [\\/]* | ?:[\\/]* )
25728       ac_srcdir=$srcdir$ac_dir_suffix;
25729       ac_top_srcdir=$srcdir ;;
25730   *) # Relative path.
25731     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25732     ac_top_srcdir=$ac_dots$srcdir ;;
25733   esac
25734
25735   case $INSTALL in
25736   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25737   *) ac_INSTALL=$ac_dots$INSTALL ;;
25738   esac
25739
25740   if test x"$ac_file" != x-; then
25741     { echo "$as_me:25741: creating $ac_file" >&5
25742 echo "$as_me: creating $ac_file" >&6;}
25743     rm -f "$ac_file"
25744   fi
25745   # Let's still pretend it is `configure' which instantiates (i.e., don't
25746   # use $as_me), people would be surprised to read:
25747   #    /* config.h.  Generated automatically by config.status.  */
25748   configure_input="Generated automatically from `echo $ac_file_in |
25749                                                  sed 's,.*/,,'` by configure."
25750
25751   # First look for the input files in the build tree, otherwise in the
25752   # src tree.
25753   ac_file_inputs=`IFS=:
25754     for f in $ac_file_in; do
25755       case $f in
25756       -) echo $tmp/stdin ;;
25757       [\\/$]*)
25758          # Absolute (can't be DOS-style, as IFS=:)
25759          test -f "$f" || { { echo "$as_me:25759: error: cannot find input file: $f" >&5
25760 echo "$as_me: error: cannot find input file: $f" >&2;}
25761    { (exit 1); exit 1; }; }
25762          echo $f;;
25763       *) # Relative
25764          if test -f "$f"; then
25765            # Build tree
25766            echo $f
25767          elif test -f "$srcdir/$f"; then
25768            # Source tree
25769            echo $srcdir/$f
25770          else
25771            # /dev/null tree
25772            { { echo "$as_me:25772: error: cannot find input file: $f" >&5
25773 echo "$as_me: error: cannot find input file: $f" >&2;}
25774    { (exit 1); exit 1; }; }
25775          fi;;
25776       esac
25777     done` || { (exit 1); exit 1; }
25778 EOF
25779 cat >>$CONFIG_STATUS <<\EOF
25780   ac_warn_datarootdir=no
25781   if test x"$ac_file" != x-; then
25782     for ac_item in $ac_file_inputs
25783     do
25784       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25785       if test -n "$ac_seen"; then
25786         ac_used=`grep '@datarootdir@' $ac_item`
25787         if test -z "$ac_used"; then
25788           { echo "$as_me:25788: WARNING: datarootdir was used implicitly but not set:
25789 $ac_seen" >&5
25790 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25791 $ac_seen" >&2;}
25792           ac_warn_datarootdir=yes
25793         fi
25794       fi
25795       ac_seen=`grep '${datarootdir}' $ac_item`
25796       if test -n "$ac_seen"; then
25797         { echo "$as_me:25797: WARNING: datarootdir was used explicitly but not set:
25798 $ac_seen" >&5
25799 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25800 $ac_seen" >&2;}
25801         ac_warn_datarootdir=yes
25802       fi
25803     done
25804   fi
25805
25806 if test "x$ac_warn_datarootdir" = xyes; then
25807   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25808 fi
25809
25810 EOF
25811 cat >>$CONFIG_STATUS <<EOF
25812   sed "$ac_vpsub
25813 $extrasub
25814 EOF
25815 cat >>$CONFIG_STATUS <<\EOF
25816 :t
25817 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25818 s,@configure_input@,$configure_input,;t t
25819 s,@srcdir@,$ac_srcdir,;t t
25820 s,@top_srcdir@,$ac_top_srcdir,;t t
25821 s,@INSTALL@,$ac_INSTALL,;t t
25822 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25823   rm -f $tmp/stdin
25824   if test x"$ac_file" != x-; then
25825     cp $tmp/out $ac_file
25826
25827     for ac_name in prefix exec_prefix datarootdir
25828     do
25829         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25830         if test -n "$ac_seen"; then
25831             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25832             if test -z "$ac_init"; then
25833               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25834               { echo "$as_me:25834: WARNING: Variable $ac_name is used but was not set:
25835 $ac_seen" >&5
25836 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25837 $ac_seen" >&2;}
25838             fi
25839         fi
25840     done
25841     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25842     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25843     if test -s $tmp/out; then
25844       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25845       { echo "$as_me:25845: WARNING: Some variables may not be substituted:
25846 $ac_seen" >&5
25847 echo "$as_me: WARNING: Some variables may not be substituted:
25848 $ac_seen" >&2;}
25849     fi
25850   else
25851     cat $tmp/out
25852   fi
25853   rm -f $tmp/out
25854
25855 done
25856 EOF
25857 cat >>$CONFIG_STATUS <<\EOF
25858
25859 #
25860 # CONFIG_HEADER section.
25861 #
25862
25863 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25864 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25865 #
25866 # ac_d sets the value in "#define NAME VALUE" lines.
25867 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25868 ac_dB='[        ].*$,\1#\2'
25869 ac_dC=' '
25870 ac_dD=',;t'
25871 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25872 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25873 ac_iB='\([      ]\),\1#\2define\3'
25874 ac_iC=' '
25875 ac_iD='\4,;t'
25876 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25877 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25878 ac_uB='$,\1#\2define\3'
25879 ac_uC=' '
25880 ac_uD=',;t'
25881
25882 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25883   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25884   case $ac_file in
25885   - | *:- | *:-:* ) # input from stdin
25886         cat >$tmp/stdin
25887         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25888         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25889   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25890         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25891   * )   ac_file_in=$ac_file.in ;;
25892   esac
25893
25894   test x"$ac_file" != x- && { echo "$as_me:25894: creating $ac_file" >&5
25895 echo "$as_me: creating $ac_file" >&6;}
25896
25897   # First look for the input files in the build tree, otherwise in the
25898   # src tree.
25899   ac_file_inputs=`IFS=:
25900     for f in $ac_file_in; do
25901       case $f in
25902       -) echo $tmp/stdin ;;
25903       [\\/$]*)
25904          # Absolute (can't be DOS-style, as IFS=:)
25905          test -f "$f" || { { echo "$as_me:25905: error: cannot find input file: $f" >&5
25906 echo "$as_me: error: cannot find input file: $f" >&2;}
25907    { (exit 1); exit 1; }; }
25908          echo $f;;
25909       *) # Relative
25910          if test -f "$f"; then
25911            # Build tree
25912            echo $f
25913          elif test -f "$srcdir/$f"; then
25914            # Source tree
25915            echo $srcdir/$f
25916          else
25917            # /dev/null tree
25918            { { echo "$as_me:25918: error: cannot find input file: $f" >&5
25919 echo "$as_me: error: cannot find input file: $f" >&2;}
25920    { (exit 1); exit 1; }; }
25921          fi;;
25922       esac
25923     done` || { (exit 1); exit 1; }
25924   # Remove the trailing spaces.
25925   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25926
25927 EOF
25928
25929 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25930 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25931 # be either 'cat' or 'sort'.
25932 cat confdefs.h | uniq >conftest.vals
25933
25934 # Break up conftest.vals because some shells have a limit on
25935 # the size of here documents, and old seds have small limits too.
25936
25937 rm -f conftest.tail
25938 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25939 while grep . conftest.vals >/dev/null
25940 do
25941   # Write chunks of a limited-size here document to conftest.frag.
25942   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25943   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25944   echo 'CEOF' >> $CONFIG_STATUS
25945   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25946   rm -f conftest.vals
25947   mv conftest.tail conftest.vals
25948 done
25949 rm -f conftest.vals
25950
25951 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25952 # marker @DEFS@.
25953 echo '  cat >> conftest.edit <<CEOF
25954 /@DEFS@/r conftest.frag
25955 /@DEFS@/d
25956 CEOF
25957 sed -f conftest.edit $tmp/in > $tmp/out
25958 rm -f $tmp/in
25959 mv $tmp/out $tmp/in
25960 rm -f conftest.edit conftest.frag
25961 ' >> $CONFIG_STATUS
25962
25963 cat >>$CONFIG_STATUS <<\EOF
25964   # Let's still pretend it is `configure' which instantiates (i.e., don't
25965   # use $as_me), people would be surprised to read:
25966   #    /* config.h.  Generated automatically by config.status.  */
25967   if test x"$ac_file" = x-; then
25968     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25969   else
25970     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25971   fi
25972   cat $tmp/in >>$tmp/config.h
25973   rm -f $tmp/in
25974   if test x"$ac_file" != x-; then
25975     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25976       { echo "$as_me:25976: $ac_file is unchanged" >&5
25977 echo "$as_me: $ac_file is unchanged" >&6;}
25978     else
25979       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25980          X"$ac_file" : 'X\(//\)[^/]' \| \
25981          X"$ac_file" : 'X\(//\)$' \| \
25982          X"$ac_file" : 'X\(/\)' \| \
25983          .     : '\(.\)' 2>/dev/null ||
25984 echo X"$ac_file" |
25985     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25986           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25987           /^X\(\/\/\)$/{ s//\1/; q; }
25988           /^X\(\/\).*/{ s//\1/; q; }
25989           s/.*/./; q'`
25990       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25991         { case "$ac_dir" in
25992   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25993   *)                      as_incr_dir=.;;
25994 esac
25995 as_dummy="$ac_dir"
25996 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25997   case $as_mkdir_dir in
25998     # Skip DOS drivespec
25999     ?:) as_incr_dir=$as_mkdir_dir ;;
26000     *)
26001       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26002       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26003     ;;
26004   esac
26005 done; }
26006
26007       fi
26008       rm -f $ac_file
26009       mv $tmp/config.h $ac_file
26010     fi
26011   else
26012     cat $tmp/config.h
26013     rm -f $tmp/config.h
26014   fi
26015 done
26016 EOF
26017 cat >>$CONFIG_STATUS <<\EOF
26018 #
26019 # CONFIG_COMMANDS section.
26020 #
26021 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26022   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26023   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26024
26025   case $ac_dest in
26026     default )
26027 if test "x$cf_with_tests" != xno ; then
26028
26029 for cf_dir in test
26030 do
26031         if test ! -d $srcdir/$cf_dir; then
26032                 continue
26033         elif test -f $srcdir/$cf_dir/programs; then
26034                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26035         fi
26036 done
26037
26038 fi
26039
26040 cf_prefix=$LIB_PREFIX
26041
26042 case $cf_cv_shlib_version in
26043 (cygdll|msysdll|mingw)
26044         TINFO_NAME=$TINFO_ARG_SUFFIX
26045         TINFO_SUFFIX=.dll
26046         ;;
26047 esac
26048
26049 if test -n "$TINFO_SUFFIX" ; then
26050         case $TINFO_SUFFIX in
26051         (tw*)
26052                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26053                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26054                 ;;
26055         (t*)
26056                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26057                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26058                 ;;
26059         (w*)
26060                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26061                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26062                 ;;
26063         esac
26064 fi
26065
26066 for cf_dir in $SRC_SUBDIRS
26067 do
26068         if test ! -d $srcdir/$cf_dir ; then
26069                 continue
26070         elif test -f $srcdir/$cf_dir/modules; then
26071
26072                 SHARED_LIB=
26073                 Libs_To_Make=
26074                 cf_awk_program=
26075                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26076                 then
26077                         cf_awk_program="$cf_awk_program\
26078 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26079 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26080 "
26081                 fi
26082
26083                 if test "x$WILDCARD_SYMS" = xno
26084                 then
26085                         cf_awk_program="$cf_awk_program\
26086 /[      ]_\\*;/ { skip=1; next; }\
26087 "
26088                 fi
26089
26090                 if test "x$cf_awk_program" != "x"
26091                 then
26092                         cat >>$cf_dir/Makefile <<CF_EOF
26093
26094 # Generated by CF_LIB_RULES
26095 resulting.map: $UNALTERED_SYMS
26096         $AWK 'BEGIN { skip = 1; last=""; } \
26097 $cf_awk_program \
26098 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26099  skip = 0; last = \$\$0; } \
26100 END { print last; }' < $UNALTERED_SYMS >\$@
26101
26102 distclean::
26103         rm -f resulting.map
26104 CF_EOF
26105                 fi
26106
26107                 for cf_item in $cf_LIST_MODELS
26108                 do
26109
26110         case X$cf_item in
26111         (Xlibtool)
26112                 cf_suffix='.la'
26113                 cf_depsuf=$cf_suffix
26114                 ;;
26115         (Xdebug)
26116                 cf_suffix='_g.a'
26117                 cf_depsuf=$cf_suffix
26118                 ;;
26119         (Xprofile)
26120                 cf_suffix='_p.a'
26121                 cf_depsuf=$cf_suffix
26122                 ;;
26123         (Xshared)
26124                 case $cf_cv_system_name in
26125                 (aix[5-7]*)
26126                         cf_suffix='.so'
26127                         cf_depsuf=$cf_suffix
26128                         ;;
26129                 (cygwin*|msys*|mingw*)
26130                         cf_suffix='.dll'
26131                         cf_depsuf='.dll.a'
26132                         ;;
26133                 (darwin*)
26134                         cf_suffix='.dylib'
26135                         cf_depsuf=$cf_suffix
26136                         ;;
26137                 (hpux*)
26138                         case $target in
26139                         (ia64*)
26140                                 cf_suffix='.so'
26141                                 cf_depsuf=$cf_suffix
26142                                 ;;
26143                         (*)
26144                                 cf_suffix='.sl'
26145                                 cf_depsuf=$cf_suffix
26146                                 ;;
26147                         esac
26148                         ;;
26149                 (*)
26150                         cf_suffix='.so'
26151                         cf_depsuf=$cf_suffix
26152                         ;;
26153                 esac
26154                 ;;
26155         (*)
26156                 cf_suffix='.a'
26157                 cf_depsuf=$cf_suffix
26158                 ;;
26159         esac
26160         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26161         then
26162                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26163                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26164         fi
26165
26166                         cf_libname=$cf_dir
26167                         test "$cf_dir" = c++ && cf_libname=ncurses++
26168                         if test $cf_item = shared ; then
26169                                 if test -n "${LIB_SUFFIX}"
26170                                 then
26171                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26172                                 else
26173                                         cf_shared_suffix="$cf_suffix"
26174                                 fi
26175                                 if test "$cf_cv_do_symlinks" = yes ; then
26176                                         cf_version_name=
26177
26178                                         case "$cf_cv_shlib_version" in
26179                                         (rel)
26180                                                 cf_version_name=REL_VERSION
26181                                                 ;;
26182                                         (abi)
26183                                                 cf_version_name=ABI_VERSION
26184                                                 ;;
26185                                         esac
26186
26187                                         if test -n "$cf_version_name"
26188                                         then
26189                                                 case "$cf_cv_system_name" in
26190                                                 (darwin*)
26191                                                         # "w", etc?
26192                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26193                                                         ;;
26194                                                 (*)
26195                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26196                                                         ;;
26197                                                 esac
26198                                         fi
26199                                         if test -n "${USE_LIB_SUFFIX}"
26200                                         then
26201                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26202                                         else
26203                                                 cf_shared_suffix="$cf_suffix"
26204                                         fi
26205                                 fi
26206                                 # cygwin needs import library, and has unique naming convention
26207                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26208                                 # use 'cyg' prefix for shared lib.
26209                                 case $cf_cv_shlib_version in
26210                                 (cygdll)
26211                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26212                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26213                                         ;;
26214                                 (msysdll)
26215                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26216                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26217                                         ;;
26218                                 (mingw)
26219                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26220                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26221                                         ;;
26222                                 (*)
26223                                         cf_add_lib=
26224                                         ;;
26225                                 esac
26226                                 if test -n "$cf_add_lib"
26227                                 then
26228                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26229                                         continue
26230                                 fi
26231                         fi
26232                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26233                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26234                 done
26235
26236                 if test $cf_dir = ncurses ; then
26237                         cf_subsets="$LIB_SUBSETS"
26238                         cf_r_parts="$cf_subsets"
26239                         cf_liblist="$Libs_To_Make"
26240
26241                         while test -n "$cf_r_parts"
26242                         do
26243                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26244                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26245                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26246                                         cf_add_lib=
26247                                         case $cf_l_parts in
26248                                         (*termlib*)
26249                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26250                                                 ;;
26251                                         (*ticlib*)
26252                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26253                                                 ;;
26254                                         (*)
26255                                                 break
26256                                                 ;;
26257                                         esac
26258                                         if test -n "$cf_add_lib"; then
26259                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26260                                         fi
26261                                 else
26262                                         break
26263                                 fi
26264                         done
26265                 else
26266                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26267                 fi
26268
26269                 if test $cf_dir = c++; then
26270                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26271                                 cf_list=
26272                                 for cf_item in $Libs_To_Make
26273                                 do
26274                                         case $cf_item in
26275                                         (*.a)
26276                                                 ;;
26277                                         (*)
26278                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26279                                                 ;;
26280                                         esac
26281                                         for cf_test in $cf_list
26282                                         do
26283                                                 if test "$cf_test" = "$cf_item"
26284                                                 then
26285                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26286                                                         cf_item=
26287                                                         break
26288                                                 fi
26289                                         done
26290                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26291                                 done
26292                                 Libs_To_Make="$cf_list"
26293                         fi
26294                 fi
26295
26296                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26297                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26298                         $cf_dir/Makefile >$cf_dir/Makefile.out
26299                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26300
26301                 $AWK -f $srcdir/mk-0th.awk \
26302                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26303                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26304
26305                 for cf_subset in $cf_subsets
26306                 do
26307                         cf_subdirs=
26308                         for cf_item in $cf_LIST_MODELS
26309                         do
26310
26311                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26312
26313 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26314
26315                         CXX_MODEL=$cf_ITEM
26316                         if test "$CXX_MODEL" = SHARED; then
26317                                 case $cf_cv_shlib_version in
26318                                 (cygdll|msysdll|mingw)
26319                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26320
26321 echo "${as_me:-configure}:26321: testing overriding CXX_MODEL to SHARED ..." 1>&5
26322
26323                                         with_shared_cxx=yes
26324                                         ;;
26325                                 (*)
26326                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26327                                         ;;
26328                                 esac
26329                         fi
26330
26331         case X$cf_item in
26332         (Xlibtool)
26333                 cf_suffix='.la'
26334                 cf_depsuf=$cf_suffix
26335                 ;;
26336         (Xdebug)
26337                 cf_suffix='_g.a'
26338                 cf_depsuf=$cf_suffix
26339                 ;;
26340         (Xprofile)
26341                 cf_suffix='_p.a'
26342                 cf_depsuf=$cf_suffix
26343                 ;;
26344         (Xshared)
26345                 case $cf_cv_system_name in
26346                 (aix[5-7]*)
26347                         cf_suffix='.so'
26348                         cf_depsuf=$cf_suffix
26349                         ;;
26350                 (cygwin*|msys*|mingw*)
26351                         cf_suffix='.dll'
26352                         cf_depsuf='.dll.a'
26353                         ;;
26354                 (darwin*)
26355                         cf_suffix='.dylib'
26356                         cf_depsuf=$cf_suffix
26357                         ;;
26358                 (hpux*)
26359                         case $target in
26360                         (ia64*)
26361                                 cf_suffix='.so'
26362                                 cf_depsuf=$cf_suffix
26363                                 ;;
26364                         (*)
26365                                 cf_suffix='.sl'
26366                                 cf_depsuf=$cf_suffix
26367                                 ;;
26368                         esac
26369                         ;;
26370                 (*)
26371                         cf_suffix='.so'
26372                         cf_depsuf=$cf_suffix
26373                         ;;
26374                 esac
26375                 ;;
26376         (*)
26377                 cf_suffix='.a'
26378                 cf_depsuf=$cf_suffix
26379                 ;;
26380         esac
26381         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26382         then
26383                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26384                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26385         fi
26386
26387         case $cf_item in
26388         (libtool) cf_subdir='obj_lo'  ;;
26389         (normal)  cf_subdir='objects' ;;
26390         (debug)   cf_subdir='obj_g' ;;
26391         (profile) cf_subdir='obj_p' ;;
26392         (shared)
26393                 case $cf_cv_system_name in
26394                 (cygwin|msys)
26395                         cf_subdir='objects' ;;
26396                 (*)
26397                         cf_subdir='obj_s' ;;
26398                 esac
26399         esac
26400
26401                         # Test for case where we build libtinfo with a different name.
26402                         cf_libname=$cf_dir
26403                         if test $cf_dir = ncurses ; then
26404                                 case $cf_subset in
26405                                 (*base*)
26406                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26407                                         ;;
26408                                 (*termlib*)
26409                                         cf_libname=$TINFO_LIB_SUFFIX
26410                                         ;;
26411                                 (ticlib*)
26412                                         cf_libname=$TICS_LIB_SUFFIX
26413                                         ;;
26414                                 esac
26415                         elif test $cf_dir = c++ ; then
26416                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26417                         else
26418                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26419                         fi
26420                         if test -n "${USE_ARG_SUFFIX}" ; then
26421                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26422                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26423                         fi
26424
26425                         # These dependencies really are for development, not
26426                         # builds, but they are useful in porting, too.
26427                         cf_depend="../include/ncurses_cfg.h"
26428                         if test "$srcdir" = "."; then
26429                                 cf_reldir="."
26430                         else
26431                                 cf_reldir="\${srcdir}"
26432                         fi
26433
26434                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26435                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26436                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26437                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26438                         fi
26439
26440                         cf_dir_suffix=
26441                         old_cf_suffix="$cf_suffix"
26442                         if test "$cf_cv_shlib_version_infix" = yes ; then
26443                         if test -n "$USE_LIB_SUFFIX" ; then
26444                                 case $USE_LIB_SUFFIX in
26445                                 (tw*)
26446                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26447                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26448                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26449                                         ;;
26450                                 (t*)
26451                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26452                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26453                                         cf_dir_suffix=t$EXTRA_SUFFIX
26454                                         ;;
26455                                 (w*)
26456                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26457                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26458                                         cf_dir_suffix=w$EXTRA_SUFFIX
26459                                         ;;
26460                                 (*)
26461                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26462                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26463                                         cf_dir_suffix=$EXTRA_SUFFIX
26464                                         ;;
26465                                 esac
26466                         fi
26467                         fi
26468
26469                         $AWK -f $srcdir/mk-1st.awk \
26470                                 name=${cf_libname}${cf_dir_suffix} \
26471                                 traces=$LIB_TRACING \
26472                                 MODEL=$cf_ITEM \
26473                                 CXX_MODEL=$CXX_MODEL \
26474                                 model=$cf_subdir \
26475                                 prefix=$cf_prefix \
26476                                 suffix=$cf_suffix \
26477                                 subset=$cf_subset \
26478                                 driver=$cf_cv_term_driver \
26479                                 SymLink="$LN_S" \
26480                                 TermlibRoot=$TINFO_NAME \
26481                                 TermlibSuffix=$TINFO_SUFFIX \
26482                                 ShlibVer=$cf_cv_shlib_version \
26483                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26484                                 ReLink=${cf_cv_do_relink:-no} \
26485                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26486                                 DoLinks=$cf_cv_do_symlinks \
26487                                 rmSoLocs=$cf_cv_rm_so_locs \
26488                                 ldconfig="$LDCONFIG" \
26489                                 overwrite=$WITH_OVERWRITE \
26490                                 depend="$cf_depend" \
26491                                 host="$host" \
26492                                 libtool_version="$LIBTOOL_VERSION" \
26493                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26494
26495                         cf_suffix="$old_cf_suffix"
26496
26497                         for cf_subdir2 in $cf_subdirs lib
26498                         do
26499                                 test $cf_subdir = $cf_subdir2 && break
26500                         done
26501                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26502                         $AWK -f $srcdir/mk-2nd.awk \
26503                                 name=$cf_dir \
26504                                 traces=$LIB_TRACING \
26505                                 MODEL=$cf_ITEM \
26506                                 model=$cf_subdir \
26507                                 subset=$cf_subset \
26508                                 srcdir=$srcdir \
26509                                 echo=$WITH_ECHO \
26510                                 crenames=$cf_cv_prog_CC_c_o \
26511                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26512                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26513                         cf_subdirs="$cf_subdirs $cf_subdir"
26514                         done
26515                 done
26516         fi
26517
26518         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26519 done
26520
26521 for cf_dir in $SRC_SUBDIRS
26522 do
26523         if test ! -d $srcdir/$cf_dir ; then
26524                 continue
26525         fi
26526
26527         if test -f $cf_dir/Makefile ; then
26528                 case "$cf_dir" in
26529                 (Ada95)
26530                         echo 'libs \' >> Makefile
26531                         echo 'install.libs \' >> Makefile
26532                         echo 'uninstall.libs ::' >> Makefile
26533                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26534                         ;;
26535                 esac
26536         fi
26537
26538         if test -f $srcdir/$cf_dir/modules; then
26539                 echo >> Makefile
26540                 if test -f $srcdir/$cf_dir/headers; then
26541 cat >> Makefile <<CF_EOF
26542 install.includes \\
26543 uninstall.includes \\
26544 CF_EOF
26545                 fi
26546 if test "$cf_dir" != "c++" ; then
26547 echo 'lint \' >> Makefile
26548 fi
26549 cat >> Makefile <<CF_EOF
26550 libs \\
26551 lintlib \\
26552 install.libs \\
26553 uninstall.libs \\
26554 install.$cf_dir \\
26555 uninstall.$cf_dir ::
26556         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26557 CF_EOF
26558         elif test -f $srcdir/$cf_dir/headers; then
26559 cat >> Makefile <<CF_EOF
26560
26561 libs \\
26562 install.libs \\
26563 uninstall.libs \\
26564 install.includes \\
26565 uninstall.includes ::
26566         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26567 CF_EOF
26568 fi
26569 done
26570
26571 if test "x$cf_with_db_install" = xyes; then
26572 cat >> Makefile <<CF_EOF
26573
26574 install.libs uninstall.libs \\
26575 install.data uninstall.data ::
26576 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26577 CF_EOF
26578 else
26579 cat >> Makefile <<CF_EOF
26580
26581 install.libs uninstall.libs ::
26582         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26583 CF_EOF
26584 fi
26585
26586 if test "x$cf_with_manpages" = xyes; then
26587 cat >> Makefile <<CF_EOF
26588
26589 install.man \\
26590 uninstall.man ::
26591         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26592 CF_EOF
26593 fi
26594
26595 cat >> Makefile <<CF_EOF
26596
26597 distclean ::
26598         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26599         rm -f headers.sh headers.sed mk_shared_lib.sh
26600         rm -f edit_man.* man_alias.*
26601         rm -rf \${DIRS_TO_MAKE}
26602 CF_EOF
26603
26604 # Special case: tack's manpage lives in its own directory.
26605 if test "x$cf_with_manpages" = xyes; then
26606 if test "x$cf_with_tack" = "xyes"; then
26607 cat >> Makefile <<CF_EOF
26608
26609 install.man \\
26610 uninstall.man ::
26611         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26612 CF_EOF
26613 fi
26614 fi
26615
26616 rm -f headers.sed headers.sh
26617
26618 echo creating headers.sh
26619 cat >headers.sh <<CF_EOF
26620 #! $SHELL
26621 # This shell script is generated by the 'configure' script.  It is invoked in a
26622 # subdirectory of the build tree.  It generates a sed-script in the parent
26623 # directory that is used to adjust includes for header files that reside in a
26624 # subdirectory of /usr/include, etc.
26625 PRG=""
26626 while test \$# != 3
26627 do
26628 PRG="\$PRG \$1"; shift
26629 done
26630 DST=\$1
26631 REF=\$2
26632 SRC=\$3
26633 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26634 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26635 echo installing \$SRC in \$DST
26636 CF_EOF
26637
26638 if test $WITH_CURSES_H = yes; then
26639         cat >>headers.sh <<CF_EOF
26640 case \$DST in
26641 (/*/include/*)
26642         END=\`basename \$DST\`
26643         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26644         do
26645                 NAME=\`basename \$i\`
26646                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26647         done
26648         ;;
26649 (*)
26650         echo "" >> \$TMPSED
26651         ;;
26652 esac
26653 CF_EOF
26654
26655 else
26656         cat >>headers.sh <<CF_EOF
26657 case \$DST in
26658 (/*/include/*)
26659         END=\`basename \$DST\`
26660         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26661         do
26662                 NAME=\`basename \$i\`
26663                 if test "\$NAME" = "curses.h"
26664                 then
26665                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26666                         NAME=ncurses.h
26667                 fi
26668                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26669         done
26670         ;;
26671 (*)
26672         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26673         ;;
26674 esac
26675 CF_EOF
26676 fi
26677 cat >>headers.sh <<CF_EOF
26678 rm -f \$TMPSRC
26679 sed -f \$TMPSED \$SRC > \$TMPSRC
26680 NAME=\`basename \$SRC\`
26681 CF_EOF
26682 if test $WITH_CURSES_H != yes; then
26683         cat >>headers.sh <<CF_EOF
26684 test "\$NAME" = "curses.h" && NAME=ncurses.h
26685 CF_EOF
26686 fi
26687 cat >>headers.sh <<CF_EOF
26688 # Just in case someone gzip'd manpages, remove the conflicting copy.
26689 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26690
26691 eval \$PRG \$TMPSRC \$DST/\$NAME
26692 rm -f \$TMPSRC \$TMPSED
26693 CF_EOF
26694
26695 chmod 0755 headers.sh
26696
26697 for cf_dir in $SRC_SUBDIRS
26698 do
26699         if test ! -d $srcdir/$cf_dir ; then
26700                 continue
26701         fi
26702
26703         if test -f $srcdir/$cf_dir/headers; then
26704                 $AWK -f $srcdir/mk-hdr.awk \
26705                         subset="$LIB_SUBSETS" \
26706                         compat="$WITH_CURSES_H" \
26707                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26708         fi
26709
26710         if test -f $srcdir/$cf_dir/modules; then
26711                 if test "$cf_dir" != "c++" ; then
26712                         cat >>$cf_dir/Makefile <<"CF_EOF"
26713 depend : ${AUTO_SRC}
26714         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26715
26716 # DO NOT DELETE THIS LINE -- make depend depends on it.
26717 CF_EOF
26718                 fi
26719         fi
26720 done
26721
26722 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26723 if test -z "$USE_OLD_MAKERULES" ; then
26724         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26725 fi
26726 fi
26727  ;;
26728   esac
26729 done
26730 EOF
26731
26732 cat >>$CONFIG_STATUS <<\EOF
26733
26734 { (exit 0); exit 0; }
26735 EOF
26736 chmod +x $CONFIG_STATUS
26737 ac_clean_files=$ac_clean_files_save
26738
26739 # configure is writing to config.log, and then calls config.status.
26740 # config.status does its own redirection, appending to config.log.
26741 # Unfortunately, on DOS this fails, as config.log is still kept open
26742 # by configure, so config.status won't be able to write to it; its
26743 # output is simply discarded.  So we exec the FD to /dev/null,
26744 # effectively closing config.log, so it can be properly (re)opened and
26745 # appended to by config.status.  When coming back to configure, we
26746 # need to make the FD available again.
26747 if test "$no_create" != yes; then
26748   ac_cs_success=:
26749   exec 5>/dev/null
26750   $SHELL $CONFIG_STATUS || ac_cs_success=false
26751   exec 5>>config.log
26752   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26753   # would make configure fail if this is the last instruction.
26754   $ac_cs_success || { (exit 1); exit 1; }
26755 fi
26756 ${MAKE:-make} preinstall