]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20180901
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.665 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20180819.
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.20180819.  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 for ac_prog in lint cppcheck splint
3512 do
3513   # Extract the first word of "$ac_prog", so it can be a program name with args.
3514 set dummy $ac_prog; ac_word=$2
3515 echo "$as_me:3515: checking for $ac_word" >&5
3516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3517 if test "${ac_cv_prog_LINT+set}" = set; then
3518   echo $ECHO_N "(cached) $ECHO_C" >&6
3519 else
3520   if test -n "$LINT"; then
3521   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3522 else
3523   ac_save_IFS=$IFS; IFS=$ac_path_separator
3524 ac_dummy="$PATH"
3525 for ac_dir in $ac_dummy; do
3526   IFS=$ac_save_IFS
3527   test -z "$ac_dir" && ac_dir=.
3528   $as_executable_p "$ac_dir/$ac_word" || continue
3529 ac_cv_prog_LINT="$ac_prog"
3530 echo "$as_me:3530: found $ac_dir/$ac_word" >&5
3531 break
3532 done
3533
3534 fi
3535 fi
3536 LINT=$ac_cv_prog_LINT
3537 if test -n "$LINT"; then
3538   echo "$as_me:3538: result: $LINT" >&5
3539 echo "${ECHO_T}$LINT" >&6
3540 else
3541   echo "$as_me:3541: result: no" >&5
3542 echo "${ECHO_T}no" >&6
3543 fi
3544
3545   test -n "$LINT" && break
3546 done
3547
3548 echo "$as_me:3548: checking whether ln -s works" >&5
3549 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3550 LN_S=$as_ln_s
3551 if test "$LN_S" = "ln -s"; then
3552   echo "$as_me:3552: result: yes" >&5
3553 echo "${ECHO_T}yes" >&6
3554 else
3555   echo "$as_me:3555: result: no, using $LN_S" >&5
3556 echo "${ECHO_T}no, using $LN_S" >&6
3557 fi
3558
3559 echo "$as_me:3559: checking if $LN_S -f options work" >&5
3560 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3561
3562 rm -f conf$$.src conf$$dst
3563 echo >conf$$.dst
3564 echo first >conf$$.src
3565 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3566         cf_prog_ln_sf=yes
3567 else
3568         cf_prog_ln_sf=no
3569 fi
3570 rm -f conf$$.dst conf$$src
3571 echo "$as_me:3571: result: $cf_prog_ln_sf" >&5
3572 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3573
3574 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3575
3576 echo "$as_me:3576: checking for long file names" >&5
3577 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3578 if test "${ac_cv_sys_long_file_names+set}" = set; then
3579   echo $ECHO_N "(cached) $ECHO_C" >&6
3580 else
3581   ac_cv_sys_long_file_names=yes
3582 # Test for long file names in all the places we know might matter:
3583 #      .                the current directory, where building will happen
3584 #      $prefix/lib      where we will be installing things
3585 #      $exec_prefix/lib likewise
3586 # eval it to expand exec_prefix.
3587 #      $TMPDIR          if set, where it might want to write temporary files
3588 # if $TMPDIR is not set:
3589 #      /tmp             where it might want to write temporary files
3590 #      /var/tmp         likewise
3591 #      /usr/tmp         likewise
3592 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3593   ac_tmpdirs=$TMPDIR
3594 else
3595   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3596 fi
3597 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3598   test -d $ac_dir || continue
3599   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3600   ac_xdir=$ac_dir/cf$$
3601   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3602   ac_tf1=$ac_xdir/conftest9012345
3603   ac_tf2=$ac_xdir/conftest9012346
3604   (echo 1 >$ac_tf1) 2>/dev/null
3605   (echo 2 >$ac_tf2) 2>/dev/null
3606   ac_val=`cat $ac_tf1 2>/dev/null`
3607   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3608     ac_cv_sys_long_file_names=no
3609     rm -rf $ac_xdir 2>/dev/null
3610     break
3611   fi
3612   rm -rf $ac_xdir 2>/dev/null
3613 done
3614 fi
3615 echo "$as_me:3615: result: $ac_cv_sys_long_file_names" >&5
3616 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3617 if test $ac_cv_sys_long_file_names = yes; then
3618
3619 cat >>confdefs.h <<\EOF
3620 #define HAVE_LONG_FILE_NAMES 1
3621 EOF
3622
3623 fi
3624
3625 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3626 # of package conflict.
3627 cf_config_suffix=
3628
3629 # Check whether --with-config-suffix or --without-config-suffix was given.
3630 if test "${with_config_suffix+set}" = set; then
3631   withval="$with_config_suffix"
3632   case "x$withval" in
3633         (xyes|xno)
3634                 { echo "$as_me:3634: WARNING: expected a value for config-suffix option" >&5
3635 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3636                 ;;
3637         (*)     cf_config_suffix="$withval"
3638                 ;;
3639         esac
3640 fi;
3641
3642 # If we find pkg-config, check if we should install the ".pc" files.
3643
3644 echo "$as_me:3644: checking if you want to use pkg-config" >&5
3645 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3646
3647 # Check whether --with-pkg-config or --without-pkg-config was given.
3648 if test "${with_pkg_config+set}" = set; then
3649   withval="$with_pkg_config"
3650   cf_pkg_config=$withval
3651 else
3652   cf_pkg_config=yes
3653 fi;
3654 echo "$as_me:3654: result: $cf_pkg_config" >&5
3655 echo "${ECHO_T}$cf_pkg_config" >&6
3656
3657 case $cf_pkg_config in
3658 (no)
3659         PKG_CONFIG=none
3660         ;;
3661 (yes)
3662
3663 if test -n "$ac_tool_prefix"; then
3664   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3665 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3666 echo "$as_me:3666: checking for $ac_word" >&5
3667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3668 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3669   echo $ECHO_N "(cached) $ECHO_C" >&6
3670 else
3671   case $PKG_CONFIG in
3672   [\\/]* | ?:[\\/]*)
3673   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3674   ;;
3675   *)
3676   ac_save_IFS=$IFS; IFS=$ac_path_separator
3677 ac_dummy="$PATH"
3678 for ac_dir in $ac_dummy; do
3679   IFS=$ac_save_IFS
3680   test -z "$ac_dir" && ac_dir=.
3681   if $as_executable_p "$ac_dir/$ac_word"; then
3682    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3683    echo "$as_me:3683: found $ac_dir/$ac_word" >&5
3684    break
3685 fi
3686 done
3687
3688   ;;
3689 esac
3690 fi
3691 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3692
3693 if test -n "$PKG_CONFIG"; then
3694   echo "$as_me:3694: result: $PKG_CONFIG" >&5
3695 echo "${ECHO_T}$PKG_CONFIG" >&6
3696 else
3697   echo "$as_me:3697: result: no" >&5
3698 echo "${ECHO_T}no" >&6
3699 fi
3700
3701 fi
3702 if test -z "$ac_cv_path_PKG_CONFIG"; then
3703   ac_pt_PKG_CONFIG=$PKG_CONFIG
3704   # Extract the first word of "pkg-config", so it can be a program name with args.
3705 set dummy pkg-config; ac_word=$2
3706 echo "$as_me:3706: checking for $ac_word" >&5
3707 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3708 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3709   echo $ECHO_N "(cached) $ECHO_C" >&6
3710 else
3711   case $ac_pt_PKG_CONFIG in
3712   [\\/]* | ?:[\\/]*)
3713   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3714   ;;
3715   *)
3716   ac_save_IFS=$IFS; IFS=$ac_path_separator
3717 ac_dummy="$PATH"
3718 for ac_dir in $ac_dummy; do
3719   IFS=$ac_save_IFS
3720   test -z "$ac_dir" && ac_dir=.
3721   if $as_executable_p "$ac_dir/$ac_word"; then
3722    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3723    echo "$as_me:3723: found $ac_dir/$ac_word" >&5
3724    break
3725 fi
3726 done
3727
3728   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3729   ;;
3730 esac
3731 fi
3732 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3733
3734 if test -n "$ac_pt_PKG_CONFIG"; then
3735   echo "$as_me:3735: result: $ac_pt_PKG_CONFIG" >&5
3736 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3737 else
3738   echo "$as_me:3738: result: no" >&5
3739 echo "${ECHO_T}no" >&6
3740 fi
3741
3742   PKG_CONFIG=$ac_pt_PKG_CONFIG
3743 else
3744   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3745 fi
3746
3747         ;;
3748 (*)
3749         PKG_CONFIG=$withval
3750         ;;
3751 esac
3752
3753 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3754 if test "$PKG_CONFIG" != none ; then
3755
3756 if test "x$prefix" != xNONE; then
3757         cf_path_syntax="$prefix"
3758 else
3759         cf_path_syntax="$ac_default_prefix"
3760 fi
3761
3762 case ".$PKG_CONFIG" in
3763 (.\$\(*\)*|.\'*\'*)
3764         ;;
3765 (..|./*|.\\*)
3766         ;;
3767 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3768         ;;
3769 (.\${*prefix}*|.\${*dir}*)
3770         eval PKG_CONFIG="$PKG_CONFIG"
3771         case ".$PKG_CONFIG" in
3772         (.NONE/*)
3773                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3774                 ;;
3775         esac
3776         ;;
3777 (.no|.NONE/*)
3778         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3779         ;;
3780 (*)
3781         { { echo "$as_me:3781: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3782 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3783    { (exit 1); exit 1; }; }
3784         ;;
3785 esac
3786
3787 elif test "x$cf_pkg_config" != xno ; then
3788         { echo "$as_me:3788: WARNING: pkg-config is not installed" >&5
3789 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3790 fi
3791
3792 case $PKG_CONFIG in
3793 (no|none|yes)
3794         echo "$as_me:3794: checking for pkg-config library directory" >&5
3795 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3796         ;;
3797 (*)
3798         echo "$as_me:3798: checking for $PKG_CONFIG library directory" >&5
3799 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3800         ;;
3801 esac
3802
3803 PKG_CONFIG_LIBDIR=no
3804
3805 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3806 if test "${with_pkg_config_libdir+set}" = set; then
3807   withval="$with_pkg_config_libdir"
3808   PKG_CONFIG_LIBDIR=$withval
3809 else
3810   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3811 fi;
3812
3813 case x$PKG_CONFIG_LIBDIR in
3814 (x/*)
3815         ;;
3816 (xyes)
3817         # Look for the library directory using the same prefix as the executable
3818         if test "x$PKG_CONFIG" = xnone
3819         then
3820                 cf_path=$prefix
3821         else
3822                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3823         fi
3824
3825         # If you don't like using the default architecture, you have to specify the
3826         # intended library directory and corresponding compiler/linker options.
3827         #
3828         # This case allows for Debian's 2014-flavor of multiarch, along with the
3829         # most common variations before that point.  Some other variants spell the
3830         # directory differently, e.g., "pkg-config", and put it in unusual places.
3831         # pkg-config has always been poorly standardized, which is ironic...
3832         case x`(arch) 2>/dev/null` in
3833         (*64)
3834                 cf_search_path="\
3835                         $cf_path/lib/*64-linux-gnu \
3836                         $cf_path/share \
3837                         $cf_path/lib64 \
3838                         $cf_path/lib32 \
3839                         $cf_path/lib"
3840                 ;;
3841         (*)
3842                 cf_search_path="\
3843                         $cf_path/lib/*-linux-gnu \
3844                         $cf_path/share \
3845                         $cf_path/lib32 \
3846                         $cf_path/lib \
3847                         $cf_path/libdata"
3848                 ;;
3849         esac
3850
3851         test -n "$verbose" && echo "    list..." 1>&6
3852
3853 echo "${as_me:-configure}:3853: testing list... ..." 1>&5
3854
3855         for cf_config in $cf_search_path
3856         do
3857                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3858
3859 echo "${as_me:-configure}:3859: testing checking $cf_config/pkgconfig ..." 1>&5
3860
3861                 if test -d $cf_config/pkgconfig
3862                 then
3863                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3864                         echo "$as_me:3864: checking done" >&5
3865 echo $ECHO_N "checking done... $ECHO_C" >&6
3866                         break
3867                 fi
3868         done
3869         ;;
3870 (*)
3871         ;;
3872 esac
3873
3874 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3875         echo "$as_me:3875: result: $PKG_CONFIG_LIBDIR" >&5
3876 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3877 fi
3878
3879 if test "x$PKG_CONFIG" != xnone
3880 then
3881         echo "$as_me:3881: checking if we should install .pc files for $PKG_CONFIG" >&5
3882 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3883 else
3884         echo "$as_me:3884: checking if we should install .pc files" >&5
3885 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3886 fi
3887
3888 # Check whether --enable-pc-files or --disable-pc-files was given.
3889 if test "${enable_pc_files+set}" = set; then
3890   enableval="$enable_pc_files"
3891   enable_pc_files=$enableval
3892 else
3893   enable_pc_files=no
3894 fi;
3895 echo "$as_me:3895: result: $enable_pc_files" >&5
3896 echo "${ECHO_T}$enable_pc_files" >&6
3897
3898 if test "x$enable_pc_files" != xno
3899 then
3900         MAKE_PC_FILES=
3901         case "x$PKG_CONFIG_LIBDIR" in
3902         (xno|xyes)
3903                 { echo "$as_me:3903: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3904 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3905                 ;;
3906         (*)
3907
3908 if test "x$prefix" != xNONE; then
3909         cf_path_syntax="$prefix"
3910 else
3911         cf_path_syntax="$ac_default_prefix"
3912 fi
3913
3914 case ".$PKG_CONFIG_LIBDIR" in
3915 (.\$\(*\)*|.\'*\'*)
3916         ;;
3917 (..|./*|.\\*)
3918         ;;
3919 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3920         ;;
3921 (.\${*prefix}*|.\${*dir}*)
3922         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3923         case ".$PKG_CONFIG_LIBDIR" in
3924         (.NONE/*)
3925                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3926                 ;;
3927         esac
3928         ;;
3929 (.no|.NONE/*)
3930         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3931         ;;
3932 (*)
3933         { { echo "$as_me:3933: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3934 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3935    { (exit 1); exit 1; }; }
3936         ;;
3937 esac
3938
3939                 ;;
3940         esac
3941 else
3942         MAKE_PC_FILES="#"
3943 fi
3944
3945 if test -z "$MAKE_PC_FILES"
3946 then
3947         echo "$as_me:3947: checking for suffix to add to pc-files" >&5
3948 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3949
3950 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3951 if test "${with_pc_suffix+set}" = set; then
3952   withval="$with_pc_suffix"
3953   case "x$withval" in
3954         (xyes|xno)
3955                 PC_MODULE_SUFFIX=
3956                 ;;
3957         (*)     PC_MODULE_SUFFIX="$withval"
3958                 ;;
3959         esac
3960 fi;
3961         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3962         echo "$as_me:3962: result: $PC_MODULE_SUFFIX" >&5
3963 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3964         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3965
3966 fi
3967
3968 echo "$as_me:3968: checking if we should assume mixed-case filenames" >&5
3969 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3970
3971 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3972 if test "${enable_mixed_case+set}" = set; then
3973   enableval="$enable_mixed_case"
3974   enable_mixedcase=$enableval
3975 else
3976   enable_mixedcase=auto
3977 fi;
3978 echo "$as_me:3978: result: $enable_mixedcase" >&5
3979 echo "${ECHO_T}$enable_mixedcase" >&6
3980 if test "$enable_mixedcase" = "auto" ; then
3981
3982 echo "$as_me:3982: checking if filesystem supports mixed-case filenames" >&5
3983 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3984 if test "${cf_cv_mixedcase+set}" = set; then
3985   echo $ECHO_N "(cached) $ECHO_C" >&6
3986 else
3987
3988 if test "$cross_compiling" = yes ; then
3989         case $target_alias in
3990         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3991                 cf_cv_mixedcase=no
3992                 ;;
3993         (*)
3994                 cf_cv_mixedcase=yes
3995                 ;;
3996         esac
3997 else
3998         rm -f conftest CONFTEST
3999         echo test >conftest
4000         if test -f CONFTEST ; then
4001                 cf_cv_mixedcase=no
4002         else
4003                 cf_cv_mixedcase=yes
4004         fi
4005         rm -f conftest CONFTEST
4006 fi
4007
4008 fi
4009 echo "$as_me:4009: result: $cf_cv_mixedcase" >&5
4010 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4011 test "$cf_cv_mixedcase" = yes &&
4012 cat >>confdefs.h <<\EOF
4013 #define MIXEDCASE_FILENAMES 1
4014 EOF
4015
4016 else
4017         cf_cv_mixedcase=$enable_mixedcase
4018         if test "x$enable_mixedcase" = "xyes" ; then
4019
4020 cat >>confdefs.h <<\EOF
4021 #define MIXEDCASE_FILENAMES 1
4022 EOF
4023
4024         fi
4025 fi
4026
4027 # do this after mixed-case option (tags/TAGS is not as important as tic).
4028 echo "$as_me:4028: checking whether ${MAKE-make} sets \${MAKE}" >&5
4029 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4030 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4031 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4032   echo $ECHO_N "(cached) $ECHO_C" >&6
4033 else
4034   cat >conftest.make <<\EOF
4035 all:
4036         @echo 'ac_maketemp="${MAKE}"'
4037 EOF
4038 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4039 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4040 if test -n "$ac_maketemp"; then
4041   eval ac_cv_prog_make_${ac_make}_set=yes
4042 else
4043   eval ac_cv_prog_make_${ac_make}_set=no
4044 fi
4045 rm -f conftest.make
4046 fi
4047 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4048   echo "$as_me:4048: result: yes" >&5
4049 echo "${ECHO_T}yes" >&6
4050   SET_MAKE=
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054   SET_MAKE="MAKE=${MAKE-make}"
4055 fi
4056
4057 for ac_prog in exctags ctags
4058 do
4059   # Extract the first word of "$ac_prog", so it can be a program name with args.
4060 set dummy $ac_prog; ac_word=$2
4061 echo "$as_me:4061: checking for $ac_word" >&5
4062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4063 if test "${ac_cv_prog_CTAGS+set}" = set; then
4064   echo $ECHO_N "(cached) $ECHO_C" >&6
4065 else
4066   if test -n "$CTAGS"; then
4067   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4068 else
4069   ac_save_IFS=$IFS; IFS=$ac_path_separator
4070 ac_dummy="$PATH"
4071 for ac_dir in $ac_dummy; do
4072   IFS=$ac_save_IFS
4073   test -z "$ac_dir" && ac_dir=.
4074   $as_executable_p "$ac_dir/$ac_word" || continue
4075 ac_cv_prog_CTAGS="$ac_prog"
4076 echo "$as_me:4076: found $ac_dir/$ac_word" >&5
4077 break
4078 done
4079
4080 fi
4081 fi
4082 CTAGS=$ac_cv_prog_CTAGS
4083 if test -n "$CTAGS"; then
4084   echo "$as_me:4084: result: $CTAGS" >&5
4085 echo "${ECHO_T}$CTAGS" >&6
4086 else
4087   echo "$as_me:4087: result: no" >&5
4088 echo "${ECHO_T}no" >&6
4089 fi
4090
4091   test -n "$CTAGS" && break
4092 done
4093
4094 for ac_prog in exetags etags
4095 do
4096   # Extract the first word of "$ac_prog", so it can be a program name with args.
4097 set dummy $ac_prog; ac_word=$2
4098 echo "$as_me:4098: checking for $ac_word" >&5
4099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4100 if test "${ac_cv_prog_ETAGS+set}" = set; then
4101   echo $ECHO_N "(cached) $ECHO_C" >&6
4102 else
4103   if test -n "$ETAGS"; then
4104   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4105 else
4106   ac_save_IFS=$IFS; IFS=$ac_path_separator
4107 ac_dummy="$PATH"
4108 for ac_dir in $ac_dummy; do
4109   IFS=$ac_save_IFS
4110   test -z "$ac_dir" && ac_dir=.
4111   $as_executable_p "$ac_dir/$ac_word" || continue
4112 ac_cv_prog_ETAGS="$ac_prog"
4113 echo "$as_me:4113: found $ac_dir/$ac_word" >&5
4114 break
4115 done
4116
4117 fi
4118 fi
4119 ETAGS=$ac_cv_prog_ETAGS
4120 if test -n "$ETAGS"; then
4121   echo "$as_me:4121: result: $ETAGS" >&5
4122 echo "${ECHO_T}$ETAGS" >&6
4123 else
4124   echo "$as_me:4124: result: no" >&5
4125 echo "${ECHO_T}no" >&6
4126 fi
4127
4128   test -n "$ETAGS" && break
4129 done
4130
4131 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4132 set dummy ${CTAGS:-ctags}; ac_word=$2
4133 echo "$as_me:4133: checking for $ac_word" >&5
4134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4135 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4136   echo $ECHO_N "(cached) $ECHO_C" >&6
4137 else
4138   if test -n "$MAKE_LOWER_TAGS"; then
4139   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4140 else
4141   ac_save_IFS=$IFS; IFS=$ac_path_separator
4142 ac_dummy="$PATH"
4143 for ac_dir in $ac_dummy; do
4144   IFS=$ac_save_IFS
4145   test -z "$ac_dir" && ac_dir=.
4146   $as_executable_p "$ac_dir/$ac_word" || continue
4147 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4148 echo "$as_me:4148: found $ac_dir/$ac_word" >&5
4149 break
4150 done
4151
4152   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4153 fi
4154 fi
4155 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4156 if test -n "$MAKE_LOWER_TAGS"; then
4157   echo "$as_me:4157: result: $MAKE_LOWER_TAGS" >&5
4158 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4159 else
4160   echo "$as_me:4160: result: no" >&5
4161 echo "${ECHO_T}no" >&6
4162 fi
4163
4164 if test "$cf_cv_mixedcase" = yes ; then
4165         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4166 set dummy ${ETAGS:-etags}; ac_word=$2
4167 echo "$as_me:4167: checking for $ac_word" >&5
4168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4169 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4170   echo $ECHO_N "(cached) $ECHO_C" >&6
4171 else
4172   if test -n "$MAKE_UPPER_TAGS"; then
4173   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4174 else
4175   ac_save_IFS=$IFS; IFS=$ac_path_separator
4176 ac_dummy="$PATH"
4177 for ac_dir in $ac_dummy; do
4178   IFS=$ac_save_IFS
4179   test -z "$ac_dir" && ac_dir=.
4180   $as_executable_p "$ac_dir/$ac_word" || continue
4181 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4182 echo "$as_me:4182: found $ac_dir/$ac_word" >&5
4183 break
4184 done
4185
4186   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4187 fi
4188 fi
4189 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4190 if test -n "$MAKE_UPPER_TAGS"; then
4191   echo "$as_me:4191: result: $MAKE_UPPER_TAGS" >&5
4192 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4193 else
4194   echo "$as_me:4194: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4196 fi
4197
4198 else
4199         MAKE_UPPER_TAGS=no
4200 fi
4201
4202 if test "$MAKE_UPPER_TAGS" = yes ; then
4203         MAKE_UPPER_TAGS=
4204 else
4205         MAKE_UPPER_TAGS="#"
4206 fi
4207
4208 if test "$MAKE_LOWER_TAGS" = yes ; then
4209         MAKE_LOWER_TAGS=
4210 else
4211         MAKE_LOWER_TAGS="#"
4212 fi
4213
4214 echo "$as_me:4214: checking for makeflags variable" >&5
4215 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4216 if test "${cf_cv_makeflags+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219
4220         cf_cv_makeflags=''
4221         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4222         do
4223                 cat >cf_makeflags.tmp <<CF_EOF
4224 SHELL = $SHELL
4225 all :
4226         @ echo '.$cf_option'
4227 CF_EOF
4228                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4229                 case "$cf_result" in
4230                 (.*k|.*kw)
4231                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4232                         case "$cf_result" in
4233                         (.*CC=*)        cf_cv_makeflags=
4234                                 ;;
4235                         (*)     cf_cv_makeflags=$cf_option
4236                                 ;;
4237                         esac
4238                         break
4239                         ;;
4240                 (.-)
4241                         ;;
4242                 (*)
4243
4244 echo "${as_me:-configure}:4244: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4245
4246                         ;;
4247                 esac
4248         done
4249         rm -f cf_makeflags.tmp
4250
4251 fi
4252 echo "$as_me:4252: result: $cf_cv_makeflags" >&5
4253 echo "${ECHO_T}$cf_cv_makeflags" >&6
4254
4255 if test -n "$ac_tool_prefix"; then
4256   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4257 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4258 echo "$as_me:4258: checking for $ac_word" >&5
4259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4260 if test "${ac_cv_prog_RANLIB+set}" = set; then
4261   echo $ECHO_N "(cached) $ECHO_C" >&6
4262 else
4263   if test -n "$RANLIB"; then
4264   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4265 else
4266   ac_save_IFS=$IFS; IFS=$ac_path_separator
4267 ac_dummy="$PATH"
4268 for ac_dir in $ac_dummy; do
4269   IFS=$ac_save_IFS
4270   test -z "$ac_dir" && ac_dir=.
4271   $as_executable_p "$ac_dir/$ac_word" || continue
4272 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4273 echo "$as_me:4273: found $ac_dir/$ac_word" >&5
4274 break
4275 done
4276
4277 fi
4278 fi
4279 RANLIB=$ac_cv_prog_RANLIB
4280 if test -n "$RANLIB"; then
4281   echo "$as_me:4281: result: $RANLIB" >&5
4282 echo "${ECHO_T}$RANLIB" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288 fi
4289 if test -z "$ac_cv_prog_RANLIB"; then
4290   ac_ct_RANLIB=$RANLIB
4291   # Extract the first word of "ranlib", so it can be a program name with args.
4292 set dummy ranlib; ac_word=$2
4293 echo "$as_me:4293: checking for $ac_word" >&5
4294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4295 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4296   echo $ECHO_N "(cached) $ECHO_C" >&6
4297 else
4298   if test -n "$ac_ct_RANLIB"; then
4299   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4300 else
4301   ac_save_IFS=$IFS; IFS=$ac_path_separator
4302 ac_dummy="$PATH"
4303 for ac_dir in $ac_dummy; do
4304   IFS=$ac_save_IFS
4305   test -z "$ac_dir" && ac_dir=.
4306   $as_executable_p "$ac_dir/$ac_word" || continue
4307 ac_cv_prog_ac_ct_RANLIB="ranlib"
4308 echo "$as_me:4308: found $ac_dir/$ac_word" >&5
4309 break
4310 done
4311
4312   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4313 fi
4314 fi
4315 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4316 if test -n "$ac_ct_RANLIB"; then
4317   echo "$as_me:4317: result: $ac_ct_RANLIB" >&5
4318 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4319 else
4320   echo "$as_me:4320: result: no" >&5
4321 echo "${ECHO_T}no" >&6
4322 fi
4323
4324   RANLIB=$ac_ct_RANLIB
4325 else
4326   RANLIB="$ac_cv_prog_RANLIB"
4327 fi
4328
4329 if test -n "$ac_tool_prefix"; then
4330   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4331 set dummy ${ac_tool_prefix}ld; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_prog_LD+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   if test -n "$LD"; then
4338   ac_cv_prog_LD="$LD" # Let the user override the test.
4339 else
4340   ac_save_IFS=$IFS; IFS=$ac_path_separator
4341 ac_dummy="$PATH"
4342 for ac_dir in $ac_dummy; do
4343   IFS=$ac_save_IFS
4344   test -z "$ac_dir" && ac_dir=.
4345   $as_executable_p "$ac_dir/$ac_word" || continue
4346 ac_cv_prog_LD="${ac_tool_prefix}ld"
4347 echo "$as_me:4347: found $ac_dir/$ac_word" >&5
4348 break
4349 done
4350
4351 fi
4352 fi
4353 LD=$ac_cv_prog_LD
4354 if test -n "$LD"; then
4355   echo "$as_me:4355: result: $LD" >&5
4356 echo "${ECHO_T}$LD" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362 fi
4363 if test -z "$ac_cv_prog_LD"; then
4364   ac_ct_LD=$LD
4365   # Extract the first word of "ld", so it can be a program name with args.
4366 set dummy ld; ac_word=$2
4367 echo "$as_me:4367: checking for $ac_word" >&5
4368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4369 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   if test -n "$ac_ct_LD"; then
4373   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4374 else
4375   ac_save_IFS=$IFS; IFS=$ac_path_separator
4376 ac_dummy="$PATH"
4377 for ac_dir in $ac_dummy; do
4378   IFS=$ac_save_IFS
4379   test -z "$ac_dir" && ac_dir=.
4380   $as_executable_p "$ac_dir/$ac_word" || continue
4381 ac_cv_prog_ac_ct_LD="ld"
4382 echo "$as_me:4382: found $ac_dir/$ac_word" >&5
4383 break
4384 done
4385
4386   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4387 fi
4388 fi
4389 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4390 if test -n "$ac_ct_LD"; then
4391   echo "$as_me:4391: result: $ac_ct_LD" >&5
4392 echo "${ECHO_T}$ac_ct_LD" >&6
4393 else
4394   echo "$as_me:4394: result: no" >&5
4395 echo "${ECHO_T}no" >&6
4396 fi
4397
4398   LD=$ac_ct_LD
4399 else
4400   LD="$ac_cv_prog_LD"
4401 fi
4402
4403 if test -n "$ac_tool_prefix"; then
4404   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4405 set dummy ${ac_tool_prefix}ar; ac_word=$2
4406 echo "$as_me:4406: checking for $ac_word" >&5
4407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4408 if test "${ac_cv_prog_AR+set}" = set; then
4409   echo $ECHO_N "(cached) $ECHO_C" >&6
4410 else
4411   if test -n "$AR"; then
4412   ac_cv_prog_AR="$AR" # Let the user override the test.
4413 else
4414   ac_save_IFS=$IFS; IFS=$ac_path_separator
4415 ac_dummy="$PATH"
4416 for ac_dir in $ac_dummy; do
4417   IFS=$ac_save_IFS
4418   test -z "$ac_dir" && ac_dir=.
4419   $as_executable_p "$ac_dir/$ac_word" || continue
4420 ac_cv_prog_AR="${ac_tool_prefix}ar"
4421 echo "$as_me:4421: found $ac_dir/$ac_word" >&5
4422 break
4423 done
4424
4425 fi
4426 fi
4427 AR=$ac_cv_prog_AR
4428 if test -n "$AR"; then
4429   echo "$as_me:4429: result: $AR" >&5
4430 echo "${ECHO_T}$AR" >&6
4431 else
4432   echo "$as_me:4432: result: no" >&5
4433 echo "${ECHO_T}no" >&6
4434 fi
4435
4436 fi
4437 if test -z "$ac_cv_prog_AR"; then
4438   ac_ct_AR=$AR
4439   # Extract the first word of "ar", so it can be a program name with args.
4440 set dummy ar; ac_word=$2
4441 echo "$as_me:4441: checking for $ac_word" >&5
4442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4443 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4444   echo $ECHO_N "(cached) $ECHO_C" >&6
4445 else
4446   if test -n "$ac_ct_AR"; then
4447   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4448 else
4449   ac_save_IFS=$IFS; IFS=$ac_path_separator
4450 ac_dummy="$PATH"
4451 for ac_dir in $ac_dummy; do
4452   IFS=$ac_save_IFS
4453   test -z "$ac_dir" && ac_dir=.
4454   $as_executable_p "$ac_dir/$ac_word" || continue
4455 ac_cv_prog_ac_ct_AR="ar"
4456 echo "$as_me:4456: found $ac_dir/$ac_word" >&5
4457 break
4458 done
4459
4460   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4461 fi
4462 fi
4463 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4464 if test -n "$ac_ct_AR"; then
4465   echo "$as_me:4465: result: $ac_ct_AR" >&5
4466 echo "${ECHO_T}$ac_ct_AR" >&6
4467 else
4468   echo "$as_me:4468: result: no" >&5
4469 echo "${ECHO_T}no" >&6
4470 fi
4471
4472   AR=$ac_ct_AR
4473 else
4474   AR="$ac_cv_prog_AR"
4475 fi
4476
4477 if test -n "$ac_tool_prefix"; then
4478   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4479 set dummy ${ac_tool_prefix}nm; ac_word=$2
4480 echo "$as_me:4480: checking for $ac_word" >&5
4481 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4482 if test "${ac_cv_prog_NM+set}" = set; then
4483   echo $ECHO_N "(cached) $ECHO_C" >&6
4484 else
4485   if test -n "$NM"; then
4486   ac_cv_prog_NM="$NM" # Let the user override the test.
4487 else
4488   ac_save_IFS=$IFS; IFS=$ac_path_separator
4489 ac_dummy="$PATH"
4490 for ac_dir in $ac_dummy; do
4491   IFS=$ac_save_IFS
4492   test -z "$ac_dir" && ac_dir=.
4493   $as_executable_p "$ac_dir/$ac_word" || continue
4494 ac_cv_prog_NM="${ac_tool_prefix}nm"
4495 echo "$as_me:4495: found $ac_dir/$ac_word" >&5
4496 break
4497 done
4498
4499 fi
4500 fi
4501 NM=$ac_cv_prog_NM
4502 if test -n "$NM"; then
4503   echo "$as_me:4503: result: $NM" >&5
4504 echo "${ECHO_T}$NM" >&6
4505 else
4506   echo "$as_me:4506: result: no" >&5
4507 echo "${ECHO_T}no" >&6
4508 fi
4509
4510 fi
4511 if test -z "$ac_cv_prog_NM"; then
4512   ac_ct_NM=$NM
4513   # Extract the first word of "nm", so it can be a program name with args.
4514 set dummy nm; ac_word=$2
4515 echo "$as_me:4515: checking for $ac_word" >&5
4516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4517 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520   if test -n "$ac_ct_NM"; then
4521   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4522 else
4523   ac_save_IFS=$IFS; IFS=$ac_path_separator
4524 ac_dummy="$PATH"
4525 for ac_dir in $ac_dummy; do
4526   IFS=$ac_save_IFS
4527   test -z "$ac_dir" && ac_dir=.
4528   $as_executable_p "$ac_dir/$ac_word" || continue
4529 ac_cv_prog_ac_ct_NM="nm"
4530 echo "$as_me:4530: found $ac_dir/$ac_word" >&5
4531 break
4532 done
4533
4534   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4535 fi
4536 fi
4537 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4538 if test -n "$ac_ct_NM"; then
4539   echo "$as_me:4539: result: $ac_ct_NM" >&5
4540 echo "${ECHO_T}$ac_ct_NM" >&6
4541 else
4542   echo "$as_me:4542: result: no" >&5
4543 echo "${ECHO_T}no" >&6
4544 fi
4545
4546   NM=$ac_ct_NM
4547 else
4548   NM="$ac_cv_prog_NM"
4549 fi
4550
4551 if test -n "$ac_tool_prefix"; then
4552   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4553 set dummy ${ac_tool_prefix}ar; ac_word=$2
4554 echo "$as_me:4554: checking for $ac_word" >&5
4555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4556 if test "${ac_cv_prog_AR+set}" = set; then
4557   echo $ECHO_N "(cached) $ECHO_C" >&6
4558 else
4559   if test -n "$AR"; then
4560   ac_cv_prog_AR="$AR" # Let the user override the test.
4561 else
4562   ac_save_IFS=$IFS; IFS=$ac_path_separator
4563 ac_dummy="$PATH"
4564 for ac_dir in $ac_dummy; do
4565   IFS=$ac_save_IFS
4566   test -z "$ac_dir" && ac_dir=.
4567   $as_executable_p "$ac_dir/$ac_word" || continue
4568 ac_cv_prog_AR="${ac_tool_prefix}ar"
4569 echo "$as_me:4569: found $ac_dir/$ac_word" >&5
4570 break
4571 done
4572
4573 fi
4574 fi
4575 AR=$ac_cv_prog_AR
4576 if test -n "$AR"; then
4577   echo "$as_me:4577: result: $AR" >&5
4578 echo "${ECHO_T}$AR" >&6
4579 else
4580   echo "$as_me:4580: result: no" >&5
4581 echo "${ECHO_T}no" >&6
4582 fi
4583
4584 fi
4585 if test -z "$ac_cv_prog_AR"; then
4586   ac_ct_AR=$AR
4587   # Extract the first word of "ar", so it can be a program name with args.
4588 set dummy ar; ac_word=$2
4589 echo "$as_me:4589: checking for $ac_word" >&5
4590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4591 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4592   echo $ECHO_N "(cached) $ECHO_C" >&6
4593 else
4594   if test -n "$ac_ct_AR"; then
4595   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4596 else
4597   ac_save_IFS=$IFS; IFS=$ac_path_separator
4598 ac_dummy="$PATH"
4599 for ac_dir in $ac_dummy; do
4600   IFS=$ac_save_IFS
4601   test -z "$ac_dir" && ac_dir=.
4602   $as_executable_p "$ac_dir/$ac_word" || continue
4603 ac_cv_prog_ac_ct_AR="ar"
4604 echo "$as_me:4604: found $ac_dir/$ac_word" >&5
4605 break
4606 done
4607
4608   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4609 fi
4610 fi
4611 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4612 if test -n "$ac_ct_AR"; then
4613   echo "$as_me:4613: result: $ac_ct_AR" >&5
4614 echo "${ECHO_T}$ac_ct_AR" >&6
4615 else
4616   echo "$as_me:4616: result: no" >&5
4617 echo "${ECHO_T}no" >&6
4618 fi
4619
4620   AR=$ac_ct_AR
4621 else
4622   AR="$ac_cv_prog_AR"
4623 fi
4624
4625 echo "$as_me:4625: checking for options to update archives" >&5
4626 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4627 if test "${cf_cv_ar_flags+set}" = set; then
4628   echo $ECHO_N "(cached) $ECHO_C" >&6
4629 else
4630
4631         cf_cv_ar_flags=unknown
4632         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4633         do
4634
4635                 # check if $ARFLAGS already contains this choice
4636                 if test "x$ARFLAGS" != "x" ; then
4637                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4638                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4639                                 cf_cv_ar_flags=
4640                                 break
4641                         fi
4642                 fi
4643
4644                 rm -f conftest.$ac_cv_objext
4645                 rm -f conftest.a
4646
4647                 cat >conftest.$ac_ext <<EOF
4648 #line 4648 "configure"
4649 int     testdata[3] = { 123, 456, 789 };
4650 EOF
4651                 if { (eval echo "$as_me:4651: \"$ac_compile\"") >&5
4652   (eval $ac_compile) 2>&5
4653   ac_status=$?
4654   echo "$as_me:4654: \$? = $ac_status" >&5
4655   (exit $ac_status); } ; then
4656                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4657                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4658                         if test -f conftest.a ; then
4659                                 cf_cv_ar_flags=$cf_ar_flags
4660                                 break
4661                         fi
4662                 else
4663                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4664
4665 echo "${as_me:-configure}:4665: testing cannot compile test-program ..." 1>&5
4666
4667                         break
4668                 fi
4669         done
4670         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4671
4672 fi
4673 echo "$as_me:4673: result: $cf_cv_ar_flags" >&5
4674 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4675
4676 if test -n "$ARFLAGS" ; then
4677         if test -n "$cf_cv_ar_flags" ; then
4678                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4679         fi
4680 else
4681         ARFLAGS=$cf_cv_ar_flags
4682 fi
4683
4684 echo "$as_me:4684: checking if you have specified an install-prefix" >&5
4685 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4686
4687 # Check whether --with-install-prefix or --without-install-prefix was given.
4688 if test "${with_install_prefix+set}" = set; then
4689   withval="$with_install_prefix"
4690   case "x$withval" in
4691         (xyes|xno)
4692                 ;;
4693         (*)     DESTDIR="$withval"
4694                 ;;
4695         esac
4696 fi;
4697 echo "$as_me:4697: result: $DESTDIR" >&5
4698 echo "${ECHO_T}$DESTDIR" >&6
4699
4700 ###############################################################################
4701
4702 # If we're cross-compiling, allow the user to override the tools and their
4703 # options.  The configure script is oriented toward identifying the host
4704 # compiler, etc., but we need a build compiler to generate parts of the source.
4705
4706 if test "$cross_compiling" = yes ; then
4707
4708         # defaults that we might want to override
4709         : ${BUILD_CFLAGS:=''}
4710         : ${BUILD_CPPFLAGS:=''}
4711         : ${BUILD_LDFLAGS:=''}
4712         : ${BUILD_LIBS:=''}
4713         : ${BUILD_EXEEXT:='$x'}
4714         : ${BUILD_OBJEXT:='o'}
4715
4716 # Check whether --with-build-cc or --without-build-cc was given.
4717 if test "${with_build_cc+set}" = set; then
4718   withval="$with_build_cc"
4719   BUILD_CC="$withval"
4720 else
4721   for ac_prog in gcc clang c99 c89 cc cl
4722 do
4723   # Extract the first word of "$ac_prog", so it can be a program name with args.
4724 set dummy $ac_prog; ac_word=$2
4725 echo "$as_me:4725: checking for $ac_word" >&5
4726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4727 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$BUILD_CC"; then
4731   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4732 else
4733   ac_save_IFS=$IFS; IFS=$ac_path_separator
4734 ac_dummy="$PATH"
4735 for ac_dir in $ac_dummy; do
4736   IFS=$ac_save_IFS
4737   test -z "$ac_dir" && ac_dir=.
4738   $as_executable_p "$ac_dir/$ac_word" || continue
4739 ac_cv_prog_BUILD_CC="$ac_prog"
4740 echo "$as_me:4740: found $ac_dir/$ac_word" >&5
4741 break
4742 done
4743
4744 fi
4745 fi
4746 BUILD_CC=$ac_cv_prog_BUILD_CC
4747 if test -n "$BUILD_CC"; then
4748   echo "$as_me:4748: result: $BUILD_CC" >&5
4749 echo "${ECHO_T}$BUILD_CC" >&6
4750 else
4751   echo "$as_me:4751: result: no" >&5
4752 echo "${ECHO_T}no" >&6
4753 fi
4754
4755   test -n "$BUILD_CC" && break
4756 done
4757 test -n "$BUILD_CC" || BUILD_CC="none"
4758
4759 fi;
4760         echo "$as_me:4760: checking for native build C compiler" >&5
4761 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4762         echo "$as_me:4762: result: $BUILD_CC" >&5
4763 echo "${ECHO_T}$BUILD_CC" >&6
4764
4765         echo "$as_me:4765: checking for native build C preprocessor" >&5
4766 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4767
4768 # Check whether --with-build-cpp or --without-build-cpp was given.
4769 if test "${with_build_cpp+set}" = set; then
4770   withval="$with_build_cpp"
4771   BUILD_CPP="$withval"
4772 else
4773   BUILD_CPP='${BUILD_CC} -E'
4774 fi;
4775         echo "$as_me:4775: result: $BUILD_CPP" >&5
4776 echo "${ECHO_T}$BUILD_CPP" >&6
4777
4778         echo "$as_me:4778: checking for native build C flags" >&5
4779 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4780
4781 # Check whether --with-build-cflags or --without-build-cflags was given.
4782 if test "${with_build_cflags+set}" = set; then
4783   withval="$with_build_cflags"
4784   BUILD_CFLAGS="$withval"
4785 fi;
4786         echo "$as_me:4786: result: $BUILD_CFLAGS" >&5
4787 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4788
4789         echo "$as_me:4789: checking for native build C preprocessor-flags" >&5
4790 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4791
4792 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4793 if test "${with_build_cppflags+set}" = set; then
4794   withval="$with_build_cppflags"
4795   BUILD_CPPFLAGS="$withval"
4796 fi;
4797         echo "$as_me:4797: result: $BUILD_CPPFLAGS" >&5
4798 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4799
4800         echo "$as_me:4800: checking for native build linker-flags" >&5
4801 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4802
4803 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4804 if test "${with_build_ldflags+set}" = set; then
4805   withval="$with_build_ldflags"
4806   BUILD_LDFLAGS="$withval"
4807 fi;
4808         echo "$as_me:4808: result: $BUILD_LDFLAGS" >&5
4809 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4810
4811         echo "$as_me:4811: checking for native build linker-libraries" >&5
4812 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4813
4814 # Check whether --with-build-libs or --without-build-libs was given.
4815 if test "${with_build_libs+set}" = set; then
4816   withval="$with_build_libs"
4817   BUILD_LIBS="$withval"
4818 fi;
4819         echo "$as_me:4819: result: $BUILD_LIBS" >&5
4820 echo "${ECHO_T}$BUILD_LIBS" >&6
4821
4822         # this assumes we're on Unix.
4823         BUILD_EXEEXT=
4824         BUILD_OBJEXT=o
4825
4826         : ${BUILD_CC:='${CC}'}
4827
4828         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4829                 { { echo "$as_me:4829: error: Cross-build requires two compilers.
4830 Use --with-build-cc to specify the native compiler." >&5
4831 echo "$as_me: error: Cross-build requires two compilers.
4832 Use --with-build-cc to specify the native compiler." >&2;}
4833    { (exit 1); exit 1; }; }
4834         fi
4835
4836 else
4837         : ${BUILD_CC:='${CC}'}
4838         : ${BUILD_CPP:='${CPP}'}
4839         : ${BUILD_CFLAGS:='${CFLAGS}'}
4840         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4841         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4842         : ${BUILD_LIBS:='${LIBS}'}
4843         : ${BUILD_EXEEXT:='$x'}
4844         : ${BUILD_OBJEXT:='o'}
4845 fi
4846
4847 ###############################################################################
4848
4849 ### Options to allow the user to specify the set of libraries which are used.
4850 ### Use "--without-normal --with-shared" to allow the default model to be
4851 ### shared, for example.
4852 cf_list_models=""
4853
4854 echo "$as_me:4854: checking if libtool -version-number should be used" >&5
4855 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4856
4857 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4858 if test "${enable_libtool_version+set}" = set; then
4859   enableval="$enable_libtool_version"
4860   test "$enableval" != no && enableval=yes
4861         if test "$enableval" != "yes" ; then
4862     cf_libtool_version=no
4863         else
4864                 cf_libtool_version=yes
4865         fi
4866 else
4867   enableval=yes
4868         cf_libtool_version=yes
4869
4870 fi;
4871 echo "$as_me:4871: result: $cf_libtool_version" >&5
4872 echo "${ECHO_T}$cf_libtool_version" >&6
4873
4874 if test "$cf_libtool_version" = yes ; then
4875         LIBTOOL_VERSION="-version-number"
4876 else
4877         LIBTOOL_VERSION="-version-info"
4878         case "x$VERSION" in
4879         (x)
4880                 { echo "$as_me:4880: WARNING: VERSION was not set" >&5
4881 echo "$as_me: WARNING: VERSION was not set" >&2;}
4882                 ;;
4883         (x*.*.*)
4884                 ABI_VERSION="$VERSION"
4885                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4886
4887 echo "${as_me:-configure}:4887: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4888
4889                 ;;
4890         (x*:*:*)
4891                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4892                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4893
4894 echo "${as_me:-configure}:4894: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4895
4896                 ;;
4897         (*)
4898                 { echo "$as_me:4898: WARNING: unexpected VERSION value: $VERSION" >&5
4899 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4900                 ;;
4901         esac
4902 fi
4903
4904 LIBTOOL=
4905
4906 # common library maintenance symbols that are convenient for libtool scripts:
4907 LIB_CREATE='${AR} -cr'
4908 LIB_OBJECT='${OBJECTS}'
4909 LIB_SUFFIX=.a
4910 LIB_PREP="$RANLIB"
4911
4912 # symbols used to prop libtool up to enable it to determine what it should be
4913 # doing:
4914 LIB_CLEAN=
4915 LIB_COMPILE=
4916 LIB_LINK='${CC}'
4917 LIB_INSTALL=
4918 LIB_UNINSTALL=
4919
4920 echo "$as_me:4920: checking if you want to build libraries with libtool" >&5
4921 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4922
4923 # Check whether --with-libtool or --without-libtool was given.
4924 if test "${with_libtool+set}" = set; then
4925   withval="$with_libtool"
4926   with_libtool=$withval
4927 else
4928   with_libtool=no
4929 fi;
4930 echo "$as_me:4930: result: $with_libtool" >&5
4931 echo "${ECHO_T}$with_libtool" >&6
4932 if test "$with_libtool" != "no"; then
4933
4934         if test "$with_libtool" != "yes" ; then
4935
4936 if test "x$prefix" != xNONE; then
4937         cf_path_syntax="$prefix"
4938 else
4939         cf_path_syntax="$ac_default_prefix"
4940 fi
4941
4942 case ".$with_libtool" in
4943 (.\$\(*\)*|.\'*\'*)
4944         ;;
4945 (..|./*|.\\*)
4946         ;;
4947 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4948         ;;
4949 (.\${*prefix}*|.\${*dir}*)
4950         eval with_libtool="$with_libtool"
4951         case ".$with_libtool" in
4952         (.NONE/*)
4953                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4954                 ;;
4955         esac
4956         ;;
4957 (.no|.NONE/*)
4958         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4959         ;;
4960 (*)
4961         { { echo "$as_me:4961: error: expected a pathname, not \"$with_libtool\"" >&5
4962 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4963    { (exit 1); exit 1; }; }
4964         ;;
4965 esac
4966
4967                 LIBTOOL=$with_libtool
4968         else
4969                 if test -n "$ac_tool_prefix"; then
4970   for ac_prog in libtool glibtool
4971   do
4972     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4973 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4974 echo "$as_me:4974: checking for $ac_word" >&5
4975 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4976 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4977   echo $ECHO_N "(cached) $ECHO_C" >&6
4978 else
4979   if test -n "$LIBTOOL"; then
4980   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4981 else
4982   ac_save_IFS=$IFS; IFS=$ac_path_separator
4983 ac_dummy="$PATH"
4984 for ac_dir in $ac_dummy; do
4985   IFS=$ac_save_IFS
4986   test -z "$ac_dir" && ac_dir=.
4987   $as_executable_p "$ac_dir/$ac_word" || continue
4988 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4989 echo "$as_me:4989: found $ac_dir/$ac_word" >&5
4990 break
4991 done
4992
4993 fi
4994 fi
4995 LIBTOOL=$ac_cv_prog_LIBTOOL
4996 if test -n "$LIBTOOL"; then
4997   echo "$as_me:4997: result: $LIBTOOL" >&5
4998 echo "${ECHO_T}$LIBTOOL" >&6
4999 else
5000   echo "$as_me:5000: result: no" >&5
5001 echo "${ECHO_T}no" >&6
5002 fi
5003
5004     test -n "$LIBTOOL" && break
5005   done
5006 fi
5007 if test -z "$LIBTOOL"; then
5008   ac_ct_LIBTOOL=$LIBTOOL
5009   for ac_prog in libtool glibtool
5010 do
5011   # Extract the first word of "$ac_prog", so it can be a program name with args.
5012 set dummy $ac_prog; ac_word=$2
5013 echo "$as_me:5013: checking for $ac_word" >&5
5014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5015 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5016   echo $ECHO_N "(cached) $ECHO_C" >&6
5017 else
5018   if test -n "$ac_ct_LIBTOOL"; then
5019   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5020 else
5021   ac_save_IFS=$IFS; IFS=$ac_path_separator
5022 ac_dummy="$PATH"
5023 for ac_dir in $ac_dummy; do
5024   IFS=$ac_save_IFS
5025   test -z "$ac_dir" && ac_dir=.
5026   $as_executable_p "$ac_dir/$ac_word" || continue
5027 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5028 echo "$as_me:5028: found $ac_dir/$ac_word" >&5
5029 break
5030 done
5031
5032 fi
5033 fi
5034 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5035 if test -n "$ac_ct_LIBTOOL"; then
5036   echo "$as_me:5036: result: $ac_ct_LIBTOOL" >&5
5037 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5038 else
5039   echo "$as_me:5039: result: no" >&5
5040 echo "${ECHO_T}no" >&6
5041 fi
5042
5043   test -n "$ac_ct_LIBTOOL" && break
5044 done
5045 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5046
5047   LIBTOOL=$ac_ct_LIBTOOL
5048 fi
5049
5050 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5051 then
5052         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.].*//'`
5053 else
5054         cf_cv_libtool_version=
5055 fi
5056 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5057
5058                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5059                 then
5060
5061 unset ac_cv_prog_ac_ct_LIBTOOL
5062 unset ac_ct_LIBTOOL
5063 unset LIBTOOL
5064
5065                         if test -n "$ac_tool_prefix"; then
5066   for ac_prog in glibtool
5067   do
5068     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5069 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5070 echo "$as_me:5070: checking for $ac_word" >&5
5071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5072 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   if test -n "$LIBTOOL"; then
5076   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5077 else
5078   ac_save_IFS=$IFS; IFS=$ac_path_separator
5079 ac_dummy="$PATH"
5080 for ac_dir in $ac_dummy; do
5081   IFS=$ac_save_IFS
5082   test -z "$ac_dir" && ac_dir=.
5083   $as_executable_p "$ac_dir/$ac_word" || continue
5084 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5085 echo "$as_me:5085: found $ac_dir/$ac_word" >&5
5086 break
5087 done
5088
5089 fi
5090 fi
5091 LIBTOOL=$ac_cv_prog_LIBTOOL
5092 if test -n "$LIBTOOL"; then
5093   echo "$as_me:5093: result: $LIBTOOL" >&5
5094 echo "${ECHO_T}$LIBTOOL" >&6
5095 else
5096   echo "$as_me:5096: result: no" >&5
5097 echo "${ECHO_T}no" >&6
5098 fi
5099
5100     test -n "$LIBTOOL" && break
5101   done
5102 fi
5103 if test -z "$LIBTOOL"; then
5104   ac_ct_LIBTOOL=$LIBTOOL
5105   for ac_prog in glibtool
5106 do
5107   # Extract the first word of "$ac_prog", so it can be a program name with args.
5108 set dummy $ac_prog; ac_word=$2
5109 echo "$as_me:5109: checking for $ac_word" >&5
5110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5111 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5112   echo $ECHO_N "(cached) $ECHO_C" >&6
5113 else
5114   if test -n "$ac_ct_LIBTOOL"; then
5115   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5116 else
5117   ac_save_IFS=$IFS; IFS=$ac_path_separator
5118 ac_dummy="$PATH"
5119 for ac_dir in $ac_dummy; do
5120   IFS=$ac_save_IFS
5121   test -z "$ac_dir" && ac_dir=.
5122   $as_executable_p "$ac_dir/$ac_word" || continue
5123 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5124 echo "$as_me:5124: found $ac_dir/$ac_word" >&5
5125 break
5126 done
5127
5128 fi
5129 fi
5130 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5131 if test -n "$ac_ct_LIBTOOL"; then
5132   echo "$as_me:5132: result: $ac_ct_LIBTOOL" >&5
5133 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5134 else
5135   echo "$as_me:5135: result: no" >&5
5136 echo "${ECHO_T}no" >&6
5137 fi
5138
5139   test -n "$ac_ct_LIBTOOL" && break
5140 done
5141 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5142
5143   LIBTOOL=$ac_ct_LIBTOOL
5144 fi
5145
5146 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5147 then
5148         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.].*//'`
5149 else
5150         cf_cv_libtool_version=
5151 fi
5152 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5153
5154                 fi
5155         fi
5156         if test -z "$LIBTOOL" ; then
5157                 { { echo "$as_me:5157: error: Cannot find libtool" >&5
5158 echo "$as_me: error: Cannot find libtool" >&2;}
5159    { (exit 1); exit 1; }; }
5160         fi
5161         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5162         LIB_OBJECT='${OBJECTS:.o=.lo}'
5163         LIB_SUFFIX=.la
5164         LIB_CLEAN='${LIBTOOL} --mode=clean'
5165         LIB_COMPILE='${LIBTOOL} --mode=compile'
5166         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5167         LIB_INSTALL='${LIBTOOL} --mode=install'
5168         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5169         LIB_PREP=:
5170
5171 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5172 then
5173         echo "$as_me:5173: checking version of $LIBTOOL" >&5
5174 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5175
5176 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5177 then
5178         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.].*//'`
5179 else
5180         cf_cv_libtool_version=
5181 fi
5182 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5183
5184         echo "$as_me:5184: result: $cf_cv_libtool_version" >&5
5185 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5186         if test -z "$cf_cv_libtool_version" ; then
5187                 { { echo "$as_me:5187: error: This is not GNU libtool" >&5
5188 echo "$as_me: error: This is not GNU libtool" >&2;}
5189    { (exit 1); exit 1; }; }
5190         fi
5191 else
5192         { { echo "$as_me:5192: error: GNU libtool has not been found" >&5
5193 echo "$as_me: error: GNU libtool has not been found" >&2;}
5194    { (exit 1); exit 1; }; }
5195 fi
5196
5197         # special hack to add -no-undefined (which libtool should do for itself)
5198         LT_UNDEF=
5199         case "$cf_cv_system_name" in
5200         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5201                 LT_UNDEF=-no-undefined
5202                 ;;
5203         esac
5204
5205         # special hack to add --tag option for C++ compiler
5206         case $cf_cv_libtool_version in
5207         (1.[5-9]*|[2-9].[0-9.a-z]*)
5208                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5209                 LIBTOOL="$LIBTOOL --tag=CC"
5210                 ;;
5211         (*)
5212                 LIBTOOL_CXX="$LIBTOOL"
5213                 ;;
5214         esac
5215 else
5216         LIBTOOL=""
5217         LIBTOOL_CXX=""
5218 fi
5219
5220 test -z "$LIBTOOL" && ECHO_LT=
5221
5222 if test "$with_libtool" != "no" ; then
5223
5224 cf_list_models="$cf_list_models libtool"
5225
5226 else
5227
5228 echo "$as_me:5228: checking if you want to build shared libraries" >&5
5229 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5230
5231 # Check whether --with-shared or --without-shared was given.
5232 if test "${with_shared+set}" = set; then
5233   withval="$with_shared"
5234   with_shared=$withval
5235 else
5236   with_shared=no
5237 fi;
5238 echo "$as_me:5238: result: $with_shared" >&5
5239 echo "${ECHO_T}$with_shared" >&6
5240 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5241
5242 echo "$as_me:5242: checking if you want to build static libraries" >&5
5243 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5244
5245 # Check whether --with-normal or --without-normal was given.
5246 if test "${with_normal+set}" = set; then
5247   withval="$with_normal"
5248   with_normal=$withval
5249 else
5250   with_normal=yes
5251 fi;
5252 echo "$as_me:5252: result: $with_normal" >&5
5253 echo "${ECHO_T}$with_normal" >&6
5254 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5255
5256 echo "$as_me:5256: checking if you want to build debug libraries" >&5
5257 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5258
5259 # Check whether --with-debug or --without-debug was given.
5260 if test "${with_debug+set}" = set; then
5261   withval="$with_debug"
5262   with_debug=$withval
5263 else
5264   with_debug=yes
5265 fi;
5266 echo "$as_me:5266: result: $with_debug" >&5
5267 echo "${ECHO_T}$with_debug" >&6
5268 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5269
5270 echo "$as_me:5270: checking if you want to build profiling libraries" >&5
5271 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5272
5273 # Check whether --with-profile or --without-profile was given.
5274 if test "${with_profile+set}" = set; then
5275   withval="$with_profile"
5276   with_profile=$withval
5277 else
5278   with_profile=no
5279 fi;
5280 echo "$as_me:5280: result: $with_profile" >&5
5281 echo "${ECHO_T}$with_profile" >&6
5282 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5283
5284 fi
5285
5286 if test "X$cf_with_cxx_binding" != Xno; then
5287 if test "x$with_shared" = "xyes"; then
5288 echo "$as_me:5288: checking if you want to build C++ shared libraries" >&5
5289 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5290
5291 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5292 if test "${with_cxx_shared+set}" = set; then
5293   withval="$with_cxx_shared"
5294   with_shared_cxx=$withval
5295 else
5296   with_shared_cxx=no
5297 fi;
5298 echo "$as_me:5298: result: $with_shared_cxx" >&5
5299 echo "${ECHO_T}$with_shared_cxx" >&6
5300 fi
5301 fi
5302
5303 ###############################################################################
5304
5305 echo "$as_me:5305: checking for specified models" >&5
5306 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5307 test -z "$cf_list_models" && cf_list_models=normal
5308 test "$with_libtool" != "no" && cf_list_models=libtool
5309 echo "$as_me:5309: result: $cf_list_models" >&5
5310 echo "${ECHO_T}$cf_list_models" >&6
5311
5312 ### Use the first model as the default, and save its suffix for use in building
5313 ### up test-applications.
5314 echo "$as_me:5314: checking for default model" >&5
5315 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5316 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5317 echo "$as_me:5317: result: $DFT_LWR_MODEL" >&5
5318 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5319
5320 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5321
5322 TICS_NAME=tic
5323
5324 TINFO_NAME=tinfo
5325
5326 LIB_NAME=ncurses
5327
5328 LIB_DIR=../lib
5329 LIB_2ND=../../lib
5330
5331 echo "$as_me:5331: checking if you want to have a library-prefix" >&5
5332 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5333
5334 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5335 if test "${with_lib_prefix+set}" = set; then
5336   withval="$with_lib_prefix"
5337   with_lib_prefix=$withval
5338 else
5339   with_lib_prefix=auto
5340 fi;
5341 echo "$as_me:5341: result: $with_lib_prefix" >&5
5342 echo "${ECHO_T}$with_lib_prefix" >&6
5343
5344 if test $with_lib_prefix = auto
5345 then
5346
5347         case $cf_cv_system_name in
5348         (OS/2*|os2*)
5349                 if test "$DFT_LWR_MODEL" = libtool; then
5350                         LIB_PREFIX='lib'
5351                 else
5352                         LIB_PREFIX=''
5353                 fi
5354                 ;;
5355         (*)     LIB_PREFIX='lib'
5356                 ;;
5357         esac
5358 cf_prefix=$LIB_PREFIX
5359
5360 elif test $with_lib_prefix = no
5361 then
5362         LIB_PREFIX=
5363 else
5364         LIB_PREFIX=$with_lib_prefix
5365 fi
5366
5367 LIB_SUFFIX=
5368
5369         echo "$as_me:5369: checking for PATH separator" >&5
5370 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5371         case $cf_cv_system_name in
5372         (os2*)  PATH_SEPARATOR=';'  ;;
5373         (*)     ${PATH_SEPARATOR:=':'}  ;;
5374         esac
5375
5376         echo "$as_me:5376: result: $PATH_SEPARATOR" >&5
5377 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5378
5379 ###############################################################################
5380
5381 echo "$as_me:5381: checking if you want to build a separate terminfo library" >&5
5382 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5383
5384 # Check whether --with-termlib or --without-termlib was given.
5385 if test "${with_termlib+set}" = set; then
5386   withval="$with_termlib"
5387   with_termlib=$withval
5388 else
5389   with_termlib=no
5390 fi;
5391 echo "$as_me:5391: result: $with_termlib" >&5
5392 echo "${ECHO_T}$with_termlib" >&6
5393
5394 echo "$as_me:5394: checking if you want to build a separate tic library" >&5
5395 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5396
5397 # Check whether --with-ticlib or --without-ticlib was given.
5398 if test "${with_ticlib+set}" = set; then
5399   withval="$with_ticlib"
5400   with_ticlib=$withval
5401 else
5402   with_ticlib=no
5403 fi;
5404 echo "$as_me:5404: result: $with_ticlib" >&5
5405 echo "${ECHO_T}$with_ticlib" >&6
5406
5407 if test X"$CC_G_OPT" = X"" ; then
5408         CC_G_OPT='-g'
5409         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5410 fi
5411
5412 if test X"$CXX_G_OPT" = X"" ; then
5413         CXX_G_OPT='-g'
5414         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5415 fi
5416
5417 echo "$as_me:5417: checking for default loader flags" >&5
5418 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5419 case $DFT_LWR_MODEL in
5420 (libtool) LD_MODEL=''   ;;
5421 (normal)  LD_MODEL=''   ;;
5422 (debug)   LD_MODEL=$CC_G_OPT ;;
5423 (profile) LD_MODEL='-pg';;
5424 (shared)  LD_MODEL=''   ;;
5425 esac
5426 echo "$as_me:5426: result: $LD_MODEL" >&5
5427 echo "${ECHO_T}$LD_MODEL" >&6
5428
5429 case $DFT_LWR_MODEL in
5430 (shared)
5431
5432 echo "$as_me:5432: checking if rpath option should be used" >&5
5433 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5434
5435 # Check whether --enable-rpath or --disable-rpath was given.
5436 if test "${enable_rpath+set}" = set; then
5437   enableval="$enable_rpath"
5438   cf_cv_enable_rpath=$enableval
5439 else
5440   cf_cv_enable_rpath=no
5441 fi;
5442 echo "$as_me:5442: result: $cf_cv_enable_rpath" >&5
5443 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5444
5445 echo "$as_me:5445: checking if shared libraries should be relinked during install" >&5
5446 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5447
5448 # Check whether --enable-relink or --disable-relink was given.
5449 if test "${enable_relink+set}" = set; then
5450   enableval="$enable_relink"
5451   cf_cv_do_relink=$enableval
5452 else
5453   cf_cv_do_relink=yes
5454 fi;
5455 echo "$as_me:5455: result: $cf_cv_do_relink" >&5
5456 echo "${ECHO_T}$cf_cv_do_relink" >&6
5457         ;;
5458 esac
5459
5460 # we will build libraries one-level down.
5461 rel_builddir=..
5462
5463 LD_RPATH_OPT=
5464 if test "x$cf_cv_enable_rpath" != xno
5465 then
5466         echo "$as_me:5466: checking for an rpath option" >&5
5467 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5468         case $cf_cv_system_name in
5469         (irix*)
5470                 if test "$GCC" = yes; then
5471                         LD_RPATH_OPT="-Wl,-rpath,"
5472                 else
5473                         LD_RPATH_OPT="-rpath "
5474                 fi
5475                 ;;
5476         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5477                 LD_RPATH_OPT="-Wl,-rpath,"
5478                 ;;
5479         (openbsd[2-9].*|mirbsd*)
5480                 LD_RPATH_OPT="-Wl,-rpath,"
5481                 ;;
5482         (dragonfly*)
5483                 LD_RPATH_OPT="-rpath "
5484                 ;;
5485         (netbsd*)
5486                 LD_RPATH_OPT="-Wl,-rpath,"
5487                 ;;
5488         (osf*|mls+*)
5489                 LD_RPATH_OPT="-rpath "
5490                 ;;
5491         (solaris2*)
5492                 LD_RPATH_OPT="-R"
5493                 ;;
5494         (*)
5495                 ;;
5496         esac
5497         echo "$as_me:5497: result: $LD_RPATH_OPT" >&5
5498 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5499
5500         case "x$LD_RPATH_OPT" in
5501         (x-R*)
5502                 echo "$as_me:5502: checking if we need a space after rpath option" >&5
5503 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5504                 cf_save_LIBS="$LIBS"
5505
5506 cf_add_libs="${LD_RPATH_OPT}$libdir"
5507 # Filter out duplicates - this happens with badly-designed ".pc" files...
5508 for cf_add_1lib in $LIBS
5509 do
5510         for cf_add_2lib in $cf_add_libs
5511         do
5512                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5513                 then
5514                         cf_add_1lib=
5515                         break
5516                 fi
5517         done
5518         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5519 done
5520 LIBS="$cf_add_libs"
5521
5522                 cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525
5526 int
5527 main (void)
5528 {
5529
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   cf_rpath_space=no
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 cf_rpath_space=yes
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553                 LIBS="$cf_save_LIBS"
5554                 echo "$as_me:5554: result: $cf_rpath_space" >&5
5555 echo "${ECHO_T}$cf_rpath_space" >&6
5556                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5557                 ;;
5558         esac
5559 fi
5560
5561         RM_SHARED_OPTS=
5562         LOCAL_LDFLAGS=
5563         LOCAL_LDFLAGS2=
5564         LD_SHARED_OPTS=
5565         INSTALL_LIB="-m 644"
5566         : ${rel_builddir:=.}
5567
5568         shlibdir=$libdir
5569
5570         MAKE_DLLS="#"
5571
5572         cf_cv_do_symlinks=no
5573         cf_ld_rpath_opt=
5574         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5575
5576         echo "$as_me:5576: checking if release/abi version should be used for shared libs" >&5
5577 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5578
5579 # Check whether --with-shlib-version or --without-shlib-version was given.
5580 if test "${with_shlib_version+set}" = set; then
5581   withval="$with_shlib_version"
5582   test -z "$withval" && withval=auto
5583         case $withval in
5584         (yes)
5585                 cf_cv_shlib_version=auto
5586                 ;;
5587         (rel|abi|auto)
5588                 cf_cv_shlib_version=$withval
5589                 ;;
5590         (*)
5591                 echo "$as_me:5591: result: $withval" >&5
5592 echo "${ECHO_T}$withval" >&6
5593                 { { echo "$as_me:5593: error: option value must be one of: rel, abi, or auto" >&5
5594 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5595    { (exit 1); exit 1; }; }
5596                 ;;
5597         esac
5598
5599 else
5600   cf_cv_shlib_version=auto
5601 fi;
5602         echo "$as_me:5602: result: $cf_cv_shlib_version" >&5
5603 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5604
5605         cf_cv_rm_so_locs=no
5606         cf_try_cflags=
5607
5608         # Some less-capable ports of gcc support only -fpic
5609         CC_SHARED_OPTS=
5610
5611         cf_try_fPIC=no
5612         if test "$GCC" = yes
5613         then
5614                 cf_try_fPIC=yes
5615         else
5616                 case $cf_cv_system_name in
5617                 (*linux*)       # e.g., PGI compiler
5618                         cf_try_fPIC=yes
5619                         ;;
5620                 esac
5621         fi
5622
5623         if test "$cf_try_fPIC" = yes
5624         then
5625                 echo "$as_me:5625: checking which $CC option to use" >&5
5626 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5627                 cf_save_CFLAGS="$CFLAGS"
5628                 for CC_SHARED_OPTS in -fPIC -fpic ''
5629                 do
5630                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5631                         cat >conftest.$ac_ext <<_ACEOF
5632 #line 5632 "configure"
5633 #include "confdefs.h"
5634 #include <stdio.h>
5635 int
5636 main (void)
5637 {
5638 int x = 1
5639   ;
5640   return 0;
5641 }
5642 _ACEOF
5643 rm -f conftest.$ac_objext
5644 if { (eval echo "$as_me:5644: \"$ac_compile\"") >&5
5645   (eval $ac_compile) 2>&5
5646   ac_status=$?
5647   echo "$as_me:5647: \$? = $ac_status" >&5
5648   (exit $ac_status); } &&
5649          { ac_try='test -s conftest.$ac_objext'
5650   { (eval echo "$as_me:5650: \"$ac_try\"") >&5
5651   (eval $ac_try) 2>&5
5652   ac_status=$?
5653   echo "$as_me:5653: \$? = $ac_status" >&5
5654   (exit $ac_status); }; }; then
5655   break
5656 else
5657   echo "$as_me: failed program was:" >&5
5658 cat conftest.$ac_ext >&5
5659 fi
5660 rm -f conftest.$ac_objext conftest.$ac_ext
5661                 done
5662                 echo "$as_me:5662: result: $CC_SHARED_OPTS" >&5
5663 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5664                 CFLAGS="$cf_save_CFLAGS"
5665         fi
5666
5667         cf_cv_shlib_version_infix=no
5668
5669         case $cf_cv_system_name in
5670         (aix4.3-9*|aix[5-7]*)
5671                 if test "$GCC" = yes; then
5672                         CC_SHARED_OPTS='-Wl,-brtl'
5673                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5674                 else
5675                         CC_SHARED_OPTS='-brtl'
5676                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5677                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5678                 fi
5679                 ;;
5680         (beos*)
5681                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5682                 ;;
5683         (cygwin*)
5684                 CC_SHARED_OPTS=
5685                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5686                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5687                 cf_cv_shlib_version=cygdll
5688                 cf_cv_shlib_version_infix=cygdll
5689                 shlibdir=$bindir
5690                 MAKE_DLLS=
5691                 cat >mk_shared_lib.sh <<-CF_EOF
5692                 #!$SHELL
5693                 SHARED_LIB=\$1
5694                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5695                 shift
5696                 cat <<-EOF
5697                 Linking shared library
5698                 ** SHARED_LIB \$SHARED_LIB
5699                 ** IMPORT_LIB \$IMPORT_LIB
5700 EOF
5701                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5702 CF_EOF
5703                 chmod +x mk_shared_lib.sh
5704                 ;;
5705         (msys*)
5706                 CC_SHARED_OPTS=
5707                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5708                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5709                 cf_cv_shlib_version=msysdll
5710                 cf_cv_shlib_version_infix=msysdll
5711                 shlibdir=$bindir
5712                 MAKE_DLLS=
5713                 cat >mk_shared_lib.sh <<-CF_EOF
5714                 #!$SHELL
5715                 SHARED_LIB=\$1
5716                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5717                 shift
5718                 cat <<-EOF
5719                 Linking shared library
5720                 ** SHARED_LIB \$SHARED_LIB
5721                 ** IMPORT_LIB \$IMPORT_LIB
5722 EOF
5723                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5724 CF_EOF
5725                 chmod +x mk_shared_lib.sh
5726                 ;;
5727         (darwin*)
5728                 cf_try_cflags="no-cpp-precomp"
5729                 CC_SHARED_OPTS="-dynamic"
5730                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5731                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5732                 cf_cv_shlib_version_infix=yes
5733                 echo "$as_me:5733: checking if ld -search_paths_first works" >&5
5734 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5735 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5736   echo $ECHO_N "(cached) $ECHO_C" >&6
5737 else
5738
5739                         cf_save_LDFLAGS=$LDFLAGS
5740                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5741                         cat >conftest.$ac_ext <<_ACEOF
5742 #line 5742 "configure"
5743 #include "confdefs.h"
5744
5745 int
5746 main (void)
5747 {
5748 int i;
5749   ;
5750   return 0;
5751 }
5752 _ACEOF
5753 rm -f conftest.$ac_objext conftest$ac_exeext
5754 if { (eval echo "$as_me:5754: \"$ac_link\"") >&5
5755   (eval $ac_link) 2>&5
5756   ac_status=$?
5757   echo "$as_me:5757: \$? = $ac_status" >&5
5758   (exit $ac_status); } &&
5759          { ac_try='test -s conftest$ac_exeext'
5760   { (eval echo "$as_me:5760: \"$ac_try\"") >&5
5761   (eval $ac_try) 2>&5
5762   ac_status=$?
5763   echo "$as_me:5763: \$? = $ac_status" >&5
5764   (exit $ac_status); }; }; then
5765   cf_cv_ldflags_search_paths_first=yes
5766 else
5767   echo "$as_me: failed program was:" >&5
5768 cat conftest.$ac_ext >&5
5769 cf_cv_ldflags_search_paths_first=no
5770 fi
5771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5772                                 LDFLAGS=$cf_save_LDFLAGS
5773 fi
5774 echo "$as_me:5774: result: $cf_cv_ldflags_search_paths_first" >&5
5775 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5776                 if test $cf_cv_ldflags_search_paths_first = yes; then
5777                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5778                 fi
5779                 ;;
5780         (hpux[7-8]*)
5781                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5782                 if test "$GCC" != yes; then
5783                         CC_SHARED_OPTS='+Z'
5784                 fi
5785                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5786                 INSTALL_LIB="-m 555"
5787                 ;;
5788         (hpux*)
5789                 # (tested with gcc 2.7.2 -- I don't have c89)
5790                 if test "$GCC" = yes; then
5791                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5792                 else
5793                         CC_SHARED_OPTS='+Z'
5794                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5795                 fi
5796                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5797                 # HP-UX shared libraries must be executable, and should be
5798                 # readonly to exploit a quirk in the memory manager.
5799                 INSTALL_LIB="-m 555"
5800                 ;;
5801         (interix*)
5802                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5803                 if test "$cf_cv_shlib_version" = rel; then
5804                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5805                 else
5806                         cf_shared_soname='`basename $@`'
5807                 fi
5808                 CC_SHARED_OPTS=
5809                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5810                 ;;
5811         (irix*)
5812                 if test "$cf_cv_enable_rpath" = yes ; then
5813                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5814                 fi
5815                 # tested with IRIX 5.2 and 'cc'.
5816                 if test "$GCC" != yes; then
5817                         CC_SHARED_OPTS='-KPIC'
5818                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5819                 else
5820                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5821                 fi
5822                 cf_cv_rm_so_locs=yes
5823                 ;;
5824         (linux*|gnu*|k*bsd*-gnu)
5825                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5826                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5827                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5828                 fi
5829                 if test "$cf_cv_enable_rpath" = yes ; then
5830                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5831                 fi
5832
5833         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5834         if test "$cf_cv_shlib_version" = rel; then
5835                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5836         else
5837                 cf_cv_shared_soname='`basename $@`'
5838         fi
5839
5840                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5841                 ;;
5842         (mingw*)
5843                 cf_cv_shlib_version=mingw
5844                 cf_cv_shlib_version_infix=mingw
5845                 shlibdir=$bindir
5846                 MAKE_DLLS=
5847                 if test "$DFT_LWR_MODEL" = "shared" ; then
5848                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5849                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5850                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5851                 fi
5852                 CC_SHARED_OPTS=
5853                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5854                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5855                 cat >mk_shared_lib.sh <<-CF_EOF
5856                 #!$SHELL
5857                 SHARED_LIB=\$1
5858                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5859                 shift
5860                 cat <<-EOF
5861                 Linking shared library
5862                 ** SHARED_LIB \$SHARED_LIB
5863                 ** IMPORT_LIB \$IMPORT_LIB
5864 EOF
5865                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5866 CF_EOF
5867                 chmod +x mk_shared_lib.sh
5868                 ;;
5869         (openbsd[2-9].*|mirbsd*)
5870                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5871                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5872                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5873                 fi
5874                 if test "$cf_cv_enable_rpath" = yes ; then
5875                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5876                 fi
5877                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5878
5879         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5880         if test "$cf_cv_shlib_version" = rel; then
5881                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5882         else
5883                 cf_cv_shared_soname='`basename $@`'
5884         fi
5885
5886                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5887                 ;;
5888         (nto-qnx*|openbsd*|freebsd[12].*)
5889                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5890                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5891                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5892                 ;;
5893         (dragonfly*|freebsd*)
5894                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5895                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5896                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5897                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5898                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5899                 fi
5900
5901         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5902         if test "$cf_cv_shlib_version" = rel; then
5903                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5904         else
5905                 cf_cv_shared_soname='`basename $@`'
5906         fi
5907
5908                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5909                 ;;
5910         (netbsd*)
5911                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5912                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5913                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5914                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5915                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5916                         if test "$cf_cv_shlib_version" = auto; then
5917                         if test -f /usr/libexec/ld.elf_so; then
5918                                 cf_cv_shlib_version=abi
5919                         else
5920                                 cf_cv_shlib_version=rel
5921                         fi
5922                         fi
5923
5924         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5925         if test "$cf_cv_shlib_version" = rel; then
5926                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5927         else
5928                 cf_cv_shared_soname='`basename $@`'
5929         fi
5930
5931                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5932                 else
5933                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5934                 fi
5935                 ;;
5936         (osf*|mls+*)
5937                 # tested with OSF/1 V3.2 and 'cc'
5938                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5939                 # link with shared libs).
5940                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5941                 case $host_os in
5942                 (osf4*)
5943                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5944                         ;;
5945                 esac
5946                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5947                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5948                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 cf_cv_rm_so_locs=yes
5952                 ;;
5953         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5954                 # tested with osr5.0.5
5955                 if test "$GCC" != yes; then
5956                         CC_SHARED_OPTS='-belf -KPIC'
5957                 fi
5958                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5959                 if test "$cf_cv_enable_rpath" = yes ; then
5960                         # only way is to set LD_RUN_PATH but no switch for it
5961                         RUN_PATH=$libdir
5962                 fi
5963                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5964                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5965                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5966                 ;;
5967         (sunos4*)
5968                 # tested with SunOS 4.1.1 and gcc 2.7.0
5969                 if test "$GCC" != yes; then
5970                         CC_SHARED_OPTS='-KPIC'
5971                 fi
5972                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5973                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5974                 ;;
5975         (solaris2*)
5976                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5977                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5978                 if test "$DFT_LWR_MODEL" = "shared" ; then
5979                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5980                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5981                 fi
5982                 if test "$cf_cv_enable_rpath" = yes ; then
5983                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5984                 fi
5985
5986         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5987         if test "$cf_cv_shlib_version" = rel; then
5988                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5989         else
5990                 cf_cv_shared_soname='`basename $@`'
5991         fi
5992
5993                 if test "$GCC" != yes; then
5994                         cf_save_CFLAGS="$CFLAGS"
5995                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5996                         do
5997                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5998                                 cat >conftest.$ac_ext <<_ACEOF
5999 #line 5999 "configure"
6000 #include "confdefs.h"
6001 #include <stdio.h>
6002 int
6003 main (void)
6004 {
6005 printf("Hello\n");
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext
6011 if { (eval echo "$as_me:6011: \"$ac_compile\"") >&5
6012   (eval $ac_compile) 2>&5
6013   ac_status=$?
6014   echo "$as_me:6014: \$? = $ac_status" >&5
6015   (exit $ac_status); } &&
6016          { ac_try='test -s conftest.$ac_objext'
6017   { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:6020: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   break
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 fi
6027 rm -f conftest.$ac_objext conftest.$ac_ext
6028                         done
6029                         CFLAGS="$cf_save_CFLAGS"
6030                         CC_SHARED_OPTS=$cf_shared_opts
6031                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6032                 else
6033                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6034                 fi
6035                 ;;
6036         (sysv5uw7*|unix_sv*)
6037                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6038                 if test "$GCC" != yes; then
6039                         CC_SHARED_OPTS='-KPIC'
6040                 fi
6041                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6042                 ;;
6043         (*)
6044                 CC_SHARED_OPTS='unknown'
6045                 MK_SHARED_LIB='echo unknown'
6046                 ;;
6047         esac
6048
6049         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6050         case "$cf_cv_shlib_version" in
6051         (rel|abi)
6052                 case "$MK_SHARED_LIB" in
6053                 (*'-o $@')
6054                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6055                         ;;
6056                 (*)
6057                         { echo "$as_me:6057: WARNING: ignored --with-shlib-version" >&5
6058 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6059                         ;;
6060                 esac
6061                 ;;
6062         esac
6063
6064         if test -n "$cf_try_cflags"
6065         then
6066 cat > conftest.$ac_ext <<EOF
6067 #line 6067 "${as_me:-configure}"
6068 #include <stdio.h>
6069 int main(int argc, char *argv[])
6070 {
6071         printf("hello\n");
6072         return (argv[argc-1] == 0) ;
6073 }
6074 EOF
6075                 cf_save_CFLAGS="$CFLAGS"
6076                 for cf_opt in $cf_try_cflags
6077                 do
6078                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6079                         echo "$as_me:6079: checking if CFLAGS option -$cf_opt works" >&5
6080 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6081                         if { (eval echo "$as_me:6081: \"$ac_compile\"") >&5
6082   (eval $ac_compile) 2>&5
6083   ac_status=$?
6084   echo "$as_me:6084: \$? = $ac_status" >&5
6085   (exit $ac_status); }; then
6086                                 echo "$as_me:6086: result: yes" >&5
6087 echo "${ECHO_T}yes" >&6
6088                                 cf_save_CFLAGS="$CFLAGS"
6089                         else
6090                                 echo "$as_me:6090: result: no" >&5
6091 echo "${ECHO_T}no" >&6
6092                         fi
6093                 done
6094                 CFLAGS="$cf_save_CFLAGS"
6095         fi
6096
6097         # RPATH_LIST is a colon-separated list of directories
6098         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6099         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6100
6101         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6102
6103         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6104
6105 echo "${as_me:-configure}:6105: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6106
6107         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6108
6109 echo "${as_me:-configure}:6109: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6110
6111 for model in $cf_list_models; do
6112         case $model in
6113         (libtool)
6114
6115 echo "$as_me:6115: checking for additional libtool options" >&5
6116 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6117
6118 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6119 if test "${with_libtool_opts+set}" = set; then
6120   withval="$with_libtool_opts"
6121   with_libtool_opts=$withval
6122 else
6123   with_libtool_opts=no
6124 fi;
6125 echo "$as_me:6125: result: $with_libtool_opts" >&5
6126 echo "${ECHO_T}$with_libtool_opts" >&6
6127
6128 case .$with_libtool_opts in
6129 (.yes|.no|.)
6130         ;;
6131 (*)
6132         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6133         ;;
6134 esac
6135
6136 echo "$as_me:6136: checking if exported-symbols file should be used" >&5
6137 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6138
6139 # Check whether --with-export-syms or --without-export-syms was given.
6140 if test "${with_export_syms+set}" = set; then
6141   withval="$with_export_syms"
6142   with_export_syms=$withval
6143 else
6144   with_export_syms=no
6145 fi;
6146 if test "x$with_export_syms" = xyes
6147 then
6148         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6149
6150 fi
6151 echo "$as_me:6151: result: $with_export_syms" >&5
6152 echo "${ECHO_T}$with_export_syms" >&6
6153 if test "x$with_export_syms" != xno
6154 then
6155         EXPORT_SYMS="-export-symbols $with_export_syms"
6156
6157 fi
6158
6159                 ;;
6160         (shared)
6161                 if test "$CC_SHARED_OPTS" = "unknown"; then
6162                         { { echo "$as_me:6162: error: Shared libraries are not supported in this version" >&5
6163 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6164    { (exit 1); exit 1; }; }
6165                 fi
6166                 # workaround for inept transition to PIE vs PIC...
6167                 echo "$as_me:6167: checking if current CFLAGS link properly" >&5
6168 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6169                 cat >conftest.$ac_ext <<_ACEOF
6170 #line 6170 "configure"
6171 #include "confdefs.h"
6172 #include <stdio.h>
6173 int
6174 main (void)
6175 {
6176 printf("Hello work\n");
6177   ;
6178   return 0;
6179 }
6180 _ACEOF
6181 rm -f conftest.$ac_objext conftest$ac_exeext
6182 if { (eval echo "$as_me:6182: \"$ac_link\"") >&5
6183   (eval $ac_link) 2>&5
6184   ac_status=$?
6185   echo "$as_me:6185: \$? = $ac_status" >&5
6186   (exit $ac_status); } &&
6187          { ac_try='test -s conftest$ac_exeext'
6188   { (eval echo "$as_me:6188: \"$ac_try\"") >&5
6189   (eval $ac_try) 2>&5
6190   ac_status=$?
6191   echo "$as_me:6191: \$? = $ac_status" >&5
6192   (exit $ac_status); }; }; then
6193   cf_cflags_work=yes
6194 else
6195   echo "$as_me: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 cf_cflags_work=no
6198 fi
6199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6200                 echo "$as_me:6200: result: $cf_cflags_work" >&5
6201 echo "${ECHO_T}$cf_cflags_work" >&6
6202                 if test "$cf_cflags_work" = no
6203                 then
6204                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6205
6206 echo "${as_me:-configure}:6206: testing try to work around by appending shared-options ..." 1>&5
6207
6208                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6209                 fi
6210
6211 echo "$as_me:6211: checking if versioned-symbols file should be used" >&5
6212 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6213
6214 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6215 if test "${with_versioned_syms+set}" = set; then
6216   withval="$with_versioned_syms"
6217   with_versioned_syms=$withval
6218 else
6219   with_versioned_syms=no
6220 fi;
6221 if test "x$with_versioned_syms" = xyes
6222 then
6223         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6224
6225 fi
6226 echo "$as_me:6226: result: $with_versioned_syms" >&5
6227 echo "${ECHO_T}$with_versioned_syms" >&6
6228
6229 RESULTING_SYMS=
6230 VERSIONED_SYMS=
6231 WILDCARD_SYMS=
6232
6233 if test "x$with_versioned_syms" != xno
6234 then
6235         RESULTING_SYMS=$with_versioned_syms
6236         case "x$MK_SHARED_LIB" in
6237         (*-Wl,*)
6238                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6239                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6240                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6241
6242 echo "${as_me:-configure}:6242: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6243
6244                 ;;
6245         (*-dy\ *)
6246                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6247                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6248                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6249
6250 echo "${as_me:-configure}:6250: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6251
6252                 ;;
6253         (*)
6254                 { echo "$as_me:6254: WARNING: this system does not support versioned-symbols" >&5
6255 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6256                 ;;
6257         esac
6258
6259         # Linux ld can selectively override scope, e.g., of symbols beginning with
6260         # "_" by first declaring some as global, and then using a wildcard to
6261         # declare the others as local.  Some other loaders cannot do this.  Check
6262         # by constructing a (very) simple shared library and inspecting its
6263         # symbols.
6264         if test "x$VERSIONED_SYMS" != "x"
6265         then
6266                 echo "$as_me:6266: checking if wildcards can be used to selectively omit symbols" >&5
6267 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6268                 WILDCARD_SYMS=no
6269
6270                 # make sources
6271                 rm -f conftest.*
6272
6273                 cat >conftest.ver <<EOF
6274 module_1.0 {
6275 global:
6276         globalf1;
6277 local:
6278         localf1;
6279 };
6280 module_2.0 {
6281 global:
6282         globalf2;
6283 local:
6284         localf2;
6285         _*;
6286 } module_1.0;
6287 submodule_1.0 {
6288 global:
6289         subglobalf1;
6290         _ismissing;
6291 local:
6292         sublocalf1;
6293 };
6294 submodule_2.0 {
6295 global:
6296         subglobalf2;
6297 local:
6298         sublocalf2;
6299         _*;
6300 } submodule_1.0;
6301 EOF
6302                 cat >conftest.$ac_ext <<EOF
6303 #line 6303 "configure"
6304 int     _ismissing(void) { return 1; }
6305 int     _localf1(void) { return 1; }
6306 int     _localf2(void) { return 2; }
6307 int     globalf1(void) { return 1; }
6308 int     globalf2(void) { return 2; }
6309 int     _sublocalf1(void) { return 1; }
6310 int     _sublocalf2(void) { return 2; }
6311 int     subglobalf1(void) { return 1; }
6312 int     subglobalf2(void) { return 2; }
6313 EOF
6314                 cat >conftest.mk <<EOF
6315 CC=${CC}
6316 CFLAGS=${CFLAGS}
6317 CPPFLAGS=${CPPFLAGS}
6318 LDFLAGS=${LDFLAGS}
6319 LIBS=${LIBS}
6320 VERSIONED_SYMS=${VERSIONED_SYMS}
6321 RESULTING_SYMS=conftest.ver
6322 MK_SHARED_LIB=${MK_SHARED_LIB}
6323 conftest.so: conftest.$ac_cv_objext
6324                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6325 EOF
6326
6327                 # compile source, make library
6328                 if make -f conftest.mk 2>&5 >/dev/null
6329                 then
6330                         # test for missing symbol in either Data or Text section
6331                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6332                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6333                 fi
6334                 echo "$as_me:6334: result: $WILDCARD_SYMS" >&5
6335 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6336                 rm -f conftest.*
6337         fi
6338 fi
6339
6340                 ;;
6341         esac
6342 done
6343
6344 ### Checks for special libraries, must be done up-front.
6345 SHLIB_LIST=""
6346
6347 echo "$as_me:6347: checking if you want to link with the GPM mouse library" >&5
6348 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6349
6350 # Check whether --with-gpm or --without-gpm was given.
6351 if test "${with_gpm+set}" = set; then
6352   withval="$with_gpm"
6353   with_gpm=$withval
6354 else
6355   with_gpm=maybe
6356 fi;
6357 echo "$as_me:6357: result: $with_gpm" >&5
6358 echo "${ECHO_T}$with_gpm" >&6
6359
6360 if test "$with_gpm" != no ; then
6361         echo "$as_me:6361: checking for gpm.h" >&5
6362 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6363 if test "${ac_cv_header_gpm_h+set}" = set; then
6364   echo $ECHO_N "(cached) $ECHO_C" >&6
6365 else
6366   cat >conftest.$ac_ext <<_ACEOF
6367 #line 6367 "configure"
6368 #include "confdefs.h"
6369 #include <gpm.h>
6370 _ACEOF
6371 if { (eval echo "$as_me:6371: \"$ac_cpp conftest.$ac_ext\"") >&5
6372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6373   ac_status=$?
6374   egrep -v '^ *\+' conftest.er1 >conftest.err
6375   rm -f conftest.er1
6376   cat conftest.err >&5
6377   echo "$as_me:6377: \$? = $ac_status" >&5
6378   (exit $ac_status); } >/dev/null; then
6379   if test -s conftest.err; then
6380     ac_cpp_err=$ac_c_preproc_warn_flag
6381   else
6382     ac_cpp_err=
6383   fi
6384 else
6385   ac_cpp_err=yes
6386 fi
6387 if test -z "$ac_cpp_err"; then
6388   ac_cv_header_gpm_h=yes
6389 else
6390   echo "$as_me: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   ac_cv_header_gpm_h=no
6393 fi
6394 rm -f conftest.err conftest.$ac_ext
6395 fi
6396 echo "$as_me:6396: result: $ac_cv_header_gpm_h" >&5
6397 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6398 if test $ac_cv_header_gpm_h = yes; then
6399
6400 cat >>confdefs.h <<\EOF
6401 #define HAVE_GPM_H 1
6402 EOF
6403
6404                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6405                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6406
6407 echo "${as_me:-configure}:6407: testing assuming we really have GPM library ..." 1>&5
6408
6409 cat >>confdefs.h <<\EOF
6410 #define HAVE_LIBGPM 1
6411 EOF
6412
6413                         with_gpm=yes
6414                 else
6415                         echo "$as_me:6415: checking for Gpm_Open in -lgpm" >&5
6416 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6417 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6418   echo $ECHO_N "(cached) $ECHO_C" >&6
6419 else
6420   ac_check_lib_save_LIBS=$LIBS
6421 LIBS="-lgpm  $LIBS"
6422 cat >conftest.$ac_ext <<_ACEOF
6423 #line 6423 "configure"
6424 #include "confdefs.h"
6425
6426 /* Override any gcc2 internal prototype to avoid an error.  */
6427 #ifdef __cplusplus
6428 extern "C"
6429 #endif
6430 /* We use char because int might match the return type of a gcc2
6431    builtin and then its argument prototype would still apply.  */
6432 char Gpm_Open ();
6433 int
6434 main (void)
6435 {
6436 Gpm_Open ();
6437   ;
6438   return 0;
6439 }
6440 _ACEOF
6441 rm -f conftest.$ac_objext conftest$ac_exeext
6442 if { (eval echo "$as_me:6442: \"$ac_link\"") >&5
6443   (eval $ac_link) 2>&5
6444   ac_status=$?
6445   echo "$as_me:6445: \$? = $ac_status" >&5
6446   (exit $ac_status); } &&
6447          { ac_try='test -s conftest$ac_exeext'
6448   { (eval echo "$as_me:6448: \"$ac_try\"") >&5
6449   (eval $ac_try) 2>&5
6450   ac_status=$?
6451   echo "$as_me:6451: \$? = $ac_status" >&5
6452   (exit $ac_status); }; }; then
6453   ac_cv_lib_gpm_Gpm_Open=yes
6454 else
6455   echo "$as_me: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6457 ac_cv_lib_gpm_Gpm_Open=no
6458 fi
6459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6460 LIBS=$ac_check_lib_save_LIBS
6461 fi
6462 echo "$as_me:6462: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6463 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6464 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6465   with_gpm=yes
6466 else
6467
6468                                 if test "$with_gpm" = maybe; then
6469                                         { echo "$as_me:6469: WARNING: Cannot link with GPM library" >&5
6470 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6471                                         with_gpm=no
6472                                 else
6473                                         { { echo "$as_me:6473: error: Cannot link with GPM library" >&5
6474 echo "$as_me: error: Cannot link with GPM library" >&2;}
6475    { (exit 1); exit 1; }; }
6476                                 fi
6477
6478 fi
6479
6480                 fi
6481
6482 else
6483
6484                 test "$with_gpm" != maybe && { echo "$as_me:6484: WARNING: Cannot find GPM header" >&5
6485 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6486                 with_gpm=no
6487
6488 fi
6489
6490 fi
6491
6492 if test "$with_gpm" != no ; then
6493         echo "$as_me:6493: checking if you want to load GPM dynamically" >&5
6494 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6495
6496 # Check whether --with-dlsym or --without-dlsym was given.
6497 if test "${with_dlsym+set}" = set; then
6498   withval="$with_dlsym"
6499   with_dlsym=$withval
6500 else
6501   with_dlsym=yes
6502 fi;
6503         echo "$as_me:6503: result: $with_dlsym" >&5
6504 echo "${ECHO_T}$with_dlsym" >&6
6505         if test "x$with_dlsym" = xyes ; then
6506
6507 cf_have_dlsym=no
6508 echo "$as_me:6508: checking for dlsym" >&5
6509 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6510 if test "${ac_cv_func_dlsym+set}" = set; then
6511   echo $ECHO_N "(cached) $ECHO_C" >&6
6512 else
6513   cat >conftest.$ac_ext <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516 /* System header to define __stub macros and hopefully few prototypes,
6517     which can conflict with char dlsym (); below.  */
6518 #include <assert.h>
6519 /* Override any gcc2 internal prototype to avoid an error.  */
6520 #ifdef __cplusplus
6521 extern "C"
6522 #endif
6523 /* We use char because int might match the return type of a gcc2
6524    builtin and then its argument prototype would still apply.  */
6525 char dlsym ();
6526 char (*f) ();
6527
6528 int
6529 main (void)
6530 {
6531 /* The GNU C library defines this for functions which it implements
6532     to always fail with ENOSYS.  Some functions are actually named
6533     something starting with __ and the normal name is an alias.  */
6534 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6535 choke me
6536 #else
6537 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6538 #endif
6539
6540   ;
6541   return 0;
6542 }
6543 _ACEOF
6544 rm -f conftest.$ac_objext conftest$ac_exeext
6545 if { (eval echo "$as_me:6545: \"$ac_link\"") >&5
6546   (eval $ac_link) 2>&5
6547   ac_status=$?
6548   echo "$as_me:6548: \$? = $ac_status" >&5
6549   (exit $ac_status); } &&
6550          { ac_try='test -s conftest$ac_exeext'
6551   { (eval echo "$as_me:6551: \"$ac_try\"") >&5
6552   (eval $ac_try) 2>&5
6553   ac_status=$?
6554   echo "$as_me:6554: \$? = $ac_status" >&5
6555   (exit $ac_status); }; }; then
6556   ac_cv_func_dlsym=yes
6557 else
6558   echo "$as_me: failed program was:" >&5
6559 cat conftest.$ac_ext >&5
6560 ac_cv_func_dlsym=no
6561 fi
6562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6563 fi
6564 echo "$as_me:6564: result: $ac_cv_func_dlsym" >&5
6565 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6566 if test $ac_cv_func_dlsym = yes; then
6567   cf_have_dlsym=yes
6568 else
6569
6570 cf_have_libdl=no
6571 echo "$as_me:6571: checking for dlsym in -ldl" >&5
6572 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6573 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6574   echo $ECHO_N "(cached) $ECHO_C" >&6
6575 else
6576   ac_check_lib_save_LIBS=$LIBS
6577 LIBS="-ldl  $LIBS"
6578 cat >conftest.$ac_ext <<_ACEOF
6579 #line 6579 "configure"
6580 #include "confdefs.h"
6581
6582 /* Override any gcc2 internal prototype to avoid an error.  */
6583 #ifdef __cplusplus
6584 extern "C"
6585 #endif
6586 /* We use char because int might match the return type of a gcc2
6587    builtin and then its argument prototype would still apply.  */
6588 char dlsym ();
6589 int
6590 main (void)
6591 {
6592 dlsym ();
6593   ;
6594   return 0;
6595 }
6596 _ACEOF
6597 rm -f conftest.$ac_objext conftest$ac_exeext
6598 if { (eval echo "$as_me:6598: \"$ac_link\"") >&5
6599   (eval $ac_link) 2>&5
6600   ac_status=$?
6601   echo "$as_me:6601: \$? = $ac_status" >&5
6602   (exit $ac_status); } &&
6603          { ac_try='test -s conftest$ac_exeext'
6604   { (eval echo "$as_me:6604: \"$ac_try\"") >&5
6605   (eval $ac_try) 2>&5
6606   ac_status=$?
6607   echo "$as_me:6607: \$? = $ac_status" >&5
6608   (exit $ac_status); }; }; then
6609   ac_cv_lib_dl_dlsym=yes
6610 else
6611   echo "$as_me: failed program was:" >&5
6612 cat conftest.$ac_ext >&5
6613 ac_cv_lib_dl_dlsym=no
6614 fi
6615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6616 LIBS=$ac_check_lib_save_LIBS
6617 fi
6618 echo "$as_me:6618: result: $ac_cv_lib_dl_dlsym" >&5
6619 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6620 if test $ac_cv_lib_dl_dlsym = yes; then
6621
6622         cf_have_dlsym=yes
6623         cf_have_libdl=yes
6624 fi
6625
6626 fi
6627
6628 if test "$cf_have_dlsym" = yes ; then
6629         test "$cf_have_libdl" = yes && {
6630 cf_add_libs="-ldl"
6631 # Filter out duplicates - this happens with badly-designed ".pc" files...
6632 for cf_add_1lib in $LIBS
6633 do
6634         for cf_add_2lib in $cf_add_libs
6635         do
6636                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6637                 then
6638                         cf_add_1lib=
6639                         break
6640                 fi
6641         done
6642         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6643 done
6644 LIBS="$cf_add_libs"
6645  }
6646
6647         echo "$as_me:6647: checking whether able to link to dl*() functions" >&5
6648 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6649         cat >conftest.$ac_ext <<_ACEOF
6650 #line 6650 "configure"
6651 #include "confdefs.h"
6652 #include <dlfcn.h>
6653 int
6654 main (void)
6655 {
6656
6657                 void *obj;
6658                 if ((obj = dlopen("filename", 0)) != 0) {
6659                         if (dlsym(obj, "symbolname") == 0) {
6660                         dlclose(obj);
6661                         }
6662                 }
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 rm -f conftest.$ac_objext conftest$ac_exeext
6668 if { (eval echo "$as_me:6668: \"$ac_link\"") >&5
6669   (eval $ac_link) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit $ac_status); } &&
6673          { ac_try='test -s conftest$ac_exeext'
6674   { (eval echo "$as_me:6674: \"$ac_try\"") >&5
6675   (eval $ac_try) 2>&5
6676   ac_status=$?
6677   echo "$as_me:6677: \$? = $ac_status" >&5
6678   (exit $ac_status); }; }; then
6679
6680 cat >>confdefs.h <<\EOF
6681 #define HAVE_LIBDL 1
6682 EOF
6683
6684 else
6685   echo "$as_me: failed program was:" >&5
6686 cat conftest.$ac_ext >&5
6687
6688                 { { echo "$as_me:6688: error: Cannot link test program for libdl" >&5
6689 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6690    { (exit 1); exit 1; }; }
6691 fi
6692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6693         echo "$as_me:6693: result: ok" >&5
6694 echo "${ECHO_T}ok" >&6
6695 else
6696         { { echo "$as_me:6696: error: Cannot find dlsym function" >&5
6697 echo "$as_me: error: Cannot find dlsym function" >&2;}
6698    { (exit 1); exit 1; }; }
6699 fi
6700
6701                 if test "x$with_gpm" != xyes ; then
6702                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6703
6704 echo "${as_me:-configure}:6704: testing assuming soname for gpm is $with_gpm ..." 1>&5
6705
6706                         cf_cv_gpm_soname="$with_gpm"
6707                 else
6708
6709 echo "$as_me:6709: checking for soname of gpm library" >&5
6710 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6711 if test "${cf_cv_gpm_soname+set}" = set; then
6712   echo $ECHO_N "(cached) $ECHO_C" >&6
6713 else
6714
6715 cf_cv_gpm_soname=unknown
6716 if test "$cross_compiling" != yes ; then
6717 cat >conftest.$ac_ext <<CF_EOF
6718 #include <gpm.h>
6719 int main(void)
6720 {
6721 if (Gpm_Open(0,0)) Gpm_Close();
6722         ${cf_cv_main_return:-return}(0);
6723 }
6724 CF_EOF
6725 cf_save_LIBS="$LIBS"
6726
6727 cf_add_libs="-lgpm"
6728 # Filter out duplicates - this happens with badly-designed ".pc" files...
6729 for cf_add_1lib in $LIBS
6730 do
6731         for cf_add_2lib in $cf_add_libs
6732         do
6733                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6734                 then
6735                         cf_add_1lib=
6736                         break
6737                 fi
6738         done
6739         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6740 done
6741 LIBS="$cf_add_libs"
6742
6743         if { (eval echo "$as_me:6743: \"$ac_compile\"") >&5
6744   (eval $ac_compile) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit $ac_status); } ; then
6748                 if { (eval echo "$as_me:6748: \"$ac_link\"") >&5
6749   (eval $ac_link) 2>&5
6750   ac_status=$?
6751   echo "$as_me:6751: \$? = $ac_status" >&5
6752   (exit $ac_status); } ; then
6753                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6754                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6755                 fi
6756         fi
6757 rm -rf conftest*
6758 LIBS="$cf_save_LIBS"
6759 fi
6760
6761 fi
6762 echo "$as_me:6762: result: $cf_cv_gpm_soname" >&5
6763 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6764
6765                 fi
6766                 test "$cf_cv_gpm_soname" != "unknown" &&
6767 cat >>confdefs.h <<EOF
6768 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6769 EOF
6770
6771                 SHLIB_LIST="-ldl $SHLIB_LIST"
6772
6773 cf_add_libs="-ldl"
6774 # Filter out duplicates - this happens with badly-designed ".pc" files...
6775 for cf_add_1lib in $PRIVATE_LIBS
6776 do
6777         for cf_add_2lib in $cf_add_libs
6778         do
6779                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6780                 then
6781                         cf_add_1lib=
6782                         break
6783                 fi
6784         done
6785         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6786 done
6787 PRIVATE_LIBS="$cf_add_libs"
6788
6789         else
6790                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6791
6792 cf_add_libs="-lgpm"
6793 # Filter out duplicates - this happens with badly-designed ".pc" files...
6794 for cf_add_1lib in $TEST_LIBS
6795 do
6796         for cf_add_2lib in $cf_add_libs
6797         do
6798                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6799                 then
6800                         cf_add_1lib=
6801                         break
6802                 fi
6803         done
6804         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6805 done
6806 TEST_LIBS="$cf_add_libs"
6807
6808 cf_add_libs="-lgpm"
6809 # Filter out duplicates - this happens with badly-designed ".pc" files...
6810 for cf_add_1lib in $PRIVATE_LIBS
6811 do
6812         for cf_add_2lib in $cf_add_libs
6813         do
6814                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6815                 then
6816                         cf_add_1lib=
6817                         break
6818                 fi
6819         done
6820         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6821 done
6822 PRIVATE_LIBS="$cf_add_libs"
6823
6824         fi
6825
6826 cat >>confdefs.h <<\EOF
6827 #define HAVE_LIBGPM 1
6828 EOF
6829
6830 echo "$as_me:6830: checking for Gpm_Wgetch in -lgpm" >&5
6831 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6832 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6833   echo $ECHO_N "(cached) $ECHO_C" >&6
6834 else
6835   ac_check_lib_save_LIBS=$LIBS
6836 LIBS="-lgpm  $LIBS"
6837 cat >conftest.$ac_ext <<_ACEOF
6838 #line 6838 "configure"
6839 #include "confdefs.h"
6840
6841 /* Override any gcc2 internal prototype to avoid an error.  */
6842 #ifdef __cplusplus
6843 extern "C"
6844 #endif
6845 /* We use char because int might match the return type of a gcc2
6846    builtin and then its argument prototype would still apply.  */
6847 char Gpm_Wgetch ();
6848 int
6849 main (void)
6850 {
6851 Gpm_Wgetch ();
6852   ;
6853   return 0;
6854 }
6855 _ACEOF
6856 rm -f conftest.$ac_objext conftest$ac_exeext
6857 if { (eval echo "$as_me:6857: \"$ac_link\"") >&5
6858   (eval $ac_link) 2>&5
6859   ac_status=$?
6860   echo "$as_me:6860: \$? = $ac_status" >&5
6861   (exit $ac_status); } &&
6862          { ac_try='test -s conftest$ac_exeext'
6863   { (eval echo "$as_me:6863: \"$ac_try\"") >&5
6864   (eval $ac_try) 2>&5
6865   ac_status=$?
6866   echo "$as_me:6866: \$? = $ac_status" >&5
6867   (exit $ac_status); }; }; then
6868   ac_cv_lib_gpm_Gpm_Wgetch=yes
6869 else
6870   echo "$as_me: failed program was:" >&5
6871 cat conftest.$ac_ext >&5
6872 ac_cv_lib_gpm_Gpm_Wgetch=no
6873 fi
6874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6875 LIBS=$ac_check_lib_save_LIBS
6876 fi
6877 echo "$as_me:6877: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6878 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6879 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6880
6881 echo "$as_me:6881: checking if GPM is weakly bound to curses library" >&5
6882 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6883 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6884   echo $ECHO_N "(cached) $ECHO_C" >&6
6885 else
6886
6887 cf_cv_check_gpm_wgetch=unknown
6888 if test "$cross_compiling" != yes ; then
6889
6890 cat >conftest.$ac_ext <<CF_EOF
6891 #include <gpm.h>
6892 int main(void)
6893 {
6894         Gpm_Wgetch();
6895         ${cf_cv_main_return:-return}(0);
6896 }
6897 CF_EOF
6898
6899         cf_save_LIBS="$LIBS"
6900         # This only works if we can look at the symbol table.  If a shared
6901         # library is stripped for install, we cannot use that.  So we're forced
6902         # to rely on the static library, noting that some packagers may not
6903         # include it.
6904         LIBS="-static -lgpm -dynamic $LIBS"
6905         if { (eval echo "$as_me:6905: \"$ac_compile\"") >&5
6906   (eval $ac_compile) 2>&5
6907   ac_status=$?
6908   echo "$as_me:6908: \$? = $ac_status" >&5
6909   (exit $ac_status); } ; then
6910                 if { (eval echo "$as_me:6910: \"$ac_link\"") >&5
6911   (eval $ac_link) 2>&5
6912   ac_status=$?
6913   echo "$as_me:6913: \$? = $ac_status" >&5
6914   (exit $ac_status); } ; then
6915                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6916                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6917                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6918                 fi
6919         fi
6920         rm -rf conftest*
6921         LIBS="$cf_save_LIBS"
6922 fi
6923
6924 fi
6925 echo "$as_me:6925: result: $cf_cv_check_gpm_wgetch" >&5
6926 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6927
6928 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6929         { echo "$as_me:6929: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6930 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6931 fi
6932
6933 fi
6934
6935 fi
6936
6937 echo "$as_me:6937: checking if you want to use PCRE2 for regular-expressions" >&5
6938 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6939
6940 # Check whether --with-pcre2 or --without-pcre2 was given.
6941 if test "${with_pcre2+set}" = set; then
6942   withval="$with_pcre2"
6943
6944 fi;
6945 test -z "$with_pcre2" && with_pcre2=no
6946 echo "$as_me:6946: result: $with_pcre2" >&5
6947 echo "${ECHO_T}$with_pcre2" >&6
6948
6949 if test "x$with_pcre2" != xno ; then
6950
6951 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6952         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6953
6954 echo "${as_me:-configure}:6954: testing found package libpcre2 ..." 1>&5
6955
6956         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6957         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6958         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6959
6960 echo "${as_me:-configure}:6960: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6961
6962         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6963
6964 echo "${as_me:-configure}:6964: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6965
6966 cf_fix_cppflags=no
6967 cf_new_cflags=
6968 cf_new_cppflags=
6969 cf_new_extra_cppflags=
6970
6971 for cf_add_cflags in $cf_pkgconfig_incs
6972 do
6973 case $cf_fix_cppflags in
6974 (no)
6975         case $cf_add_cflags in
6976         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6977                 case $cf_add_cflags in
6978                 (-D*)
6979                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6980
6981                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6982                                 && test -z "${cf_tst_cflags}" \
6983                                 && cf_fix_cppflags=yes
6984
6985                         if test $cf_fix_cppflags = yes ; then
6986
6987         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6988         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6989
6990                                 continue
6991                         elif test "${cf_tst_cflags}" = "\"'" ; then
6992
6993         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6994         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6995
6996                                 continue
6997                         fi
6998                         ;;
6999                 esac
7000                 case "$CPPFLAGS" in
7001                 (*$cf_add_cflags)
7002                         ;;
7003                 (*)
7004                         case $cf_add_cflags in
7005                         (-D*)
7006                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7007
7008 CPPFLAGS=`echo "$CPPFLAGS" | \
7009         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7010                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7011
7012                                 ;;
7013                         esac
7014
7015         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7016         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7017
7018                         ;;
7019                 esac
7020                 ;;
7021         (*)
7022
7023         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7024         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7025
7026                 ;;
7027         esac
7028         ;;
7029 (yes)
7030
7031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7033
7034         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7035
7036         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7037                 && test -z "${cf_tst_cflags}" \
7038                 && cf_fix_cppflags=no
7039         ;;
7040 esac
7041 done
7042
7043 if test -n "$cf_new_cflags" ; then
7044
7045         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7046         CFLAGS="${CFLAGS}$cf_new_cflags"
7047
7048 fi
7049
7050 if test -n "$cf_new_cppflags" ; then
7051
7052         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7053         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7054
7055 fi
7056
7057 if test -n "$cf_new_extra_cppflags" ; then
7058
7059         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7060         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7061
7062 fi
7063
7064 cf_add_libs="$cf_pkgconfig_libs"
7065 # Filter out duplicates - this happens with badly-designed ".pc" files...
7066 for cf_add_1lib in $LIBS
7067 do
7068         for cf_add_2lib in $cf_add_libs
7069         do
7070                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7071                 then
7072                         cf_add_1lib=
7073                         break
7074                 fi
7075         done
7076         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7077 done
7078 LIBS="$cf_add_libs"
7079
7080         :
7081 else
7082         cf_pkgconfig_incs=
7083         cf_pkgconfig_libs=
7084
7085 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7086         test -n "$verbose" && echo "    found package libpcre" 1>&6
7087
7088 echo "${as_me:-configure}:7088: testing found package libpcre ..." 1>&5
7089
7090         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7091         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7092         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7093
7094 echo "${as_me:-configure}:7094: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7095
7096         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7097
7098 echo "${as_me:-configure}:7098: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7099
7100 cf_fix_cppflags=no
7101 cf_new_cflags=
7102 cf_new_cppflags=
7103 cf_new_extra_cppflags=
7104
7105 for cf_add_cflags in $cf_pkgconfig_incs
7106 do
7107 case $cf_fix_cppflags in
7108 (no)
7109         case $cf_add_cflags in
7110         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7111                 case $cf_add_cflags in
7112                 (-D*)
7113                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7114
7115                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7116                                 && test -z "${cf_tst_cflags}" \
7117                                 && cf_fix_cppflags=yes
7118
7119                         if test $cf_fix_cppflags = yes ; then
7120
7121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7123
7124                                 continue
7125                         elif test "${cf_tst_cflags}" = "\"'" ; then
7126
7127         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7128         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7129
7130                                 continue
7131                         fi
7132                         ;;
7133                 esac
7134                 case "$CPPFLAGS" in
7135                 (*$cf_add_cflags)
7136                         ;;
7137                 (*)
7138                         case $cf_add_cflags in
7139                         (-D*)
7140                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7141
7142 CPPFLAGS=`echo "$CPPFLAGS" | \
7143         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7144                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7145
7146                                 ;;
7147                         esac
7148
7149         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7150         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7151
7152                         ;;
7153                 esac
7154                 ;;
7155         (*)
7156
7157         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7158         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7159
7160                 ;;
7161         esac
7162         ;;
7163 (yes)
7164
7165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7167
7168         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7169
7170         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7171                 && test -z "${cf_tst_cflags}" \
7172                 && cf_fix_cppflags=no
7173         ;;
7174 esac
7175 done
7176
7177 if test -n "$cf_new_cflags" ; then
7178
7179         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7180         CFLAGS="${CFLAGS}$cf_new_cflags"
7181
7182 fi
7183
7184 if test -n "$cf_new_cppflags" ; then
7185
7186         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7187         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7188
7189 fi
7190
7191 if test -n "$cf_new_extra_cppflags" ; then
7192
7193         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7194         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7195
7196 fi
7197
7198 cf_add_libs="$cf_pkgconfig_libs"
7199 # Filter out duplicates - this happens with badly-designed ".pc" files...
7200 for cf_add_1lib in $LIBS
7201 do
7202         for cf_add_2lib in $cf_add_libs
7203         do
7204                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7205                 then
7206                         cf_add_1lib=
7207                         break
7208                 fi
7209         done
7210         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7211 done
7212 LIBS="$cf_add_libs"
7213
7214         :
7215 else
7216         cf_pkgconfig_incs=
7217         cf_pkgconfig_libs=
7218
7219                         { { echo "$as_me:7219: error: Cannot find PCRE2 library" >&5
7220 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7221    { (exit 1); exit 1; }; }
7222 fi
7223
7224 fi
7225
7226 cat >>confdefs.h <<\EOF
7227 #define HAVE_LIB_PCRE2 1
7228 EOF
7229
7230         # if pkgconfig gave no results, look for the libraries directly
7231         case $LIBS in
7232         (*pcre2-posix*|*pcreposix*)
7233                 ;;
7234         (*)
7235                 echo "$as_me:7235: checking for regcomp in -lpcre2-posix" >&5
7236 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7237 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7238   echo $ECHO_N "(cached) $ECHO_C" >&6
7239 else
7240   ac_check_lib_save_LIBS=$LIBS
7241 LIBS="-lpcre2-posix  $LIBS"
7242 cat >conftest.$ac_ext <<_ACEOF
7243 #line 7243 "configure"
7244 #include "confdefs.h"
7245
7246 /* Override any gcc2 internal prototype to avoid an error.  */
7247 #ifdef __cplusplus
7248 extern "C"
7249 #endif
7250 /* We use char because int might match the return type of a gcc2
7251    builtin and then its argument prototype would still apply.  */
7252 char regcomp ();
7253 int
7254 main (void)
7255 {
7256 regcomp ();
7257   ;
7258   return 0;
7259 }
7260 _ACEOF
7261 rm -f conftest.$ac_objext conftest$ac_exeext
7262 if { (eval echo "$as_me:7262: \"$ac_link\"") >&5
7263   (eval $ac_link) 2>&5
7264   ac_status=$?
7265   echo "$as_me:7265: \$? = $ac_status" >&5
7266   (exit $ac_status); } &&
7267          { ac_try='test -s conftest$ac_exeext'
7268   { (eval echo "$as_me:7268: \"$ac_try\"") >&5
7269   (eval $ac_try) 2>&5
7270   ac_status=$?
7271   echo "$as_me:7271: \$? = $ac_status" >&5
7272   (exit $ac_status); }; }; then
7273   ac_cv_lib_pcre2_posix_regcomp=yes
7274 else
7275   echo "$as_me: failed program was:" >&5
7276 cat conftest.$ac_ext >&5
7277 ac_cv_lib_pcre2_posix_regcomp=no
7278 fi
7279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7280 LIBS=$ac_check_lib_save_LIBS
7281 fi
7282 echo "$as_me:7282: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7283 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7284 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7285
7286 cf_add_libs="-lpcre2-posix"
7287 # Filter out duplicates - this happens with badly-designed ".pc" files...
7288 for cf_add_1lib in $LIBS
7289 do
7290         for cf_add_2lib in $cf_add_libs
7291         do
7292                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7293                 then
7294                         cf_add_1lib=
7295                         break
7296                 fi
7297         done
7298         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7299 done
7300 LIBS="$cf_add_libs"
7301
7302 else
7303   echo "$as_me:7303: checking for regcomp in -lpcreposix" >&5
7304 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7305 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7306   echo $ECHO_N "(cached) $ECHO_C" >&6
7307 else
7308   ac_check_lib_save_LIBS=$LIBS
7309 LIBS="-lpcreposix  $LIBS"
7310 cat >conftest.$ac_ext <<_ACEOF
7311 #line 7311 "configure"
7312 #include "confdefs.h"
7313
7314 /* Override any gcc2 internal prototype to avoid an error.  */
7315 #ifdef __cplusplus
7316 extern "C"
7317 #endif
7318 /* We use char because int might match the return type of a gcc2
7319    builtin and then its argument prototype would still apply.  */
7320 char regcomp ();
7321 int
7322 main (void)
7323 {
7324 regcomp ();
7325   ;
7326   return 0;
7327 }
7328 _ACEOF
7329 rm -f conftest.$ac_objext conftest$ac_exeext
7330 if { (eval echo "$as_me:7330: \"$ac_link\"") >&5
7331   (eval $ac_link) 2>&5
7332   ac_status=$?
7333   echo "$as_me:7333: \$? = $ac_status" >&5
7334   (exit $ac_status); } &&
7335          { ac_try='test -s conftest$ac_exeext'
7336   { (eval echo "$as_me:7336: \"$ac_try\"") >&5
7337   (eval $ac_try) 2>&5
7338   ac_status=$?
7339   echo "$as_me:7339: \$? = $ac_status" >&5
7340   (exit $ac_status); }; }; then
7341   ac_cv_lib_pcreposix_regcomp=yes
7342 else
7343   echo "$as_me: failed program was:" >&5
7344 cat conftest.$ac_ext >&5
7345 ac_cv_lib_pcreposix_regcomp=no
7346 fi
7347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7348 LIBS=$ac_check_lib_save_LIBS
7349 fi
7350 echo "$as_me:7350: result: $ac_cv_lib_pcreposix_regcomp" >&5
7351 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7352 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7353
7354 cf_add_libs="-lpcreposix"
7355 # Filter out duplicates - this happens with badly-designed ".pc" files...
7356 for cf_add_1lib in $LIBS
7357 do
7358         for cf_add_2lib in $cf_add_libs
7359         do
7360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7361                 then
7362                         cf_add_1lib=
7363                         break
7364                 fi
7365         done
7366         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7367 done
7368 LIBS="$cf_add_libs"
7369
7370 else
7371   { { echo "$as_me:7371: error: Cannot find PCRE2 POSIX library" >&5
7372 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7373    { (exit 1); exit 1; }; }
7374 fi
7375
7376 fi
7377
7378                 ;;
7379         esac
7380
7381         # either way, check for the library header files
7382
7383 for ac_header in pcre2-posix.h pcreposix.h
7384 do
7385 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7386 echo "$as_me:7386: checking for $ac_header" >&5
7387 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7389   echo $ECHO_N "(cached) $ECHO_C" >&6
7390 else
7391   cat >conftest.$ac_ext <<_ACEOF
7392 #line 7392 "configure"
7393 #include "confdefs.h"
7394 #include <$ac_header>
7395 _ACEOF
7396 if { (eval echo "$as_me:7396: \"$ac_cpp conftest.$ac_ext\"") >&5
7397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7398   ac_status=$?
7399   egrep -v '^ *\+' conftest.er1 >conftest.err
7400   rm -f conftest.er1
7401   cat conftest.err >&5
7402   echo "$as_me:7402: \$? = $ac_status" >&5
7403   (exit $ac_status); } >/dev/null; then
7404   if test -s conftest.err; then
7405     ac_cpp_err=$ac_c_preproc_warn_flag
7406   else
7407     ac_cpp_err=
7408   fi
7409 else
7410   ac_cpp_err=yes
7411 fi
7412 if test -z "$ac_cpp_err"; then
7413   eval "$as_ac_Header=yes"
7414 else
7415   echo "$as_me: failed program was:" >&5
7416   cat conftest.$ac_ext >&5
7417   eval "$as_ac_Header=no"
7418 fi
7419 rm -f conftest.err conftest.$ac_ext
7420 fi
7421 echo "$as_me:7421: result: `eval echo '${'$as_ac_Header'}'`" >&5
7422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7424   cat >>confdefs.h <<EOF
7425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7426 EOF
7427
7428 fi
7429 done
7430
7431 fi
7432
7433 # not everyone has "test -c"
7434 if test -c /dev/sysmouse 2>/dev/null ; then
7435 echo "$as_me:7435: checking if you want to use sysmouse" >&5
7436 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7437
7438 # Check whether --with-sysmouse or --without-sysmouse was given.
7439 if test "${with_sysmouse+set}" = set; then
7440   withval="$with_sysmouse"
7441   cf_with_sysmouse=$withval
7442 else
7443   cf_with_sysmouse=maybe
7444 fi;
7445         if test "$cf_with_sysmouse" != no ; then
7446         cat >conftest.$ac_ext <<_ACEOF
7447 #line 7447 "configure"
7448 #include "confdefs.h"
7449
7450 #include <osreldate.h>
7451 #if (__FreeBSD_version >= 400017)
7452 #include <sys/consio.h>
7453 #include <sys/fbio.h>
7454 #else
7455 #include <machine/console.h>
7456 #endif
7457
7458 int
7459 main (void)
7460 {
7461
7462         struct mouse_info the_mouse;
7463         ioctl(0, CONS_MOUSECTL, &the_mouse);
7464
7465   ;
7466   return 0;
7467 }
7468 _ACEOF
7469 rm -f conftest.$ac_objext
7470 if { (eval echo "$as_me:7470: \"$ac_compile\"") >&5
7471   (eval $ac_compile) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); } &&
7475          { ac_try='test -s conftest.$ac_objext'
7476   { (eval echo "$as_me:7476: \"$ac_try\"") >&5
7477   (eval $ac_try) 2>&5
7478   ac_status=$?
7479   echo "$as_me:7479: \$? = $ac_status" >&5
7480   (exit $ac_status); }; }; then
7481   cf_with_sysmouse=yes
7482 else
7483   echo "$as_me: failed program was:" >&5
7484 cat conftest.$ac_ext >&5
7485 cf_with_sysmouse=no
7486 fi
7487 rm -f conftest.$ac_objext conftest.$ac_ext
7488         fi
7489 echo "$as_me:7489: result: $cf_with_sysmouse" >&5
7490 echo "${ECHO_T}$cf_with_sysmouse" >&6
7491 test "$cf_with_sysmouse" = yes &&
7492 cat >>confdefs.h <<\EOF
7493 #define USE_SYSMOUSE 1
7494 EOF
7495
7496 fi
7497
7498 # pretend that ncurses==ncursesw==ncursest
7499 echo "$as_me:7499: checking if you want to disable library suffixes" >&5
7500 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7501
7502 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7503 if test "${enable_lib_suffixes+set}" = set; then
7504   enableval="$enable_lib_suffixes"
7505   test "$enableval" != no && enableval=yes
7506         if test "$enableval" != "yes" ; then
7507     disable_lib_suffixes=yes
7508         else
7509                 disable_lib_suffixes=no
7510         fi
7511 else
7512   enableval=yes
7513         disable_lib_suffixes=no
7514
7515 fi;
7516 echo "$as_me:7516: result: $disable_lib_suffixes" >&5
7517 echo "${ECHO_T}$disable_lib_suffixes" >&6
7518
7519 ### If we're building with rpath, try to link non-standard libs that way too.
7520 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7521
7522 echo "$as_me:7522: checking if rpath-hack should be disabled" >&5
7523 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7524
7525 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7526 if test "${enable_rpath_hack+set}" = set; then
7527   enableval="$enable_rpath_hack"
7528   test "$enableval" != no && enableval=yes
7529         if test "$enableval" != "yes" ; then
7530     cf_disable_rpath_hack=yes
7531         else
7532                 cf_disable_rpath_hack=no
7533         fi
7534 else
7535   enableval=yes
7536         cf_disable_rpath_hack=no
7537
7538 fi;
7539 echo "$as_me:7539: result: $cf_disable_rpath_hack" >&5
7540 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7541 if test "$cf_disable_rpath_hack" = no ; then
7542
7543 echo "$as_me:7543: checking for updated LDFLAGS" >&5
7544 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7545 if test -n "$LD_RPATH_OPT" ; then
7546         echo "$as_me:7546: result: maybe" >&5
7547 echo "${ECHO_T}maybe" >&6
7548
7549         for ac_prog in ldd
7550 do
7551   # Extract the first word of "$ac_prog", so it can be a program name with args.
7552 set dummy $ac_prog; ac_word=$2
7553 echo "$as_me:7553: checking for $ac_word" >&5
7554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7555 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7556   echo $ECHO_N "(cached) $ECHO_C" >&6
7557 else
7558   if test -n "$cf_ldd_prog"; then
7559   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7560 else
7561   ac_save_IFS=$IFS; IFS=$ac_path_separator
7562 ac_dummy="$PATH"
7563 for ac_dir in $ac_dummy; do
7564   IFS=$ac_save_IFS
7565   test -z "$ac_dir" && ac_dir=.
7566   $as_executable_p "$ac_dir/$ac_word" || continue
7567 ac_cv_prog_cf_ldd_prog="$ac_prog"
7568 echo "$as_me:7568: found $ac_dir/$ac_word" >&5
7569 break
7570 done
7571
7572 fi
7573 fi
7574 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7575 if test -n "$cf_ldd_prog"; then
7576   echo "$as_me:7576: result: $cf_ldd_prog" >&5
7577 echo "${ECHO_T}$cf_ldd_prog" >&6
7578 else
7579   echo "$as_me:7579: result: no" >&5
7580 echo "${ECHO_T}no" >&6
7581 fi
7582
7583   test -n "$cf_ldd_prog" && break
7584 done
7585 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7586
7587         cf_rpath_list="/usr/lib /lib"
7588         if test "$cf_ldd_prog" != no
7589         then
7590                 cf_rpath_oops=
7591
7592 cat >conftest.$ac_ext <<_ACEOF
7593 #line 7593 "configure"
7594 #include "confdefs.h"
7595 #include <stdio.h>
7596 int
7597 main (void)
7598 {
7599 printf("Hello");
7600   ;
7601   return 0;
7602 }
7603 _ACEOF
7604 rm -f conftest.$ac_objext conftest$ac_exeext
7605 if { (eval echo "$as_me:7605: \"$ac_link\"") >&5
7606   (eval $ac_link) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); } &&
7610          { ac_try='test -s conftest$ac_exeext'
7611   { (eval echo "$as_me:7611: \"$ac_try\"") >&5
7612   (eval $ac_try) 2>&5
7613   ac_status=$?
7614   echo "$as_me:7614: \$? = $ac_status" >&5
7615   (exit $ac_status); }; }; then
7616   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7617                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7618 else
7619   echo "$as_me: failed program was:" >&5
7620 cat conftest.$ac_ext >&5
7621 fi
7622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7623
7624                 # If we passed the link-test, but get a "not found" on a given library,
7625                 # this could be due to inept reconfiguration of gcc to make it only
7626                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7627                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7628                 # /usr/local libraries.
7629                 if test -n "$cf_rpath_oops"
7630                 then
7631                         for cf_rpath_src in $cf_rpath_oops
7632                         do
7633                                 for cf_rpath_dir in \
7634                                         /usr/local \
7635                                         /usr/pkg \
7636                                         /opt/sfw
7637                                 do
7638                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7639                                         then
7640                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7641
7642 echo "${as_me:-configure}:7642: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7643
7644                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7645                                                 break
7646                                         fi
7647                                 done
7648                         done
7649                 fi
7650         fi
7651
7652         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7653
7654 echo "${as_me:-configure}:7654: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7655
7656 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7657
7658 echo "${as_me:-configure}:7658: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7659
7660 cf_rpath_dst=
7661 for cf_rpath_src in $LDFLAGS
7662 do
7663         case $cf_rpath_src in
7664         (-L*)
7665
7666                 # check if this refers to a directory which we will ignore
7667                 cf_rpath_skip=no
7668                 if test -n "$cf_rpath_list"
7669                 then
7670                         for cf_rpath_item in $cf_rpath_list
7671                         do
7672                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7673                                 then
7674                                         cf_rpath_skip=yes
7675                                         break
7676                                 fi
7677                         done
7678                 fi
7679
7680                 if test "$cf_rpath_skip" = no
7681                 then
7682                         # transform the option
7683                         if test "$LD_RPATH_OPT" = "-R " ; then
7684                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7685                         else
7686                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7687                         fi
7688
7689                         # if we have not already added this, add it now
7690                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7691                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7692                         then
7693                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7694
7695 echo "${as_me:-configure}:7695: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7696
7697                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7698                         fi
7699                 fi
7700                 ;;
7701         esac
7702         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7703 done
7704 LDFLAGS=$cf_rpath_dst
7705
7706 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7707
7708 echo "${as_me:-configure}:7708: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7709
7710 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7711
7712 echo "${as_me:-configure}:7712: testing ...checking LIBS $LIBS ..." 1>&5
7713
7714 cf_rpath_dst=
7715 for cf_rpath_src in $LIBS
7716 do
7717         case $cf_rpath_src in
7718         (-L*)
7719
7720                 # check if this refers to a directory which we will ignore
7721                 cf_rpath_skip=no
7722                 if test -n "$cf_rpath_list"
7723                 then
7724                         for cf_rpath_item in $cf_rpath_list
7725                         do
7726                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7727                                 then
7728                                         cf_rpath_skip=yes
7729                                         break
7730                                 fi
7731                         done
7732                 fi
7733
7734                 if test "$cf_rpath_skip" = no
7735                 then
7736                         # transform the option
7737                         if test "$LD_RPATH_OPT" = "-R " ; then
7738                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7739                         else
7740                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7741                         fi
7742
7743                         # if we have not already added this, add it now
7744                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7745                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7746                         then
7747                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7748
7749 echo "${as_me:-configure}:7749: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7750
7751                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7752                         fi
7753                 fi
7754                 ;;
7755         esac
7756         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7757 done
7758 LIBS=$cf_rpath_dst
7759
7760 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7761
7762 echo "${as_me:-configure}:7762: testing ...checked LIBS $LIBS ..." 1>&5
7763
7764         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7765
7766 echo "${as_me:-configure}:7766: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7767
7768 else
7769         echo "$as_me:7769: result: no" >&5
7770 echo "${ECHO_T}no" >&6
7771 fi
7772
7773 fi
7774
7775 fi
7776
7777 ###############################################################################
7778
7779 ###     use option --with-extra-suffix to append suffix to headers and libraries
7780 echo "$as_me:7780: checking if you wish to append extra suffix to header/library paths" >&5
7781 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7782 EXTRA_SUFFIX=
7783
7784 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7785 if test "${with_extra_suffix+set}" = set; then
7786   withval="$with_extra_suffix"
7787   case x$withval in
7788         (no)
7789                 ;;
7790         (xyes|x)
7791                 EXTRA_SUFFIX=$cf_cv_abi_version
7792                 ;;
7793         (*)
7794                 EXTRA_SUFFIX=$withval
7795                 ;;
7796         esac
7797
7798 fi;
7799 echo "$as_me:7799: result: $EXTRA_SUFFIX" >&5
7800 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7801
7802 ###     use option --disable-overwrite to leave out the link to -lcurses
7803 echo "$as_me:7803: checking if you wish to install ncurses overwriting curses" >&5
7804 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7805
7806 # Check whether --enable-overwrite or --disable-overwrite was given.
7807 if test "${enable_overwrite+set}" = set; then
7808   enableval="$enable_overwrite"
7809   with_overwrite=$enableval
7810 else
7811   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7812 fi;
7813 echo "$as_me:7813: result: $with_overwrite" >&5
7814 echo "${ECHO_T}$with_overwrite" >&6
7815
7816 echo "$as_me:7816: checking if external terminfo-database is used" >&5
7817 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7818
7819 # Check whether --enable-database or --disable-database was given.
7820 if test "${enable_database+set}" = set; then
7821   enableval="$enable_database"
7822   use_database=$enableval
7823 else
7824   use_database=yes
7825 fi;
7826 echo "$as_me:7826: result: $use_database" >&5
7827 echo "${ECHO_T}$use_database" >&6
7828
7829 case $host_os in
7830 (os2*)
7831         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7832         ;;
7833 (*)
7834         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7835         ;;
7836 esac
7837
7838 NCURSES_USE_DATABASE=0
7839 if test "$use_database" != no ; then
7840         NCURSES_USE_DATABASE=1
7841
7842         echo "$as_me:7842: checking which terminfo source-file will be installed" >&5
7843 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7844
7845 # Check whether --with-database or --without-database was given.
7846 if test "${with_database+set}" = set; then
7847   withval="$with_database"
7848   TERMINFO_SRC=$withval
7849 fi;
7850         echo "$as_me:7850: result: $TERMINFO_SRC" >&5
7851 echo "${ECHO_T}$TERMINFO_SRC" >&6
7852
7853         echo "$as_me:7853: checking whether to use hashed database instead of directory/tree" >&5
7854 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7855
7856 # Check whether --with-hashed-db or --without-hashed-db was given.
7857 if test "${with_hashed_db+set}" = set; then
7858   withval="$with_hashed_db"
7859
7860 else
7861   with_hashed_db=no
7862 fi;
7863         echo "$as_me:7863: result: $with_hashed_db" >&5
7864 echo "${ECHO_T}$with_hashed_db" >&6
7865 else
7866         with_hashed_db=no
7867 fi
7868
7869 echo "$as_me:7869: checking for list of fallback descriptions" >&5
7870 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7871
7872 # Check whether --with-fallbacks or --without-fallbacks was given.
7873 if test "${with_fallbacks+set}" = set; then
7874   withval="$with_fallbacks"
7875   with_fallback=$withval
7876 else
7877   with_fallback=
7878 fi;
7879 echo "$as_me:7879: result: $with_fallback" >&5
7880 echo "${ECHO_T}$with_fallback" >&6
7881 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7882
7883 echo "$as_me:7883: checking if you want modern xterm or antique" >&5
7884 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7885
7886 # Check whether --with-xterm-new or --without-xterm-new was given.
7887 if test "${with_xterm_new+set}" = set; then
7888   withval="$with_xterm_new"
7889   with_xterm_new=$withval
7890 else
7891   with_xterm_new=yes
7892 fi;
7893 case $with_xterm_new in
7894 (no) with_xterm_new=xterm-old;;
7895 (*)      with_xterm_new=xterm-new;;
7896 esac
7897 echo "$as_me:7897: result: $with_xterm_new" >&5
7898 echo "${ECHO_T}$with_xterm_new" >&6
7899 WHICH_XTERM=$with_xterm_new
7900
7901 echo "$as_me:7901: checking if xterm backspace sends BS or DEL" >&5
7902 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7903
7904 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7905 if test "${with_xterm_kbs+set}" = set; then
7906   withval="$with_xterm_kbs"
7907   with_xterm_kbs=$withval
7908 else
7909   with_xterm_kbs=BS
7910 fi;
7911 case x$with_xterm_kbs in
7912 (xyes|xno|xBS|xbs|x8)
7913         with_xterm_kbs=BS
7914         ;;
7915 (xDEL|xdel|x127)
7916         with_xterm_kbs=DEL
7917         ;;
7918 (*)
7919         with_xterm_kbs=$withval
7920         ;;
7921 esac
7922 echo "$as_me:7922: result: $with_xterm_kbs" >&5
7923 echo "${ECHO_T}$with_xterm_kbs" >&6
7924 XTERM_KBS=$with_xterm_kbs
7925
7926 MAKE_TERMINFO=
7927 if test "$use_database" = no ; then
7928         TERMINFO="${datadir}/terminfo"
7929         MAKE_TERMINFO="#"
7930 else
7931
7932 echo "$as_me:7932: checking for list of terminfo directories" >&5
7933 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7934
7935 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7936 if test "${with_terminfo_dirs+set}" = set; then
7937   withval="$with_terminfo_dirs"
7938
7939 else
7940   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7941 fi;
7942 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7943 cf_dst_path=
7944 for cf_src_path in $withval
7945 do
7946
7947 if test "x$prefix" != xNONE; then
7948         cf_path_syntax="$prefix"
7949 else
7950         cf_path_syntax="$ac_default_prefix"
7951 fi
7952
7953 case ".$cf_src_path" in
7954 (.\$\(*\)*|.\'*\'*)
7955         ;;
7956 (..|./*|.\\*)
7957         ;;
7958 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7959         ;;
7960 (.\${*prefix}*|.\${*dir}*)
7961         eval cf_src_path="$cf_src_path"
7962         case ".$cf_src_path" in
7963         (.NONE/*)
7964                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7965                 ;;
7966         esac
7967         ;;
7968 (.no|.NONE/*)
7969         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7970         ;;
7971 (*)
7972         { { echo "$as_me:7972: error: expected a pathname, not \"$cf_src_path\"" >&5
7973 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7974    { (exit 1); exit 1; }; }
7975         ;;
7976 esac
7977
7978   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7979   cf_dst_path="${cf_dst_path}${cf_src_path}"
7980 done
7981 IFS="$ac_save_ifs"
7982
7983 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7984 # so we have to check/work around.  We do prefer the result of "eval"...
7985 eval cf_dst_eval="$cf_dst_path"
7986 case "x$cf_dst_eval" in
7987 (xNONE*)
7988         TERMINFO_DIRS=$cf_dst_path
7989         ;;
7990 (*)
7991         TERMINFO_DIRS="$cf_dst_eval"
7992         ;;
7993 esac
7994
7995 echo "$as_me:7995: result: $TERMINFO_DIRS" >&5
7996 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7997 test -n "$TERMINFO_DIRS" &&
7998 cat >>confdefs.h <<EOF
7999 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8000 EOF
8001
8002 echo "$as_me:8002: checking for default terminfo directory" >&5
8003 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8004
8005 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8006 if test "${with_default_terminfo_dir+set}" = set; then
8007   withval="$with_default_terminfo_dir"
8008
8009 else
8010   withval="${TERMINFO:-${datadir}/terminfo}"
8011 fi; if test -n "${datadir}/terminfo" ; then
8012
8013 if test "x$prefix" != xNONE; then
8014         cf_path_syntax="$prefix"
8015 else
8016         cf_path_syntax="$ac_default_prefix"
8017 fi
8018
8019 case ".$withval" in
8020 (.\$\(*\)*|.\'*\'*)
8021         ;;
8022 (..|./*|.\\*)
8023         ;;
8024 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8025         ;;
8026 (.\${*prefix}*|.\${*dir}*)
8027         eval withval="$withval"
8028         case ".$withval" in
8029         (.NONE/*)
8030                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8031                 ;;
8032         esac
8033         ;;
8034 (.no|.NONE/*)
8035         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8036         ;;
8037 (*)
8038         { { echo "$as_me:8038: error: expected a pathname, not \"$withval\"" >&5
8039 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8040    { (exit 1); exit 1; }; }
8041         ;;
8042 esac
8043
8044 fi
8045 eval TERMINFO="$withval"
8046
8047 echo "$as_me:8047: result: $TERMINFO" >&5
8048 echo "${ECHO_T}$TERMINFO" >&6
8049
8050 cat >>confdefs.h <<EOF
8051 #define TERMINFO "$TERMINFO"
8052 EOF
8053
8054 fi
8055
8056 ###     use option --disable-big-core to make tic run on small machines
8057 ###     We need 4Mb, check if we can allocate 50% more than that.
8058 echo "$as_me:8058: checking if big-core option selected" >&5
8059 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8060
8061 # Check whether --enable-big-core or --disable-big-core was given.
8062 if test "${enable_big_core+set}" = set; then
8063   enableval="$enable_big_core"
8064   with_big_core=$enableval
8065 else
8066   if test "$cross_compiling" = yes; then
8067   with_big_core=no
8068 else
8069   cat >conftest.$ac_ext <<_ACEOF
8070 #line 8070 "configure"
8071 #include "confdefs.h"
8072
8073 #include <stdlib.h>
8074 #include <string.h>
8075 int main() {
8076         unsigned long n = 6000000L;
8077         char *s = malloc(n);
8078         if (s != 0)
8079                 s[0] = s[n-1] = 0;
8080         ${cf_cv_main_return:-return}(s == 0);
8081 }
8082 _ACEOF
8083 rm -f conftest$ac_exeext
8084 if { (eval echo "$as_me:8084: \"$ac_link\"") >&5
8085   (eval $ac_link) 2>&5
8086   ac_status=$?
8087   echo "$as_me:8087: \$? = $ac_status" >&5
8088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8089   { (eval echo "$as_me:8089: \"$ac_try\"") >&5
8090   (eval $ac_try) 2>&5
8091   ac_status=$?
8092   echo "$as_me:8092: \$? = $ac_status" >&5
8093   (exit $ac_status); }; }; then
8094   with_big_core=yes
8095 else
8096   echo "$as_me: program exited with status $ac_status" >&5
8097 echo "$as_me: failed program was:" >&5
8098 cat conftest.$ac_ext >&5
8099 with_big_core=no
8100 fi
8101 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8102 fi
8103 fi;
8104 echo "$as_me:8104: result: $with_big_core" >&5
8105 echo "${ECHO_T}$with_big_core" >&6
8106 test "x$with_big_core" = "xyes" &&
8107 cat >>confdefs.h <<\EOF
8108 #define HAVE_BIG_CORE 1
8109 EOF
8110
8111 ### ISO C only guarantees 512-char strings, we have tables which load faster
8112 ### when constructed using "big" strings.  More than the C compiler, the awk
8113 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8114 echo "$as_me:8114: checking if big-strings option selected" >&5
8115 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8116
8117 # Check whether --enable-big-strings or --disable-big-strings was given.
8118 if test "${enable_big_strings+set}" = set; then
8119   enableval="$enable_big_strings"
8120   with_big_strings=$enableval
8121 else
8122
8123         case x$AWK in
8124         (x)
8125                 eval with_big_strings=no
8126                 ;;
8127         (*)
8128                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8129                         | $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
8130                         eval with_big_strings=yes
8131                 else
8132                         eval with_big_strings=no
8133                 fi
8134                 ;;
8135         esac
8136
8137 fi;
8138 echo "$as_me:8138: result: $with_big_strings" >&5
8139 echo "${ECHO_T}$with_big_strings" >&6
8140
8141 USE_BIG_STRINGS=0
8142 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8143
8144 ###     use option --enable-termcap to compile in the termcap fallback support
8145 echo "$as_me:8145: checking if you want termcap-fallback support" >&5
8146 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8147
8148 # Check whether --enable-termcap or --disable-termcap was given.
8149 if test "${enable_termcap+set}" = set; then
8150   enableval="$enable_termcap"
8151   with_termcap=$enableval
8152 else
8153   with_termcap=no
8154 fi;
8155 echo "$as_me:8155: result: $with_termcap" >&5
8156 echo "${ECHO_T}$with_termcap" >&6
8157
8158 NCURSES_USE_TERMCAP=0
8159 if test "x$with_termcap" != "xyes" ; then
8160         if test "$use_database" = no ; then
8161                 if test -z "$with_fallback" ; then
8162                         { { echo "$as_me:8162: error: You have disabled the database w/o specifying fallbacks" >&5
8163 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8164    { (exit 1); exit 1; }; }
8165                 fi
8166         fi
8167
8168 cat >>confdefs.h <<\EOF
8169 #define PURE_TERMINFO 1
8170 EOF
8171
8172 else
8173
8174         if test "$with_ticlib" != no ; then
8175                 { { echo "$as_me:8175: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8176 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8177    { (exit 1); exit 1; }; }
8178         fi
8179
8180         NCURSES_USE_TERMCAP=1
8181         echo "$as_me:8181: checking for list of termcap files" >&5
8182 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8183
8184 # Check whether --with-termpath or --without-termpath was given.
8185 if test "${with_termpath+set}" = set; then
8186   withval="$with_termpath"
8187
8188 else
8189   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8190 fi;
8191 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8192 cf_dst_path=
8193 for cf_src_path in $withval
8194 do
8195
8196 if test "x$prefix" != xNONE; then
8197         cf_path_syntax="$prefix"
8198 else
8199         cf_path_syntax="$ac_default_prefix"
8200 fi
8201
8202 case ".$cf_src_path" in
8203 (.\$\(*\)*|.\'*\'*)
8204         ;;
8205 (..|./*|.\\*)
8206         ;;
8207 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8208         ;;
8209 (.\${*prefix}*|.\${*dir}*)
8210         eval cf_src_path="$cf_src_path"
8211         case ".$cf_src_path" in
8212         (.NONE/*)
8213                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8214                 ;;
8215         esac
8216         ;;
8217 (.no|.NONE/*)
8218         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8219         ;;
8220 (*)
8221         { { echo "$as_me:8221: error: expected a pathname, not \"$cf_src_path\"" >&5
8222 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8223    { (exit 1); exit 1; }; }
8224         ;;
8225 esac
8226
8227   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8228   cf_dst_path="${cf_dst_path}${cf_src_path}"
8229 done
8230 IFS="$ac_save_ifs"
8231
8232 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8233 # so we have to check/work around.  We do prefer the result of "eval"...
8234 eval cf_dst_eval="$cf_dst_path"
8235 case "x$cf_dst_eval" in
8236 (xNONE*)
8237         TERMPATH=$cf_dst_path
8238         ;;
8239 (*)
8240         TERMPATH="$cf_dst_eval"
8241         ;;
8242 esac
8243
8244         echo "$as_me:8244: result: $TERMPATH" >&5
8245 echo "${ECHO_T}$TERMPATH" >&6
8246         test -n "$TERMPATH" &&
8247 cat >>confdefs.h <<EOF
8248 #define TERMPATH "$TERMPATH"
8249 EOF
8250
8251         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8252         echo "$as_me:8252: checking if fast termcap-loader is needed" >&5
8253 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8254
8255 # Check whether --enable-getcap or --disable-getcap was given.
8256 if test "${enable_getcap+set}" = set; then
8257   enableval="$enable_getcap"
8258   with_getcap=$enableval
8259 else
8260   with_getcap=no
8261 fi;
8262         echo "$as_me:8262: result: $with_getcap" >&5
8263 echo "${ECHO_T}$with_getcap" >&6
8264         test "x$with_getcap" = "xyes" &&
8265 cat >>confdefs.h <<\EOF
8266 #define USE_GETCAP 1
8267 EOF
8268
8269         echo "$as_me:8269: checking if translated termcaps will be cached in ~/.terminfo" >&5
8270 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8271
8272 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8273 if test "${enable_getcap_cache+set}" = set; then
8274   enableval="$enable_getcap_cache"
8275   with_getcap_cache=$enableval
8276 else
8277   with_getcap_cache=no
8278 fi;
8279         echo "$as_me:8279: result: $with_getcap_cache" >&5
8280 echo "${ECHO_T}$with_getcap_cache" >&6
8281         test "x$with_getcap_cache" = "xyes" &&
8282 cat >>confdefs.h <<\EOF
8283 #define USE_GETCAP_CACHE 1
8284 EOF
8285
8286 fi
8287
8288 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8289 echo "$as_me:8289: checking if ~/.terminfo is wanted" >&5
8290 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8291
8292 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8293 if test "${enable_home_terminfo+set}" = set; then
8294   enableval="$enable_home_terminfo"
8295   with_home_terminfo=$enableval
8296 else
8297   with_home_terminfo=yes
8298 fi;
8299 echo "$as_me:8299: result: $with_home_terminfo" >&5
8300 echo "${ECHO_T}$with_home_terminfo" >&6
8301 test "x$with_home_terminfo" = "xyes" &&
8302 cat >>confdefs.h <<\EOF
8303 #define USE_HOME_TERMINFO 1
8304 EOF
8305
8306 echo "$as_me:8306: checking if you want to use restricted environment when running as root" >&5
8307 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8308
8309 # Check whether --enable-root-environ or --disable-root-environ was given.
8310 if test "${enable_root_environ+set}" = set; then
8311   enableval="$enable_root_environ"
8312   with_root_environ=$enableval
8313 else
8314   with_root_environ=yes
8315 fi;
8316 echo "$as_me:8316: result: $with_root_environ" >&5
8317 echo "${ECHO_T}$with_root_environ" >&6
8318 test "x$with_root_environ" = xyes &&
8319 cat >>confdefs.h <<\EOF
8320 #define USE_ROOT_ENVIRON 1
8321 EOF
8322
8323 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8324 ###   to reduce storage requirements for the terminfo database.
8325
8326 for ac_header in \
8327 unistd.h \
8328
8329 do
8330 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8331 echo "$as_me:8331: checking for $ac_header" >&5
8332 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8333 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8334   echo $ECHO_N "(cached) $ECHO_C" >&6
8335 else
8336   cat >conftest.$ac_ext <<_ACEOF
8337 #line 8337 "configure"
8338 #include "confdefs.h"
8339 #include <$ac_header>
8340 _ACEOF
8341 if { (eval echo "$as_me:8341: \"$ac_cpp conftest.$ac_ext\"") >&5
8342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8343   ac_status=$?
8344   egrep -v '^ *\+' conftest.er1 >conftest.err
8345   rm -f conftest.er1
8346   cat conftest.err >&5
8347   echo "$as_me:8347: \$? = $ac_status" >&5
8348   (exit $ac_status); } >/dev/null; then
8349   if test -s conftest.err; then
8350     ac_cpp_err=$ac_c_preproc_warn_flag
8351   else
8352     ac_cpp_err=
8353   fi
8354 else
8355   ac_cpp_err=yes
8356 fi
8357 if test -z "$ac_cpp_err"; then
8358   eval "$as_ac_Header=yes"
8359 else
8360   echo "$as_me: failed program was:" >&5
8361   cat conftest.$ac_ext >&5
8362   eval "$as_ac_Header=no"
8363 fi
8364 rm -f conftest.err conftest.$ac_ext
8365 fi
8366 echo "$as_me:8366: result: `eval echo '${'$as_ac_Header'}'`" >&5
8367 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8369   cat >>confdefs.h <<EOF
8370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8371 EOF
8372
8373 fi
8374 done
8375
8376 for ac_func in \
8377         remove \
8378         unlink
8379 do
8380 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8381 echo "$as_me:8381: checking for $ac_func" >&5
8382 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8383 if eval "test \"\${$as_ac_var+set}\" = set"; then
8384   echo $ECHO_N "(cached) $ECHO_C" >&6
8385 else
8386   cat >conftest.$ac_ext <<_ACEOF
8387 #line 8387 "configure"
8388 #include "confdefs.h"
8389 /* System header to define __stub macros and hopefully few prototypes,
8390     which can conflict with char $ac_func (); below.  */
8391 #include <assert.h>
8392 /* Override any gcc2 internal prototype to avoid an error.  */
8393 #ifdef __cplusplus
8394 extern "C"
8395 #endif
8396 /* We use char because int might match the return type of a gcc2
8397    builtin and then its argument prototype would still apply.  */
8398 char $ac_func ();
8399 char (*f) ();
8400
8401 int
8402 main (void)
8403 {
8404 /* The GNU C library defines this for functions which it implements
8405     to always fail with ENOSYS.  Some functions are actually named
8406     something starting with __ and the normal name is an alias.  */
8407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8408 choke me
8409 #else
8410 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8411 #endif
8412
8413   ;
8414   return 0;
8415 }
8416 _ACEOF
8417 rm -f conftest.$ac_objext conftest$ac_exeext
8418 if { (eval echo "$as_me:8418: \"$ac_link\"") >&5
8419   (eval $ac_link) 2>&5
8420   ac_status=$?
8421   echo "$as_me:8421: \$? = $ac_status" >&5
8422   (exit $ac_status); } &&
8423          { ac_try='test -s conftest$ac_exeext'
8424   { (eval echo "$as_me:8424: \"$ac_try\"") >&5
8425   (eval $ac_try) 2>&5
8426   ac_status=$?
8427   echo "$as_me:8427: \$? = $ac_status" >&5
8428   (exit $ac_status); }; }; then
8429   eval "$as_ac_var=yes"
8430 else
8431   echo "$as_me: failed program was:" >&5
8432 cat conftest.$ac_ext >&5
8433 eval "$as_ac_var=no"
8434 fi
8435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8436 fi
8437 echo "$as_me:8437: result: `eval echo '${'$as_ac_var'}'`" >&5
8438 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8439 if test `eval echo '${'$as_ac_var'}'` = yes; then
8440   cat >>confdefs.h <<EOF
8441 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8442 EOF
8443
8444 fi
8445 done
8446
8447 if test "$cross_compiling" = yes ; then
8448
8449 for ac_func in \
8450                 link \
8451                 symlink
8452 do
8453 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8454 echo "$as_me:8454: checking for $ac_func" >&5
8455 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8456 if eval "test \"\${$as_ac_var+set}\" = set"; then
8457   echo $ECHO_N "(cached) $ECHO_C" >&6
8458 else
8459   cat >conftest.$ac_ext <<_ACEOF
8460 #line 8460 "configure"
8461 #include "confdefs.h"
8462 /* System header to define __stub macros and hopefully few prototypes,
8463     which can conflict with char $ac_func (); below.  */
8464 #include <assert.h>
8465 /* Override any gcc2 internal prototype to avoid an error.  */
8466 #ifdef __cplusplus
8467 extern "C"
8468 #endif
8469 /* We use char because int might match the return type of a gcc2
8470    builtin and then its argument prototype would still apply.  */
8471 char $ac_func ();
8472 char (*f) ();
8473
8474 int
8475 main (void)
8476 {
8477 /* The GNU C library defines this for functions which it implements
8478     to always fail with ENOSYS.  Some functions are actually named
8479     something starting with __ and the normal name is an alias.  */
8480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8481 choke me
8482 #else
8483 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8484 #endif
8485
8486   ;
8487   return 0;
8488 }
8489 _ACEOF
8490 rm -f conftest.$ac_objext conftest$ac_exeext
8491 if { (eval echo "$as_me:8491: \"$ac_link\"") >&5
8492   (eval $ac_link) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); } &&
8496          { ac_try='test -s conftest$ac_exeext'
8497   { (eval echo "$as_me:8497: \"$ac_try\"") >&5
8498   (eval $ac_try) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); }; }; then
8502   eval "$as_ac_var=yes"
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 eval "$as_ac_var=no"
8507 fi
8508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8509 fi
8510 echo "$as_me:8510: result: `eval echo '${'$as_ac_var'}'`" >&5
8511 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8512 if test `eval echo '${'$as_ac_var'}'` = yes; then
8513   cat >>confdefs.h <<EOF
8514 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8515 EOF
8516
8517 fi
8518 done
8519
8520 else
8521         echo "$as_me:8521: checking if link/symlink functions work" >&5
8522 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8523 if test "${cf_cv_link_funcs+set}" = set; then
8524   echo $ECHO_N "(cached) $ECHO_C" >&6
8525 else
8526
8527                 cf_cv_link_funcs=
8528                 for cf_func in link symlink ; do
8529                         if test "$cross_compiling" = yes; then
8530
8531                         eval 'ac_cv_func_'$cf_func'=error'
8532 else
8533   cat >conftest.$ac_ext <<_ACEOF
8534 #line 8534 "configure"
8535 #include "confdefs.h"
8536
8537 #include <sys/types.h>
8538 #include <sys/stat.h>
8539 #ifdef HAVE_UNISTD_H
8540 #include <unistd.h>
8541 #endif
8542 int main(void)
8543 {
8544         int fail = 0;
8545         char *src = "config.log";
8546         char *dst = "conftest.chk";
8547         struct stat src_sb;
8548         struct stat dst_sb;
8549
8550         stat(src, &src_sb);
8551         fail = ($cf_func("config.log", "conftest.chk") < 0)
8552             || (stat(dst, &dst_sb) < 0)
8553             || (dst_sb.st_mtime != src_sb.st_mtime);
8554 #ifdef HAVE_UNLINK
8555         unlink(dst);
8556 #else
8557         remove(dst);
8558 #endif
8559         ${cf_cv_main_return:-return} (fail);
8560 }
8561
8562 _ACEOF
8563 rm -f conftest$ac_exeext
8564 if { (eval echo "$as_me:8564: \"$ac_link\"") >&5
8565   (eval $ac_link) 2>&5
8566   ac_status=$?
8567   echo "$as_me:8567: \$? = $ac_status" >&5
8568   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8569   { (eval echo "$as_me:8569: \"$ac_try\"") >&5
8570   (eval $ac_try) 2>&5
8571   ac_status=$?
8572   echo "$as_me:8572: \$? = $ac_status" >&5
8573   (exit $ac_status); }; }; then
8574
8575                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8576                         eval 'ac_cv_func_'$cf_func'=yes'
8577 else
8578   echo "$as_me: program exited with status $ac_status" >&5
8579 echo "$as_me: failed program was:" >&5
8580 cat conftest.$ac_ext >&5
8581
8582                         eval 'ac_cv_func_'$cf_func'=no'
8583 fi
8584 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8585 fi
8586                 done
8587                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8588
8589 fi
8590 echo "$as_me:8590: result: $cf_cv_link_funcs" >&5
8591 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8592         test "$ac_cv_func_link"    = yes &&
8593 cat >>confdefs.h <<\EOF
8594 #define HAVE_LINK 1
8595 EOF
8596
8597         test "$ac_cv_func_symlink" = yes &&
8598 cat >>confdefs.h <<\EOF
8599 #define HAVE_SYMLINK 1
8600 EOF
8601
8602 fi
8603
8604 with_links=no
8605 with_symlinks=no
8606
8607 # soft links (symbolic links) are useful for some systems where hard links do
8608 # not work, or to make it simpler to copy terminfo trees around.
8609 if test "x$ac_cv_func_symlink" = xyes ; then
8610         echo "$as_me:8610: checking if tic should use symbolic links" >&5
8611 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8612
8613 # Check whether --enable-symlinks or --disable-symlinks was given.
8614 if test "${enable_symlinks+set}" = set; then
8615   enableval="$enable_symlinks"
8616   with_symlinks=$enableval
8617 else
8618   with_symlinks=no
8619 fi;
8620         echo "$as_me:8620: result: $with_symlinks" >&5
8621 echo "${ECHO_T}$with_symlinks" >&6
8622 fi
8623
8624 # If we have hard links and did not choose to use soft links instead, there is
8625 # no reason to make this choice optional - use the hard links.
8626 if test "$with_symlinks" = no ; then
8627         echo "$as_me:8627: checking if tic should use hard links" >&5
8628 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8629         if test "x$ac_cv_func_link" = xyes ; then
8630                 with_links=yes
8631         else
8632                 with_links=no
8633         fi
8634         echo "$as_me:8634: result: $with_links" >&5
8635 echo "${ECHO_T}$with_links" >&6
8636 fi
8637
8638 test "x$with_links" = xyes &&
8639 cat >>confdefs.h <<\EOF
8640 #define USE_LINKS 1
8641 EOF
8642
8643 test "x$with_symlinks" = xyes &&
8644 cat >>confdefs.h <<\EOF
8645 #define USE_SYMLINKS 1
8646 EOF
8647
8648 ###   use option --enable-broken-linker to force on use of broken-linker support
8649 echo "$as_me:8649: checking if you want broken-linker support code" >&5
8650 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8651
8652 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8653 if test "${enable_broken_linker+set}" = set; then
8654   enableval="$enable_broken_linker"
8655   with_broken_linker=$enableval
8656 else
8657   with_broken_linker=${BROKEN_LINKER:-no}
8658 fi;
8659 echo "$as_me:8659: result: $with_broken_linker" >&5
8660 echo "${ECHO_T}$with_broken_linker" >&6
8661
8662 BROKEN_LINKER=0
8663 if test "x$with_broken_linker" = xyes ; then
8664
8665 cat >>confdefs.h <<\EOF
8666 #define BROKEN_LINKER 1
8667 EOF
8668
8669         BROKEN_LINKER=1
8670 elif test "$DFT_LWR_MODEL" = shared ; then
8671         case $cf_cv_system_name in
8672         (cygwin*)
8673
8674 cat >>confdefs.h <<\EOF
8675 #define BROKEN_LINKER 1
8676 EOF
8677
8678                 BROKEN_LINKER=1
8679                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8680
8681 echo "${as_me:-configure}:8681: testing cygwin linker is broken anyway ..." 1>&5
8682
8683                 ;;
8684         esac
8685 fi
8686
8687 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8688 echo "$as_me:8688: checking if tputs should process BSD-style prefix padding" >&5
8689 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8690
8691 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8692 if test "${enable_bsdpad+set}" = set; then
8693   enableval="$enable_bsdpad"
8694   with_bsdpad=$enableval
8695 else
8696   with_bsdpad=no
8697 fi;
8698 echo "$as_me:8698: result: $with_bsdpad" >&5
8699 echo "${ECHO_T}$with_bsdpad" >&6
8700 test "x$with_bsdpad" = xyes &&
8701 cat >>confdefs.h <<\EOF
8702 #define BSD_TPUTS 1
8703 EOF
8704
8705 ###   use option --enable-widec to turn on use of wide-character support
8706 NCURSES_CH_T=chtype
8707 NCURSES_LIBUTF8=0
8708
8709 NEED_WCHAR_H=0
8710 NCURSES_MBSTATE_T=0
8711 NCURSES_WCHAR_T=0
8712 NCURSES_WINT_T=0
8713
8714 # Check to define _XOPEN_SOURCE "automatically"
8715 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8716
8717 cf_XOPEN_SOURCE=600
8718 cf_POSIX_C_SOURCE=199506L
8719 cf_xopen_source=
8720
8721 case $host_os in
8722 (aix[4-7]*)
8723         cf_xopen_source="-D_ALL_SOURCE"
8724         ;;
8725 (msys)
8726         cf_XOPEN_SOURCE=600
8727         ;;
8728 (darwin[0-8].*)
8729         cf_xopen_source="-D_APPLE_C_SOURCE"
8730         ;;
8731 (darwin*)
8732         cf_xopen_source="-D_DARWIN_C_SOURCE"
8733         cf_XOPEN_SOURCE=
8734         ;;
8735 (freebsd*|dragonfly*)
8736         # 5.x headers associate
8737         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8738         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8739         cf_POSIX_C_SOURCE=200112L
8740         cf_XOPEN_SOURCE=600
8741         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8742         ;;
8743 (hpux11*)
8744         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8745         ;;
8746 (hpux*)
8747         cf_xopen_source="-D_HPUX_SOURCE"
8748         ;;
8749 (irix[56].*)
8750         cf_xopen_source="-D_SGI_SOURCE"
8751         cf_XOPEN_SOURCE=
8752         ;;
8753 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8754
8755 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8756
8757 echo "$as_me:8757: checking if this is the GNU C library" >&5
8758 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8759 if test "${cf_cv_gnu_library+set}" = set; then
8760   echo $ECHO_N "(cached) $ECHO_C" >&6
8761 else
8762
8763 cat >conftest.$ac_ext <<_ACEOF
8764 #line 8764 "configure"
8765 #include "confdefs.h"
8766 #include <sys/types.h>
8767 int
8768 main (void)
8769 {
8770
8771         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8772                 return 0;
8773         #else
8774         #       error not GNU C library
8775         #endif
8776   ;
8777   return 0;
8778 }
8779 _ACEOF
8780 rm -f conftest.$ac_objext
8781 if { (eval echo "$as_me:8781: \"$ac_compile\"") >&5
8782   (eval $ac_compile) 2>&5
8783   ac_status=$?
8784   echo "$as_me:8784: \$? = $ac_status" >&5
8785   (exit $ac_status); } &&
8786          { ac_try='test -s conftest.$ac_objext'
8787   { (eval echo "$as_me:8787: \"$ac_try\"") >&5
8788   (eval $ac_try) 2>&5
8789   ac_status=$?
8790   echo "$as_me:8790: \$? = $ac_status" >&5
8791   (exit $ac_status); }; }; then
8792   cf_cv_gnu_library=yes
8793 else
8794   echo "$as_me: failed program was:" >&5
8795 cat conftest.$ac_ext >&5
8796 cf_cv_gnu_library=no
8797 fi
8798 rm -f conftest.$ac_objext conftest.$ac_ext
8799
8800 fi
8801 echo "$as_me:8801: result: $cf_cv_gnu_library" >&5
8802 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8803
8804 if test x$cf_cv_gnu_library = xyes; then
8805
8806         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8807         # was changed to help a little...
8808         echo "$as_me:8808: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8809 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8810 if test "${cf_cv_gnu_library_219+set}" = set; then
8811   echo $ECHO_N "(cached) $ECHO_C" >&6
8812 else
8813
8814                 cf_save="$CPPFLAGS"
8815
8816         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8817         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8818
8819                 cat >conftest.$ac_ext <<_ACEOF
8820 #line 8820 "configure"
8821 #include "confdefs.h"
8822 #include <sys/types.h>
8823 int
8824 main (void)
8825 {
8826
8827                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8828                                 return 0;
8829                         #else
8830                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8831                         #endif
8832   ;
8833   return 0;
8834 }
8835 _ACEOF
8836 rm -f conftest.$ac_objext
8837 if { (eval echo "$as_me:8837: \"$ac_compile\"") >&5
8838   (eval $ac_compile) 2>&5
8839   ac_status=$?
8840   echo "$as_me:8840: \$? = $ac_status" >&5
8841   (exit $ac_status); } &&
8842          { ac_try='test -s conftest.$ac_objext'
8843   { (eval echo "$as_me:8843: \"$ac_try\"") >&5
8844   (eval $ac_try) 2>&5
8845   ac_status=$?
8846   echo "$as_me:8846: \$? = $ac_status" >&5
8847   (exit $ac_status); }; }; then
8848   cf_cv_gnu_library_219=yes
8849 else
8850   echo "$as_me: failed program was:" >&5
8851 cat conftest.$ac_ext >&5
8852 cf_cv_gnu_library_219=no
8853 fi
8854 rm -f conftest.$ac_objext conftest.$ac_ext
8855                 CPPFLAGS="$cf_save"
8856
8857 fi
8858 echo "$as_me:8858: result: $cf_cv_gnu_library_219" >&5
8859 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8860
8861         if test "x$cf_cv_gnu_library_219" = xyes; then
8862                 cf_save="$CPPFLAGS"
8863                 echo "$as_me:8863: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8864 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8865 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8866   echo $ECHO_N "(cached) $ECHO_C" >&6
8867 else
8868
8869 cf_fix_cppflags=no
8870 cf_new_cflags=
8871 cf_new_cppflags=
8872 cf_new_extra_cppflags=
8873
8874 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8875 do
8876 case $cf_fix_cppflags in
8877 (no)
8878         case $cf_add_cflags in
8879         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8880                 case $cf_add_cflags in
8881                 (-D*)
8882                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8883
8884                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8885                                 && test -z "${cf_tst_cflags}" \
8886                                 && cf_fix_cppflags=yes
8887
8888                         if test $cf_fix_cppflags = yes ; then
8889
8890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8892
8893                                 continue
8894                         elif test "${cf_tst_cflags}" = "\"'" ; then
8895
8896         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8897         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8898
8899                                 continue
8900                         fi
8901                         ;;
8902                 esac
8903                 case "$CPPFLAGS" in
8904                 (*$cf_add_cflags)
8905                         ;;
8906                 (*)
8907                         case $cf_add_cflags in
8908                         (-D*)
8909                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8910
8911 CPPFLAGS=`echo "$CPPFLAGS" | \
8912         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8913                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8914
8915                                 ;;
8916                         esac
8917
8918         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8919         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8920
8921                         ;;
8922                 esac
8923                 ;;
8924         (*)
8925
8926         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8927         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8928
8929                 ;;
8930         esac
8931         ;;
8932 (yes)
8933
8934         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8935         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8936
8937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8938
8939         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8940                 && test -z "${cf_tst_cflags}" \
8941                 && cf_fix_cppflags=no
8942         ;;
8943 esac
8944 done
8945
8946 if test -n "$cf_new_cflags" ; then
8947
8948         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8949         CFLAGS="${CFLAGS}$cf_new_cflags"
8950
8951 fi
8952
8953 if test -n "$cf_new_cppflags" ; then
8954
8955         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8956         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8957
8958 fi
8959
8960 if test -n "$cf_new_extra_cppflags" ; then
8961
8962         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8963         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8964
8965 fi
8966
8967                         cat >conftest.$ac_ext <<_ACEOF
8968 #line 8968 "configure"
8969 #include "confdefs.h"
8970
8971                                 #include <limits.h>
8972                                 #include <sys/types.h>
8973
8974 int
8975 main (void)
8976 {
8977
8978                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
8979                                         return 0;
8980                                 #else
8981                                 #       error GNU C library is too old
8982                                 #endif
8983   ;
8984   return 0;
8985 }
8986 _ACEOF
8987 rm -f conftest.$ac_objext
8988 if { (eval echo "$as_me:8988: \"$ac_compile\"") >&5
8989   (eval $ac_compile) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit $ac_status); } &&
8993          { ac_try='test -s conftest.$ac_objext'
8994   { (eval echo "$as_me:8994: \"$ac_try\"") >&5
8995   (eval $ac_try) 2>&5
8996   ac_status=$?
8997   echo "$as_me:8997: \$? = $ac_status" >&5
8998   (exit $ac_status); }; }; then
8999   cf_cv_gnu_dftsrc_219=yes
9000 else
9001   echo "$as_me: failed program was:" >&5
9002 cat conftest.$ac_ext >&5
9003 cf_cv_gnu_dftsrc_219=no
9004 fi
9005 rm -f conftest.$ac_objext conftest.$ac_ext
9006
9007 fi
9008 echo "$as_me:9008: result: $cf_cv_gnu_dftsrc_219" >&5
9009 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9010                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9011         else
9012                 cf_cv_gnu_dftsrc_219=maybe
9013         fi
9014
9015         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9016
9017                 echo "$as_me:9017: checking if we must define _GNU_SOURCE" >&5
9018 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9019 if test "${cf_cv_gnu_source+set}" = set; then
9020   echo $ECHO_N "(cached) $ECHO_C" >&6
9021 else
9022
9023                 cat >conftest.$ac_ext <<_ACEOF
9024 #line 9024 "configure"
9025 #include "confdefs.h"
9026 #include <sys/types.h>
9027 int
9028 main (void)
9029 {
9030
9031                         #ifndef _XOPEN_SOURCE
9032                         #error  expected _XOPEN_SOURCE to be defined
9033                         #endif
9034   ;
9035   return 0;
9036 }
9037 _ACEOF
9038 rm -f conftest.$ac_objext
9039 if { (eval echo "$as_me:9039: \"$ac_compile\"") >&5
9040   (eval $ac_compile) 2>&5
9041   ac_status=$?
9042   echo "$as_me:9042: \$? = $ac_status" >&5
9043   (exit $ac_status); } &&
9044          { ac_try='test -s conftest.$ac_objext'
9045   { (eval echo "$as_me:9045: \"$ac_try\"") >&5
9046   (eval $ac_try) 2>&5
9047   ac_status=$?
9048   echo "$as_me:9048: \$? = $ac_status" >&5
9049   (exit $ac_status); }; }; then
9050   cf_cv_gnu_source=no
9051 else
9052   echo "$as_me: failed program was:" >&5
9053 cat conftest.$ac_ext >&5
9054 cf_save="$CPPFLAGS"
9055
9056 cf_fix_cppflags=no
9057 cf_new_cflags=
9058 cf_new_cppflags=
9059 cf_new_extra_cppflags=
9060
9061 for cf_add_cflags in -D_GNU_SOURCE
9062 do
9063 case $cf_fix_cppflags in
9064 (no)
9065         case $cf_add_cflags in
9066         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9067                 case $cf_add_cflags in
9068                 (-D*)
9069                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9070
9071                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9072                                 && test -z "${cf_tst_cflags}" \
9073                                 && cf_fix_cppflags=yes
9074
9075                         if test $cf_fix_cppflags = yes ; then
9076
9077         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9078         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9079
9080                                 continue
9081                         elif test "${cf_tst_cflags}" = "\"'" ; then
9082
9083         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9084         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9085
9086                                 continue
9087                         fi
9088                         ;;
9089                 esac
9090                 case "$CPPFLAGS" in
9091                 (*$cf_add_cflags)
9092                         ;;
9093                 (*)
9094                         case $cf_add_cflags in
9095                         (-D*)
9096                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9097
9098 CPPFLAGS=`echo "$CPPFLAGS" | \
9099         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9100                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9101
9102                                 ;;
9103                         esac
9104
9105         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9106         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9107
9108                         ;;
9109                 esac
9110                 ;;
9111         (*)
9112
9113         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9114         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9115
9116                 ;;
9117         esac
9118         ;;
9119 (yes)
9120
9121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9123
9124         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9125
9126         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9127                 && test -z "${cf_tst_cflags}" \
9128                 && cf_fix_cppflags=no
9129         ;;
9130 esac
9131 done
9132
9133 if test -n "$cf_new_cflags" ; then
9134
9135         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9136         CFLAGS="${CFLAGS}$cf_new_cflags"
9137
9138 fi
9139
9140 if test -n "$cf_new_cppflags" ; then
9141
9142         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9143         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9144
9145 fi
9146
9147 if test -n "$cf_new_extra_cppflags" ; then
9148
9149         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9150         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9151
9152 fi
9153
9154                          cat >conftest.$ac_ext <<_ACEOF
9155 #line 9155 "configure"
9156 #include "confdefs.h"
9157 #include <sys/types.h>
9158 int
9159 main (void)
9160 {
9161
9162                                 #ifdef _XOPEN_SOURCE
9163                                 #error  expected _XOPEN_SOURCE to be undefined
9164                                 #endif
9165   ;
9166   return 0;
9167 }
9168 _ACEOF
9169 rm -f conftest.$ac_objext
9170 if { (eval echo "$as_me:9170: \"$ac_compile\"") >&5
9171   (eval $ac_compile) 2>&5
9172   ac_status=$?
9173   echo "$as_me:9173: \$? = $ac_status" >&5
9174   (exit $ac_status); } &&
9175          { ac_try='test -s conftest.$ac_objext'
9176   { (eval echo "$as_me:9176: \"$ac_try\"") >&5
9177   (eval $ac_try) 2>&5
9178   ac_status=$?
9179   echo "$as_me:9179: \$? = $ac_status" >&5
9180   (exit $ac_status); }; }; then
9181   cf_cv_gnu_source=no
9182 else
9183   echo "$as_me: failed program was:" >&5
9184 cat conftest.$ac_ext >&5
9185 cf_cv_gnu_source=yes
9186 fi
9187 rm -f conftest.$ac_objext conftest.$ac_ext
9188                         CPPFLAGS="$cf_save"
9189
9190 fi
9191 rm -f conftest.$ac_objext conftest.$ac_ext
9192
9193 fi
9194 echo "$as_me:9194: result: $cf_cv_gnu_source" >&5
9195 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9196
9197                 if test "$cf_cv_gnu_source" = yes
9198                 then
9199                 echo "$as_me:9199: checking if we should also define _DEFAULT_SOURCE" >&5
9200 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9201 if test "${cf_cv_default_source+set}" = set; then
9202   echo $ECHO_N "(cached) $ECHO_C" >&6
9203 else
9204
9205         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9206         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9207
9208                         cat >conftest.$ac_ext <<_ACEOF
9209 #line 9209 "configure"
9210 #include "confdefs.h"
9211 #include <sys/types.h>
9212 int
9213 main (void)
9214 {
9215
9216                                 #ifdef _DEFAULT_SOURCE
9217                                 #error  expected _DEFAULT_SOURCE to be undefined
9218                                 #endif
9219   ;
9220   return 0;
9221 }
9222 _ACEOF
9223 rm -f conftest.$ac_objext
9224 if { (eval echo "$as_me:9224: \"$ac_compile\"") >&5
9225   (eval $ac_compile) 2>&5
9226   ac_status=$?
9227   echo "$as_me:9227: \$? = $ac_status" >&5
9228   (exit $ac_status); } &&
9229          { ac_try='test -s conftest.$ac_objext'
9230   { (eval echo "$as_me:9230: \"$ac_try\"") >&5
9231   (eval $ac_try) 2>&5
9232   ac_status=$?
9233   echo "$as_me:9233: \$? = $ac_status" >&5
9234   (exit $ac_status); }; }; then
9235   cf_cv_default_source=no
9236 else
9237   echo "$as_me: failed program was:" >&5
9238 cat conftest.$ac_ext >&5
9239 cf_cv_default_source=yes
9240 fi
9241 rm -f conftest.$ac_objext conftest.$ac_ext
9242
9243 fi
9244 echo "$as_me:9244: result: $cf_cv_default_source" >&5
9245 echo "${ECHO_T}$cf_cv_default_source" >&6
9246                         if test "$cf_cv_default_source" = yes
9247                         then
9248
9249         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9250         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9251
9252                         fi
9253                 fi
9254         fi
9255
9256 fi
9257
9258         ;;
9259 (minix*)
9260         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9261         ;;
9262 (mirbsd*)
9263         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9264         cf_XOPEN_SOURCE=
9265
9266 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9267
9268 cf_save_CFLAGS="$CFLAGS"
9269 cf_save_CPPFLAGS="$CPPFLAGS"
9270
9271 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9272         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9273                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9274
9275 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9276         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9277                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9278
9279 echo "$as_me:9279: checking if we should define _POSIX_C_SOURCE" >&5
9280 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9281 if test "${cf_cv_posix_c_source+set}" = set; then
9282   echo $ECHO_N "(cached) $ECHO_C" >&6
9283 else
9284
9285 echo "${as_me:-configure}:9285: testing if the symbol is already defined go no further ..." 1>&5
9286
9287         cat >conftest.$ac_ext <<_ACEOF
9288 #line 9288 "configure"
9289 #include "confdefs.h"
9290 #include <sys/types.h>
9291 int
9292 main (void)
9293 {
9294
9295 #ifndef _POSIX_C_SOURCE
9296 make an error
9297 #endif
9298   ;
9299   return 0;
9300 }
9301 _ACEOF
9302 rm -f conftest.$ac_objext
9303 if { (eval echo "$as_me:9303: \"$ac_compile\"") >&5
9304   (eval $ac_compile) 2>&5
9305   ac_status=$?
9306   echo "$as_me:9306: \$? = $ac_status" >&5
9307   (exit $ac_status); } &&
9308          { ac_try='test -s conftest.$ac_objext'
9309   { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310   (eval $ac_try) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); }; }; then
9314   cf_cv_posix_c_source=no
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 cat conftest.$ac_ext >&5
9318 cf_want_posix_source=no
9319          case .$cf_POSIX_C_SOURCE in
9320          (.[12]??*)
9321                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9322                 ;;
9323          (.2)
9324                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9325                 cf_want_posix_source=yes
9326                 ;;
9327          (.*)
9328                 cf_want_posix_source=yes
9329                 ;;
9330          esac
9331          if test "$cf_want_posix_source" = yes ; then
9332                 cat >conftest.$ac_ext <<_ACEOF
9333 #line 9333 "configure"
9334 #include "confdefs.h"
9335 #include <sys/types.h>
9336 int
9337 main (void)
9338 {
9339
9340 #ifdef _POSIX_SOURCE
9341 make an error
9342 #endif
9343   ;
9344   return 0;
9345 }
9346 _ACEOF
9347 rm -f conftest.$ac_objext
9348 if { (eval echo "$as_me:9348: \"$ac_compile\"") >&5
9349   (eval $ac_compile) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); } &&
9353          { ac_try='test -s conftest.$ac_objext'
9354   { (eval echo "$as_me:9354: \"$ac_try\"") >&5
9355   (eval $ac_try) 2>&5
9356   ac_status=$?
9357   echo "$as_me:9357: \$? = $ac_status" >&5
9358   (exit $ac_status); }; }; then
9359   :
9360 else
9361   echo "$as_me: failed program was:" >&5
9362 cat conftest.$ac_ext >&5
9363 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9364 fi
9365 rm -f conftest.$ac_objext conftest.$ac_ext
9366          fi
9367
9368 echo "${as_me:-configure}:9368: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9369
9370          CFLAGS="$cf_trim_CFLAGS"
9371          CPPFLAGS="$cf_trim_CPPFLAGS"
9372
9373         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9374         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9375
9376 echo "${as_me:-configure}:9376: testing if the second compile does not leave our definition intact error ..." 1>&5
9377
9378          cat >conftest.$ac_ext <<_ACEOF
9379 #line 9379 "configure"
9380 #include "confdefs.h"
9381 #include <sys/types.h>
9382 int
9383 main (void)
9384 {
9385
9386 #ifndef _POSIX_C_SOURCE
9387 make an error
9388 #endif
9389   ;
9390   return 0;
9391 }
9392 _ACEOF
9393 rm -f conftest.$ac_objext
9394 if { (eval echo "$as_me:9394: \"$ac_compile\"") >&5
9395   (eval $ac_compile) 2>&5
9396   ac_status=$?
9397   echo "$as_me:9397: \$? = $ac_status" >&5
9398   (exit $ac_status); } &&
9399          { ac_try='test -s conftest.$ac_objext'
9400   { (eval echo "$as_me:9400: \"$ac_try\"") >&5
9401   (eval $ac_try) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); }; }; then
9405   :
9406 else
9407   echo "$as_me: failed program was:" >&5
9408 cat conftest.$ac_ext >&5
9409 cf_cv_posix_c_source=no
9410 fi
9411 rm -f conftest.$ac_objext conftest.$ac_ext
9412          CFLAGS="$cf_save_CFLAGS"
9413          CPPFLAGS="$cf_save_CPPFLAGS"
9414
9415 fi
9416 rm -f conftest.$ac_objext conftest.$ac_ext
9417
9418 fi
9419 echo "$as_me:9419: result: $cf_cv_posix_c_source" >&5
9420 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9421
9422 if test "$cf_cv_posix_c_source" != no ; then
9423         CFLAGS="$cf_trim_CFLAGS"
9424         CPPFLAGS="$cf_trim_CPPFLAGS"
9425
9426 cf_fix_cppflags=no
9427 cf_new_cflags=
9428 cf_new_cppflags=
9429 cf_new_extra_cppflags=
9430
9431 for cf_add_cflags in $cf_cv_posix_c_source
9432 do
9433 case $cf_fix_cppflags in
9434 (no)
9435         case $cf_add_cflags in
9436         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9437                 case $cf_add_cflags in
9438                 (-D*)
9439                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9440
9441                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9442                                 && test -z "${cf_tst_cflags}" \
9443                                 && cf_fix_cppflags=yes
9444
9445                         if test $cf_fix_cppflags = yes ; then
9446
9447         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9448         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9449
9450                                 continue
9451                         elif test "${cf_tst_cflags}" = "\"'" ; then
9452
9453         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9454         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9455
9456                                 continue
9457                         fi
9458                         ;;
9459                 esac
9460                 case "$CPPFLAGS" in
9461                 (*$cf_add_cflags)
9462                         ;;
9463                 (*)
9464                         case $cf_add_cflags in
9465                         (-D*)
9466                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9467
9468 CPPFLAGS=`echo "$CPPFLAGS" | \
9469         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9470                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9471
9472                                 ;;
9473                         esac
9474
9475         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9476         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9477
9478                         ;;
9479                 esac
9480                 ;;
9481         (*)
9482
9483         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9484         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9485
9486                 ;;
9487         esac
9488         ;;
9489 (yes)
9490
9491         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9492         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9493
9494         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9495
9496         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9497                 && test -z "${cf_tst_cflags}" \
9498                 && cf_fix_cppflags=no
9499         ;;
9500 esac
9501 done
9502
9503 if test -n "$cf_new_cflags" ; then
9504
9505         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9506         CFLAGS="${CFLAGS}$cf_new_cflags"
9507
9508 fi
9509
9510 if test -n "$cf_new_cppflags" ; then
9511
9512         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9513         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9514
9515 fi
9516
9517 if test -n "$cf_new_extra_cppflags" ; then
9518
9519         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9520         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9521
9522 fi
9523
9524 fi
9525
9526         ;;
9527 (netbsd*)
9528         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9529         ;;
9530 (openbsd[4-9]*)
9531         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9532         cf_xopen_source="-D_BSD_SOURCE"
9533         cf_XOPEN_SOURCE=600
9534         ;;
9535 (openbsd*)
9536         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9537         ;;
9538 (osf[45]*)
9539         cf_xopen_source="-D_OSF_SOURCE"
9540         ;;
9541 (nto-qnx*)
9542         cf_xopen_source="-D_QNX_SOURCE"
9543         ;;
9544 (sco*)
9545         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9546         ;;
9547 (solaris2.*)
9548         cf_xopen_source="-D__EXTENSIONS__"
9549         cf_cv_xopen_source=broken
9550         ;;
9551 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9552         cf_XOPEN_SOURCE=
9553         cf_POSIX_C_SOURCE=
9554         ;;
9555 (*)
9556
9557 echo "$as_me:9557: checking if we should define _XOPEN_SOURCE" >&5
9558 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9559 if test "${cf_cv_xopen_source+set}" = set; then
9560   echo $ECHO_N "(cached) $ECHO_C" >&6
9561 else
9562
9563         cat >conftest.$ac_ext <<_ACEOF
9564 #line 9564 "configure"
9565 #include "confdefs.h"
9566
9567 #include <stdlib.h>
9568 #include <string.h>
9569 #include <sys/types.h>
9570
9571 int
9572 main (void)
9573 {
9574
9575 #ifndef _XOPEN_SOURCE
9576 make an error
9577 #endif
9578   ;
9579   return 0;
9580 }
9581 _ACEOF
9582 rm -f conftest.$ac_objext
9583 if { (eval echo "$as_me:9583: \"$ac_compile\"") >&5
9584   (eval $ac_compile) 2>&5
9585   ac_status=$?
9586   echo "$as_me:9586: \$? = $ac_status" >&5
9587   (exit $ac_status); } &&
9588          { ac_try='test -s conftest.$ac_objext'
9589   { (eval echo "$as_me:9589: \"$ac_try\"") >&5
9590   (eval $ac_try) 2>&5
9591   ac_status=$?
9592   echo "$as_me:9592: \$? = $ac_status" >&5
9593   (exit $ac_status); }; }; then
9594   cf_cv_xopen_source=no
9595 else
9596   echo "$as_me: failed program was:" >&5
9597 cat conftest.$ac_ext >&5
9598 cf_save="$CPPFLAGS"
9599
9600         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9601         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9602
9603          cat >conftest.$ac_ext <<_ACEOF
9604 #line 9604 "configure"
9605 #include "confdefs.h"
9606
9607 #include <stdlib.h>
9608 #include <string.h>
9609 #include <sys/types.h>
9610
9611 int
9612 main (void)
9613 {
9614
9615 #ifdef _XOPEN_SOURCE
9616 make an error
9617 #endif
9618   ;
9619   return 0;
9620 }
9621 _ACEOF
9622 rm -f conftest.$ac_objext
9623 if { (eval echo "$as_me:9623: \"$ac_compile\"") >&5
9624   (eval $ac_compile) 2>&5
9625   ac_status=$?
9626   echo "$as_me:9626: \$? = $ac_status" >&5
9627   (exit $ac_status); } &&
9628          { ac_try='test -s conftest.$ac_objext'
9629   { (eval echo "$as_me:9629: \"$ac_try\"") >&5
9630   (eval $ac_try) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); }; }; then
9634   cf_cv_xopen_source=no
9635 else
9636   echo "$as_me: failed program was:" >&5
9637 cat conftest.$ac_ext >&5
9638 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9639 fi
9640 rm -f conftest.$ac_objext conftest.$ac_ext
9641         CPPFLAGS="$cf_save"
9642
9643 fi
9644 rm -f conftest.$ac_objext conftest.$ac_ext
9645
9646 fi
9647 echo "$as_me:9647: result: $cf_cv_xopen_source" >&5
9648 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9649
9650 if test "$cf_cv_xopen_source" != no ; then
9651
9652 CFLAGS=`echo "$CFLAGS" | \
9653         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9654                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9655
9656 CPPFLAGS=`echo "$CPPFLAGS" | \
9657         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9658                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9659
9660         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9661
9662 cf_fix_cppflags=no
9663 cf_new_cflags=
9664 cf_new_cppflags=
9665 cf_new_extra_cppflags=
9666
9667 for cf_add_cflags in $cf_temp_xopen_source
9668 do
9669 case $cf_fix_cppflags in
9670 (no)
9671         case $cf_add_cflags in
9672         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9673                 case $cf_add_cflags in
9674                 (-D*)
9675                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9676
9677                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9678                                 && test -z "${cf_tst_cflags}" \
9679                                 && cf_fix_cppflags=yes
9680
9681                         if test $cf_fix_cppflags = yes ; then
9682
9683         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9684         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9685
9686                                 continue
9687                         elif test "${cf_tst_cflags}" = "\"'" ; then
9688
9689         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9690         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9691
9692                                 continue
9693                         fi
9694                         ;;
9695                 esac
9696                 case "$CPPFLAGS" in
9697                 (*$cf_add_cflags)
9698                         ;;
9699                 (*)
9700                         case $cf_add_cflags in
9701                         (-D*)
9702                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9703
9704 CPPFLAGS=`echo "$CPPFLAGS" | \
9705         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9706                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9707
9708                                 ;;
9709                         esac
9710
9711         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9712         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9713
9714                         ;;
9715                 esac
9716                 ;;
9717         (*)
9718
9719         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9720         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9721
9722                 ;;
9723         esac
9724         ;;
9725 (yes)
9726
9727         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9728         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9729
9730         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9731
9732         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9733                 && test -z "${cf_tst_cflags}" \
9734                 && cf_fix_cppflags=no
9735         ;;
9736 esac
9737 done
9738
9739 if test -n "$cf_new_cflags" ; then
9740
9741         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9742         CFLAGS="${CFLAGS}$cf_new_cflags"
9743
9744 fi
9745
9746 if test -n "$cf_new_cppflags" ; then
9747
9748         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9749         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9750
9751 fi
9752
9753 if test -n "$cf_new_extra_cppflags" ; then
9754
9755         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9756         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9757
9758 fi
9759
9760 fi
9761
9762 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9763
9764 cf_save_CFLAGS="$CFLAGS"
9765 cf_save_CPPFLAGS="$CPPFLAGS"
9766
9767 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9768         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9769                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9770
9771 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9772         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9773                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9774
9775 echo "$as_me:9775: checking if we should define _POSIX_C_SOURCE" >&5
9776 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9777 if test "${cf_cv_posix_c_source+set}" = set; then
9778   echo $ECHO_N "(cached) $ECHO_C" >&6
9779 else
9780
9781 echo "${as_me:-configure}:9781: testing if the symbol is already defined go no further ..." 1>&5
9782
9783         cat >conftest.$ac_ext <<_ACEOF
9784 #line 9784 "configure"
9785 #include "confdefs.h"
9786 #include <sys/types.h>
9787 int
9788 main (void)
9789 {
9790
9791 #ifndef _POSIX_C_SOURCE
9792 make an error
9793 #endif
9794   ;
9795   return 0;
9796 }
9797 _ACEOF
9798 rm -f conftest.$ac_objext
9799 if { (eval echo "$as_me:9799: \"$ac_compile\"") >&5
9800   (eval $ac_compile) 2>&5
9801   ac_status=$?
9802   echo "$as_me:9802: \$? = $ac_status" >&5
9803   (exit $ac_status); } &&
9804          { ac_try='test -s conftest.$ac_objext'
9805   { (eval echo "$as_me:9805: \"$ac_try\"") >&5
9806   (eval $ac_try) 2>&5
9807   ac_status=$?
9808   echo "$as_me:9808: \$? = $ac_status" >&5
9809   (exit $ac_status); }; }; then
9810   cf_cv_posix_c_source=no
9811 else
9812   echo "$as_me: failed program was:" >&5
9813 cat conftest.$ac_ext >&5
9814 cf_want_posix_source=no
9815          case .$cf_POSIX_C_SOURCE in
9816          (.[12]??*)
9817                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9818                 ;;
9819          (.2)
9820                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9821                 cf_want_posix_source=yes
9822                 ;;
9823          (.*)
9824                 cf_want_posix_source=yes
9825                 ;;
9826          esac
9827          if test "$cf_want_posix_source" = yes ; then
9828                 cat >conftest.$ac_ext <<_ACEOF
9829 #line 9829 "configure"
9830 #include "confdefs.h"
9831 #include <sys/types.h>
9832 int
9833 main (void)
9834 {
9835
9836 #ifdef _POSIX_SOURCE
9837 make an error
9838 #endif
9839   ;
9840   return 0;
9841 }
9842 _ACEOF
9843 rm -f conftest.$ac_objext
9844 if { (eval echo "$as_me:9844: \"$ac_compile\"") >&5
9845   (eval $ac_compile) 2>&5
9846   ac_status=$?
9847   echo "$as_me:9847: \$? = $ac_status" >&5
9848   (exit $ac_status); } &&
9849          { ac_try='test -s conftest.$ac_objext'
9850   { (eval echo "$as_me:9850: \"$ac_try\"") >&5
9851   (eval $ac_try) 2>&5
9852   ac_status=$?
9853   echo "$as_me:9853: \$? = $ac_status" >&5
9854   (exit $ac_status); }; }; then
9855   :
9856 else
9857   echo "$as_me: failed program was:" >&5
9858 cat conftest.$ac_ext >&5
9859 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9860 fi
9861 rm -f conftest.$ac_objext conftest.$ac_ext
9862          fi
9863
9864 echo "${as_me:-configure}:9864: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9865
9866          CFLAGS="$cf_trim_CFLAGS"
9867          CPPFLAGS="$cf_trim_CPPFLAGS"
9868
9869         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9870         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9871
9872 echo "${as_me:-configure}:9872: testing if the second compile does not leave our definition intact error ..." 1>&5
9873
9874          cat >conftest.$ac_ext <<_ACEOF
9875 #line 9875 "configure"
9876 #include "confdefs.h"
9877 #include <sys/types.h>
9878 int
9879 main (void)
9880 {
9881
9882 #ifndef _POSIX_C_SOURCE
9883 make an error
9884 #endif
9885   ;
9886   return 0;
9887 }
9888 _ACEOF
9889 rm -f conftest.$ac_objext
9890 if { (eval echo "$as_me:9890: \"$ac_compile\"") >&5
9891   (eval $ac_compile) 2>&5
9892   ac_status=$?
9893   echo "$as_me:9893: \$? = $ac_status" >&5
9894   (exit $ac_status); } &&
9895          { ac_try='test -s conftest.$ac_objext'
9896   { (eval echo "$as_me:9896: \"$ac_try\"") >&5
9897   (eval $ac_try) 2>&5
9898   ac_status=$?
9899   echo "$as_me:9899: \$? = $ac_status" >&5
9900   (exit $ac_status); }; }; then
9901   :
9902 else
9903   echo "$as_me: failed program was:" >&5
9904 cat conftest.$ac_ext >&5
9905 cf_cv_posix_c_source=no
9906 fi
9907 rm -f conftest.$ac_objext conftest.$ac_ext
9908          CFLAGS="$cf_save_CFLAGS"
9909          CPPFLAGS="$cf_save_CPPFLAGS"
9910
9911 fi
9912 rm -f conftest.$ac_objext conftest.$ac_ext
9913
9914 fi
9915 echo "$as_me:9915: result: $cf_cv_posix_c_source" >&5
9916 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9917
9918 if test "$cf_cv_posix_c_source" != no ; then
9919         CFLAGS="$cf_trim_CFLAGS"
9920         CPPFLAGS="$cf_trim_CPPFLAGS"
9921
9922 cf_fix_cppflags=no
9923 cf_new_cflags=
9924 cf_new_cppflags=
9925 cf_new_extra_cppflags=
9926
9927 for cf_add_cflags in $cf_cv_posix_c_source
9928 do
9929 case $cf_fix_cppflags in
9930 (no)
9931         case $cf_add_cflags in
9932         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9933                 case $cf_add_cflags in
9934                 (-D*)
9935                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9936
9937                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9938                                 && test -z "${cf_tst_cflags}" \
9939                                 && cf_fix_cppflags=yes
9940
9941                         if test $cf_fix_cppflags = yes ; then
9942
9943         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9944         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9945
9946                                 continue
9947                         elif test "${cf_tst_cflags}" = "\"'" ; then
9948
9949         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9950         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9951
9952                                 continue
9953                         fi
9954                         ;;
9955                 esac
9956                 case "$CPPFLAGS" in
9957                 (*$cf_add_cflags)
9958                         ;;
9959                 (*)
9960                         case $cf_add_cflags in
9961                         (-D*)
9962                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9963
9964 CPPFLAGS=`echo "$CPPFLAGS" | \
9965         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9966                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9967
9968                                 ;;
9969                         esac
9970
9971         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9972         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9973
9974                         ;;
9975                 esac
9976                 ;;
9977         (*)
9978
9979         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9980         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9981
9982                 ;;
9983         esac
9984         ;;
9985 (yes)
9986
9987         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9988         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9989
9990         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9991
9992         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9993                 && test -z "${cf_tst_cflags}" \
9994                 && cf_fix_cppflags=no
9995         ;;
9996 esac
9997 done
9998
9999 if test -n "$cf_new_cflags" ; then
10000
10001         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10002         CFLAGS="${CFLAGS}$cf_new_cflags"
10003
10004 fi
10005
10006 if test -n "$cf_new_cppflags" ; then
10007
10008         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10009         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10010
10011 fi
10012
10013 if test -n "$cf_new_extra_cppflags" ; then
10014
10015         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10016         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10017
10018 fi
10019
10020 fi
10021
10022         ;;
10023 esac
10024
10025 if test -n "$cf_xopen_source" ; then
10026
10027 cf_fix_cppflags=no
10028 cf_new_cflags=
10029 cf_new_cppflags=
10030 cf_new_extra_cppflags=
10031
10032 for cf_add_cflags in $cf_xopen_source
10033 do
10034 case $cf_fix_cppflags in
10035 (no)
10036         case $cf_add_cflags in
10037         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10038                 case $cf_add_cflags in
10039                 (-D*)
10040                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10041
10042                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10043                                 && test -z "${cf_tst_cflags}" \
10044                                 && cf_fix_cppflags=yes
10045
10046                         if test $cf_fix_cppflags = yes ; then
10047
10048         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10049         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10050
10051                                 continue
10052                         elif test "${cf_tst_cflags}" = "\"'" ; then
10053
10054         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10055         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056
10057                                 continue
10058                         fi
10059                         ;;
10060                 esac
10061                 case "$CPPFLAGS" in
10062                 (*$cf_add_cflags)
10063                         ;;
10064                 (*)
10065                         case $cf_add_cflags in
10066                         (-D*)
10067                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10068
10069 CPPFLAGS=`echo "$CPPFLAGS" | \
10070         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10071                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10072
10073                                 ;;
10074                         esac
10075
10076         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10077         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10078
10079                         ;;
10080                 esac
10081                 ;;
10082         (*)
10083
10084         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10085         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10086
10087                 ;;
10088         esac
10089         ;;
10090 (yes)
10091
10092         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10093         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10094
10095         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10096
10097         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10098                 && test -z "${cf_tst_cflags}" \
10099                 && cf_fix_cppflags=no
10100         ;;
10101 esac
10102 done
10103
10104 if test -n "$cf_new_cflags" ; then
10105         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10106
10107 echo "${as_me:-configure}:10107: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10108
10109         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10110         CFLAGS="${CFLAGS}$cf_new_cflags"
10111
10112 fi
10113
10114 if test -n "$cf_new_cppflags" ; then
10115         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10116
10117 echo "${as_me:-configure}:10117: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10118
10119         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10120         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10121
10122 fi
10123
10124 if test -n "$cf_new_extra_cppflags" ; then
10125         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10126
10127 echo "${as_me:-configure}:10127: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10128
10129         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10130         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10131
10132 fi
10133
10134 fi
10135
10136 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10137         echo "$as_me:10137: checking if _XOPEN_SOURCE really is set" >&5
10138 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10139         cat >conftest.$ac_ext <<_ACEOF
10140 #line 10140 "configure"
10141 #include "confdefs.h"
10142 #include <stdlib.h>
10143 int
10144 main (void)
10145 {
10146
10147 #ifndef _XOPEN_SOURCE
10148 make an error
10149 #endif
10150   ;
10151   return 0;
10152 }
10153 _ACEOF
10154 rm -f conftest.$ac_objext
10155 if { (eval echo "$as_me:10155: \"$ac_compile\"") >&5
10156   (eval $ac_compile) 2>&5
10157   ac_status=$?
10158   echo "$as_me:10158: \$? = $ac_status" >&5
10159   (exit $ac_status); } &&
10160          { ac_try='test -s conftest.$ac_objext'
10161   { (eval echo "$as_me:10161: \"$ac_try\"") >&5
10162   (eval $ac_try) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); }; }; then
10166   cf_XOPEN_SOURCE_set=yes
10167 else
10168   echo "$as_me: failed program was:" >&5
10169 cat conftest.$ac_ext >&5
10170 cf_XOPEN_SOURCE_set=no
10171 fi
10172 rm -f conftest.$ac_objext conftest.$ac_ext
10173         echo "$as_me:10173: result: $cf_XOPEN_SOURCE_set" >&5
10174 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10175         if test $cf_XOPEN_SOURCE_set = yes
10176         then
10177                 cat >conftest.$ac_ext <<_ACEOF
10178 #line 10178 "configure"
10179 #include "confdefs.h"
10180 #include <stdlib.h>
10181 int
10182 main (void)
10183 {
10184
10185 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10186 make an error
10187 #endif
10188   ;
10189   return 0;
10190 }
10191 _ACEOF
10192 rm -f conftest.$ac_objext
10193 if { (eval echo "$as_me:10193: \"$ac_compile\"") >&5
10194   (eval $ac_compile) 2>&5
10195   ac_status=$?
10196   echo "$as_me:10196: \$? = $ac_status" >&5
10197   (exit $ac_status); } &&
10198          { ac_try='test -s conftest.$ac_objext'
10199   { (eval echo "$as_me:10199: \"$ac_try\"") >&5
10200   (eval $ac_try) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit $ac_status); }; }; then
10204   cf_XOPEN_SOURCE_set_ok=yes
10205 else
10206   echo "$as_me: failed program was:" >&5
10207 cat conftest.$ac_ext >&5
10208 cf_XOPEN_SOURCE_set_ok=no
10209 fi
10210 rm -f conftest.$ac_objext conftest.$ac_ext
10211                 if test $cf_XOPEN_SOURCE_set_ok = no
10212                 then
10213                         { echo "$as_me:10213: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10214 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10215                 fi
10216         else
10217
10218 echo "$as_me:10218: checking if we should define _XOPEN_SOURCE" >&5
10219 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10220 if test "${cf_cv_xopen_source+set}" = set; then
10221   echo $ECHO_N "(cached) $ECHO_C" >&6
10222 else
10223
10224         cat >conftest.$ac_ext <<_ACEOF
10225 #line 10225 "configure"
10226 #include "confdefs.h"
10227
10228 #include <stdlib.h>
10229 #include <string.h>
10230 #include <sys/types.h>
10231
10232 int
10233 main (void)
10234 {
10235
10236 #ifndef _XOPEN_SOURCE
10237 make an error
10238 #endif
10239   ;
10240   return 0;
10241 }
10242 _ACEOF
10243 rm -f conftest.$ac_objext
10244 if { (eval echo "$as_me:10244: \"$ac_compile\"") >&5
10245   (eval $ac_compile) 2>&5
10246   ac_status=$?
10247   echo "$as_me:10247: \$? = $ac_status" >&5
10248   (exit $ac_status); } &&
10249          { ac_try='test -s conftest.$ac_objext'
10250   { (eval echo "$as_me:10250: \"$ac_try\"") >&5
10251   (eval $ac_try) 2>&5
10252   ac_status=$?
10253   echo "$as_me:10253: \$? = $ac_status" >&5
10254   (exit $ac_status); }; }; then
10255   cf_cv_xopen_source=no
10256 else
10257   echo "$as_me: failed program was:" >&5
10258 cat conftest.$ac_ext >&5
10259 cf_save="$CPPFLAGS"
10260
10261         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10262         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10263
10264          cat >conftest.$ac_ext <<_ACEOF
10265 #line 10265 "configure"
10266 #include "confdefs.h"
10267
10268 #include <stdlib.h>
10269 #include <string.h>
10270 #include <sys/types.h>
10271
10272 int
10273 main (void)
10274 {
10275
10276 #ifdef _XOPEN_SOURCE
10277 make an error
10278 #endif
10279   ;
10280   return 0;
10281 }
10282 _ACEOF
10283 rm -f conftest.$ac_objext
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285   (eval $ac_compile) 2>&5
10286   ac_status=$?
10287   echo "$as_me:10287: \$? = $ac_status" >&5
10288   (exit $ac_status); } &&
10289          { ac_try='test -s conftest.$ac_objext'
10290   { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit $ac_status); }; }; then
10295   cf_cv_xopen_source=no
10296 else
10297   echo "$as_me: failed program was:" >&5
10298 cat conftest.$ac_ext >&5
10299 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10300 fi
10301 rm -f conftest.$ac_objext conftest.$ac_ext
10302         CPPFLAGS="$cf_save"
10303
10304 fi
10305 rm -f conftest.$ac_objext conftest.$ac_ext
10306
10307 fi
10308 echo "$as_me:10308: result: $cf_cv_xopen_source" >&5
10309 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10310
10311 if test "$cf_cv_xopen_source" != no ; then
10312
10313 CFLAGS=`echo "$CFLAGS" | \
10314         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10315                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10316
10317 CPPFLAGS=`echo "$CPPFLAGS" | \
10318         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10319                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10320
10321         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10322
10323 cf_fix_cppflags=no
10324 cf_new_cflags=
10325 cf_new_cppflags=
10326 cf_new_extra_cppflags=
10327
10328 for cf_add_cflags in $cf_temp_xopen_source
10329 do
10330 case $cf_fix_cppflags in
10331 (no)
10332         case $cf_add_cflags in
10333         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10334                 case $cf_add_cflags in
10335                 (-D*)
10336                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10337
10338                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10339                                 && test -z "${cf_tst_cflags}" \
10340                                 && cf_fix_cppflags=yes
10341
10342                         if test $cf_fix_cppflags = yes ; then
10343
10344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10346
10347                                 continue
10348                         elif test "${cf_tst_cflags}" = "\"'" ; then
10349
10350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10352
10353                                 continue
10354                         fi
10355                         ;;
10356                 esac
10357                 case "$CPPFLAGS" in
10358                 (*$cf_add_cflags)
10359                         ;;
10360                 (*)
10361                         case $cf_add_cflags in
10362                         (-D*)
10363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10364
10365 CPPFLAGS=`echo "$CPPFLAGS" | \
10366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10368
10369                                 ;;
10370                         esac
10371
10372         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10373         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10374
10375                         ;;
10376                 esac
10377                 ;;
10378         (*)
10379
10380         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10381         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10382
10383                 ;;
10384         esac
10385         ;;
10386 (yes)
10387
10388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10390
10391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10392
10393         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10394                 && test -z "${cf_tst_cflags}" \
10395                 && cf_fix_cppflags=no
10396         ;;
10397 esac
10398 done
10399
10400 if test -n "$cf_new_cflags" ; then
10401
10402         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10403         CFLAGS="${CFLAGS}$cf_new_cflags"
10404
10405 fi
10406
10407 if test -n "$cf_new_cppflags" ; then
10408
10409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10410         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10411
10412 fi
10413
10414 if test -n "$cf_new_extra_cppflags" ; then
10415
10416         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10417         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10418
10419 fi
10420
10421 fi
10422
10423         fi
10424 fi
10425
10426 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10427
10428 # Work around breakage on OS X
10429
10430 echo "$as_me:10430: checking if SIGWINCH is defined" >&5
10431 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10432 if test "${cf_cv_define_sigwinch+set}" = set; then
10433   echo $ECHO_N "(cached) $ECHO_C" >&6
10434 else
10435
10436         cat >conftest.$ac_ext <<_ACEOF
10437 #line 10437 "configure"
10438 #include "confdefs.h"
10439
10440 #include <sys/types.h>
10441 #include <sys/signal.h>
10442
10443 int
10444 main (void)
10445 {
10446 int x = SIGWINCH
10447   ;
10448   return 0;
10449 }
10450 _ACEOF
10451 rm -f conftest.$ac_objext
10452 if { (eval echo "$as_me:10452: \"$ac_compile\"") >&5
10453   (eval $ac_compile) 2>&5
10454   ac_status=$?
10455   echo "$as_me:10455: \$? = $ac_status" >&5
10456   (exit $ac_status); } &&
10457          { ac_try='test -s conftest.$ac_objext'
10458   { (eval echo "$as_me:10458: \"$ac_try\"") >&5
10459   (eval $ac_try) 2>&5
10460   ac_status=$?
10461   echo "$as_me:10461: \$? = $ac_status" >&5
10462   (exit $ac_status); }; }; then
10463   cf_cv_define_sigwinch=yes
10464 else
10465   echo "$as_me: failed program was:" >&5
10466 cat conftest.$ac_ext >&5
10467 cat >conftest.$ac_ext <<_ACEOF
10468 #line 10468 "configure"
10469 #include "confdefs.h"
10470
10471 #undef _XOPEN_SOURCE
10472 #undef _POSIX_SOURCE
10473 #undef _POSIX_C_SOURCE
10474 #include <sys/types.h>
10475 #include <sys/signal.h>
10476
10477 int
10478 main (void)
10479 {
10480 int x = SIGWINCH
10481   ;
10482   return 0;
10483 }
10484 _ACEOF
10485 rm -f conftest.$ac_objext
10486 if { (eval echo "$as_me:10486: \"$ac_compile\"") >&5
10487   (eval $ac_compile) 2>&5
10488   ac_status=$?
10489   echo "$as_me:10489: \$? = $ac_status" >&5
10490   (exit $ac_status); } &&
10491          { ac_try='test -s conftest.$ac_objext'
10492   { (eval echo "$as_me:10492: \"$ac_try\"") >&5
10493   (eval $ac_try) 2>&5
10494   ac_status=$?
10495   echo "$as_me:10495: \$? = $ac_status" >&5
10496   (exit $ac_status); }; }; then
10497   cf_cv_define_sigwinch=maybe
10498 else
10499   echo "$as_me: failed program was:" >&5
10500 cat conftest.$ac_ext >&5
10501 cf_cv_define_sigwinch=no
10502 fi
10503 rm -f conftest.$ac_objext conftest.$ac_ext
10504
10505 fi
10506 rm -f conftest.$ac_objext conftest.$ac_ext
10507
10508 fi
10509 echo "$as_me:10509: result: $cf_cv_define_sigwinch" >&5
10510 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10511
10512 if test "$cf_cv_define_sigwinch" = maybe ; then
10513 echo "$as_me:10513: checking for actual SIGWINCH definition" >&5
10514 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10515 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10516   echo $ECHO_N "(cached) $ECHO_C" >&6
10517 else
10518
10519 cf_cv_fixup_sigwinch=unknown
10520 cf_sigwinch=32
10521 while test $cf_sigwinch != 1
10522 do
10523         cat >conftest.$ac_ext <<_ACEOF
10524 #line 10524 "configure"
10525 #include "confdefs.h"
10526
10527 #undef _XOPEN_SOURCE
10528 #undef _POSIX_SOURCE
10529 #undef _POSIX_C_SOURCE
10530 #include <sys/types.h>
10531 #include <sys/signal.h>
10532
10533 int
10534 main (void)
10535 {
10536
10537 #if SIGWINCH != $cf_sigwinch
10538 make an error
10539 #endif
10540 int x = SIGWINCH
10541   ;
10542   return 0;
10543 }
10544 _ACEOF
10545 rm -f conftest.$ac_objext
10546 if { (eval echo "$as_me:10546: \"$ac_compile\"") >&5
10547   (eval $ac_compile) 2>&5
10548   ac_status=$?
10549   echo "$as_me:10549: \$? = $ac_status" >&5
10550   (exit $ac_status); } &&
10551          { ac_try='test -s conftest.$ac_objext'
10552   { (eval echo "$as_me:10552: \"$ac_try\"") >&5
10553   (eval $ac_try) 2>&5
10554   ac_status=$?
10555   echo "$as_me:10555: \$? = $ac_status" >&5
10556   (exit $ac_status); }; }; then
10557   cf_cv_fixup_sigwinch=$cf_sigwinch
10558          break
10559 else
10560   echo "$as_me: failed program was:" >&5
10561 cat conftest.$ac_ext >&5
10562 fi
10563 rm -f conftest.$ac_objext conftest.$ac_ext
10564
10565 cf_sigwinch=`expr $cf_sigwinch - 1`
10566 done
10567
10568 fi
10569 echo "$as_me:10569: result: $cf_cv_fixup_sigwinch" >&5
10570 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10571
10572         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10573                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10574         fi
10575 fi
10576
10577 # Checks for CODESET support.
10578
10579 echo "$as_me:10579: checking for nl_langinfo and CODESET" >&5
10580 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10581 if test "${am_cv_langinfo_codeset+set}" = set; then
10582   echo $ECHO_N "(cached) $ECHO_C" >&6
10583 else
10584   cat >conftest.$ac_ext <<_ACEOF
10585 #line 10585 "configure"
10586 #include "confdefs.h"
10587 #include <langinfo.h>
10588 int
10589 main (void)
10590 {
10591 char* cs = nl_langinfo(CODESET);
10592   ;
10593   return 0;
10594 }
10595 _ACEOF
10596 rm -f conftest.$ac_objext conftest$ac_exeext
10597 if { (eval echo "$as_me:10597: \"$ac_link\"") >&5
10598   (eval $ac_link) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit $ac_status); } &&
10602          { ac_try='test -s conftest$ac_exeext'
10603   { (eval echo "$as_me:10603: \"$ac_try\"") >&5
10604   (eval $ac_try) 2>&5
10605   ac_status=$?
10606   echo "$as_me:10606: \$? = $ac_status" >&5
10607   (exit $ac_status); }; }; then
10608   am_cv_langinfo_codeset=yes
10609 else
10610   echo "$as_me: failed program was:" >&5
10611 cat conftest.$ac_ext >&5
10612 am_cv_langinfo_codeset=no
10613 fi
10614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10615
10616 fi
10617 echo "$as_me:10617: result: $am_cv_langinfo_codeset" >&5
10618 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10619         if test $am_cv_langinfo_codeset = yes; then
10620
10621 cat >>confdefs.h <<\EOF
10622 #define HAVE_LANGINFO_CODESET 1
10623 EOF
10624
10625         fi
10626
10627 # use these variables to work around a defect in gcc's fixincludes.
10628 NCURSES_OK_WCHAR_T=
10629 NCURSES_OK_WINT_T=
10630
10631 echo "$as_me:10631: checking if you want wide-character code" >&5
10632 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10633
10634 # Check whether --enable-widec or --disable-widec was given.
10635 if test "${enable_widec+set}" = set; then
10636   enableval="$enable_widec"
10637   with_widec=$enableval
10638 else
10639   with_widec=no
10640 fi;
10641 echo "$as_me:10641: result: $with_widec" >&5
10642 echo "${ECHO_T}$with_widec" >&6
10643
10644 NCURSES_WCWIDTH_GRAPHICS=1
10645
10646 if test "x$with_widec" = xyes ; then
10647         if test "x$disable_lib_suffixes" = xno ; then
10648                 LIB_SUFFIX="w${LIB_SUFFIX}"
10649         fi
10650
10651 cat >>confdefs.h <<\EOF
10652 #define USE_WIDEC_SUPPORT 1
10653 EOF
10654
10655 cat >>confdefs.h <<\EOF
10656 #define NCURSES_WIDECHAR 1
10657 EOF
10658
10659 for ac_header in \
10660 wchar.h \
10661 wctype.h \
10662
10663 do
10664 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10665 echo "$as_me:10665: checking for $ac_header" >&5
10666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10668   echo $ECHO_N "(cached) $ECHO_C" >&6
10669 else
10670   cat >conftest.$ac_ext <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10673 #include <$ac_header>
10674 _ACEOF
10675 if { (eval echo "$as_me:10675: \"$ac_cpp conftest.$ac_ext\"") >&5
10676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10677   ac_status=$?
10678   egrep -v '^ *\+' conftest.er1 >conftest.err
10679   rm -f conftest.er1
10680   cat conftest.err >&5
10681   echo "$as_me:10681: \$? = $ac_status" >&5
10682   (exit $ac_status); } >/dev/null; then
10683   if test -s conftest.err; then
10684     ac_cpp_err=$ac_c_preproc_warn_flag
10685   else
10686     ac_cpp_err=
10687   fi
10688 else
10689   ac_cpp_err=yes
10690 fi
10691 if test -z "$ac_cpp_err"; then
10692   eval "$as_ac_Header=yes"
10693 else
10694   echo "$as_me: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   eval "$as_ac_Header=no"
10697 fi
10698 rm -f conftest.err conftest.$ac_ext
10699 fi
10700 echo "$as_me:10700: result: `eval echo '${'$as_ac_Header'}'`" >&5
10701 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10702 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10703   cat >>confdefs.h <<EOF
10704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10705 EOF
10706
10707 fi
10708 done
10709
10710 echo "$as_me:10710: checking if wchar.h can be used as is" >&5
10711 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10712 if test "${cf_cv_wchar_h_okay+set}" = set; then
10713   echo $ECHO_N "(cached) $ECHO_C" >&6
10714 else
10715
10716 cat >conftest.$ac_ext <<_ACEOF
10717 #line 10717 "configure"
10718 #include "confdefs.h"
10719
10720 #include <stdlib.h>
10721 #ifdef HAVE_WCHAR_H
10722 #include <wchar.h>
10723 #endif
10724 #ifdef HAVE_WCTYPE_H
10725 #include <wctype.h>
10726 #endif
10727
10728 int
10729 main (void)
10730 {
10731
10732         wint_t foo = 0;
10733         int bar = iswpunct(foo)
10734   ;
10735   return 0;
10736 }
10737 _ACEOF
10738 rm -f conftest.$ac_objext
10739 if { (eval echo "$as_me:10739: \"$ac_compile\"") >&5
10740   (eval $ac_compile) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit $ac_status); } &&
10744          { ac_try='test -s conftest.$ac_objext'
10745   { (eval echo "$as_me:10745: \"$ac_try\"") >&5
10746   (eval $ac_try) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit $ac_status); }; }; then
10750   cf_cv_wchar_h_okay=yes
10751 else
10752   echo "$as_me: failed program was:" >&5
10753 cat conftest.$ac_ext >&5
10754 cf_cv_wchar_h_okay=no
10755 fi
10756 rm -f conftest.$ac_objext conftest.$ac_ext
10757 fi
10758 echo "$as_me:10758: result: $cf_cv_wchar_h_okay" >&5
10759 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10760
10761 if test $cf_cv_wchar_h_okay = no
10762 then
10763
10764 echo "$as_me:10764: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10765 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10766 cat >conftest.$ac_ext <<_ACEOF
10767 #line 10767 "configure"
10768 #include "confdefs.h"
10769 #include <sys/types.h>
10770
10771 int
10772 main (void)
10773 {
10774
10775 #ifndef _XOPEN_SOURCE_EXTENDED
10776 make an error
10777 #endif
10778   ;
10779   return 0;
10780 }
10781 _ACEOF
10782 rm -f conftest.$ac_objext
10783 if { (eval echo "$as_me:10783: \"$ac_compile\"") >&5
10784   (eval $ac_compile) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit $ac_status); } &&
10788          { ac_try='test -s conftest.$ac_objext'
10789   { (eval echo "$as_me:10789: \"$ac_try\"") >&5
10790   (eval $ac_try) 2>&5
10791   ac_status=$?
10792   echo "$as_me:10792: \$? = $ac_status" >&5
10793   (exit $ac_status); }; }; then
10794   cf_result=no
10795 else
10796   echo "$as_me: failed program was:" >&5
10797 cat conftest.$ac_ext >&5
10798 cf_result=yes
10799 fi
10800 rm -f conftest.$ac_objext conftest.$ac_ext
10801 echo "$as_me:10801: result: $cf_result" >&5
10802 echo "${ECHO_T}$cf_result" >&6
10803
10804 if test "$cf_result" = yes ; then
10805         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10806 elif test "x" != "x" ; then
10807         echo "$as_me:10807: checking checking for compatible value versus " >&5
10808 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10809         cat >conftest.$ac_ext <<_ACEOF
10810 #line 10810 "configure"
10811 #include "confdefs.h"
10812 #include <sys/types.h>
10813
10814 int
10815 main (void)
10816 {
10817
10818 #if _XOPEN_SOURCE_EXTENDED- < 0
10819 make an error
10820 #endif
10821   ;
10822   return 0;
10823 }
10824 _ACEOF
10825 rm -f conftest.$ac_objext
10826 if { (eval echo "$as_me:10826: \"$ac_compile\"") >&5
10827   (eval $ac_compile) 2>&5
10828   ac_status=$?
10829   echo "$as_me:10829: \$? = $ac_status" >&5
10830   (exit $ac_status); } &&
10831          { ac_try='test -s conftest.$ac_objext'
10832   { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:10835: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   cf_result=yes
10838 else
10839   echo "$as_me: failed program was:" >&5
10840 cat conftest.$ac_ext >&5
10841 cf_result=no
10842 fi
10843 rm -f conftest.$ac_objext conftest.$ac_ext
10844         echo "$as_me:10844: result: $cf_result" >&5
10845 echo "${ECHO_T}$cf_result" >&6
10846         if test "$cf_result" = no ; then
10847                 # perhaps we can override it - try...
10848                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10849         fi
10850 fi
10851
10852 fi
10853
10854 echo "$as_me:10854: checking if wcwidth agrees graphics are single-width" >&5
10855 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10856 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10857   echo $ECHO_N "(cached) $ECHO_C" >&6
10858 else
10859
10860 cat >conftest.in <<CF_EOF
10861 -       VT100 symbols
10862 0x250c  upper left corner
10863 0x2514  lower left corner
10864 0x2510  upper right corner
10865 0x2518  lower right corner
10866 0x251c  tee pointing left
10867 0x2524  tee pointing right
10868 0x2534  tee pointing up
10869 0x252c  tee pointing down
10870 0x2500  horizontal line
10871 0x2502  vertical line
10872 0x253c  large plus or crossover
10873 0x23ba  scan line 1
10874 0x23bd  scan line 9
10875 0x25c6  diamond
10876 0x2592  checker board (stipple)
10877 0x00b0  degree symbol
10878 0x00b1  plus/minus
10879 0x00b7  bullet
10880 -       Teletype 5410v1 symbols
10881 0x2190  arrow pointing left
10882 0x2192  arrow pointing right
10883 0x2193  arrow pointing down
10884 0x2191  arrow pointing up
10885 0x2592  board of squares
10886 0x2603  lantern symbol
10887 0x25ae  solid square block
10888 -       these defaults were invented for ncurses
10889 0x23bb  scan line 3
10890 0x23bc  scan line 7
10891 0x2264  less-than-or-equal-to
10892 0x2265  greater-than-or-equal-to
10893 0x03c0  greek pi
10894 0x2260  not-equal
10895 0x00a3  pound-sterling symbol
10896 -       thick-line-drawing
10897 0x250f  upper left corner
10898 0x2517  lower left corner
10899 0x2513  upper right corner
10900 0x251b  lower right corner
10901 0x2523  tee pointing left
10902 0x252b  tee pointing right
10903 0x253b  tee pointing up
10904 0x2533  tee pointing down
10905 0x2501  horizontal line
10906 0x2503  vertical line
10907 0x254b  large plus or crossover
10908 -       double-line-drawing
10909 0x2554  upper left corner
10910 0x255a  lower left corner
10911 0x2557  upper right corner
10912 0x255d  lower right corner
10913 0x2563  tee pointing left
10914 0x2560  tee pointing right
10915 0x2569  tee pointing up
10916 0x2566  tee pointing down
10917 0x2550  horizontal line
10918 0x2551  vertical line
10919 0x256c  large plus or crossover
10920 CF_EOF
10921 if test "$cross_compiling" = yes; then
10922   cf_cv_wcwidth_graphics=unknown
10923 else
10924   cat >conftest.$ac_ext <<_ACEOF
10925 #line 10925 "configure"
10926 #include "confdefs.h"
10927
10928 #include <locale.h>
10929 #include <stdio.h>
10930 #include <wchar.h>
10931
10932 #define MY_LEN 80
10933
10934 int
10935 main(void)
10936 {
10937         FILE *fp;
10938         int value;
10939         char buffer[MY_LEN + 1];
10940         char notes[MY_LEN + 1];
10941         int totals = 0;
10942         int passed = 0;
10943
10944         if (setlocale(LC_ALL, "en_US.UTF8") ||
10945                 setlocale(LC_ALL, "en_US.UTF-8") ||
10946                 setlocale(LC_ALL, "en_US.utf8") ||
10947                 setlocale(LC_ALL, "en_US.utf-8")) {
10948                 if ((fp = fopen("conftest.in", "r")) != 0) {
10949                         while (fgets(buffer, MY_LEN, fp) != 0) {
10950                                 if (*buffer == '-') {
10951                                         fprintf(stderr, "\t%s", buffer);
10952                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10953                                         ++totals;
10954                                         if (wcwidth(value) == 1)
10955                                                 ++passed;
10956                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10957                                 } else {
10958                                         fprintf(stderr, "?\t%s", buffer);
10959                                 }
10960                         }
10961                 }
10962         }
10963         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10964         return (totals == passed) ? 0 : 1;
10965 }
10966
10967 _ACEOF
10968 rm -f conftest$ac_exeext
10969 if { (eval echo "$as_me:10969: \"$ac_link\"") >&5
10970   (eval $ac_link) 2>&5
10971   ac_status=$?
10972   echo "$as_me:10972: \$? = $ac_status" >&5
10973   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10974   { (eval echo "$as_me:10974: \"$ac_try\"") >&5
10975   (eval $ac_try) 2>&5
10976   ac_status=$?
10977   echo "$as_me:10977: \$? = $ac_status" >&5
10978   (exit $ac_status); }; }; then
10979   cf_cv_wcwidth_graphics=yes
10980 else
10981   echo "$as_me: program exited with status $ac_status" >&5
10982 echo "$as_me: failed program was:" >&5
10983 cat conftest.$ac_ext >&5
10984 cf_cv_wcwidth_graphics=no
10985 fi
10986 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10987 fi
10988
10989 fi
10990 echo "$as_me:10990: result: $cf_cv_wcwidth_graphics" >&5
10991 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
10992
10993         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
10994
10995         # with_overwrite=no
10996         NCURSES_CH_T=cchar_t
10997
10998 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
10999 do
11000 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11001 echo "$as_me:11001: checking for $ac_func" >&5
11002 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11003 if eval "test \"\${$as_ac_var+set}\" = set"; then
11004   echo $ECHO_N "(cached) $ECHO_C" >&6
11005 else
11006   cat >conftest.$ac_ext <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009 /* System header to define __stub macros and hopefully few prototypes,
11010     which can conflict with char $ac_func (); below.  */
11011 #include <assert.h>
11012 /* Override any gcc2 internal prototype to avoid an error.  */
11013 #ifdef __cplusplus
11014 extern "C"
11015 #endif
11016 /* We use char because int might match the return type of a gcc2
11017    builtin and then its argument prototype would still apply.  */
11018 char $ac_func ();
11019 char (*f) ();
11020
11021 int
11022 main (void)
11023 {
11024 /* The GNU C library defines this for functions which it implements
11025     to always fail with ENOSYS.  Some functions are actually named
11026     something starting with __ and the normal name is an alias.  */
11027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11028 choke me
11029 #else
11030 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11031 #endif
11032
11033   ;
11034   return 0;
11035 }
11036 _ACEOF
11037 rm -f conftest.$ac_objext conftest$ac_exeext
11038 if { (eval echo "$as_me:11038: \"$ac_link\"") >&5
11039   (eval $ac_link) 2>&5
11040   ac_status=$?
11041   echo "$as_me:11041: \$? = $ac_status" >&5
11042   (exit $ac_status); } &&
11043          { ac_try='test -s conftest$ac_exeext'
11044   { (eval echo "$as_me:11044: \"$ac_try\"") >&5
11045   (eval $ac_try) 2>&5
11046   ac_status=$?
11047   echo "$as_me:11047: \$? = $ac_status" >&5
11048   (exit $ac_status); }; }; then
11049   eval "$as_ac_var=yes"
11050 else
11051   echo "$as_me: failed program was:" >&5
11052 cat conftest.$ac_ext >&5
11053 eval "$as_ac_var=no"
11054 fi
11055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11056 fi
11057 echo "$as_me:11057: result: `eval echo '${'$as_ac_var'}'`" >&5
11058 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11059 if test `eval echo '${'$as_ac_var'}'` = yes; then
11060   cat >>confdefs.h <<EOF
11061 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11062 EOF
11063
11064 fi
11065 done
11066
11067         if test "x$ac_cv_func_putwc" != xyes ; then
11068
11069 echo "$as_me:11069: checking for multibyte character support" >&5
11070 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11071 if test "${cf_cv_utf8_lib+set}" = set; then
11072   echo $ECHO_N "(cached) $ECHO_C" >&6
11073 else
11074
11075         cf_save_LIBS="$LIBS"
11076         cat >conftest.$ac_ext <<_ACEOF
11077 #line 11077 "configure"
11078 #include "confdefs.h"
11079
11080 #include <stdlib.h>
11081 int
11082 main (void)
11083 {
11084 putwc(0,0);
11085   ;
11086   return 0;
11087 }
11088 _ACEOF
11089 rm -f conftest.$ac_objext conftest$ac_exeext
11090 if { (eval echo "$as_me:11090: \"$ac_link\"") >&5
11091   (eval $ac_link) 2>&5
11092   ac_status=$?
11093   echo "$as_me:11093: \$? = $ac_status" >&5
11094   (exit $ac_status); } &&
11095          { ac_try='test -s conftest$ac_exeext'
11096   { (eval echo "$as_me:11096: \"$ac_try\"") >&5
11097   (eval $ac_try) 2>&5
11098   ac_status=$?
11099   echo "$as_me:11099: \$? = $ac_status" >&5
11100   (exit $ac_status); }; }; then
11101   cf_cv_utf8_lib=yes
11102 else
11103   echo "$as_me: failed program was:" >&5
11104 cat conftest.$ac_ext >&5
11105
11106 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11107 # will be set on completion of the AC_TRY_LINK below.
11108 cf_cv_header_path_utf8=
11109 cf_cv_library_path_utf8=
11110
11111 echo "${as_me:-configure}:11111: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11112
11113 cf_save_LIBS="$LIBS"
11114
11115 cat >conftest.$ac_ext <<_ACEOF
11116 #line 11116 "configure"
11117 #include "confdefs.h"
11118
11119 #include <libutf8.h>
11120 int
11121 main (void)
11122 {
11123 putwc(0,0);
11124   ;
11125   return 0;
11126 }
11127 _ACEOF
11128 rm -f conftest.$ac_objext conftest$ac_exeext
11129 if { (eval echo "$as_me:11129: \"$ac_link\"") >&5
11130   (eval $ac_link) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); } &&
11134          { ac_try='test -s conftest$ac_exeext'
11135   { (eval echo "$as_me:11135: \"$ac_try\"") >&5
11136   (eval $ac_try) 2>&5
11137   ac_status=$?
11138   echo "$as_me:11138: \$? = $ac_status" >&5
11139   (exit $ac_status); }; }; then
11140
11141         cf_cv_find_linkage_utf8=yes
11142         cf_cv_header_path_utf8=/usr/include
11143         cf_cv_library_path_utf8=/usr/lib
11144
11145 else
11146   echo "$as_me: failed program was:" >&5
11147 cat conftest.$ac_ext >&5
11148
11149 LIBS="-lutf8  $cf_save_LIBS"
11150
11151 cat >conftest.$ac_ext <<_ACEOF
11152 #line 11152 "configure"
11153 #include "confdefs.h"
11154
11155 #include <libutf8.h>
11156 int
11157 main (void)
11158 {
11159 putwc(0,0);
11160   ;
11161   return 0;
11162 }
11163 _ACEOF
11164 rm -f conftest.$ac_objext conftest$ac_exeext
11165 if { (eval echo "$as_me:11165: \"$ac_link\"") >&5
11166   (eval $ac_link) 2>&5
11167   ac_status=$?
11168   echo "$as_me:11168: \$? = $ac_status" >&5
11169   (exit $ac_status); } &&
11170          { ac_try='test -s conftest$ac_exeext'
11171   { (eval echo "$as_me:11171: \"$ac_try\"") >&5
11172   (eval $ac_try) 2>&5
11173   ac_status=$?
11174   echo "$as_me:11174: \$? = $ac_status" >&5
11175   (exit $ac_status); }; }; then
11176
11177         cf_cv_find_linkage_utf8=yes
11178         cf_cv_header_path_utf8=/usr/include
11179         cf_cv_library_path_utf8=/usr/lib
11180         cf_cv_library_file_utf8="-lutf8"
11181
11182 else
11183   echo "$as_me: failed program was:" >&5
11184 cat conftest.$ac_ext >&5
11185
11186         cf_cv_find_linkage_utf8=no
11187         LIBS="$cf_save_LIBS"
11188
11189         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11190
11191 echo "${as_me:-configure}:11191: testing find linkage for utf8 library ..." 1>&5
11192
11193 echo "${as_me:-configure}:11193: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11194
11195         cf_save_CPPFLAGS="$CPPFLAGS"
11196         cf_test_CPPFLAGS="$CPPFLAGS"
11197
11198 cf_search=
11199
11200 # collect the current set of include-directories from compiler flags
11201 cf_header_path_list=""
11202 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11203         for cf_header_path in $CPPFLAGS $CFLAGS
11204         do
11205                 case $cf_header_path in
11206                 (-I*)
11207                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11208
11209 test "x$cf_header_path" != "xNONE" && \
11210 test -d "$cf_header_path" && \
11211  {
11212         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11213         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11214         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11215         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11216         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11217         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11218 }
11219
11220                         cf_header_path_list="$cf_header_path_list $cf_search"
11221                         ;;
11222                 esac
11223         done
11224 fi
11225
11226 # add the variations for the package we are looking for
11227
11228 cf_search=
11229
11230 test "x$prefix" != "xNONE" && \
11231 test -d "$prefix" && \
11232  {
11233         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11234         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11235         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11236         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11237         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11238         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11239 }
11240
11241 for cf_subdir_prefix in \
11242         /usr \
11243         /usr/local \
11244         /usr/pkg \
11245         /opt \
11246         /opt/local \
11247         $HOME
11248 do
11249
11250 test "x$cf_subdir_prefix" != "x$prefix" && \
11251 test -d "$cf_subdir_prefix" && \
11252 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11253         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11254         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11255         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11256         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11257         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11258         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11259 }
11260
11261 done
11262
11263 test "$includedir" != NONE && \
11264 test "$includedir" != "/usr/include" && \
11265 test -d "$includedir" && {
11266         test -d $includedir &&    cf_search="$cf_search $includedir"
11267         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11268 }
11269
11270 test "$oldincludedir" != NONE && \
11271 test "$oldincludedir" != "/usr/include" && \
11272 test -d "$oldincludedir" && {
11273         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11274         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11275 }
11276
11277 cf_search="$cf_search $cf_header_path_list"
11278
11279         for cf_cv_header_path_utf8 in $cf_search
11280         do
11281                 if test -d $cf_cv_header_path_utf8 ; then
11282                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11283
11284 echo "${as_me:-configure}:11284: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11285
11286                         CPPFLAGS="$cf_save_CPPFLAGS"
11287
11288         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11289         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11290
11291                         cat >conftest.$ac_ext <<_ACEOF
11292 #line 11292 "configure"
11293 #include "confdefs.h"
11294
11295 #include <libutf8.h>
11296 int
11297 main (void)
11298 {
11299 putwc(0,0);
11300   ;
11301   return 0;
11302 }
11303 _ACEOF
11304 rm -f conftest.$ac_objext
11305 if { (eval echo "$as_me:11305: \"$ac_compile\"") >&5
11306   (eval $ac_compile) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); } &&
11310          { ac_try='test -s conftest.$ac_objext'
11311   { (eval echo "$as_me:11311: \"$ac_try\"") >&5
11312   (eval $ac_try) 2>&5
11313   ac_status=$?
11314   echo "$as_me:11314: \$? = $ac_status" >&5
11315   (exit $ac_status); }; }; then
11316
11317                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11318
11319 echo "${as_me:-configure}:11319: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11320
11321                                 cf_cv_find_linkage_utf8=maybe
11322                                 cf_test_CPPFLAGS="$CPPFLAGS"
11323                                 break
11324 else
11325   echo "$as_me: failed program was:" >&5
11326 cat conftest.$ac_ext >&5
11327
11328                                 CPPFLAGS="$cf_save_CPPFLAGS"
11329
11330 fi
11331 rm -f conftest.$ac_objext conftest.$ac_ext
11332                 fi
11333         done
11334
11335         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11336
11337 echo "${as_me:-configure}:11337: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11338
11339                 cf_save_LIBS="$LIBS"
11340                 cf_save_LDFLAGS="$LDFLAGS"
11341
11342                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11343
11344 cf_search=
11345 cf_library_path_list=""
11346 if test -n "${LDFLAGS}${LIBS}" ; then
11347         for cf_library_path in $LDFLAGS $LIBS
11348         do
11349                 case $cf_library_path in
11350                 (-L*)
11351                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11352
11353 test "x$cf_library_path" != "xNONE" && \
11354 test -d "$cf_library_path" && \
11355  {
11356         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11357         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11358         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11359         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11360         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11361         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11362 }
11363
11364                         cf_library_path_list="$cf_library_path_list $cf_search"
11365                         ;;
11366                 esac
11367         done
11368 fi
11369
11370 cf_search=
11371
11372 test "x$prefix" != "xNONE" && \
11373 test -d "$prefix" && \
11374  {
11375         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11376         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11377         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11378         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11379         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11380         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11381 }
11382
11383 for cf_subdir_prefix in \
11384         /usr \
11385         /usr/local \
11386         /usr/pkg \
11387         /opt \
11388         /opt/local \
11389         $HOME
11390 do
11391
11392 test "x$cf_subdir_prefix" != "x$prefix" && \
11393 test -d "$cf_subdir_prefix" && \
11394 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11395         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11396         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11397         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11398         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11399         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11400         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11401 }
11402
11403 done
11404
11405 cf_search="$cf_library_path_list $cf_search"
11406
11407                         for cf_cv_library_path_utf8 in $cf_search
11408                         do
11409                                 if test -d $cf_cv_library_path_utf8 ; then
11410                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11411
11412 echo "${as_me:-configure}:11412: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11413
11414                                         CPPFLAGS="$cf_test_CPPFLAGS"
11415                                         LIBS="-lutf8  $cf_save_LIBS"
11416                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11417                                         cat >conftest.$ac_ext <<_ACEOF
11418 #line 11418 "configure"
11419 #include "confdefs.h"
11420
11421 #include <libutf8.h>
11422 int
11423 main (void)
11424 {
11425 putwc(0,0);
11426   ;
11427   return 0;
11428 }
11429 _ACEOF
11430 rm -f conftest.$ac_objext conftest$ac_exeext
11431 if { (eval echo "$as_me:11431: \"$ac_link\"") >&5
11432   (eval $ac_link) 2>&5
11433   ac_status=$?
11434   echo "$as_me:11434: \$? = $ac_status" >&5
11435   (exit $ac_status); } &&
11436          { ac_try='test -s conftest$ac_exeext'
11437   { (eval echo "$as_me:11437: \"$ac_try\"") >&5
11438   (eval $ac_try) 2>&5
11439   ac_status=$?
11440   echo "$as_me:11440: \$? = $ac_status" >&5
11441   (exit $ac_status); }; }; then
11442
11443                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11444
11445 echo "${as_me:-configure}:11445: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11446
11447                                         cf_cv_find_linkage_utf8=yes
11448                                         cf_cv_library_file_utf8="-lutf8"
11449                                         break
11450 else
11451   echo "$as_me: failed program was:" >&5
11452 cat conftest.$ac_ext >&5
11453
11454                                         CPPFLAGS="$cf_save_CPPFLAGS"
11455                                         LIBS="$cf_save_LIBS"
11456                                         LDFLAGS="$cf_save_LDFLAGS"
11457
11458 fi
11459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11460                                 fi
11461                         done
11462                         CPPFLAGS="$cf_save_CPPFLAGS"
11463                         LDFLAGS="$cf_save_LDFLAGS"
11464                 fi
11465
11466         else
11467                 cf_cv_find_linkage_utf8=no
11468         fi
11469
11470 fi
11471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11472
11473 fi
11474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11475
11476 LIBS="$cf_save_LIBS"
11477
11478 if test "$cf_cv_find_linkage_utf8" = yes ; then
11479 cf_cv_utf8_lib=add-on
11480 else
11481 cf_cv_utf8_lib=no
11482 fi
11483
11484 fi
11485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11486 fi
11487 echo "$as_me:11487: result: $cf_cv_utf8_lib" >&5
11488 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11489
11490 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11491 # ncurses/ncursesw:
11492 if test "$cf_cv_utf8_lib" = "add-on" ; then
11493
11494 cat >>confdefs.h <<\EOF
11495 #define HAVE_LIBUTF8_H 1
11496 EOF
11497
11498 if test -n "$cf_cv_header_path_utf8" ; then
11499   for cf_add_incdir in $cf_cv_header_path_utf8
11500   do
11501         while test $cf_add_incdir != /usr/include
11502         do
11503           if test -d $cf_add_incdir
11504           then
11505                 cf_have_incdir=no
11506                 if test -n "$CFLAGS$CPPFLAGS" ; then
11507                   # a loop is needed to ensure we can add subdirs of existing dirs
11508                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11509                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11510                           cf_have_incdir=yes; break
11511                         fi
11512                   done
11513                 fi
11514
11515                 if test "$cf_have_incdir" = no ; then
11516                   if test "$cf_add_incdir" = /usr/local/include ; then
11517                         if test "$GCC" = yes
11518                         then
11519                           cf_save_CPPFLAGS=$CPPFLAGS
11520
11521         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11522         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11523
11524                           cat >conftest.$ac_ext <<_ACEOF
11525 #line 11525 "configure"
11526 #include "confdefs.h"
11527 #include <stdio.h>
11528 int
11529 main (void)
11530 {
11531 printf("Hello")
11532   ;
11533   return 0;
11534 }
11535 _ACEOF
11536 rm -f conftest.$ac_objext
11537 if { (eval echo "$as_me:11537: \"$ac_compile\"") >&5
11538   (eval $ac_compile) 2>&5
11539   ac_status=$?
11540   echo "$as_me:11540: \$? = $ac_status" >&5
11541   (exit $ac_status); } &&
11542          { ac_try='test -s conftest.$ac_objext'
11543   { (eval echo "$as_me:11543: \"$ac_try\"") >&5
11544   (eval $ac_try) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit $ac_status); }; }; then
11548   :
11549 else
11550   echo "$as_me: failed program was:" >&5
11551 cat conftest.$ac_ext >&5
11552 cf_have_incdir=yes
11553 fi
11554 rm -f conftest.$ac_objext conftest.$ac_ext
11555                           CPPFLAGS=$cf_save_CPPFLAGS
11556                         fi
11557                   fi
11558                 fi
11559
11560                 if test "$cf_have_incdir" = no ; then
11561                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11562
11563 echo "${as_me:-configure}:11563: testing adding $cf_add_incdir to include-path ..." 1>&5
11564
11565                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11566
11567                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11568                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11569                   cf_add_incdir="$cf_top_incdir"
11570                 else
11571                   break
11572                 fi
11573           else
11574                 break
11575           fi
11576         done
11577   done
11578 fi
11579
11580 if test -n "$cf_cv_library_path_utf8" ; then
11581         for cf_add_libdir in $cf_cv_library_path_utf8
11582         do
11583                 if test $cf_add_libdir = /usr/lib ; then
11584                         :
11585                 elif test -d $cf_add_libdir
11586                 then
11587                         cf_have_libdir=no
11588                         if test -n "$LDFLAGS$LIBS" ; then
11589                                 # a loop is needed to ensure we can add subdirs of existing dirs
11590                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11591                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11592                                                 cf_have_libdir=yes; break
11593                                         fi
11594                                 done
11595                         fi
11596                         if test "$cf_have_libdir" = no ; then
11597                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11598
11599 echo "${as_me:-configure}:11599: testing adding $cf_add_libdir to library-path ..." 1>&5
11600
11601                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11602                         fi
11603                 fi
11604         done
11605 fi
11606
11607 cf_add_libs="$cf_cv_library_file_utf8"
11608 # Filter out duplicates - this happens with badly-designed ".pc" files...
11609 for cf_add_1lib in $LIBS
11610 do
11611         for cf_add_2lib in $cf_add_libs
11612         do
11613                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11614                 then
11615                         cf_add_1lib=
11616                         break
11617                 fi
11618         done
11619         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11620 done
11621 LIBS="$cf_add_libs"
11622
11623 fi
11624
11625                 if test "$cf_cv_utf8_lib" != no ; then
11626                         NCURSES_LIBUTF8=1
11627                 fi
11628         fi
11629
11630 # This is needed on Tru64 5.0 to declare mbstate_t
11631 echo "$as_me:11631: checking if we must include wchar.h to declare mbstate_t" >&5
11632 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11633 if test "${cf_cv_mbstate_t+set}" = set; then
11634   echo $ECHO_N "(cached) $ECHO_C" >&6
11635 else
11636
11637 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640
11641 #include <stdlib.h>
11642 #include <stdarg.h>
11643 #include <stdio.h>
11644 #ifdef HAVE_LIBUTF8_H
11645 #include <libutf8.h>
11646 #endif
11647 int
11648 main (void)
11649 {
11650 mbstate_t state
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 rm -f conftest.$ac_objext
11656 if { (eval echo "$as_me:11656: \"$ac_compile\"") >&5
11657   (eval $ac_compile) 2>&5
11658   ac_status=$?
11659   echo "$as_me:11659: \$? = $ac_status" >&5
11660   (exit $ac_status); } &&
11661          { ac_try='test -s conftest.$ac_objext'
11662   { (eval echo "$as_me:11662: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:11665: \$? = $ac_status" >&5
11666   (exit $ac_status); }; }; then
11667   cf_cv_mbstate_t=no
11668 else
11669   echo "$as_me: failed program was:" >&5
11670 cat conftest.$ac_ext >&5
11671 cat >conftest.$ac_ext <<_ACEOF
11672 #line 11672 "configure"
11673 #include "confdefs.h"
11674
11675 #include <stdlib.h>
11676 #include <stdarg.h>
11677 #include <stdio.h>
11678 #include <wchar.h>
11679 #ifdef HAVE_LIBUTF8_H
11680 #include <libutf8.h>
11681 #endif
11682 int
11683 main (void)
11684 {
11685 mbstate_t value
11686   ;
11687   return 0;
11688 }
11689 _ACEOF
11690 rm -f conftest.$ac_objext
11691 if { (eval echo "$as_me:11691: \"$ac_compile\"") >&5
11692   (eval $ac_compile) 2>&5
11693   ac_status=$?
11694   echo "$as_me:11694: \$? = $ac_status" >&5
11695   (exit $ac_status); } &&
11696          { ac_try='test -s conftest.$ac_objext'
11697   { (eval echo "$as_me:11697: \"$ac_try\"") >&5
11698   (eval $ac_try) 2>&5
11699   ac_status=$?
11700   echo "$as_me:11700: \$? = $ac_status" >&5
11701   (exit $ac_status); }; }; then
11702   cf_cv_mbstate_t=yes
11703 else
11704   echo "$as_me: failed program was:" >&5
11705 cat conftest.$ac_ext >&5
11706 cf_cv_mbstate_t=unknown
11707 fi
11708 rm -f conftest.$ac_objext conftest.$ac_ext
11709 fi
11710 rm -f conftest.$ac_objext conftest.$ac_ext
11711 fi
11712 echo "$as_me:11712: result: $cf_cv_mbstate_t" >&5
11713 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11714
11715 if test "$cf_cv_mbstate_t" = yes ; then
11716
11717 cat >>confdefs.h <<\EOF
11718 #define NEED_WCHAR_H 1
11719 EOF
11720
11721         NEED_WCHAR_H=1
11722 fi
11723
11724 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11725 if test "$cf_cv_mbstate_t" = unknown ; then
11726         NCURSES_MBSTATE_T=1
11727 fi
11728
11729 # This is needed on Tru64 5.0 to declare wchar_t
11730 echo "$as_me:11730: checking if we must include wchar.h to declare wchar_t" >&5
11731 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11732 if test "${cf_cv_wchar_t+set}" = set; then
11733   echo $ECHO_N "(cached) $ECHO_C" >&6
11734 else
11735
11736 cat >conftest.$ac_ext <<_ACEOF
11737 #line 11737 "configure"
11738 #include "confdefs.h"
11739
11740 #include <stdlib.h>
11741 #include <stdarg.h>
11742 #include <stdio.h>
11743 #ifdef HAVE_LIBUTF8_H
11744 #include <libutf8.h>
11745 #endif
11746 int
11747 main (void)
11748 {
11749 wchar_t state
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f conftest.$ac_objext
11755 if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit $ac_status); } &&
11760          { ac_try='test -s conftest.$ac_objext'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit $ac_status); }; }; then
11766   cf_cv_wchar_t=no
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat conftest.$ac_ext >&5
11770 cat >conftest.$ac_ext <<_ACEOF
11771 #line 11771 "configure"
11772 #include "confdefs.h"
11773
11774 #include <stdlib.h>
11775 #include <stdarg.h>
11776 #include <stdio.h>
11777 #include <wchar.h>
11778 #ifdef HAVE_LIBUTF8_H
11779 #include <libutf8.h>
11780 #endif
11781 int
11782 main (void)
11783 {
11784 wchar_t value
11785   ;
11786   return 0;
11787 }
11788 _ACEOF
11789 rm -f conftest.$ac_objext
11790 if { (eval echo "$as_me:11790: \"$ac_compile\"") >&5
11791   (eval $ac_compile) 2>&5
11792   ac_status=$?
11793   echo "$as_me:11793: \$? = $ac_status" >&5
11794   (exit $ac_status); } &&
11795          { ac_try='test -s conftest.$ac_objext'
11796   { (eval echo "$as_me:11796: \"$ac_try\"") >&5
11797   (eval $ac_try) 2>&5
11798   ac_status=$?
11799   echo "$as_me:11799: \$? = $ac_status" >&5
11800   (exit $ac_status); }; }; then
11801   cf_cv_wchar_t=yes
11802 else
11803   echo "$as_me: failed program was:" >&5
11804 cat conftest.$ac_ext >&5
11805 cf_cv_wchar_t=unknown
11806 fi
11807 rm -f conftest.$ac_objext conftest.$ac_ext
11808 fi
11809 rm -f conftest.$ac_objext conftest.$ac_ext
11810 fi
11811 echo "$as_me:11811: result: $cf_cv_wchar_t" >&5
11812 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11813
11814 if test "$cf_cv_wchar_t" = yes ; then
11815
11816 cat >>confdefs.h <<\EOF
11817 #define NEED_WCHAR_H 1
11818 EOF
11819
11820         NEED_WCHAR_H=1
11821 fi
11822
11823 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11824 if test "$cf_cv_wchar_t" = unknown ; then
11825         NCURSES_WCHAR_T=1
11826 fi
11827
11828 # if we find wchar_t in either place, use substitution to provide a fallback.
11829 if test "$cf_cv_wchar_t" != unknown ; then
11830         NCURSES_OK_WCHAR_T=1
11831 fi
11832
11833 # This is needed on Tru64 5.0 to declare wint_t
11834 echo "$as_me:11834: checking if we must include wchar.h to declare wint_t" >&5
11835 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11836 if test "${cf_cv_wint_t+set}" = set; then
11837   echo $ECHO_N "(cached) $ECHO_C" >&6
11838 else
11839
11840 cat >conftest.$ac_ext <<_ACEOF
11841 #line 11841 "configure"
11842 #include "confdefs.h"
11843
11844 #include <stdlib.h>
11845 #include <stdarg.h>
11846 #include <stdio.h>
11847 #ifdef HAVE_LIBUTF8_H
11848 #include <libutf8.h>
11849 #endif
11850 int
11851 main (void)
11852 {
11853 wint_t state
11854   ;
11855   return 0;
11856 }
11857 _ACEOF
11858 rm -f conftest.$ac_objext
11859 if { (eval echo "$as_me:11859: \"$ac_compile\"") >&5
11860   (eval $ac_compile) 2>&5
11861   ac_status=$?
11862   echo "$as_me:11862: \$? = $ac_status" >&5
11863   (exit $ac_status); } &&
11864          { ac_try='test -s conftest.$ac_objext'
11865   { (eval echo "$as_me:11865: \"$ac_try\"") >&5
11866   (eval $ac_try) 2>&5
11867   ac_status=$?
11868   echo "$as_me:11868: \$? = $ac_status" >&5
11869   (exit $ac_status); }; }; then
11870   cf_cv_wint_t=no
11871 else
11872   echo "$as_me: failed program was:" >&5
11873 cat conftest.$ac_ext >&5
11874 cat >conftest.$ac_ext <<_ACEOF
11875 #line 11875 "configure"
11876 #include "confdefs.h"
11877
11878 #include <stdlib.h>
11879 #include <stdarg.h>
11880 #include <stdio.h>
11881 #include <wchar.h>
11882 #ifdef HAVE_LIBUTF8_H
11883 #include <libutf8.h>
11884 #endif
11885 int
11886 main (void)
11887 {
11888 wint_t value
11889   ;
11890   return 0;
11891 }
11892 _ACEOF
11893 rm -f conftest.$ac_objext
11894 if { (eval echo "$as_me:11894: \"$ac_compile\"") >&5
11895   (eval $ac_compile) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); } &&
11899          { ac_try='test -s conftest.$ac_objext'
11900   { (eval echo "$as_me:11900: \"$ac_try\"") >&5
11901   (eval $ac_try) 2>&5
11902   ac_status=$?
11903   echo "$as_me:11903: \$? = $ac_status" >&5
11904   (exit $ac_status); }; }; then
11905   cf_cv_wint_t=yes
11906 else
11907   echo "$as_me: failed program was:" >&5
11908 cat conftest.$ac_ext >&5
11909 cf_cv_wint_t=unknown
11910 fi
11911 rm -f conftest.$ac_objext conftest.$ac_ext
11912 fi
11913 rm -f conftest.$ac_objext conftest.$ac_ext
11914 fi
11915 echo "$as_me:11915: result: $cf_cv_wint_t" >&5
11916 echo "${ECHO_T}$cf_cv_wint_t" >&6
11917
11918 if test "$cf_cv_wint_t" = yes ; then
11919
11920 cat >>confdefs.h <<\EOF
11921 #define NEED_WCHAR_H 1
11922 EOF
11923
11924         NEED_WCHAR_H=1
11925 fi
11926
11927 # if we do not find wint_t in either place, use substitution to provide a fallback.
11928 if test "$cf_cv_wint_t" = unknown ; then
11929         NCURSES_WINT_T=1
11930 fi
11931
11932 # if we find wint_t in either place, use substitution to provide a fallback.
11933 if test "$cf_cv_wint_t" != unknown ; then
11934         NCURSES_OK_WINT_T=1
11935 fi
11936
11937         if test "$NCURSES_MBSTATE_T" != 0; then
11938
11939 cat >>confdefs.h <<\EOF
11940 #define NEED_MBSTATE_T_DEF 1
11941 EOF
11942
11943         fi
11944 fi
11945
11946 ###   use option --disable-lp64 to allow long chtype
11947 echo "$as_me:11947: checking whether to enable _LP64 definition in curses.h" >&5
11948 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11949
11950 # Check whether --enable-lp64 or --disable-lp64 was given.
11951 if test "${enable_lp64+set}" = set; then
11952   enableval="$enable_lp64"
11953   with_lp64=$enableval
11954 else
11955   with_lp64=$cf_dft_with_lp64
11956 fi;
11957 echo "$as_me:11957: result: $with_lp64" >&5
11958 echo "${ECHO_T}$with_lp64" >&6
11959
11960 if test "x$with_lp64" = xyes ; then
11961         cf_cv_enable_lp64=1
11962 else
11963         cf_cv_enable_lp64=0
11964 fi
11965
11966 # Check whether --enable-largefile or --disable-largefile was given.
11967 if test "${enable_largefile+set}" = set; then
11968   enableval="$enable_largefile"
11969
11970 fi;
11971 if test "$enable_largefile" != no; then
11972
11973   echo "$as_me:11973: checking for special C compiler options needed for large files" >&5
11974 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11975 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11976   echo $ECHO_N "(cached) $ECHO_C" >&6
11977 else
11978   ac_cv_sys_largefile_CC=no
11979      if test "$GCC" != yes; then
11980        ac_save_CC=$CC
11981        while :; do
11982          # IRIX 6.2 and later do not support large files by default,
11983          # so use the C compiler's -n32 option if that helps.
11984          cat >conftest.$ac_ext <<_ACEOF
11985 #line 11985 "configure"
11986 #include "confdefs.h"
11987 #include <sys/types.h>
11988  /* Check that off_t can represent 2**63 - 1 correctly.
11989     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11990     since some C++ compilers masquerading as C compilers
11991     incorrectly reject 9223372036854775807.  */
11992 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11993   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11994                        && LARGE_OFF_T % 2147483647 == 1)
11995                       ? 1 : -1];
11996 int
11997 main (void)
11998 {
11999
12000   ;
12001   return 0;
12002 }
12003 _ACEOF
12004          rm -f conftest.$ac_objext
12005 if { (eval echo "$as_me:12005: \"$ac_compile\"") >&5
12006   (eval $ac_compile) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); } &&
12010          { ac_try='test -s conftest.$ac_objext'
12011   { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012   (eval $ac_try) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); }; }; then
12016   break
12017 else
12018   echo "$as_me: failed program was:" >&5
12019 cat conftest.$ac_ext >&5
12020 fi
12021 rm -f conftest.$ac_objext
12022          CC="$CC -n32"
12023          rm -f conftest.$ac_objext
12024 if { (eval echo "$as_me:12024: \"$ac_compile\"") >&5
12025   (eval $ac_compile) 2>&5
12026   ac_status=$?
12027   echo "$as_me:12027: \$? = $ac_status" >&5
12028   (exit $ac_status); } &&
12029          { ac_try='test -s conftest.$ac_objext'
12030   { (eval echo "$as_me:12030: \"$ac_try\"") >&5
12031   (eval $ac_try) 2>&5
12032   ac_status=$?
12033   echo "$as_me:12033: \$? = $ac_status" >&5
12034   (exit $ac_status); }; }; then
12035   ac_cv_sys_largefile_CC=' -n32'; break
12036 else
12037   echo "$as_me: failed program was:" >&5
12038 cat conftest.$ac_ext >&5
12039 fi
12040 rm -f conftest.$ac_objext
12041          break
12042        done
12043        CC=$ac_save_CC
12044        rm -f conftest.$ac_ext
12045     fi
12046 fi
12047 echo "$as_me:12047: result: $ac_cv_sys_largefile_CC" >&5
12048 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12049   if test "$ac_cv_sys_largefile_CC" != no; then
12050     CC=$CC$ac_cv_sys_largefile_CC
12051   fi
12052
12053   echo "$as_me:12053: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12054 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12055 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12056   echo $ECHO_N "(cached) $ECHO_C" >&6
12057 else
12058   while :; do
12059   ac_cv_sys_file_offset_bits=no
12060   cat >conftest.$ac_ext <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12063 #include <sys/types.h>
12064  /* Check that off_t can represent 2**63 - 1 correctly.
12065     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12066     since some C++ compilers masquerading as C compilers
12067     incorrectly reject 9223372036854775807.  */
12068 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12069   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12070                        && LARGE_OFF_T % 2147483647 == 1)
12071                       ? 1 : -1];
12072 int
12073 main (void)
12074 {
12075
12076   ;
12077   return 0;
12078 }
12079 _ACEOF
12080 rm -f conftest.$ac_objext
12081 if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
12082   (eval $ac_compile) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit $ac_status); } &&
12086          { ac_try='test -s conftest.$ac_objext'
12087   { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit $ac_status); }; }; then
12092   break
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 cat conftest.$ac_ext >&5
12096 fi
12097 rm -f conftest.$ac_objext conftest.$ac_ext
12098   cat >conftest.$ac_ext <<_ACEOF
12099 #line 12099 "configure"
12100 #include "confdefs.h"
12101 #define _FILE_OFFSET_BITS 64
12102 #include <sys/types.h>
12103  /* Check that off_t can represent 2**63 - 1 correctly.
12104     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12105     since some C++ compilers masquerading as C compilers
12106     incorrectly reject 9223372036854775807.  */
12107 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12108   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12109                        && LARGE_OFF_T % 2147483647 == 1)
12110                       ? 1 : -1];
12111 int
12112 main (void)
12113 {
12114
12115   ;
12116   return 0;
12117 }
12118 _ACEOF
12119 rm -f conftest.$ac_objext
12120 if { (eval echo "$as_me:12120: \"$ac_compile\"") >&5
12121   (eval $ac_compile) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit $ac_status); } &&
12125          { ac_try='test -s conftest.$ac_objext'
12126   { (eval echo "$as_me:12126: \"$ac_try\"") >&5
12127   (eval $ac_try) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); }; }; then
12131   ac_cv_sys_file_offset_bits=64; break
12132 else
12133   echo "$as_me: failed program was:" >&5
12134 cat conftest.$ac_ext >&5
12135 fi
12136 rm -f conftest.$ac_objext conftest.$ac_ext
12137   break
12138 done
12139 fi
12140 echo "$as_me:12140: result: $ac_cv_sys_file_offset_bits" >&5
12141 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12142 if test "$ac_cv_sys_file_offset_bits" != no; then
12143
12144 cat >>confdefs.h <<EOF
12145 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12146 EOF
12147
12148 fi
12149 rm -rf conftest*
12150   echo "$as_me:12150: checking for _LARGE_FILES value needed for large files" >&5
12151 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12152 if test "${ac_cv_sys_large_files+set}" = set; then
12153   echo $ECHO_N "(cached) $ECHO_C" >&6
12154 else
12155   while :; do
12156   ac_cv_sys_large_files=no
12157   cat >conftest.$ac_ext <<_ACEOF
12158 #line 12158 "configure"
12159 #include "confdefs.h"
12160 #include <sys/types.h>
12161  /* Check that off_t can represent 2**63 - 1 correctly.
12162     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12163     since some C++ compilers masquerading as C compilers
12164     incorrectly reject 9223372036854775807.  */
12165 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12166   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12167                        && LARGE_OFF_T % 2147483647 == 1)
12168                       ? 1 : -1];
12169 int
12170 main (void)
12171 {
12172
12173   ;
12174   return 0;
12175 }
12176 _ACEOF
12177 rm -f conftest.$ac_objext
12178 if { (eval echo "$as_me:12178: \"$ac_compile\"") >&5
12179   (eval $ac_compile) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); } &&
12183          { ac_try='test -s conftest.$ac_objext'
12184   { (eval echo "$as_me:12184: \"$ac_try\"") >&5
12185   (eval $ac_try) 2>&5
12186   ac_status=$?
12187   echo "$as_me:12187: \$? = $ac_status" >&5
12188   (exit $ac_status); }; }; then
12189   break
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 cat conftest.$ac_ext >&5
12193 fi
12194 rm -f conftest.$ac_objext conftest.$ac_ext
12195   cat >conftest.$ac_ext <<_ACEOF
12196 #line 12196 "configure"
12197 #include "confdefs.h"
12198 #define _LARGE_FILES 1
12199 #include <sys/types.h>
12200  /* Check that off_t can represent 2**63 - 1 correctly.
12201     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12202     since some C++ compilers masquerading as C compilers
12203     incorrectly reject 9223372036854775807.  */
12204 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12205   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12206                        && LARGE_OFF_T % 2147483647 == 1)
12207                       ? 1 : -1];
12208 int
12209 main (void)
12210 {
12211
12212   ;
12213   return 0;
12214 }
12215 _ACEOF
12216 rm -f conftest.$ac_objext
12217 if { (eval echo "$as_me:12217: \"$ac_compile\"") >&5
12218   (eval $ac_compile) 2>&5
12219   ac_status=$?
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit $ac_status); } &&
12222          { ac_try='test -s conftest.$ac_objext'
12223   { (eval echo "$as_me:12223: \"$ac_try\"") >&5
12224   (eval $ac_try) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit $ac_status); }; }; then
12228   ac_cv_sys_large_files=1; break
12229 else
12230   echo "$as_me: failed program was:" >&5
12231 cat conftest.$ac_ext >&5
12232 fi
12233 rm -f conftest.$ac_objext conftest.$ac_ext
12234   break
12235 done
12236 fi
12237 echo "$as_me:12237: result: $ac_cv_sys_large_files" >&5
12238 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12239 if test "$ac_cv_sys_large_files" != no; then
12240
12241 cat >>confdefs.h <<EOF
12242 #define _LARGE_FILES $ac_cv_sys_large_files
12243 EOF
12244
12245 fi
12246 rm -rf conftest*
12247 fi
12248
12249         if test "$enable_largefile" != no ; then
12250         echo "$as_me:12250: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12251 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12252 if test "${ac_cv_sys_largefile_source+set}" = set; then
12253   echo $ECHO_N "(cached) $ECHO_C" >&6
12254 else
12255   while :; do
12256   ac_cv_sys_largefile_source=no
12257   cat >conftest.$ac_ext <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260 #include <stdio.h>
12261 int
12262 main (void)
12263 {
12264 return !fseeko;
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 rm -f conftest.$ac_objext
12270 if { (eval echo "$as_me:12270: \"$ac_compile\"") >&5
12271   (eval $ac_compile) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit $ac_status); } &&
12275          { ac_try='test -s conftest.$ac_objext'
12276   { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); }; }; then
12281   break
12282 else
12283   echo "$as_me: failed program was:" >&5
12284 cat conftest.$ac_ext >&5
12285 fi
12286 rm -f conftest.$ac_objext conftest.$ac_ext
12287   cat >conftest.$ac_ext <<_ACEOF
12288 #line 12288 "configure"
12289 #include "confdefs.h"
12290 #define _LARGEFILE_SOURCE 1
12291 #include <stdio.h>
12292 int
12293 main (void)
12294 {
12295 return !fseeko;
12296   ;
12297   return 0;
12298 }
12299 _ACEOF
12300 rm -f conftest.$ac_objext
12301 if { (eval echo "$as_me:12301: \"$ac_compile\"") >&5
12302   (eval $ac_compile) 2>&5
12303   ac_status=$?
12304   echo "$as_me:12304: \$? = $ac_status" >&5
12305   (exit $ac_status); } &&
12306          { ac_try='test -s conftest.$ac_objext'
12307   { (eval echo "$as_me:12307: \"$ac_try\"") >&5
12308   (eval $ac_try) 2>&5
12309   ac_status=$?
12310   echo "$as_me:12310: \$? = $ac_status" >&5
12311   (exit $ac_status); }; }; then
12312   ac_cv_sys_largefile_source=1; break
12313 else
12314   echo "$as_me: failed program was:" >&5
12315 cat conftest.$ac_ext >&5
12316 fi
12317 rm -f conftest.$ac_objext conftest.$ac_ext
12318   break
12319 done
12320 fi
12321 echo "$as_me:12321: result: $ac_cv_sys_largefile_source" >&5
12322 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12323 if test "$ac_cv_sys_largefile_source" != no; then
12324
12325 cat >>confdefs.h <<EOF
12326 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12327 EOF
12328
12329 fi
12330 rm -rf conftest*
12331
12332 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12333 # in glibc 2.1.3, but that breaks too many other things.
12334 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12335 echo "$as_me:12335: checking for fseeko" >&5
12336 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12337 if test "${ac_cv_func_fseeko+set}" = set; then
12338   echo $ECHO_N "(cached) $ECHO_C" >&6
12339 else
12340   cat >conftest.$ac_ext <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343 #include <stdio.h>
12344 int
12345 main (void)
12346 {
12347 return fseeko && fseeko (stdin, 0, 0);
12348   ;
12349   return 0;
12350 }
12351 _ACEOF
12352 rm -f conftest.$ac_objext conftest$ac_exeext
12353 if { (eval echo "$as_me:12353: \"$ac_link\"") >&5
12354   (eval $ac_link) 2>&5
12355   ac_status=$?
12356   echo "$as_me:12356: \$? = $ac_status" >&5
12357   (exit $ac_status); } &&
12358          { ac_try='test -s conftest$ac_exeext'
12359   { (eval echo "$as_me:12359: \"$ac_try\"") >&5
12360   (eval $ac_try) 2>&5
12361   ac_status=$?
12362   echo "$as_me:12362: \$? = $ac_status" >&5
12363   (exit $ac_status); }; }; then
12364   ac_cv_func_fseeko=yes
12365 else
12366   echo "$as_me: failed program was:" >&5
12367 cat conftest.$ac_ext >&5
12368 ac_cv_func_fseeko=no
12369 fi
12370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12371 fi
12372 echo "$as_me:12372: result: $ac_cv_func_fseeko" >&5
12373 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12374 if test $ac_cv_func_fseeko = yes; then
12375
12376 cat >>confdefs.h <<\EOF
12377 #define HAVE_FSEEKO 1
12378 EOF
12379
12380 fi
12381
12382         # Normally we would collect these definitions in the config.h,
12383         # but (like _XOPEN_SOURCE), some environments rely on having these
12384         # defined before any of the system headers are included.  Another
12385         # case comes up with C++, e.g., on AIX the compiler compiles the
12386         # header files by themselves before looking at the body files it is
12387         # told to compile.  For ncurses, those header files do not include
12388         # the config.h
12389         if test "$ac_cv_sys_large_files" != no
12390         then
12391
12392         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12393         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12394
12395         fi
12396         if test "$ac_cv_sys_largefile_source" != no
12397         then
12398
12399         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12400         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12401
12402         fi
12403         if test "$ac_cv_sys_file_offset_bits" != no
12404         then
12405
12406         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12407         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12408
12409         fi
12410
12411         echo "$as_me:12411: checking whether to use struct dirent64" >&5
12412 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12413 if test "${cf_cv_struct_dirent64+set}" = set; then
12414   echo $ECHO_N "(cached) $ECHO_C" >&6
12415 else
12416
12417                 cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12422 #include <sys/types.h>
12423 #include <dirent.h>
12424
12425 int
12426 main (void)
12427 {
12428
12429                 /* if transitional largefile support is setup, this is true */
12430                 extern struct dirent64 * readdir(DIR *);
12431                 struct dirent64 *x = readdir((DIR *)0);
12432                 struct dirent *y = readdir((DIR *)0);
12433                 int z = x - y;
12434
12435   ;
12436   return 0;
12437 }
12438 _ACEOF
12439 rm -f conftest.$ac_objext
12440 if { (eval echo "$as_me:12440: \"$ac_compile\"") >&5
12441   (eval $ac_compile) 2>&5
12442   ac_status=$?
12443   echo "$as_me:12443: \$? = $ac_status" >&5
12444   (exit $ac_status); } &&
12445          { ac_try='test -s conftest.$ac_objext'
12446   { (eval echo "$as_me:12446: \"$ac_try\"") >&5
12447   (eval $ac_try) 2>&5
12448   ac_status=$?
12449   echo "$as_me:12449: \$? = $ac_status" >&5
12450   (exit $ac_status); }; }; then
12451   cf_cv_struct_dirent64=yes
12452 else
12453   echo "$as_me: failed program was:" >&5
12454 cat conftest.$ac_ext >&5
12455 cf_cv_struct_dirent64=no
12456 fi
12457 rm -f conftest.$ac_objext conftest.$ac_ext
12458
12459 fi
12460 echo "$as_me:12460: result: $cf_cv_struct_dirent64" >&5
12461 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12462         test "$cf_cv_struct_dirent64" = yes &&
12463 cat >>confdefs.h <<\EOF
12464 #define HAVE_STRUCT_DIRENT64 1
12465 EOF
12466
12467         fi
12468
12469 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12470 echo "$as_me:12470: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12471 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12472
12473 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12474 if test "${enable_tparm_varargs+set}" = set; then
12475   enableval="$enable_tparm_varargs"
12476   with_tparm_varargs=$enableval
12477 else
12478   with_tparm_varargs=yes
12479 fi;
12480 echo "$as_me:12480: result: $with_tparm_varargs" >&5
12481 echo "${ECHO_T}$with_tparm_varargs" >&6
12482 NCURSES_TPARM_VARARGS=0
12483 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12484
12485 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12486 if test "$with_ticlib" != no ; then
12487 echo "$as_me:12487: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12488 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12489
12490 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12491 if test "${enable_tic_depends+set}" = set; then
12492   enableval="$enable_tic_depends"
12493   with_tic_depends=$enableval
12494 else
12495   with_tic_depends=yes
12496 fi;
12497 echo "$as_me:12497: result: $with_tic_depends" >&5
12498 echo "${ECHO_T}$with_tic_depends" >&6
12499 else
12500         with_tic_depends=no
12501 fi
12502
12503 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12504 echo "$as_me:12504: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12505 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12506
12507 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12508 if test "${enable_wattr_macros+set}" = set; then
12509   enableval="$enable_wattr_macros"
12510   with_wattr_macros=$enableval
12511 else
12512   with_wattr_macros=yes
12513 fi;
12514 if [ "x$with_wattr_macros" != xyes ]; then
12515         NCURSES_WATTR_MACROS=0
12516         echo "$as_me:12516: result: yes" >&5
12517 echo "${ECHO_T}yes" >&6
12518 else
12519         NCURSES_WATTR_MACROS=1
12520         echo "$as_me:12520: result: no" >&5
12521 echo "${ECHO_T}no" >&6
12522 fi
12523
12524 echo "$as_me:12524: checking for X11 rgb file" >&5
12525 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12526
12527 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12528 if test "${with_x11_rgb+set}" = set; then
12529   withval="$with_x11_rgb"
12530   RGB_PATH=$withval
12531 else
12532   RGB_PATH=auto
12533 fi;
12534
12535 if test "x$RGB_PATH" = xauto
12536 then
12537         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12538         for cf_path in \
12539                 /opt/local/share/X11/rgb.txt \
12540                 /opt/X11/share/X11/rgb.txt \
12541                 /usr/share/X11/rgb.txt \
12542                 /usr/X11/share/X11/rgb.txt \
12543                 /usr/X11/lib/X11/rgb.txt \
12544                 /usr/lib/X11/rgb.txt \
12545                 /etc/X11/rgb.txt \
12546                 /usr/pkg/lib/X11/rgb.txt \
12547                 /usr/X11R7/lib/X11/rgb.txt \
12548                 /usr/X11R6/lib/X11/rgb.txt \
12549                 /usr/X11R5/lib/X11/rgb.txt \
12550                 /usr/X11R4/lib/X11/rgb.txt \
12551                 /usr/local/lib/X11/rgb.txt \
12552                 /usr/local/share/X11/rgb.txt \
12553                 /usr/lib64/X11/rgb.txt
12554         do
12555                 if test -f "$cf_path" ; then
12556                         RGB_PATH="$cf_path"
12557                         break
12558                 fi
12559         done
12560 else
12561         cf_path=$RGB_PATH
12562
12563 if test "x$prefix" != xNONE; then
12564         cf_path_syntax="$prefix"
12565 else
12566         cf_path_syntax="$ac_default_prefix"
12567 fi
12568
12569 case ".$cf_path" in
12570 (.\$\(*\)*|.\'*\'*)
12571         ;;
12572 (..|./*|.\\*)
12573         ;;
12574 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12575         ;;
12576 (.\${*prefix}*|.\${*dir}*)
12577         eval cf_path="$cf_path"
12578         case ".$cf_path" in
12579         (.NONE/*)
12580                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12581                 ;;
12582         esac
12583         ;;
12584 (.no|.NONE/*)
12585         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12586         ;;
12587 (*)
12588         { { echo "$as_me:12588: error: expected a pathname, not \"$cf_path\"" >&5
12589 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12590    { (exit 1); exit 1; }; }
12591         ;;
12592 esac
12593
12594 fi
12595
12596 echo "$as_me:12596: result: $RGB_PATH" >&5
12597 echo "${ECHO_T}$RGB_PATH" >&6
12598
12599 cat >>confdefs.h <<EOF
12600 #define RGB_PATH "$cf_path"
12601 EOF
12602
12603 no_x11_rgb=
12604 if test "$RGB_PATH" = no
12605 then
12606         no_x11_rgb="#"
12607 fi
12608
12609 ###   use option --with-bool to override bool's type
12610 echo "$as_me:12610: checking for type of bool" >&5
12611 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12612
12613 # Check whether --with-bool or --without-bool was given.
12614 if test "${with_bool+set}" = set; then
12615   withval="$with_bool"
12616   NCURSES_BOOL="$withval"
12617 else
12618   NCURSES_BOOL=auto
12619 fi;
12620 echo "$as_me:12620: result: $NCURSES_BOOL" >&5
12621 echo "${ECHO_T}$NCURSES_BOOL" >&6
12622
12623 echo "$as_me:12623: checking for alternate terminal capabilities file" >&5
12624 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12625
12626 # Check whether --with-caps or --without-caps was given.
12627 if test "${with_caps+set}" = set; then
12628   withval="$with_caps"
12629   TERMINFO_CAPS=Caps.$withval
12630 else
12631   TERMINFO_CAPS=Caps
12632 fi;
12633 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12634 echo "$as_me:12634: result: $TERMINFO_CAPS" >&5
12635 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12636
12637 ###   use option --with-chtype to override chtype's type
12638 echo "$as_me:12638: checking for type of chtype" >&5
12639 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12640
12641 # Check whether --with-chtype or --without-chtype was given.
12642 if test "${with_chtype+set}" = set; then
12643   withval="$with_chtype"
12644   NCURSES_CHTYPE="$withval"
12645 else
12646   NCURSES_CHTYPE=$cf_dft_chtype
12647 fi;
12648 echo "$as_me:12648: result: $NCURSES_CHTYPE" >&5
12649 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12650
12651 ###   use option --with-ospeed to override ospeed's type
12652 echo "$as_me:12652: checking for type of ospeed" >&5
12653 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12654
12655 # Check whether --with-ospeed or --without-ospeed was given.
12656 if test "${with_ospeed+set}" = set; then
12657   withval="$with_ospeed"
12658   NCURSES_OSPEED="$withval"
12659 else
12660   NCURSES_OSPEED=short
12661 fi;
12662 echo "$as_me:12662: result: $NCURSES_OSPEED" >&5
12663 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12664
12665 ###   use option --with-mmask-t to override mmask_t's type
12666 echo "$as_me:12666: checking for type of mmask_t" >&5
12667 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12668
12669 # Check whether --with-mmask-t or --without-mmask-t was given.
12670 if test "${with_mmask_t+set}" = set; then
12671   withval="$with_mmask_t"
12672   NCURSES_MMASK_T="$withval"
12673 else
12674   NCURSES_MMASK_T=$cf_dft_mmask_t
12675 fi;
12676 echo "$as_me:12676: result: $NCURSES_MMASK_T" >&5
12677 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12678
12679 ###   use option --with-ccharw-max to override CCHARW_MAX size
12680 echo "$as_me:12680: checking for size CCHARW_MAX" >&5
12681 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12682
12683 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12684 if test "${with_ccharw_max+set}" = set; then
12685   withval="$with_ccharw_max"
12686   NCURSES_CCHARW_MAX="$withval"
12687 else
12688   NCURSES_CCHARW_MAX=5
12689 fi;
12690 echo "$as_me:12690: result: $NCURSES_CCHARW_MAX" >&5
12691 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12692
12693 echo "$as_me:12693: checking for ANSI C header files" >&5
12694 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12695 if test "${ac_cv_header_stdc+set}" = set; then
12696   echo $ECHO_N "(cached) $ECHO_C" >&6
12697 else
12698   cat >conftest.$ac_ext <<_ACEOF
12699 #line 12699 "configure"
12700 #include "confdefs.h"
12701 #include <stdlib.h>
12702 #include <stdarg.h>
12703 #include <string.h>
12704 #include <float.h>
12705
12706 _ACEOF
12707 if { (eval echo "$as_me:12707: \"$ac_cpp conftest.$ac_ext\"") >&5
12708   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12709   ac_status=$?
12710   egrep -v '^ *\+' conftest.er1 >conftest.err
12711   rm -f conftest.er1
12712   cat conftest.err >&5
12713   echo "$as_me:12713: \$? = $ac_status" >&5
12714   (exit $ac_status); } >/dev/null; then
12715   if test -s conftest.err; then
12716     ac_cpp_err=$ac_c_preproc_warn_flag
12717   else
12718     ac_cpp_err=
12719   fi
12720 else
12721   ac_cpp_err=yes
12722 fi
12723 if test -z "$ac_cpp_err"; then
12724   ac_cv_header_stdc=yes
12725 else
12726   echo "$as_me: failed program was:" >&5
12727   cat conftest.$ac_ext >&5
12728   ac_cv_header_stdc=no
12729 fi
12730 rm -f conftest.err conftest.$ac_ext
12731
12732 if test $ac_cv_header_stdc = yes; then
12733   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12734   cat >conftest.$ac_ext <<_ACEOF
12735 #line 12735 "configure"
12736 #include "confdefs.h"
12737 #include <string.h>
12738
12739 _ACEOF
12740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12741   egrep "memchr" >/dev/null 2>&1; then
12742   :
12743 else
12744   ac_cv_header_stdc=no
12745 fi
12746 rm -rf conftest*
12747
12748 fi
12749
12750 if test $ac_cv_header_stdc = yes; then
12751   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12752   cat >conftest.$ac_ext <<_ACEOF
12753 #line 12753 "configure"
12754 #include "confdefs.h"
12755 #include <stdlib.h>
12756
12757 _ACEOF
12758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12759   egrep "free" >/dev/null 2>&1; then
12760   :
12761 else
12762   ac_cv_header_stdc=no
12763 fi
12764 rm -rf conftest*
12765
12766 fi
12767
12768 if test $ac_cv_header_stdc = yes; then
12769   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12770   if test "$cross_compiling" = yes; then
12771   :
12772 else
12773   cat >conftest.$ac_ext <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776 #include <ctype.h>
12777 #if ((' ' & 0x0FF) == 0x020)
12778 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12779 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12780 #else
12781 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12782                      || ('j' <= (c) && (c) <= 'r') \
12783                      || ('s' <= (c) && (c) <= 'z'))
12784 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12785 #endif
12786
12787 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12788 int
12789 main (void)
12790 {
12791   int i;
12792   for (i = 0; i < 256; i++)
12793     if (XOR (islower (i), ISLOWER (i))
12794         || toupper (i) != TOUPPER (i))
12795       $ac_main_return(2);
12796   $ac_main_return (0);
12797 }
12798 _ACEOF
12799 rm -f conftest$ac_exeext
12800 if { (eval echo "$as_me:12800: \"$ac_link\"") >&5
12801   (eval $ac_link) 2>&5
12802   ac_status=$?
12803   echo "$as_me:12803: \$? = $ac_status" >&5
12804   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12805   { (eval echo "$as_me:12805: \"$ac_try\"") >&5
12806   (eval $ac_try) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit $ac_status); }; }; then
12810   :
12811 else
12812   echo "$as_me: program exited with status $ac_status" >&5
12813 echo "$as_me: failed program was:" >&5
12814 cat conftest.$ac_ext >&5
12815 ac_cv_header_stdc=no
12816 fi
12817 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12818 fi
12819 fi
12820 fi
12821 echo "$as_me:12821: result: $ac_cv_header_stdc" >&5
12822 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12823 if test $ac_cv_header_stdc = yes; then
12824
12825 cat >>confdefs.h <<\EOF
12826 #define STDC_HEADERS 1
12827 EOF
12828
12829 fi
12830
12831 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12832
12833 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12834                   inttypes.h stdint.h unistd.h
12835 do
12836 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12837 echo "$as_me:12837: checking for $ac_header" >&5
12838 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12839 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12840   echo $ECHO_N "(cached) $ECHO_C" >&6
12841 else
12842   cat >conftest.$ac_ext <<_ACEOF
12843 #line 12843 "configure"
12844 #include "confdefs.h"
12845 $ac_includes_default
12846 #include <$ac_header>
12847 _ACEOF
12848 rm -f conftest.$ac_objext
12849 if { (eval echo "$as_me:12849: \"$ac_compile\"") >&5
12850   (eval $ac_compile) 2>&5
12851   ac_status=$?
12852   echo "$as_me:12852: \$? = $ac_status" >&5
12853   (exit $ac_status); } &&
12854          { ac_try='test -s conftest.$ac_objext'
12855   { (eval echo "$as_me:12855: \"$ac_try\"") >&5
12856   (eval $ac_try) 2>&5
12857   ac_status=$?
12858   echo "$as_me:12858: \$? = $ac_status" >&5
12859   (exit $ac_status); }; }; then
12860   eval "$as_ac_Header=yes"
12861 else
12862   echo "$as_me: failed program was:" >&5
12863 cat conftest.$ac_ext >&5
12864 eval "$as_ac_Header=no"
12865 fi
12866 rm -f conftest.$ac_objext conftest.$ac_ext
12867 fi
12868 echo "$as_me:12868: result: `eval echo '${'$as_ac_Header'}'`" >&5
12869 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12870 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12871   cat >>confdefs.h <<EOF
12872 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12873 EOF
12874
12875 fi
12876 done
12877
12878 echo "$as_me:12878: checking for signed char" >&5
12879 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12880 if test "${ac_cv_type_signed_char+set}" = set; then
12881   echo $ECHO_N "(cached) $ECHO_C" >&6
12882 else
12883   cat >conftest.$ac_ext <<_ACEOF
12884 #line 12884 "configure"
12885 #include "confdefs.h"
12886 $ac_includes_default
12887 int
12888 main (void)
12889 {
12890 if ((signed char *) 0)
12891   return 0;
12892 if (sizeof (signed char))
12893   return 0;
12894   ;
12895   return 0;
12896 }
12897 _ACEOF
12898 rm -f conftest.$ac_objext
12899 if { (eval echo "$as_me:12899: \"$ac_compile\"") >&5
12900   (eval $ac_compile) 2>&5
12901   ac_status=$?
12902   echo "$as_me:12902: \$? = $ac_status" >&5
12903   (exit $ac_status); } &&
12904          { ac_try='test -s conftest.$ac_objext'
12905   { (eval echo "$as_me:12905: \"$ac_try\"") >&5
12906   (eval $ac_try) 2>&5
12907   ac_status=$?
12908   echo "$as_me:12908: \$? = $ac_status" >&5
12909   (exit $ac_status); }; }; then
12910   ac_cv_type_signed_char=yes
12911 else
12912   echo "$as_me: failed program was:" >&5
12913 cat conftest.$ac_ext >&5
12914 ac_cv_type_signed_char=no
12915 fi
12916 rm -f conftest.$ac_objext conftest.$ac_ext
12917 fi
12918 echo "$as_me:12918: result: $ac_cv_type_signed_char" >&5
12919 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12920
12921 echo "$as_me:12921: checking size of signed char" >&5
12922 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12923 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12924   echo $ECHO_N "(cached) $ECHO_C" >&6
12925 else
12926   if test "$ac_cv_type_signed_char" = yes; then
12927   if test "$cross_compiling" = yes; then
12928   # Depending upon the size, compute the lo and hi bounds.
12929 cat >conftest.$ac_ext <<_ACEOF
12930 #line 12930 "configure"
12931 #include "confdefs.h"
12932 $ac_includes_default
12933 int
12934 main (void)
12935 {
12936 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12937   ;
12938   return 0;
12939 }
12940 _ACEOF
12941 rm -f conftest.$ac_objext
12942 if { (eval echo "$as_me:12942: \"$ac_compile\"") >&5
12943   (eval $ac_compile) 2>&5
12944   ac_status=$?
12945   echo "$as_me:12945: \$? = $ac_status" >&5
12946   (exit $ac_status); } &&
12947          { ac_try='test -s conftest.$ac_objext'
12948   { (eval echo "$as_me:12948: \"$ac_try\"") >&5
12949   (eval $ac_try) 2>&5
12950   ac_status=$?
12951   echo "$as_me:12951: \$? = $ac_status" >&5
12952   (exit $ac_status); }; }; then
12953   ac_lo=0 ac_mid=0
12954   while :; do
12955     cat >conftest.$ac_ext <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958 $ac_includes_default
12959 int
12960 main (void)
12961 {
12962 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12963   ;
12964   return 0;
12965 }
12966 _ACEOF
12967 rm -f conftest.$ac_objext
12968 if { (eval echo "$as_me:12968: \"$ac_compile\"") >&5
12969   (eval $ac_compile) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); } &&
12973          { ac_try='test -s conftest.$ac_objext'
12974   { (eval echo "$as_me:12974: \"$ac_try\"") >&5
12975   (eval $ac_try) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); }; }; then
12979   ac_hi=$ac_mid; break
12980 else
12981   echo "$as_me: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12983 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12984 fi
12985 rm -f conftest.$ac_objext conftest.$ac_ext
12986   done
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat conftest.$ac_ext >&5
12990 ac_hi=-1 ac_mid=-1
12991   while :; do
12992     cat >conftest.$ac_ext <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12995 $ac_includes_default
12996 int
12997 main (void)
12998 {
12999 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13000   ;
13001   return 0;
13002 }
13003 _ACEOF
13004 rm -f conftest.$ac_objext
13005 if { (eval echo "$as_me:13005: \"$ac_compile\"") >&5
13006   (eval $ac_compile) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit $ac_status); } &&
13010          { ac_try='test -s conftest.$ac_objext'
13011   { (eval echo "$as_me:13011: \"$ac_try\"") >&5
13012   (eval $ac_try) 2>&5
13013   ac_status=$?
13014   echo "$as_me:13014: \$? = $ac_status" >&5
13015   (exit $ac_status); }; }; then
13016   ac_lo=$ac_mid; break
13017 else
13018   echo "$as_me: failed program was:" >&5
13019 cat conftest.$ac_ext >&5
13020 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13021 fi
13022 rm -f conftest.$ac_objext conftest.$ac_ext
13023   done
13024 fi
13025 rm -f conftest.$ac_objext conftest.$ac_ext
13026 # Binary search between lo and hi bounds.
13027 while test "x$ac_lo" != "x$ac_hi"; do
13028   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13029   cat >conftest.$ac_ext <<_ACEOF
13030 #line 13030 "configure"
13031 #include "confdefs.h"
13032 $ac_includes_default
13033 int
13034 main (void)
13035 {
13036 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13037   ;
13038   return 0;
13039 }
13040 _ACEOF
13041 rm -f conftest.$ac_objext
13042 if { (eval echo "$as_me:13042: \"$ac_compile\"") >&5
13043   (eval $ac_compile) 2>&5
13044   ac_status=$?
13045   echo "$as_me:13045: \$? = $ac_status" >&5
13046   (exit $ac_status); } &&
13047          { ac_try='test -s conftest.$ac_objext'
13048   { (eval echo "$as_me:13048: \"$ac_try\"") >&5
13049   (eval $ac_try) 2>&5
13050   ac_status=$?
13051   echo "$as_me:13051: \$? = $ac_status" >&5
13052   (exit $ac_status); }; }; then
13053   ac_hi=$ac_mid
13054 else
13055   echo "$as_me: failed program was:" >&5
13056 cat conftest.$ac_ext >&5
13057 ac_lo=`expr $ac_mid + 1`
13058 fi
13059 rm -f conftest.$ac_objext conftest.$ac_ext
13060 done
13061 ac_cv_sizeof_signed_char=$ac_lo
13062 else
13063   if test "$cross_compiling" = yes; then
13064   { { echo "$as_me:13064: error: cannot run test program while cross compiling" >&5
13065 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13066    { (exit 1); exit 1; }; }
13067 else
13068   cat >conftest.$ac_ext <<_ACEOF
13069 #line 13069 "configure"
13070 #include "confdefs.h"
13071 $ac_includes_default
13072 int
13073 main (void)
13074 {
13075 FILE *f = fopen ("conftest.val", "w");
13076 if (!f)
13077   $ac_main_return (1);
13078 fprintf (f, "%d", (sizeof (signed char)));
13079 fclose (f);
13080   ;
13081   return 0;
13082 }
13083 _ACEOF
13084 rm -f conftest$ac_exeext
13085 if { (eval echo "$as_me:13085: \"$ac_link\"") >&5
13086   (eval $ac_link) 2>&5
13087   ac_status=$?
13088   echo "$as_me:13088: \$? = $ac_status" >&5
13089   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13090   { (eval echo "$as_me:13090: \"$ac_try\"") >&5
13091   (eval $ac_try) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); }; }; then
13095   ac_cv_sizeof_signed_char=`cat conftest.val`
13096 else
13097   echo "$as_me: program exited with status $ac_status" >&5
13098 echo "$as_me: failed program was:" >&5
13099 cat conftest.$ac_ext >&5
13100 fi
13101 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13102 fi
13103 fi
13104 rm -f conftest.val
13105 else
13106   ac_cv_sizeof_signed_char=0
13107 fi
13108 fi
13109 echo "$as_me:13109: result: $ac_cv_sizeof_signed_char" >&5
13110 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13111 cat >>confdefs.h <<EOF
13112 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13113 EOF
13114
13115 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13116         NCURSES_SBOOL="signed char"
13117 else
13118         NCURSES_SBOOL="char"
13119 fi
13120 echo "$as_me:13120: checking if you want to use signed Boolean array in term.h" >&5
13121 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13122
13123 # Check whether --enable-signed-char or --disable-signed-char was given.
13124 if test "${enable_signed_char+set}" = set; then
13125   enableval="$enable_signed_char"
13126   with_signed_char=$enableval
13127 else
13128   with_signed_char=no
13129 fi;
13130 echo "$as_me:13130: result: $with_signed_char" >&5
13131 echo "${ECHO_T}$with_signed_char" >&6
13132 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13133
13134 ###   use option --with-tparm-arg to override tparm's argument type
13135 echo "$as_me:13135: checking for type of tparm args" >&5
13136 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13137
13138 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13139 if test "${with_tparm_arg+set}" = set; then
13140   withval="$with_tparm_arg"
13141   NCURSES_TPARM_ARG="$withval"
13142 else
13143   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13144 fi;
13145 echo "$as_me:13145: result: $NCURSES_TPARM_ARG" >&5
13146 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13147
13148 ### Enable compiling-in rcs id's
13149 echo "$as_me:13149: checking if RCS identifiers should be compiled-in" >&5
13150 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13151
13152 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13153 if test "${with_rcs_ids+set}" = set; then
13154   withval="$with_rcs_ids"
13155   with_rcs_ids=$withval
13156 else
13157   with_rcs_ids=no
13158 fi;
13159 echo "$as_me:13159: result: $with_rcs_ids" >&5
13160 echo "${ECHO_T}$with_rcs_ids" >&6
13161 test "x$with_rcs_ids" = xyes &&
13162 cat >>confdefs.h <<\EOF
13163 #define USE_RCS_IDS 1
13164 EOF
13165
13166 ###############################################################################
13167
13168 echo "$as_me:13168: checking format of man-pages" >&5
13169 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13170
13171 # Check whether --with-manpage-format or --without-manpage-format was given.
13172 if test "${with_manpage_format+set}" = set; then
13173   withval="$with_manpage_format"
13174   MANPAGE_FORMAT=$withval
13175 else
13176   MANPAGE_FORMAT=unknown
13177 fi;
13178
13179 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13180 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13181
13182 cf_unknown=
13183
13184 case $MANPAGE_FORMAT in
13185 (unknown)
13186         if test -z "$MANPATH" ; then
13187                 MANPATH="/usr/man:/usr/share/man"
13188         fi
13189
13190         # look for the 'date' man-page (it's most likely to be installed!)
13191         MANPAGE_FORMAT=
13192         cf_preform=no
13193         cf_catonly=yes
13194         cf_example=date
13195
13196         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13197         for cf_dir in $MANPATH; do
13198                 test -z "$cf_dir" && cf_dir=/usr/man
13199                 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
13200                 do
13201                         cf_test=`echo $cf_name | sed -e 's/*//'`
13202                         if test "x$cf_test" = "x$cf_name" ; then
13203
13204                                 case "$cf_name" in
13205                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13206                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13207                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13208                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13209                                 esac
13210
13211                                 case "$cf_name" in
13212                                 ($cf_dir/man*)
13213                                         cf_catonly=no
13214                                         ;;
13215                                 ($cf_dir/cat*)
13216                                         cf_preform=yes
13217                                         ;;
13218                                 esac
13219                                 break
13220                         fi
13221
13222                         # if we found a match in either man* or cat*, stop looking
13223                         if test -n "$MANPAGE_FORMAT" ; then
13224                                 cf_found=no
13225                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13226                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13227                                 case "$cf_name" in
13228                                 ($cf_dir/cat*)
13229                                         cf_found=yes
13230                                         ;;
13231                                 esac
13232                                 test $cf_found=yes && break
13233                         fi
13234                 done
13235                 # only check the first directory in $MANPATH where we find manpages
13236                 if test -n "$MANPAGE_FORMAT" ; then
13237                         break
13238                 fi
13239         done
13240         # if we did not find the example, just assume it is normal
13241         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13242         IFS="$ac_save_ifs"
13243         ;;
13244 (*)
13245         for cf_option in $MANPAGE_FORMAT; do
13246         case $cf_option in
13247         (gzip|compress|BSDI|normal|formatted|catonly)
13248                 ;;
13249         (*)
13250                 cf_unknown="$cf_unknown $cf_option"
13251                 ;;
13252         esac
13253         done
13254         ;;
13255 esac
13256
13257 echo "$as_me:13257: result: $MANPAGE_FORMAT" >&5
13258 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13259 if test -n "$cf_unknown" ; then
13260         { echo "$as_me:13260: WARNING: Unexpected manpage-format $cf_unknown" >&5
13261 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13262 fi
13263
13264 echo "$as_me:13264: checking for manpage renaming" >&5
13265 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13266
13267 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13268 if test "${with_manpage_renames+set}" = set; then
13269   withval="$with_manpage_renames"
13270   MANPAGE_RENAMES=$withval
13271 else
13272   MANPAGE_RENAMES=yes
13273 fi;
13274
13275 case ".$MANPAGE_RENAMES" in
13276 (.no)
13277         ;;
13278 (.|.yes)
13279         # Debian 'man' program?
13280         if test -f /etc/debian_version ; then
13281                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13282         else
13283                 MANPAGE_RENAMES=no
13284         fi
13285         ;;
13286 esac
13287
13288 if test "$MANPAGE_RENAMES" != no ; then
13289         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13290                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13291         elif test ! -f $MANPAGE_RENAMES ; then
13292                 { { echo "$as_me:13292: error: not a filename: $MANPAGE_RENAMES" >&5
13293 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13294    { (exit 1); exit 1; }; }
13295         fi
13296
13297         test ! -d man && mkdir man
13298
13299         # Construct a sed-script to perform renaming within man-pages
13300         if test -n "$MANPAGE_RENAMES" ; then
13301                 test ! -d man && mkdir man
13302                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13303         fi
13304 fi
13305
13306 echo "$as_me:13306: result: $MANPAGE_RENAMES" >&5
13307 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13308
13309 echo "$as_me:13309: checking if manpage aliases will be installed" >&5
13310 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13311
13312 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13313 if test "${with_manpage_aliases+set}" = set; then
13314   withval="$with_manpage_aliases"
13315   MANPAGE_ALIASES=$withval
13316 else
13317   MANPAGE_ALIASES=yes
13318 fi;
13319
13320 echo "$as_me:13320: result: $MANPAGE_ALIASES" >&5
13321 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13322
13323 case "x$LN_S" in
13324 (xln*)
13325         cf_use_symlinks=yes
13326         ;;
13327 (*)
13328         cf_use_symlinks=no
13329         ;;
13330 esac
13331
13332 MANPAGE_SYMLINKS=no
13333 if test "$MANPAGE_ALIASES" = yes ; then
13334 echo "$as_me:13334: checking if manpage symlinks should be used" >&5
13335 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13336
13337 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13338 if test "${with_manpage_symlinks+set}" = set; then
13339   withval="$with_manpage_symlinks"
13340   MANPAGE_SYMLINKS=$withval
13341 else
13342   MANPAGE_SYMLINKS=$cf_use_symlinks
13343 fi;
13344
13345 if test "$$cf_use_symlinks" = no; then
13346 if test "$MANPAGE_SYMLINKS" = yes ; then
13347         { echo "$as_me:13347: WARNING: cannot make symlinks" >&5
13348 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13349         MANPAGE_SYMLINKS=no
13350 fi
13351 fi
13352
13353 echo "$as_me:13353: result: $MANPAGE_SYMLINKS" >&5
13354 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13355 fi
13356
13357 echo "$as_me:13357: checking for manpage tbl" >&5
13358 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13359
13360 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13361 if test "${with_manpage_tbl+set}" = set; then
13362   withval="$with_manpage_tbl"
13363   MANPAGE_TBL=$withval
13364 else
13365   MANPAGE_TBL=no
13366 fi;
13367
13368 echo "$as_me:13368: result: $MANPAGE_TBL" >&5
13369 echo "${ECHO_T}$MANPAGE_TBL" >&6
13370
13371 if test "$prefix" = "NONE" ; then
13372         cf_prefix="$ac_default_prefix"
13373 else
13374         cf_prefix="$prefix"
13375 fi
13376
13377 case "$MANPAGE_FORMAT" in
13378 (*catonly*)
13379         cf_format=yes
13380         cf_inboth=no
13381         ;;
13382 (*formatted*)
13383         cf_format=yes
13384         cf_inboth=yes
13385         ;;
13386 (*)
13387         cf_format=no
13388         cf_inboth=no
13389         ;;
13390 esac
13391
13392 test ! -d man && mkdir man
13393
13394 cf_so_strip=
13395 cf_compress=
13396 case "$MANPAGE_FORMAT" in
13397 (*compress*)
13398         cf_so_strip="Z"
13399         cf_compress=compress
13400         ;;
13401 (*gzip*)
13402         cf_so_strip="gz"
13403         cf_compress=gzip
13404         ;;
13405 esac
13406
13407 cf_edit_man=./edit_man.sh
13408 cf_man_alias=`pwd`/man_alias.sed
13409
13410 cat >$cf_edit_man <<CF_EOF
13411 #! $SHELL
13412 # this script is generated by the configure-script CF_MAN_PAGES macro.
13413
13414 prefix="$cf_prefix"
13415 datarootdir="$datarootdir"
13416 datadir="$datadir"
13417
13418 NCURSES_MAJOR="$NCURSES_MAJOR"
13419 NCURSES_MINOR="$NCURSES_MINOR"
13420 NCURSES_PATCH="$NCURSES_PATCH"
13421
13422 NCURSES_OSPEED="$NCURSES_OSPEED"
13423 TERMINFO="$TERMINFO"
13424
13425 INSTALL="$INSTALL"
13426 INSTALL_DATA="$INSTALL_DATA"
13427
13428 transform="$program_transform_name"
13429
13430 TMP=\${TMPDIR:=/tmp}/man\$\$
13431 trap "rm -f \$TMP" 0 1 2 3 15
13432
13433 form=\$1
13434 shift || exit 1
13435
13436 verb=\$1
13437 shift || exit 1
13438
13439 mandir=\$1
13440 shift || exit 1
13441
13442 srcdir=\$1
13443 top_srcdir=\$srcdir/..
13444 shift || exit 1
13445
13446 if test "\$form" = normal ; then
13447         if test "$cf_format" = yes ; then
13448         if test "$cf_inboth" = no ; then
13449                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13450                 exit $?
13451         fi
13452         fi
13453         cf_subdir=\$mandir/man
13454         cf_tables=$MANPAGE_TBL
13455 else
13456         cf_subdir=\$mandir/cat
13457         cf_tables=yes
13458 fi
13459
13460 # process the list of source-files
13461 for i in \$* ; do
13462 case \$i in
13463 (*.orig|*.rej) ;;
13464 (*.[0-9]*)
13465         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13466         if test \$verb = installing ; then
13467         if test ! -d \$cf_subdir\${section} ; then
13468                 mkdir -p \$cf_subdir\$section
13469         fi
13470         fi
13471
13472         # replace variables in man page
13473         if test ! -f $cf_man_alias ; then
13474 cat >>$cf_man_alias <<-CF_EOF2
13475                 s,@DATADIR@,\$datadir,g
13476                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13477                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13478                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13479                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13480                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13481                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13482 CF_EOF
13483
13484         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13485         do
13486                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13487                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13488 cat >>$cf_edit_man <<-CF_EOF
13489                 s,@$cf_NAME@,$cf_name,g
13490 CF_EOF
13491         done
13492
13493 cat >>$cf_edit_man <<CF_EOF
13494 CF_EOF2
13495                 echo "...made $cf_man_alias"
13496         fi
13497
13498         aliases=
13499         cf_source=\`basename \$i\`
13500         inalias=\$cf_source
13501         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13502         if test ! -f \$inalias ; then
13503                 echo .. skipped \$cf_source
13504                 continue
13505         fi
13506 CF_EOF
13507
13508 if test "$MANPAGE_ALIASES" != no ; then
13509 cat >>$cf_edit_man <<CF_EOF
13510         nCurses=ignore.3x
13511         test $with_curses_h = yes && nCurses=ncurses.3x
13512         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13513 CF_EOF
13514 fi
13515
13516 if test "$MANPAGE_RENAMES" = no ; then
13517 cat >>$cf_edit_man <<CF_EOF
13518         # perform program transformations for section 1 man pages
13519         if test \$section = 1 ; then
13520                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13521         else
13522                 cf_target=\$cf_subdir\${section}/\$cf_source
13523         fi
13524 CF_EOF
13525 else
13526 cat >>$cf_edit_man <<CF_EOF
13527         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13528         if test -z "\$cf_target" ; then
13529                 echo '? missing rename for '\$cf_source
13530                 cf_target="\$cf_source"
13531         fi
13532         cf_target="\$cf_subdir\${section}/\${cf_target}"
13533
13534 CF_EOF
13535 fi
13536
13537 cat >>$cf_edit_man <<CF_EOF
13538         sed     -f $cf_man_alias \\
13539 CF_EOF
13540
13541 if test -f $MANPAGE_RENAMES ; then
13542 cat >>$cf_edit_man <<CF_EOF
13543                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13544 CF_EOF
13545 else
13546 cat >>$cf_edit_man <<CF_EOF
13547                 < \$i >\$TMP
13548 CF_EOF
13549 fi
13550
13551 cat >>$cf_edit_man <<CF_EOF
13552 if test \$cf_tables = yes ; then
13553         tbl \$TMP >\$TMP.out
13554         mv \$TMP.out \$TMP
13555 fi
13556 CF_EOF
13557
13558 if test $with_overwrite != yes ; then
13559 cat >>$cf_edit_man <<CF_EOF
13560         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13561         mv \$TMP.out \$TMP
13562 CF_EOF
13563 fi
13564
13565 if test $with_curses_h != yes ; then
13566 cat >>$cf_edit_man <<CF_EOF
13567         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13568         mv \$TMP.out \$TMP
13569 CF_EOF
13570 fi
13571
13572 cat >>$cf_edit_man <<CF_EOF
13573         if test \$form = format ; then
13574                 nroff -man \$TMP >\$TMP.out
13575                 mv \$TMP.out \$TMP
13576         fi
13577 CF_EOF
13578
13579 if test -n "$cf_compress" ; then
13580 cat >>$cf_edit_man <<CF_EOF
13581         if test \$verb = installing ; then
13582         if ( $cf_compress -f \$TMP )
13583         then
13584                 mv \$TMP.$cf_so_strip \$TMP
13585         fi
13586         fi
13587         cf_target="\$cf_target.$cf_so_strip"
13588 CF_EOF
13589 fi
13590
13591 case "$MANPAGE_FORMAT" in
13592 (*BSDI*)
13593 cat >>$cf_edit_man <<CF_EOF
13594         if test \$form = format ; then
13595                 # BSDI installs only .0 suffixes in the cat directories
13596                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13597         fi
13598 CF_EOF
13599   ;;
13600 esac
13601
13602 cat >>$cf_edit_man <<CF_EOF
13603         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13604         if test \$verb = installing ; then
13605                 echo \$verb \$cf_target
13606                 \$INSTALL_DATA \$TMP \$cf_target
13607                 test -d \$cf_subdir\${section} &&
13608                 test -n "\$aliases" && (
13609                         cd \$cf_subdir\${section} && (
13610                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13611                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13612                                 cf_target=\`basename \$cf_target\`
13613                                 for cf_alias in \$aliases
13614                                 do
13615                                         if test \$section = 1 ; then
13616                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13617                                         fi
13618
13619                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13620                                                 if test -f \$cf_alias\${suffix} ; then
13621                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13622                                                         then
13623                                                                 continue
13624                                                         fi
13625                                                 fi
13626                                                 echo .. \$verb alias \$cf_alias\${suffix}
13627 CF_EOF
13628 case "x$LN_S" in
13629 (*-f)
13630 cat >>$cf_edit_man <<CF_EOF
13631                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13632 CF_EOF
13633         ;;
13634 (*)
13635 cat >>$cf_edit_man <<CF_EOF
13636                                                 rm -f \$cf_alias\${suffix}
13637                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13638 CF_EOF
13639         ;;
13640 esac
13641 cat >>$cf_edit_man <<CF_EOF
13642                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13643                                                 echo ".so \$cf_source" >\$TMP
13644 CF_EOF
13645 if test -n "$cf_compress" ; then
13646 cat >>$cf_edit_man <<CF_EOF
13647                                                 if test -n "$cf_so_strip" ; then
13648                                                         $cf_compress -f \$TMP
13649                                                         mv \$TMP.$cf_so_strip \$TMP
13650                                                 fi
13651 CF_EOF
13652 fi
13653 cat >>$cf_edit_man <<CF_EOF
13654                                                 echo .. \$verb alias \$cf_alias\${suffix}
13655                                                 rm -f \$cf_alias\${suffix}
13656                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13657                                         fi
13658                                 done
13659                         )
13660                 )
13661         elif test \$verb = removing ; then
13662                 test -f \$cf_target && (
13663                         echo \$verb \$cf_target
13664                         rm -f \$cf_target
13665                 )
13666                 test -d \$cf_subdir\${section} &&
13667                 test -n "\$aliases" && (
13668                         cd \$cf_subdir\${section} && (
13669                                 for cf_alias in \$aliases
13670                                 do
13671                                         if test \$section = 1 ; then
13672                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13673                                         fi
13674
13675                                         echo .. \$verb alias \$cf_alias\${suffix}
13676                                         rm -f \$cf_alias\${suffix}
13677                                 done
13678                         )
13679                 )
13680         else
13681 #               echo ".hy 0"
13682                 cat \$TMP
13683         fi
13684         ;;
13685 esac
13686 done
13687
13688 if test $cf_inboth = yes ; then
13689 if test \$form != format ; then
13690         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13691 fi
13692 fi
13693
13694 exit 0
13695 CF_EOF
13696 chmod 755 $cf_edit_man
13697
13698 ###############################################################################
13699
13700 ### Note that some functions (such as const) are normally disabled anyway.
13701 echo "$as_me:13701: checking if you want to build with function extensions" >&5
13702 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13703
13704 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13705 if test "${enable_ext_funcs+set}" = set; then
13706   enableval="$enable_ext_funcs"
13707   with_ext_funcs=$enableval
13708 else
13709   with_ext_funcs=yes
13710 fi;
13711 echo "$as_me:13711: result: $with_ext_funcs" >&5
13712 echo "${ECHO_T}$with_ext_funcs" >&6
13713 if test "x$with_ext_funcs" = xyes ; then
13714         NCURSES_EXT_FUNCS=1
13715
13716 cat >>confdefs.h <<\EOF
13717 #define NCURSES_EXT_FUNCS 1
13718 EOF
13719
13720 cat >>confdefs.h <<\EOF
13721 #define HAVE_ASSUME_DEFAULT_COLORS 1
13722 EOF
13723
13724 cat >>confdefs.h <<\EOF
13725 #define HAVE_CURSES_VERSION 1
13726 EOF
13727
13728 cat >>confdefs.h <<\EOF
13729 #define HAVE_HAS_KEY 1
13730 EOF
13731
13732 cat >>confdefs.h <<\EOF
13733 #define HAVE_RESIZETERM 1
13734 EOF
13735
13736 cat >>confdefs.h <<\EOF
13737 #define HAVE_RESIZE_TERM 1
13738 EOF
13739
13740 cat >>confdefs.h <<\EOF
13741 #define HAVE_TERM_ENTRY_H 1
13742 EOF
13743
13744 cat >>confdefs.h <<\EOF
13745 #define HAVE_USE_DEFAULT_COLORS 1
13746 EOF
13747
13748 cat >>confdefs.h <<\EOF
13749 #define HAVE_USE_EXTENDED_NAMES 1
13750 EOF
13751
13752 cat >>confdefs.h <<\EOF
13753 #define HAVE_USE_SCREEN 1
13754 EOF
13755
13756 cat >>confdefs.h <<\EOF
13757 #define HAVE_USE_WINDOW 1
13758 EOF
13759
13760 cat >>confdefs.h <<\EOF
13761 #define HAVE_WRESIZE 1
13762 EOF
13763
13764         GENERATED_EXT_FUNCS=generated
13765         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13766 else
13767         NCURSES_EXT_FUNCS=0
13768         GENERATED_EXT_FUNCS=
13769 fi
13770
13771 echo "$as_me:13771: checking if you want to build with SCREEN extensions" >&5
13772 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13773
13774 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13775 if test "${enable_sp_funcs+set}" = set; then
13776   enableval="$enable_sp_funcs"
13777   with_sp_funcs=$enableval
13778 else
13779   with_sp_funcs=$cf_dft_ext_spfuncs
13780 fi;
13781 echo "$as_me:13781: result: $with_sp_funcs" >&5
13782 echo "${ECHO_T}$with_sp_funcs" >&6
13783 if test "x$with_sp_funcs" = xyes ; then
13784         NCURSES_SP_FUNCS=1
13785
13786 cat >>confdefs.h <<\EOF
13787 #define NCURSES_SP_FUNCS 1
13788 EOF
13789
13790 cat >>confdefs.h <<\EOF
13791 #define HAVE_TPUTS_SP 1
13792 EOF
13793
13794         GENERATED_SP_FUNCS=generated
13795 else
13796         NCURSES_SP_FUNCS=0
13797         GENERATED_SP_FUNCS=
13798 fi
13799
13800 echo "$as_me:13800: checking if you want to build with terminal-driver" >&5
13801 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13802
13803 # Check whether --enable-term-driver or --disable-term-driver was given.
13804 if test "${enable_term_driver+set}" = set; then
13805   enableval="$enable_term_driver"
13806   with_term_driver=$enableval
13807 else
13808   with_term_driver=no
13809 fi;
13810 echo "$as_me:13810: result: $with_term_driver" >&5
13811 echo "${ECHO_T}$with_term_driver" >&6
13812 if test "x$with_term_driver" = xyes ; then
13813
13814 cat >>confdefs.h <<\EOF
13815 #define USE_TERM_DRIVER 1
13816 EOF
13817
13818         if test "x$with_termlib" != xno ; then
13819                 { { echo "$as_me:13819: error: The term-driver option conflicts with the termlib option" >&5
13820 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13821    { (exit 1); exit 1; }; }
13822         fi
13823         if test "x$with_sp_funcs" != xyes ; then
13824                 { { echo "$as_me:13824: error: The term-driver option relies upon sp-funcs" >&5
13825 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13826    { (exit 1); exit 1; }; }
13827         fi
13828 fi
13829
13830 ###   use option --enable-const to turn on use of const beyond that in XSI.
13831 echo "$as_me:13831: checking for extended use of const keyword" >&5
13832 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13833
13834 # Check whether --enable-const or --disable-const was given.
13835 if test "${enable_const+set}" = set; then
13836   enableval="$enable_const"
13837   with_ext_const=$enableval
13838 else
13839   with_ext_const=$cf_dft_ext_const
13840 fi;
13841 echo "$as_me:13841: result: $with_ext_const" >&5
13842 echo "${ECHO_T}$with_ext_const" >&6
13843 NCURSES_CONST='/*nothing*/'
13844 if test "x$with_ext_const" = xyes ; then
13845         NCURSES_CONST=const
13846 fi
13847
13848 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13849 echo "$as_me:13849: checking if you want to use extended colors" >&5
13850 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13851
13852 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13853 if test "${enable_ext_colors+set}" = set; then
13854   enableval="$enable_ext_colors"
13855   with_ext_colors=$enableval
13856 else
13857   with_ext_colors=$cf_dft_ext_colors
13858 fi;
13859 echo "$as_me:13859: result: $with_ext_colors" >&5
13860 echo "${ECHO_T}$with_ext_colors" >&6
13861 NCURSES_EXT_COLORS=0
13862 if test "x$with_ext_colors" = xyes ; then
13863         if test "x$with_widec" != xyes ; then
13864                 { echo "$as_me:13864: WARNING: This option applies only to wide-character library" >&5
13865 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13866         else
13867                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13868
13869 if test "${with_abi_version+set}" != set; then
13870         case $cf_cv_rel_version in
13871         (5.*)
13872                 cf_cv_rel_version=6.0
13873                 cf_cv_abi_version=6
13874                 { echo "$as_me:13874: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13875 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13876                 ;;
13877         esac
13878 fi
13879
13880                 NCURSES_EXT_COLORS=1
13881
13882 cat >>confdefs.h <<\EOF
13883 #define NCURSES_EXT_COLORS 1
13884 EOF
13885
13886 cat >>confdefs.h <<\EOF
13887 #define HAVE_ALLOC_PAIR 1
13888 EOF
13889
13890 cat >>confdefs.h <<\EOF
13891 #define HAVE_INIT_EXTENDED_COLOR 1
13892 EOF
13893
13894 cat >>confdefs.h <<\EOF
13895 #define HAVE_RESET_COLOR_PAIRS 1
13896 EOF
13897
13898         fi
13899 fi
13900
13901 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13902 echo "$as_me:13902: checking if you want to use extended mouse encoding" >&5
13903 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13904
13905 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13906 if test "${enable_ext_mouse+set}" = set; then
13907   enableval="$enable_ext_mouse"
13908   with_ext_mouse=$enableval
13909 else
13910   with_ext_mouse=$cf_dft_ext_mouse
13911 fi;
13912 echo "$as_me:13912: result: $with_ext_mouse" >&5
13913 echo "${ECHO_T}$with_ext_mouse" >&6
13914 NCURSES_MOUSE_VERSION=1
13915 if test "x$with_ext_mouse" = xyes ; then
13916         NCURSES_MOUSE_VERSION=2
13917
13918 if test "${with_abi_version+set}" != set; then
13919         case $cf_cv_rel_version in
13920         (5.*)
13921                 cf_cv_rel_version=6.0
13922                 cf_cv_abi_version=6
13923                 { echo "$as_me:13923: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13924 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13925                 ;;
13926         esac
13927 fi
13928
13929 fi
13930
13931 ###   use option --enable-ext-putwin to turn on extended screendumps
13932 echo "$as_me:13932: checking if you want to use extended putwin/screendump" >&5
13933 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13934
13935 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13936 if test "${enable_ext_putwin+set}" = set; then
13937   enableval="$enable_ext_putwin"
13938   with_ext_putwin=$enableval
13939 else
13940   with_ext_putwin=$cf_dft_ext_putwin
13941 fi;
13942 echo "$as_me:13942: result: $with_ext_putwin" >&5
13943 echo "${ECHO_T}$with_ext_putwin" >&6
13944 if test "x$with_ext_putwin" = xyes ; then
13945
13946 cat >>confdefs.h <<\EOF
13947 #define NCURSES_EXT_PUTWIN 1
13948 EOF
13949
13950 fi
13951
13952 echo "$as_me:13952: checking if you want \$NCURSES_NO_PADDING code" >&5
13953 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13954
13955 # Check whether --enable-no-padding or --disable-no-padding was given.
13956 if test "${enable_no_padding+set}" = set; then
13957   enableval="$enable_no_padding"
13958   with_no_padding=$enableval
13959 else
13960   with_no_padding=$with_ext_funcs
13961 fi;
13962 echo "$as_me:13962: result: $with_no_padding" >&5
13963 echo "${ECHO_T}$with_no_padding" >&6
13964 test "x$with_no_padding" = xyes &&
13965 cat >>confdefs.h <<\EOF
13966 #define NCURSES_NO_PADDING 1
13967 EOF
13968
13969 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
13970 echo "$as_me:13970: checking if you want SIGWINCH handler" >&5
13971 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
13972
13973 # Check whether --enable-sigwinch or --disable-sigwinch was given.
13974 if test "${enable_sigwinch+set}" = set; then
13975   enableval="$enable_sigwinch"
13976   with_sigwinch=$enableval
13977 else
13978   with_sigwinch=$with_ext_funcs
13979 fi;
13980 echo "$as_me:13980: result: $with_sigwinch" >&5
13981 echo "${ECHO_T}$with_sigwinch" >&6
13982 test "x$with_sigwinch" = xyes &&
13983 cat >>confdefs.h <<\EOF
13984 #define USE_SIGWINCH 1
13985 EOF
13986
13987 ###   use option --enable-tcap-names to allow user to define new capabilities
13988 echo "$as_me:13988: checking if you want user-definable terminal capabilities like termcap" >&5
13989 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
13990
13991 # Check whether --enable-tcap-names or --disable-tcap-names was given.
13992 if test "${enable_tcap_names+set}" = set; then
13993   enableval="$enable_tcap_names"
13994   with_tcap_names=$enableval
13995 else
13996   with_tcap_names=$with_ext_funcs
13997 fi;
13998 echo "$as_me:13998: result: $with_tcap_names" >&5
13999 echo "${ECHO_T}$with_tcap_names" >&6
14000 NCURSES_XNAMES=0
14001 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14002
14003 ##############################################################################
14004
14005 echo "$as_me:14005: checking if you want to link with the pthread library" >&5
14006 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14007
14008 # Check whether --with-pthread or --without-pthread was given.
14009 if test "${with_pthread+set}" = set; then
14010   withval="$with_pthread"
14011   with_pthread=$withval
14012 else
14013   with_pthread=no
14014 fi;
14015 echo "$as_me:14015: result: $with_pthread" >&5
14016 echo "${ECHO_T}$with_pthread" >&6
14017
14018 if test "$with_pthread" != no ; then
14019         echo "$as_me:14019: checking for pthread.h" >&5
14020 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14021 if test "${ac_cv_header_pthread_h+set}" = set; then
14022   echo $ECHO_N "(cached) $ECHO_C" >&6
14023 else
14024   cat >conftest.$ac_ext <<_ACEOF
14025 #line 14025 "configure"
14026 #include "confdefs.h"
14027 #include <pthread.h>
14028 _ACEOF
14029 if { (eval echo "$as_me:14029: \"$ac_cpp conftest.$ac_ext\"") >&5
14030   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14031   ac_status=$?
14032   egrep -v '^ *\+' conftest.er1 >conftest.err
14033   rm -f conftest.er1
14034   cat conftest.err >&5
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit $ac_status); } >/dev/null; then
14037   if test -s conftest.err; then
14038     ac_cpp_err=$ac_c_preproc_warn_flag
14039   else
14040     ac_cpp_err=
14041   fi
14042 else
14043   ac_cpp_err=yes
14044 fi
14045 if test -z "$ac_cpp_err"; then
14046   ac_cv_header_pthread_h=yes
14047 else
14048   echo "$as_me: failed program was:" >&5
14049   cat conftest.$ac_ext >&5
14050   ac_cv_header_pthread_h=no
14051 fi
14052 rm -f conftest.err conftest.$ac_ext
14053 fi
14054 echo "$as_me:14054: result: $ac_cv_header_pthread_h" >&5
14055 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14056 if test $ac_cv_header_pthread_h = yes; then
14057
14058 cat >>confdefs.h <<\EOF
14059 #define HAVE_PTHREADS_H 1
14060 EOF
14061
14062         for cf_lib_pthread in pthread c_r
14063         do
14064             echo "$as_me:14064: checking if we can link with the $cf_lib_pthread library" >&5
14065 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14066             cf_save_LIBS="$LIBS"
14067
14068 cf_add_libs="-l$cf_lib_pthread"
14069 # Filter out duplicates - this happens with badly-designed ".pc" files...
14070 for cf_add_1lib in $LIBS
14071 do
14072         for cf_add_2lib in $cf_add_libs
14073         do
14074                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14075                 then
14076                         cf_add_1lib=
14077                         break
14078                 fi
14079         done
14080         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14081 done
14082 LIBS="$cf_add_libs"
14083
14084             cat >conftest.$ac_ext <<_ACEOF
14085 #line 14085 "configure"
14086 #include "confdefs.h"
14087
14088 #include <pthread.h>
14089
14090 int
14091 main (void)
14092 {
14093
14094                 int rc = pthread_create(0,0,0,0);
14095                 int r2 = pthread_mutexattr_settype(0, 0);
14096
14097   ;
14098   return 0;
14099 }
14100 _ACEOF
14101 rm -f conftest.$ac_objext conftest$ac_exeext
14102 if { (eval echo "$as_me:14102: \"$ac_link\"") >&5
14103   (eval $ac_link) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit $ac_status); } &&
14107          { ac_try='test -s conftest$ac_exeext'
14108   { (eval echo "$as_me:14108: \"$ac_try\"") >&5
14109   (eval $ac_try) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit $ac_status); }; }; then
14113   with_pthread=yes
14114 else
14115   echo "$as_me: failed program was:" >&5
14116 cat conftest.$ac_ext >&5
14117 with_pthread=no
14118 fi
14119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14120             LIBS="$cf_save_LIBS"
14121             echo "$as_me:14121: result: $with_pthread" >&5
14122 echo "${ECHO_T}$with_pthread" >&6
14123             test "$with_pthread" = yes && break
14124         done
14125
14126         if test "$with_pthread" = yes ; then
14127
14128 cf_add_libs="-l$cf_lib_pthread"
14129 # Filter out duplicates - this happens with badly-designed ".pc" files...
14130 for cf_add_1lib in $LIBS
14131 do
14132         for cf_add_2lib in $cf_add_libs
14133         do
14134                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14135                 then
14136                         cf_add_1lib=
14137                         break
14138                 fi
14139         done
14140         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14141 done
14142 LIBS="$cf_add_libs"
14143
14144 cat >>confdefs.h <<\EOF
14145 #define HAVE_LIBPTHREADS 1
14146 EOF
14147
14148         else
14149             { { echo "$as_me:14149: error: Cannot link with pthread library" >&5
14150 echo "$as_me: error: Cannot link with pthread library" >&2;}
14151    { (exit 1); exit 1; }; }
14152         fi
14153
14154 fi
14155
14156 fi
14157
14158 if test "x$with_pthread" != xno; then
14159         echo "$as_me:14159: checking for pthread_kill" >&5
14160 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14161 if test "${ac_cv_func_pthread_kill+set}" = set; then
14162   echo $ECHO_N "(cached) $ECHO_C" >&6
14163 else
14164   cat >conftest.$ac_ext <<_ACEOF
14165 #line 14165 "configure"
14166 #include "confdefs.h"
14167 /* System header to define __stub macros and hopefully few prototypes,
14168     which can conflict with char pthread_kill (); below.  */
14169 #include <assert.h>
14170 /* Override any gcc2 internal prototype to avoid an error.  */
14171 #ifdef __cplusplus
14172 extern "C"
14173 #endif
14174 /* We use char because int might match the return type of a gcc2
14175    builtin and then its argument prototype would still apply.  */
14176 char pthread_kill ();
14177 char (*f) ();
14178
14179 int
14180 main (void)
14181 {
14182 /* The GNU C library defines this for functions which it implements
14183     to always fail with ENOSYS.  Some functions are actually named
14184     something starting with __ and the normal name is an alias.  */
14185 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14186 choke me
14187 #else
14188 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14189 #endif
14190
14191   ;
14192   return 0;
14193 }
14194 _ACEOF
14195 rm -f conftest.$ac_objext conftest$ac_exeext
14196 if { (eval echo "$as_me:14196: \"$ac_link\"") >&5
14197   (eval $ac_link) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit $ac_status); } &&
14201          { ac_try='test -s conftest$ac_exeext'
14202   { (eval echo "$as_me:14202: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit $ac_status); }; }; then
14207   ac_cv_func_pthread_kill=yes
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 cat conftest.$ac_ext >&5
14211 ac_cv_func_pthread_kill=no
14212 fi
14213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14214 fi
14215 echo "$as_me:14215: result: $ac_cv_func_pthread_kill" >&5
14216 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14217 if test $ac_cv_func_pthread_kill = yes; then
14218
14219                 echo "$as_me:14219: checking if you want to allow EINTR in wgetch with pthreads" >&5
14220 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14221
14222 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14223 if test "${enable_pthreads_eintr+set}" = set; then
14224   enableval="$enable_pthreads_eintr"
14225   use_pthreads_eintr=$enableval
14226 else
14227   use_pthreads_eintr=no
14228 fi;
14229                 echo "$as_me:14229: result: $use_pthreads_eintr" >&5
14230 echo "${ECHO_T}$use_pthreads_eintr" >&6
14231                 if test "x$use_pthreads_eintr" = xyes ; then
14232
14233 cat >>confdefs.h <<\EOF
14234 #define USE_PTHREADS_EINTR 1
14235 EOF
14236
14237                 fi
14238 fi
14239
14240         echo "$as_me:14240: checking if you want to use weak-symbols for pthreads" >&5
14241 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14242
14243 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14244 if test "${enable_weak_symbols+set}" = set; then
14245   enableval="$enable_weak_symbols"
14246   use_weak_symbols=$enableval
14247 else
14248   use_weak_symbols=no
14249 fi;
14250         echo "$as_me:14250: result: $use_weak_symbols" >&5
14251 echo "${ECHO_T}$use_weak_symbols" >&6
14252         if test "x$use_weak_symbols" = xyes ; then
14253
14254 echo "$as_me:14254: checking if $CC supports weak symbols" >&5
14255 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14256 if test "${cf_cv_weak_symbols+set}" = set; then
14257   echo $ECHO_N "(cached) $ECHO_C" >&6
14258 else
14259
14260 cat >conftest.$ac_ext <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263
14264 #include <stdio.h>
14265 int
14266 main (void)
14267 {
14268
14269 #if defined(__GNUC__)
14270 #  if defined __USE_ISOC99
14271 #    define _cat_pragma(exp)    _Pragma(#exp)
14272 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14273 #  else
14274 #    define _weak_pragma(exp)
14275 #  endif
14276 #  define _declare(name)        __extension__ extern __typeof__(name) name
14277 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14278 #endif
14279
14280 weak_symbol(fopen);
14281
14282   ;
14283   return 0;
14284 }
14285 _ACEOF
14286 rm -f conftest.$ac_objext
14287 if { (eval echo "$as_me:14287: \"$ac_compile\"") >&5
14288   (eval $ac_compile) 2>&5
14289   ac_status=$?
14290   echo "$as_me:14290: \$? = $ac_status" >&5
14291   (exit $ac_status); } &&
14292          { ac_try='test -s conftest.$ac_objext'
14293   { (eval echo "$as_me:14293: \"$ac_try\"") >&5
14294   (eval $ac_try) 2>&5
14295   ac_status=$?
14296   echo "$as_me:14296: \$? = $ac_status" >&5
14297   (exit $ac_status); }; }; then
14298   cf_cv_weak_symbols=yes
14299 else
14300   echo "$as_me: failed program was:" >&5
14301 cat conftest.$ac_ext >&5
14302 cf_cv_weak_symbols=no
14303 fi
14304 rm -f conftest.$ac_objext conftest.$ac_ext
14305
14306 fi
14307 echo "$as_me:14307: result: $cf_cv_weak_symbols" >&5
14308 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14309
14310         else
14311                 cf_cv_weak_symbols=no
14312         fi
14313
14314         if test "x$cf_cv_weak_symbols" = xyes ; then
14315
14316 cat >>confdefs.h <<\EOF
14317 #define USE_WEAK_SYMBOLS 1
14318 EOF
14319
14320         fi
14321 fi
14322
14323 PTHREAD=
14324 if test "x$with_pthread" = "xyes" ; then
14325
14326 cat >>confdefs.h <<\EOF
14327 #define USE_PTHREADS 1
14328 EOF
14329
14330         enable_reentrant=yes
14331         if test "x$cf_cv_weak_symbols" = xyes ; then
14332                 PTHREAD=-lpthread
14333
14334 cf_add_libs="-lpthread"
14335 # Filter out duplicates - this happens with badly-designed ".pc" files...
14336 for cf_add_1lib in $PRIVATE_LIBS
14337 do
14338         for cf_add_2lib in $cf_add_libs
14339         do
14340                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14341                 then
14342                         cf_add_1lib=
14343                         break
14344                 fi
14345         done
14346         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14347 done
14348 PRIVATE_LIBS="$cf_add_libs"
14349
14350         fi
14351 fi
14352
14353 # Reentrant code has to be opaque; there's little advantage to making ncurses
14354 # opaque outside of that, so there is no --enable-opaque option.  We can use
14355 # this option without --with-pthreads, but this will be always set for
14356 # pthreads.
14357 echo "$as_me:14357: checking if you want reentrant code" >&5
14358 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14359
14360 # Check whether --enable-reentrant or --disable-reentrant was given.
14361 if test "${enable_reentrant+set}" = set; then
14362   enableval="$enable_reentrant"
14363   with_reentrant=$enableval
14364 else
14365   with_reentrant=no
14366 fi;
14367 echo "$as_me:14367: result: $with_reentrant" >&5
14368 echo "${ECHO_T}$with_reentrant" >&6
14369 if test "x$with_reentrant" = xyes ; then
14370         cf_cv_enable_reentrant=1
14371         cf_cv_enable_opaque="NCURSES_INTERNALS"
14372         NCURSES_SIZE_T=int
14373         if test "x$cf_cv_weak_symbols" = xyes ; then
14374
14375 # remove pthread library from $LIBS
14376 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14377
14378 cf_add_libs="-lpthread"
14379 # Filter out duplicates - this happens with badly-designed ".pc" files...
14380 for cf_add_1lib in $TEST_LIBS
14381 do
14382         for cf_add_2lib in $cf_add_libs
14383         do
14384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14385                 then
14386                         cf_add_1lib=
14387                         break
14388                 fi
14389         done
14390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14391 done
14392 TEST_LIBS="$cf_add_libs"
14393
14394 cf_add_libs="-lpthread"
14395 # Filter out duplicates - this happens with badly-designed ".pc" files...
14396 for cf_add_1lib in $TEST_LIBS2
14397 do
14398         for cf_add_2lib in $cf_add_libs
14399         do
14400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14401                 then
14402                         cf_add_1lib=
14403                         break
14404                 fi
14405         done
14406         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14407 done
14408 TEST_LIBS2="$cf_add_libs"
14409
14410 cf_add_libs="-lpthread"
14411 # Filter out duplicates - this happens with badly-designed ".pc" files...
14412 for cf_add_1lib in $PRIVATE_LIBS
14413 do
14414         for cf_add_2lib in $cf_add_libs
14415         do
14416                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14417                 then
14418                         cf_add_1lib=
14419                         break
14420                 fi
14421         done
14422         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14423 done
14424 PRIVATE_LIBS="$cf_add_libs"
14425
14426         else
14427                 # when not using weak symbols but with_reentrant,
14428                 # add 't' to the library suffix on all platforms
14429                 # except cygwin, where we only do that if ALSO
14430                 # compiling with full thread support.
14431                 case "$host" in
14432                 (*cygwin* | *msys*)
14433                         if test "$with_pthread" = "yes" ; then
14434                                 if test "x$disable_lib_suffixes" = "xno" ; then
14435                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14436                                 fi
14437                         fi ;;
14438                 (*)
14439                         if test "x$disable_lib_suffixes" = "xno" ; then
14440                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14441                         fi
14442                         ;;
14443                 esac
14444         fi
14445
14446 cat >>confdefs.h <<\EOF
14447 #define USE_REENTRANT 1
14448 EOF
14449
14450 if test "${with_abi_version+set}" != set; then
14451         case $cf_cv_rel_version in
14452         (5.*)
14453                 cf_cv_rel_version=6.0
14454                 cf_cv_abi_version=6
14455                 { echo "$as_me:14455: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14456 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14457                 ;;
14458         esac
14459 fi
14460
14461 else
14462         cf_cv_enable_reentrant=0
14463         cf_cv_enable_opaque="NCURSES_OPAQUE"
14464         NCURSES_SIZE_T=short
14465 fi
14466
14467 echo "$as_me:14467: checking if you want opaque curses-library structures" >&5
14468 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14469
14470 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14471 if test "${enable_opaque_curses+set}" = set; then
14472   enableval="$enable_opaque_curses"
14473   test "$enableval" != yes && enableval=no
14474         if test "$enableval" != "no" ; then
14475     enable_opaque_curses=yes
14476         else
14477
14478          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14479          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14480
14481         fi
14482 else
14483   enableval=no
14484
14485          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14486          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14487
14488 fi;
14489 echo "$as_me:14489: result: $enable_opaque_curses" >&5
14490 echo "${ECHO_T}$enable_opaque_curses" >&6
14491
14492 test "$cf_cv_enable_reentrant" = 1 && \
14493 test "$enable_opaque_curses" = no && \
14494 { { echo "$as_me:14494: error: reentrant configuration requires opaque library" >&5
14495 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14496    { (exit 1); exit 1; }; }
14497
14498 echo "$as_me:14498: checking if you want opaque form-library structures" >&5
14499 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14500
14501 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14502 if test "${enable_opaque_form+set}" = set; then
14503   enableval="$enable_opaque_form"
14504   enable_opaque_form=yes
14505 else
14506   enable_opaque_form=no
14507 fi;
14508 echo "$as_me:14508: result: $enable_opaque_form" >&5
14509 echo "${ECHO_T}$enable_opaque_form" >&6
14510
14511 echo "$as_me:14511: checking if you want opaque menu-library structures" >&5
14512 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14513
14514 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14515 if test "${enable_opaque_menu+set}" = set; then
14516   enableval="$enable_opaque_menu"
14517   enable_opaque_menu=yes
14518 else
14519   enable_opaque_menu=no
14520 fi;
14521 echo "$as_me:14521: result: $enable_opaque_menu" >&5
14522 echo "${ECHO_T}$enable_opaque_menu" >&6
14523
14524 echo "$as_me:14524: checking if you want opaque panel-library structures" >&5
14525 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14526
14527 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14528 if test "${enable_opaque_panel+set}" = set; then
14529   enableval="$enable_opaque_panel"
14530   enable_opaque_panel=yes
14531 else
14532   enable_opaque_panel=no
14533 fi;
14534 echo "$as_me:14534: result: $enable_opaque_panel" >&5
14535 echo "${ECHO_T}$enable_opaque_panel" >&6
14536
14537 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14538 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14539 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14540 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14541
14542 ### Allow using a different wrap-prefix
14543 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14544         echo "$as_me:14544: checking for prefix used to wrap public variables" >&5
14545 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14546
14547 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14548 if test "${with_wrap_prefix+set}" = set; then
14549   withval="$with_wrap_prefix"
14550   NCURSES_WRAP_PREFIX=$withval
14551 else
14552   NCURSES_WRAP_PREFIX=_nc_
14553 fi;
14554         echo "$as_me:14554: result: $NCURSES_WRAP_PREFIX" >&5
14555 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14556 else
14557         NCURSES_WRAP_PREFIX=_nc_
14558 fi
14559
14560 cat >>confdefs.h <<EOF
14561 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14562 EOF
14563
14564 ###############################################################################
14565 # These options are relatively safe to experiment with.
14566
14567 echo "$as_me:14567: checking if you want all development code" >&5
14568 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14569
14570 # Check whether --with-develop or --without-develop was given.
14571 if test "${with_develop+set}" = set; then
14572   withval="$with_develop"
14573   with_develop=$withval
14574 else
14575   with_develop=no
14576 fi;
14577 echo "$as_me:14577: result: $with_develop" >&5
14578 echo "${ECHO_T}$with_develop" >&6
14579
14580 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14581 echo "$as_me:14581: checking if you want hard-tabs code" >&5
14582 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14583
14584 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14585 if test "${enable_hard_tabs+set}" = set; then
14586   enableval="$enable_hard_tabs"
14587
14588 else
14589   enable_hard_tabs=$with_develop
14590 fi;
14591 echo "$as_me:14591: result: $enable_hard_tabs" >&5
14592 echo "${ECHO_T}$enable_hard_tabs" >&6
14593 test "x$enable_hard_tabs" = xyes &&
14594 cat >>confdefs.h <<\EOF
14595 #define USE_HARD_TABS 1
14596 EOF
14597
14598 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14599 echo "$as_me:14599: checking if you want limited support for xmc" >&5
14600 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14601
14602 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14603 if test "${enable_xmc_glitch+set}" = set; then
14604   enableval="$enable_xmc_glitch"
14605
14606 else
14607   enable_xmc_glitch=$with_develop
14608 fi;
14609 echo "$as_me:14609: result: $enable_xmc_glitch" >&5
14610 echo "${ECHO_T}$enable_xmc_glitch" >&6
14611 test "x$enable_xmc_glitch" = xyes &&
14612 cat >>confdefs.h <<\EOF
14613 #define USE_XMC_SUPPORT 1
14614 EOF
14615
14616 ###############################################################################
14617 # These are just experimental, probably should not be in a package:
14618
14619 echo "$as_me:14619: checking if you do not want to assume colors are white-on-black" >&5
14620 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14621
14622 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14623 if test "${enable_assumed_color+set}" = set; then
14624   enableval="$enable_assumed_color"
14625   with_assumed_color=$enableval
14626 else
14627   with_assumed_color=yes
14628 fi;
14629 echo "$as_me:14629: result: $with_assumed_color" >&5
14630 echo "${ECHO_T}$with_assumed_color" >&6
14631 test "x$with_assumed_color" = xyes &&
14632 cat >>confdefs.h <<\EOF
14633 #define USE_ASSUMED_COLOR 1
14634 EOF
14635
14636 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14637 echo "$as_me:14637: checking if you want hashmap scrolling-optimization code" >&5
14638 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14639
14640 # Check whether --enable-hashmap or --disable-hashmap was given.
14641 if test "${enable_hashmap+set}" = set; then
14642   enableval="$enable_hashmap"
14643   with_hashmap=$enableval
14644 else
14645   with_hashmap=yes
14646 fi;
14647 echo "$as_me:14647: result: $with_hashmap" >&5
14648 echo "${ECHO_T}$with_hashmap" >&6
14649 test "x$with_hashmap" = xyes &&
14650 cat >>confdefs.h <<\EOF
14651 #define USE_HASHMAP 1
14652 EOF
14653
14654 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14655 echo "$as_me:14655: checking if you want colorfgbg code" >&5
14656 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14657
14658 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14659 if test "${enable_colorfgbg+set}" = set; then
14660   enableval="$enable_colorfgbg"
14661   with_colorfgbg=$enableval
14662 else
14663   with_colorfgbg=no
14664 fi;
14665 echo "$as_me:14665: result: $with_colorfgbg" >&5
14666 echo "${ECHO_T}$with_colorfgbg" >&6
14667 test "x$with_colorfgbg" = xyes &&
14668 cat >>confdefs.h <<\EOF
14669 #define USE_COLORFGBG 1
14670 EOF
14671
14672 ###   use option --enable-interop to turn on use of bindings used for interop
14673 echo "$as_me:14673: checking if you want interop bindings" >&5
14674 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14675
14676 # Check whether --enable-interop or --disable-interop was given.
14677 if test "${enable_interop+set}" = set; then
14678   enableval="$enable_interop"
14679   with_exp_interop=$enableval
14680 else
14681   with_exp_interop=$cf_dft_interop
14682 fi;
14683 echo "$as_me:14683: result: $with_exp_interop" >&5
14684 echo "${ECHO_T}$with_exp_interop" >&6
14685
14686 NCURSES_INTEROP_FUNCS=0
14687 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14688
14689 echo "$as_me:14689: checking if you want experimental safe-sprintf code" >&5
14690 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14691
14692 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14693 if test "${enable_safe_sprintf+set}" = set; then
14694   enableval="$enable_safe_sprintf"
14695   with_safe_sprintf=$enableval
14696 else
14697   with_safe_sprintf=no
14698 fi;
14699 echo "$as_me:14699: result: $with_safe_sprintf" >&5
14700 echo "${ECHO_T}$with_safe_sprintf" >&6
14701
14702 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14703 # when hashmap is used scroll hints are useless
14704 if test "$with_hashmap" = no ; then
14705 echo "$as_me:14705: checking if you want to experiment without scrolling-hints code" >&5
14706 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14707
14708 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14709 if test "${enable_scroll_hints+set}" = set; then
14710   enableval="$enable_scroll_hints"
14711   with_scroll_hints=$enableval
14712 else
14713   with_scroll_hints=yes
14714 fi;
14715 echo "$as_me:14715: result: $with_scroll_hints" >&5
14716 echo "${ECHO_T}$with_scroll_hints" >&6
14717 test "x$with_scroll_hints" = xyes &&
14718 cat >>confdefs.h <<\EOF
14719 #define USE_SCROLL_HINTS 1
14720 EOF
14721
14722 fi
14723
14724 echo "$as_me:14724: checking if you want wgetch-events code" >&5
14725 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14726
14727 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14728 if test "${enable_wgetch_events+set}" = set; then
14729   enableval="$enable_wgetch_events"
14730   with_wgetch_events=$enableval
14731 else
14732   with_wgetch_events=no
14733 fi;
14734 echo "$as_me:14734: result: $with_wgetch_events" >&5
14735 echo "${ECHO_T}$with_wgetch_events" >&6
14736 test "x$with_wgetch_events" = xyes &&
14737 cat >>confdefs.h <<\EOF
14738 #define NCURSES_WGETCH_EVENTS 1
14739 EOF
14740
14741 ###############################################################################
14742
14743 ###     use option --disable-echo to suppress full display compiling commands
14744
14745 echo "$as_me:14745: checking if you want to see long compiling messages" >&5
14746 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14747
14748 # Check whether --enable-echo or --disable-echo was given.
14749 if test "${enable_echo+set}" = set; then
14750   enableval="$enable_echo"
14751   test "$enableval" != no && enableval=yes
14752         if test "$enableval" != "yes" ; then
14753
14754         ECHO_LT='--silent'
14755         ECHO_LD='@echo linking $@;'
14756         RULE_CC='@echo compiling $<'
14757         SHOW_CC='@echo compiling $@'
14758         ECHO_CC='@'
14759
14760         else
14761
14762         ECHO_LT=''
14763         ECHO_LD=''
14764         RULE_CC=''
14765         SHOW_CC=''
14766         ECHO_CC=''
14767
14768         fi
14769 else
14770   enableval=yes
14771
14772         ECHO_LT=''
14773         ECHO_LD=''
14774         RULE_CC=''
14775         SHOW_CC=''
14776         ECHO_CC=''
14777
14778 fi;
14779 echo "$as_me:14779: result: $enableval" >&5
14780 echo "${ECHO_T}$enableval" >&6
14781
14782 if test "x$enable_echo" = xyes; then
14783         ECHO_LINK=
14784 else
14785         ECHO_LINK='@ echo linking $@ ... ;'
14786         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14787         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14788 fi
14789
14790 # --disable-stripping is used for debugging
14791
14792 echo "$as_me:14792: checking if you want to install stripped executables" >&5
14793 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14794
14795 # Check whether --enable-stripping or --disable-stripping was given.
14796 if test "${enable_stripping+set}" = set; then
14797   enableval="$enable_stripping"
14798   test "$enableval" != no && enableval=yes
14799         if test "$enableval" != "yes" ; then
14800     with_stripping=no
14801         else
14802                 with_stripping=yes
14803         fi
14804 else
14805   enableval=yes
14806         with_stripping=yes
14807
14808 fi;
14809 echo "$as_me:14809: result: $with_stripping" >&5
14810 echo "${ECHO_T}$with_stripping" >&6
14811
14812 if test "$with_stripping" = yes
14813 then
14814         INSTALL_OPT_S="-s"
14815 else
14816         INSTALL_OPT_S=
14817 fi
14818
14819 : ${INSTALL:=install}
14820 echo "$as_me:14820: checking if install accepts -p option" >&5
14821 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14822 if test "${cf_cv_install_p+set}" = set; then
14823   echo $ECHO_N "(cached) $ECHO_C" >&6
14824 else
14825
14826         rm -rf conftest*
14827         date >conftest.in
14828         mkdir conftest.out
14829         sleep 3
14830         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14831         then
14832                 if test -f conftest.out/conftest.in
14833                 then
14834                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14835                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14836                         if test -s conftest.err
14837                         then
14838                                 cf_cv_install_p=no
14839                         else
14840                                 cf_cv_install_p=yes
14841                         fi
14842                 else
14843                         cf_cv_install_p=no
14844                 fi
14845         else
14846                 cf_cv_install_p=no
14847         fi
14848         rm -rf conftest*
14849
14850 fi
14851 echo "$as_me:14851: result: $cf_cv_install_p" >&5
14852 echo "${ECHO_T}$cf_cv_install_p" >&6
14853
14854 echo "$as_me:14854: checking if install needs to be told about ownership" >&5
14855 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14856 case `$ac_config_guess` in
14857 (*minix)
14858         with_install_o=yes
14859         ;;
14860 (*)
14861         with_install_o=no
14862         ;;
14863 esac
14864
14865 echo "$as_me:14865: result: $with_install_o" >&5
14866 echo "${ECHO_T}$with_install_o" >&6
14867 if test "x$with_install_o" = xyes
14868 then
14869         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'`
14870 else
14871         INSTALL_OPT_O=
14872 fi
14873
14874 # If we're avoiding relinking of shared libraries during install, that is to
14875 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14876 # the install program has "-p" (for preserving timestamps).
14877 cf_cv_do_reranlib=yes
14878 if test "x$cf_cv_install_p" = xyes
14879 then
14880         if test "x$cf_cv_do_relink" != xyes
14881         then
14882                 cf_cv_do_reranlib=no
14883                 INSTALL_OPT_P="-p"
14884                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14885         fi
14886 fi
14887
14888 ###     use option --enable-warnings to turn on all gcc warnings
14889 echo "$as_me:14889: checking if you want to see compiler warnings" >&5
14890 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14891
14892 # Check whether --enable-warnings or --disable-warnings was given.
14893 if test "${enable_warnings+set}" = set; then
14894   enableval="$enable_warnings"
14895   with_warnings=$enableval
14896 fi;
14897 echo "$as_me:14897: result: $with_warnings" >&5
14898 echo "${ECHO_T}$with_warnings" >&6
14899
14900 if test "x$with_warnings" = "xyes"; then
14901
14902         ADAFLAGS="$ADAFLAGS -gnatg"
14903
14904 INTEL_COMPILER=no
14905
14906 if test "$GCC" = yes ; then
14907         case $host_os in
14908         (linux*|gnu*)
14909                 echo "$as_me:14909: checking if this is really Intel C compiler" >&5
14910 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14911                 cf_save_CFLAGS="$CFLAGS"
14912                 CFLAGS="$CFLAGS -no-gcc"
14913                 cat >conftest.$ac_ext <<_ACEOF
14914 #line 14914 "configure"
14915 #include "confdefs.h"
14916
14917 int
14918 main (void)
14919 {
14920
14921 #ifdef __INTEL_COMPILER
14922 #else
14923 make an error
14924 #endif
14925
14926   ;
14927   return 0;
14928 }
14929 _ACEOF
14930 rm -f conftest.$ac_objext
14931 if { (eval echo "$as_me:14931: \"$ac_compile\"") >&5
14932   (eval $ac_compile) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -s conftest.$ac_objext'
14937   { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938   (eval $ac_try) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); }; }; then
14942   INTEL_COMPILER=yes
14943 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14944
14945 else
14946   echo "$as_me: failed program was:" >&5
14947 cat conftest.$ac_ext >&5
14948 fi
14949 rm -f conftest.$ac_objext conftest.$ac_ext
14950                 CFLAGS="$cf_save_CFLAGS"
14951                 echo "$as_me:14951: result: $INTEL_COMPILER" >&5
14952 echo "${ECHO_T}$INTEL_COMPILER" >&6
14953                 ;;
14954         esac
14955 fi
14956
14957 CLANG_COMPILER=no
14958
14959 if test "$GCC" = yes ; then
14960         echo "$as_me:14960: checking if this is really Clang C compiler" >&5
14961 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14962         cf_save_CFLAGS="$CFLAGS"
14963         CFLAGS="$CFLAGS -Qunused-arguments"
14964         cat >conftest.$ac_ext <<_ACEOF
14965 #line 14965 "configure"
14966 #include "confdefs.h"
14967
14968 int
14969 main (void)
14970 {
14971
14972 #ifdef __clang__
14973 #else
14974 make an error
14975 #endif
14976
14977   ;
14978   return 0;
14979 }
14980 _ACEOF
14981 rm -f conftest.$ac_objext
14982 if { (eval echo "$as_me:14982: \"$ac_compile\"") >&5
14983   (eval $ac_compile) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); } &&
14987          { ac_try='test -s conftest.$ac_objext'
14988   { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989   (eval $ac_try) 2>&5
14990   ac_status=$?
14991   echo "$as_me:14991: \$? = $ac_status" >&5
14992   (exit $ac_status); }; }; then
14993   CLANG_COMPILER=yes
14994 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14995
14996 else
14997   echo "$as_me: failed program was:" >&5
14998 cat conftest.$ac_ext >&5
14999 fi
15000 rm -f conftest.$ac_objext conftest.$ac_ext
15001         CFLAGS="$cf_save_CFLAGS"
15002         echo "$as_me:15002: result: $CLANG_COMPILER" >&5
15003 echo "${ECHO_T}$CLANG_COMPILER" >&6
15004 fi
15005
15006 cat > conftest.$ac_ext <<EOF
15007 #line 15007 "${as_me:-configure}"
15008 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15009 EOF
15010
15011 if test "$INTEL_COMPILER" = yes
15012 then
15013 # The "-wdXXX" options suppress warnings:
15014 # remark #1419: external declaration in primary source file
15015 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15016 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15017 # remark #193: zero used for undefined preprocessing identifier
15018 # remark #593: variable "curs_sb_left_arrow" was set but never used
15019 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15020 # remark #869: parameter "tw" was never referenced
15021 # remark #981: operands are evaluated in unspecified order
15022 # warning #279: controlling expression is constant
15023
15024         { echo "$as_me:15024: checking for $CC warning options..." >&5
15025 echo "$as_me: checking for $CC warning options..." >&6;}
15026         cf_save_CFLAGS="$CFLAGS"
15027         EXTRA_CFLAGS="-Wall"
15028         for cf_opt in \
15029                 wd1419 \
15030                 wd1683 \
15031                 wd1684 \
15032                 wd193 \
15033                 wd593 \
15034                 wd279 \
15035                 wd810 \
15036                 wd869 \
15037                 wd981
15038         do
15039                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15040                 if { (eval echo "$as_me:15040: \"$ac_compile\"") >&5
15041   (eval $ac_compile) 2>&5
15042   ac_status=$?
15043   echo "$as_me:15043: \$? = $ac_status" >&5
15044   (exit $ac_status); }; then
15045                         test -n "$verbose" && echo "$as_me:15045: result: ... -$cf_opt" >&5
15046 echo "${ECHO_T}... -$cf_opt" >&6
15047                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15048                 fi
15049         done
15050         CFLAGS="$cf_save_CFLAGS"
15051
15052 elif test "$GCC" = yes
15053 then
15054         { echo "$as_me:15054: checking for $CC warning options..." >&5
15055 echo "$as_me: checking for $CC warning options..." >&6;}
15056         cf_save_CFLAGS="$CFLAGS"
15057         EXTRA_CFLAGS=
15058         cf_warn_CONST=""
15059         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15060         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15061         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15062         for cf_opt in W Wall \
15063                 Wbad-function-cast \
15064                 Wcast-align \
15065                 Wcast-qual \
15066                 Wdeclaration-after-statement \
15067                 Wextra \
15068                 Winline \
15069                 Wmissing-declarations \
15070                 Wmissing-prototypes \
15071                 Wnested-externs \
15072                 Wpointer-arith \
15073                 Wshadow \
15074                 Wstrict-prototypes \
15075                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15076         do
15077                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15078                 if { (eval echo "$as_me:15078: \"$ac_compile\"") >&5
15079   (eval $ac_compile) 2>&5
15080   ac_status=$?
15081   echo "$as_me:15081: \$? = $ac_status" >&5
15082   (exit $ac_status); }; then
15083                         test -n "$verbose" && echo "$as_me:15083: result: ... -$cf_opt" >&5
15084 echo "${ECHO_T}... -$cf_opt" >&6
15085                         case $cf_opt in
15086                         (Wcast-qual)
15087
15088         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15089         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15090
15091                                 ;;
15092                         (Winline)
15093                                 case $GCC_VERSION in
15094                                 ([34].*)
15095                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15096
15097 echo "${as_me:-configure}:15097: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15098
15099                                         continue;;
15100                                 esac
15101                                 ;;
15102                         (Wpointer-arith)
15103                                 case $GCC_VERSION in
15104                                 ([12].*)
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                         esac
15113                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15114                 fi
15115         done
15116         CFLAGS="$cf_save_CFLAGS"
15117 fi
15118 rm -rf conftest*
15119
15120         if test "x$cf_with_cxx" = xyes ; then
15121
15122 INTEL_CPLUSPLUS=no
15123
15124 if test "$GCC" = yes ; then
15125         case $host_os in
15126         (linux*|gnu*)
15127                 echo "$as_me:15127: checking if this is really Intel C++ compiler" >&5
15128 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15129                 cf_save_CFLAGS="$CXXFLAGS"
15130                 CXXFLAGS="$CXXFLAGS -no-gcc"
15131                 cat >conftest.$ac_ext <<_ACEOF
15132 #line 15132 "configure"
15133 #include "confdefs.h"
15134
15135 int
15136 main (void)
15137 {
15138
15139 #ifdef __INTEL_COMPILER
15140 #else
15141 make an error
15142 #endif
15143
15144   ;
15145   return 0;
15146 }
15147 _ACEOF
15148 rm -f conftest.$ac_objext
15149 if { (eval echo "$as_me:15149: \"$ac_compile\"") >&5
15150   (eval $ac_compile) 2>&5
15151   ac_status=$?
15152   echo "$as_me:15152: \$? = $ac_status" >&5
15153   (exit $ac_status); } &&
15154          { ac_try='test -s conftest.$ac_objext'
15155   { (eval echo "$as_me:15155: \"$ac_try\"") >&5
15156   (eval $ac_try) 2>&5
15157   ac_status=$?
15158   echo "$as_me:15158: \$? = $ac_status" >&5
15159   (exit $ac_status); }; }; then
15160   INTEL_CPLUSPLUS=yes
15161 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15162
15163 else
15164   echo "$as_me: failed program was:" >&5
15165 cat conftest.$ac_ext >&5
15166 fi
15167 rm -f conftest.$ac_objext conftest.$ac_ext
15168                 CXXFLAGS="$cf_save_CFLAGS"
15169                 echo "$as_me:15169: result: $INTEL_CPLUSPLUS" >&5
15170 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15171                 ;;
15172         esac
15173 fi
15174
15175 CLANG_CPLUSPLUS=no
15176
15177 if test "$GCC" = yes ; then
15178         echo "$as_me:15178: checking if this is really Clang C++ compiler" >&5
15179 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15180         cf_save_CFLAGS="$CXXFLAGS"
15181         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15182         cat >conftest.$ac_ext <<_ACEOF
15183 #line 15183 "configure"
15184 #include "confdefs.h"
15185
15186 int
15187 main (void)
15188 {
15189
15190 #ifdef __clang__
15191 #else
15192 make an error
15193 #endif
15194
15195   ;
15196   return 0;
15197 }
15198 _ACEOF
15199 rm -f conftest.$ac_objext
15200 if { (eval echo "$as_me:15200: \"$ac_compile\"") >&5
15201   (eval $ac_compile) 2>&5
15202   ac_status=$?
15203   echo "$as_me:15203: \$? = $ac_status" >&5
15204   (exit $ac_status); } &&
15205          { ac_try='test -s conftest.$ac_objext'
15206   { (eval echo "$as_me:15206: \"$ac_try\"") >&5
15207   (eval $ac_try) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); }; }; then
15211   CLANG_CPLUSPLUS=yes
15212 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15213
15214 else
15215   echo "$as_me: failed program was:" >&5
15216 cat conftest.$ac_ext >&5
15217 fi
15218 rm -f conftest.$ac_objext conftest.$ac_ext
15219         CXXFLAGS="$cf_save_CFLAGS"
15220         echo "$as_me:15220: result: $CLANG_CPLUSPLUS" >&5
15221 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15222 fi
15223
15224 ac_ext=cc
15225 ac_cpp='$CXXCPP $CPPFLAGS'
15226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15227 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15229 ac_main_return=return
15230
15231 cat > conftest.$ac_ext <<EOF
15232 #line 15232 "configure"
15233 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15234 EOF
15235
15236 if test "$INTEL_CPLUSPLUS" = yes
15237 then
15238 # The "-wdXXX" options suppress warnings:
15239 # remark #1419: external declaration in primary source file
15240 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15241 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15242 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15243 # remark #193: zero used for undefined preprocessing identifier
15244 # remark #593: variable "curs_sb_left_arrow" was set but never used
15245 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15246 # remark #869: parameter "tw" was never referenced
15247 # remark #981: operands are evaluated in unspecified order
15248 # warning #269: invalid format string conversion
15249
15250         { echo "$as_me:15250: checking for $CC warning options..." >&5
15251 echo "$as_me: checking for $CC warning options..." >&6;}
15252         cf_save_CXXFLAGS="$CXXFLAGS"
15253         EXTRA_CXXFLAGS="-Wall"
15254         for cf_opt in \
15255                 wd1419 \
15256                 wd1682 \
15257                 wd1683 \
15258                 wd1684 \
15259                 wd193 \
15260                 wd279 \
15261                 wd593 \
15262                 wd810 \
15263                 wd869 \
15264                 wd981
15265         do
15266                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15267                 if { (eval echo "$as_me:15267: \"$ac_compile\"") >&5
15268   (eval $ac_compile) 2>&5
15269   ac_status=$?
15270   echo "$as_me:15270: \$? = $ac_status" >&5
15271   (exit $ac_status); }; then
15272                         test -n "$verbose" && echo "$as_me:15272: result: ... -$cf_opt" >&5
15273 echo "${ECHO_T}... -$cf_opt" >&6
15274                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15275                 fi
15276         done
15277         CXXFLAGS="$cf_save_CXXFLAGS"
15278
15279 elif test "$GXX" = yes
15280 then
15281         { echo "$as_me:15281: checking for $CXX warning options..." >&5
15282 echo "$as_me: checking for $CXX warning options..." >&6;}
15283         cf_save_CXXFLAGS="$CXXFLAGS"
15284         EXTRA_CXXFLAGS="-W -Wall"
15285         cf_gxx_extra_warnings=""
15286         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15287         case "$GCC_VERSION" in
15288         ([1-2].*)
15289                 ;;
15290         (*)
15291                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15292                 ;;
15293         esac
15294         for cf_opt in \
15295                 Wabi \
15296                 fabi-version=0 \
15297                 Wextra \
15298                 Wignored-qualifiers \
15299                 Wlogical-op \
15300                 Woverloaded-virtual \
15301                 Wsign-promo \
15302                 Wsynth \
15303                 Wold-style-cast \
15304                 Wcast-align \
15305                 Wcast-qual \
15306                 Wpointer-arith \
15307                 Wshadow \
15308                 Wundef $cf_gxx_extra_warnings Wno-unused
15309         do
15310                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15311                 if { (eval echo "$as_me:15311: \"$ac_compile\"") >&5
15312   (eval $ac_compile) 2>&5
15313   ac_status=$?
15314   echo "$as_me:15314: \$? = $ac_status" >&5
15315   (exit $ac_status); }; then
15316                         test -n "$verbose" && echo "$as_me:15316: result: ... -$cf_opt" >&5
15317 echo "${ECHO_T}... -$cf_opt" >&6
15318                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15319                 else
15320                         test -n "$verbose" && echo "$as_me:15320: result: ... no -$cf_opt" >&5
15321 echo "${ECHO_T}... no -$cf_opt" >&6
15322                 fi
15323         done
15324         CXXFLAGS="$cf_save_CXXFLAGS"
15325 fi
15326
15327 rm -rf conftest*
15328 ac_ext=c
15329 ac_cpp='$CPP $CPPFLAGS'
15330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15333 ac_main_return=return
15334
15335         fi
15336 fi
15337
15338 if test "$GCC" = yes
15339 then
15340 cat > conftest.i <<EOF
15341 #ifndef GCC_PRINTF
15342 #define GCC_PRINTF 0
15343 #endif
15344 #ifndef GCC_SCANF
15345 #define GCC_SCANF 0
15346 #endif
15347 #ifndef GCC_NORETURN
15348 #define GCC_NORETURN /* nothing */
15349 #endif
15350 #ifndef GCC_UNUSED
15351 #define GCC_UNUSED /* nothing */
15352 #endif
15353 EOF
15354 if test "$GCC" = yes
15355 then
15356         { echo "$as_me:15356: checking for $CC __attribute__ directives..." >&5
15357 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15358 cat > conftest.$ac_ext <<EOF
15359 #line 15359 "${as_me:-configure}"
15360 #include "confdefs.h"
15361 #include "conftest.h"
15362 #include "conftest.i"
15363 #if     GCC_PRINTF
15364 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15365 #else
15366 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15367 #endif
15368 #if     GCC_SCANF
15369 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15370 #else
15371 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15372 #endif
15373 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15374 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15375 extern void foo(void) GCC_NORETURN;
15376 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15377 EOF
15378         cf_printf_attribute=no
15379         cf_scanf_attribute=no
15380         for cf_attribute in scanf printf unused noreturn
15381         do
15382
15383 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15384
15385                 cf_directive="__attribute__(($cf_attribute))"
15386                 echo "checking for $CC $cf_directive" 1>&5
15387
15388                 case $cf_attribute in
15389                 (printf)
15390                         cf_printf_attribute=yes
15391                         cat >conftest.h <<EOF
15392 #define GCC_$cf_ATTRIBUTE 1
15393 EOF
15394                         ;;
15395                 (scanf)
15396                         cf_scanf_attribute=yes
15397                         cat >conftest.h <<EOF
15398 #define GCC_$cf_ATTRIBUTE 1
15399 EOF
15400                         ;;
15401                 (*)
15402                         cat >conftest.h <<EOF
15403 #define GCC_$cf_ATTRIBUTE $cf_directive
15404 EOF
15405                         ;;
15406                 esac
15407
15408                 if { (eval echo "$as_me:15408: \"$ac_compile\"") >&5
15409   (eval $ac_compile) 2>&5
15410   ac_status=$?
15411   echo "$as_me:15411: \$? = $ac_status" >&5
15412   (exit $ac_status); }; then
15413                         test -n "$verbose" && echo "$as_me:15413: result: ... $cf_attribute" >&5
15414 echo "${ECHO_T}... $cf_attribute" >&6
15415                         cat conftest.h >>confdefs.h
15416                         case $cf_attribute in
15417                         (noreturn)
15418
15419 cat >>confdefs.h <<EOF
15420 #define GCC_NORETURN $cf_directive
15421 EOF
15422
15423                                 ;;
15424                         (printf)
15425                                 cf_value='/* nothing */'
15426                                 if test "$cf_printf_attribute" != no ; then
15427                                         cf_value='__attribute__((format(printf,fmt,var)))'
15428
15429 cat >>confdefs.h <<\EOF
15430 #define GCC_PRINTF 1
15431 EOF
15432
15433                                 fi
15434
15435 cat >>confdefs.h <<EOF
15436 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15437 EOF
15438
15439                                 ;;
15440                         (scanf)
15441                                 cf_value='/* nothing */'
15442                                 if test "$cf_scanf_attribute" != no ; then
15443                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15444
15445 cat >>confdefs.h <<\EOF
15446 #define GCC_SCANF 1
15447 EOF
15448
15449                                 fi
15450
15451 cat >>confdefs.h <<EOF
15452 #define GCC_SCANFLIKE(fmt,var) $cf_value
15453 EOF
15454
15455                                 ;;
15456                         (unused)
15457
15458 cat >>confdefs.h <<EOF
15459 #define GCC_UNUSED $cf_directive
15460 EOF
15461
15462                                 ;;
15463                         esac
15464                 fi
15465         done
15466 else
15467         fgrep define conftest.i >>confdefs.h
15468 fi
15469 rm -rf conftest*
15470 fi
15471
15472 echo "$as_me:15472: checking if you want to work around bogus compiler/loader warnings" >&5
15473 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15474
15475 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15476 if test "${enable_string_hacks+set}" = set; then
15477   enableval="$enable_string_hacks"
15478   with_string_hacks=$enableval
15479 else
15480   with_string_hacks=no
15481 fi;
15482 echo "$as_me:15482: result: $with_string_hacks" >&5
15483 echo "${ECHO_T}$with_string_hacks" >&6
15484
15485 if test "x$with_string_hacks" = "xyes"; then
15486
15487 cat >>confdefs.h <<\EOF
15488 #define USE_STRING_HACKS 1
15489 EOF
15490
15491         { echo "$as_me:15491: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15492 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15493         echo "$as_me:15493: checking for strlcat" >&5
15494 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15495 if test "${ac_cv_func_strlcat+set}" = set; then
15496   echo $ECHO_N "(cached) $ECHO_C" >&6
15497 else
15498   cat >conftest.$ac_ext <<_ACEOF
15499 #line 15499 "configure"
15500 #include "confdefs.h"
15501 /* System header to define __stub macros and hopefully few prototypes,
15502     which can conflict with char strlcat (); below.  */
15503 #include <assert.h>
15504 /* Override any gcc2 internal prototype to avoid an error.  */
15505 #ifdef __cplusplus
15506 extern "C"
15507 #endif
15508 /* We use char because int might match the return type of a gcc2
15509    builtin and then its argument prototype would still apply.  */
15510 char strlcat ();
15511 char (*f) ();
15512
15513 int
15514 main (void)
15515 {
15516 /* The GNU C library defines this for functions which it implements
15517     to always fail with ENOSYS.  Some functions are actually named
15518     something starting with __ and the normal name is an alias.  */
15519 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15520 choke me
15521 #else
15522 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15523 #endif
15524
15525   ;
15526   return 0;
15527 }
15528 _ACEOF
15529 rm -f conftest.$ac_objext conftest$ac_exeext
15530 if { (eval echo "$as_me:15530: \"$ac_link\"") >&5
15531   (eval $ac_link) 2>&5
15532   ac_status=$?
15533   echo "$as_me:15533: \$? = $ac_status" >&5
15534   (exit $ac_status); } &&
15535          { ac_try='test -s conftest$ac_exeext'
15536   { (eval echo "$as_me:15536: \"$ac_try\"") >&5
15537   (eval $ac_try) 2>&5
15538   ac_status=$?
15539   echo "$as_me:15539: \$? = $ac_status" >&5
15540   (exit $ac_status); }; }; then
15541   ac_cv_func_strlcat=yes
15542 else
15543   echo "$as_me: failed program was:" >&5
15544 cat conftest.$ac_ext >&5
15545 ac_cv_func_strlcat=no
15546 fi
15547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15548 fi
15549 echo "$as_me:15549: result: $ac_cv_func_strlcat" >&5
15550 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15551 if test $ac_cv_func_strlcat = yes; then
15552
15553 cat >>confdefs.h <<\EOF
15554 #define HAVE_STRLCAT 1
15555 EOF
15556
15557 else
15558
15559                 echo "$as_me:15559: checking for strlcat in -lbsd" >&5
15560 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15561 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15562   echo $ECHO_N "(cached) $ECHO_C" >&6
15563 else
15564   ac_check_lib_save_LIBS=$LIBS
15565 LIBS="-lbsd  $LIBS"
15566 cat >conftest.$ac_ext <<_ACEOF
15567 #line 15567 "configure"
15568 #include "confdefs.h"
15569
15570 /* Override any gcc2 internal prototype to avoid an error.  */
15571 #ifdef __cplusplus
15572 extern "C"
15573 #endif
15574 /* We use char because int might match the return type of a gcc2
15575    builtin and then its argument prototype would still apply.  */
15576 char strlcat ();
15577 int
15578 main (void)
15579 {
15580 strlcat ();
15581   ;
15582   return 0;
15583 }
15584 _ACEOF
15585 rm -f conftest.$ac_objext conftest$ac_exeext
15586 if { (eval echo "$as_me:15586: \"$ac_link\"") >&5
15587   (eval $ac_link) 2>&5
15588   ac_status=$?
15589   echo "$as_me:15589: \$? = $ac_status" >&5
15590   (exit $ac_status); } &&
15591          { ac_try='test -s conftest$ac_exeext'
15592   { (eval echo "$as_me:15592: \"$ac_try\"") >&5
15593   (eval $ac_try) 2>&5
15594   ac_status=$?
15595   echo "$as_me:15595: \$? = $ac_status" >&5
15596   (exit $ac_status); }; }; then
15597   ac_cv_lib_bsd_strlcat=yes
15598 else
15599   echo "$as_me: failed program was:" >&5
15600 cat conftest.$ac_ext >&5
15601 ac_cv_lib_bsd_strlcat=no
15602 fi
15603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15604 LIBS=$ac_check_lib_save_LIBS
15605 fi
15606 echo "$as_me:15606: result: $ac_cv_lib_bsd_strlcat" >&5
15607 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15608 if test $ac_cv_lib_bsd_strlcat = yes; then
15609
15610 cf_add_libs="-lbsd"
15611 # Filter out duplicates - this happens with badly-designed ".pc" files...
15612 for cf_add_1lib in $LIBS
15613 do
15614         for cf_add_2lib in $cf_add_libs
15615         do
15616                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15617                 then
15618                         cf_add_1lib=
15619                         break
15620                 fi
15621         done
15622         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15623 done
15624 LIBS="$cf_add_libs"
15625
15626 for ac_header in bsd/string.h
15627 do
15628 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15629 echo "$as_me:15629: checking for $ac_header" >&5
15630 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15631 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15632   echo $ECHO_N "(cached) $ECHO_C" >&6
15633 else
15634   cat >conftest.$ac_ext <<_ACEOF
15635 #line 15635 "configure"
15636 #include "confdefs.h"
15637 #include <$ac_header>
15638 _ACEOF
15639 if { (eval echo "$as_me:15639: \"$ac_cpp conftest.$ac_ext\"") >&5
15640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15641   ac_status=$?
15642   egrep -v '^ *\+' conftest.er1 >conftest.err
15643   rm -f conftest.er1
15644   cat conftest.err >&5
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); } >/dev/null; then
15647   if test -s conftest.err; then
15648     ac_cpp_err=$ac_c_preproc_warn_flag
15649   else
15650     ac_cpp_err=
15651   fi
15652 else
15653   ac_cpp_err=yes
15654 fi
15655 if test -z "$ac_cpp_err"; then
15656   eval "$as_ac_Header=yes"
15657 else
15658   echo "$as_me: failed program was:" >&5
15659   cat conftest.$ac_ext >&5
15660   eval "$as_ac_Header=no"
15661 fi
15662 rm -f conftest.err conftest.$ac_ext
15663 fi
15664 echo "$as_me:15664: result: `eval echo '${'$as_ac_Header'}'`" >&5
15665 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15666 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15667   cat >>confdefs.h <<EOF
15668 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15669 EOF
15670
15671 fi
15672 done
15673
15674 cat >>confdefs.h <<\EOF
15675 #define HAVE_STRLCAT 1
15676 EOF
15677
15678 fi
15679
15680 fi
15681
15682 for ac_func in strlcpy snprintf
15683 do
15684 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15685 echo "$as_me:15685: checking for $ac_func" >&5
15686 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15687 if eval "test \"\${$as_ac_var+set}\" = set"; then
15688   echo $ECHO_N "(cached) $ECHO_C" >&6
15689 else
15690   cat >conftest.$ac_ext <<_ACEOF
15691 #line 15691 "configure"
15692 #include "confdefs.h"
15693 /* System header to define __stub macros and hopefully few prototypes,
15694     which can conflict with char $ac_func (); below.  */
15695 #include <assert.h>
15696 /* Override any gcc2 internal prototype to avoid an error.  */
15697 #ifdef __cplusplus
15698 extern "C"
15699 #endif
15700 /* We use char because int might match the return type of a gcc2
15701    builtin and then its argument prototype would still apply.  */
15702 char $ac_func ();
15703 char (*f) ();
15704
15705 int
15706 main (void)
15707 {
15708 /* The GNU C library defines this for functions which it implements
15709     to always fail with ENOSYS.  Some functions are actually named
15710     something starting with __ and the normal name is an alias.  */
15711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15712 choke me
15713 #else
15714 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15715 #endif
15716
15717   ;
15718   return 0;
15719 }
15720 _ACEOF
15721 rm -f conftest.$ac_objext conftest$ac_exeext
15722 if { (eval echo "$as_me:15722: \"$ac_link\"") >&5
15723   (eval $ac_link) 2>&5
15724   ac_status=$?
15725   echo "$as_me:15725: \$? = $ac_status" >&5
15726   (exit $ac_status); } &&
15727          { ac_try='test -s conftest$ac_exeext'
15728   { (eval echo "$as_me:15728: \"$ac_try\"") >&5
15729   (eval $ac_try) 2>&5
15730   ac_status=$?
15731   echo "$as_me:15731: \$? = $ac_status" >&5
15732   (exit $ac_status); }; }; then
15733   eval "$as_ac_var=yes"
15734 else
15735   echo "$as_me: failed program was:" >&5
15736 cat conftest.$ac_ext >&5
15737 eval "$as_ac_var=no"
15738 fi
15739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15740 fi
15741 echo "$as_me:15741: result: `eval echo '${'$as_ac_var'}'`" >&5
15742 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15743 if test `eval echo '${'$as_ac_var'}'` = yes; then
15744   cat >>confdefs.h <<EOF
15745 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15746 EOF
15747
15748 fi
15749 done
15750
15751 fi
15752
15753 ###     use option --enable-assertions to turn on generation of assertion code
15754 echo "$as_me:15754: checking if you want to enable runtime assertions" >&5
15755 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15756
15757 # Check whether --enable-assertions or --disable-assertions was given.
15758 if test "${enable_assertions+set}" = set; then
15759   enableval="$enable_assertions"
15760   with_assertions=$enableval
15761 else
15762   with_assertions=no
15763 fi;
15764 echo "$as_me:15764: result: $with_assertions" >&5
15765 echo "${ECHO_T}$with_assertions" >&6
15766 if test -n "$GCC"
15767 then
15768         if test "$with_assertions" = no
15769         then
15770                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15771         else
15772
15773         ADAFLAGS="$ADAFLAGS -gnata"
15774
15775         fi
15776 fi
15777
15778 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15779
15780 echo "$as_me:15780: checking if you want to use dmalloc for testing" >&5
15781 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15782
15783 # Check whether --with-dmalloc or --without-dmalloc was given.
15784 if test "${with_dmalloc+set}" = set; then
15785   withval="$with_dmalloc"
15786
15787 cat >>confdefs.h <<EOF
15788 #define USE_DMALLOC 1
15789 EOF
15790
15791         : ${with_cflags:=-g}
15792         : ${with_no_leaks:=yes}
15793          with_dmalloc=yes
15794 else
15795   with_dmalloc=
15796 fi;
15797 echo "$as_me:15797: result: ${with_dmalloc:-no}" >&5
15798 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15799
15800 case .$with_cflags in
15801 (.*-g*)
15802         case .$CFLAGS in
15803         (.*-g*)
15804                 ;;
15805         (*)
15806
15807 cf_fix_cppflags=no
15808 cf_new_cflags=
15809 cf_new_cppflags=
15810 cf_new_extra_cppflags=
15811
15812 for cf_add_cflags in -g
15813 do
15814 case $cf_fix_cppflags in
15815 (no)
15816         case $cf_add_cflags in
15817         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15818                 case $cf_add_cflags in
15819                 (-D*)
15820                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15821
15822                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15823                                 && test -z "${cf_tst_cflags}" \
15824                                 && cf_fix_cppflags=yes
15825
15826                         if test $cf_fix_cppflags = yes ; then
15827
15828         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15829         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15830
15831                                 continue
15832                         elif test "${cf_tst_cflags}" = "\"'" ; then
15833
15834         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15835         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15836
15837                                 continue
15838                         fi
15839                         ;;
15840                 esac
15841                 case "$CPPFLAGS" in
15842                 (*$cf_add_cflags)
15843                         ;;
15844                 (*)
15845                         case $cf_add_cflags in
15846                         (-D*)
15847                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15848
15849 CPPFLAGS=`echo "$CPPFLAGS" | \
15850         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15851                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15852
15853                                 ;;
15854                         esac
15855
15856         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15857         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15858
15859                         ;;
15860                 esac
15861                 ;;
15862         (*)
15863
15864         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15865         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15866
15867                 ;;
15868         esac
15869         ;;
15870 (yes)
15871
15872         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15873         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15874
15875         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15876
15877         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15878                 && test -z "${cf_tst_cflags}" \
15879                 && cf_fix_cppflags=no
15880         ;;
15881 esac
15882 done
15883
15884 if test -n "$cf_new_cflags" ; then
15885
15886         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15887         CFLAGS="${CFLAGS}$cf_new_cflags"
15888
15889 fi
15890
15891 if test -n "$cf_new_cppflags" ; then
15892
15893         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15894         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15895
15896 fi
15897
15898 if test -n "$cf_new_extra_cppflags" ; then
15899
15900         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15901         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15902
15903 fi
15904
15905                 ;;
15906         esac
15907         ;;
15908 esac
15909
15910 if test "$with_dmalloc" = yes ; then
15911         echo "$as_me:15911: checking for dmalloc.h" >&5
15912 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15913 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15914   echo $ECHO_N "(cached) $ECHO_C" >&6
15915 else
15916   cat >conftest.$ac_ext <<_ACEOF
15917 #line 15917 "configure"
15918 #include "confdefs.h"
15919 #include <dmalloc.h>
15920 _ACEOF
15921 if { (eval echo "$as_me:15921: \"$ac_cpp conftest.$ac_ext\"") >&5
15922   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15923   ac_status=$?
15924   egrep -v '^ *\+' conftest.er1 >conftest.err
15925   rm -f conftest.er1
15926   cat conftest.err >&5
15927   echo "$as_me:15927: \$? = $ac_status" >&5
15928   (exit $ac_status); } >/dev/null; then
15929   if test -s conftest.err; then
15930     ac_cpp_err=$ac_c_preproc_warn_flag
15931   else
15932     ac_cpp_err=
15933   fi
15934 else
15935   ac_cpp_err=yes
15936 fi
15937 if test -z "$ac_cpp_err"; then
15938   ac_cv_header_dmalloc_h=yes
15939 else
15940   echo "$as_me: failed program was:" >&5
15941   cat conftest.$ac_ext >&5
15942   ac_cv_header_dmalloc_h=no
15943 fi
15944 rm -f conftest.err conftest.$ac_ext
15945 fi
15946 echo "$as_me:15946: result: $ac_cv_header_dmalloc_h" >&5
15947 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15948 if test $ac_cv_header_dmalloc_h = yes; then
15949
15950 echo "$as_me:15950: checking for dmalloc_debug in -ldmalloc" >&5
15951 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15952 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15953   echo $ECHO_N "(cached) $ECHO_C" >&6
15954 else
15955   ac_check_lib_save_LIBS=$LIBS
15956 LIBS="-ldmalloc  $LIBS"
15957 cat >conftest.$ac_ext <<_ACEOF
15958 #line 15958 "configure"
15959 #include "confdefs.h"
15960
15961 /* Override any gcc2 internal prototype to avoid an error.  */
15962 #ifdef __cplusplus
15963 extern "C"
15964 #endif
15965 /* We use char because int might match the return type of a gcc2
15966    builtin and then its argument prototype would still apply.  */
15967 char dmalloc_debug ();
15968 int
15969 main (void)
15970 {
15971 dmalloc_debug ();
15972   ;
15973   return 0;
15974 }
15975 _ACEOF
15976 rm -f conftest.$ac_objext conftest$ac_exeext
15977 if { (eval echo "$as_me:15977: \"$ac_link\"") >&5
15978   (eval $ac_link) 2>&5
15979   ac_status=$?
15980   echo "$as_me:15980: \$? = $ac_status" >&5
15981   (exit $ac_status); } &&
15982          { ac_try='test -s conftest$ac_exeext'
15983   { (eval echo "$as_me:15983: \"$ac_try\"") >&5
15984   (eval $ac_try) 2>&5
15985   ac_status=$?
15986   echo "$as_me:15986: \$? = $ac_status" >&5
15987   (exit $ac_status); }; }; then
15988   ac_cv_lib_dmalloc_dmalloc_debug=yes
15989 else
15990   echo "$as_me: failed program was:" >&5
15991 cat conftest.$ac_ext >&5
15992 ac_cv_lib_dmalloc_dmalloc_debug=no
15993 fi
15994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15995 LIBS=$ac_check_lib_save_LIBS
15996 fi
15997 echo "$as_me:15997: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
15998 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
15999 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16000   cat >>confdefs.h <<EOF
16001 #define HAVE_LIBDMALLOC 1
16002 EOF
16003
16004   LIBS="-ldmalloc $LIBS"
16005
16006 fi
16007
16008 fi
16009
16010 fi
16011
16012 echo "$as_me:16012: checking if you want to use dbmalloc for testing" >&5
16013 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16014
16015 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16016 if test "${with_dbmalloc+set}" = set; then
16017   withval="$with_dbmalloc"
16018
16019 cat >>confdefs.h <<EOF
16020 #define USE_DBMALLOC 1
16021 EOF
16022
16023         : ${with_cflags:=-g}
16024         : ${with_no_leaks:=yes}
16025          with_dbmalloc=yes
16026 else
16027   with_dbmalloc=
16028 fi;
16029 echo "$as_me:16029: result: ${with_dbmalloc:-no}" >&5
16030 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16031
16032 case .$with_cflags in
16033 (.*-g*)
16034         case .$CFLAGS in
16035         (.*-g*)
16036                 ;;
16037         (*)
16038
16039 cf_fix_cppflags=no
16040 cf_new_cflags=
16041 cf_new_cppflags=
16042 cf_new_extra_cppflags=
16043
16044 for cf_add_cflags in -g
16045 do
16046 case $cf_fix_cppflags in
16047 (no)
16048         case $cf_add_cflags in
16049         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16050                 case $cf_add_cflags in
16051                 (-D*)
16052                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16053
16054                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16055                                 && test -z "${cf_tst_cflags}" \
16056                                 && cf_fix_cppflags=yes
16057
16058                         if test $cf_fix_cppflags = yes ; then
16059
16060         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16061         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16062
16063                                 continue
16064                         elif test "${cf_tst_cflags}" = "\"'" ; then
16065
16066         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16067         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16068
16069                                 continue
16070                         fi
16071                         ;;
16072                 esac
16073                 case "$CPPFLAGS" in
16074                 (*$cf_add_cflags)
16075                         ;;
16076                 (*)
16077                         case $cf_add_cflags in
16078                         (-D*)
16079                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16080
16081 CPPFLAGS=`echo "$CPPFLAGS" | \
16082         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16083                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16084
16085                                 ;;
16086                         esac
16087
16088         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16089         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16090
16091                         ;;
16092                 esac
16093                 ;;
16094         (*)
16095
16096         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16097         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16098
16099                 ;;
16100         esac
16101         ;;
16102 (yes)
16103
16104         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16105         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16106
16107         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16108
16109         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16110                 && test -z "${cf_tst_cflags}" \
16111                 && cf_fix_cppflags=no
16112         ;;
16113 esac
16114 done
16115
16116 if test -n "$cf_new_cflags" ; then
16117
16118         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16119         CFLAGS="${CFLAGS}$cf_new_cflags"
16120
16121 fi
16122
16123 if test -n "$cf_new_cppflags" ; then
16124
16125         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16126         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16127
16128 fi
16129
16130 if test -n "$cf_new_extra_cppflags" ; then
16131
16132         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16133         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16134
16135 fi
16136
16137                 ;;
16138         esac
16139         ;;
16140 esac
16141
16142 if test "$with_dbmalloc" = yes ; then
16143         echo "$as_me:16143: checking for dbmalloc.h" >&5
16144 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16145 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16146   echo $ECHO_N "(cached) $ECHO_C" >&6
16147 else
16148   cat >conftest.$ac_ext <<_ACEOF
16149 #line 16149 "configure"
16150 #include "confdefs.h"
16151 #include <dbmalloc.h>
16152 _ACEOF
16153 if { (eval echo "$as_me:16153: \"$ac_cpp conftest.$ac_ext\"") >&5
16154   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16155   ac_status=$?
16156   egrep -v '^ *\+' conftest.er1 >conftest.err
16157   rm -f conftest.er1
16158   cat conftest.err >&5
16159   echo "$as_me:16159: \$? = $ac_status" >&5
16160   (exit $ac_status); } >/dev/null; then
16161   if test -s conftest.err; then
16162     ac_cpp_err=$ac_c_preproc_warn_flag
16163   else
16164     ac_cpp_err=
16165   fi
16166 else
16167   ac_cpp_err=yes
16168 fi
16169 if test -z "$ac_cpp_err"; then
16170   ac_cv_header_dbmalloc_h=yes
16171 else
16172   echo "$as_me: failed program was:" >&5
16173   cat conftest.$ac_ext >&5
16174   ac_cv_header_dbmalloc_h=no
16175 fi
16176 rm -f conftest.err conftest.$ac_ext
16177 fi
16178 echo "$as_me:16178: result: $ac_cv_header_dbmalloc_h" >&5
16179 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16180 if test $ac_cv_header_dbmalloc_h = yes; then
16181
16182 echo "$as_me:16182: checking for debug_malloc in -ldbmalloc" >&5
16183 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16184 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16185   echo $ECHO_N "(cached) $ECHO_C" >&6
16186 else
16187   ac_check_lib_save_LIBS=$LIBS
16188 LIBS="-ldbmalloc  $LIBS"
16189 cat >conftest.$ac_ext <<_ACEOF
16190 #line 16190 "configure"
16191 #include "confdefs.h"
16192
16193 /* Override any gcc2 internal prototype to avoid an error.  */
16194 #ifdef __cplusplus
16195 extern "C"
16196 #endif
16197 /* We use char because int might match the return type of a gcc2
16198    builtin and then its argument prototype would still apply.  */
16199 char debug_malloc ();
16200 int
16201 main (void)
16202 {
16203 debug_malloc ();
16204   ;
16205   return 0;
16206 }
16207 _ACEOF
16208 rm -f conftest.$ac_objext conftest$ac_exeext
16209 if { (eval echo "$as_me:16209: \"$ac_link\"") >&5
16210   (eval $ac_link) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); } &&
16214          { ac_try='test -s conftest$ac_exeext'
16215   { (eval echo "$as_me:16215: \"$ac_try\"") >&5
16216   (eval $ac_try) 2>&5
16217   ac_status=$?
16218   echo "$as_me:16218: \$? = $ac_status" >&5
16219   (exit $ac_status); }; }; then
16220   ac_cv_lib_dbmalloc_debug_malloc=yes
16221 else
16222   echo "$as_me: failed program was:" >&5
16223 cat conftest.$ac_ext >&5
16224 ac_cv_lib_dbmalloc_debug_malloc=no
16225 fi
16226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16227 LIBS=$ac_check_lib_save_LIBS
16228 fi
16229 echo "$as_me:16229: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16230 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16231 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16232   cat >>confdefs.h <<EOF
16233 #define HAVE_LIBDBMALLOC 1
16234 EOF
16235
16236   LIBS="-ldbmalloc $LIBS"
16237
16238 fi
16239
16240 fi
16241
16242 fi
16243
16244 echo "$as_me:16244: checking if you want to use valgrind for testing" >&5
16245 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16246
16247 # Check whether --with-valgrind or --without-valgrind was given.
16248 if test "${with_valgrind+set}" = set; then
16249   withval="$with_valgrind"
16250
16251 cat >>confdefs.h <<EOF
16252 #define USE_VALGRIND 1
16253 EOF
16254
16255         : ${with_cflags:=-g}
16256         : ${with_no_leaks:=yes}
16257          with_valgrind=yes
16258 else
16259   with_valgrind=
16260 fi;
16261 echo "$as_me:16261: result: ${with_valgrind:-no}" >&5
16262 echo "${ECHO_T}${with_valgrind:-no}" >&6
16263
16264 case .$with_cflags in
16265 (.*-g*)
16266         case .$CFLAGS in
16267         (.*-g*)
16268                 ;;
16269         (*)
16270
16271 cf_fix_cppflags=no
16272 cf_new_cflags=
16273 cf_new_cppflags=
16274 cf_new_extra_cppflags=
16275
16276 for cf_add_cflags in -g
16277 do
16278 case $cf_fix_cppflags in
16279 (no)
16280         case $cf_add_cflags in
16281         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16282                 case $cf_add_cflags in
16283                 (-D*)
16284                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16285
16286                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16287                                 && test -z "${cf_tst_cflags}" \
16288                                 && cf_fix_cppflags=yes
16289
16290                         if test $cf_fix_cppflags = yes ; then
16291
16292         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16293         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16294
16295                                 continue
16296                         elif test "${cf_tst_cflags}" = "\"'" ; then
16297
16298         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16299         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16300
16301                                 continue
16302                         fi
16303                         ;;
16304                 esac
16305                 case "$CPPFLAGS" in
16306                 (*$cf_add_cflags)
16307                         ;;
16308                 (*)
16309                         case $cf_add_cflags in
16310                         (-D*)
16311                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16312
16313 CPPFLAGS=`echo "$CPPFLAGS" | \
16314         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16315                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16316
16317                                 ;;
16318                         esac
16319
16320         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16321         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16322
16323                         ;;
16324                 esac
16325                 ;;
16326         (*)
16327
16328         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16329         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16330
16331                 ;;
16332         esac
16333         ;;
16334 (yes)
16335
16336         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16337         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16338
16339         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16340
16341         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16342                 && test -z "${cf_tst_cflags}" \
16343                 && cf_fix_cppflags=no
16344         ;;
16345 esac
16346 done
16347
16348 if test -n "$cf_new_cflags" ; then
16349
16350         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16351         CFLAGS="${CFLAGS}$cf_new_cflags"
16352
16353 fi
16354
16355 if test -n "$cf_new_cppflags" ; then
16356
16357         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16358         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16359
16360 fi
16361
16362 if test -n "$cf_new_extra_cppflags" ; then
16363
16364         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16365         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16366
16367 fi
16368
16369                 ;;
16370         esac
16371         ;;
16372 esac
16373
16374 echo "$as_me:16374: checking if you want to perform memory-leak testing" >&5
16375 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16376
16377 # Check whether --enable-leaks or --disable-leaks was given.
16378 if test "${enable_leaks+set}" = set; then
16379   enableval="$enable_leaks"
16380   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16381 else
16382   : ${with_no_leaks:=no}
16383 fi;
16384 echo "$as_me:16384: result: $with_no_leaks" >&5
16385 echo "${ECHO_T}$with_no_leaks" >&6
16386
16387 if test "$with_no_leaks" = yes ; then
16388
16389 cat >>confdefs.h <<\EOF
16390 #define NO_LEAKS 1
16391 EOF
16392
16393 cat >>confdefs.h <<\EOF
16394 #define YY_NO_LEAKS 1
16395 EOF
16396
16397 fi
16398
16399 cat >>confdefs.h <<\EOF
16400 #define HAVE_NC_ALLOC_H 1
16401 EOF
16402
16403 ###     use option --enable-expanded to generate certain macros as functions
16404
16405 # Check whether --enable-expanded or --disable-expanded was given.
16406 if test "${enable_expanded+set}" = set; then
16407   enableval="$enable_expanded"
16408   test "x$enableval" = xyes &&
16409 cat >>confdefs.h <<\EOF
16410 #define NCURSES_EXPANDED 1
16411 EOF
16412
16413 fi;
16414
16415 ###     use option --disable-macros to suppress macros in favor of functions
16416
16417 # Check whether --enable-macros or --disable-macros was given.
16418 if test "${enable_macros+set}" = set; then
16419   enableval="$enable_macros"
16420   test "$enableval" = no &&
16421 cat >>confdefs.h <<\EOF
16422 #define NCURSES_NOMACROS 1
16423 EOF
16424
16425 fi;
16426
16427 # Normally we only add trace() to the debug-library.  Allow this to be
16428 # extended to all models of the ncurses library:
16429 cf_all_traces=no
16430 case "$CFLAGS $CPPFLAGS" in
16431 (*-DTRACE*)
16432         cf_all_traces=yes
16433         ;;
16434 esac
16435
16436 echo "$as_me:16436: checking whether to add trace feature to all models" >&5
16437 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16438
16439 # Check whether --with-trace or --without-trace was given.
16440 if test "${with_trace+set}" = set; then
16441   withval="$with_trace"
16442   cf_with_trace=$withval
16443 else
16444   cf_with_trace=$cf_all_traces
16445 fi;
16446 echo "$as_me:16446: result: $cf_with_trace" >&5
16447 echo "${ECHO_T}$cf_with_trace" >&6
16448
16449 if test "x$cf_with_trace" = xyes ; then
16450         LIB_TRACING=all
16451         ADA_TRACE=TRUE
16452
16453 cf_fix_cppflags=no
16454 cf_new_cflags=
16455 cf_new_cppflags=
16456 cf_new_extra_cppflags=
16457
16458 for cf_add_cflags in -DTRACE
16459 do
16460 case $cf_fix_cppflags in
16461 (no)
16462         case $cf_add_cflags in
16463         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16464                 case $cf_add_cflags in
16465                 (-D*)
16466                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16467
16468                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16469                                 && test -z "${cf_tst_cflags}" \
16470                                 && cf_fix_cppflags=yes
16471
16472                         if test $cf_fix_cppflags = yes ; then
16473
16474         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16475         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16476
16477                                 continue
16478                         elif test "${cf_tst_cflags}" = "\"'" ; then
16479
16480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16482
16483                                 continue
16484                         fi
16485                         ;;
16486                 esac
16487                 case "$CPPFLAGS" in
16488                 (*$cf_add_cflags)
16489                         ;;
16490                 (*)
16491                         case $cf_add_cflags in
16492                         (-D*)
16493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16494
16495 CPPFLAGS=`echo "$CPPFLAGS" | \
16496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16498
16499                                 ;;
16500                         esac
16501
16502         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16503         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16504
16505                         ;;
16506                 esac
16507                 ;;
16508         (*)
16509
16510         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16511         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16512
16513                 ;;
16514         esac
16515         ;;
16516 (yes)
16517
16518         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16519         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16520
16521         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16522
16523         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16524                 && test -z "${cf_tst_cflags}" \
16525                 && cf_fix_cppflags=no
16526         ;;
16527 esac
16528 done
16529
16530 if test -n "$cf_new_cflags" ; then
16531
16532         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16533         CFLAGS="${CFLAGS}$cf_new_cflags"
16534
16535 fi
16536
16537 if test -n "$cf_new_cppflags" ; then
16538
16539         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16540         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16541
16542 fi
16543
16544 if test -n "$cf_new_extra_cppflags" ; then
16545
16546         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16547         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16548
16549 fi
16550
16551 cat >>confdefs.h <<\EOF
16552 #define HAVE__TRACEF 1
16553 EOF
16554
16555 else
16556         LIB_TRACING=DEBUG
16557         ADA_TRACE=FALSE
16558 fi
16559
16560 echo "$as_me:16560: checking if we want to use GNAT projects" >&5
16561 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16562
16563 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16564 if test "${enable_gnat_projects+set}" = set; then
16565   enableval="$enable_gnat_projects"
16566   test "$enableval" != no && enableval=yes
16567         if test "$enableval" != "yes" ; then
16568     enable_gnat_projects=no
16569         else
16570                 enable_gnat_projects=yes
16571         fi
16572 else
16573   enableval=yes
16574         enable_gnat_projects=yes
16575
16576 fi;
16577 echo "$as_me:16577: result: $enable_gnat_projects" >&5
16578 echo "${ECHO_T}$enable_gnat_projects" >&6
16579
16580 ###     Checks for libraries.
16581 case $cf_cv_system_name in
16582 (*mingw32*|*mingw64*)
16583         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16584         LIBS=" -lpsapi $LIBS"
16585         ;;
16586 (*)
16587 echo "$as_me:16587: checking for gettimeofday" >&5
16588 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16589 if test "${ac_cv_func_gettimeofday+set}" = set; then
16590   echo $ECHO_N "(cached) $ECHO_C" >&6
16591 else
16592   cat >conftest.$ac_ext <<_ACEOF
16593 #line 16593 "configure"
16594 #include "confdefs.h"
16595 /* System header to define __stub macros and hopefully few prototypes,
16596     which can conflict with char gettimeofday (); below.  */
16597 #include <assert.h>
16598 /* Override any gcc2 internal prototype to avoid an error.  */
16599 #ifdef __cplusplus
16600 extern "C"
16601 #endif
16602 /* We use char because int might match the return type of a gcc2
16603    builtin and then its argument prototype would still apply.  */
16604 char gettimeofday ();
16605 char (*f) ();
16606
16607 int
16608 main (void)
16609 {
16610 /* The GNU C library defines this for functions which it implements
16611     to always fail with ENOSYS.  Some functions are actually named
16612     something starting with __ and the normal name is an alias.  */
16613 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16614 choke me
16615 #else
16616 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16617 #endif
16618
16619   ;
16620   return 0;
16621 }
16622 _ACEOF
16623 rm -f conftest.$ac_objext conftest$ac_exeext
16624 if { (eval echo "$as_me:16624: \"$ac_link\"") >&5
16625   (eval $ac_link) 2>&5
16626   ac_status=$?
16627   echo "$as_me:16627: \$? = $ac_status" >&5
16628   (exit $ac_status); } &&
16629          { ac_try='test -s conftest$ac_exeext'
16630   { (eval echo "$as_me:16630: \"$ac_try\"") >&5
16631   (eval $ac_try) 2>&5
16632   ac_status=$?
16633   echo "$as_me:16633: \$? = $ac_status" >&5
16634   (exit $ac_status); }; }; then
16635   ac_cv_func_gettimeofday=yes
16636 else
16637   echo "$as_me: failed program was:" >&5
16638 cat conftest.$ac_ext >&5
16639 ac_cv_func_gettimeofday=no
16640 fi
16641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16642 fi
16643 echo "$as_me:16643: result: $ac_cv_func_gettimeofday" >&5
16644 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16645 if test $ac_cv_func_gettimeofday = yes; then
16646
16647 cat >>confdefs.h <<\EOF
16648 #define HAVE_GETTIMEOFDAY 1
16649 EOF
16650
16651 else
16652
16653 echo "$as_me:16653: checking for gettimeofday in -lbsd" >&5
16654 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16655 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16656   echo $ECHO_N "(cached) $ECHO_C" >&6
16657 else
16658   ac_check_lib_save_LIBS=$LIBS
16659 LIBS="-lbsd  $LIBS"
16660 cat >conftest.$ac_ext <<_ACEOF
16661 #line 16661 "configure"
16662 #include "confdefs.h"
16663
16664 /* Override any gcc2 internal prototype to avoid an error.  */
16665 #ifdef __cplusplus
16666 extern "C"
16667 #endif
16668 /* We use char because int might match the return type of a gcc2
16669    builtin and then its argument prototype would still apply.  */
16670 char gettimeofday ();
16671 int
16672 main (void)
16673 {
16674 gettimeofday ();
16675   ;
16676   return 0;
16677 }
16678 _ACEOF
16679 rm -f conftest.$ac_objext conftest$ac_exeext
16680 if { (eval echo "$as_me:16680: \"$ac_link\"") >&5
16681   (eval $ac_link) 2>&5
16682   ac_status=$?
16683   echo "$as_me:16683: \$? = $ac_status" >&5
16684   (exit $ac_status); } &&
16685          { ac_try='test -s conftest$ac_exeext'
16686   { (eval echo "$as_me:16686: \"$ac_try\"") >&5
16687   (eval $ac_try) 2>&5
16688   ac_status=$?
16689   echo "$as_me:16689: \$? = $ac_status" >&5
16690   (exit $ac_status); }; }; then
16691   ac_cv_lib_bsd_gettimeofday=yes
16692 else
16693   echo "$as_me: failed program was:" >&5
16694 cat conftest.$ac_ext >&5
16695 ac_cv_lib_bsd_gettimeofday=no
16696 fi
16697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16698 LIBS=$ac_check_lib_save_LIBS
16699 fi
16700 echo "$as_me:16700: result: $ac_cv_lib_bsd_gettimeofday" >&5
16701 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16702 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16703
16704 cat >>confdefs.h <<\EOF
16705 #define HAVE_GETTIMEOFDAY 1
16706 EOF
16707
16708 cf_add_libs="-lbsd"
16709 # Filter out duplicates - this happens with badly-designed ".pc" files...
16710 for cf_add_1lib in $LIBS
16711 do
16712         for cf_add_2lib in $cf_add_libs
16713         do
16714                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16715                 then
16716                         cf_add_1lib=
16717                         break
16718                 fi
16719         done
16720         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16721 done
16722 LIBS="$cf_add_libs"
16723
16724 fi
16725
16726 fi
16727         ;;
16728 esac
16729
16730 echo "$as_me:16730: checking if -lm needed for math functions" >&5
16731 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16732 if test "${cf_cv_need_libm+set}" = set; then
16733   echo $ECHO_N "(cached) $ECHO_C" >&6
16734 else
16735
16736         cat >conftest.$ac_ext <<_ACEOF
16737 #line 16737 "configure"
16738 #include "confdefs.h"
16739
16740         #include <stdio.h>
16741         #include <stdlib.h>
16742         #include <math.h>
16743
16744 int
16745 main (void)
16746 {
16747 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16748   ;
16749   return 0;
16750 }
16751 _ACEOF
16752 rm -f conftest.$ac_objext conftest$ac_exeext
16753 if { (eval echo "$as_me:16753: \"$ac_link\"") >&5
16754   (eval $ac_link) 2>&5
16755   ac_status=$?
16756   echo "$as_me:16756: \$? = $ac_status" >&5
16757   (exit $ac_status); } &&
16758          { ac_try='test -s conftest$ac_exeext'
16759   { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760   (eval $ac_try) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); }; }; then
16764   cf_cv_need_libm=no
16765 else
16766   echo "$as_me: failed program was:" >&5
16767 cat conftest.$ac_ext >&5
16768 cf_cv_need_libm=yes
16769 fi
16770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16771 fi
16772 echo "$as_me:16772: result: $cf_cv_need_libm" >&5
16773 echo "${ECHO_T}$cf_cv_need_libm" >&6
16774 if test "$cf_cv_need_libm" = yes
16775 then
16776 MATH_LIB=-lm
16777 fi
16778
16779 ###     Checks for header files.
16780 echo "$as_me:16780: checking for ANSI C header files" >&5
16781 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16782 if test "${ac_cv_header_stdc+set}" = set; then
16783   echo $ECHO_N "(cached) $ECHO_C" >&6
16784 else
16785   cat >conftest.$ac_ext <<_ACEOF
16786 #line 16786 "configure"
16787 #include "confdefs.h"
16788 #include <stdlib.h>
16789 #include <stdarg.h>
16790 #include <string.h>
16791 #include <float.h>
16792
16793 _ACEOF
16794 if { (eval echo "$as_me:16794: \"$ac_cpp conftest.$ac_ext\"") >&5
16795   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16796   ac_status=$?
16797   egrep -v '^ *\+' conftest.er1 >conftest.err
16798   rm -f conftest.er1
16799   cat conftest.err >&5
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); } >/dev/null; then
16802   if test -s conftest.err; then
16803     ac_cpp_err=$ac_c_preproc_warn_flag
16804   else
16805     ac_cpp_err=
16806   fi
16807 else
16808   ac_cpp_err=yes
16809 fi
16810 if test -z "$ac_cpp_err"; then
16811   ac_cv_header_stdc=yes
16812 else
16813   echo "$as_me: failed program was:" >&5
16814   cat conftest.$ac_ext >&5
16815   ac_cv_header_stdc=no
16816 fi
16817 rm -f conftest.err conftest.$ac_ext
16818
16819 if test $ac_cv_header_stdc = yes; then
16820   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16821   cat >conftest.$ac_ext <<_ACEOF
16822 #line 16822 "configure"
16823 #include "confdefs.h"
16824 #include <string.h>
16825
16826 _ACEOF
16827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16828   egrep "memchr" >/dev/null 2>&1; then
16829   :
16830 else
16831   ac_cv_header_stdc=no
16832 fi
16833 rm -rf conftest*
16834
16835 fi
16836
16837 if test $ac_cv_header_stdc = yes; then
16838   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16839   cat >conftest.$ac_ext <<_ACEOF
16840 #line 16840 "configure"
16841 #include "confdefs.h"
16842 #include <stdlib.h>
16843
16844 _ACEOF
16845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16846   egrep "free" >/dev/null 2>&1; then
16847   :
16848 else
16849   ac_cv_header_stdc=no
16850 fi
16851 rm -rf conftest*
16852
16853 fi
16854
16855 if test $ac_cv_header_stdc = yes; then
16856   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16857   if test "$cross_compiling" = yes; then
16858   :
16859 else
16860   cat >conftest.$ac_ext <<_ACEOF
16861 #line 16861 "configure"
16862 #include "confdefs.h"
16863 #include <ctype.h>
16864 #if ((' ' & 0x0FF) == 0x020)
16865 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16866 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16867 #else
16868 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16869                      || ('j' <= (c) && (c) <= 'r') \
16870                      || ('s' <= (c) && (c) <= 'z'))
16871 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16872 #endif
16873
16874 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16875 int
16876 main (void)
16877 {
16878   int i;
16879   for (i = 0; i < 256; i++)
16880     if (XOR (islower (i), ISLOWER (i))
16881         || toupper (i) != TOUPPER (i))
16882       $ac_main_return(2);
16883   $ac_main_return (0);
16884 }
16885 _ACEOF
16886 rm -f conftest$ac_exeext
16887 if { (eval echo "$as_me:16887: \"$ac_link\"") >&5
16888   (eval $ac_link) 2>&5
16889   ac_status=$?
16890   echo "$as_me:16890: \$? = $ac_status" >&5
16891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16892   { (eval echo "$as_me:16892: \"$ac_try\"") >&5
16893   (eval $ac_try) 2>&5
16894   ac_status=$?
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); }; }; then
16897   :
16898 else
16899   echo "$as_me: program exited with status $ac_status" >&5
16900 echo "$as_me: failed program was:" >&5
16901 cat conftest.$ac_ext >&5
16902 ac_cv_header_stdc=no
16903 fi
16904 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16905 fi
16906 fi
16907 fi
16908 echo "$as_me:16908: result: $ac_cv_header_stdc" >&5
16909 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16910 if test $ac_cv_header_stdc = yes; then
16911
16912 cat >>confdefs.h <<\EOF
16913 #define STDC_HEADERS 1
16914 EOF
16915
16916 fi
16917
16918 ac_header_dirent=no
16919 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16920   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16921 echo "$as_me:16921: checking for $ac_hdr that defines DIR" >&5
16922 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16923 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16924   echo $ECHO_N "(cached) $ECHO_C" >&6
16925 else
16926   cat >conftest.$ac_ext <<_ACEOF
16927 #line 16927 "configure"
16928 #include "confdefs.h"
16929 #include <sys/types.h>
16930 #include <$ac_hdr>
16931
16932 int
16933 main (void)
16934 {
16935 if ((DIR *) 0)
16936 return 0;
16937   ;
16938   return 0;
16939 }
16940 _ACEOF
16941 rm -f conftest.$ac_objext
16942 if { (eval echo "$as_me:16942: \"$ac_compile\"") >&5
16943   (eval $ac_compile) 2>&5
16944   ac_status=$?
16945   echo "$as_me:16945: \$? = $ac_status" >&5
16946   (exit $ac_status); } &&
16947          { ac_try='test -s conftest.$ac_objext'
16948   { (eval echo "$as_me:16948: \"$ac_try\"") >&5
16949   (eval $ac_try) 2>&5
16950   ac_status=$?
16951   echo "$as_me:16951: \$? = $ac_status" >&5
16952   (exit $ac_status); }; }; then
16953   eval "$as_ac_Header=yes"
16954 else
16955   echo "$as_me: failed program was:" >&5
16956 cat conftest.$ac_ext >&5
16957 eval "$as_ac_Header=no"
16958 fi
16959 rm -f conftest.$ac_objext conftest.$ac_ext
16960 fi
16961 echo "$as_me:16961: result: `eval echo '${'$as_ac_Header'}'`" >&5
16962 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16963 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16964   cat >>confdefs.h <<EOF
16965 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16966 EOF
16967
16968 ac_header_dirent=$ac_hdr; break
16969 fi
16970
16971 done
16972 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16973 if test $ac_header_dirent = dirent.h; then
16974   echo "$as_me:16974: checking for opendir in -ldir" >&5
16975 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16976 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16977   echo $ECHO_N "(cached) $ECHO_C" >&6
16978 else
16979   ac_check_lib_save_LIBS=$LIBS
16980 LIBS="-ldir  $LIBS"
16981 cat >conftest.$ac_ext <<_ACEOF
16982 #line 16982 "configure"
16983 #include "confdefs.h"
16984
16985 /* Override any gcc2 internal prototype to avoid an error.  */
16986 #ifdef __cplusplus
16987 extern "C"
16988 #endif
16989 /* We use char because int might match the return type of a gcc2
16990    builtin and then its argument prototype would still apply.  */
16991 char opendir ();
16992 int
16993 main (void)
16994 {
16995 opendir ();
16996   ;
16997   return 0;
16998 }
16999 _ACEOF
17000 rm -f conftest.$ac_objext conftest$ac_exeext
17001 if { (eval echo "$as_me:17001: \"$ac_link\"") >&5
17002   (eval $ac_link) 2>&5
17003   ac_status=$?
17004   echo "$as_me:17004: \$? = $ac_status" >&5
17005   (exit $ac_status); } &&
17006          { ac_try='test -s conftest$ac_exeext'
17007   { (eval echo "$as_me:17007: \"$ac_try\"") >&5
17008   (eval $ac_try) 2>&5
17009   ac_status=$?
17010   echo "$as_me:17010: \$? = $ac_status" >&5
17011   (exit $ac_status); }; }; then
17012   ac_cv_lib_dir_opendir=yes
17013 else
17014   echo "$as_me: failed program was:" >&5
17015 cat conftest.$ac_ext >&5
17016 ac_cv_lib_dir_opendir=no
17017 fi
17018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17019 LIBS=$ac_check_lib_save_LIBS
17020 fi
17021 echo "$as_me:17021: result: $ac_cv_lib_dir_opendir" >&5
17022 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17023 if test $ac_cv_lib_dir_opendir = yes; then
17024   LIBS="$LIBS -ldir"
17025 fi
17026
17027 else
17028   echo "$as_me:17028: checking for opendir in -lx" >&5
17029 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17030 if test "${ac_cv_lib_x_opendir+set}" = set; then
17031   echo $ECHO_N "(cached) $ECHO_C" >&6
17032 else
17033   ac_check_lib_save_LIBS=$LIBS
17034 LIBS="-lx  $LIBS"
17035 cat >conftest.$ac_ext <<_ACEOF
17036 #line 17036 "configure"
17037 #include "confdefs.h"
17038
17039 /* Override any gcc2 internal prototype to avoid an error.  */
17040 #ifdef __cplusplus
17041 extern "C"
17042 #endif
17043 /* We use char because int might match the return type of a gcc2
17044    builtin and then its argument prototype would still apply.  */
17045 char opendir ();
17046 int
17047 main (void)
17048 {
17049 opendir ();
17050   ;
17051   return 0;
17052 }
17053 _ACEOF
17054 rm -f conftest.$ac_objext conftest$ac_exeext
17055 if { (eval echo "$as_me:17055: \"$ac_link\"") >&5
17056   (eval $ac_link) 2>&5
17057   ac_status=$?
17058   echo "$as_me:17058: \$? = $ac_status" >&5
17059   (exit $ac_status); } &&
17060          { ac_try='test -s conftest$ac_exeext'
17061   { (eval echo "$as_me:17061: \"$ac_try\"") >&5
17062   (eval $ac_try) 2>&5
17063   ac_status=$?
17064   echo "$as_me:17064: \$? = $ac_status" >&5
17065   (exit $ac_status); }; }; then
17066   ac_cv_lib_x_opendir=yes
17067 else
17068   echo "$as_me: failed program was:" >&5
17069 cat conftest.$ac_ext >&5
17070 ac_cv_lib_x_opendir=no
17071 fi
17072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17073 LIBS=$ac_check_lib_save_LIBS
17074 fi
17075 echo "$as_me:17075: result: $ac_cv_lib_x_opendir" >&5
17076 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17077 if test $ac_cv_lib_x_opendir = yes; then
17078   LIBS="$LIBS -lx"
17079 fi
17080
17081 fi
17082
17083 echo "$as_me:17083: checking whether time.h and sys/time.h may both be included" >&5
17084 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17085 if test "${ac_cv_header_time+set}" = set; then
17086   echo $ECHO_N "(cached) $ECHO_C" >&6
17087 else
17088   cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091 #include <sys/types.h>
17092 #include <sys/time.h>
17093 #include <time.h>
17094
17095 int
17096 main (void)
17097 {
17098 if ((struct tm *) 0)
17099 return 0;
17100   ;
17101   return 0;
17102 }
17103 _ACEOF
17104 rm -f conftest.$ac_objext
17105 if { (eval echo "$as_me:17105: \"$ac_compile\"") >&5
17106   (eval $ac_compile) 2>&5
17107   ac_status=$?
17108   echo "$as_me:17108: \$? = $ac_status" >&5
17109   (exit $ac_status); } &&
17110          { ac_try='test -s conftest.$ac_objext'
17111   { (eval echo "$as_me:17111: \"$ac_try\"") >&5
17112   (eval $ac_try) 2>&5
17113   ac_status=$?
17114   echo "$as_me:17114: \$? = $ac_status" >&5
17115   (exit $ac_status); }; }; then
17116   ac_cv_header_time=yes
17117 else
17118   echo "$as_me: failed program was:" >&5
17119 cat conftest.$ac_ext >&5
17120 ac_cv_header_time=no
17121 fi
17122 rm -f conftest.$ac_objext conftest.$ac_ext
17123 fi
17124 echo "$as_me:17124: result: $ac_cv_header_time" >&5
17125 echo "${ECHO_T}$ac_cv_header_time" >&6
17126 if test $ac_cv_header_time = yes; then
17127
17128 cat >>confdefs.h <<\EOF
17129 #define TIME_WITH_SYS_TIME 1
17130 EOF
17131
17132 fi
17133
17134 cf_regex_func=no
17135
17136 cf_regex_libs="regex re"
17137 case $host_os in
17138 (mingw*)
17139         cf_regex_libs="gnurx $cf_regex_libs"
17140         ;;
17141 esac
17142
17143 echo "$as_me:17143: checking for regcomp" >&5
17144 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17145 if test "${ac_cv_func_regcomp+set}" = set; then
17146   echo $ECHO_N "(cached) $ECHO_C" >&6
17147 else
17148   cat >conftest.$ac_ext <<_ACEOF
17149 #line 17149 "configure"
17150 #include "confdefs.h"
17151 /* System header to define __stub macros and hopefully few prototypes,
17152     which can conflict with char regcomp (); below.  */
17153 #include <assert.h>
17154 /* Override any gcc2 internal prototype to avoid an error.  */
17155 #ifdef __cplusplus
17156 extern "C"
17157 #endif
17158 /* We use char because int might match the return type of a gcc2
17159    builtin and then its argument prototype would still apply.  */
17160 char regcomp ();
17161 char (*f) ();
17162
17163 int
17164 main (void)
17165 {
17166 /* The GNU C library defines this for functions which it implements
17167     to always fail with ENOSYS.  Some functions are actually named
17168     something starting with __ and the normal name is an alias.  */
17169 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17170 choke me
17171 #else
17172 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17173 #endif
17174
17175   ;
17176   return 0;
17177 }
17178 _ACEOF
17179 rm -f conftest.$ac_objext conftest$ac_exeext
17180 if { (eval echo "$as_me:17180: \"$ac_link\"") >&5
17181   (eval $ac_link) 2>&5
17182   ac_status=$?
17183   echo "$as_me:17183: \$? = $ac_status" >&5
17184   (exit $ac_status); } &&
17185          { ac_try='test -s conftest$ac_exeext'
17186   { (eval echo "$as_me:17186: \"$ac_try\"") >&5
17187   (eval $ac_try) 2>&5
17188   ac_status=$?
17189   echo "$as_me:17189: \$? = $ac_status" >&5
17190   (exit $ac_status); }; }; then
17191   ac_cv_func_regcomp=yes
17192 else
17193   echo "$as_me: failed program was:" >&5
17194 cat conftest.$ac_ext >&5
17195 ac_cv_func_regcomp=no
17196 fi
17197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17198 fi
17199 echo "$as_me:17199: result: $ac_cv_func_regcomp" >&5
17200 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17201 if test $ac_cv_func_regcomp = yes; then
17202   cf_regex_func=regcomp
17203 else
17204
17205         for cf_regex_lib in $cf_regex_libs
17206         do
17207                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17208 echo "$as_me:17208: checking for regcomp in -l$cf_regex_lib" >&5
17209 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17210 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17211   echo $ECHO_N "(cached) $ECHO_C" >&6
17212 else
17213   ac_check_lib_save_LIBS=$LIBS
17214 LIBS="-l$cf_regex_lib  $LIBS"
17215 cat >conftest.$ac_ext <<_ACEOF
17216 #line 17216 "configure"
17217 #include "confdefs.h"
17218
17219 /* Override any gcc2 internal prototype to avoid an error.  */
17220 #ifdef __cplusplus
17221 extern "C"
17222 #endif
17223 /* We use char because int might match the return type of a gcc2
17224    builtin and then its argument prototype would still apply.  */
17225 char regcomp ();
17226 int
17227 main (void)
17228 {
17229 regcomp ();
17230   ;
17231   return 0;
17232 }
17233 _ACEOF
17234 rm -f conftest.$ac_objext conftest$ac_exeext
17235 if { (eval echo "$as_me:17235: \"$ac_link\"") >&5
17236   (eval $ac_link) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); } &&
17240          { ac_try='test -s conftest$ac_exeext'
17241   { (eval echo "$as_me:17241: \"$ac_try\"") >&5
17242   (eval $ac_try) 2>&5
17243   ac_status=$?
17244   echo "$as_me:17244: \$? = $ac_status" >&5
17245   (exit $ac_status); }; }; then
17246   eval "$as_ac_Lib=yes"
17247 else
17248   echo "$as_me: failed program was:" >&5
17249 cat conftest.$ac_ext >&5
17250 eval "$as_ac_Lib=no"
17251 fi
17252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17253 LIBS=$ac_check_lib_save_LIBS
17254 fi
17255 echo "$as_me:17255: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17256 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17257 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17258
17259 cf_add_libs="-l$cf_regex_lib"
17260 # Filter out duplicates - this happens with badly-designed ".pc" files...
17261 for cf_add_1lib in $LIBS
17262 do
17263         for cf_add_2lib in $cf_add_libs
17264         do
17265                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17266                 then
17267                         cf_add_1lib=
17268                         break
17269                 fi
17270         done
17271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17272 done
17273 LIBS="$cf_add_libs"
17274
17275                                 cf_regex_func=regcomp
17276                                 break
17277 fi
17278
17279         done
17280
17281 fi
17282
17283 if test "$cf_regex_func" = no ; then
17284         echo "$as_me:17284: checking for compile" >&5
17285 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17286 if test "${ac_cv_func_compile+set}" = set; then
17287   echo $ECHO_N "(cached) $ECHO_C" >&6
17288 else
17289   cat >conftest.$ac_ext <<_ACEOF
17290 #line 17290 "configure"
17291 #include "confdefs.h"
17292 /* System header to define __stub macros and hopefully few prototypes,
17293     which can conflict with char compile (); below.  */
17294 #include <assert.h>
17295 /* Override any gcc2 internal prototype to avoid an error.  */
17296 #ifdef __cplusplus
17297 extern "C"
17298 #endif
17299 /* We use char because int might match the return type of a gcc2
17300    builtin and then its argument prototype would still apply.  */
17301 char compile ();
17302 char (*f) ();
17303
17304 int
17305 main (void)
17306 {
17307 /* The GNU C library defines this for functions which it implements
17308     to always fail with ENOSYS.  Some functions are actually named
17309     something starting with __ and the normal name is an alias.  */
17310 #if defined (__stub_compile) || defined (__stub___compile)
17311 choke me
17312 #else
17313 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17314 #endif
17315
17316   ;
17317   return 0;
17318 }
17319 _ACEOF
17320 rm -f conftest.$ac_objext conftest$ac_exeext
17321 if { (eval echo "$as_me:17321: \"$ac_link\"") >&5
17322   (eval $ac_link) 2>&5
17323   ac_status=$?
17324   echo "$as_me:17324: \$? = $ac_status" >&5
17325   (exit $ac_status); } &&
17326          { ac_try='test -s conftest$ac_exeext'
17327   { (eval echo "$as_me:17327: \"$ac_try\"") >&5
17328   (eval $ac_try) 2>&5
17329   ac_status=$?
17330   echo "$as_me:17330: \$? = $ac_status" >&5
17331   (exit $ac_status); }; }; then
17332   ac_cv_func_compile=yes
17333 else
17334   echo "$as_me: failed program was:" >&5
17335 cat conftest.$ac_ext >&5
17336 ac_cv_func_compile=no
17337 fi
17338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17339 fi
17340 echo "$as_me:17340: result: $ac_cv_func_compile" >&5
17341 echo "${ECHO_T}$ac_cv_func_compile" >&6
17342 if test $ac_cv_func_compile = yes; then
17343   cf_regex_func=compile
17344 else
17345
17346                 echo "$as_me:17346: checking for compile in -lgen" >&5
17347 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17348 if test "${ac_cv_lib_gen_compile+set}" = set; then
17349   echo $ECHO_N "(cached) $ECHO_C" >&6
17350 else
17351   ac_check_lib_save_LIBS=$LIBS
17352 LIBS="-lgen  $LIBS"
17353 cat >conftest.$ac_ext <<_ACEOF
17354 #line 17354 "configure"
17355 #include "confdefs.h"
17356
17357 /* Override any gcc2 internal prototype to avoid an error.  */
17358 #ifdef __cplusplus
17359 extern "C"
17360 #endif
17361 /* We use char because int might match the return type of a gcc2
17362    builtin and then its argument prototype would still apply.  */
17363 char compile ();
17364 int
17365 main (void)
17366 {
17367 compile ();
17368   ;
17369   return 0;
17370 }
17371 _ACEOF
17372 rm -f conftest.$ac_objext conftest$ac_exeext
17373 if { (eval echo "$as_me:17373: \"$ac_link\"") >&5
17374   (eval $ac_link) 2>&5
17375   ac_status=$?
17376   echo "$as_me:17376: \$? = $ac_status" >&5
17377   (exit $ac_status); } &&
17378          { ac_try='test -s conftest$ac_exeext'
17379   { (eval echo "$as_me:17379: \"$ac_try\"") >&5
17380   (eval $ac_try) 2>&5
17381   ac_status=$?
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); }; }; then
17384   ac_cv_lib_gen_compile=yes
17385 else
17386   echo "$as_me: failed program was:" >&5
17387 cat conftest.$ac_ext >&5
17388 ac_cv_lib_gen_compile=no
17389 fi
17390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17391 LIBS=$ac_check_lib_save_LIBS
17392 fi
17393 echo "$as_me:17393: result: $ac_cv_lib_gen_compile" >&5
17394 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17395 if test $ac_cv_lib_gen_compile = yes; then
17396
17397 cf_add_libs="-lgen"
17398 # Filter out duplicates - this happens with badly-designed ".pc" files...
17399 for cf_add_1lib in $LIBS
17400 do
17401         for cf_add_2lib in $cf_add_libs
17402         do
17403                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17404                 then
17405                         cf_add_1lib=
17406                         break
17407                 fi
17408         done
17409         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17410 done
17411 LIBS="$cf_add_libs"
17412
17413                                 cf_regex_func=compile
17414 fi
17415
17416 fi
17417
17418 fi
17419
17420 if test "$cf_regex_func" = no ; then
17421         { echo "$as_me:17421: WARNING: cannot find regular expression library" >&5
17422 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17423 fi
17424
17425 echo "$as_me:17425: checking for regular-expression headers" >&5
17426 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17427 if test "${cf_cv_regex_hdrs+set}" = set; then
17428   echo $ECHO_N "(cached) $ECHO_C" >&6
17429 else
17430
17431 cf_cv_regex_hdrs=no
17432 case $cf_regex_func in
17433 (compile)
17434         for cf_regex_hdr in regexp.h regexpr.h
17435         do
17436                 cat >conftest.$ac_ext <<_ACEOF
17437 #line 17437 "configure"
17438 #include "confdefs.h"
17439 #include <$cf_regex_hdr>
17440 int
17441 main (void)
17442 {
17443
17444                         char *p = compile("", "", "", 0);
17445                         int x = step("", "");
17446
17447   ;
17448   return 0;
17449 }
17450 _ACEOF
17451 rm -f conftest.$ac_objext conftest$ac_exeext
17452 if { (eval echo "$as_me:17452: \"$ac_link\"") >&5
17453   (eval $ac_link) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit $ac_status); } &&
17457          { ac_try='test -s conftest$ac_exeext'
17458   { (eval echo "$as_me:17458: \"$ac_try\"") >&5
17459   (eval $ac_try) 2>&5
17460   ac_status=$?
17461   echo "$as_me:17461: \$? = $ac_status" >&5
17462   (exit $ac_status); }; }; then
17463
17464                         cf_cv_regex_hdrs=$cf_regex_hdr
17465                         break
17466
17467 else
17468   echo "$as_me: failed program was:" >&5
17469 cat conftest.$ac_ext >&5
17470 fi
17471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17472         done
17473         ;;
17474 (*)
17475         for cf_regex_hdr in regex.h
17476         do
17477                 cat >conftest.$ac_ext <<_ACEOF
17478 #line 17478 "configure"
17479 #include "confdefs.h"
17480 #include <sys/types.h>
17481 #include <$cf_regex_hdr>
17482 int
17483 main (void)
17484 {
17485
17486                         regex_t *p;
17487                         int x = regcomp(p, "", 0);
17488                         int y = regexec(p, "", 0, 0, 0);
17489                         regfree(p);
17490
17491   ;
17492   return 0;
17493 }
17494 _ACEOF
17495 rm -f conftest.$ac_objext conftest$ac_exeext
17496 if { (eval echo "$as_me:17496: \"$ac_link\"") >&5
17497   (eval $ac_link) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); } &&
17501          { ac_try='test -s conftest$ac_exeext'
17502   { (eval echo "$as_me:17502: \"$ac_try\"") >&5
17503   (eval $ac_try) 2>&5
17504   ac_status=$?
17505   echo "$as_me:17505: \$? = $ac_status" >&5
17506   (exit $ac_status); }; }; then
17507
17508                         cf_cv_regex_hdrs=$cf_regex_hdr
17509                         break
17510
17511 else
17512   echo "$as_me: failed program was:" >&5
17513 cat conftest.$ac_ext >&5
17514 fi
17515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17516         done
17517         ;;
17518 esac
17519
17520 fi
17521 echo "$as_me:17521: result: $cf_cv_regex_hdrs" >&5
17522 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17523
17524 case $cf_cv_regex_hdrs in
17525         (no)            { echo "$as_me:17525: WARNING: no regular expression header found" >&5
17526 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17527         (regex.h)
17528 cat >>confdefs.h <<\EOF
17529 #define HAVE_REGEX_H_FUNCS 1
17530 EOF
17531  ;;
17532         (regexp.h)
17533 cat >>confdefs.h <<\EOF
17534 #define HAVE_REGEXP_H_FUNCS 1
17535 EOF
17536  ;;
17537         (regexpr.h)
17538 cat >>confdefs.h <<\EOF
17539 #define HAVE_REGEXPR_H_FUNCS 1
17540 EOF
17541  ;;
17542 esac
17543
17544 for ac_header in \
17545 fcntl.h \
17546 getopt.h \
17547 limits.h \
17548 locale.h \
17549 math.h \
17550 poll.h \
17551 sys/bsdtypes.h \
17552 sys/ioctl.h \
17553 sys/param.h \
17554 sys/poll.h \
17555 sys/select.h \
17556 sys/time.h \
17557 sys/times.h \
17558 ttyent.h \
17559 unistd.h \
17560 wctype.h \
17561
17562 do
17563 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17564 echo "$as_me:17564: checking for $ac_header" >&5
17565 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17566 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17567   echo $ECHO_N "(cached) $ECHO_C" >&6
17568 else
17569   cat >conftest.$ac_ext <<_ACEOF
17570 #line 17570 "configure"
17571 #include "confdefs.h"
17572 #include <$ac_header>
17573 _ACEOF
17574 if { (eval echo "$as_me:17574: \"$ac_cpp conftest.$ac_ext\"") >&5
17575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17576   ac_status=$?
17577   egrep -v '^ *\+' conftest.er1 >conftest.err
17578   rm -f conftest.er1
17579   cat conftest.err >&5
17580   echo "$as_me:17580: \$? = $ac_status" >&5
17581   (exit $ac_status); } >/dev/null; then
17582   if test -s conftest.err; then
17583     ac_cpp_err=$ac_c_preproc_warn_flag
17584   else
17585     ac_cpp_err=
17586   fi
17587 else
17588   ac_cpp_err=yes
17589 fi
17590 if test -z "$ac_cpp_err"; then
17591   eval "$as_ac_Header=yes"
17592 else
17593   echo "$as_me: failed program was:" >&5
17594   cat conftest.$ac_ext >&5
17595   eval "$as_ac_Header=no"
17596 fi
17597 rm -f conftest.err conftest.$ac_ext
17598 fi
17599 echo "$as_me:17599: result: `eval echo '${'$as_ac_Header'}'`" >&5
17600 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17601 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17602   cat >>confdefs.h <<EOF
17603 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17604 EOF
17605
17606 fi
17607 done
17608
17609 for ac_header in unistd.h getopt.h
17610 do
17611 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17612 echo "$as_me:17612: checking for $ac_header" >&5
17613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17615   echo $ECHO_N "(cached) $ECHO_C" >&6
17616 else
17617   cat >conftest.$ac_ext <<_ACEOF
17618 #line 17618 "configure"
17619 #include "confdefs.h"
17620 #include <$ac_header>
17621 _ACEOF
17622 if { (eval echo "$as_me:17622: \"$ac_cpp conftest.$ac_ext\"") >&5
17623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17624   ac_status=$?
17625   egrep -v '^ *\+' conftest.er1 >conftest.err
17626   rm -f conftest.er1
17627   cat conftest.err >&5
17628   echo "$as_me:17628: \$? = $ac_status" >&5
17629   (exit $ac_status); } >/dev/null; then
17630   if test -s conftest.err; then
17631     ac_cpp_err=$ac_c_preproc_warn_flag
17632   else
17633     ac_cpp_err=
17634   fi
17635 else
17636   ac_cpp_err=yes
17637 fi
17638 if test -z "$ac_cpp_err"; then
17639   eval "$as_ac_Header=yes"
17640 else
17641   echo "$as_me: failed program was:" >&5
17642   cat conftest.$ac_ext >&5
17643   eval "$as_ac_Header=no"
17644 fi
17645 rm -f conftest.err conftest.$ac_ext
17646 fi
17647 echo "$as_me:17647: result: `eval echo '${'$as_ac_Header'}'`" >&5
17648 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17649 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17650   cat >>confdefs.h <<EOF
17651 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17652 EOF
17653
17654 fi
17655 done
17656
17657 echo "$as_me:17657: checking for header declaring getopt variables" >&5
17658 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17659 if test "${cf_cv_getopt_header+set}" = set; then
17660   echo $ECHO_N "(cached) $ECHO_C" >&6
17661 else
17662
17663 cf_cv_getopt_header=none
17664 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17665 do
17666 cat >conftest.$ac_ext <<_ACEOF
17667 #line 17667 "configure"
17668 #include "confdefs.h"
17669
17670 #include <$cf_header>
17671 int
17672 main (void)
17673 {
17674 int x = optind; char *y = optarg
17675   ;
17676   return 0;
17677 }
17678 _ACEOF
17679 rm -f conftest.$ac_objext
17680 if { (eval echo "$as_me:17680: \"$ac_compile\"") >&5
17681   (eval $ac_compile) 2>&5
17682   ac_status=$?
17683   echo "$as_me:17683: \$? = $ac_status" >&5
17684   (exit $ac_status); } &&
17685          { ac_try='test -s conftest.$ac_objext'
17686   { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687   (eval $ac_try) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit $ac_status); }; }; then
17691   cf_cv_getopt_header=$cf_header
17692  break
17693 else
17694   echo "$as_me: failed program was:" >&5
17695 cat conftest.$ac_ext >&5
17696 fi
17697 rm -f conftest.$ac_objext conftest.$ac_ext
17698 done
17699
17700 fi
17701 echo "$as_me:17701: result: $cf_cv_getopt_header" >&5
17702 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17703 if test $cf_cv_getopt_header != none ; then
17704
17705 cat >>confdefs.h <<\EOF
17706 #define HAVE_GETOPT_HEADER 1
17707 EOF
17708
17709 fi
17710 if test $cf_cv_getopt_header = getopt.h ; then
17711
17712 cat >>confdefs.h <<\EOF
17713 #define NEED_GETOPT_H 1
17714 EOF
17715
17716 fi
17717
17718 # check for ISC (this may also define _POSIX_SOURCE)
17719 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17720 if test "x$ISC" = xyes ; then
17721
17722 echo "$as_me:17722: checking for main in -lcposix" >&5
17723 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17724 if test "${ac_cv_lib_cposix_main+set}" = set; then
17725   echo $ECHO_N "(cached) $ECHO_C" >&6
17726 else
17727   ac_check_lib_save_LIBS=$LIBS
17728 LIBS="-lcposix  $LIBS"
17729 cat >conftest.$ac_ext <<_ACEOF
17730 #line 17730 "configure"
17731 #include "confdefs.h"
17732
17733 int
17734 main (void)
17735 {
17736 main ();
17737   ;
17738   return 0;
17739 }
17740 _ACEOF
17741 rm -f conftest.$ac_objext conftest$ac_exeext
17742 if { (eval echo "$as_me:17742: \"$ac_link\"") >&5
17743   (eval $ac_link) 2>&5
17744   ac_status=$?
17745   echo "$as_me:17745: \$? = $ac_status" >&5
17746   (exit $ac_status); } &&
17747          { ac_try='test -s conftest$ac_exeext'
17748   { (eval echo "$as_me:17748: \"$ac_try\"") >&5
17749   (eval $ac_try) 2>&5
17750   ac_status=$?
17751   echo "$as_me:17751: \$? = $ac_status" >&5
17752   (exit $ac_status); }; }; then
17753   ac_cv_lib_cposix_main=yes
17754 else
17755   echo "$as_me: failed program was:" >&5
17756 cat conftest.$ac_ext >&5
17757 ac_cv_lib_cposix_main=no
17758 fi
17759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17760 LIBS=$ac_check_lib_save_LIBS
17761 fi
17762 echo "$as_me:17762: result: $ac_cv_lib_cposix_main" >&5
17763 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17764 if test $ac_cv_lib_cposix_main = yes; then
17765   cat >>confdefs.h <<EOF
17766 #define HAVE_LIBCPOSIX 1
17767 EOF
17768
17769   LIBS="-lcposix $LIBS"
17770
17771 fi
17772
17773         echo "$as_me:17773: checking for bzero in -linet" >&5
17774 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17775 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17776   echo $ECHO_N "(cached) $ECHO_C" >&6
17777 else
17778   ac_check_lib_save_LIBS=$LIBS
17779 LIBS="-linet  $LIBS"
17780 cat >conftest.$ac_ext <<_ACEOF
17781 #line 17781 "configure"
17782 #include "confdefs.h"
17783
17784 /* Override any gcc2 internal prototype to avoid an error.  */
17785 #ifdef __cplusplus
17786 extern "C"
17787 #endif
17788 /* We use char because int might match the return type of a gcc2
17789    builtin and then its argument prototype would still apply.  */
17790 char bzero ();
17791 int
17792 main (void)
17793 {
17794 bzero ();
17795   ;
17796   return 0;
17797 }
17798 _ACEOF
17799 rm -f conftest.$ac_objext conftest$ac_exeext
17800 if { (eval echo "$as_me:17800: \"$ac_link\"") >&5
17801   (eval $ac_link) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit $ac_status); } &&
17805          { ac_try='test -s conftest$ac_exeext'
17806   { (eval echo "$as_me:17806: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:17809: \$? = $ac_status" >&5
17810   (exit $ac_status); }; }; then
17811   ac_cv_lib_inet_bzero=yes
17812 else
17813   echo "$as_me: failed program was:" >&5
17814 cat conftest.$ac_ext >&5
17815 ac_cv_lib_inet_bzero=no
17816 fi
17817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17818 LIBS=$ac_check_lib_save_LIBS
17819 fi
17820 echo "$as_me:17820: result: $ac_cv_lib_inet_bzero" >&5
17821 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17822 if test $ac_cv_lib_inet_bzero = yes; then
17823
17824 cf_add_libs="-linet"
17825 # Filter out duplicates - this happens with badly-designed ".pc" files...
17826 for cf_add_1lib in $LIBS
17827 do
17828         for cf_add_2lib in $cf_add_libs
17829         do
17830                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17831                 then
17832                         cf_add_1lib=
17833                         break
17834                 fi
17835         done
17836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17837 done
17838 LIBS="$cf_add_libs"
17839
17840 fi
17841 fi
17842
17843 echo "$as_me:17843: checking if sys/time.h works with sys/select.h" >&5
17844 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17845 if test "${cf_cv_sys_time_select+set}" = set; then
17846   echo $ECHO_N "(cached) $ECHO_C" >&6
17847 else
17848
17849 cat >conftest.$ac_ext <<_ACEOF
17850 #line 17850 "configure"
17851 #include "confdefs.h"
17852
17853 #include <sys/types.h>
17854 #ifdef HAVE_SYS_TIME_H
17855 #include <sys/time.h>
17856 #endif
17857 #ifdef HAVE_SYS_SELECT_H
17858 #include <sys/select.h>
17859 #endif
17860
17861 int
17862 main (void)
17863 {
17864
17865   ;
17866   return 0;
17867 }
17868 _ACEOF
17869 rm -f conftest.$ac_objext
17870 if { (eval echo "$as_me:17870: \"$ac_compile\"") >&5
17871   (eval $ac_compile) 2>&5
17872   ac_status=$?
17873   echo "$as_me:17873: \$? = $ac_status" >&5
17874   (exit $ac_status); } &&
17875          { ac_try='test -s conftest.$ac_objext'
17876   { (eval echo "$as_me:17876: \"$ac_try\"") >&5
17877   (eval $ac_try) 2>&5
17878   ac_status=$?
17879   echo "$as_me:17879: \$? = $ac_status" >&5
17880   (exit $ac_status); }; }; then
17881   cf_cv_sys_time_select=yes
17882 else
17883   echo "$as_me: failed program was:" >&5
17884 cat conftest.$ac_ext >&5
17885 cf_cv_sys_time_select=no
17886 fi
17887 rm -f conftest.$ac_objext conftest.$ac_ext
17888
17889 fi
17890
17891 echo "$as_me:17891: result: $cf_cv_sys_time_select" >&5
17892 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17893 test "$cf_cv_sys_time_select" = yes &&
17894 cat >>confdefs.h <<\EOF
17895 #define HAVE_SYS_TIME_SELECT 1
17896 EOF
17897
17898 ###     checks for compiler characteristics
17899 ac_ext=c
17900 ac_cpp='$CPP $CPPFLAGS'
17901 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17902 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17903 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17904 ac_main_return=return
17905
17906 echo "$as_me:17906: checking for an ANSI C-conforming const" >&5
17907 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17908 if test "${ac_cv_c_const+set}" = set; then
17909   echo $ECHO_N "(cached) $ECHO_C" >&6
17910 else
17911   cat >conftest.$ac_ext <<_ACEOF
17912 #line 17912 "configure"
17913 #include "confdefs.h"
17914
17915 int
17916 main (void)
17917 {
17918 /* FIXME: Include the comments suggested by Paul. */
17919 #ifndef __cplusplus
17920   /* Ultrix mips cc rejects this.  */
17921   typedef int charset[2];
17922   const charset x;
17923   /* SunOS 4.1.1 cc rejects this.  */
17924   char const *const *ccp;
17925   char **p;
17926   /* NEC SVR4.0.2 mips cc rejects this.  */
17927   struct point {int x, y;};
17928   static struct point const zero = {0,0};
17929   /* AIX XL C 1.02.0.0 rejects this.
17930      It does not let you subtract one const X* pointer from another in
17931      an arm of an if-expression whose if-part is not a constant
17932      expression */
17933   const char *g = "string";
17934   ccp = &g + (g ? g-g : 0);
17935   /* HPUX 7.0 cc rejects these. */
17936   ++ccp;
17937   p = (char**) ccp;
17938   ccp = (char const *const *) p;
17939   { /* SCO 3.2v4 cc rejects this.  */
17940     char *t;
17941     char const *s = 0 ? (char *) 0 : (char const *) 0;
17942
17943     *t++ = 0;
17944   }
17945   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17946     int x[] = {25, 17};
17947     const int *foo = &x[0];
17948     ++foo;
17949   }
17950   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17951     typedef const int *iptr;
17952     iptr p = 0;
17953     ++p;
17954   }
17955   { /* AIX XL C 1.02.0.0 rejects this saying
17956        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17957     struct s { int j; const int *ap[3]; };
17958     struct s *b; b->j = 5;
17959   }
17960   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17961     const int foo = 10;
17962   }
17963 #endif
17964
17965   ;
17966   return 0;
17967 }
17968 _ACEOF
17969 rm -f conftest.$ac_objext
17970 if { (eval echo "$as_me:17970: \"$ac_compile\"") >&5
17971   (eval $ac_compile) 2>&5
17972   ac_status=$?
17973   echo "$as_me:17973: \$? = $ac_status" >&5
17974   (exit $ac_status); } &&
17975          { ac_try='test -s conftest.$ac_objext'
17976   { (eval echo "$as_me:17976: \"$ac_try\"") >&5
17977   (eval $ac_try) 2>&5
17978   ac_status=$?
17979   echo "$as_me:17979: \$? = $ac_status" >&5
17980   (exit $ac_status); }; }; then
17981   ac_cv_c_const=yes
17982 else
17983   echo "$as_me: failed program was:" >&5
17984 cat conftest.$ac_ext >&5
17985 ac_cv_c_const=no
17986 fi
17987 rm -f conftest.$ac_objext conftest.$ac_ext
17988 fi
17989 echo "$as_me:17989: result: $ac_cv_c_const" >&5
17990 echo "${ECHO_T}$ac_cv_c_const" >&6
17991 if test $ac_cv_c_const = no; then
17992
17993 cat >>confdefs.h <<\EOF
17994 #define const
17995 EOF
17996
17997 fi
17998
17999 echo "$as_me:17999: checking for inline" >&5
18000 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18001 if test "${ac_cv_c_inline+set}" = set; then
18002   echo $ECHO_N "(cached) $ECHO_C" >&6
18003 else
18004   ac_cv_c_inline=no
18005 for ac_kw in inline __inline__ __inline; do
18006   cat >conftest.$ac_ext <<_ACEOF
18007 #line 18007 "configure"
18008 #include "confdefs.h"
18009 #ifndef __cplusplus
18010 static $ac_kw int static_foo () {return 0; }
18011 $ac_kw int foo () {return 0; }
18012 #endif
18013
18014 _ACEOF
18015 rm -f conftest.$ac_objext
18016 if { (eval echo "$as_me:18016: \"$ac_compile\"") >&5
18017   (eval $ac_compile) 2>&5
18018   ac_status=$?
18019   echo "$as_me:18019: \$? = $ac_status" >&5
18020   (exit $ac_status); } &&
18021          { ac_try='test -s conftest.$ac_objext'
18022   { (eval echo "$as_me:18022: \"$ac_try\"") >&5
18023   (eval $ac_try) 2>&5
18024   ac_status=$?
18025   echo "$as_me:18025: \$? = $ac_status" >&5
18026   (exit $ac_status); }; }; then
18027   ac_cv_c_inline=$ac_kw; break
18028 else
18029   echo "$as_me: failed program was:" >&5
18030 cat conftest.$ac_ext >&5
18031 fi
18032 rm -f conftest.$ac_objext conftest.$ac_ext
18033 done
18034
18035 fi
18036 echo "$as_me:18036: result: $ac_cv_c_inline" >&5
18037 echo "${ECHO_T}$ac_cv_c_inline" >&6
18038 case $ac_cv_c_inline in
18039   inline | yes) ;;
18040   no)
18041 cat >>confdefs.h <<\EOF
18042 #define inline
18043 EOF
18044  ;;
18045   *)  cat >>confdefs.h <<EOF
18046 #define inline $ac_cv_c_inline
18047 EOF
18048  ;;
18049 esac
18050
18051 NCURSES_INLINE=
18052 if test "$ac_cv_c_inline" != no ; then
18053         NCURSES_INLINE=inline
18054         if test "$INTEL_COMPILER" = yes
18055         then
18056                 :
18057         elif test "$CLANG_COMPILER" = yes
18058         then
18059                 :
18060         elif test "$GCC" = yes
18061         then
18062                 echo "$as_me:18062: checking if $CC supports options to tune inlining" >&5
18063 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18064 if test "${cf_cv_gcc_inline+set}" = set; then
18065   echo $ECHO_N "(cached) $ECHO_C" >&6
18066 else
18067
18068                 cf_save_CFLAGS=$CFLAGS
18069                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18070                 cat >conftest.$ac_ext <<_ACEOF
18071 #line 18071 "configure"
18072 #include "confdefs.h"
18073 inline int foo(void) { return 1; }
18074 int
18075 main (void)
18076 {
18077 ${cf_cv_main_return:-return} foo()
18078   ;
18079   return 0;
18080 }
18081 _ACEOF
18082 rm -f conftest.$ac_objext
18083 if { (eval echo "$as_me:18083: \"$ac_compile\"") >&5
18084   (eval $ac_compile) 2>&5
18085   ac_status=$?
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); } &&
18088          { ac_try='test -s conftest.$ac_objext'
18089   { (eval echo "$as_me:18089: \"$ac_try\"") >&5
18090   (eval $ac_try) 2>&5
18091   ac_status=$?
18092   echo "$as_me:18092: \$? = $ac_status" >&5
18093   (exit $ac_status); }; }; then
18094   cf_cv_gcc_inline=yes
18095 else
18096   echo "$as_me: failed program was:" >&5
18097 cat conftest.$ac_ext >&5
18098 cf_cv_gcc_inline=no
18099 fi
18100 rm -f conftest.$ac_objext conftest.$ac_ext
18101                 CFLAGS=$cf_save_CFLAGS
18102
18103 fi
18104 echo "$as_me:18104: result: $cf_cv_gcc_inline" >&5
18105 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18106                 if test "$cf_cv_gcc_inline" = yes ; then
18107
18108 cf_fix_cppflags=no
18109 cf_new_cflags=
18110 cf_new_cppflags=
18111 cf_new_extra_cppflags=
18112
18113 for cf_add_cflags in --param max-inline-insns-single=1200
18114 do
18115 case $cf_fix_cppflags in
18116 (no)
18117         case $cf_add_cflags in
18118         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18119                 case $cf_add_cflags in
18120                 (-D*)
18121                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18122
18123                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18124                                 && test -z "${cf_tst_cflags}" \
18125                                 && cf_fix_cppflags=yes
18126
18127                         if test $cf_fix_cppflags = yes ; then
18128
18129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18131
18132                                 continue
18133                         elif test "${cf_tst_cflags}" = "\"'" ; then
18134
18135         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18136         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18137
18138                                 continue
18139                         fi
18140                         ;;
18141                 esac
18142                 case "$CPPFLAGS" in
18143                 (*$cf_add_cflags)
18144                         ;;
18145                 (*)
18146                         case $cf_add_cflags in
18147                         (-D*)
18148                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18149
18150 CPPFLAGS=`echo "$CPPFLAGS" | \
18151         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18152                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18153
18154                                 ;;
18155                         esac
18156
18157         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18158         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18159
18160                         ;;
18161                 esac
18162                 ;;
18163         (*)
18164
18165         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18166         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18167
18168                 ;;
18169         esac
18170         ;;
18171 (yes)
18172
18173         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18174         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18175
18176         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18177
18178         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18179                 && test -z "${cf_tst_cflags}" \
18180                 && cf_fix_cppflags=no
18181         ;;
18182 esac
18183 done
18184
18185 if test -n "$cf_new_cflags" ; then
18186
18187         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18188         CFLAGS="${CFLAGS}$cf_new_cflags"
18189
18190 fi
18191
18192 if test -n "$cf_new_cppflags" ; then
18193
18194         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18195         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18196
18197 fi
18198
18199 if test -n "$cf_new_extra_cppflags" ; then
18200
18201         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18202         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18203
18204 fi
18205
18206                 fi
18207         fi
18208 fi
18209
18210 echo "$as_me:18210: checking for signal global datatype" >&5
18211 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18212 if test "${cf_cv_sig_atomic_t+set}" = set; then
18213   echo $ECHO_N "(cached) $ECHO_C" >&6
18214 else
18215
18216         for cf_type in \
18217                 "volatile sig_atomic_t" \
18218                 "sig_atomic_t" \
18219                 "int"
18220         do
18221         cat >conftest.$ac_ext <<_ACEOF
18222 #line 18222 "configure"
18223 #include "confdefs.h"
18224
18225 #include <sys/types.h>
18226 #include <signal.h>
18227 #include <stdio.h>
18228
18229 extern $cf_type x;
18230 $cf_type x;
18231 static void handler(int sig)
18232 {
18233         x = 5;
18234 }
18235 int
18236 main (void)
18237 {
18238 signal(SIGINT, handler);
18239                  x = 1
18240   ;
18241   return 0;
18242 }
18243 _ACEOF
18244 rm -f conftest.$ac_objext
18245 if { (eval echo "$as_me:18245: \"$ac_compile\"") >&5
18246   (eval $ac_compile) 2>&5
18247   ac_status=$?
18248   echo "$as_me:18248: \$? = $ac_status" >&5
18249   (exit $ac_status); } &&
18250          { ac_try='test -s conftest.$ac_objext'
18251   { (eval echo "$as_me:18251: \"$ac_try\"") >&5
18252   (eval $ac_try) 2>&5
18253   ac_status=$?
18254   echo "$as_me:18254: \$? = $ac_status" >&5
18255   (exit $ac_status); }; }; then
18256   cf_cv_sig_atomic_t=$cf_type
18257 else
18258   echo "$as_me: failed program was:" >&5
18259 cat conftest.$ac_ext >&5
18260 cf_cv_sig_atomic_t=no
18261 fi
18262 rm -f conftest.$ac_objext conftest.$ac_ext
18263                 test "$cf_cv_sig_atomic_t" != no && break
18264         done
18265
18266 fi
18267
18268 echo "$as_me:18268: result: $cf_cv_sig_atomic_t" >&5
18269 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18270 test "$cf_cv_sig_atomic_t" != no &&
18271 cat >>confdefs.h <<EOF
18272 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18273 EOF
18274
18275 if test $NCURSES_CHTYPE = auto ; then
18276
18277 echo "$as_me:18277: checking for type of chtype" >&5
18278 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18279 if test "${cf_cv_typeof_chtype+set}" = set; then
18280   echo $ECHO_N "(cached) $ECHO_C" >&6
18281 else
18282
18283                 if test "$cross_compiling" = yes; then
18284   cf_cv_typeof_chtype=long
18285 else
18286   cat >conftest.$ac_ext <<_ACEOF
18287 #line 18287 "configure"
18288 #include "confdefs.h"
18289
18290 #define WANT_BITS 31
18291 #include <stdio.h>
18292 int main(void)
18293 {
18294         FILE *fp = fopen("cf_test.out", "w");
18295         if (fp != 0) {
18296                 char *result = "long";
18297                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18298                         int n;
18299                         unsigned int x, y;
18300                         for (n = 0; n < WANT_BITS; n++) {
18301                                 x = (1 << n);
18302                                 y = (x >> n);
18303                                 if (y != 1 || x == 0) {
18304                                         x = 0;
18305                                         break;
18306                                 }
18307                         }
18308                         /*
18309                          * If x is nonzero, an int is big enough for the bits
18310                          * that we want.
18311                          */
18312                         result = (x != 0) ? "int" : "long";
18313                 }
18314                 fputs(result, fp);
18315                 fclose(fp);
18316         }
18317         ${cf_cv_main_return:-return}(0);
18318 }
18319
18320 _ACEOF
18321 rm -f conftest$ac_exeext
18322 if { (eval echo "$as_me:18322: \"$ac_link\"") >&5
18323   (eval $ac_link) 2>&5
18324   ac_status=$?
18325   echo "$as_me:18325: \$? = $ac_status" >&5
18326   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18327   { (eval echo "$as_me:18327: \"$ac_try\"") >&5
18328   (eval $ac_try) 2>&5
18329   ac_status=$?
18330   echo "$as_me:18330: \$? = $ac_status" >&5
18331   (exit $ac_status); }; }; then
18332   cf_cv_typeof_chtype=`cat cf_test.out`
18333 else
18334   echo "$as_me: program exited with status $ac_status" >&5
18335 echo "$as_me: failed program was:" >&5
18336 cat conftest.$ac_ext >&5
18337 cf_cv_typeof_chtype=long
18338 fi
18339 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18340 fi
18341                 rm -f cf_test.out
18342
18343 fi
18344
18345 echo "$as_me:18345: result: $cf_cv_typeof_chtype" >&5
18346 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18347
18348 cat >>confdefs.h <<EOF
18349 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18350 EOF
18351
18352 else
18353         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18354 fi
18355 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18356
18357 echo "$as_me:18357: checking if unsigned literals are legal" >&5
18358 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18359 if test "${cf_cv_unsigned_literals+set}" = set; then
18360   echo $ECHO_N "(cached) $ECHO_C" >&6
18361 else
18362
18363         cat >conftest.$ac_ext <<_ACEOF
18364 #line 18364 "configure"
18365 #include "confdefs.h"
18366
18367 int
18368 main (void)
18369 {
18370 long x = 1L + 1UL + 1U + 1
18371   ;
18372   return 0;
18373 }
18374 _ACEOF
18375 rm -f conftest.$ac_objext
18376 if { (eval echo "$as_me:18376: \"$ac_compile\"") >&5
18377   (eval $ac_compile) 2>&5
18378   ac_status=$?
18379   echo "$as_me:18379: \$? = $ac_status" >&5
18380   (exit $ac_status); } &&
18381          { ac_try='test -s conftest.$ac_objext'
18382   { (eval echo "$as_me:18382: \"$ac_try\"") >&5
18383   (eval $ac_try) 2>&5
18384   ac_status=$?
18385   echo "$as_me:18385: \$? = $ac_status" >&5
18386   (exit $ac_status); }; }; then
18387   cf_cv_unsigned_literals=yes
18388 else
18389   echo "$as_me: failed program was:" >&5
18390 cat conftest.$ac_ext >&5
18391 cf_cv_unsigned_literals=no
18392 fi
18393 rm -f conftest.$ac_objext conftest.$ac_ext
18394
18395 fi
18396
18397 echo "$as_me:18397: result: $cf_cv_unsigned_literals" >&5
18398 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18399
18400 cf_cv_1UL="1"
18401 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18402 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18403
18404 if test $NCURSES_MMASK_T = auto ; then
18405         cf_cv_typeof_mmask_t=long
18406 else
18407         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18408 fi
18409 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18410
18411 ###     Checks for external-data
18412
18413 echo "$as_me:18413: checking if external errno is declared" >&5
18414 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18415 if test "${cf_cv_dcl_errno+set}" = set; then
18416   echo $ECHO_N "(cached) $ECHO_C" >&6
18417 else
18418
18419         cat >conftest.$ac_ext <<_ACEOF
18420 #line 18420 "configure"
18421 #include "confdefs.h"
18422
18423 #ifdef HAVE_STDLIB_H
18424 #include <stdlib.h>
18425 #endif
18426 #include <stdio.h>
18427 #include <sys/types.h>
18428 #include <errno.h>
18429 int
18430 main (void)
18431 {
18432 int x = (int) errno
18433   ;
18434   return 0;
18435 }
18436 _ACEOF
18437 rm -f conftest.$ac_objext
18438 if { (eval echo "$as_me:18438: \"$ac_compile\"") >&5
18439   (eval $ac_compile) 2>&5
18440   ac_status=$?
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit $ac_status); } &&
18443          { ac_try='test -s conftest.$ac_objext'
18444   { (eval echo "$as_me:18444: \"$ac_try\"") >&5
18445   (eval $ac_try) 2>&5
18446   ac_status=$?
18447   echo "$as_me:18447: \$? = $ac_status" >&5
18448   (exit $ac_status); }; }; then
18449   cf_cv_dcl_errno=yes
18450 else
18451   echo "$as_me: failed program was:" >&5
18452 cat conftest.$ac_ext >&5
18453 cf_cv_dcl_errno=no
18454 fi
18455 rm -f conftest.$ac_objext conftest.$ac_ext
18456
18457 fi
18458 echo "$as_me:18458: result: $cf_cv_dcl_errno" >&5
18459 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18460
18461 if test "$cf_cv_dcl_errno" = no ; then
18462
18463 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18464
18465         cat >>confdefs.h <<EOF
18466 #define $cf_result 1
18467 EOF
18468
18469 fi
18470
18471 # It's possible (for near-UNIX clones) that the data doesn't exist
18472
18473 echo "$as_me:18473: checking if external errno exists" >&5
18474 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18475 if test "${cf_cv_have_errno+set}" = set; then
18476   echo $ECHO_N "(cached) $ECHO_C" >&6
18477 else
18478
18479         cat >conftest.$ac_ext <<_ACEOF
18480 #line 18480 "configure"
18481 #include "confdefs.h"
18482
18483 #undef errno
18484 extern int errno;
18485
18486 int
18487 main (void)
18488 {
18489 errno = 2
18490   ;
18491   return 0;
18492 }
18493 _ACEOF
18494 rm -f conftest.$ac_objext conftest$ac_exeext
18495 if { (eval echo "$as_me:18495: \"$ac_link\"") >&5
18496   (eval $ac_link) 2>&5
18497   ac_status=$?
18498   echo "$as_me:18498: \$? = $ac_status" >&5
18499   (exit $ac_status); } &&
18500          { ac_try='test -s conftest$ac_exeext'
18501   { (eval echo "$as_me:18501: \"$ac_try\"") >&5
18502   (eval $ac_try) 2>&5
18503   ac_status=$?
18504   echo "$as_me:18504: \$? = $ac_status" >&5
18505   (exit $ac_status); }; }; then
18506   cf_cv_have_errno=yes
18507 else
18508   echo "$as_me: failed program was:" >&5
18509 cat conftest.$ac_ext >&5
18510 cf_cv_have_errno=no
18511 fi
18512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18513
18514 fi
18515 echo "$as_me:18515: result: $cf_cv_have_errno" >&5
18516 echo "${ECHO_T}$cf_cv_have_errno" >&6
18517
18518 if test "$cf_cv_have_errno" = yes ; then
18519
18520 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18521
18522         cat >>confdefs.h <<EOF
18523 #define $cf_result 1
18524 EOF
18525
18526 fi
18527
18528 echo "$as_me:18528: checking if data-only library module links" >&5
18529 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18530 if test "${cf_cv_link_dataonly+set}" = set; then
18531   echo $ECHO_N "(cached) $ECHO_C" >&6
18532 else
18533
18534         rm -f conftest.a
18535         cat >conftest.$ac_ext <<EOF
18536 #line 18536 "configure"
18537 int     testdata[3] = { 123, 456, 789 };
18538 EOF
18539         if { (eval echo "$as_me:18539: \"$ac_compile\"") >&5
18540   (eval $ac_compile) 2>&5
18541   ac_status=$?
18542   echo "$as_me:18542: \$? = $ac_status" >&5
18543   (exit $ac_status); } ; then
18544                 mv conftest.o data.o && \
18545                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18546         fi
18547         rm -f conftest.$ac_ext data.o
18548         cat >conftest.$ac_ext <<EOF
18549 #line 18549 "configure"
18550 int     testfunc(void)
18551 {
18552 #if defined(NeXT)
18553         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18554 #else
18555         extern int testdata[3];
18556         return testdata[0] == 123
18557            &&  testdata[1] == 456
18558            &&  testdata[2] == 789;
18559 #endif
18560 }
18561 EOF
18562         if { (eval echo "$as_me:18562: \"$ac_compile\"") >&5
18563   (eval $ac_compile) 2>&5
18564   ac_status=$?
18565   echo "$as_me:18565: \$? = $ac_status" >&5
18566   (exit $ac_status); }; then
18567                 mv conftest.o func.o && \
18568                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18569         fi
18570         rm -f conftest.$ac_ext func.o
18571         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18572         cf_saveLIBS="$LIBS"
18573         LIBS="conftest.a $LIBS"
18574         if test "$cross_compiling" = yes; then
18575   cf_cv_link_dataonly=unknown
18576 else
18577   cat >conftest.$ac_ext <<_ACEOF
18578 #line 18578 "configure"
18579 #include "confdefs.h"
18580
18581         int main(void)
18582         {
18583                 extern int testfunc();
18584                 ${cf_cv_main_return:-return} (!testfunc());
18585         }
18586
18587 _ACEOF
18588 rm -f conftest$ac_exeext
18589 if { (eval echo "$as_me:18589: \"$ac_link\"") >&5
18590   (eval $ac_link) 2>&5
18591   ac_status=$?
18592   echo "$as_me:18592: \$? = $ac_status" >&5
18593   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18594   { (eval echo "$as_me:18594: \"$ac_try\"") >&5
18595   (eval $ac_try) 2>&5
18596   ac_status=$?
18597   echo "$as_me:18597: \$? = $ac_status" >&5
18598   (exit $ac_status); }; }; then
18599   cf_cv_link_dataonly=yes
18600 else
18601   echo "$as_me: program exited with status $ac_status" >&5
18602 echo "$as_me: failed program was:" >&5
18603 cat conftest.$ac_ext >&5
18604 cf_cv_link_dataonly=no
18605 fi
18606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18607 fi
18608         LIBS="$cf_saveLIBS"
18609
18610 fi
18611
18612 echo "$as_me:18612: result: $cf_cv_link_dataonly" >&5
18613 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18614
18615 if test "$cf_cv_link_dataonly" = no ; then
18616
18617 cat >>confdefs.h <<\EOF
18618 #define BROKEN_LINKER 1
18619 EOF
18620
18621         BROKEN_LINKER=1
18622 fi
18623
18624 ###     Checks for library functions.
18625
18626 for ac_func in \
18627 getcwd \
18628 getegid \
18629 geteuid \
18630 getopt \
18631 getttynam \
18632 issetugid \
18633 poll \
18634 putenv \
18635 remove \
18636 select \
18637 setbuf \
18638 setbuffer \
18639 setenv \
18640 setvbuf \
18641 sigaction \
18642 sigvec \
18643 strdup \
18644 strstr \
18645 sysconf \
18646 tcgetpgrp \
18647 tdestroy \
18648 times \
18649 tsearch \
18650 vsnprintf \
18651
18652 do
18653 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18654 echo "$as_me:18654: checking for $ac_func" >&5
18655 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18656 if eval "test \"\${$as_ac_var+set}\" = set"; then
18657   echo $ECHO_N "(cached) $ECHO_C" >&6
18658 else
18659   cat >conftest.$ac_ext <<_ACEOF
18660 #line 18660 "configure"
18661 #include "confdefs.h"
18662 /* System header to define __stub macros and hopefully few prototypes,
18663     which can conflict with char $ac_func (); below.  */
18664 #include <assert.h>
18665 /* Override any gcc2 internal prototype to avoid an error.  */
18666 #ifdef __cplusplus
18667 extern "C"
18668 #endif
18669 /* We use char because int might match the return type of a gcc2
18670    builtin and then its argument prototype would still apply.  */
18671 char $ac_func ();
18672 char (*f) ();
18673
18674 int
18675 main (void)
18676 {
18677 /* The GNU C library defines this for functions which it implements
18678     to always fail with ENOSYS.  Some functions are actually named
18679     something starting with __ and the normal name is an alias.  */
18680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18681 choke me
18682 #else
18683 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18684 #endif
18685
18686   ;
18687   return 0;
18688 }
18689 _ACEOF
18690 rm -f conftest.$ac_objext conftest$ac_exeext
18691 if { (eval echo "$as_me:18691: \"$ac_link\"") >&5
18692   (eval $ac_link) 2>&5
18693   ac_status=$?
18694   echo "$as_me:18694: \$? = $ac_status" >&5
18695   (exit $ac_status); } &&
18696          { ac_try='test -s conftest$ac_exeext'
18697   { (eval echo "$as_me:18697: \"$ac_try\"") >&5
18698   (eval $ac_try) 2>&5
18699   ac_status=$?
18700   echo "$as_me:18700: \$? = $ac_status" >&5
18701   (exit $ac_status); }; }; then
18702   eval "$as_ac_var=yes"
18703 else
18704   echo "$as_me: failed program was:" >&5
18705 cat conftest.$ac_ext >&5
18706 eval "$as_ac_var=no"
18707 fi
18708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18709 fi
18710 echo "$as_me:18710: result: `eval echo '${'$as_ac_var'}'`" >&5
18711 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18712 if test `eval echo '${'$as_ac_var'}'` = yes; then
18713   cat >>confdefs.h <<EOF
18714 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18715 EOF
18716
18717 fi
18718 done
18719
18720 if test "x$ac_cv_func_getopt" = xno && \
18721    test "x$cf_with_progs$cf_with_tests" != xnono; then
18722         { { echo "$as_me:18722: error: getopt is required for building programs" >&5
18723 echo "$as_me: error: getopt is required for building programs" >&2;}
18724    { (exit 1); exit 1; }; }
18725 fi
18726
18727 if test "x$with_safe_sprintf" = xyes
18728 then
18729         if test "x$ac_cv_func_vsnprintf" = xyes
18730         then
18731                 { echo "$as_me:18731: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18732 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18733         else
18734
18735 cat >>confdefs.h <<\EOF
18736 #define USE_SAFE_SPRINTF 1
18737 EOF
18738
18739         fi
18740 fi
18741
18742 if test "x$with_getcap" = "xyes" ; then
18743
18744 echo "$as_me:18744: checking for terminal-capability database functions" >&5
18745 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18746 if test "${cf_cv_cgetent+set}" = set; then
18747   echo $ECHO_N "(cached) $ECHO_C" >&6
18748 else
18749
18750 cat >conftest.$ac_ext <<_ACEOF
18751 #line 18751 "configure"
18752 #include "confdefs.h"
18753
18754 #include <stdlib.h>
18755 int
18756 main (void)
18757 {
18758
18759         char temp[128];
18760         char *buf = temp;
18761         char *db_array = temp;
18762         cgetent(&buf, &db_array, "vt100");
18763         cgetcap(buf, "tc", '=');
18764         cgetmatch(buf, "tc");
18765
18766   ;
18767   return 0;
18768 }
18769 _ACEOF
18770 rm -f conftest.$ac_objext conftest$ac_exeext
18771 if { (eval echo "$as_me:18771: \"$ac_link\"") >&5
18772   (eval $ac_link) 2>&5
18773   ac_status=$?
18774   echo "$as_me:18774: \$? = $ac_status" >&5
18775   (exit $ac_status); } &&
18776          { ac_try='test -s conftest$ac_exeext'
18777   { (eval echo "$as_me:18777: \"$ac_try\"") >&5
18778   (eval $ac_try) 2>&5
18779   ac_status=$?
18780   echo "$as_me:18780: \$? = $ac_status" >&5
18781   (exit $ac_status); }; }; then
18782   cf_cv_cgetent=yes
18783 else
18784   echo "$as_me: failed program was:" >&5
18785 cat conftest.$ac_ext >&5
18786 cf_cv_cgetent=no
18787 fi
18788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18789
18790 fi
18791 echo "$as_me:18791: result: $cf_cv_cgetent" >&5
18792 echo "${ECHO_T}$cf_cv_cgetent" >&6
18793
18794 if test "$cf_cv_cgetent" = yes
18795 then
18796
18797 cat >>confdefs.h <<\EOF
18798 #define HAVE_BSD_CGETENT 1
18799 EOF
18800
18801 echo "$as_me:18801: checking if cgetent uses const parameter" >&5
18802 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18803 if test "${cf_cv_cgetent_const+set}" = set; then
18804   echo $ECHO_N "(cached) $ECHO_C" >&6
18805 else
18806
18807 cat >conftest.$ac_ext <<_ACEOF
18808 #line 18808 "configure"
18809 #include "confdefs.h"
18810
18811 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18812 #include <stdlib.h>
18813 int
18814 main (void)
18815 {
18816
18817         char temp[128];
18818         char *buf = temp;
18819 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18820         const char *db_array = temp;
18821         cgetent(&buf, &db_array, "vt100");
18822 #endif
18823         cgetcap(buf, "tc", '=');
18824         cgetmatch(buf, "tc");
18825
18826   ;
18827   return 0;
18828 }
18829 _ACEOF
18830 rm -f conftest.$ac_objext conftest$ac_exeext
18831 if { (eval echo "$as_me:18831: \"$ac_link\"") >&5
18832   (eval $ac_link) 2>&5
18833   ac_status=$?
18834   echo "$as_me:18834: \$? = $ac_status" >&5
18835   (exit $ac_status); } &&
18836          { ac_try='test -s conftest$ac_exeext'
18837   { (eval echo "$as_me:18837: \"$ac_try\"") >&5
18838   (eval $ac_try) 2>&5
18839   ac_status=$?
18840   echo "$as_me:18840: \$? = $ac_status" >&5
18841   (exit $ac_status); }; }; then
18842   cf_cv_cgetent_const=yes
18843 else
18844   echo "$as_me: failed program was:" >&5
18845 cat conftest.$ac_ext >&5
18846 cf_cv_cgetent_const=no
18847 fi
18848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18849
18850 fi
18851 echo "$as_me:18851: result: $cf_cv_cgetent_const" >&5
18852 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18853         if test "$cf_cv_cgetent_const" = yes
18854         then
18855
18856 cat >>confdefs.h <<EOF
18857 #define CGETENT_CONST const
18858 EOF
18859
18860         fi
18861 fi
18862
18863 fi
18864
18865 echo "$as_me:18865: checking for isascii" >&5
18866 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18867 if test "${cf_cv_have_isascii+set}" = set; then
18868   echo $ECHO_N "(cached) $ECHO_C" >&6
18869 else
18870
18871         cat >conftest.$ac_ext <<_ACEOF
18872 #line 18872 "configure"
18873 #include "confdefs.h"
18874 #include <ctype.h>
18875 int
18876 main (void)
18877 {
18878 int x = isascii(' ')
18879   ;
18880   return 0;
18881 }
18882 _ACEOF
18883 rm -f conftest.$ac_objext conftest$ac_exeext
18884 if { (eval echo "$as_me:18884: \"$ac_link\"") >&5
18885   (eval $ac_link) 2>&5
18886   ac_status=$?
18887   echo "$as_me:18887: \$? = $ac_status" >&5
18888   (exit $ac_status); } &&
18889          { ac_try='test -s conftest$ac_exeext'
18890   { (eval echo "$as_me:18890: \"$ac_try\"") >&5
18891   (eval $ac_try) 2>&5
18892   ac_status=$?
18893   echo "$as_me:18893: \$? = $ac_status" >&5
18894   (exit $ac_status); }; }; then
18895   cf_cv_have_isascii=yes
18896 else
18897   echo "$as_me: failed program was:" >&5
18898 cat conftest.$ac_ext >&5
18899 cf_cv_have_isascii=no
18900 fi
18901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18902
18903 fi
18904 echo "$as_me:18904: result: $cf_cv_have_isascii" >&5
18905 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18906 test "$cf_cv_have_isascii" = yes &&
18907 cat >>confdefs.h <<\EOF
18908 #define HAVE_ISASCII 1
18909 EOF
18910
18911 if test "$ac_cv_func_sigaction" = yes; then
18912 echo "$as_me:18912: checking whether sigaction needs _POSIX_SOURCE" >&5
18913 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18914 cat >conftest.$ac_ext <<_ACEOF
18915 #line 18915 "configure"
18916 #include "confdefs.h"
18917
18918 #include <sys/types.h>
18919 #include <signal.h>
18920 int
18921 main (void)
18922 {
18923 struct sigaction act
18924   ;
18925   return 0;
18926 }
18927 _ACEOF
18928 rm -f conftest.$ac_objext
18929 if { (eval echo "$as_me:18929: \"$ac_compile\"") >&5
18930   (eval $ac_compile) 2>&5
18931   ac_status=$?
18932   echo "$as_me:18932: \$? = $ac_status" >&5
18933   (exit $ac_status); } &&
18934          { ac_try='test -s conftest.$ac_objext'
18935   { (eval echo "$as_me:18935: \"$ac_try\"") >&5
18936   (eval $ac_try) 2>&5
18937   ac_status=$?
18938   echo "$as_me:18938: \$? = $ac_status" >&5
18939   (exit $ac_status); }; }; then
18940   sigact_bad=no
18941 else
18942   echo "$as_me: failed program was:" >&5
18943 cat conftest.$ac_ext >&5
18944
18945 cat >conftest.$ac_ext <<_ACEOF
18946 #line 18946 "configure"
18947 #include "confdefs.h"
18948
18949 #define _POSIX_SOURCE
18950 #include <sys/types.h>
18951 #include <signal.h>
18952 int
18953 main (void)
18954 {
18955 struct sigaction act
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext
18961 if { (eval echo "$as_me:18961: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); } &&
18966          { ac_try='test -s conftest.$ac_objext'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); }; }; then
18972   sigact_bad=yes
18973
18974 cat >>confdefs.h <<\EOF
18975 #define _POSIX_SOURCE 1
18976 EOF
18977
18978 else
18979   echo "$as_me: failed program was:" >&5
18980 cat conftest.$ac_ext >&5
18981 sigact_bad=unknown
18982 fi
18983 rm -f conftest.$ac_objext conftest.$ac_ext
18984 fi
18985 rm -f conftest.$ac_objext conftest.$ac_ext
18986 echo "$as_me:18986: result: $sigact_bad" >&5
18987 echo "${ECHO_T}$sigact_bad" >&6
18988 fi
18989
18990 echo "$as_me:18990: checking if nanosleep really works" >&5
18991 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
18992 if test "${cf_cv_func_nanosleep+set}" = set; then
18993   echo $ECHO_N "(cached) $ECHO_C" >&6
18994 else
18995
18996 if test "$cross_compiling" = yes; then
18997   cf_cv_func_nanosleep=unknown
18998 else
18999   cat >conftest.$ac_ext <<_ACEOF
19000 #line 19000 "configure"
19001 #include "confdefs.h"
19002
19003 #include <stdio.h>
19004 #include <errno.h>
19005 #include <time.h>
19006
19007 #ifdef HAVE_SYS_TIME_H
19008 #include <sys/time.h>
19009 #endif
19010
19011 int main(void) {
19012         struct timespec ts1, ts2;
19013         int code;
19014         ts1.tv_sec  = 0;
19015         ts1.tv_nsec = 750000000;
19016         ts2.tv_sec  = 0;
19017         ts2.tv_nsec = 0;
19018         errno = 0;
19019         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19020         ${cf_cv_main_return:-return}(code != 0);
19021 }
19022
19023 _ACEOF
19024 rm -f conftest$ac_exeext
19025 if { (eval echo "$as_me:19025: \"$ac_link\"") >&5
19026   (eval $ac_link) 2>&5
19027   ac_status=$?
19028   echo "$as_me:19028: \$? = $ac_status" >&5
19029   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19030   { (eval echo "$as_me:19030: \"$ac_try\"") >&5
19031   (eval $ac_try) 2>&5
19032   ac_status=$?
19033   echo "$as_me:19033: \$? = $ac_status" >&5
19034   (exit $ac_status); }; }; then
19035   cf_cv_func_nanosleep=yes
19036 else
19037   echo "$as_me: program exited with status $ac_status" >&5
19038 echo "$as_me: failed program was:" >&5
19039 cat conftest.$ac_ext >&5
19040 cf_cv_func_nanosleep=no
19041 fi
19042 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19043 fi
19044 fi
19045 echo "$as_me:19045: result: $cf_cv_func_nanosleep" >&5
19046 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19047
19048 test "$cf_cv_func_nanosleep" = "yes" &&
19049 cat >>confdefs.h <<\EOF
19050 #define HAVE_NANOSLEEP 1
19051 EOF
19052
19053 for ac_header in \
19054 termio.h \
19055 termios.h \
19056 unistd.h \
19057 sys/ioctl.h \
19058 sys/termio.h \
19059
19060 do
19061 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19062 echo "$as_me:19062: checking for $ac_header" >&5
19063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19065   echo $ECHO_N "(cached) $ECHO_C" >&6
19066 else
19067   cat >conftest.$ac_ext <<_ACEOF
19068 #line 19068 "configure"
19069 #include "confdefs.h"
19070 #include <$ac_header>
19071 _ACEOF
19072 if { (eval echo "$as_me:19072: \"$ac_cpp conftest.$ac_ext\"") >&5
19073   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19074   ac_status=$?
19075   egrep -v '^ *\+' conftest.er1 >conftest.err
19076   rm -f conftest.er1
19077   cat conftest.err >&5
19078   echo "$as_me:19078: \$? = $ac_status" >&5
19079   (exit $ac_status); } >/dev/null; then
19080   if test -s conftest.err; then
19081     ac_cpp_err=$ac_c_preproc_warn_flag
19082   else
19083     ac_cpp_err=
19084   fi
19085 else
19086   ac_cpp_err=yes
19087 fi
19088 if test -z "$ac_cpp_err"; then
19089   eval "$as_ac_Header=yes"
19090 else
19091   echo "$as_me: failed program was:" >&5
19092   cat conftest.$ac_ext >&5
19093   eval "$as_ac_Header=no"
19094 fi
19095 rm -f conftest.err conftest.$ac_ext
19096 fi
19097 echo "$as_me:19097: result: `eval echo '${'$as_ac_Header'}'`" >&5
19098 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19099 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19100   cat >>confdefs.h <<EOF
19101 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19102 EOF
19103
19104 fi
19105 done
19106
19107 if test "$ac_cv_header_termios_h" = yes ; then
19108         case "$CFLAGS $CPPFLAGS" in
19109         (*-D_POSIX_SOURCE*)
19110                 termios_bad=dunno ;;
19111         (*)     termios_bad=maybe ;;
19112         esac
19113         if test "$termios_bad" = maybe ; then
19114         echo "$as_me:19114: checking whether termios.h needs _POSIX_SOURCE" >&5
19115 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19116         cat >conftest.$ac_ext <<_ACEOF
19117 #line 19117 "configure"
19118 #include "confdefs.h"
19119 #include <termios.h>
19120 int
19121 main (void)
19122 {
19123 struct termios foo; int x = foo.c_iflag
19124   ;
19125   return 0;
19126 }
19127 _ACEOF
19128 rm -f conftest.$ac_objext
19129 if { (eval echo "$as_me:19129: \"$ac_compile\"") >&5
19130   (eval $ac_compile) 2>&5
19131   ac_status=$?
19132   echo "$as_me:19132: \$? = $ac_status" >&5
19133   (exit $ac_status); } &&
19134          { ac_try='test -s conftest.$ac_objext'
19135   { (eval echo "$as_me:19135: \"$ac_try\"") >&5
19136   (eval $ac_try) 2>&5
19137   ac_status=$?
19138   echo "$as_me:19138: \$? = $ac_status" >&5
19139   (exit $ac_status); }; }; then
19140   termios_bad=no
19141 else
19142   echo "$as_me: failed program was:" >&5
19143 cat conftest.$ac_ext >&5
19144
19145                 cat >conftest.$ac_ext <<_ACEOF
19146 #line 19146 "configure"
19147 #include "confdefs.h"
19148
19149 #define _POSIX_SOURCE
19150 #include <termios.h>
19151 int
19152 main (void)
19153 {
19154 struct termios foo; int x = foo.c_iflag
19155   ;
19156   return 0;
19157 }
19158 _ACEOF
19159 rm -f conftest.$ac_objext
19160 if { (eval echo "$as_me:19160: \"$ac_compile\"") >&5
19161   (eval $ac_compile) 2>&5
19162   ac_status=$?
19163   echo "$as_me:19163: \$? = $ac_status" >&5
19164   (exit $ac_status); } &&
19165          { ac_try='test -s conftest.$ac_objext'
19166   { (eval echo "$as_me:19166: \"$ac_try\"") >&5
19167   (eval $ac_try) 2>&5
19168   ac_status=$?
19169   echo "$as_me:19169: \$? = $ac_status" >&5
19170   (exit $ac_status); }; }; then
19171   termios_bad=unknown
19172 else
19173   echo "$as_me: failed program was:" >&5
19174 cat conftest.$ac_ext >&5
19175 termios_bad=yes
19176 cat >>confdefs.h <<\EOF
19177 #define _POSIX_SOURCE 1
19178 EOF
19179
19180 fi
19181 rm -f conftest.$ac_objext conftest.$ac_ext
19182
19183 fi
19184 rm -f conftest.$ac_objext conftest.$ac_ext
19185         echo "$as_me:19185: result: $termios_bad" >&5
19186 echo "${ECHO_T}$termios_bad" >&6
19187         fi
19188 fi
19189
19190 echo "$as_me:19190: checking for tcgetattr" >&5
19191 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19192 if test "${cf_cv_have_tcgetattr+set}" = set; then
19193   echo $ECHO_N "(cached) $ECHO_C" >&6
19194 else
19195
19196 cat >conftest.$ac_ext <<_ACEOF
19197 #line 19197 "configure"
19198 #include "confdefs.h"
19199
19200 #include <sys/types.h>
19201 #ifdef HAVE_UNISTD_H
19202 #include <unistd.h>
19203 #endif
19204 #ifdef HAVE_TERMIOS_H
19205 #include <termios.h>
19206 #define TTY struct termios
19207 #else
19208 #ifdef HAVE_TERMIO_H
19209 #include <termio.h>
19210 #define TTY struct termio
19211 #endif
19212 #endif
19213
19214 int
19215 main (void)
19216 {
19217
19218 TTY foo;
19219 tcgetattr(1, &foo);
19220   ;
19221   return 0;
19222 }
19223 _ACEOF
19224 rm -f conftest.$ac_objext conftest$ac_exeext
19225 if { (eval echo "$as_me:19225: \"$ac_link\"") >&5
19226   (eval $ac_link) 2>&5
19227   ac_status=$?
19228   echo "$as_me:19228: \$? = $ac_status" >&5
19229   (exit $ac_status); } &&
19230          { ac_try='test -s conftest$ac_exeext'
19231   { (eval echo "$as_me:19231: \"$ac_try\"") >&5
19232   (eval $ac_try) 2>&5
19233   ac_status=$?
19234   echo "$as_me:19234: \$? = $ac_status" >&5
19235   (exit $ac_status); }; }; then
19236   cf_cv_have_tcgetattr=yes
19237 else
19238   echo "$as_me: failed program was:" >&5
19239 cat conftest.$ac_ext >&5
19240 cf_cv_have_tcgetattr=no
19241 fi
19242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19243 fi
19244 echo "$as_me:19244: result: $cf_cv_have_tcgetattr" >&5
19245 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19246 test "$cf_cv_have_tcgetattr" = yes &&
19247 cat >>confdefs.h <<\EOF
19248 #define HAVE_TCGETATTR 1
19249 EOF
19250
19251 echo "$as_me:19251: checking for vsscanf function or workaround" >&5
19252 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19253 if test "${cf_cv_func_vsscanf+set}" = set; then
19254   echo $ECHO_N "(cached) $ECHO_C" >&6
19255 else
19256
19257 cat >conftest.$ac_ext <<_ACEOF
19258 #line 19258 "configure"
19259 #include "confdefs.h"
19260
19261 #include <stdarg.h>
19262 #include <stdio.h>
19263 int
19264 main (void)
19265 {
19266
19267         va_list ap;
19268         vsscanf("from", "%d", ap)
19269   ;
19270   return 0;
19271 }
19272 _ACEOF
19273 rm -f conftest.$ac_objext conftest$ac_exeext
19274 if { (eval echo "$as_me:19274: \"$ac_link\"") >&5
19275   (eval $ac_link) 2>&5
19276   ac_status=$?
19277   echo "$as_me:19277: \$? = $ac_status" >&5
19278   (exit $ac_status); } &&
19279          { ac_try='test -s conftest$ac_exeext'
19280   { (eval echo "$as_me:19280: \"$ac_try\"") >&5
19281   (eval $ac_try) 2>&5
19282   ac_status=$?
19283   echo "$as_me:19283: \$? = $ac_status" >&5
19284   (exit $ac_status); }; }; then
19285   cf_cv_func_vsscanf=vsscanf
19286 else
19287   echo "$as_me: failed program was:" >&5
19288 cat conftest.$ac_ext >&5
19289
19290 cat >conftest.$ac_ext <<_ACEOF
19291 #line 19291 "configure"
19292 #include "confdefs.h"
19293
19294 #include <stdarg.h>
19295 #include <stdio.h>
19296 int
19297 main (void)
19298 {
19299
19300         FILE strbuf;
19301         char *str = "from";
19302
19303         strbuf._flag = _IOREAD;
19304         strbuf._ptr = strbuf._base = (unsigned char *) str;
19305         strbuf._cnt = strlen(str);
19306         strbuf._file = _NFILE;
19307         return (vfscanf(&strbuf, "%d", ap))
19308   ;
19309   return 0;
19310 }
19311 _ACEOF
19312 rm -f conftest.$ac_objext conftest$ac_exeext
19313 if { (eval echo "$as_me:19313: \"$ac_link\"") >&5
19314   (eval $ac_link) 2>&5
19315   ac_status=$?
19316   echo "$as_me:19316: \$? = $ac_status" >&5
19317   (exit $ac_status); } &&
19318          { ac_try='test -s conftest$ac_exeext'
19319   { (eval echo "$as_me:19319: \"$ac_try\"") >&5
19320   (eval $ac_try) 2>&5
19321   ac_status=$?
19322   echo "$as_me:19322: \$? = $ac_status" >&5
19323   (exit $ac_status); }; }; then
19324   cf_cv_func_vsscanf=vfscanf
19325 else
19326   echo "$as_me: failed program was:" >&5
19327 cat conftest.$ac_ext >&5
19328
19329 cat >conftest.$ac_ext <<_ACEOF
19330 #line 19330 "configure"
19331 #include "confdefs.h"
19332
19333 #include <stdarg.h>
19334 #include <stdio.h>
19335 int
19336 main (void)
19337 {
19338
19339         FILE strbuf;
19340         char *str = "from";
19341
19342         strbuf._flag = _IOREAD;
19343         strbuf._ptr = strbuf._base = (unsigned char *) str;
19344         strbuf._cnt = strlen(str);
19345         strbuf._file = _NFILE;
19346         return (_doscan(&strbuf, "%d", ap))
19347   ;
19348   return 0;
19349 }
19350 _ACEOF
19351 rm -f conftest.$ac_objext conftest$ac_exeext
19352 if { (eval echo "$as_me:19352: \"$ac_link\"") >&5
19353   (eval $ac_link) 2>&5
19354   ac_status=$?
19355   echo "$as_me:19355: \$? = $ac_status" >&5
19356   (exit $ac_status); } &&
19357          { ac_try='test -s conftest$ac_exeext'
19358   { (eval echo "$as_me:19358: \"$ac_try\"") >&5
19359   (eval $ac_try) 2>&5
19360   ac_status=$?
19361   echo "$as_me:19361: \$? = $ac_status" >&5
19362   (exit $ac_status); }; }; then
19363   cf_cv_func_vsscanf=_doscan
19364 else
19365   echo "$as_me: failed program was:" >&5
19366 cat conftest.$ac_ext >&5
19367
19368 cf_cv_func_vsscanf=no
19369 fi
19370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19371 fi
19372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19373 fi
19374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19375 fi
19376 echo "$as_me:19376: result: $cf_cv_func_vsscanf" >&5
19377 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19378
19379 case $cf_cv_func_vsscanf in
19380 (vsscanf)
19381 cat >>confdefs.h <<\EOF
19382 #define HAVE_VSSCANF 1
19383 EOF
19384 ;;
19385 (vfscanf)
19386 cat >>confdefs.h <<\EOF
19387 #define HAVE_VFSCANF 1
19388 EOF
19389 ;;
19390 (_doscan)
19391 cat >>confdefs.h <<\EOF
19392 #define HAVE__DOSCAN 1
19393 EOF
19394 ;;
19395 esac
19396
19397 for ac_header in \
19398 unistd.h \
19399
19400 do
19401 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19402 echo "$as_me:19402: checking for $ac_header" >&5
19403 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19404 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407   cat >conftest.$ac_ext <<_ACEOF
19408 #line 19408 "configure"
19409 #include "confdefs.h"
19410 #include <$ac_header>
19411 _ACEOF
19412 if { (eval echo "$as_me:19412: \"$ac_cpp conftest.$ac_ext\"") >&5
19413   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19414   ac_status=$?
19415   egrep -v '^ *\+' conftest.er1 >conftest.err
19416   rm -f conftest.er1
19417   cat conftest.err >&5
19418   echo "$as_me:19418: \$? = $ac_status" >&5
19419   (exit $ac_status); } >/dev/null; then
19420   if test -s conftest.err; then
19421     ac_cpp_err=$ac_c_preproc_warn_flag
19422   else
19423     ac_cpp_err=
19424   fi
19425 else
19426   ac_cpp_err=yes
19427 fi
19428 if test -z "$ac_cpp_err"; then
19429   eval "$as_ac_Header=yes"
19430 else
19431   echo "$as_me: failed program was:" >&5
19432   cat conftest.$ac_ext >&5
19433   eval "$as_ac_Header=no"
19434 fi
19435 rm -f conftest.err conftest.$ac_ext
19436 fi
19437 echo "$as_me:19437: result: `eval echo '${'$as_ac_Header'}'`" >&5
19438 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19439 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19440   cat >>confdefs.h <<EOF
19441 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19442 EOF
19443
19444 fi
19445 done
19446
19447 echo "$as_me:19447: checking for working mkstemp" >&5
19448 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19449 if test "${cf_cv_func_mkstemp+set}" = set; then
19450   echo $ECHO_N "(cached) $ECHO_C" >&6
19451 else
19452
19453 rm -rf conftest*
19454 if test "$cross_compiling" = yes; then
19455   cf_cv_func_mkstemp=maybe
19456 else
19457   cat >conftest.$ac_ext <<_ACEOF
19458 #line 19458 "configure"
19459 #include "confdefs.h"
19460
19461 #include <sys/types.h>
19462 #ifdef HAVE_UNISTD_H
19463 #include <unistd.h>
19464 #endif
19465 #include <stdlib.h>
19466 #include <stdio.h>
19467 #include <string.h>
19468 #include <sys/stat.h>
19469 int main(void)
19470 {
19471         char *tmpl = "conftestXXXXXX";
19472         char name[2][80];
19473         int n;
19474         int result = 0;
19475         int fd;
19476         struct stat sb;
19477
19478         umask(077);
19479         for (n = 0; n < 2; ++n) {
19480                 strcpy(name[n], tmpl);
19481                 if ((fd = mkstemp(name[n])) >= 0) {
19482                         if (!strcmp(name[n], tmpl)
19483                          || stat(name[n], &sb) != 0
19484                          || (sb.st_mode & S_IFMT) != S_IFREG
19485                          || (sb.st_mode & 077) != 0) {
19486                                 result = 1;
19487                         }
19488                         close(fd);
19489                 }
19490         }
19491         if (result == 0
19492          && !strcmp(name[0], name[1]))
19493                 result = 1;
19494         ${cf_cv_main_return:-return}(result);
19495 }
19496
19497 _ACEOF
19498 rm -f conftest$ac_exeext
19499 if { (eval echo "$as_me:19499: \"$ac_link\"") >&5
19500   (eval $ac_link) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19504   { (eval echo "$as_me:19504: \"$ac_try\"") >&5
19505   (eval $ac_try) 2>&5
19506   ac_status=$?
19507   echo "$as_me:19507: \$? = $ac_status" >&5
19508   (exit $ac_status); }; }; then
19509   cf_cv_func_mkstemp=yes
19510
19511 else
19512   echo "$as_me: program exited with status $ac_status" >&5
19513 echo "$as_me: failed program was:" >&5
19514 cat conftest.$ac_ext >&5
19515 cf_cv_func_mkstemp=no
19516
19517 fi
19518 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19519 fi
19520
19521 fi
19522 echo "$as_me:19522: result: $cf_cv_func_mkstemp" >&5
19523 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19524 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19525         echo "$as_me:19525: checking for mkstemp" >&5
19526 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19527 if test "${ac_cv_func_mkstemp+set}" = set; then
19528   echo $ECHO_N "(cached) $ECHO_C" >&6
19529 else
19530   cat >conftest.$ac_ext <<_ACEOF
19531 #line 19531 "configure"
19532 #include "confdefs.h"
19533 /* System header to define __stub macros and hopefully few prototypes,
19534     which can conflict with char mkstemp (); below.  */
19535 #include <assert.h>
19536 /* Override any gcc2 internal prototype to avoid an error.  */
19537 #ifdef __cplusplus
19538 extern "C"
19539 #endif
19540 /* We use char because int might match the return type of a gcc2
19541    builtin and then its argument prototype would still apply.  */
19542 char mkstemp ();
19543 char (*f) ();
19544
19545 int
19546 main (void)
19547 {
19548 /* The GNU C library defines this for functions which it implements
19549     to always fail with ENOSYS.  Some functions are actually named
19550     something starting with __ and the normal name is an alias.  */
19551 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19552 choke me
19553 #else
19554 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19555 #endif
19556
19557   ;
19558   return 0;
19559 }
19560 _ACEOF
19561 rm -f conftest.$ac_objext conftest$ac_exeext
19562 if { (eval echo "$as_me:19562: \"$ac_link\"") >&5
19563   (eval $ac_link) 2>&5
19564   ac_status=$?
19565   echo "$as_me:19565: \$? = $ac_status" >&5
19566   (exit $ac_status); } &&
19567          { ac_try='test -s conftest$ac_exeext'
19568   { (eval echo "$as_me:19568: \"$ac_try\"") >&5
19569   (eval $ac_try) 2>&5
19570   ac_status=$?
19571   echo "$as_me:19571: \$? = $ac_status" >&5
19572   (exit $ac_status); }; }; then
19573   ac_cv_func_mkstemp=yes
19574 else
19575   echo "$as_me: failed program was:" >&5
19576 cat conftest.$ac_ext >&5
19577 ac_cv_func_mkstemp=no
19578 fi
19579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19580 fi
19581 echo "$as_me:19581: result: $ac_cv_func_mkstemp" >&5
19582 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19583
19584 fi
19585 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19586
19587 cat >>confdefs.h <<\EOF
19588 #define HAVE_MKSTEMP 1
19589 EOF
19590
19591 fi
19592
19593 # setup for prototype of fallback for vsscanf()
19594
19595 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19596         HAVE_VSSCANF=1
19597 else
19598         HAVE_VSSCANF=0
19599 fi
19600
19601 if test "x$cross_compiling" = xyes ; then
19602         { echo "$as_me:19602: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19603 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19604 else
19605         echo "$as_me:19605: checking whether setvbuf arguments are reversed" >&5
19606 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19607 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19608   echo $ECHO_N "(cached) $ECHO_C" >&6
19609 else
19610   if test "$cross_compiling" = yes; then
19611   { { echo "$as_me:19611: error: cannot run test program while cross compiling" >&5
19612 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19613    { (exit 1); exit 1; }; }
19614 else
19615   cat >conftest.$ac_ext <<_ACEOF
19616 #line 19616 "configure"
19617 #include "confdefs.h"
19618 #include <stdio.h>
19619 /* If setvbuf has the reversed format, exit 0. */
19620 int
19621 main (void)
19622 {
19623   /* This call has the arguments reversed.
19624      A reversed system may check and see that the address of main
19625      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19626   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19627     $ac_main_return(1);
19628   putc('\r', stdout);
19629   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19630 }
19631 _ACEOF
19632 rm -f conftest$ac_exeext
19633 if { (eval echo "$as_me:19633: \"$ac_link\"") >&5
19634   (eval $ac_link) 2>&5
19635   ac_status=$?
19636   echo "$as_me:19636: \$? = $ac_status" >&5
19637   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19638   { (eval echo "$as_me:19638: \"$ac_try\"") >&5
19639   (eval $ac_try) 2>&5
19640   ac_status=$?
19641   echo "$as_me:19641: \$? = $ac_status" >&5
19642   (exit $ac_status); }; }; then
19643   ac_cv_func_setvbuf_reversed=yes
19644 else
19645   echo "$as_me: program exited with status $ac_status" >&5
19646 echo "$as_me: failed program was:" >&5
19647 cat conftest.$ac_ext >&5
19648 ac_cv_func_setvbuf_reversed=no
19649 fi
19650 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19651 fi
19652 rm -f core core.* *.core
19653 fi
19654 echo "$as_me:19654: result: $ac_cv_func_setvbuf_reversed" >&5
19655 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19656 if test $ac_cv_func_setvbuf_reversed = yes; then
19657
19658 cat >>confdefs.h <<\EOF
19659 #define SETVBUF_REVERSED 1
19660 EOF
19661
19662 fi
19663
19664 fi
19665 echo "$as_me:19665: checking for intptr_t" >&5
19666 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19667 if test "${ac_cv_type_intptr_t+set}" = set; then
19668   echo $ECHO_N "(cached) $ECHO_C" >&6
19669 else
19670   cat >conftest.$ac_ext <<_ACEOF
19671 #line 19671 "configure"
19672 #include "confdefs.h"
19673 $ac_includes_default
19674 int
19675 main (void)
19676 {
19677 if ((intptr_t *) 0)
19678   return 0;
19679 if (sizeof (intptr_t))
19680   return 0;
19681   ;
19682   return 0;
19683 }
19684 _ACEOF
19685 rm -f conftest.$ac_objext
19686 if { (eval echo "$as_me:19686: \"$ac_compile\"") >&5
19687   (eval $ac_compile) 2>&5
19688   ac_status=$?
19689   echo "$as_me:19689: \$? = $ac_status" >&5
19690   (exit $ac_status); } &&
19691          { ac_try='test -s conftest.$ac_objext'
19692   { (eval echo "$as_me:19692: \"$ac_try\"") >&5
19693   (eval $ac_try) 2>&5
19694   ac_status=$?
19695   echo "$as_me:19695: \$? = $ac_status" >&5
19696   (exit $ac_status); }; }; then
19697   ac_cv_type_intptr_t=yes
19698 else
19699   echo "$as_me: failed program was:" >&5
19700 cat conftest.$ac_ext >&5
19701 ac_cv_type_intptr_t=no
19702 fi
19703 rm -f conftest.$ac_objext conftest.$ac_ext
19704 fi
19705 echo "$as_me:19705: result: $ac_cv_type_intptr_t" >&5
19706 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19707 if test $ac_cv_type_intptr_t = yes; then
19708   :
19709 else
19710
19711 cat >>confdefs.h <<EOF
19712 #define intptr_t long
19713 EOF
19714
19715 fi
19716
19717 echo "$as_me:19717: checking for ssize_t" >&5
19718 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19719 if test "${ac_cv_type_ssize_t+set}" = set; then
19720   echo $ECHO_N "(cached) $ECHO_C" >&6
19721 else
19722   cat >conftest.$ac_ext <<_ACEOF
19723 #line 19723 "configure"
19724 #include "confdefs.h"
19725 $ac_includes_default
19726 int
19727 main (void)
19728 {
19729 if ((ssize_t *) 0)
19730   return 0;
19731 if (sizeof (ssize_t))
19732   return 0;
19733   ;
19734   return 0;
19735 }
19736 _ACEOF
19737 rm -f conftest.$ac_objext
19738 if { (eval echo "$as_me:19738: \"$ac_compile\"") >&5
19739   (eval $ac_compile) 2>&5
19740   ac_status=$?
19741   echo "$as_me:19741: \$? = $ac_status" >&5
19742   (exit $ac_status); } &&
19743          { ac_try='test -s conftest.$ac_objext'
19744   { (eval echo "$as_me:19744: \"$ac_try\"") >&5
19745   (eval $ac_try) 2>&5
19746   ac_status=$?
19747   echo "$as_me:19747: \$? = $ac_status" >&5
19748   (exit $ac_status); }; }; then
19749   ac_cv_type_ssize_t=yes
19750 else
19751   echo "$as_me: failed program was:" >&5
19752 cat conftest.$ac_ext >&5
19753 ac_cv_type_ssize_t=no
19754 fi
19755 rm -f conftest.$ac_objext conftest.$ac_ext
19756 fi
19757 echo "$as_me:19757: result: $ac_cv_type_ssize_t" >&5
19758 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19759 if test $ac_cv_type_ssize_t = yes; then
19760   :
19761 else
19762
19763 cat >>confdefs.h <<EOF
19764 #define ssize_t int
19765 EOF
19766
19767 fi
19768
19769 echo "$as_me:19769: checking for type sigaction_t" >&5
19770 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19771 if test "${cf_cv_type_sigaction+set}" = set; then
19772   echo $ECHO_N "(cached) $ECHO_C" >&6
19773 else
19774
19775         cat >conftest.$ac_ext <<_ACEOF
19776 #line 19776 "configure"
19777 #include "confdefs.h"
19778
19779 #include <signal.h>
19780 int
19781 main (void)
19782 {
19783 sigaction_t x
19784   ;
19785   return 0;
19786 }
19787 _ACEOF
19788 rm -f conftest.$ac_objext
19789 if { (eval echo "$as_me:19789: \"$ac_compile\"") >&5
19790   (eval $ac_compile) 2>&5
19791   ac_status=$?
19792   echo "$as_me:19792: \$? = $ac_status" >&5
19793   (exit $ac_status); } &&
19794          { ac_try='test -s conftest.$ac_objext'
19795   { (eval echo "$as_me:19795: \"$ac_try\"") >&5
19796   (eval $ac_try) 2>&5
19797   ac_status=$?
19798   echo "$as_me:19798: \$? = $ac_status" >&5
19799   (exit $ac_status); }; }; then
19800   cf_cv_type_sigaction=yes
19801 else
19802   echo "$as_me: failed program was:" >&5
19803 cat conftest.$ac_ext >&5
19804 cf_cv_type_sigaction=no
19805 fi
19806 rm -f conftest.$ac_objext conftest.$ac_ext
19807 fi
19808
19809 echo "$as_me:19809: result: $cf_cv_type_sigaction" >&5
19810 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19811 test "$cf_cv_type_sigaction" = yes &&
19812 cat >>confdefs.h <<\EOF
19813 #define HAVE_TYPE_SIGACTION 1
19814 EOF
19815
19816 echo "$as_me:19816: checking declaration of size-change" >&5
19817 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19818 if test "${cf_cv_sizechange+set}" = set; then
19819   echo $ECHO_N "(cached) $ECHO_C" >&6
19820 else
19821
19822         cf_cv_sizechange=unknown
19823         cf_save_CPPFLAGS="$CPPFLAGS"
19824
19825 for cf_opts in "" "NEED_PTEM_H"
19826 do
19827
19828         CPPFLAGS="$cf_save_CPPFLAGS"
19829         if test -n "$cf_opts"
19830         then
19831
19832         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19833         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19834
19835         fi
19836         cat >conftest.$ac_ext <<_ACEOF
19837 #line 19837 "configure"
19838 #include "confdefs.h"
19839 #include <sys/types.h>
19840 #ifdef HAVE_TERMIOS_H
19841 #include <termios.h>
19842 #else
19843 #ifdef HAVE_TERMIO_H
19844 #include <termio.h>
19845 #endif
19846 #endif
19847
19848 #ifdef NEED_PTEM_H
19849 /* This is a workaround for SCO:  they neglected to define struct winsize in
19850  * termios.h -- it's only in termio.h and ptem.h
19851  */
19852 #include <sys/stream.h>
19853 #include <sys/ptem.h>
19854 #endif
19855
19856 #ifdef HAVE_SYS_IOCTL_H
19857 #include <sys/ioctl.h>
19858 #endif
19859
19860 int
19861 main (void)
19862 {
19863
19864 #ifdef TIOCGSIZE
19865         struct ttysize win;     /* SunOS 3.0... */
19866         int y = win.ts_lines;
19867         int x = win.ts_cols;
19868 #else
19869 #ifdef TIOCGWINSZ
19870         struct winsize win;     /* everything else */
19871         int y = win.ws_row;
19872         int x = win.ws_col;
19873 #else
19874         no TIOCGSIZE or TIOCGWINSZ
19875 #endif /* TIOCGWINSZ */
19876 #endif /* TIOCGSIZE */
19877
19878   ;
19879   return 0;
19880 }
19881 _ACEOF
19882 rm -f conftest.$ac_objext
19883 if { (eval echo "$as_me:19883: \"$ac_compile\"") >&5
19884   (eval $ac_compile) 2>&5
19885   ac_status=$?
19886   echo "$as_me:19886: \$? = $ac_status" >&5
19887   (exit $ac_status); } &&
19888          { ac_try='test -s conftest.$ac_objext'
19889   { (eval echo "$as_me:19889: \"$ac_try\"") >&5
19890   (eval $ac_try) 2>&5
19891   ac_status=$?
19892   echo "$as_me:19892: \$? = $ac_status" >&5
19893   (exit $ac_status); }; }; then
19894   cf_cv_sizechange=yes
19895 else
19896   echo "$as_me: failed program was:" >&5
19897 cat conftest.$ac_ext >&5
19898 cf_cv_sizechange=no
19899 fi
19900 rm -f conftest.$ac_objext conftest.$ac_ext
19901
19902         CPPFLAGS="$cf_save_CPPFLAGS"
19903         if test "$cf_cv_sizechange" = yes ; then
19904                 echo "size-change succeeded ($cf_opts)" >&5
19905                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19906                 break
19907         fi
19908 done
19909
19910 fi
19911 echo "$as_me:19911: result: $cf_cv_sizechange" >&5
19912 echo "${ECHO_T}$cf_cv_sizechange" >&6
19913 if test "$cf_cv_sizechange" != no ; then
19914
19915 cat >>confdefs.h <<\EOF
19916 #define HAVE_SIZECHANGE 1
19917 EOF
19918
19919         case $cf_cv_sizechange in
19920         (NEED*)
19921                 cat >>confdefs.h <<EOF
19922 #define $cf_cv_sizechange  1
19923 EOF
19924
19925                 ;;
19926         esac
19927 fi
19928
19929 echo "$as_me:19929: checking for memmove" >&5
19930 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19931 if test "${ac_cv_func_memmove+set}" = set; then
19932   echo $ECHO_N "(cached) $ECHO_C" >&6
19933 else
19934   cat >conftest.$ac_ext <<_ACEOF
19935 #line 19935 "configure"
19936 #include "confdefs.h"
19937 /* System header to define __stub macros and hopefully few prototypes,
19938     which can conflict with char memmove (); below.  */
19939 #include <assert.h>
19940 /* Override any gcc2 internal prototype to avoid an error.  */
19941 #ifdef __cplusplus
19942 extern "C"
19943 #endif
19944 /* We use char because int might match the return type of a gcc2
19945    builtin and then its argument prototype would still apply.  */
19946 char memmove ();
19947 char (*f) ();
19948
19949 int
19950 main (void)
19951 {
19952 /* The GNU C library defines this for functions which it implements
19953     to always fail with ENOSYS.  Some functions are actually named
19954     something starting with __ and the normal name is an alias.  */
19955 #if defined (__stub_memmove) || defined (__stub___memmove)
19956 choke me
19957 #else
19958 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19959 #endif
19960
19961   ;
19962   return 0;
19963 }
19964 _ACEOF
19965 rm -f conftest.$ac_objext conftest$ac_exeext
19966 if { (eval echo "$as_me:19966: \"$ac_link\"") >&5
19967   (eval $ac_link) 2>&5
19968   ac_status=$?
19969   echo "$as_me:19969: \$? = $ac_status" >&5
19970   (exit $ac_status); } &&
19971          { ac_try='test -s conftest$ac_exeext'
19972   { (eval echo "$as_me:19972: \"$ac_try\"") >&5
19973   (eval $ac_try) 2>&5
19974   ac_status=$?
19975   echo "$as_me:19975: \$? = $ac_status" >&5
19976   (exit $ac_status); }; }; then
19977   ac_cv_func_memmove=yes
19978 else
19979   echo "$as_me: failed program was:" >&5
19980 cat conftest.$ac_ext >&5
19981 ac_cv_func_memmove=no
19982 fi
19983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19984 fi
19985 echo "$as_me:19985: result: $ac_cv_func_memmove" >&5
19986 echo "${ECHO_T}$ac_cv_func_memmove" >&6
19987 if test $ac_cv_func_memmove = yes; then
19988   :
19989 else
19990
19991 echo "$as_me:19991: checking for bcopy" >&5
19992 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
19993 if test "${ac_cv_func_bcopy+set}" = set; then
19994   echo $ECHO_N "(cached) $ECHO_C" >&6
19995 else
19996   cat >conftest.$ac_ext <<_ACEOF
19997 #line 19997 "configure"
19998 #include "confdefs.h"
19999 /* System header to define __stub macros and hopefully few prototypes,
20000     which can conflict with char bcopy (); below.  */
20001 #include <assert.h>
20002 /* Override any gcc2 internal prototype to avoid an error.  */
20003 #ifdef __cplusplus
20004 extern "C"
20005 #endif
20006 /* We use char because int might match the return type of a gcc2
20007    builtin and then its argument prototype would still apply.  */
20008 char bcopy ();
20009 char (*f) ();
20010
20011 int
20012 main (void)
20013 {
20014 /* The GNU C library defines this for functions which it implements
20015     to always fail with ENOSYS.  Some functions are actually named
20016     something starting with __ and the normal name is an alias.  */
20017 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20018 choke me
20019 #else
20020 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20021 #endif
20022
20023   ;
20024   return 0;
20025 }
20026 _ACEOF
20027 rm -f conftest.$ac_objext conftest$ac_exeext
20028 if { (eval echo "$as_me:20028: \"$ac_link\"") >&5
20029   (eval $ac_link) 2>&5
20030   ac_status=$?
20031   echo "$as_me:20031: \$? = $ac_status" >&5
20032   (exit $ac_status); } &&
20033          { ac_try='test -s conftest$ac_exeext'
20034   { (eval echo "$as_me:20034: \"$ac_try\"") >&5
20035   (eval $ac_try) 2>&5
20036   ac_status=$?
20037   echo "$as_me:20037: \$? = $ac_status" >&5
20038   (exit $ac_status); }; }; then
20039   ac_cv_func_bcopy=yes
20040 else
20041   echo "$as_me: failed program was:" >&5
20042 cat conftest.$ac_ext >&5
20043 ac_cv_func_bcopy=no
20044 fi
20045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20046 fi
20047 echo "$as_me:20047: result: $ac_cv_func_bcopy" >&5
20048 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20049 if test $ac_cv_func_bcopy = yes; then
20050
20051         echo "$as_me:20051: checking if bcopy does overlapping moves" >&5
20052 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20053 if test "${cf_cv_good_bcopy+set}" = set; then
20054   echo $ECHO_N "(cached) $ECHO_C" >&6
20055 else
20056
20057                 if test "$cross_compiling" = yes; then
20058   cf_cv_good_bcopy=unknown
20059 else
20060   cat >conftest.$ac_ext <<_ACEOF
20061 #line 20061 "configure"
20062 #include "confdefs.h"
20063
20064 int main(void) {
20065         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20066         char temp[40];
20067         bcopy(data, temp, sizeof(data));
20068         bcopy(temp+10, temp, 15);
20069         bcopy(temp+5, temp+15, 10);
20070         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20071 }
20072
20073 _ACEOF
20074 rm -f conftest$ac_exeext
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076   (eval $ac_link) 2>&5
20077   ac_status=$?
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20080   { (eval echo "$as_me:20080: \"$ac_try\"") >&5
20081   (eval $ac_try) 2>&5
20082   ac_status=$?
20083   echo "$as_me:20083: \$? = $ac_status" >&5
20084   (exit $ac_status); }; }; then
20085   cf_cv_good_bcopy=yes
20086 else
20087   echo "$as_me: program exited with status $ac_status" >&5
20088 echo "$as_me: failed program was:" >&5
20089 cat conftest.$ac_ext >&5
20090 cf_cv_good_bcopy=no
20091 fi
20092 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20093 fi
20094
20095 fi
20096 echo "$as_me:20096: result: $cf_cv_good_bcopy" >&5
20097 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20098
20099 else
20100   cf_cv_good_bcopy=no
20101 fi
20102
20103         if test "$cf_cv_good_bcopy" = yes ; then
20104
20105 cat >>confdefs.h <<\EOF
20106 #define USE_OK_BCOPY 1
20107 EOF
20108
20109         else
20110
20111 cat >>confdefs.h <<\EOF
20112 #define USE_MY_MEMMOVE 1
20113 EOF
20114
20115         fi
20116
20117 fi
20118
20119 tty 2>&1 >/dev/null || {
20120 for ac_func in posix_openpt
20121 do
20122 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20123 echo "$as_me:20123: checking for $ac_func" >&5
20124 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20125 if eval "test \"\${$as_ac_var+set}\" = set"; then
20126   echo $ECHO_N "(cached) $ECHO_C" >&6
20127 else
20128   cat >conftest.$ac_ext <<_ACEOF
20129 #line 20129 "configure"
20130 #include "confdefs.h"
20131 /* System header to define __stub macros and hopefully few prototypes,
20132     which can conflict with char $ac_func (); below.  */
20133 #include <assert.h>
20134 /* Override any gcc2 internal prototype to avoid an error.  */
20135 #ifdef __cplusplus
20136 extern "C"
20137 #endif
20138 /* We use char because int might match the return type of a gcc2
20139    builtin and then its argument prototype would still apply.  */
20140 char $ac_func ();
20141 char (*f) ();
20142
20143 int
20144 main (void)
20145 {
20146 /* The GNU C library defines this for functions which it implements
20147     to always fail with ENOSYS.  Some functions are actually named
20148     something starting with __ and the normal name is an alias.  */
20149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20150 choke me
20151 #else
20152 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20153 #endif
20154
20155   ;
20156   return 0;
20157 }
20158 _ACEOF
20159 rm -f conftest.$ac_objext conftest$ac_exeext
20160 if { (eval echo "$as_me:20160: \"$ac_link\"") >&5
20161   (eval $ac_link) 2>&5
20162   ac_status=$?
20163   echo "$as_me:20163: \$? = $ac_status" >&5
20164   (exit $ac_status); } &&
20165          { ac_try='test -s conftest$ac_exeext'
20166   { (eval echo "$as_me:20166: \"$ac_try\"") >&5
20167   (eval $ac_try) 2>&5
20168   ac_status=$?
20169   echo "$as_me:20169: \$? = $ac_status" >&5
20170   (exit $ac_status); }; }; then
20171   eval "$as_ac_var=yes"
20172 else
20173   echo "$as_me: failed program was:" >&5
20174 cat conftest.$ac_ext >&5
20175 eval "$as_ac_var=no"
20176 fi
20177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20178 fi
20179 echo "$as_me:20179: result: `eval echo '${'$as_ac_var'}'`" >&5
20180 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20181 if test `eval echo '${'$as_ac_var'}'` = yes; then
20182   cat >>confdefs.h <<EOF
20183 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20184 EOF
20185
20186 fi
20187 done
20188  }
20189 echo "$as_me:20189: checking if poll really works" >&5
20190 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20191 if test "${cf_cv_working_poll+set}" = set; then
20192   echo $ECHO_N "(cached) $ECHO_C" >&6
20193 else
20194
20195 if test "$cross_compiling" = yes; then
20196   cf_cv_working_poll=unknown
20197 else
20198   cat >conftest.$ac_ext <<_ACEOF
20199 #line 20199 "configure"
20200 #include "confdefs.h"
20201
20202 #include <stdlib.h>
20203 #include <stdio.h>
20204 #include <unistd.h>
20205 #include <fcntl.h>
20206 #ifdef HAVE_POLL_H
20207 #include <poll.h>
20208 #else
20209 #include <sys/poll.h>
20210 #endif
20211 int main(void) {
20212         struct pollfd myfds;
20213         int ret;
20214
20215         /* check for Darwin bug with respect to "devices" */
20216         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20217         if (myfds.fd < 0)
20218                 myfds.fd = 0;
20219         myfds.events = POLLIN;
20220         myfds.revents = 0;
20221
20222         ret = poll(&myfds, 1, 100);
20223
20224         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20225                 ret = -1;
20226         } else {
20227                 int fd = 0;
20228                 if (!isatty(fd)) {
20229                         fd = open("/dev/tty", 2);       /* O_RDWR */
20230                 }
20231 #ifdef HAVE_POSIX_OPENPT
20232                 if (fd < 0) {
20233                         fd = posix_openpt(O_RDWR);
20234                 }
20235 #endif
20236
20237                 if (fd >= 0) {
20238                         /* also check with standard input */
20239                         myfds.fd = fd;
20240                         myfds.events = POLLIN;
20241                         myfds.revents = 0;
20242                         ret = poll(&myfds, 1, 100);
20243                 } else {
20244                         ret = -1;
20245                 }
20246         }
20247         ${cf_cv_main_return:-return}(ret < 0);
20248 }
20249 _ACEOF
20250 rm -f conftest$ac_exeext
20251 if { (eval echo "$as_me:20251: \"$ac_link\"") >&5
20252   (eval $ac_link) 2>&5
20253   ac_status=$?
20254   echo "$as_me:20254: \$? = $ac_status" >&5
20255   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20256   { (eval echo "$as_me:20256: \"$ac_try\"") >&5
20257   (eval $ac_try) 2>&5
20258   ac_status=$?
20259   echo "$as_me:20259: \$? = $ac_status" >&5
20260   (exit $ac_status); }; }; then
20261   cf_cv_working_poll=yes
20262 else
20263   echo "$as_me: program exited with status $ac_status" >&5
20264 echo "$as_me: failed program was:" >&5
20265 cat conftest.$ac_ext >&5
20266 cf_cv_working_poll=no
20267 fi
20268 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20269 fi
20270 fi
20271 echo "$as_me:20271: result: $cf_cv_working_poll" >&5
20272 echo "${ECHO_T}$cf_cv_working_poll" >&6
20273 test "$cf_cv_working_poll" = "yes" &&
20274 cat >>confdefs.h <<\EOF
20275 #define HAVE_WORKING_POLL 1
20276 EOF
20277
20278 echo "$as_me:20278: checking for va_copy" >&5
20279 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20280 if test "${cf_cv_have_va_copy+set}" = set; then
20281   echo $ECHO_N "(cached) $ECHO_C" >&6
20282 else
20283
20284 cat >conftest.$ac_ext <<_ACEOF
20285 #line 20285 "configure"
20286 #include "confdefs.h"
20287
20288 #include <stdarg.h>
20289
20290 int
20291 main (void)
20292 {
20293
20294         static va_list dst;
20295         static va_list src;
20296         va_copy(dst, src)
20297   ;
20298   return 0;
20299 }
20300 _ACEOF
20301 rm -f conftest.$ac_objext conftest$ac_exeext
20302 if { (eval echo "$as_me:20302: \"$ac_link\"") >&5
20303   (eval $ac_link) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit $ac_status); } &&
20307          { ac_try='test -s conftest$ac_exeext'
20308   { (eval echo "$as_me:20308: \"$ac_try\"") >&5
20309   (eval $ac_try) 2>&5
20310   ac_status=$?
20311   echo "$as_me:20311: \$? = $ac_status" >&5
20312   (exit $ac_status); }; }; then
20313   cf_cv_have_va_copy=yes
20314 else
20315   echo "$as_me: failed program was:" >&5
20316 cat conftest.$ac_ext >&5
20317 cf_cv_have_va_copy=no
20318 fi
20319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20320 fi
20321 echo "$as_me:20321: result: $cf_cv_have_va_copy" >&5
20322 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20323
20324 test "$cf_cv_have_va_copy" = yes &&
20325 cat >>confdefs.h <<\EOF
20326 #define HAVE_VA_COPY 1
20327 EOF
20328
20329 echo "$as_me:20329: checking for __va_copy" >&5
20330 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20331 if test "${cf_cv_have___va_copy+set}" = set; then
20332   echo $ECHO_N "(cached) $ECHO_C" >&6
20333 else
20334
20335 cat >conftest.$ac_ext <<_ACEOF
20336 #line 20336 "configure"
20337 #include "confdefs.h"
20338
20339 #include <stdarg.h>
20340
20341 int
20342 main (void)
20343 {
20344
20345         static va_list dst;
20346         static va_list src;
20347         __va_copy(dst, src)
20348   ;
20349   return 0;
20350 }
20351 _ACEOF
20352 rm -f conftest.$ac_objext conftest$ac_exeext
20353 if { (eval echo "$as_me:20353: \"$ac_link\"") >&5
20354   (eval $ac_link) 2>&5
20355   ac_status=$?
20356   echo "$as_me:20356: \$? = $ac_status" >&5
20357   (exit $ac_status); } &&
20358          { ac_try='test -s conftest$ac_exeext'
20359   { (eval echo "$as_me:20359: \"$ac_try\"") >&5
20360   (eval $ac_try) 2>&5
20361   ac_status=$?
20362   echo "$as_me:20362: \$? = $ac_status" >&5
20363   (exit $ac_status); }; }; then
20364   cf_cv_have___va_copy=yes
20365 else
20366   echo "$as_me: failed program was:" >&5
20367 cat conftest.$ac_ext >&5
20368 cf_cv_have___va_copy=no
20369 fi
20370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20371 fi
20372 echo "$as_me:20372: result: $cf_cv_have___va_copy" >&5
20373 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20374
20375 test "$cf_cv_have___va_copy" = yes &&
20376 cat >>confdefs.h <<\EOF
20377 #define HAVE___VA_COPY 1
20378 EOF
20379
20380 echo "$as_me:20380: checking for pid_t" >&5
20381 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20382 if test "${ac_cv_type_pid_t+set}" = set; then
20383   echo $ECHO_N "(cached) $ECHO_C" >&6
20384 else
20385   cat >conftest.$ac_ext <<_ACEOF
20386 #line 20386 "configure"
20387 #include "confdefs.h"
20388 $ac_includes_default
20389 int
20390 main (void)
20391 {
20392 if ((pid_t *) 0)
20393   return 0;
20394 if (sizeof (pid_t))
20395   return 0;
20396   ;
20397   return 0;
20398 }
20399 _ACEOF
20400 rm -f conftest.$ac_objext
20401 if { (eval echo "$as_me:20401: \"$ac_compile\"") >&5
20402   (eval $ac_compile) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); } &&
20406          { ac_try='test -s conftest.$ac_objext'
20407   { (eval echo "$as_me:20407: \"$ac_try\"") >&5
20408   (eval $ac_try) 2>&5
20409   ac_status=$?
20410   echo "$as_me:20410: \$? = $ac_status" >&5
20411   (exit $ac_status); }; }; then
20412   ac_cv_type_pid_t=yes
20413 else
20414   echo "$as_me: failed program was:" >&5
20415 cat conftest.$ac_ext >&5
20416 ac_cv_type_pid_t=no
20417 fi
20418 rm -f conftest.$ac_objext conftest.$ac_ext
20419 fi
20420 echo "$as_me:20420: result: $ac_cv_type_pid_t" >&5
20421 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20422 if test $ac_cv_type_pid_t = yes; then
20423   :
20424 else
20425
20426 cat >>confdefs.h <<EOF
20427 #define pid_t int
20428 EOF
20429
20430 fi
20431
20432 for ac_header in unistd.h vfork.h
20433 do
20434 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20435 echo "$as_me:20435: checking for $ac_header" >&5
20436 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20437 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20438   echo $ECHO_N "(cached) $ECHO_C" >&6
20439 else
20440   cat >conftest.$ac_ext <<_ACEOF
20441 #line 20441 "configure"
20442 #include "confdefs.h"
20443 #include <$ac_header>
20444 _ACEOF
20445 if { (eval echo "$as_me:20445: \"$ac_cpp conftest.$ac_ext\"") >&5
20446   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20447   ac_status=$?
20448   egrep -v '^ *\+' conftest.er1 >conftest.err
20449   rm -f conftest.er1
20450   cat conftest.err >&5
20451   echo "$as_me:20451: \$? = $ac_status" >&5
20452   (exit $ac_status); } >/dev/null; then
20453   if test -s conftest.err; then
20454     ac_cpp_err=$ac_c_preproc_warn_flag
20455   else
20456     ac_cpp_err=
20457   fi
20458 else
20459   ac_cpp_err=yes
20460 fi
20461 if test -z "$ac_cpp_err"; then
20462   eval "$as_ac_Header=yes"
20463 else
20464   echo "$as_me: failed program was:" >&5
20465   cat conftest.$ac_ext >&5
20466   eval "$as_ac_Header=no"
20467 fi
20468 rm -f conftest.err conftest.$ac_ext
20469 fi
20470 echo "$as_me:20470: result: `eval echo '${'$as_ac_Header'}'`" >&5
20471 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20472 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20473   cat >>confdefs.h <<EOF
20474 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20475 EOF
20476
20477 fi
20478 done
20479
20480 for ac_func in fork vfork
20481 do
20482 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20483 echo "$as_me:20483: checking for $ac_func" >&5
20484 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20485 if eval "test \"\${$as_ac_var+set}\" = set"; then
20486   echo $ECHO_N "(cached) $ECHO_C" >&6
20487 else
20488   cat >conftest.$ac_ext <<_ACEOF
20489 #line 20489 "configure"
20490 #include "confdefs.h"
20491 /* System header to define __stub macros and hopefully few prototypes,
20492     which can conflict with char $ac_func (); below.  */
20493 #include <assert.h>
20494 /* Override any gcc2 internal prototype to avoid an error.  */
20495 #ifdef __cplusplus
20496 extern "C"
20497 #endif
20498 /* We use char because int might match the return type of a gcc2
20499    builtin and then its argument prototype would still apply.  */
20500 char $ac_func ();
20501 char (*f) ();
20502
20503 int
20504 main (void)
20505 {
20506 /* The GNU C library defines this for functions which it implements
20507     to always fail with ENOSYS.  Some functions are actually named
20508     something starting with __ and the normal name is an alias.  */
20509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20510 choke me
20511 #else
20512 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20513 #endif
20514
20515   ;
20516   return 0;
20517 }
20518 _ACEOF
20519 rm -f conftest.$ac_objext conftest$ac_exeext
20520 if { (eval echo "$as_me:20520: \"$ac_link\"") >&5
20521   (eval $ac_link) 2>&5
20522   ac_status=$?
20523   echo "$as_me:20523: \$? = $ac_status" >&5
20524   (exit $ac_status); } &&
20525          { ac_try='test -s conftest$ac_exeext'
20526   { (eval echo "$as_me:20526: \"$ac_try\"") >&5
20527   (eval $ac_try) 2>&5
20528   ac_status=$?
20529   echo "$as_me:20529: \$? = $ac_status" >&5
20530   (exit $ac_status); }; }; then
20531   eval "$as_ac_var=yes"
20532 else
20533   echo "$as_me: failed program was:" >&5
20534 cat conftest.$ac_ext >&5
20535 eval "$as_ac_var=no"
20536 fi
20537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20538 fi
20539 echo "$as_me:20539: result: `eval echo '${'$as_ac_var'}'`" >&5
20540 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20541 if test `eval echo '${'$as_ac_var'}'` = yes; then
20542   cat >>confdefs.h <<EOF
20543 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20544 EOF
20545
20546 fi
20547 done
20548
20549 ac_cv_func_fork_works=$ac_cv_func_fork
20550 if test "x$ac_cv_func_fork" = xyes; then
20551   echo "$as_me:20551: checking for working fork" >&5
20552 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20553 if test "${ac_cv_func_fork_works+set}" = set; then
20554   echo $ECHO_N "(cached) $ECHO_C" >&6
20555 else
20556   if test "$cross_compiling" = yes; then
20557   ac_cv_func_fork_works=cross
20558 else
20559   cat >conftest.$ac_ext <<_ACEOF
20560 /* By Rüdiger Kuhlmann. */
20561       #include <sys/types.h>
20562       #if HAVE_UNISTD_H
20563       # include <unistd.h>
20564       #endif
20565       /* Some systems only have a dummy stub for fork() */
20566       int main (void)
20567       {
20568         if (fork() < 0)
20569           $ac_main_return (1);
20570         $ac_main_return (0);
20571       }
20572 _ACEOF
20573 rm -f conftest$ac_exeext
20574 if { (eval echo "$as_me:20574: \"$ac_link\"") >&5
20575   (eval $ac_link) 2>&5
20576   ac_status=$?
20577   echo "$as_me:20577: \$? = $ac_status" >&5
20578   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20579   { (eval echo "$as_me:20579: \"$ac_try\"") >&5
20580   (eval $ac_try) 2>&5
20581   ac_status=$?
20582   echo "$as_me:20582: \$? = $ac_status" >&5
20583   (exit $ac_status); }; }; then
20584   ac_cv_func_fork_works=yes
20585 else
20586   echo "$as_me: program exited with status $ac_status" >&5
20587 echo "$as_me: failed program was:" >&5
20588 cat conftest.$ac_ext >&5
20589 ac_cv_func_fork_works=no
20590 fi
20591 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20592 fi
20593 fi
20594 echo "$as_me:20594: result: $ac_cv_func_fork_works" >&5
20595 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20596
20597 fi
20598 if test "x$ac_cv_func_fork_works" = xcross; then
20599   case $host in
20600     *-*-amigaos* | *-*-msdosdjgpp*)
20601       # Override, as these systems have only a dummy fork() stub
20602       ac_cv_func_fork_works=no
20603       ;;
20604     *)
20605       ac_cv_func_fork_works=yes
20606       ;;
20607   esac
20608   { echo "$as_me:20608: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20609 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20610 fi
20611 ac_cv_func_vfork_works=$ac_cv_func_vfork
20612 if test "x$ac_cv_func_vfork" = xyes; then
20613   echo "$as_me:20613: checking for working vfork" >&5
20614 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20615 if test "${ac_cv_func_vfork_works+set}" = set; then
20616   echo $ECHO_N "(cached) $ECHO_C" >&6
20617 else
20618   if test "$cross_compiling" = yes; then
20619   ac_cv_func_vfork_works=cross
20620 else
20621   cat >conftest.$ac_ext <<_ACEOF
20622 #line 20622 "configure"
20623 #include "confdefs.h"
20624 /* Thanks to Paul Eggert for this test.  */
20625 #include <stdio.h>
20626 #include <sys/types.h>
20627 #include <sys/stat.h>
20628 #if HAVE_UNISTD_H
20629 # include <unistd.h>
20630 #endif
20631 #if HAVE_VFORK_H
20632 # include <vfork.h>
20633 #endif
20634 /* On some sparc systems, changes by the child to local and incoming
20635    argument registers are propagated back to the parent.  The compiler
20636    is told about this with #include <vfork.h>, but some compilers
20637    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20638    static variable whose address is put into a register that is
20639    clobbered by the vfork.  */
20640 static
20641 #ifdef __cplusplus
20642 sparc_address_test (int arg)
20643 # else
20644 sparc_address_test (arg) int arg;
20645 #endif
20646 {
20647   static pid_t child;
20648   if (!child) {
20649     child = vfork ();
20650     if (child < 0) {
20651       perror ("vfork");
20652       _exit(2);
20653     }
20654     if (!child) {
20655       arg = getpid();
20656       write(-1, "", 0);
20657       _exit (arg);
20658     }
20659   }
20660 }
20661
20662 int
20663 main (void)
20664 {
20665   pid_t parent = getpid ();
20666   pid_t child;
20667
20668   sparc_address_test ();
20669
20670   child = vfork ();
20671
20672   if (child == 0) {
20673     /* Here is another test for sparc vfork register problems.  This
20674        test uses lots of local variables, at least as many local
20675        variables as main has allocated so far including compiler
20676        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20677        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20678        reuse the register of parent for one of the local variables,
20679        since it will think that parent can't possibly be used any more
20680        in this routine.  Assigning to the local variable will thus
20681        munge parent in the parent process.  */
20682     pid_t
20683       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20684       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20685     /* Convince the compiler that p..p7 are live; otherwise, it might
20686        use the same hardware register for all 8 local variables.  */
20687     if (p != p1 || p != p2 || p != p3 || p != p4
20688         || p != p5 || p != p6 || p != p7)
20689       _exit(1);
20690
20691     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20692        from child file descriptors.  If the child closes a descriptor
20693        before it execs or exits, this munges the parent's descriptor
20694        as well.  Test for this by closing stdout in the child.  */
20695     _exit(close(fileno(stdout)) != 0);
20696   } else {
20697     int status;
20698     struct stat st;
20699
20700     while (wait(&status) != child)
20701       ;
20702     $ac_main_return(
20703          /* Was there some problem with vforking?  */
20704          child < 0
20705
20706          /* Did the child fail?  (This shouldn't happen.)  */
20707          || status
20708
20709          /* Did the vfork/compiler bug occur?  */
20710          || parent != getpid()
20711
20712          /* Did the file descriptor bug occur?  */
20713          || fstat(fileno(stdout), &st) != 0
20714          );
20715   }
20716 }
20717 _ACEOF
20718 rm -f conftest$ac_exeext
20719 if { (eval echo "$as_me:20719: \"$ac_link\"") >&5
20720   (eval $ac_link) 2>&5
20721   ac_status=$?
20722   echo "$as_me:20722: \$? = $ac_status" >&5
20723   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20724   { (eval echo "$as_me:20724: \"$ac_try\"") >&5
20725   (eval $ac_try) 2>&5
20726   ac_status=$?
20727   echo "$as_me:20727: \$? = $ac_status" >&5
20728   (exit $ac_status); }; }; then
20729   ac_cv_func_vfork_works=yes
20730 else
20731   echo "$as_me: program exited with status $ac_status" >&5
20732 echo "$as_me: failed program was:" >&5
20733 cat conftest.$ac_ext >&5
20734 ac_cv_func_vfork_works=no
20735 fi
20736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20737 fi
20738 fi
20739 echo "$as_me:20739: result: $ac_cv_func_vfork_works" >&5
20740 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20741
20742 fi;
20743 if test "x$ac_cv_func_fork_works" = xcross; then
20744   ac_cv_func_vfork_works=ac_cv_func_vfork
20745   { echo "$as_me:20745: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20746 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20747 fi
20748
20749 if test "x$ac_cv_func_vfork_works" = xyes; then
20750
20751 cat >>confdefs.h <<\EOF
20752 #define HAVE_WORKING_VFORK 1
20753 EOF
20754
20755 else
20756
20757 cat >>confdefs.h <<\EOF
20758 #define vfork fork
20759 EOF
20760
20761 fi
20762 if test "x$ac_cv_func_fork_works" = xyes; then
20763
20764 cat >>confdefs.h <<\EOF
20765 #define HAVE_WORKING_FORK 1
20766 EOF
20767
20768 fi
20769
20770 # special check for test/ditto.c
20771
20772 echo "$as_me:20772: checking for openpty in -lutil" >&5
20773 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20774 if test "${ac_cv_lib_util_openpty+set}" = set; then
20775   echo $ECHO_N "(cached) $ECHO_C" >&6
20776 else
20777   ac_check_lib_save_LIBS=$LIBS
20778 LIBS="-lutil  $LIBS"
20779 cat >conftest.$ac_ext <<_ACEOF
20780 #line 20780 "configure"
20781 #include "confdefs.h"
20782
20783 /* Override any gcc2 internal prototype to avoid an error.  */
20784 #ifdef __cplusplus
20785 extern "C"
20786 #endif
20787 /* We use char because int might match the return type of a gcc2
20788    builtin and then its argument prototype would still apply.  */
20789 char openpty ();
20790 int
20791 main (void)
20792 {
20793 openpty ();
20794   ;
20795   return 0;
20796 }
20797 _ACEOF
20798 rm -f conftest.$ac_objext conftest$ac_exeext
20799 if { (eval echo "$as_me:20799: \"$ac_link\"") >&5
20800   (eval $ac_link) 2>&5
20801   ac_status=$?
20802   echo "$as_me:20802: \$? = $ac_status" >&5
20803   (exit $ac_status); } &&
20804          { ac_try='test -s conftest$ac_exeext'
20805   { (eval echo "$as_me:20805: \"$ac_try\"") >&5
20806   (eval $ac_try) 2>&5
20807   ac_status=$?
20808   echo "$as_me:20808: \$? = $ac_status" >&5
20809   (exit $ac_status); }; }; then
20810   ac_cv_lib_util_openpty=yes
20811 else
20812   echo "$as_me: failed program was:" >&5
20813 cat conftest.$ac_ext >&5
20814 ac_cv_lib_util_openpty=no
20815 fi
20816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20817 LIBS=$ac_check_lib_save_LIBS
20818 fi
20819 echo "$as_me:20819: result: $ac_cv_lib_util_openpty" >&5
20820 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20821 if test $ac_cv_lib_util_openpty = yes; then
20822   cf_cv_lib_util=yes
20823 else
20824   cf_cv_lib_util=no
20825 fi
20826
20827 echo "$as_me:20827: checking for openpty header" >&5
20828 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20829 if test "${cf_cv_func_openpty+set}" = set; then
20830   echo $ECHO_N "(cached) $ECHO_C" >&6
20831 else
20832
20833         cf_save_LIBS="$LIBS"
20834         test $cf_cv_lib_util = yes && {
20835 cf_add_libs="-lutil"
20836 # Filter out duplicates - this happens with badly-designed ".pc" files...
20837 for cf_add_1lib in $LIBS
20838 do
20839         for cf_add_2lib in $cf_add_libs
20840         do
20841                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20842                 then
20843                         cf_add_1lib=
20844                         break
20845                 fi
20846         done
20847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20848 done
20849 LIBS="$cf_add_libs"
20850  }
20851         for cf_header in pty.h libutil.h util.h
20852         do
20853         cat >conftest.$ac_ext <<_ACEOF
20854 #line 20854 "configure"
20855 #include "confdefs.h"
20856
20857 #include <$cf_header>
20858
20859 int
20860 main (void)
20861 {
20862
20863         int x = openpty((int *)0, (int *)0, (char *)0,
20864                                    (struct termios *)0, (struct winsize *)0);
20865
20866   ;
20867   return 0;
20868 }
20869 _ACEOF
20870 rm -f conftest.$ac_objext conftest$ac_exeext
20871 if { (eval echo "$as_me:20871: \"$ac_link\"") >&5
20872   (eval $ac_link) 2>&5
20873   ac_status=$?
20874   echo "$as_me:20874: \$? = $ac_status" >&5
20875   (exit $ac_status); } &&
20876          { ac_try='test -s conftest$ac_exeext'
20877   { (eval echo "$as_me:20877: \"$ac_try\"") >&5
20878   (eval $ac_try) 2>&5
20879   ac_status=$?
20880   echo "$as_me:20880: \$? = $ac_status" >&5
20881   (exit $ac_status); }; }; then
20882
20883                 cf_cv_func_openpty=$cf_header
20884                 break
20885
20886 else
20887   echo "$as_me: failed program was:" >&5
20888 cat conftest.$ac_ext >&5
20889
20890                 cf_cv_func_openpty=no
20891
20892 fi
20893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20894         done
20895         LIBS="$cf_save_LIBS"
20896
20897 fi
20898 echo "$as_me:20898: result: $cf_cv_func_openpty" >&5
20899 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20900
20901 if test "$cf_cv_func_openpty" != no ; then
20902
20903 cat >>confdefs.h <<EOF
20904 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20905 EOF
20906
20907 cat >>confdefs.h <<\EOF
20908 #define USE_XTERM_PTY 1
20909 EOF
20910
20911         if test "x$cf_cv_lib_util" = xyes ; then
20912
20913 cf_add_libs="-lutil"
20914 # Filter out duplicates - this happens with badly-designed ".pc" files...
20915 for cf_add_1lib in $TEST_LIBS
20916 do
20917         for cf_add_2lib in $cf_add_libs
20918         do
20919                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20920                 then
20921                         cf_add_1lib=
20922                         break
20923                 fi
20924         done
20925         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20926 done
20927 TEST_LIBS="$cf_add_libs"
20928
20929         fi
20930 fi
20931
20932 if test "$with_hashed_db" != no ; then
20933
20934 cat >>confdefs.h <<\EOF
20935 #define USE_HASHED_DB 1
20936 EOF
20937
20938 case $with_hashed_db in
20939 (yes|*able*)
20940         ;;
20941 (*)
20942         if test -d "$with_hashed_db" ; then
20943
20944 if test -n "$with_hashed_db/include" ; then
20945   for cf_add_incdir in $with_hashed_db/include
20946   do
20947         while test $cf_add_incdir != /usr/include
20948         do
20949           if test -d $cf_add_incdir
20950           then
20951                 cf_have_incdir=no
20952                 if test -n "$CFLAGS$CPPFLAGS" ; then
20953                   # a loop is needed to ensure we can add subdirs of existing dirs
20954                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20955                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20956                           cf_have_incdir=yes; break
20957                         fi
20958                   done
20959                 fi
20960
20961                 if test "$cf_have_incdir" = no ; then
20962                   if test "$cf_add_incdir" = /usr/local/include ; then
20963                         if test "$GCC" = yes
20964                         then
20965                           cf_save_CPPFLAGS=$CPPFLAGS
20966
20967         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20968         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20969
20970                           cat >conftest.$ac_ext <<_ACEOF
20971 #line 20971 "configure"
20972 #include "confdefs.h"
20973 #include <stdio.h>
20974 int
20975 main (void)
20976 {
20977 printf("Hello")
20978   ;
20979   return 0;
20980 }
20981 _ACEOF
20982 rm -f conftest.$ac_objext
20983 if { (eval echo "$as_me:20983: \"$ac_compile\"") >&5
20984   (eval $ac_compile) 2>&5
20985   ac_status=$?
20986   echo "$as_me:20986: \$? = $ac_status" >&5
20987   (exit $ac_status); } &&
20988          { ac_try='test -s conftest.$ac_objext'
20989   { (eval echo "$as_me:20989: \"$ac_try\"") >&5
20990   (eval $ac_try) 2>&5
20991   ac_status=$?
20992   echo "$as_me:20992: \$? = $ac_status" >&5
20993   (exit $ac_status); }; }; then
20994   :
20995 else
20996   echo "$as_me: failed program was:" >&5
20997 cat conftest.$ac_ext >&5
20998 cf_have_incdir=yes
20999 fi
21000 rm -f conftest.$ac_objext conftest.$ac_ext
21001                           CPPFLAGS=$cf_save_CPPFLAGS
21002                         fi
21003                   fi
21004                 fi
21005
21006                 if test "$cf_have_incdir" = no ; then
21007                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21008
21009 echo "${as_me:-configure}:21009: testing adding $cf_add_incdir to include-path ..." 1>&5
21010
21011                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21012
21013                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21014                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21015                   cf_add_incdir="$cf_top_incdir"
21016                 else
21017                   break
21018                 fi
21019           else
21020                 break
21021           fi
21022         done
21023   done
21024 fi
21025
21026 if test -n "$with_hashed_db/lib" ; then
21027         for cf_add_libdir in $with_hashed_db/lib
21028         do
21029                 if test $cf_add_libdir = /usr/lib ; then
21030                         :
21031                 elif test -d $cf_add_libdir
21032                 then
21033                         cf_have_libdir=no
21034                         if test -n "$LDFLAGS$LIBS" ; then
21035                                 # a loop is needed to ensure we can add subdirs of existing dirs
21036                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21037                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21038                                                 cf_have_libdir=yes; break
21039                                         fi
21040                                 done
21041                         fi
21042                         if test "$cf_have_libdir" = no ; then
21043                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21044
21045 echo "${as_me:-configure}:21045: testing adding $cf_add_libdir to library-path ..." 1>&5
21046
21047                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21048                         fi
21049                 fi
21050         done
21051 fi
21052
21053         else
21054                 case "$with_hashed_db" in
21055                 (./*|../*|/*)
21056                         { echo "$as_me:21056: WARNING: no such directory $with_hashed_db" >&5
21057 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21058                         ;;
21059                 (*)
21060
21061 cf_search=
21062
21063 test "x$prefix" != "xNONE" && \
21064 test -d "$prefix" && \
21065  {
21066         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21067         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21068         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21069         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21070         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21071         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21072 }
21073
21074 for cf_subdir_prefix in \
21075         /usr \
21076         /usr/local \
21077         /usr/pkg \
21078         /opt \
21079         /opt/local \
21080         $HOME
21081 do
21082
21083 test "x$cf_subdir_prefix" != "x$prefix" && \
21084 test -d "$cf_subdir_prefix" && \
21085 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21086         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21087         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21088         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21089         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21090         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21091         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"
21092 }
21093
21094 done
21095
21096         for cf_item in $cf_search
21097         do
21098                 case $cf_item in
21099                 (*/$with_hashed_db)
21100
21101 if test -n "$cf_item" ; then
21102   for cf_add_incdir in $cf_item
21103   do
21104         while test $cf_add_incdir != /usr/include
21105         do
21106           if test -d $cf_add_incdir
21107           then
21108                 cf_have_incdir=no
21109                 if test -n "$CFLAGS$CPPFLAGS" ; then
21110                   # a loop is needed to ensure we can add subdirs of existing dirs
21111                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21112                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21113                           cf_have_incdir=yes; break
21114                         fi
21115                   done
21116                 fi
21117
21118                 if test "$cf_have_incdir" = no ; then
21119                   if test "$cf_add_incdir" = /usr/local/include ; then
21120                         if test "$GCC" = yes
21121                         then
21122                           cf_save_CPPFLAGS=$CPPFLAGS
21123
21124         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21125         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21126
21127                           cat >conftest.$ac_ext <<_ACEOF
21128 #line 21128 "configure"
21129 #include "confdefs.h"
21130 #include <stdio.h>
21131 int
21132 main (void)
21133 {
21134 printf("Hello")
21135   ;
21136   return 0;
21137 }
21138 _ACEOF
21139 rm -f conftest.$ac_objext
21140 if { (eval echo "$as_me:21140: \"$ac_compile\"") >&5
21141   (eval $ac_compile) 2>&5
21142   ac_status=$?
21143   echo "$as_me:21143: \$? = $ac_status" >&5
21144   (exit $ac_status); } &&
21145          { ac_try='test -s conftest.$ac_objext'
21146   { (eval echo "$as_me:21146: \"$ac_try\"") >&5
21147   (eval $ac_try) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit $ac_status); }; }; then
21151   :
21152 else
21153   echo "$as_me: failed program was:" >&5
21154 cat conftest.$ac_ext >&5
21155 cf_have_incdir=yes
21156 fi
21157 rm -f conftest.$ac_objext conftest.$ac_ext
21158                           CPPFLAGS=$cf_save_CPPFLAGS
21159                         fi
21160                   fi
21161                 fi
21162
21163                 if test "$cf_have_incdir" = no ; then
21164                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21165
21166 echo "${as_me:-configure}:21166: testing adding $cf_add_incdir to include-path ..." 1>&5
21167
21168                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21169
21170                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21171                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21172                   cf_add_incdir="$cf_top_incdir"
21173                 else
21174                   break
21175                 fi
21176           else
21177                 break
21178           fi
21179         done
21180   done
21181 fi
21182
21183                         ;;
21184                 esac
21185         done
21186
21187 cf_search=
21188
21189 test "x$prefix" != "xNONE" && \
21190 test -d "$prefix" && \
21191  {
21192         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21193         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21194         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21195         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21196         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21197         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21198 }
21199
21200 for cf_subdir_prefix in \
21201         /usr \
21202         /usr/local \
21203         /usr/pkg \
21204         /opt \
21205         /opt/local \
21206         $HOME
21207 do
21208
21209 test "x$cf_subdir_prefix" != "x$prefix" && \
21210 test -d "$cf_subdir_prefix" && \
21211 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21212         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21213         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21214         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21215         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21216         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21217         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"
21218 }
21219
21220 done
21221
21222         for cf_item in $cf_search
21223         do
21224                 case $cf_item in
21225                 (*/$with_hashed_db)
21226
21227 if test -n "$cf_item" ; then
21228         for cf_add_libdir in $cf_item
21229         do
21230                 if test $cf_add_libdir = /usr/lib ; then
21231                         :
21232                 elif test -d $cf_add_libdir
21233                 then
21234                         cf_have_libdir=no
21235                         if test -n "$LDFLAGS$LIBS" ; then
21236                                 # a loop is needed to ensure we can add subdirs of existing dirs
21237                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21238                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21239                                                 cf_have_libdir=yes; break
21240                                         fi
21241                                 done
21242                         fi
21243                         if test "$cf_have_libdir" = no ; then
21244                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21245
21246 echo "${as_me:-configure}:21246: testing adding $cf_add_libdir to library-path ..." 1>&5
21247
21248                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21249                         fi
21250                 fi
21251         done
21252 fi
21253
21254                         ;;
21255                 esac
21256         done
21257
21258                         ;;
21259                 esac
21260         fi
21261 esac
21262
21263 echo "$as_me:21263: checking for db.h" >&5
21264 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21265 if test "${ac_cv_header_db_h+set}" = set; then
21266   echo $ECHO_N "(cached) $ECHO_C" >&6
21267 else
21268   cat >conftest.$ac_ext <<_ACEOF
21269 #line 21269 "configure"
21270 #include "confdefs.h"
21271 #include <db.h>
21272 _ACEOF
21273 if { (eval echo "$as_me:21273: \"$ac_cpp conftest.$ac_ext\"") >&5
21274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21275   ac_status=$?
21276   egrep -v '^ *\+' conftest.er1 >conftest.err
21277   rm -f conftest.er1
21278   cat conftest.err >&5
21279   echo "$as_me:21279: \$? = $ac_status" >&5
21280   (exit $ac_status); } >/dev/null; then
21281   if test -s conftest.err; then
21282     ac_cpp_err=$ac_c_preproc_warn_flag
21283   else
21284     ac_cpp_err=
21285   fi
21286 else
21287   ac_cpp_err=yes
21288 fi
21289 if test -z "$ac_cpp_err"; then
21290   ac_cv_header_db_h=yes
21291 else
21292   echo "$as_me: failed program was:" >&5
21293   cat conftest.$ac_ext >&5
21294   ac_cv_header_db_h=no
21295 fi
21296 rm -f conftest.err conftest.$ac_ext
21297 fi
21298 echo "$as_me:21298: result: $ac_cv_header_db_h" >&5
21299 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21300 if test $ac_cv_header_db_h = yes; then
21301
21302 echo "$as_me:21302: checking for version of db" >&5
21303 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21304 if test "${cf_cv_hashed_db_version+set}" = set; then
21305   echo $ECHO_N "(cached) $ECHO_C" >&6
21306 else
21307
21308 cf_cv_hashed_db_version=unknown
21309
21310 for cf_db_version in 1 2 3 4 5 6
21311 do
21312
21313 echo "${as_me:-configure}:21313: testing checking for db version $cf_db_version ..." 1>&5
21314
21315         cat >conftest.$ac_ext <<_ACEOF
21316 #line 21316 "configure"
21317 #include "confdefs.h"
21318
21319 $ac_includes_default
21320 #include <db.h>
21321
21322 #ifdef DB_VERSION_MAJOR
21323         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21324 #if $cf_db_version == DB_VERSION_MAJOR
21325         /* ok */
21326 #else
21327         make an error
21328 #endif
21329 #else
21330 #if $cf_db_version == 1
21331         /* ok: assuming this is DB 1.8.5 */
21332 #else
21333         make an error
21334 #endif
21335 #endif
21336
21337 int
21338 main (void)
21339 {
21340 DBT *foo = 0
21341   ;
21342   return 0;
21343 }
21344 _ACEOF
21345 rm -f conftest.$ac_objext
21346 if { (eval echo "$as_me:21346: \"$ac_compile\"") >&5
21347   (eval $ac_compile) 2>&5
21348   ac_status=$?
21349   echo "$as_me:21349: \$? = $ac_status" >&5
21350   (exit $ac_status); } &&
21351          { ac_try='test -s conftest.$ac_objext'
21352   { (eval echo "$as_me:21352: \"$ac_try\"") >&5
21353   (eval $ac_try) 2>&5
21354   ac_status=$?
21355   echo "$as_me:21355: \$? = $ac_status" >&5
21356   (exit $ac_status); }; }; then
21357
21358         cf_cv_hashed_db_version=$cf_db_version
21359         break
21360
21361 else
21362   echo "$as_me: failed program was:" >&5
21363 cat conftest.$ac_ext >&5
21364 fi
21365 rm -f conftest.$ac_objext conftest.$ac_ext
21366 done
21367
21368 fi
21369 echo "$as_me:21369: result: $cf_cv_hashed_db_version" >&5
21370 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21371
21372 if test "$cf_cv_hashed_db_version" = unknown ; then
21373         { { echo "$as_me:21373: error: Cannot determine version of db" >&5
21374 echo "$as_me: error: Cannot determine version of db" >&2;}
21375    { (exit 1); exit 1; }; }
21376 else
21377
21378 echo "$as_me:21378: checking for db libraries" >&5
21379 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21380 if test "${cf_cv_hashed_db_libs+set}" = set; then
21381   echo $ECHO_N "(cached) $ECHO_C" >&6
21382 else
21383
21384 cf_cv_hashed_db_libs=unknown
21385 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21386 do
21387         cf_save_libs="$LIBS"
21388         if test -n "$cf_db_libs"; then
21389
21390 cf_add_libs="-l$cf_db_libs"
21391 # Filter out duplicates - this happens with badly-designed ".pc" files...
21392 for cf_add_1lib in $LIBS
21393 do
21394         for cf_add_2lib in $cf_add_libs
21395         do
21396                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21397                 then
21398                         cf_add_1lib=
21399                         break
21400                 fi
21401         done
21402         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21403 done
21404 LIBS="$cf_add_libs"
21405
21406         fi
21407
21408 echo "${as_me:-configure}:21408: testing checking for library "$cf_db_libs" ..." 1>&5
21409
21410         cat >conftest.$ac_ext <<_ACEOF
21411 #line 21411 "configure"
21412 #include "confdefs.h"
21413
21414 $ac_includes_default
21415 #include <db.h>
21416
21417 int
21418 main (void)
21419 {
21420
21421         char *path = "/tmp/foo";
21422 #ifdef DB_VERSION_MAJOR
21423 #if DB_VERSION_MAJOR >= 4
21424         DB *result = 0;
21425         db_create(&result, NULL, 0);
21426         result->open(result,
21427                 NULL,
21428                 path,
21429                 path,
21430                 DB_HASH,
21431                 DB_CREATE,
21432                 0644);
21433 #elif DB_VERSION_MAJOR >= 3
21434         DB *result = 0;
21435         db_create(&result, NULL, 0);
21436         result->open(result,
21437                 path,
21438                 path,
21439                 DB_HASH,
21440                 DB_CREATE,
21441                 0644);
21442 #elif DB_VERSION_MAJOR >= 2
21443         DB *result = 0;
21444         db_open(path,
21445                 DB_HASH,
21446                 DB_CREATE,
21447                 0644,
21448                 (DB_ENV *) 0,
21449                 (DB_INFO *) 0,
21450                 &result);
21451 #endif /* DB_VERSION_MAJOR */
21452 #else
21453         DB *result = dbopen(path,
21454                      2,
21455                      0644,
21456                      DB_HASH,
21457                      0);
21458 #endif
21459         ${cf_cv_main_return:-return}(result != 0)
21460
21461   ;
21462   return 0;
21463 }
21464 _ACEOF
21465 rm -f conftest.$ac_objext conftest$ac_exeext
21466 if { (eval echo "$as_me:21466: \"$ac_link\"") >&5
21467   (eval $ac_link) 2>&5
21468   ac_status=$?
21469   echo "$as_me:21469: \$? = $ac_status" >&5
21470   (exit $ac_status); } &&
21471          { ac_try='test -s conftest$ac_exeext'
21472   { (eval echo "$as_me:21472: \"$ac_try\"") >&5
21473   (eval $ac_try) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit $ac_status); }; }; then
21477
21478         if test -n "$cf_db_libs" ; then
21479                 cf_cv_hashed_db_libs=$cf_db_libs
21480         else
21481                 cf_cv_hashed_db_libs=default
21482         fi
21483         LIBS="$cf_save_libs"
21484         break
21485
21486 else
21487   echo "$as_me: failed program was:" >&5
21488 cat conftest.$ac_ext >&5
21489 fi
21490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21491         LIBS="$cf_save_libs"
21492 done
21493
21494 fi
21495 echo "$as_me:21495: result: $cf_cv_hashed_db_libs" >&5
21496 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21497
21498         if test "$cf_cv_hashed_db_libs" = unknown ; then
21499                 { { echo "$as_me:21499: error: Cannot determine library for db" >&5
21500 echo "$as_me: error: Cannot determine library for db" >&2;}
21501    { (exit 1); exit 1; }; }
21502         elif test "$cf_cv_hashed_db_libs" != default ; then
21503
21504 cf_add_libs="-l$cf_cv_hashed_db_libs"
21505 # Filter out duplicates - this happens with badly-designed ".pc" files...
21506 for cf_add_1lib in $LIBS
21507 do
21508         for cf_add_2lib in $cf_add_libs
21509         do
21510                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21511                 then
21512                         cf_add_1lib=
21513                         break
21514                 fi
21515         done
21516         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21517 done
21518 LIBS="$cf_add_libs"
21519
21520         fi
21521 fi
21522
21523 else
21524
21525         { { echo "$as_me:21525: error: Cannot find db.h" >&5
21526 echo "$as_me: error: Cannot find db.h" >&2;}
21527    { (exit 1); exit 1; }; }
21528
21529 fi
21530
21531 fi
21532
21533 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21534         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21535         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21536 fi
21537
21538 # Just in case, check if the C compiler has a bool type.
21539
21540 echo "$as_me:21540: checking if we should include stdbool.h" >&5
21541 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21542
21543 if test "${cf_cv_header_stdbool_h+set}" = set; then
21544   echo $ECHO_N "(cached) $ECHO_C" >&6
21545 else
21546
21547         cat >conftest.$ac_ext <<_ACEOF
21548 #line 21548 "configure"
21549 #include "confdefs.h"
21550
21551 int
21552 main (void)
21553 {
21554 bool foo = false
21555   ;
21556   return 0;
21557 }
21558 _ACEOF
21559 rm -f conftest.$ac_objext
21560 if { (eval echo "$as_me:21560: \"$ac_compile\"") >&5
21561   (eval $ac_compile) 2>&5
21562   ac_status=$?
21563   echo "$as_me:21563: \$? = $ac_status" >&5
21564   (exit $ac_status); } &&
21565          { ac_try='test -s conftest.$ac_objext'
21566   { (eval echo "$as_me:21566: \"$ac_try\"") >&5
21567   (eval $ac_try) 2>&5
21568   ac_status=$?
21569   echo "$as_me:21569: \$? = $ac_status" >&5
21570   (exit $ac_status); }; }; then
21571   cf_cv_header_stdbool_h=0
21572 else
21573   echo "$as_me: failed program was:" >&5
21574 cat conftest.$ac_ext >&5
21575 cat >conftest.$ac_ext <<_ACEOF
21576 #line 21576 "configure"
21577 #include "confdefs.h"
21578
21579 #ifndef __BEOS__
21580 #include <stdbool.h>
21581 #endif
21582
21583 int
21584 main (void)
21585 {
21586 bool foo = false
21587   ;
21588   return 0;
21589 }
21590 _ACEOF
21591 rm -f conftest.$ac_objext
21592 if { (eval echo "$as_me:21592: \"$ac_compile\"") >&5
21593   (eval $ac_compile) 2>&5
21594   ac_status=$?
21595   echo "$as_me:21595: \$? = $ac_status" >&5
21596   (exit $ac_status); } &&
21597          { ac_try='test -s conftest.$ac_objext'
21598   { (eval echo "$as_me:21598: \"$ac_try\"") >&5
21599   (eval $ac_try) 2>&5
21600   ac_status=$?
21601   echo "$as_me:21601: \$? = $ac_status" >&5
21602   (exit $ac_status); }; }; then
21603   cf_cv_header_stdbool_h=1
21604 else
21605   echo "$as_me: failed program was:" >&5
21606 cat conftest.$ac_ext >&5
21607 cf_cv_header_stdbool_h=0
21608 fi
21609 rm -f conftest.$ac_objext conftest.$ac_ext
21610 fi
21611 rm -f conftest.$ac_objext conftest.$ac_ext
21612 fi
21613
21614 if test "$cf_cv_header_stdbool_h" = 1
21615 then    echo "$as_me:21615: result: yes" >&5
21616 echo "${ECHO_T}yes" >&6
21617 else    echo "$as_me:21617: result: no" >&5
21618 echo "${ECHO_T}no" >&6
21619 fi
21620
21621 echo "$as_me:21621: checking for builtin bool type" >&5
21622 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21623
21624 if test "${cf_cv_cc_bool_type+set}" = set; then
21625   echo $ECHO_N "(cached) $ECHO_C" >&6
21626 else
21627
21628         cat >conftest.$ac_ext <<_ACEOF
21629 #line 21629 "configure"
21630 #include "confdefs.h"
21631
21632 #include <stdio.h>
21633 #include <sys/types.h>
21634
21635 int
21636 main (void)
21637 {
21638 bool x = false
21639   ;
21640   return 0;
21641 }
21642 _ACEOF
21643 rm -f conftest.$ac_objext
21644 if { (eval echo "$as_me:21644: \"$ac_compile\"") >&5
21645   (eval $ac_compile) 2>&5
21646   ac_status=$?
21647   echo "$as_me:21647: \$? = $ac_status" >&5
21648   (exit $ac_status); } &&
21649          { ac_try='test -s conftest.$ac_objext'
21650   { (eval echo "$as_me:21650: \"$ac_try\"") >&5
21651   (eval $ac_try) 2>&5
21652   ac_status=$?
21653   echo "$as_me:21653: \$? = $ac_status" >&5
21654   (exit $ac_status); }; }; then
21655   cf_cv_cc_bool_type=1
21656 else
21657   echo "$as_me: failed program was:" >&5
21658 cat conftest.$ac_ext >&5
21659 cf_cv_cc_bool_type=0
21660 fi
21661 rm -f conftest.$ac_objext conftest.$ac_ext
21662
21663 fi
21664
21665 if test "$cf_cv_cc_bool_type" = 1
21666 then    echo "$as_me:21666: result: yes" >&5
21667 echo "${ECHO_T}yes" >&6
21668 else    echo "$as_me:21668: result: no" >&5
21669 echo "${ECHO_T}no" >&6
21670 fi
21671
21672 # Check for C++ compiler characteristics (and ensure that it's there!)
21673 if test -n "$CXX" ; then
21674         ac_ext=cc
21675 ac_cpp='$CXXCPP $CPPFLAGS'
21676 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21677 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21678 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21679 ac_main_return=return
21680
21681 if test -n "$GXX" ; then
21682
21683         cf_save="$LIBS"
21684         LIBS="$LIBS $CXXLIBS"
21685         echo "$as_me:21685: checking if we already have C++ library" >&5
21686 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21687         cat >conftest.$ac_ext <<_ACEOF
21688 #line 21688 "configure"
21689 #include "confdefs.h"
21690
21691                         #include <iostream>
21692 int
21693 main (void)
21694 {
21695
21696                         std::cout << "Hello World!" << std::endl;
21697   ;
21698   return 0;
21699 }
21700 _ACEOF
21701 rm -f conftest.$ac_objext conftest$ac_exeext
21702 if { (eval echo "$as_me:21702: \"$ac_link\"") >&5
21703   (eval $ac_link) 2>&5
21704   ac_status=$?
21705   echo "$as_me:21705: \$? = $ac_status" >&5
21706   (exit $ac_status); } &&
21707          { ac_try='test -s conftest$ac_exeext'
21708   { (eval echo "$as_me:21708: \"$ac_try\"") >&5
21709   (eval $ac_try) 2>&5
21710   ac_status=$?
21711   echo "$as_me:21711: \$? = $ac_status" >&5
21712   (exit $ac_status); }; }; then
21713   cf_have_libstdcpp=yes
21714 else
21715   echo "$as_me: failed program was:" >&5
21716 cat conftest.$ac_ext >&5
21717 cf_have_libstdcpp=no
21718 fi
21719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21720         echo "$as_me:21720: result: $cf_have_libstdcpp" >&5
21721 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21722         LIBS="$cf_save"
21723
21724         if test $cf_have_libstdcpp != yes
21725         then
21726                 case $cf_cv_system_name in
21727                 (os2*)
21728                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21729                                 cf_stdcpp_libname=stdcpp
21730                         else
21731                                 cf_stdcpp_libname=stdc++
21732                         fi
21733                         ;;
21734                 (*)
21735                         cf_stdcpp_libname=stdc++
21736                         ;;
21737                 esac
21738
21739                 echo "$as_me:21739: checking for library $cf_stdcpp_libname" >&5
21740 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21741 if test "${cf_cv_libstdcpp+set}" = set; then
21742   echo $ECHO_N "(cached) $ECHO_C" >&6
21743 else
21744
21745                         cf_save="$LIBS"
21746                         LIBS="$LIBS $CXXLIBS"
21747
21748 cf_add_libs="-l$cf_stdcpp_libname"
21749 # Filter out duplicates - this happens with badly-designed ".pc" files...
21750 for cf_add_1lib in $LIBS
21751 do
21752         for cf_add_2lib in $cf_add_libs
21753         do
21754                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21755                 then
21756                         cf_add_1lib=
21757                         break
21758                 fi
21759         done
21760         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21761 done
21762 LIBS="$cf_add_libs"
21763
21764                 cat >conftest.$ac_ext <<_ACEOF
21765 #line 21765 "configure"
21766 #include "confdefs.h"
21767
21768                                 #include <iostream>
21769 int
21770 main (void)
21771 {
21772
21773                                 std::cout << "Hello World!" << std::endl;
21774   ;
21775   return 0;
21776 }
21777 _ACEOF
21778 rm -f conftest.$ac_objext conftest$ac_exeext
21779 if { (eval echo "$as_me:21779: \"$ac_link\"") >&5
21780   (eval $ac_link) 2>&5
21781   ac_status=$?
21782   echo "$as_me:21782: \$? = $ac_status" >&5
21783   (exit $ac_status); } &&
21784          { ac_try='test -s conftest$ac_exeext'
21785   { (eval echo "$as_me:21785: \"$ac_try\"") >&5
21786   (eval $ac_try) 2>&5
21787   ac_status=$?
21788   echo "$as_me:21788: \$? = $ac_status" >&5
21789   (exit $ac_status); }; }; then
21790   cf_cv_libstdcpp=yes
21791 else
21792   echo "$as_me: failed program was:" >&5
21793 cat conftest.$ac_ext >&5
21794 cf_cv_libstdcpp=no
21795 fi
21796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21797                         LIBS="$cf_save"
21798
21799 fi
21800 echo "$as_me:21800: result: $cf_cv_libstdcpp" >&5
21801 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
21802                 test "$cf_cv_libstdcpp" = yes && {
21803 cf_add_libs="-l$cf_stdcpp_libname"
21804 # Filter out duplicates - this happens with badly-designed ".pc" files...
21805 for cf_add_1lib in $CXXLIBS
21806 do
21807         for cf_add_2lib in $cf_add_libs
21808         do
21809                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21810                 then
21811                         cf_add_1lib=
21812                         break
21813                 fi
21814         done
21815         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21816 done
21817 CXXLIBS="$cf_add_libs"
21818  }
21819         fi
21820 fi
21821
21822         echo "$as_me:21822: checking whether $CXX understands -c and -o together" >&5
21823 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
21824 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
21825   echo $ECHO_N "(cached) $ECHO_C" >&6
21826 else
21827
21828 cat > conftest.$ac_ext <<CF_EOF
21829 int main(void)
21830 {
21831         ${cf_cv_main_return:-return}(0);
21832 }
21833 CF_EOF
21834 # We do the test twice because some compilers refuse to overwrite an
21835 # existing .o file with -o, though they will create one.
21836 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
21837 if { (eval echo "$as_me:21837: \"$ac_try\"") >&5
21838   (eval $ac_try) 2>&5
21839   ac_status=$?
21840   echo "$as_me:21840: \$? = $ac_status" >&5
21841   (exit $ac_status); } &&
21842   test -f conftest2.$ac_objext && { (eval echo "$as_me:21842: \"$ac_try\"") >&5
21843   (eval $ac_try) 2>&5
21844   ac_status=$?
21845   echo "$as_me:21845: \$? = $ac_status" >&5
21846   (exit $ac_status); };
21847 then
21848   eval cf_cv_prog_CXX_c_o=yes
21849 else
21850   eval cf_cv_prog_CXX_c_o=no
21851 fi
21852 rm -rf conftest*
21853
21854 fi
21855 if test $cf_cv_prog_CXX_c_o = yes; then
21856   echo "$as_me:21856: result: yes" >&5
21857 echo "${ECHO_T}yes" >&6
21858 else
21859   echo "$as_me:21859: result: no" >&5
21860 echo "${ECHO_T}no" >&6
21861 fi
21862
21863         case $GXX_VERSION in
21864         (1*|2.0-6*)
21865                 cf_cxx_library=yes
21866                 ;;
21867         (*-2.7*|2.7*)
21868
21869 cf_cxx_library=unknown
21870 case $cf_cv_system_name in
21871 (os2*)
21872         cf_gpp_libname=gpp
21873         ;;
21874 (*)
21875         cf_gpp_libname=g++
21876         ;;
21877 esac
21878 if test "$GXX" = yes; then
21879         echo "$as_me:21879: checking for lib$cf_gpp_libname" >&5
21880 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
21881         cf_save="$LIBS"
21882
21883 cf_add_libs="-l$cf_gpp_libname"
21884 # Filter out duplicates - this happens with badly-designed ".pc" files...
21885 for cf_add_1lib in $LIBS
21886 do
21887         for cf_add_2lib in $cf_add_libs
21888         do
21889                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21890                 then
21891                         cf_add_1lib=
21892                         break
21893                 fi
21894         done
21895         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21896 done
21897 LIBS="$cf_add_libs"
21898
21899         cat >conftest.$ac_ext <<_ACEOF
21900 #line 21900 "configure"
21901 #include "confdefs.h"
21902
21903 #include <$cf_gpp_libname/builtin.h>
21904
21905 int
21906 main (void)
21907 {
21908 two_arg_error_handler_t foo2 = lib_error_handler
21909   ;
21910   return 0;
21911 }
21912 _ACEOF
21913 rm -f conftest.$ac_objext conftest$ac_exeext
21914 if { (eval echo "$as_me:21914: \"$ac_link\"") >&5
21915   (eval $ac_link) 2>&5
21916   ac_status=$?
21917   echo "$as_me:21917: \$? = $ac_status" >&5
21918   (exit $ac_status); } &&
21919          { ac_try='test -s conftest$ac_exeext'
21920   { (eval echo "$as_me:21920: \"$ac_try\"") >&5
21921   (eval $ac_try) 2>&5
21922   ac_status=$?
21923   echo "$as_me:21923: \$? = $ac_status" >&5
21924   (exit $ac_status); }; }; then
21925   cf_cxx_library=yes
21926
21927 cf_add_libs="-l$cf_gpp_libname"
21928 # Filter out duplicates - this happens with badly-designed ".pc" files...
21929 for cf_add_1lib in $CXXLIBS
21930 do
21931         for cf_add_2lib in $cf_add_libs
21932         do
21933                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21934                 then
21935                         cf_add_1lib=
21936                         break
21937                 fi
21938         done
21939         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21940 done
21941 CXXLIBS="$cf_add_libs"
21942
21943          if test "$cf_gpp_libname" = cpp ; then
21944
21945 cat >>confdefs.h <<\EOF
21946 #define HAVE_GPP_BUILTIN_H 1
21947 EOF
21948
21949          else
21950
21951 cat >>confdefs.h <<\EOF
21952 #define HAVE_GXX_BUILTIN_H 1
21953 EOF
21954
21955          fi
21956 else
21957   echo "$as_me: failed program was:" >&5
21958 cat conftest.$ac_ext >&5
21959 cat >conftest.$ac_ext <<_ACEOF
21960 #line 21960 "configure"
21961 #include "confdefs.h"
21962
21963 #include <builtin.h>
21964
21965 int
21966 main (void)
21967 {
21968 two_arg_error_handler_t foo2 = lib_error_handler
21969   ;
21970   return 0;
21971 }
21972 _ACEOF
21973 rm -f conftest.$ac_objext conftest$ac_exeext
21974 if { (eval echo "$as_me:21974: \"$ac_link\"") >&5
21975   (eval $ac_link) 2>&5
21976   ac_status=$?
21977   echo "$as_me:21977: \$? = $ac_status" >&5
21978   (exit $ac_status); } &&
21979          { ac_try='test -s conftest$ac_exeext'
21980   { (eval echo "$as_me:21980: \"$ac_try\"") >&5
21981   (eval $ac_try) 2>&5
21982   ac_status=$?
21983   echo "$as_me:21983: \$? = $ac_status" >&5
21984   (exit $ac_status); }; }; then
21985   cf_cxx_library=yes
21986
21987 cf_add_libs="-l$cf_gpp_libname"
21988 # Filter out duplicates - this happens with badly-designed ".pc" files...
21989 for cf_add_1lib in $CXXLIBS
21990 do
21991         for cf_add_2lib in $cf_add_libs
21992         do
21993                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21994                 then
21995                         cf_add_1lib=
21996                         break
21997                 fi
21998         done
21999         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22000 done
22001 CXXLIBS="$cf_add_libs"
22002
22003 cat >>confdefs.h <<\EOF
22004 #define HAVE_BUILTIN_H 1
22005 EOF
22006
22007 else
22008   echo "$as_me: failed program was:" >&5
22009 cat conftest.$ac_ext >&5
22010 cf_cxx_library=no
22011 fi
22012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22013 fi
22014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22015         LIBS="$cf_save"
22016         echo "$as_me:22016: result: $cf_cxx_library" >&5
22017 echo "${ECHO_T}$cf_cxx_library" >&6
22018 fi
22019
22020                 ;;
22021         (*)
22022                 cf_cxx_library=no
22023                 ;;
22024         esac
22025
22026         ac_ext=cc
22027 ac_cpp='$CXXCPP $CPPFLAGS'
22028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22031 ac_main_return=return
22032 echo "$as_me:22032: checking how to run the C++ preprocessor" >&5
22033 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22034 if test -z "$CXXCPP"; then
22035   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22036   echo $ECHO_N "(cached) $ECHO_C" >&6
22037 else
22038       # Double quotes because CXXCPP needs to be expanded
22039     for CXXCPP in "$CXX -E" "/lib/cpp"
22040     do
22041       ac_preproc_ok=false
22042 for ac_cxx_preproc_warn_flag in '' yes
22043 do
22044   # Use a header file that comes with gcc, so configuring glibc
22045   # with a fresh cross-compiler works.
22046   # On the NeXT, cc -E runs the code through the compiler's parser,
22047   # not just through cpp. "Syntax error" is here to catch this case.
22048   cat >conftest.$ac_ext <<_ACEOF
22049 #line 22049 "configure"
22050 #include "confdefs.h"
22051 #include <assert.h>
22052                      Syntax error
22053 _ACEOF
22054 if { (eval echo "$as_me:22054: \"$ac_cpp conftest.$ac_ext\"") >&5
22055   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22056   ac_status=$?
22057   egrep -v '^ *\+' conftest.er1 >conftest.err
22058   rm -f conftest.er1
22059   cat conftest.err >&5
22060   echo "$as_me:22060: \$? = $ac_status" >&5
22061   (exit $ac_status); } >/dev/null; then
22062   if test -s conftest.err; then
22063     ac_cpp_err=$ac_cxx_preproc_warn_flag
22064   else
22065     ac_cpp_err=
22066   fi
22067 else
22068   ac_cpp_err=yes
22069 fi
22070 if test -z "$ac_cpp_err"; then
22071   :
22072 else
22073   echo "$as_me: failed program was:" >&5
22074   cat conftest.$ac_ext >&5
22075   # Broken: fails on valid input.
22076 continue
22077 fi
22078 rm -f conftest.err conftest.$ac_ext
22079
22080   # OK, works on sane cases.  Now check whether non-existent headers
22081   # can be detected and how.
22082   cat >conftest.$ac_ext <<_ACEOF
22083 #line 22083 "configure"
22084 #include "confdefs.h"
22085 #include <ac_nonexistent.h>
22086 _ACEOF
22087 if { (eval echo "$as_me:22087: \"$ac_cpp conftest.$ac_ext\"") >&5
22088   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22089   ac_status=$?
22090   egrep -v '^ *\+' conftest.er1 >conftest.err
22091   rm -f conftest.er1
22092   cat conftest.err >&5
22093   echo "$as_me:22093: \$? = $ac_status" >&5
22094   (exit $ac_status); } >/dev/null; then
22095   if test -s conftest.err; then
22096     ac_cpp_err=$ac_cxx_preproc_warn_flag
22097   else
22098     ac_cpp_err=
22099   fi
22100 else
22101   ac_cpp_err=yes
22102 fi
22103 if test -z "$ac_cpp_err"; then
22104   # Broken: success on invalid input.
22105 continue
22106 else
22107   echo "$as_me: failed program was:" >&5
22108   cat conftest.$ac_ext >&5
22109   # Passes both tests.
22110 ac_preproc_ok=:
22111 break
22112 fi
22113 rm -f conftest.err conftest.$ac_ext
22114
22115 done
22116 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22117 rm -f conftest.err conftest.$ac_ext
22118 if $ac_preproc_ok; then
22119   break
22120 fi
22121
22122     done
22123     ac_cv_prog_CXXCPP=$CXXCPP
22124
22125 fi
22126   CXXCPP=$ac_cv_prog_CXXCPP
22127 else
22128   ac_cv_prog_CXXCPP=$CXXCPP
22129 fi
22130 echo "$as_me:22130: result: $CXXCPP" >&5
22131 echo "${ECHO_T}$CXXCPP" >&6
22132 ac_preproc_ok=false
22133 for ac_cxx_preproc_warn_flag in '' yes
22134 do
22135   # Use a header file that comes with gcc, so configuring glibc
22136   # with a fresh cross-compiler works.
22137   # On the NeXT, cc -E runs the code through the compiler's parser,
22138   # not just through cpp. "Syntax error" is here to catch this case.
22139   cat >conftest.$ac_ext <<_ACEOF
22140 #line 22140 "configure"
22141 #include "confdefs.h"
22142 #include <assert.h>
22143                      Syntax error
22144 _ACEOF
22145 if { (eval echo "$as_me:22145: \"$ac_cpp conftest.$ac_ext\"") >&5
22146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22147   ac_status=$?
22148   egrep -v '^ *\+' conftest.er1 >conftest.err
22149   rm -f conftest.er1
22150   cat conftest.err >&5
22151   echo "$as_me:22151: \$? = $ac_status" >&5
22152   (exit $ac_status); } >/dev/null; then
22153   if test -s conftest.err; then
22154     ac_cpp_err=$ac_cxx_preproc_warn_flag
22155   else
22156     ac_cpp_err=
22157   fi
22158 else
22159   ac_cpp_err=yes
22160 fi
22161 if test -z "$ac_cpp_err"; then
22162   :
22163 else
22164   echo "$as_me: failed program was:" >&5
22165   cat conftest.$ac_ext >&5
22166   # Broken: fails on valid input.
22167 continue
22168 fi
22169 rm -f conftest.err conftest.$ac_ext
22170
22171   # OK, works on sane cases.  Now check whether non-existent headers
22172   # can be detected and how.
22173   cat >conftest.$ac_ext <<_ACEOF
22174 #line 22174 "configure"
22175 #include "confdefs.h"
22176 #include <ac_nonexistent.h>
22177 _ACEOF
22178 if { (eval echo "$as_me:22178: \"$ac_cpp conftest.$ac_ext\"") >&5
22179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22180   ac_status=$?
22181   egrep -v '^ *\+' conftest.er1 >conftest.err
22182   rm -f conftest.er1
22183   cat conftest.err >&5
22184   echo "$as_me:22184: \$? = $ac_status" >&5
22185   (exit $ac_status); } >/dev/null; then
22186   if test -s conftest.err; then
22187     ac_cpp_err=$ac_cxx_preproc_warn_flag
22188   else
22189     ac_cpp_err=
22190   fi
22191 else
22192   ac_cpp_err=yes
22193 fi
22194 if test -z "$ac_cpp_err"; then
22195   # Broken: success on invalid input.
22196 continue
22197 else
22198   echo "$as_me: failed program was:" >&5
22199   cat conftest.$ac_ext >&5
22200   # Passes both tests.
22201 ac_preproc_ok=:
22202 break
22203 fi
22204 rm -f conftest.err conftest.$ac_ext
22205
22206 done
22207 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22208 rm -f conftest.err conftest.$ac_ext
22209 if $ac_preproc_ok; then
22210   :
22211 else
22212   { { echo "$as_me:22212: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22213 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22214    { (exit 1); exit 1; }; }
22215 fi
22216
22217 ac_ext=cc
22218 ac_cpp='$CXXCPP $CPPFLAGS'
22219 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22220 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22221 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22222 ac_main_return=return
22223
22224 for ac_header in typeinfo
22225 do
22226 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22227 echo "$as_me:22227: checking for $ac_header" >&5
22228 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22229 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22230   echo $ECHO_N "(cached) $ECHO_C" >&6
22231 else
22232   cat >conftest.$ac_ext <<_ACEOF
22233 #line 22233 "configure"
22234 #include "confdefs.h"
22235 #include <$ac_header>
22236 _ACEOF
22237 if { (eval echo "$as_me:22237: \"$ac_cpp conftest.$ac_ext\"") >&5
22238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22239   ac_status=$?
22240   egrep -v '^ *\+' conftest.er1 >conftest.err
22241   rm -f conftest.er1
22242   cat conftest.err >&5
22243   echo "$as_me:22243: \$? = $ac_status" >&5
22244   (exit $ac_status); } >/dev/null; then
22245   if test -s conftest.err; then
22246     ac_cpp_err=$ac_cxx_preproc_warn_flag
22247   else
22248     ac_cpp_err=
22249   fi
22250 else
22251   ac_cpp_err=yes
22252 fi
22253 if test -z "$ac_cpp_err"; then
22254   eval "$as_ac_Header=yes"
22255 else
22256   echo "$as_me: failed program was:" >&5
22257   cat conftest.$ac_ext >&5
22258   eval "$as_ac_Header=no"
22259 fi
22260 rm -f conftest.err conftest.$ac_ext
22261 fi
22262 echo "$as_me:22262: result: `eval echo '${'$as_ac_Header'}'`" >&5
22263 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22264 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22265   cat >>confdefs.h <<EOF
22266 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22267 EOF
22268
22269 fi
22270 done
22271
22272 for ac_header in iostream
22273 do
22274 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22275 echo "$as_me:22275: checking for $ac_header" >&5
22276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22278   echo $ECHO_N "(cached) $ECHO_C" >&6
22279 else
22280   cat >conftest.$ac_ext <<_ACEOF
22281 #line 22281 "configure"
22282 #include "confdefs.h"
22283 #include <$ac_header>
22284 _ACEOF
22285 if { (eval echo "$as_me:22285: \"$ac_cpp conftest.$ac_ext\"") >&5
22286   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22287   ac_status=$?
22288   egrep -v '^ *\+' conftest.er1 >conftest.err
22289   rm -f conftest.er1
22290   cat conftest.err >&5
22291   echo "$as_me:22291: \$? = $ac_status" >&5
22292   (exit $ac_status); } >/dev/null; then
22293   if test -s conftest.err; then
22294     ac_cpp_err=$ac_cxx_preproc_warn_flag
22295   else
22296     ac_cpp_err=
22297   fi
22298 else
22299   ac_cpp_err=yes
22300 fi
22301 if test -z "$ac_cpp_err"; then
22302   eval "$as_ac_Header=yes"
22303 else
22304   echo "$as_me: failed program was:" >&5
22305   cat conftest.$ac_ext >&5
22306   eval "$as_ac_Header=no"
22307 fi
22308 rm -f conftest.err conftest.$ac_ext
22309 fi
22310 echo "$as_me:22310: result: `eval echo '${'$as_ac_Header'}'`" >&5
22311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22313   cat >>confdefs.h <<EOF
22314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22315 EOF
22316
22317 fi
22318 done
22319
22320 if test x"$ac_cv_header_iostream" = xyes ; then
22321         echo "$as_me:22321: checking if iostream uses std-namespace" >&5
22322 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22323         cat >conftest.$ac_ext <<_ACEOF
22324 #line 22324 "configure"
22325 #include "confdefs.h"
22326
22327 #include <iostream>
22328 using std::endl;
22329 using std::cerr;
22330 int
22331 main (void)
22332 {
22333
22334 cerr << "testing" << endl;
22335
22336   ;
22337   return 0;
22338 }
22339 _ACEOF
22340 rm -f conftest.$ac_objext
22341 if { (eval echo "$as_me:22341: \"$ac_compile\"") >&5
22342   (eval $ac_compile) 2>&5
22343   ac_status=$?
22344   echo "$as_me:22344: \$? = $ac_status" >&5
22345   (exit $ac_status); } &&
22346          { ac_try='test -s conftest.$ac_objext'
22347   { (eval echo "$as_me:22347: \"$ac_try\"") >&5
22348   (eval $ac_try) 2>&5
22349   ac_status=$?
22350   echo "$as_me:22350: \$? = $ac_status" >&5
22351   (exit $ac_status); }; }; then
22352   cf_iostream_namespace=yes
22353 else
22354   echo "$as_me: failed program was:" >&5
22355 cat conftest.$ac_ext >&5
22356 cf_iostream_namespace=no
22357 fi
22358 rm -f conftest.$ac_objext conftest.$ac_ext
22359         echo "$as_me:22359: result: $cf_iostream_namespace" >&5
22360 echo "${ECHO_T}$cf_iostream_namespace" >&6
22361         if test "$cf_iostream_namespace" = yes ; then
22362
22363 cat >>confdefs.h <<\EOF
22364 #define IOSTREAM_NAMESPACE 1
22365 EOF
22366
22367         fi
22368 fi
22369
22370 echo "$as_me:22370: checking if we should include stdbool.h" >&5
22371 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22372
22373 if test "${cf_cv_header_stdbool_h+set}" = set; then
22374   echo $ECHO_N "(cached) $ECHO_C" >&6
22375 else
22376
22377         cat >conftest.$ac_ext <<_ACEOF
22378 #line 22378 "configure"
22379 #include "confdefs.h"
22380
22381 int
22382 main (void)
22383 {
22384 bool foo = false
22385   ;
22386   return 0;
22387 }
22388 _ACEOF
22389 rm -f conftest.$ac_objext
22390 if { (eval echo "$as_me:22390: \"$ac_compile\"") >&5
22391   (eval $ac_compile) 2>&5
22392   ac_status=$?
22393   echo "$as_me:22393: \$? = $ac_status" >&5
22394   (exit $ac_status); } &&
22395          { ac_try='test -s conftest.$ac_objext'
22396   { (eval echo "$as_me:22396: \"$ac_try\"") >&5
22397   (eval $ac_try) 2>&5
22398   ac_status=$?
22399   echo "$as_me:22399: \$? = $ac_status" >&5
22400   (exit $ac_status); }; }; then
22401   cf_cv_header_stdbool_h=0
22402 else
22403   echo "$as_me: failed program was:" >&5
22404 cat conftest.$ac_ext >&5
22405 cat >conftest.$ac_ext <<_ACEOF
22406 #line 22406 "configure"
22407 #include "confdefs.h"
22408
22409 #ifndef __BEOS__
22410 #include <stdbool.h>
22411 #endif
22412
22413 int
22414 main (void)
22415 {
22416 bool foo = false
22417   ;
22418   return 0;
22419 }
22420 _ACEOF
22421 rm -f conftest.$ac_objext
22422 if { (eval echo "$as_me:22422: \"$ac_compile\"") >&5
22423   (eval $ac_compile) 2>&5
22424   ac_status=$?
22425   echo "$as_me:22425: \$? = $ac_status" >&5
22426   (exit $ac_status); } &&
22427          { ac_try='test -s conftest.$ac_objext'
22428   { (eval echo "$as_me:22428: \"$ac_try\"") >&5
22429   (eval $ac_try) 2>&5
22430   ac_status=$?
22431   echo "$as_me:22431: \$? = $ac_status" >&5
22432   (exit $ac_status); }; }; then
22433   cf_cv_header_stdbool_h=1
22434 else
22435   echo "$as_me: failed program was:" >&5
22436 cat conftest.$ac_ext >&5
22437 cf_cv_header_stdbool_h=0
22438 fi
22439 rm -f conftest.$ac_objext conftest.$ac_ext
22440 fi
22441 rm -f conftest.$ac_objext conftest.$ac_ext
22442 fi
22443
22444 if test "$cf_cv_header_stdbool_h" = 1
22445 then    echo "$as_me:22445: result: yes" >&5
22446 echo "${ECHO_T}yes" >&6
22447 else    echo "$as_me:22447: result: no" >&5
22448 echo "${ECHO_T}no" >&6
22449 fi
22450
22451 echo "$as_me:22451: checking for builtin bool type" >&5
22452 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22453
22454 if test "${cf_cv_builtin_bool+set}" = set; then
22455   echo $ECHO_N "(cached) $ECHO_C" >&6
22456 else
22457
22458         cat >conftest.$ac_ext <<_ACEOF
22459 #line 22459 "configure"
22460 #include "confdefs.h"
22461
22462 #include <stdio.h>
22463 #include <sys/types.h>
22464
22465 int
22466 main (void)
22467 {
22468 bool x = false
22469   ;
22470   return 0;
22471 }
22472 _ACEOF
22473 rm -f conftest.$ac_objext
22474 if { (eval echo "$as_me:22474: \"$ac_compile\"") >&5
22475   (eval $ac_compile) 2>&5
22476   ac_status=$?
22477   echo "$as_me:22477: \$? = $ac_status" >&5
22478   (exit $ac_status); } &&
22479          { ac_try='test -s conftest.$ac_objext'
22480   { (eval echo "$as_me:22480: \"$ac_try\"") >&5
22481   (eval $ac_try) 2>&5
22482   ac_status=$?
22483   echo "$as_me:22483: \$? = $ac_status" >&5
22484   (exit $ac_status); }; }; then
22485   cf_cv_builtin_bool=1
22486 else
22487   echo "$as_me: failed program was:" >&5
22488 cat conftest.$ac_ext >&5
22489 cf_cv_builtin_bool=0
22490 fi
22491 rm -f conftest.$ac_objext conftest.$ac_ext
22492
22493 fi
22494
22495 if test "$cf_cv_builtin_bool" = 1
22496 then    echo "$as_me:22496: result: yes" >&5
22497 echo "${ECHO_T}yes" >&6
22498 else    echo "$as_me:22498: result: no" >&5
22499 echo "${ECHO_T}no" >&6
22500 fi
22501
22502 echo "$as_me:22502: checking for size of bool" >&5
22503 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22504 if test "${cf_cv_type_of_bool+set}" = set; then
22505   echo $ECHO_N "(cached) $ECHO_C" >&6
22506 else
22507
22508         rm -f cf_test.out
22509         if test "$cross_compiling" = yes; then
22510   cf_cv_type_of_bool=unknown
22511 else
22512   cat >conftest.$ac_ext <<_ACEOF
22513 #line 22513 "configure"
22514 #include "confdefs.h"
22515
22516 #include <stdlib.h>
22517 #include <stdio.h>
22518
22519 #if defined(__cplusplus)
22520
22521 #ifdef HAVE_GXX_BUILTIN_H
22522 #include <g++/builtin.h>
22523 #elif HAVE_GPP_BUILTIN_H
22524 #include <gpp/builtin.h>
22525 #elif HAVE_BUILTIN_H
22526 #include <builtin.h>
22527 #endif
22528
22529 #else
22530
22531 #if $cf_cv_header_stdbool_h
22532 #include <stdbool.h>
22533 #endif
22534
22535 #endif
22536
22537 int main(void)
22538 {
22539         FILE *fp = fopen("cf_test.out", "w");
22540         if (fp != 0) {
22541                 bool x = true;
22542                 if ((bool)(-x) >= 0)
22543                         fputs("unsigned ", fp);
22544                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22545                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22546                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22547                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22548                 fclose(fp);
22549         }
22550         ${cf_cv_main_return:-return}(0);
22551 }
22552
22553 _ACEOF
22554 rm -f conftest$ac_exeext
22555 if { (eval echo "$as_me:22555: \"$ac_link\"") >&5
22556   (eval $ac_link) 2>&5
22557   ac_status=$?
22558   echo "$as_me:22558: \$? = $ac_status" >&5
22559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22560   { (eval echo "$as_me:22560: \"$ac_try\"") >&5
22561   (eval $ac_try) 2>&5
22562   ac_status=$?
22563   echo "$as_me:22563: \$? = $ac_status" >&5
22564   (exit $ac_status); }; }; then
22565   cf_cv_type_of_bool=`cat cf_test.out`
22566                  if test -z "$cf_cv_type_of_bool"; then
22567                    cf_cv_type_of_bool=unknown
22568                  fi
22569 else
22570   echo "$as_me: program exited with status $ac_status" >&5
22571 echo "$as_me: failed program was:" >&5
22572 cat conftest.$ac_ext >&5
22573 cf_cv_type_of_bool=unknown
22574 fi
22575 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22576 fi
22577
22578 fi
22579
22580         rm -f cf_test.out
22581 echo "$as_me:22581: result: $cf_cv_type_of_bool" >&5
22582 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22583 if test "$cf_cv_type_of_bool" = unknown ; then
22584         case .$NCURSES_BOOL in
22585         (.auto|.) NCURSES_BOOL=unsigned;;
22586         esac
22587         { echo "$as_me:22587: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22588 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22589         cf_cv_type_of_bool=$NCURSES_BOOL
22590 fi
22591
22592 echo "$as_me:22592: checking for special defines needed for etip.h" >&5
22593 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22594 cf_save_CXXFLAGS="$CXXFLAGS"
22595 cf_result="none"
22596
22597 # etip.h includes ncurses.h which includes ncurses_dll.h
22598 # But ncurses_dll.h is generated - fix here.
22599 test -d include || mkdir include
22600 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
22601
22602 for cf_math in "" MATH_H
22603 do
22604 for cf_excp in "" MATH_EXCEPTION
22605 do
22606         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22607         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22608         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22609 cat >conftest.$ac_ext <<_ACEOF
22610 #line 22610 "configure"
22611 #include "confdefs.h"
22612
22613 #include <etip.h.in>
22614
22615 int
22616 main (void)
22617 {
22618
22619   ;
22620   return 0;
22621 }
22622 _ACEOF
22623 rm -f conftest.$ac_objext
22624 if { (eval echo "$as_me:22624: \"$ac_compile\"") >&5
22625   (eval $ac_compile) 2>&5
22626   ac_status=$?
22627   echo "$as_me:22627: \$? = $ac_status" >&5
22628   (exit $ac_status); } &&
22629          { ac_try='test -s conftest.$ac_objext'
22630   { (eval echo "$as_me:22630: \"$ac_try\"") >&5
22631   (eval $ac_try) 2>&5
22632   ac_status=$?
22633   echo "$as_me:22633: \$? = $ac_status" >&5
22634   (exit $ac_status); }; }; then
22635
22636         test -n "$cf_math" && cat >>confdefs.h <<EOF
22637 #define ETIP_NEEDS_${cf_math} 1
22638 EOF
22639
22640         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22641 #define ETIP_NEEDS_${cf_excp} 1
22642 EOF
22643
22644         cf_result="$cf_math $cf_excp"
22645         break 2
22646
22647 else
22648   echo "$as_me: failed program was:" >&5
22649 cat conftest.$ac_ext >&5
22650 fi
22651 rm -f conftest.$ac_objext conftest.$ac_ext
22652 done
22653 done
22654 echo "$as_me:22654: result: $cf_result" >&5
22655 echo "${ECHO_T}$cf_result" >&6
22656 CXXFLAGS="$cf_save_CXXFLAGS"
22657
22658 if test -n "$CXX"; then
22659 echo "$as_me:22659: checking if $CXX accepts parameter initialization" >&5
22660 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22661 if test "${cf_cv_cpp_param_init+set}" = set; then
22662   echo $ECHO_N "(cached) $ECHO_C" >&6
22663 else
22664
22665         ac_ext=cc
22666 ac_cpp='$CXXCPP $CPPFLAGS'
22667 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22668 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22669 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22670 ac_main_return=return
22671
22672         if test "$cross_compiling" = yes; then
22673   cf_cv_cpp_param_init=unknown
22674 else
22675   cat >conftest.$ac_ext <<_ACEOF
22676 #line 22676 "configure"
22677 #include "confdefs.h"
22678
22679 class TEST {
22680 private:
22681         int value;
22682 public:
22683         TEST(int x = 1);
22684         ~TEST();
22685 };
22686
22687 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22688 {
22689         value = x;
22690 }
22691 int main(void) { }
22692
22693 _ACEOF
22694 rm -f conftest$ac_exeext
22695 if { (eval echo "$as_me:22695: \"$ac_link\"") >&5
22696   (eval $ac_link) 2>&5
22697   ac_status=$?
22698   echo "$as_me:22698: \$? = $ac_status" >&5
22699   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22700   { (eval echo "$as_me:22700: \"$ac_try\"") >&5
22701   (eval $ac_try) 2>&5
22702   ac_status=$?
22703   echo "$as_me:22703: \$? = $ac_status" >&5
22704   (exit $ac_status); }; }; then
22705   cf_cv_cpp_param_init=yes
22706 else
22707   echo "$as_me: program exited with status $ac_status" >&5
22708 echo "$as_me: failed program was:" >&5
22709 cat conftest.$ac_ext >&5
22710 cf_cv_cpp_param_init=no
22711 fi
22712 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22713 fi
22714         ac_ext=cc
22715 ac_cpp='$CXXCPP $CPPFLAGS'
22716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22719 ac_main_return=return
22720
22721 fi
22722 echo "$as_me:22722: result: $cf_cv_cpp_param_init" >&5
22723 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22724 fi
22725 test "$cf_cv_cpp_param_init" = yes &&
22726 cat >>confdefs.h <<\EOF
22727 #define CPP_HAS_PARAM_INIT 1
22728 EOF
22729
22730 if test -n "$CXX"; then
22731
22732 echo "$as_me:22732: checking if $CXX accepts static_cast" >&5
22733 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22734 if test "${cf_cv_cpp_static_cast+set}" = set; then
22735   echo $ECHO_N "(cached) $ECHO_C" >&6
22736 else
22737
22738         ac_ext=cc
22739 ac_cpp='$CXXCPP $CPPFLAGS'
22740 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22741 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22742 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22743 ac_main_return=return
22744
22745         cat >conftest.$ac_ext <<_ACEOF
22746 #line 22746 "configure"
22747 #include "confdefs.h"
22748
22749 class NCursesPanel
22750 {
22751 public:
22752   NCursesPanel(int nlines,
22753                int ncols,
22754                int begin_y = 0,
22755                int begin_x = 0)
22756   {
22757   }
22758   NCursesPanel();
22759   ~NCursesPanel();
22760 };
22761
22762 template<class T> class NCursesUserPanel : public NCursesPanel
22763 {
22764 public:
22765   NCursesUserPanel (int nlines,
22766                     int ncols,
22767                     int begin_y = 0,
22768                     int begin_x = 0,
22769                     const T* p_UserData = static_cast<T*>(0))
22770     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22771   {
22772   };
22773   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22774   {
22775   };
22776
22777   virtual ~NCursesUserPanel() {};
22778 };
22779
22780 int
22781 main (void)
22782 {
22783
22784         const char* p_UserData = static_cast<char*>(0)
22785   ;
22786   return 0;
22787 }
22788 _ACEOF
22789 rm -f conftest.$ac_objext
22790 if { (eval echo "$as_me:22790: \"$ac_compile\"") >&5
22791   (eval $ac_compile) 2>&5
22792   ac_status=$?
22793   echo "$as_me:22793: \$? = $ac_status" >&5
22794   (exit $ac_status); } &&
22795          { ac_try='test -s conftest.$ac_objext'
22796   { (eval echo "$as_me:22796: \"$ac_try\"") >&5
22797   (eval $ac_try) 2>&5
22798   ac_status=$?
22799   echo "$as_me:22799: \$? = $ac_status" >&5
22800   (exit $ac_status); }; }; then
22801   cf_cv_cpp_static_cast=yes
22802 else
22803   echo "$as_me: failed program was:" >&5
22804 cat conftest.$ac_ext >&5
22805 cf_cv_cpp_static_cast=no
22806 fi
22807 rm -f conftest.$ac_objext conftest.$ac_ext
22808
22809         ac_ext=cc
22810 ac_cpp='$CXXCPP $CPPFLAGS'
22811 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22812 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22813 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22814 ac_main_return=return
22815
22816 fi
22817 echo "$as_me:22817: result: $cf_cv_cpp_static_cast" >&5
22818 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
22819
22820 fi
22821
22822 test "$cf_cv_cpp_static_cast" = yes &&
22823 cat >>confdefs.h <<\EOF
22824 #define CPP_HAS_STATIC_CAST 1
22825 EOF
22826
22827         CXX_AR='$(AR)'
22828         CXX_ARFLAGS='$(ARFLAGS)'
22829         case $cf_cv_system_name in
22830         (irix*)
22831             if test "$GXX" != yes ; then
22832                 CXX_AR='$(CXX)'
22833                 CXX_ARFLAGS='-ar -o'
22834             fi
22835             ;;
22836         (sco3.2v5*)
22837             CXXLDFLAGS="-u main"
22838             ;;
22839         (solaris2*)
22840             if test "$GXX" != yes ; then
22841                 CXX_AR='$(CXX)'
22842                 CXX_ARFLAGS='-xar -o'
22843             fi
22844             ;;
22845         esac
22846
22847 else
22848         cf_cxx_library=no
22849         cf_cv_builtin_bool=1
22850
22851         # Just because we are not configuring against C++ right now does not
22852         # mean that a user will not want to use C++.  Some distributors disable
22853         # the C++ portion of this configuration as a shortcut (or just to avoid
22854         # compiling the demo in the c++ directory).  So we need a reasonable
22855         # default for the 'bool' type.
22856         #
22857         # Caveat: since the storage of the bool type is not standardized, it
22858         # may change.
22859
22860         if test "$NCURSES_BOOL" != auto ; then
22861                 cf_cv_type_of_bool=$NCURSES_BOOL
22862                 cf_cv_header_stdbool_h=0
22863         else
22864                 if test "$cf_cv_header_stdbool_h" = 1 ; then
22865
22866 echo "$as_me:22866: checking for size of bool" >&5
22867 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22868 if test "${cf_cv_type_of_bool+set}" = set; then
22869   echo $ECHO_N "(cached) $ECHO_C" >&6
22870 else
22871
22872         rm -f cf_test.out
22873         if test "$cross_compiling" = yes; then
22874   cf_cv_type_of_bool=unknown
22875 else
22876   cat >conftest.$ac_ext <<_ACEOF
22877 #line 22877 "configure"
22878 #include "confdefs.h"
22879
22880 #include <stdlib.h>
22881 #include <stdio.h>
22882
22883 #if defined(__cplusplus)
22884
22885 #ifdef HAVE_GXX_BUILTIN_H
22886 #include <g++/builtin.h>
22887 #elif HAVE_GPP_BUILTIN_H
22888 #include <gpp/builtin.h>
22889 #elif HAVE_BUILTIN_H
22890 #include <builtin.h>
22891 #endif
22892
22893 #else
22894
22895 #if $cf_cv_header_stdbool_h
22896 #include <stdbool.h>
22897 #endif
22898
22899 #endif
22900
22901 int main(void)
22902 {
22903         FILE *fp = fopen("cf_test.out", "w");
22904         if (fp != 0) {
22905                 bool x = true;
22906                 if ((bool)(-x) >= 0)
22907                         fputs("unsigned ", fp);
22908                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22909                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22910                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22911                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22912                 fclose(fp);
22913         }
22914         ${cf_cv_main_return:-return}(0);
22915 }
22916
22917 _ACEOF
22918 rm -f conftest$ac_exeext
22919 if { (eval echo "$as_me:22919: \"$ac_link\"") >&5
22920   (eval $ac_link) 2>&5
22921   ac_status=$?
22922   echo "$as_me:22922: \$? = $ac_status" >&5
22923   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22924   { (eval echo "$as_me:22924: \"$ac_try\"") >&5
22925   (eval $ac_try) 2>&5
22926   ac_status=$?
22927   echo "$as_me:22927: \$? = $ac_status" >&5
22928   (exit $ac_status); }; }; then
22929   cf_cv_type_of_bool=`cat cf_test.out`
22930                  if test -z "$cf_cv_type_of_bool"; then
22931                    cf_cv_type_of_bool=unknown
22932                  fi
22933 else
22934   echo "$as_me: program exited with status $ac_status" >&5
22935 echo "$as_me: failed program was:" >&5
22936 cat conftest.$ac_ext >&5
22937 cf_cv_type_of_bool=unknown
22938 fi
22939 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22940 fi
22941
22942 fi
22943
22944         rm -f cf_test.out
22945 echo "$as_me:22945: result: $cf_cv_type_of_bool" >&5
22946 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22947 if test "$cf_cv_type_of_bool" = unknown ; then
22948         case .$NCURSES_BOOL in
22949         (.auto|.) NCURSES_BOOL=unsigned;;
22950         esac
22951         { echo "$as_me:22951: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22952 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22953         cf_cv_type_of_bool=$NCURSES_BOOL
22954 fi
22955
22956                 else
22957                         echo "$as_me:22957: checking for fallback type of bool" >&5
22958 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22959                         case "$host_cpu" in
22960                         (i?86)  cf_cv_type_of_bool=char ;;
22961                         (*)     cf_cv_type_of_bool=int  ;;
22962                         esac
22963                         echo "$as_me:22963: result: $cf_cv_type_of_bool" >&5
22964 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22965                 fi
22966         fi
22967 fi
22968
22969 # If the C compiler did not declare bool, and we did not determine that the C++
22970 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
22971 # ncurses library use the same type as C++ bool.  Note that this allows one to
22972 # specify the type of bool in a configure-script option and postpone
22973 # integration with the C++ compiler provided that the types are compatible.
22974 USE_CXX_BOOL=1
22975 if test $cf_cv_cc_bool_type = 1
22976 then
22977         # oops: C has a bool.  Unlikely, but C++ could differ.
22978         USE_CXX_BOOL=0
22979 elif test $cf_cv_builtin_bool = 0
22980 then
22981         # C++ has no bool
22982         USE_CXX_BOOL=0
22983 else
22984         # this is the normal case
22985         USE_CXX_BOOL='defined(__cplusplus)'
22986 fi
22987
22988 if test -f "${srcdir}/Ada95/Makefile.in" ; then
22989
22990         if test "$cf_with_ada" != "no" ; then
22991                 if test "$with_libtool" != "no"; then
22992                         { echo "$as_me:22992: WARNING: libtool does not support Ada - disabling feature" >&5
22993 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
22994                         cf_with_ada=no
22995                 fi
22996         fi
22997
22998         if test "$cf_with_ada" != "no" ; then
22999
23000 cf_ada_make=gnatmake
23001 cf_ada_config="#"
23002 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23003 set dummy $cf_ada_make; ac_word=$2
23004 echo "$as_me:23004: checking for $ac_word" >&5
23005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23006 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23007   echo $ECHO_N "(cached) $ECHO_C" >&6
23008 else
23009   if test -n "$gnatmake_exists"; then
23010   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23011 else
23012   ac_save_IFS=$IFS; IFS=$ac_path_separator
23013 ac_dummy="$PATH"
23014 for ac_dir in $ac_dummy; do
23015   IFS=$ac_save_IFS
23016   test -z "$ac_dir" && ac_dir=.
23017   $as_executable_p "$ac_dir/$ac_word" || continue
23018 ac_cv_prog_gnatmake_exists="yes"
23019 echo "$as_me:23019: found $ac_dir/$ac_word" >&5
23020 break
23021 done
23022
23023   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23024 fi
23025 fi
23026 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23027 if test -n "$gnatmake_exists"; then
23028   echo "$as_me:23028: result: $gnatmake_exists" >&5
23029 echo "${ECHO_T}$gnatmake_exists" >&6
23030 else
23031   echo "$as_me:23031: result: no" >&5
23032 echo "${ECHO_T}no" >&6
23033 fi
23034
23035 if test "$ac_cv_prog_gnatmake_exists" = no; then
23036         cf_ada_make=
23037         cf_cv_prog_gnat_correct=no
23038 else
23039         # Extract the first word of "gprconfig", so it can be a program name with args.
23040 set dummy gprconfig; ac_word=$2
23041 echo "$as_me:23041: checking for $ac_word" >&5
23042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23043 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23044   echo $ECHO_N "(cached) $ECHO_C" >&6
23045 else
23046   if test -n "$gprconfig_exists"; then
23047   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23048 else
23049   ac_save_IFS=$IFS; IFS=$ac_path_separator
23050 ac_dummy="$PATH"
23051 for ac_dir in $ac_dummy; do
23052   IFS=$ac_save_IFS
23053   test -z "$ac_dir" && ac_dir=.
23054   $as_executable_p "$ac_dir/$ac_word" || continue
23055 ac_cv_prog_gprconfig_exists="yes"
23056 echo "$as_me:23056: found $ac_dir/$ac_word" >&5
23057 break
23058 done
23059
23060   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23061 fi
23062 fi
23063 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23064 if test -n "$gprconfig_exists"; then
23065   echo "$as_me:23065: result: $gprconfig_exists" >&5
23066 echo "${ECHO_T}$gprconfig_exists" >&6
23067 else
23068   echo "$as_me:23068: result: no" >&5
23069 echo "${ECHO_T}no" >&6
23070 fi
23071
23072         if test "$ac_cv_prog_gprconfig_exists" = yes
23073         then
23074                 rm -rf conftest* *~conftest*
23075                 if mkdir conftest.src
23076                 then
23077                         cf_ada_config=""
23078                         cd conftest.src
23079                         for cf_gprconfig in Ada C
23080                         do
23081                                 echo "$as_me:23081: checking for gprconfig name for $cf_gprconfig" >&5
23082 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23083                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23084                                 if test -n "$cf_gprconfig_value"
23085                                 then
23086                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23087                                         echo "$as_me:23087: result: $cf_gprconfig_value" >&5
23088 echo "${ECHO_T}$cf_gprconfig_value" >&6
23089                                 else
23090                                         echo "$as_me:23090: result: missing" >&5
23091 echo "${ECHO_T}missing" >&6
23092                                         cf_ada_config="#"
23093                                         break
23094                                 fi
23095                         done
23096                         cd ..
23097                         rm -rf conftest* *~conftest*
23098                 fi
23099         else
23100                 # gprconfig is newer than gnatmake; we can continue...
23101                 cf_ada_config="##"
23102         fi
23103         if test "x$cf_ada_config" != "x#"
23104         then
23105
23106 echo "$as_me:23106: checking for gnat version" >&5
23107 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23108 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23109         grep '[0-9].[0-9][0-9]*' |\
23110         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23111 echo "$as_me:23111: result: $cf_gnat_version" >&5
23112 echo "${ECHO_T}$cf_gnat_version" >&6
23113
23114 case $cf_gnat_version in
23115 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23116         cf_cv_prog_gnat_correct=yes
23117         ;;
23118 (*)
23119         { echo "$as_me:23119: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23120 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23121         cf_cv_prog_gnat_correct=no
23122         ;;
23123 esac
23124
23125                 # Extract the first word of "m4", so it can be a program name with args.
23126 set dummy m4; ac_word=$2
23127 echo "$as_me:23127: checking for $ac_word" >&5
23128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23129 if test "${ac_cv_prog_M4_exists+set}" = set; then
23130   echo $ECHO_N "(cached) $ECHO_C" >&6
23131 else
23132   if test -n "$M4_exists"; then
23133   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23134 else
23135   ac_save_IFS=$IFS; IFS=$ac_path_separator
23136 ac_dummy="$PATH"
23137 for ac_dir in $ac_dummy; do
23138   IFS=$ac_save_IFS
23139   test -z "$ac_dir" && ac_dir=.
23140   $as_executable_p "$ac_dir/$ac_word" || continue
23141 ac_cv_prog_M4_exists="yes"
23142 echo "$as_me:23142: found $ac_dir/$ac_word" >&5
23143 break
23144 done
23145
23146   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23147 fi
23148 fi
23149 M4_exists=$ac_cv_prog_M4_exists
23150 if test -n "$M4_exists"; then
23151   echo "$as_me:23151: result: $M4_exists" >&5
23152 echo "${ECHO_T}$M4_exists" >&6
23153 else
23154   echo "$as_me:23154: result: no" >&5
23155 echo "${ECHO_T}no" >&6
23156 fi
23157
23158                 if test "$ac_cv_prog_M4_exists" = no; then
23159                         cf_cv_prog_gnat_correct=no
23160                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23161                 fi
23162                 if test "$cf_cv_prog_gnat_correct" = yes; then
23163                         echo "$as_me:23163: checking if GNAT works" >&5
23164 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23165
23166 rm -rf conftest* *~conftest*
23167 cat >>conftest.ads <<CF_EOF
23168 procedure conftest;
23169 CF_EOF
23170 cat >>conftest.adb <<CF_EOF
23171 with Text_IO;
23172 with GNAT.OS_Lib;
23173 procedure conftest is
23174 begin
23175    Text_IO.Put ("Hello World");
23176    Text_IO.New_Line;
23177    GNAT.OS_Lib.OS_Exit (0);
23178 end conftest;
23179 CF_EOF
23180 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23181    if ( ./conftest 1>&5 2>&1 ) ; then
23182       cf_cv_prog_gnat_correct=yes
23183    else
23184       cf_cv_prog_gnat_correct=no
23185    fi
23186 else
23187    cf_cv_prog_gnat_correct=no
23188 fi
23189 rm -rf conftest* *~conftest*
23190
23191                         echo "$as_me:23191: result: $cf_cv_prog_gnat_correct" >&5
23192 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23193                 fi
23194         else
23195                 cf_cv_prog_gnat_correct=no
23196         fi
23197 fi
23198
23199                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23200
23201         ADAFLAGS="$ADAFLAGS -gnatpn"
23202
23203         echo "$as_me:23203: checking optimization options for ADAFLAGS" >&5
23204 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23205         case "$CFLAGS" in
23206         (*-g*)
23207
23208         ADAFLAGS="$ADAFLAGS -g"
23209
23210                 ;;
23211         esac
23212         case "$CFLAGS" in
23213         (*-O*)
23214                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23215
23216         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23217
23218                 ;;
23219         esac
23220         echo "$as_me:23220: result: $ADAFLAGS" >&5
23221 echo "${ECHO_T}$ADAFLAGS" >&6
23222
23223 echo "$as_me:23223: checking if GNATPREP supports -T option" >&5
23224 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23225 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23226   echo $ECHO_N "(cached) $ECHO_C" >&6
23227 else
23228
23229 cf_cv_gnatprep_opt_t=no
23230 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23231
23232 fi
23233 echo "$as_me:23233: result: $cf_cv_gnatprep_opt_t" >&5
23234 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23235 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23236
23237 echo "$as_me:23237: checking if GNAT supports generics" >&5
23238 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23239 case $cf_gnat_version in
23240 (3.[1-9]*|[4-9].*)
23241         cf_gnat_generics=yes
23242         ;;
23243 (*)
23244         cf_gnat_generics=no
23245         ;;
23246 esac
23247 echo "$as_me:23247: result: $cf_gnat_generics" >&5
23248 echo "${ECHO_T}$cf_gnat_generics" >&6
23249
23250 if test "$cf_gnat_generics" = yes
23251 then
23252         cf_compile_generics=generics
23253         cf_generic_objects="\${GENOBJS}"
23254 else
23255         cf_compile_generics=
23256         cf_generic_objects=
23257 fi
23258
23259 echo "$as_me:23259: checking if GNAT supports SIGINT" >&5
23260 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23261 if test "${cf_cv_gnat_sigint+set}" = set; then
23262   echo $ECHO_N "(cached) $ECHO_C" >&6
23263 else
23264
23265 rm -rf conftest* *~conftest*
23266 cat >>conftest.ads <<CF_EOF
23267 with Ada.Interrupts.Names;
23268
23269 package ConfTest is
23270
23271    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23272    pragma Unreserve_All_Interrupts;
23273    pragma Warnings (On);
23274
23275    protected Process is
23276       procedure Stop;
23277       function Continue return Boolean;
23278       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23279    private
23280       Done : Boolean := False;
23281    end Process;
23282
23283 end ConfTest;
23284 CF_EOF
23285 cat >>conftest.adb <<CF_EOF
23286 package body ConfTest is
23287    protected body Process is
23288       procedure Stop is
23289       begin
23290          Done := True;
23291       end Stop;
23292       function Continue return Boolean is
23293       begin
23294          return not Done;
23295       end Continue;
23296    end Process;
23297 end ConfTest;
23298 CF_EOF
23299 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23300       cf_cv_gnat_sigint=yes
23301 else
23302    cf_cv_gnat_sigint=no
23303 fi
23304 rm -rf conftest* *~conftest*
23305
23306 fi
23307 echo "$as_me:23307: result: $cf_cv_gnat_sigint" >&5
23308 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23309
23310 if test $cf_cv_gnat_sigint = yes ; then
23311         USE_GNAT_SIGINT=""
23312 else
23313         USE_GNAT_SIGINT="#"
23314 fi
23315
23316 cf_gnat_libraries=no
23317 cf_gnat_projects=no
23318
23319 if test "$enable_gnat_projects" != no ; then
23320 echo "$as_me:23320: checking if GNAT supports project files" >&5
23321 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23322 case $cf_gnat_version in
23323 (3.[0-9]*)
23324         ;;
23325 (*)
23326         case $cf_cv_system_name in
23327         (cygwin*|msys*)
23328                 ;;
23329         (*)
23330                 rm -rf conftest* *~conftest*
23331                 if mkdir conftest.src conftest.bin conftest.lib
23332                 then
23333                         cd conftest.src
23334                         rm -rf conftest* *~conftest*
23335                         cat >>library.gpr <<CF_EOF
23336 project Library is
23337   Kind := External ("LIB_KIND");
23338   for Library_Name use "ConfTest";
23339   for Object_Dir use ".";
23340   for Library_ALI_Dir use External("LIBRARY_DIR");
23341   for Library_Version use External ("SONAME");
23342   for Library_Kind use Kind;
23343   for Library_Dir use External("BUILD_DIR");
23344   Source_Dir := External ("SOURCE_DIR");
23345   for Source_Dirs use (Source_Dir);
23346 end Library;
23347 CF_EOF
23348                         cat >>confpackage.ads <<CF_EOF
23349 package ConfPackage is
23350    procedure conftest;
23351 end ConfPackage;
23352 CF_EOF
23353                         cat >>confpackage.adb <<CF_EOF
23354 with Text_IO;
23355 package body ConfPackage is
23356    procedure conftest is
23357    begin
23358       Text_IO.Put ("Hello World");
23359       Text_IO.New_Line;
23360    end conftest;
23361 end ConfPackage;
23362 CF_EOF
23363                         if ( $cf_ada_make $ADAFLAGS \
23364                                         -Plibrary.gpr \
23365                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23366                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23367                                         -XSOURCE_DIR=`pwd` \
23368                                         -XSONAME=libConfTest.so.1 \
23369                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23370                                 cf_gnat_projects=yes
23371                         fi
23372                         cd ..
23373                 fi
23374                 if test -f conftest.lib/confpackage.ali
23375                 then
23376                         cf_gnat_libraries=yes
23377                 fi
23378                 rm -rf conftest* *~conftest*
23379                 ;;
23380         esac
23381         ;;
23382 esac
23383 echo "$as_me:23383: result: $cf_gnat_projects" >&5
23384 echo "${ECHO_T}$cf_gnat_projects" >&6
23385 fi # enable_gnat_projects
23386
23387 if test $cf_gnat_projects = yes
23388 then
23389         echo "$as_me:23389: checking if GNAT supports libraries" >&5
23390 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23391         echo "$as_me:23391: result: $cf_gnat_libraries" >&5
23392 echo "${ECHO_T}$cf_gnat_libraries" >&6
23393 fi
23394
23395 if test "$cf_gnat_projects" = yes
23396 then
23397         USE_OLD_MAKERULES="#"
23398         USE_GNAT_PROJECTS=""
23399 else
23400         USE_OLD_MAKERULES=""
23401         USE_GNAT_PROJECTS="#"
23402 fi
23403
23404 if test "$cf_gnat_libraries" = yes
23405 then
23406         USE_GNAT_LIBRARIES=""
23407 else
23408         USE_GNAT_LIBRARIES="#"
23409 fi
23410
23411 echo "$as_me:23411: checking for ada-compiler" >&5
23412 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23413
23414 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23415 if test "${with_ada_compiler+set}" = set; then
23416   withval="$with_ada_compiler"
23417   cf_ada_compiler=$withval
23418 else
23419   cf_ada_compiler=gnatmake
23420 fi;
23421
23422 echo "$as_me:23422: result: $cf_ada_compiler" >&5
23423 echo "${ECHO_T}$cf_ada_compiler" >&6
23424
23425                         cf_ada_package=terminal_interface
23426
23427 echo "$as_me:23427: checking for ada-include" >&5
23428 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23429
23430 # Check whether --with-ada-include or --without-ada-include was given.
23431 if test "${with_ada_include+set}" = set; then
23432   withval="$with_ada_include"
23433
23434 else
23435   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23436 fi; if test -n "$prefix/share/ada/adainclude" ; then
23437
23438 if test "x$prefix" != xNONE; then
23439         cf_path_syntax="$prefix"
23440 else
23441         cf_path_syntax="$ac_default_prefix"
23442 fi
23443
23444 case ".$withval" in
23445 (.\$\(*\)*|.\'*\'*)
23446         ;;
23447 (..|./*|.\\*)
23448         ;;
23449 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23450         ;;
23451 (.\${*prefix}*|.\${*dir}*)
23452         eval withval="$withval"
23453         case ".$withval" in
23454         (.NONE/*)
23455                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23456                 ;;
23457         esac
23458         ;;
23459 (.no|.NONE/*)
23460         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23461         ;;
23462 (*)
23463         { { echo "$as_me:23463: error: expected a pathname, not \"$withval\"" >&5
23464 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23465    { (exit 1); exit 1; }; }
23466         ;;
23467 esac
23468
23469 fi
23470 eval ADA_INCLUDE="$withval"
23471
23472 echo "$as_me:23472: result: $ADA_INCLUDE" >&5
23473 echo "${ECHO_T}$ADA_INCLUDE" >&6
23474
23475 echo "$as_me:23475: checking for ada-objects" >&5
23476 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23477
23478 # Check whether --with-ada-objects or --without-ada-objects was given.
23479 if test "${with_ada_objects+set}" = set; then
23480   withval="$with_ada_objects"
23481
23482 else
23483   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23484 fi; if test -n "$prefix/lib/ada/adalib" ; then
23485
23486 if test "x$prefix" != xNONE; then
23487         cf_path_syntax="$prefix"
23488 else
23489         cf_path_syntax="$ac_default_prefix"
23490 fi
23491
23492 case ".$withval" in
23493 (.\$\(*\)*|.\'*\'*)
23494         ;;
23495 (..|./*|.\\*)
23496         ;;
23497 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23498         ;;
23499 (.\${*prefix}*|.\${*dir}*)
23500         eval withval="$withval"
23501         case ".$withval" in
23502         (.NONE/*)
23503                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23504                 ;;
23505         esac
23506         ;;
23507 (.no|.NONE/*)
23508         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23509         ;;
23510 (*)
23511         { { echo "$as_me:23511: error: expected a pathname, not \"$withval\"" >&5
23512 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23513    { (exit 1); exit 1; }; }
23514         ;;
23515 esac
23516
23517 fi
23518 eval ADA_OBJECTS="$withval"
23519
23520 echo "$as_me:23520: result: $ADA_OBJECTS" >&5
23521 echo "${ECHO_T}$ADA_OBJECTS" >&6
23522
23523 echo "$as_me:23523: checking if an Ada95 shared-library should be built" >&5
23524 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23525
23526 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23527 if test "${with_ada_sharedlib+set}" = set; then
23528   withval="$with_ada_sharedlib"
23529   with_ada_sharedlib=$withval
23530 else
23531   with_ada_sharedlib=no
23532 fi;
23533 echo "$as_me:23533: result: $with_ada_sharedlib" >&5
23534 echo "${ECHO_T}$with_ada_sharedlib" >&6
23535
23536 if test "x$with_ada_sharedlib" != xno
23537 then
23538         if test "x$cf_gnat_projects" != xyes
23539         then
23540                 { echo "$as_me:23540: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23541 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23542                 with_ada_sharedlib=no
23543         fi
23544 fi
23545
23546 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23547 MAKE_ADA_SHAREDLIB="#"
23548
23549 if test "x$with_ada_sharedlib" != xno
23550 then
23551         MAKE_ADA_SHAREDLIB=
23552         if test "x$with_ada_sharedlib" != xyes
23553         then
23554                 ADA_SHAREDLIB="$with_ada_sharedlib"
23555         fi
23556 fi
23557
23558                 fi
23559         fi
23560 else
23561         cf_with_ada=no
23562 fi
23563
23564 # do this "late" to avoid conflict with header-checks
23565 if test "x$with_widec" = xyes ; then
23566         echo "$as_me:23566: checking for wchar_t" >&5
23567 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23568 if test "${ac_cv_type_wchar_t+set}" = set; then
23569   echo $ECHO_N "(cached) $ECHO_C" >&6
23570 else
23571   cat >conftest.$ac_ext <<_ACEOF
23572 #line 23572 "configure"
23573 #include "confdefs.h"
23574 $ac_includes_default
23575 int
23576 main (void)
23577 {
23578 if ((wchar_t *) 0)
23579   return 0;
23580 if (sizeof (wchar_t))
23581   return 0;
23582   ;
23583   return 0;
23584 }
23585 _ACEOF
23586 rm -f conftest.$ac_objext
23587 if { (eval echo "$as_me:23587: \"$ac_compile\"") >&5
23588   (eval $ac_compile) 2>&5
23589   ac_status=$?
23590   echo "$as_me:23590: \$? = $ac_status" >&5
23591   (exit $ac_status); } &&
23592          { ac_try='test -s conftest.$ac_objext'
23593   { (eval echo "$as_me:23593: \"$ac_try\"") >&5
23594   (eval $ac_try) 2>&5
23595   ac_status=$?
23596   echo "$as_me:23596: \$? = $ac_status" >&5
23597   (exit $ac_status); }; }; then
23598   ac_cv_type_wchar_t=yes
23599 else
23600   echo "$as_me: failed program was:" >&5
23601 cat conftest.$ac_ext >&5
23602 ac_cv_type_wchar_t=no
23603 fi
23604 rm -f conftest.$ac_objext conftest.$ac_ext
23605 fi
23606 echo "$as_me:23606: result: $ac_cv_type_wchar_t" >&5
23607 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23608
23609 echo "$as_me:23609: checking size of wchar_t" >&5
23610 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23611 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23612   echo $ECHO_N "(cached) $ECHO_C" >&6
23613 else
23614   if test "$ac_cv_type_wchar_t" = yes; then
23615   if test "$cross_compiling" = yes; then
23616   # Depending upon the size, compute the lo and hi bounds.
23617 cat >conftest.$ac_ext <<_ACEOF
23618 #line 23618 "configure"
23619 #include "confdefs.h"
23620 $ac_includes_default
23621 int
23622 main (void)
23623 {
23624 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23625   ;
23626   return 0;
23627 }
23628 _ACEOF
23629 rm -f conftest.$ac_objext
23630 if { (eval echo "$as_me:23630: \"$ac_compile\"") >&5
23631   (eval $ac_compile) 2>&5
23632   ac_status=$?
23633   echo "$as_me:23633: \$? = $ac_status" >&5
23634   (exit $ac_status); } &&
23635          { ac_try='test -s conftest.$ac_objext'
23636   { (eval echo "$as_me:23636: \"$ac_try\"") >&5
23637   (eval $ac_try) 2>&5
23638   ac_status=$?
23639   echo "$as_me:23639: \$? = $ac_status" >&5
23640   (exit $ac_status); }; }; then
23641   ac_lo=0 ac_mid=0
23642   while :; do
23643     cat >conftest.$ac_ext <<_ACEOF
23644 #line 23644 "configure"
23645 #include "confdefs.h"
23646 $ac_includes_default
23647 int
23648 main (void)
23649 {
23650 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23651   ;
23652   return 0;
23653 }
23654 _ACEOF
23655 rm -f conftest.$ac_objext
23656 if { (eval echo "$as_me:23656: \"$ac_compile\"") >&5
23657   (eval $ac_compile) 2>&5
23658   ac_status=$?
23659   echo "$as_me:23659: \$? = $ac_status" >&5
23660   (exit $ac_status); } &&
23661          { ac_try='test -s conftest.$ac_objext'
23662   { (eval echo "$as_me:23662: \"$ac_try\"") >&5
23663   (eval $ac_try) 2>&5
23664   ac_status=$?
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit $ac_status); }; }; then
23667   ac_hi=$ac_mid; break
23668 else
23669   echo "$as_me: failed program was:" >&5
23670 cat conftest.$ac_ext >&5
23671 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23672 fi
23673 rm -f conftest.$ac_objext conftest.$ac_ext
23674   done
23675 else
23676   echo "$as_me: failed program was:" >&5
23677 cat conftest.$ac_ext >&5
23678 ac_hi=-1 ac_mid=-1
23679   while :; do
23680     cat >conftest.$ac_ext <<_ACEOF
23681 #line 23681 "configure"
23682 #include "confdefs.h"
23683 $ac_includes_default
23684 int
23685 main (void)
23686 {
23687 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23688   ;
23689   return 0;
23690 }
23691 _ACEOF
23692 rm -f conftest.$ac_objext
23693 if { (eval echo "$as_me:23693: \"$ac_compile\"") >&5
23694   (eval $ac_compile) 2>&5
23695   ac_status=$?
23696   echo "$as_me:23696: \$? = $ac_status" >&5
23697   (exit $ac_status); } &&
23698          { ac_try='test -s conftest.$ac_objext'
23699   { (eval echo "$as_me:23699: \"$ac_try\"") >&5
23700   (eval $ac_try) 2>&5
23701   ac_status=$?
23702   echo "$as_me:23702: \$? = $ac_status" >&5
23703   (exit $ac_status); }; }; then
23704   ac_lo=$ac_mid; break
23705 else
23706   echo "$as_me: failed program was:" >&5
23707 cat conftest.$ac_ext >&5
23708 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23709 fi
23710 rm -f conftest.$ac_objext conftest.$ac_ext
23711   done
23712 fi
23713 rm -f conftest.$ac_objext conftest.$ac_ext
23714 # Binary search between lo and hi bounds.
23715 while test "x$ac_lo" != "x$ac_hi"; do
23716   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23717   cat >conftest.$ac_ext <<_ACEOF
23718 #line 23718 "configure"
23719 #include "confdefs.h"
23720 $ac_includes_default
23721 int
23722 main (void)
23723 {
23724 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23725   ;
23726   return 0;
23727 }
23728 _ACEOF
23729 rm -f conftest.$ac_objext
23730 if { (eval echo "$as_me:23730: \"$ac_compile\"") >&5
23731   (eval $ac_compile) 2>&5
23732   ac_status=$?
23733   echo "$as_me:23733: \$? = $ac_status" >&5
23734   (exit $ac_status); } &&
23735          { ac_try='test -s conftest.$ac_objext'
23736   { (eval echo "$as_me:23736: \"$ac_try\"") >&5
23737   (eval $ac_try) 2>&5
23738   ac_status=$?
23739   echo "$as_me:23739: \$? = $ac_status" >&5
23740   (exit $ac_status); }; }; then
23741   ac_hi=$ac_mid
23742 else
23743   echo "$as_me: failed program was:" >&5
23744 cat conftest.$ac_ext >&5
23745 ac_lo=`expr $ac_mid + 1`
23746 fi
23747 rm -f conftest.$ac_objext conftest.$ac_ext
23748 done
23749 ac_cv_sizeof_wchar_t=$ac_lo
23750 else
23751   if test "$cross_compiling" = yes; then
23752   { { echo "$as_me:23752: error: cannot run test program while cross compiling" >&5
23753 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23754    { (exit 1); exit 1; }; }
23755 else
23756   cat >conftest.$ac_ext <<_ACEOF
23757 #line 23757 "configure"
23758 #include "confdefs.h"
23759 $ac_includes_default
23760 int
23761 main (void)
23762 {
23763 FILE *f = fopen ("conftest.val", "w");
23764 if (!f)
23765   $ac_main_return (1);
23766 fprintf (f, "%d", (sizeof (wchar_t)));
23767 fclose (f);
23768   ;
23769   return 0;
23770 }
23771 _ACEOF
23772 rm -f conftest$ac_exeext
23773 if { (eval echo "$as_me:23773: \"$ac_link\"") >&5
23774   (eval $ac_link) 2>&5
23775   ac_status=$?
23776   echo "$as_me:23776: \$? = $ac_status" >&5
23777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23778   { (eval echo "$as_me:23778: \"$ac_try\"") >&5
23779   (eval $ac_try) 2>&5
23780   ac_status=$?
23781   echo "$as_me:23781: \$? = $ac_status" >&5
23782   (exit $ac_status); }; }; then
23783   ac_cv_sizeof_wchar_t=`cat conftest.val`
23784 else
23785   echo "$as_me: program exited with status $ac_status" >&5
23786 echo "$as_me: failed program was:" >&5
23787 cat conftest.$ac_ext >&5
23788 fi
23789 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23790 fi
23791 fi
23792 rm -f conftest.val
23793 else
23794   ac_cv_sizeof_wchar_t=0
23795 fi
23796 fi
23797 echo "$as_me:23797: result: $ac_cv_sizeof_wchar_t" >&5
23798 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
23799 cat >>confdefs.h <<EOF
23800 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23801 EOF
23802
23803 fi
23804
23805 ### Construct the ncurses library-subsets, if any, from this set of keywords:
23806 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
23807 ###
23808 ### ticlib modules may be a separate library, otherwise contained in termlib.
23809 ### termlib modules may be a separate library, otherwise contained in ncurses.
23810 ###
23811 ### The of "+" or " " between the tokens controls the way the script
23812 ### chooses to split module lists into libraries.
23813 ###
23814 ### (see CF_LIB_RULES).
23815 echo "$as_me:23815: checking for library subsets" >&5
23816 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
23817 LIB_SUBSETS=
23818
23819 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
23820         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
23821         if test "$with_ticlib" != no ; then
23822                 LIB_SUBSETS="${LIB_SUBSETS} "
23823         else
23824                 LIB_SUBSETS="${LIB_SUBSETS}+"
23825         fi
23826 fi
23827
23828 LIB_SUBSETS="${LIB_SUBSETS}termlib"
23829 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
23830
23831 if test "$with_termlib" != no ; then
23832         LIB_SUBSETS="${LIB_SUBSETS} "
23833 else
23834         LIB_SUBSETS="${LIB_SUBSETS}+"
23835 fi
23836
23837 LIB_SUBSETS="${LIB_SUBSETS}base"
23838
23839 # Most term-driver calls are to tinfo, but some like init_pair are to the
23840 # base library (so it resides in base).
23841 if test "$with_term_driver" != no ; then
23842         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
23843         case $cf_cv_system_name in
23844         (*mingw32*|*mingw64*)
23845                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
23846                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
23847                 ;;
23848         (*)
23849                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
23850                 ;;
23851         esac
23852 fi
23853
23854 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
23855 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
23856
23857 echo "$as_me:23857: result: $LIB_SUBSETS" >&5
23858 echo "${ECHO_T}$LIB_SUBSETS" >&6
23859
23860 ### Construct the list of include-directories to be generated
23861
23862 if test "$srcdir" != "."; then
23863         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
23864 fi
23865 CPPFLAGS="-I../include $CPPFLAGS"
23866 if test "$srcdir" != "."; then
23867         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
23868 fi
23869 CPPFLAGS="-I. $CPPFLAGS"
23870
23871 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
23872 if test "$srcdir" != "."; then
23873         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
23874 fi
23875 if test "$GCC" != yes; then
23876         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23877 elif test "$includedir" != "/usr/include"; then
23878         if test "$includedir" = '${prefix}/include' ; then
23879                 if test x$prefix != x/usr ; then
23880                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23881                 fi
23882         else
23883                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
23884         fi
23885 fi
23886
23887 ### Build up pieces for makefile rules
23888 echo "$as_me:23888: checking default library suffix" >&5
23889 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
23890
23891         case $DFT_LWR_MODEL in
23892         (libtool) DFT_ARG_SUFFIX=''   ;;
23893         (normal)  DFT_ARG_SUFFIX=''   ;;
23894         (debug)   DFT_ARG_SUFFIX='_g' ;;
23895         (profile) DFT_ARG_SUFFIX='_p' ;;
23896         (shared)  DFT_ARG_SUFFIX=''   ;;
23897         esac
23898         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
23899 echo "$as_me:23899: result: $DFT_ARG_SUFFIX" >&5
23900 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
23901
23902 echo "$as_me:23902: checking default library-dependency suffix" >&5
23903 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
23904
23905         case X$DFT_LWR_MODEL in
23906         (Xlibtool)
23907                 DFT_LIB_SUFFIX='.la'
23908                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23909                 ;;
23910         (Xdebug)
23911                 DFT_LIB_SUFFIX='_g.a'
23912                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23913                 ;;
23914         (Xprofile)
23915                 DFT_LIB_SUFFIX='_p.a'
23916                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23917                 ;;
23918         (Xshared)
23919                 case $cf_cv_system_name in
23920                 (aix[5-7]*)
23921                         DFT_LIB_SUFFIX='.so'
23922                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23923                         ;;
23924                 (cygwin*|msys*|mingw*)
23925                         DFT_LIB_SUFFIX='.dll'
23926                         DFT_DEP_SUFFIX='.dll.a'
23927                         ;;
23928                 (darwin*)
23929                         DFT_LIB_SUFFIX='.dylib'
23930                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23931                         ;;
23932                 (hpux*)
23933                         case $target in
23934                         (ia64*)
23935                                 DFT_LIB_SUFFIX='.so'
23936                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23937                                 ;;
23938                         (*)
23939                                 DFT_LIB_SUFFIX='.sl'
23940                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23941                                 ;;
23942                         esac
23943                         ;;
23944                 (*)
23945                         DFT_LIB_SUFFIX='.so'
23946                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23947                         ;;
23948                 esac
23949                 ;;
23950         (*)
23951                 DFT_LIB_SUFFIX='.a'
23952                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23953                 ;;
23954         esac
23955         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23956         then
23957                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23958                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23959         fi
23960 echo "$as_me:23960: result: $DFT_DEP_SUFFIX" >&5
23961 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23962
23963 echo "$as_me:23963: checking default object directory" >&5
23964 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23965
23966         case $DFT_LWR_MODEL in
23967         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
23968         (normal)  DFT_OBJ_SUBDIR='objects' ;;
23969         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
23970         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
23971         (shared)
23972                 case $cf_cv_system_name in
23973                 (cygwin|msys)
23974                         DFT_OBJ_SUBDIR='objects' ;;
23975                 (*)
23976                         DFT_OBJ_SUBDIR='obj_s' ;;
23977                 esac
23978         esac
23979 echo "$as_me:23979: result: $DFT_OBJ_SUBDIR" >&5
23980 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
23981
23982 if test "x$cf_with_cxx" = xyes ; then
23983 echo "$as_me:23983: checking c++ library-dependency suffix" >&5
23984 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
23985 if test "$with_libtool" != "no"; then
23986         # libtool thinks it can make c++ shared libraries (perhaps only g++)
23987         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23988 elif test "$with_shared_cxx" != "no"; then
23989         # also for g++ users...
23990         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23991 else
23992         # we normally make a static library because C/C++ library rules differ
23993
23994         case Xnormal in
23995         (Xlibtool)
23996                 CXX_LIB_SUFFIX='.la'
23997                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23998                 ;;
23999         (Xdebug)
24000                 CXX_LIB_SUFFIX='_g.a'
24001                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24002                 ;;
24003         (Xprofile)
24004                 CXX_LIB_SUFFIX='_p.a'
24005                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24006                 ;;
24007         (Xshared)
24008                 case $cf_cv_system_name in
24009                 (aix[5-7]*)
24010                         CXX_LIB_SUFFIX='.so'
24011                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24012                         ;;
24013                 (cygwin*|msys*|mingw*)
24014                         CXX_LIB_SUFFIX='.dll'
24015                         CXX_DEP_SUFFIX='.dll.a'
24016                         ;;
24017                 (darwin*)
24018                         CXX_LIB_SUFFIX='.dylib'
24019                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24020                         ;;
24021                 (hpux*)
24022                         case $target in
24023                         (ia64*)
24024                                 CXX_LIB_SUFFIX='.so'
24025                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24026                                 ;;
24027                         (*)
24028                                 CXX_LIB_SUFFIX='.sl'
24029                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24030                                 ;;
24031                         esac
24032                         ;;
24033                 (*)
24034                         CXX_LIB_SUFFIX='.so'
24035                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24036                         ;;
24037                 esac
24038                 ;;
24039         (*)
24040                 CXX_LIB_SUFFIX='.a'
24041                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24042                 ;;
24043         esac
24044         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24045         then
24046                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24047                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24048         fi
24049
24050 fi
24051 echo "$as_me:24051: result: $CXX_LIB_SUFFIX" >&5
24052 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24053
24054 fi
24055
24056 # do not want -ldl in build except as needed for -lncurses dependency
24057 if test "x$with_dlsym" = xyes ; then
24058 if test $DFT_LWR_MODEL = shared || \
24059    test $DFT_LWR_MODEL = libtool ; then
24060
24061 # remove dl library from $LIBS
24062 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24063
24064 fi
24065 fi
24066 ### Set up low-level terminfo dependencies for makefiles.
24067
24068 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24069 # do not need libdl
24070 TICS_LIST=
24071 if test "x$with_dlsym" = xyes ; then
24072
24073 # remove dl library from $SHLIB_LIST
24074 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24075
24076 fi
24077
24078 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24079 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24080 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24081 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24082 then
24083         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24084 fi
24085
24086 if test "$with_ticlib" != no ; then
24087
24088         if test "x$with_ticlib" != xyes ; then
24089                 TICS_NAME=$with_ticlib
24090                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24091                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24092                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24093                 TICS_LIB_SUFFIX="${with_ticlib}"
24094         else
24095                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24096                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24097                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24098                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24099         fi
24100         TICS_LDFLAGS="-L${LIB_DIR}"
24101         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24102 else
24103         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24104         TICS_LDFLAGS="-L${LIB_DIR}"
24105         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24106 fi
24107
24108 if test "$with_termlib" != no ; then
24109
24110         if test "x$with_termlib" != xyes ; then
24111                 TINFO_NAME=$with_termlib
24112                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24113                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24114                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24115                 TINFO_LIB_SUFFIX="${with_termlib}"
24116         else
24117                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24118                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24119                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24120                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24121         fi
24122
24123         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24124         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24125         if test "$DFT_LWR_MODEL" = "libtool"; then
24126                 TEST_ARGS="${TEST_DEPS}"
24127                 TEST_ARG2="${TEST_DEP2}"
24128                 TINFO_LDFLAGS="-L${LIB_DIR}"
24129                 TINFO_LIBS="$TEST_ARGS"
24130                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24131                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24132         else
24133                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24134                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24135                 if test "x$with_term_driver" != xno ; then
24136                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24137                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24138                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24139                 else
24140                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24141                         TINFO_LIBS="$TEST_ARGS"
24142                 fi
24143                 TINFO_LDFLAGS="-L${LIB_DIR}"
24144                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24145         fi
24146 else
24147         # the next lines are needed for linking libtic over libncurses
24148         TINFO_NAME=${LIB_NAME}
24149         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24150         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24151         if test "x$with_tic_depends" = xyes ; then
24152                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24153         else
24154                 TICS_LIST="$SHLIB_LIST"
24155         fi
24156
24157         TINFO_LDFLAGS="-L${LIB_DIR}"
24158         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24159 fi
24160
24161 if test "$DFT_LWR_MODEL" = shared ; then
24162         case $cf_cv_system_name in
24163         (cygwin*|msys*)
24164                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24165                 TINFO_SUFFIX=.dll
24166                 ;;
24167         esac
24168 fi
24169
24170 if test "x$with_dlsym" = xyes ; then
24171
24172 # remove dl library from $TICS_LIST
24173 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24174
24175 fi
24176
24177 if test "$DFT_LWR_MODEL" = "libtool"; then
24178         OBJEXT=lo
24179 fi
24180
24181 # needed for Ada95
24182 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24183
24184 case $DFT_LWR_MODEL in
24185 (normal|debug|profile)
24186
24187 if test "$GCC" = yes ; then
24188         case $cf_cv_system_name in
24189         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24190                 LDFLAGS_STATIC=
24191                 LDFLAGS_SHARED=
24192                 ;;
24193         (*)     # normally, except when broken
24194                 LDFLAGS_STATIC=-static
24195                 LDFLAGS_SHARED=-dynamic
24196                 ;;
24197         esac
24198 else
24199         case $cf_cv_system_name in
24200         (aix[4-7]*)     # from ld manpage
24201                 LDFLAGS_STATIC=-bstatic
24202                 LDFLAGS_SHARED=-bdynamic
24203                 ;;
24204         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24205                 # We could also use just "archive" and "shared".
24206                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24207                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24208                 ;;
24209         (irix*)         # from ld manpage IRIX64
24210                 LDFLAGS_STATIC=-Bstatic
24211                 LDFLAGS_SHARED=-Bdynamic
24212                 ;;
24213         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24214                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24215                 LDFLAGS_STATIC=-noso
24216                 LDFLAGS_SHARED=-so_archive
24217                 ;;
24218         (solaris2*)
24219                 LDFLAGS_STATIC=-Bstatic
24220                 LDFLAGS_SHARED=-Bdynamic
24221                 ;;
24222         esac
24223 fi
24224
24225 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24226 then
24227         echo "$as_me:24227: checking if linker supports switching between static/dynamic" >&5
24228 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24229
24230         rm -f libconftest.a
24231         cat >conftest.$ac_ext <<EOF
24232 #line 24232 "configure"
24233 #include <stdio.h>
24234 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24235 EOF
24236         if { (eval echo "$as_me:24236: \"$ac_compile\"") >&5
24237   (eval $ac_compile) 2>&5
24238   ac_status=$?
24239   echo "$as_me:24239: \$? = $ac_status" >&5
24240   (exit $ac_status); } ; then
24241                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24242                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24243         fi
24244         rm -f conftest.*
24245
24246         cf_save_LIBS="$LIBS"
24247
24248         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24249         cat >conftest.$ac_ext <<_ACEOF
24250 #line 24250 "configure"
24251 #include "confdefs.h"
24252
24253 #line 24253 "configure"
24254 #include <stdio.h>
24255 int cf_ldflags_static(FILE *fp);
24256
24257 int
24258 main (void)
24259 {
24260
24261         return cf_ldflags_static(stdin);
24262
24263   ;
24264   return 0;
24265 }
24266 _ACEOF
24267 rm -f conftest.$ac_objext conftest$ac_exeext
24268 if { (eval echo "$as_me:24268: \"$ac_link\"") >&5
24269   (eval $ac_link) 2>&5
24270   ac_status=$?
24271   echo "$as_me:24271: \$? = $ac_status" >&5
24272   (exit $ac_status); } &&
24273          { ac_try='test -s conftest$ac_exeext'
24274   { (eval echo "$as_me:24274: \"$ac_try\"") >&5
24275   (eval $ac_try) 2>&5
24276   ac_status=$?
24277   echo "$as_me:24277: \$? = $ac_status" >&5
24278   (exit $ac_status); }; }; then
24279
24280         # some linkers simply ignore the -dynamic
24281         case x`file conftest$ac_exeext 2>/dev/null` in
24282         (*static*)
24283                 cf_ldflags_static=no
24284                 ;;
24285         (*)
24286                 cf_ldflags_static=yes
24287                 ;;
24288         esac
24289
24290 else
24291   echo "$as_me: failed program was:" >&5
24292 cat conftest.$ac_ext >&5
24293 cf_ldflags_static=no
24294 fi
24295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24296
24297         rm -f libconftest.*
24298         LIBS="$cf_save_LIBS"
24299
24300         echo "$as_me:24300: result: $cf_ldflags_static" >&5
24301 echo "${ECHO_T}$cf_ldflags_static" >&6
24302
24303         if test $cf_ldflags_static != yes
24304         then
24305                 LDFLAGS_STATIC=
24306                 LDFLAGS_SHARED=
24307         fi
24308 else
24309         LDFLAGS_STATIC=
24310         LDFLAGS_SHARED=
24311 fi
24312
24313         ;;
24314 esac
24315
24316 echo "$as_me:24316: checking where we will install curses.h" >&5
24317 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24318
24319 includesubdir=
24320 if test "$with_overwrite" = no && \
24321  ( test "x$includedir" = 'x${prefix}/include' || \
24322    test "x$includedir" = "x${prefix}/include" )
24323 then
24324         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24325 fi
24326 echo "$as_me:24326: result: ${includedir}${includesubdir}" >&5
24327 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24328
24329 ### Resolve a conflict between normal and wide-curses by forcing applications
24330 ### that will need libutf8 to add it to their configure script.
24331 if test "$with_overwrite" != no ; then
24332 if test "$NCURSES_LIBUTF8" = 1 ; then
24333         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24334         { echo "$as_me:24334: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24335 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24336 fi
24337 fi
24338 WITH_OVERWRITE=$with_overwrite
24339
24340 # used to separate tack out of the tree
24341 NCURSES_TREE=
24342
24343 ### predefined stuff for the test programs
24344
24345 cat >>confdefs.h <<\EOF
24346 #define HAVE_SLK_COLOR 1
24347 EOF
24348
24349 ### Construct the list of subdirectories for which we'll customize makefiles
24350 ### with the appropriate compile-rules.
24351
24352 echo "$as_me:24352: checking for src modules" >&5
24353 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24354
24355 # dependencies and linker-arguments for test-programs
24356 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24357 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24358 if test "$DFT_LWR_MODEL" = "libtool"; then
24359         TEST_ARGS="${TEST_DEPS}"
24360         TEST_ARG2="${TEST_DEP2}"
24361 else
24362         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24363         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24364 fi
24365
24366 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24367 cf_cv_src_modules=
24368 for cf_dir in $modules_to_build
24369 do
24370         if test -f $srcdir/$cf_dir/modules; then
24371
24372                 # We may/may not have tack in the distribution, though the
24373                 # makefile is.
24374                 if test $cf_dir = tack ; then
24375                         if test "x$cf_with_tack" != "xyes"; then
24376                                 continue
24377                         fi
24378                 fi
24379
24380                 if test -z "$cf_cv_src_modules"; then
24381                         cf_cv_src_modules=$cf_dir
24382                 else
24383                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24384                 fi
24385
24386                 # Make the ncurses_cfg.h file record the library interface files as
24387                 # well.  These are header files that are the same name as their
24388                 # directory.  Ncurses is the only library that does not follow
24389                 # that pattern.
24390                 if test $cf_dir = tack ; then
24391                         continue
24392                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24393
24394 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24395
24396                         cat >>confdefs.h <<EOF
24397 #define HAVE_${cf_have_include}_H 1
24398 EOF
24399
24400                         cat >>confdefs.h <<EOF
24401 #define HAVE_LIB${cf_have_include} 1
24402 EOF
24403
24404                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24405                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24406                         if test "$DFT_LWR_MODEL" = "libtool"; then
24407                                 TEST_ARGS="${TEST_DEPS}"
24408                                 TEST_ARG2="${TEST_DEP2}"
24409                         else
24410                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24411                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24412                         fi
24413                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24414                 fi
24415         fi
24416 done
24417 echo "$as_me:24417: result: $cf_cv_src_modules" >&5
24418 echo "${ECHO_T}$cf_cv_src_modules" >&6
24419
24420 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24421 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24422
24423 SRC_SUBDIRS=
24424 if test "x$cf_with_manpages" != xno ; then
24425         SRC_SUBDIRS="$SRC_SUBDIRS man"
24426 fi
24427 SRC_SUBDIRS="$SRC_SUBDIRS include"
24428 for cf_dir in $cf_cv_src_modules
24429 do
24430         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24431 done
24432 if test "x$cf_with_tests" != "xno" ; then
24433         SRC_SUBDIRS="$SRC_SUBDIRS test"
24434 fi
24435 # always make this, to install the ncurses-config script
24436 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24437 if test "$cf_with_cxx_binding" != no; then
24438         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24439         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24440 fi
24441
24442 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24443 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24444
24445 ADA_SUBDIRS=
24446 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24447         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24448         ADA_SUBDIRS="gen src"
24449         if test "x$cf_with_tests" != "xno" ; then
24450                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24451         fi
24452 fi
24453
24454 SUB_MAKEFILES=
24455 for cf_dir in $SRC_SUBDIRS
24456 do
24457         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24458 done
24459
24460 if test -n "$ADA_SUBDIRS"; then
24461         for cf_dir in $ADA_SUBDIRS
24462         do
24463                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24464         done
24465
24466 fi
24467
24468 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24469    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24470    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24471 fi
24472
24473 DIRS_TO_MAKE="lib"
24474 for cf_item in $cf_list_models
24475 do
24476
24477         case $cf_item in
24478         (libtool) cf_subdir='obj_lo'  ;;
24479         (normal)  cf_subdir='objects' ;;
24480         (debug)   cf_subdir='obj_g' ;;
24481         (profile) cf_subdir='obj_p' ;;
24482         (shared)
24483                 case $cf_cv_system_name in
24484                 (cygwin|msys)
24485                         cf_subdir='objects' ;;
24486                 (*)
24487                         cf_subdir='obj_s' ;;
24488                 esac
24489         esac
24490
24491         for cf_item2 in $DIRS_TO_MAKE
24492         do
24493                 test $cf_item2 = $cf_subdir && break
24494         done
24495         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24496 done
24497 for cf_dir in $DIRS_TO_MAKE
24498 do
24499         test ! -d $cf_dir && mkdir $cf_dir
24500 done
24501
24502 # symbols that differ when compiling Ada95 by itself.
24503 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24504
24505 # values to use as strings
24506
24507 cat >>confdefs.h <<EOF
24508 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24509 EOF
24510
24511 cat >>confdefs.h <<EOF
24512 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24513 EOF
24514
24515 ### Now that we're done running tests, add the compiler-warnings, if any
24516
24517 cf_fix_cppflags=no
24518 cf_new_cflags=
24519 cf_new_cppflags=
24520 cf_new_extra_cppflags=
24521
24522 for cf_add_cflags in $EXTRA_CFLAGS
24523 do
24524 case $cf_fix_cppflags in
24525 (no)
24526         case $cf_add_cflags in
24527         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24528                 case $cf_add_cflags in
24529                 (-D*)
24530                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24531
24532                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24533                                 && test -z "${cf_tst_cflags}" \
24534                                 && cf_fix_cppflags=yes
24535
24536                         if test $cf_fix_cppflags = yes ; then
24537
24538         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24539         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24540
24541                                 continue
24542                         elif test "${cf_tst_cflags}" = "\"'" ; then
24543
24544         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24545         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24546
24547                                 continue
24548                         fi
24549                         ;;
24550                 esac
24551                 case "$CPPFLAGS" in
24552                 (*$cf_add_cflags)
24553                         ;;
24554                 (*)
24555                         case $cf_add_cflags in
24556                         (-D*)
24557                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24558
24559 CPPFLAGS=`echo "$CPPFLAGS" | \
24560         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24561                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24562
24563                                 ;;
24564                         esac
24565
24566         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24567         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24568
24569                         ;;
24570                 esac
24571                 ;;
24572         (*)
24573
24574         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24575         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24576
24577                 ;;
24578         esac
24579         ;;
24580 (yes)
24581
24582         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24583         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24584
24585         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24586
24587         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24588                 && test -z "${cf_tst_cflags}" \
24589                 && cf_fix_cppflags=no
24590         ;;
24591 esac
24592 done
24593
24594 if test -n "$cf_new_cflags" ; then
24595
24596         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24597         CFLAGS="${CFLAGS}$cf_new_cflags"
24598
24599 fi
24600
24601 if test -n "$cf_new_cppflags" ; then
24602
24603         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24604         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24605
24606 fi
24607
24608 if test -n "$cf_new_extra_cppflags" ; then
24609
24610         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24611         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24612
24613 fi
24614
24615 ### Define substitutions for header files to avoid name-pollution
24616
24617 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24618         HAVE_TCGETATTR=1
24619 else
24620         HAVE_TCGETATTR=0
24621 fi
24622
24623 if test "x$ac_cv_header_stdint_h" = xyes ; then
24624         HAVE_STDINT_H=1
24625 else
24626         HAVE_STDINT_H=0
24627 fi
24628
24629 if test "x$ac_cv_header_termio_h" = xyes ; then
24630         HAVE_TERMIO_H=1
24631 else
24632         HAVE_TERMIO_H=0
24633 fi
24634
24635 if test "x$ac_cv_header_termios_h" = xyes ; then
24636         HAVE_TERMIOS_H=1
24637 else
24638         HAVE_TERMIOS_H=0
24639 fi
24640
24641 ################################################################################
24642 test "x$use_database" = xyes && \
24643 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24644
24645 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24646 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24647
24648 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24649 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24650 fi
24651
24652 # Extract the first word of "tic", so it can be a program name with args.
24653 set dummy tic; ac_word=$2
24654 echo "$as_me:24654: checking for $ac_word" >&5
24655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24656 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24657   echo $ECHO_N "(cached) $ECHO_C" >&6
24658 else
24659   case $TIC_PATH in
24660   [\\/]* | ?:[\\/]*)
24661   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24662   ;;
24663   *)
24664   ac_save_IFS=$IFS; IFS=$ac_path_separator
24665 ac_dummy="$PATH:/usr/local/ncurses/bin"
24666 for ac_dir in $ac_dummy; do
24667   IFS=$ac_save_IFS
24668   test -z "$ac_dir" && ac_dir=.
24669   if $as_executable_p "$ac_dir/$ac_word"; then
24670    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24671    echo "$as_me:24671: found $ac_dir/$ac_word" >&5
24672    break
24673 fi
24674 done
24675
24676   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24677   ;;
24678 esac
24679 fi
24680 TIC_PATH=$ac_cv_path_TIC_PATH
24681
24682 if test -n "$TIC_PATH"; then
24683   echo "$as_me:24683: result: $TIC_PATH" >&5
24684 echo "${ECHO_T}$TIC_PATH" >&6
24685 else
24686   echo "$as_me:24686: result: no" >&5
24687 echo "${ECHO_T}no" >&6
24688 fi
24689
24690 if test -n "$FALLBACK_LIST"
24691 then
24692         if test "$TIC_PATH" = unknown
24693         then
24694                 { echo "$as_me:24694: WARNING: no tic program found for fallbacks" >&5
24695 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24696         fi
24697 fi
24698
24699 if test "x$cf_with_tests" != xno ; then
24700         MAKE_TESTS=
24701 else
24702         MAKE_TESTS="#"
24703 fi
24704
24705 ADAHTML_DIR=../../doc/html/ada
24706
24707 # these could be configurable, but are not currently
24708 PANEL_NAME=panel
24709 MENU_NAME=menu
24710 FORM_NAME=form
24711 CXX_NAME=ncurses++
24712
24713 # workaround for OS/2 (20151017)
24714 case $cf_cv_system_name in
24715 (os2*)
24716         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24717         ;;
24718 (*)
24719         LIBTOOL_OPTS_CXX=
24720         ;;
24721 esac
24722
24723 # workaround for g++ versus Solaris (20131116)
24724 case $cf_cv_system_name in
24725 (solaris2*)
24726         case "x$CPPFLAGS" in
24727         (*-D_XOPEN_SOURCE_EXTENDED*)
24728                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24729
24730 echo "${as_me:-configure}:24730: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24731
24732                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24733                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24734                 ;;
24735         esac
24736         ;;
24737 esac
24738
24739 # Help to automatically enable the extended curses features when using either
24740 # the *-config or the ".pc" files by adding defines.
24741 echo "$as_me:24741: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24742 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24743 PKG_CFLAGS=
24744 for cf_loop1 in $CPPFLAGS_after_XOPEN
24745 do
24746         cf_found=no
24747         for cf_loop2 in $CPPFLAGS_before_XOPEN
24748         do
24749                 if test "x$cf_loop1" = "x$cf_loop2"
24750                 then
24751                         cf_found=yes
24752                         break
24753                 fi
24754         done
24755         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24756 done
24757 echo "$as_me:24757: result: $PKG_CFLAGS" >&5
24758 echo "${ECHO_T}$PKG_CFLAGS" >&6
24759
24760 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24761 case "x$NCURSES_OSPEED" in
24762 (*short*)
24763         cf_compatible=1
24764         ;;
24765 (*)
24766         cf_compatible=0
24767         ;;
24768 esac
24769
24770 cat >>confdefs.h <<EOF
24771 #define NCURSES_OSPEED_COMPAT $cf_compatible
24772 EOF
24773
24774 case "x$cf_cv_typeof_chtype" in
24775 (xshort|xint|xlong)
24776         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
24777         ;;
24778 esac
24779
24780 case "x$cf_cv_typeof_mmask_t" in
24781 (xshort|xint|xlong)
24782         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
24783         ;;
24784 esac
24785
24786 # substitute into misc/Makefile to suppress
24787 # (un)install.data from the
24788 # (un)install rules.
24789 if test "x$cf_with_db_install" = "xno"; then
24790         MISC_INSTALL_DATA=
24791         MISC_UNINSTALL_DATA=
24792 else
24793         MISC_INSTALL_DATA=install.data
24794         MISC_UNINSTALL_DATA=uninstall.data
24795 fi
24796
24797 SUB_SCRIPTS=
24798
24799 if test -n "$PACKAGE"
24800 then
24801         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
24802         export PACKAGE
24803         echo "package: $PACKAGE"
24804 fi
24805
24806 UNALTERED_SYMS=
24807 cf_filter_syms=no
24808
24809 if test -n "$RESULTING_SYMS"
24810 then
24811         cf_filter_syms=$cf_dft_filter_syms
24812         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
24813
24814 echo "${as_me:-configure}:24814: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
24815
24816 fi
24817
24818 if test "x$WILDCARD_SYMS" = xno
24819 then
24820         cf_filter_syms=yes
24821 fi
24822
24823 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
24824
24825 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
24826 if test $cf_filter_syms = yes
24827 then
24828         RESULTING_SYMS=resulting.map
24829 fi
24830
24831 if test "x$cross_compiling" = xyes ; then
24832         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
24833         CHECK_BUILD="#"
24834 else
24835         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
24836         CHECK_BUILD=
24837 fi
24838
24839 cat >>confdefs.h <<\EOF
24840 #define HAVE_CURSES_DATA_BOOLNAMES 1
24841 EOF
24842
24843 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"
24844 ac_config_commands="$ac_config_commands default"
24845 cat >confcache <<\_ACEOF
24846 # This file is a shell script that caches the results of configure
24847 # tests run on this system so they can be shared between configure
24848 # scripts and configure runs, see configure's option --config-cache.
24849 # It is not useful on other systems.  If it contains results you don't
24850 # want to keep, you may remove or edit it.
24851 #
24852 # config.status only pays attention to the cache file if you give it
24853 # the --recheck option to rerun configure.
24854 #
24855 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24856 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24857 # following values.
24858
24859 _ACEOF
24860
24861 # The following way of writing the cache mishandles newlines in values,
24862 # but we know of no workaround that is simple, portable, and efficient.
24863 # So, don't put newlines in cache variables' values.
24864 # Ultrix sh set writes to stderr and can't be redirected directly,
24865 # and sets the high bit in the cache file unless we assign to the vars.
24866 {
24867   (set) 2>&1 |
24868     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24869     *ac_space=\ *)
24870       # `set' does not quote correctly, so add quotes (double-quote
24871       # substitution turns \\\\ into \\, and sed turns \\ into \).
24872       sed -n \
24873         "s/'/'\\\\''/g;
24874           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24875       ;;
24876     *)
24877       # `set' quotes correctly as required by POSIX, so do not add quotes.
24878       sed -n \
24879         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24880       ;;
24881     esac;
24882 } |
24883   sed '
24884      t clear
24885      : clear
24886      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24887      t end
24888      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24889      : end' >>confcache
24890 if cmp -s $cache_file confcache; then :; else
24891   if test -w $cache_file; then
24892     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24893     cat confcache >$cache_file
24894   else
24895     echo "not updating unwritable cache $cache_file"
24896   fi
24897 fi
24898 rm -f confcache
24899
24900 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24901 # Let make expand exec_prefix.
24902 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24903
24904 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24905 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24906 # trailing colons and then remove the whole line if VPATH becomes empty
24907 # (actually we leave an empty line to preserve line numbers).
24908 if test "x$srcdir" = x.; then
24909   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24910 s/:*\$(srcdir):*/:/;
24911 s/:*\${srcdir}:*/:/;
24912 s/:*@srcdir@:*/:/;
24913 s/^\([^=]*=[    ]*\):*/\1/;
24914 s/:*$//;
24915 s/^[^=]*=[      ]*$//;
24916 }'
24917 fi
24918
24919 DEFS=-DHAVE_CONFIG_H
24920
24921 : ${CONFIG_STATUS=./config.status}
24922 ac_clean_files_save=$ac_clean_files
24923 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24924 { echo "$as_me:24924: creating $CONFIG_STATUS" >&5
24925 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24926 cat >$CONFIG_STATUS <<_ACEOF
24927 #! $SHELL
24928 # Generated automatically by configure.
24929 # Run this file to recreate the current configuration.
24930 # Compiler output produced by configure, useful for debugging
24931 # configure, is in config.log if it exists.
24932
24933 debug=false
24934 SHELL=\${CONFIG_SHELL-$SHELL}
24935 ac_cs_invocation="\$0 \$@"
24936
24937 _ACEOF
24938
24939 cat >>$CONFIG_STATUS <<\_ACEOF
24940 # Be Bourne compatible
24941 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24942   emulate sh
24943   NULLCMD=:
24944 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24945   set -o posix
24946 fi
24947
24948 # Name of the executable.
24949 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24950
24951 if expr a : '\(a\)' >/dev/null 2>&1; then
24952   as_expr=expr
24953 else
24954   as_expr=false
24955 fi
24956
24957 rm -f conf$$ conf$$.exe conf$$.file
24958 echo >conf$$.file
24959 if ln -s conf$$.file conf$$ 2>/dev/null; then
24960   # We could just check for DJGPP; but this test a) works b) is more generic
24961   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24962   if test -f conf$$.exe; then
24963     # Don't use ln at all; we don't have any links
24964     as_ln_s='cp -p'
24965   else
24966     as_ln_s='ln -s'
24967   fi
24968 elif ln conf$$.file conf$$ 2>/dev/null; then
24969   as_ln_s=ln
24970 else
24971   as_ln_s='cp -p'
24972 fi
24973 rm -f conf$$ conf$$.exe conf$$.file
24974
24975 as_executable_p="test -f"
24976
24977 # Support unset when possible.
24978 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24979   as_unset=unset
24980 else
24981   as_unset=false
24982 fi
24983
24984 # NLS nuisances.
24985 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24986 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24987 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24988 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24989 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24990 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24991 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24992 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24993
24994 # IFS
24995 # We need space, tab and new line, in precisely that order.
24996 as_nl='
24997 '
24998 IFS="   $as_nl"
24999
25000 # CDPATH.
25001 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25002
25003 exec 6>&1
25004
25005 _ACEOF
25006
25007 # Files that config.status was made for.
25008 if test -n "$ac_config_files"; then
25009   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25010 fi
25011
25012 if test -n "$ac_config_headers"; then
25013   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25014 fi
25015
25016 if test -n "$ac_config_links"; then
25017   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25018 fi
25019
25020 if test -n "$ac_config_commands"; then
25021   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25022 fi
25023
25024 cat >>$CONFIG_STATUS <<\EOF
25025
25026 ac_cs_usage="\
25027 \`$as_me' instantiates files from templates according to the
25028 current configuration.
25029
25030 Usage: $0 [OPTIONS] [FILE]...
25031
25032   -h, --help       print this help, then exit
25033   -V, --version    print version number, then exit
25034   -d, --debug      don't remove temporary files
25035       --recheck    update $as_me by reconfiguring in the same conditions
25036   --file=FILE[:TEMPLATE]
25037                    instantiate the configuration file FILE
25038   --header=FILE[:TEMPLATE]
25039                    instantiate the configuration header FILE
25040
25041 Configuration files:
25042 $config_files
25043
25044 Configuration headers:
25045 $config_headers
25046
25047 Configuration commands:
25048 $config_commands
25049
25050 Report bugs to <dickey@invisible-island.net>."
25051 EOF
25052
25053 cat >>$CONFIG_STATUS <<EOF
25054 ac_cs_version="\\
25055 config.status
25056 configured by $0, generated by GNU Autoconf 2.52.20180819,
25057   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25058
25059 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25060 Free Software Foundation, Inc.
25061 This config.status script is free software; the Free Software Foundation
25062 gives unlimited permission to copy, distribute and modify it."
25063 srcdir=$srcdir
25064 INSTALL="$INSTALL"
25065 EOF
25066
25067 cat >>$CONFIG_STATUS <<\EOF
25068 # If no file are specified by the user, then we need to provide default
25069 # value.  By we need to know if files were specified by the user.
25070 ac_need_defaults=:
25071 while test $# != 0
25072 do
25073   case $1 in
25074   --*=*)
25075     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25076     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25077     shift
25078     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25079     shift
25080     ;;
25081   -*);;
25082   *) # This is not an option, so the user has probably given explicit
25083      # arguments.
25084      ac_need_defaults=false;;
25085   esac
25086
25087   case $1 in
25088   # Handling of the options.
25089 EOF
25090 cat >>$CONFIG_STATUS <<EOF
25091   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25092     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25093     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25094 EOF
25095 cat >>$CONFIG_STATUS <<\EOF
25096   --version | --vers* | -V )
25097     echo "$ac_cs_version"; exit 0 ;;
25098   --he | --h)
25099     # Conflict between --help and --header
25100     { { echo "$as_me:25100: error: ambiguous option: $1
25101 Try \`$0 --help' for more information." >&5
25102 echo "$as_me: error: ambiguous option: $1
25103 Try \`$0 --help' for more information." >&2;}
25104    { (exit 1); exit 1; }; };;
25105   --help | --hel | -h )
25106     echo "$ac_cs_usage"; exit 0 ;;
25107   --debug | --d* | -d )
25108     debug=: ;;
25109   --file | --fil | --fi | --f )
25110     shift
25111     CONFIG_FILES="$CONFIG_FILES $1"
25112     ac_need_defaults=false;;
25113   --header | --heade | --head | --hea )
25114     shift
25115     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25116     ac_need_defaults=false;;
25117
25118   # This is an error.
25119   -*) { { echo "$as_me:25119: error: unrecognized option: $1
25120 Try \`$0 --help' for more information." >&5
25121 echo "$as_me: error: unrecognized option: $1
25122 Try \`$0 --help' for more information." >&2;}
25123    { (exit 1); exit 1; }; } ;;
25124
25125   *) ac_config_targets="$ac_config_targets $1" ;;
25126
25127   esac
25128   shift
25129 done
25130
25131 exec 5>>config.log
25132 cat >&5 << _ACEOF
25133
25134 ## ----------------------- ##
25135 ## Running config.status.  ##
25136 ## ----------------------- ##
25137
25138 This file was extended by $as_me 2.52.20180819, executed with
25139   CONFIG_FILES    = $CONFIG_FILES
25140   CONFIG_HEADERS  = $CONFIG_HEADERS
25141   CONFIG_LINKS    = $CONFIG_LINKS
25142   CONFIG_COMMANDS = $CONFIG_COMMANDS
25143   > $ac_cs_invocation
25144 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25145
25146 _ACEOF
25147 EOF
25148
25149 cat >>$CONFIG_STATUS <<EOF
25150 #
25151 # INIT-COMMANDS section.
25152 #
25153
25154 ### Special initialization commands, used to pass information from the
25155 ### configuration-run into config.status
25156
25157 AWK="$AWK"
25158 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25159 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25160 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25161 ECHO_LD="$ECHO_LD"
25162 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25163 LDCONFIG="$LDCONFIG"
25164 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25165 LIB_NAME="$LIB_NAME"
25166 LIB_PREFIX="$LIB_PREFIX"
25167 LIB_SUBSETS="$LIB_SUBSETS"
25168 LIB_SUFFIX="$LIB_SUFFIX"
25169 LIB_TRACING="$LIB_TRACING"
25170 LN_S="$LN_S"
25171 MAKE_TERMINFO="$MAKE_TERMINFO"
25172 NCURSES_MAJOR="$NCURSES_MAJOR"
25173 NCURSES_MINOR="$NCURSES_MINOR"
25174 NCURSES_OSPEED="$NCURSES_OSPEED"
25175 NCURSES_PATCH="$NCURSES_PATCH"
25176 SRC_SUBDIRS="$SRC_SUBDIRS"
25177 TERMINFO="$TERMINFO"
25178 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25179 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25180 TICS_NAME="$TICS_NAME"
25181 TICS_SUFFIX="$TICS_SUFFIX"
25182 TIC_PATH="$TIC_PATH"
25183 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25184 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25185 TINFO_NAME="$TINFO_NAME"
25186 TINFO_SUFFIX="$TINFO_SUFFIX"
25187 UNALTERED_SYMS="$UNALTERED_SYMS"
25188 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25189 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25190 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25191 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25192 WILDCARD_SYMS="$WILDCARD_SYMS"
25193 WITH_CURSES_H="$with_curses_h"
25194 WITH_ECHO="${enable_echo:=yes}"
25195 WITH_OVERWRITE="$with_overwrite"
25196 cf_LIST_MODELS="$cf_list_models"
25197 cf_cv_abi_version="$cf_cv_abi_version"
25198 cf_cv_do_relink="$cf_cv_do_relink"
25199 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25200 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25201 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25202 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25203 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25204 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25205 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25206 cf_cv_rel_version="$cf_cv_rel_version"
25207 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25208 cf_cv_shared_soname='$cf_cv_shared_soname'
25209 cf_cv_shlib_version="$cf_cv_shlib_version"
25210 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25211 cf_cv_system_name="$cf_cv_system_name"
25212 cf_cv_term_driver="$with_term_driver"
25213 cf_with_ada="$cf_with_ada"
25214 cf_with_cxx_binding="$cf_with_cxx_binding"
25215 cf_with_db_install="$cf_with_db_install"
25216 cf_with_manpages="$cf_with_manpages"
25217 cf_with_tests="$cf_with_tests"
25218 host="$host"
25219 target="$target"
25220 with_shared_cxx="$with_shared_cxx"
25221
25222 EOF
25223
25224 cat >>$CONFIG_STATUS <<\EOF
25225 for ac_config_target in $ac_config_targets
25226 do
25227   case "$ac_config_target" in
25228   # Handling of arguments.
25229   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25230   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25231   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25232   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25233   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25234   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25235   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25236   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25237   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25238   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25239   *) { { echo "$as_me:25239: error: invalid argument: $ac_config_target" >&5
25240 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25241    { (exit 1); exit 1; }; };;
25242   esac
25243 done
25244
25245 # If the user did not use the arguments to specify the items to instantiate,
25246 # then the envvar interface is used.  Set only those that are not.
25247 # We use the long form for the default assignment because of an extremely
25248 # bizarre bug on SunOS 4.1.3.
25249 if $ac_need_defaults; then
25250   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25251   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25252   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25253 fi
25254
25255 # Create a temporary directory, and hook for its removal unless debugging.
25256 $debug ||
25257 {
25258   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25259   trap '{ (exit 1); exit 1; }' 1 2 13 15
25260 }
25261
25262 # Create a (secure) tmp directory for tmp files.
25263 : ${TMPDIR=/tmp}
25264 {
25265   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25266   test -n "$tmp" && test -d "$tmp"
25267 }  ||
25268 {
25269   tmp=$TMPDIR/cs$$-$RANDOM
25270   (umask 077 && mkdir $tmp)
25271 } ||
25272 {
25273    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25274    { (exit 1); exit 1; }
25275 }
25276
25277 EOF
25278
25279 cat >>$CONFIG_STATUS <<EOF
25280
25281 #
25282 # CONFIG_FILES section.
25283 #
25284
25285 # No need to generate the scripts if there are no CONFIG_FILES.
25286 # This happens for instance when ./config.status config.h
25287 if test -n "\$CONFIG_FILES"; then
25288   # Protect against being on the right side of a sed subst in config.status.
25289   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25290    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25291 s,@SHELL@,$SHELL,;t t
25292 s,@exec_prefix@,$exec_prefix,;t t
25293 s,@prefix@,$prefix,;t t
25294 s,@program_transform_name@,$program_transform_name,;t t
25295 s,@bindir@,$bindir,;t t
25296 s,@sbindir@,$sbindir,;t t
25297 s,@libexecdir@,$libexecdir,;t t
25298 s,@datarootdir@,$datarootdir,;t t
25299 s,@datadir@,$datadir,;t t
25300 s,@sysconfdir@,$sysconfdir,;t t
25301 s,@sharedstatedir@,$sharedstatedir,;t t
25302 s,@localstatedir@,$localstatedir,;t t
25303 s,@runstatedir@,$runstatedir,;t t
25304 s,@libdir@,$libdir,;t t
25305 s,@includedir@,$includedir,;t t
25306 s,@oldincludedir@,$oldincludedir,;t t
25307 s,@infodir@,$infodir,;t t
25308 s,@mandir@,$mandir,;t t
25309 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25310 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25311 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25312 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25313 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25314 s,@build_alias@,$build_alias,;t t
25315 s,@host_alias@,$host_alias,;t t
25316 s,@target_alias@,$target_alias,;t t
25317 s,@ECHO_C@,$ECHO_C,;t t
25318 s,@ECHO_N@,$ECHO_N,;t t
25319 s,@ECHO_T@,$ECHO_T,;t t
25320 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25321 s,@DEFS@,$DEFS,;t t
25322 s,@LIBS@,$LIBS,;t t
25323 s,@top_builddir@,$top_builddir,;t t
25324 s,@EGREP@,$EGREP,;t t
25325 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25326 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25327 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25328 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25329 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25330 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25331 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25332 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25333 s,@VERSION@,$VERSION,;t t
25334 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25335 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25336 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25337 s,@PACKAGE@,$PACKAGE,;t t
25338 s,@build@,$build,;t t
25339 s,@build_cpu@,$build_cpu,;t t
25340 s,@build_vendor@,$build_vendor,;t t
25341 s,@build_os@,$build_os,;t t
25342 s,@host@,$host,;t t
25343 s,@host_cpu@,$host_cpu,;t t
25344 s,@host_vendor@,$host_vendor,;t t
25345 s,@host_os@,$host_os,;t t
25346 s,@target@,$target,;t t
25347 s,@target_cpu@,$target_cpu,;t t
25348 s,@target_vendor@,$target_vendor,;t t
25349 s,@target_os@,$target_os,;t t
25350 s,@CC@,$CC,;t t
25351 s,@CFLAGS@,$CFLAGS,;t t
25352 s,@LDFLAGS@,$LDFLAGS,;t t
25353 s,@CPPFLAGS@,$CPPFLAGS,;t t
25354 s,@ac_ct_CC@,$ac_ct_CC,;t t
25355 s,@EXEEXT@,$EXEEXT,;t t
25356 s,@OBJEXT@,$OBJEXT,;t t
25357 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25358 s,@CPP@,$CPP,;t t
25359 s,@LDCONFIG@,$LDCONFIG,;t t
25360 s,@CXX@,$CXX,;t t
25361 s,@CXXFLAGS@,$CXXFLAGS,;t t
25362 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25363 s,@AWK@,$AWK,;t t
25364 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25365 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25366 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25367 s,@LINT@,$LINT,;t t
25368 s,@LINT_OPTS@,$LINT_OPTS,;t t
25369 s,@LN_S@,$LN_S,;t t
25370 s,@cf_config_suffix@,$cf_config_suffix,;t t
25371 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25372 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25373 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25374 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25375 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25376 s,@SET_MAKE@,$SET_MAKE,;t t
25377 s,@CTAGS@,$CTAGS,;t t
25378 s,@ETAGS@,$ETAGS,;t t
25379 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25380 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25381 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25382 s,@RANLIB@,$RANLIB,;t t
25383 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25384 s,@LD@,$LD,;t t
25385 s,@ac_ct_LD@,$ac_ct_LD,;t t
25386 s,@AR@,$AR,;t t
25387 s,@ac_ct_AR@,$ac_ct_AR,;t t
25388 s,@NM@,$NM,;t t
25389 s,@ac_ct_NM@,$ac_ct_NM,;t t
25390 s,@ARFLAGS@,$ARFLAGS,;t t
25391 s,@DESTDIR@,$DESTDIR,;t t
25392 s,@BUILD_CC@,$BUILD_CC,;t t
25393 s,@BUILD_CPP@,$BUILD_CPP,;t t
25394 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25395 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25396 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25397 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25398 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25399 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25400 s,@cf_list_models@,$cf_list_models,;t t
25401 s,@ABI_VERSION@,$ABI_VERSION,;t t
25402 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25403 s,@LIBTOOL@,$LIBTOOL,;t t
25404 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25405 s,@LT_UNDEF@,$LT_UNDEF,;t t
25406 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25407 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25408 s,@LIB_CREATE@,$LIB_CREATE,;t t
25409 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25410 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25411 s,@LIB_PREP@,$LIB_PREP,;t t
25412 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25413 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25414 s,@LIB_LINK@,$LIB_LINK,;t t
25415 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25416 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25417 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25418 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25419 s,@TICS_NAME@,$TICS_NAME,;t t
25420 s,@TINFO_NAME@,$TINFO_NAME,;t t
25421 s,@LIB_NAME@,$LIB_NAME,;t t
25422 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25423 s,@CC_G_OPT@,$CC_G_OPT,;t t
25424 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25425 s,@LD_MODEL@,$LD_MODEL,;t t
25426 s,@shlibdir@,$shlibdir,;t t
25427 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25428 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25429 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25430 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25431 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25432 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25433 s,@LINK_PROGS@,$LINK_PROGS,;t t
25434 s,@LINK_TESTS@,$LINK_TESTS,;t t
25435 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25436 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25437 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25438 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25439 s,@RPATH_LIST@,$RPATH_LIST,;t t
25440 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25441 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25442 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25443 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25444 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25445 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25446 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25447 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25448 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25449 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25450 s,@XTERM_KBS@,$XTERM_KBS,;t t
25451 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25452 s,@TERMINFO@,$TERMINFO,;t t
25453 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25454 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25455 s,@TERMPATH@,$TERMPATH,;t t
25456 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25457 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25458 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25459 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25460 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25461 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25462 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25463 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25464 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25465 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25466 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25467 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25468 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25469 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25470 s,@RGB_PATH@,$RGB_PATH,;t t
25471 s,@no_x11_rgb@,$no_x11_rgb,;t t
25472 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25473 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25474 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25475 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25476 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25477 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25478 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25479 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25480 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25481 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25482 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25483 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25484 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25485 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25486 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25487 s,@PTHREAD@,$PTHREAD,;t t
25488 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25489 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25490 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25491 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25492 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25493 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25494 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25495 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25496 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25497 s,@ECHO_LT@,$ECHO_LT,;t t
25498 s,@ECHO_LD@,$ECHO_LD,;t t
25499 s,@RULE_CC@,$RULE_CC,;t t
25500 s,@SHOW_CC@,$SHOW_CC,;t t
25501 s,@ECHO_CC@,$ECHO_CC,;t t
25502 s,@ECHO_LINK@,$ECHO_LINK,;t t
25503 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25504 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25505 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25506 s,@ADAFLAGS@,$ADAFLAGS,;t t
25507 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25508 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25509 s,@ADA_TRACE@,$ADA_TRACE,;t t
25510 s,@MATH_LIB@,$MATH_LIB,;t t
25511 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25512 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25513 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25514 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25515 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25516 s,@TEST_LIBS@,$TEST_LIBS,;t t
25517 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25518 s,@CXXCPP@,$CXXCPP,;t t
25519 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25520 s,@CXX_AR@,$CXX_AR,;t t
25521 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25522 s,@CXXLIBS@,$CXXLIBS,;t t
25523 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25524 s,@gnatmake_exists@,$gnatmake_exists,;t t
25525 s,@gprconfig_exists@,$gprconfig_exists,;t t
25526 s,@M4_exists@,$M4_exists,;t t
25527 s,@cf_ada_make@,$cf_ada_make,;t t
25528 s,@cf_ada_config@,$cf_ada_config,;t t
25529 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25530 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25531 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25532 s,@cf_compile_generics@,$cf_compile_generics,;t t
25533 s,@cf_generic_objects@,$cf_generic_objects,;t t
25534 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25535 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25536 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25537 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25538 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25539 s,@cf_ada_package@,$cf_ada_package,;t t
25540 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25541 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25542 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25543 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25544 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25545 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25546 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25547 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25548 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25549 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25550 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25551 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25552 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25553 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25554 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25555 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25556 s,@TICS_LIBS@,$TICS_LIBS,;t t
25557 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25558 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25559 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25560 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25561 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25562 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25563 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25564 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25565 s,@includesubdir@,$includesubdir,;t t
25566 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25567 s,@TICS_LIST@,$TICS_LIST,;t t
25568 s,@TINFO_LIST@,$TINFO_LIST,;t t
25569 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25570 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25571 s,@TEST_ARGS@,$TEST_ARGS,;t t
25572 s,@TEST_DEPS@,$TEST_DEPS,;t t
25573 s,@TEST_ARG2@,$TEST_ARG2,;t t
25574 s,@TEST_DEP2@,$TEST_DEP2,;t t
25575 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25576 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25577 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25578 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25579 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25580 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25581 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25582 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25583 s,@cross_compiling@,$cross_compiling,;t t
25584 s,@TIC_PATH@,$TIC_PATH,;t t
25585 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25586 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25587 s,@PANEL_NAME@,$PANEL_NAME,;t t
25588 s,@MENU_NAME@,$MENU_NAME,;t t
25589 s,@FORM_NAME@,$FORM_NAME,;t t
25590 s,@CXX_NAME@,$CXX_NAME,;t t
25591 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25592 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25593 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25594 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25595 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25596 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25597 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25598 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25599 CEOF
25600
25601 EOF
25602
25603   cat >>$CONFIG_STATUS <<\EOF
25604   # Split the substitutions into bite-sized pieces for seds with
25605   # small command number limits, like on Digital OSF/1 and HP-UX.
25606   ac_max_sed_lines=48
25607   ac_sed_frag=1 # Number of current file.
25608   ac_beg=1 # First line for current file.
25609   ac_end=$ac_max_sed_lines # Line after last line for current file.
25610   ac_more_lines=:
25611   ac_sed_cmds=
25612   while $ac_more_lines; do
25613     if test $ac_beg -gt 1; then
25614       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25615     else
25616       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25617     fi
25618     if test ! -s $tmp/subs.frag; then
25619       ac_more_lines=false
25620     else
25621       # The purpose of the label and of the branching condition is to
25622       # speed up the sed processing (if there are no `@' at all, there
25623       # is no need to browse any of the substitutions).
25624       # These are the two extra sed commands mentioned above.
25625       (echo ':t
25626   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25627       # It is possible to make a multiline substitution using escaped newlines.
25628       # Ensure that we do not split the substitution between script fragments.
25629       ac_BEG=$ac_end
25630       ac_END=`expr $ac_end + $ac_max_sed_lines`
25631       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25632       if test -s $tmp/subs.next; then
25633         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25634         if test ! -s $tmp/subs.edit; then
25635           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25636           if test ! -s $tmp/subs.edit; then
25637             if test $ac_beg -gt 1; then
25638               ac_end=`expr $ac_end - 1`
25639               continue
25640             fi
25641           fi
25642         fi
25643       fi
25644
25645       if test -z "$ac_sed_cmds"; then
25646         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25647       else
25648         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25649       fi
25650       ac_sed_frag=`expr $ac_sed_frag + 1`
25651       ac_beg=$ac_end
25652       ac_end=`expr $ac_end + $ac_max_sed_lines`
25653     fi
25654   done
25655   if test -z "$ac_sed_cmds"; then
25656     ac_sed_cmds=cat
25657   fi
25658 fi # test -n "$CONFIG_FILES"
25659
25660 EOF
25661 cat >>$CONFIG_STATUS <<\EOF
25662 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25663   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25664   case $ac_file in
25665   - | *:- | *:-:* ) # input from stdin
25666         cat >$tmp/stdin
25667         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25668         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25669   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25670         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25671   * )   ac_file_in=$ac_file.in ;;
25672   esac
25673
25674   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25675   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25676          X"$ac_file" : 'X\(//\)[^/]' \| \
25677          X"$ac_file" : 'X\(//\)$' \| \
25678          X"$ac_file" : 'X\(/\)' \| \
25679          .     : '\(.\)' 2>/dev/null ||
25680 echo X"$ac_file" |
25681     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25682           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25683           /^X\(\/\/\)$/{ s//\1/; q; }
25684           /^X\(\/\).*/{ s//\1/; q; }
25685           s/.*/./; q'`
25686   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25687     { case "$ac_dir" in
25688   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25689   *)                      as_incr_dir=.;;
25690 esac
25691 as_dummy="$ac_dir"
25692 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25693   case $as_mkdir_dir in
25694     # Skip DOS drivespec
25695     ?:) as_incr_dir=$as_mkdir_dir ;;
25696     *)
25697       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25698       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25699     ;;
25700   esac
25701 done; }
25702
25703     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25704     # A "../" for each directory in $ac_dir_suffix.
25705     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25706   else
25707     ac_dir_suffix= ac_dots=
25708   fi
25709
25710   case $srcdir in
25711   .)  ac_srcdir=.
25712       if test -z "$ac_dots"; then
25713          ac_top_srcdir=.
25714       else
25715          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25716       fi ;;
25717   [\\/]* | ?:[\\/]* )
25718       ac_srcdir=$srcdir$ac_dir_suffix;
25719       ac_top_srcdir=$srcdir ;;
25720   *) # Relative path.
25721     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25722     ac_top_srcdir=$ac_dots$srcdir ;;
25723   esac
25724
25725   case $INSTALL in
25726   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25727   *) ac_INSTALL=$ac_dots$INSTALL ;;
25728   esac
25729
25730   if test x"$ac_file" != x-; then
25731     { echo "$as_me:25731: creating $ac_file" >&5
25732 echo "$as_me: creating $ac_file" >&6;}
25733     rm -f "$ac_file"
25734   fi
25735   # Let's still pretend it is `configure' which instantiates (i.e., don't
25736   # use $as_me), people would be surprised to read:
25737   #    /* config.h.  Generated automatically by config.status.  */
25738   configure_input="Generated automatically from `echo $ac_file_in |
25739                                                  sed 's,.*/,,'` by configure."
25740
25741   # First look for the input files in the build tree, otherwise in the
25742   # src tree.
25743   ac_file_inputs=`IFS=:
25744     for f in $ac_file_in; do
25745       case $f in
25746       -) echo $tmp/stdin ;;
25747       [\\/$]*)
25748          # Absolute (can't be DOS-style, as IFS=:)
25749          test -f "$f" || { { echo "$as_me:25749: error: cannot find input file: $f" >&5
25750 echo "$as_me: error: cannot find input file: $f" >&2;}
25751    { (exit 1); exit 1; }; }
25752          echo $f;;
25753       *) # Relative
25754          if test -f "$f"; then
25755            # Build tree
25756            echo $f
25757          elif test -f "$srcdir/$f"; then
25758            # Source tree
25759            echo $srcdir/$f
25760          else
25761            # /dev/null tree
25762            { { echo "$as_me:25762: error: cannot find input file: $f" >&5
25763 echo "$as_me: error: cannot find input file: $f" >&2;}
25764    { (exit 1); exit 1; }; }
25765          fi;;
25766       esac
25767     done` || { (exit 1); exit 1; }
25768 EOF
25769 cat >>$CONFIG_STATUS <<\EOF
25770   ac_warn_datarootdir=no
25771   if test x"$ac_file" != x-; then
25772     for ac_item in $ac_file_inputs
25773     do
25774       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25775       if test -n "$ac_seen"; then
25776         ac_used=`grep '@datarootdir@' $ac_item`
25777         if test -z "$ac_used"; then
25778           { echo "$as_me:25778: WARNING: datarootdir was used implicitly but not set:
25779 $ac_seen" >&5
25780 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25781 $ac_seen" >&2;}
25782           ac_warn_datarootdir=yes
25783         fi
25784       fi
25785       ac_seen=`grep '${datarootdir}' $ac_item`
25786       if test -n "$ac_seen"; then
25787         { echo "$as_me:25787: WARNING: datarootdir was used explicitly but not set:
25788 $ac_seen" >&5
25789 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25790 $ac_seen" >&2;}
25791         ac_warn_datarootdir=yes
25792       fi
25793     done
25794   fi
25795
25796 if test "x$ac_warn_datarootdir" = xyes; then
25797   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25798 fi
25799
25800 EOF
25801 cat >>$CONFIG_STATUS <<EOF
25802   sed "$ac_vpsub
25803 $extrasub
25804 EOF
25805 cat >>$CONFIG_STATUS <<\EOF
25806 :t
25807 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25808 s,@configure_input@,$configure_input,;t t
25809 s,@srcdir@,$ac_srcdir,;t t
25810 s,@top_srcdir@,$ac_top_srcdir,;t t
25811 s,@INSTALL@,$ac_INSTALL,;t t
25812 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25813   rm -f $tmp/stdin
25814   if test x"$ac_file" != x-; then
25815     cp $tmp/out $ac_file
25816
25817     for ac_name in prefix exec_prefix datarootdir
25818     do
25819         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25820         if test -n "$ac_seen"; then
25821             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25822             if test -z "$ac_init"; then
25823               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25824               { echo "$as_me:25824: WARNING: Variable $ac_name is used but was not set:
25825 $ac_seen" >&5
25826 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25827 $ac_seen" >&2;}
25828             fi
25829         fi
25830     done
25831     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25832     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25833     if test -s $tmp/out; then
25834       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25835       { echo "$as_me:25835: WARNING: Some variables may not be substituted:
25836 $ac_seen" >&5
25837 echo "$as_me: WARNING: Some variables may not be substituted:
25838 $ac_seen" >&2;}
25839     fi
25840   else
25841     cat $tmp/out
25842   fi
25843   rm -f $tmp/out
25844
25845 done
25846 EOF
25847 cat >>$CONFIG_STATUS <<\EOF
25848
25849 #
25850 # CONFIG_HEADER section.
25851 #
25852
25853 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25854 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25855 #
25856 # ac_d sets the value in "#define NAME VALUE" lines.
25857 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25858 ac_dB='[        ].*$,\1#\2'
25859 ac_dC=' '
25860 ac_dD=',;t'
25861 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25862 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25863 ac_iB='\([      ]\),\1#\2define\3'
25864 ac_iC=' '
25865 ac_iD='\4,;t'
25866 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25867 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25868 ac_uB='$,\1#\2define\3'
25869 ac_uC=' '
25870 ac_uD=',;t'
25871
25872 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25873   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25874   case $ac_file in
25875   - | *:- | *:-:* ) # input from stdin
25876         cat >$tmp/stdin
25877         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25878         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25879   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25880         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25881   * )   ac_file_in=$ac_file.in ;;
25882   esac
25883
25884   test x"$ac_file" != x- && { echo "$as_me:25884: creating $ac_file" >&5
25885 echo "$as_me: creating $ac_file" >&6;}
25886
25887   # First look for the input files in the build tree, otherwise in the
25888   # src tree.
25889   ac_file_inputs=`IFS=:
25890     for f in $ac_file_in; do
25891       case $f in
25892       -) echo $tmp/stdin ;;
25893       [\\/$]*)
25894          # Absolute (can't be DOS-style, as IFS=:)
25895          test -f "$f" || { { echo "$as_me:25895: error: cannot find input file: $f" >&5
25896 echo "$as_me: error: cannot find input file: $f" >&2;}
25897    { (exit 1); exit 1; }; }
25898          echo $f;;
25899       *) # Relative
25900          if test -f "$f"; then
25901            # Build tree
25902            echo $f
25903          elif test -f "$srcdir/$f"; then
25904            # Source tree
25905            echo $srcdir/$f
25906          else
25907            # /dev/null tree
25908            { { echo "$as_me:25908: error: cannot find input file: $f" >&5
25909 echo "$as_me: error: cannot find input file: $f" >&2;}
25910    { (exit 1); exit 1; }; }
25911          fi;;
25912       esac
25913     done` || { (exit 1); exit 1; }
25914   # Remove the trailing spaces.
25915   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25916
25917 EOF
25918
25919 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25920 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25921 # be either 'cat' or 'sort'.
25922 cat confdefs.h | uniq >conftest.vals
25923
25924 # Break up conftest.vals because some shells have a limit on
25925 # the size of here documents, and old seds have small limits too.
25926
25927 rm -f conftest.tail
25928 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25929 while grep . conftest.vals >/dev/null
25930 do
25931   # Write chunks of a limited-size here document to conftest.frag.
25932   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25933   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25934   echo 'CEOF' >> $CONFIG_STATUS
25935   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25936   rm -f conftest.vals
25937   mv conftest.tail conftest.vals
25938 done
25939 rm -f conftest.vals
25940
25941 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25942 # marker @DEFS@.
25943 echo '  cat >> conftest.edit <<CEOF
25944 /@DEFS@/r conftest.frag
25945 /@DEFS@/d
25946 CEOF
25947 sed -f conftest.edit $tmp/in > $tmp/out
25948 rm -f $tmp/in
25949 mv $tmp/out $tmp/in
25950 rm -f conftest.edit conftest.frag
25951 ' >> $CONFIG_STATUS
25952
25953 cat >>$CONFIG_STATUS <<\EOF
25954   # Let's still pretend it is `configure' which instantiates (i.e., don't
25955   # use $as_me), people would be surprised to read:
25956   #    /* config.h.  Generated automatically by config.status.  */
25957   if test x"$ac_file" = x-; then
25958     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25959   else
25960     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25961   fi
25962   cat $tmp/in >>$tmp/config.h
25963   rm -f $tmp/in
25964   if test x"$ac_file" != x-; then
25965     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25966       { echo "$as_me:25966: $ac_file is unchanged" >&5
25967 echo "$as_me: $ac_file is unchanged" >&6;}
25968     else
25969       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25970          X"$ac_file" : 'X\(//\)[^/]' \| \
25971          X"$ac_file" : 'X\(//\)$' \| \
25972          X"$ac_file" : 'X\(/\)' \| \
25973          .     : '\(.\)' 2>/dev/null ||
25974 echo X"$ac_file" |
25975     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25976           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25977           /^X\(\/\/\)$/{ s//\1/; q; }
25978           /^X\(\/\).*/{ s//\1/; q; }
25979           s/.*/./; q'`
25980       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25981         { case "$ac_dir" in
25982   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25983   *)                      as_incr_dir=.;;
25984 esac
25985 as_dummy="$ac_dir"
25986 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25987   case $as_mkdir_dir in
25988     # Skip DOS drivespec
25989     ?:) as_incr_dir=$as_mkdir_dir ;;
25990     *)
25991       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25992       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25993     ;;
25994   esac
25995 done; }
25996
25997       fi
25998       rm -f $ac_file
25999       mv $tmp/config.h $ac_file
26000     fi
26001   else
26002     cat $tmp/config.h
26003     rm -f $tmp/config.h
26004   fi
26005 done
26006 EOF
26007 cat >>$CONFIG_STATUS <<\EOF
26008 #
26009 # CONFIG_COMMANDS section.
26010 #
26011 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26012   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26013   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26014
26015   case $ac_dest in
26016     default )
26017 if test "x$cf_with_tests" != xno ; then
26018
26019 for cf_dir in test
26020 do
26021         if test ! -d $srcdir/$cf_dir; then
26022                 continue
26023         elif test -f $srcdir/$cf_dir/programs; then
26024                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26025         fi
26026 done
26027
26028 fi
26029
26030 cf_prefix=$LIB_PREFIX
26031
26032 case $cf_cv_shlib_version in
26033 (cygdll|msysdll|mingw)
26034         TINFO_NAME=$TINFO_ARG_SUFFIX
26035         TINFO_SUFFIX=.dll
26036         ;;
26037 esac
26038
26039 if test -n "$TINFO_SUFFIX" ; then
26040         case $TINFO_SUFFIX in
26041         (tw*)
26042                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26043                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26044                 ;;
26045         (t*)
26046                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26047                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26048                 ;;
26049         (w*)
26050                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26051                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26052                 ;;
26053         esac
26054 fi
26055
26056 for cf_dir in $SRC_SUBDIRS
26057 do
26058         if test ! -d $srcdir/$cf_dir ; then
26059                 continue
26060         elif test -f $srcdir/$cf_dir/modules; then
26061
26062                 SHARED_LIB=
26063                 Libs_To_Make=
26064                 cf_awk_program=
26065                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26066                 then
26067                         cf_awk_program="$cf_awk_program\
26068 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26069 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26070 "
26071                 fi
26072
26073                 if test "x$WILDCARD_SYMS" = xno
26074                 then
26075                         cf_awk_program="$cf_awk_program\
26076 /[      ]_\\*;/ { skip=1; next; }\
26077 "
26078                 fi
26079
26080                 if test "x$cf_awk_program" != "x"
26081                 then
26082                         cat >>$cf_dir/Makefile <<CF_EOF
26083
26084 # Generated by CF_LIB_RULES
26085 resulting.map: $UNALTERED_SYMS
26086         $AWK 'BEGIN { skip = 1; last=""; } \
26087 $cf_awk_program \
26088 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26089  skip = 0; last = \$\$0; } \
26090 END { print last; }' < $UNALTERED_SYMS >\$@
26091
26092 distclean::
26093         rm -f resulting.map
26094 CF_EOF
26095                 fi
26096
26097                 for cf_item in $cf_LIST_MODELS
26098                 do
26099
26100         case X$cf_item in
26101         (Xlibtool)
26102                 cf_suffix='.la'
26103                 cf_depsuf=$cf_suffix
26104                 ;;
26105         (Xdebug)
26106                 cf_suffix='_g.a'
26107                 cf_depsuf=$cf_suffix
26108                 ;;
26109         (Xprofile)
26110                 cf_suffix='_p.a'
26111                 cf_depsuf=$cf_suffix
26112                 ;;
26113         (Xshared)
26114                 case $cf_cv_system_name in
26115                 (aix[5-7]*)
26116                         cf_suffix='.so'
26117                         cf_depsuf=$cf_suffix
26118                         ;;
26119                 (cygwin*|msys*|mingw*)
26120                         cf_suffix='.dll'
26121                         cf_depsuf='.dll.a'
26122                         ;;
26123                 (darwin*)
26124                         cf_suffix='.dylib'
26125                         cf_depsuf=$cf_suffix
26126                         ;;
26127                 (hpux*)
26128                         case $target in
26129                         (ia64*)
26130                                 cf_suffix='.so'
26131                                 cf_depsuf=$cf_suffix
26132                                 ;;
26133                         (*)
26134                                 cf_suffix='.sl'
26135                                 cf_depsuf=$cf_suffix
26136                                 ;;
26137                         esac
26138                         ;;
26139                 (*)
26140                         cf_suffix='.so'
26141                         cf_depsuf=$cf_suffix
26142                         ;;
26143                 esac
26144                 ;;
26145         (*)
26146                 cf_suffix='.a'
26147                 cf_depsuf=$cf_suffix
26148                 ;;
26149         esac
26150         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26151         then
26152                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26153                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26154         fi
26155
26156                         cf_libname=$cf_dir
26157                         test "$cf_dir" = c++ && cf_libname=ncurses++
26158                         if test $cf_item = shared ; then
26159                                 if test -n "${LIB_SUFFIX}"
26160                                 then
26161                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26162                                 else
26163                                         cf_shared_suffix="$cf_suffix"
26164                                 fi
26165                                 if test "$cf_cv_do_symlinks" = yes ; then
26166                                         cf_version_name=
26167
26168                                         case "$cf_cv_shlib_version" in
26169                                         (rel)
26170                                                 cf_version_name=REL_VERSION
26171                                                 ;;
26172                                         (abi)
26173                                                 cf_version_name=ABI_VERSION
26174                                                 ;;
26175                                         esac
26176
26177                                         if test -n "$cf_version_name"
26178                                         then
26179                                                 case "$cf_cv_system_name" in
26180                                                 (darwin*)
26181                                                         # "w", etc?
26182                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26183                                                         ;;
26184                                                 (*)
26185                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26186                                                         ;;
26187                                                 esac
26188                                         fi
26189                                         if test -n "${USE_LIB_SUFFIX}"
26190                                         then
26191                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26192                                         else
26193                                                 cf_shared_suffix="$cf_suffix"
26194                                         fi
26195                                 fi
26196                                 # cygwin needs import library, and has unique naming convention
26197                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26198                                 # use 'cyg' prefix for shared lib.
26199                                 case $cf_cv_shlib_version in
26200                                 (cygdll)
26201                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26202                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26203                                         ;;
26204                                 (msysdll)
26205                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26206                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26207                                         ;;
26208                                 (mingw)
26209                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26210                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26211                                         ;;
26212                                 (*)
26213                                         cf_add_lib=
26214                                         ;;
26215                                 esac
26216                                 if test -n "$cf_add_lib"
26217                                 then
26218                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26219                                         continue
26220                                 fi
26221                         fi
26222                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26223                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26224                 done
26225
26226                 if test $cf_dir = ncurses ; then
26227                         cf_subsets="$LIB_SUBSETS"
26228                         cf_r_parts="$cf_subsets"
26229                         cf_liblist="$Libs_To_Make"
26230
26231                         while test -n "$cf_r_parts"
26232                         do
26233                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26234                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26235                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26236                                         cf_add_lib=
26237                                         case $cf_l_parts in
26238                                         (*termlib*)
26239                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26240                                                 ;;
26241                                         (*ticlib*)
26242                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26243                                                 ;;
26244                                         (*)
26245                                                 break
26246                                                 ;;
26247                                         esac
26248                                         if test -n "$cf_add_lib"; then
26249                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26250                                         fi
26251                                 else
26252                                         break
26253                                 fi
26254                         done
26255                 else
26256                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26257                 fi
26258
26259                 if test $cf_dir = c++; then
26260                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26261                                 cf_list=
26262                                 for cf_item in $Libs_To_Make
26263                                 do
26264                                         case $cf_item in
26265                                         (*.a)
26266                                                 ;;
26267                                         (*)
26268                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26269                                                 ;;
26270                                         esac
26271                                         for cf_test in $cf_list
26272                                         do
26273                                                 if test "$cf_test" = "$cf_item"
26274                                                 then
26275                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26276                                                         cf_item=
26277                                                         break
26278                                                 fi
26279                                         done
26280                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26281                                 done
26282                                 Libs_To_Make="$cf_list"
26283                         fi
26284                 fi
26285
26286                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26287                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26288                         $cf_dir/Makefile >$cf_dir/Makefile.out
26289                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26290
26291                 $AWK -f $srcdir/mk-0th.awk \
26292                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26293                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26294
26295                 for cf_subset in $cf_subsets
26296                 do
26297                         cf_subdirs=
26298                         for cf_item in $cf_LIST_MODELS
26299                         do
26300
26301                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26302
26303 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26304
26305                         CXX_MODEL=$cf_ITEM
26306                         if test "$CXX_MODEL" = SHARED; then
26307                                 case $cf_cv_shlib_version in
26308                                 (cygdll|msysdll|mingw)
26309                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26310
26311 echo "${as_me:-configure}:26311: testing overriding CXX_MODEL to SHARED ..." 1>&5
26312
26313                                         with_shared_cxx=yes
26314                                         ;;
26315                                 (*)
26316                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26317                                         ;;
26318                                 esac
26319                         fi
26320
26321         case X$cf_item in
26322         (Xlibtool)
26323                 cf_suffix='.la'
26324                 cf_depsuf=$cf_suffix
26325                 ;;
26326         (Xdebug)
26327                 cf_suffix='_g.a'
26328                 cf_depsuf=$cf_suffix
26329                 ;;
26330         (Xprofile)
26331                 cf_suffix='_p.a'
26332                 cf_depsuf=$cf_suffix
26333                 ;;
26334         (Xshared)
26335                 case $cf_cv_system_name in
26336                 (aix[5-7]*)
26337                         cf_suffix='.so'
26338                         cf_depsuf=$cf_suffix
26339                         ;;
26340                 (cygwin*|msys*|mingw*)
26341                         cf_suffix='.dll'
26342                         cf_depsuf='.dll.a'
26343                         ;;
26344                 (darwin*)
26345                         cf_suffix='.dylib'
26346                         cf_depsuf=$cf_suffix
26347                         ;;
26348                 (hpux*)
26349                         case $target in
26350                         (ia64*)
26351                                 cf_suffix='.so'
26352                                 cf_depsuf=$cf_suffix
26353                                 ;;
26354                         (*)
26355                                 cf_suffix='.sl'
26356                                 cf_depsuf=$cf_suffix
26357                                 ;;
26358                         esac
26359                         ;;
26360                 (*)
26361                         cf_suffix='.so'
26362                         cf_depsuf=$cf_suffix
26363                         ;;
26364                 esac
26365                 ;;
26366         (*)
26367                 cf_suffix='.a'
26368                 cf_depsuf=$cf_suffix
26369                 ;;
26370         esac
26371         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26372         then
26373                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26374                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26375         fi
26376
26377         case $cf_item in
26378         (libtool) cf_subdir='obj_lo'  ;;
26379         (normal)  cf_subdir='objects' ;;
26380         (debug)   cf_subdir='obj_g' ;;
26381         (profile) cf_subdir='obj_p' ;;
26382         (shared)
26383                 case $cf_cv_system_name in
26384                 (cygwin|msys)
26385                         cf_subdir='objects' ;;
26386                 (*)
26387                         cf_subdir='obj_s' ;;
26388                 esac
26389         esac
26390
26391                         # Test for case where we build libtinfo with a different name.
26392                         cf_libname=$cf_dir
26393                         if test $cf_dir = ncurses ; then
26394                                 case $cf_subset in
26395                                 (*base*)
26396                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26397                                         ;;
26398                                 (*termlib*)
26399                                         cf_libname=$TINFO_LIB_SUFFIX
26400                                         ;;
26401                                 (ticlib*)
26402                                         cf_libname=$TICS_LIB_SUFFIX
26403                                         ;;
26404                                 esac
26405                         elif test $cf_dir = c++ ; then
26406                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26407                         else
26408                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26409                         fi
26410                         if test -n "${USE_ARG_SUFFIX}" ; then
26411                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26412                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26413                         fi
26414
26415                         # These dependencies really are for development, not
26416                         # builds, but they are useful in porting, too.
26417                         cf_depend="../include/ncurses_cfg.h"
26418                         if test "$srcdir" = "."; then
26419                                 cf_reldir="."
26420                         else
26421                                 cf_reldir="\${srcdir}"
26422                         fi
26423
26424                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26425                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26426                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26427                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26428                         fi
26429
26430                         cf_dir_suffix=
26431                         old_cf_suffix="$cf_suffix"
26432                         if test "$cf_cv_shlib_version_infix" = yes ; then
26433                         if test -n "$USE_LIB_SUFFIX" ; then
26434                                 case $USE_LIB_SUFFIX in
26435                                 (tw*)
26436                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26437                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26438                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26439                                         ;;
26440                                 (t*)
26441                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26442                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26443                                         cf_dir_suffix=t$EXTRA_SUFFIX
26444                                         ;;
26445                                 (w*)
26446                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26447                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26448                                         cf_dir_suffix=w$EXTRA_SUFFIX
26449                                         ;;
26450                                 (*)
26451                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26452                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26453                                         cf_dir_suffix=$EXTRA_SUFFIX
26454                                         ;;
26455                                 esac
26456                         fi
26457                         fi
26458
26459                         $AWK -f $srcdir/mk-1st.awk \
26460                                 name=${cf_libname}${cf_dir_suffix} \
26461                                 traces=$LIB_TRACING \
26462                                 MODEL=$cf_ITEM \
26463                                 CXX_MODEL=$CXX_MODEL \
26464                                 model=$cf_subdir \
26465                                 prefix=$cf_prefix \
26466                                 suffix=$cf_suffix \
26467                                 subset=$cf_subset \
26468                                 driver=$cf_cv_term_driver \
26469                                 SymLink="$LN_S" \
26470                                 TermlibRoot=$TINFO_NAME \
26471                                 TermlibSuffix=$TINFO_SUFFIX \
26472                                 ShlibVer=$cf_cv_shlib_version \
26473                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26474                                 ReLink=${cf_cv_do_relink:-no} \
26475                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26476                                 DoLinks=$cf_cv_do_symlinks \
26477                                 rmSoLocs=$cf_cv_rm_so_locs \
26478                                 ldconfig="$LDCONFIG" \
26479                                 overwrite=$WITH_OVERWRITE \
26480                                 depend="$cf_depend" \
26481                                 host="$host" \
26482                                 libtool_version="$LIBTOOL_VERSION" \
26483                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26484
26485                         cf_suffix="$old_cf_suffix"
26486
26487                         for cf_subdir2 in $cf_subdirs lib
26488                         do
26489                                 test $cf_subdir = $cf_subdir2 && break
26490                         done
26491                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26492                         $AWK -f $srcdir/mk-2nd.awk \
26493                                 name=$cf_dir \
26494                                 traces=$LIB_TRACING \
26495                                 MODEL=$cf_ITEM \
26496                                 model=$cf_subdir \
26497                                 subset=$cf_subset \
26498                                 srcdir=$srcdir \
26499                                 echo=$WITH_ECHO \
26500                                 crenames=$cf_cv_prog_CC_c_o \
26501                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26502                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26503                         cf_subdirs="$cf_subdirs $cf_subdir"
26504                         done
26505                 done
26506         fi
26507
26508         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26509 done
26510
26511 for cf_dir in $SRC_SUBDIRS
26512 do
26513         if test ! -d $srcdir/$cf_dir ; then
26514                 continue
26515         fi
26516
26517         if test -f $cf_dir/Makefile ; then
26518                 case "$cf_dir" in
26519                 (Ada95)
26520                         echo 'libs \' >> Makefile
26521                         echo 'install.libs \' >> Makefile
26522                         echo 'uninstall.libs ::' >> Makefile
26523                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26524                         ;;
26525                 esac
26526         fi
26527
26528         if test -f $srcdir/$cf_dir/modules; then
26529                 echo >> Makefile
26530                 if test -f $srcdir/$cf_dir/headers; then
26531 cat >> Makefile <<CF_EOF
26532 install.includes \\
26533 uninstall.includes \\
26534 CF_EOF
26535                 fi
26536 if test "$cf_dir" != "c++" ; then
26537 echo 'lint \' >> Makefile
26538 fi
26539 cat >> Makefile <<CF_EOF
26540 libs \\
26541 lintlib \\
26542 install.libs \\
26543 uninstall.libs \\
26544 install.$cf_dir \\
26545 uninstall.$cf_dir ::
26546         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26547 CF_EOF
26548         elif test -f $srcdir/$cf_dir/headers; then
26549 cat >> Makefile <<CF_EOF
26550
26551 libs \\
26552 install.libs \\
26553 uninstall.libs \\
26554 install.includes \\
26555 uninstall.includes ::
26556         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26557 CF_EOF
26558 fi
26559 done
26560
26561 if test "x$cf_with_db_install" = xyes; then
26562 cat >> Makefile <<CF_EOF
26563
26564 install.libs uninstall.libs \\
26565 install.data uninstall.data ::
26566 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26567 CF_EOF
26568 else
26569 cat >> Makefile <<CF_EOF
26570
26571 install.libs uninstall.libs ::
26572         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26573 CF_EOF
26574 fi
26575
26576 if test "x$cf_with_manpages" = xyes; then
26577 cat >> Makefile <<CF_EOF
26578
26579 install.man \\
26580 uninstall.man ::
26581         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26582 CF_EOF
26583 fi
26584
26585 cat >> Makefile <<CF_EOF
26586
26587 distclean ::
26588         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26589         rm -f headers.sh headers.sed mk_shared_lib.sh
26590         rm -f edit_man.* man_alias.*
26591         rm -rf \${DIRS_TO_MAKE}
26592 CF_EOF
26593
26594 # Special case: tack's manpage lives in its own directory.
26595 if test "x$cf_with_manpages" = xyes; then
26596 if test "x$cf_with_tack" = "xyes"; then
26597 cat >> Makefile <<CF_EOF
26598
26599 install.man \\
26600 uninstall.man ::
26601         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26602 CF_EOF
26603 fi
26604 fi
26605
26606 rm -f headers.sed headers.sh
26607
26608 echo creating headers.sh
26609 cat >headers.sh <<CF_EOF
26610 #! $SHELL
26611 # This shell script is generated by the 'configure' script.  It is invoked in a
26612 # subdirectory of the build tree.  It generates a sed-script in the parent
26613 # directory that is used to adjust includes for header files that reside in a
26614 # subdirectory of /usr/include, etc.
26615 PRG=""
26616 while test \$# != 3
26617 do
26618 PRG="\$PRG \$1"; shift
26619 done
26620 DST=\$1
26621 REF=\$2
26622 SRC=\$3
26623 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26624 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26625 echo installing \$SRC in \$DST
26626 CF_EOF
26627
26628 if test $WITH_CURSES_H = yes; then
26629         cat >>headers.sh <<CF_EOF
26630 case \$DST in
26631 (/*/include/*)
26632         END=\`basename \$DST\`
26633         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26634         do
26635                 NAME=\`basename \$i\`
26636                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26637         done
26638         ;;
26639 (*)
26640         echo "" >> \$TMPSED
26641         ;;
26642 esac
26643 CF_EOF
26644
26645 else
26646         cat >>headers.sh <<CF_EOF
26647 case \$DST in
26648 (/*/include/*)
26649         END=\`basename \$DST\`
26650         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26651         do
26652                 NAME=\`basename \$i\`
26653                 if test "\$NAME" = "curses.h"
26654                 then
26655                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26656                         NAME=ncurses.h
26657                 fi
26658                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26659         done
26660         ;;
26661 (*)
26662         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26663         ;;
26664 esac
26665 CF_EOF
26666 fi
26667 cat >>headers.sh <<CF_EOF
26668 rm -f \$TMPSRC
26669 sed -f \$TMPSED \$SRC > \$TMPSRC
26670 NAME=\`basename \$SRC\`
26671 CF_EOF
26672 if test $WITH_CURSES_H != yes; then
26673         cat >>headers.sh <<CF_EOF
26674 test "\$NAME" = "curses.h" && NAME=ncurses.h
26675 CF_EOF
26676 fi
26677 cat >>headers.sh <<CF_EOF
26678 # Just in case someone gzip'd manpages, remove the conflicting copy.
26679 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26680
26681 eval \$PRG \$TMPSRC \$DST/\$NAME
26682 rm -f \$TMPSRC \$TMPSED
26683 CF_EOF
26684
26685 chmod 0755 headers.sh
26686
26687 for cf_dir in $SRC_SUBDIRS
26688 do
26689         if test ! -d $srcdir/$cf_dir ; then
26690                 continue
26691         fi
26692
26693         if test -f $srcdir/$cf_dir/headers; then
26694                 $AWK -f $srcdir/mk-hdr.awk \
26695                         subset="$LIB_SUBSETS" \
26696                         compat="$WITH_CURSES_H" \
26697                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26698         fi
26699
26700         if test -f $srcdir/$cf_dir/modules; then
26701                 if test "$cf_dir" != "c++" ; then
26702                         cat >>$cf_dir/Makefile <<"CF_EOF"
26703 depend : ${AUTO_SRC}
26704         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26705
26706 # DO NOT DELETE THIS LINE -- make depend depends on it.
26707 CF_EOF
26708                 fi
26709         fi
26710 done
26711
26712 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26713 if test -z "$USE_OLD_MAKERULES" ; then
26714         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26715 fi
26716 fi
26717  ;;
26718   esac
26719 done
26720 EOF
26721
26722 cat >>$CONFIG_STATUS <<\EOF
26723
26724 { (exit 0); exit 0; }
26725 EOF
26726 chmod +x $CONFIG_STATUS
26727 ac_clean_files=$ac_clean_files_save
26728
26729 # configure is writing to config.log, and then calls config.status.
26730 # config.status does its own redirection, appending to config.log.
26731 # Unfortunately, on DOS this fails, as config.log is still kept open
26732 # by configure, so config.status won't be able to write to it; its
26733 # output is simply discarded.  So we exec the FD to /dev/null,
26734 # effectively closing config.log, so it can be properly (re)opened and
26735 # appended to by config.status.  When coming back to configure, we
26736 # need to make the FD available again.
26737 if test "$no_create" != yes; then
26738   ac_cs_success=:
26739   exec 5>/dev/null
26740   $SHELL $CONFIG_STATUS || ac_cs_success=false
26741   exec 5>>config.log
26742   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26743   # would make configure fail if this is the last instruction.
26744   $ac_cs_success || { (exit 1); exit 1; }
26745 fi
26746 ${MAKE:-make} preinstall